[Libreoffice-commits] core.git: sw/qa sw/source
Tamás Zolnai
tamas.zolnai at collabora.com
Sun Sep 3 17:45:01 UTC 2017
sw/qa/extras/ooxmlexport/data/tdf112169.odt |binary
sw/qa/extras/ooxmlexport/ooxmlexport9.cxx | 5 +++++
sw/source/filter/ww8/ww8atr.cxx | 4 +++-
3 files changed, 8 insertions(+), 1 deletion(-)
New commits:
commit 242688f3b4fc7228637837e0f4fec3da71ac2710
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
Date: Sun Sep 3 14:56:48 2017 +0200
tdf#112169: Crash while saving character background color to DOCX
Change-Id: Iff12b9587b639166caef86f895fb841e83596817
Reviewed-on: https://gerrit.libreoffice.org/41857
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>
diff --git a/sw/qa/extras/ooxmlexport/data/tdf112169.odt b/sw/qa/extras/ooxmlexport/data/tdf112169.odt
new file mode 100755
index 000000000000..51bb97f2e1e8
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf112169.odt differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index 3867f468649b..e2647a821854 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -1042,6 +1042,11 @@ DECLARE_OOXMLEXPORT_TEST(testActiveXOptionButtonGroup, "activex_option_button_gr
CPPUNIT_ASSERT_EQUAL(sGroupName, getProperty<OUString>(xPropertySet, "GroupName"));
}
+DECLARE_OOXMLEXPORT_TEST(tdf112169, "tdf112169.odt")
+{
+ // LO crashed while export because of chararacter background color handling
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 6ba8e5dcd977..7340b13dd32b 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -5173,8 +5173,10 @@ void AttributeOutputBase::CharBackgroundBase( const SvxBrushItem& rBrush )
bool bHasShadingMarker = false;
// Check shading marker
+ const SfxPoolItem* pItem = GetExport().HasItem(RES_CHRATR_GRABBAG);
+ if( pItem )
{
- const SfxGrabBagItem& aGrabBag = static_cast< const SfxGrabBagItem& >( GetExport().GetItem( RES_CHRATR_GRABBAG ) );
+ const SfxGrabBagItem aGrabBag = static_cast< const SfxGrabBagItem& >(*pItem);
const std::map<OUString, css::uno::Any>& rMap = aGrabBag.GetGrabBag();
auto aIterator = rMap.find("CharShadingMarker");
if( aIterator != rMap.end() )
More information about the Libreoffice-commits
mailing list