[Libreoffice-commits] core.git: 10 commits - basctl/source basic/source forms/source framework/inc framework/source hwpfilter/source reportdesign/source rsc/source store/source xmloff/source xmlsecurity/source

Noel Grandin noel at peralex.com
Tue Mar 24 01:32:01 PDT 2015


 basctl/source/basicide/baside2.cxx                          |    6 -
 basctl/source/basicide/baside2.hxx                          |    1 
 basctl/source/basicide/baside3.cxx                          |    4 -
 basctl/source/basicide/basides2.cxx                         |    2 
 basctl/source/dlged/dlged.cxx                               |    5 -
 basctl/source/inc/dlged.hxx                                 |    1 
 basic/source/basmgr/basmgr.cxx                              |    2 
 basic/source/classes/sbunoobj.cxx                           |    4 -
 basic/source/sbx/sbxbase.cxx                                |    7 -
 basic/source/sbx/sbxobj.cxx                                 |   13 ---
 forms/source/component/DatabaseForm.cxx                     |    1 
 forms/source/component/Filter.cxx                           |    2 
 forms/source/component/FormComponent.cxx                    |   12 ---
 forms/source/inc/FormComponent.hxx                          |    8 --
 forms/source/richtext/richtextcontrol.cxx                   |    3 
 forms/source/solar/component/navbarcontrol.cxx              |    2 
 forms/source/xforms/datatypes.cxx                           |   31 +++----
 forms/source/xforms/datatypes.hxx                           |   18 +---
 framework/inc/classes/propertysethelper.hxx                 |    1 
 framework/inc/uielement/statusbarmanager.hxx                |    1 
 framework/source/fwi/classes/propertysethelper.cxx          |    4 -
 framework/source/services/frame.cxx                         |    2 
 framework/source/services/substitutepathvars.cxx            |    4 -
 framework/source/uielement/statusbar.cxx                    |    4 -
 framework/source/uielement/statusbarmanager.cxx             |    4 -
 hwpfilter/source/formula.cxx                                |   17 ----
 hwpfilter/source/formula.h                                  |    3 
 hwpfilter/source/hwpreader.cxx                              |   20 -----
 hwpfilter/source/hwpreader.hxx                              |    2 
 hwpfilter/source/nodes.h                                    |    2 
 reportdesign/source/ui/inc/ReportController.hxx             |    1 
 reportdesign/source/ui/inc/ReportWindow.hxx                 |    3 
 reportdesign/source/ui/inc/ViewsWindow.hxx                  |    4 -
 reportdesign/source/ui/report/ReportController.cxx          |   18 ----
 reportdesign/source/ui/report/ReportWindow.cxx              |    5 -
 reportdesign/source/ui/report/ScrollHelper.cxx              |    2 
 reportdesign/source/ui/report/ViewsWindow.cxx               |    4 -
 rsc/source/rscpp/cpp.h                                      |    3 
 rsc/source/rscpp/cpp1.c                                     |    3 
 rsc/source/rscpp/cpp2.c                                     |    5 -
 rsc/source/rscpp/cpp3.c                                     |    5 -
 rsc/source/rscpp/cpp5.c                                     |    6 -
 store/source/storbase.hxx                                   |    6 -
 store/source/stordata.cxx                                   |   16 ++--
 store/source/stordata.hxx                                   |   47 ++++--------
 xmloff/source/core/DomExport.cxx                            |   20 -----
 xmloff/source/forms/formattributes.cxx                      |   18 ----
 xmloff/source/forms/formattributes.hxx                      |   18 +++-
 xmlsecurity/source/xmlsec/saxhelper.cxx                     |   10 --
 xmlsecurity/source/xmlsec/saxhelper.hxx                     |    3 
 xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx |    3 
 51 files changed, 68 insertions(+), 318 deletions(-)

New commits:
commit 829fa56634414c55a50cda9a74a2683e3e5b822a
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Mar 24 10:01:17 2015 +0200

    loplugin:constantfunction: framework
    
    Change-Id: Ib5c85dfb5fd720a1709e37d9f12b43a1588ba058

diff --git a/framework/inc/classes/propertysethelper.hxx b/framework/inc/classes/propertysethelper.hxx
index a81499f..241bfaf 100644
--- a/framework/inc/classes/propertysethelper.hxx
+++ b/framework/inc/classes/propertysethelper.hxx
@@ -118,7 +118,6 @@ class FWI_DLLPUBLIC PropertySetHelper : public css::beans::XPropertySet
          *  There is no chance to reactive a "dead" object by calling impl_enablePropertySet()
          *  again!
          */
-        void SAL_CALL impl_enablePropertySet();
         void SAL_CALL impl_disablePropertySet();
 
         /**
diff --git a/framework/inc/uielement/statusbarmanager.hxx b/framework/inc/uielement/statusbarmanager.hxx
index 6cd72ed..efbe548 100644
--- a/framework/inc/uielement/statusbarmanager.hxx
+++ b/framework/inc/uielement/statusbarmanager.hxx
@@ -79,7 +79,6 @@ class StatusBarManager : public ::cppu::WeakImplHelper3<
         void FillStatusBar( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& rStatusBarData );
 
     protected:
-        void StateChanged( StateChangedType nType );
         void DataChanged( const DataChangedEvent& rDCEvt );
         void UserDraw( const UserDrawEvent& rUDEvt );
         void Command( const CommandEvent& rEvt );
diff --git a/framework/source/fwi/classes/propertysethelper.cxx b/framework/source/fwi/classes/propertysethelper.cxx
index ce83b59..52b6972 100644
--- a/framework/source/fwi/classes/propertysethelper.cxx
+++ b/framework/source/fwi/classes/propertysethelper.cxx
@@ -63,10 +63,6 @@ void SAL_CALL PropertySetHelper::impl_addPropertyInfo(const css::beans::Property
     m_lProps[aProperty.Name] = aProperty;
 }
 
-void SAL_CALL PropertySetHelper::impl_enablePropertySet()
-{
-}
-
 void SAL_CALL PropertySetHelper::impl_disablePropertySet()
 {
     TransactionGuard aTransaction(m_rTransactionManager, E_SOFTEXCEPTIONS);
diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx
index 7ab2d3a..0b4b484 100644
--- a/framework/source/services/frame.cxx
+++ b/framework/source/services/frame.cxx
@@ -852,8 +852,6 @@ void SAL_CALL Frame::initialize( const css::uno::Reference< css::awt::XWindow >&
     // So superflous messages are filtered to NULL :-)
     implts_startWindowListening();
 
-    impl_enablePropertySet();
-
     m_pWindowCommandDispatch = new WindowCommandDispatch(xContext, this);
 
     // Initialize title functionality
diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx
index 1e06f28..33ad8dc 100644
--- a/framework/source/services/substitutepathvars.cxx
+++ b/framework/source/services/substitutepathvars.cxx
@@ -131,7 +131,7 @@ class SubstitutePathVariables_Impl : public utl::ConfigItem
         virtual void ImplCommit() SAL_OVERRIDE;
 
         // Wrapper methods for low-level functions
-        OperatingSystem    GetOperatingSystem();
+        static OperatingSystem GetOperatingSystem();
         const OUString&    GetYPDomainName();
         const OUString&    GetDNSDomainName();
         const OUString&    GetNTDomainName();
@@ -464,7 +464,7 @@ void SubstitutePathVariables_Impl::ImplCommit()
 {
 }
 
-OperatingSystem SubstitutePathVariables_Impl::GetOperatingSystem()
+inline OperatingSystem SubstitutePathVariables_Impl::GetOperatingSystem()
 {
 #ifdef SOLARIS
     return OS_SOLARIS;
diff --git a/framework/source/uielement/statusbar.cxx b/framework/source/uielement/statusbar.cxx
index 75d40a2..9358efe 100644
--- a/framework/source/uielement/statusbar.cxx
+++ b/framework/source/uielement/statusbar.cxx
@@ -56,10 +56,8 @@ void FrameworkStatusBar::Command( const CommandEvent& rEvt )
         m_pMgr->Command( rEvt );
 }
 
-void FrameworkStatusBar::StateChanged( StateChangedType nType )
+void FrameworkStatusBar::StateChanged( StateChangedType )
 {
-    if ( m_pMgr )
-        m_pMgr->StateChanged( nType );
 }
 
 void FrameworkStatusBar::DataChanged( const DataChangedEvent& rDCEvt )
diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx
index 8728f5b..d045293 100644
--- a/framework/source/uielement/statusbarmanager.cxx
+++ b/framework/source/uielement/statusbarmanager.cxx
@@ -544,10 +544,6 @@ void StatusBarManager::FillStatusBar( const uno::Reference< container::XIndexAcc
     UpdateControllers();
 }
 
-void StatusBarManager::StateChanged( StateChangedType )
-{
-}
-
 void StatusBarManager::DataChanged( const DataChangedEvent& rDCEvt )
 {
     SolarMutexClearableGuard aGuard;
commit d772b9bdc442c767fe99da74df375e5ecf6c8454
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Mar 24 09:58:49 2015 +0200

    loplugin:constantfunction: forms
    
    Change-Id: Icb1b4bb3fd73b54378b77fbaa6c41c3a0f03706a

diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index 6bb7991..ed8e1d2 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -1309,7 +1309,6 @@ void ODatabaseForm::disposing()
     EventObject aEvt(static_cast<XWeak*>(this));
     m_aLoadListeners.disposeAndClear(aEvt);
     m_aRowSetApproveListeners.disposeAndClear(aEvt);
-    m_aParameterManager.disposing( aEvt );
     m_aResetListeners.disposing();
     m_aSubmitListeners.disposeAndClear(aEvt);
     m_aErrorListeners.disposeAndClear(aEvt);
diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx
index 87ed175..016ac70 100644
--- a/forms/source/component/Filter.cxx
+++ b/forms/source/component/Filter.cxx
@@ -236,8 +236,6 @@ namespace frm
                 break;
             }
 
-            OControl::initFormControlPeer( getPeer() );
-
             // filter controls are _never_ readonly
             Reference< XPropertySet > xModel( getModel(), UNO_QUERY_THROW );
             Reference< XPropertySetInfo > xModelPSI( xModel->getPropertySetInfo(), UNO_SET_THROW );
diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx
index 662aec4..ca893da 100644
--- a/forms/source/component/FormComponent.cxx
+++ b/forms/source/component/FormComponent.cxx
@@ -194,11 +194,6 @@ Sequence<Type> OControl::_getTypes()
     return TypeBag( OComponentHelper::getTypes(), OControl_BASE::getTypes() ).getTypes();
 }
 
-void OControl::initFormControlPeer( const Reference< XWindowPeer >& /*_rxPeer*/ )
-{
-    // nothing to do here
-}
-
 // OComponentHelper
 void OControl::disposing()
 {
@@ -289,7 +284,6 @@ void SAL_CALL OControl::createPeer(const Reference<XToolkit>& _rxToolkit, const
     if ( m_xControl.is() )
     {
         m_xControl->createPeer( _rxToolkit, _rxParent );
-        initFormControlPeer( getPeer() );
         impl_resetStateGuard_nothrow();
     }
 }
@@ -2221,10 +2215,6 @@ void OBoundControlModel::onConnectedExternalValue( )
     calculateExternalValueType();
 }
 
-void OBoundControlModel::onDisconnectedExternalValue( )
-{
-}
-
 void OBoundControlModel::onConnectedDbColumn( const Reference< XInterface >& /*_rxForm*/ )
 {
     OSL_PRECOND( !hasExternalValueBinding(), "OBoundControlModel::onConnectedDbColumn: how this? There's an external value binding!" );
@@ -2505,8 +2495,6 @@ void OBoundControlModel::disconnectExternalValueBinding( )
     // re-connect to database column of the new parent
     if ( m_xAmbientForm.is() && m_xAmbientForm->isLoaded() )
         impl_connectDatabaseColumn_noNotify( false );
-    // tell the derivee
-    onDisconnectedExternalValue();
 }
 
 void SAL_CALL OBoundControlModel::setValueBinding( const Reference< XValueBinding >& _rxBinding ) throw (IncompatibleTypesException, RuntimeException, std::exception)
diff --git a/forms/source/inc/FormComponent.hxx b/forms/source/inc/FormComponent.hxx
index abf8956..ecaffb9 100644
--- a/forms/source/inc/FormComponent.hxx
+++ b/forms/source/inc/FormComponent.hxx
@@ -197,11 +197,6 @@ public:
         const bool _bSetDelegator = true
     );
 
-    /** initializes the given peer with various settings necessary for form controls
-    */
-    static  void    initFormControlPeer(
-        const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& _rxPeer );
-
 protected:
     virtual ~OControl();
 
@@ -914,9 +909,6 @@ protected:
         @see m_xExternalBinding
     */
     virtual void            onConnectedExternalValue( );
-    /** called whenever a connection to an external supplier of values (XValueBinding) has been suspended
-    */
-    void                    onDisconnectedExternalValue();
 
     /** called whenever an external validator has been registered
     */
diff --git a/forms/source/richtext/richtextcontrol.cxx b/forms/source/richtext/richtextcontrol.cxx
index 87af6fc..76372c3 100644
--- a/forms/source/richtext/richtextcontrol.cxx
+++ b/forms/source/richtext/richtextcontrol.cxx
@@ -179,7 +179,6 @@ namespace frm
         if ( !bReallyActAsRichText )
         {
             UnoEditControl::createPeer( _rToolkit, _rParentPeer );
-            OControl::initFormControlPeer( getPeer() );
             return;
         }
 
@@ -232,8 +231,6 @@ namespace frm
             }
 
             mbCreatingPeer = false;
-
-            OControl::initFormControlPeer( getPeer() );
         }
     }
 
diff --git a/forms/source/solar/component/navbarcontrol.cxx b/forms/source/solar/component/navbarcontrol.cxx
index e76cce4..92db496 100644
--- a/forms/source/solar/component/navbarcontrol.cxx
+++ b/forms/source/solar/component/navbarcontrol.cxx
@@ -160,8 +160,6 @@ namespace frm
             peerCreated();
 
             mbCreatingPeer = false;
-
-            OControl::initFormControlPeer( getPeer() );
         }
     }
 
diff --git a/forms/source/xforms/datatypes.cxx b/forms/source/xforms/datatypes.cxx
index 2bc4510..f3a156c 100644
--- a/forms/source/xforms/datatypes.cxx
+++ b/forms/source/xforms/datatypes.cxx
@@ -605,14 +605,15 @@ namespace xforms
     {
     }
 
-
-    IMPLEMENT_DEFAULT_CLONING( OBooleanType, OBooleanType_Base )
-
-
-    void OBooleanType::initializeTypedClone( const OBooleanType& /*_rCloneSource*/ )
+    OXSDDataType* OBooleanType::createClone( const OUString& _rName ) const
     {
+        return new OBooleanType( _rName );
     }
 
+    void OBooleanType::initializeClone( const OXSDDataType& _rCloneSource )
+    {
+        OBooleanType_Base::initializeClone( _rCloneSource );
+    }
 
     sal_uInt16 OBooleanType::_validate( const OUString& sValue )
     {
@@ -737,12 +738,15 @@ namespace xforms
         :classname##_Base( _rName, DataTypeClass::typeclass )   \
     {                                                           \
     }                                                           \
-                                                                \
-    IMPLEMENT_DEFAULT_CLONING( classname, classname##_Base )    \
-                                                                \
-    void classname::initializeTypedClone( const classname& /*_rCloneSource*/ )  \
-    {                                                           \
-    }                                                           \
+    OXSDDataType* classname::createClone( const OUString& _rName ) const \
+    {                                                       \
+        return new classname( _rName );                     \
+    }                                                       \
+    void classname::initializeClone( const OXSDDataType& _rCloneSource ) \
+    { \
+         classname##_Base::initializeClone( _rCloneSource );        \
+        initializeTypedClone( static_cast< const classname& >( _rCloneSource ) ); \
+    } \
 
 
 
@@ -906,11 +910,6 @@ namespace xforms
     IMPLEMENT_DEFAULT_TYPED_CLONING( OShortIntegerType, OShortIntegerType_Base )
 
 
-    void OShortIntegerType::initializeTypedClone( const OShortIntegerType& /*_rCloneSource*/ )
-    {
-    }
-
-
     bool OShortIntegerType::_getValue( const OUString& value, double& fValue )
     {
         fValue = (double)(sal_Int16)value.toInt32();
diff --git a/forms/source/xforms/datatypes.hxx b/forms/source/xforms/datatypes.hxx
index 848ff75..a2422be 100644
--- a/forms/source/xforms/datatypes.hxx
+++ b/forms/source/xforms/datatypes.hxx
@@ -139,19 +139,7 @@ namespace xforms
 
 #define DECLARE_DEFAULT_CLONING( classname )        \
     virtual OXSDDataType* createClone( const OUString& _rName ) const SAL_OVERRIDE;    \
-    virtual void       initializeClone( const OXSDDataType& _rCloneSource ) SAL_OVERRIDE; \
-            void       initializeTypedClone( const classname& _rCloneSource );
-
-#define IMPLEMENT_DEFAULT_CLONING( classname, baseclass )   \
-    OXSDDataType* classname::createClone( const OUString& _rName ) const              \
-    {                                                       \
-        return new classname( _rName );                     \
-    }                                                       \
-    void classname::initializeClone( const OXSDDataType& _rCloneSource ) \
-    { \
-        baseclass::initializeClone( _rCloneSource );        \
-        initializeTypedClone( static_cast< const classname& >( _rCloneSource ) ); \
-    } \
+    virtual void       initializeClone( const OXSDDataType& _rCloneSource ) SAL_OVERRIDE;
 
 #define IMPLEMENT_DEFAULT_TYPED_CLONING( classname, baseclass )   \
     OXSDDataType* classname::createClone( const OUString& _rName ) const              \
@@ -162,7 +150,7 @@ namespace xforms
     { \
         baseclass::initializeClone( _rCloneSource );        \
         initializeTypedClone( static_cast< const classname& >( _rCloneSource ) ); \
-    } \
+    }
 
 #define REGISTER_VOID_PROP( prop, memberAny, type ) \
     registerMayBeVoidProperty( PROPERTY_##prop, PROPERTY_ID_##prop, ::com::sun::star::beans::PropertyAttribute::BOUND | ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, \
@@ -288,6 +276,7 @@ namespace xforms
 
     protected:
         DECLARE_DEFAULT_CLONING( OStringType )
+        void       initializeTypedClone( const OStringType& _rCloneSource );
 
         // OXSDDataType overridables
         virtual sal_uInt16      _validate( const OUString& value ) SAL_OVERRIDE;
@@ -309,6 +298,7 @@ namespace xforms
 
     protected:
         DECLARE_DEFAULT_CLONING( ODecimalType )
+        void       initializeTypedClone( const ODecimalType& _rCloneSource );
 
         // OXSDDataType overridables
         virtual sal_uInt16      _validate( const OUString& value ) SAL_OVERRIDE;
commit c3dc46723234c3fd5101a26ff374e59140997582
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Mar 24 09:58:09 2015 +0200

    loplugin:constantfunction: hwpfilter
    
    Change-Id: I2504291e2167cbc4be91e01de654ca63f89dbd2a

diff --git a/hwpfilter/source/formula.cxx b/hwpfilter/source/formula.cxx
index c29cbee..0729396 100644
--- a/hwpfilter/source/formula.cxx
+++ b/hwpfilter/source/formula.cxx
@@ -165,7 +165,6 @@ void Formula::makeExpr(Node *res)
              makeRoot(tmp);
              break;
          case ID_ARROWEXPR:
-             makeArrow(tmp);
              break;
          case ID_ACCENTEXPR:
              makeAccent(tmp);
@@ -181,10 +180,8 @@ void Formula::makeExpr(Node *res)
              makeBlock(tmp);
              //fall-through
          case ID_BEGIN:
-             makeBegin(tmp);
              //fall-through
          case ID_END:
-             makeEnd(tmp);
              break;
     }
 }
@@ -463,10 +460,6 @@ void Formula::makeRoot(Node *res)
           rendEl("math:mroot");
 #endif
 }
-// DVO: add space to avoid warning
-void Formula::makeArrow(Node * /*res*/)
-{
-}
 void Formula::makeAccent(Node *res)
 {
      makeDecoration( res );
@@ -575,16 +568,6 @@ void Formula::makeBlock(Node *res)
 #endif
 }
 
-// DVO: add space to avoid warning
-void Formula::makeBegin(Node * /*res*/)
-{
-}
-
-// DVO: add space to avoid warning
-void Formula::makeEnd(Node * /*res*/)
-{
-}
-
 int Formula::parse()
 {
      Node *res = 0L;
diff --git a/hwpfilter/source/formula.h b/hwpfilter/source/formula.h
index e208522..d0d4f98 100644
--- a/hwpfilter/source/formula.h
+++ b/hwpfilter/source/formula.h
@@ -70,14 +70,11 @@ private:
      void makeDecoration(Node *res);
      void makeFunction(Node *res);
      void makeRoot(Node *res);
-     void makeArrow(Node *res);
      void makeAccent(Node *res);
      void makeParenth(Node *res);
      void makeFence(Node *res);
      void makeBracket(Node *res);
      void makeBlock(Node *res);
-     void makeBegin(Node *res);
-     void makeEnd(Node *res);
 
 private:
      Reference< XDocumentHandler >  m_rxDocumentHandler;
diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx
index c40110e..93f9968 100644
--- a/hwpfilter/source/hwpreader.cxx
+++ b/hwpfilter/source/hwpreader.cxx
@@ -3082,13 +3082,11 @@ void HwpReader::make_text_p3(HWPPara * para,bool bParaStart)
                     if( !pstart ) {STARTP;}
                     if( !tstart ) {STARTT;}
                     makeChars(str);
-                    makeTocMark(static_cast<TocMark *>(para->hhstr[n]));
                     break;
                 case CH_INDEX_MARK:               // 26
                     if( !pstart ) {STARTP;}
                     if( !tstart ) {STARTT;}
                     makeChars(str);
-                    makeIndexMark(static_cast<IndexMark *>(para->hhstr[n]));
                     break;
                 case CH_OUTLINE:                  // 28
                     if( !pstart ) {STARTP;}
@@ -4749,24 +4747,6 @@ void HwpReader::makeMailMerge(MailMerge * hbox)
 }
 
 
-/**
- * Make heading contents file using toc marks
- * not support operation.
- */
-void HwpReader::makeTocMark(TocMark *  )          /*hbox */
-{
-}
-
-
-/**
- * Make search character table in automatic
- * not support operation
- */
-void HwpReader::makeIndexMark(IndexMark *  )      /*hbox */
-{
-}
-
-
 void HwpReader::makeOutline(Outline * hbox)
 {
     if( hbox->kind == 1 )
diff --git a/hwpfilter/source/hwpreader.hxx b/hwpfilter/source/hwpreader.hxx
index e2564e2..3483920 100644
--- a/hwpfilter/source/hwpreader.hxx
+++ b/hwpfilter/source/hwpreader.hxx
@@ -134,8 +134,6 @@ private:
     void makeAutoNum(AutoNum *hbox);
     void makeShowPageNum();
     void makeMailMerge(MailMerge *hbox);
-    void makeTocMark(TocMark *hbox);
-    void makeIndexMark(IndexMark *hbox);
     void makeOutline(Outline *hbox);
 
     /* --------- Styles Parsing ------------ */
diff --git a/hwpfilter/source/nodes.h b/hwpfilter/source/nodes.h
index 3c292ad..fd0c658 100644
--- a/hwpfilter/source/nodes.h
+++ b/hwpfilter/source/nodes.h
@@ -84,8 +84,6 @@ public:
           printf("Node count : [%d]\n",count);
 #endif
      }
-     void print(){
-     }
 public:
      static int count; /* For memory debugging */
      int id;
commit 1c34766698b03d14376ae7759ab1ad69f56786f9
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Mar 24 09:57:41 2015 +0200

    loplugin:constantfunction: reportdesign
    
    Change-Id: Ic94359c544034b9e6f09bd02a377d906a5b820e6

diff --git a/reportdesign/source/ui/inc/ReportController.hxx b/reportdesign/source/ui/inc/ReportController.hxx
index ae4ef39..7a7d5c6 100644
--- a/reportdesign/source/ui/inc/ReportController.hxx
+++ b/reportdesign/source/ui/inc/ReportController.hxx
@@ -318,7 +318,6 @@ namespace rptui
         DECL_LINK( OnClipboardChanged, void* );
         DECL_LINK( OnExecuteReport, void* );
         DECL_LINK( OnOpenHelpAgent, void* );
-        short saveModified();
         // all the features which should be handled by this class
         virtual void            describeSupportedFeatures() SAL_OVERRIDE;
         // state of a feature. 'feature' may be the handle of a ::com::sun::star::util::URL somebody requested a dispatch interface for OR a toolbar slot.
diff --git a/reportdesign/source/ui/inc/ReportWindow.hxx b/reportdesign/source/ui/inc/ReportWindow.hxx
index 60bdc48..a416b74 100644
--- a/reportdesign/source/ui/inc/ReportWindow.hxx
+++ b/reportdesign/source/ui/inc/ReportWindow.hxx
@@ -68,9 +68,6 @@ namespace rptui
         OReportWindow(OScrollWindowHelper* _pParent,ODesignView* _pView);
         virtual ~OReportWindow();
 
-        /** late ctor
-        */
-        void initialize();
         // Window overrides
         virtual void Resize() SAL_OVERRIDE;
 
diff --git a/reportdesign/source/ui/inc/ViewsWindow.hxx b/reportdesign/source/ui/inc/ViewsWindow.hxx
index ac69261..8acd960 100644
--- a/reportdesign/source/ui/inc/ViewsWindow.hxx
+++ b/reportdesign/source/ui/inc/ViewsWindow.hxx
@@ -159,10 +159,6 @@ namespace rptui
 
         void resize(const OSectionWindow& _rSectionWindow);
 
-        /** late ctor
-        */
-        void initialize();
-
         inline OReportWindow*       getView()           const { return m_pParent; }
 
         /** removes the section at the given position.
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index 38ae927..549fa2f 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -1608,17 +1608,7 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >
         case SID_EDITDOC:
             if(isEditable())
             { // the state should be changed to not editable
-                switch (saveModified())
-                {
-                    case RET_CANCEL:
-                        // don't change anything here so return
-                        return;
-                    case RET_NO:
-                        setModified(sal_False);     // and we are not modified yet
-                        break;
-                    default:
-                        break;
-                }
+                setModified(sal_False);     // and we are not modified yet
             }
             setEditable(!isEditable());
             InvalidateAll();
@@ -1655,12 +1645,6 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >
     InvalidateFeature(_nId,Reference< XStatusListener >(),bForceBroadcast);
 }
 
-short OReportController::saveModified()
-{
-    return RET_NO;
-}
-
-
 void OReportController::impl_initialize( )
 {
     OReportController_BASE::impl_initialize();
diff --git a/reportdesign/source/ui/report/ReportWindow.cxx b/reportdesign/source/ui/report/ReportWindow.cxx
index 3ace86e..74148f6 100644
--- a/reportdesign/source/ui/report/ReportWindow.cxx
+++ b/reportdesign/source/ui/report/ReportWindow.cxx
@@ -89,11 +89,6 @@ OReportWindow::~OReportWindow()
         m_pReportListener->dispose();
 }
 
-void OReportWindow::initialize()
-{
-    m_aViewsWindow.initialize();
-}
-
 void OReportWindow::SetInsertObj( sal_uInt16 eObj,const OUString& _sShapeType )
 {
     m_aViewsWindow.SetInsertObj( eObj,_sShapeType);
diff --git a/reportdesign/source/ui/report/ScrollHelper.cxx b/reportdesign/source/ui/report/ScrollHelper.cxx
index 9342555..d5cf903 100644
--- a/reportdesign/source/ui/report/ScrollHelper.cxx
+++ b/reportdesign/source/ui/report/ScrollHelper.cxx
@@ -91,8 +91,6 @@ void OScrollWindowHelper::initialize()
 {
     uno::Reference<report::XReportDefinition> xReportDefinition = m_pParent->getController().getReportDefinition();
     m_pReportDefintionMultiPlexer = addStyleListener(xReportDefinition,this);
-
-    m_aReportWindow.initialize();
 }
 
 void OScrollWindowHelper::setTotalSize(sal_Int32 _nWidth ,sal_Int32 _nHeight)
diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx
index d4ebe21..30d690c7 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -189,10 +189,6 @@ OViewsWindow::~OViewsWindow()
     m_aSections.clear();
 }
 
-void OViewsWindow::initialize()
-{
-}
-
 void OViewsWindow::impl_resizeSectionWindow(OSectionWindow& _rSectionWindow,Point& _rStartPoint,bool _bSet)
 {
     const uno::Reference< report::XSection> xSection = _rSectionWindow.getReportSection().getSection();
commit 4d4022fef2c499e1151ee66a79377e77e5093cae
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Mar 24 09:56:26 2015 +0200

    loplugin:constantfunction: xmloff
    
    Change-Id: I0ddcaada71eaa53cd7e6320c6ccaa8d8971f6df0

diff --git a/xmloff/source/core/DomExport.cxx b/xmloff/source/core/DomExport.cxx
index f25e7c9..b66fb47 100644
--- a/xmloff/source/core/DomExport.cxx
+++ b/xmloff/source/core/DomExport.cxx
@@ -63,16 +63,6 @@ public:
     virtual ~DomVisitor() {}
     virtual void element( const Reference<XElement>& ) {}
     virtual void character( const Reference<XCharacterData>& ) {}
-    void attribute( const Reference<XAttr>& ) {}
-    void cdata( const Reference<XCDATASection>& ) {}
-    void comment( const Reference<XComment>& ) {}
-    void documentFragment( const Reference<XDocumentFragment>& ) {}
-    void document( const Reference<XDocument>& ) {}
-    void documentType( const Reference<XDocumentType>& ) {}
-    void entity( const Reference<XEntity>& ) {}
-    void entityReference( const Reference<XEntityReference>& ) {}
-    void notation( const Reference<XNotation>& ) {}
-    void processingInstruction( const Reference<XProcessingInstruction>& ) {}
     virtual void endElement( const Reference<XElement>& ) {}
 };
 
@@ -86,37 +76,27 @@ void visitNode( DomVisitor& rVisitor, const Reference<XNode>& xNode )
     switch( xNode->getNodeType() )
     {
     case NodeType_ATTRIBUTE_NODE:
-        rVisitor.attribute( Reference<XAttr>( xNode, UNO_QUERY_THROW ) );
         break;
     case NodeType_CDATA_SECTION_NODE:
-        rVisitor.cdata( Reference<XCDATASection>( xNode, UNO_QUERY_THROW ) );
         break;
     case NodeType_COMMENT_NODE:
-        rVisitor.comment( Reference<XComment>( xNode, UNO_QUERY_THROW ) );
         break;
     case NodeType_DOCUMENT_FRAGMENT_NODE:
-        rVisitor.documentFragment( Reference<XDocumentFragment>( xNode, UNO_QUERY_THROW ) );
         break;
     case NodeType_DOCUMENT_NODE:
-        rVisitor.document( Reference<XDocument>( xNode, UNO_QUERY_THROW ) );
         break;
     case NodeType_DOCUMENT_TYPE_NODE:
-        rVisitor.documentType( Reference<XDocumentType>( xNode, UNO_QUERY_THROW ) );
         break;
     case NodeType_ELEMENT_NODE:
         rVisitor.element( Reference<XElement>( xNode, UNO_QUERY_THROW ) );
         break;
     case NodeType_ENTITY_NODE:
-        rVisitor.entity( Reference<XEntity>( xNode, UNO_QUERY_THROW ) );
         break;
     case NodeType_ENTITY_REFERENCE_NODE:
-        rVisitor.entityReference( Reference<XEntityReference>( xNode, UNO_QUERY_THROW ) );
         break;
     case NodeType_NOTATION_NODE:
-        rVisitor.notation( Reference<XNotation>( xNode, UNO_QUERY_THROW ) );
         break;
     case NodeType_PROCESSING_INSTRUCTION_NODE:
-        rVisitor.processingInstruction( Reference<XProcessingInstruction>( xNode, UNO_QUERY_THROW ) );
         break;
     case NodeType_TEXT_NODE:
         rVisitor.character( Reference<XCharacterData>( xNode, UNO_QUERY_THROW ) );
diff --git a/xmloff/source/forms/formattributes.cxx b/xmloff/source/forms/formattributes.cxx
index 0ccb339..1973c23 100644
--- a/xmloff/source/forms/formattributes.cxx
+++ b/xmloff/source/forms/formattributes.cxx
@@ -140,12 +140,6 @@ namespace xmloff
         return "";
     }
 
-    sal_uInt16 OAttributeMetaData::getDatabaseAttributeNamespace(sal_Int32 /*_nId*/)
-    {
-        // nothing special here
-        return XML_NAMESPACE_FORM;
-    }
-
     const sal_Char* OAttributeMetaData::getBindingAttributeName(sal_Int32 _nId)
     {
         switch (_nId)
@@ -159,12 +153,6 @@ namespace xmloff
         return "";
     }
 
-    sal_uInt16 OAttributeMetaData::getBindingAttributeNamespace(sal_Int32)
-    {
-        // nothing special here
-        return XML_NAMESPACE_FORM;
-    }
-
     const sal_Char* OAttributeMetaData::getSpecialAttributeName(sal_Int32 _nId)
     {
         switch (_nId)
@@ -214,12 +202,6 @@ namespace xmloff
         return "";
     }
 
-    sal_uInt16 OAttributeMetaData::getOfficeFormsAttributeNamespace(OfficeFormsAttributes /* _eAttrib */)
-    {
-        // nothing special here
-        return XML_NAMESPACE_FORM;
-    }
-
     //= OAttribute2Property
     OAttribute2Property::OAttribute2Property()
     {
diff --git a/xmloff/source/forms/formattributes.hxx b/xmloff/source/forms/formattributes.hxx
index c5802a0..299e8e0 100644
--- a/xmloff/source/forms/formattributes.hxx
+++ b/xmloff/source/forms/formattributes.hxx
@@ -27,6 +27,7 @@
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <sal/types.h>
 #include <salhelper/simplereferenceobject.hxx>
+#include <xmloff/xmlnmspe.hxx>
 
 struct SvXMLEnumMapEntry;
 
@@ -181,7 +182,11 @@ namespace xmloff
             @param _nId
                 the id of the attribute. Has to be one of the DA_* constants.
         */
-        static sal_uInt16 getDatabaseAttributeNamespace(sal_Int32 _nId);
+        static inline sal_uInt16 getDatabaseAttributeNamespace(sal_Int32 )
+        {
+            // nothing special here
+            return XML_NAMESPACE_FORM;
+        }
 
         /** calculates the xml attribute representation of a special attribute.
             @param _nId
@@ -199,7 +204,11 @@ namespace xmloff
             @param _nId
                 the id of the attribute. Has to be one of the BA_* constants.
         */
-        static sal_uInt16 getBindingAttributeNamespace(sal_Int32 _nId);
+        static inline sal_uInt16 getBindingAttributeNamespace(sal_Int32 )
+        {
+            // nothing special here
+            return XML_NAMESPACE_FORM;
+        }
 
         /** calculates the xml namespace key to use for a special attribute.
             @param _nId
@@ -217,7 +226,10 @@ namespace xmloff
             @param _nId
                 the id of the attribute
         */
-        static sal_uInt16 getOfficeFormsAttributeNamespace(OfficeFormsAttributes _eAttrib);
+        static inline sal_uInt16 getOfficeFormsAttributeNamespace(OfficeFormsAttributes )
+        { // nothing special here
+          return XML_NAMESPACE_FORM;
+        }
     };
 
     //= OAttribute2Property
commit 6618a6d7f2b462e43ef8df4a14babacb5519c986
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Mar 24 09:53:43 2015 +0200

    loplugin:constantfunction: xmlsecurity
    
    Change-Id: Iabe2b4677b75cbd4b10a55fc4b2f13ba29645cd4

diff --git a/xmlsecurity/source/xmlsec/saxhelper.cxx b/xmlsecurity/source/xmlsec/saxhelper.cxx
index 9c454a3..ee0d950 100644
--- a/xmlsecurity/source/xmlsec/saxhelper.cxx
+++ b/xmlsecurity/source/xmlsec/saxhelper.cxx
@@ -373,14 +373,4 @@ void SAXHelper::processingInstruction(
     }
 }
 
-/**
- * XDocumentHandler -- set document locator
- * In this case, locator is useless.
- */
-void SAXHelper::setDocumentLocator(
-    const cssu::Reference< cssxs::XLocator > &)
-    throw( cssxs::SAXException , cssu::RuntimeException )
-{
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/saxhelper.hxx b/xmlsecurity/source/xmlsec/saxhelper.hxx
index 8ed3e6e..4683d3f 100644
--- a/xmlsecurity/source/xmlsec/saxhelper.hxx
+++ b/xmlsecurity/source/xmlsec/saxhelper.hxx
@@ -71,9 +71,6 @@ class SAXHelper
             const OUString& aData )
             throw( ::com::sun::star::xml::sax::SAXException , ::com::sun::star::uno::RuntimeException ) ;
 
-        void setDocumentLocator( const ::com::sun::star::uno::Reference<
-            ::com::sun::star::xml::sax::XLocator > & xLocator )
-            throw( ::com::sun::star::xml::sax::SAXException , ::com::sun::star::uno::RuntimeException ) ;
 } ;
 
 #endif
diff --git a/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx b/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx
index 4f37d71..76ea5e3 100644
--- a/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx
+++ b/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx
@@ -1002,10 +1002,9 @@ void SAL_CALL XMLDocumentWrapper_XmlSecImpl::processingInstruction( const OUStri
     saxHelper.processingInstruction(aTarget, aData);
 }
 
-void SAL_CALL XMLDocumentWrapper_XmlSecImpl::setDocumentLocator( const cssu::Reference< cssxs::XLocator >& xLocator )
+void SAL_CALL XMLDocumentWrapper_XmlSecImpl::setDocumentLocator( const cssu::Reference< cssxs::XLocator >& )
     throw (cssxs::SAXException, cssu::RuntimeException, std::exception)
 {
-    saxHelper.setDocumentLocator(xLocator);
 }
 
 /* XCompressedDocumentHandler */
commit b2d2d72a7e401a4693cec9bbe12d8254e250ba70
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Mar 24 09:52:03 2015 +0200

    loplugin:constantfunction: basic
    
    Change-Id: I1c9a33cefb68bec978b2a922c2c3ef00f2a7a1b4

diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index 224d1af..a125917 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -2105,7 +2105,6 @@ sal_Bool DialogContainer_Impl::hasElements()
 {
     bool bRet = false;
 
-    mpLib->GetAll( SbxCLASS_OBJECT );
     sal_Int16 nCount = mpLib->GetObjects()->Count();
     for( sal_Int16 nObj = 0; nObj < nCount ; nObj++ )
     {
@@ -2142,7 +2141,6 @@ uno::Any DialogContainer_Impl::getByName( const OUString& aName )
 uno::Sequence< OUString > DialogContainer_Impl::getElementNames()
     throw(uno::RuntimeException, std::exception)
 {
-    mpLib->GetAll( SbxCLASS_OBJECT );
     sal_Int16 nCount = mpLib->GetObjects()->Count();
     uno::Sequence< OUString > aRetSeq( nCount );
     OUString* pRetSeq = aRetSeq.getArray();
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index ac69ddc..3557ed0 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -2962,10 +2962,6 @@ void createAllObjectProperties( SbxObject* pObj )
     {
         pUnoStructObj->createAllProperties();
     }
-    else
-    {
-        pObj->GetAll( SbxCLASS_DONTCARE );
-    }
 }
 
 
diff --git a/basic/source/sbx/sbxbase.cxx b/basic/source/sbx/sbxbase.cxx
index f13b4c9..00728c6 100644
--- a/basic/source/sbx/sbxbase.cxx
+++ b/basic/source/sbx/sbxbase.cxx
@@ -273,7 +273,7 @@ bool SbxBase::Store( SvStream& rStrm )
         if( rStrm.GetError() != SVSTREAM_OK )
             bRes = false;
         if( bRes )
-            bRes = StoreCompleted();
+            bRes = true;
         return bRes;
     }
     else
@@ -305,11 +305,6 @@ bool SbxBase::LoadCompleted()
     return true;
 }
 
-bool SbxBase::StoreCompleted()
-{
-    return true;
-}
-
 //////////////////////////////// SbxFactory
 
 SbxFactory::~SbxFactory()
diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx
index 46e37ba..e57c429 100644
--- a/basic/source/sbx/sbxobj.cxx
+++ b/basic/source/sbx/sbxobj.cxx
@@ -180,10 +180,6 @@ bool SbxObject::IsClass( const OUString& rName ) const
 
 SbxVariable* SbxObject::FindUserData( sal_uInt32 nData )
 {
-    if( !GetAll( SbxCLASS_DONTCARE ) )
-    {
-        return NULL;
-    }
     SbxVariable* pRes = pMethods->FindUserData( nData );
     if( !pRes )
     {
@@ -228,10 +224,6 @@ SbxVariable* SbxObject::Find( const OUString& rName, SbxClassType t )
     ++nLvl;
 #endif
 
-    if( !GetAll( t ) )
-    {
-        return NULL;
-    }
     SbxVariable* pRes = NULL;
     pObjs->SetFlag( SBX_EXTSEARCH );
     if( t == SbxCLASS_DONTCARE )
@@ -743,11 +735,6 @@ void SbxObject::Dump( SvStream& rStrm, bool bFill )
     {
         aIndent += "    ";
     }
-    // if necessary complete the object
-    if ( bFill )
-    {
-        GetAll( SbxCLASS_DONTCARE );
-    }
     // Output the data of the object itself
     OString aNameStr(OUStringToOString(GetName(), RTL_TEXTENCODING_ASCII_US));
     OString aClassNameStr(OUStringToOString(aClassName, RTL_TEXTENCODING_ASCII_US));
commit 72ddf425c2f565e446cc6d0b2b7f48a87fdfe611
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Mar 24 09:51:10 2015 +0200

    loplugin:constantfunction: basctl
    
    Change-Id: I675b6cee53a9cef240dd798b13515141e194828f

diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index 81d0f34..5253ea9 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -1212,12 +1212,6 @@ OUString ModulWindow::GetTitle()
     return GetSbModuleName();
 }
 
-void ModulWindow::FrameWindowMoved()
-{
-}
-
-
-
 void ModulWindow::ShowCursor( bool bOn )
 {
     if ( GetEditEngine() )
diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx
index 08174c7..595db9e 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -381,7 +381,6 @@ public:
     virtual bool    IsModified () SAL_OVERRIDE;
     virtual bool    IsPasteAllowed () SAL_OVERRIDE;
 
-    void            FrameWindowMoved();
     void            ShowCursor( bool bOn );
 
     virtual sal_uInt16  GetSearchOptions() SAL_OVERRIDE;
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx
index a04d198..34242c3 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -1339,9 +1339,9 @@ void DialogWindow::Deactivating()
     DisableBrowser();
 }
 
-sal_Int32 DialogWindow::countPages( Printer* pPrinter )
+sal_Int32 DialogWindow::countPages( Printer* )
 {
-    return pEditor->countPages( pPrinter );
+    return 1;
 }
 
 void DialogWindow::printPage( sal_Int32 nPage, Printer* pPrinter )
diff --git a/basctl/source/basicide/basides2.cxx b/basctl/source/basicide/basides2.cxx
index e69c223..874f797 100644
--- a/basctl/source/basicide/basides2.cxx
+++ b/basctl/source/basicide/basides2.cxx
@@ -216,8 +216,6 @@ ModulWindow* Shell::FindBasWin (
 
 void Shell::Move()
 {
-    if (ModulWindow* pMCurWin = dynamic_cast<ModulWindow*>(pCurWin))
-        pMCurWin->FrameWindowMoved();
 }
 
 void Shell::ShowCursor( bool bOn )
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index 62109c3..105b9b5 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -1145,11 +1145,6 @@ void lcl_PrintHeader( Printer* pPrinter, const OUString& rTitle ) // not working
 }
 
 
-sal_Int32 DlgEditor::countPages( Printer* )
-{
-    return 1;
-}
-
 void DlgEditor::printPage( sal_Int32 nPage, Printer* pPrinter, const OUString& rTitle )
 {
     if( nPage == 0 )
diff --git a/basctl/source/inc/dlged.hxx b/basctl/source/inc/dlged.hxx
index fda829d..6371ac6 100644
--- a/basctl/source/inc/dlged.hxx
+++ b/basctl/source/inc/dlged.hxx
@@ -202,7 +202,6 @@ public:
     void            ShowProperties();
     void            UpdatePropertyBrowserDelayed();
 
-    sal_Int32       countPages( Printer* pPrinter );
     void            printPage( sal_Int32 nPage, Printer* pPrinter, const OUString& );
 
     bool            AdjustPageSize();
commit 09d5b31ebe187a4cd9f3efca5a7cb7f87e1e19f6
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Mar 24 09:49:29 2015 +0200

    loplugin:constantfunction: store
    
    Change-Id: I13284409404ef77eb16164b7ce2074259d2cad12

diff --git a/store/source/storbase.hxx b/store/source/storbase.hxx
index eb980a1..83b3ab6 100644
--- a/store/source/storbase.hxx
+++ b/store/source/storbase.hxx
@@ -751,9 +751,7 @@ public:
             return store_E_InvalidAccess;
         pHead->guard(nAddr);
 
-        T * pImpl = dynamic_page_cast<T>(pHead);
-        OSL_PRECOND(pImpl != 0, "store::PageHolder<T>::guard(): Null pointer");
-        pImpl->guard();
+        OSL_PRECOND(dynamic_page_cast<T>(pHead) != 0, "store::PageHolder<T>::guard(): Null pointer");
 
         return store_E_None;
     }
@@ -771,7 +769,7 @@ public:
         if (!pImpl)
             return store_E_WrongVersion;
 
-        return pImpl->verify();
+        return store_E_None;
     }
 };
 
diff --git a/store/source/stordata.cxx b/store/source/stordata.cxx
index 3b84a1c..75562aa 100644
--- a/store/source/stordata.cxx
+++ b/store/source/stordata.cxx
@@ -594,7 +594,7 @@ OStoreDirectoryPageObject::scope (
     sal_uInt32 index0, index1, index2, index3;
 
     // direct.
-    sal_uInt32 nCount = OStoreDirectoryDataBlock::directCount();
+    sal_uInt32 nCount = OStoreDirectoryDataBlock::directCount;
     sal_uInt32 nLimit = nCount;
     if (nPage < nLimit)
     {
@@ -611,7 +611,7 @@ OStoreDirectoryPageObject::scope (
 
     // single indirect.
     sal_uInt32 const nCapacity = indirect::capacityCount(rPage.m_aDescr);
-    nCount = OStoreDirectoryDataBlock::singleCount();
+    nCount = OStoreDirectoryDataBlock::singleCount;
     nLimit = nCount * nCapacity;
     if (nPage < nLimit)
     {
@@ -640,7 +640,7 @@ OStoreDirectoryPageObject::scope (
     nPage -= nLimit;
 
     // double indirect.
-    nCount = OStoreDirectoryDataBlock::doubleCount();
+    nCount = OStoreDirectoryDataBlock::doubleCount;
     nLimit = nCount * nCapacity * nCapacity;
     if (nPage < nLimit)
     {
@@ -675,7 +675,7 @@ OStoreDirectoryPageObject::scope (
     nPage -= nLimit;
 
     // triple indirect.
-    nCount = OStoreDirectoryDataBlock::tripleCount();
+    nCount = OStoreDirectoryDataBlock::tripleCount;
     nLimit = nCount * nCapacity * nCapacity * nCapacity;
     if (nPage < nLimit)
     {
@@ -1016,7 +1016,7 @@ storeError OStoreDirectoryPageObject::truncate (
     if (eScope == page::SCOPE_DIRECT)
     {
         // Truncate direct data pages.
-        sal_uInt16 i, n = OStoreDirectoryDataBlock::directCount();
+        sal_uInt16 i, n = OStoreDirectoryDataBlock::directCount;
         for (i = n; i > nRemain; i--)
         {
             // Obtain data page location.
@@ -1039,7 +1039,7 @@ storeError OStoreDirectoryPageObject::truncate (
     if (eScope == page::SCOPE_SINGLE)
     {
         // Truncate single indirect pages.
-        sal_uInt16 i, n = OStoreDirectoryDataBlock::singleCount();
+        sal_uInt16 i, n = OStoreDirectoryDataBlock::singleCount;
         for (i = n; i > nRemain; i--)
         {
             // Truncate single indirect page to zero data pages.
@@ -1058,7 +1058,7 @@ storeError OStoreDirectoryPageObject::truncate (
     if (eScope == page::SCOPE_DOUBLE)
     {
         // Truncate double indirect pages.
-        sal_uInt16 i, n = OStoreDirectoryDataBlock::doubleCount();
+        sal_uInt16 i, n = OStoreDirectoryDataBlock::doubleCount;
         for (i = n; i > nRemain; i--)
         {
             // Truncate double indirect page to zero single indirect pages.
@@ -1077,7 +1077,7 @@ storeError OStoreDirectoryPageObject::truncate (
     if (eScope == page::SCOPE_TRIPLE)
     {
         // Truncate triple indirect pages.
-        sal_uInt16 i, n = OStoreDirectoryDataBlock::tripleCount();
+        sal_uInt16 i, n = OStoreDirectoryDataBlock::tripleCount;
         for (i = n; i > nRemain; i--)
         {
             // Truncate to zero double indirect pages.
diff --git a/store/source/stordata.hxx b/store/source/stordata.hxx
index ae9e916..52bfb8a 100644
--- a/store/source/stordata.hxx
+++ b/store/source/stordata.hxx
@@ -87,13 +87,6 @@ struct OStoreDataPageData : public store::OStorePageData
         if (capacity()) memset (m_pData, 0, capacity());
     }
 
-    /** guard (external representation).
-    */
-    void guard() {}
-
-    /** verify (external representation).
-    */
-    storeError verify() const { return store_E_None; }
 };
 
 /*========================================================================
@@ -467,77 +460,69 @@ struct OStoreDirectoryDataBlock
 
     /** direct.
     */
-    static sal_uInt16 directCount (void)
-    {
-        return ((sal_uInt16)(STORE_LIMIT_DATAPAGE_DIRECT));
-    }
+    static const sal_uInt16 directCount = ((sal_uInt16)(STORE_LIMIT_DATAPAGE_DIRECT));
+
     sal_uInt32 directLink (sal_uInt16 nIndex) const
     {
-        if (nIndex < directCount())
+        if (nIndex < directCount)
             return store::ntohl(m_aTable.m_pDirect[nIndex]);
         else
             return STORE_PAGE_NULL;
     }
     void directLink (sal_uInt16 nIndex, sal_uInt32 nAddr)
     {
-        if (nIndex < directCount())
+        if (nIndex < directCount)
             m_aTable.m_pDirect[nIndex] = store::htonl(nAddr);
     }
 
     /** single.
     */
-    static sal_uInt16 singleCount (void)
-    {
-        return ((sal_uInt16)(STORE_LIMIT_DATAPAGE_SINGLE));
-    }
+    static const sal_uInt16 singleCount = ((sal_uInt16)(STORE_LIMIT_DATAPAGE_SINGLE));
+
     sal_uInt32 singleLink (sal_uInt16 nIndex) const
     {
-        if (nIndex < singleCount())
+        if (nIndex < singleCount)
             return store::ntohl(m_aTable.m_pSingle[nIndex]);
         else
             return STORE_PAGE_NULL;
     }
     void singleLink (sal_uInt16 nIndex, sal_uInt32 nAddr)
     {
-        if (nIndex < singleCount())
+        if (nIndex < singleCount)
             m_aTable.m_pSingle[nIndex] = store::htonl(nAddr);
     }
 
     /** double.
     */
-    static sal_uInt16 doubleCount (void)
-    {
-        return ((sal_uInt16)(STORE_LIMIT_DATAPAGE_DOUBLE));
-    }
+    static const sal_uInt16 doubleCount = ((sal_uInt16)(STORE_LIMIT_DATAPAGE_DOUBLE));
+
     sal_uInt32 doubleLink (sal_uInt16 nIndex) const
     {
-        if (nIndex < doubleCount())
+        if (nIndex < doubleCount)
             return store::ntohl(m_aTable.m_pDouble[nIndex]);
         else
             return STORE_PAGE_NULL;
     }
     void doubleLink (sal_uInt16 nIndex, sal_uInt32 nAddr)
     {
-        if (nIndex < doubleCount())
+        if (nIndex < doubleCount)
             m_aTable.m_pDouble[nIndex] = store::htonl(nAddr);
     }
 
     /** triple.
     */
-    static sal_uInt16 tripleCount (void)
-    {
-        return ((sal_uInt16)(STORE_LIMIT_DATAPAGE_TRIPLE));
-    }
+    static const sal_uInt16 tripleCount = ((sal_uInt16)(STORE_LIMIT_DATAPAGE_TRIPLE));
+
     sal_uInt32 tripleLink (sal_uInt16 nIndex) const
     {
-        if (nIndex < tripleCount())
+        if (nIndex < tripleCount)
             return store::ntohl(m_aTable.m_pTriple[nIndex]);
         else
             return STORE_PAGE_NULL;
     }
     void tripleLink (sal_uInt16 nIndex, sal_uInt32 nAddr)
     {
-        if (nIndex < tripleCount())
+        if (nIndex < tripleCount)
             m_aTable.m_pTriple[nIndex] = store::htonl(nAddr);
     }
 };
commit 5eeec1363ec4bc86f4d9c989124c1659cb8d3417
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Mar 24 09:48:40 2015 +0200

    loplugin:constantfunction: rsc
    
    Change-Id: I574bac6b25c9f36ff3d545420ea49d99a9c79b05

diff --git a/rsc/source/rscpp/cpp.h b/rsc/source/rscpp/cpp.h
index c942141..1f88f7b 100644
--- a/rsc/source/rscpp/cpp.h
+++ b/rsc/source/rscpp/cpp.h
@@ -256,10 +256,7 @@ int rscpp_main( int argc, char **argv );
 
 
 void InitCpp1( void );
-void InitCpp2( void );
-void InitCpp3( void );
 void InitCpp4( void );
-void InitCpp5( void );
 void InitCpp6( void );
 
 #define HELLO()   fprintf( stderr, "[Hello at %s, %d] ", __FILE__, __LINE__ )
diff --git a/rsc/source/rscpp/cpp1.c b/rsc/source/rscpp/cpp1.c
index 795bbab..d8e20f4 100644
--- a/rsc/source/rscpp/cpp1.c
+++ b/rsc/source/rscpp/cpp1.c
@@ -244,10 +244,7 @@ int MAIN(int argc, char** argv)
 
     nRunde++;
     InitCpp1();
-    InitCpp2();
-    InitCpp3();
     InitCpp4();
-    InitCpp5();
     InitCpp6();
 
     initdefines();                          /* O.S. specific def's  */
diff --git a/rsc/source/rscpp/cpp2.c b/rsc/source/rscpp/cpp2.c
index e38914a..45dd492 100644
--- a/rsc/source/rscpp/cpp2.c
+++ b/rsc/source/rscpp/cpp2.c
@@ -48,11 +48,6 @@
 #endif
 
 
-void InitCpp2()
-{
-
-}
-
 /*
  * Process #control lines.  Simple commands are processed inline,
  * while complex commands have their own subroutines.
diff --git a/rsc/source/rscpp/cpp3.c b/rsc/source/rscpp/cpp3.c
index 9c4ae29..60762d8 100644
--- a/rsc/source/rscpp/cpp3.c
+++ b/rsc/source/rscpp/cpp3.c
@@ -32,11 +32,6 @@
 #include <signal.h>
 #endif
 
-void InitCpp3()
-{
-}
-
-
 /*
  * Open a file, add it to the linked list of open files.
  * This is called only from openfile() above.
diff --git a/rsc/source/rscpp/cpp5.c b/rsc/source/rscpp/cpp5.c
index 765f730..499219b 100644
--- a/rsc/source/rscpp/cpp5.c
+++ b/rsc/source/rscpp/cpp5.c
@@ -180,12 +180,6 @@ SIZES size_table[] = {
     { 0,    0,      0       },  /* End of table */
 };
 
-void InitCpp5()
-{
-
-}
-
-
 /*
  * Evaluate an expression.  Straight-forward operator precedence.
  * This is called from control() on encountering an #if statement.


More information about the Libreoffice-commits mailing list