diff options
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/NumberingManager.cxx | 6 | ||||
-rw-r--r-- | writerfilter/source/dmapper/NumberingManager.hxx | 1 | ||||
-rw-r--r-- | writerfilter/source/dmapper/PropertyIds.cxx | 1 | ||||
-rw-r--r-- | writerfilter/source/dmapper/PropertyIds.hxx | 1 |
4 files changed, 8 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx index 5b5ad07dce14..a3b3883d2dc7 100644 --- a/writerfilter/source/dmapper/NumberingManager.cxx +++ b/writerfilter/source/dmapper/NumberingManager.cxx @@ -55,7 +55,7 @@ namespace writerfilter::dmapper { template <typename T> static beans::PropertyValue lcl_makePropVal(PropertyIds nNameID, T const & aValue) { - return {getPropertyName(nNameID), 0, uno::Any(aValue), beans::PropertyState_DIRECT_VALUE}; + return comphelper::makePropertyValue(getPropertyName(nNameID), aValue); } static sal_Int32 lcl_findProperty( const uno::Sequence< beans::PropertyValue >& aProps, std::u16string_view sName ) @@ -111,6 +111,7 @@ void ListLevel::SetValue( Id nId, sal_Int32 nValue ) m_nNFC = nValue; break; case NS_ooxml::LN_CT_Lvl_isLgl: + m_bIsLegal = true; break; case NS_ooxml::LN_CT_Lvl_legacy: break; @@ -268,6 +269,9 @@ uno::Sequence<beans::PropertyValue> ListLevel::GetLevelProperties(bool bDefaults if (aPropFont) aNumberingProperties.emplace_back( getPropertyName(PROP_BULLET_FONT_NAME), 0, aPropFont->second, beans::PropertyState_DIRECT_VALUE ); + if (m_bIsLegal) + aNumberingProperties.push_back(lcl_makePropVal(PROP_LEVEL_IS_LEGAL, true)); + return comphelper::containerToSequence(aNumberingProperties); } diff --git a/writerfilter/source/dmapper/NumberingManager.hxx b/writerfilter/source/dmapper/NumberingManager.hxx index 4bae58b8e51c..fc3c2f05b72f 100644 --- a/writerfilter/source/dmapper/NumberingManager.hxx +++ b/writerfilter/source/dmapper/NumberingManager.hxx @@ -52,6 +52,7 @@ class ListLevel : public PropertyMap std::optional<sal_Int32> m_nTabstop; tools::SvRef< StyleSheetEntry > m_pParaStyle; bool m_bHasValues = false; + bool m_bIsLegal = false; public: diff --git a/writerfilter/source/dmapper/PropertyIds.cxx b/writerfilter/source/dmapper/PropertyIds.cxx index 11ef07230fad..554f7490c991 100644 --- a/writerfilter/source/dmapper/PropertyIds.cxx +++ b/writerfilter/source/dmapper/PropertyIds.cxx @@ -224,6 +224,7 @@ namespace { PROP_LEVEL_FOLLOW, u"LabelFollowedBy"}, { PROP_LEVEL_PARAGRAPH_STYLES, u"LevelParagraphStyles"}, { PROP_LEVEL_FORMAT, u"LevelFormat"}, + { PROP_LEVEL_IS_LEGAL, u"IsLegal"}, { PROP_LIST_FORMAT, u"ListFormat"}, { PROP_TOKEN_TYPE, u"TokenType"}, { PROP_TOKEN_HYPERLINK_START, u"TokenHyperlinkStart"}, diff --git a/writerfilter/source/dmapper/PropertyIds.hxx b/writerfilter/source/dmapper/PropertyIds.hxx index 6708c6dfbf35..581378af895a 100644 --- a/writerfilter/source/dmapper/PropertyIds.hxx +++ b/writerfilter/source/dmapper/PropertyIds.hxx @@ -220,6 +220,7 @@ enum PropertyIds ,PROP_LEVEL_FOLLOW ,PROP_LEVEL_FORMAT ,PROP_LEVEL_PARAGRAPH_STYLES + ,PROP_LEVEL_IS_LEGAL ,PROP_LISTTAB_STOP_POSITION ,PROP_LIST_FORMAT ,PROP_MACRO_NAME |