diff options
Diffstat (limited to 'connectivity/source/inc/file')
19 files changed, 80 insertions, 159 deletions
diff --git a/connectivity/source/inc/file/FCatalog.hxx b/connectivity/source/inc/file/FCatalog.hxx index 7bdbb7edb649..2bcf82df2a57 100644 --- a/connectivity/source/inc/file/FCatalog.hxx +++ b/connectivity/source/inc/file/FCatalog.hxx @@ -17,16 +17,13 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FCATALOG_HXX -#define INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FCATALOG_HXX +#pragma once #include <sdbcx/VCatalog.hxx> #include <file/filedllapi.hxx> -namespace connectivity -{ - namespace file +namespace connectivity::file { class OConnection; class OOO_DLLPUBLIC_FILE SAL_NO_VTABLE OFileCatalog : @@ -57,8 +54,7 @@ namespace connectivity virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override; virtual void SAL_CALL disposing() override; }; - } + } -#endif // INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FCATALOG_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/inc/file/FColumns.hxx b/connectivity/source/inc/file/FColumns.hxx index 57fa6f65cb55..056934f88c65 100644 --- a/connectivity/source/inc/file/FColumns.hxx +++ b/connectivity/source/inc/file/FColumns.hxx @@ -17,19 +17,16 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FCOLUMNS_HXX -#define INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FCOLUMNS_HXX +#pragma once #include <connectivity/sdbcx/VCollection.hxx> #include <com/sun/star/sdbc/XDatabaseMetaData.hpp> #include <file/FTable.hxx> #include <file/filedllapi.hxx> -namespace connectivity -{ - namespace file +namespace connectivity::file { - class OOO_DLLPUBLIC_FILE OColumns : public sdbcx::OCollection + class UNLESS_MERGELIBS_MORE(OOO_DLLPUBLIC_FILE) OColumns : public sdbcx::OCollection { protected: OFileTable* m_pTable; @@ -44,8 +41,7 @@ namespace connectivity ,m_pTable(_pTable) {} }; - } + } -#endif // INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FCOLUMNS_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/inc/file/FConnection.hxx b/connectivity/source/inc/file/FConnection.hxx index 8511f277102f..e6412992ab77 100644 --- a/connectivity/source/inc/file/FConnection.hxx +++ b/connectivity/source/inc/file/FConnection.hxx @@ -16,8 +16,7 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FCONNECTION_HXX -#define INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FCONNECTION_HXX +#pragma once #include <com/sun/star/ucb/XContent.hpp> #include <com/sun/star/beans/PropertyValue.hpp> @@ -28,9 +27,7 @@ #include <TConnection.hxx> #include <file/filedllapi.hxx> -namespace connectivity -{ - namespace file +namespace connectivity::file { class ODatabaseMetaData; class OFileDriver; @@ -101,7 +98,7 @@ namespace connectivity virtual void SAL_CALL clearWarnings( ) override; //XUnoTunnel virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override; - static css::uno::Sequence< sal_Int8 > getUnoTunnelId(); + static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId(); // no interface methods css::uno::Reference< css::ucb::XDynamicResultSet > getDir() const; @@ -128,8 +125,7 @@ namespace connectivity void setCaseSensitiveExtension( bool _bIsCS, GrantAccess ) { m_bCaseSensitiveExtension = _bIsCS; } }; - } + } -#endif // INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FCONNECTION_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/inc/file/FDatabaseMetaData.hxx b/connectivity/source/inc/file/FDatabaseMetaData.hxx index 6f726cf74305..5c766c31d1f4 100644 --- a/connectivity/source/inc/file/FDatabaseMetaData.hxx +++ b/connectivity/source/inc/file/FDatabaseMetaData.hxx @@ -17,16 +17,13 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FDATABASEMETADATA_HXX -#define INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FDATABASEMETADATA_HXX +#pragma once #include <TDatabaseMetaDataBase.hxx> #include <file/FConnection.hxx> #include <file/filedllapi.hxx> -namespace connectivity -{ - namespace file +namespace connectivity::file { //************ Class: ODatabaseMetaData @@ -183,8 +180,7 @@ namespace connectivity virtual css::uno::Reference< css::sdbc::XResultSet > SAL_CALL getUDTs( const css::uno::Any& catalog, const OUString& schemaPattern, const OUString& typeNamePattern, const css::uno::Sequence< sal_Int32 >& types ) override; }; - } + } -#endif // INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FDATABASEMETADATA_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/inc/file/FDateFunctions.hxx b/connectivity/source/inc/file/FDateFunctions.hxx index e2fa6965d75e..e8eb12d0cf24 100644 --- a/connectivity/source/inc/file/FDateFunctions.hxx +++ b/connectivity/source/inc/file/FDateFunctions.hxx @@ -17,14 +17,11 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FDATEFUNCTIONS_HXX -#define INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FDATEFUNCTIONS_HXX +#pragma once #include <file/fcode.hxx> -namespace connectivity -{ - namespace file +namespace connectivity::file { /** DAYOFWEEK(date) Returns the weekday index for date (1 = Sunday, 2 = Monday, ... 7 = Saturday). These index values correspond to the ODBC standard. @@ -225,9 +222,7 @@ namespace connectivity protected: virtual ORowSetValue operate(const std::vector<ORowSetValue>& lhs) const override; }; - } -} -#endif // INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FDATEFUNCTIONS_HXX +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/inc/file/FDriver.hxx b/connectivity/source/inc/file/FDriver.hxx index 61037352071e..0351c59ca27a 100644 --- a/connectivity/source/inc/file/FDriver.hxx +++ b/connectivity/source/inc/file/FDriver.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FDRIVER_HXX -#define INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FDRIVER_HXX +#pragma once #include <com/sun/star/sdbc/XDriver.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> @@ -27,9 +26,7 @@ #include <connectivity/CommonTools.hxx> #include <file/filedllapi.hxx> -namespace connectivity -{ - namespace file +namespace connectivity::file { typedef ::cppu::WeakComponentImplHelper< css::sdbc::XDriver, css::lang::XServiceInfo, @@ -45,7 +42,7 @@ namespace connectivity // for this Driver css::uno::Reference< css::uno::XComponentContext > m_xContext; public: - OFileDriver(const css::uno::Reference< css::uno::XComponentContext >& _rxContext); + OFileDriver(css::uno::Reference< css::uno::XComponentContext > _xContext); // OComponentHelper virtual void SAL_CALL disposing() override; @@ -68,10 +65,8 @@ namespace connectivity const css::uno::Reference< css::uno::XComponentContext >& getComponentContext() const { return m_xContext; } }; - } } -#endif // INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FDRIVER_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/inc/file/FNumericFunctions.hxx b/connectivity/source/inc/file/FNumericFunctions.hxx index 3f143c658268..765f2cde8223 100644 --- a/connectivity/source/inc/file/FNumericFunctions.hxx +++ b/connectivity/source/inc/file/FNumericFunctions.hxx @@ -17,14 +17,11 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FNUMERICFUNCTIONS_HXX -#define INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FNUMERICFUNCTIONS_HXX +#pragma once #include <file/fcode.hxx> -namespace connectivity -{ - namespace file +namespace connectivity::file { /** ABS(X) Returns the absolute value of X: @@ -359,9 +356,7 @@ namespace connectivity protected: virtual ORowSetValue operate(const ORowSetValue& lhs) const override; }; - } -} -#endif // INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FNUMERICFUNCTIONS_HXX +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/inc/file/FPreparedStatement.hxx b/connectivity/source/inc/file/FPreparedStatement.hxx index 31002f6f1306..f83d74a6d065 100644 --- a/connectivity/source/inc/file/FPreparedStatement.hxx +++ b/connectivity/source/inc/file/FPreparedStatement.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FPREPAREDSTATEMENT_HXX -#define INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FPREPAREDSTATEMENT_HXX +#pragma once #include <file/filedllapi.hxx> #include <file/FStatement.hxx> @@ -28,9 +27,7 @@ #include <com/sun/star/io/XInputStream.hpp> #include <file/FResultSet.hxx> -namespace connectivity -{ - namespace file +namespace connectivity::file { class OOO_DLLPUBLIC_FILE SAL_NO_VTABLE OPreparedStatement : public OStatement_BASE2, @@ -50,7 +47,7 @@ namespace connectivity ::rtl::Reference<connectivity::OSQLColumns> m_xParamColumns; // the parameter columns // factory method for resultset's - virtual OResultSet* createResultSet() override; + virtual rtl::Reference<OResultSet> createResultSet() override; ::rtl::Reference< OResultSet > makeResultSet(); void initResultSet(OResultSet*); @@ -78,8 +75,8 @@ namespace connectivity virtual void SAL_CALL disposing() override; //XInterface virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override; - virtual void SAL_CALL acquire() throw() override; - virtual void SAL_CALL release() throw() override; + virtual void SAL_CALL acquire() noexcept override; + virtual void SAL_CALL release() noexcept override; //XTypeProvider virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override; @@ -117,9 +114,8 @@ namespace connectivity // XResultSetMetaDataSupplier virtual css::uno::Reference< css::sdbc::XResultSetMetaData > SAL_CALL getMetaData( ) override; }; - } + } -#endif // INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FPREPAREDSTATEMENT_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/inc/file/FResultSet.hxx b/connectivity/source/inc/file/FResultSet.hxx index 6cb42da8e5e8..0870593e6388 100644 --- a/connectivity/source/inc/file/FResultSet.hxx +++ b/connectivity/source/inc/file/FResultSet.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FRESULTSET_HXX -#define INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FRESULTSET_HXX +#pragma once #include <com/sun/star/sdbc/XResultSet.hpp> #include <com/sun/star/sdbc/XRow.hpp> @@ -41,10 +40,9 @@ #include <TSortIndex.hxx> #include <TSkipDeletedSet.hxx> #include <com/sun/star/lang/XEventListener.hpp> +#include <o3tl/safeint.hxx> -namespace connectivity -{ - namespace file +namespace connectivity::file { typedef ::cppu::WeakComponentImplHelper< css::sdbc::XResultSet, css::sdbc::XRow, @@ -56,10 +54,9 @@ namespace connectivity css::sdbc::XCloseable, css::sdbc::XColumnLocate, css::lang::XServiceInfo, - css::lang::XEventListener, - css::lang::XUnoTunnel> OResultSet_BASE; + css::lang::XEventListener> OResultSet_BASE; - class OOO_DLLPUBLIC_FILE OResultSet : + class UNLESS_MERGELIBS_MORE(OOO_DLLPUBLIC_FILE) OResultSet : public cppu::BaseMutex, public ::connectivity::IResultSetHelper, public OResultSet_BASE, @@ -166,8 +163,8 @@ namespace connectivity virtual void SAL_CALL disposing() override final; // XInterface virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override; - virtual void SAL_CALL acquire() throw() override; - virtual void SAL_CALL release() throw() override; + virtual void SAL_CALL acquire() noexcept override; + virtual void SAL_CALL release() noexcept override; //XTypeProvider virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override; // XPropertySet @@ -248,9 +245,6 @@ namespace connectivity virtual void SAL_CALL updateNumericObject( sal_Int32 columnIndex, const css::uno::Any& x, sal_Int32 scale ) override; // XColumnLocate virtual sal_Int32 SAL_CALL findColumn( const OUString& columnName ) override; - // css::lang::XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override; - static css::uno::Sequence< sal_Int8 > getUnoTunnelId(); //XEventlistener virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override; @@ -268,11 +262,11 @@ namespace connectivity m_aSelectRow = _rRow; m_nColumnCount = m_aSelectRow->size(); } - void setColumnMapping(const std::vector<sal_Int32>& _aColumnMapping) { m_aColMapping = _aColumnMapping; } + void setColumnMapping(std::vector<sal_Int32>&& _aColumnMapping) { m_aColMapping = std::move(_aColumnMapping); } void setSqlAnalyzer(OSQLAnalyzer* _pSQLAnalyzer) { m_pSQLAnalyzer = _pSQLAnalyzer; } - void setOrderByColumns(const std::vector<sal_Int32>& _aColumnOrderBy) { m_aOrderbyColumnNumber = _aColumnOrderBy; } - void setOrderByAscending(const std::vector<TAscendingOrder>& _aOrderbyAsc) { m_aOrderbyAscending = _aOrderbyAsc; } + void setOrderByColumns(std::vector<sal_Int32>&& _aColumnOrderBy) { m_aOrderbyColumnNumber = std::move(_aColumnOrderBy); } + void setOrderByAscending(std::vector<TAscendingOrder>&& _aOrderbyAsc) { m_aOrderbyAscending = std::move(_aOrderbyAsc); } void setMetaData(const css::uno::Reference< css::sdbc::XResultSetMetaData>& _xMetaData) { m_xMetaData = _xMetaData;} static void setBoundedColumns(const OValueRefRow& _rRow, @@ -295,14 +289,13 @@ namespace connectivity OSL_ENSURE(column > 0, "file::OResultSet::mapColumn: invalid column index!"); // the first column (index 0) is for convenience only. The first real select column is number 1. - if ((column > 0) && (column < static_cast<sal_Int32>(m_aColMapping.size()))) + if ((column > 0) && (o3tl::make_unsigned(column) < m_aColMapping.size())) map = m_aColMapping[column]; return map; } - } + } -#endif // _CONNECTIVITY_FILE_ORESULTSET_HXX_ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/inc/file/FResultSetMetaData.hxx b/connectivity/source/inc/file/FResultSetMetaData.hxx index 9ba77bc29822..dee656a915f4 100644 --- a/connectivity/source/inc/file/FResultSetMetaData.hxx +++ b/connectivity/source/inc/file/FResultSetMetaData.hxx @@ -17,17 +17,14 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FRESULTSETMETADATA_HXX -#define INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FRESULTSETMETADATA_HXX +#pragma once #include <com/sun/star/sdbc/XResultSetMetaData.hpp> #include <cppuhelper/implbase.hxx> #include <connectivity/CommonTools.hxx> #include <rtl/ref.hxx> -namespace connectivity -{ - namespace file +namespace connectivity::file { class OFileTable; @@ -49,7 +46,7 @@ namespace connectivity virtual ~OResultSetMetaData() override; public: // a Constructor, that is needed for when Returning the Object is needed: - OResultSetMetaData(const ::rtl::Reference<connectivity::OSQLColumns>& _rxColumns,const OUString& _aTableName,OFileTable* _pTable); + OResultSetMetaData(::rtl::Reference<connectivity::OSQLColumns> _xColumns, OUString _aTableName, OFileTable* _pTable); virtual sal_Int32 SAL_CALL getColumnCount( ) override; virtual sal_Bool SAL_CALL isAutoIncrement( sal_Int32 column ) override; @@ -73,9 +70,8 @@ namespace connectivity virtual sal_Bool SAL_CALL isDefinitelyWritable( sal_Int32 column ) override; virtual OUString SAL_CALL getColumnServiceName( sal_Int32 column ) override; }; - } + } -#endif // INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FRESULTSETMETADATA_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/inc/file/FStatement.hxx b/connectivity/source/inc/file/FStatement.hxx index a5e61a2dd65d..57ce0a2fc0de 100644 --- a/connectivity/source/inc/file/FStatement.hxx +++ b/connectivity/source/inc/file/FStatement.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FSTATEMENT_HXX -#define INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FSTATEMENT_HXX +#pragma once #include <com/sun/star/sdbc/XStatement.hpp> #include <com/sun/star/sdbc/XWarningsSupplier.hpp> @@ -38,9 +37,7 @@ #include <file/fanalyzer.hxx> #include <TSortIndex.hxx> -namespace connectivity -{ - namespace file +namespace connectivity::file { class OResultSet; class OFileTable; @@ -98,7 +95,7 @@ namespace connectivity // initialize the column index map (mapping select columns to table columns) void createColumnMapping(); // searches the statement for sort criteria - void anylizeSQL(); + void analyzeSQL(); void setOrderbyColumn( connectivity::OSQLParseNode const * pColumnRef, connectivity::OSQLParseNode const * pAscendingDescending); @@ -119,7 +116,7 @@ namespace connectivity virtual void parseParamterElem(const OUString& _sColumnName,OSQLParseNode* pRow_Value_Constructor_Elem); // factory method for resultset's - virtual OResultSet* createResultSet() = 0; + virtual rtl::Reference<OResultSet> createResultSet() = 0; // OPropertyArrayUsageHelper virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const override; // OPropertySetHelper @@ -142,7 +139,7 @@ namespace connectivity virtual void SAL_CALL disposing() override; // XInterface // virtual void SAL_CALL release() throw(css::uno::RuntimeException) = 0; - virtual void SAL_CALL acquire() throw() override; + virtual void SAL_CALL acquire() noexcept override; // XInterface virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override; //XTypeProvider @@ -167,7 +164,7 @@ namespace connectivity // OComponentHelper virtual void SAL_CALL disposing() override; // XInterface - virtual void SAL_CALL release() throw() override; + virtual void SAL_CALL release() noexcept override; }; typedef ::cppu::ImplHelper2< css::sdbc::XStatement,css::lang::XServiceInfo > OStatement_XStatement; @@ -177,15 +174,15 @@ namespace connectivity { protected: // factory method for resultset's - virtual OResultSet* createResultSet() override; + virtual rtl::Reference<OResultSet> createResultSet() override; public: // a Constructor, that is needed for when Returning the Object is needed: OStatement( OConnection* _pConnection) : OStatement_BASE2( _pConnection){} DECLARE_SERVICE_INFO(); virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override; - virtual void SAL_CALL acquire() throw() override; - virtual void SAL_CALL release() throw() override; + virtual void SAL_CALL acquire() noexcept override; + virtual void SAL_CALL release() noexcept override; // XStatement virtual css::uno::Reference< css::sdbc::XResultSet > SAL_CALL executeQuery( const OUString& sql ) override ; @@ -193,8 +190,7 @@ namespace connectivity virtual sal_Bool SAL_CALL execute( const OUString& sql ) override ; virtual css::uno::Reference< css::sdbc::XConnection > SAL_CALL getConnection( ) override ; }; - } + } -#endif // INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FSTATEMENT_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/inc/file/FStringFunctions.hxx b/connectivity/source/inc/file/FStringFunctions.hxx index 8d2ea1cef98e..b3d72294fa68 100644 --- a/connectivity/source/inc/file/FStringFunctions.hxx +++ b/connectivity/source/inc/file/FStringFunctions.hxx @@ -17,14 +17,11 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FSTRINGFUNCTIONS_HXX -#define INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FSTRINGFUNCTIONS_HXX +#pragma once #include <file/fcode.hxx> -namespace connectivity -{ - namespace file +namespace connectivity::file { /** UCASE(str) UPPER(str) @@ -266,9 +263,7 @@ namespace connectivity protected: virtual ORowSetValue operate(const ORowSetValue& lhs,const ORowSetValue& rhs) const override; }; - } -} -#endif // INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FSTRINGFUNCTIONS_HXX +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/inc/file/FTable.hxx b/connectivity/source/inc/file/FTable.hxx index 68d6efb45837..d8bbd92d6c85 100644 --- a/connectivity/source/inc/file/FTable.hxx +++ b/connectivity/source/inc/file/FTable.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FTABLE_HXX -#define INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FTABLE_HXX +#pragma once #include <connectivity/sdbcx/VTable.hxx> #include <file/FConnection.hxx> @@ -27,9 +26,7 @@ #include <connectivity/FValue.hxx> #include <TResultSetHelper.hxx> -namespace connectivity -{ - namespace file +namespace connectivity::file { typedef connectivity::sdbcx::OTable OTable_TYPEDEF; @@ -86,10 +83,6 @@ namespace connectivity const OUString& getSchema() const { return m_SchemaName; } bool isReadOnly() const { return !m_bWriteable; } // m_pFileStream && !m_pFileStream->IsWritable(); } - // css::lang::XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override; - static css::uno::Sequence< sal_Int8 > getUnoTunnelId(); - sal_Int32 getFilePos() const { return m_nFilePos; } @@ -100,8 +93,7 @@ namespace connectivity // (NULL or non-NULL is returned) static std::unique_ptr<SvStream> createStream_simpleError( const OUString& _rFileName, StreamMode _eOpenMode); }; - } + } -#endif // INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FTABLE_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/inc/file/FTables.hxx b/connectivity/source/inc/file/FTables.hxx index bbc787b57a3f..9d14c3627916 100644 --- a/connectivity/source/inc/file/FTables.hxx +++ b/connectivity/source/inc/file/FTables.hxx @@ -17,16 +17,13 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FTABLES_HXX -#define INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FTABLES_HXX +#pragma once #include <file/filedllapi.hxx> #include <connectivity/sdbcx/VCollection.hxx> #include <com/sun/star/sdbc/XDatabaseMetaData.hpp> -namespace connectivity -{ - namespace file +namespace connectivity::file { class OOO_DLLPUBLIC_FILE SAL_NO_VTABLE OTables : public sdbcx::OCollection @@ -41,8 +38,7 @@ namespace connectivity virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override; }; - } + } -#endif // INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FTABLES_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/inc/file/fanalyzer.hxx b/connectivity/source/inc/file/fanalyzer.hxx index 9fa5d7f45ed3..f913529d268e 100644 --- a/connectivity/source/inc/file/fanalyzer.hxx +++ b/connectivity/source/inc/file/fanalyzer.hxx @@ -17,14 +17,11 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FANALYZER_HXX -#define INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FANALYZER_HXX +#pragma once #include <file/fcomp.hxx> -namespace connectivity -{ - namespace file +namespace connectivity::file { class OConnection; class OSQLAnalyzer final @@ -67,8 +64,7 @@ namespace connectivity static OOperandAttr* createOperandAttr(sal_Int32 _nPos, const css::uno::Reference< css::beans::XPropertySet>& _xCol); }; - } + } -#endif // INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FANALYZER_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/inc/file/fcode.hxx b/connectivity/source/inc/file/fcode.hxx index 6a6feb412844..541377c7dd5f 100644 --- a/connectivity/source/inc/file/fcode.hxx +++ b/connectivity/source/inc/file/fcode.hxx @@ -17,15 +17,16 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FCODE_HXX -#define INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FCODE_HXX +#pragma once +#include <config_options.h> #include <connectivity/sqliterator.hxx> #include <com/sun/star/sdbc/DataType.hpp> #include <connectivity/FValue.hxx> #include <file/filedllapi.hxx> #include <stack> +#include <utility> namespace connectivity { @@ -36,7 +37,7 @@ namespace connectivity class OOperand; typedef std::stack<OOperand*> OCodeStack; - class OOO_DLLPUBLIC_FILE OCode + class UNLESS_MERGELIBS_MORE(OOO_DLLPUBLIC_FILE) OCode { public: //virtual dtor to allow this to be the root of the class hierarchy @@ -97,7 +98,7 @@ namespace connectivity class OOperandParam : public OOperandRow { public: - OOperandParam(connectivity::OSQLParseNode const * pNode, sal_Int32 _nPos); + OOperandParam(sal_Int32 _nPos); }; // Value operands @@ -108,9 +109,9 @@ namespace connectivity protected: OOperandValue(){} - OOperandValue(const ORowSetValue& _rVar, sal_Int32 eDbType) + OOperandValue(ORowSetValue _aVar, sal_Int32 eDbType) : OOperand(eDbType) - , m_aValue(_rVar) + , m_aValue(std::move(_aVar)) {} OOperandValue(sal_Int32 eDbType) :OOperand(eDbType){} @@ -244,7 +245,7 @@ namespace connectivity virtual bool operate(const OOperand*, const OOperand*) const override; }; - class OOO_DLLPUBLIC_FILE OOp_COMPARE : public OBoolOperator + class UNLESS_MERGELIBS_MORE(OOO_DLLPUBLIC_FILE) OOp_COMPARE : public OBoolOperator { sal_Int32 aPredicateType; @@ -328,6 +329,4 @@ namespace connectivity } } -#endif // INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FCODE_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/inc/file/fcomp.hxx b/connectivity/source/inc/file/fcomp.hxx index f43b05374b60..72afcdb0a84e 100644 --- a/connectivity/source/inc/file/fcomp.hxx +++ b/connectivity/source/inc/file/fcomp.hxx @@ -16,10 +16,10 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FCOMP_HXX -#define INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FCOMP_HXX +#pragma once #include <file/fcode.hxx> +#include <utility> namespace connectivity { @@ -87,7 +87,7 @@ namespace connectivity ::rtl::Reference<OPredicateCompiler> m_rCompiler; public: - OPredicateInterpreter(const ::rtl::Reference<OPredicateCompiler>& rComp) : m_rCompiler(rComp){} + OPredicateInterpreter(::rtl::Reference<OPredicateCompiler> xComp) : m_rCompiler(std::move(xComp)){} virtual ~OPredicateInterpreter() override; bool evaluate(OCodeList& rCodeList); @@ -107,6 +107,5 @@ namespace connectivity }; } } -#endif // INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FCOMP_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/inc/file/filedllapi.hxx b/connectivity/source/inc/file/filedllapi.hxx index 7bc8ed0ce0e7..e32f5f17cb05 100644 --- a/connectivity/source/inc/file/filedllapi.hxx +++ b/connectivity/source/inc/file/filedllapi.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FILEDLLAPI_HXX -#define INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_FILEDLLAPI_HXX +#pragma once #include <sal/config.h> @@ -30,6 +29,4 @@ #define OOO_DLLPUBLIC_FILE SAL_DLLPUBLIC_IMPORT #endif -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/inc/file/quotedstring.hxx b/connectivity/source/inc/file/quotedstring.hxx index 8d80d15f0319..7c6becc37feb 100644 --- a/connectivity/source/inc/file/quotedstring.hxx +++ b/connectivity/source/inc/file/quotedstring.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_QUOTEDSTRING_HXX -#define INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_QUOTEDSTRING_HXX +#pragma once #include <rtl/ustring.hxx> #include <file/filedllapi.hxx> @@ -44,6 +43,4 @@ namespace connectivity }; } -#endif // INCLUDED_CONNECTIVITY_SOURCE_INC_FILE_QUOTEDSTRING_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |