diff options
author | Nikhil Walvekar <nikhil.walvekar@synerzip.com> | 2014-02-17 20:46:18 +0530 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-03-05 02:48:29 -0600 |
commit | d043c9e3be791993348afaba6effdc3731f7c33d (patch) | |
tree | e8a318ee7f01507efe0479e64bfdaf238da99199 /writerfilter | |
parent | 5490f585f09c0a24b7caab011593ab6bb6e9a318 (diff) |
fdo#73596 Added support to import and export \r,\h Index flags.
This supports \r flag run-in type index. If \r is specified then we don't
have to write \e flag (separator char).
\h is Alphabetic separator, where indexes are grouped as per starting
character.
Change-Id: I690b29cef3d24b2a71b01f1deef0e418162d71aa
Reviewed-on: https://gerrit.libreoffice.org/8099
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 25daf87712a5..35010980a67a 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -2944,20 +2944,31 @@ void DomainMapper_Impl::handleIndex uno::Reference< beans::XPropertySet > xTOC; m_bStartTOC = true; m_bStartIndex = true; + OUString sValue; + if (m_xTextFactory.is()) xTOC.set( m_xTextFactory->createInstance( sTOCServiceName), uno::UNO_QUERY_THROW); if (xTOC.is()) + { xTOC->setPropertyValue(rPropNameSupplier.GetName( PROP_TITLE ), uno::makeAny(OUString())); + if( lcl_FindInCommand( pContext->GetCommand(), 'r', sValue )) + { + xTOC->setPropertyValue("IsCommaSeparated", uno::makeAny(true)); + } + if( lcl_FindInCommand( pContext->GetCommand(), 'h', sValue )) + { + xTOC->setPropertyValue("UseAlphabeticalSeparators", uno::makeAny(true)); + } + } pContext->SetTOC( xTOC ); 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("\"", ""); |