summaryrefslogtreecommitdiff
path: root/desktop/source/deployment/registry
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 /desktop/source/deployment/registry
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 'desktop/source/deployment/registry')
-rw-r--r--desktop/source/deployment/registry/configuration/dp_configuration.cxx12
-rw-r--r--desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx6
-rw-r--r--desktop/source/deployment/registry/configuration/dp_configurationbackenddb.hxx4
-rw-r--r--desktop/source/deployment/registry/dp_backend.cxx6
-rw-r--r--desktop/source/deployment/registry/help/dp_help.cxx10
-rw-r--r--desktop/source/deployment/registry/help/dp_helpbackenddb.cxx6
-rw-r--r--desktop/source/deployment/registry/help/dp_helpbackenddb.hxx4
-rw-r--r--desktop/source/deployment/registry/package/dp_package.cxx6
-rw-r--r--desktop/source/deployment/registry/script/dp_scriptbackenddb.hxx2
9 files changed, 28 insertions, 28 deletions
diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
index 68f11e41ea3b..ca11affbca7c 100644
--- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx
+++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
@@ -130,7 +130,7 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend
Reference<XCommandEnvironment> const & xCmdEnv );
#endif
void addDataToDb(OUString const & url, ConfigurationBackendDb::Data const & data);
- ::o3tl::optional<ConfigurationBackendDb::Data> readDataFromDb(OUString const & url);
+ ::std::optional<ConfigurationBackendDb::Data> readDataFromDb(OUString const & url);
void revokeEntryFromDb(OUString const & url);
bool hasActiveEntry(OUString const & url);
bool activateEntry(OUString const & url);
@@ -240,10 +240,10 @@ void BackendImpl::addDataToDb(
m_backendDb->addEntry(url, data);
}
-::o3tl::optional<ConfigurationBackendDb::Data> BackendImpl::readDataFromDb(
+::std::optional<ConfigurationBackendDb::Data> BackendImpl::readDataFromDb(
OUString const & url)
{
- ::o3tl::optional<ConfigurationBackendDb::Data> data;
+ ::std::optional<ConfigurationBackendDb::Data> data;
if (m_backendDb)
data = m_backendDb->getEntry(url);
return data;
@@ -488,7 +488,7 @@ bool BackendImpl::removeFromConfigmgrIni(
//url to the file in the user installation (e.g. $BUNDLED_EXTENSIONS_USER)
//However, m_url (getURL()) contains the URL for the file in the actual
//extension installation.
- ::o3tl::optional<ConfigurationBackendDb::Data> data = readDataFromDb(url_);
+ ::std::optional<ConfigurationBackendDb::Data> data = readDataFromDb(url_);
if (data)
i = std::find(rSet.begin(), rSet.end(), data->iniEntry);
}
@@ -680,7 +680,7 @@ void BackendImpl::PackageImpl::processPackage_(
{
if (getMyBackend()->activateEntry(getURL()))
{
- ::o3tl::optional<ConfigurationBackendDb::Data> data = that->readDataFromDb(url);
+ ::std::optional<ConfigurationBackendDb::Data> data = that->readDataFromDb(url);
OSL_ASSERT(data);
that->addToConfigmgrIni( m_isSchema, false, data->iniEntry, xCmdEnv );
}
@@ -772,7 +772,7 @@ void BackendImpl::PackageImpl::processPackage_(
}
}
#endif
- ::o3tl::optional<ConfigurationBackendDb::Data> data = that->readDataFromDb(url);
+ ::std::optional<ConfigurationBackendDb::Data> data = that->readDataFromDb(url);
//If an xcu file was life deployed then always a data entry is written.
//If the xcu file was already in the configmr.ini then there is also
//a data entry
diff --git a/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx b/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx
index eb8775be9efa..fd5d3b3c4833 100644
--- a/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx
+++ b/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx
@@ -90,7 +90,7 @@ void ConfigurationBackendDb::addEntry(OUString const & url, Data const & data)
}
-::o3tl::optional<ConfigurationBackendDb::Data>
+::std::optional<ConfigurationBackendDb::Data>
ConfigurationBackendDb::getEntry(OUString const & url)
{
try
@@ -104,9 +104,9 @@ ConfigurationBackendDb::getEntry(OUString const & url)
}
else
{
- return ::o3tl::optional<Data>();
+ return ::std::optional<Data>();
}
- return ::o3tl::optional<Data>(retData);
+ return ::std::optional<Data>(retData);
}
catch ( const css::deployment::DeploymentException& )
{
diff --git a/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.hxx b/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.hxx
index 0e0d4c4899cf..264030c0ef79 100644
--- a/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.hxx
+++ b/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.hxx
@@ -23,7 +23,7 @@
#include <rtl/ustring.hxx>
#include <rtl/string.hxx>
#include <vector>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <dp_backenddb.hxx>
namespace com { namespace sun { namespace star {
@@ -69,7 +69,7 @@ public:
void addEntry(OUString const & url, Data const & data);
- ::o3tl::optional<Data> getEntry(OUString const & url);
+ ::std::optional<Data> getEntry(OUString const & url);
std::vector< OUString> getAllDataUrls();
};
diff --git a/desktop/source/deployment/registry/dp_backend.cxx b/desktop/source/deployment/registry/dp_backend.cxx
index 428b74d2fce1..0dab3ad8d69b 100644
--- a/desktop/source/deployment/registry/dp_backend.cxx
+++ b/desktop/source/deployment/registry/dp_backend.cxx
@@ -43,7 +43,7 @@
#include <com/sun/star/sdbc/XRow.hpp>
#include <tools/diagnose_ex.h>
#include <unotools/tempfile.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
using namespace ::dp_misc;
using namespace ::com::sun::star;
@@ -79,8 +79,8 @@ PackageRegistryBackend::PackageRegistryBackend(
m_eContext( Context::Unknown )
{
assert(xContext.is());
- o3tl::optional<OUString> cachePath;
- o3tl::optional<bool> readOnly;
+ std::optional<OUString> cachePath;
+ std::optional<bool> readOnly;
comphelper::unwrapArgs( args, m_context, cachePath, readOnly );
if (cachePath)
m_cachePath = *cachePath;
diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx
index 013c0648a49e..27cf615eb41b 100644
--- a/desktop/source/deployment/registry/help/dp_help.cxx
+++ b/desktop/source/deployment/registry/help/dp_help.cxx
@@ -40,7 +40,7 @@
#include <com/sun/star/deployment/ExtensionRemovedException.hpp>
#include <com/sun/star/ucb/SimpleFileAccess.hpp>
#include <com/sun/star/util/XMacroExpander.hpp>
-#include <o3tl/optional.hxx>
+#include <optional>
using namespace ::dp_misc;
using namespace ::com::sun::star;
@@ -95,7 +95,7 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend
void implCollectXhpFiles( const OUString& aDir,
std::vector< OUString >& o_rXhpFileVector );
- ::o3tl::optional<HelpBackendDb::Data> readDataFromDb(OUString const & url);
+ ::std::optional<HelpBackendDb::Data> readDataFromDb(OUString const & url);
bool hasActiveEntry(OUString const & url);
bool activateEntry(OUString const & url);
@@ -200,10 +200,10 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
static_cast<sal_Int16>(-1) );
}
-::o3tl::optional<HelpBackendDb::Data> BackendImpl::readDataFromDb(
+::std::optional<HelpBackendDb::Data> BackendImpl::readDataFromDb(
OUString const & url)
{
- ::o3tl::optional<HelpBackendDb::Data> data;
+ ::std::optional<HelpBackendDb::Data> data;
if (m_backendDb)
data = m_backendDb->getEntry(url);
return data;
@@ -333,7 +333,7 @@ beans::Optional< OUString > BackendImpl::PackageImpl::getRegistrationDataURL()
if (m_bRemoved)
throw deployment::ExtensionRemovedException();
- ::o3tl::optional<HelpBackendDb::Data> data =
+ ::std::optional<HelpBackendDb::Data> data =
getMyBackend()->readDataFromDb(getURL());
if (data && getMyBackend()->hasActiveEntry(getURL()))
diff --git a/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx b/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx
index cd8f65b749c0..73b7279d13de 100644
--- a/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx
+++ b/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx
@@ -87,7 +87,7 @@ void HelpBackendDb::addEntry(OUString const & url, Data const & data)
}
-::o3tl::optional<HelpBackendDb::Data>
+::std::optional<HelpBackendDb::Data>
HelpBackendDb::getEntry(OUString const & url)
{
try
@@ -100,9 +100,9 @@ HelpBackendDb::getEntry(OUString const & url)
}
else
{
- return ::o3tl::optional<Data>();
+ return ::std::optional<Data>();
}
- return ::o3tl::optional<Data>(retData);
+ return ::std::optional<Data>(retData);
}
catch ( const css::deployment::DeploymentException& )
{
diff --git a/desktop/source/deployment/registry/help/dp_helpbackenddb.hxx b/desktop/source/deployment/registry/help/dp_helpbackenddb.hxx
index 1a9eabc861aa..1f072f7429df 100644
--- a/desktop/source/deployment/registry/help/dp_helpbackenddb.hxx
+++ b/desktop/source/deployment/registry/help/dp_helpbackenddb.hxx
@@ -21,7 +21,7 @@
#define INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_REGISTRY_HELP_DP_HELPBACKENDDB_HXX
#include <rtl/ustring.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <dp_backenddb.hxx>
namespace com { namespace sun { namespace star {
@@ -64,7 +64,7 @@ public:
void addEntry(OUString const & url, Data const & data);
- ::o3tl::optional<Data> getEntry(OUString const & url);
+ ::std::optional<Data> getEntry(OUString const & url);
//must also return the data urls for entries with @active="false". That is,
//those are currently revoked.
std::vector< OUString> getAllDataUrls();
diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx
index 013955e0f168..9cc78c7e6bc3 100644
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/deployment/registry/package/dp_package.cxx
@@ -65,7 +65,7 @@
#include <com/sun/star/deployment/LicenseException.hpp>
#include <com/sun/star/deployment/PlatformException.hpp>
#include <com/sun/star/deployment/Prerequisites.hpp>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <tools/diagnose_ex.h>
#include <algorithm>
@@ -623,7 +623,7 @@ bool BackendImpl::PackageImpl::checkLicense(
{
try
{
- ::o3tl::optional<SimpleLicenseAttributes> simplLicAttr
+ ::std::optional<SimpleLicenseAttributes> simplLicAttr
= info.getSimpleLicenseAttributes();
if (! simplLicAttr)
return true;
@@ -946,7 +946,7 @@ OUString BackendImpl::PackageImpl::getLicenseText()
OUString sLicense;
DescriptionInfoset aInfo = getDescriptionInfoset();
- ::o3tl::optional< SimpleLicenseAttributes > aSimplLicAttr = aInfo.getSimpleLicenseAttributes();
+ ::std::optional< SimpleLicenseAttributes > aSimplLicAttr = aInfo.getSimpleLicenseAttributes();
if ( aSimplLicAttr )
{
OUString aLicenseURL = aInfo.getLocalizedLicenseURL();
diff --git a/desktop/source/deployment/registry/script/dp_scriptbackenddb.hxx b/desktop/source/deployment/registry/script/dp_scriptbackenddb.hxx
index a6de29ffb0b2..3f2cfed20a2e 100644
--- a/desktop/source/deployment/registry/script/dp_scriptbackenddb.hxx
+++ b/desktop/source/deployment/registry/script/dp_scriptbackenddb.hxx
@@ -22,7 +22,7 @@
#include <rtl/ustring.hxx>
#include <dp_backenddb.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
namespace com { namespace sun { namespace star {
namespace uno {