summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2004-05-13 15:31:50 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2004-05-13 15:31:50 +0000
commitde6cbd0a5362ad46054ccfb47f61dcdc88e7fcf7 (patch)
tree8c5e6c0df476f80958b064b967c5b80460a6ff58
parent57f8513ebf76dad3321c2dcd73909e835897edd0 (diff)
#i10000#: adept new dialogs to abstract factory mecahnism
-rw-r--r--sd/inc/sdabstdlg.hxx23
-rw-r--r--sd/source/ui/dlg/headerfooterdlg.cxx13
-rw-r--r--sd/source/ui/dlg/masterlayoutdlg.cxx15
3 files changed, 34 insertions, 17 deletions
diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx
index 14a0ff349a3f..c6430788c8dd 100644
--- a/sd/inc/sdabstdlg.hxx
+++ b/sd/inc/sdabstdlg.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: sdabstdlg.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: hr $ $Date: 2004-05-10 15:41:01 $
+ * last change: $Author: hr $ $Date: 2004-05-13 16:31:09 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -106,6 +106,9 @@ class Bitmap;
class List;
class SdResId;
class Window;
+class SdPage;
+class TabPage;
+class ViewShell;
class AbstractCopyDlg : public VclAbstractDialog //add for CopyDlg
{
@@ -219,6 +222,14 @@ public:
virtual void GetParameterSequence( ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rParams ) = 0;
};
+class AbstractHeaderFooterDialog : public VclAbstractDialog // add for HeaderFooterDialog
+{
+public:
+ virtual void ApplyToAll( TabPage* pPage ) = 0;
+ virtual void Apply( TabPage* pPage ) = 0;
+ virtual void Cancel( TabPage* pPage ) = 0;
+};
+
//---------------------------------------------------------
class SdAbstractDialogFactory
{
@@ -300,6 +311,14 @@ public:
::sd::DrawDocShell* pDocShell ) = 0; //add for SdVectorizeDlg
virtual AbstractSdPublishingDlg* CreateSdPublishingDlg( const ResId& rResId,
::Window* pWindow, DocumentType eDocType) = 0; //add for SdPublishingDlg
+ virtual VclAbstractDialog* CreateMasterLayoutDialog( ::Window* pParent,
+ SdDrawDocument* pDoc,
+ SdPage* ) = 0; // add for MasterLayoutDialog
+
+ virtual AbstractHeaderFooterDialog* CreateHeaderFooterDialog( ViewShell* pViewShell,
+ ::Window* pParent,
+ SdDrawDocument* pDoc,
+ SdPage* pCurrentPage ) = 0; // add for HeaderFooterDialog
virtual CreateTabPage GetTabPageCreatorFunc( USHORT nId ) = 0;
virtual GetTabPageRanges GetTabPageRangesFunc( USHORT nId ) = 0;
diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx
index b9b5bd69d1e1..f932aaa82427 100644
--- a/sd/source/ui/dlg/headerfooterdlg.cxx
+++ b/sd/source/ui/dlg/headerfooterdlg.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: headerfooterdlg.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: rt $ $Date: 2004-03-30 15:49:16 $
+ * last change: $Author: hr $ $Date: 2004-05-13 16:31:33 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -365,13 +365,12 @@ IMPL_LINK( HeaderFooterDialog, DeactivatePageHdl, TabControl *, pTabCtrl )
// -----------------------------------------------------------------------
-void HeaderFooterDialog::execute( ViewShell* pViewShell, ::Window* pParent, SdDrawDocument* pDoc, SdPage* pCurrentPage )
+short HeaderFooterDialog::Execute()
{
- HeaderFooterDialog* pDlg = new HeaderFooterDialog( pViewShell, pParent, pDoc, pCurrentPage );
- USHORT nRet = pDlg->Execute();
+ USHORT nRet = TabDialog::Execute();
if( nRet )
- pViewShell->GetDocSh()->SetModified();
- delete pDlg;
+ mpViewShell->GetDocSh()->SetModified();
+ return nRet;
}
// -----------------------------------------------------------------------
diff --git a/sd/source/ui/dlg/masterlayoutdlg.cxx b/sd/source/ui/dlg/masterlayoutdlg.cxx
index 7298b467c82f..b0ca36d7ef23 100644
--- a/sd/source/ui/dlg/masterlayoutdlg.cxx
+++ b/sd/source/ui/dlg/masterlayoutdlg.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: masterlayoutdlg.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: rt $ $Date: 2004-03-30 15:49:52 $
+ * last change: $Author: hr $ $Date: 2004-05-13 16:31:50 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -106,7 +106,7 @@ MasterLayoutDialog::MasterLayoutDialog( Window* pParent, SdDrawDocument* pDoc, S
{
aTitle = String( SdResId( STR_MASTER_LAYOUT_TITLE ) );
maCBHeader.Enable( FALSE );
- String aSlideNumberStr( SdResId( STR_SLIDE_NUMBER ) );
+ String aSlideNumberStr( SdResId( STR_SLIDE_NUMBER ) );
maCBPageNumber.SetText( aSlideNumberStr );
break;
}
@@ -137,12 +137,11 @@ MasterLayoutDialog::~MasterLayoutDialog()
{
}
-void MasterLayoutDialog::execute( Window* pParent, SdDrawDocument* pDoc, SdPage* pCurrentPage )
+short MasterLayoutDialog::Execute()
{
- MasterLayoutDialog* pDlg = new MasterLayoutDialog( pParent, pDoc, pCurrentPage );
- if( pDlg->Execute() )
- pDlg->applyChanges();
- delete pDlg;
+ if ( ModalDialog::Execute() )
+ applyChanges();
+ return 1;
}
void MasterLayoutDialog::applyChanges()