summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-05-07 12:08:41 +0200
committerMiklos Vajna <vmiklos@suse.cz>2013-05-07 12:15:11 +0200
commit254c5c694bf2da98d5cf2693639251c6d4205920 (patch)
tree35b57c57cf511d6ab35d71302db16eb742a90d08
parent7ef1aa6876f144b0aedb2b988d1f9b6aa22f378c (diff)
fdo#64256 writerfilter: handle void GraphicURL in ListsManager::lcl_sprm
Change-Id: I4d8b1b527d5099781a36cc1265318c167205340e
-rw-r--r--sw/qa/extras/ooxmlimport/data/fdo64256.docxbin0 -> 5602 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx9
-rw-r--r--writerfilter/source/dmapper/NumberingManager.cxx4
3 files changed, 8 insertions, 5 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/fdo64256.docx b/sw/qa/extras/ooxmlimport/data/fdo64256.docx
new file mode 100644
index 000000000000..e8e901dd10e2
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/fdo64256.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 8c6406304c5a..cadc68b7fbdd 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -77,7 +77,7 @@ public:
void testN778140();
void testN778828();
void testInk();
- void testN779834();
+ void testNoCrash();
void testN779627();
void testN779941();
void testFdo55187();
@@ -157,7 +157,7 @@ void Test::run()
{"n778140.docx", &Test::testN778140},
{"n778828.docx", &Test::testN778828},
{"ink.docx", &Test::testInk},
- {"n779834.docx", &Test::testN779834},
+ {"n779834.docx", &Test::testNoCrash},
{"n779627.docx", &Test::testN779627},
{"n779941.docx", &Test::testN779941},
{"fdo55187.docx", &Test::testFdo55187},
@@ -191,6 +191,7 @@ void Test::run()
{"n592908-frame.docx", &Test::testN592908_Frame},
{"n592908-picture.docx", &Test::testN592908_Picture},
{"n779630.docx", &Test::testN779630},
+ {"fdo64256.docx", &Test::testNoCrash},
};
header();
for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
@@ -878,9 +879,9 @@ void Test::testInk()
CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.drawing.OpenBezierShape"));
}
-void Test::testN779834()
+void Test::testNoCrash()
{
- // This document simply crashed the importer.
+ // These documents simply crashed the importer.
}
void Test::testN779627()
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index 87ddf75a1fdc..bc72b6a93b24 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -937,7 +937,9 @@ void ListsManager::lcl_sprm( Sprm& rSprm )
uno::Sequence<beans::Property> properties = info->getProperties();
try
{
- m_pCurrentDefinition->GetCurrentLevel()->SetGraphicURL(xPropertySet->getPropertyValue("GraphicURL").get<OUString>());
+ uno::Any aAny = xPropertySet->getPropertyValue("GraphicURL");
+ if (aAny.has<OUString>())
+ m_pCurrentDefinition->GetCurrentLevel()->SetGraphicURL(aAny.get<OUString>());
} catch(const beans::UnknownPropertyException&)
{}
try