Issue 116420 - com.sun.star.text.CellProperties.VertOrient do not work
Summary: com.sun.star.text.CellProperties.VertOrient do not work
Status: ACCEPTED
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: OOO330m20
Hardware: All All
: P3 Trivial (vote)
Target Milestone: 3.4.0
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-12 09:12 UTC by lunter
Modified: 2017-05-20 11:33 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
testcase (1.25 KB, text/plain)
2011-01-26 09:06 UTC, lunter
no flags Details
proposed fix (2.54 KB, patch)
2011-01-26 15:16 UTC, Oliver Specht
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description lunter 2011-01-12 09:12:18 UTC
oTable = oDoc.createInstance ( "com.sun.star.text.TextTable" )
oTable.initialize( 5, 5 )
oCells = oTable.getCellRangeByPosition ( 0, 0, 4, 4 )

oCells.CharWeight = 150

' Range vertical centering do not work!
oCells.VertOrient = 2
Comment 1 michael.ruess 2011-01-12 10:10:20 UTC
MRU->OS: please have a look; thanks!
Comment 2 lunter 2011-01-26 09:05:50 UTC
Sub Main

Dim oSM
Dim oDesk, oDoc As Object
Dim arg()
Dim oTable As Object
Dim oCells As Object
Dim oText As Object
Dim oCursor As Object

Dim oCellText As Object
Dim oCellCursor As Object
    
Set oSM = CreateObject("com.sun.star.ServiceManager")
Set oDesk = oSM.createInstance("com.sun.star.frame.Desktop")
Set oDoc = oDesk.loadComponentFromURL("private:factory/swriter","_blank",0,arg
())

Set oText = oDoc.Text
Set oCursor = oDoc.CurrentController.GetViewCursor

Set oTable = oDoc.createInstance("com.sun.star.text.TextTable")
oTable.initialize(1,2)
oText.InsertTextContent(oCursor,oTable,false)

Set oCells = oTable.getCellRangeByPosition (0,0,1,0)
' Range chars weight works
oCells.CharWeight = 150
' Range vertical centering do not 
work !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
oCells.VertOrient = 2

Set oCellText = oTable.GetCellByPosition(0,0)
Set oCellCursor = oCellText.CreateTextCursor
oCellText.InsertString(oCellCursor,"oCells.VertOrient = 2" + chr(13) + "do not" 
+ chr(13) + "work",false)

Set oCellText = oTable.GetCellByPosition(1,0)
Set oCellCursor = oCellText.CreateTextCursor
oCellText.InsertString(oCellCursor,"bolder and vertical centered Text",false)

' amazingly, it works:
' oCellText.VertOrient = 2

End Sub
Comment 3 lunter 2011-01-26 09:06:22 UTC
Created attachment 75652 [details]
testcase
Comment 4 lunter 2011-01-26 09:06:55 UTC
Go to attachments for testcase with BASIC code.

VertOrient do not work with cellRange
...only with single cell.

Amazingly, others properties (eg CharWeight) work with cellRange.
Comment 5 Oliver Specht 2011-01-26 15:16:40 UTC
Created attachment 75659 [details]
proposed fix
Comment 6 Oliver Specht 2011-01-26 15:17:44 UTC
accepted
Comment 7 Marcus 2017-05-20 11:33:24 UTC
Reset assigne to the default "issues@openoffice.apache.org".