openoffice-api mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mathias Röllig <mroellig.n...@gmx.net>
Subject Re: Set property of selected cell range in a textable in Writer
Date Wed, 08 Jul 2015 16:19:50 GMT
Hello Mark!

What is your Selection? If you select a complete cell or cellrange it 
should work.
What means "it works not"? Is there a errror message? If not:

Sub CellModifyTest

   Dim oCurrentSelection As Object
   Dim i As Integer

   i = oCurrentSelection.getPropertyValue( "WritingMode" )
   oCurrentSelection.setPropertyValue( "WritingMode", 
com.sun.star.text.WritingMode2.TB_RL )
   MsgBox( "WritingMode was: " & i & " new: " & 
oCurrentSelection.getPropertyValue( "WritingMode" )

   i = oCurrentSelection.getPropertyValue( "ParaAdjust" )
   oCurrentSelection.setPropertyValue( "ParaAdjust", 
com.sun.star.style.ParagraphAdjust.RIGHT )
   MsgBox( "ParaAdjust was: " & i & " new: " & 
oCurrentSelection.getPropertyValue( "ParaAdjust" )

   i = oCurrentSelection.getPropertyValue( "ParaVertAlignment" )
   oCurrentSelection.setPropertyValue( "ParaVertAlignment", 
com.sun.star.text.ParagraphVertAlign.BOTTOM )
   MsgBox( "ParaVertAlignment was: " & i & " new: " & 
oCurrentSelection.getPropertyValue( "ParaVertAlignment" )

End Sub


See
http://www.openoffice.org/api/docs/common/ref/com/sun/star/style/ParagraphPropertiesComplex.html#WritingMode
http://www.openoffice.org/api/docs/common/ref/com/sun/star/style/ParagraphProperties.html#ParaAdjust
http://www.openoffice.org/api/docs/common/ref/com/sun/star/style/ParagraphProperties.html#ParaVertAlignment


Regards, Mathias

---------------------------------------------------------------------
To unsubscribe, e-mail: api-unsubscribe@openoffice.apache.org
For additional commands, e-mail: api-help@openoffice.apache.org


Mime
View raw message