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

Noel Grandin noel at peralex.com
Fri Nov 20 03:05:12 PST 2015


 cui/source/customize/cfgutil.cxx   |    2 --
 cui/source/dialogs/SpellAttrib.hxx |    3 ---
 cui/source/dialogs/SpellDialog.cxx |    5 ++---
 cui/source/inc/cfg.hxx             |    2 --
 cui/source/inc/scriptdlg.hxx       |    1 -
 cui/source/inc/treeopt.hxx         |   18 ++++--------------
 cui/source/options/treeopt.cxx     |    6 +++---
 7 files changed, 9 insertions(+), 28 deletions(-)

New commits:
commit 216879f1edced1b696bf27d40989280a363b69c4
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Nov 20 13:04:26 2015 +0200

    loplugin:unusedfields in cui
    
    Change-Id: I92d7c3e2dde0808304ee3877ba1fbd13ee63eb38

diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index 43674f2..a1fd315 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -366,7 +366,6 @@ struct SvxConfigGroupBoxResource_Impl : public Resource
     OUString m_sProdMacros;
     OUString m_sMacros;
     OUString m_sDlgMacros;
-    OUString m_aHumanAppName;
     OUString m_aStrGroupStyles;
     Image m_collapsedImage;
     Image m_expandedImage;
@@ -384,7 +383,6 @@ SvxConfigGroupBoxResource_Impl::SvxConfigGroupBoxResource_Impl() :
     m_sProdMacros(CUI_RESSTR(RID_SVXSTR_PRODMACROS)),
     m_sMacros(CUI_RESSTR(STR_BASICMACROS)),
     m_sDlgMacros(CUI_RESSTR(RID_SVXSTR_PRODMACROS)),
-    m_aHumanAppName(CUI_RESSTR(STR_HUMAN_APPNAME)),
     m_aStrGroupStyles(CUI_RESSTR(STR_GROUP_STYLES)),
     m_collapsedImage(CUI_RES(BMP_COLLAPSED)),
     m_expandedImage(CUI_RES(BMP_EXPANDED))
diff --git a/cui/source/dialogs/SpellAttrib.hxx b/cui/source/dialogs/SpellAttrib.hxx
index a3e7983..4069af8 100644
--- a/cui/source/dialogs/SpellAttrib.hxx
+++ b/cui/source/dialogs/SpellAttrib.hxx
@@ -41,7 +41,6 @@ struct SpellErrorDescription
     OUString                                     sExplanationURL;
     css::lang::Locale                      aLocale;
     css::uno::Reference< css::linguistic2::XProofreader > xGrammarChecker;
-    OUString                                     sServiceName; ///< service name of GrammarChecker/SpellChecker
     css::uno::Sequence< OUString >  aSuggestions;
     OUString                                     sRuleId;
 
@@ -53,7 +52,6 @@ struct SpellErrorDescription
                       const css::lang::Locale& rLocale,
                       const css::uno::Sequence< OUString >& rSuggestions,
                       css::uno::Reference< css::linguistic2::XProofreader > rxGrammarChecker,
-                      const OUString& rServiceName,
                       const OUString* pDialogTitle = nullptr,
                       const OUString* pExplanation = nullptr,
                       const OUString* pRuleId = nullptr,
@@ -65,7 +63,6 @@ struct SpellErrorDescription
         sExplanationURL( ),
         aLocale( rLocale ),
         xGrammarChecker( rxGrammarChecker ),
-        sServiceName( rServiceName ),
         aSuggestions( rSuggestions )
         {
             if( pDialogTitle )
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index 45f7740..a2f79c6 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -1105,7 +1105,7 @@ bool SpellDialog::GetNextSentence_Impl(bool bUseSavedSentence, bool bRecheck)
                     if( xNamed.is() )
                         sServiceName = xNamed->getName();
                     SpellErrorDescription aDesc( false, aStart->xAlternatives->getWord(),
-                                    aStart->xAlternatives->getLocale(), aStart->xAlternatives->getAlternatives(), nullptr, sServiceName);
+                                    aStart->xAlternatives->getLocale(), aStart->xAlternatives->getAlternatives(), nullptr);
                     m_pSentenceED->SetAttrib( SpellErrorAttrib(aDesc), 0, (sal_uInt16) nStartPosition, (sal_uInt16) nEndPosition );
                 }
                 else if(aStart->bIsGrammarError )
@@ -1129,7 +1129,6 @@ bool SpellDialog::GetNextSentence_Impl(bool bUseSavedSentence, bool bRecheck)
                         LanguageTag::convertToLocale( aStart->eLanguage ),
                         aStart->aGrammarError.aSuggestions,
                         aStart->xGrammarChecker,
-                        xInfo->getImplementationName(),
                         &aStart->sDialogTitle,
                         &aStart->aGrammarError.aFullComment,
                         &aStart->aGrammarError.aRuleIdentifier,
@@ -1801,7 +1800,7 @@ void SentenceEditWindow_Impl::SetAlternatives( Reference< XSpellAlternatives> xA
         if (xNamed.is())
             sServiceName = xNamed->getName();
     }
-    SpellErrorDescription aDesc( false, aWord, aLocale, aAlts, nullptr, sServiceName);
+    SpellErrorDescription aDesc( false, aWord, aLocale, aAlts, nullptr);
     GetTextEngine()->SetAttrib( SpellErrorAttrib(aDesc), 0, m_nErrorStart, m_nErrorEnd );
 }
 
diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx
index 1ea1a98..f719758 100644
--- a/cui/source/inc/cfg.hxx
+++ b/cui/source/inc/cfg.hxx
@@ -671,8 +671,6 @@ public:
 struct SvxIconSelectorToolBoxItem
 {
     Image aImg;
-    OUString aText;
-    void* pData;
 };
 
 class SvxIconSelectorDialog : public ModalDialog
diff --git a/cui/source/inc/scriptdlg.hxx b/cui/source/inc/scriptdlg.hxx
index e46ade5..e717b97 100644
--- a/cui/source/inc/scriptdlg.hxx
+++ b/cui/source/inc/scriptdlg.hxx
@@ -153,7 +153,6 @@ protected:
     const OUString m_createDupStr;
     const OUString m_createErrTitleStr;
     const OUString m_renameErrStr;
-    const OUString m_renameDupStr;
     const OUString m_renameErrTitleStr;
 
     DECL_LINK_TYPED( ScriptSelectHdl, SvTreeListBox *, void );
diff --git a/cui/source/inc/treeopt.hxx b/cui/source/inc/treeopt.hxx
index f35d8fc..9cac992 100644
--- a/cui/source/inc/treeopt.hxx
+++ b/cui/source/inc/treeopt.hxx
@@ -42,31 +42,27 @@ struct OrderedEntry
 
 struct Module
 {
-    OUString                      m_sName;
     bool                          m_bActive;
     std::vector< OrderedEntry* >  m_aNodeList;
 
-    Module( const OUString& rName ) : m_sName( rName ), m_bActive( false ) {}
+    Module() : m_bActive( false ) {}
 };
 
 // struct OptionsLeaf ----------------------------------------------------
 
 struct OptionsLeaf
 {
-    OUString   m_sId;
     OUString   m_sLabel;
     OUString   m_sPageURL;
     OUString   m_sEventHdl;
     OUString   m_sGroupId;
     sal_Int32       m_nGroupIndex;
 
-    OptionsLeaf(    const OUString& rId,
-                    const OUString& rLabel,
+    OptionsLeaf(    const OUString& rLabel,
                     const OUString& rPageURL,
                     const OUString& rEventHdl,
                     const OUString& rGroupId,
                     sal_Int32 nGroupIndex ) :
-        m_sId( rId ),
         m_sLabel( rLabel ),
         m_sPageURL( rPageURL ),
         m_sEventHdl( rEventHdl ),
@@ -84,8 +80,6 @@ struct OptionsNode
     OUString                m_sLabel;
     OUString                m_sPageURL;
     bool                    m_bAllModules;
-    OUString                m_sGroupId;
-    sal_Int32               m_nGroupIndex;
     VectorOfLeaves          m_aLeaves;
     ::std::vector< VectorOfLeaves >
                             m_aGroupedLeaves;
@@ -93,15 +87,11 @@ struct OptionsNode
     OptionsNode(    const OUString& rId,
                     const OUString& rLabel,
                     const OUString& rPageURL,
-                    bool bAllModules,
-                    const OUString& rGroupId,
-                    sal_Int32 nGroupIndex ) :
+                    bool bAllModules ) :
         m_sId( rId ),
         m_sLabel( rLabel ),
         m_sPageURL( rPageURL ),
-        m_bAllModules( bAllModules ),
-        m_sGroupId( rGroupId ),
-        m_nGroupIndex( nGroupIndex ) {}
+        m_bAllModules( bAllModules ) {}
 
     ~OptionsNode()
     {
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 81b9462..a5a064dc 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -1870,7 +1870,7 @@ Module* OfaTreeOptionsDialog::LoadModule(
         if ( rModuleIdentifier == sModule )
         {
             // current active module found
-            pModule = new Module( sModule );
+            pModule = new Module;
             pModule->m_bActive = true;
 
             Reference< XNameAccess > xModAccess;
@@ -1955,7 +1955,7 @@ VectorOfNodes OfaTreeOptionsDialog::LoadNodes(
             if ( !sTemp.isEmpty() )
                 sLabel = sTemp;
             OptionsNode* pNode =
-                new OptionsNode( sNodeId, sLabel, sPageURL, bAllModules, sGroupId, nGroupIndex );
+                new OptionsNode( sNodeId, sLabel, sPageURL, bAllModules );
 
             if ( rExtensionId.isEmpty() && !isNodeActive( pNode, pModule ) )
             {
@@ -1988,7 +1988,7 @@ VectorOfNodes OfaTreeOptionsDialog::LoadNodes(
                         if ( rExtensionId.isEmpty() || sId == rExtensionId )
                         {
                             OptionsLeaf* pLeaf = new OptionsLeaf(
-                                sId, sLeafLabel, sLeafURL, sEventHdl, sLeafGrpId, nLeafGrpIdx );
+                                sLeafLabel, sLeafURL, sEventHdl, sLeafGrpId, nLeafGrpIdx );
 
                             if ( !sLeafGrpId.isEmpty() )
                             {


More information about the Libreoffice-commits mailing list