oTable = oDoc.createInstance ( "com.sun.star.text.TextTable" ) oTable.initialize( 5, 5 ) oCells = oTable.getCellRangeByPosition ( 0, 0, 4, 4 ) ' Range chars weight works oCells.CharWeight = 150 ' Range vertical centering do not work! oCells.VertOrient = 2
uh, this macro snippet doesn't work for me, oDoc isn't initialised with anything ( I presume it is the document e.g. thiscomponent ) but even after changing that I get an indexoutofbounds exception. Please supply a working macro to demonstrate the problem ( or a macro in a document ). I am marking this as invalid for the moment, please reopen when you can supply the information
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
Created attachment 42513 [details] testcase
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.
sorry for re-code - by mistake
ok, I can reproduce Not sure if this is by design ( although sounds weird if it is ) cedric do you have any idea about this api ?
People from openoffice.org are working also. This is their proposed fix: http://www.openoffice.org/nonav/issues/showattachment.cgi/75659/i116420.diff
can you review the patch mentioned in comment #8
(In reply to comment #9) > can you review the patch mentioned in comment #8 That patch looks good to me... and seems to indicate that this property wasn't handled at all in Writer tables... I just pushed the patch to master branch under os's credentials as he is the original patch author: http://cgit.freedesktop.org/libreoffice/writer/commit/?id=f53a5f8a3278b38b61579216c6fc767ed15aead8
over the next few days, I'll have to revert this in 4.0 as part of the re-basing; we would want this code included at Apache first under the ALv2 before it can be then included in LibreOffice. Sorry about this - one of a very small number of cases where that is necessary.
Michael Meeks committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=05af023b6a8f93405b13c4ddc4e23c29ed2a827c Revert "i#116420, fdo#33477: Implemented VertOrient on Writer table cell..." The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Michael: the patch is still "Accepted" on Apache OpenOffice, are we stuck or may we include the patch again?
it would be great if someone could independently fix this issue without basing their work on the AOO patch :-)
Restricted my LibreOffice hacking area
** Please read this message in its entirety before responding ** To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present on a currently supported version of LibreOffice (4.4.2 or later) https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) http://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to "inherited from OOo"; 4b. If the bug was not present in 3.3 - add "regression" to keyword Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa Thank you for your help! -- The LibreOffice QA Team This NEW Message was generated on: 2015-05-02
Oliver Specht committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=d95428278d54697064973a70c68fd2c40d174d8a tdf#33477: added support of property VertOrient to cell range It will be available in 5.2.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Here's the backport to review on 5.1 branch: https://gerrit.libreoffice.org/#/c/26879/ Let's consider this one to FIXED.
(In reply to Julien Nabet from comment #18) > Here's the backport to review on 5.1 branch: > https://gerrit.libreoffice.org/#/c/26879/ > > Let's consider this one to FIXED. The cherry-pick from master branch doesn't work because context code has changed (see my abandon comment). If someone wants to reopen this tracker because the fix concerns only LO version >= 5.2.0, don't hesitate.
Notes for unit test writers: Revert has to be done manually testTdf129839 in sw/qa/extras/unowriter/unowriter.cxx has something related to this, but it does not fail after a revert.