diff options
author | Michael Stahl <mstahl@redhat.com> | 2017-02-16 18:17:53 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-02-16 22:42:49 +0100 |
commit | d4620d535bd5a8e73bdb9d556933b9ae22800a7d (patch) | |
tree | 3ffddd8013fec9fbd80aa2f4c57d86afb8b68c94 /sw/qa/extras/inc | |
parent | 4178f55bce696affd5074ebdcc32e84d00f7df09 (diff) |
i#92948 sw: WW8 import: fix table in Apo in header
The document contains a table inside of a frame anchored in the header.
In WW8TabDesc::WW8TabDesc() the update to nOrigPos makes a mess of
things because the new nOrigPos value contains the value of nCpOfs (93)
already, so later on when SwWW8ImplReader::TestApo() calls
WW8PLCFxDesc::Save() / WW8PLCFxDesc::Restore(), the call to SeekPos()
positions it on CP 325 instead of 232 and the subsequent call to
GetSprms() finds nothing on the wrong position; thus TestApo() concludes
that the paragraph has different Apo properties than the previous one
and a new fly frame is created.
(regression from 4bd341e2c8a1f3a4f4677eb879a60a4ffc3369db)
Change-Id: I697c4526c7c3a12119947ff5659c11ea9ee7fff8
Diffstat (limited to 'sw/qa/extras/inc')
-rw-r--r-- | sw/qa/extras/inc/swmodeltestbase.hxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sw/qa/extras/inc/swmodeltestbase.hxx b/sw/qa/extras/inc/swmodeltestbase.hxx index 07b04ea2ba4d..aad89d82ab14 100644 --- a/sw/qa/extras/inc/swmodeltestbase.hxx +++ b/sw/qa/extras/inc/swmodeltestbase.hxx @@ -516,6 +516,19 @@ protected: return xParagraph; } + /// get nth object/fly that is anchored AT paragraph + uno::Reference<beans::XPropertySet> getParagraphAnchoredObject( + int const index, uno::Reference<text::XTextRange> const & xPara) const + { + uno::Reference<container::XContentEnumerationAccess> xContentEnumAccess(xPara, uno::UNO_QUERY); + uno::Reference<container::XEnumeration> xContentEnum(xContentEnumAccess->createContentEnumeration("com.sun.star.text.TextContent"), uno::UNO_QUERY); + for (int i = 1; i < index; ++i) + { + xContentEnum->nextElement(); + } + return uno::Reference<beans::XPropertySet>(xContentEnum->nextElement(), uno::UNO_QUERY); + } + /// Get run (counted from 1) of a paragraph, optionally check it contains the given text. uno::Reference<text::XTextRange> getRun(uno::Reference<text::XTextRange> const & xParagraph, int number, const OUString& content = OUString()) const { |