summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-02-22 21:36:51 +0100
committerAndras Timar <andras.timar@collabora.com>2017-02-24 12:24:45 +0100
commit5a4c6d028caa41c22752258f83cb21f1e0958a9e (patch)
treefbb2d7135ab6b715e1d4d7c561339d2d3919b262
parent39bbbe0cab4eb1b987683d9396b67d836acbd2d2 (diff)
sw: fix import of table in ooo44732-2.doc
The problem is that the first call to SwWW8ImplReader::TestApo() from WW8TabDesc::WW8TabDesc() wrongly uses style 1 to construct the Apo, when the actual style on the first cell of the 2nd row is 4. Here style 1 contains PDxaWidth and PWHeightAbs sprms, which are both overridden by the 1st paragraph, 1st cell, 1st row to 0. The reason is that during the WW8TabDesc, apparently nothing actually updates m_nAktColl, so it's always the style of the 1st cell, 1st row. Clearly when called from WW8TabDesc this should not be using m_nAktColl, but it's not clear to me if calling GetColl() here always works. Change-Id: I3e3ac0c243112154d40d99684149e1c5f0e51129 (cherry picked from commit 33a3a5a7eb52ed6a883216cbba83f620f00f61b1) Reviewed-on: https://gerrit.libreoffice.org/34556 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit a7377b9c3df9a2c964d1832d9636d1410f49a29c)
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 41e0657091a7..146d22693acc 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -488,8 +488,9 @@ ApoTestResults SwWW8ImplReader::TestApo(int nCellLevel, bool bTableRowEnd,
ApoTestResults aRet;
// Frame in Style Definition (word appears to ignore them if inside an
// text autoshape)
- if (!m_bTxbxFlySection && m_nAktColl < m_vColl.size())
- aRet.mpStyleApo = StyleExists(m_nAktColl) ? m_vColl[m_nAktColl].m_xWWFly.get() : nullptr;
+ sal_uInt16 const nStyle(m_pPlcxMan->GetColl());
+ if (!m_bTxbxFlySection && nStyle < m_vColl.size())
+ aRet.mpStyleApo = StyleExists(nStyle) ? m_vColl[nStyle].m_xWWFly.get() : nullptr;
/*
#i1140#