diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-02-27 14:46:35 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-02-27 16:53:50 +0100 |
commit | 8281578b89c3df3fe3452a594f6b21483683638a (patch) | |
tree | 85838f0cee979b31ff3b68ab02a3bee1a44a3d48 /writerfilter | |
parent | 26ea7f4deb2470f59717539a63f8685b1d257bf0 (diff) |
fdo#53985 DOCX import: don't try to set empty PageDescName
Regression from 50cb1667020494906afaacb68d4163d1eda527cf.
Change-Id: Ie04d5ad37555ed4cfeb34ccb8dc021675fbd25ea
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/PropertyMap.cxx | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx index c2fe9ef9d86b..8f19057bc6f1 100644 --- a/writerfilter/source/dmapper/PropertyMap.cxx +++ b/writerfilter/source/dmapper/PropertyMap.cxx @@ -840,7 +840,20 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl ) ApplyColumnProperties( xSection ); uno::Reference<beans::XPropertySet> xRangeProperties(lcl_GetRangeProperties(m_bIsFirstSection, rDM_Impl, m_xStartingRange)); if (xRangeProperties.is()) - xRangeProperties->setPropertyValue(rPropNameSupplier.GetName(PROP_PAGE_DESC_NAME), uno::makeAny(m_bTitlePage ? m_sFirstPageStyleName : m_sFollowPageStyleName)); + { + OUString aName = m_bTitlePage ? m_sFirstPageStyleName : m_sFollowPageStyleName; + if (!aName.isEmpty()) + { + try + { + xRangeProperties->setPropertyValue(rPropNameSupplier.GetName(PROP_PAGE_DESC_NAME), uno::makeAny(aName)); + } + catch( const uno::Exception& ) + { + SAL_WARN("writerfilter", "failed to set PageDescName!"); + } + } + } } // If the section is of type "New column" (0x01), then simply insert a column break. // But only if there actually are columns on the page, otherwise a column break |