Introduce o3tl::optional as an alias for std::optional

...with a boost::optional fallback for Xcode < 10 (as std::optional is only
available starting with Xcode 10 according to
<https://en.cppreference.com/w/cpp/compiler_support>, and our baseline for iOS
and macOS is still Xcode 9.3 according to README.md).  And mechanically rewrite
all code to use o3tl::optional instead of boost::optional.

One immediate benefit is that disabling -Wmaybe-uninitialized for GCC as per
fed7c3deb3 "Slience bogus
-Werror=maybe-uninitialized" should no longer be necessary (and whose check
happened to no longer trigger for GCC 10 trunk, even though that compiler would
still emit bogus -Wmaybe-uninitialized for uses of boost::optional under
--enable-optimized, which made me ponder whether this switch from
boost::optional to std::optional would be a useful thing to do; I keep that
configure.ac check for now, though, and will only remove it in a follow up
commit).

Another longer-term benefit is that the code is now already in good shape for an
eventual switch to std::optional (a switch we would have done anyway once we no
longer need to support Xcode < 10).

Only desktop/qa/desktop_lib/test_desktop_lib.cxx heavily uses
boost::property_tree::ptree::get_child_optional returning boost::optional, so
let it keep using boost::optional for now.

After a number of preceding commits have paved the way for this change, this
commit is completely mechanical, done with

> git ls-files -z | grep -vz -e '^bin/find-unneeded-includes$' -e '^configure.ac$' -e '^desktop/qa/desktop_lib/test_desktop_lib.cxx$' -e '^dictionaries$' -e '^external/' -e '^helpcontent2$' -e '^include/IwyuFilter_include.yaml$' -e '^sc/IwyuFilter_sc.yaml$' -e '^solenv/gdb/boost/optional.py$' -e '^solenv/vs/LibreOffice.natvis$' -e '^translations$' -e '\.svg$' | xargs -0 sed -i -E -e 's|\<boost(/optional)?/optional\.hpp\>|o3tl/optional.hxx|g' -e 's/\<boost(\s*)::(\s*)(make_)?optional\>/o3tl\1::\2\3optional/g' -e 's/\<boost(\s*)::(\s*)none\>/o3tl\1::\2nullopt/g'

(before committing include/o3tl/optional.hxx, and relying on some GNU features).
It excludes some files where mention of boost::optional et al should apparently
not be changed (and the sub-repo directory stubs).  It turned out that all uses
of boost::none across the code base were in combination with boost::optional, so
had all to be rewritten as o3tl::nullopt.

Change-Id: Ibfd9f4b3d5a8aee6e6eed310b988c4e5ffd8b11b
Reviewed-on: https://gerrit.libreoffice.org/84128
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
Stephan Bergmann
2019-12-01 14:57:16 +01:00
parent 7b3190eda3
commit 7e403195e5
364 changed files with 1110 additions and 1064 deletions
+1 -1
View File
@@ -48,7 +48,7 @@
#include <typeinfo>
#include <utility>
#include <vector>
#include <boost/optional.hpp>
#include <o3tl/optional.hxx>
#endif // PCH_LEVEL >= 1
#if PCH_LEVEL >= 2
#include <osl/diagnose.h>
+1 -1
View File
@@ -52,7 +52,7 @@
#include <utility>
#include <vector>
#include <boost/functional/hash.hpp>
#include <boost/optional.hpp>
#include <o3tl/optional.hxx>
#include <boost/property_tree/ptree.hpp>
#endif // PCH_LEVEL >= 1
#if PCH_LEVEL >= 2
+2 -2
View File
@@ -25,7 +25,7 @@
#include <com/sun/star/container/XContainerListener.hpp>
#include <svx/svdouno.hxx>
#include <boost/optional.hpp>
#include <o3tl/optional.hxx>
#include <map>
@@ -158,7 +158,7 @@ private:
DlgEditor& rDlgEditor;
std::vector<DlgEdObj*> pChildren;
mutable ::boost::optional< css::awt::DeviceInfo > mpDeviceInfo;
mutable ::o3tl::optional< css::awt::DeviceInfo > mpDeviceInfo;
private:
explicit DlgEdForm(
+1 -1
View File
@@ -29,7 +29,7 @@
#include <stdlib.h>
#include <string.h>
#include <vector>
#include <boost/optional.hpp>
#include <o3tl/optional.hxx>
#include <boost/property_tree/ptree.hpp>
#endif // PCH_LEVEL >= 1
#if PCH_LEVEL >= 2
+2 -2
View File
@@ -24,14 +24,14 @@
#include <basic/sbx.hxx>
#include <runtime.hxx>
#include <boost/optional.hpp>
#include <o3tl/optional.hxx>
using namespace std;
struct SbxVarEntry
{
SbxVariableRef mpVar;
boost::optional<OUString> maAlias;
o3tl::optional<OUString> maAlias;
};
+2 -2
View File
@@ -21,7 +21,7 @@
#define INCLUDED_CANVAS_SOURCE_DIRECTX_DX_CONFIG_HXX
#include <unotools/configitem.hxx>
#include <boost/optional.hpp>
#include <o3tl/optional.hxx>
#include <set>
namespace basegfx { class B2IVector; }
@@ -72,7 +72,7 @@ namespace dxcanvas
virtual void ImplCommit() override;
typedef std::set< DeviceInfo > ValueSet;
ValueSet maValues;
boost::optional<sal_Int32> maMaxTextureSize;
o3tl::optional<sal_Int32> maMaxTextureSize;
bool mbBlacklistCurrentDevice;
bool mbValuesDirty;
};
@@ -48,7 +48,7 @@
#include <unordered_map>
#include <utility>
#include <vector>
#include <boost/optional.hpp>
#include <o3tl/optional.hxx>
#endif // PCH_LEVEL >= 1
#if PCH_LEVEL >= 2
#include <osl/diagnose.h>
+1 -1
View File
@@ -33,7 +33,7 @@
#include <string_view>
#include <utility>
#include <vector>
#include <boost/optional.hpp>
#include <o3tl/optional.hxx>
#endif // PCH_LEVEL >= 1
#if PCH_LEVEL >= 2
#include <osl/diagnose.h>
@@ -22,7 +22,7 @@
#include "ItemConverter.hxx"
#include <com/sun/star/awt/Size.hpp>
#include <boost/optional.hpp>
#include <o3tl/optional.hxx>
namespace chart { namespace wrapper {
@@ -52,7 +52,7 @@ private:
OUString m_aRefSizePropertyName;
css::uno::Reference<css::beans::XPropertySet> m_xRefSizePropSet;
boost::optional<css::awt::Size> m_pRefSize;
o3tl::optional<css::awt::Size> m_pRefSize;
};
}}
+3 -3
View File
@@ -30,7 +30,7 @@
#include <com/sun/star/uno/Any.hxx>
#include <vector>
#include <boost/optional.hpp>
#include <o3tl/optional.hxx>
namespace chart { class ExplicitCategoriesProvider; }
namespace com { namespace sun { namespace star { namespace beans { class XPropertySet; } } } }
@@ -101,8 +101,8 @@ struct AxisProperties final
css::chart::ChartAxisLabelPosition m_eLabelPos;
css::chart::ChartAxisMarkPosition m_eTickmarkPos;
boost::optional<double> m_pfMainLinePositionAtOtherAxis;
boost::optional<double> m_pfExrtaLinePositionAtOtherAxis;
o3tl::optional<double> m_pfMainLinePositionAtOtherAxis;
o3tl::optional<double> m_pfExrtaLinePositionAtOtherAxis;
bool m_bCrossingAxisHasReverseDirection;
bool m_bCrossingAxisIsCategoryAxes;
@@ -45,7 +45,7 @@
#include <unordered_map>
#include <utility>
#include <vector>
#include <boost/optional.hpp>
#include <o3tl/optional.hxx>
#endif // PCH_LEVEL >= 1
#if PCH_LEVEL >= 2
#include <osl/conditn.hxx>
+6 -6
View File
@@ -7,7 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include <boost/optional.hpp>
#include <o3tl/optional.hxx>
#include <sal/types.h>
#include <comphelper/unwrapargs.hxx>
#include <cppunit/TestAssert.h>
@@ -56,7 +56,7 @@ void extract(
template <typename T>
void extract(
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any> const& seq,
sal_Int32 nArg, ::boost::optional<T> & v,
sal_Int32 nArg, ::o3tl::optional<T> & v,
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>
const& xErrorContext )
{
@@ -104,22 +104,22 @@ void VariadicTemplatesTest::testUnwrapArgs() {
::com::sun::star::uno::Any tmp9(
::com::sun::star::uno::makeAny( tmp4 )
);
::boost::optional< ::com::sun::star::uno::Any > tmp10(
::o3tl::optional< ::com::sun::star::uno::Any > tmp10(
::com::sun::star::uno::makeAny( tmp5 )
);
::boost::optional< ::com::sun::star::uno::Any > tmp11(
::o3tl::optional< ::com::sun::star::uno::Any > tmp11(
::com::sun::star::uno::makeAny( tmp1 )
);
// test equality with the baseline and template specialization with
// boost::optional< T >
// o3tl::optional< T >
try {
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > seq1(
static_cast< sal_uInt32 >( 5 ) );
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > seq2(
static_cast< sal_uInt32 >( 5 ) );
// tmp11 should be ignored as it is ::boost::optional< T >
// tmp11 should be ignored as it is ::o3tl::optional< T >
::comphelper::unwrapArgs( seq1, tmp6, tmp7, tmp8, tmp9, tmp10, tmp11 );
unwrapArgsBaseline( seq2, tmp6, tmp7, tmp8, tmp9, tmp10 );
::com::sun::star::uno::Any* p1 = seq1.getArray();
@@ -26,7 +26,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/util/XOfficeInstallationDirectories.hpp>
#include <boost/optional.hpp>
#include <o3tl/optional.hxx>
namespace com::sun::star::uno { class XComponentContext; }
@@ -72,8 +72,8 @@ private:
void initDirs();
css::uno::Reference< css::uno::XComponentContext > m_xCtx;
boost::optional<OUString> m_xOfficeBrandDir;
boost::optional<OUString> m_xUserDir;
o3tl::optional<OUString> m_xOfficeBrandDir;
o3tl::optional<OUString> m_xUserDir;
};
} // namespace comphelper
@@ -2675,7 +2675,7 @@ slideshow/source/engine/transitions/checkerboardwipe.hxx:36
int unitsPerEdge
10
slideshow/source/engine/transitions/combtransition.hxx:42
void slideshow::internal::CombTransition::CombTransition(const class boost::optional<class std::shared_ptr<class slideshow::internal::Slide> > &,const class std::shared_ptr<class slideshow::internal::Slide> &,const class std::shared_ptr<class slideshow::internal::SoundPlayer> &,const class slideshow::internal::UnoViewContainer &,class slideshow::internal::ScreenUpdater &,class slideshow::internal::EventMultiplexer &,const class basegfx::B2DVector &,int)
void slideshow::internal::CombTransition::CombTransition(const class o3tl::optional<class std::shared_ptr<class slideshow::internal::Slide> > &,const class std::shared_ptr<class slideshow::internal::Slide> &,const class std::shared_ptr<class slideshow::internal::SoundPlayer> &,const class slideshow::internal::UnoViewContainer &,class slideshow::internal::ScreenUpdater &,class slideshow::internal::EventMultiplexer &,const class basegfx::B2DVector &,int)
int nNumStripes
24
slideshow/source/engine/transitions/snakewipe.hxx:55
+1 -1
View File
@@ -111,7 +111,7 @@ bool StylePolice::VisitVarDecl(const VarDecl * varDecl)
if (!qt->isPointerType() && !qt->isArrayType() && !qt->isFunctionPointerType() && !qt->isMemberPointerType()
&& matchPointerVar(name)
&& !startswith(typeName, "boost::intrusive_ptr")
&& !startswith(typeName, "boost::optional")
&& !startswith(typeName, "o3tl::optional")
&& !startswith(typeName, "boost::shared_ptr")
&& !startswith(typeName, "com::sun::star::uno::Reference")
&& !startswith(typeName, "cppu::OInterfaceIteratorHelper")
+2 -2
View File
@@ -533,7 +533,7 @@ include/framework/addonsoptions.hxx:219
include/i18nlangtag/languagetag.hxx:263
enum LanguageTag::ScriptType LanguageTag::getScriptType() const
include/o3tl/any.hxx:155
class boost::optional<const struct o3tl::detail::Void> o3tl::tryAccess(const class com::sun::star::uno::Any &)
class o3tl::optional<const struct o3tl::detail::Void> o3tl::tryAccess(const class com::sun::star::uno::Any &)
include/o3tl/cow_wrapper.hxx:323
type-parameter-?-? * o3tl::cow_wrapper::get()
include/o3tl/enumarray.hxx:105
@@ -1185,7 +1185,7 @@ sc/source/ui/inc/datatableview.hxx:114
sc/source/ui/inc/impex.hxx:93
ScImportExport::ScImportExport(class ScDocument *,const class rtl::OUString &)
sc/source/ui/inc/RandomNumberGeneratorDialog.hxx:64
void ScRandomNumberGeneratorDialog::GenerateNumbers(type-parameter-?-? &,const char *,const class boost::optional<signed char>)
void ScRandomNumberGeneratorDialog::GenerateNumbers(type-parameter-?-? &,const char *,const class o3tl::optional<signed char>)
sc/source/ui/inc/TableFillingAndNavigationTools.hxx:121
unsigned long DataRangeIterator::size()
sc/source/ui/inc/viewdata.hxx:410
+1 -1
View File
@@ -35,7 +35,7 @@
#include <string_view>
#include <utility>
#include <vector>
#include <boost/optional.hpp>
#include <o3tl/optional.hxx>
#endif // PCH_LEVEL >= 1
#if PCH_LEVEL >= 2
#include <osl/diagnose.h>
+1 -1
View File
@@ -40,7 +40,7 @@
#include <type_traits>
#include <utility>
#include <vector>
#include <boost/optional.hpp>
#include <o3tl/optional.hxx>
#endif // PCH_LEVEL >= 1
#if PCH_LEVEL >= 2
#include <osl/diagnose.h>
@@ -22,7 +22,7 @@
#if PCH_LEVEL >= 1
#include <string.h>
#include <boost/optional.hpp>
#include <o3tl/optional.hxx>
#endif // PCH_LEVEL >= 1
#if PCH_LEVEL >= 2
#include <osl/module.h>
@@ -39,7 +39,7 @@
#include <sal/macros.h>
#include <sal/log.hxx>
#include <boost/optional.hpp>
#include <o3tl/optional.hxx>
namespace dbtools
@@ -72,8 +72,8 @@ namespace dbtools
Reference< XDatabaseMetaData > xConnectionMetaData;
::connectivity::DriversConfig aDriverConfig;
::boost::optional< OUString > sCachedIdentifierQuoteString;
::boost::optional< OUString > sCachedCatalogSeparator;
::o3tl::optional< OUString > sCachedIdentifierQuoteString;
::o3tl::optional< OUString > sCachedCatalogSeparator;
DatabaseMetaData_Impl()
:xConnection()
@@ -155,7 +155,7 @@ namespace dbtools
const OUString& lcl_getConnectionStringSetting(
const DatabaseMetaData_Impl& _metaData, ::boost::optional< OUString >& _cachedSetting,
const DatabaseMetaData_Impl& _metaData, ::o3tl::optional< OUString >& _cachedSetting,
OUString (SAL_CALL XDatabaseMetaData::*_getter)() )
{
if ( !_cachedSetting )
+2 -2
View File
@@ -23,7 +23,7 @@
#include <java/lang/Object.hxx>
#include <cppuhelper/implbase.hxx>
#include <com/sun/star/io/XInputStream.hpp>
#include <boost/optional.hpp>
#include <o3tl/optional.hxx>
namespace connectivity
{
@@ -36,7 +36,7 @@ namespace connectivity
// static Data for the Class
static jclass theClass;
virtual ~java_io_Reader() override;
boost::optional<char> m_buf;
o3tl::optional<char> m_buf;
public:
virtual jclass getMyClass() const override;
// a Constructor, that is needed for when Returning the Object is needed:
+1 -1
View File
@@ -41,7 +41,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
+2 -2
View File
@@ -26,7 +26,7 @@
#include <cppcanvas/canvasgraphic.hxx>
#include <cppcanvas/canvas.hxx>
#include <boost/optional.hpp>
#include <o3tl/optional.hxx>
namespace com { namespace sun { namespace star { namespace rendering
{
@@ -62,7 +62,7 @@ namespace cppcanvas
private:
mutable css::rendering::RenderState maRenderState;
boost::optional<basegfx::B2DPolyPolygon> maClipPolyPolygon;
o3tl::optional<basegfx::B2DPolyPolygon> maClipPolyPolygon;
CanvasSharedPtr mpCanvas;
};
+2 -2
View File
@@ -24,7 +24,7 @@
#include <com/sun/star/rendering/ViewState.hpp>
#include <cppcanvas/canvas.hxx>
#include <boost/optional.hpp>
#include <o3tl/optional.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
@@ -77,7 +77,7 @@ namespace cppcanvas
private:
mutable css::rendering::ViewState maViewState;
boost::optional<basegfx::B2DPolyPolygon> maClipPolyPolygon;
o3tl::optional<basegfx::B2DPolyPolygon> maClipPolyPolygon;
const css::uno::Reference< css::rendering::XCanvas > mxCanvas;
};
+1 -1
View File
@@ -49,7 +49,7 @@
#include <unordered_map>
#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
+1 -1
View File
@@ -180,7 +180,7 @@ bool SvxFontSubstTabPage::FillItemSet( SfxItemSet* )
if (m_xFontNameLB->get_active() != -1)
sFontName = m_xFontNameLB->get_active_text();
officecfg::Office::Common::Font::SourceViewFont::FontName::set(
boost::optional< OUString >(sFontName), batch);
o3tl::optional< OUString >(sFontName), batch);
batch->commit();
return false;
+1 -1
View File
@@ -35,7 +35,7 @@ TSAURLsDialog::TSAURLsDialog(weld::Window* pParent)
try
{
boost::optional<css::uno::Sequence<OUString>> aUserSetTSAURLs(officecfg::Office::Common::Security::Scripting::TSAURLs::get());
o3tl::optional<css::uno::Sequence<OUString>> aUserSetTSAURLs(officecfg::Office::Common::Security::Scripting::TSAURLs::get());
if (aUserSetTSAURLs)
{
const css::uno::Sequence<OUString>& rUserSetTSAURLs = *aUserSetTSAURLs;
+1 -1
View File
@@ -44,7 +44,7 @@
#include <type_traits>
#include <utility>
#include <vector>
#include <boost/optional.hpp>
#include <o3tl/optional.hxx>
#endif // PCH_LEVEL >= 1
#if PCH_LEVEL >= 2
#include <osl/diagnose.h>
+1 -1
View File
@@ -27,7 +27,7 @@
#include <memory>
#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
+1 -1
View File
@@ -34,7 +34,7 @@
#include <string_view>
#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
@@ -28,7 +28,7 @@
#include <connectivity/dbtools.hxx>
#include <tools/wldcrd.hxx>
#include <tools/diagnose_ex.h>
#include <boost/optional.hpp>
#include <o3tl/optional.hxx>
#include <sal/log.hxx>
namespace dbaccess
@@ -99,7 +99,7 @@ static sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, std::
return bFilterMatch;
}
typedef ::boost::optional< OUString > OptionalString;
typedef ::o3tl::optional< OUString > OptionalString;
namespace {
+1 -1
View File
@@ -165,7 +165,7 @@ void OResultColumn::disposing()
namespace
{
template< typename T >
void obtain( Any& _out_rValue, ::boost::optional< T > & _rCache, const sal_Int32 _nPos, const Reference < XResultSetMetaData >& _rxResultMeta, T (SAL_CALL XResultSetMetaData::*Getter)( sal_Int32 ) )
void obtain( Any& _out_rValue, ::o3tl::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);
+15 -15
View File
@@ -23,7 +23,7 @@
#include <com/sun/star/sdbc/XResultSetMetaData.hpp>
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
#include <column.hxx>
#include <boost/optional.hpp>
#include <o3tl/optional.hxx>
#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 ::boost::optional< sal_Bool > m_isSigned;
mutable ::boost::optional< sal_Bool > m_isCurrency;
mutable ::boost::optional< sal_Bool > m_bSearchable;
mutable ::boost::optional< sal_Bool > m_isCaseSensitive;
mutable ::boost::optional< sal_Bool > m_isReadOnly;
mutable ::boost::optional< sal_Bool > m_isWritable;
mutable ::boost::optional< sal_Bool > m_isDefinitelyWritable;
mutable ::boost::optional< sal_Bool > m_isAutoIncrement;
mutable ::boost::optional< sal_Int32 > m_isNullable;
mutable ::boost::optional< OUString > m_sColumnLabel;
mutable ::boost::optional< sal_Int32 > m_nColumnDisplaySize;
mutable ::boost::optional< sal_Int32 > m_nColumnType;
mutable ::boost::optional< sal_Int32 > m_nPrecision;
mutable ::boost::optional< sal_Int32 > m_nScale;
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;
virtual ~OResultColumn() override;
public:
@@ -131,7 +131,7 @@ namespace DatabaseObject = sdb::application::DatabaseObject;
namespace dbaccess
{
typedef ::boost::optional< bool > optional_bool;
typedef ::o3tl::optional< bool > optional_bool;
// helper
namespace
@@ -790,7 +790,7 @@ Any ODocumentDefinition::onCommandOpenSomething( const Any& _rOpenArgument, cons
if ( xHandler.is() )
aDocumentArgs.put( "InteractionHandler", xHandler );
::boost::optional< sal_Int16 > aDocumentMacroMode;
::o3tl::optional< sal_Int16 > aDocumentMacroMode;
if ( !lcl_extractOpenMode( _rOpenArgument, nOpenMode ) )
{
+1 -1
View File
@@ -51,7 +51,7 @@ namespace dbaccess
struct ContentProperties
{
OUString aTitle; // Title
::boost::optional< OUString >
::o3tl::optional< OUString >
aContentType; // ContentType (aka MediaType aka MimeType)
bool bIsDocument; // IsDocument
bool bIsFolder; // IsFolder
+1 -1
View File
@@ -166,7 +166,7 @@ private:
oslInterlockedCount m_refCount;
/// do we have any object (forms/reports) which contains macros?
::boost::optional< EmbeddedMacros > m_aEmbeddedMacros;
::o3tl::optional< EmbeddedMacros > m_aEmbeddedMacros;
/// true if setting the Modified flag of the document is currently locked
bool m_bModificationLock;
+2 -2
View File
@@ -55,7 +55,7 @@
#include <connectivity/DriversConfig.hxx>
#include <connectivity/dbtools.hxx>
#include <boost/optional.hpp>
#include <o3tl/optional.hxx>
#include <memory>
#include <iterator>
@@ -350,7 +350,7 @@ void ODBExport::exportDataSource()
{
const OUString sPropertyName;
const XMLTokenEnum eAttributeToken;
const ::boost::optional< OUString > aXMLDefault;
const ::o3tl::optional< OUString > aXMLDefault;
PropertyMap( const OUString& _rPropertyName, const XMLTokenEnum _eToken )
:sPropertyName( _rPropertyName )
+1 -1
View File
@@ -393,7 +393,7 @@ void SAL_CALL OApplicationController::disposing()
aURL.GetURLNoPass( INetURLObject::DecodeMechanism::NONE ),
aFilter,
getStrippedDatabaseName(),
boost::none);
o3tl::nullopt);
// add to recent document list
if ( aURL.GetProtocol() == INetProtocol::File )
+1 -1
View File
@@ -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 ::boost::optional< OUString >& i_rObjectName );
void impl_validateObjectTypeAndName_throw( const sal_Int32 _nObjectType, const ::o3tl::optional< OUString >& i_rObjectName );
protected:
// initializing members
+2 -2
View File
@@ -378,7 +378,7 @@ namespace
}
}
void OApplicationController::impl_validateObjectTypeAndName_throw( const sal_Int32 _nObjectType, const ::boost::optional< OUString >& i_rObjectName )
void OApplicationController::impl_validateObjectTypeAndName_throw( const sal_Int32 _nObjectType, const ::o3tl::optional< OUString >& i_rObjectName )
{
// ensure we're connected
if ( !isConnected() )
@@ -460,7 +460,7 @@ Reference< XComponent > SAL_CALL OApplicationController::createComponentWithArgu
SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
impl_validateObjectTypeAndName_throw( i_nObjectType, ::boost::optional< OUString >() );
impl_validateObjectTypeAndName_throw( i_nObjectType, ::o3tl::optional< OUString >() );
Reference< XComponent > xComponent( newElement(
lcl_objectType2ElementType( i_nObjectType ),
+2 -2
View File
@@ -3172,7 +3172,7 @@ void SbaTableQueryBrowser::impl_initialize()
if ( m_bEnableBrowser )
{
m_aDocScriptSupport = ::boost::optional< bool >( false );
m_aDocScriptSupport = ::o3tl::optional< bool >( false );
}
else
{
@@ -3180,7 +3180,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 = ::boost::optional< bool >( Reference< XEmbeddedScripts >( xDocument, UNO_QUERY ).is() );
m_aDocScriptSupport = ::o3tl::optional< bool >( Reference< XEmbeddedScripts >( xDocument, UNO_QUERY ).is() );
}
if ( implSelect( sInitialDataSourceName, sInitialCommand, nInitialDisplayCommandType, bEscapeProcessing, xConnection, true ) )
+1 -1
View File
@@ -203,7 +203,7 @@ namespace dbaui
bool bTriState = false;
boost::optional<bool> aValue;
o3tl::optional<bool> aValue;
const SfxPoolItem* pItem = _rSet.GetItem<SfxPoolItem>(booleanSetting.nItemId);
if (const SfxBoolItem *pBoolItem = dynamic_cast<const SfxBoolItem*>( pItem) )
+3 -3
View File
@@ -22,7 +22,7 @@
#include <svl/poolitem.hxx>
#include <boost/optional.hpp>
#include <o3tl/optional.hxx>
namespace dbaui
{
@@ -30,7 +30,7 @@ namespace dbaui
// OptionalBoolItem
class OptionalBoolItem : public SfxPoolItem
{
::boost::optional< bool > m_aValue;
::o3tl::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 ::boost::optional< bool >&
const ::o3tl::optional< bool >&
GetFullValue() const { return m_aValue; }
};
+1 -1
View File
@@ -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;
::boost::optional< bool >
::o3tl::optional< bool >
m_aDocScriptSupport; // relevant if and only if we are associated with exactly one DBDoc
virtual OUString getPrivateTitle( ) const override;
@@ -123,7 +123,7 @@ namespace dbaui
struct DBSubComponentController_Impl
{
private:
::boost::optional< bool > m_aDocScriptSupport;
::o3tl::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 = ::boost::optional< bool >( _bSupport );
m_aDocScriptSupport = ::o3tl::optional< bool >( _bSupport );
}
};
+2 -2
View File
@@ -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);
+1 -1
View File
@@ -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>
@@ -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>
@@ -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>
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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()) {
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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;
};
+4 -4
View File
@@ -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;
+1 -1
View File
@@ -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;
};
+5 -5
View File
@@ -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,
+3 -3
View File
@@ -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
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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;
@@ -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;
@@ -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();
@@ -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(
@@ -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);
/**
@@ -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
@@ -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;
@@ -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:
@@ -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
@@ -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);
+2 -2
View File
@@ -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;
}
@@ -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
@@ -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& )
{
@@ -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();
};
@@ -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;
@@ -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()))
@@ -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& )
{
@@ -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();
@@ -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();
@@ -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 {
+5 -5
View File
@@ -22,7 +22,7 @@
#include <editeng/eeitem.hxx>
#include <svl/poolitem.hxx>
#include <boost/optional.hpp>
#include <o3tl/optional.hxx>
#include <tools/color.hxx>
#include <tools/debug.hxx>
@@ -364,8 +364,8 @@ public:
class EditCharAttribField: public EditCharAttrib
{
OUString aFieldValue;
boost::optional<Color> mxTxtColor;
boost::optional<Color> mxFldColor;
o3tl::optional<Color> mxTxtColor;
o3tl::optional<Color> mxFldColor;
EditCharAttribField& operator = ( const EditCharAttribField& rAttr ) = delete;
@@ -379,8 +379,8 @@ public:
{ return !(operator == ( rAttr ) ); }
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ) override;
boost::optional<Color>& GetTextColor() { return mxTxtColor; }
boost::optional<Color>& GetFieldColor() { return mxFldColor; }
o3tl::optional<Color>& GetTextColor() { return mxTxtColor; }
o3tl::optional<Color>& GetFieldColor() { return mxFldColor; }
const OUString& GetFieldValue() const { return aFieldValue;}
void SetFieldValue(const OUString& rVal);
+1 -1
View File
@@ -49,7 +49,7 @@
#include <unordered_map>
#include <utility>
#include <vector>
#include <boost/optional.hpp>
#include <o3tl/optional.hxx>
#endif // PCH_LEVEL >= 1
#if PCH_LEVEL >= 2
#include <osl/diagnose.h>
+1 -1
View File
@@ -813,7 +813,7 @@ class UrlEditEngine : public EditEngine
public:
explicit UrlEditEngine(SfxItemPool *pPool) : EditEngine(pPool) {}
virtual OUString CalcFieldValue( const SvxFieldItem&, sal_Int32, sal_Int32, boost::optional<Color>&, boost::optional<Color>& ) override
virtual OUString CalcFieldValue( const SvxFieldItem&, sal_Int32, sal_Int32, o3tl::optional<Color>&, o3tl::optional<Color>& ) override
{
return "jim@bob.com"; // a sophisticated view of value:
}
+1 -1
View File
@@ -2577,7 +2577,7 @@ tools::Rectangle EditEngine::GetBulletArea( sal_Int32 )
return tools::Rectangle( Point(), Point() );
}
OUString EditEngine::CalcFieldValue( const SvxFieldItem&, sal_Int32, sal_Int32, boost::optional<Color>&, boost::optional<Color>& )
OUString EditEngine::CalcFieldValue( const SvxFieldItem&, sal_Int32, sal_Int32, o3tl::optional<Color>&, o3tl::optional<Color>& )
{
return OUString(' ');
}
+2 -2
View File
@@ -61,7 +61,7 @@
#include <o3tl/deleter.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <boost/optional.hpp>
#include <o3tl/optional.hxx>
#include <memory>
#include <vector>
@@ -238,7 +238,7 @@ private:
EditEngine* pEditEngine;
VclPtr<vcl::Window> pOutWin;
EditView::OutWindowSet aOutWindowSet;
boost::optional<PointerStyle> mxPointer;
o3tl::optional<PointerStyle> mxPointer;
std::unique_ptr<DragAndDropInfo> pDragAndDropInfo;
css::uno::Reference< css::datatransfer::dnd::XDragSourceListener > mxDnDListener;
+5 -5
View File
@@ -2514,7 +2514,7 @@ bool SvxAutoCorrectLanguageLists::MakeCombinedChanges( std::vector<SvxAutocorrWo
{
for (SvxAutocorrWord & aWordToDelete : aDeleteEntries)
{
boost::optional<SvxAutocorrWord> xFoundEntry = pAutocorr_List->FindAndRemove( &aWordToDelete );
o3tl::optional<SvxAutocorrWord> xFoundEntry = pAutocorr_List->FindAndRemove( &aWordToDelete );
if( xFoundEntry )
{
if( !xFoundEntry->IsTextOnly() )
@@ -2537,7 +2537,7 @@ bool SvxAutoCorrectLanguageLists::MakeCombinedChanges( std::vector<SvxAutocorrWo
for (const SvxAutocorrWord & aNewEntrie : aNewEntries)
{
SvxAutocorrWord aWordToAdd(aNewEntrie.GetShort(), aNewEntrie.GetLong(), true );
boost::optional<SvxAutocorrWord> xRemoved = pAutocorr_List->FindAndRemove( &aWordToAdd );
o3tl::optional<SvxAutocorrWord> xRemoved = pAutocorr_List->FindAndRemove( &aWordToAdd );
if( xRemoved )
{
if( !xRemoved->IsTextOnly() )
@@ -2583,7 +2583,7 @@ bool SvxAutoCorrectLanguageLists::PutText( const OUString& rShort, const OUStrin
if( bRet )
{
SvxAutocorrWord aNew(rShort, rLong, true );
boost::optional<SvxAutocorrWord> xRemove = pAutocorr_List->FindAndRemove( &aNew );
o3tl::optional<SvxAutocorrWord> xRemove = pAutocorr_List->FindAndRemove( &aNew );
if( xRemove )
{
if( !xRemove->IsTextOnly() )
@@ -2719,7 +2719,7 @@ bool SvxAutocorrWordList::empty() const
return mpImpl->maHash.empty() && mpImpl->maSortedVector.empty();
}
boost::optional<SvxAutocorrWord> SvxAutocorrWordList::FindAndRemove(const SvxAutocorrWord *pWord)
o3tl::optional<SvxAutocorrWord> SvxAutocorrWordList::FindAndRemove(const SvxAutocorrWord *pWord)
{
if ( mpImpl->maSortedVector.empty() ) // use the hash
@@ -2742,7 +2742,7 @@ boost::optional<SvxAutocorrWord> SvxAutocorrWordList::FindAndRemove(const SvxAut
return pMatch;
}
}
return boost::optional<SvxAutocorrWord>();
return o3tl::optional<SvxAutocorrWord>();
}
// return the sorted contents - defer sorting until we have to.
+1 -1
View File
@@ -169,7 +169,7 @@ void OutlinerEditEng::DrawingTab( const Point& rStartPos, long nWidth, const OUS
bEndOfLine, bEndOfParagraph, rOverlineColor, rTextLineColor );
}
OUString OutlinerEditEng::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor )
OUString OutlinerEditEng::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, o3tl::optional<Color>& rpTxtColor, o3tl::optional<Color>& rpFldColor )
{
return pOwner->CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor );
}
+1 -1
View File
@@ -71,7 +71,7 @@ public:
// for text conversion
virtual bool ConvertNextDocument() override;
virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rTxtColor, boost::optional<Color>& rFldColor ) override;
virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, o3tl::optional<Color>& rTxtColor, o3tl::optional<Color>& rFldColor ) override;
virtual tools::Rectangle GetBulletArea( sal_Int32 nPara ) override;
+1 -1
View File
@@ -648,7 +648,7 @@ void Outliner::AddText( const OutlinerParaObject& rPObj, bool bAppend )
pEditEngine->SetUpdateMode( bUpdate );
}
OUString Outliner::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor )
OUString Outliner::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, o3tl::optional<Color>& rpTxtColor, o3tl::optional<Color>& rpFldColor )
{
if ( !aCalcFieldValueHdl.IsSet() )
return OUString( ' ' );
+1 -1
View File
@@ -618,7 +618,7 @@ SfxItemPool* SvxAccessibleTextAdapter::GetPool() const
return mpTextForwarder->GetPool();
}
OUString SvxAccessibleTextAdapter::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor )
OUString SvxAccessibleTextAdapter::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, o3tl::optional<Color>& rpTxtColor, o3tl::optional<Color>& rpFldColor )
{
assert(mpTextForwarder && "SvxAccessibleTextAdapter: no forwarder");
+1 -1
View File
@@ -153,7 +153,7 @@ bool SvxEditEngineForwarder::IsValid() const
return rEditEngine.GetUpdateMode();
}
OUString SvxEditEngineForwarder::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor )
OUString SvxEditEngineForwarder::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, o3tl::optional<Color>& rpTxtColor, o3tl::optional<Color>& rpFldColor )
{
return rEditEngine.CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor );
}
+1 -1
View File
@@ -220,7 +220,7 @@ void SvxOutlinerForwarder::QuickSetAttribs( const SfxItemSet& rSet, const ESelec
rOutliner.QuickSetAttribs( rSet, rSel );
}
OUString SvxOutlinerForwarder::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor )
OUString SvxOutlinerForwarder::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, o3tl::optional<Color>& rpTxtColor, o3tl::optional<Color>& rpFldColor )
{
return rOutliner.CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor );
}
+3 -3
View File
@@ -634,8 +634,8 @@ void SvxUnoTextRangeBase::getPropertyValue( const SfxItemPropertySimpleEntry* pM
uno::Reference< text::XTextRange > xAnchor( this );
// get presentation string for field
boost::optional<Color> pTColor;
boost::optional<Color> pFColor;
o3tl::optional<Color> pTColor;
o3tl::optional<Color> pFColor;
SvxTextForwarder* pForwarder = mpEditSource->GetTextForwarder();
OUString aPresentation( pForwarder->CalcFieldValue( SvxFieldItem(*pData, EE_FEATURE_FIELD), maSelection.nStartPara, maSelection.nStartPos, pTColor, pFColor ) );
@@ -2359,7 +2359,7 @@ void SvxDummyTextSource::QuickInsertLineBreak( const ESelection& )
{
};
OUString SvxDummyTextSource::CalcFieldValue( const SvxFieldItem&, sal_Int32, sal_Int32, boost::optional<Color>&, boost::optional<Color>& )
OUString SvxDummyTextSource::CalcFieldValue( const SvxFieldItem&, sal_Int32, sal_Int32, o3tl::optional<Color>&, o3tl::optional<Color>& )
{
return OUString();
}
+1 -1
View File
@@ -24,7 +24,7 @@
#include <memory>
#include <stddef.h>
#include <vector>
#include <boost/optional.hpp>
#include <o3tl/optional.hxx>
#endif // PCH_LEVEL >= 1
#if PCH_LEVEL >= 2
#include <osl/diagnose.h>
+3 -3
View File
@@ -21,7 +21,7 @@
#include <emfreader.hxx>
#include <memory>
#include <boost/optional.hpp>
#include <o3tl/optional.hxx>
#include <rtl/crc.h>
#include <rtl/tencinfo.h>
#include <sal/log.hxx>
@@ -1489,10 +1489,10 @@ namespace emfio
auto nEnd = nPos + pStm->remainingSize();
Point aWinOrg(0,0);
boost::optional<Size> aWinExt;
o3tl::optional<Size> aWinExt;
Point aViewportOrg(0,0);
boost::optional<Size> aViewportExt;
o3tl::optional<Size> aViewportExt;
if (nEnd - nPos)
{
+7 -7
View File
@@ -139,7 +139,7 @@
#include <svtools/embedhlp.hxx>
#include <o3tl/enumrange.hxx>
#include <o3tl/safeint.hxx>
#include <boost/optional.hpp>
#include <o3tl/optional.hxx>
#include <sal/log.hxx>
#include <algorithm>
@@ -2339,7 +2339,7 @@ SdrObject* SdrPowerPointImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj*
rOutliner.QuickSetAttribs( aPortionAttribs, aSelection );
aSelection.nStartPos = aSelection.nEndPos;
}
boost::optional< sal_Int16 > oStartNumbering;
o3tl::optional< sal_Int16 > oStartNumbering;
SfxItemSet aParagraphAttribs( rOutliner.GetEmptyItemSet() );
pPara->ApplyTo( aParagraphAttribs, oStartNumbering, *this, nDestinationInstance );
@@ -3400,7 +3400,7 @@ PPTNumberFormatCreator::~PPTNumberFormatCreator()
bool PPTNumberFormatCreator::ImplGetExtNumberFormat( SdrPowerPointImport const & rManager,
SvxNumberFormat& rNumberFormat, sal_uInt32 nLevel, TSS_Type nInstance, TSS_Type nDestinationInstance,
boost::optional< sal_Int16 >& rStartNumbering, sal_uInt32 nFontHeight, PPTParagraphObj const * pPara )
o3tl::optional< sal_Int16 >& rStartNumbering, sal_uInt32 nFontHeight, PPTParagraphObj const * pPara )
{
bool bHardAttribute = ( nDestinationInstance == TSS_Type::Unknown );
@@ -3641,7 +3641,7 @@ bool PPTNumberFormatCreator::ImplGetExtNumberFormat( SdrPowerPointImport const &
}
break;
}
rStartNumbering = boost::optional< sal_Int16 >( nAnmScheme >> 16 );
rStartNumbering = o3tl::optional< sal_Int16 >( nAnmScheme >> 16 );
sal_Int16 nBuStart = *rStartNumbering;
//The Seventh bit of nBuFlags that specifies whether fBulletHasAutoNumber exists,
//and fBulletHasAutoNumber that specifies whether this paragraph has an automatic numbering scheme.
@@ -3669,7 +3669,7 @@ void PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport const & rManag
nTextOfs = rParaLevel.mnTextOfs;
nBulletOfs = rParaLevel.mnBulletOfs;
boost::optional< sal_Int16 > oStartNumbering;
o3tl::optional< sal_Int16 > oStartNumbering;
ImplGetExtNumberFormat( rManager, rNumberFormat, nLevel, nInstance, TSS_Type::Unknown, oStartNumbering, rCharLevel.mnFontHeight, nullptr );
if ( ( rNumberFormat.GetNumberingType() != SVX_NUM_BITMAP ) && ( nBulletHeight > 0x7fff ) )
nBulletHeight = rCharLevel.mnFontHeight ? ((- static_cast<sal_Int16>(nBulletHeight)) * 100 ) / rCharLevel.mnFontHeight : 100;
@@ -3702,7 +3702,7 @@ void PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport const & rManag
}
bool PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport const & rManager, SvxNumberFormat& rNumberFormat, PPTParagraphObj* pParaObj,
TSS_Type nDestinationInstance, boost::optional< sal_Int16 >& rStartNumbering )
TSS_Type nDestinationInstance, o3tl::optional< sal_Int16 >& rStartNumbering )
{
sal_uInt32 nHardCount = 0;
nHardCount += pParaObj->GetAttrib( PPT_ParaAttr_BulletOn, nIsBullet, nDestinationInstance ) ? 1 : 0;
@@ -6168,7 +6168,7 @@ bool PPTParagraphObj::GetAttrib( sal_uInt32 nAttr, sal_uInt32& rRetValue, TSS_Ty
return bIsHardAttribute;
}
void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, boost::optional< sal_Int16 >& rStartNumbering, SdrPowerPointImport const & rManager, TSS_Type nDestinationInstance )
void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, o3tl::optional< sal_Int16 >& rStartNumbering, SdrPowerPointImport const & rManager, TSS_Type nDestinationInstance )
{
sal_Int16 nVal2;
sal_uInt32 nVal, nUpperDist, nLowerDist;
+1 -1
View File
@@ -1512,7 +1512,7 @@ IMPL_LINK_NOARG(ImpPDFTabSigningPage, ClickmaPbSignCertSelect, weld::Button&, vo
try
{
boost::optional<css::uno::Sequence<OUString>> aTSAURLs(officecfg::Office::Common::Security::Scripting::TSAURLs::get());
o3tl::optional<css::uno::Sequence<OUString>> aTSAURLs(officecfg::Office::Common::Security::Scripting::TSAURLs::get());
if (aTSAURLs)
{
const css::uno::Sequence<OUString>& rTSAURLs = *aTSAURLs;
+1 -1
View File
@@ -33,7 +33,7 @@
#include <utility>
#include <vector>
#include <boost/lexical_cast.hpp>
#include <boost/optional.hpp>
#include <o3tl/optional.hxx>
#endif // PCH_LEVEL >= 1
#if PCH_LEVEL >= 2
#include <osl/diagnose.h>
+2 -2
View File
@@ -55,7 +55,7 @@
#include <unotools/sharedunocomponent.hxx>
#include <vcl/svapp.hxx>
#include <boost/optional.hpp>
#include <o3tl/optional.hxx>
#include <algorithm>
#include <iterator>
@@ -739,7 +739,7 @@ namespace frm
return;
}
::boost::optional< sal_Int16 > aBoundColumn(boost::none);
::o3tl::optional< sal_Int16 > aBoundColumn(o3tl::nullopt);
if ( m_aBoundColumn.getValueType().getTypeClass() == TypeClass_SHORT )
{
sal_Int16 nBoundColumn( 0 );
+1 -1
View File
@@ -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
+1 -1
View File
@@ -44,7 +44,7 @@
#include <unordered_map>
#include <utility>
#include <vector>
#include <boost/optional.hpp>
#include <o3tl/optional.hxx>
#endif // PCH_LEVEL >= 1
#if PCH_LEVEL >= 2
#include <osl/conditn.h>
+1 -1
View File
@@ -46,7 +46,7 @@
#include <unordered_map>
#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

Some files were not shown because too many files have changed in this diff Show More