diff options
Diffstat (limited to 'desktop')
33 files changed, 92 insertions, 92 deletions
diff --git a/desktop/inc/app.hxx b/desktop/inc/app.hxx index 817945c54e47..2fc67ab92c14 100644 --- a/desktop/inc/app.hxx +++ b/desktop/inc/app.hxx @@ -20,7 +20,7 @@ #ifndef INCLUDED_DESKTOP_INC_APP_HXX #define INCLUDED_DESKTOP_INC_APP_HXX -#include <boost/optional.hpp> +#include <o3tl/optional.hxx> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <sal/log.hxx> #include <vcl/svapp.hxx> @@ -175,7 +175,7 @@ class Desktop : public Application }; OUString GetURL_Impl( - const OUString& rName, boost::optional< OUString > const & cwdUrl ); + const OUString& rName, o3tl::optional< OUString > const & cwdUrl ); OUString ReplaceStringHookProc(const OUString& rStr); diff --git a/desktop/inc/pch/precompiled_deployment.hxx b/desktop/inc/pch/precompiled_deployment.hxx index f6fbcba0d6de..667e9e562ece 100644 --- a/desktop/inc/pch/precompiled_deployment.hxx +++ b/desktop/inc/pch/precompiled_deployment.hxx @@ -27,7 +27,7 @@ #include <ostream> #include <unordered_map> #include <vector> -#include <boost/optional.hpp> +#include <o3tl/optional.hxx> #endif // PCH_LEVEL >= 1 #if PCH_LEVEL >= 2 #include <osl/diagnose.h> diff --git a/desktop/inc/pch/precompiled_deploymentgui.hxx b/desktop/inc/pch/precompiled_deploymentgui.hxx index e1ad0a551535..994036573ac1 100644 --- a/desktop/inc/pch/precompiled_deploymentgui.hxx +++ b/desktop/inc/pch/precompiled_deploymentgui.hxx @@ -37,7 +37,7 @@ #include <string> #include <utility> #include <vector> -#include <boost/optional.hpp> +#include <o3tl/optional.hxx> #endif // PCH_LEVEL >= 1 #if PCH_LEVEL >= 2 #include <osl/conditn.hxx> diff --git a/desktop/inc/pch/precompiled_deploymentmisc.hxx b/desktop/inc/pch/precompiled_deploymentmisc.hxx index 3cf05ba57055..703c029f8609 100644 --- a/desktop/inc/pch/precompiled_deploymentmisc.hxx +++ b/desktop/inc/pch/precompiled_deploymentmisc.hxx @@ -29,7 +29,7 @@ #include <string> #include <utility> #include <vector> -#include <boost/optional.hpp> +#include <o3tl/optional.hxx> #endif // PCH_LEVEL >= 1 #if PCH_LEVEL >= 2 #include <osl/diagnose.h> diff --git a/desktop/inc/pch/precompiled_sofficeapp.hxx b/desktop/inc/pch/precompiled_sofficeapp.hxx index 9428ba122b31..87bcfaf98187 100644 --- a/desktop/inc/pch/precompiled_sofficeapp.hxx +++ b/desktop/inc/pch/precompiled_sofficeapp.hxx @@ -44,7 +44,7 @@ #include <type_traits> #include <utility> #include <vector> -#include <boost/optional.hpp> +#include <o3tl/optional.hxx> #include <boost/property_tree/ptree.hpp> #endif // PCH_LEVEL >= 1 #if PCH_LEVEL >= 2 diff --git a/desktop/qa/desktop_app/test_desktop_app.cxx b/desktop/qa/desktop_app/test_desktop_app.cxx index ef88ae408c81..9a1b94606d8c 100644 --- a/desktop/qa/desktop_app/test_desktop_app.cxx +++ b/desktop/qa/desktop_app/test_desktop_app.cxx @@ -49,7 +49,7 @@ class TestSupplier : public desktop::CommandLineArgs::Supplier { public: explicit TestSupplier(const std::initializer_list<OUString>& args) : m_args(args) {} - virtual boost::optional< OUString > getCwdUrl() override { return boost::optional< OUString >(); } + virtual o3tl::optional< OUString > getCwdUrl() override { return o3tl::optional< OUString >(); } virtual bool next(OUString * argument) override { CPPUNIT_ASSERT(argument != nullptr); if (m_index < m_args.size()) { diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index f448d6e7e507..4afbed28e6b3 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -2216,7 +2216,7 @@ void Desktop::OpenDefault() OUString GetURL_Impl( - const OUString& rName, boost::optional< OUString > const & cwdUrl ) + const OUString& rName, o3tl::optional< OUString > const & cwdUrl ) { // if rName is a vnd.sun.star.script URL do not attempt to parse it // as INetURLObj does not handle URLs there diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx index c395e6d68a44..f66e8142849d 100644 --- a/desktop/source/app/cmdlineargs.cxx +++ b/desktop/source/app/cmdlineargs.cxx @@ -85,7 +85,7 @@ public: } } - virtual boost::optional< OUString > getCwdUrl() override { return m_cwdUrl; } + virtual o3tl::optional< OUString > getCwdUrl() override { return m_cwdUrl; } virtual bool next(OUString * argument) override { OSL_ASSERT(argument != nullptr); @@ -98,7 +98,7 @@ public: } private: - boost::optional< OUString > m_cwdUrl; + o3tl::optional< OUString > m_cwdUrl; sal_uInt32 m_count; sal_uInt32 m_index; }; diff --git a/desktop/source/app/cmdlineargs.hxx b/desktop/source/app/cmdlineargs.hxx index 94600ed40972..6c18bda3572d 100644 --- a/desktop/source/app/cmdlineargs.hxx +++ b/desktop/source/app/cmdlineargs.hxx @@ -25,7 +25,7 @@ #include <vector> #include <rtl/ustring.hxx> -#include <boost/optional.hpp> +#include <o3tl/optional.hxx> namespace desktop { @@ -46,7 +46,7 @@ class CommandLineArgs }; virtual ~Supplier(); - virtual boost::optional< OUString > getCwdUrl() = 0; + virtual o3tl::optional< OUString > getCwdUrl() = 0; virtual bool next(OUString * argument) = 0; }; @@ -56,7 +56,7 @@ class CommandLineArgs CommandLineArgs(const CommandLineArgs&) = delete; const CommandLineArgs& operator=(const CommandLineArgs&) = delete; - const boost::optional< OUString >& getCwdUrl() const { return m_cwdUrl; } + const o3tl::optional< OUString >& getCwdUrl() const { return m_cwdUrl; } // Access to bool parameters bool IsMinimized() const { return m_minimized;} @@ -127,7 +127,7 @@ class CommandLineArgs void ParseCommandLine_Impl( Supplier& supplier ); void InitParamValues(); - boost::optional< OUString > m_cwdUrl; + o3tl::optional< OUString > m_cwdUrl; bool m_minimized; bool m_invisible; diff --git a/desktop/source/app/dispatchwatcher.hxx b/desktop/source/app/dispatchwatcher.hxx index 2b683ffd08fb..103b882b9172 100644 --- a/desktop/source/app/dispatchwatcher.hxx +++ b/desktop/source/app/dispatchwatcher.hxx @@ -60,7 +60,7 @@ class DispatchWatcher : public ::cppu::WeakImplHelper< css::frame::XDispatchResu { RequestType aRequestType; OUString aURL; - boost::optional< OUString > aCwdUrl; + o3tl::optional< OUString > aCwdUrl; OUString aPrinterName; // also conversion params OUString aPreselectedFactory; }; diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx index 5a79206c96ee..04617652c76d 100644 --- a/desktop/source/app/officeipcthread.cxx +++ b/desktop/source/app/officeipcthread.cxx @@ -141,7 +141,7 @@ public: } } - virtual boost::optional< OUString > getCwdUrl() override { return m_cwdUrl; } + virtual o3tl::optional< OUString > getCwdUrl() override { return m_cwdUrl; } virtual bool next(OUString * argument) override { return next(argument, true); } @@ -195,7 +195,7 @@ private: } } - boost::optional< OUString > m_cwdUrl; + o3tl::optional< OUString > m_cwdUrl; OString m_input; sal_Int32 m_index; }; @@ -671,7 +671,7 @@ void RequestHandler::EnableRequests() pGlobal->mState = State::RequestsEnabled; } // hit the compiler over the head - ProcessDocumentsRequest aEmptyReq { boost::optional< OUString >() }; + ProcessDocumentsRequest aEmptyReq { o3tl::optional< OUString >() }; // trigger already queued requests RequestHandler::ExecuteCmdLineRequests(aEmptyReq, true); } @@ -1224,7 +1224,7 @@ void PipeIpcThread::execute() static void AddToDispatchList( std::vector<DispatchWatcher::DispatchRequest>& rDispatchList, - boost::optional< OUString > const & cwdUrl, + o3tl::optional< OUString > const & cwdUrl, std::vector< OUString > const & aRequestList, DispatchWatcher::RequestType nType, const OUString& aParam, @@ -1238,7 +1238,7 @@ static void AddToDispatchList( static void AddConversionsToDispatchList( std::vector<DispatchWatcher::DispatchRequest>& rDispatchList, - boost::optional< OUString > const & cwdUrl, + o3tl::optional< OUString > const & cwdUrl, std::vector< OUString > const & rRequestList, const OUString& rParam, const OUString& rPrinterName, diff --git a/desktop/source/app/officeipcthread.hxx b/desktop/source/app/officeipcthread.hxx index ca2533e191b8..79b550e70768 100644 --- a/desktop/source/app/officeipcthread.hxx +++ b/desktop/source/app/officeipcthread.hxx @@ -34,7 +34,7 @@ #include <cppuhelper/implbase.hxx> #include <osl/conditn.hxx> #include <salhelper/thread.hxx> -#include <boost/optional.hpp> +#include <o3tl/optional.hxx> namespace desktop { @@ -45,10 +45,10 @@ oslSignalAction SalMainPipeExchangeSignal_impl(void* /*pData*/, oslSignalInfo* p // that was given by command line or by IPC pipe communication. struct ProcessDocumentsRequest { - explicit ProcessDocumentsRequest(boost::optional< OUString > const & cwdUrl): + explicit ProcessDocumentsRequest(o3tl::optional< OUString > const & cwdUrl): aCwdUrl(cwdUrl), pcProcessed( nullptr ), bTextCat( false ), bScriptCat( false ) {} - boost::optional< OUString > aCwdUrl; + o3tl::optional< OUString > aCwdUrl; OUString aModule; std::vector< OUString > aOpenList; // Documents that should be opened in the default way std::vector< OUString > aViewList; // Documents that should be opened in viewmode diff --git a/desktop/source/app/opencl.cxx b/desktop/source/app/opencl.cxx index 5ef73dd70cf9..766ac5011ab9 100644 --- a/desktop/source/app/opencl.cxx +++ b/desktop/source/app/opencl.cxx @@ -227,7 +227,7 @@ void Desktop::CheckOpenCLCompute(const Reference< XDesktop2 > &xDesktop) { // OpenCL device changed - sanity check it and disable if bad. - boost::optional<sal_Int32> nOrigMinimumSize = officecfg::Office::Calc::Formula::Calculation::OpenCLMinimumDataSize::get(); + o3tl::optional<sal_Int32> nOrigMinimumSize = officecfg::Office::Calc::Formula::Calculation::OpenCLMinimumDataSize::get(); { // set the minimum group size to something small for quick testing. std::shared_ptr<comphelper::ConfigurationChanges> xBatch(comphelper::ConfigurationChanges::create()); officecfg::Office::Calc::Formula::Calculation::OpenCLMinimumDataSize::set(3 /* small */, xBatch); diff --git a/desktop/source/deployment/dp_log.cxx b/desktop/source/deployment/dp_log.cxx index 000dc46b347c..9f962f05a497 100644 --- a/desktop/source/deployment/dp_log.cxx +++ b/desktop/source/deployment/dp_log.cxx @@ -36,7 +36,7 @@ #include <com/sun/star/io/IOException.hpp> #include <com/sun/star/io/XSeekable.hpp> #include <stdio.h> -#include <boost/optional.hpp> +#include <o3tl/optional.hxx> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; diff --git a/desktop/source/deployment/gui/dp_gui_service.cxx b/desktop/source/deployment/gui/dp_gui_service.cxx index fbcb4ed13232..641ba623a534 100644 --- a/desktop/source/deployment/gui/dp_gui_service.cxx +++ b/desktop/source/deployment/gui/dp_gui_service.cxx @@ -36,7 +36,7 @@ #include <com/sun/star/task/XJobExecutor.hpp> #include <com/sun/star/ui/dialogs/XAsynchronousExecutableDialog.hpp> -#include <boost/optional.hpp> +#include <o3tl/optional.hxx> #include "license_dialog.hxx" #include "dp_gui_dialog2.hxx" #include "dp_gui_extensioncmdqueue.hxx" @@ -143,8 +143,8 @@ class ServiceImpl task::XJobExecutor> { Reference<XComponentContext> const m_xComponentContext; - boost::optional< Reference<awt::XWindow> > /* const */ m_parent; - boost::optional<OUString> m_extensionURL; + o3tl::optional< Reference<awt::XWindow> > /* const */ m_parent; + o3tl::optional<OUString> m_extensionURL; OUString m_initialTitle; bool m_bShowUpdateOnly; @@ -169,8 +169,8 @@ ServiceImpl::ServiceImpl( Sequence<Any> const& args, m_bShowUpdateOnly( false ) { /* if true then this service is running in a unopkg process and not in an office process */ - boost::optional<sal_Bool> unopkg; - boost::optional<OUString> view; + o3tl::optional<sal_Bool> unopkg; + o3tl::optional<OUString> view; try { comphelper::unwrapArgs( args, m_parent, view, unopkg ); return; diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx index c68fab086eaf..0dcbf641f3c0 100644 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx @@ -27,7 +27,7 @@ #include <vector> -#include <boost/optional.hpp> +#include <o3tl/optional.hxx> #include <com/sun/star/awt/Rectangle.hpp> #include <com/sun/star/awt/WindowAttribute.hpp> #include <com/sun/star/awt/WindowClass.hpp> @@ -412,7 +412,7 @@ void UpdateDialog::Thread::prepareUpdateData( out_du.unsatisfiedDependencies[i] = dp_misc::Dependencies::getErrorText(ds[i]); } - const ::boost::optional< OUString> updateWebsiteURL(infoset.getLocalizedUpdateWebsiteURL()); + const ::o3tl::optional< OUString> updateWebsiteURL(infoset.getLocalizedUpdateWebsiteURL()); out_du.name = getUpdateDisplayString(out_data, infoset.getVersion()); @@ -841,7 +841,7 @@ bool UpdateDialog::isIgnoredUpdate( UpdateDialog::Index * index ) { DisabledUpdate &rData = m_disabledUpdates[ index->m_nIndex ]; dp_misc::DescriptionInfoset aInfoset( m_context, rData.aUpdateInfo ); - ::boost::optional< OUString > aID( aInfoset.getIdentifier() ); + ::o3tl::optional< OUString > aID( aInfoset.getIdentifier() ); if ( aID ) aExtensionID = *aID; aVersion = aInfoset.getVersion(); diff --git a/desktop/source/deployment/inc/dp_descriptioninfoset.hxx b/desktop/source/deployment/inc/dp_descriptioninfoset.hxx index 9608a75215a7..03a5ededfeca 100644 --- a/desktop/source/deployment/inc/dp_descriptioninfoset.hxx +++ b/desktop/source/deployment/inc/dp_descriptioninfoset.hxx @@ -22,7 +22,7 @@ #include <sal/config.h> -#include <boost/optional.hpp> +#include <o3tl/optional.hxx> #include <com/sun/star/uno/Reference.hxx> #include <com/sun/star/uno/Sequence.hxx> #include <sal/types.h> @@ -83,7 +83,7 @@ public: @return the identifier, or an empty <code>optional</code> if none is specified */ - ::boost::optional< OUString > getIdentifier() const; + ::o3tl::optional< OUString > getIdentifier() const; /** Return the textual version representation. @@ -135,7 +135,7 @@ public: As long as there is a simple-license element, the function will return the structure. If it does not exist, then the optional object is uninitialized. */ - ::boost::optional<SimpleLicenseAttributes> getSimpleLicenseAttributes() const; + ::o3tl::optional<SimpleLicenseAttributes> getSimpleLicenseAttributes() const; /** returns the localized display name of the extensions. @@ -162,7 +162,7 @@ public: the download website URL, or an empty <code>optional</code> if none is specified */ - ::boost::optional< OUString > getLocalizedUpdateWebsiteURL() const; + ::o3tl::optional< OUString > getLocalizedUpdateWebsiteURL() const; /** returns the relative URL to the description. @@ -206,7 +206,7 @@ public: bool hasDescription() const; private: - SAL_DLLPRIVATE ::boost::optional< OUString > getOptionalValue( + SAL_DLLPRIVATE ::o3tl::optional< OUString > getOptionalValue( OUString const & expression) const; SAL_DLLPRIVATE css::uno::Sequence< OUString > getUrls( diff --git a/desktop/source/deployment/inc/dp_identifier.hxx b/desktop/source/deployment/inc/dp_identifier.hxx index 16d95c57baf9..a7ce629f42ff 100644 --- a/desktop/source/deployment/inc/dp_identifier.hxx +++ b/desktop/source/deployment/inc/dp_identifier.hxx @@ -22,7 +22,7 @@ #include <sal/config.h> -#include <boost/optional.hpp> +#include <o3tl/optional.hxx> #include <com/sun/star/uno/Reference.hxx> #include "dp_misc_api.hxx" @@ -47,7 +47,7 @@ namespace dp_misc { on the given file name */ DESKTOP_DEPLOYMENTMISC_DLLPUBLIC OUString generateIdentifier( - ::boost::optional< OUString > const & optional, + ::o3tl::optional< OUString > const & optional, OUString const & fileName); /** diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx index fae8afe53e62..e99dbda3454d 100644 --- a/desktop/source/deployment/manager/dp_extensionmanager.cxx +++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx @@ -560,7 +560,7 @@ bool ExtensionManager::doChecksForAddExtension( ExtensionProperties props(OUString(), properties, Reference<ucb::XCommandEnvironment>(), m_xContext); dp_misc::DescriptionInfoset info(dp_misc::getDescriptionInfoset(xTmpExtension->getURL())); - const ::boost::optional<dp_misc::SimpleLicenseAttributes> licenseAttributes = + const ::o3tl::optional<dp_misc::SimpleLicenseAttributes> licenseAttributes = info.getSimpleLicenseAttributes(); if (licenseAttributes && licenseAttributes->suppressIfRequired diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx index 7c79ab43405e..be7150588485 100644 --- a/desktop/source/deployment/manager/dp_manager.cxx +++ b/desktop/source/deployment/manager/dp_manager.cxx @@ -1391,7 +1391,7 @@ bool PackageManagerImpl::synchronizeAddedExtensions( // shall the license be suppressed? DescriptionInfoset info = dp_misc::getDescriptionInfoset(url); - ::boost::optional<dp_misc::SimpleLicenseAttributes> + ::o3tl::optional<dp_misc::SimpleLicenseAttributes> attr = info.getSimpleLicenseAttributes(); ExtensionProperties props(url, xCmdEnv, m_xComponentContext); bool bNoLicense = false; diff --git a/desktop/source/deployment/manager/dp_properties.hxx b/desktop/source/deployment/manager/dp_properties.hxx index f6edd8476629..cc4bd931df34 100644 --- a/desktop/source/deployment/manager/dp_properties.hxx +++ b/desktop/source/deployment/manager/dp_properties.hxx @@ -23,7 +23,7 @@ #include <com/sun/star/beans/NamedValue.hpp> #include <com/sun/star/ucb/XCommandEnvironment.hpp> -#include <boost/optional.hpp> +#include <o3tl/optional.hxx> namespace dp_manager { @@ -34,8 +34,8 @@ class ExtensionProperties final OUString m_propFileUrl; const css::uno::Reference<css::ucb::XCommandEnvironment> m_xCmdEnv; const css::uno::Reference<css::uno::XComponentContext> m_xContext; - ::boost::optional< OUString> m_prop_suppress_license; - ::boost::optional< OUString> m_prop_extension_update; + ::o3tl::optional< OUString> m_prop_suppress_license; + ::o3tl::optional< OUString> m_prop_extension_update; static OUString getPropertyValue(css::beans::NamedValue const & v); public: diff --git a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx index 3e10663ef8db..585fcec13224 100644 --- a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx +++ b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx @@ -26,7 +26,7 @@ #include <comphelper/seqstream.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/propertysequence.hxx> -#include <boost/optional.hpp> +#include <o3tl/optional.hxx> #include <com/sun/star/configuration/theDefaultProvider.hpp> #include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/deployment/DeploymentException.hpp> @@ -327,7 +327,7 @@ DescriptionInfoset::DescriptionInfoset( DescriptionInfoset::~DescriptionInfoset() {} -::boost::optional< OUString > DescriptionInfoset::getIdentifier() const { +::o3tl::optional< OUString > DescriptionInfoset::getIdentifier() const { return getOptionalValue("desc:identifier/@value"); } @@ -347,7 +347,7 @@ OUString DescriptionInfoset::getNodeValueFromExpression(OUString const & express void DescriptionInfoset::checkBlacklist() const { if (m_element.is()) { - boost::optional< OUString > id(getIdentifier()); + o3tl::optional< OUString > id(getIdentifier()); if (!id) return; // nothing to check OUString currentversion(getVersion()); @@ -521,20 +521,20 @@ OUString DescriptionInfoset::getIconURL( bool bHighContrast ) const return OUString(); } -::boost::optional< OUString > DescriptionInfoset::getLocalizedUpdateWebsiteURL() +::o3tl::optional< OUString > DescriptionInfoset::getLocalizedUpdateWebsiteURL() const { bool bParentExists = false; const OUString sURL (getLocalizedHREFAttrFromChild("/desc:description/desc:update-website", &bParentExists )); if (!sURL.isEmpty()) - return ::boost::optional< OUString >(sURL); + return ::o3tl::optional< OUString >(sURL); else - return bParentExists ? ::boost::optional< OUString >(OUString()) : - ::boost::optional< OUString >(); + return bParentExists ? ::o3tl::optional< OUString >(OUString()) : + ::o3tl::optional< OUString >(); } -::boost::optional< OUString > DescriptionInfoset::getOptionalValue( +::o3tl::optional< OUString > DescriptionInfoset::getOptionalValue( OUString const & expression) const { css::uno::Reference< css::xml::dom::XNode > n; @@ -546,8 +546,8 @@ OUString DescriptionInfoset::getIconURL( bool bHighContrast ) const } } return n.is() - ? ::boost::optional< OUString >(getNodeValue(n)) - : ::boost::optional< OUString >(); + ? ::o3tl::optional< OUString >(getNodeValue(n)) + : ::o3tl::optional< OUString >(); } css::uno::Sequence< OUString > DescriptionInfoset::getUrls( @@ -632,7 +632,7 @@ OUString DescriptionInfoset::getLocalizedLicenseURL() const } -::boost::optional<SimpleLicenseAttributes> +::o3tl::optional<SimpleLicenseAttributes> DescriptionInfoset::getSimpleLicenseAttributes() const { //Check if the node exist @@ -649,22 +649,22 @@ DescriptionInfoset::getSimpleLicenseAttributes() const attributes.acceptBy = getNodeValueFromExpression("/desc:description/desc:registration/desc:simple-license/@accept-by"); - ::boost::optional< OUString > suppressOnUpdate = getOptionalValue("/desc:description/desc:registration/desc:simple-license/@suppress-on-update"); + ::o3tl::optional< OUString > suppressOnUpdate = getOptionalValue("/desc:description/desc:registration/desc:simple-license/@suppress-on-update"); if (suppressOnUpdate) attributes.suppressOnUpdate = (*suppressOnUpdate).trim().equalsIgnoreAsciiCase("true"); else attributes.suppressOnUpdate = false; - ::boost::optional< OUString > suppressIfRequired = getOptionalValue("/desc:description/desc:registration/desc:simple-license/@suppress-if-required"); + ::o3tl::optional< OUString > suppressIfRequired = getOptionalValue("/desc:description/desc:registration/desc:simple-license/@suppress-if-required"); if (suppressIfRequired) attributes.suppressIfRequired = (*suppressIfRequired).trim().equalsIgnoreAsciiCase("true"); else attributes.suppressIfRequired = false; - return ::boost::optional<SimpleLicenseAttributes>(attributes); + return ::o3tl::optional<SimpleLicenseAttributes>(attributes); } } - return ::boost::optional<SimpleLicenseAttributes>(); + return ::o3tl::optional<SimpleLicenseAttributes>(); } OUString DescriptionInfoset::getLocalizedDescriptionURL() const diff --git a/desktop/source/deployment/misc/dp_identifier.cxx b/desktop/source/deployment/misc/dp_identifier.cxx index bb90b8bb0d2f..7f07b5362bda 100644 --- a/desktop/source/deployment/misc/dp_identifier.cxx +++ b/desktop/source/deployment/misc/dp_identifier.cxx @@ -20,7 +20,7 @@ #include <sal/config.h> -#include <boost/optional.hpp> +#include <o3tl/optional.hxx> #include <com/sun/star/beans/Optional.hpp> #include <com/sun/star/deployment/XPackage.hpp> #include <com/sun/star/uno/Reference.hxx> @@ -34,7 +34,7 @@ namespace dp_misc { OUString generateIdentifier( - ::boost::optional< OUString > const & optional, + ::o3tl::optional< OUString > const & optional, OUString const & fileName) { return optional ? *optional : generateLegacyIdentifier(fileName); diff --git a/desktop/source/deployment/misc/dp_update.cxx b/desktop/source/deployment/misc/dp_update.cxx index 38b37d1da873..1387ad015ae6 100644 --- a/desktop/source/deployment/misc/dp_update.cxx +++ b/desktop/source/deployment/misc/dp_update.cxx @@ -112,7 +112,7 @@ void getOwnUpdateInfos( Reference< xml::dom::XNode >(infos[j], UNO_QUERY_THROW)); if (!infoset.hasDescription()) continue; - boost::optional< OUString > result_id(infoset.getIdentifier()); + o3tl::optional< OUString > result_id(infoset.getIdentifier()); if (!result_id) continue; SAL_INFO( "extensions.update", " found version " @@ -153,7 +153,7 @@ void getDefaultUpdateInfos( { Reference< xml::dom::XNode > node(infos[i], UNO_QUERY_THROW); dp_misc::DescriptionInfoset infoset(xContext, node); - boost::optional< OUString > id(infoset.getIdentifier()); + o3tl::optional< OUString > id(infoset.getIdentifier()); if (!id) { continue; } diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx index 40d0ee9c8b3c..fb00877fb276 100644 --- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx +++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx @@ -137,7 +137,7 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend Reference<XCommandEnvironment> const & xCmdEnv ); #endif void addDataToDb(OUString const & url, ConfigurationBackendDb::Data const & data); - ::boost::optional<ConfigurationBackendDb::Data> readDataFromDb(OUString const & url); + ::o3tl::optional<ConfigurationBackendDb::Data> readDataFromDb(OUString const & url); void revokeEntryFromDb(OUString const & url); bool hasActiveEntry(OUString const & url); bool activateEntry(OUString const & url); @@ -247,10 +247,10 @@ void BackendImpl::addDataToDb( m_backendDb->addEntry(url, data); } -::boost::optional<ConfigurationBackendDb::Data> BackendImpl::readDataFromDb( +::o3tl::optional<ConfigurationBackendDb::Data> BackendImpl::readDataFromDb( OUString const & url) { - ::boost::optional<ConfigurationBackendDb::Data> data; + ::o3tl::optional<ConfigurationBackendDb::Data> data; if (m_backendDb) data = m_backendDb->getEntry(url); return data; @@ -495,7 +495,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. - ::boost::optional<ConfigurationBackendDb::Data> data = readDataFromDb(url_); + ::o3tl::optional<ConfigurationBackendDb::Data> data = readDataFromDb(url_); if (data) i = std::find(rSet.begin(), rSet.end(), data->iniEntry); } @@ -687,7 +687,7 @@ void BackendImpl::PackageImpl::processPackage_( { if (getMyBackend()->activateEntry(getURL())) { - ::boost::optional<ConfigurationBackendDb::Data> data = that->readDataFromDb(url); + ::o3tl::optional<ConfigurationBackendDb::Data> data = that->readDataFromDb(url); OSL_ASSERT(data); that->addToConfigmgrIni( m_isSchema, false, data->iniEntry, xCmdEnv ); } @@ -779,7 +779,7 @@ void BackendImpl::PackageImpl::processPackage_( } } #endif - ::boost::optional<ConfigurationBackendDb::Data> data = that->readDataFromDb(url); + ::o3tl::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 68a1f009d0bc..ba8159775639 100644 --- a/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx +++ b/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx @@ -96,7 +96,7 @@ void ConfigurationBackendDb::addEntry(OUString const & url, Data const & data) } -::boost::optional<ConfigurationBackendDb::Data> +::o3tl::optional<ConfigurationBackendDb::Data> ConfigurationBackendDb::getEntry(OUString const & url) { try @@ -110,9 +110,9 @@ ConfigurationBackendDb::getEntry(OUString const & url) } else { - return ::boost::optional<Data>(); + return ::o3tl::optional<Data>(); } - return ::boost::optional<Data>(retData); + return ::o3tl::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 09cbf05a9d3d..0e0d4c4899cf 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 <boost/optional.hpp> +#include <o3tl/optional.hxx> #include <dp_backenddb.hxx> namespace com { namespace sun { namespace star { @@ -69,7 +69,7 @@ public: void addEntry(OUString const & url, Data const & data); - ::boost::optional<Data> getEntry(OUString const & url); + ::o3tl::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 5c7b9bd1f2e3..bdab16126453 100644 --- a/desktop/source/deployment/registry/dp_backend.cxx +++ b/desktop/source/deployment/registry/dp_backend.cxx @@ -46,7 +46,7 @@ #include <com/sun/star/sdbc/XRow.hpp> #include <tools/diagnose_ex.h> #include <unotools/tempfile.hxx> -#include <boost/optional.hpp> +#include <o3tl/optional.hxx> using namespace ::dp_misc; using namespace ::com::sun::star; @@ -83,8 +83,8 @@ PackageRegistryBackend::PackageRegistryBackend( m_eContext( Context::Unknown ) { assert(xContext.is()); - boost::optional<OUString> cachePath; - boost::optional<bool> readOnly; + o3tl::optional<OUString> cachePath; + o3tl::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 5d2541ab0f3a..cba0ac01d7a7 100644 --- a/desktop/source/deployment/registry/help/dp_help.cxx +++ b/desktop/source/deployment/registry/help/dp_help.cxx @@ -42,7 +42,7 @@ #include <com/sun/star/deployment/ExtensionRemovedException.hpp> #include <com/sun/star/ucb/SimpleFileAccess.hpp> #include <com/sun/star/util/XMacroExpander.hpp> -#include <boost/optional.hpp> +#include <o3tl/optional.hxx> using namespace ::dp_misc; using namespace ::com::sun::star; @@ -99,7 +99,7 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend void implCollectXhpFiles( const OUString& aDir, std::vector< OUString >& o_rXhpFileVector ); - ::boost::optional<HelpBackendDb::Data> readDataFromDb(OUString const & url); + ::o3tl::optional<HelpBackendDb::Data> readDataFromDb(OUString const & url); bool hasActiveEntry(OUString const & url); bool activateEntry(OUString const & url); @@ -204,10 +204,10 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_( static_cast<sal_Int16>(-1) ); } -::boost::optional<HelpBackendDb::Data> BackendImpl::readDataFromDb( +::o3tl::optional<HelpBackendDb::Data> BackendImpl::readDataFromDb( OUString const & url) { - ::boost::optional<HelpBackendDb::Data> data; + ::o3tl::optional<HelpBackendDb::Data> data; if (m_backendDb) data = m_backendDb->getEntry(url); return data; @@ -337,7 +337,7 @@ beans::Optional< OUString > BackendImpl::PackageImpl::getRegistrationDataURL() if (m_bRemoved) throw deployment::ExtensionRemovedException(); - ::boost::optional<HelpBackendDb::Data> data = + ::o3tl::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 59867dd54767..7f9f7095be85 100644 --- a/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx +++ b/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx @@ -94,7 +94,7 @@ void HelpBackendDb::addEntry(OUString const & url, Data const & data) } -::boost::optional<HelpBackendDb::Data> +::o3tl::optional<HelpBackendDb::Data> HelpBackendDb::getEntry(OUString const & url) { try @@ -107,9 +107,9 @@ HelpBackendDb::getEntry(OUString const & url) } else { - return ::boost::optional<Data>(); + return ::o3tl::optional<Data>(); } - return ::boost::optional<Data>(retData); + return ::o3tl::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 ad030ee60f58..1a9eabc861aa 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 <boost/optional.hpp> +#include <o3tl/optional.hxx> #include <dp_backenddb.hxx> namespace com { namespace sun { namespace star { @@ -64,7 +64,7 @@ public: void addEntry(OUString const & url, Data const & data); - ::boost::optional<Data> getEntry(OUString const & url); + ::o3tl::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 712742ed93c5..4ae501fdd948 100644 --- a/desktop/source/deployment/registry/package/dp_package.cxx +++ b/desktop/source/deployment/registry/package/dp_package.cxx @@ -68,7 +68,7 @@ #include <com/sun/star/xml/dom/XDocumentBuilder.hpp> #include <com/sun/star/xml/xpath/XXPathAPI.hpp> #include <com/sun/star/deployment/XPackageManager.hpp> -#include <boost/optional.hpp> +#include <o3tl/optional.hxx> #include <tools/diagnose_ex.h> #include <algorithm> @@ -628,7 +628,7 @@ bool BackendImpl::PackageImpl::checkLicense( { try { - ::boost::optional<SimpleLicenseAttributes> simplLicAttr + ::o3tl::optional<SimpleLicenseAttributes> simplLicAttr = info.getSimpleLicenseAttributes(); if (! simplLicAttr) return true; @@ -951,7 +951,7 @@ OUString BackendImpl::PackageImpl::getLicenseText() OUString sLicense; DescriptionInfoset aInfo = getDescriptionInfoset(); - ::boost::optional< SimpleLicenseAttributes > aSimplLicAttr = aInfo.getSimpleLicenseAttributes(); + ::o3tl::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 2136e4454a87..a6de29ffb0b2 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 <boost/optional.hpp> +#include <o3tl/optional.hxx> namespace com { namespace sun { namespace star { namespace uno { |