Issue 116420

Summary: com.sun.star.text.CellProperties.VertOrient do not work
Product: Writer Reporter: lunter <lunter>
Component: codeAssignee: AOO issues mailing list <issues>
Status: ACCEPTED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: issues
Version: OOO330m20   
Target Milestone: 3.4.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
testcase
none
proposed fix none

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".