dbaccess/source/ui/dlg/DbAdminImpl.cxx     |    1 
 dbaccess/source/ui/dlg/generalpage.cxx     |    1 
 dbaccess/source/ui/dlg/tablespage.cxx      |    1 
 dbaccess/source/ui/uno/copytablewizard.cxx |    1 
 include/vcl/msgbox.hxx                     |   40 ------------
 include/vcl/stdtext.hxx                    |   15 ++++
 sc/source/ui/app/scmod.cxx                 |    1 
 sc/source/ui/dbgui/filtdlg.cxx             |    1 
 sc/source/ui/dbgui/pfiltdlg.cxx            |    2 
 solenv/clang-format/blacklist              |    2 
 sw/source/ui/envelp/label1.cxx             |    1 
 toolkit/source/awt/vclxtoolkit.cxx         |    2 
 vcl/Library_vcl.mk                         |    1 
 vcl/source/app/stdtext.cxx                 |   91 ++++++++++++++++++++++++++++-
 vcl/source/control/button.cxx              |   31 ---------
 vcl/source/graphic/UnoGraphicProvider.cxx  |    2 
 vcl/source/window/layout.cxx               |    2 
 vcl/source/window/msgbox.cxx               |   83 --------------------------
 vcl/workben/svdem.cxx                      |    1 
 19 files changed, 108 insertions(+), 171 deletions(-)

New commits:
commit 81903d443116c643a9ff92d92c092812abc7f57d
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Wed Oct 2 20:41:08 2019 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Thu Oct 3 11:11:14 2019 +0200

    merge msgbox and stdtext
    
    Change-Id: If95d78746eff3ae5343e7d4c6bb2433537ccb84d
    Reviewed-on: https://gerrit.libreoffice.org/80099
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx 
b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
index 63588ed93c2a..3ceeda28c9ca 100644
--- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx
+++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
@@ -62,7 +62,6 @@
 #include <typelib/typedescription.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/stdtext.hxx>
-#include <vcl/waitobj.hxx>
 #include <vcl/weld.hxx>
 
 #include <algorithm>
diff --git a/dbaccess/source/ui/dlg/generalpage.cxx 
b/dbaccess/source/ui/dlg/generalpage.cxx
index c99cd126b12e..52c1714f776a 100644
--- a/dbaccess/source/ui/dlg/generalpage.cxx
+++ b/dbaccess/source/ui/dlg/generalpage.cxx
@@ -32,7 +32,6 @@
 #include <vcl/svapp.hxx>
 #include <vcl/weld.hxx>
 #include <svl/stritem.hxx>
-#include <vcl/waitobj.hxx>
 #include <com/sun/star/sdbc/XDriverAccess.hpp>
 #include <com/sun/star/beans/PropertyValue.hpp>
 #include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
diff --git a/dbaccess/source/ui/dlg/tablespage.cxx 
b/dbaccess/source/ui/dlg/tablespage.cxx
index 76f9f12fefb3..55e8fd4de580 100644
--- a/dbaccess/source/ui/dlg/tablespage.cxx
+++ b/dbaccess/source/ui/dlg/tablespage.cxx
@@ -33,7 +33,6 @@
 #include <strings.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/settings.hxx>
-#include <vcl/waitobj.hxx>
 #include <com/sun/star/i18n/Collator.hpp>
 #include <com/sun/star/sdb/SQLContext.hpp>
 #include <com/sun/star/sdbcx/XTablesSupplier.hpp>
diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx 
b/dbaccess/source/ui/uno/copytablewizard.cxx
index a72758a39327..edb6805853eb 100644
--- a/dbaccess/source/ui/uno/copytablewizard.cxx
+++ b/dbaccess/source/ui/uno/copytablewizard.cxx
@@ -71,7 +71,6 @@
 #include <tools/diagnose_ex.h>
 #include <unotools/sharedunocomponent.hxx>
 #include <vcl/svapp.hxx>
-#include <vcl/waitobj.hxx>
 
 namespace dbaui
 {
diff --git a/include/vcl/msgbox.hxx b/include/vcl/msgbox.hxx
deleted file mode 100644
index 042cef0a4010..000000000000
--- a/include/vcl/msgbox.hxx
+++ /dev/null
@@ -1,40 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_VCL_MSGBOX_HXX
-#define INCLUDED_VCL_MSGBOX_HXX
-
-#include <vcl/dllapi.h>
-#include <vcl/image.hxx>
-
-VCL_DLLPUBLIC Image const & GetStandardInfoBoxImage();
-VCL_DLLPUBLIC OUString GetStandardInfoBoxText();
-
-VCL_DLLPUBLIC Image const & GetStandardWarningBoxImage();
-VCL_DLLPUBLIC OUString GetStandardWarningBoxText();
-
-VCL_DLLPUBLIC Image const & GetStandardErrorBoxImage();
-VCL_DLLPUBLIC OUString GetStandardErrorBoxText();
-
-VCL_DLLPUBLIC Image const & GetStandardQueryBoxImage();
-VCL_DLLPUBLIC OUString GetStandardQueryBoxText();
-
-#endif // INCLUDED_VCL_MSGBOX_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/stdtext.hxx b/include/vcl/stdtext.hxx
index 5287fc746a26..c98e4c4c7779 100644
--- a/include/vcl/stdtext.hxx
+++ b/include/vcl/stdtext.hxx
@@ -24,11 +24,26 @@
 #include <tools/wintypes.hxx>
 #include <vcl/dllapi.h>
 
+class Image;
 namespace weld { class Widget; }
 
 void VCL_DLLPUBLIC ShowServiceNotAvailableError(weld::Widget* pParent, const 
OUString& rServiceName, bool bError);
+
 OUString VCL_DLLPUBLIC GetStandardText(StandardButtonType eButton);
 
+VCL_DLLPUBLIC Image const & GetStandardInfoBoxImage();
+VCL_DLLPUBLIC OUString GetStandardInfoBoxText();
+
+VCL_DLLPUBLIC Image const & GetStandardWarningBoxImage();
+VCL_DLLPUBLIC OUString GetStandardWarningBoxText();
+
+VCL_DLLPUBLIC Image const & GetStandardErrorBoxImage();
+VCL_DLLPUBLIC OUString GetStandardErrorBoxText();
+
+VCL_DLLPUBLIC Image const & GetStandardQueryBoxImage();
+VCL_DLLPUBLIC OUString GetStandardQueryBoxText();
+
+
 #endif // INCLUDED_VCL_STDTEXT_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index ca6bee6110c0..5e58bc2c3404 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -44,7 +44,6 @@
 #include <svl/whiter.hxx>
 #include <svx/dialogs.hrc>
 #include <svl/inethist.hxx>
-#include <vcl/waitobj.hxx>
 #include <vcl/svapp.hxx>
 #include <svx/svxerr.hxx>
 #include <tools/diagnose_ex.h>
diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx
index 47ff4e6cab42..9ee84fc714cd 100644
--- a/sc/source/ui/dbgui/filtdlg.cxx
+++ b/sc/source/ui/dbgui/filtdlg.cxx
@@ -35,7 +35,6 @@
 
 #include <filtdlg.hxx>
 #include <vcl/svapp.hxx>
-#include <vcl/waitobj.hxx>
 #include <vcl/weld.hxx>
 #include <svl/sharedstringpool.hxx>
 
diff --git a/sc/source/ui/dbgui/pfiltdlg.cxx b/sc/source/ui/dbgui/pfiltdlg.cxx
index 060e9cd66ed6..e53f0cfc43a7 100644
--- a/sc/source/ui/dbgui/pfiltdlg.cxx
+++ b/sc/source/ui/dbgui/pfiltdlg.cxx
@@ -19,8 +19,6 @@
 
 #undef SC_DLLIMPLEMENTATION
 
-#include <vcl/waitobj.hxx>
-
 #include <viewdata.hxx>
 #include <document.hxx>
 #include <uiitems.hxx>
diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist
index 7977b05d094c..6e357d57af75 100644
--- a/solenv/clang-format/blacklist
+++ b/solenv/clang-format/blacklist
@@ -7855,7 +7855,6 @@ include/vcl/metaactiontypes.hxx
 include/vcl/metric.hxx
 include/vcl/mnemonic.hxx
 include/vcl/mnemonicengine.hxx
-include/vcl/msgbox.hxx
 include/vcl/mtfxmldump.hxx
 include/vcl/notebookbar.hxx
 include/vcl/oldprintadaptor.hxx
@@ -18009,7 +18008,6 @@ vcl/source/window/menuwindow.hxx
 vcl/source/window/mnemonic.cxx
 vcl/source/window/mnemonicengine.cxx
 vcl/source/window/mouse.cxx
-vcl/source/window/msgbox.cxx
 vcl/source/window/paint.cxx
 vcl/source/window/popupmenuwindow.cxx
 vcl/source/window/printdlg.cxx
diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx
index b360c862e780..f29f6f2eb5f7 100644
--- a/sw/source/ui/envelp/label1.cxx
+++ b/sw/source/ui/envelp/label1.cxx
@@ -19,7 +19,6 @@
 
 #include <memory>
 #include <vcl/svapp.hxx>
-#include <vcl/waitobj.hxx>
 #include <rtl/ustring.hxx>
 #include <sfx2/sfxsids.hrc>
 #include <tools/lineend.hxx>
diff --git a/toolkit/source/awt/vclxtoolkit.cxx 
b/toolkit/source/awt/vclxtoolkit.cxx
index 0e5d471095f7..c70c9b8d4888 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -94,7 +94,7 @@
 #include <vcl/longcurr.hxx>
 #include <vcl/lstbox.hxx>
 #include <vcl/menubtn.hxx>
-#include <vcl/msgbox.hxx>
+#include <vcl/stdtext.hxx>
 #include <vcl/scrbar.hxx>
 #include <vcl/spin.hxx>
 #include <vcl/split.hxx>
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index c0cd48bd42a4..a4cf8282d7f4 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -158,7 +158,6 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
     vcl/source/window/mnemonic \
     vcl/source/window/mnemonicengine \
     vcl/source/window/mouse \
-    vcl/source/window/msgbox \
     vcl/source/window/NotebookBarAddonsMerger \
     vcl/source/window/OptionalBox \
     vcl/source/window/popupmenuwindow \
diff --git a/vcl/source/app/stdtext.cxx b/vcl/source/app/stdtext.cxx
index dbd6a0f5b82c..811c77e4f4b4 100644
--- a/vcl/source/app/stdtext.cxx
+++ b/vcl/source/app/stdtext.cxx
@@ -18,8 +18,9 @@
  */
 
 #include <vcl/stdtext.hxx>
+#include <vcl/image.hxx>
 #include <vcl/weld.hxx>
-
+#include <bitmaps.hlst>
 #include <strings.hrc>
 #include <svdata.hxx>
 
@@ -32,4 +33,92 @@ void ShowServiceNotAvailableError(weld::Widget* pParent,
     xBox->run();
 }
 
+static void ImplInitMsgBoxImageList()
+{
+    ImplSVData* pSVData = ImplGetSVData();
+    std::vector<Image> &rImages = pSVData->maWinData.maMsgBoxImgList;
+    if (rImages.empty())
+    {
+        rImages.emplace_back(Image(StockImage::Yes, SV_RESID_BITMAP_ERRORBOX));
+        rImages.emplace_back(Image(StockImage::Yes, SV_RESID_BITMAP_QUERYBOX));
+        rImages.emplace_back(Image(StockImage::Yes, 
SV_RESID_BITMAP_WARNINGBOX));
+        rImages.emplace_back(Image(StockImage::Yes, SV_RESID_BITMAP_INFOBOX));
+    }
+}
+
+Image const & GetStandardInfoBoxImage()
+{
+    ImplInitMsgBoxImageList();
+    return ImplGetSVData()->maWinData.maMsgBoxImgList[3];
+}
+
+OUString GetStandardInfoBoxText()
+{
+    return VclResId(SV_MSGBOX_INFO);
+}
+
+Image const & GetStandardWarningBoxImage()
+{
+    ImplInitMsgBoxImageList();
+    return ImplGetSVData()->maWinData.maMsgBoxImgList[2];
+}
+
+OUString GetStandardWarningBoxText()
+{
+    return VclResId(SV_MSGBOX_WARNING);
+}
+
+Image const & GetStandardErrorBoxImage()
+{
+    ImplInitMsgBoxImageList();
+    return ImplGetSVData()->maWinData.maMsgBoxImgList[0];
+}
+
+OUString GetStandardErrorBoxText()
+{
+    return VclResId(SV_MSGBOX_ERROR);
+}
+
+Image const & GetStandardQueryBoxImage()
+{
+    ImplInitMsgBoxImageList();
+    return ImplGetSVData()->maWinData.maMsgBoxImgList[1];
+}
+
+OUString GetStandardQueryBoxText()
+{
+    return VclResId(SV_MSGBOX_QUERY);
+}
+
+OUString GetStandardText(StandardButtonType eButton)
+{
+    static const char* aResIdAry[static_cast<int>(StandardButtonType::Count)] =
+    {
+        // 
http://lists.freedesktop.org/archives/libreoffice/2013-January/044513.html
+        // Under windows we don't want accelerators on ok/cancel but do on 
other
+        // buttons
+#ifdef _WIN32
+        SV_BUTTONTEXT_OK_NOMNEMONIC,
+        SV_BUTTONTEXT_CANCEL_NOMNEMONIC,
+#else
+        SV_BUTTONTEXT_OK,
+        SV_BUTTONTEXT_CANCEL,
+#endif
+        SV_BUTTONTEXT_YES,
+        SV_BUTTONTEXT_NO,
+        SV_BUTTONTEXT_RETRY,
+        SV_BUTTONTEXT_HELP,
+        SV_BUTTONTEXT_CLOSE,
+        SV_BUTTONTEXT_MORE,
+        SV_BUTTONTEXT_IGNORE,
+        SV_BUTTONTEXT_ABORT,
+        SV_BUTTONTEXT_LESS,
+        STR_WIZDLG_PREVIOUS,
+        STR_WIZDLG_NEXT,
+        STR_WIZDLG_FINISH,
+    };
+
+    return VclResId(aResIdAry[static_cast<sal_uInt16>(eButton)]);
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 3d948a69c925..b7a77541f019 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -123,37 +123,6 @@ void Button::Click()
     ImplCallEventListenersAndHandler( VclEventId::ButtonClick, [this] () { 
maClickHdl.Call(this); } );
 }
 
-OUString GetStandardText(StandardButtonType eButton)
-{
-    static const char* aResIdAry[static_cast<int>(StandardButtonType::Count)] =
-    {
-        // 
http://lists.freedesktop.org/archives/libreoffice/2013-January/044513.html
-        // Under windows we don't want accelerators on ok/cancel but do on 
other
-        // buttons
-#ifdef _WIN32
-        SV_BUTTONTEXT_OK_NOMNEMONIC,
-        SV_BUTTONTEXT_CANCEL_NOMNEMONIC,
-#else
-        SV_BUTTONTEXT_OK,
-        SV_BUTTONTEXT_CANCEL,
-#endif
-        SV_BUTTONTEXT_YES,
-        SV_BUTTONTEXT_NO,
-        SV_BUTTONTEXT_RETRY,
-        SV_BUTTONTEXT_HELP,
-        SV_BUTTONTEXT_CLOSE,
-        SV_BUTTONTEXT_MORE,
-        SV_BUTTONTEXT_IGNORE,
-        SV_BUTTONTEXT_ABORT,
-        SV_BUTTONTEXT_LESS,
-        STR_WIZDLG_PREVIOUS,
-        STR_WIZDLG_NEXT,
-        STR_WIZDLG_FINISH,
-    };
-
-    return VclResId(aResIdAry[static_cast<sal_uInt16>(eButton)]);
-}
-
 void Button::SetModeImage( const Image& rImage )
 {
     if ( rImage != mpButtonData->maImage )
diff --git a/vcl/source/graphic/UnoGraphicProvider.cxx 
b/vcl/source/graphic/UnoGraphicProvider.cxx
index c5919770402c..338c5b3ad51c 100644
--- a/vcl/source/graphic/UnoGraphicProvider.cxx
+++ b/vcl/source/graphic/UnoGraphicProvider.cxx
@@ -20,11 +20,11 @@
 #include <vcl/svapp.hxx>
 #include <vcl/image.hxx>
 #include <vcl/metaact.hxx>
-#include <vcl/msgbox.hxx>
 #include <vcl/imagerepository.hxx>
 #include <tools/fract.hxx>
 #include <unotools/ucbstreamhelper.hxx>
 #include <vcl/graphicfilter.hxx>
+#include <vcl/stdtext.hxx>
 #include <vcl/wmfexternal.hxx>
 #include <vcl/virdev.hxx>
 #include <com/sun/star/awt/XBitmap.hpp>
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 294902e3aa2e..d0c155d1a4d4 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -13,7 +13,7 @@
 #include <vcl/decoview.hxx>
 #include <vcl/dialog.hxx>
 #include <vcl/layout.hxx>
-#include <vcl/msgbox.hxx>
+#include <vcl/stdtext.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/settings.hxx>
 #include <vcl/stdtext.hxx>
diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx
deleted file mode 100644
index 02a431239f56..000000000000
--- a/vcl/source/window/msgbox.cxx
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <strings.hrc>
-#include <bitmaps.hlst>
-#include <svdata.hxx>
-
-#include <vcl/msgbox.hxx>
-
-static void ImplInitMsgBoxImageList()
-{
-    ImplSVData* pSVData = ImplGetSVData();
-    std::vector<Image> &rImages = pSVData->maWinData.maMsgBoxImgList;
-    if (rImages.empty())
-    {
-        rImages.emplace_back(Image(StockImage::Yes, SV_RESID_BITMAP_ERRORBOX));
-        rImages.emplace_back(Image(StockImage::Yes, SV_RESID_BITMAP_QUERYBOX));
-        rImages.emplace_back(Image(StockImage::Yes, 
SV_RESID_BITMAP_WARNINGBOX));
-        rImages.emplace_back(Image(StockImage::Yes, SV_RESID_BITMAP_INFOBOX));
-    }
-}
-
-Image const & GetStandardInfoBoxImage()
-{
-    ImplInitMsgBoxImageList();
-    return ImplGetSVData()->maWinData.maMsgBoxImgList[3];
-}
-
-OUString GetStandardInfoBoxText()
-{
-    return VclResId(SV_MSGBOX_INFO);
-}
-
-Image const & GetStandardWarningBoxImage()
-{
-    ImplInitMsgBoxImageList();
-    return ImplGetSVData()->maWinData.maMsgBoxImgList[2];
-}
-
-OUString GetStandardWarningBoxText()
-{
-    return VclResId(SV_MSGBOX_WARNING);
-}
-
-Image const & GetStandardErrorBoxImage()
-{
-    ImplInitMsgBoxImageList();
-    return ImplGetSVData()->maWinData.maMsgBoxImgList[0];
-}
-
-OUString GetStandardErrorBoxText()
-{
-    return VclResId(SV_MSGBOX_ERROR);
-}
-
-Image const & GetStandardQueryBoxImage()
-{
-    ImplInitMsgBoxImageList();
-    return ImplGetSVData()->maWinData.maMsgBoxImgList[1];
-}
-
-OUString GetStandardQueryBoxText()
-{
-    return VclResId(SV_MSGBOX_QUERY);
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/workben/svdem.cxx b/vcl/workben/svdem.cxx
index dd9027a81be5..ebd7c94fb289 100644
--- a/vcl/workben/svdem.cxx
+++ b/vcl/workben/svdem.cxx
@@ -31,7 +31,6 @@
 #include <vcl/event.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/wrkwin.hxx>
-#include <vcl/msgbox.hxx>
 
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to