[Libreoffice-commits] core.git: 2 commits - basctl/source cui/source dbaccess/source include/comphelper include/editeng include/filter include/sax include/toolkit include/unotools include/vcl sc/inc sc/source sfx2/source sw/source unotools/source vcl/qt5 vcl/source vcl/unx vcl/win xmlsecurity/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Sun Dec 1 12:59:36 UTC 2019


 basctl/source/basicide/baside2b.cxx              |    2 +-
 cui/source/options/certpath.cxx                  |    2 +-
 cui/source/options/fontsubs.cxx                  |    2 +-
 dbaccess/source/ui/control/sqledit.cxx           |    2 +-
 include/comphelper/unwrapargs.hxx                |    6 ++++--
 include/editeng/editeng.hxx                      |    4 +++-
 include/filter/msfilter/svdfppt.hxx              |    6 ++----
 include/sax/tools/converter.hxx                  |    6 ++++--
 include/toolkit/controls/unocontrols.hxx         |    3 ++-
 include/unotools/historyoptions.hxx              |    3 ++-
 include/vcl/settings.hxx                         |    7 ++-----
 sc/inc/sheetevents.hxx                           |    2 +-
 sc/source/filter/xml/XMLExportDataPilot.hxx      |    6 ++++--
 sc/source/ui/inc/RandomNumberGeneratorDialog.hxx |    6 ++++--
 sfx2/source/appl/appcfg.cxx                      |    6 +++---
 sfx2/source/view/viewfrm.cxx                     |    2 +-
 sw/source/uibase/docvw/srcedtw.cxx               |    2 +-
 unotools/source/config/historyoptions.cxx        |    2 +-
 vcl/qt5/Qt5Frame.cxx                             |    2 +-
 vcl/source/control/notebookbar.cxx               |    2 +-
 vcl/unx/generic/window/salframe.cxx              |    2 +-
 vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx        |    4 ++--
 vcl/win/gdi/salnativewidgets-luna.cxx            |    2 +-
 xmlsecurity/source/xmlsec/nss/nssinitializer.cxx |    2 +-
 24 files changed, 45 insertions(+), 38 deletions(-)

New commits:
commit 7b3190eda387bcd897095205732f6752dedf01ef
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Nov 28 17:24:25 2019 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Sun Dec 1 13:58:49 2019 +0100

    boost::optional: replace uses of get_value_or with value_or
    
    ...in preparation for wholesale replacement of boost::optional with
    o3tl::optional, which will be an alias for either std::optional or
    boost::optional, and std::optional only has value_or.
    
    boost::optional::value_or was added with <https://github.com/boostorg/optional/
    commit/3984c9f9a157ef116cea69bc8bb20f433320eb61> "Added function value_or()",
    which according to git-describe first appeared in tag boost-1.56.0.  We appear
    to have no strict Boost baseline (the closest we get is with
    
    > [AC_MSG_ERROR(boost/spirit/include/classic_core.hpp not found. install boost >= 1.36)]
    
    in configure.ac), and at least CentOS 7 TDF machine tb76 only has
    boost-devel-1.53.0-27.el7.x86_64.  However, any environment using Xcode < 10
    that needs to make o3tl::optional fall back to boost::optional should use
    --without-system-boost, and external/boost is currently at 1.69.0, so should be
    safe.
    
    ATTENTION:  In isolation, this commit will break in any environment that uses
    Boost older than 1.56.0.  It requires the following commit introducing
    o3tl::optional.  (But doing these changes in individual commits was deemed more
    valuable than supporting a hypothetical future git-bisect against an old Boost.)
    
    Change-Id: Ib31affa3eebf0d0029d8620dc6abb7a60f6c7629
    Reviewed-on: https://gerrit.libreoffice.org/84127
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 25633088e9eb..a5baaed5f100 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -1208,7 +1208,7 @@ void EditorWindow::UpdateSyntaxHighlighting ()
 
 void EditorWindow::ImplSetFont()
 {
-    OUString sFontName(officecfg::Office::Common::Font::SourceViewFont::FontName::get().get_value_or(OUString()));
+    OUString sFontName(officecfg::Office::Common::Font::SourceViewFont::FontName::get().value_or(OUString()));
     if (sFontName.isEmpty())
     {
         vcl::Font aTmpFont(OutputDevice::GetDefaultFont(DefaultFontType::FIXED,
diff --git a/cui/source/options/certpath.cxx b/cui/source/options/certpath.cxx
index 5416a5488eee..b98811dc4827 100644
--- a/cui/source/options/certpath.cxx
+++ b/cui/source/options/certpath.cxx
@@ -92,7 +92,7 @@ CertPathDialog::CertPathDialog(weld::Window* pParent)
 
     try
     {
-        AddManualCertPath(officecfg::Office::Common::Security::Scripting::CertDir::get().get_value_or(OUString()));
+        AddManualCertPath(officecfg::Office::Common::Security::Scripting::CertDir::get().value_or(OUString()));
         if (m_sManualPath.isEmpty())
             AddManualCertPath(officecfg::Office::Common::Security::Scripting::ManualCertDir::get(), false);
     }
diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx
index 4cedb534c6f9..20baf823cb69 100644
--- a/cui/source/options/fontsubs.cxx
+++ b/cui/source/options/fontsubs.cxx
@@ -225,7 +225,7 @@ void  SvxFontSubstTabPage::Reset( const SfxItemSet* )
     NonPropFontsHdl(*m_xNonPropFontsOnlyCB);
     OUString sFontName(
         officecfg::Office::Common::Font::SourceViewFont::FontName::get().
-        get_value_or(OUString()));
+        value_or(OUString()));
     if(!sFontName.isEmpty())
         m_xFontNameLB->set_active_text(sFontName);
     else
diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx
index e5b9706194a9..e494b452c325 100644
--- a/dbaccess/source/ui/control/sqledit.cxx
+++ b/dbaccess/source/ui/control/sqledit.cxx
@@ -231,7 +231,7 @@ void OSqlEdit::ImplSetFont()
     StyleSettings aStyleSettings = aSettings.GetStyleSettings();
     OUString sFontName(
         officecfg::Office::Common::Font::SourceViewFont::FontName::get().
-        get_value_or( OUString() ) );
+        value_or( OUString() ) );
     if ( sFontName.isEmpty() )
     {
         vcl::Font aTmpFont( OutputDevice::GetDefaultFont( DefaultFontType::FIXED, Application::GetSettings().GetUILanguageTag().getLanguageType(), GetDefaultFontFlags::NONE, this ) );
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index 8b9ca9e6f413..44065b512989 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -350,7 +350,7 @@ void SfxApplication::GetOptions( SfxItemSet& rSet )
                             SfxUInt16Item(
                                 rPool.GetWhich(SID_INET_PROXY_TYPE),
                                 (officecfg::Inet::Settings::ooInetProxyType::
-                                 get().get_value_or(0)))))
+                                 get().value_or(0)))))
                     {
                         bRet = true;
                     }
@@ -370,7 +370,7 @@ void SfxApplication::GetOptions( SfxItemSet& rSet )
                             SfxInt32Item(
                                 rPool.GetWhich(SID_INET_HTTP_PROXY_PORT),
                                 (officecfg::Inet::Settings::
-                                 ooInetHTTPProxyPort::get().get_value_or(0)))))
+                                 ooInetHTTPProxyPort::get().value_or(0)))))
                     {
                         bRet = true;
                     }
@@ -390,7 +390,7 @@ void SfxApplication::GetOptions( SfxItemSet& rSet )
                             SfxInt32Item(
                                 rPool.GetWhich(SID_INET_FTP_PROXY_PORT),
                                 (officecfg::Inet::Settings::ooInetFTPProxyPort::
-                                 get().get_value_or(0)))))
+                                 get().value_or(0)))))
                     {
                         bRet = true;
                     }
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 9b7c763a8eb2..6c0ee872eaf6 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -1296,7 +1296,7 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
                     OUString sSetupVersion = utl::ConfigManager::getProductVersion();
                     sal_Int32 iCurrent = sSetupVersion.getToken(0,'.').toInt32() * 10 + sSetupVersion.getToken(1,'.').toInt32();
                     OUString sLastVersion
-                        = officecfg::Setup::Product::ooSetupLastVersion::get().get_value_or("0.0");
+                        = officecfg::Setup::Product::ooSetupLastVersion::get().value_or("0.0");
                     sal_Int32 iLast = sLastVersion.getToken(0,'.').toInt32() * 10 + sLastVersion.getToken(1,'.').toInt32();
                     if ((iCurrent > iLast) && !Application::IsHeadlessModeEnabled() && !bIsUITest)
                     {
diff --git a/sw/source/uibase/docvw/srcedtw.cxx b/sw/source/uibase/docvw/srcedtw.cxx
index cc0793e372e6..1cab7fc278f9 100644
--- a/sw/source/uibase/docvw/srcedtw.cxx
+++ b/sw/source/uibase/docvw/srcedtw.cxx
@@ -953,7 +953,7 @@ void SwSrcEditWindow::SetFont()
 {
     OUString sFontName(
         officecfg::Office::Common::Font::SourceViewFont::FontName::get().
-        get_value_or(OUString()));
+        value_or(OUString()));
     if(sFontName.isEmpty())
     {
         LanguageType aLanguages[5] =
diff --git a/unotools/source/config/historyoptions.cxx b/unotools/source/config/historyoptions.cxx
index 5b17c4e927af..164731398716 100644
--- a/unotools/source/config/historyoptions.cxx
+++ b/unotools/source/config/historyoptions.cxx
@@ -434,7 +434,7 @@ void SvtHistoryOptions_Impl::AppendItem(EHistoryType eHistory,
             xSet->setPropertyValue(s_sFilter, uno::makeAny(sFilter));
             xSet->setPropertyValue(s_sTitle, uno::makeAny(sTitle));
             xSet->setPropertyValue(s_sPassword, uno::makeAny(OUString()));
-            xSet->setPropertyValue(s_sThumbnail, uno::makeAny(sThumbnail.get_value_or(OUString())));
+            xSet->setPropertyValue(s_sThumbnail, uno::makeAny(sThumbnail.value_or(OUString())));
 
             ::comphelper::ConfigurationHelper::flush(m_xCfg);
         }
diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx
index 2ca319ee515c..21916ee56f13 100644
--- a/vcl/qt5/Qt5Frame.cxx
+++ b/vcl/qt5/Qt5Frame.cxx
@@ -1015,7 +1015,7 @@ void Qt5Frame::UpdateSettings(AllSettings& rSettings)
     Color aMenuBack = toColor(qMenuCG.color(QPalette::Window));
 
     style.SetMenuTextColor(aMenuFore);
-    style.SetMenuBarTextColor(style.GetPersonaMenuBarTextColor().get_value_or(aMenuFore));
+    style.SetMenuBarTextColor(style.GetPersonaMenuBarTextColor().value_or(aMenuFore));
     style.SetMenuColor(aMenuBack);
     style.SetMenuBarColor(aMenuBack);
     style.SetMenuHighlightColor(toColor(qMenuCG.color(QPalette::Highlight)));
diff --git a/vcl/source/control/notebookbar.cxx b/vcl/source/control/notebookbar.cxx
index b178962f5d11..6ddc1c662c91 100644
--- a/vcl/source/control/notebookbar.cxx
+++ b/vcl/source/control/notebookbar.cxx
@@ -262,7 +262,7 @@ void NotebookBar::UpdatePersonaSettings()
     AllSettings aAllSettings( GetSettings() );
     StyleSettings aStyleSet( aAllSettings.GetStyleSettings() );
 
-    ::Color aTextColor = aStyleSet.GetPersonaMenuBarTextColor().get_value_or(COL_BLACK );
+    ::Color aTextColor = aStyleSet.GetPersonaMenuBarTextColor().value_or(COL_BLACK );
     aStyleSet.SetDialogTextColor( aTextColor );
     aStyleSet.SetButtonTextColor( aTextColor );
     aStyleSet.SetRadioCheckTextColor( aTextColor );
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index 8b8f029b1897..2ffb60b4999b 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -2357,7 +2357,7 @@ void X11SalFrame::UpdateSettings( AllSettings& rSettings )
 {
     StyleSettings aStyleSettings = rSettings.GetStyleSettings();
     aStyleSettings.SetCursorBlinkTime( 500 );
-    aStyleSettings.SetMenuBarTextColor( aStyleSettings.GetPersonaMenuBarTextColor().get_value_or( COL_BLACK ) );
+    aStyleSettings.SetMenuBarTextColor( aStyleSettings.GetPersonaMenuBarTextColor().value_or( COL_BLACK ) );
     rSettings.SetStyleSettings( aStyleSettings );
 }
 
diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
index 6988f87df0f3..8a2e998f4e74 100644
--- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
@@ -3145,13 +3145,13 @@ bool GtkSalGraphics::updateSettings(AllSettings& rSettings)
 
     style_context_set_state(mpMenuBarItemStyle, GTK_STATE_FLAG_NORMAL);
     gtk_style_context_get_color( mpMenuBarItemStyle, gtk_style_context_get_state(mpMenuBarItemStyle), &text_color );
-    aTextColor = aStyleSet.GetPersonaMenuBarTextColor().get_value_or( getColor( text_color ) );
+    aTextColor = aStyleSet.GetPersonaMenuBarTextColor().value_or( getColor( text_color ) );
     aStyleSet.SetMenuBarTextColor( aTextColor );
     aStyleSet.SetMenuBarRolloverTextColor( aTextColor );
 
     style_context_set_state(mpMenuBarItemStyle, GTK_STATE_FLAG_PRELIGHT);
     gtk_style_context_get_color( mpMenuBarItemStyle, gtk_style_context_get_state(mpMenuBarItemStyle), &text_color );
-    aTextColor = aStyleSet.GetPersonaMenuBarTextColor().get_value_or( getColor( text_color ) );
+    aTextColor = aStyleSet.GetPersonaMenuBarTextColor().value_or( getColor( text_color ) );
     aStyleSet.SetMenuBarHighlightTextColor( aTextColor );
 
     // menu items
diff --git a/vcl/win/gdi/salnativewidgets-luna.cxx b/vcl/win/gdi/salnativewidgets-luna.cxx
index ffba4b35ed85..41189555e55a 100644
--- a/vcl/win/gdi/salnativewidgets-luna.cxx
+++ b/vcl/win/gdi/salnativewidgets-luna.cxx
@@ -1538,7 +1538,7 @@ void WinSalGraphics::updateSettingsNative( AllSettings& rSettings )
     pSVData->maNWFData.mbDockingAreaAvoidTBFrames = true;
 
     // FIXME get the color directly from the theme, not from the settings
-    Color aMenuBarTextColor = aStyleSettings.GetPersonaMenuBarTextColor().get_value_or( aStyleSettings.GetMenuTextColor() );
+    Color aMenuBarTextColor = aStyleSettings.GetPersonaMenuBarTextColor().value_or( aStyleSettings.GetMenuTextColor() );
     // in aero menuitem highlight text is drawn in the same color as normal
     aStyleSettings.SetMenuHighlightTextColor( aStyleSettings.GetMenuTextColor() );
     aStyleSettings.SetMenuBarRolloverTextColor( aMenuBarTextColor );
diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
index 4288e1ed426d..e268e6e25d63 100644
--- a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
+++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
@@ -250,7 +250,7 @@ OString getMozillaCurrentProfile( const css::uno::Reference< css::uno::XComponen
     try
     {
         OUString sUserSetCertPath =
-            officecfg::Office::Common::Security::Scripting::CertDir::get().get_value_or(OUString());
+            officecfg::Office::Common::Security::Scripting::CertDir::get().value_or(OUString());
 
         if (!sUserSetCertPath.isEmpty())
         {
commit 32b4936c9944111382d2491d99fc375b31d76723
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Nov 28 13:17:40 2019 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Sun Dec 1 13:58:41 2019 +0100

    Don't use boost::optional forward declarations
    
    ...in preparation for wholesale replacement of boost::optional with
    o3tl::optional (which will be a using declaration for either std::optional or
    boost::optional, hence can't be forward-declared easily)
    
    Change-Id: I031ed1812a0c939f37253f7753e358f1ad9153a3
    Reviewed-on: https://gerrit.libreoffice.org/84126
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/include/comphelper/unwrapargs.hxx b/include/comphelper/unwrapargs.hxx
index 77ef0ace16c1..7c1d26d3a0aa 100644
--- a/include/comphelper/unwrapargs.hxx
+++ b/include/comphelper/unwrapargs.hxx
@@ -20,14 +20,16 @@
 #ifndef INCLUDED_COMPHELPER_UNWRAPARGS_HXX
 #define INCLUDED_COMPHELPER_UNWRAPARGS_HXX
 
+#include <sal/config.h>
+
+#include <boost/optional.hpp>
+
 #include <rtl/ustrbuf.hxx>
 #include <com/sun/star/uno/Sequence.hxx>
 #include <com/sun/star/uno/XInterface.hpp>
 #include <com/sun/star/lang/IllegalArgumentException.hpp>
 #include <cppu/unotype.hxx>
 
-namespace boost { template <class T> class optional; }
-
 namespace comphelper {
 
 /// @internal
diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx
index 368fae70a633..12b4b0b28398 100644
--- a/include/editeng/editeng.hxx
+++ b/include/editeng/editeng.hxx
@@ -22,6 +22,9 @@
 
 #include <memory>
 #include <vector>
+
+#include <boost/optional.hpp>
+
 #include <com/sun/star/uno/Reference.h>
 #include <com/sun/star/i18n/WordType.hpp>
 #include <com/sun/star/i18n/CharacterIteratorMode.hpp>
@@ -41,7 +44,6 @@
 #include <vcl/errcode.hxx>
 #include <functional>
 
-namespace boost { template <class T> class optional; }
 template <typename Arg, typename Ret> class Link;
 
 namespace com { namespace sun { namespace star {
diff --git a/include/filter/msfilter/svdfppt.hxx b/include/filter/msfilter/svdfppt.hxx
index efe56823e1c9..51bdd1917e35 100644
--- a/include/filter/msfilter/svdfppt.hxx
+++ b/include/filter/msfilter/svdfppt.hxx
@@ -25,6 +25,8 @@
 #include <memory>
 #include <vector>
 
+#include <boost/optional.hpp>
+
 #include <com/sun/star/uno/Reference.hxx>
 #include <editeng/eeitem.hxx>
 #include <editeng/flditem.hxx>
@@ -46,10 +48,6 @@
 #include <vcl/graph.hxx>
 #include <salhelper/simplereferenceobject.hxx>
 
-namespace boost {
-    template <class T> class optional;
-}
-
 namespace com { namespace sun { namespace star {
     namespace awt { struct Size; }
     namespace drawing { class XShape; }
diff --git a/include/sax/tools/converter.hxx b/include/sax/tools/converter.hxx
index a372360f6d8d..967c395433ff 100644
--- a/include/sax/tools/converter.hxx
+++ b/include/sax/tools/converter.hxx
@@ -20,6 +20,10 @@
 #ifndef INCLUDED_SAX_TOOLS_CONVERTER_HXX
 #define INCLUDED_SAX_TOOLS_CONVERTER_HXX
 
+#include <sal/config.h>
+
+#include <boost/optional.hpp>
+
 #include <sax/saxdllapi.h>
 
 #include <sal/types.h>
@@ -28,8 +32,6 @@
 #include <com/sun/star/util/MeasureUnit.hpp>
 #include <tools/color.hxx>
 
-namespace boost { template <class T> class optional; }
-
 namespace com { namespace sun { namespace star {
     namespace uno {
         class Any;
diff --git a/include/toolkit/controls/unocontrols.hxx b/include/toolkit/controls/unocontrols.hxx
index 4bf493915b2d..5ea17a412915 100644
--- a/include/toolkit/controls/unocontrols.hxx
+++ b/include/toolkit/controls/unocontrols.hxx
@@ -54,7 +54,8 @@
 #include <memory>
 #include <vector>
 
-namespace boost { template <class T> class optional; }
+#include <boost/optional.hpp>
+
 namespace com { namespace sun { namespace star { namespace graphic { class XGraphic; } } } }
 namespace com { namespace sun { namespace star { namespace graphic { class XGraphicObject; } } } }
 
diff --git a/include/unotools/historyoptions.hxx b/include/unotools/historyoptions.hxx
index 9279f864cfdc..87ce484533c3 100644
--- a/include/unotools/historyoptions.hxx
+++ b/include/unotools/historyoptions.hxx
@@ -27,8 +27,9 @@
 #include <unotools/options.hxx>
 #include <memory>
 
+#include <boost/optional.hpp>
+
 namespace com { namespace sun { namespace star { namespace beans { struct PropertyValue; } } } }
-namespace boost { template <class T> class optional; }
 
 // The method GetList() returns a list of property values.
 // Use follow defines to separate values by names.
diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx
index 75894432f05d..1f879b188c18 100644
--- a/include/vcl/settings.hxx
+++ b/include/vcl/settings.hxx
@@ -29,15 +29,12 @@
 #include <memory>
 #include <vector>
 
+#include <boost/optional.hpp>
+
 class BitmapEx;
 class LanguageTag;
 class SvtSysLocale;
 
-namespace boost
-{
-    template<typename T> class optional;
-}
-
 class LocaleDataWrapper;
 struct ImplMouseData;
 struct ImplMiscData;
diff --git a/sc/inc/sheetevents.hxx b/sc/inc/sheetevents.hxx
index e205ed1d801e..3fb0e28d1568 100644
--- a/sc/inc/sheetevents.hxx
+++ b/sc/inc/sheetevents.hxx
@@ -23,7 +23,7 @@
 #include <rtl/ustring.hxx>
 #include <memory>
 
-namespace boost { template <class T> class optional; }
+#include <boost/optional.hpp>
 
 enum class ScSheetEventId {
     FOCUS, UNFOCUS, SELECT, DOUBLECLICK, RIGHTCLICK, CHANGE, CALCULATE, COUNT,
diff --git a/sc/source/filter/xml/XMLExportDataPilot.hxx b/sc/source/filter/xml/XMLExportDataPilot.hxx
index a08262eedf54..2fe6602a9fa7 100644
--- a/sc/source/filter/xml/XMLExportDataPilot.hxx
+++ b/sc/source/filter/xml/XMLExportDataPilot.hxx
@@ -20,13 +20,15 @@
 #ifndef INCLUDED_SC_SOURCE_FILTER_XML_XMLEXPORTDATAPILOT_HXX
 #define INCLUDED_SC_SOURCE_FILTER_XML_XMLEXPORTDATAPILOT_HXX
 
+#include <sal/config.h>
+
+#include <boost/optional.hpp>
+
 #include <rtl/ustring.hxx>
 #include <global.hxx>
 #include <xmloff/xmltoken.hxx>
 #include <unotools/textsearch.hxx>
 
-namespace boost { template <class T> class optional; }
-
 class ScXMLExport;
 class ScDocument;
 class ScDPSaveDimension;
diff --git a/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx b/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx
index 00a109b311a4..f965ded0e605 100644
--- a/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx
+++ b/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx
@@ -11,12 +11,14 @@
 #ifndef INCLUDED_SC_SOURCE_UI_INC_RANDOMNUMBERGENERATORDIALOG_HXX
 #define INCLUDED_SC_SOURCE_UI_INC_RANDOMNUMBERGENERATORDIALOG_HXX
 
+#include <sal/config.h>
+
+#include <boost/optional.hpp>
+
 #include <address.hxx>
 #include "anyrefdg.hxx"
 #include "viewdata.hxx"
 
-namespace boost { template <typename T> class optional; }
-
 class ScRandomNumberGeneratorDialog : public ScAnyRefDlgController
 {
 public:


More information about the Libreoffice-commits mailing list