diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2022-12-08 10:56:52 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2022-12-08 15:32:42 +0000 |
commit | a2a08463e0299d514e6e555ae61c68bb0e4348d0 (patch) | |
tree | 92a373cb31029ebbcbc694366dc06c008323b9bc /sw/source/filter/ww8/docxattributeoutput.cxx | |
parent | 1cafff12c38b2568e213a51d8061de7b4d8f15ca (diff) |
Simplify management of id-to-style-to-string-id mapping
Instead of having three container objects for that, use one vector of
appropriate structures. Slots are in sync and unique automatically.
Change-Id: Ibb2c48ce42bf98f84df8230439ca98cb5b75051a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143807
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw/source/filter/ww8/docxattributeoutput.cxx')
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 5eb1c0ba306f..9084b9b6171a 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -7023,7 +7023,7 @@ static bool lcl_guessQFormat(const OUString& rName, sal_uInt16 nWwId) } void DocxAttributeOutput::StartStyle( const OUString& rName, StyleType eType, - sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 nLink, sal_uInt16 nWwId, sal_uInt16 nId, bool bAutoUpdate ) + sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 nLink, sal_uInt16 nWwId, sal_uInt16 nSlot, bool bAutoUpdate ) { bool bQFormat = false, bUnhideWhenUsed = false, bSemiHidden = false, bLocked = false, bDefault = false, bCustomStyle = false; OUString aRsid, aUiPriority; @@ -7031,12 +7031,12 @@ void DocxAttributeOutput::StartStyle( const OUString& rName, StyleType eType, uno::Any aAny; if (eType == STYLE_TYPE_PARA || eType == STYLE_TYPE_CHAR) { - const SwFormat* pFormat = m_rExport.m_pStyles->GetSwFormat(nId); + const SwFormat* pFormat = m_rExport.m_pStyles->GetSwFormat(nSlot); pFormat->GetGrabBagItem(aAny); } else { - const SwNumRule* pRule = m_rExport.m_pStyles->GetSwNumRule(nId); + const SwNumRule* pRule = m_rExport.m_pStyles->GetSwNumRule(nSlot); pRule->GetGrabBagItem(aAny); } const uno::Sequence<beans::PropertyValue>& rGrabBag = aAny.get< uno::Sequence<beans::PropertyValue> >(); @@ -7081,7 +7081,7 @@ void DocxAttributeOutput::StartStyle( const OUString& rName, StyleType eType, case STYLE_TYPE_LIST: pType = "numbering"; break; } pStyleAttributeList->add(FSNS( XML_w, XML_type ), pType); - pStyleAttributeList->add(FSNS(XML_w, XML_styleId), m_rExport.m_pStyles->GetStyleId(nId)); + pStyleAttributeList->add(FSNS(XML_w, XML_styleId), m_rExport.m_pStyles->GetStyleId(nSlot)); if (bDefault) pStyleAttributeList->add(FSNS(XML_w, XML_default), "1"); if (bCustomStyle) @@ -7096,7 +7096,7 @@ void DocxAttributeOutput::StartStyle( const OUString& rName, StyleType eType, FSNS( XML_w, XML_val ), m_rExport.m_pStyles->GetStyleId(nBase) ); } - if ( nNext != nId && eType != STYLE_TYPE_LIST) + if ( nNext != nSlot && eType != STYLE_TYPE_LIST) { m_pSerializer->singleElementNS( XML_w, XML_next, FSNS( XML_w, XML_val ), m_rExport.m_pStyles->GetStyleId(nNext) ); |