[Libreoffice-commits] core.git: 5 commits - writerfilter/source

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Mon May 20 08:07:38 UTC 2019


 writerfilter/source/rtftok/rtfdispatchdestination.cxx |   16 
 writerfilter/source/rtftok/rtfdispatchflag.cxx        |  296 ++++++------
 writerfilter/source/rtftok/rtfdispatchsymbol.cxx      |   32 -
 writerfilter/source/rtftok/rtfdispatchvalue.cxx       |  384 ++++++++--------
 writerfilter/source/rtftok/rtfdocumentimpl.cxx        |  412 +++++++++---------
 writerfilter/source/rtftok/rtfdocumentimpl.hxx        |  105 +++-
 6 files changed, 664 insertions(+), 581 deletions(-)

New commits:
commit 0746d6e63aae646818b071c021276d13d3223cd8
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Fri May 17 21:45:02 2019 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon May 20 10:07:01 2019 +0200

    writerfilter: make RTFParserState members private, part 8
    
    Change-Id: I1e53b4282daa7ca1a5da4a8cec67a30516449b60
    Reviewed-on: https://gerrit.libreoffice.org/72561
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>

diff --git a/writerfilter/source/rtftok/rtfdispatchdestination.cxx b/writerfilter/source/rtftok/rtfdispatchdestination.cxx
index a38cfd202363..74f7d5a9454d 100644
--- a/writerfilter/source/rtftok/rtfdispatchdestination.cxx
+++ b/writerfilter/source/rtftok/rtfdispatchdestination.cxx
@@ -303,10 +303,10 @@ RTFError RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
                     }
                     if (bCustomMark)
                     {
-                        m_aStates.top().aCharacterAttributes.clear();
+                        m_aStates.top().getCharacterAttributes().clear();
                         m_aStates.top().aCharacterSprms.clear();
                         auto pValue = new RTFValue(1);
-                        m_aStates.top().aCharacterAttributes.set(
+                        m_aStates.top().getCharacterAttributes().set(
                             NS_ooxml::LN_CT_FtnEdnRef_customMarkFollows, pValue);
                         text(aCustomMark);
                     }
@@ -615,7 +615,7 @@ RTFError RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
             break;
             case RTF_FTNSEP:
                 m_aStates.top().eDestination = Destination::FOOTNOTESEPARATOR;
-                m_aStates.top().aCharacterAttributes.set(
+                m_aStates.top().getCharacterAttributes().set(
                     NS_ooxml::LN_CT_FtnEdn_type,
                     new RTFValue(NS_ooxml::LN_Value_doc_ST_FtnEdn_separator));
                 break;
diff --git a/writerfilter/source/rtftok/rtfdispatchflag.cxx b/writerfilter/source/rtftok/rtfdispatchflag.cxx
index 76fe64743527..199f3068283b 100644
--- a/writerfilter/source/rtftok/rtfdispatchflag.cxx
+++ b/writerfilter/source/rtftok/rtfdispatchflag.cxx
@@ -53,7 +53,7 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
     if (nSprm >= 0)
     {
         auto pValue = new RTFValue(nSprm);
-        m_aStates.top().aCharacterAttributes.set(NS_ooxml::LN_CT_Underline_val, pValue);
+        m_aStates.top().getCharacterAttributes().set(NS_ooxml::LN_CT_Underline_val, pValue);
         return RTFError::OK;
     }
 
@@ -81,7 +81,7 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
     if (nParam >= 0)
     {
         auto pValue = new RTFValue(nParam);
-        m_aStates.top().aParagraphSprms.set(NS_ooxml::LN_CT_PPrBase_jc, pValue);
+        m_aStates.top().getParagraphSprms().set(NS_ooxml::LN_CT_PPrBase_jc, pValue);
         m_bNeedPap = true;
         return RTFError::OK;
     }
@@ -111,7 +111,7 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
     if (nParam >= 0)
     {
         auto pValue = new RTFValue(nParam);
-        m_aStates.top().aParagraphSprms.set(NS_ooxml::LN_CT_PPrBase_textAlignment, pValue);
+        m_aStates.top().getParagraphSprms().set(NS_ooxml::LN_CT_PPrBase_textAlignment, pValue);
         return RTFError::OK;
     }
 
@@ -299,8 +299,9 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
     if (nParam >= 0)
     {
         auto pValue = new RTFValue(nParam);
-        putNestedSprm(m_aDefaultState.aParagraphSprms, NS_ooxml::LN_EG_SectPrContents_footnotePr,
-                      NS_ooxml::LN_CT_FtnProps_numFmt, pValue);
+        putNestedSprm(m_aDefaultState.getParagraphSprms(),
+                      NS_ooxml::LN_EG_SectPrContents_footnotePr, NS_ooxml::LN_CT_FtnProps_numFmt,
+                      pValue);
         return RTFError::OK;
     }
 
@@ -322,7 +323,8 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
     if (nParam >= 0)
     {
         auto pValue = new RTFValue(nParam);
-        putNestedSprm(m_aDefaultState.aParagraphSprms, NS_ooxml::LN_EG_SectPrContents_footnotePr,
+        putNestedSprm(m_aDefaultState.getParagraphSprms(),
+                      NS_ooxml::LN_EG_SectPrContents_footnotePr,
                       NS_ooxml::LN_EG_FtnEdnNumProps_numRestart, pValue);
         return RTFError::OK;
     }
@@ -354,7 +356,7 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
     if (nParam >= 0)
     {
         auto pValue = new RTFValue(nParam);
-        putNestedSprm(m_aDefaultState.aParagraphSprms, NS_ooxml::LN_EG_SectPrContents_endnotePr,
+        putNestedSprm(m_aDefaultState.getParagraphSprms(), NS_ooxml::LN_EG_SectPrContents_endnotePr,
                       NS_ooxml::LN_CT_EdnProps_numFmt, pValue);
         return RTFError::OK;
     }
@@ -433,8 +435,8 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
     if (nParam >= 0)
     {
         auto pValue = new RTFValue(1);
-        m_aStates.top().aParagraphSprms.erase(NS_ooxml::LN_inTbl);
-        m_aStates.top().aParagraphSprms.set(nParam, pValue);
+        m_aStates.top().getParagraphSprms().erase(NS_ooxml::LN_inTbl);
+        m_aStates.top().getParagraphSprms().set(nParam, pValue);
         return RTFError::OK;
     }
 
@@ -469,7 +471,7 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
         {
             m_aStates.top().aCharacterSprms = getDefaultState().aCharacterSprms;
             m_aStates.top().setCurrentEncoding(getEncoding(getFontIndex(m_nDefaultFontIndex)));
-            m_aStates.top().aCharacterAttributes = getDefaultState().aCharacterAttributes;
+            m_aStates.top().getCharacterAttributes() = getDefaultState().getCharacterAttributes();
             m_aStates.top().setCurrentCharacterStyleIndex(-1);
             m_aStates.top().setIsRightToLeft(false);
             m_aStates.top().setRunType(RTFParserState::RunType::LOCH);
@@ -482,9 +484,9 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
             // \pard is allowed between \cell and \row, but in that case it should not reset the fact that we're inside a table.
             // It should not reset the paragraph style, either, so remember the old paragraph style.
             RTFValue::Pointer_t pOldStyle
-                = m_aStates.top().aParagraphSprms.find(NS_ooxml::LN_CT_PPrBase_pStyle);
-            m_aStates.top().aParagraphSprms = m_aDefaultState.aParagraphSprms;
-            m_aStates.top().aParagraphAttributes = m_aDefaultState.aParagraphAttributes;
+                = m_aStates.top().getParagraphSprms().find(NS_ooxml::LN_CT_PPrBase_pStyle);
+            m_aStates.top().getParagraphSprms() = m_aDefaultState.getParagraphSprms();
+            m_aStates.top().getParagraphAttributes() = m_aDefaultState.getParagraphAttributes();
 
             if (m_nTopLevelCells == 0 && m_nNestedCells == 0)
             {
@@ -494,12 +496,14 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
             else
             {
                 // We are still in a table.
-                m_aStates.top().aParagraphSprms.set(NS_ooxml::LN_inTbl, new RTFValue(1));
+                m_aStates.top().getParagraphSprms().set(NS_ooxml::LN_inTbl, new RTFValue(1));
                 if (m_bAfterCellBeforeRow && pOldStyle)
                     // And we still have the same paragraph style.
-                    m_aStates.top().aParagraphSprms.set(NS_ooxml::LN_CT_PPrBase_pStyle, pOldStyle);
+                    m_aStates.top().getParagraphSprms().set(NS_ooxml::LN_CT_PPrBase_pStyle,
+                                                            pOldStyle);
                 // Ideally getDefaultSPRM() would take care of this, but it would not when we're buffering.
-                m_aStates.top().aParagraphSprms.set(NS_ooxml::LN_CT_PPrBase_tabs, new RTFValue());
+                m_aStates.top().getParagraphSprms().set(NS_ooxml::LN_CT_PPrBase_tabs,
+                                                        new RTFValue());
             }
             resetFrame();
 
@@ -512,8 +516,8 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
                 if (!aName.isEmpty()
                     && getStyleType(0) != NS_ooxml::LN_Value_ST_StyleType_character)
                 {
-                    m_aStates.top().aParagraphSprms.set(NS_ooxml::LN_CT_PPrBase_pStyle,
-                                                        new RTFValue(aName));
+                    m_aStates.top().getParagraphSprms().set(NS_ooxml::LN_CT_PPrBase_pStyle,
+                                                            new RTFValue(aName));
                     m_aStates.top().setCurrentStyleIndex(0);
                 }
                 else
@@ -545,7 +549,7 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
         case RTF_NOWIDCTLPAR:
         {
             auto pValue = new RTFValue(int(nKeyword == RTF_WIDCTLPAR));
-            m_aStates.top().aParagraphSprms.set(NS_ooxml::LN_CT_PPrBase_widowControl, pValue);
+            m_aStates.top().getParagraphSprms().set(NS_ooxml::LN_CT_PPrBase_widowControl, pValue);
         }
         break;
         case RTF_BOX:
@@ -553,7 +557,7 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
             RTFSprms aAttributes;
             auto pValue = new RTFValue(aAttributes);
             for (int i = 0; i < 4; i++)
-                m_aStates.top().aParagraphSprms.set(getParagraphBorder(i), pValue);
+                m_aStates.top().getParagraphSprms().set(getParagraphBorder(i), pValue);
             m_aStates.top().nBorderState = RTFBorderState::PARAGRAPH_BOX;
         }
         break;
@@ -561,15 +565,15 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
         case RTF_RTLSECT:
         {
             auto pValue = new RTFValue(nKeyword == RTF_LTRSECT ? 0 : 1);
-            m_aStates.top().aParagraphSprms.set(NS_ooxml::LN_EG_SectPrContents_textDirection,
-                                                pValue);
+            m_aStates.top().getParagraphSprms().set(NS_ooxml::LN_EG_SectPrContents_textDirection,
+                                                    pValue);
         }
         break;
         case RTF_LTRPAR:
         case RTF_RTLPAR:
         {
             auto pValue = new RTFValue(nKeyword == RTF_LTRPAR ? 0 : 1);
-            m_aStates.top().aParagraphSprms.set(NS_ooxml::LN_CT_PPrBase_bidi, pValue);
+            m_aStates.top().getParagraphSprms().set(NS_ooxml::LN_CT_PPrBase_bidi, pValue);
         }
         break;
         case RTF_LTRROW:
@@ -589,7 +593,7 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
         case RTF_ULNONE:
         {
             auto pValue = new RTFValue(NS_ooxml::LN_Value_ST_Underline_none);
-            m_aStates.top().aCharacterAttributes.set(NS_ooxml::LN_CT_Underline_val, pValue);
+            m_aStates.top().getCharacterAttributes().set(NS_ooxml::LN_CT_Underline_val, pValue);
         }
         break;
         case RTF_NONSHPPICT:
@@ -681,7 +685,7 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
                 default:
                     break;
             }
-            putNestedSprm(m_aStates.top().aParagraphSprms, NS_ooxml::LN_CT_PrBase_pBdr, nParam,
+            putNestedSprm(m_aStates.top().getParagraphSprms(), NS_ooxml::LN_CT_PrBase_pBdr, nParam,
                           pValue);
             m_aStates.top().nBorderState = RTFBorderState::PARAGRAPH;
         }
@@ -833,7 +837,7 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
         case RTF_ENDDOC:
         {
             auto pValue = new RTFValue(NS_ooxml::LN_Value_ST_RestartNumber_eachSect);
-            putNestedSprm(m_aDefaultState.aParagraphSprms,
+            putNestedSprm(m_aDefaultState.getParagraphSprms(),
                           NS_ooxml::LN_EG_SectPrContents_footnotePr,
                           NS_ooxml::LN_EG_FtnEdnNumProps_numRestart, pValue);
         }
@@ -1063,7 +1067,8 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
         case RTF_CONTEXTUALSPACE:
         {
             auto pValue = new RTFValue(1);
-            m_aStates.top().aParagraphSprms.set(NS_ooxml::LN_CT_PPrBase_contextualSpacing, pValue);
+            m_aStates.top().getParagraphSprms().set(NS_ooxml::LN_CT_PPrBase_contextualSpacing,
+                                                    pValue);
         }
         break;
         case RTF_LINKSTYLES:
diff --git a/writerfilter/source/rtftok/rtfdispatchsymbol.cxx b/writerfilter/source/rtftok/rtfdispatchsymbol.cxx
index 5faa9a831fde..989bf48829a9 100644
--- a/writerfilter/source/rtftok/rtfdispatchsymbol.cxx
+++ b/writerfilter/source/rtftok/rtfdispatchsymbol.cxx
@@ -182,10 +182,10 @@ RTFError RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword)
             if (m_bNeedPap)
             {
                 // There were no runs in the cell, so we need to send paragraph and character properties here.
-                auto pPValue = new RTFValue(m_aStates.top().aParagraphAttributes,
-                                            m_aStates.top().aParagraphSprms);
+                auto pPValue = new RTFValue(m_aStates.top().getParagraphAttributes(),
+                                            m_aStates.top().getParagraphSprms());
                 bufferProperties(m_aTableBufferStack.back(), pPValue, nullptr);
-                auto pCValue = new RTFValue(m_aStates.top().aCharacterAttributes,
+                auto pCValue = new RTFValue(m_aStates.top().getCharacterAttributes(),
                                             m_aStates.top().aCharacterSprms);
                 bufferProperties(m_aTableBufferStack.back(), pCValue, nullptr);
             }
diff --git a/writerfilter/source/rtftok/rtfdispatchvalue.cxx b/writerfilter/source/rtftok/rtfdispatchvalue.cxx
index 7ad595168ce2..f15a505931a1 100644
--- a/writerfilter/source/rtftok/rtfdispatchvalue.cxx
+++ b/writerfilter/source/rtftok/rtfdispatchvalue.cxx
@@ -220,8 +220,8 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
                            pValue);
         // Language is a character property, but we should store it at a paragraph level as well for fields.
         if (nKeyword == RTF_LANG && m_bNeedPap)
-            putNestedAttribute(m_aStates.top().aParagraphSprms, NS_ooxml::LN_EG_RPrBase_lang, nSprm,
-                               pValue);
+            putNestedAttribute(m_aStates.top().getParagraphSprms(), NS_ooxml::LN_EG_RPrBase_lang,
+                               nSprm, pValue);
         return RTFError::OK;
     }
     // Trivial paragraph sprms.
@@ -242,7 +242,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
     }
     if (nSprm > 0)
     {
-        m_aStates.top().aParagraphSprms.set(nSprm, pIntValue);
+        m_aStates.top().getParagraphSprms().set(nSprm, pIntValue);
         if (nKeyword == RTF_ITAP && nParam > 0)
         {
             while (m_aTableBufferStack.size() < sal::static_int_cast<std::size_t>(nParam))
@@ -450,8 +450,8 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
                         m_aStates.top().aTableSprms.set(NS_ooxml::LN_CT_Lvl_pStyle,
                                                         new RTFValue(aName));
                     else
-                        m_aStates.top().aParagraphSprms.set(NS_ooxml::LN_CT_PPrBase_pStyle,
-                                                            new RTFValue(aName));
+                        m_aStates.top().getParagraphSprms().set(NS_ooxml::LN_CT_PPrBase_pStyle,
+                                                                new RTFValue(aName));
                 }
             }
         }
@@ -528,7 +528,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
             if (nParam)
             {
                 auto pValue = new RTFValue(sal_uInt32(getColorTable(nParam)));
-                putNestedAttribute(m_aStates.top().aParagraphSprms, NS_ooxml::LN_CT_PrBase_shd,
+                putNestedAttribute(m_aStates.top().getParagraphSprms(), NS_ooxml::LN_CT_PrBase_shd,
                                    NS_ooxml::LN_CT_Shd_fill, pValue);
             }
             break;
@@ -554,10 +554,11 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
         case RTF_HORZVERT:
         {
             auto pValue = new RTFValue(int(true));
-            m_aStates.top().aCharacterAttributes.set(NS_ooxml::LN_CT_EastAsianLayout_vert, pValue);
+            m_aStates.top().getCharacterAttributes().set(NS_ooxml::LN_CT_EastAsianLayout_vert,
+                                                         pValue);
             if (nParam)
                 // rotate fits to a single line
-                m_aStates.top().aCharacterAttributes.set(
+                m_aStates.top().getCharacterAttributes().set(
                     NS_ooxml::LN_CT_EastAsianLayout_vertCompress, pValue);
         }
         break;
@@ -571,8 +572,8 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
         case RTF_TWOINONE:
         {
             auto pValue = new RTFValue(int(true));
-            m_aStates.top().aCharacterAttributes.set(NS_ooxml::LN_CT_EastAsianLayout_combine,
-                                                     pValue);
+            m_aStates.top().getCharacterAttributes().set(NS_ooxml::LN_CT_EastAsianLayout_combine,
+                                                         pValue);
             nId = 0;
             switch (nParam)
             {
@@ -593,7 +594,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
                     break;
             }
             if (nId > 0)
-                m_aStates.top().aCharacterAttributes.set(
+                m_aStates.top().getCharacterAttributes().set(
                     NS_ooxml::LN_CT_EastAsianLayout_combineBrackets, new RTFValue(nId));
         }
         break;
@@ -607,15 +608,16 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
                 pValue = new RTFValue(NS_ooxml::LN_Value_doc_ST_LineSpacingRule_exact);
                 pIntValue = new RTFValue(-nParam);
             }
-            m_aStates.top().aParagraphAttributes.set(NS_ooxml::LN_CT_Spacing_lineRule, pValue);
-            m_aStates.top().aParagraphAttributes.set(NS_ooxml::LN_CT_Spacing_line, pIntValue);
+            m_aStates.top().getParagraphAttributes().set(NS_ooxml::LN_CT_Spacing_lineRule, pValue);
+            m_aStates.top().getParagraphAttributes().set(NS_ooxml::LN_CT_Spacing_line, pIntValue);
         }
         break;
         case RTF_SLMULT:
             if (nParam > 0)
             {
                 auto pValue = new RTFValue(NS_ooxml::LN_Value_doc_ST_LineSpacingRule_auto);
-                m_aStates.top().aParagraphAttributes.set(NS_ooxml::LN_CT_Spacing_lineRule, pValue);
+                m_aStates.top().getParagraphAttributes().set(NS_ooxml::LN_CT_Spacing_lineRule,
+                                                             pValue);
             }
             break;
         case RTF_BRDRW:
@@ -648,13 +650,13 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
                 putNestedSprm(m_aStates.top().aTableSprms, NS_ooxml::LN_CT_PPrBase_tabs,
                               NS_ooxml::LN_CT_Tabs_tab, pValue);
             else
-                putNestedSprm(m_aStates.top().aParagraphSprms, NS_ooxml::LN_CT_PPrBase_tabs,
+                putNestedSprm(m_aStates.top().getParagraphSprms(), NS_ooxml::LN_CT_PPrBase_tabs,
                               NS_ooxml::LN_CT_Tabs_tab, pValue);
             m_aStates.top().getTabAttributes().clear();
         }
         break;
         case RTF_ILVL:
-            putNestedSprm(m_aStates.top().aParagraphSprms, NS_ooxml::LN_CT_PPrBase_numPr,
+            putNestedSprm(m_aStates.top().getParagraphSprms(), NS_ooxml::LN_CT_PPrBase_numPr,
                           NS_ooxml::LN_CT_NumPr_ilvl, pIntValue);
             break;
         case RTF_LISTTEMPLATEID:
@@ -683,7 +685,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
                 // can be overridden by direct formatting. But still allow the
                 // case when old-style paragraph numbering is already
                 // tokenized.
-                putNestedSprm(m_aStates.top().aParagraphSprms, NS_ooxml::LN_CT_PPrBase_numPr,
+                putNestedSprm(m_aStates.top().getParagraphSprms(), NS_ooxml::LN_CT_PPrBase_numPr,
                               NS_ooxml::LN_CT_NumPr_numId, pIntValue, RTFOverwrite::YES_PREPEND);
             }
         }
@@ -813,8 +815,8 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
             if (pTight)
                 pTight->getAttributes().set(NS_ooxml::LN_CT_WrapTight_wrapText, pValue);
             else
-                m_aStates.top().aCharacterAttributes.set(NS_ooxml::LN_CT_WrapSquare_wrapText,
-                                                         pValue);
+                m_aStates.top().getCharacterAttributes().set(NS_ooxml::LN_CT_WrapSquare_wrapText,
+                                                             pValue);
         }
         break;
         case RTF_SHPWR:
@@ -1172,12 +1174,13 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
             // Ignore this for now, later the RTF writer version could be used to add hacks for older buggy writers.
             break;
         case RTF_FTNSTART:
-            putNestedSprm(m_aDefaultState.aParagraphSprms,
+            putNestedSprm(m_aDefaultState.getParagraphSprms(),
                           NS_ooxml::LN_EG_SectPrContents_footnotePr,
                           NS_ooxml::LN_EG_FtnEdnNumProps_numStart, pIntValue);
             break;
         case RTF_AFTNSTART:
-            putNestedSprm(m_aDefaultState.aParagraphSprms, NS_ooxml::LN_EG_SectPrContents_endnotePr,
+            putNestedSprm(m_aDefaultState.getParagraphSprms(),
+                          NS_ooxml::LN_EG_SectPrContents_endnotePr,
                           NS_ooxml::LN_EG_FtnEdnNumProps_numStart, pIntValue);
             break;
         case RTF_DFRMTXTX:
@@ -1216,11 +1219,11 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
             m_aStates.top().getPicture().eWMetafile = nParam;
             break;
         case RTF_SB:
-            putNestedAttribute(m_aStates.top().aParagraphSprms, NS_ooxml::LN_CT_PPrBase_spacing,
+            putNestedAttribute(m_aStates.top().getParagraphSprms(), NS_ooxml::LN_CT_PPrBase_spacing,
                                NS_ooxml::LN_CT_Spacing_before, pIntValue);
             break;
         case RTF_SA:
-            putNestedAttribute(m_aStates.top().aParagraphSprms, NS_ooxml::LN_CT_PPrBase_spacing,
+            putNestedAttribute(m_aStates.top().getParagraphSprms(), NS_ooxml::LN_CT_PPrBase_spacing,
                                NS_ooxml::LN_CT_Spacing_after, pIntValue);
             break;
         case RTF_DPX:
@@ -1512,7 +1515,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
                     m_aInvalidListLevelFirstIndents[m_nListLevel] = nParam;
             }
             else
-                putNestedAttribute(m_aStates.top().aParagraphSprms, NS_ooxml::LN_CT_PPrBase_ind,
+                putNestedAttribute(m_aStates.top().getParagraphSprms(), NS_ooxml::LN_CT_PPrBase_ind,
                                    NS_ooxml::LN_CT_Ind_firstLine, pIntValue);
             break;
         }
@@ -1526,30 +1529,30 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
             }
             else
             {
-                putNestedAttribute(m_aStates.top().aParagraphSprms, NS_ooxml::LN_CT_PPrBase_ind,
+                putNestedAttribute(m_aStates.top().getParagraphSprms(), NS_ooxml::LN_CT_PPrBase_ind,
                                    NS_ooxml::LN_CT_Ind_left, pIntValue);
             }
             // It turns out \li should reset the \fi inherited from the stylesheet.
             // So set the direct formatting to zero, if we don't have such direct formatting yet.
-            putNestedAttribute(m_aStates.top().aParagraphSprms, NS_ooxml::LN_CT_PPrBase_ind,
+            putNestedAttribute(m_aStates.top().getParagraphSprms(), NS_ooxml::LN_CT_PPrBase_ind,
                                NS_ooxml::LN_CT_Ind_firstLine, new RTFValue(0),
                                RTFOverwrite::NO_IGNORE);
         }
         break;
         case RTF_RI:
-            putNestedAttribute(m_aStates.top().aParagraphSprms, NS_ooxml::LN_CT_PPrBase_ind,
+            putNestedAttribute(m_aStates.top().getParagraphSprms(), NS_ooxml::LN_CT_PPrBase_ind,
                                NS_ooxml::LN_CT_Ind_right, pIntValue);
             break;
         case RTF_LIN:
-            putNestedAttribute(m_aStates.top().aParagraphSprms, NS_ooxml::LN_CT_PPrBase_ind,
+            putNestedAttribute(m_aStates.top().getParagraphSprms(), NS_ooxml::LN_CT_PPrBase_ind,
                                NS_ooxml::LN_CT_Ind_start, pIntValue);
             break;
         case RTF_RIN:
-            putNestedAttribute(m_aStates.top().aParagraphSprms, NS_ooxml::LN_CT_PPrBase_ind,
+            putNestedAttribute(m_aStates.top().getParagraphSprms(), NS_ooxml::LN_CT_PPrBase_ind,
                                NS_ooxml::LN_CT_Ind_end, pIntValue);
             break;
         case RTF_OUTLINELEVEL:
-            m_aStates.top().aParagraphSprms.set(NS_ooxml::LN_CT_PPrBase_outlineLvl, pIntValue);
+            m_aStates.top().getParagraphSprms().set(NS_ooxml::LN_CT_PPrBase_outlineLvl, pIntValue);
             break;
         case RTF_TRGAPH:
             // Half of the space between the cells of a table row: default left/right table cell margin.
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 30c0e2e337f7..1908fb010adc 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -158,7 +158,7 @@ void putBorderProperty(RTFStack& aStates, Id nId, const RTFValue::Pointer_t& pVa
     if (aStates.top().nBorderState == RTFBorderState::PARAGRAPH_BOX)
         for (int i = 0; i < 4; i++)
         {
-            RTFValue::Pointer_t p = aStates.top().aParagraphSprms.find(getParagraphBorder(i));
+            RTFValue::Pointer_t p = aStates.top().getParagraphSprms().find(getParagraphBorder(i));
             if (p)
             {
                 RTFSprms& rAttributes = p->getAttributes();
@@ -178,7 +178,7 @@ void putBorderProperty(RTFStack& aStates, Id nId, const RTFValue::Pointer_t& pVa
     // Attributes of the last border type
     else if (aStates.top().nBorderState == RTFBorderState::PARAGRAPH)
         pAttributes
-            = &getLastAttributes(aStates.top().aParagraphSprms, NS_ooxml::LN_CT_PrBase_pBdr);
+            = &getLastAttributes(aStates.top().getParagraphSprms(), NS_ooxml::LN_CT_PrBase_pBdr);
     else if (aStates.top().nBorderState == RTFBorderState::CELL)
         pAttributes = &getLastAttributes(aStates.top().getTableCellSprms(),
                                          NS_ooxml::LN_CT_TcPrBase_tcBorders);
@@ -552,16 +552,16 @@ void RTFDocumentImpl::checkNeedPap()
 
         if (!m_aStates.top().getCurrentBuffer())
         {
-            writerfilter::Reference<Properties>::Pointer_t const pParagraphProperties(
-                getProperties(m_aStates.top().aParagraphAttributes, m_aStates.top().aParagraphSprms,
-                              NS_ooxml::LN_Value_ST_StyleType_paragraph));
+            writerfilter::Reference<Properties>::Pointer_t const pParagraphProperties(getProperties(
+                m_aStates.top().getParagraphAttributes(), m_aStates.top().getParagraphSprms(),
+                NS_ooxml::LN_Value_ST_StyleType_paragraph));
 
             // Writer will ignore a page break before a text frame, so guard it with empty paragraphs
-            bool hasBreakBeforeFrame
-                = m_aStates.top().getFrame().hasProperties()
-                  && m_aStates.top()
-                         .aParagraphSprms.find(NS_ooxml::LN_CT_PPrBase_pageBreakBefore)
-                         .get();
+            bool hasBreakBeforeFrame = m_aStates.top().getFrame().hasProperties()
+                                       && m_aStates.top()
+                                              .getParagraphSprms()
+                                              .find(NS_ooxml::LN_CT_PPrBase_pageBreakBefore)
+                                              .get();
             if (hasBreakBeforeFrame)
             {
                 dispatchSymbol(RTF_PAR);
@@ -580,8 +580,8 @@ void RTFDocumentImpl::checkNeedPap()
         }
         else
         {
-            auto pValue = new RTFValue(m_aStates.top().aParagraphAttributes,
-                                       m_aStates.top().aParagraphSprms);
+            auto pValue = new RTFValue(m_aStates.top().getParagraphAttributes(),
+                                       m_aStates.top().getParagraphSprms());
             bufferProperties(*m_aStates.top().getCurrentBuffer(), pValue, nullptr);
         }
     }
@@ -591,15 +591,15 @@ void RTFDocumentImpl::runProps()
 {
     if (!m_aStates.top().getCurrentBuffer())
     {
-        Reference<Properties>::Pointer_t const pProperties
-            = getProperties(m_aStates.top().aCharacterAttributes, m_aStates.top().aCharacterSprms,
-                            NS_ooxml::LN_Value_ST_StyleType_character);
+        Reference<Properties>::Pointer_t const pProperties = getProperties(
+            m_aStates.top().getCharacterAttributes(), m_aStates.top().aCharacterSprms,
+            NS_ooxml::LN_Value_ST_StyleType_character);
         Mapper().props(pProperties);
     }
     else
     {
-        auto pValue
-            = new RTFValue(m_aStates.top().aCharacterAttributes, m_aStates.top().aCharacterSprms);
+        auto pValue = new RTFValue(m_aStates.top().getCharacterAttributes(),
+                                   m_aStates.top().aCharacterSprms);
         bufferProperties(*m_aStates.top().getCurrentBuffer(), pValue, nullptr);
     }
 
@@ -1047,7 +1047,7 @@ void RTFDocumentImpl::resolvePict(bool const bInline, uno::Reference<drawing::XS
     auto pExtentValue = new RTFValue(aExtentAttributes);
     // docpr sprm
     RTFSprms aDocprAttributes;
-    for (auto& rCharacterAttribute : m_aStates.top().aCharacterAttributes)
+    for (auto& rCharacterAttribute : m_aStates.top().getCharacterAttributes())
         if (rCharacterAttribute.first == NS_ooxml::LN_CT_NonVisualDrawingProps_name
             || rCharacterAttribute.first == NS_ooxml::LN_CT_NonVisualDrawingProps_descr)
             aDocprAttributes.set(rCharacterAttribute.first, rCharacterAttribute.second);
@@ -1075,7 +1075,7 @@ void RTFDocumentImpl::resolvePict(bool const bInline, uno::Reference<drawing::XS
             NS_ooxml::LN_CT_Anchor_behindDoc,
             new RTFValue((m_aStates.top().getShape().getInBackground()) ? 1 : 0));
         RTFSprms aAnchorSprms;
-        for (auto& rCharacterAttribute : m_aStates.top().aCharacterAttributes)
+        for (auto& rCharacterAttribute : m_aStates.top().getCharacterAttributes())
         {
             if (rCharacterAttribute.first == NS_ooxml::LN_CT_WrapSquare_wrapText)
                 aAnchorWrapAttributes.set(rCharacterAttribute.first, rCharacterAttribute.second);
@@ -1535,8 +1535,9 @@ void RTFDocumentImpl::prepareProperties(
     writerfilter::Reference<Properties>::Pointer_t& o_rpTableRowProperties, int const nCells,
     int const nCurrentCellX)
 {
-    o_rpParagraphProperties = getProperties(rState.aParagraphAttributes, rState.aParagraphSprms,
-                                            NS_ooxml::LN_Value_ST_StyleType_paragraph);
+    o_rpParagraphProperties
+        = getProperties(rState.getParagraphAttributes(), rState.getParagraphSprms(),
+                        NS_ooxml::LN_Value_ST_StyleType_paragraph);
 
     if (rState.getFrame().hasProperties())
     {
@@ -1810,7 +1811,7 @@ RTFError RTFDocumentImpl::dispatchToggle(RTFKeyword nKeyword, bool bParam, int n
     {
         auto pValue
             = new RTFValue((!bParam || nParam != 0) ? nSprm : NS_ooxml::LN_Value_ST_Underline_none);
-        m_aStates.top().aCharacterAttributes.set(NS_ooxml::LN_CT_Underline_val, pValue);
+        m_aStates.top().getCharacterAttributes().set(NS_ooxml::LN_CT_Underline_val, pValue);
         return RTFError::OK;
     }
 
@@ -1895,7 +1896,8 @@ RTFError RTFDocumentImpl::dispatchToggle(RTFKeyword nKeyword, bool bParam, int n
     switch (nKeyword)
     {
         case RTF_ASPALPHA:
-            m_aStates.top().aParagraphSprms.set(NS_ooxml::LN_CT_PPrBase_autoSpaceDE, pBoolValue);
+            m_aStates.top().getParagraphSprms().set(NS_ooxml::LN_CT_PPrBase_autoSpaceDE,
+                                                    pBoolValue);
             break;
         case RTF_DELETED:
         case RTF_REVISED:
@@ -1906,11 +1908,11 @@ RTFError RTFDocumentImpl::dispatchToggle(RTFKeyword nKeyword, bool bParam, int n
         }
         break;
         case RTF_SBAUTO:
-            putNestedAttribute(m_aStates.top().aParagraphSprms, NS_ooxml::LN_CT_PPrBase_spacing,
+            putNestedAttribute(m_aStates.top().getParagraphSprms(), NS_ooxml::LN_CT_PPrBase_spacing,
                                NS_ooxml::LN_CT_Spacing_beforeAutospacing, pBoolValue);
             break;
         case RTF_SAAUTO:
-            putNestedAttribute(m_aStates.top().aParagraphSprms, NS_ooxml::LN_CT_PPrBase_spacing,
+            putNestedAttribute(m_aStates.top().getParagraphSprms(), NS_ooxml::LN_CT_PPrBase_spacing,
                                NS_ooxml::LN_CT_Spacing_afterAutospacing, pBoolValue);
             break;
         case RTF_FACINGP:
@@ -1920,8 +1922,8 @@ RTFError RTFDocumentImpl::dispatchToggle(RTFKeyword nKeyword, bool bParam, int n
             m_aSettingsTableSprms.set(NS_ooxml::LN_CT_Settings_autoHyphenation, pBoolValue);
             break;
         case RTF_HYPHPAR:
-            m_aStates.top().aParagraphSprms.set(NS_ooxml::LN_CT_PPrBase_suppressAutoHyphens,
-                                                new RTFValue(int(bParam && nParam == 0)));
+            m_aStates.top().getParagraphSprms().set(NS_ooxml::LN_CT_PPrBase_suppressAutoHyphens,
+                                                    new RTFValue(int(bParam && nParam == 0)));
             break;
         default:
         {
@@ -2025,18 +2027,18 @@ writerfilter::Reference<Properties>::Pointer_t RTFDocumentImpl::createStylePrope
              { NS_ooxml::LN_CT_Ind_firstLine, NS_ooxml::LN_CT_Ind_left, NS_ooxml::LN_CT_Ind_right,
                NS_ooxml::LN_CT_Ind_start, NS_ooxml::LN_CT_Ind_end })
         {
-            RTFValue::Pointer_t pValue = getNestedAttribute(m_aStates.top().aParagraphSprms,
+            RTFValue::Pointer_t pValue = getNestedAttribute(m_aStates.top().getParagraphSprms(),
                                                             NS_ooxml::LN_CT_PPrBase_ind, nId);
             if (pValue && pValue->getInt() == 0)
-                eraseNestedAttribute(m_aStates.top().aParagraphSprms, NS_ooxml::LN_CT_PPrBase_ind,
-                                     nId);
+                eraseNestedAttribute(m_aStates.top().getParagraphSprms(),
+                                     NS_ooxml::LN_CT_PPrBase_ind, nId);
         }
     }
 
-    RTFValue::Pointer_t pParaProps
-        = new RTFValue(m_aStates.top().aParagraphAttributes, m_aStates.top().aParagraphSprms);
+    RTFValue::Pointer_t pParaProps = new RTFValue(m_aStates.top().getParagraphAttributes(),
+                                                  m_aStates.top().getParagraphSprms());
     RTFValue::Pointer_t pCharProps
-        = new RTFValue(m_aStates.top().aCharacterAttributes, m_aStates.top().aCharacterSprms);
+        = new RTFValue(m_aStates.top().getCharacterAttributes(), m_aStates.top().aCharacterSprms);
 
     // resetSprms will clean up this modification
     m_aStates.top().aTableSprms.set(NS_ooxml::LN_CT_Style_pPr, pParaProps);
@@ -2106,14 +2108,14 @@ void RTFDocumentImpl::resetSprms()
 {
     m_aStates.top().aTableSprms.clear();
     m_aStates.top().aCharacterSprms.clear();
-    m_aStates.top().aParagraphSprms.clear();
+    m_aStates.top().getParagraphSprms().clear();
 }
 
 void RTFDocumentImpl::resetAttributes()
 {
     m_aStates.top().aTableAttributes.clear();
-    m_aStates.top().aCharacterAttributes.clear();
-    m_aStates.top().aParagraphAttributes.clear();
+    m_aStates.top().getCharacterAttributes().clear();
+    m_aStates.top().getParagraphAttributes().clear();
 }
 
 static bool lcl_containsProperty(const uno::Sequence<beans::Property>& rProperties,
@@ -3257,9 +3259,9 @@ RTFError RTFDocumentImpl::popState()
                 Mapper().table(NS_ooxml::LN_NUMBERING, pTable);
 
                 // Use it
-                putNestedSprm(m_aStates.top().aParagraphSprms, NS_ooxml::LN_CT_PPrBase_numPr,
+                putNestedSprm(m_aStates.top().getParagraphSprms(), NS_ooxml::LN_CT_PPrBase_numPr,
                               NS_ooxml::LN_CT_NumPr_ilvl, pIlvlValue);
-                putNestedSprm(m_aStates.top().aParagraphSprms, NS_ooxml::LN_CT_PPrBase_numPr,
+                putNestedSprm(m_aStates.top().getParagraphSprms(), NS_ooxml::LN_CT_PPrBase_numPr,
                               NS_ooxml::LN_CT_NumPr_numId, pIdValue);
             }
         }
@@ -3376,7 +3378,7 @@ RTFError RTFDocumentImpl::popState()
             {
                 m_aStates.top().getShape() = aState.getShape();
                 m_aStates.top().getPicture() = aState.getPicture();
-                m_aStates.top().aCharacterAttributes = aState.aCharacterAttributes;
+                m_aStates.top().getCharacterAttributes() = aState.getCharacterAttributes();
             }
             break;
         case Destination::SHAPEINSTRUCTION:
@@ -3387,7 +3389,7 @@ RTFError RTFDocumentImpl::popState()
                 m_aStates.top().getShape() = aState.getShape();
                 m_aStates.top().getPicture() = aState.getPicture();
                 m_aStates.top().aCharacterSprms = aState.aCharacterSprms;
-                m_aStates.top().aCharacterAttributes = aState.aCharacterAttributes;
+                m_aStates.top().getCharacterAttributes() = aState.getCharacterAttributes();
             }
             break;
         case Destination::FLYMAINCONTENT:
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
index 853665cdefb9..62c1a520b6da 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
@@ -509,6 +509,9 @@ public:
     RTFSprms& getTableRowSprms() { return m_aTableRowSprms; }
     RTFSprms& getSectionAttributes() { return m_aSectionAttributes; }
     RTFSprms& getSectionSprms() { return m_aSectionSprms; }
+    RTFSprms& getParagraphAttributes() { return m_aParagraphAttributes; }
+    RTFSprms& getParagraphSprms() { return m_aParagraphSprms; }
+    RTFSprms& getCharacterAttributes() { return m_aCharacterAttributes; }
 
     RTFDocumentImpl* m_pDocumentImpl;
     RTFInternalState nInternalState;
@@ -520,12 +523,12 @@ public:
     RTFSprms aTableAttributes;
     // reset by plain
     RTFSprms aCharacterSprms;
-    RTFSprms aCharacterAttributes;
-    // reset by pard
-    RTFSprms aParagraphSprms;
-    RTFSprms aParagraphAttributes;
 
 private:
+    RTFSprms m_aCharacterAttributes;
+    // reset by pard
+    RTFSprms m_aParagraphSprms;
+    RTFSprms m_aParagraphAttributes;
     // reset by sectd
     RTFSprms m_aSectionSprms;
     RTFSprms m_aSectionAttributes;
commit 6090dcbdc64e8d950121aad62802d4bf056a70ec
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Fri May 17 21:44:07 2019 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon May 20 10:06:55 2019 +0200

    writerfilter: make RTFParserState members private, part 7
    
    Change-Id: I8740a47e86b66a0792b34c8cb5078310afe46bfa
    Reviewed-on: https://gerrit.libreoffice.org/72560
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>

diff --git a/writerfilter/source/rtftok/rtfdispatchdestination.cxx b/writerfilter/source/rtftok/rtfdispatchdestination.cxx
index 5e8e46a0ebfe..a38cfd202363 100644
--- a/writerfilter/source/rtftok/rtfdispatchdestination.cxx
+++ b/writerfilter/source/rtftok/rtfdispatchdestination.cxx
@@ -183,7 +183,7 @@ RTFError RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
                 break;
             case RTF_NESTTABLEPROPS:
                 // do not set any properties of outer table at nested table!
-                m_aStates.top().aTableCellSprms = m_aDefaultState.aTableCellSprms;
+                m_aStates.top().getTableCellSprms() = m_aDefaultState.getTableCellSprms();
                 m_aStates.top().getTableCellAttributes() = m_aDefaultState.getTableCellAttributes();
                 m_aNestedTableCellsSprms.clear();
                 m_aNestedTableCellsAttributes.clear();
diff --git a/writerfilter/source/rtftok/rtfdispatchflag.cxx b/writerfilter/source/rtftok/rtfdispatchflag.cxx
index d554f312d8d7..76fe64743527 100644
--- a/writerfilter/source/rtftok/rtfdispatchflag.cxx
+++ b/writerfilter/source/rtftok/rtfdispatchflag.cxx
@@ -268,7 +268,7 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
             m_nResetBreakOnSectBreak = nKeyword;
         }
         auto pValue = new RTFValue(nParam);
-        m_aStates.top().aSectionSprms.set(NS_ooxml::LN_EG_SectPrContents_type, pValue);
+        m_aStates.top().getSectionSprms().set(NS_ooxml::LN_EG_SectPrContents_type, pValue);
         return RTFError::OK;
     }
 
@@ -376,7 +376,7 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
     if (nParam >= 0)
     {
         auto pValue = new RTFValue(nParam);
-        m_aStates.top().aTableRowSprms.set(NS_ooxml::LN_CT_TrPrBase_jc, pValue);
+        m_aStates.top().getTableRowSprms().set(NS_ooxml::LN_CT_TrPrBase_jc, pValue);
         return RTFError::OK;
     }
 
@@ -404,7 +404,7 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
     if (nParam >= 0)
     {
         auto pValue = new RTFValue(nParam);
-        m_aStates.top().aTableCellSprms.set(NS_ooxml::LN_CT_TcPrBase_textDirection, pValue);
+        m_aStates.top().getTableCellSprms().set(NS_ooxml::LN_CT_TcPrBase_textDirection, pValue);
     }
 
     // Trivial paragraph flags
@@ -527,8 +527,8 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
         }
         case RTF_SECTD:
         {
-            m_aStates.top().aSectionSprms = m_aDefaultState.aSectionSprms;
-            m_aStates.top().aSectionAttributes = m_aDefaultState.aSectionAttributes;
+            m_aStates.top().getSectionSprms() = m_aDefaultState.getSectionSprms();
+            m_aStates.top().getSectionAttributes() = m_aDefaultState.getSectionAttributes();
         }
         break;
         case RTF_TROWD:
@@ -574,8 +574,8 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
         break;
         case RTF_LTRROW:
         case RTF_RTLROW:
-            m_aStates.top().aTableRowSprms.set(NS_ooxml::LN_CT_TblPrBase_bidiVisual,
-                                               new RTFValue(int(nKeyword == RTF_RTLROW)));
+            m_aStates.top().getTableRowSprms().set(NS_ooxml::LN_CT_TblPrBase_bidiVisual,
+                                                   new RTFValue(int(nKeyword == RTF_RTLROW)));
             break;
         case RTF_LTRCH:
             // dmapper does not support this.
@@ -621,7 +621,7 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
                 default:
                     break;
             }
-            putNestedSprm(m_aStates.top().aTableCellSprms, NS_ooxml::LN_CT_TcPrBase_tcBorders,
+            putNestedSprm(m_aStates.top().getTableCellSprms(), NS_ooxml::LN_CT_TcPrBase_tcBorders,
                           nParam, pValue);
             m_aStates.top().nBorderState = RTFBorderState::CELL;
         }
@@ -651,8 +651,8 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
                 default:
                     break;
             }
-            putNestedSprm(m_aStates.top().aSectionSprms, NS_ooxml::LN_EG_SectPrContents_pgBorders,
-                          nParam, pValue);
+            putNestedSprm(m_aStates.top().getSectionSprms(),
+                          NS_ooxml::LN_EG_SectPrContents_pgBorders, nParam, pValue);
             m_aStates.top().nBorderState = RTFBorderState::PAGE;
         }
         break;
@@ -697,25 +697,25 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
         case RTF_CLMGF:
         {
             auto pValue = new RTFValue(NS_ooxml::LN_Value_ST_Merge_restart);
-            m_aStates.top().aTableCellSprms.set(NS_ooxml::LN_CT_TcPrBase_hMerge, pValue);
+            m_aStates.top().getTableCellSprms().set(NS_ooxml::LN_CT_TcPrBase_hMerge, pValue);
         }
         break;
         case RTF_CLMRG:
         {
             auto pValue = new RTFValue(NS_ooxml::LN_Value_ST_Merge_continue);
-            m_aStates.top().aTableCellSprms.set(NS_ooxml::LN_CT_TcPrBase_hMerge, pValue);
+            m_aStates.top().getTableCellSprms().set(NS_ooxml::LN_CT_TcPrBase_hMerge, pValue);
         }
         break;
         case RTF_CLVMGF:
         {
             auto pValue = new RTFValue(NS_ooxml::LN_Value_ST_Merge_restart);
-            m_aStates.top().aTableCellSprms.set(NS_ooxml::LN_CT_TcPrBase_vMerge, pValue);
+            m_aStates.top().getTableCellSprms().set(NS_ooxml::LN_CT_TcPrBase_vMerge, pValue);
         }
         break;
         case RTF_CLVMRG:
         {
             auto pValue = new RTFValue(NS_ooxml::LN_Value_ST_Merge_continue);
-            m_aStates.top().aTableCellSprms.set(NS_ooxml::LN_CT_TcPrBase_vMerge, pValue);
+            m_aStates.top().getTableCellSprms().set(NS_ooxml::LN_CT_TcPrBase_vMerge, pValue);
         }
         break;
         case RTF_CLVERTALT:
@@ -737,19 +737,19 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
                     break;
             }
             auto pValue = new RTFValue(nParam);
-            m_aStates.top().aTableCellSprms.set(NS_ooxml::LN_CT_TcPrBase_vAlign, pValue);
+            m_aStates.top().getTableCellSprms().set(NS_ooxml::LN_CT_TcPrBase_vAlign, pValue);
         }
         break;
         case RTF_TRKEEP:
         {
             auto pValue = new RTFValue(1);
-            m_aStates.top().aTableRowSprms.set(NS_ooxml::LN_CT_TrPrBase_cantSplit, pValue);
+            m_aStates.top().getTableRowSprms().set(NS_ooxml::LN_CT_TrPrBase_cantSplit, pValue);
         }
         break;
         case RTF_SECTUNLOCKED:
         {
             auto pValue = new RTFValue(0);
-            m_aStates.top().aSectionSprms.set(NS_ooxml::LN_EG_SectPrContents_formProt, pValue);
+            m_aStates.top().getSectionSprms().set(NS_ooxml::LN_EG_SectPrContents_formProt, pValue);
         }
         break;
         case RTF_PGNBIDIA:
@@ -768,7 +768,7 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
         case RTF_TITLEPG:
         {
             auto pValue = new RTFValue(1);
-            m_aStates.top().aSectionSprms.set(NS_ooxml::LN_EG_SectPrContents_titlePg, pValue);
+            m_aStates.top().getSectionSprms().set(NS_ooxml::LN_EG_SectPrContents_titlePg, pValue);
         }
         break;
         case RTF_SUPER:
@@ -810,7 +810,7 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
             auto pValue = new RTFValue(nKeyword == RTF_LINEPPAGE
                                            ? NS_ooxml::LN_Value_ST_LineNumberRestart_newPage
                                            : NS_ooxml::LN_Value_ST_LineNumberRestart_continuous);
-            putNestedAttribute(m_aStates.top().aSectionSprms,
+            putNestedAttribute(m_aStates.top().getSectionSprms(),
                                NS_ooxml::LN_EG_SectPrContents_lnNumType,
                                NS_ooxml::LN_CT_LineNumber_restart, pValue);
         }
@@ -839,7 +839,7 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
         }
         break;
         case RTF_NOLINE:
-            eraseNestedAttribute(m_aStates.top().aSectionSprms,
+            eraseNestedAttribute(m_aStates.top().getSectionSprms(),
                                  NS_ooxml::LN_EG_SectPrContents_lnNumType,
                                  NS_ooxml::LN_CT_LineNumber_distance);
             break;
@@ -1095,15 +1095,17 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
         case RTF_LANDSCAPE:
         {
             auto pValue = new RTFValue(NS_ooxml::LN_Value_ST_PageOrientation_landscape);
-            putNestedAttribute(m_aDefaultState.aSectionSprms, NS_ooxml::LN_EG_SectPrContents_pgSz,
-                               NS_ooxml::LN_CT_PageSz_orient, pValue);
+            putNestedAttribute(m_aDefaultState.getSectionSprms(),
+                               NS_ooxml::LN_EG_SectPrContents_pgSz, NS_ooxml::LN_CT_PageSz_orient,
+                               pValue);
             [[fallthrough]]; // set the default + current value
         }
         case RTF_LNDSCPSXN:
         {
             auto pValue = new RTFValue(NS_ooxml::LN_Value_ST_PageOrientation_landscape);
-            putNestedAttribute(m_aStates.top().aSectionSprms, NS_ooxml::LN_EG_SectPrContents_pgSz,
-                               NS_ooxml::LN_CT_PageSz_orient, pValue);
+            putNestedAttribute(m_aStates.top().getSectionSprms(),
+                               NS_ooxml::LN_EG_SectPrContents_pgSz, NS_ooxml::LN_CT_PageSz_orient,
+                               pValue);
         }
         break;
         case RTF_SHPBXPAGE:
@@ -1151,18 +1153,19 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
             m_aSettingsTableSprms.set(NS_ooxml::LN_CT_Settings_widowControl, new RTFValue(1));
             break;
         case RTF_LINEBETCOL:
-            putNestedAttribute(m_aStates.top().aSectionSprms, NS_ooxml::LN_EG_SectPrContents_cols,
-                               NS_ooxml::LN_CT_Columns_sep, new RTFValue(1));
+            putNestedAttribute(m_aStates.top().getSectionSprms(),
+                               NS_ooxml::LN_EG_SectPrContents_cols, NS_ooxml::LN_CT_Columns_sep,
+                               new RTFValue(1));
             break;
         case RTF_PGNRESTART:
-            putNestedAttribute(m_aStates.top().aSectionSprms,
+            putNestedAttribute(m_aStates.top().getSectionSprms(),
                                NS_ooxml::LN_EG_SectPrContents_pgNumType,
                                NS_ooxml::LN_CT_PageNumber_start, new RTFValue(1));
             break;
         case RTF_PGNUCLTR:
         {
             auto pIntValue = new RTFValue(NS_ooxml::LN_Value_ST_NumberFormat_upperLetter);
-            putNestedAttribute(m_aStates.top().aSectionSprms,
+            putNestedAttribute(m_aStates.top().getSectionSprms(),
                                NS_ooxml::LN_EG_SectPrContents_pgNumType,
                                NS_ooxml::LN_CT_PageNumber_fmt, pIntValue);
         }
@@ -1170,7 +1173,7 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
         case RTF_PGNLCLTR:
         {
             auto pIntValue = new RTFValue(NS_ooxml::LN_Value_ST_NumberFormat_lowerLetter);
-            putNestedAttribute(m_aStates.top().aSectionSprms,
+            putNestedAttribute(m_aStates.top().getSectionSprms(),
                                NS_ooxml::LN_EG_SectPrContents_pgNumType,
                                NS_ooxml::LN_CT_PageNumber_fmt, pIntValue);
         }
@@ -1178,7 +1181,7 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
         case RTF_PGNUCRM:
         {
             auto pIntValue = new RTFValue(NS_ooxml::LN_Value_ST_NumberFormat_upperRoman);
-            putNestedAttribute(m_aStates.top().aSectionSprms,
+            putNestedAttribute(m_aStates.top().getSectionSprms(),
                                NS_ooxml::LN_EG_SectPrContents_pgNumType,
                                NS_ooxml::LN_CT_PageNumber_fmt, pIntValue);
         }
@@ -1186,7 +1189,7 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
         case RTF_PGNLCRM:
         {
             auto pIntValue = new RTFValue(NS_ooxml::LN_Value_ST_NumberFormat_lowerRoman);
-            putNestedAttribute(m_aStates.top().aSectionSprms,
+            putNestedAttribute(m_aStates.top().getSectionSprms(),
                                NS_ooxml::LN_EG_SectPrContents_pgNumType,
                                NS_ooxml::LN_CT_PageNumber_fmt, pIntValue);
         }
@@ -1194,7 +1197,7 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
         case RTF_PGNDEC:
         {
             auto pIntValue = new RTFValue(NS_ooxml::LN_Value_ST_NumberFormat_decimal);
-            putNestedAttribute(m_aStates.top().aSectionSprms,
+            putNestedAttribute(m_aStates.top().getSectionSprms(),
                                NS_ooxml::LN_EG_SectPrContents_pgNumType,
                                NS_ooxml::LN_CT_PageNumber_fmt, pIntValue);
         }
diff --git a/writerfilter/source/rtftok/rtfdispatchsymbol.cxx b/writerfilter/source/rtftok/rtfdispatchsymbol.cxx
index 86b9c84485d3..5faa9a831fde 100644
--- a/writerfilter/source/rtftok/rtfdispatchsymbol.cxx
+++ b/writerfilter/source/rtftok/rtfdispatchsymbol.cxx
@@ -237,8 +237,8 @@ RTFError RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword)
                 // Add fake cellx / cell, RTF equivalent of
                 // OOXMLFastContextHandlerTextTableRow::handleGridAfter().
                 auto pXValue = new RTFValue(m_aStates.top().getTableRowWidthAfter());
-                m_aStates.top().aTableRowSprms.set(NS_ooxml::LN_CT_TblGridBase_gridCol, pXValue,
-                                                   RTFOverwrite::NO_APPEND);
+                m_aStates.top().getTableRowSprms().set(NS_ooxml::LN_CT_TblGridBase_gridCol, pXValue,
+                                                       RTFOverwrite::NO_APPEND);
                 dispatchSymbol(RTF_CELL);
 
                 // Adjust total width, which is done in the \cellx handler for normal cells.
@@ -260,13 +260,13 @@ RTFError RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword)
             const int MINLAY = 23; // sw/inc/swtypes.hxx, minimal possible size of frames.
             if ((m_nCellxMax - m_nTopLevelCurrentCellX) >= MINLAY)
             {
-                auto pXValueLast = m_aStates.top().aTableRowSprms.find(
+                auto pXValueLast = m_aStates.top().getTableRowSprms().find(
                     NS_ooxml::LN_CT_TblGridBase_gridCol, false);
                 const int nXValueLast = pXValueLast ? pXValueLast->getInt() : 0;
                 auto pXValue = new RTFValue(nXValueLast + m_nCellxMax - m_nTopLevelCurrentCellX);
-                m_aStates.top().aTableRowSprms.eraseLast(NS_ooxml::LN_CT_TblGridBase_gridCol);
-                m_aStates.top().aTableRowSprms.set(NS_ooxml::LN_CT_TblGridBase_gridCol, pXValue,
-                                                   RTFOverwrite::NO_APPEND);
+                m_aStates.top().getTableRowSprms().eraseLast(NS_ooxml::LN_CT_TblGridBase_gridCol);
+                m_aStates.top().getTableRowSprms().set(NS_ooxml::LN_CT_TblGridBase_gridCol, pXValue,
+                                                       RTFOverwrite::NO_APPEND);
                 m_nTopLevelCurrentCellX = m_nCellxMax;
             }
 
@@ -303,8 +303,8 @@ RTFError RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword)
                             m_aTopLevelTableCellsAttributes, m_nTopLevelCells);
 
             // The scope of the table cell defaults is one row.
-            m_aDefaultState.aTableCellSprms.clear();
-            m_aStates.top().aTableCellSprms = m_aDefaultState.aTableCellSprms;
+            m_aDefaultState.getTableCellSprms().clear();
+            m_aStates.top().getTableCellSprms() = m_aDefaultState.getTableCellSprms();
             m_aStates.top().getTableCellAttributes() = m_aDefaultState.getTableCellAttributes();
 
             writerfilter::Reference<Properties>::Pointer_t paraProperties;
@@ -329,7 +329,7 @@ RTFError RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword)
         {
             bool bColumns = false; // If we have multiple columns
             RTFValue::Pointer_t pCols
-                = m_aStates.top().aSectionSprms.find(NS_ooxml::LN_EG_SectPrContents_cols);
+                = m_aStates.top().getSectionSprms().find(NS_ooxml::LN_EG_SectPrContents_cols);
             if (pCols)
             {
                 RTFValue::Pointer_t pNum = pCols->getAttributes().find(NS_ooxml::LN_CT_Columns_num);
@@ -363,10 +363,10 @@ RTFError RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword)
 
             // If we're inside a continuous section, we should send a section break, not a page one.
             RTFValue::Pointer_t pBreak
-                = m_aStates.top().aSectionSprms.find(NS_ooxml::LN_EG_SectPrContents_type);
+                = m_aStates.top().getSectionSprms().find(NS_ooxml::LN_EG_SectPrContents_type);
             // Unless we're on a title page.
             RTFValue::Pointer_t pTitlePg
-                = m_aStates.top().aSectionSprms.find(NS_ooxml::LN_EG_SectPrContents_titlePg);
+                = m_aStates.top().getSectionSprms().find(NS_ooxml::LN_EG_SectPrContents_titlePg);
             if (((pBreak.get()
                   && pBreak->getInt()
                          == static_cast<sal_Int32>(NS_ooxml::LN_Value_ST_SectionMark_continuous))
diff --git a/writerfilter/source/rtftok/rtfdispatchvalue.cxx b/writerfilter/source/rtftok/rtfdispatchvalue.cxx
index f2a27759c50c..7ad595168ce2 100644
--- a/writerfilter/source/rtftok/rtfdispatchvalue.cxx
+++ b/writerfilter/source/rtftok/rtfdispatchvalue.cxx
@@ -520,7 +520,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
         case RTF_CLCBPATRAW:
         {
             auto pValue = new RTFValue(sal_uInt32(getColorTable(nParam)));
-            putNestedAttribute(m_aStates.top().aTableCellSprms, NS_ooxml::LN_CT_TcPrBase_shd,
+            putNestedAttribute(m_aStates.top().getTableCellSprms(), NS_ooxml::LN_CT_TcPrBase_shd,
                                NS_ooxml::LN_CT_Shd_fill, pValue);
         }
         break;
@@ -856,7 +856,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
 
             // If there is a negative left margin, then the first cellx is relative to that.
             RTFValue::Pointer_t pTblInd
-                = m_aStates.top().aTableRowSprms.find(NS_ooxml::LN_CT_TblPrBase_tblInd);
+                = m_aStates.top().getTableRowSprms().find(NS_ooxml::LN_CT_TblPrBase_tblInd);
             if (rCurrentCellX == 0 && pTblInd.get())
             {
                 RTFValue::Pointer_t pWidth
@@ -867,24 +867,24 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
 
             rCurrentCellX = nParam;
             auto pXValue = new RTFValue(nCellX);
-            m_aStates.top().aTableRowSprms.set(NS_ooxml::LN_CT_TblGridBase_gridCol, pXValue,
-                                               RTFOverwrite::NO_APPEND);
+            m_aStates.top().getTableRowSprms().set(NS_ooxml::LN_CT_TblGridBase_gridCol, pXValue,
+                                                   RTFOverwrite::NO_APPEND);
             if (Destination::NESTEDTABLEPROPERTIES == m_aStates.top().eDestination)
             {
                 m_nNestedCells++;
                 // Push cell properties.
-                m_aNestedTableCellsSprms.push_back(m_aStates.top().aTableCellSprms);
+                m_aNestedTableCellsSprms.push_back(m_aStates.top().getTableCellSprms());
                 m_aNestedTableCellsAttributes.push_back(m_aStates.top().getTableCellAttributes());
             }
             else
             {
                 m_nTopLevelCells++;
                 // Push cell properties.
-                m_aTopLevelTableCellsSprms.push_back(m_aStates.top().aTableCellSprms);
+                m_aTopLevelTableCellsSprms.push_back(m_aStates.top().getTableCellSprms());
                 m_aTopLevelTableCellsAttributes.push_back(m_aStates.top().getTableCellAttributes());
             }
 
-            m_aStates.top().aTableCellSprms = m_aDefaultState.aTableCellSprms;
+            m_aStates.top().getTableCellSprms() = m_aDefaultState.getTableCellSprms();
             m_aStates.top().getTableCellAttributes() = m_aDefaultState.getTableCellAttributes();
             // We assume text after a row definition always belongs to the table, to handle text before the real INTBL token
             dispatchFlag(RTF_INTBL);
@@ -914,21 +914,23 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
             else if (nParam > 0)
                 hRule = "atLeast";
 
-            putNestedAttribute(m_aStates.top().aTableRowSprms, NS_ooxml::LN_CT_TrPrBase_trHeight,
-                               NS_ooxml::LN_CT_Height_val, pIntValue);
+            putNestedAttribute(m_aStates.top().getTableRowSprms(),
+                               NS_ooxml::LN_CT_TrPrBase_trHeight, NS_ooxml::LN_CT_Height_val,
+                               pIntValue);
 
             auto pHRule = new RTFValue(hRule);
-            putNestedAttribute(m_aStates.top().aTableRowSprms, NS_ooxml::LN_CT_TrPrBase_trHeight,
-                               NS_ooxml::LN_CT_Height_hRule, pHRule);
+            putNestedAttribute(m_aStates.top().getTableRowSprms(),
+                               NS_ooxml::LN_CT_TrPrBase_trHeight, NS_ooxml::LN_CT_Height_hRule,
+                               pHRule);
         }
         break;
         case RTF_TRLEFT:
         {
             // the value is in twips
-            putNestedAttribute(m_aStates.top().aTableRowSprms, NS_ooxml::LN_CT_TblPrBase_tblInd,
+            putNestedAttribute(m_aStates.top().getTableRowSprms(), NS_ooxml::LN_CT_TblPrBase_tblInd,
                                NS_ooxml::LN_CT_TblWidth_type,
                                new RTFValue(NS_ooxml::LN_Value_ST_TblWidth_dxa));
-            putNestedAttribute(m_aStates.top().aTableRowSprms, NS_ooxml::LN_CT_TblPrBase_tblInd,
+            putNestedAttribute(m_aStates.top().getTableRowSprms(), NS_ooxml::LN_CT_TblPrBase_tblInd,
                                NS_ooxml::LN_CT_TblWidth_w, new RTFValue(nParam));
             auto const aDestination = m_aStates.top().eDestination;
             int& rCurrentTRLeft((Destination::NESTEDTABLEPROPERTIES == aDestination)
@@ -941,21 +943,23 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
         }
         break;
         case RTF_COLS:
-            putNestedAttribute(m_aStates.top().aSectionSprms, NS_ooxml::LN_EG_SectPrContents_cols,
-                               NS_ooxml::LN_CT_Columns_num, pIntValue);
+            putNestedAttribute(m_aStates.top().getSectionSprms(),
+                               NS_ooxml::LN_EG_SectPrContents_cols, NS_ooxml::LN_CT_Columns_num,
+                               pIntValue);
             break;
         case RTF_COLSX:
-            putNestedAttribute(m_aStates.top().aSectionSprms, NS_ooxml::LN_EG_SectPrContents_cols,
-                               NS_ooxml::LN_CT_Columns_space, pIntValue);
+            putNestedAttribute(m_aStates.top().getSectionSprms(),
+                               NS_ooxml::LN_EG_SectPrContents_cols, NS_ooxml::LN_CT_Columns_space,
+                               pIntValue);
             break;
         case RTF_COLNO:
-            putNestedSprm(m_aStates.top().aSectionSprms, NS_ooxml::LN_EG_SectPrContents_cols,
+            putNestedSprm(m_aStates.top().getSectionSprms(), NS_ooxml::LN_EG_SectPrContents_cols,
                           NS_ooxml::LN_CT_Columns_col, pIntValue);
             break;
         case RTF_COLW:
         case RTF_COLSR:
         {
-            RTFSprms& rAttributes = getLastAttributes(m_aStates.top().aSectionSprms,
+            RTFSprms& rAttributes = getLastAttributes(m_aStates.top().getSectionSprms(),
                                                       NS_ooxml::LN_EG_SectPrContents_cols);
             rAttributes.set(
                 (nKeyword == RTF_COLW ? NS_ooxml::LN_CT_Column_w : NS_ooxml::LN_CT_Column_space),
@@ -963,72 +967,86 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
         }
         break;
         case RTF_PAPERH:
-            putNestedAttribute(m_aDefaultState.aSectionSprms, NS_ooxml::LN_EG_SectPrContents_pgSz,
-                               NS_ooxml::LN_CT_PageSz_h, pIntValue);
+            putNestedAttribute(m_aDefaultState.getSectionSprms(),
+                               NS_ooxml::LN_EG_SectPrContents_pgSz, NS_ooxml::LN_CT_PageSz_h,
+                               pIntValue);
             [[fallthrough]]; // set the default + current value
         case RTF_PGHSXN:
-            putNestedAttribute(m_aStates.top().aSectionSprms, NS_ooxml::LN_EG_SectPrContents_pgSz,
-                               NS_ooxml::LN_CT_PageSz_h, pIntValue);
+            putNestedAttribute(m_aStates.top().getSectionSprms(),
+                               NS_ooxml::LN_EG_SectPrContents_pgSz, NS_ooxml::LN_CT_PageSz_h,
+                               pIntValue);
             break;
         case RTF_PAPERW:
-            putNestedAttribute(m_aDefaultState.aSectionSprms, NS_ooxml::LN_EG_SectPrContents_pgSz,
-                               NS_ooxml::LN_CT_PageSz_w, pIntValue);
+            putNestedAttribute(m_aDefaultState.getSectionSprms(),
+                               NS_ooxml::LN_EG_SectPrContents_pgSz, NS_ooxml::LN_CT_PageSz_w,
+                               pIntValue);
             [[fallthrough]]; // set the default + current value
         case RTF_PGWSXN:
-            putNestedAttribute(m_aStates.top().aSectionSprms, NS_ooxml::LN_EG_SectPrContents_pgSz,
-                               NS_ooxml::LN_CT_PageSz_w, pIntValue);
+            putNestedAttribute(m_aStates.top().getSectionSprms(),
+                               NS_ooxml::LN_EG_SectPrContents_pgSz, NS_ooxml::LN_CT_PageSz_w,
+                               pIntValue);
             break;
         case RTF_MARGL:
-            putNestedAttribute(m_aDefaultState.aSectionSprms, NS_ooxml::LN_EG_SectPrContents_pgMar,
-                               NS_ooxml::LN_CT_PageMar_left, pIntValue);
+            putNestedAttribute(m_aDefaultState.getSectionSprms(),
+                               NS_ooxml::LN_EG_SectPrContents_pgMar, NS_ooxml::LN_CT_PageMar_left,
+                               pIntValue);
             [[fallthrough]]; // set the default + current value
         case RTF_MARGLSXN:
-            putNestedAttribute(m_aStates.top().aSectionSprms, NS_ooxml::LN_EG_SectPrContents_pgMar,
-                               NS_ooxml::LN_CT_PageMar_left, pIntValue);
+            putNestedAttribute(m_aStates.top().getSectionSprms(),
+                               NS_ooxml::LN_EG_SectPrContents_pgMar, NS_ooxml::LN_CT_PageMar_left,
+                               pIntValue);
             break;
         case RTF_MARGR:
-            putNestedAttribute(m_aDefaultState.aSectionSprms, NS_ooxml::LN_EG_SectPrContents_pgMar,
-                               NS_ooxml::LN_CT_PageMar_right, pIntValue);
+            putNestedAttribute(m_aDefaultState.getSectionSprms(),
+                               NS_ooxml::LN_EG_SectPrContents_pgMar, NS_ooxml::LN_CT_PageMar_right,
+                               pIntValue);
             [[fallthrough]]; // set the default + current value
         case RTF_MARGRSXN:
-            putNestedAttribute(m_aStates.top().aSectionSprms, NS_ooxml::LN_EG_SectPrContents_pgMar,
-                               NS_ooxml::LN_CT_PageMar_right, pIntValue);
+            putNestedAttribute(m_aStates.top().getSectionSprms(),
+                               NS_ooxml::LN_EG_SectPrContents_pgMar, NS_ooxml::LN_CT_PageMar_right,
+                               pIntValue);
             break;
         case RTF_MARGT:
-            putNestedAttribute(m_aDefaultState.aSectionSprms, NS_ooxml::LN_EG_SectPrContents_pgMar,
-                               NS_ooxml::LN_CT_PageMar_top, pIntValue);
+            putNestedAttribute(m_aDefaultState.getSectionSprms(),
+                               NS_ooxml::LN_EG_SectPrContents_pgMar, NS_ooxml::LN_CT_PageMar_top,
+                               pIntValue);
             [[fallthrough]]; // set the default + current value
         case RTF_MARGTSXN:
-            putNestedAttribute(m_aStates.top().aSectionSprms, NS_ooxml::LN_EG_SectPrContents_pgMar,
-                               NS_ooxml::LN_CT_PageMar_top, pIntValue);
+            putNestedAttribute(m_aStates.top().getSectionSprms(),
+                               NS_ooxml::LN_EG_SectPrContents_pgMar, NS_ooxml::LN_CT_PageMar_top,
+                               pIntValue);
             break;
         case RTF_MARGB:
-            putNestedAttribute(m_aDefaultState.aSectionSprms, NS_ooxml::LN_EG_SectPrContents_pgMar,
-                               NS_ooxml::LN_CT_PageMar_bottom, pIntValue);
+            putNestedAttribute(m_aDefaultState.getSectionSprms(),
+                               NS_ooxml::LN_EG_SectPrContents_pgMar, NS_ooxml::LN_CT_PageMar_bottom,
+                               pIntValue);
             [[fallthrough]]; // set the default + current value
         case RTF_MARGBSXN:
-            putNestedAttribute(m_aStates.top().aSectionSprms, NS_ooxml::LN_EG_SectPrContents_pgMar,
-                               NS_ooxml::LN_CT_PageMar_bottom, pIntValue);
+            putNestedAttribute(m_aStates.top().getSectionSprms(),
+                               NS_ooxml::LN_EG_SectPrContents_pgMar, NS_ooxml::LN_CT_PageMar_bottom,
+                               pIntValue);
             break;
         case RTF_HEADERY:
-            putNestedAttribute(m_aStates.top().aSectionSprms, NS_ooxml::LN_EG_SectPrContents_pgMar,
-                               NS_ooxml::LN_CT_PageMar_header, pIntValue);
+            putNestedAttribute(m_aStates.top().getSectionSprms(),
+                               NS_ooxml::LN_EG_SectPrContents_pgMar, NS_ooxml::LN_CT_PageMar_header,
+                               pIntValue);
             break;
         case RTF_FOOTERY:
-            putNestedAttribute(m_aStates.top().aSectionSprms, NS_ooxml::LN_EG_SectPrContents_pgMar,
-                               NS_ooxml::LN_CT_PageMar_footer, pIntValue);
+            putNestedAttribute(m_aStates.top().getSectionSprms(),
+                               NS_ooxml::LN_EG_SectPrContents_pgMar, NS_ooxml::LN_CT_PageMar_footer,
+                               pIntValue);
             break;
         case RTF_DEFTAB:
             m_aSettingsTableSprms.set(NS_ooxml::LN_CT_Settings_defaultTabStop, pIntValue);
             break;
         case RTF_LINEMOD:
-            putNestedAttribute(m_aStates.top().aSectionSprms,
+            putNestedAttribute(m_aStates.top().getSectionSprms(),
                                NS_ooxml::LN_EG_SectPrContents_lnNumType,
                                NS_ooxml::LN_CT_LineNumber_countBy, pIntValue);
             break;
         case RTF_LINEX:
             if (nParam)
-                putNestedAttribute(m_aStates.top().aSectionSprms,
+                putNestedAttribute(m_aStates.top().getSectionSprms(),
                                    NS_ooxml::LN_EG_SectPrContents_lnNumType,
                                    NS_ooxml::LN_CT_LineNumber_distance, pIntValue);
             break;
@@ -1036,7 +1054,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
         {
             // OOXML <w:lnNumType w:start="..."/> is 0-based, RTF is 1-based.
             auto pStart = tools::make_ref<RTFValue>(nParam - 1);
-            putNestedAttribute(m_aStates.top().aSectionSprms,
+            putNestedAttribute(m_aStates.top().getSectionSprms(),
                                NS_ooxml::LN_EG_SectPrContents_lnNumType,
                                NS_ooxml::LN_CT_LineNumber_start, pStart);
         }
@@ -1340,8 +1358,9 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
                     break;
             }
             if (nValue != -1)
-                putNestedAttribute(m_aStates.top().aTableCellSprms, NS_ooxml::LN_CT_TcPrBase_shd,
-                                   NS_ooxml::LN_CT_Shd_val, new RTFValue(nValue));
+                putNestedAttribute(m_aStates.top().getTableCellSprms(),
+                                   NS_ooxml::LN_CT_TcPrBase_shd, NS_ooxml::LN_CT_Shd_val,
+                                   new RTFValue(nValue));
         }
         break;
         case RTF_DODHGT:
@@ -1412,8 +1431,8 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
                 default:
                     break;
             }
-            putNestedSprm(m_aStates.top().aTableCellSprms, NS_ooxml::LN_CT_TcPrBase_tcMar, nSprm,
-                          new RTFValue(aAttributes));
+            putNestedSprm(m_aStates.top().getTableCellSprms(), NS_ooxml::LN_CT_TcPrBase_tcMar,
+                          nSprm, new RTFValue(aAttributes));
         }
         break;
         case RTF_TRPADDFB:
@@ -1446,9 +1465,9 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
                 default:
                     break;
             }
-            putNestedAttribute(m_aStates.top().aTableCellSprms, NS_ooxml::LN_CT_TcPrBase_tcMar,
+            putNestedAttribute(m_aStates.top().getTableCellSprms(), NS_ooxml::LN_CT_TcPrBase_tcMar,
                                nSprm, new RTFValue(aAttributes));
-            putNestedAttribute(m_aDefaultState.aTableCellSprms, NS_ooxml::LN_CT_TcPrBase_tcMar,
+            putNestedAttribute(m_aDefaultState.getTableCellSprms(), NS_ooxml::LN_CT_TcPrBase_tcMar,
                                nSprm, new RTFValue(aAttributes));
         }
         break;
@@ -1476,10 +1495,10 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
                 default:
                     break;
             }
-            putNestedSprm(m_aStates.top().aTableCellSprms, NS_ooxml::LN_CT_TcPrBase_tcMar, nSprm,
-                          new RTFValue(aAttributes));
-            putNestedSprm(m_aDefaultState.aTableCellSprms, NS_ooxml::LN_CT_TcPrBase_tcMar, nSprm,
-                          new RTFValue(aAttributes));
+            putNestedSprm(m_aStates.top().getTableCellSprms(), NS_ooxml::LN_CT_TcPrBase_tcMar,
+                          nSprm, new RTFValue(aAttributes));
+            putNestedSprm(m_aDefaultState.getTableCellSprms(), NS_ooxml::LN_CT_TcPrBase_tcMar,
+                          nSprm, new RTFValue(aAttributes));
         }
         break;
         case RTF_FI:
@@ -1540,18 +1559,20 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
                 aAttributes.set(NS_ooxml::LN_CT_TblWidth_type,
                                 new RTFValue(NS_ooxml::LN_Value_ST_TblWidth_dxa));
                 aAttributes.set(NS_ooxml::LN_CT_TblWidth_w, pIntValue);
-                putNestedSprm(m_aStates.top().aTableRowSprms, NS_ooxml::LN_CT_TblPrBase_tblCellMar,
-                              NS_ooxml::LN_CT_TblCellMar_left, new RTFValue(aAttributes));
-                putNestedSprm(m_aStates.top().aTableRowSprms, NS_ooxml::LN_CT_TblPrBase_tblCellMar,
+                putNestedSprm(m_aStates.top().getTableRowSprms(),
+                              NS_ooxml::LN_CT_TblPrBase_tblCellMar, NS_ooxml::LN_CT_TblCellMar_left,
+                              new RTFValue(aAttributes));
+                putNestedSprm(m_aStates.top().getTableRowSprms(),
+                              NS_ooxml::LN_CT_TblPrBase_tblCellMar,
                               NS_ooxml::LN_CT_TblCellMar_right, new RTFValue(aAttributes));
             }
             break;
         case RTF_TRFTSWIDTH:
-            putNestedAttribute(m_aStates.top().aTableRowSprms, NS_ooxml::LN_CT_TblPrBase_tblW,
+            putNestedAttribute(m_aStates.top().getTableRowSprms(), NS_ooxml::LN_CT_TblPrBase_tblW,
                                NS_ooxml::LN_CT_TblWidth_type, pIntValue);
             break;
         case RTF_TRWWIDTH:
-            putNestedAttribute(m_aStates.top().aTableRowSprms, NS_ooxml::LN_CT_TblPrBase_tblW,
+            putNestedAttribute(m_aStates.top().getTableRowSprms(), NS_ooxml::LN_CT_TblPrBase_tblW,
                                NS_ooxml::LN_CT_TblWidth_w, pIntValue);
             break;
         case RTF_PROPTYPE:
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index a281ad758e02..30c0e2e337f7 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -180,10 +180,10 @@ void putBorderProperty(RTFStack& aStates, Id nId, const RTFValue::Pointer_t& pVa
         pAttributes
             = &getLastAttributes(aStates.top().aParagraphSprms, NS_ooxml::LN_CT_PrBase_pBdr);
     else if (aStates.top().nBorderState == RTFBorderState::CELL)
-        pAttributes
-            = &getLastAttributes(aStates.top().aTableCellSprms, NS_ooxml::LN_CT_TcPrBase_tcBorders);
+        pAttributes = &getLastAttributes(aStates.top().getTableCellSprms(),
+                                         NS_ooxml::LN_CT_TcPrBase_tcBorders);
     else if (aStates.top().nBorderState == RTFBorderState::PAGE)
-        pAttributes = &getLastAttributes(aStates.top().aSectionSprms,
+        pAttributes = &getLastAttributes(aStates.top().getSectionSprms(),
                                          NS_ooxml::LN_EG_SectPrContents_pgBorders);
     if (pAttributes)
         pAttributes->set(nId, pValue);
@@ -650,7 +650,7 @@ void RTFDocumentImpl::sectBreak(bool bFinal)
              OSL_THIS_FUNC << ": final? " << bFinal << ", needed? " << m_bNeedSect);
     bool bNeedSect = m_bNeedSect;
     RTFValue::Pointer_t pBreak
-        = m_aStates.top().aSectionSprms.find(NS_ooxml::LN_EG_SectPrContents_type);
+        = m_aStates.top().getSectionSprms().find(NS_ooxml::LN_EG_SectPrContents_type);
     bool bContinuous
         = pBreak.get()
           && pBreak->getInt()
@@ -680,11 +680,12 @@ void RTFDocumentImpl::sectBreak(bool bFinal)
     {
         // In case the last section is a continuous one, we don't need to output a section break.
         if (bFinal && bContinuous)
-            m_aStates.top().aSectionSprms.erase(NS_ooxml::LN_EG_SectPrContents_type);
+            m_aStates.top().getSectionSprms().erase(NS_ooxml::LN_EG_SectPrContents_type);
     }
 
     // Section properties are a paragraph sprm.
-    auto pValue = new RTFValue(m_aStates.top().aSectionAttributes, m_aStates.top().aSectionSprms);
+    auto pValue
+        = new RTFValue(m_aStates.top().getSectionAttributes(), m_aStates.top().getSectionSprms());
     RTFSprms aAttributes;
     RTFSprms aSprms;
     aSprms.set(NS_ooxml::LN_CT_PPr_sectPr, pValue);
@@ -1476,7 +1477,7 @@ void RTFDocumentImpl::text(OUString& rString)
     }
 
     // Are we in the middle of the table definition? (No cell defs yet, but we already have some cell props.)
-    if (m_aStates.top().aTableCellSprms.find(NS_ooxml::LN_CT_TcPrBase_vAlign).get()
+    if (m_aStates.top().getTableCellSprms().find(NS_ooxml::LN_CT_TcPrBase_vAlign).get()
         && m_nTopLevelCells == 0)
     {
         m_aTableBufferStack.back().emplace_back(
@@ -1544,22 +1545,22 @@ void RTFDocumentImpl::prepareProperties(
 
     // Table width.
     RTFValue::Pointer_t const pTableWidthProps
-        = rState.aTableRowSprms.find(NS_ooxml::LN_CT_TblPrBase_tblW);
+        = rState.getTableRowSprms().find(NS_ooxml::LN_CT_TblPrBase_tblW);
     if (!pTableWidthProps.get())
     {
         auto pUnitValue = new RTFValue(3);
-        putNestedAttribute(rState.aTableRowSprms, NS_ooxml::LN_CT_TblPrBase_tblW,
+        putNestedAttribute(rState.getTableRowSprms(), NS_ooxml::LN_CT_TblPrBase_tblW,
                            NS_ooxml::LN_CT_TblWidth_type, pUnitValue);
         auto pWValue = new RTFValue(nCurrentCellX);
-        putNestedAttribute(rState.aTableRowSprms, NS_ooxml::LN_CT_TblPrBase_tblW,
+        putNestedAttribute(rState.getTableRowSprms(), NS_ooxml::LN_CT_TblPrBase_tblW,
                            NS_ooxml::LN_CT_TblWidth_w, pWValue);
     }
 
     if (nCells > 0)
-        rState.aTableRowSprms.set(NS_ooxml::LN_tblRow, new RTFValue(1));
+        rState.getTableRowSprms().set(NS_ooxml::LN_tblRow, new RTFValue(1));
 
     RTFValue::Pointer_t const pCellMar
-        = rState.aTableRowSprms.find(NS_ooxml::LN_CT_TblPrBase_tblCellMar);
+        = rState.getTableRowSprms().find(NS_ooxml::LN_CT_TblPrBase_tblCellMar);
     if (!pCellMar.get())
     {
         // If no cell margins are defined, the default left/right margin is 0 in Word, but not in Writer.
@@ -1567,14 +1568,14 @@ void RTFDocumentImpl::prepareProperties(
         aAttributes.set(NS_ooxml::LN_CT_TblWidth_type,
                         new RTFValue(NS_ooxml::LN_Value_ST_TblWidth_dxa));
         aAttributes.set(NS_ooxml::LN_CT_TblWidth_w, new RTFValue(0));
-        putNestedSprm(rState.aTableRowSprms, NS_ooxml::LN_CT_TblPrBase_tblCellMar,
+        putNestedSprm(rState.getTableRowSprms(), NS_ooxml::LN_CT_TblPrBase_tblCellMar,
                       NS_ooxml::LN_CT_TblCellMar_left, new RTFValue(aAttributes));
-        putNestedSprm(rState.aTableRowSprms, NS_ooxml::LN_CT_TblPrBase_tblCellMar,
+        putNestedSprm(rState.getTableRowSprms(), NS_ooxml::LN_CT_TblPrBase_tblCellMar,
                       NS_ooxml::LN_CT_TblCellMar_right, new RTFValue(aAttributes));
     }
 
     o_rpTableRowProperties
-        = new RTFReferenceProperties(rState.aTableRowAttributes, rState.aTableRowSprms);
+        = new RTFReferenceProperties(rState.getTableRowAttributes(), rState.getTableRowSprms());
 }
 
 void RTFDocumentImpl::sendProperties(
@@ -1715,25 +1716,25 @@ void RTFDocumentImpl::backupTableRowProperties()
 {
     if (m_nTopLevelCurrentCellX)
     {
-        m_aBackupTableRowSprms = m_aStates.top().aTableRowSprms;
-        m_aBackupTableRowAttributes = m_aStates.top().aTableRowAttributes;
+        m_aBackupTableRowSprms = m_aStates.top().getTableRowSprms();
+        m_aBackupTableRowAttributes = m_aStates.top().getTableRowAttributes();
         m_nBackupTopLevelCurrentCellX = m_nTopLevelCurrentCellX;
     }
 }
 
 void RTFDocumentImpl::restoreTableRowProperties()
 {
-    m_aStates.top().aTableRowSprms = m_aBackupTableRowSprms;
-    m_aStates.top().aTableRowAttributes = m_aBackupTableRowAttributes;
+    m_aStates.top().getTableRowSprms() = m_aBackupTableRowSprms;
+    m_aStates.top().getTableRowAttributes() = m_aBackupTableRowAttributes;
     m_nTopLevelCurrentCellX = m_nBackupTopLevelCurrentCellX;
 }
 
 void RTFDocumentImpl::resetTableRowProperties()
 {
-    m_aStates.top().aTableRowSprms = m_aDefaultState.aTableRowSprms;
-    m_aStates.top().aTableRowSprms.set(NS_ooxml::LN_CT_TblGridBase_gridCol, new RTFValue(-1),
-                                       RTFOverwrite::NO_APPEND);
-    m_aStates.top().aTableRowAttributes = m_aDefaultState.aTableRowAttributes;
+    m_aStates.top().getTableRowSprms() = m_aDefaultState.getTableRowSprms();
+    m_aStates.top().getTableRowSprms().set(NS_ooxml::LN_CT_TblGridBase_gridCol, new RTFValue(-1),
+                                           RTFOverwrite::NO_APPEND);
+    m_aStates.top().getTableRowAttributes() = m_aDefaultState.getTableRowAttributes();
     if (Destination::NESTEDTABLEPROPERTIES == m_aStates.top().eDestination)
     {
         m_nNestedTRLeft = 0;
@@ -3469,9 +3470,10 @@ RTFError RTFDocumentImpl::popState()
     {
         // Section break type created for \page still has an effect in the
         // outer state as well.
-        RTFValue::Pointer_t pType = aState.aSectionSprms.find(NS_ooxml::LN_EG_SectPrContents_type);
+        RTFValue::Pointer_t pType
+            = aState.getSectionSprms().find(NS_ooxml::LN_EG_SectPrContents_type);
         if (pType)
-            m_aStates.top().aSectionSprms.set(NS_ooxml::LN_EG_SectPrContents_type, pType);
+            m_aStates.top().getSectionSprms().set(NS_ooxml::LN_EG_SectPrContents_type, pType);
     }
 
     return RTFError::OK;
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
index b62cf91b6a8a..853665cdefb9 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
@@ -504,6 +504,11 @@ public:
     RTFColorTableEntry& getCurrentColor() { return m_aCurrentColor; }
     RTFSprms& getTabAttributes() { return m_aTabAttributes; }
     RTFSprms& getTableCellAttributes() { return m_aTableCellAttributes; }
+    RTFSprms& getTableCellSprms() { return m_aTableCellSprms; }
+    RTFSprms& getTableRowAttributes() { return m_aTableRowAttributes; }
+    RTFSprms& getTableRowSprms() { return m_aTableRowSprms; }
+    RTFSprms& getSectionAttributes() { return m_aSectionAttributes; }
+    RTFSprms& getSectionSprms() { return m_aSectionSprms; }
 
     RTFDocumentImpl* m_pDocumentImpl;
     RTFInternalState nInternalState;
@@ -519,16 +524,16 @@ public:
     // reset by pard
     RTFSprms aParagraphSprms;
     RTFSprms aParagraphAttributes;
+
+private:
     // reset by sectd
-    RTFSprms aSectionSprms;
-    RTFSprms aSectionAttributes;
+    RTFSprms m_aSectionSprms;
+    RTFSprms m_aSectionAttributes;
     // reset by trowd
-    RTFSprms aTableRowSprms;
-    RTFSprms aTableRowAttributes;
+    RTFSprms m_aTableRowSprms;
+    RTFSprms m_aTableRowAttributes;
     // reset by cellx
-    RTFSprms aTableCellSprms;
-
-private:
+    RTFSprms m_aTableCellSprms;
     RTFSprms m_aTableCellAttributes;
     // reset by tx
     RTFSprms m_aTabAttributes;
commit 174e2de4568afa7e3805b8b679d259491633723d
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Fri May 17 21:43:05 2019 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon May 20 10:06:48 2019 +0200

    writerfilter: make RTFParserState members private, part 6
    
    Change-Id: I4a2c89afc38f9df8a956a2fb38a1dc1ea73aea18
    Reviewed-on: https://gerrit.libreoffice.org/72559
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>

diff --git a/writerfilter/source/rtftok/rtfdispatchdestination.cxx b/writerfilter/source/rtftok/rtfdispatchdestination.cxx
index 9c65e1317bbf..5e8e46a0ebfe 100644
--- a/writerfilter/source/rtftok/rtfdispatchdestination.cxx
+++ b/writerfilter/source/rtftok/rtfdispatchdestination.cxx
@@ -184,7 +184,7 @@ RTFError RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
             case RTF_NESTTABLEPROPS:
                 // do not set any properties of outer table at nested table!
                 m_aStates.top().aTableCellSprms = m_aDefaultState.aTableCellSprms;
-                m_aStates.top().aTableCellAttributes = m_aDefaultState.aTableCellAttributes;
+                m_aStates.top().getTableCellAttributes() = m_aDefaultState.getTableCellAttributes();
                 m_aNestedTableCellsSprms.clear();
                 m_aNestedTableCellsAttributes.clear();
                 m_nNestedCells = 0;
diff --git a/writerfilter/source/rtftok/rtfdispatchflag.cxx b/writerfilter/source/rtftok/rtfdispatchflag.cxx
index d51ec80bdfae..d554f312d8d7 100644
--- a/writerfilter/source/rtftok/rtfdispatchflag.cxx
+++ b/writerfilter/source/rtftok/rtfdispatchflag.cxx
@@ -133,7 +133,7 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
     if (nParam >= 0)
     {
         auto pValue = new RTFValue(nParam);
-        m_aStates.top().aTabAttributes.set(NS_ooxml::LN_CT_TabStop_val, pValue);
+        m_aStates.top().getTabAttributes().set(NS_ooxml::LN_CT_TabStop_val, pValue);
         return RTFError::OK;
     }
 
@@ -164,7 +164,7 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
     if (nParam >= 0)
     {
         auto pValue = new RTFValue(nParam);
-        m_aStates.top().aTabAttributes.set(NS_ooxml::LN_CT_TabStop_leader, pValue);
+        m_aStates.top().getTabAttributes().set(NS_ooxml::LN_CT_TabStop_leader, pValue);
         return RTFError::OK;
     }
 
@@ -451,24 +451,24 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
             // TODO ooxml:CT_Font_family seems to be ignored by the domain mapper
             break;
         case RTF_ANSI:
-            m_aStates.top().nCurrentEncoding = RTL_TEXTENCODING_MS_1252;
+            m_aStates.top().setCurrentEncoding(RTL_TEXTENCODING_MS_1252);
             break;
         case RTF_MAC:
-            m_aDefaultState.nCurrentEncoding = RTL_TEXTENCODING_APPLE_ROMAN;
-            m_aStates.top().nCurrentEncoding = m_aDefaultState.nCurrentEncoding;
+            m_aDefaultState.setCurrentEncoding(RTL_TEXTENCODING_APPLE_ROMAN);
+            m_aStates.top().setCurrentEncoding(m_aDefaultState.getCurrentEncoding());
             break;
         case RTF_PC:
-            m_aDefaultState.nCurrentEncoding = RTL_TEXTENCODING_IBM_437;
-            m_aStates.top().nCurrentEncoding = m_aDefaultState.nCurrentEncoding;
+            m_aDefaultState.setCurrentEncoding(RTL_TEXTENCODING_IBM_437);
+            m_aStates.top().setCurrentEncoding(m_aDefaultState.getCurrentEncoding());
             break;
         case RTF_PCA:
-            m_aDefaultState.nCurrentEncoding = RTL_TEXTENCODING_IBM_850;
-            m_aStates.top().nCurrentEncoding = m_aDefaultState.nCurrentEncoding;
+            m_aDefaultState.setCurrentEncoding(RTL_TEXTENCODING_IBM_850);
+            m_aStates.top().setCurrentEncoding(m_aDefaultState.getCurrentEncoding());
             break;
         case RTF_PLAIN:
         {
             m_aStates.top().aCharacterSprms = getDefaultState().aCharacterSprms;
-            m_aStates.top().nCurrentEncoding = getEncoding(getFontIndex(m_nDefaultFontIndex));
+            m_aStates.top().setCurrentEncoding(getEncoding(getFontIndex(m_nDefaultFontIndex)));
             m_aStates.top().aCharacterAttributes = getDefaultState().aCharacterAttributes;
             m_aStates.top().setCurrentCharacterStyleIndex(-1);
             m_aStates.top().setIsRightToLeft(false);
@@ -583,8 +583,8 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
             break;
         case RTF_RTLCH:
             m_aStates.top().setIsRightToLeft(true);
-            if (m_aDefaultState.nCurrentEncoding == RTL_TEXTENCODING_MS_1255)
-                m_aStates.top().nCurrentEncoding = m_aDefaultState.nCurrentEncoding;
+            if (m_aDefaultState.getCurrentEncoding() == RTL_TEXTENCODING_MS_1255)
+                m_aStates.top().setCurrentEncoding(m_aDefaultState.getCurrentEncoding());
             break;
         case RTF_ULNONE:
         {
diff --git a/writerfilter/source/rtftok/rtfdispatchsymbol.cxx b/writerfilter/source/rtftok/rtfdispatchsymbol.cxx
index ea205bf33a0a..86b9c84485d3 100644
--- a/writerfilter/source/rtftok/rtfdispatchsymbol.cxx
+++ b/writerfilter/source/rtftok/rtfdispatchsymbol.cxx
@@ -305,7 +305,7 @@ RTFError RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword)
             // The scope of the table cell defaults is one row.
             m_aDefaultState.aTableCellSprms.clear();
             m_aStates.top().aTableCellSprms = m_aDefaultState.aTableCellSprms;
-            m_aStates.top().aTableCellAttributes = m_aDefaultState.aTableCellAttributes;
+            m_aStates.top().getTableCellAttributes() = m_aDefaultState.getTableCellAttributes();
 
             writerfilter::Reference<Properties>::Pointer_t paraProperties;
             writerfilter::Reference<Properties>::Pointer_t frameProperties;
diff --git a/writerfilter/source/rtftok/rtfdispatchvalue.cxx b/writerfilter/source/rtftok/rtfdispatchvalue.cxx
index bce3a1cf44d6..f2a27759c50c 100644
--- a/writerfilter/source/rtftok/rtfdispatchvalue.cxx
+++ b/writerfilter/source/rtftok/rtfdispatchvalue.cxx
@@ -373,17 +373,17 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
                 putNestedAttribute(m_aStates.top().aCharacterSprms, NS_ooxml::LN_EG_RPrBase_rFonts,
                                    nSprm, pValue);
                 if (nKeyword == RTF_F)
-                    m_aStates.top().nCurrentEncoding = getEncoding(m_nCurrentFontIndex);
+                    m_aStates.top().setCurrentEncoding(getEncoding(m_nCurrentFontIndex));
             }
             break;
         case RTF_RED:
-            m_aStates.top().aCurrentColor.SetRed(nParam);
+            m_aStates.top().getCurrentColor().SetRed(nParam);
             break;
         case RTF_GREEN:
-            m_aStates.top().aCurrentColor.SetGreen(nParam);
+            m_aStates.top().getCurrentColor().SetGreen(nParam);
             break;
         case RTF_BLUE:
-            m_aStates.top().aCurrentColor.SetBlue(nParam);
+            m_aStates.top().getCurrentColor().SetBlue(nParam);
             break;
         case RTF_FCHARSET:
         {
@@ -403,7 +403,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
                 = aRTFEncodings[i].codepage == 0 // Default (CP_ACP)
                       ? osl_getThreadTextEncoding()
                       : rtl_getTextEncodingFromWindowsCodePage(aRTFEncodings[i].codepage);
-            m_aStates.top().nCurrentEncoding = m_nCurrentEncoding;
+            m_aStates.top().setCurrentEncoding(m_nCurrentEncoding);
         }
         break;
         case RTF_ANSICPG:
@@ -414,10 +414,10 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
                       ? utl_getWinTextEncodingFromLangStr(getLODefaultLanguage().toUtf8().getStr())
                       : rtl_getTextEncodingFromWindowsCodePage(nParam);
             if (nKeyword == RTF_ANSICPG)
-                m_aDefaultState.nCurrentEncoding = nEncoding;
+                m_aDefaultState.setCurrentEncoding(nEncoding);
             else
                 m_nCurrentEncoding = nEncoding;
-            m_aStates.top().nCurrentEncoding = nEncoding;
+            m_aStates.top().setCurrentEncoding(nEncoding);
         }
         break;
         case RTF_CF:
@@ -642,15 +642,15 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
         break;
         case RTF_TX:
         {
-            m_aStates.top().aTabAttributes.set(NS_ooxml::LN_CT_TabStop_pos, pIntValue);
-            auto pValue = new RTFValue(m_aStates.top().aTabAttributes);
+            m_aStates.top().getTabAttributes().set(NS_ooxml::LN_CT_TabStop_pos, pIntValue);
+            auto pValue = new RTFValue(m_aStates.top().getTabAttributes());
             if (m_aStates.top().eDestination == Destination::LISTLEVEL)
                 putNestedSprm(m_aStates.top().aTableSprms, NS_ooxml::LN_CT_PPrBase_tabs,
                               NS_ooxml::LN_CT_Tabs_tab, pValue);
             else
                 putNestedSprm(m_aStates.top().aParagraphSprms, NS_ooxml::LN_CT_PPrBase_tabs,
                               NS_ooxml::LN_CT_Tabs_tab, pValue);
-            m_aStates.top().aTabAttributes.clear();
+            m_aStates.top().getTabAttributes().clear();
         }
         break;
         case RTF_ILVL:
@@ -690,7 +690,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
         break;
         case RTF_UC:
             if ((SAL_MIN_INT16 <= nParam) && (nParam <= SAL_MAX_INT16))
-                m_aStates.top().nUc = nParam;
+                m_aStates.top().setUc(nParam);
             break;
         case RTF_U:
             // sal_Unicode is unsigned 16-bit, RTF may represent that as a
@@ -701,14 +701,14 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
                 if (m_aStates.top().eDestination == Destination::LEVELNUMBERS)
                 {
                     if (nParam != ';')
-                        m_aStates.top().aLevelNumbers.push_back(sal_Int32(nParam));
+                        m_aStates.top().getLevelNumbers().push_back(sal_Int32(nParam));
                     else
                         // ';' in \u form is not considered valid.
-                        m_aStates.top().bLevelNumbersValid = false;
+                        m_aStates.top().setLevelNumbersValid(false);
                 }
                 else
                     m_aUnicodeBuffer.append(static_cast<sal_Unicode>(nParam));
-                m_aStates.top().nCharsToSkip = m_aStates.top().nUc;
+                m_aStates.top().getCharsToSkip() = m_aStates.top().getUc();
             }
             break;
         case RTF_LEVELFOLLOW:
@@ -874,18 +874,18 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
                 m_nNestedCells++;
                 // Push cell properties.
                 m_aNestedTableCellsSprms.push_back(m_aStates.top().aTableCellSprms);
-                m_aNestedTableCellsAttributes.push_back(m_aStates.top().aTableCellAttributes);
+                m_aNestedTableCellsAttributes.push_back(m_aStates.top().getTableCellAttributes());
             }
             else
             {
                 m_nTopLevelCells++;
                 // Push cell properties.
                 m_aTopLevelTableCellsSprms.push_back(m_aStates.top().aTableCellSprms);
-                m_aTopLevelTableCellsAttributes.push_back(m_aStates.top().aTableCellAttributes);
+                m_aTopLevelTableCellsAttributes.push_back(m_aStates.top().getTableCellAttributes());
             }
 
             m_aStates.top().aTableCellSprms = m_aDefaultState.aTableCellSprms;
-            m_aStates.top().aTableCellAttributes = m_aDefaultState.aTableCellAttributes;
+            m_aStates.top().getTableCellAttributes() = m_aDefaultState.getTableCellAttributes();
             // We assume text after a row definition always belongs to the table, to handle text before the real INTBL token
             dispatchFlag(RTF_INTBL);
             if (!m_nCellxMax)
@@ -1053,7 +1053,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
         case RTF_REVDTTMDEL:
         {
             OUString aStr(
-                OStringToOUString(DTTM22OString(nParam), m_aStates.top().nCurrentEncoding));
+                OStringToOUString(DTTM22OString(nParam), m_aStates.top().getCurrentEncoding()));
             auto pValue = new RTFValue(aStr);
             putNestedAttribute(m_aStates.top().aCharacterSprms, NS_ooxml::LN_trackchange,
                                NS_ooxml::LN_CT_TrackChange_date, pValue);
@@ -1235,7 +1235,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
         case RTF_BIN:
         {
             m_aStates.top().nInternalState = RTFInternalState::BIN;
-            m_aStates.top().nBinaryToRead = nParam;
+            m_aStates.top().setBinaryToRead(nParam);
         }
         break;
         case RTF_DPLINECOR:
@@ -1486,7 +1486,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
         {
             if (m_aStates.top().eDestination == Destination::LISTLEVEL)
             {
-                if (m_aStates.top().bLevelNumbersValid)
+                if (m_aStates.top().getLevelNumbersValid())
                     putNestedAttribute(m_aStates.top().aTableSprms, NS_ooxml::LN_CT_PPrBase_ind,
                                        NS_ooxml::LN_CT_Ind_firstLine, pIntValue);
                 else
@@ -1501,7 +1501,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
         {
             if (m_aStates.top().eDestination == Destination::LISTLEVEL)
             {
-                if (m_aStates.top().bLevelNumbersValid)
+                if (m_aStates.top().getLevelNumbersValid())
                     putNestedAttribute(m_aStates.top().aTableSprms, NS_ooxml::LN_CT_PPrBase_ind,
                                        NS_ooxml::LN_CT_Ind_left, pIntValue);
             }

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list