First, you need to understand what is returned when you get the current
selection and then you need to check for it. For example:
Nothing selected or multiple text ranges: com.sun.star.text.TextRanges
ne or more cells selected in one block: com.sun.star.text.TextTableCursor
So, you must inspe
Hi,
I didn't express very clearly. What I want to do is to set WritingMode
property for all the selected cells.
I did use MRI to explore APIs, but I was stuck in the middle.
To Mathias,
When selecting multiple cells, WritingMode of the first cell changed. The
remaining cells didn't
In contrast,
Hi Mark,
You should use Xray to help you explore the API.
All my indications here can be found by a study of what Xray displays (and then
reading of API docs).
- You can find if your selection is inside a paragraph of a cell, and then find
the cell and its table:
Dim firstSelection As Objec
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" )
oCu
Hi Mathias,
While invoking setPropertyValue for ParaAdjust works, it is a Paragraph
property instead of a cell property.
Sub ModifyCells
Dim oCurrentSelection As Variant
oCurrentSelection = ThisComponent.getCurrentSelection()
oCurrentSelection.setPropertyValue( "WritingMode",
com.sun.st
Hello Mark!
It works. Maybe you are missing something like
oCurrentSelection.setPropertyValue( "ParaAdjust",
com.sun.star.style.ParagraphAdjust.RIGHT )
Regards, Mathias
-
To unsubscribe, e-mail: api-unsubscr...@openoffice.apa
Hi Mathias,
It doesn't work.
2015-07-08 16:04 GMT+08:00 Mathias Röllig :
> Hello Hung!
>
> It should be enough:
>
> Sub Snippet
>Dim oCurrentSelection As Variant
>
>oCurrentSelection = ThisComponent.getCurrentSelection()
>oCurrentSelection.setPropertyValue( "WritingMode",
> com.sun.s
Hello Hung!
It should be enough:
Sub Snippet
Dim oCurrentSelection As Variant
oCurrentSelection = ThisComponent.getCurrentSelection()
oCurrentSelection.setPropertyValue( "WritingMode",
com.sun.star.text.WritingMode2.TB_RL )
End Sub
Regards, Mathias