diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2012-05-24 17:57:41 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2012-05-24 17:59:44 +0200 |
commit | d4798414f2705ee987d79617ae2e76da2524e26d (patch) | |
tree | d7942e6f11cfb887d56ef3a39c3ab4728229455e /writerfilter | |
parent | testcases for bnc#652364 and bnc#750255 (diff) | |
download | core-d4798414f2705ee987d79617ae2e76da2524e26d.tar.gz core-d4798414f2705ee987d79617ae2e76da2524e26d.zip |
handle column break in .docx properly too
related to d8cac25ed29dbeca16161f62173a7e341793b8b6
Change-Id: I56b02a450e96acec0346d6a36c29ad8e0326b0c8
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/PropertyMap.cxx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx index fd58d97f0deb..58dd2b4266f6 100644 --- a/writerfilter/source/dmapper/PropertyMap.cxx +++ b/writerfilter/source/dmapper/PropertyMap.cxx @@ -850,6 +850,24 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl ) uno::Reference<beans::XPropertySet> xRangeProperties(lcl_GetRangeProperties(m_bIsFirstSection, rDM_Impl, m_xStartingRange)); xRangeProperties->setPropertyValue(rPropNameSupplier.GetName(PROP_PAGE_DESC_NAME), uno::makeAny(m_bTitlePage ? m_sFirstPageStyleName : m_sFollowPageStyleName)); } + // 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 + // seems to be handled like a page break by MSO. + else if(m_nBreakType == 1 && m_nColumnCount > 0 ) + { + uno::Reference< beans::XPropertySet > xRangeProperties; + if( m_xStartingRange.is() ) + { + xRangeProperties = uno::Reference< beans::XPropertySet >( m_xStartingRange, uno::UNO_QUERY_THROW ); + } + else + { + //set the start value at the beginning of the document + xRangeProperties = uno::Reference< beans::XPropertySet >( rDM_Impl.GetTextDocument()->getText()->getStart(), uno::UNO_QUERY_THROW ); + } + xRangeProperties->setPropertyValue( rPropNameSupplier.GetName( PROP_BREAK_TYPE ), + uno::makeAny( com::sun::star::style::BreakType_COLUMN_BEFORE)); + } else { //get the properties and create appropriate page styles |