summaryrefslogtreecommitdiff
path: root/sw/source/uibase/inc
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2014-07-29 15:31:00 +0200
committerMichael Stahl <mstahl@redhat.com>2014-09-12 20:41:58 +0000
commit57d7802145befa4ebc191cc646069aefb58f5c32 (patch)
treeff401919bd485f5b387b36545fe19be843851140 /sw/source/uibase/inc
parent3b11057b75434526f67e678ddc1deb9ebd61c752 (diff)
MM: refactor cancel handling for dbui dialogs
This simplifies the handling of CreateMonitor and PrintMonitor in the combined mail merge function. Change-Id: Iacf933ec1a6017949b29b3d5f62d5f55c4691053 Reviewed-on: https://gerrit.libreoffice.org/10984 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sw/source/uibase/inc')
-rw-r--r--sw/source/uibase/inc/dbui.hxx21
1 files changed, 15 insertions, 6 deletions
diff --git a/sw/source/uibase/inc/dbui.hxx b/sw/source/uibase/inc/dbui.hxx
index 9f4022f20fcf..4e613ec0c155 100644
--- a/sw/source/uibase/inc/dbui.hxx
+++ b/sw/source/uibase/inc/dbui.hxx
@@ -24,7 +24,19 @@
#include <vcl/button.hxx>
#include <vcl/fixed.hxx>
-class SW_DLLPUBLIC PrintMonitor: public ModelessDialog
+class SW_DLLPUBLIC CancelableModelessDialog : public ModelessDialog
+{
+protected:
+ CancelButton* m_pCancelButton;
+ CancelableModelessDialog( Window *pParent, const OString& rID,
+ const OUString& rUIXMLDescription );
+
+public:
+ virtual ~CancelableModelessDialog() {};
+ void SetCancelHdl( const Link& rLink );
+};
+
+class SW_DLLPUBLIC PrintMonitor: public CancelableModelessDialog
{
public:
enum PrintMonitorType
@@ -32,16 +44,16 @@ public:
MONITOR_TYPE_PRINT,
MONITOR_TYPE_SAVE
};
+
FixedText* m_pDocName;
FixedText* m_pPrinting;
FixedText* m_pPrinter;
FixedText* m_pPrintInfo;
- CancelButton* m_pCancel;
PrintMonitor( Window *pParent, PrintMonitorType eType );
};
-class CreateMonitor : public ModelessDialog
+class CreateMonitor : public CancelableModelessDialog
{
public:
CreateMonitor( Window *pParent );
@@ -49,14 +61,11 @@ public:
void SetTotalCount( sal_Int32 nTotal );
void SetCurrentPosition( sal_Int32 nCurrent );
- void SetCancelHdl( const Link& rLink );
-
private:
void UpdateCountingText();
private:
FixedText* m_pCounting;
- CancelButton* m_pCancelButton;
OUString m_sCountingPattern;
OUString m_sVariable_Total;