summaryrefslogtreecommitdiff
path: root/connectivity/source/inc
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2018-07-06 09:46:01 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-07-06 13:32:09 +0200
commit9eb929aa8cb3f5b0fee1264119a55cdd8cbe8f0e (patch)
treecdcaba62dbfa2ed6006e09afd71a11577477027b /connectivity/source/inc
parent59fe3d7d231e4acb0635ac899a0ab2dee6c59289 (diff)
connectivity: turn on clang-format for the Writer driver
I (tried to) keep this consistent locally with astyle in the past, switching to clang-format means consistency is enforced by CI. Change-Id: I1016e253c6536b207a05328e5f6f13de37889588 Reviewed-on: https://gerrit.libreoffice.org/57046 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins
Diffstat (limited to 'connectivity/source/inc')
-rw-r--r--connectivity/source/inc/writer/WCatalog.hxx1
-rw-r--r--connectivity/source/inc/writer/WConnection.hxx38
-rw-r--r--connectivity/source/inc/writer/WDatabaseMetaData.hxx8
-rw-r--r--connectivity/source/inc/writer/WDriver.hxx20
-rw-r--r--connectivity/source/inc/writer/WTable.hxx20
-rw-r--r--connectivity/source/inc/writer/WTables.hxx10
6 files changed, 52 insertions, 45 deletions
diff --git a/connectivity/source/inc/writer/WCatalog.hxx b/connectivity/source/inc/writer/WCatalog.hxx
index 53ac36a5d838..f076b22e4875 100644
--- a/connectivity/source/inc/writer/WCatalog.hxx
+++ b/connectivity/source/inc/writer/WCatalog.hxx
@@ -26,7 +26,6 @@ namespace connectivity
{
namespace writer
{
-
class OWriterConnection;
class OWriterCatalog : public file::OFileCatalog
{
diff --git a/connectivity/source/inc/writer/WConnection.hxx b/connectivity/source/inc/writer/WConnection.hxx
index 94d62923f3f2..7fdbdfa13310 100644
--- a/connectivity/source/inc/writer/WConnection.hxx
+++ b/connectivity/source/inc/writer/WConnection.hxx
@@ -46,7 +46,6 @@ namespace utl
class CloseVeto;
}
-
namespace connectivity
{
namespace writer
@@ -55,12 +54,13 @@ class ODriver;
class OWriterConnection : public file::OConnection
{
// the spreadsheet document:
- css::uno::Reference< css::text::XTextDocument > m_xDoc;
+ css::uno::Reference<css::text::XTextDocument> m_xDoc;
OUString m_sPassword;
OUString m_aFileName;
oslInterlockedCount m_nDocCount;
- class CloseVetoButTerminateListener : public cppu::WeakComponentImplHelper<css::frame::XTerminateListener>
+ class CloseVetoButTerminateListener
+ : public cppu::WeakComponentImplHelper<css::frame::XTerminateListener>
{
private:
/// close listener that vetoes so nobody else disposes m_xDoc
@@ -69,6 +69,7 @@ class OWriterConnection : public file::OConnection
/// its still possible to do so properly
css::uno::Reference<css::frame::XDesktop2> m_xDesktop;
osl::Mutex m_aMutex;
+
public:
CloseVetoButTerminateListener()
: cppu::WeakComponentImplHelper<css::frame::XTerminateListener>(m_aMutex)
@@ -93,9 +94,7 @@ class OWriterConnection : public file::OConnection
}
// XTerminateListener
- void SAL_CALL queryTermination(const css::lang::EventObject& /*rEvent*/) override
- {
- }
+ void SAL_CALL queryTermination(const css::lang::EventObject& /*rEvent*/) override {}
void SAL_CALL notifyTermination(const css::lang::EventObject& /*rEvent*/) override
{
@@ -123,7 +122,7 @@ public:
~OWriterConnection() override;
void construct(const OUString& rURL,
- const css::uno::Sequence< css::beans::PropertyValue >& rInfo) override;
+ const css::uno::Sequence<css::beans::PropertyValue>& rInfo) override;
// XServiceInfo
DECLARE_SERVICE_INFO();
@@ -132,22 +131,26 @@ public:
void SAL_CALL disposing() override;
// XConnection
- css::uno::Reference< css::sdbc::XDatabaseMetaData > SAL_CALL getMetaData() override;
- css::uno::Reference< css::sdbcx::XTablesSupplier > createCatalog() override;
- css::uno::Reference< css::sdbc::XStatement > SAL_CALL createStatement() override;
- css::uno::Reference< css::sdbc::XPreparedStatement > SAL_CALL prepareStatement(const OUString& sql) override;
- css::uno::Reference< css::sdbc::XPreparedStatement > SAL_CALL prepareCall(const OUString& sql) override;
+ css::uno::Reference<css::sdbc::XDatabaseMetaData> SAL_CALL getMetaData() override;
+ css::uno::Reference<css::sdbcx::XTablesSupplier> createCatalog() override;
+ css::uno::Reference<css::sdbc::XStatement> SAL_CALL createStatement() override;
+ css::uno::Reference<css::sdbc::XPreparedStatement>
+ SAL_CALL prepareStatement(const OUString& sql) override;
+ css::uno::Reference<css::sdbc::XPreparedStatement>
+ SAL_CALL prepareCall(const OUString& sql) override;
// no interface methods
- css::uno::Reference< css::text::XTextDocument> const& acquireDoc();
+ css::uno::Reference<css::text::XTextDocument> const& acquireDoc();
void releaseDoc();
class ODocHolder
{
OWriterConnection* m_pConnection;
- css::uno::Reference< css::text::XTextDocument> m_xDoc;
+ css::uno::Reference<css::text::XTextDocument> m_xDoc;
+
public:
- ODocHolder(OWriterConnection* _pConnection) : m_pConnection(_pConnection)
+ ODocHolder(OWriterConnection* _pConnection)
+ : m_pConnection(_pConnection)
{
m_xDoc = m_pConnection->acquireDoc();
}
@@ -156,10 +159,7 @@ public:
m_xDoc.clear();
m_pConnection->releaseDoc();
}
- const css::uno::Reference< css::text::XTextDocument>& getDoc() const
- {
- return m_xDoc;
- }
+ const css::uno::Reference<css::text::XTextDocument>& getDoc() const { return m_xDoc; }
};
};
}
diff --git a/connectivity/source/inc/writer/WDatabaseMetaData.hxx b/connectivity/source/inc/writer/WDatabaseMetaData.hxx
index 46f47b328e5e..b2d85cfa3050 100644
--- a/connectivity/source/inc/writer/WDatabaseMetaData.hxx
+++ b/connectivity/source/inc/writer/WDatabaseMetaData.hxx
@@ -26,13 +26,17 @@ namespace connectivity
{
namespace writer
{
-
class OWriterDatabaseMetaData : public component::OComponentDatabaseMetaData
{
OUString SAL_CALL getURL() override;
- css::uno::Reference< css::sdbc::XResultSet > SAL_CALL getTables(const css::uno::Any& catalog, const OUString& schemaPattern, const OUString& tableNamePattern, const css::uno::Sequence< OUString >& types) override;
+ css::uno::Reference<css::sdbc::XResultSet>
+ SAL_CALL getTables(const css::uno::Any& catalog, const OUString& schemaPattern,
+ const OUString& tableNamePattern,
+ const css::uno::Sequence<OUString>& types) override;
+
protected:
~OWriterDatabaseMetaData() override;
+
public:
OWriterDatabaseMetaData(file::OConnection* pConnection);
};
diff --git a/connectivity/source/inc/writer/WDriver.hxx b/connectivity/source/inc/writer/WDriver.hxx
index 47cae04c6e47..aa164df930da 100644
--- a/connectivity/source/inc/writer/WDriver.hxx
+++ b/connectivity/source/inc/writer/WDriver.hxx
@@ -41,26 +41,28 @@ namespace connectivity
namespace writer
{
/// @throws css::uno::Exception
-css::uno::Reference< css::uno::XInterface >
-ODriver_CreateInstance(const css::uno::Reference< css::lang::XMultiServiceFactory >& _rxFactory);
+css::uno::Reference<css::uno::XInterface>
+ODriver_CreateInstance(const css::uno::Reference<css::lang::XMultiServiceFactory>& _rxFactory);
class ODriver : public file::OFileDriver
{
public:
- ODriver(const css::uno::Reference<
- css::uno::XComponentContext >& _rxContext) :
- file::OFileDriver(_rxContext) {}
+ ODriver(const css::uno::Reference<css::uno::XComponentContext>& _rxContext)
+ : file::OFileDriver(_rxContext)
+ {
+ }
/// @throws css::uno::RuntimeException
static OUString getImplementationName_Static();
OUString SAL_CALL getImplementationName() override;
// XDriver
- css::uno::Reference< css::sdbc::XConnection > SAL_CALL
- connect(const OUString& url, const css::uno::Sequence<
- css::beans::PropertyValue >& info) override;
+ css::uno::Reference<css::sdbc::XConnection>
+ SAL_CALL connect(const OUString& url,
+ const css::uno::Sequence<css::beans::PropertyValue>& info) override;
sal_Bool SAL_CALL acceptsURL(const OUString& url) override;
- css::uno::Sequence< css::sdbc::DriverPropertyInfo > SAL_CALL getPropertyInfo(const OUString& url, const css::uno::Sequence< css::beans::PropertyValue >& info) override;
+ css::uno::Sequence<css::sdbc::DriverPropertyInfo> SAL_CALL getPropertyInfo(
+ const OUString& url, const css::uno::Sequence<css::beans::PropertyValue>& info) override;
};
}
}
diff --git a/connectivity/source/inc/writer/WTable.hxx b/connectivity/source/inc/writer/WTable.hxx
index 4f3b9d129d46..d8cef045f581 100644
--- a/connectivity/source/inc/writer/WTable.hxx
+++ b/connectivity/source/inc/writer/WTable.hxx
@@ -50,7 +50,6 @@ class XNumberFormats;
}
}
-
namespace connectivity
{
namespace writer
@@ -58,34 +57,33 @@ namespace writer
using OWriterTable_BASE = component::OComponentTable;
class OWriterConnection;
-class OWriterTable : public OWriterTable_BASE
+class OWriterTable : public OWriterTable_BASE
{
private:
- std::vector<sal_Int32> m_aTypes; // holds all type for columns just to avoid to ask the propertyset
+ std::vector<sal_Int32>
+ m_aTypes; // holds all type for columns just to avoid to ask the propertyset
std::vector<sal_Int32> m_aPrecisions; // same as aboth
std::vector<sal_Int32> m_aScales;
- css::uno::Reference< css::text::XTextTable > m_xTable;
+ css::uno::Reference<css::text::XTextTable> m_xTable;
OWriterConnection* m_pWriterConnection;
sal_Int32 m_nStartCol;
sal_Int32 m_nDataCols;
- bool m_bHasHeaders;
- css::uno::Reference< css::util::XNumberFormats > m_xFormats;
+ bool m_bHasHeaders;
+ css::uno::Reference<css::util::XNumberFormats> m_xFormats;
void fillColumns();
public:
OWriterTable(sdbcx::OCollection* _pTables, OWriterConnection* _pConnection,
- const OUString& Name,
- const OUString& Type
- );
+ const OUString& Name, const OUString& Type);
bool fetchRow(OValueRefRow& _rRow, const OSQLColumns& _rCols, bool bRetrieveData) override;
void SAL_CALL disposing() override;
// css::lang::XUnoTunnel
- sal_Int64 SAL_CALL getSomething(const css::uno::Sequence< sal_Int8 >& rId) override;
- static css::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
+ sal_Int64 SAL_CALL getSomething(const css::uno::Sequence<sal_Int8>& rId) override;
+ static css::uno::Sequence<sal_Int8> getUnoTunnelImplementationId();
void construct() override;
};
diff --git a/connectivity/source/inc/writer/WTables.hxx b/connectivity/source/inc/writer/WTables.hxx
index 939178a90bd2..5477d89e0e19 100644
--- a/connectivity/source/inc/writer/WTables.hxx
+++ b/connectivity/source/inc/writer/WTables.hxx
@@ -32,10 +32,14 @@ class OWriterTables : public OWriterTables_BASE
{
protected:
sdbcx::ObjectType createObject(const OUString& rName) override;
+
public:
- OWriterTables(const css::uno::Reference<css::sdbc::XDatabaseMetaData>& _rMetaData,::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex,
- const ::std::vector< OUString>& _rVector) : OWriterTables_BASE(_rMetaData,_rParent,_rMutex,_rVector)
- {}
+ OWriterTables(const css::uno::Reference<css::sdbc::XDatabaseMetaData>& _rMetaData,
+ ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex,
+ const ::std::vector<OUString>& _rVector)
+ : OWriterTables_BASE(_rMetaData, _rParent, _rMutex, _rVector)
+ {
+ }
};
}
}