summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-10-02 20:41:08 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-10-03 11:11:14 +0200
commit81903d443116c643a9ff92d92c092812abc7f57d (patch)
tree1d4d533ef9171c96b2ffa910810dceecd2ce700c
parentee2e8d0c0670b4eeecd73b76d7f182fa003426ae (diff)
merge msgbox and stdtext
Change-Id: If95d78746eff3ae5343e7d4c6bb2433537ccb84d Reviewed-on: https://gerrit.libreoffice.org/80099 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--dbaccess/source/ui/dlg/DbAdminImpl.cxx1
-rw-r--r--dbaccess/source/ui/dlg/generalpage.cxx1
-rw-r--r--dbaccess/source/ui/dlg/tablespage.cxx1
-rw-r--r--dbaccess/source/ui/uno/copytablewizard.cxx1
-rw-r--r--include/vcl/msgbox.hxx40
-rw-r--r--include/vcl/stdtext.hxx15
-rw-r--r--sc/source/ui/app/scmod.cxx1
-rw-r--r--sc/source/ui/dbgui/filtdlg.cxx1
-rw-r--r--sc/source/ui/dbgui/pfiltdlg.cxx2
-rw-r--r--solenv/clang-format/blacklist2
-rw-r--r--sw/source/ui/envelp/label1.cxx1
-rw-r--r--toolkit/source/awt/vclxtoolkit.cxx2
-rw-r--r--vcl/Library_vcl.mk1
-rw-r--r--vcl/source/app/stdtext.cxx91
-rw-r--r--vcl/source/control/button.cxx31
-rw-r--r--vcl/source/graphic/UnoGraphicProvider.cxx2
-rw-r--r--vcl/source/window/layout.cxx2
-rw-r--r--vcl/source/window/msgbox.cxx83
-rw-r--r--vcl/workben/svdem.cxx1
19 files changed, 108 insertions, 171 deletions
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;