[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - writerfilter/source
Cédric Bosdonnat
cedric.bosdonnat at free.fr
Mon Jul 8 02:02:54 PDT 2013
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
New commits:
commit 5911674f1b009ee29b8df6169f2d5452a397b008
Author: Cédric Bosdonnat <cedric.bosdonnat at free.fr>
Date: Thu Jul 4 10:13:07 2013 +0200
n#825976: Added common flags support for SEQ field import
Change-Id: I9a4505cf060880811abfe355b2ebf810cde9a4d6
(cherry picked from commit 031ced0d1ade5350ef0b17a245a2cb5c76e6173d)
Reviewed-on: https://gerrit.libreoffice.org/4721
Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
Tested-by: Fridrich Strba <fridrich at documentfoundation.org>
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 66d68dd..56740bd 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -3133,16 +3133,29 @@ void DomainMapper_Impl::CloseFieldCommand()
xFieldInterface, uno::UNO_QUERY_THROW );
xDependentField->attachTextFieldMaster( xMaster );
- // TODO This formula may change with the flags of the SEQ field
rtl::OUString sFormula = sIdentifier + "+1";
+ rtl::OUString sValue;
+ if( lcl_FindInCommand( pContext->GetCommand(), 'c', sValue ))
+ {
+ sFormula = sIdentifier;
+ }
+ else if( lcl_FindInCommand( pContext->GetCommand(), 'r', sValue ))
+ {
+ sFormula = sValue;
+ }
+ // TODO \s isn't handled, but the spec isn't easy to understand without
+ // an example for this one.
xFieldProperties->setPropertyValue(
rPropNameSupplier.GetName(PROP_CONTENT),
uno::makeAny(sFormula));
- // TODO Take care of the numeric formatting definition, default is Arabic
+ // Take care of the numeric formatting definition, default is Arabic
+ sal_Int16 nNumberingType = lcl_ParseNumberingType(pContext->GetCommand());
+ if (nNumberingType == style::NumberingType::PAGE_DESCRIPTOR)
+ nNumberingType == style::NumberingType::ARABIC;
xFieldProperties->setPropertyValue(
rPropNameSupplier.GetName(PROP_NUMBERING_TYPE),
- uno::makeAny(style::NumberingType::ARABIC));
+ uno::makeAny(nNumberingType));
}
}
More information about the Libreoffice-commits
mailing list