summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-03-19 20:42:55 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-03-20 09:51:45 +0100
commit0ee398cf33077ec366a572c76267a3f40bcf08fd (patch)
tree96dd1e32b9b06e7c2c913f3e39c965b03179bef0 /vcl
parent0c69f9c627f6eb25f1df26fb63bc511bbac4667a (diff)
weld SwSendWarningBox
and then MessageDialog can become a vcl internal Change-Id: I8bf1f963971420b11f6c4163f624be26603cc942 Reviewed-on: https://gerrit.libreoffice.org/51601 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/messagedialog.hxx57
-rw-r--r--vcl/source/app/salvtables.cxx2
-rw-r--r--vcl/source/window/builder.cxx2
-rw-r--r--vcl/source/window/dialog.cxx2
-rw-r--r--vcl/source/window/layout.cxx2
5 files changed, 61 insertions, 4 deletions
diff --git a/vcl/inc/messagedialog.hxx b/vcl/inc/messagedialog.hxx
new file mode 100644
index 000000000000..09d3a909fece
--- /dev/null
+++ b/vcl/inc/messagedialog.hxx
@@ -0,0 +1,57 @@
+/* -*- 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/.
+ */
+
+#ifndef INCLUDED_VCL_INC_MESSAGEDIALOG_HXX
+#define INCLUDED_VCL_INC_MESSAGEDIALOG_HXX
+
+#include <vcl/dialog.hxx>
+#include <vcl/layout.hxx>
+
+class MessageDialog : public Dialog
+{
+private:
+ VclButtonsType m_eButtonsType;
+ VclMessageType m_eMessageType;
+ VclPtr<VclBox> m_pOwnedContentArea;
+ VclPtr<VclButtonBox> m_pOwnedActionArea;
+ VclPtr<VclGrid> m_pGrid;
+ VclPtr<VclVBox> m_pMessageBox;
+ VclPtr<FixedImage> m_pImage;
+ VclPtr<VclMultiLineEdit> m_pPrimaryMessage;
+ VclPtr<VclMultiLineEdit> m_pSecondaryMessage;
+ OUString m_sPrimaryString;
+ OUString m_sSecondaryString;
+ void create_owned_areas();
+
+ static void SetMessagesWidths(vcl::Window const* pParent, VclMultiLineEdit* pPrimaryMessage,
+ VclMultiLineEdit* pSecondaryMessage);
+
+ friend class VclPtr<MessageDialog>;
+ MessageDialog(vcl::Window* pParent, WinBits nStyle);
+
+public:
+ MessageDialog(vcl::Window* pParent, const OUString& rMessage,
+ VclMessageType eMessageType = VclMessageType::Error,
+ VclButtonsType eButtonsType = VclButtonsType::Ok);
+ MessageDialog(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription);
+ virtual bool set_property(const OString& rKey, const OUString& rValue) override;
+ OUString const& get_primary_text() const;
+ OUString const& get_secondary_text() const;
+ void set_primary_text(const OUString& rPrimaryString);
+ void set_secondary_text(const OUString& rSecondaryString);
+ virtual ~MessageDialog() override;
+ virtual void dispose() override;
+
+ void create_message_area();
+ VclContainer* get_message_area() const { return m_pMessageBox.get(); }
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 4945c764f8a0..62b923f98cb8 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -29,7 +29,7 @@
#include <salobj.hxx>
#include <salmenu.hxx>
#include <svdata.hxx>
-#include <vcl/messagedialog.hxx>
+#include <messagedialog.hxx>
#include <vcl/builder.hxx>
#include <vcl/combobox.hxx>
#include <vcl/lstbox.hxx>
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 1c1f63e7cdf6..8f982e435fe2 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -43,7 +43,7 @@
#include <vcl/commandinfoprovider.hxx>
#include <svdata.hxx>
#include <bitmaps.hlst>
-#include <vcl/messagedialog.hxx>
+#include <messagedialog.hxx>
#include <window.h>
#include <xmlreader/xmlreader.hxx>
#include <desktop/crashreport.hxx>
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 16aa5293f9b1..25e9fc972dbb 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -57,7 +57,7 @@
#include <vcl/uitest/logger.hxx>
#include <vcl/virdev.hxx>
#include <vcl/IDialogRenderable.hxx>
-#include <vcl/messagedialog.hxx>
+#include <messagedialog.hxx>
#include <salframe.hxx>
#include <iostream>
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 16e1db86c99d..3a01fa7611f6 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -15,7 +15,7 @@
#include <vcl/msgbox.hxx>
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
-#include <vcl/messagedialog.hxx>
+#include <messagedialog.hxx>
#include <window.h>
#include <boost/multi_array.hpp>
#include <officecfg/Office/Common.hxx>