summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2017-09-08 11:21:37 -0400
committerJustin Luth <justin_luth@sil.org>2017-09-09 16:07:44 +0200
commit7ed6bcc714ed0e4f23031c1cbc16176b3549e391 (patch)
tree85a38c75453213e290d197970ec701fa25794e20
parent1bc1f028e0159de965af8fa85b32566374b97067 (diff)
tdf#112074 ww8import: replace m_nOrgDxaLeft with GetMinLeft()
Followup to commit 176a723876b0138debb20f824103b2ab0c910401. In those comments (https://gerrit.libreoffice.org/#/c/41664) I said I'd leave the existing use of m_nOrgDxaLeft even though reading through the code suggested GetMinLeft() might be better. Well, round-tripping shows that MSWord properly reads the indent, but LO doesn't - unless using GetMinLeft(). So now I have my proof document and I can make the desired change with confidence. Change-Id: Icbe12b50c4f2dcf3a0d78f87685f1dfba53a375b Reviewed-on: https://gerrit.libreoffice.org/42113 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
-rw-r--r--sw/qa/extras/ww8export/ww8export2.cxx1
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx7
2 files changed, 2 insertions, 6 deletions
diff --git a/sw/qa/extras/ww8export/ww8export2.cxx b/sw/qa/extras/ww8export/ww8export2.cxx
index 71587864e6cd..cc6e3f14c5c6 100644
--- a/sw/qa/extras/ww8export/ww8export2.cxx
+++ b/sw/qa/extras/ww8export/ww8export2.cxx
@@ -205,6 +205,7 @@ DECLARE_WW8EXPORT_TEST(testTdf112074_RTLtableJustification, "tdf112074_RTLtableJ
CPPUNIT_ASSERT_EQUAL_MESSAGE("Right To Left writing mode", text::WritingMode2::RL_TB, getProperty<sal_Int16>(xTable, "WritingMode"));
CPPUNIT_ASSERT_EQUAL_MESSAGE("Horizontal Orientation", text::HoriOrientation::LEFT_AND_WIDTH, getProperty<sal_Int16>(xTable, "HoriOrient"));
CPPUNIT_ASSERT_MESSAGE("Table Indent", getProperty<long>(xTable, "LeftMargin") > 3000);
+ CPPUNIT_ASSERT_MESSAGE("Table Indent is 3750", getProperty<long>(xTable, "LeftMargin") < 4000 );
}
DECLARE_WW8EXPORT_TEST(testTdf104805, "tdf104805.doc")
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index abdf24a4d85b..b822b40547a4 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -169,7 +169,6 @@ class WW8TabDesc
short m_nMaxRight;
short m_nSwWidth;
short m_nPreferredWidth;
- short m_nOrgDxaLeft;
bool m_bOk;
bool m_bClaimLineFormat;
@@ -1848,7 +1847,6 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
m_nMaxRight(0),
m_nSwWidth(0),
m_nPreferredWidth(0),
- m_nOrgDxaLeft(0),
m_bOk(true),
m_bClaimLineFormat(false),
m_eOri(text::HoriOrientation::NONE),
@@ -1976,7 +1974,6 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
// shift the whole table to that margin (see below)
{
short nDxaNew = (sal_Int16)SVBT16ToShort( pParams );
- m_nOrgDxaLeft = nDxaNew;
if( nDxaNew < nTabeDxaNew )
nTabeDxaNew = nDxaNew;
}
@@ -2576,7 +2573,6 @@ void WW8TabDesc::CreateSwTable()
//inside the frame, in word the dialog involved greys out the
//ability to set the margin.
SvxLRSpaceItem aL( RES_LR_SPACE );
- // set right to original DxaLeft (i28656)
long nLeft = 0;
if (!m_bIsBiDi)
@@ -2585,9 +2581,8 @@ void WW8TabDesc::CreateSwTable()
{
const short nTableWidth = m_nPreferredWidth ? m_nPreferredWidth : m_nSwWidth;
nLeft = m_pIo->m_aSectionManager.GetTextAreaWidth();
- nLeft = nLeft - nTableWidth - m_nOrgDxaLeft;
+ nLeft = nLeft - nTableWidth - GetMinLeft();
}
-
aL.SetLeft(nLeft);
m_aItemSet.Put(aL);