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

Noel Grandin noel.grandin at collabora.co.uk
Tue Jun 20 05:49:32 UTC 2017


 writerfilter/source/dmapper/DomainMapper.cxx        |    6 ----
 writerfilter/source/dmapper/DomainMapper_Impl.cxx   |    9 +-----
 writerfilter/source/dmapper/DomainMapper_Impl.hxx   |    8 -----
 writerfilter/source/dmapper/FontTable.cxx           |    6 ++--
 writerfilter/source/dmapper/FontTable.hxx           |    2 -
 writerfilter/source/dmapper/GraphicImport.cxx       |    3 --
 writerfilter/source/dmapper/NumberingManager.cxx    |   12 ++------
 writerfilter/source/dmapper/NumberingManager.hxx    |    8 -----
 writerfilter/source/dmapper/OLEHandler.cxx          |    4 --
 writerfilter/source/dmapper/OLEHandler.hxx          |    2 -
 writerfilter/source/dmapper/PropertyMap.cxx         |    9 ------
 writerfilter/source/dmapper/PropertyMap.hxx         |   27 -------------------
 writerfilter/source/dmapper/SettingsTable.cxx       |    9 ------
 writerfilter/source/dmapper/StyleSheetTable.cxx     |   28 ++------------------
 writerfilter/source/dmapper/StyleSheetTable.hxx     |    7 -----
 writerfilter/source/dmapper/TrackChangesHandler.cxx |    4 --
 writerfilter/source/ooxml/OOXMLDocumentImpl.cxx     |    4 --
 writerfilter/source/ooxml/OOXMLDocumentImpl.hxx     |    1 
 18 files changed, 17 insertions(+), 132 deletions(-)

New commits:
commit 42ab759336cd4a4cbcc5be66de33d05b7fc46be4
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Thu Jun 15 12:03:06 2017 +0200

    loplugin:unusedfields in writerfilter
    
    Change-Id: I2f74dee5c05420275aae57485b8d81f60fff2d5d
    Reviewed-on: https://gerrit.libreoffice.org/38823
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 7161b1fe6ace..67bd4648e42f 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -85,7 +85,6 @@ namespace dmapper{
 
 struct
 {
-    sal_Int32 code;
     sal_Int32 h;
     bool      orient;
     sal_Int32 w;
@@ -567,7 +566,6 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
             break;
 
         case NS_ooxml::LN_CT_PageSz_code:
-            CT_PageSz.code = nIntValue;
             break;
         case NS_ooxml::LN_CT_PageSz_h:
             {
@@ -895,7 +893,6 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
                         pSectionContext->SetLnnMod( nIntValue );
                 break;
                 case NS_ooxml::LN_CT_LineNumber_start:
-                    aSettings.nStartValue = nIntValue; // todo: has to be set at (each) first paragraph
                     OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
                     if( pSectionContext )
                         pSectionContext->SetLnnMin( nIntValue );
@@ -1947,7 +1944,6 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const PropertyMapPtr& rContext )
     {
         resolveSprmProps(*this, rSprm);
         LineNumberSettings aSettings = m_pImpl->GetLineNumberSettings();
-        aSettings.bIsOn = true;
         m_pImpl->SetLineNumberSettings( aSettings );
         //apply settings at XLineNumberingProperties
         try
@@ -1986,7 +1982,6 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const PropertyMapPtr& rContext )
     }
     break;
     case NS_ooxml::LN_EG_SectPrContents_pgSz:
-        CT_PageSz.code = 0;
         {
             PaperInfo aLetter(PAPER_LETTER);
             CT_PageSz.w = aLetter.getWidth();
@@ -2000,7 +1995,6 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const PropertyMapPtr& rContext )
             pSectionContext->Insert( PROP_HEIGHT, uno::makeAny( CT_PageSz.h ) );
             pSectionContext->Insert( PROP_IS_LANDSCAPE, uno::makeAny( CT_PageSz.orient ));
             pSectionContext->Insert( PROP_WIDTH, uno::makeAny( CT_PageSz.w ) );
-            pSectionContext->SetLandscape( CT_PageSz.orient );
         }
         break;
 
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index c58bdaf94143..9e2737322922 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -198,7 +198,6 @@ DomainMapper_Impl::DomainMapper_Impl(
         m_bStartedTOC(false),
         m_bStartIndex(false),
         m_bStartBibliography(false),
-        m_bTOCPageRef(false),
         m_bStartGenericField(false),
         m_bTextInserted(false),
         m_pLastSectionContext( ),
@@ -3718,7 +3717,6 @@ void DomainMapper_Impl::CloseFieldCommand()
                 }
                 if (m_bStartTOC && (aIt->second.eFieldId == FIELD_PAGEREF) )
                 {
-                    m_bTOCPageRef = true;
                     bCreateField = false;
                 }
 
@@ -5006,7 +5004,7 @@ void DomainMapper_Impl::SetPageMarginTwip( PageMarElement eElement, sal_Int32 nV
         case PAGE_MAR_LEFT   : m_aPageMargins.left    = nValue; break;
         case PAGE_MAR_HEADER : m_aPageMargins.header  = nValue; break;
         case PAGE_MAR_FOOTER : m_aPageMargins.footer  = nValue; break;
-        case PAGE_MAR_GUTTER : m_aPageMargins.gutter  = nValue; break;
+        case PAGE_MAR_GUTTER : break;
     }
 }
 
@@ -5018,7 +5016,6 @@ PageMar::PageMar()
     // This is strange, the RTF spec says it's 1800, but it's clearly 1440 in Word
     // OOXML seems not to specify a default value
     right = left = ConversionHelper::convertTwipToMM100( sal_Int32(1440));
-    gutter = 0;
 }
 
 
@@ -5141,9 +5138,7 @@ void DomainMapper_Impl::SetCurrentRedlineId( sal_Int32 sId )
     {
         // This should be an assert, but somebody had the smart idea to reuse this function also for comments and whatnot,
         // and in some cases the id is actually not handled, which may be in fact a bug.
-        if( m_currentRedline.get())
-            m_currentRedline->m_nId = sId;
-        else
+        if( !m_currentRedline.get())
             SAL_INFO("writerfilter.dmapper", "no current redline");
     }
 }
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index 65274fcc7d46..c6d79bd7378d 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -83,7 +83,6 @@ struct PageMar
     sal_Int32 left;
     sal_Int32 header;
     sal_Int32 footer;
-    sal_Int32 gutter;
     public:
         PageMar();
 };
@@ -286,17 +285,13 @@ struct RubyInfo
 
 struct LineNumberSettings
 {
-    bool        bIsOn;
     sal_Int32   nDistance;
     sal_Int32   nInterval;
     bool        bRestartAtEachPage;
-    sal_Int32   nStartValue;
     LineNumberSettings() :
-        bIsOn(false)
-        ,nDistance(0)
+         nDistance(0)
         ,nInterval(0)
         ,bRestartAtEachPage(true)
-        ,nStartValue(1)
     {}
 
 };
@@ -372,7 +367,6 @@ private:
     bool                                                                            m_bStartedTOC;
     bool                                                                            m_bStartIndex;
     bool                                                                            m_bStartBibliography;
-    bool                                                                            m_bTOCPageRef;
     bool                                                                            m_bStartGenericField;
     bool                                                                            m_bTextInserted;
     LineNumberSettings                                                              m_aLineNumberSettings;
diff --git a/writerfilter/source/dmapper/FontTable.cxx b/writerfilter/source/dmapper/FontTable.cxx
index 452dd95211db..f2ddedcf22c9 100644
--- a/writerfilter/source/dmapper/FontTable.cxx
+++ b/writerfilter/source/dmapper/FontTable.cxx
@@ -62,11 +62,11 @@ void FontTable::lcl_attribute(Id Name, Value & val)
     {
         case NS_ooxml::LN_CT_Pitch_val:
             if (static_cast<Id>(nIntValue) == NS_ooxml::LN_Value_ST_Pitch_fixed)
-                m_pImpl->pCurrentEntry->nPitchRequest = awt::FontPitch::FIXED;
+                ;
             else if (static_cast<Id>(nIntValue) == NS_ooxml::LN_Value_ST_Pitch_variable)
-                m_pImpl->pCurrentEntry->nPitchRequest = awt::FontPitch::VARIABLE;
+                ;
             else if (static_cast<Id>(nIntValue) == NS_ooxml::LN_Value_ST_Pitch_default)
-                m_pImpl->pCurrentEntry->nPitchRequest = awt::FontPitch::DONTKNOW;
+                ;
             else
                 SAL_WARN("writerfilter.dmapper", "FontTable::lcl_attribute: unhandled NS_ooxml::CT_Pitch_val: " << nIntValue);
             break;
diff --git a/writerfilter/source/dmapper/FontTable.hxx b/writerfilter/source/dmapper/FontTable.hxx
index 0c1e689df8cc..553ac267ce50 100644
--- a/writerfilter/source/dmapper/FontTable.hxx
+++ b/writerfilter/source/dmapper/FontTable.hxx
@@ -35,10 +35,8 @@ struct FontEntry
     typedef std::shared_ptr<FontEntry> Pointer_t;
 
     OUString        sFontName;
-    sal_Int16       nPitchRequest;
     sal_Int32       nTextEncoding;
     FontEntry() :
-        nPitchRequest( 0 ),
         nTextEncoding( RTL_TEXTENCODING_DONTKNOW )
         {}
 };
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index 217c27a96894..c242d0b9d023 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -158,13 +158,11 @@ struct GraphicBorderLine
 {
     sal_Int32   nLineWidth;
     sal_Int32   nLineColor;
-    sal_Int32   nLineDistance;
     bool        bHasShadow;
 
     GraphicBorderLine() :
         nLineWidth(0)
         ,nLineColor(0)
-        ,nLineDistance(0)
         ,bHasShadow(false)
         {}
 
@@ -525,7 +523,6 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue)
             //graphic borders don't support different line types
         break;
         case NS_ooxml::LN_CT_Border_space:
-            m_pImpl->aBorders[m_pImpl->nCurrentBorderLine].nLineDistance = nIntValue;
         break;
         case NS_ooxml::LN_CT_Border_shadow:
             m_pImpl->aBorders[m_pImpl->nCurrentBorderLine].bHasShadow = nIntValue != 0;
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index 05b20a31817e..f223ba977ba7 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -101,10 +101,8 @@ void ListLevel::SetValue( Id nId, sal_Int32 nValue )
             m_nNFC = nValue;
         break;
         case NS_ooxml::LN_CT_Lvl_isLgl:
-            m_nFLegal = nValue;
         break;
         case NS_ooxml::LN_CT_Lvl_legacy:
-            m_nFPrevSpace = nValue;
         break;
         case NS_ooxml::LN_CT_Lvl_suff:
             m_nXChFollow = nValue;
@@ -388,8 +386,7 @@ void NumPicBullet::SetShape(uno::Reference<drawing::XShape> const& xShape)
 //--------------------------------------- AbstractListDef implementation
 
 AbstractListDef::AbstractListDef( ) :
-    m_nTmpl( -1 )
-    ,m_nId( -1 )
+    m_nId( -1 )
 {
 }
 
@@ -397,12 +394,11 @@ AbstractListDef::~AbstractListDef( )
 {
 }
 
-void AbstractListDef::SetValue( sal_uInt32 nSprmId, sal_Int32 nValue )
+void AbstractListDef::SetValue( sal_uInt32 nSprmId )
 {
     switch( nSprmId )
     {
         case NS_ooxml::LN_CT_AbstractNum_tmpl:
-            m_nTmpl = nValue;
         break;
         default:
             OSL_FAIL( "this line should never be reached");
@@ -739,7 +735,7 @@ void ListsManager::lcl_attribute( Id nName, Value& rVal )
             m_pCurrentDefinition->SetId( nIntValue );
         break;
         case NS_ooxml::LN_CT_AbstractNum_tmpl:
-            m_pCurrentDefinition->SetValue( nName, nIntValue );
+            AbstractListDef::SetValue( nName );
         break;
         case NS_ooxml::LN_CT_NumLvl_ilvl:
         {
@@ -927,7 +923,7 @@ void ListsManager::lcl_sprm( Sprm& rSprm )
             case NS_ooxml::LN_CT_AbstractNum_multiLevelType:
             break;
             case NS_ooxml::LN_CT_AbstractNum_tmpl:
-                m_pCurrentDefinition->SetValue( nSprmId, nIntValue );
+                AbstractListDef::SetValue( nSprmId );
             break;
             case NS_ooxml::LN_CT_AbstractNum_lvl:
             {
diff --git a/writerfilter/source/dmapper/NumberingManager.hxx b/writerfilter/source/dmapper/NumberingManager.hxx
index 723ca47fdab2..624e4fb1f082 100644
--- a/writerfilter/source/dmapper/NumberingManager.hxx
+++ b/writerfilter/source/dmapper/NumberingManager.hxx
@@ -44,8 +44,6 @@ class ListLevel : public PropertyMap
     sal_Int32                                     m_nIStartAt;       //LN_CT_Lvl_start
     sal_Int32                                     m_nNFC;            //LN_CT_Lvl_numFmt
     sal_Int32                                     m_nJC;             //LN_JC
-    sal_Int32                                     m_nFLegal;         //LN_FLEGAL
-    sal_Int32                                     m_nFPrevSpace;     //LN_FPREVSPACE
     sal_Int16                                     m_nXChFollow;      //LN_IXCHFOLLOW
     OUString                               m_sBulletChar;
     OUString                               m_sGraphicURL;
@@ -63,8 +61,6 @@ public:
         m_nIStartAt(-1)
         ,m_nNFC(-1)
         ,m_nJC(-1)
-        ,m_nFLegal(-1)
-        ,m_nFPrevSpace(-1)
         ,m_nXChFollow(SvxNumberFormat::LISTTAB)
         ,m_nTabstop( 0 )
         ,m_outline(false)
@@ -121,8 +117,6 @@ private:
 class AbstractListDef
 {
 private:
-    sal_Int32                            m_nTmpl;
-
     // The ID member reflects either the abstractNumId or the numId
     // depending on the use of the class
     sal_Int32                            m_nId;
@@ -145,7 +139,7 @@ public:
 
     // Setters using during the import
     void SetId( sal_Int32 nId ) { m_nId = nId; };
-    void SetValue( sal_uInt32 nSprmId, sal_Int32 nValue );
+    static void SetValue( sal_uInt32 nSprmId );
 
     // Accessors
     sal_Int32             GetId( ) { return m_nId; };
diff --git a/writerfilter/source/dmapper/OLEHandler.cxx b/writerfilter/source/dmapper/OLEHandler.cxx
index 8cfc4883bfc7..6097e02c6137 100644
--- a/writerfilter/source/dmapper/OLEHandler.cxx
+++ b/writerfilter/source/dmapper/OLEHandler.cxx
@@ -55,8 +55,6 @@ using namespace ::com::sun::star;
 
 OLEHandler::OLEHandler(DomainMapper& rDomainMapper) :
 LoggedProperties("OLEHandler"),
-m_nDxaOrig(0),
-m_nDyaOrig(0),
     m_nWrapMode(text::WrapTextMode_THROUGHT),
     m_rDomainMapper(rDomainMapper)
 {
@@ -96,10 +94,8 @@ void OLEHandler::lcl_attribute(Id rName, Value & rVal)
             rVal.getAny() >>= m_xInputStream;
         break;
         case NS_ooxml::LN_CT_Object_dxaOrig:
-            m_nDxaOrig = rVal.getInt();
         break;
         case NS_ooxml::LN_CT_Object_dyaOrig:
-            m_nDyaOrig = rVal.getInt();
         break;
         case NS_ooxml::LN_shape:
         {
diff --git a/writerfilter/source/dmapper/OLEHandler.hxx b/writerfilter/source/dmapper/OLEHandler.hxx
index c51217a924b0..84818dfb17df 100644
--- a/writerfilter/source/dmapper/OLEHandler.hxx
+++ b/writerfilter/source/dmapper/OLEHandler.hxx
@@ -58,8 +58,6 @@ class OLEHandler : public LoggedProperties
     /// The stream URL right after the import of the raw data.
     OUString     m_aURL;
 
-    sal_Int32                   m_nDxaOrig;
-    sal_Int32                   m_nDyaOrig;
     css::text::WrapTextMode     m_nWrapMode;
 
     css::uno::Reference<css::drawing::XShape> m_xShape;
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index 3df7c864cd55..d2191f796427 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -371,7 +371,6 @@ SectionPropertyMap::SectionPropertyMap( bool bIsFirstSection )
     , m_xColumnContainer( nullptr )
     , m_bSeparatorLineIsOn( false )
     , m_bEvenlySpaced( false )
-    , m_bIsLandscape( false )
     , m_bPageNoRestart( false )
     , m_nPageNumber( -1 )
     , m_nPageNumberType( -1 )
@@ -1521,13 +1520,7 @@ sal_Int32 SectionPropertyMap::GetPageWidth()
 }
 
 StyleSheetPropertyMap::StyleSheetPropertyMap()
-    : mnCT_TrPrBase_jc( 0 )
-    , mnCT_TblWidth_w( 0 )
-    , mnCT_TblWidth_type( 0 )
-    , mbCT_TrPrBase_jcSet( false )
-    , mbCT_TblWidth_wSet( false )
-    , mbCT_TblWidth_typeSet( false )
-    , mnListId( -1 )
+    : mnListId( -1 )
     , mnListLevel( -1 )
     , mnOutlineLevel( -1 )
     , mnNumId( -1 )
diff --git a/writerfilter/source/dmapper/PropertyMap.hxx b/writerfilter/source/dmapper/PropertyMap.hxx
index 16358d1a5650..1cc7050713dd 100644
--- a/writerfilter/source/dmapper/PropertyMap.hxx
+++ b/writerfilter/source/dmapper/PropertyMap.hxx
@@ -81,7 +81,6 @@ struct RedlineParams
 {
     OUString  m_sAuthor;
     OUString  m_sDate;
-    sal_Int32 m_nId;
     sal_Int32 m_nToken;
 
     // This can hold properties of runs that had formatted 'track changes' properties
@@ -211,7 +210,6 @@ private:
 
     bool                                            m_bSeparatorLineIsOn;
     bool                                            m_bEvenlySpaced;
-    bool                                            m_bIsLandscape;
 
     bool                                            m_bPageNoRestart;
     sal_Int32                                       m_nPageNumber;
@@ -326,7 +324,6 @@ public:
     void SetTitlePage( bool bSet )           { m_bTitlePage = bSet; }
     void SetSeparatorLine( bool bSet )       { m_bSeparatorLineIsOn = bSet; }
     void SetEvenlySpaced( bool bSet )        { m_bEvenlySpaced = bSet; }
-    void SetLandscape( bool bSet )           { m_bIsLandscape = bSet; }
     void SetPageNumber( sal_Int32 nSet )     { m_nPageNumber = nSet; }
     void SetPageNumberType( sal_Int32 nSet ) { m_nPageNumberType = nSet; }
     void SetBreakType( sal_Int32 nSet )      { m_nBreakType = nSet; }
@@ -475,12 +472,6 @@ class StyleSheetPropertyMap
     , public ParagraphProperties
 {
 private:
-    sal_Int32 mnCT_TrPrBase_jc;
-    sal_Int32 mnCT_TblWidth_w;
-    sal_Int32 mnCT_TblWidth_type;
-    bool      mbCT_TrPrBase_jcSet;
-    bool      mbCT_TblWidth_wSet;
-    bool      mbCT_TblWidth_typeSet;
     sal_Int32 mnListId;
     sal_Int16 mnListLevel;
     sal_Int16 mnOutlineLevel;
@@ -489,24 +480,6 @@ private:
 public:
     explicit StyleSheetPropertyMap();
 
-    void SetCT_TrPrBase_jc( sal_Int32 nSet )
-    {
-        mnCT_TrPrBase_jc = nSet;
-        mbCT_TrPrBase_jcSet = true;
-    }
-
-    void SetCT_TblWidth_w( sal_Int32 nSet )
-    {
-        mnCT_TblWidth_w = nSet;
-        mbCT_TblWidth_wSet = true;
-    }
-
-    void SetCT_TblWidth_type( sal_Int32 nSet )
-    {
-        mnCT_TblWidth_type = nSet;
-        mbCT_TblWidth_typeSet = true;
-    }
-
     sal_Int32 GetListId() const          { return mnListId; }
     void      SetListId( sal_Int32 nId ) { mnListId = nId; }
 
diff --git a/writerfilter/source/dmapper/SettingsTable.cxx b/writerfilter/source/dmapper/SettingsTable.cxx
index 84db1d61819e..9c2f2f46783f 100644
--- a/writerfilter/source/dmapper/SettingsTable.cxx
+++ b/writerfilter/source/dmapper/SettingsTable.cxx
@@ -47,10 +47,7 @@ struct SettingsTable_Impl
     OUString     m_sListSeparatorForFields; //2.15.1.56 listSeparator (List Separator for Field Code Evaluation)
 
     int                 m_nDefaultTabStop;
-    int                 m_nHyphenationZone;
 
-    bool                m_bNoPunctuationKerning;
-    bool                m_doNotIncludeSubdocsInStats; // Do Not Include Content in Text Boxes, Footnotes, and Endnotes in Document Statistics)
     bool                m_bRecordChanges;
     bool                m_bLinkStyles;
     sal_Int16           m_nZoomFactor;
@@ -75,9 +72,6 @@ struct SettingsTable_Impl
 
     SettingsTable_Impl() :
       m_nDefaultTabStop( 720 ) //default is 1/2 in
-    , m_nHyphenationZone(0)
-    , m_bNoPunctuationKerning(false)
-    , m_doNotIncludeSubdocsInStats(false)
     , m_bRecordChanges(false)
     , m_bLinkStyles(false)
     , m_nZoomFactor(0)
@@ -206,13 +200,11 @@ void SettingsTable::lcl_sprm(Sprm& rSprm)
     m_pImpl->m_bEvenAndOddHeaders = nIntValue;
     break;
     case NS_ooxml::LN_CT_Settings_noPunctuationKerning: //  92526;
-    m_pImpl->m_bNoPunctuationKerning = nIntValue != 0;
     break;
     case NS_ooxml::LN_CT_Settings_characterSpacingControl: //  92527;
     m_pImpl->m_sCharacterSpacing = sStringValue; // doNotCompress, compressPunctuation, compressPunctuationAndJapaneseKana
     break;
     case NS_ooxml::LN_CT_Settings_doNotIncludeSubdocsInStats: //  92554; // Do Not Include Content in Text Boxes, Footnotes, and Endnotes in Document Statistics)
-    m_pImpl->m_doNotIncludeSubdocsInStats = nIntValue != 0;
     break;
     case NS_ooxml::LN_CT_Settings_decimalSymbol: //  92562;
     m_pImpl->m_sDecimalSymbol = sStringValue;
@@ -223,7 +215,6 @@ void SettingsTable::lcl_sprm(Sprm& rSprm)
     case NS_ooxml::LN_CT_Settings_rsids: //  92549; revision save Ids - probably not necessary
     break;
     case NS_ooxml::LN_CT_Settings_hyphenationZone: // 92508;
-    m_pImpl->m_nHyphenationZone = nIntValue;
     break;
     case NS_ooxml::LN_CT_Compat_useFELayout: // 92422;
     // useFELayout (Do Not Bypass East Asian/Complex Script Layout Code - support of old versions of Word - ignored)
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index 4a62b42589c3..dd90f543427b 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -82,9 +82,8 @@ StyleSheetEntry::~StyleSheetEntry()
 {
 }
 
-TableStyleSheetEntry::TableStyleSheetEntry( StyleSheetEntry& rEntry, StyleSheetTable* pStyles ):
-    StyleSheetEntry( ),
-    m_pStyleSheet( pStyles )
+TableStyleSheetEntry::TableStyleSheetEntry( StyleSheetEntry& rEntry ):
+    StyleSheetEntry( )
 {
 
     bIsDefaultStyle = rEntry.bIsDefaultStyle;
@@ -97,14 +96,10 @@ TableStyleSheetEntry::TableStyleSheetEntry( StyleSheetEntry& rEntry, StyleSheetT
     sStyleName1 = rEntry.sStyleName1;
     sStyleIdentifierI = rEntry.sStyleIdentifierI;
     sStyleIdentifierD = rEntry.sStyleIdentifierD;
-
-    m_nColBandSize = 1;
-    m_nRowBandSize = 1;
 }
 
 TableStyleSheetEntry::~TableStyleSheetEntry( )
 {
-    m_pStyleSheet = nullptr;
 }
 
 void TableStyleSheetEntry::AddTblStylePr( TblStyleType nType, const PropertyMapPtr& pProps )
@@ -464,7 +459,7 @@ void StyleSheetTable::lcl_attribute(Id Name, Value & val)
             if ( nType == STYLE_TYPE_TABLE )
             {
                 StyleSheetEntryPtr pEntry = m_pImpl->m_pCurrentEntry;
-                std::shared_ptr<TableStyleSheetEntry> pTableEntry( new TableStyleSheetEntry( *pEntry.get( ), this ) );
+                std::shared_ptr<TableStyleSheetEntry> pTableEntry( new TableStyleSheetEntry( *pEntry.get( ) ) );
                 m_pImpl->m_pCurrentEntry = pTableEntry;
             }
             else
@@ -506,12 +501,8 @@ void StyleSheetTable::lcl_attribute(Id Name, Value & val)
             }
         break;
         case NS_ooxml::LN_CT_TblWidth_w:
-            if (StyleSheetPropertyMap* pMap = dynamic_cast< StyleSheetPropertyMap* >( m_pImpl->m_pCurrentEntry->pProperties.get() ))
-                pMap->SetCT_TblWidth_w( nIntValue );
         break;
         case NS_ooxml::LN_CT_TblWidth_type:
-            if (StyleSheetPropertyMap* pMap = dynamic_cast< StyleSheetPropertyMap* >( m_pImpl->m_pCurrentEntry->pProperties.get() ))
-                pMap->SetCT_TblWidth_type( nIntValue );
         break;
         case NS_ooxml::LN_CT_LatentStyles_defQFormat:
             m_pImpl->AppendLatentStyleProperty("defQFormat", val);
@@ -718,8 +709,6 @@ void StyleSheetTable::lcl_sprm(Sprm & rSprm)
                 uno::makeAny( ConversionHelper::convertTableJustification( nIntValue )));
         break;
         case NS_ooxml::LN_CT_TrPrBase_jc:     //table alignment - row properties!
-            if (StyleSheetPropertyMap* pMap = dynamic_cast< StyleSheetPropertyMap* >( m_pImpl->m_pCurrentEntry->pProperties.get() ))
-                pMap->SetCT_TrPrBase_jc(nIntValue);
         break;
         case NS_ooxml::LN_CT_TblPrBase_tblBorders: //table borders, might be defined in table style
         {
@@ -735,17 +724,6 @@ void StyleSheetTable::lcl_sprm(Sprm & rSprm)
         break;
         case NS_ooxml::LN_CT_TblPrBase_tblStyleRowBandSize:
         case NS_ooxml::LN_CT_TblPrBase_tblStyleColBandSize:
-        {
-            StyleSheetEntry* pEntry = m_pImpl->m_pCurrentEntry.get( );
-            TableStyleSheetEntry *pTEntry = static_cast<TableStyleSheetEntry*>( pEntry );
-            if ( pTEntry )
-            {
-                if ( nSprmId == NS_ooxml::LN_CT_TblPrBase_tblStyleRowBandSize )
-                    pTEntry->m_nRowBandSize = nIntValue;
-                else
-                    pTEntry->m_nColBandSize = nIntValue;
-            }
-        }
         break;
         case NS_ooxml::LN_CT_TblPrBase_tblCellMar:
             //no cell margins in styles
diff --git a/writerfilter/source/dmapper/StyleSheetTable.hxx b/writerfilter/source/dmapper/StyleSheetTable.hxx
index 5bacc96b050c..63c4c787fbc8 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.hxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.hxx
@@ -124,14 +124,9 @@ class TableStyleSheetEntry :
 private:
     typedef std::map<TblStyleType, PropertyMapPtr> TblStylePrs;
 
-    StyleSheetTable* m_pStyleSheet;
     TblStylePrs m_aStyles;
 
 public:
-
-    short m_nColBandSize;
-    short m_nRowBandSize;
-
     // Adds a new tblStylePr to the table style entry. This method
     // fixes some possible properties conflicts, like borders ones.
     void AddTblStylePr( TblStyleType nType, const PropertyMapPtr& pProps );
@@ -143,7 +138,7 @@ public:
     // @param mask      mask describing which properties to return
     PropertyMapPtr GetProperties( sal_Int32 nMask);
 
-    TableStyleSheetEntry( StyleSheetEntry& aEntry, StyleSheetTable* pStyles );
+    TableStyleSheetEntry( StyleSheetEntry& aEntry );
     virtual ~TableStyleSheetEntry( ) override;
 
 protected:
diff --git a/writerfilter/source/dmapper/TrackChangesHandler.cxx b/writerfilter/source/dmapper/TrackChangesHandler.cxx
index b6d592740189..6ace7e62c7eb 100644
--- a/writerfilter/source/dmapper/TrackChangesHandler.cxx
+++ b/writerfilter/source/dmapper/TrackChangesHandler.cxx
@@ -35,7 +35,6 @@ TrackChangesHandler::~TrackChangesHandler()
 
 void TrackChangesHandler::lcl_attribute(Id rName, Value & rVal)
 {
-    sal_Int32 nIntValue = rVal.getInt();
     OUString sStringValue = rVal.getString();
     (void)rName;
     switch( rName )
@@ -51,9 +50,6 @@ void TrackChangesHandler::lcl_attribute(Id rName, Value & rVal)
         }
         break;
         case NS_ooxml::LN_CT_Markup_id:
-        {
-            m_pRedlineParams->m_nId = nIntValue;
-        }
         break;
         default:
             OSL_FAIL( "unknown attribute");
diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
index 3213d690dce8..74f3ef3e7dc7 100644
--- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
@@ -55,7 +55,6 @@ OOXMLDocumentImpl::OOXMLDocumentImpl(OOXMLStream::Pointer_t const & pStream, con
     : mpStream(pStream)
     , mxStatusIndicator(xStatusIndicator)
     , mnXNoteId(0)
-    , mXNoteType(0)
     , mxThemeDom(nullptr)
     , mbIsSubstream(false)
     , mbSkipImages(bSkipImages)
@@ -251,9 +250,8 @@ sal_Int32 OOXMLDocumentImpl::getXNoteId() const
     return mnXNoteId;
 }
 
-void OOXMLDocumentImpl::setXNoteType(Id nId)
+void OOXMLDocumentImpl::setXNoteType(Id /*nId*/)
 {
-    mXNoteType = nId;
 }
 
 const OUString & OOXMLDocumentImpl::getTarget() const
diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx
index e8bca30237ce..ff4b8263add6 100644
--- a/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx
+++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx
@@ -37,7 +37,6 @@ class OOXMLDocumentImpl : public OOXMLDocument
     OOXMLStream::Pointer_t mpStream;
     css::uno::Reference<css::task::XStatusIndicator> mxStatusIndicator;
     sal_Int32 mnXNoteId;
-    Id mXNoteType;
 
     css::uno::Reference<css::frame::XModel> mxModel;
     css::uno::Reference<css::drawing::XDrawPage> mxDrawPage;


More information about the Libreoffice-commits mailing list