summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/ui/dlg/sddlgfact.cxx40
-rw-r--r--sd/source/ui/dlg/sddlgfact.hxx23
-rw-r--r--sd/source/ui/inc/headerfooterdlg.hxx6
-rw-r--r--sd/source/ui/inc/masterlayoutdlg.hxx6
-rw-r--r--sd/source/ui/view/drviews3.cxx35
5 files changed, 94 insertions, 16 deletions
diff --git a/sd/source/ui/dlg/sddlgfact.cxx b/sd/source/ui/dlg/sddlgfact.cxx
index 7a97472cbc7d..8c3869e9c39d 100644
--- a/sd/source/ui/dlg/sddlgfact.cxx
+++ b/sd/source/ui/dlg/sddlgfact.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: sddlgfact.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: hr $ $Date: 2004-05-10 15:45:04 $
+ * last change: $Author: hr $ $Date: 2004-05-13 16:32:16 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -113,6 +113,10 @@
#include "prntopts.hrc"
#include "pubdlg.hxx" //add for SdPublishingDlg
#include "pubdlg.hrc"
+#include "masterlayoutdlg.hxx"
+#include "masterlayoutdlg.hrc"
+#include "headerfooterdlg.hxx"
+#include "headerfooterdlg.hrc"
IMPL_ABSTDLG_BASE(VclAbstractDialog_Impl); // add for BreakDlg
IMPL_ABSTDLG_BASE(AbstractCopyDlg_Impl); // add for CopyDlg
@@ -132,6 +136,7 @@ IMPL_ABSTDLG_BASE(AbstractSdPresLayoutDlg_Impl); //add for SdPresLayoutDlg
IMPL_ABSTDLG_BASE(AbstractSfxSingleTabDialog_Impl); //add for SdActionDlg
IMPL_ABSTDLG_BASE(AbstractSdVectorizeDlg_Impl); //add for SdVectorizeDlg
IMPL_ABSTDLG_BASE(AbstractSdPublishingDlg_Impl); //add for SdPublishingDlg
+IMPL_ABSTDLG_BASE(AbstractHeaderFooterDialog_Impl); // add for HeaderFooterDialog
//AbstractCopyDlg_Impl begin
void AbstractCopyDlg_Impl::GetAttr( SfxItemSet& rOutAttrs )
@@ -355,6 +360,23 @@ void AbstractSdPublishingDlg_Impl::GetParameterSequence( ::com::sun::star::uno::
}
//AbstractSdPublishingDlg_Impl end
+//AbstractHeaderFooterDialog_Impl
+void AbstractHeaderFooterDialog_Impl::ApplyToAll( TabPage* pPage )
+{
+ pDlg->ApplyToAll( pPage );
+}
+
+void AbstractHeaderFooterDialog_Impl::Apply( TabPage* pPage )
+{
+ pDlg->Apply( pPage );
+}
+
+void AbstractHeaderFooterDialog_Impl::Cancel( TabPage* pPage )
+{
+ pDlg->Cancel( pPage );
+}
+//AbstractHeaderFooterDialog_Impl
+
//-------------- SdAbstractDialogFactory implementation--------------
//add for BreakDlg begin
@@ -860,3 +882,17 @@ GetTabPageRanges SdAbstractDialogFactory_Impl::GetTabPageRangesFunc( USHORT nId
return 0;
}
+
+VclAbstractDialog* SdAbstractDialogFactory_Impl::CreateMasterLayoutDialog( ::Window* pParent,
+ SdDrawDocument* pDoc, SdPage* pCurrentPage )
+{
+ return new VclAbstractDialog_Impl( new ::sd::MasterLayoutDialog( pParent, pDoc, pCurrentPage ));
+}
+
+AbstractHeaderFooterDialog* SdAbstractDialogFactory_Impl::CreateHeaderFooterDialog( ViewShell* pViewShell,
+ ::Window* pParent, SdDrawDocument* pDoc, SdPage* pCurrentPage )
+{
+ return new AbstractHeaderFooterDialog_Impl( new ::sd::HeaderFooterDialog( (::sd::ViewShell*)pViewShell, pParent, pDoc, pCurrentPage ));
+}
+
+
diff --git a/sd/source/ui/dlg/sddlgfact.hxx b/sd/source/ui/dlg/sddlgfact.hxx
index 61b3cc91a14c..1e3f8381ec8a 100644
--- a/sd/source/ui/dlg/sddlgfact.hxx
+++ b/sd/source/ui/dlg/sddlgfact.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: sddlgfact.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: hr $ $Date: 2004-05-10 15:45:15 $
+ * last change: $Author: hr $ $Date: 2004-05-13 16:32:29 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -88,6 +88,7 @@ namespace sd {
class CopyDlg;
class BreakDlg;
class OutlineBulletDlg;
+ class HeaderFooterDialog;
}
// add for BreakDlg
class Dialog;
@@ -260,6 +261,15 @@ class AbstractSdPublishingDlg_Impl :public AbstractSdPublishingDlg
virtual void GetParameterSequence( ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rParams );
};
+// add for HeaderFooterDialog
+class AbstractHeaderFooterDialog_Impl :public AbstractHeaderFooterDialog
+{
+ DECL_ABSTDLG_BASE(AbstractHeaderFooterDialog_Impl,::sd::HeaderFooterDialog);
+ virtual void ApplyToAll( TabPage* pPage );
+ virtual void Apply( TabPage* pPage );
+ virtual void Cancel( TabPage* pPage );
+};
+
//------------------------------------------------------------------------
//AbstractDialogFactory_Impl implementations
class SdAbstractDialogFactory_Impl : public SdAbstractDialogFactory
@@ -342,6 +352,15 @@ public:
virtual AbstractSdPublishingDlg* CreateSdPublishingDlg( const ResId& rResId,
::Window* pWindow, DocumentType eDocType); //add for SdPublishingDlg
+ virtual VclAbstractDialog* CreateMasterLayoutDialog( ::Window* pParent,
+ SdDrawDocument* pDoc,
+ SdPage* ); // add for MasterLayoutDialog
+
+ virtual AbstractHeaderFooterDialog* CreateHeaderFooterDialog( ViewShell* pViewShell,
+ ::Window* pParent,
+ SdDrawDocument* pDoc,
+ SdPage* pCurrentPage ); // add for HeaderFooterDialog
+
// For TabPage
virtual CreateTabPage GetTabPageCreatorFunc( USHORT nId );
diff --git a/sd/source/ui/inc/headerfooterdlg.hxx b/sd/source/ui/inc/headerfooterdlg.hxx
index f940964adb81..3686e595f292 100644
--- a/sd/source/ui/inc/headerfooterdlg.hxx
+++ b/sd/source/ui/inc/headerfooterdlg.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: headerfooterdlg.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: rt $ $Date: 2004-03-30 15:52:29 $
+ * last change: $Author: hr $ $Date: 2004-05-13 16:32:48 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -117,7 +117,7 @@ public:
void Apply( TabPage* pPage );
void Cancel( TabPage* pPage );
- static void execute( ViewShell* pViewShell, ::Window* pParent, SdDrawDocument* pDoc, SdPage* pCurrentPage );
+ virtual short Execute();
};
}
diff --git a/sd/source/ui/inc/masterlayoutdlg.hxx b/sd/source/ui/inc/masterlayoutdlg.hxx
index dd89503d1a23..dfbe9b297508 100644
--- a/sd/source/ui/inc/masterlayoutdlg.hxx
+++ b/sd/source/ui/inc/masterlayoutdlg.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: masterlayoutdlg.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: rt $ $Date: 2004-03-30 15:52:50 $
+ * last change: $Author: hr $ $Date: 2004-05-13 16:33:01 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -108,7 +108,7 @@ public:
MasterLayoutDialog( Window* pParent, SdDrawDocument* pDoc, SdPage* pCurrentPage );
~MasterLayoutDialog();
- static void execute( Window* pParent, SdDrawDocument* pDoc, SdPage* pCurrentPage );
+ virtual short Execute();
};
}
diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx
index 26e1cd3bcb23..e30ff430411e 100644
--- a/sd/source/ui/view/drviews3.cxx
+++ b/sd/source/ui/view/drviews3.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: drviews3.cxx,v $
*
- * $Revision: 1.24 $
+ * $Revision: 1.25 $
*
- * last change: $Author: rt $ $Date: 2004-03-30 15:54:52 $
+ * last change: $Author: hr $ $Date: 2004-05-13 16:33:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -186,6 +186,7 @@
#ifndef SD_OBJECT_BAR_MANAGER_HXX
#include "ObjectBarManager.hxx"
#endif
+#include "sdabstdlg.hxx" //CHINA001
namespace sd {
@@ -381,7 +382,12 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
case SID_INSERT_PAGE_NUMBER:
case SID_INSERT_DATE_TIME:
{
- sd::HeaderFooterDialog::execute( this, pWindow, GetDoc(), pActualPage );
+ SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();//CHINA001
+ DBG_ASSERT(pFact, "SdAbstractDialogFactory fail!");//CHINA001
+ AbstractHeaderFooterDialog* pDlg = pFact->CreateHeaderFooterDialog( (::ViewShell*)this, pWindow, GetDoc(), pActualPage );
+ DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001
+ pDlg->Execute();
+ delete pDlg;
pWindow->Invalidate();
UpdatePreview( pActualPage );
@@ -404,7 +410,12 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
pPage = GetDoc()->GetMasterSdPage(0,PK_STANDARD);
}
- sd::MasterLayoutDialog::execute( pWindow, GetDoc(), pPage );
+ SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();//CHINA001
+ DBG_ASSERT(pFact, "SdAbstractDialogFactory fail!");//CHINA001
+ VclAbstractDialog* pDlg = pFact->CreateMasterLayoutDialog( pWindow, GetDoc(), pPage );
+ DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001
+ pDlg->Execute();
+ delete pDlg;
Invalidate();
rReq.Done ();
break;
@@ -422,7 +433,13 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
pPage = GetDoc()->GetMasterSdPage(0,PK_NOTES);
}
- sd::MasterLayoutDialog::execute( pWindow, GetDoc(), pPage );
+ SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();//CHINA001
+ DBG_ASSERT(pFact, "SdAbstractDialogFactory fail!");//CHINA001
+ VclAbstractDialog* pDlg = pFact->CreateMasterLayoutDialog( pWindow, GetDoc(), pPage );
+ DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001
+ pDlg->Execute();
+ delete pDlg;
+
Invalidate();
rReq.Done ();
break;
@@ -430,7 +447,13 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
case SID_MASTER_LAYOUTS_HANDOUTS:
{
- sd::MasterLayoutDialog::execute( pWindow, GetDoc(), GetDoc()->GetMasterSdPage(0,PK_HANDOUT) );
+ SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();//CHINA001
+ DBG_ASSERT(pFact, "SdAbstractDialogFactory fail!");//CHINA001
+ VclAbstractDialog* pDlg = pFact->CreateMasterLayoutDialog( pWindow, GetDoc(), GetDoc()->GetMasterSdPage(0,PK_HANDOUT) );
+ DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001
+ pDlg->Execute();
+ delete pDlg;
+
Invalidate();
rReq.Done ();
break;