Hi all,

Sorry for forgetting to attach the document. Please take a look
at the position of the last table.

Best regards,

Weike Liang

​

--------
转发邮件信息 --------

                A question about table indent

                Mon, 14 Mar 2016
10:23:29 +0800

                libreoffice 

 Hi all,

My colleague from testing
department reported a bug about the indent of the whole table. I looked
into the source code and found the position where the problem may be. In
writerilter/source/dmapper/DomainMapperTableHandler.cxx there exists an
if-else statement that is responsible to calculate and process the table
indent. But after i read the annotation i found the lines in if and else
clauses were wrong. They both should change their positions with each
other. I don't know if it is right. Please review the changes and give me
some suggustions. Thanks. 

Best regards,

Weike Liang

diff -uNr old/writerfilter/source/dmapper/DomainMapperTableHandler.cxx new/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
--- old/writerfilter/source/dmapper/DomainMapperTableHandler.cxx	2016-03-14 09:44:46.396913987 +0800
+++ new/writerfilter/source/dmapper/DomainMapperTableHandler.cxx	2016-03-14 09:44:45.036775927 +0800
@@ -554,11 +554,11 @@
         // - nested tables: the goal is to have left-most border starting at table_indent pos
         if (rInfo.nNestLevel > 1)
         {
-            m_aTableProperties->Insert( PROP_LEFT_MARGIN, uno::makeAny( nLeftMargin - nGapHalf ));
+            m_aTableProperties->Insert( PROP_LEFT_MARGIN, uno::makeAny( nLeftMargin - nGapHalf - rInfo.nLeftBorderDistance ));
         }
         else
         {
-            m_aTableProperties->Insert( PROP_LEFT_MARGIN, uno::makeAny( nLeftMargin - nGapHalf - rInfo.nLeftBorderDistance ));
+            m_aTableProperties->Insert( PROP_LEFT_MARGIN, uno::makeAny( nLeftMargin - nGapHalf ));
         }
 
         m_aTableProperties->getValue( TablePropertyMap::TABLE_WIDTH, nTableWidth );

Attachment: table_indent.docx
Description: MS-Word 2007 document

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to