summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-02-21 07:26:06 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-02-21 14:50:28 +0100
commit9ad252b2e79576119c2d733a1a45fdd9e9f83140 (patch)
tree87fee16145d457b6799a05c389d85270476f7f35 /dbaccess
parent3aca35f1505fa552eaa316a2d47a60ef52646525 (diff)
Drop o3tl::optional wrapper
...now that macOS builds are guaranteed to have std::optional since 358146bbbd1b9775c12770fb5e497b6ec5adfc51 "Bump macOS build baseline to Xcode 11.3 and macOS 10.14.4". The change is done mostly mechanically with > for i in $(git grep -Fl optional); do > sed -i -e 's:<o3tl/optional\.hxx>\|\"o3tl/optional\.hxx\":<optional>:' \ > -e 's/\<o3tl::optional\>/std::optional/g' \ > -e 's/\<o3tl::make_optional\>/std::make_optional/g' "$i" > done > for i in $(git grep -Flw o3tl::nullopt); do > sed -i -e 's/\<o3tl::nullopt\>/std::nullopt/g' "$i" > done (though that causes some of the resulting #include <optional> to appear at different places relative to other includes than if they had been added manually), plus a few manual modifications: * adapt bin/find-unneeded-includes * adapt desktop/IwyuFilter_desktop.yaml * remove include/o3tl/optional.hxx * quote resulting "<"/">" as "&lt;"/"&gt;" in officecfg/registry/cppheader.xsl * and then solenv/clang-format/reformat-formatted-files Change-Id: I68833d9f7945e57aa2bc703349cbc5a56b342273 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89165 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/inc/pch/precompiled_dba.hxx2
-rw-r--r--dbaccess/inc/pch/precompiled_dbu.hxx2
-rw-r--r--dbaccess/source/core/api/FilteredContainer.cxx4
-rw-r--r--dbaccess/source/core/api/resultcolumn.cxx2
-rw-r--r--dbaccess/source/core/api/resultcolumn.hxx30
-rw-r--r--dbaccess/source/core/dataaccess/documentdefinition.cxx4
-rw-r--r--dbaccess/source/core/inc/ContentHelper.hxx2
-rw-r--r--dbaccess/source/core/inc/ModelImpl.hxx2
-rw-r--r--dbaccess/source/filter/xml/xmlExport.cxx4
-rw-r--r--dbaccess/source/ui/app/AppController.cxx2
-rw-r--r--dbaccess/source/ui/app/AppController.hxx2
-rw-r--r--dbaccess/source/ui/app/AppControllerGen.cxx4
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx4
-rw-r--r--dbaccess/source/ui/dlg/advancedsettings.cxx2
-rw-r--r--dbaccess/source/ui/dlg/optionalboolitem.hxx6
-rw-r--r--dbaccess/source/ui/inc/unodatbr.hxx2
-rw-r--r--dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx4
17 files changed, 39 insertions, 39 deletions
diff --git a/dbaccess/inc/pch/precompiled_dba.hxx b/dbaccess/inc/pch/precompiled_dba.hxx
index b49d1d43d4ae..9019973d3077 100644
--- a/dbaccess/inc/pch/precompiled_dba.hxx
+++ b/dbaccess/inc/pch/precompiled_dba.hxx
@@ -241,7 +241,7 @@
#include <cppuhelper/weakref.hxx>
#include <i18nlangtag/lang.h>
#include <o3tl/cow_wrapper.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <o3tl/strong_int.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <o3tl/underlyingenumvalue.hxx>
diff --git a/dbaccess/inc/pch/precompiled_dbu.hxx b/dbaccess/inc/pch/precompiled_dbu.hxx
index d6249192b852..c940617b9cca 100644
--- a/dbaccess/inc/pch/precompiled_dbu.hxx
+++ b/dbaccess/inc/pch/precompiled_dbu.hxx
@@ -176,7 +176,7 @@
#include <cppuhelper/implbase_ex.hxx>
#include <cppuhelper/weak.hxx>
#include <o3tl/cow_wrapper.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <o3tl/typed_flags_set.hxx>
#include <salhelper/simplereferenceobject.hxx>
#include <salhelper/singletonref.hxx>
diff --git a/dbaccess/source/core/api/FilteredContainer.cxx b/dbaccess/source/core/api/FilteredContainer.cxx
index 4a25d4cb31df..2e2a81669408 100644
--- a/dbaccess/source/core/api/FilteredContainer.cxx
+++ b/dbaccess/source/core/api/FilteredContainer.cxx
@@ -28,7 +28,7 @@
#include <connectivity/dbtools.hxx>
#include <tools/wldcrd.hxx>
#include <tools/diagnose_ex.h>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <sal/log.hxx>
namespace dbaccess
@@ -99,7 +99,7 @@ static sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, std::
return bFilterMatch;
}
- typedef ::o3tl::optional< OUString > OptionalString;
+ typedef ::std::optional< OUString > OptionalString;
namespace {
diff --git a/dbaccess/source/core/api/resultcolumn.cxx b/dbaccess/source/core/api/resultcolumn.cxx
index 93b4ba1a932c..e1ddc764eedf 100644
--- a/dbaccess/source/core/api/resultcolumn.cxx
+++ b/dbaccess/source/core/api/resultcolumn.cxx
@@ -165,7 +165,7 @@ void OResultColumn::disposing()
namespace
{
template< typename T >
- void obtain( Any& _out_rValue, ::o3tl::optional< T > & _rCache, const sal_Int32 _nPos, const Reference < XResultSetMetaData >& _rxResultMeta, T (SAL_CALL XResultSetMetaData::*Getter)( sal_Int32 ) )
+ void obtain( Any& _out_rValue, ::std::optional< T > & _rCache, const sal_Int32 _nPos, const Reference < XResultSetMetaData >& _rxResultMeta, T (SAL_CALL XResultSetMetaData::*Getter)( sal_Int32 ) )
{
if ( !_rCache )
_rCache = (_rxResultMeta.get()->*Getter)(_nPos);
diff --git a/dbaccess/source/core/api/resultcolumn.hxx b/dbaccess/source/core/api/resultcolumn.hxx
index 4897e1233699..f5b150eaa1d6 100644
--- a/dbaccess/source/core/api/resultcolumn.hxx
+++ b/dbaccess/source/core/api/resultcolumn.hxx
@@ -23,7 +23,7 @@
#include <com/sun/star/sdbc/XResultSetMetaData.hpp>
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
#include <column.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <comphelper/proparrhlp.hxx>
namespace dbaccess
{
@@ -38,20 +38,20 @@ namespace dbaccess
css::uno::Reference< css::sdbc::XDatabaseMetaData > m_xDBMetaData;
sal_Int32 m_nPos;
css::uno::Any m_aIsRowVersion;
- mutable ::o3tl::optional< sal_Bool > m_isSigned;
- mutable ::o3tl::optional< sal_Bool > m_isCurrency;
- mutable ::o3tl::optional< sal_Bool > m_bSearchable;
- mutable ::o3tl::optional< sal_Bool > m_isCaseSensitive;
- mutable ::o3tl::optional< sal_Bool > m_isReadOnly;
- mutable ::o3tl::optional< sal_Bool > m_isWritable;
- mutable ::o3tl::optional< sal_Bool > m_isDefinitelyWritable;
- mutable ::o3tl::optional< sal_Bool > m_isAutoIncrement;
- mutable ::o3tl::optional< sal_Int32 > m_isNullable;
- mutable ::o3tl::optional< OUString > m_sColumnLabel;
- mutable ::o3tl::optional< sal_Int32 > m_nColumnDisplaySize;
- mutable ::o3tl::optional< sal_Int32 > m_nColumnType;
- mutable ::o3tl::optional< sal_Int32 > m_nPrecision;
- mutable ::o3tl::optional< sal_Int32 > m_nScale;
+ mutable ::std::optional< sal_Bool > m_isSigned;
+ mutable ::std::optional< sal_Bool > m_isCurrency;
+ mutable ::std::optional< sal_Bool > m_bSearchable;
+ mutable ::std::optional< sal_Bool > m_isCaseSensitive;
+ mutable ::std::optional< sal_Bool > m_isReadOnly;
+ mutable ::std::optional< sal_Bool > m_isWritable;
+ mutable ::std::optional< sal_Bool > m_isDefinitelyWritable;
+ mutable ::std::optional< sal_Bool > m_isAutoIncrement;
+ mutable ::std::optional< sal_Int32 > m_isNullable;
+ mutable ::std::optional< OUString > m_sColumnLabel;
+ mutable ::std::optional< sal_Int32 > m_nColumnDisplaySize;
+ mutable ::std::optional< sal_Int32 > m_nColumnType;
+ mutable ::std::optional< sal_Int32 > m_nPrecision;
+ mutable ::std::optional< sal_Int32 > m_nScale;
virtual ~OResultColumn() override;
public:
diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx
index f548637e204a..d1e569afd2a9 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.cxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx
@@ -131,7 +131,7 @@ namespace DatabaseObject = sdb::application::DatabaseObject;
namespace dbaccess
{
- typedef ::o3tl::optional< bool > optional_bool;
+ typedef ::std::optional< bool > optional_bool;
// helper
namespace
@@ -790,7 +790,7 @@ Any ODocumentDefinition::onCommandOpenSomething( const Any& _rOpenArgument, cons
if ( xHandler.is() )
aDocumentArgs.put( "InteractionHandler", xHandler );
- ::o3tl::optional< sal_Int16 > aDocumentMacroMode;
+ ::std::optional< sal_Int16 > aDocumentMacroMode;
if ( !lcl_extractOpenMode( _rOpenArgument, nOpenMode ) )
{
diff --git a/dbaccess/source/core/inc/ContentHelper.hxx b/dbaccess/source/core/inc/ContentHelper.hxx
index 2ca3a321ee69..8e848fee4be6 100644
--- a/dbaccess/source/core/inc/ContentHelper.hxx
+++ b/dbaccess/source/core/inc/ContentHelper.hxx
@@ -51,7 +51,7 @@ namespace dbaccess
struct ContentProperties
{
OUString aTitle; // Title
- ::o3tl::optional< OUString >
+ ::std::optional< OUString >
aContentType; // ContentType (aka MediaType aka MimeType)
bool bIsDocument; // IsDocument
bool bIsFolder; // IsFolder
diff --git a/dbaccess/source/core/inc/ModelImpl.hxx b/dbaccess/source/core/inc/ModelImpl.hxx
index ff02f17b6a49..84bce5c9c724 100644
--- a/dbaccess/source/core/inc/ModelImpl.hxx
+++ b/dbaccess/source/core/inc/ModelImpl.hxx
@@ -166,7 +166,7 @@ private:
oslInterlockedCount m_refCount;
/// do we have any object (forms/reports) which contains macros?
- ::o3tl::optional< EmbeddedMacros > m_aEmbeddedMacros;
+ ::std::optional< EmbeddedMacros > m_aEmbeddedMacros;
/// true if setting the Modified flag of the document is currently locked
bool m_bModificationLock;
diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx
index 20aac7489ede..ccc5f123cbb7 100644
--- a/dbaccess/source/filter/xml/xmlExport.cxx
+++ b/dbaccess/source/filter/xml/xmlExport.cxx
@@ -55,7 +55,7 @@
#include <connectivity/DriversConfig.hxx>
#include <connectivity/dbtools.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <memory>
#include <iterator>
@@ -350,7 +350,7 @@ void ODBExport::exportDataSource()
{
const OUString sPropertyName;
const XMLTokenEnum eAttributeToken;
- const ::o3tl::optional< OUString > aXMLDefault;
+ const ::std::optional< OUString > aXMLDefault;
PropertyMap( const OUString& _rPropertyName, const XMLTokenEnum _eToken )
:sPropertyName( _rPropertyName )
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index 3b7a3a607716..d8c6612c0868 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -392,7 +392,7 @@ void SAL_CALL OApplicationController::disposing()
aURL.GetURLNoPass( INetURLObject::DecodeMechanism::NONE ),
aFilter,
getStrippedDatabaseName(),
- o3tl::nullopt);
+ std::nullopt);
// add to recent document list
if ( aURL.GetProtocol() == INetProtocol::File )
diff --git a/dbaccess/source/ui/app/AppController.hxx b/dbaccess/source/ui/app/AppController.hxx
index 5039a97af205..e1d5903e05d7 100644
--- a/dbaccess/source/ui/app/AppController.hxx
+++ b/dbaccess/source/ui/app/AppController.hxx
@@ -349,7 +349,7 @@ namespace dbaui
/** verifies the object type denotes a valid DatabaseObject, and the object name denotes an existing
object of this type. Throws if not.
*/
- void impl_validateObjectTypeAndName_throw( const sal_Int32 _nObjectType, const ::o3tl::optional< OUString >& i_rObjectName );
+ void impl_validateObjectTypeAndName_throw( const sal_Int32 _nObjectType, const ::std::optional< OUString >& i_rObjectName );
protected:
// initializing members
diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx
index db32b9a15d8e..53a9453a585c 100644
--- a/dbaccess/source/ui/app/AppControllerGen.cxx
+++ b/dbaccess/source/ui/app/AppControllerGen.cxx
@@ -377,7 +377,7 @@ namespace
}
}
-void OApplicationController::impl_validateObjectTypeAndName_throw( const sal_Int32 _nObjectType, const ::o3tl::optional< OUString >& i_rObjectName )
+void OApplicationController::impl_validateObjectTypeAndName_throw( const sal_Int32 _nObjectType, const ::std::optional< OUString >& i_rObjectName )
{
// ensure we're connected
if ( !isConnected() )
@@ -459,7 +459,7 @@ Reference< XComponent > SAL_CALL OApplicationController::createComponentWithArgu
SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
- impl_validateObjectTypeAndName_throw( i_nObjectType, ::o3tl::optional< OUString >() );
+ impl_validateObjectTypeAndName_throw( i_nObjectType, ::std::optional< OUString >() );
Reference< XComponent > xComponent( newElement(
lcl_objectType2ElementType( i_nObjectType ),
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 02c1e734ac6c..383da2b4e088 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -3170,7 +3170,7 @@ void SbaTableQueryBrowser::impl_initialize()
if ( m_bEnableBrowser )
{
- m_aDocScriptSupport = ::o3tl::optional< bool >( false );
+ m_aDocScriptSupport = ::std::optional< bool >( false );
}
else
{
@@ -3178,7 +3178,7 @@ void SbaTableQueryBrowser::impl_initialize()
// there is a specific database document which we belong to.
Reference< XOfficeDatabaseDocument > xDocument( getDataSourceOrModel(
lcl_getDataSource( m_xDatabaseContext, sInitialDataSourceName, xConnection ) ), UNO_QUERY );
- m_aDocScriptSupport = ::o3tl::optional< bool >( Reference< XEmbeddedScripts >( xDocument, UNO_QUERY ).is() );
+ m_aDocScriptSupport = ::std::optional< bool >( Reference< XEmbeddedScripts >( xDocument, UNO_QUERY ).is() );
}
if ( implSelect( sInitialDataSourceName, sInitialCommand, nInitialDisplayCommandType, bEscapeProcessing, xConnection, true ) )
diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx
index 9bffee98ef6e..f01985660758 100644
--- a/dbaccess/source/ui/dlg/advancedsettings.cxx
+++ b/dbaccess/source/ui/dlg/advancedsettings.cxx
@@ -203,7 +203,7 @@ namespace dbaui
bool bTriState = false;
- o3tl::optional<bool> aValue;
+ std::optional<bool> aValue;
const SfxPoolItem* pItem = _rSet.GetItem<SfxPoolItem>(booleanSetting.nItemId);
if (const SfxBoolItem *pBoolItem = dynamic_cast<const SfxBoolItem*>( pItem) )
diff --git a/dbaccess/source/ui/dlg/optionalboolitem.hxx b/dbaccess/source/ui/dlg/optionalboolitem.hxx
index 008d59046921..25aef5ceca3f 100644
--- a/dbaccess/source/ui/dlg/optionalboolitem.hxx
+++ b/dbaccess/source/ui/dlg/optionalboolitem.hxx
@@ -22,7 +22,7 @@
#include <svl/poolitem.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
namespace dbaui
{
@@ -30,7 +30,7 @@ namespace dbaui
// OptionalBoolItem
class OptionalBoolItem : public SfxPoolItem
{
- ::o3tl::optional< bool > m_aValue;
+ ::std::optional< bool > m_aValue;
public:
explicit OptionalBoolItem( sal_uInt16 nWhich );
@@ -43,7 +43,7 @@ namespace dbaui
bool GetValue() const { return *m_aValue; }
void SetValue(bool _bValue) { m_aValue = _bValue; }
- const ::o3tl::optional< bool >&
+ const ::std::optional< bool >&
GetFullValue() const { return m_aValue; }
};
diff --git a/dbaccess/source/ui/inc/unodatbr.hxx b/dbaccess/source/ui/inc/unodatbr.hxx
index 77e621588e9c..ed1511cde629 100644
--- a/dbaccess/source/ui/inc/unodatbr.hxx
+++ b/dbaccess/source/ui/inc/unodatbr.hxx
@@ -108,7 +108,7 @@ namespace dbaui
bool m_bShowMenu; // if sal_True the menu should be visible otherwise not
bool m_bInSuspend;
bool m_bEnableBrowser;
- ::o3tl::optional< bool >
+ ::std::optional< bool >
m_aDocScriptSupport; // relevant if and only if we are associated with exactly one DBDoc
virtual OUString getPrivateTitle( ) const override;
diff --git a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
index 9950cbd869d0..42397bf9570c 100644
--- a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
+++ b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
@@ -123,7 +123,7 @@ namespace dbaui
struct DBSubComponentController_Impl
{
private:
- ::o3tl::optional< bool > m_aDocScriptSupport;
+ ::std::optional< bool > m_aDocScriptSupport;
public:
::dbtools::SQLExceptionInfo m_aCurrentError;
@@ -166,7 +166,7 @@ namespace dbaui
{
OSL_PRECOND( !m_aDocScriptSupport,
"DBSubComponentController_Impl::setDocumentScriptSupport: already initialized!" );
- m_aDocScriptSupport = ::o3tl::optional< bool >( _bSupport );
+ m_aDocScriptSupport = ::std::optional< bool >( _bSupport );
}
};