diff options
author | Vinaya Mandke <vinaya.mandke@synerzip.com> | 2014-02-13 20:02:53 +0530 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-02-26 11:27:58 +0100 |
commit | 263938c4a8789d881f8e736d317b6bcc09c3bce5 (patch) | |
tree | ce438c02296f8c3cd307ba9852e6c12e098fa031 /writerfilter | |
parent | fdo#39468 Translate German Comments - vcl/source/window/toolbox2.cxx (diff) | |
download | core-263938c4a8789d881f8e736d317b6bcc09c3bce5.tar.gz core-263938c4a8789d881f8e736d317b6bcc09c3bce5.zip |
fdo#73596 [DOCX] Multiple Columns in Index
The number of columns in an Index is given by the "\c" switch.
During export, added section breaks before and after the Index;
this is to preserve the layout of the round tripped file in MS Office.
Modified MSWordExportBase::NoPageBreakSection so that
an incorrect "nextPage" section break is not exported.
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Reviewed on:
https://gerrit.libreoffice.org/8047
Change-Id: I364e19d6739c4c6a60e3c605044fc1fafd9147d3
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper.cxx | 2 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 14 |
2 files changed, 15 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index cc4eec7dc6e4..c4e3a9f6f163 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -1936,7 +1936,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType SectionColumnHandlerPtr pSectHdl( new SectionColumnHandler ); pProperties->resolve(*pSectHdl); - if(pSectionContext) + if(pSectionContext && !m_pImpl->isInIndexContext()) { if( pSectHdl->IsEqualWidth() ) { diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index b66b7f3fc899..0d98781f5fa4 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -57,6 +57,7 @@ #include <com/sun/star/awt/XControlModel.hpp> #include <com/sun/star/drawing/XControlShape.hpp> #include <com/sun/star/text/ControlCharacter.hpp> +#include <com/sun/star/text/XTextColumns.hpp> #include <oox/mathml/import.hxx> #ifdef DEBUG_DOMAINMAPPER @@ -2847,6 +2848,19 @@ void DomainMapper_Impl::handleIndex uno::Reference< text::XTextContent > xToInsert( xTOC, uno::UNO_QUERY ); appendTextContent(xToInsert, uno::Sequence< beans::PropertyValue >() ); + + OUString sValue; + if( lcl_FindInCommand( pContext->GetCommand(), 'c', sValue )) + { + sValue = sValue.replaceAll("\"", ""); + uno::Reference<text::XTextColumns> xTextColumns; + xTOC->getPropertyValue(rPropNameSupplier.GetName( PROP_TEXT_COLUMNS )) >>= xTextColumns; + if (xTextColumns.is()) + { + xTextColumns->setColumnCount( sValue.toInt32() ); + xTOC->setPropertyValue( rPropNameSupplier.GetName( PROP_TEXT_COLUMNS ), uno::makeAny( xTextColumns ) ); + } + } } /*------------------------------------------------------------------------- |