[Libreoffice-commits] core.git: 2 commits - include/editeng include/vcl registry/source reportdesign/source rsc/inc rsc/source sal/osl sal/rtl sax/inc sax/source sfx2/source uui/source

Noel Grandin noel.grandin at collabora.co.uk
Fri Jun 23 06:58:53 UTC 2017


 include/editeng/editdata.hxx                       |    2 +-
 include/vcl/errcode.hxx                            |   11 ++---------
 registry/source/reflread.cxx                       |    4 +---
 reportdesign/source/ui/inc/ReportController.hxx    |    1 -
 reportdesign/source/ui/report/ReportController.cxx |    2 --
 rsc/inc/rscpar.hxx                                 |    2 --
 rsc/inc/rsctools.hxx                               |    1 -
 rsc/source/parser/rscpar.cxx                       |    4 ----
 rsc/source/tools/rsctools.cxx                      |    1 -
 sal/osl/unx/process.cxx                            |    2 --
 sal/rtl/alloc_cache.cxx                            |    8 +-------
 sal/rtl/alloc_cache.hxx                            |    1 -
 sax/inc/xml2utf.hxx                                |    2 --
 sax/source/expatwrap/xml2utf.cxx                   |    3 ---
 sfx2/source/appl/appinit.cxx                       |    2 +-
 uui/source/iahndl-errorhandler.cxx                 |    2 +-
 16 files changed, 7 insertions(+), 41 deletions(-)

New commits:
commit 0f347c04bf1305c634b761f92ff487e831bc564c
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Thu Jun 22 10:17:49 2017 +0200

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

diff --git a/registry/source/reflread.cxx b/registry/source/reflread.cxx
index de22f988984e..343943516490 100644
--- a/registry/source/reflread.cxx
+++ b/registry/source/reflread.cxx
@@ -861,7 +861,6 @@ class MethodList : public BlopObject
 public:
 
     sal_uInt16      m_numOfEntries;
-    sal_uInt16      m_numOfMethodEntries;
     sal_uInt16      m_numOfParamEntries;
     size_t          m_PARAM_ENTRY_SIZE;
     std::unique_ptr<sal_uInt32[]>  m_pIndex;
@@ -874,12 +873,11 @@ public:
     {
         if ( m_numOfEntries > 0 )
         {
-            m_numOfMethodEntries = readUINT16(0);
+            readUINT16(0) /* numOfMethodEntries */;
             m_numOfParamEntries = readUINT16(sizeof(sal_uInt16));
             m_PARAM_ENTRY_SIZE = m_numOfParamEntries * sizeof(sal_uInt16);
         } else
         {
-            m_numOfMethodEntries = 0;
             m_numOfParamEntries = 0;
             m_PARAM_ENTRY_SIZE = 0;
         }
diff --git a/reportdesign/source/ui/inc/ReportController.hxx b/reportdesign/source/ui/inc/ReportController.hxx
index ca5bd47005b5..499372f6a5df 100644
--- a/reportdesign/source/ui/inc/ReportController.hxx
+++ b/reportdesign/source/ui/inc/ReportController.hxx
@@ -122,7 +122,6 @@ namespace rptui
         bool                    m_bGridVisible;
         bool                    m_bGridUse;
         bool                    m_bShowProperties;
-        bool                    m_bGroupFloaterWasVisible;
         bool                    m_bHelplinesMove;
         bool                    m_bChartEnabled;
         bool                    m_bChartEnabledAsked;
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index 355b6de39105..f813e8f55c08 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -288,7 +288,6 @@ OReportController::OReportController(Reference< XComponentContext > const & xCon
     ,m_bGridVisible(true)
     ,m_bGridUse(true)
     ,m_bShowProperties(true)
-    ,m_bGroupFloaterWasVisible(false)
     ,m_bHelplinesMove(true)
     ,m_bChartEnabled(false)
     ,m_bChartEnabledAsked(false)
@@ -1414,7 +1413,6 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >
             break;
         case SID_SORTINGANDGROUPING:
             openSortingAndGroupingDialog();
-            m_bGroupFloaterWasVisible = m_pGroupsFloater && m_pGroupsFloater->IsVisible();
             break;
         case SID_BACKGROUND_COLOR:
             {
diff --git a/rsc/inc/rscpar.hxx b/rsc/inc/rscpar.hxx
index e0c3e861e525..aea9a8740c35 100644
--- a/rsc/inc/rscpar.hxx
+++ b/rsc/inc/rscpar.hxx
@@ -31,8 +31,6 @@ class RscTypCont;
 class RscFileInst
 {
     ERRTYPE             aFirstError;
-    sal_uInt32          nErrorLine;
-    sal_uInt32          nErrorPos;
     sal_uInt32          nLineNo;    // line in input file
     RscFileTab::Index   lFileIndex; // index input file
     RscFileTab::Index   lSrcIndex;  // index base file
diff --git a/rsc/inc/rsctools.hxx b/rsc/inc/rsctools.hxx
index 2af05864b401..c54b4a1dd4e7 100644
--- a/rsc/inc/rsctools.hxx
+++ b/rsc/inc/rsctools.hxx
@@ -79,7 +79,6 @@ class RscWriteRc
 {
     sal_uInt32          nLen;
     bool                bSwap;
-    RSCBYTEORDER_TYPE   nByteOrder;
     char *              pMem;
     char *              GetPointer( sal_uInt32 nSize );
 public:
diff --git a/rsc/source/parser/rscpar.cxx b/rsc/source/parser/rscpar.cxx
index 352e3422df95..de4780aee143 100644
--- a/rsc/source/parser/rscpar.cxx
+++ b/rsc/source/parser/rscpar.cxx
@@ -34,8 +34,6 @@ void RscFileInst::Init()
 
 RscFileInst::RscFileInst( RscTypCont * pTC, RscFileTab::Index lIndexSrc,
                           RscFileTab::Index lFIndex, FILE * fFile )
-    : nErrorLine(0)
-    , nErrorPos(0)
 {
     pTypCont = pTC;
     Init();
@@ -156,8 +154,6 @@ void RscFileInst::SetError( ERRTYPE aError )
     if( aError.IsOk() )
     {
         aFirstError = aError;
-        nErrorLine  = GetLineNo();
-        nErrorPos   = GetScanPos() -1;
     }
 };
 
diff --git a/rsc/source/tools/rsctools.cxx b/rsc/source/tools/rsctools.cxx
index ca011e468177..1482f28142b4 100644
--- a/rsc/source/tools/rsctools.cxx
+++ b/rsc/source/tools/rsctools.cxx
@@ -191,7 +191,6 @@ RscWriteRc::RscWriteRc( RSCBYTEORDER_TYPE nOrder )
 #endif
         bSwap = nOrder != nMachineOrder;
     }
-    nByteOrder = nOrder;
     nLen = 0;
     pMem = nullptr;
 }
diff --git a/sal/osl/unx/process.cxx b/sal/osl/unx/process.cxx
index 405322955d3d..87fedeb20e08 100644
--- a/sal/osl/unx/process.cxx
+++ b/sal/osl/unx/process.cxx
@@ -79,7 +79,6 @@ struct oslProcessImpl {
 struct ProcessData
 {
     const sal_Char*  m_pszArgs[MAX_ARGS + 1];
-    oslProcessOption m_options;
     const sal_Char*  m_pszDir;
     sal_Char*        m_pszEnv[MAX_ENVS + 1];
     uid_t            m_uid;
@@ -604,7 +603,6 @@ oslProcessError SAL_CALL osl_psz_executeProcess(sal_Char *pszImageName,
         Data.m_pszArgs[i+2] = nullptr;
     }
 
-    Data.m_options = Options;
     Data.m_pszDir  = (pszDirectory != nullptr) ? strdup(pszDirectory) : nullptr;
 
     if (pszEnvironments != nullptr)
diff --git a/sal/rtl/alloc_cache.cxx b/sal/rtl/alloc_cache.cxx
index f68d13909686..f310559c81e8 100644
--- a/sal/rtl/alloc_cache.cxx
+++ b/sal/rtl/alloc_cache.cxx
@@ -786,7 +786,6 @@ rtl_cache_activate (
     size_t           objalign,
     int  (SAL_CALL * constructor)(void * obj, void * userarg),
     void (SAL_CALL * destructor) (void * obj, void * userarg),
-    void (SAL_CALL * reclaim)    (void * userarg),
     void *           userarg,
     rtl_arena_type * source,
     int              flags
@@ -829,7 +828,6 @@ rtl_cache_activate (
 
         cache->m_constructor = constructor;
         cache->m_destructor  = destructor;
-        cache->m_reclaim     = reclaim;
         cache->m_userarg     = userarg;
 
         /* slab layer */
@@ -1056,7 +1054,7 @@ SAL_CALL rtl_cache_create (
     sal_Size         objalign,
     int  (SAL_CALL * constructor)(void * obj, void * userarg),
     void (SAL_CALL * destructor) (void * obj, void * userarg),
-    void (SAL_CALL * reclaim)    (void * userarg),
+    void (SAL_CALL * /*reclaim*/)    (void * userarg),
     void *           userarg,
     rtl_arena_type * source,
     int              flags
@@ -1086,7 +1084,6 @@ try_alloc:
             objalign,
             constructor,
             destructor,
-            reclaim,
             userarg,
             source,
             flags
@@ -1552,7 +1549,6 @@ rtl_cache_init()
             0,                               /* objalign */
             rtl_cache_magazine_constructor,
             rtl_cache_magazine_destructor,
-            nullptr, /* reclaim */
             nullptr, /* userarg: NYI */
             gp_default_arena, /* source */
             RTL_CACHE_FLAG_NOMAGAZINE /* during bootstrap; activated below */
@@ -1576,7 +1572,6 @@ rtl_cache_init()
             0,                           /* objalign */
             rtl_cache_slab_constructor,
             rtl_cache_slab_destructor,
-            nullptr,                           /* reclaim */
             nullptr,                           /* userarg: none */
             gp_default_arena,            /* source */
             0                            /* flags: none */
@@ -1597,7 +1592,6 @@ rtl_cache_init()
             0,                             /* objalign  */
             nullptr,                /* constructor */
             nullptr,                /* destructor */
-            nullptr,                /* reclaim */
             nullptr,                /* userarg */
             gp_default_arena, /* source */
             0                 /* flags: none */
diff --git a/sal/rtl/alloc_cache.hxx b/sal/rtl/alloc_cache.hxx
index 1afcd4288922..cd35285740e0 100644
--- a/sal/rtl/alloc_cache.hxx
+++ b/sal/rtl/alloc_cache.hxx
@@ -116,7 +116,6 @@ struct rtl_cache_st
 
     int  (SAL_CALL * m_constructor)(void * obj, void * userarg); /* const */
     void (SAL_CALL * m_destructor) (void * obj, void * userarg); /* const */
-    void (SAL_CALL * m_reclaim)    (void * userarg);             /* const */
     void *                    m_userarg;
 
     /* slab layer */
diff --git a/sax/inc/xml2utf.hxx b/sax/inc/xml2utf.hxx
index a07a9588a7e9..18b238844220 100644
--- a/sax/inc/xml2utf.hxx
+++ b/sax/inc/xml2utf.hxx
@@ -41,7 +41,6 @@ private:
     rtl_TextToUnicodeContext     m_contextText2Unicode;
     bool                         m_bCanContinue;
     bool                         m_bInitialized;
-    rtl_TextEncoding             m_rtlEncoding;
     css::uno::Sequence<sal_Int8> m_seqSource;
 };
 
@@ -61,7 +60,6 @@ public:
 private:
     rtl_UnicodeToTextConverter      m_convUnicode2Text;
     rtl_UnicodeToTextContext        m_contextUnicode2Text;
-    rtl_TextEncoding                m_rtlEncoding;
     css::uno::Sequence<sal_Unicode> m_seqSource;
 };
 
diff --git a/sax/source/expatwrap/xml2utf.cxx b/sax/source/expatwrap/xml2utf.cxx
index 6ccecc684983..f11062c3bc32 100644
--- a/sax/source/expatwrap/xml2utf.cxx
+++ b/sax/source/expatwrap/xml2utf.cxx
@@ -346,7 +346,6 @@ void XMLFile2UTFConverter::initializeDecoding()
 Text2UnicodeConverter::Text2UnicodeConverter( const OString &sEncoding )
     : m_convText2Unicode(nullptr)
     , m_contextText2Unicode(nullptr)
-    , m_rtlEncoding(RTL_TEXTENCODING_DONTKNOW)
 {
     rtl_TextEncoding encoding = rtl_getTextEncodingFromMimeCharset( sEncoding.getStr() );
     if( RTL_TEXTENCODING_DONTKNOW == encoding )
@@ -376,7 +375,6 @@ void Text2UnicodeConverter::init( rtl_TextEncoding encoding )
 
     m_convText2Unicode  = rtl_createTextToUnicodeConverter(encoding);
     m_contextText2Unicode = rtl_createTextToUnicodeContext( m_convText2Unicode );
-    m_rtlEncoding = encoding;
 }
 
 
@@ -448,7 +446,6 @@ Unicode2TextConverter::Unicode2TextConverter( rtl_TextEncoding encoding )
 {
     m_convUnicode2Text  = rtl_createUnicodeToTextConverter( encoding );
     m_contextUnicode2Text = rtl_createUnicodeToTextContext( m_convUnicode2Text );
-    m_rtlEncoding = encoding;
 }
 
 
commit f871d0e7c99d88b55c38a9878f3ef0bfec4eb089
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Thu Jun 22 09:35:58 2017 +0200

    inline some ERRCODE_AREA aliases
    
    and drop unused ERRCODE_AREA_OFA_END constant
    
    Change-Id: Ic34ecda7f842c5db93807b3f21aa1062966ca523
    Reviewed-on: https://gerrit.libreoffice.org/39089
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/editeng/editdata.hxx b/include/editeng/editdata.hxx
index be5cc4377077..7d8e931268c2 100644
--- a/include/editeng/editdata.hxx
+++ b/include/editeng/editdata.hxx
@@ -55,7 +55,7 @@ enum class EEAnchorMode {
 EDITENG_DLLPUBLIC extern const size_t EE_APPEND;
 
 // Error messages for Read / Write Method
-#define EE_READWRITE_WRONGFORMAT     ErrCode(SVSTREAM_ERRBASE_USER+1)
+#define EE_READWRITE_WRONGFORMAT     ErrCode(ERRCODE_AREA_SVX+1)
 
 #define EDITUNDO_REMOVECHARS        100
 #define EDITUNDO_CONNECTPARAS       101
diff --git a/include/vcl/errcode.hxx b/include/vcl/errcode.hxx
index 7e74594bdb75..da83195b9c73 100644
--- a/include/vcl/errcode.hxx
+++ b/include/vcl/errcode.hxx
@@ -144,15 +144,13 @@ inline std::ostream& operator<<(std::ostream& os, const ErrCode& err)
 #define ErrCode(X) (X)
 #endif
 
-#define ERRCODE_AREA_TOOLS               (0   << ERRCODE_AREA_SHIFT)
+#define ERRCODE_AREA_IO                  (0   << ERRCODE_AREA_SHIFT)
 #define ERRCODE_AREA_SV                  (1   << ERRCODE_AREA_SHIFT)
 #define ERRCODE_AREA_SFX                 (2   << ERRCODE_AREA_SHIFT)
 #define ERRCODE_AREA_INET                (3   << ERRCODE_AREA_SHIFT)
-#define ERRCODE_AREA_IO                  ERRCODE_AREA_TOOLS
 #define ERRCODE_AREA_VCL                 (4   << ERRCODE_AREA_SHIFT)
 
-#define ERRCODE_AREA_LIB1                (8   << ERRCODE_AREA_SHIFT)
-#define ERRCODE_AREA_SVX                 ERRCODE_AREA_LIB1
+#define ERRCODE_AREA_SVX                 (8   << ERRCODE_AREA_SHIFT)
 #define ERRCODE_AREA_SVX_END             (ERRCODE_AREA_SO-1)
 #define ERRCODE_AREA_SO                  (9   << ERRCODE_AREA_SHIFT)
 #define ERRCODE_AREA_SO_END              (ERRCODE_AREA_SBX-1)
@@ -185,8 +183,6 @@ inline std::ostream& operator<<(std::ostream& os, const ErrCode& err)
 #define ERRCODE_AREA_SW                  ERRCODE_AREA_APP4
 #define ERRCODE_AREA_SW_END              (ERRCODE_AREA_APP5-1)
 
-#define ERRCODE_AREA_OFA_END             (ERRCODE_AREA_APP6-1)
-
 #define ERRCODE_CLASS_NONE               ( 0  << ERRCODE_CLASS_SHIFT)
 #define ERRCODE_CLASS_ABORT              ( 1  << ERRCODE_CLASS_SHIFT)
 #define ERRCODE_CLASS_GENERAL            ( 2  << ERRCODE_CLASS_SHIFT)
@@ -279,9 +275,6 @@ inline std::ostream& operator<<(std::ostream& os, const ErrCode& err)
 
 #define SVSTREAM_DISK_FULL               ERRCODE_IO_OUTOFSPACE
 
-// For the EditEngine:
-#define SVSTREAM_ERRBASE_USER            ERRCODE_AREA_LIB1
-
 #define PRINTER_ABORT                    ERRCODE_IO_ABORT
 #define PRINTER_GENERALERROR             ERRCODE_IO_GENERAL
 
diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx
index e098600f70a6..931c0b3cbc70 100644
--- a/sfx2/source/appl/appinit.cxx
+++ b/sfx2/source/appl/appinit.cxx
@@ -211,7 +211,7 @@ void SfxApplication::Initialize_Impl()
     Help::EnableExtHelp();
 
     pImpl->m_pToolsErrorHdl = new SfxErrorHandler(
-        RID_ERRHDL, ErrCode(ERRCODE_AREA_TOOLS), ErrCode(ERRCODE_AREA_LIB1));
+        RID_ERRHDL, ErrCode(ERRCODE_AREA_IO), ErrCode(ERRCODE_AREA_SVX));
 
 #if HAVE_FEATURE_SCRIPTING
     pImpl->pBasicResMgr = ResMgr::CreateResMgr("sb");
diff --git a/uui/source/iahndl-errorhandler.cxx b/uui/source/iahndl-errorhandler.cxx
index 72236f972f25..b1a3acb331a3 100644
--- a/uui/source/iahndl-errorhandler.cxx
+++ b/uui/source/iahndl-errorhandler.cxx
@@ -157,7 +157,7 @@ UUIInteractionHelper::handleErrorHandlerRequest(
                 RID_SVXERRCODE,
                 RID_UUI_ERRHDL };
         ErrCode nErrorId = nErrorCode.IgnoreWarning();
-        Source eSource = nErrorId < ErrCode(ERRCODE_AREA_LIB1) ?
+        Source eSource = nErrorId < ErrCode(ERRCODE_AREA_SVX) ?
             SOURCE_DEFAULT :
             nErrorId >= ErrCode(ERRCODE_AREA_SVX)
             && nErrorId <= ErrCode(ERRCODE_AREA_SVX_END) ?


More information about the Libreoffice-commits mailing list