xref: /aoo42x/main/sd/inc/sdabstdlg.hxx (revision 6e1a87e1)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _SD_ABSTDLG_HXX
24 #define _SD_ABSTDLG_HXX
25 
26 // include ---------------------------------------------------------------
27 
28 #include <tools/solar.h>
29 #include <tools/string.hxx>
30 #include <sfx2/sfxdlg.hxx>
31 #include <com/sun/star/uno/Sequence.h>
32 #include <com/sun/star/beans/XPropertyAccess.hpp>
33 #include "prlayout.hxx"
34 #include "sdenumdef.hxx"
35 #include "pres.hxx"
36 
37 namespace sd {
38 	class View;
39 	class DrawDocShell;
40 	class ViewShell;
41 	class DrawView;
42 }
43 
44 class SfxTabPage;
45 class SfxViewFrame;
46 class SfxBindings;
47 class ResId;
48 class String;
49 class SfxItemPool;
50 class SfxObjectShell;
51 class SfxObjectShellLock;
52 class SvxFieldData;
53 class GDIMetaFile;
54 class SdDrawDocument;
55 class SfxMedium;
56 class SdrObject;
57 class SfxStyleSheetBasePool;
58 class SfxStyleSheetBase;
59 class SdrModel;
60 class SdrView;
61 class Bitmap;
62 class List;
63 class SdResId;
64 class Window;
65 class SdPage;
66 class TabPage;
67 class ViewShell;
68 class XColorList;
69 typedef ::boost::shared_ptr< XColorList > XColorListSharedPtr;
70 
71 class AbstractCopyDlg : public VclAbstractDialog  //add for CopyDlg
72 {
73 public:
74 	virtual void	GetAttr( SfxItemSet& rOutAttrs ) = 0;
75 };
76 
77 class AbstractSdCustomShowDlg : public VclAbstractDialog  //add for SdCustomShowDlg
78 {
79 public:
80 	virtual sal_Bool		IsModified() const = 0;
81 	virtual sal_Bool		IsCustomShow() const = 0;
82 };
83 
84 class AbstractAssistentDlg : public VclAbstractDialog  //add for AssistentDlg
85 {
86 public:
87 	virtual SfxObjectShellLock GetDocument() = 0;
88 	virtual OutputType GetOutputMedium() const = 0;
89 	virtual sal_Bool IsSummary() const = 0;
90 	virtual StartType GetStartType() const = 0;
91 	virtual String GetDocPath() const = 0;
92 	virtual sal_Bool GetStartWithFlag() const = 0;
93 	virtual sal_Bool IsDocEmpty() const = 0;
94 	virtual String GetPassword() = 0;
95 };
96 
97 class AbstractSdModifyFieldDlg : public VclAbstractDialog  //add for SdModifyFieldDlg
98 {
99 public:
100 	virtual SvxFieldData*		GetField() = 0;
101 	virtual SfxItemSet			GetItemSet() = 0;
102 };
103 
104 class AbstractSdSnapLineDlg : public VclAbstractDialog  //add for SdSnapLineDlg
105 {
106 public:
107 	virtual void GetAttr(SfxItemSet& rOutAttrs) = 0;
108 	virtual void HideRadioGroup() = 0;
109 	virtual void HideDeleteBtn() = 0;
110 	virtual void SetInputFields(sal_Bool bEnableX, sal_Bool bEnableY) = 0;
111 	//from class ::Window
112 	virtual void    SetText( const XubString& rStr ) = 0;
113 };
114 
115 class AbstractSdInsertLayerDlg : public VclAbstractDialog  //add for SdInsertLayerDlg
116 {
117 public:
118 	virtual void	GetAttr( SfxItemSet& rOutAttrs ) = 0;
119 	//from class ::Window
120 	virtual void    SetHelpId( const rtl::OString& rHelpId ) = 0;
121 };
122 
123 class AbstractSdInsertPasteDlg : public VclAbstractDialog  //add for SdInsertPasteDlg
124 {
125 public:
126 	virtual sal_Bool			IsInsertBefore() const = 0;
127 };
128 
129 class AbstractSdInsertPagesObjsDlg : public VclAbstractDialog  //add for SdInsertPagesObjsDlg
130 {
131 public:
132 	virtual ::Window*	GetWindow() = 0;  //this method is added for return a ::Window type pointer
133 	virtual List*   	GetList( sal_uInt16 nType ) = 0;
134 	virtual sal_Bool		IsLink() = 0;
135 	virtual sal_Bool 		IsRemoveUnnessesaryMasterPages() const = 0;
136 };
137 
138 class AbstractMorphDlg : public VclAbstractDialog  //add for MorphDlg
139 {
140 public:
141 	virtual void			SaveSettings() const = 0;
142 	virtual sal_uInt16			GetFadeSteps() const = 0;
143 	virtual sal_Bool			IsAttributeFade() const = 0;
144 	virtual sal_Bool			IsOrientationFade() const = 0;
145 };
146 
147 class AbstractSdStartPresDlg : public VclAbstractDialog  //add for SdStartPresentationDlg
148 {
149 public:
150 	virtual void	GetAttr( SfxItemSet& rOutAttrs ) = 0;
151 };
152 
153 class AbstractSdPresLayoutDlg : public VclAbstractDialog  //add for SdPresLayoutDlg
154 {
155 public:
156 	virtual void	GetAttr(SfxItemSet& rOutAttrs) = 0;
157 };
158 
159 class AbstractSdVectorizeDlg : public VclAbstractDialog  //add for SdVectorizeDlg
160 {
161 public:
162 	virtual const GDIMetaFile&	GetGDIMetaFile() const = 0;
163 };
164 
165 class AbstractSdPublishingDlg : public VclAbstractDialog  //add for SdPublishingDlg
166 {
167 public:
168 	virtual void GetParameterSequence( ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rParams ) = 0;
169 };
170 
171 class AbstractHeaderFooterDialog : public VclAbstractDialog // add for HeaderFooterDialog
172 {
173 public:
174 	virtual void ApplyToAll( TabPage* pPage ) = 0;
175 	virtual void Apply( TabPage* pPage ) = 0;
176 	virtual void Cancel( TabPage* pPage ) = 0;
177 };
178 
179 //---------------------------------------------------------
180 class SdAbstractDialogFactory
181 {
182 public:
183 	static SdAbstractDialogFactory* 	Create();
184 
185 	virtual VclAbstractDialog* 			CreateBreakDlg(::Window* pWindow, ::sd::DrawView* pDrView, ::sd::DrawDocShell* pShell, sal_uLong nSumActionCount, sal_uLong nObjCount ) = 0;
186 	virtual AbstractCopyDlg*			CreateCopyDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, XColorListSharedPtr aColTab, ::sd::View* pView ) = 0;
187 	virtual AbstractSdCustomShowDlg*	CreateSdCustomShowDlg( ::Window* pWindow, SdDrawDocument& rDrawDoc ) = 0;
188 	virtual SfxAbstractTabDialog*		CreateSdTabCharDialog( ::Window* pParent, const SfxItemSet* pAttr, SfxObjectShell* pDocShell ) = 0;
189 	virtual SfxAbstractTabDialog*		CreateSdTabPageDialog( ::Window* pParent, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, sal_Bool bAreaPage = sal_True ) = 0;
190 	virtual AbstractAssistentDlg*		CreateAssistentDlg( ::Window* pParent, sal_Bool bAutoPilot) = 0;
191 	virtual AbstractSdModifyFieldDlg*	CreateSdModifyFieldDlg( ::Window* pWindow, const SvxFieldData* pInField, const SfxItemSet& rSet ) = 0;
192 	virtual AbstractSdSnapLineDlg*		CreateSdSnapLineDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, ::sd::View* pView) = 0;
193 	virtual AbstractSdInsertLayerDlg*	CreateSdInsertLayerDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, bool bDeletable,	String aStr ) = 0;
194 	virtual AbstractSdInsertPasteDlg*	CreateSdInsertPasteDlg( ::Window* pWindow ) = 0;
195 	virtual AbstractSdInsertPagesObjsDlg* CreateSdInsertPagesObjsDlg( ::Window* pParent, const SdDrawDocument* pDoc, SfxMedium* pSfxMedium, const String& rFileName ) = 0;
196 	virtual AbstractMorphDlg*			CreateMorphDlg( ::Window* pParent, const SdrObject* pObj1, const SdrObject* pObj2) = 0;
197 	virtual SfxAbstractTabDialog*		CreateSdOutlineBulletTabDlg ( ::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView = NULL ) = 0;
198 	virtual SfxAbstractTabDialog*		CreateSdParagraphTabDlg ( ::Window* pParent, const SfxItemSet* pAttr ) = 0;
199 	virtual AbstractSdStartPresDlg*		CreateSdStartPresentationDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, List& rPageNames, List* pCSList ) = 0;
200 	virtual SfxAbstractTabDialog*		CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, ::Window* pParent, SdResId DlgId, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool ) = 0;
201 	virtual AbstractSdPresLayoutDlg*	CreateSdPresLayoutDlg( ::sd::DrawDocShell* pDocShell, ::sd::ViewShell* pViewShell, ::Window* pWindow, const SfxItemSet& rInAttrs) = 0;
202 	virtual SfxAbstractTabDialog*		CreateSdTabTemplateDlg( ::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView ) = 0;
203 	virtual SfxAbstractDialog*			CreatSdActionDialog( ::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView ) = 0;
204 	virtual AbstractSdVectorizeDlg*		CreateSdVectorizeDlg( ::Window* pParent, const Bitmap& rBmp, ::sd::DrawDocShell* pDocShell ) = 0;
205 	virtual AbstractSdPublishingDlg*	CreateSdPublishingDlg( ::Window* pWindow, DocumentType eDocType) = 0;
206 
207 	virtual VclAbstractDialog*          CreateMasterLayoutDialog( ::Window* pParent,
208 																  SdDrawDocument* pDoc,
209 																  SdPage* ) = 0; // add for MasterLayoutDialog
210 
211 	virtual AbstractHeaderFooterDialog* CreateHeaderFooterDialog( ViewShell* pViewShell,
212 																  ::Window* pParent,
213 																  SdDrawDocument* pDoc,
214 																  SdPage* pCurrentPage ) = 0; // add for HeaderFooterDialog
215 
216 	virtual CreateTabPage				GetSdOptionsContentsTabPageCreatorFunc() = 0;
217 	virtual CreateTabPage				GetSdPrintOptionsTabPageCreatorFunc() = 0;
218 	virtual CreateTabPage				GetSdOptionsMiscTabPageCreatorFunc() = 0;
219 	virtual CreateTabPage				GetSdOptionsSnapTabPageCreatorFunc() = 0;
220 };
221 #endif
222 
223