[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - oox/source sw/qa
Miklos Vajna
vmiklos at collabora.co.uk
Wed Nov 11 02:34:04 PST 2015
oox/source/shape/ShapeContextHandler.cxx | 2 +-
sw/qa/core/data/ooxml/pass/tdf89088.docx |binary
2 files changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 2c43db1ecfd9621f4eb6775a4f682d00987692f4
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Mon Nov 2 09:12:43 2015 +0100
tdf#89088 DOCX import: fix missing text due to throwing ShapeContextHandler
Regression from commit 866a4436d3cfac1ff42d7996250bf96fb703aeaa (oox:
handle textboxes in ShapeContextHandler::endFastElement(), 2014-06-04),
the problem was that code in ShapeContextHandler::endFastElement()
assumed that all the XShape implementation it may see provides a TextBox
UNO property (which is specific to Writer) of type bool, but this is not
true.
Fix the problem by assuming false in case it has an other type.
Testcase can be a simple "does it load" one, as in the meantime
exceptions such as trying to read a bool from an uno::Any make the DOCX
XFilter::filter() implementation return false, unlike in the originally
reported LibreOffice 4.4 version that just silently discarded the
remaining content of the document.
Change-Id: I81781a7ec28d085ceee50d386b8eda023f83c29f
(cherry picked from commit 4cae3689d4d78fabe6529c9df03c438b1e9d1611)
Reviewed-on: https://gerrit.libreoffice.org/19905
Reviewed-by: Michael Stahl <mstahl at redhat.com>
Tested-by: Michael Stahl <mstahl at redhat.com>
diff --git a/oox/source/shape/ShapeContextHandler.cxx b/oox/source/shape/ShapeContextHandler.cxx
index 39cc970..b69fc8c 100644
--- a/oox/source/shape/ShapeContextHandler.cxx
+++ b/oox/source/shape/ShapeContextHandler.cxx
@@ -356,7 +356,7 @@ void SAL_CALL ShapeContextHandler::endFastElement(::sal_Int32 Element)
{
uno::Reference<beans::XPropertySet> xPropertySet(mxSavedShape, uno::UNO_QUERY);
if (xPropertySet.is())
- bTextBox = xPropertySet->getPropertyValue("TextBox").get<bool>();
+ xPropertySet->getPropertyValue("TextBox") >>= bTextBox;
}
if (bTextFrame || bTextBox)
mxWpsContext.clear();
diff --git a/sw/qa/core/data/ooxml/pass/tdf89088.docx b/sw/qa/core/data/ooxml/pass/tdf89088.docx
new file mode 100644
index 0000000..fc67185
Binary files /dev/null and b/sw/qa/core/data/ooxml/pass/tdf89088.docx differ
More information about the Libreoffice-commits
mailing list