diff options
author | Noel Grandin <noel@peralex.com> | 2015-04-28 13:35:55 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-05-05 09:30:40 +0200 |
commit | e95b073790d0f6ddba6bb8e044a6c382627cfe9b (patch) | |
tree | cbd4470905c880c6032a3f592f65730e2b7c2bae /forms | |
parent | 86172696f337317320f857016287e4a8850e613c (diff) |
loplugin:staticmethods
Change-Id: I60678dfd1bd0d2e4754dbbe6ba053e90d5870780
Diffstat (limited to 'forms')
-rw-r--r-- | forms/source/component/Button.cxx | 3 | ||||
-rw-r--r-- | forms/source/component/DatabaseForm.cxx | 2 | ||||
-rw-r--r-- | forms/source/component/DatabaseForm.hxx | 6 | ||||
-rw-r--r-- | forms/source/component/Grid.cxx | 2 | ||||
-rw-r--r-- | forms/source/component/Grid.hxx | 2 | ||||
-rw-r--r-- | forms/source/component/formcontrolfont.cxx | 6 | ||||
-rw-r--r-- | forms/source/inc/formcontrolfont.hxx | 8 | ||||
-rw-r--r-- | forms/source/inc/formnavigation.hxx | 4 | ||||
-rw-r--r-- | forms/source/richtext/featuredispatcher.cxx | 2 | ||||
-rw-r--r-- | forms/source/richtext/featuredispatcher.hxx | 4 | ||||
-rw-r--r-- | forms/source/runtime/formoperations.cxx | 2 | ||||
-rw-r--r-- | forms/source/runtime/formoperations.hxx | 2 | ||||
-rw-r--r-- | forms/source/solar/control/navtoolbar.cxx | 16 | ||||
-rw-r--r-- | forms/source/solar/inc/navtoolbar.hxx | 8 | ||||
-rw-r--r-- | forms/source/xforms/binding.cxx | 2 | ||||
-rw-r--r-- | forms/source/xforms/binding.hxx | 2 | ||||
-rw-r--r-- | forms/source/xforms/computedexpression.hxx | 2 | ||||
-rw-r--r-- | forms/source/xforms/submission.hxx | 2 | ||||
-rw-r--r-- | forms/source/xforms/submission/serialization_urlencoded.hxx | 4 |
19 files changed, 45 insertions, 34 deletions
diff --git a/forms/source/component/Button.cxx b/forms/source/component/Button.cxx index 41e8e357ca75..2f318597d94c 100644 --- a/forms/source/component/Button.cxx +++ b/forms/source/component/Button.cxx @@ -667,8 +667,7 @@ sal_Int16 OButtonControl::getModelUrlFeatureId( ) const // is it a feature URL? if ( isFormControllerURL( sUrl ) ) { - OFormNavigationMapper aMapper( m_xContext ); - nFeatureId = aMapper.getFeatureId( sUrl ); + nFeatureId = OFormNavigationMapper::getFeatureId( sUrl ); } } diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index 1ba1e15e663b..f91ec082aba9 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -929,7 +929,7 @@ void ODatabaseForm::FillSuccessfulList( HtmlSuccessfulObjList& rList, } -void ODatabaseForm::Encode( OUString& rString ) const +void ODatabaseForm::Encode( OUString& rString ) { OUStringBuffer aResult; diff --git a/forms/source/component/DatabaseForm.hxx b/forms/source/component/DatabaseForm.hxx index bce4d90aabdd..4e55aef0d1ef 100644 --- a/forms/source/component/DatabaseForm.hxx +++ b/forms/source/component/DatabaseForm.hxx @@ -527,9 +527,9 @@ private: void FillSuccessfulList(HtmlSuccessfulObjList& rList, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& rxSubmitButton, const ::com::sun::star::awt::MouseEvent& MouseEvt); - void InsertTextPart(INetMIMEMessage& rParent, const OUString& rName, const OUString& rData); - bool InsertFilePart(INetMIMEMessage& rParent, const OUString& rName, const OUString& rFileName); - void Encode(OUString& rString) const; + static void InsertTextPart(INetMIMEMessage& rParent, const OUString& rName, const OUString& rData); + static bool InsertFilePart(INetMIMEMessage& rParent, const OUString& rName, const OUString& rFileName); + static void Encode(OUString& rString); ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > getConnection(); diff --git a/forms/source/component/Grid.cxx b/forms/source/component/Grid.cxx index ea95beb2733d..6b7409240dc6 100644 --- a/forms/source/component/Grid.cxx +++ b/forms/source/component/Grid.cxx @@ -692,7 +692,7 @@ Any OGridControlModel::getPropertyDefaultByHandle( sal_Int32 nHandle ) const return aReturn; } -OGridColumn* OGridControlModel::getColumnImplementation(const InterfaceRef& _rxIFace) const +OGridColumn* OGridControlModel::getColumnImplementation(const InterfaceRef& _rxIFace) { OGridColumn* pImplementation = NULL; Reference< XUnoTunnel > xUnoTunnel( _rxIFace, UNO_QUERY ); diff --git a/forms/source/component/Grid.hxx b/forms/source/component/Grid.hxx index 44a8b37e5f8a..a2f7d4771299 100644 --- a/forms/source/component/Grid.hxx +++ b/forms/source/component/Grid.hxx @@ -184,7 +184,7 @@ protected: ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> createColumn(sal_Int32 nTypeId) const; - OGridColumn* getColumnImplementation(const InterfaceRef& _rxIFace) const; + static OGridColumn* getColumnImplementation(const InterfaceRef& _rxIFace); virtual ElementDescription* createElementMetaData( ) SAL_OVERRIDE; diff --git a/forms/source/component/formcontrolfont.cxx b/forms/source/component/formcontrolfont.cxx index 7130e23e5abe..c188a079fbae 100644 --- a/forms/source/component/formcontrolfont.cxx +++ b/forms/source/component/formcontrolfont.cxx @@ -138,7 +138,7 @@ namespace frm } - bool FontControlModel::isFontRelatedProperty( sal_Int32 _nPropertyHandle ) const + bool FontControlModel::isFontRelatedProperty( sal_Int32 _nPropertyHandle ) { return isFontAggregateProperty( _nPropertyHandle ) || ( _nPropertyHandle == PROPERTY_ID_FONT ) @@ -149,7 +149,7 @@ namespace frm } - bool FontControlModel::isFontAggregateProperty( sal_Int32 _nPropertyHandle ) const + bool FontControlModel::isFontAggregateProperty( sal_Int32 _nPropertyHandle ) { return ( _nPropertyHandle == PROPERTY_ID_FONT_CHARWIDTH ) || ( _nPropertyHandle == PROPERTY_ID_FONT_ORIENTATION ) @@ -186,7 +186,7 @@ namespace frm } - void FontControlModel::describeFontRelatedProperties( Sequence< Property >& /* [out] */ _rProps ) const + void FontControlModel::describeFontRelatedProperties( Sequence< Property >& /* [out] */ _rProps) { sal_Int32 nPos = _rProps.getLength(); _rProps.realloc( nPos + 21 ); diff --git a/forms/source/inc/formcontrolfont.hxx b/forms/source/inc/formcontrolfont.hxx index 047d1999a8fc..89a2e886fb75 100644 --- a/forms/source/inc/formcontrolfont.hxx +++ b/forms/source/inc/formcontrolfont.hxx @@ -65,12 +65,12 @@ namespace frm FontControlModel( const FontControlModel* _pOriginal ); protected: - bool isFontRelatedProperty( sal_Int32 _nPropertyHandle ) const; - bool isFontAggregateProperty( sal_Int32 _nPropertyHandle ) const; + static bool isFontRelatedProperty( sal_Int32 _nPropertyHandle ); + static bool isFontAggregateProperty( sal_Int32 _nPropertyHandle ); /// appends (!) the description of all font related properties to the given sequence - void describeFontRelatedProperties( - ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& /* [out] */ _rProps ) const; + static void describeFontRelatedProperties( + ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& /* [out] */ _rProps ); void getFastPropertyValue ( ::com::sun::star::uno::Any& _rValue, sal_Int32 _nHandle ) const; bool convertFastPropertyValue ( ::com::sun::star::uno::Any& _rConvertedValue, ::com::sun::star::uno::Any& _rOldValue, sal_Int32 _nHandle, const ::com::sun::star::uno::Any& _rValue ) throw( ::com::sun::star::lang::IllegalArgumentException ); diff --git a/forms/source/inc/formnavigation.hxx b/forms/source/inc/formnavigation.hxx index 5e978ec37935..e3ecfd73872c 100644 --- a/forms/source/inc/formnavigation.hxx +++ b/forms/source/inc/formnavigation.hxx @@ -192,7 +192,7 @@ namespace frm @complexity O(log n) @return NULL if the given id is not a known feature id (which is a valid usage) */ - const char* getFeatureURLAscii( sal_Int16 _nFeatureId ); + static const char* getFeatureURLAscii( sal_Int16 _nFeatureId ); /** retrieves the feature URL belonging to an feature id @@ -210,7 +210,7 @@ namespace frm the id of the feature URL, or -1 if the URl is not known (which is a valid usage) */ - sal_Int16 getFeatureId( const OUString& _rCompleteURL ); + static sal_Int16 getFeatureId( const OUString& _rCompleteURL ); private: OFormNavigationMapper( const OFormNavigationMapper& ) SAL_DELETED_FUNCTION; diff --git a/forms/source/richtext/featuredispatcher.cxx b/forms/source/richtext/featuredispatcher.cxx index 4b6506f753cb..34c6efb73193 100644 --- a/forms/source/richtext/featuredispatcher.cxx +++ b/forms/source/richtext/featuredispatcher.cxx @@ -119,7 +119,7 @@ namespace frm } - void ORichTextFeatureDispatcher::doNotify( const Reference< XStatusListener >& _rxListener, const FeatureStateEvent& _rEvent ) const + void ORichTextFeatureDispatcher::doNotify( const Reference< XStatusListener >& _rxListener, const FeatureStateEvent& _rEvent ) { OSL_PRECOND( _rxListener.is(), "ORichTextFeatureDispatcher::doNotify: invalid listener!" ); if ( _rxListener.is() ) diff --git a/forms/source/richtext/featuredispatcher.hxx b/forms/source/richtext/featuredispatcher.hxx index eea64994c88d..df78405db874 100644 --- a/forms/source/richtext/featuredispatcher.hxx +++ b/forms/source/richtext/featuredispatcher.hxx @@ -74,10 +74,10 @@ namespace frm virtual ::com::sun::star::frame::FeatureStateEvent buildStatusEvent() const; - void doNotify( + static void doNotify( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& _rxListener, const ::com::sun::star::frame::FeatureStateEvent& _rEvent - ) const; + ); protected: // XDispatch diff --git a/forms/source/runtime/formoperations.cxx b/forms/source/runtime/formoperations.cxx index 880fa0f405ba..2ccb2df5005f 100644 --- a/forms/source/runtime/formoperations.cxx +++ b/forms/source/runtime/formoperations.cxx @@ -1411,7 +1411,7 @@ namespace frm } - sal_Int16 FormOperations::impl_gridView2ModelPos_nothrow( const Reference< XIndexAccess >& _rxColumns, sal_Int16 _nViewPos ) const + sal_Int16 FormOperations::impl_gridView2ModelPos_nothrow( const Reference< XIndexAccess >& _rxColumns, sal_Int16 _nViewPos ) { OSL_PRECOND( _rxColumns.is(), "FormOperations::impl_gridView2ModelPos_nothrow: invalid columns container!" ); try diff --git a/forms/source/runtime/formoperations.hxx b/forms/source/runtime/formoperations.hxx index 731d4007f604..9635af010566 100644 --- a/forms/source/runtime/formoperations.hxx +++ b/forms/source/runtime/formoperations.hxx @@ -246,7 +246,7 @@ namespace frm A grid control can have columns which are currently hidden, so the index of a column in the view is not necessarily the same as its index in the model. */ - sal_Int16 impl_gridView2ModelPos_nothrow( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& _rxColumns, sal_Int16 _nViewPos ) const; + static sal_Int16 impl_gridView2ModelPos_nothrow( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& _rxColumns, sal_Int16 _nViewPos ); /** moves our cursor one position to the left, caring for different possible cursor states. diff --git a/forms/source/solar/control/navtoolbar.cxx b/forms/source/solar/control/navtoolbar.cxx index 19bcd6937d5f..9d4a1d87aa45 100644 --- a/forms/source/solar/control/navtoolbar.cxx +++ b/forms/source/solar/control/navtoolbar.cxx @@ -567,8 +567,18 @@ namespace frm } } + void NavigationToolBar::forEachItemWindow( ItemWindowHandler2 _handler, const void* _pParam ) + { + for ( sal_uInt16 item = 0; item < m_pToolbar->GetItemCount(); ++item ) + { + sal_uInt16 nItemId = m_pToolbar->GetItemId( item ); + vcl::Window* pItemWindow = m_pToolbar->GetItemWindow( nItemId ); + if ( pItemWindow ) + (*_handler)( nItemId, pItemWindow, _pParam ); + } + } - void NavigationToolBar::setItemBackground( sal_uInt16 /* _nItemId */, vcl::Window* _pItemWindow, const void* _pColor ) const + void NavigationToolBar::setItemBackground( sal_uInt16 /* _nItemId */, vcl::Window* _pItemWindow, const void* _pColor ) { if ( _pColor ) _pItemWindow->SetControlBackground( *static_cast< const Color* >( _pColor ) ); @@ -577,7 +587,7 @@ namespace frm } - void NavigationToolBar::setTextLineColor( sal_uInt16 /* _nItemId */, vcl::Window* _pItemWindow, const void* _pColor ) const + void NavigationToolBar::setTextLineColor( sal_uInt16 /* _nItemId */, vcl::Window* _pItemWindow, const void* _pColor ) { if ( _pColor ) _pItemWindow->SetTextLineColor( *static_cast< const Color* >( _pColor ) ); @@ -642,7 +652,7 @@ namespace frm } - void NavigationToolBar::enableItemRTL( sal_uInt16 /*_nItemId*/, vcl::Window* _pItemWindow, const void* _pIsRTLEnabled ) const + void NavigationToolBar::enableItemRTL( sal_uInt16 /*_nItemId*/, vcl::Window* _pItemWindow, const void* _pIsRTLEnabled ) { _pItemWindow->EnableRTL( *static_cast< const sal_Bool* >( _pIsRTLEnabled ) ); } diff --git a/forms/source/solar/inc/navtoolbar.hxx b/forms/source/solar/inc/navtoolbar.hxx index 79d126655a03..1455d9b42e1b 100644 --- a/forms/source/solar/inc/navtoolbar.hxx +++ b/forms/source/solar/inc/navtoolbar.hxx @@ -140,16 +140,18 @@ namespace frm // iterating through item windows typedef void (NavigationToolBar::*ItemWindowHandler) (sal_uInt16, vcl::Window*, const void*) const; void forEachItemWindow( ItemWindowHandler _handler, const void* _pParam ); + typedef void (*ItemWindowHandler2) (sal_uInt16, vcl::Window*, const void*); + void forEachItemWindow( ItemWindowHandler2 _handler, const void* _pParam ); - void setItemBackground( sal_uInt16 /* _nItemId */, vcl::Window* _pItemWindow, const void* _pColor ) const; - void setTextLineColor( sal_uInt16 /* _nItemId */, vcl::Window* _pItemWindow, const void* _pColor ) const; + static void setItemBackground( sal_uInt16 /* _nItemId */, vcl::Window* _pItemWindow, const void* _pColor ); + static void setTextLineColor( sal_uInt16 /* _nItemId */, vcl::Window* _pItemWindow, const void* _pColor ); #if 0 void setItemWindowZoom( sal_uInt16 /* _nItemId */, vcl::Window* _pItemWindow, const void* /* _pParam */ ) const; #endif void setItemControlFont( sal_uInt16 /* _nItemId */, vcl::Window* _pItemWindow, const void* /* _pParam */ ) const; void setItemControlForeground( sal_uInt16 /* _nItemId */, vcl::Window* _pItemWindow, const void* /* _pParam */ ) const; void adjustItemWindowWidth( sal_uInt16 _nItemId, vcl::Window* _pItemWindow, const void* /* _pParam */ ) const; - void enableItemRTL( sal_uInt16 /*_nItemId*/, vcl::Window* _pItemWindow, const void* _pIsRTLEnabled ) const; + static void enableItemRTL( sal_uInt16 /*_nItemId*/, vcl::Window* _pItemWindow, const void* _pIsRTLEnabled ); }; class RecordPositionInput : public NumericField diff --git a/forms/source/xforms/binding.cxx b/forms/source/xforms/binding.cxx index a7d76aec93da..b7312cbd44e1 100644 --- a/forms/source/xforms/binding.cxx +++ b/forms/source/xforms/binding.cxx @@ -486,7 +486,7 @@ Model* Binding::getModelImpl() const return getModelImpl( mxModel ); } -Model* Binding::getModelImpl( const Model_t& xModel ) const +Model* Binding::getModelImpl( const Model_t& xModel ) { Reference<XUnoTunnel> xTunnel( xModel, UNO_QUERY ); Model* pModel = xTunnel.is() diff --git a/forms/source/xforms/binding.hxx b/forms/source/xforms/binding.hxx index 2f5e2b2bd015..ca07d0213880 100644 --- a/forms/source/xforms/binding.hxx +++ b/forms/source/xforms/binding.hxx @@ -323,7 +323,7 @@ private: /// get the model implementation xforms::Model* getModelImpl() const; - xforms::Model* getModelImpl( const Model_t& xModel ) const; + static xforms::Model* getModelImpl( const Model_t& xModel ); /// get MIP evaluation contexts /// (only valid if control has already been bound) diff --git a/forms/source/xforms/computedexpression.hxx b/forms/source/xforms/computedexpression.hxx index 3f347d0cf753..1e11fea78105 100644 --- a/forms/source/xforms/computedexpression.hxx +++ b/forms/source/xforms/computedexpression.hxx @@ -70,7 +70,7 @@ protected: const OUString _getExpressionForEvaluation() const { return msExpression; } /// obtain a (suitable) XPathAPI implementation - com::sun::star::uno::Reference<com::sun::star::xml::xpath::XXPathAPI> _getXPathAPI(const xforms::EvaluationContext& aContext); + static com::sun::star::uno::Reference<com::sun::star::xml::xpath::XXPathAPI> _getXPathAPI(const xforms::EvaluationContext& aContext); /// evaluate the expression relative to the content node. bool _evaluate( const xforms::EvaluationContext& rContext, diff --git a/forms/source/xforms/submission.hxx b/forms/source/xforms/submission.hxx index a7d45b42be29..d30fdd7663fe 100644 --- a/forms/source/xforms/submission.hxx +++ b/forms/source/xforms/submission.hxx @@ -89,7 +89,7 @@ private: com::sun::star::uno::Reference< com::sun::star::xml::dom::XDocumentFragment > createSubmissionDocument(const com::sun::star::uno::Reference< com::sun::star::xml::xpath::XXPathObject >& aObject, bool bRemoveWSNodes = false); - com::sun::star::uno::Reference< com::sun::star::xml::dom::XDocument > + static com::sun::star::uno::Reference< com::sun::star::xml::dom::XDocument > getInstanceDocument(const com::sun::star::uno::Reference< com::sun::star::xml::xpath::XXPathObject >& aObject); public: diff --git a/forms/source/xforms/submission/serialization_urlencoded.hxx b/forms/source/xforms/submission/serialization_urlencoded.hxx index 32a7ed48cc41..e10c6c7b7a75 100644 --- a/forms/source/xforms/submission/serialization_urlencoded.hxx +++ b/forms/source/xforms/submission/serialization_urlencoded.hxx @@ -31,8 +31,8 @@ class CSerializationURLEncoded : public CSerialization private: css::uno::Reference< css::io::XPipe > m_aPipe; - bool is_unreserved(sal_Char); - void encode_and_append(const OUString& aString, OStringBuffer& aBuffer); + static bool is_unreserved(sal_Char); + static void encode_and_append(const OUString& aString, OStringBuffer& aBuffer); void serialize_node(const css::uno::Reference< css::xml::dom::XNode >& aNode); void serialize_nodeset(); |