diff --git a/include/xmloff/xmlnumfi.hxx b/include/xmloff/xmlnumfi.hxx index c6a3159d796e..7cb3617fdb62 100644 --- a/include/xmloff/xmlnumfi.hxx +++ b/include/xmloff/xmlnumfi.hxx @@ -188,6 +188,7 @@ public: bool HasLongDoW() const { return m_bHasLongDoW; } void SetHasLongDoW(bool bSet) { m_bHasLongDoW = bSet; } + bool IsAutoOrder() const { return m_bAutoOrder; } void SetHasTrailingEmptyText(bool bSet) { m_bHasTrailingEmptyText = bSet; } void UpdateCalendar( const OUString& rNewCalendar ); diff --git a/xmloff/inc/XMLNumberStylesImport.hxx b/xmloff/inc/XMLNumberStylesImport.hxx index 7ff731245da2..46d20fd7822b 100644 --- a/xmloff/inc/XMLNumberStylesImport.hxx +++ b/xmloff/inc/XMLNumberStylesImport.hxx @@ -32,7 +32,6 @@ class SdXMLNumberFormatImportContext final : public SvXMLNumFormatContext friend class SdXMLNumberFormatMemberImportContext; bool mbTimeStyle; - bool mbAutomatic; DataStyleNumber mnElements[16]; sal_Int16 mnIndex; diff --git a/xmloff/source/draw/XMLNumberStyles.cxx b/xmloff/source/draw/XMLNumberStyles.cxx index 5c5a0e63c584..fc245fc8c5c6 100644 --- a/xmloff/source/draw/XMLNumberStyles.cxx +++ b/xmloff/source/draw/XMLNumberStyles.cxx @@ -580,20 +580,11 @@ void SdXMLNumberFormatMemberImportContext::characters( const OUString& rChars ) SdXMLNumberFormatImportContext::SdXMLNumberFormatImportContext( SdXMLImport& rImport, sal_Int32 nElement, SvXMLNumImpData* pNewData, SvXMLStylesTokens nNewType, const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList, SvXMLStylesContext& rStyles) : SvXMLNumFormatContext(rImport, nElement, pNewData, nNewType, xAttrList, rStyles), - mbAutomatic( false ), mnElements{}, mnIndex(0), mnKey( -1 ) { mbTimeStyle = (nElement & TOKEN_MASK) == XML_TIME_STYLE; - - for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList )) - { - if( aIter.getToken() == XML_ELEMENT(NUMBER, XML_AUTOMATIC_ORDER) ) - mbAutomatic = IsXMLToken( aIter, XML_TRUE ); - else - XMLOFF_WARN_UNKNOWN("xmloff", aIter); - } } SdXMLNumberFormatImportContext::~SdXMLNumberFormatImportContext() @@ -623,7 +614,7 @@ void SdXMLNumberFormatImportContext::add( std::u16string_view rNumberStyle, bool bool SdXMLNumberFormatImportContext::compareStyle( const SdXMLFixedDataStyle* pStyle, sal_Int16& nIndex ) const { - if( (pStyle->mbAutomatic != mbAutomatic) && (nIndex == 0)) + if( (pStyle->mbAutomatic != IsAutoOrder()) && (nIndex == 0)) return false; sal_Int16 nCompareIndex;