diff options
author | Noel Grandin <noel@peralex.com> | 2014-06-12 14:06:28 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-06-17 10:55:17 +0200 |
commit | 3e82897353e576dc6e3fbf55371fda5a0c3415df (patch) | |
tree | 71c2f03128885000efae1852dccb504f8355c79e /forms | |
parent | ec95abf2d8afeec38c9225ea49caa0e08d82b504 (diff) |
improve the inlinesimplememberfunctions clang plugin
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
Diffstat (limited to 'forms')
-rw-r--r-- | forms/source/xforms/binding.cxx | 18 | ||||
-rw-r--r-- | forms/source/xforms/binding.hxx | 8 | ||||
-rw-r--r-- | forms/source/xforms/computedexpression.cxx | 14 | ||||
-rw-r--r-- | forms/source/xforms/computedexpression.hxx | 7 | ||||
-rw-r--r-- | forms/source/xforms/mip.cxx | 2 | ||||
-rw-r--r-- | forms/source/xforms/mip.hxx | 4 | ||||
-rw-r--r-- | forms/source/xforms/model.cxx | 12 | ||||
-rw-r--r-- | forms/source/xforms/model.hxx | 6 | ||||
-rw-r--r-- | forms/source/xforms/pathexpression.cxx | 4 | ||||
-rw-r--r-- | forms/source/xforms/pathexpression.hxx | 2 | ||||
-rw-r--r-- | forms/source/xforms/submission.cxx | 48 | ||||
-rw-r--r-- | forms/source/xforms/submission.hxx | 24 | ||||
-rw-r--r-- | forms/source/xforms/xpathlib/extension.cxx | 8 | ||||
-rw-r--r-- | forms/source/xforms/xpathlib/extension.hxx | 4 |
14 files changed, 28 insertions, 133 deletions
diff --git a/forms/source/xforms/binding.cxx b/forms/source/xforms/binding.cxx index 677404f9841a..187d5567b66e 100644 --- a/forms/source/xforms/binding.cxx +++ b/forms/source/xforms/binding.cxx @@ -141,10 +141,6 @@ Binding::~Binding() throw() } -Binding::Model_t Binding::getModel() const -{ - return mxModel; -} void Binding::_setModel( const Model_t& xModel ) { @@ -337,10 +333,6 @@ Binding* SAL_CALL Binding::getBinding( const Reference<XPropertySet>& xPropertyS -OUString Binding::getBindingID() const -{ - return msBindingID; -} void Binding::setBindingID( const OUString& sBindingID ) { @@ -419,10 +411,6 @@ void Binding::setCalculateExpression( const OUString& sCalculate ) bindingModified(); } -OUString Binding::getType() const -{ - return msTypeName; -} void Binding::setType( const OUString& sTypeName ) { @@ -430,12 +418,6 @@ void Binding::setType( const OUString& sTypeName ) bindingModified(); } -Binding::XNameContainer_t Binding::getBindingNamespaces() const -{ - // return _getNamespaces(); - return mxNamespaces; -} - void Binding::setBindingNamespaces( const XNameContainer_t& rNamespaces ) { _setNamespaces( rNamespaces, true ); diff --git a/forms/source/xforms/binding.hxx b/forms/source/xforms/binding.hxx index b91162f7b9ad..6af252fa45dd 100644 --- a/forms/source/xforms/binding.hxx +++ b/forms/source/xforms/binding.hxx @@ -178,13 +178,13 @@ public: // property methods: get/set value - Model_t getModel() const; /// get XForms model + Model_t getModel() const { return mxModel;} /// get XForms model void _setModel( const Model_t& ); /// set XForms model (only called by Model) OUString getModelID() const; /// get ID of XForms model - OUString getBindingID() const; /// get ID for this binding + OUString getBindingID() const { return msBindingID;} /// get ID for this binding void setBindingID( const OUString& ); /// set ID for this binding OUString getBindingExpression() const; /// get binding expression @@ -207,7 +207,7 @@ public: OUString getCalculateExpression() const; /// get calculate MIP void setCalculateExpression( const OUString& ); /// set calculate MIP - OUString getType() const; /// get type name MIP (static) + OUString getType() const { return msTypeName;} /// get type name MIP (static) void setType( const OUString& ); /// set type name MIP (static) // a binding expression can only be interpreted with respect to @@ -215,7 +215,7 @@ public: // access to a binding's namespace // (set-method only changes local namespaces (but may add to model)) - XNameContainer_t getBindingNamespaces() const; /// set binding namespaces + XNameContainer_t getBindingNamespaces() const { return mxNamespaces; } void setBindingNamespaces( const XNameContainer_t& ); /// get binding nmsp. // access to the model's namespaces diff --git a/forms/source/xforms/computedexpression.cxx b/forms/source/xforms/computedexpression.cxx index b00077d47a5a..600a795e5288 100644 --- a/forms/source/xforms/computedexpression.cxx +++ b/forms/source/xforms/computedexpression.cxx @@ -70,10 +70,6 @@ ComputedExpression::~ComputedExpression() } -OUString ComputedExpression::getExpression() const -{ - return msExpression; -} void ComputedExpression::setExpression( const OUString& rExpression ) { @@ -113,12 +109,6 @@ bool ComputedExpression::isSimpleExpression() const } -const OUString ComputedExpression::_getExpressionForEvaluation() const -{ - // the default implementation is to do nothing... - return msExpression; -} - bool ComputedExpression::_evaluate( const xforms::EvaluationContext& rContext, const OUString& sExpression ) @@ -162,10 +152,6 @@ void ComputedExpression::clear() mxResult.clear(); } -Reference<XXPathObject> ComputedExpression::getXPath() const -{ - return mxResult; -} OUString ComputedExpression::getString( const OUString& rDefault ) const { diff --git a/forms/source/xforms/computedexpression.hxx b/forms/source/xforms/computedexpression.hxx index a2c43053f0b9..3f347d0cf753 100644 --- a/forms/source/xforms/computedexpression.hxx +++ b/forms/source/xforms/computedexpression.hxx @@ -66,7 +66,8 @@ protected: bool _checkExpression( const sal_Char* pExpression ) const; /// allow manipulation of the expression before it is evaluated - const OUString _getExpressionForEvaluation() const; + // the default implementation is to do nothing... + 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); @@ -82,7 +83,7 @@ public: /// get the expression string - OUString getExpression() const; + OUString getExpression() const { return msExpression;} /// set a new expression string void setExpression( const OUString& rExpression ); @@ -117,7 +118,7 @@ public: // get the result of this expression as string/bool/... // (Results will be based on the last call of evaluate(..). The caller // must call evaluate to ensure current results.) - com::sun::star::uno::Reference<com::sun::star::xml::xpath::XXPathObject> getXPath() const; + com::sun::star::uno::Reference<com::sun::star::xml::xpath::XXPathObject> getXPath() const { return mxResult;} bool getBool( bool bDefault = false ) const; OUString getString( const OUString& rDefault = OUString() ) const; diff --git a/forms/source/xforms/mip.cxx b/forms/source/xforms/mip.cxx index 493881b9170b..838d4033cbfc 100644 --- a/forms/source/xforms/mip.cxx +++ b/forms/source/xforms/mip.cxx @@ -91,13 +91,11 @@ void MIP::setConstraint( bool b ) { mbHasConstraint = true; mbConstraint = b; ms void MIP::resetConstraint() { mbHasConstraint = false; mbConstraint = true; msConstraintExplanation = OUString(); } void MIP::setConstraintExplanation( const OUString& s ) { msConstraintExplanation = s; } -OUString MIP::getConstraintExplanation() const { return msConstraintExplanation; } void MIP::setHasCalculate( bool b ) { mbHasCalculate = b; } void MIP::resetCalculate() { mbHasCalculate = false; } - OUString MIP::getTypeName() const { return msTypeName; } void MIP::setTypeName( const OUString& s ) { msTypeName = s; mbHasTypeName = true; } void MIP::resetTypeName() { msTypeName = OUString(); mbHasTypeName = false; } diff --git a/forms/source/xforms/mip.hxx b/forms/source/xforms/mip.hxx index 361f1229a40f..729e408f8833 100644 --- a/forms/source/xforms/mip.hxx +++ b/forms/source/xforms/mip.hxx @@ -64,7 +64,7 @@ public: // - type (static; default: xsd:string) // (currently default implemented as empty string) bool hasTypeName() const { return mbHasTypeName; } - OUString getTypeName() const; + OUString getTypeName() const { return msTypeName; } void setTypeName( const OUString& ); void resetTypeName(); @@ -94,7 +94,7 @@ public: // explain _why_ a constraint failed void setConstraintExplanation( const OUString& ); - OUString getConstraintExplanation() const; + OUString getConstraintExplanation() const { return msConstraintExplanation; } // - calculate (computed XPath; default: has none (false)) // (for calculate, we only store whether a calculate MIP is present; diff --git a/forms/source/xforms/model.cxx b/forms/source/xforms/model.cxx index b111d817f8f2..6c81ae1c4396 100644 --- a/forms/source/xforms/model.cxx +++ b/forms/source/xforms/model.cxx @@ -176,30 +176,18 @@ Model::IntSequence_t Model::getUnoTunnelID() return aImplementationId.getImplementationId(); } -Model::XDocument_t Model::getForeignSchema() const -{ - return mxForeignSchema; -} void Model::setForeignSchema( const XDocument_t& rDocument ) { mxForeignSchema = rDocument; } -OUString Model::getSchemaRef() const -{ - return msSchemaRef; -} void Model::setSchemaRef( const OUString& rSchemaRef ) { msSchemaRef = rSchemaRef; } -Model::XNameContainer_t Model::getNamespaces() const -{ - return mxNamespaces; -} void Model::setNamespaces( const XNameContainer_t& rNamespaces ) { diff --git a/forms/source/xforms/model.hxx b/forms/source/xforms/model.hxx index 5559d6a80c76..0d8b962414e5 100644 --- a/forms/source/xforms/model.hxx +++ b/forms/source/xforms/model.hxx @@ -144,15 +144,15 @@ public: // get/set that part of the schema, that we can't interpret as data types - XDocument_t getForeignSchema() const; + XDocument_t getForeignSchema() const { return mxForeignSchema;} void setForeignSchema( const XDocument_t& ); // get/set the xforms:model/@schema attribute - OUString getSchemaRef() const; + OUString getSchemaRef() const { return msSchemaRef;} void setSchemaRef( const OUString& ); // get/set namespaces for entire model - XNameContainer_t getNamespaces() const; + XNameContainer_t getNamespaces() const { return mxNamespaces;} void setNamespaces( const XNameContainer_t& ); // get/set the ExternalData property diff --git a/forms/source/xforms/pathexpression.cxx b/forms/source/xforms/pathexpression.cxx index af45a3e239a8..c8273224830b 100644 --- a/forms/source/xforms/pathexpression.cxx +++ b/forms/source/xforms/pathexpression.cxx @@ -128,10 +128,6 @@ Reference<XNode> PathExpression::getNode() const return xResult; } -const PathExpression::NodeVector_t PathExpression::getNodeList() const -{ - return maNodes; -} Reference<XNodeList> PathExpression::getXNodeList() const { diff --git a/forms/source/xforms/pathexpression.hxx b/forms/source/xforms/pathexpression.hxx index 9e0a41b74262..a01aec66a29d 100644 --- a/forms/source/xforms/pathexpression.hxx +++ b/forms/source/xforms/pathexpression.hxx @@ -70,7 +70,7 @@ public: // get the result of this expression as node/node list/... com::sun::star::uno::Reference<com::sun::star::xml::dom::XNode> getNode() const; - const NodeVector_t getNodeList() const; + const NodeVector_t getNodeList() const { return maNodes;} com::sun::star::uno::Reference<com::sun::star::xml::dom::XNodeList> getXNodeList() const; }; diff --git a/forms/source/xforms/submission.cxx b/forms/source/xforms/submission.cxx index a3eb261f6943..82fb8b9bb682 100644 --- a/forms/source/xforms/submission.cxx +++ b/forms/source/xforms/submission.cxx @@ -105,30 +105,18 @@ Submission::~Submission() throw() { } -Reference<XModel> Submission::getModel() const -{ - return mxModel; -} void Submission::setModel( const Reference<XModel>& xModel ) { mxModel = xModel; } -OUString Submission::getID() const -{ - return msID; -} void Submission::setID( const OUString& sID ) { msID = sID; } -OUString Submission::getBind() const -{ - return msBind; -} void Submission::setBind( const OUString& sBind ) { @@ -145,30 +133,18 @@ void Submission::setRef( const OUString& sRef ) maRef.setExpression( sRef ); } -OUString Submission::getAction() const -{ - return msAction; -} void Submission::setAction( const OUString& sAction ) { msAction = sAction; } -OUString Submission::getMethod() const -{ - return msMethod; -} void Submission::setMethod( const OUString& sMethod ) { msMethod = sMethod; } -OUString Submission::getVersion() const -{ - return msVersion; -} void Submission::setVersion( const OUString& sVersion ) { @@ -181,20 +157,12 @@ void Submission::setIndent( bool bIndent ) mbIndent = bIndent; } -OUString Submission::getMediaType() const -{ - return msMediaType; -} void Submission::setMediaType( const OUString& sMediaType ) { msMediaType = sMediaType; } -OUString Submission::getEncoding() const -{ - return msEncoding; -} void Submission::setEncoding( const OUString& sEncoding ) { @@ -213,40 +181,24 @@ void Submission::setStandalone( bool bStandalone ) mbStandalone = bStandalone; } -OUString Submission::getCDataSectionElement() const -{ - return msCDataSectionElement; -} void Submission::setCDataSectionElement( const OUString& sCDataSectionElement ) { msCDataSectionElement = sCDataSectionElement; } -OUString Submission::getReplace() const -{ - return msReplace; -} void Submission::setReplace( const OUString& sReplace ) { msReplace = sReplace; } -OUString Submission::getSeparator() const -{ - return msSeparator; -} void Submission::setSeparator( const OUString& sSeparator ) { msSeparator = sSeparator; } -Sequence< OUString > Submission::getIncludeNamespacePrefixes() const -{ - return msIncludeNamespacePrefixes; -} void Submission::setIncludeNamespacePrefixes( const Sequence< OUString >& rIncludeNamespacePrefixes ) { diff --git a/forms/source/xforms/submission.hxx b/forms/source/xforms/submission.hxx index a431f54c856d..a7d45b42be29 100644 --- a/forms/source/xforms/submission.hxx +++ b/forms/source/xforms/submission.hxx @@ -102,37 +102,37 @@ public: /// get XForms model com::sun::star::uno::Reference<com::sun::star::xforms::XModel> - getModel() const; + getModel() const { return mxModel;} /// set XForms model void setModel( const com::sun::star::uno::Reference<com::sun::star::xforms::XModel>& ); - OUString getID() const; /// get ID for this submission + OUString getID() const { return msID;} /// get ID for this submission void setID( const OUString& ); /// set ID for this submission - OUString getBind() const; + OUString getBind() const { return msBind;} void setBind( const OUString& ); OUString getRef() const; void setRef( const OUString& ); - OUString getAction() const; + OUString getAction() const { return msAction;} void setAction( const OUString& ); - OUString getMethod() const; + OUString getMethod() const { return msMethod;} void setMethod( const OUString& ); - OUString getVersion() const; + OUString getVersion() const { return msVersion;} void setVersion( const OUString& ); bool getIndent() const { return mbIndent;} void setIndent( bool ); - OUString getMediaType() const; + OUString getMediaType() const { return msMediaType;} void setMediaType( const OUString& ); - OUString getEncoding() const; + OUString getEncoding() const { return msEncoding;} void setEncoding( const OUString& ); bool getOmitXmlDeclaration() const { return mbOmitXmlDeclaration;} @@ -141,16 +141,16 @@ public: bool getStandalone() const { return mbStandalone;} void setStandalone( bool ); - OUString getCDataSectionElement() const; + OUString getCDataSectionElement() const { return msCDataSectionElement;} void setCDataSectionElement( const OUString& ); - OUString getReplace() const; + OUString getReplace() const { return msReplace;} void setReplace( const OUString& ); - OUString getSeparator() const; + OUString getSeparator() const { return msSeparator;} void setSeparator( const OUString& ); - com::sun::star::uno::Sequence< OUString > getIncludeNamespacePrefixes() const; + com::sun::star::uno::Sequence< OUString > getIncludeNamespacePrefixes() const { return msIncludeNamespacePrefixes;} void setIncludeNamespacePrefixes( const com::sun::star::uno::Sequence< OUString >& ); diff --git a/forms/source/xforms/xpathlib/extension.cxx b/forms/source/xforms/xpathlib/extension.cxx index 4e57632588ed..23b7f270ac1b 100644 --- a/forms/source/xforms/xpathlib/extension.cxx +++ b/forms/source/xforms/xpathlib/extension.cxx @@ -83,15 +83,7 @@ void SAL_CALL CLibxml2XFormsExtension::initialize(const Sequence< Any >& aSequen } } -Reference< XModel > CLibxml2XFormsExtension::getModel() -{ - return m_aModel; -} -Reference< XNode > CLibxml2XFormsExtension::getContextNode() -{ - return m_aContextNode; -} extern "C" void SAL_CALL createRegistryInfo_CLibxml2XFormsExtension() { diff --git a/forms/source/xforms/xpathlib/extension.hxx b/forms/source/xforms/xpathlib/extension.hxx index e631d55935b8..bbb9d9838615 100644 --- a/forms/source/xforms/xpathlib/extension.hxx +++ b/forms/source/xforms/xpathlib/extension.hxx @@ -52,8 +52,8 @@ public: static OUString SAL_CALL getImplementationName_Static(); static com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames_Static(); - com::sun::star::uno::Reference< com::sun::star::xforms::XModel > getModel(); - com::sun::star::uno::Reference< com::sun::star::xml::dom::XNode > getContextNode(); + com::sun::star::uno::Reference< com::sun::star::xforms::XModel > getModel() { return m_aModel;} + com::sun::star::uno::Reference< com::sun::star::xml::dom::XNode > getContextNode() { return m_aContextNode;} virtual com::sun::star::xml::xpath::Libxml2ExtensionHandle SAL_CALL getLibxml2ExtensionHandle() throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL initialize(const com::sun::star::uno::Sequence< com::sun::star::uno::Any >& aSequence) throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; |