sw/source/writerfilter/ooxml/OOXMLFastContextHandler.cxx |   16 +--
 sw/source/writerfilter/ooxml/ShadowContext.hxx           |    2 
 sw/source/writerfilter/rtftok/rtfdispatchdestination.cxx |   12 +-
 sw/source/writerfilter/rtftok/rtfdispatchsymbol.cxx      |   19 ++-
 sw/source/writerfilter/rtftok/rtfdocumentimpl.cxx        |   79 +++++++--------
 sw/source/writerfilter/rtftok/rtfdocumentimpl.hxx        |   32 +++---
 6 files changed, 84 insertions(+), 76 deletions(-)

New commits:
commit 4a6f573114221a044b4f73642443ae94aa8d63fa
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Thu Jul 10 16:10:19 2025 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Fri Jul 11 09:20:34 2025 +0200

    convert CallDataType to scoped enum
    
    Change-Id: Ice7c0b60c38af4bf3513a2e39909fc603296a483
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187642
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Tested-by: Jenkins

diff --git a/sw/source/writerfilter/ooxml/OOXMLFastContextHandler.cxx 
b/sw/source/writerfilter/ooxml/OOXMLFastContextHandler.cxx
index b7381fc84c3b..508e76486ea7 100644
--- a/sw/source/writerfilter/ooxml/OOXMLFastContextHandler.cxx
+++ b/sw/source/writerfilter/ooxml/OOXMLFastContextHandler.cxx
@@ -2058,7 +2058,7 @@ void SAL_CALL 
OOXMLFastContextHandlerWrapper::endFastElement(::sal_Int32 Element
             {
                 switch (callDataIt->getType())
                 {
-                    case Init:
+                    case CallDataType::Init:
                     {
                         sal_Int32 nElement = callDataIt->getElement();
                         css::uno::Reference<css::xml::sax::XFastAttributeList> 
rAttribs
@@ -2074,7 +2074,7 @@ void SAL_CALL 
OOXMLFastContextHandlerWrapper::endFastElement(::sal_Int32 Element
                         aLocalHandlers.push_back(newWrapper);
                     }
                     break;
-                    case ElementAttr:
+                    case CallDataType::ElementAttr:
                     {
                         sal_Int32 nElement = callDataIt->getElement();
                         css::uno::Reference<css::xml::sax::XFastAttributeList> 
rAttrs
@@ -2084,7 +2084,7 @@ void SAL_CALL 
OOXMLFastContextHandlerWrapper::endFastElement(::sal_Int32 Element
                             xHandler->startFastElement(nElement, rAttrs);
                     }
                     break;
-                    case Char:
+                    case CallDataType::Char:
                     {
                         const ::rtl::OUString& chars = callDataIt->getChars();
                         auto xHandler = aLocalHandlers.back();
@@ -2092,7 +2092,7 @@ void SAL_CALL 
OOXMLFastContextHandlerWrapper::endFastElement(::sal_Int32 Element
                             xHandler->characters(chars);
                     }
                     break;
-                    case EndElementAttr:
+                    case CallDataType::EndElementAttr:
                     {
                         sal_Int32 nElement = callDataIt->getElement();
                         auto xHandler = aLocalHandlers.back();
@@ -2101,7 +2101,7 @@ void SAL_CALL 
OOXMLFastContextHandlerWrapper::endFastElement(::sal_Int32 Element
                         aLocalHandlers.pop_back();
                     }
                     break;
-                    case Unknown:
+                    case CallDataType::Unknown:
                     {
                         const ::rtl::OUString& rNameSpace = 
callDataIt->getUnknownNameSpace();
                         const ::rtl::OUString& rElement = 
callDataIt->getUnknownElement();
@@ -2112,7 +2112,7 @@ void SAL_CALL 
OOXMLFastContextHandlerWrapper::endFastElement(::sal_Int32 Element
                             xHandler->startUnknownElement(rNameSpace, 
rElement, rAttrs);
                     }
                     break;
-                    case EndUnknown:
+                    case CallDataType::EndUnknown:
                     {
                         const ::rtl::OUString& rNameSpace = 
callDataIt->getUnknownNameSpace();
                         const ::rtl::OUString& rElement = 
callDataIt->getUnknownElement();
@@ -2122,7 +2122,7 @@ void SAL_CALL 
OOXMLFastContextHandlerWrapper::endFastElement(::sal_Int32 Element
                         aLocalHandlers.pop_back();
                     }
                     break;
-                    case ElementContext:
+                    case CallDataType::ElementContext:
                     {
                         sal_Int32 nElement = callDataIt->getElement();
                         css::uno::Reference<css::xml::sax::XFastAttributeList> 
rAttrs
@@ -2133,7 +2133,7 @@ void SAL_CALL 
OOXMLFastContextHandlerWrapper::endFastElement(::sal_Int32 Element
                         aLocalHandlers.push_back(newContext);
                     }
                     break;
-                    case UnknownContext:
+                    case CallDataType::UnknownContext:
                     {
                         const ::rtl::OUString& rNameSpace = 
callDataIt->getUnknownNameSpace();
                         const ::rtl::OUString& rElement = 
callDataIt->getUnknownElement();
diff --git a/sw/source/writerfilter/ooxml/ShadowContext.hxx 
b/sw/source/writerfilter/ooxml/ShadowContext.hxx
index fc25445f7c1c..c55abf7a4558 100644
--- a/sw/source/writerfilter/ooxml/ShadowContext.hxx
+++ b/sw/source/writerfilter/ooxml/ShadowContext.hxx
@@ -28,7 +28,7 @@
 
 namespace writerfilter::ooxml
 {
-enum CallDataType
+enum class CallDataType
 {
     Init,
     ElementAttr,
commit c9e6d8743335f41d385e0323f3efa539d2ec6596
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Thu Jul 10 16:09:06 2025 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Fri Jul 11 09:20:26 2025 +0200

    convert RTFBufferTypes to scoped enum
    
    Change-Id: I2a86fcc329596dba959a673f453a6c42cd115343
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187641
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Tested-by: Jenkins

diff --git a/sw/source/writerfilter/rtftok/rtfdispatchdestination.cxx 
b/sw/source/writerfilter/rtftok/rtfdispatchdestination.cxx
index b3e4e04274f9..596fed2269fa 100644
--- a/sw/source/writerfilter/rtftok/rtfdispatchdestination.cxx
+++ b/sw/source/writerfilter/rtftok/rtfdispatchdestination.cxx
@@ -282,7 +282,7 @@ RTFError RTFDocumentImpl::dispatchDestination(RTFKeyword 
nKeyword)
                     OUString aCustomMark;
                     for (auto const& elem : m_aSuperBuffer)
                     {
-                        if (std::get<0>(elem) == BUFFER_UTEXT)
+                        if (std::get<0>(elem) == RTFBufferTypes::UText)
                         {
                             aCustomMark = std::get<1>(elem)->getString();
                             bCustomMark = true;
@@ -300,8 +300,8 @@ RTFError RTFDocumentImpl::dispatchDestination(RTFKeyword 
nKeyword)
                         aAttributes.set(Id(0), new RTFValue(m_nGroupStartPos - 
1));
                         aAttributes.set(Id(1), new RTFValue(nId));
                         aAttributes.set(Id(2), new RTFValue(aCustomMark));
-                        m_aStates.top().getCurrentBuffer()->push_back(
-                            Buf_t(BUFFER_RESOLVESUBSTREAM, new 
RTFValue(aAttributes), nullptr));
+                        m_aStates.top().getCurrentBuffer()->push_back(Buf_t(
+                            RTFBufferTypes::ResolveSubstream, new 
RTFValue(aAttributes), nullptr));
                     }
                     if (bCustomMark)
                     {
@@ -345,8 +345,8 @@ RTFError RTFDocumentImpl::dispatchDestination(RTFKeyword 
nKeyword)
                         aAttributes.set(Id(0), new RTFValue(m_nGroupStartPos - 
1));
                         aAttributes.set(Id(1), new 
RTFValue(NS_ooxml::LN_annotation));
                         aAttributes.set(Id(2), new RTFValue(OUString()));
-                        m_aStates.top().getCurrentBuffer()->push_back(
-                            Buf_t(BUFFER_RESOLVESUBSTREAM, new 
RTFValue(aAttributes), nullptr));
+                        m_aStates.top().getCurrentBuffer()->push_back(Buf_t(
+                            RTFBufferTypes::ResolveSubstream, new 
RTFValue(aAttributes), nullptr));
                     }
                     m_aStates.top().setDestination(Destination::SKIP);
                 }
@@ -405,7 +405,7 @@ RTFError RTFDocumentImpl::dispatchDestination(RTFKeyword 
nKeyword)
                         {
                             auto pValue = new 
RTFValue(m_aStates.top().getShape());
                             m_aStates.top().getCurrentBuffer()->push_back(
-                                Buf_t(BUFFER_STARTSHAPE, pValue, nullptr));
+                                Buf_t(RTFBufferTypes::StartShape, pValue, 
nullptr));
                         }
                     }
                 }
diff --git a/sw/source/writerfilter/rtftok/rtfdispatchsymbol.cxx 
b/sw/source/writerfilter/rtftok/rtfdispatchsymbol.cxx
index ba7c5c550154..53d166d1670f 100644
--- a/sw/source/writerfilter/rtftok/rtfdispatchsymbol.cxx
+++ b/sw/source/writerfilter/rtftok/rtfdispatchsymbol.cxx
@@ -121,7 +121,8 @@ RTFError RTFDocumentImpl::dispatchSymbol(RTFKeyword 
nKeyword)
             else if (m_aStates.top().getDestination() != 
Destination::SHAPETEXT)
             {
                 RTFValue::Pointer_t pValue;
-                
m_aStates.top().getCurrentBuffer()->push_back(Buf_t(BUFFER_PAR, pValue, 
nullptr));
+                m_aStates.top().getCurrentBuffer()->push_back(
+                    Buf_t(RTFBufferTypes::PAR, pValue, nullptr));
             }
             // but don't emit properties yet, since they may change till the 
first text token arrives
             m_bNeedPap = true;
@@ -209,7 +210,8 @@ RTFError RTFDocumentImpl::dispatchSymbol(RTFKeyword 
nKeyword)
             }
 
             RTFValue::Pointer_t pValue;
-            m_aTableBufferStack.back().emplace_back(Buf_t(BUFFER_CELLEND, 
pValue, nullptr));
+            m_aTableBufferStack.back().emplace_back(
+                Buf_t(RTFBufferTypes::CellEnd, pValue, nullptr));
             m_bNeedPap = true;
         }
         break;
@@ -239,7 +241,7 @@ RTFError RTFDocumentImpl::dispatchSymbol(RTFKeyword 
nKeyword)
             }
             m_aTableBufferStack.pop_back();
             m_aTableBufferStack.back().emplace_back(
-                Buf_t(BUFFER_NESTROW, RTFValue::Pointer_t(), pBuffer));
+                Buf_t(RTFBufferTypes::NestRow, RTFValue::Pointer_t(), 
pBuffer));
 
             m_aNestedTableCellsSprms.clear();
             m_aNestedTableCellsAttributes.clear();
@@ -263,7 +265,7 @@ RTFError RTFDocumentImpl::dispatchSymbol(RTFKeyword 
nKeyword)
                 int nCellCount = 0;
                 for (Buf_t& i : m_aTableBufferStack.back())
                 {
-                    if (BUFFER_CELLEND == std::get<0>(i))
+                    if (RTFBufferTypes::CellEnd == std::get<0>(i))
                         ++nCellCount;
                 }
                 if (m_nTopLevelCells < nCellCount)
@@ -304,11 +306,11 @@ RTFError RTFDocumentImpl::dispatchSymbol(RTFKeyword 
nKeyword)
                 int nCell = 1;
                 for (Buf_t& rTableBufferElement : m_aTableBufferStack.back())
                 {
-                    if (BUFFER_CELLEND == std::get<0>(rTableBufferElement))
+                    if (RTFBufferTypes::CellEnd == 
std::get<0>(rTableBufferElement))
                         ++nCell;
                     else if (nCell == nCellCount - 1)
                     {
-                        if (BUFFER_PROPS_CHAR == 
std::get<0>(rTableBufferElement))
+                        if (RTFBufferTypes::PropsChar == 
std::get<0>(rTableBufferElement))
                         {
                             tools::SvRef<writerfilter::rtftok::RTFValue> 
xPropValue
                                 = std::get<1>(rTableBufferElement);
@@ -322,10 +324,11 @@ RTFError RTFDocumentImpl::dispatchSymbol(RTFKeyword 
nKeyword)
                 nCell = 1;
                 for (Buf_t& rTableBufferElement : m_aTableBufferStack.back())
                 {
-                    if (BUFFER_CELLEND == std::get<0>(rTableBufferElement))
+                    if (RTFBufferTypes::CellEnd == 
std::get<0>(rTableBufferElement))
                         ++nCell;
                     //Remove paragraph spacing on fill cells
-                    if (nCell == nCellCount && BUFFER_PROPS == 
std::get<0>(rTableBufferElement))
+                    if (nCell == nCellCount
+                        && RTFBufferTypes::Props == 
std::get<0>(rTableBufferElement))
                     {
                         tools::SvRef<writerfilter::rtftok::RTFValue> xPropValue
                             = std::get<1>(rTableBufferElement);
diff --git a/sw/source/writerfilter/rtftok/rtfdocumentimpl.cxx 
b/sw/source/writerfilter/rtftok/rtfdocumentimpl.cxx
index dd5f44a8817d..60cc061fa277 100644
--- a/sw/source/writerfilter/rtftok/rtfdocumentimpl.cxx
+++ b/sw/source/writerfilter/rtftok/rtfdocumentimpl.cxx
@@ -1431,7 +1431,7 @@ void RTFDocumentImpl::singleChar(sal_uInt8 nValue, bool 
bRunProps)
     }
     else
     {
-        pCurrentBuffer->emplace_back(BUFFER_STARTRUN, nullptr, nullptr);
+        pCurrentBuffer->emplace_back(RTFBufferTypes::StartRun, nullptr, 
nullptr);
     }
 
     // Should we send run properties?
@@ -1446,8 +1446,8 @@ void RTFDocumentImpl::singleChar(sal_uInt8 nValue, bool 
bRunProps)
     else
     {
         auto pValue = new RTFValue(*sValue);
-        pCurrentBuffer->emplace_back(BUFFER_TEXT, pValue, nullptr);
-        pCurrentBuffer->emplace_back(BUFFER_ENDRUN, nullptr, nullptr);
+        pCurrentBuffer->emplace_back(RTFBufferTypes::Text, pValue, nullptr);
+        pCurrentBuffer->emplace_back(RTFBufferTypes::EndRun, nullptr, nullptr);
     }
 }
 
@@ -1666,7 +1666,8 @@ void RTFDocumentImpl::text(OUString& rString)
     if 
(m_aStates.top().getTableCellSprms().find(NS_ooxml::LN_CT_TcPrBase_vAlign)
         && m_nTopLevelCells == 0)
     {
-        m_aTableBufferStack.back().emplace_back(BUFFER_UTEXT, new 
RTFValue(rString), nullptr);
+        m_aTableBufferStack.back().emplace_back(RTFBufferTypes::UText, new 
RTFValue(rString),
+                                                nullptr);
         return;
     }
 
@@ -1687,7 +1688,7 @@ void RTFDocumentImpl::text(OUString& rString)
     else if (pCurrentBuffer)
     {
         RTFValue::Pointer_t pValue;
-        pCurrentBuffer->emplace_back(BUFFER_STARTRUN, pValue, nullptr);
+        pCurrentBuffer->emplace_back(RTFBufferTypes::StartRun, pValue, 
nullptr);
     }
 
     if (m_aStates.top().getDestination() == Destination::NORMAL
@@ -1700,7 +1701,7 @@ void RTFDocumentImpl::text(OUString& rString)
     else
     {
         auto pValue = new RTFValue(rString);
-        pCurrentBuffer->emplace_back(BUFFER_UTEXT, pValue, nullptr);
+        pCurrentBuffer->emplace_back(RTFBufferTypes::UText, pValue, nullptr);
     }
 
     m_bNeedCr = true;
@@ -1710,7 +1711,7 @@ void RTFDocumentImpl::text(OUString& rString)
     else if (pCurrentBuffer)
     {
         RTFValue::Pointer_t pValue;
-        pCurrentBuffer->emplace_back(BUFFER_ENDRUN, pValue, nullptr);
+        pCurrentBuffer->emplace_back(RTFBufferTypes::EndRun, pValue, nullptr);
     }
 }
 
@@ -1871,7 +1872,8 @@ void RTFDocumentImpl::replayRowBuffer(RTFBuffer_t& 
rBuffer, ::std::deque<RTFSprm
     }
     for (Buf_t& i : rBuffer)
     {
-        SAL_WARN_IF(BUFFER_CELLEND == std::get<0>(i), "writerfilter.rtf", 
"dropping table cell!");
+        SAL_WARN_IF(RTFBufferTypes::CellEnd == std::get<0>(i), 
"writerfilter.rtf",
+                    "dropping table cell!");
     }
     assert(rCellsSprms.empty());
     assert(rCellsAttributes.empty());
@@ -1884,17 +1886,19 @@ void RTFDocumentImpl::replayBuffer(RTFBuffer_t& 
rBuffer, RTFSprms* const pSprms,
     {
         Buf_t aTuple(rBuffer.front());
         rBuffer.pop_front();
-        if (std::get<0>(aTuple) == BUFFER_PROPS || std::get<0>(aTuple) == 
BUFFER_PROPS_CHAR)
+        if (std::get<0>(aTuple) == RTFBufferTypes::Props
+            || std::get<0>(aTuple) == RTFBufferTypes::PropsChar)
         {
             // Construct properties via getProperties() and not directly, to 
take care of deduplication.
-            writerfilter::Reference<Properties>::Pointer_t const 
pProp(getProperties(
-                std::get<1>(aTuple)->getAttributes(), 
std::get<1>(aTuple)->getSprms(),
-                std::get<0>(aTuple) == BUFFER_PROPS_CHAR ? 
NS_ooxml::LN_Value_ST_StyleType_character
-                                                         : 0,
-                std::get<0>(aTuple) == BUFFER_PROPS_CHAR));
+            writerfilter::Reference<Properties>::Pointer_t const pProp(
+                getProperties(std::get<1>(aTuple)->getAttributes(), 
std::get<1>(aTuple)->getSprms(),
+                              std::get<0>(aTuple) == RTFBufferTypes::PropsChar
+                                  ? NS_ooxml::LN_Value_ST_StyleType_character
+                                  : 0,
+                              std::get<0>(aTuple) == 
RTFBufferTypes::PropsChar));
             Mapper().props(pProp);
         }
-        else if (std::get<0>(aTuple) == BUFFER_NESTROW)
+        else if (std::get<0>(aTuple) == RTFBufferTypes::NestRow)
         {
             TableRowBuffer& rRowBuffer(*std::get<2>(aTuple));
 
@@ -1904,7 +1908,7 @@ void RTFDocumentImpl::replayBuffer(RTFBuffer_t& rBuffer, 
RTFSprms* const pSprms,
             sendProperties(rRowBuffer.GetParaProperties(), 
rRowBuffer.GetFrameProperties(),
                            rRowBuffer.GetRowProperties());
         }
-        else if (std::get<0>(aTuple) == BUFFER_CELLEND)
+        else if (std::get<0>(aTuple) == RTFBufferTypes::CellEnd)
         {
             assert(pSprms && pAttributes);
             auto pValue = new RTFValue(1);
@@ -1915,25 +1919,25 @@ void RTFDocumentImpl::replayBuffer(RTFBuffer_t& 
rBuffer, RTFSprms* const pSprms,
             tableBreak();
             break;
         }
-        else if (std::get<0>(aTuple) == BUFFER_STARTRUN)
+        else if (std::get<0>(aTuple) == RTFBufferTypes::StartRun)
             Mapper().startCharacterGroup();
-        else if (std::get<0>(aTuple) == BUFFER_TEXT)
+        else if (std::get<0>(aTuple) == RTFBufferTypes::Text)
         {
             sal_uInt8 const nValue = std::get<1>(aTuple)->getInt();
             Mapper().text(&nValue, 1);
         }
-        else if (std::get<0>(aTuple) == BUFFER_UTEXT)
+        else if (std::get<0>(aTuple) == RTFBufferTypes::UText)
         {
             OUString const aString(std::get<1>(aTuple)->getString());
             Mapper().utext(aString.getStr(), aString.getLength());
         }
-        else if (std::get<0>(aTuple) == BUFFER_ENDRUN)
+        else if (std::get<0>(aTuple) == RTFBufferTypes::EndRun)
             Mapper().endCharacterGroup();
-        else if (std::get<0>(aTuple) == BUFFER_PAR)
+        else if (std::get<0>(aTuple) == RTFBufferTypes::PAR)
             parBreak();
-        else if (std::get<0>(aTuple) == BUFFER_STARTSHAPE)
+        else if (std::get<0>(aTuple) == RTFBufferTypes::StartShape)
             m_pSdrImport->resolve(std::get<1>(aTuple)->getShape(), false, 
RTFSdrImport::SHAPE);
-        else if (std::get<0>(aTuple) == BUFFER_RESOLVESHAPE)
+        else if (std::get<0>(aTuple) == RTFBufferTypes::ResolveShape)
         {
             // Make sure there is no current buffer while replaying the shape,
             // otherwise it gets re-buffered.
@@ -1949,9 +1953,9 @@ void RTFDocumentImpl::replayBuffer(RTFBuffer_t& rBuffer, 
RTFSprms* const pSprms,
             m_aStates.top().getShape() = std::move(aShape);
             m_aStates.top().setCurrentBuffer(pCurrentBuffer);
         }
-        else if (std::get<0>(aTuple) == BUFFER_ENDSHAPE)
+        else if (std::get<0>(aTuple) == RTFBufferTypes::EndShape)
             m_pSdrImport->close();
-        else if (std::get<0>(aTuple) == BUFFER_RESOLVESUBSTREAM)
+        else if (std::get<0>(aTuple) == RTFBufferTypes::ResolveSubstream)
         {
             RTFSprms& rAttributes = std::get<1>(aTuple)->getAttributes();
             std::size_t nPos = rAttributes.find(0)->getInt();
@@ -1959,9 +1963,9 @@ void RTFDocumentImpl::replayBuffer(RTFBuffer_t& rBuffer, 
RTFSprms* const pSprms,
             OUString aCustomMark = rAttributes.find(2)->getString();
             resolveSubstream(nPos, nId, aCustomMark);
         }
-        else if (std::get<0>(aTuple) == BUFFER_PICTURE)
+        else if (std::get<0>(aTuple) == RTFBufferTypes::Picture)
             m_aStates.top().getPicture() = std::get<1>(aTuple)->getPicture();
-        else if (std::get<0>(aTuple) == BUFFER_SETSTYLE)
+        else if (std::get<0>(aTuple) == RTFBufferTypes::SetStyle)
         {
             if (!m_aStates.empty())
                 
m_aStates.top().setCurrentStyleIndex(std::get<1>(aTuple)->getInt());
@@ -2664,8 +2668,8 @@ RTFError RTFDocumentImpl::beforePopState(RTFParserState& 
rState)
                     // Also buffer the RTFPicture of the state stack as it 
contains
                     // the shape size.
                     auto pPictureValue = new 
RTFValue(m_aStates.top().getPicture());
-                    
m_aStates.top().getCurrentBuffer()->emplace_back(BUFFER_PICTURE, pPictureValue,
-                                                                     nullptr);
+                    
m_aStates.top().getCurrentBuffer()->emplace_back(RTFBufferTypes::Picture,
+                                                                     
pPictureValue, nullptr);
                     auto pValue = new RTFValue(m_aStates.top().getShape());
 
                     // Buffer wrap type.
@@ -2679,8 +2683,8 @@ RTFError RTFDocumentImpl::beforePopState(RTFParserState& 
rState)
                         }
                     }
 
-                    
m_aStates.top().getCurrentBuffer()->emplace_back(BUFFER_RESOLVESHAPE, pValue,
-                                                                     nullptr);
+                    
m_aStates.top().getCurrentBuffer()->emplace_back(RTFBufferTypes::ResolveShape,
+                                                                     pValue, 
nullptr);
                 }
             }
             else if (rState.getInShapeGroup() && !rState.getInShape())
@@ -3749,8 +3753,8 @@ void RTFDocumentImpl::afterPopState(RTFParserState& 
rState)
                     if (!m_aStates.top().getCurrentBuffer())
                         m_pSdrImport->close();
                     else
-                        
m_aStates.top().getCurrentBuffer()->emplace_back(BUFFER_ENDSHAPE, nullptr,
-                                                                         
nullptr);
+                        
m_aStates.top().getCurrentBuffer()->emplace_back(RTFBufferTypes::EndShape,
+                                                                         
nullptr, nullptr);
                 }
 
                 // It's allowed to declare these inside the shape text, and 
they
@@ -4018,11 +4022,12 @@ void RTFDocumentImpl::bufferProperties(RTFBuffer_t& 
rBuffer, const RTFValue::Poi
                                        const tools::SvRef<TableRowBuffer>& 
pTableProperties,
                                        Id const nStyleType)
 {
-    rBuffer.emplace_back(BUFFER_SETSTYLE, new 
RTFValue(m_aStates.top().getCurrentStyleIndex()),
-                         nullptr);
+    rBuffer.emplace_back(RTFBufferTypes::SetStyle,
+                         new RTFValue(m_aStates.top().getCurrentStyleIndex()), 
nullptr);
     assert(nStyleType == 0 || nStyleType == 
NS_ooxml::LN_Value_ST_StyleType_character);
-    rBuffer.emplace_back(nStyleType == 
NS_ooxml::LN_Value_ST_StyleType_character ? BUFFER_PROPS_CHAR
-                                                                               
  : BUFFER_PROPS,
+    rBuffer.emplace_back(nStyleType == 
NS_ooxml::LN_Value_ST_StyleType_character
+                             ? RTFBufferTypes::PropsChar
+                             : RTFBufferTypes::Props,
                          pValue, pTableProperties);
 }
 
diff --git a/sw/source/writerfilter/rtftok/rtfdocumentimpl.hxx 
b/sw/source/writerfilter/rtftok/rtfdocumentimpl.hxx
index c29a147157bd..dfd881664d5c 100644
--- a/sw/source/writerfilter/rtftok/rtfdocumentimpl.hxx
+++ b/sw/source/writerfilter/rtftok/rtfdocumentimpl.hxx
@@ -68,26 +68,26 @@ enum class RTFBorderState
 };
 
 /// Different kind of buffers for table cell contents.
-enum RTFBufferTypes
+enum class RTFBufferTypes
 {
-    BUFFER_SETSTYLE,
+    SetStyle,
     /// Stores properties, should be created only in bufferProperties().
-    BUFFER_PROPS,
-    BUFFER_PROPS_CHAR,
-    BUFFER_NESTROW,
-    BUFFER_CELLEND,
-    BUFFER_STARTRUN,
-    BUFFER_TEXT,
-    BUFFER_UTEXT,
-    BUFFER_ENDRUN,
-    BUFFER_PAR,
-    BUFFER_STARTSHAPE,
+    Props,
+    PropsChar,
+    NestRow,
+    CellEnd,
+    StartRun,
+    Text,
+    UText,
+    EndRun,
+    PAR,
+    StartShape,
     /// Imports a shape.
-    BUFFER_RESOLVESHAPE,
-    BUFFER_ENDSHAPE,
-    BUFFER_RESOLVESUBSTREAM,
+    ResolveShape,
+    EndShape,
+    ResolveSubstream,
     /// Restores RTFParserState::aPicture.
-    BUFFER_PICTURE
+    Picture
 };
 
 /// Form field types

Reply via email to