Kaydet (Commit) 0d2415df authored tarafından Jürgen Schmidt's avatar Jürgen Schmidt

119544: sequence number is not displayed when open docx

fix: add code to handle the SEQ field command...

Patch By: Jin Long Wu
Found By: Don Jun Zung
Reviewed By: jsc
üst b9bd7806
......@@ -3179,7 +3179,33 @@ void DomainMapper_Impl::CloseFieldCommand()
break;
case FIELD_SECTION : break;
case FIELD_SECTIONPAGES : break;
case FIELD_SEQ : break;
case FIELD_SEQ :
{
// command looks like: " SEQ Table \* ARABIC "
::rtl::OUString sCmd(pContext->GetCommand());
// find the sequence name, e.g. "SEQ"
::rtl::OUString sSeqName = lcl_FindQuotedText(sCmd, "SEQ ", '\\');
sSeqName = sSeqName.trim();
// create a sequence field master using the sequence name
uno::Reference< beans::XPropertySet > xMaster = FindOrCreateFieldMaster(
"com.sun.star.text.FieldMaster.SetExpression",
sSeqName);
xMaster->setPropertyValue(
rPropNameSupplier.GetName(PROP_SUB_TYPE),
uno::makeAny(text::SetVariableType::SEQUENCE));
// apply the numbering type
xFieldProperties->setPropertyValue(
rPropNameSupplier.GetName(PROP_NUMBERING_TYPE),
uno::makeAny( lcl_ParseNumberingType(pContext->GetCommand()) ));
// attach the master to the field
uno::Reference< text::XDependentTextField > xDependentField( xFieldInterface, uno::UNO_QUERY_THROW );
xDependentField->attachTextFieldMaster( xMaster );
}
break;
case FIELD_SET : break;
case FIELD_SKIPIF : break;
case FIELD_STYLEREF : break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment