sw/source/writerfilter/rtftok/rtfdispatchvalue.cxx |   13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

New commits:
commit 4805277b8d3e93ac652a5ed66d0ed101d64a78c3
Author:     Bogdan Buzea <buzea.bog...@libreoffice.org>
AuthorDate: Sat Oct 19 19:36:11 2024 +0200
Commit:     David Gilbert <freedesk...@treblig.org>
CommitDate: Fri Nov 15 01:57:36 2024 +0100

    tdf#163486: PVS: Identical branches
    
    V1037 Two or more case-branches perform the same actions. Check lines: 931, 
941
    
    Change-Id: Id5be5973b9b3141576d82f64e5fc46acd926b81e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175228
    Reviewed-by: David Gilbert <freedesk...@treblig.org>
    Tested-by: Jenkins

diff --git a/sw/source/writerfilter/rtftok/rtfdispatchvalue.cxx 
b/sw/source/writerfilter/rtftok/rtfdispatchvalue.cxx
index ee73a1fc514c..85ad1613a5dd 100644
--- a/sw/source/writerfilter/rtftok/rtfdispatchvalue.cxx
+++ b/sw/source/writerfilter/rtftok/rtfdispatchvalue.cxx
@@ -928,24 +928,15 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword 
nKeyword, int nParam)
             }
             break;
         case RTFKeyword::DS:
-            if (m_aStates.top().getDestination() == Destination::STYLESHEET
-                || m_aStates.top().getDestination() == Destination::STYLEENTRY)
-            {
-                m_nCurrentStyleIndex = nParam;
-                auto pValue = new RTFValue(0); // TODO no value in enum 
StyleType?
-                
m_aStates.top().getTableAttributes().set(NS_ooxml::LN_CT_Style_type,
-                                                         pValue); // section 
style
-            }
-            break;
         case RTFKeyword::TS:
             if (m_aStates.top().getDestination() == Destination::STYLESHEET
                 || m_aStates.top().getDestination() == Destination::STYLEENTRY)
             {
                 m_nCurrentStyleIndex = nParam;
-                // FIXME the correct value would be 
NS_ooxml::LN_Value_ST_StyleType_table but maybe table styles mess things up in 
dmapper, be cautious and disable them for now
+                // table styles mess things up in dmapper and there is no 
section style support at all
                 auto pValue = new RTFValue(0);
                 
m_aStates.top().getTableAttributes().set(NS_ooxml::LN_CT_Style_type,
-                                                         pValue); // table 
style
+                                                         pValue); // 
section/table style
             }
             break;
         case RTFKeyword::DEFF:

Reply via email to