summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorPhilipp Hofer <philipp.hofer@protonmail.com>2020-11-12 12:57:37 +0100
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2020-11-13 15:17:55 +0100
commit951764106e2d82fc59dcf39e14bc17838856a00c (patch)
tree4bc069105659e5b7a8feddc420cc1ee5938e326a /forms
parent32b57a159ea6ab3b0cdef7ca9d746639d42aa192 (diff)
tdf#123936 Formatting files in module forms with clang-format
Change-Id: I230375bd002147642db37728fa0287b6a554e330 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105670 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'forms')
-rw-r--r--forms/source/component/BaseListBox.hxx9
-rw-r--r--forms/source/component/findpos.hxx10
-rw-r--r--forms/source/xforms/boolexpression.cxx17
-rw-r--r--forms/source/xforms/enumeration.cxx18
-rw-r--r--forms/source/xforms/mip.hxx21
-rw-r--r--forms/source/xforms/pathexpression.hxx21
-rw-r--r--forms/source/xforms/submission/serialization.hxx9
-rw-r--r--forms/source/xforms/submission/serialization_app_xml.hxx6
-rw-r--r--forms/source/xforms/submission/serialization_urlencoded.hxx6
-rw-r--r--forms/source/xforms/submission/submission_get.hxx7
-rw-r--r--forms/source/xforms/submission/submission_put.hxx7
-rw-r--r--forms/source/xforms/unohelper.cxx25
-rw-r--r--forms/source/xforms/xpathlib/extension.hxx19
13 files changed, 75 insertions, 100 deletions
diff --git a/forms/source/component/BaseListBox.hxx b/forms/source/component/BaseListBox.hxx
index ec3b11510307..1e3ee87a1136 100644
--- a/forms/source/component/BaseListBox.hxx
+++ b/forms/source/component/BaseListBox.hxx
@@ -22,17 +22,12 @@
#include <sal/types.h>
-
namespace frm
{
-
-const sal_uInt16 ENTRY_NOT_FOUND = 0xFFFF;
-const sal_uInt16 BOUNDCOLUMN = 0x0001;
-
-
+const sal_uInt16 ENTRY_NOT_FOUND = 0xFFFF;
+const sal_uInt16 BOUNDCOLUMN = 0x0001;
}
-
#endif // INCLUDED_FORMS_SOURCE_COMPONENT_BASELISTBOX_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/forms/source/component/findpos.hxx b/forms/source/component/findpos.hxx
index 3c108ba1d425..b279558fdab0 100644
--- a/forms/source/component/findpos.hxx
+++ b/forms/source/component/findpos.hxx
@@ -24,13 +24,9 @@
#include <com/sun/star/uno/Sequence.hxx>
#include <sal/types.h>
-
-namespace detail {
-
-sal_Int32 findPos(
- const OUString& aStr,
- const css::uno::Sequence< OUString >& rList);
-
+namespace detail
+{
+sal_Int32 findPos(const OUString& aStr, const css::uno::Sequence<OUString>& rList);
}
#endif
diff --git a/forms/source/xforms/boolexpression.cxx b/forms/source/xforms/boolexpression.cxx
index 01fd522d7170..6b3f57564d66 100644
--- a/forms/source/xforms/boolexpression.cxx
+++ b/forms/source/xforms/boolexpression.cxx
@@ -17,34 +17,29 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "boolexpression.hxx"
-
namespace xforms
{
-
/** BoolExpression represents a computed XPath expression that returns
* a bool value and caches the results.
*
* As this class has no virtual methods, it should never be used
* polymorphically. */
-BoolExpression::BoolExpression() : ComputedExpression()
+BoolExpression::BoolExpression()
+ : ComputedExpression()
{
}
-BoolExpression::~BoolExpression()
-{
-}
+BoolExpression::~BoolExpression() {}
-void BoolExpression::setExpression( const OUString& rExpression )
+void BoolExpression::setExpression(const OUString& rExpression)
{
- ComputedExpression::setExpression( rExpression );
- mbIsSimple = _checkExpression( " *(true)|(false) *\\( *\\) *" );
+ ComputedExpression::setExpression(rExpression);
+ mbIsSimple = _checkExpression(" *(true)|(false) *\\( *\\) *");
}
-
} // namespace xforms
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/forms/source/xforms/enumeration.cxx b/forms/source/xforms/enumeration.cxx
index 103803f69ac7..e02881fbbfce 100644
--- a/forms/source/xforms/enumeration.cxx
+++ b/forms/source/xforms/enumeration.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "enumeration.hxx"
#include <osl/diagnose.h>
@@ -32,17 +31,16 @@ using com::sun::star::container::XIndexAccess;
using com::sun::star::uno::Any;
using com::sun::star::uno::RuntimeException;
-
-Enumeration::Enumeration( XIndexAccess* pContainer )
- : mxContainer( pContainer ),
- mnIndex( 0 )
+Enumeration::Enumeration(XIndexAccess* pContainer)
+ : mxContainer(pContainer)
+ , mnIndex(0)
{
- OSL_ENSURE( mxContainer.is(), "no container?" );
+ OSL_ENSURE(mxContainer.is(), "no container?");
}
sal_Bool Enumeration::hasMoreElements()
{
- if( ! mxContainer.is() )
+ if (!mxContainer.is())
throw RuntimeException();
return mnIndex < mxContainer->getCount();
@@ -50,12 +48,12 @@ sal_Bool Enumeration::hasMoreElements()
Any Enumeration::nextElement()
{
- if( ! mxContainer.is() )
+ if (!mxContainer.is())
throw RuntimeException();
- if( mnIndex >= mxContainer->getCount() )
+ if (mnIndex >= mxContainer->getCount())
throw NoSuchElementException();
- return mxContainer->getByIndex( mnIndex++ );
+ return mxContainer->getByIndex(mnIndex++);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/forms/source/xforms/mip.hxx b/forms/source/xforms/mip.hxx
index f51c41384aa2..a2247b45342d 100644
--- a/forms/source/xforms/mip.hxx
+++ b/forms/source/xforms/mip.hxx
@@ -24,7 +24,6 @@
namespace xforms
{
-
/** represents the XForms *m*odel *i*tem *p*roperties (MIPs) for a
* given XNode in the instance data at a given point in time. The
* values will not be updated; for updated values new MIP objects have
@@ -54,51 +53,49 @@ public:
MIP();
/// inherit from upper-level MIPs
- void inherit( const MIP& );
+ void inherit(const MIP&);
/// join with same-level MIPs
- void join( const MIP& );
-
+ void join(const MIP&);
// - type (static; default: xsd:string)
// (currently default implemented as empty string)
const OUString& getTypeName() const { return msTypeName; }
- void setTypeName( const OUString& );
+ void setTypeName(const OUString&);
void resetTypeName();
// - readonly (computed XPath; default: false; true if calculate exists)
bool isReadonly() const;
- void setReadonly( bool );
+ void setReadonly(bool);
void resetReadonly();
// - required (computed XPath; default: false)
bool isRequired() const { return mbRequired; }
- void setRequired( bool );
+ void setRequired(bool);
void resetRequired();
// - relevant (computed XPath; default: true)
bool isRelevant() const { return mbRelevant; }
- void setRelevant( bool );
+ void setRelevant(bool);
void resetRelevant();
// - constraint (computed XPath; default: true)
bool isConstraint() const { return mbConstraint; }
- void setConstraint( bool );
+ void setConstraint(bool);
void resetConstraint();
// explain _why_ a constraint failed
- void setConstraintExplanation( const OUString& );
+ void setConstraintExplanation(const OUString&);
const OUString& getConstraintExplanation() const { return msConstraintExplanation; }
// - calculate (computed XPath; default: has none (false))
// (for calculate, we only store whether a calculate MIP is present;
// the actual calculate value is handled my changing the instance
// directly)
- void setHasCalculate( bool );
+ void setHasCalculate(bool);
// - minOccurs/maxOccurs (computed XPath; default: 0/inf)
// - p3ptype (static; no default)
-
};
} // namespace xforms
diff --git a/forms/source/xforms/pathexpression.hxx b/forms/source/xforms/pathexpression.hxx
index 23a35a033d27..03e2ca18f5f5 100644
--- a/forms/source/xforms/pathexpression.hxx
+++ b/forms/source/xforms/pathexpression.hxx
@@ -27,19 +27,20 @@
// forward declaractions
namespace com::sun::star::xml::dom
{
- class XNodeList;
- namespace events { class XEventListener; }
+class XNodeList;
+namespace events
+{
+class XEventListener;
+}
}
-
namespace xforms
{
-
/** PathExpression represents an XPath Expression and caches results */
class PathExpression final : public ComputedExpression
{
public:
- typedef std::vector<css::uno::Reference<css::xml::dom::XNode> > NodeVector_t;
+ typedef std::vector<css::uno::Reference<css::xml::dom::XNode>> NodeVector_t;
private:
/// the node-list result from the last bind (cached from mxResult)
@@ -48,7 +49,6 @@ private:
/// get expression for evaluation
OUString _getExpressionForEvaluation() const;
-
public:
PathExpression();
~PathExpression();
@@ -56,18 +56,15 @@ public:
/// set the expression string
/// (overridden to do remove old listeners)
/// (also defines simple expressions)
- void setExpression( const OUString& rExpression );
-
+ void setExpression(const OUString& rExpression);
/// evaluate the expression relative to the content node.
- void evaluate( const xforms::EvaluationContext& rContext );
-
+ void evaluate(const xforms::EvaluationContext& rContext);
// get the result of this expression as node/node list/...
css::uno::Reference<css::xml::dom::XNode> getNode() const;
- const NodeVector_t& getNodeList() const { return maNodes;}
+ const NodeVector_t& getNodeList() const { return maNodes; }
css::uno::Reference<css::xml::dom::XNodeList> getXNodeList() const;
-
};
} // namespace xforms
diff --git a/forms/source/xforms/submission/serialization.hxx b/forms/source/xforms/submission/serialization.hxx
index 74e35b1bb0ab..9c4fcce9052b 100644
--- a/forms/source/xforms/submission/serialization.hxx
+++ b/forms/source/xforms/submission/serialization.hxx
@@ -31,7 +31,7 @@ Serialize an XObject
class CSerialization
{
protected:
- css::uno::Reference< css::xml::dom::XDocumentFragment > m_aFragment;
+ css::uno::Reference<css::xml::dom::XDocumentFragment> m_aFragment;
public:
virtual ~CSerialization() {}
@@ -39,7 +39,7 @@ public:
/**
sets the XObject that is to serialized
*/
- void setSource(const css::uno::Reference< css::xml::dom::XDocumentFragment >& aFragment)
+ void setSource(const css::uno::Reference<css::xml::dom::XDocumentFragment>& aFragment)
{
m_aFragment = aFragment;
}
@@ -47,7 +47,7 @@ public:
/**
start the serialization process
*/
- virtual void serialize()=0;
+ virtual void serialize() = 0;
/**
get the serialized bytes.
@@ -55,8 +55,7 @@ public:
bytes read.
returns -1 on error
*/
- virtual css::uno::Reference< css::io::XInputStream > getInputStream() = 0;
-
+ virtual css::uno::Reference<css::io::XInputStream> getInputStream() = 0;
};
#endif
diff --git a/forms/source/xforms/submission/serialization_app_xml.hxx b/forms/source/xforms/submission/serialization_app_xml.hxx
index 3f932a5cc599..eed189943118 100644
--- a/forms/source/xforms/submission/serialization_app_xml.hxx
+++ b/forms/source/xforms/submission/serialization_app_xml.hxx
@@ -27,15 +27,15 @@
class CSerializationAppXML : public CSerialization
{
private:
- css::uno::Reference< css::io::XPipe > m_xBuffer;
+ css::uno::Reference<css::io::XPipe> m_xBuffer;
- void serialize_node(const css::uno::Reference< css::xml::dom::XNode >& aNode);
+ void serialize_node(const css::uno::Reference<css::xml::dom::XNode>& aNode);
public:
CSerializationAppXML();
virtual void serialize() override;
- virtual css::uno::Reference< css::io::XInputStream > getInputStream() override;
+ virtual css::uno::Reference<css::io::XInputStream> getInputStream() override;
};
#endif
diff --git a/forms/source/xforms/submission/serialization_urlencoded.hxx b/forms/source/xforms/submission/serialization_urlencoded.hxx
index e2977b4985ef..afd9d5488568 100644
--- a/forms/source/xforms/submission/serialization_urlencoded.hxx
+++ b/forms/source/xforms/submission/serialization_urlencoded.hxx
@@ -29,16 +29,16 @@
class CSerializationURLEncoded : public CSerialization
{
private:
- css::uno::Reference< css::io::XPipe > m_aPipe;
+ css::uno::Reference<css::io::XPipe> m_aPipe;
static bool is_unreserved(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_node(const css::uno::Reference<css::xml::dom::XNode>& aNode);
public:
CSerializationURLEncoded();
virtual void serialize() override;
- virtual css::uno::Reference< css::io::XInputStream > getInputStream() override;
+ virtual css::uno::Reference<css::io::XInputStream> getInputStream() override;
};
#endif
diff --git a/forms/source/xforms/submission/submission_get.hxx b/forms/source/xforms/submission/submission_get.hxx
index fb715c602059..6ec7c60dd103 100644
--- a/forms/source/xforms/submission/submission_get.hxx
+++ b/forms/source/xforms/submission/submission_get.hxx
@@ -25,9 +25,10 @@
class CSubmissionGet : public CSubmission
{
public:
- CSubmissionGet(const OUString& aURL, const css::uno::Reference< css::xml::dom::XDocumentFragment >& aFragment);
- virtual SubmissionResult submit(const css::uno::Reference< css::task::XInteractionHandler >& aInteractionHandler) override;
-
+ CSubmissionGet(const OUString& aURL,
+ const css::uno::Reference<css::xml::dom::XDocumentFragment>& aFragment);
+ virtual SubmissionResult
+ submit(const css::uno::Reference<css::task::XInteractionHandler>& aInteractionHandler) override;
};
#endif
diff --git a/forms/source/xforms/submission/submission_put.hxx b/forms/source/xforms/submission/submission_put.hxx
index cb1bf89b9b05..6d8a2325e3ee 100644
--- a/forms/source/xforms/submission/submission_put.hxx
+++ b/forms/source/xforms/submission/submission_put.hxx
@@ -25,9 +25,10 @@
class CSubmissionPut : public CSubmission
{
public:
- CSubmissionPut(const OUString& aURL, const css::uno::Reference< css::xml::dom::XDocumentFragment >& aFragment);
- virtual SubmissionResult submit(const css::uno::Reference< css::task::XInteractionHandler >& aInteractionHandler) override;
-
+ CSubmissionPut(const OUString& aURL,
+ const css::uno::Reference<css::xml::dom::XDocumentFragment>& aFragment);
+ virtual SubmissionResult
+ submit(const css::uno::Reference<css::task::XInteractionHandler>& aInteractionHandler) override;
};
#endif
diff --git a/forms/source/xforms/unohelper.cxx b/forms/source/xforms/unohelper.cxx
index 6d1469837a75..8576e5e29e08 100644
--- a/forms/source/xforms/unohelper.cxx
+++ b/forms/source/xforms/unohelper.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "unohelper.hxx"
#include <osl/diagnose.h>
@@ -30,7 +29,6 @@
#include <com/sun/star/beans/XPropertySetInfo.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
-
using com::sun::star::uno::Reference;
using com::sun::star::uno::Sequence;
using com::sun::star::uno::Exception;
@@ -39,34 +37,31 @@ using com::sun::star::beans::XPropertySet;
using com::sun::star::beans::XPropertySetInfo;
using com::sun::star::beans::PropertyAttribute::READONLY;
-
-void xforms::copy( const Reference<XPropertySet>& xFrom,
- Reference<XPropertySet> const & xTo )
+void xforms::copy(const Reference<XPropertySet>& xFrom, Reference<XPropertySet> const& xTo)
{
- OSL_ENSURE( xFrom.is(), "no source" );
- OSL_ENSURE( xTo.is(), "no target" );
+ OSL_ENSURE(xFrom.is(), "no source");
+ OSL_ENSURE(xTo.is(), "no target");
// get property names & infos, and iterate over target properties
- Sequence<Property> aProperties =
- xTo->getPropertySetInfo()->getProperties();
+ Sequence<Property> aProperties = xTo->getPropertySetInfo()->getProperties();
sal_Int32 nProperties = aProperties.getLength();
const Property* pProperties = aProperties.getConstArray();
Reference<XPropertySetInfo> xFromInfo = xFrom->getPropertySetInfo();
- for( sal_Int32 n = 0; n < nProperties; n++ )
+ for (sal_Int32 n = 0; n < nProperties; n++)
{
const OUString& rName = pProperties[n].Name;
// if both set have the property, copy the value
// (catch and ignore exceptions, if any)
- if( xFromInfo->hasPropertyByName( rName ) )
+ if (xFromInfo->hasPropertyByName(rName))
{
try
{
- Property aProperty = xFromInfo->getPropertyByName( rName );
- if ( ( aProperty.Attributes & READONLY ) == 0 )
- xTo->setPropertyValue(rName, xFrom->getPropertyValue( rName ));
+ Property aProperty = xFromInfo->getPropertyByName(rName);
+ if ((aProperty.Attributes & READONLY) == 0)
+ xTo->setPropertyValue(rName, xFrom->getPropertyValue(rName));
}
- catch( const Exception& )
+ catch (const Exception&)
{
// ignore any errors; we'll copy as good as we can
}
diff --git a/forms/source/xforms/xpathlib/extension.hxx b/forms/source/xforms/xpathlib/extension.hxx
index 85ec1b58e013..a7eeeec8ef87 100644
--- a/forms/source/xforms/xpathlib/extension.hxx
+++ b/forms/source/xforms/xpathlib/extension.hxx
@@ -30,23 +30,24 @@
#include <com/sun/star/xforms/XModel.hpp>
#include <com/sun/star/xml/dom/XNode.hpp>
-
-class CLibxml2XFormsExtension : public cppu::WeakImplHelper<
- css::xml::xpath::XXPathExtension, css::lang::XInitialization>
+class CLibxml2XFormsExtension
+ : public cppu::WeakImplHelper<css::xml::xpath::XXPathExtension, css::lang::XInitialization>
{
private:
- css::uno::Reference <css::xforms::XModel> m_aModel;
- css::uno::Reference <css::xml::dom::XNode> m_aContextNode;
+ css::uno::Reference<css::xforms::XModel> m_aModel;
+ css::uno::Reference<css::xml::dom::XNode> m_aContextNode;
public:
CLibxml2XFormsExtension() {}
- const css::uno::Reference< css::xforms::XModel >& getModel() const { return m_aModel;}
- const css::uno::Reference< css::xml::dom::XNode >& getContextNode() const { return m_aContextNode;}
+ const css::uno::Reference<css::xforms::XModel>& getModel() const { return m_aModel; }
+ const css::uno::Reference<css::xml::dom::XNode>& getContextNode() const
+ {
+ return m_aContextNode;
+ }
virtual css::xml::xpath::Libxml2ExtensionHandle SAL_CALL getLibxml2ExtensionHandle() override;
- virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any >& aSequence) override;
-
+ virtual void SAL_CALL initialize(const css::uno::Sequence<css::uno::Any>& aSequence) override;
};
#endif // INCLUDED_FORMS_SOURCE_XFORMS_XPATHLIB_EXTENSION_HXX