summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat@free.fr>2013-07-04 10:13:07 +0200
committerCédric Bosdonnat <cedric.bosdonnat@free.fr>2013-07-04 15:49:39 +0200
commit031ced0d1ade5350ef0b17a245a2cb5c76e6173d (patch)
tree442ed11b12ba5f43ab740320928b467c66b89f4f
parentf47f6e0dea37622735184f045c1dc70c0f8b8537 (diff)
n#825976: Added common flags support for SEQ field import
Change-Id: I9a4505cf060880811abfe355b2ebf810cde9a4d6
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx19
1 files changed, 16 insertions, 3 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 10ed3434af49..d0dc497abc6e 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -3159,16 +3159,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));
}
}