diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-03-04 08:57:28 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-03-05 12:12:26 +0100 |
commit | 191f85df5851473af270be486f95f940e3091fef (patch) | |
tree | 753d9513ccda8ee2a132bdad74eedc47bd71b179 /forms | |
parent | 983566119c926d0e2478f74548f00a789de55c15 (diff) |
re-land "new loplugin typedefparam""
This reverts commit c9bb48386bad7d2a40e6958883328145ae439cad,
and adds a bunch more fixes.
Change-Id: Ib584d302a73125528eba85fa1e722cb6fc41538a
Reviewed-on: https://gerrit.libreoffice.org/68680
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'forms')
-rw-r--r-- | forms/source/solar/inc/navtoolbar.hxx | 4 | ||||
-rw-r--r-- | forms/source/xforms/model.cxx | 8 | ||||
-rw-r--r-- | forms/source/xforms/model.hxx | 44 | ||||
-rw-r--r-- | forms/source/xforms/model_ui.cxx | 30 |
4 files changed, 45 insertions, 41 deletions
diff --git a/forms/source/solar/inc/navtoolbar.hxx b/forms/source/solar/inc/navtoolbar.hxx index 47347b9dc087..e5db22177383 100644 --- a/forms/source/solar/inc/navtoolbar.hxx +++ b/forms/source/solar/inc/navtoolbar.hxx @@ -33,8 +33,8 @@ namespace frm class IFeatureDispatcher; class ICommandImageProvider; class ICommandDescriptionProvider; - class ImplNavToolBar; + typedef std::shared_ptr< const ICommandImageProvider > PCommandImageProvider; class NavigationToolBar final : public vcl::Window { @@ -66,7 +66,7 @@ namespace frm NavigationToolBar( vcl::Window* _pParent, WinBits _nStyle, - const std::shared_ptr< const ICommandImageProvider >& _pImageProvider, + const PCommandImageProvider& _pImageProvider, const OUString & sModuleId ); virtual ~NavigationToolBar( ) override; diff --git a/forms/source/xforms/model.cxx b/forms/source/xforms/model.cxx index 4028996e41c3..d881d0ec1d56 100644 --- a/forms/source/xforms/model.cxx +++ b/forms/source/xforms/model.cxx @@ -507,13 +507,13 @@ css::uno::Reference<css::xml::dom::XDocument> SAL_CALL Model::getDefaultInstance // bindings management -Model::XPropertySet_t SAL_CALL Model::createBinding() +css::uno::Reference<css::beans::XPropertySet> SAL_CALL Model::createBinding() { DBG_INVARIANT(); return new Binding(); } -Model::XPropertySet_t Model::cloneBinding( const XPropertySet_t& xBinding ) +css::uno::Reference<css::beans::XPropertySet> Model::cloneBinding( const css::uno::Reference<css::beans::XPropertySet>& xBinding ) { DBG_INVARIANT(); XPropertySet_t xNewBinding = createBinding(); @@ -521,7 +521,7 @@ Model::XPropertySet_t Model::cloneBinding( const XPropertySet_t& xBinding ) return xNewBinding; } -Model::XPropertySet_t Model::getBinding( const OUString& sId ) +css::uno::Reference<css::beans::XPropertySet> Model::getBinding( const OUString& sId ) { DBG_INVARIANT(); return mxBindings->hasItem( sId ) ? mxBindings->getItem( sId ) : nullptr; @@ -543,7 +543,7 @@ css::uno::Reference<css::xforms::XSubmission> Model::createSubmission() return new Submission(); } -css::uno::Reference<css::xforms::XSubmission> Model::cloneSubmission(const XPropertySet_t& xSubmission) +css::uno::Reference<css::xforms::XSubmission> Model::cloneSubmission(const css::uno::Reference<css::beans::XPropertySet>& xSubmission) { DBG_INVARIANT(); css::uno::Reference<css::xforms::XSubmission> xNewSubmission = createSubmission(); diff --git a/forms/source/xforms/model.hxx b/forms/source/xforms/model.hxx index df08dee8ab48..6d956576778c 100644 --- a/forms/source/xforms/model.hxx +++ b/forms/source/xforms/model.hxx @@ -214,11 +214,11 @@ public: // XModel: binding management - virtual XPropertySet_t SAL_CALL createBinding() override; + virtual css::uno::Reference<css::beans::XPropertySet> SAL_CALL createBinding() override; - virtual XPropertySet_t SAL_CALL cloneBinding( const XPropertySet_t& ) override; + virtual css::uno::Reference<css::beans::XPropertySet> SAL_CALL cloneBinding( const css::uno::Reference<css::beans::XPropertySet>& ) override; - virtual XPropertySet_t SAL_CALL getBinding( const OUString& ) override; + virtual css::uno::Reference<css::beans::XPropertySet> SAL_CALL getBinding( const OUString& ) override; virtual css::uno::Reference<css::container::XSet> SAL_CALL getBindings() override; @@ -227,7 +227,7 @@ public: virtual css::uno::Reference<css::xforms::XSubmission> SAL_CALL createSubmission() override; - virtual css::uno::Reference<css::xforms::XSubmission> SAL_CALL cloneSubmission( const XPropertySet_t& ) override; + virtual css::uno::Reference<css::xforms::XSubmission> SAL_CALL cloneSubmission( const css::uno::Reference<css::beans::XPropertySet>& ) override; virtual css::uno::Reference<css::xforms::XSubmission> SAL_CALL getSubmission( const OUString& ) override; @@ -263,10 +263,10 @@ public: /// determine a reasonable control service for a given node /// (based on data type MIP assigned to the node) - virtual OUString SAL_CALL getDefaultServiceNameForNode( const XNode_t& xNode ) override; + virtual OUString SAL_CALL getDefaultServiceNameForNode( const css::uno::Reference<css::xml::dom::XNode>& xNode ) override; /// call getDefaultBindingExpressionForNode with default evaluation context - virtual OUString SAL_CALL getDefaultBindingExpressionForNode( const XNode_t& xNode ) override; + virtual OUString SAL_CALL getDefaultBindingExpressionForNode( const css::uno::Reference<css::xml::dom::XNode>& xNode ) override; /// determine a reasonable default binding expression for a given node /// and a given evaluation context @@ -275,20 +275,20 @@ public: const XNode_t&, const EvaluationContext& ); - virtual OUString SAL_CALL getNodeDisplayName( const XNode_t&, + virtual OUString SAL_CALL getNodeDisplayName( const css::uno::Reference<css::xml::dom::XNode>&, sal_Bool bDetail ) override; - virtual OUString SAL_CALL getNodeName( const XNode_t& ) override; + virtual OUString SAL_CALL getNodeName( const css::uno::Reference<css::xml::dom::XNode>& ) override; - virtual OUString SAL_CALL getBindingName( const XPropertySet_t&, + virtual OUString SAL_CALL getBindingName( const css::uno::Reference< ::css::beans::XPropertySet >&, sal_Bool bDetail ) override; - virtual OUString SAL_CALL getSubmissionName( const XPropertySet_t&, + virtual OUString SAL_CALL getSubmissionName( const css::uno::Reference< ::css::beans::XPropertySet >&, sal_Bool bDetail ) override; - virtual XPropertySet_t SAL_CALL cloneBindingAsGhost( const XPropertySet_t& ) override; + virtual css::uno::Reference< ::css::beans::XPropertySet > SAL_CALL cloneBindingAsGhost( const css::uno::Reference< ::css::beans::XPropertySet >& ) override; - virtual void SAL_CALL removeBindingIfUseless( const XPropertySet_t& ) override; + virtual void SAL_CALL removeBindingIfUseless( const css::uno::Reference< ::css::beans::XPropertySet >& ) override; virtual css::uno::Reference<css::xml::dom::XDocument> SAL_CALL newInstance( const OUString& sName, const OUString& sURL, @@ -312,22 +312,26 @@ public: const OUString& sName ) override; - virtual XNode_t SAL_CALL createElement( const XNode_t& xParent, + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL createElement( + const css::uno::Reference< ::css::xml::dom::XNode >& xParent, const OUString& sName ) override; - virtual XNode_t SAL_CALL createAttribute( const XNode_t& xParent, + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL createAttribute( + const css::uno::Reference< ::css::xml::dom::XNode >& xParent, const OUString& sName ) override; - virtual XNode_t SAL_CALL renameNode( const XNode_t& xNode, + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL renameNode( + const css::uno::Reference< ::css::xml::dom::XNode >& xNode, const OUString& sName ) override; - virtual XPropertySet_t SAL_CALL getBindingForNode( const XNode_t&, - sal_Bool bCreate ) override; + virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getBindingForNode( const + css::uno::Reference<css::xml::dom::XNode>&, + sal_Bool bCreate ) override; - virtual void SAL_CALL removeBindingForNode( const XNode_t& ) override; + virtual void SAL_CALL removeBindingForNode( const css::uno::Reference< ::css::xml::dom::XNode >& ) override; virtual OUString SAL_CALL getResultForExpression( - const XPropertySet_t& xBinding, + const css::uno::Reference< css::beans::XPropertySet >& xBinding, sal_Bool bIsBindingExpression, const OUString& sExpression ) override; @@ -336,7 +340,7 @@ public: virtual sal_Bool SAL_CALL isValidPrefixName( const OUString& sName ) override; virtual void SAL_CALL setNodeValue( - const XNode_t& xNode, + const css::uno::Reference< ::css::xml::dom::XNode >& xNode, const OUString& sValue ) override; diff --git a/forms/source/xforms/model_ui.cxx b/forms/source/xforms/model_ui.cxx index 93bd72f06951..521f710fbc50 100644 --- a/forms/source/xforms/model_ui.cxx +++ b/forms/source/xforms/model_ui.cxx @@ -67,7 +67,7 @@ using namespace com::sun::star::xml::xpath; // implement XFormsUIHelper1 -OUString Model::getDefaultServiceNameForNode( const XNode_t& xNode ) +OUString Model::getDefaultServiceNameForNode( const css::uno::Reference<css::xml::dom::XNode>& xNode ) { // determine service for control. string/text field is default. OUString sService = "com.sun.star.form.component.TextField"; @@ -248,7 +248,7 @@ OUString Model::getDefaultBindingExpressionForNode( } -OUString Model::getDefaultBindingExpressionForNode( const XNode_t& xNode ) +OUString Model::getDefaultBindingExpressionForNode( const css::uno::Reference<css::xml::dom::XNode>& xNode ) { return getDefaultBindingExpressionForNode( xNode, getEvaluationContext() ); } @@ -270,7 +270,7 @@ static bool lcl_isWhitespace( const OUString& rString ) return bWhitespace; } -OUString Model::getNodeDisplayName( const XNode_t& xNode, +OUString Model::getNodeDisplayName( const css::uno::Reference<css::xml::dom::XNode>& xNode, sal_Bool bDetail ) { OUStringBuffer aBuffer; @@ -312,7 +312,7 @@ OUString Model::getNodeDisplayName( const XNode_t& xNode, return aBuffer.makeStringAndClear(); } -OUString Model::getNodeName( const XNode_t& xNode ) +OUString Model::getNodeName( const css::uno::Reference<css::xml::dom::XNode>& xNode ) { OUStringBuffer aBuffer; @@ -334,7 +334,7 @@ OUString Model::getNodeName( const XNode_t& xNode ) return aBuffer.makeStringAndClear(); } -OUString Model::getBindingName( const XPropertySet_t& xBinding, +OUString Model::getBindingName( const css::uno::Reference< ::css::beans::XPropertySet >& xBinding, sal_Bool /*bDetail*/ ) { OUString sID; @@ -353,7 +353,7 @@ OUString Model::getBindingName( const XPropertySet_t& xBinding, return sRet; } -OUString Model::getSubmissionName( const XPropertySet_t& xSubmission, +OUString Model::getSubmissionName( const css::uno::Reference< ::css::beans::XPropertySet >& xSubmission, sal_Bool /*bDetail*/ ) { OUString sID; @@ -361,7 +361,7 @@ OUString Model::getSubmissionName( const XPropertySet_t& xSubmission, return sID; } -Model::XPropertySet_t Model::cloneBindingAsGhost( const XPropertySet_t &xBinding ) +css::uno::Reference< ::css::beans::XPropertySet > Model::cloneBindingAsGhost( const css::uno::Reference< ::css::beans::XPropertySet > &xBinding ) { // Create a new binding instance first... Binding *pBinding = new Binding(); @@ -377,7 +377,7 @@ Model::XPropertySet_t Model::cloneBindingAsGhost( const XPropertySet_t &xBinding return xNewBinding; } -void Model::removeBindingIfUseless( const XPropertySet_t& xBinding ) +void Model::removeBindingIfUseless( const css::uno::Reference< ::css::beans::XPropertySet >& xBinding ) { Binding* pBinding = Binding::getBinding( xBinding ); if( pBinding != nullptr ) @@ -542,7 +542,7 @@ void Model::removeModel( const Reference<css::frame::XModel>& xCmp, } } -Model::XNode_t Model::createElement( const XNode_t& xParent, +css::uno::Reference<css::xml::dom::XNode> Model::createElement( const css::uno::Reference<css::xml::dom::XNode>& xParent, const OUString& sName ) { Reference<XNode> xNode; @@ -556,7 +556,7 @@ Model::XNode_t Model::createElement( const XNode_t& xParent, return xNode; } -Model::XNode_t Model::createAttribute( const XNode_t& xParent, +css::uno::Reference<css::xml::dom::XNode> Model::createAttribute( const css::uno::Reference<css::xml::dom::XNode>& xParent, const OUString& sName ) { Reference<XNode> xNode; @@ -581,7 +581,7 @@ Model::XNode_t Model::createAttribute( const XNode_t& xParent, return xNode; } -Model::XNode_t Model::renameNode( const XNode_t& xNode, +css::uno::Reference<css::xml::dom::XNode> Model::renameNode( const css::uno::Reference<css::xml::dom::XNode>& xNode, const OUString& sName ) { // early out if we don't have to change the name @@ -664,7 +664,7 @@ Model::XNode_t Model::renameNode( const XNode_t& xNode, return xNew.is() ? xNew : xNode; } -Model::XPropertySet_t Model::getBindingForNode( const XNode_t& xNode, +css::uno::Reference< ::css::beans::XPropertySet > Model::getBindingForNode( const css::uno::Reference<css::xml::dom::XNode>& xNode, sal_Bool bCreate ) { OSL_ENSURE( xNode.is(), "no node?" ); @@ -720,7 +720,7 @@ Model::XPropertySet_t Model::getBindingForNode( const XNode_t& xNode, return pBestBinding; } -void Model::removeBindingForNode( const XNode_t& ) +void Model::removeBindingForNode( const css::uno::Reference<css::xml::dom::XNode>& ) { // determine whether suitable binding is still used } @@ -857,7 +857,7 @@ static OUString lcl_serializeForDisplay( const Reference<XXPathObject>& xResult } OUString Model::getResultForExpression( - const XPropertySet_t& xBinding, + const css::uno::Reference< ::css::beans::XPropertySet >& xBinding, sal_Bool bIsBindingExpression, const OUString& sExpression ) { @@ -901,7 +901,7 @@ sal_Bool Model::isValidPrefixName( const OUString& sName ) } void Model::setNodeValue( - const XNode_t& xNode, + const css::uno::Reference< ::css::xml::dom::XNode >& xNode, const OUString& sValue ) { setSimpleContent( xNode, sValue ); |