Kaydet (Commit) 5e1a50cc authored tarafından Miklos Vajna's avatar Miklos Vajna

tdf#115883 DOCX import: catch RuntimeException from SwXFrame

getPropertyValue("Surround") for a non-inserted frame can throw, but
hasPropertyValue("Surround") still returns true. So fix the regression
by just catching the exception, assuming that in that case no increased
spacing is needed.

Change-Id: I49a78ce8d41b4e1cc7d23721d5dc70f7550c94af
Reviewed-on: https://gerrit.libreoffice.org/50175Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst a2e53070
...@@ -684,6 +684,12 @@ DECLARE_OOXMLIMPORT_TEST(testTdf105975formula, "tdf105975.docx") ...@@ -684,6 +684,12 @@ DECLARE_OOXMLIMPORT_TEST(testTdf105975formula, "tdf105975.docx")
CPPUNIT_ASSERT_EQUAL(OUString("25"), xEnumerationAccess->getPresentation(false).trim()); CPPUNIT_ASSERT_EQUAL(OUString("25"), xEnumerationAccess->getPresentation(false).trim());
} }
DECLARE_OOXMLIMPORT_TEST(testTdf115883, "tdf115883.docx")
{
// Import failed due to an unhandled exception when getting the Surround
// property of a not yet inserted frame.
}
DECLARE_OOXMLIMPORT_TEST(testTdf75573, "tdf75573_page1frame.docx") DECLARE_OOXMLIMPORT_TEST(testTdf75573, "tdf75573_page1frame.docx")
{ {
// the problem was that the frame was discarded // the problem was that the frame was discarded
......
...@@ -1220,7 +1220,14 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl ) ...@@ -1220,7 +1220,14 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
} }
rPendingFloatingTables.clear(); rPendingFloatingTables.clear();
HandleIncreasedAnchoredObjectSpacing(rDM_Impl); try
{
HandleIncreasedAnchoredObjectSpacing(rDM_Impl);
}
catch (const uno::Exception& rException)
{
SAL_WARN("writerfilter", "HandleIncreasedAnchoredObjectSpacing() failed: " << rException);
}
if ( m_nLnnMod ) if ( m_nLnnMod )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment