xref: /aoo41x/main/svx/inc/svx/svdedxv.hxx (revision 766ce4d0)
13334a7e6SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
33334a7e6SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
43334a7e6SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
53334a7e6SAndrew Rist  * distributed with this work for additional information
63334a7e6SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
73334a7e6SAndrew Rist  * to you under the Apache License, Version 2.0 (the
83334a7e6SAndrew Rist  * "License"); you may not use this file except in compliance
93334a7e6SAndrew Rist  * with the License.  You may obtain a copy of the License at
103334a7e6SAndrew Rist  *
113334a7e6SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
123334a7e6SAndrew Rist  *
133334a7e6SAndrew Rist  * Unless required by applicable law or agreed to in writing,
143334a7e6SAndrew Rist  * software distributed under the License is distributed on an
153334a7e6SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
163334a7e6SAndrew Rist  * KIND, either express or implied.  See the License for the
173334a7e6SAndrew Rist  * specific language governing permissions and limitations
183334a7e6SAndrew Rist  * under the License.
193334a7e6SAndrew Rist  *
203334a7e6SAndrew Rist  *************************************************************/
213334a7e6SAndrew Rist 
223334a7e6SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _SVDEDXV_HXX
25cdf0e10cSrcweir #define _SVDEDXV_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <rtl/ref.hxx>
28cdf0e10cSrcweir #include "svx/svxdllapi.h"
29cdf0e10cSrcweir #include <svx/svdglev.hxx>
30cdf0e10cSrcweir 
31cdf0e10cSrcweir #include <svx/selectioncontroller.hxx>
32cdf0e10cSrcweir 
33cdf0e10cSrcweir //************************************************************
34cdf0e10cSrcweir //   Vorausdeklarationen
35cdf0e10cSrcweir //************************************************************
36cdf0e10cSrcweir 
37cdf0e10cSrcweir #include <boost/shared_ptr.hpp>
38cdf0e10cSrcweir 
39cdf0e10cSrcweir class SdrOutliner;
40cdf0e10cSrcweir class OutlinerView;
41cdf0e10cSrcweir class EditStatus;
42cdf0e10cSrcweir class EditFieldInfo;
43cdf0e10cSrcweir class ImpSdrEditPara;
44cdf0e10cSrcweir struct PasteOrDropInfos;
4569ffbee1SArmin Le Grand class SdrUndoManager;
46cdf0e10cSrcweir 
47cdf0e10cSrcweir namespace com { namespace sun { namespace star { namespace uno {
48cdf0e10cSrcweir 	class Any;
49cdf0e10cSrcweir } } } }
50cdf0e10cSrcweir 
51cdf0e10cSrcweir namespace sdr {
52cdf0e10cSrcweir 	class SelectionController;
53cdf0e10cSrcweir }
54cdf0e10cSrcweir 
55cdf0e10cSrcweir //************************************************************
56cdf0e10cSrcweir //   Defines
57cdf0e10cSrcweir //************************************************************
58cdf0e10cSrcweir 
59cdf0e10cSrcweir enum SdrEndTextEditKind {SDRENDTEXTEDIT_UNCHANGED, // Textobjekt unveraendert
60cdf0e10cSrcweir 						 SDRENDTEXTEDIT_CHANGED,   // Textobjekt wurde geaendert
61cdf0e10cSrcweir 						 SDRENDTEXTEDIT_DELETED,   // Textobjekt implizit geloescht
62cdf0e10cSrcweir 						 SDRENDTEXTEDIT_SHOULDBEDELETED}; // Fuer Writer: Textobjekt sollte geloescht werden
63cdf0e10cSrcweir 
64cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////////////////////////////////
65cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////////////////////////////////
66cdf0e10cSrcweir //
67cdf0e10cSrcweir //   @@@@  @@@@@  @@@@@@  @@@@@ @@@@@  @@ @@@@@@  @@ @@ @@ @@@@@ @@   @@
68cdf0e10cSrcweir //  @@  @@ @@  @@     @@  @@    @@  @@ @@   @@    @@ @@ @@ @@    @@   @@
69cdf0e10cSrcweir //  @@  @@ @@  @@     @@  @@    @@  @@ @@   @@    @@ @@ @@ @@    @@ @ @@
70cdf0e10cSrcweir //  @@  @@ @@@@@      @@  @@@@  @@  @@ @@   @@    @@@@@ @@ @@@@  @@@@@@@
71cdf0e10cSrcweir //  @@  @@ @@  @@     @@  @@    @@  @@ @@   @@     @@@  @@ @@    @@@@@@@
72cdf0e10cSrcweir //  @@  @@ @@  @@ @@  @@  @@    @@  @@ @@   @@     @@@  @@ @@    @@@ @@@
73cdf0e10cSrcweir //   @@@@  @@@@@   @@@@   @@@@@ @@@@@  @@   @@      @   @@ @@@@@ @@   @@
74cdf0e10cSrcweir //
75cdf0e10cSrcweir // - Allgemeines Edit fuer objektspeziefische Eigenschaften
76cdf0e10cSrcweir // - Textedit fuer alle vom SdrTextObj abgeleiteten Zeichenobjekte
77cdf0e10cSrcweir // - Macromodus
78cdf0e10cSrcweir //
79cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////////////////////////////////
80cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////////////////////////////////
81cdf0e10cSrcweir 
82cdf0e10cSrcweir class SVX_DLLPUBLIC SdrObjEditView: public SdrGlueEditView
83cdf0e10cSrcweir {
84cdf0e10cSrcweir 	friend class				SdrPageView;
85cdf0e10cSrcweir 	friend class				ImpSdrEditPara;
86cdf0e10cSrcweir 
87cdf0e10cSrcweir protected:
88cdf0e10cSrcweir 	// TextEdit
89cdf0e10cSrcweir 	SdrObjectWeakRef			mxTextEditObj;          // Aktuell im TextEdit befindliches Obj
90cdf0e10cSrcweir 	SdrPageView*				pTextEditPV;
91cdf0e10cSrcweir 	SdrOutliner*				pTextEditOutliner;     // Na eben der Outliner fuers TextEdit
92cdf0e10cSrcweir 	OutlinerView*				pTextEditOutlinerView; // die aktuelle View des Outliners
93cdf0e10cSrcweir 	Window*						pTextEditWin;          // passendes Win zu pTextEditOutlinerView
94cdf0e10cSrcweir 	Cursor*						pTextEditCursorMerker; // Zum Restaurieren des Cursors am jeweiligen Win
95cdf0e10cSrcweir 	ImpSdrEditPara*				pEditPara; // Da hau' ich erstmal alles rein um kompatibel zu bleiben...
96cdf0e10cSrcweir 	SdrObject*					pMacroObj;
97cdf0e10cSrcweir 	SdrPageView*				pMacroPV;
98cdf0e10cSrcweir 	Window*						pMacroWin;
99cdf0e10cSrcweir 
100cdf0e10cSrcweir 	Rectangle					aTextEditArea;
101cdf0e10cSrcweir 	Rectangle					aMinTextEditArea;
102cdf0e10cSrcweir 	Link						aOldCalcFieldValueLink; // Zum rufen des alten Handlers
103cdf0e10cSrcweir 	Point						aMacroDownPos;
104cdf0e10cSrcweir 
10569ffbee1SArmin Le Grand 	sal_uInt16					nMacroTol;
106cdf0e10cSrcweir 
107cdf0e10cSrcweir 	unsigned					bTextEditDontDelete : 1;   // Outliner und View bei SdrEndTextEdit nicht deleten (f. Rechtschreibpruefung)
108cdf0e10cSrcweir 	unsigned					bTextEditOnlyOneView : 1;  // Nur eine OutlinerView (f. Rechtschreibpruefung)
109cdf0e10cSrcweir 	unsigned					bTextEditNewObj : 1;       // Aktuell editiertes Objekt wurde gerade neu erzeugt
110cdf0e10cSrcweir 	unsigned					bQuickTextEditMode : 1;    // persistent(->CrtV). Default=TRUE
111cdf0e10cSrcweir 	unsigned					bMacroMode : 1;            // persistent(->CrtV). Default=TRUE
112cdf0e10cSrcweir 	unsigned					bMacroDown : 1;
113cdf0e10cSrcweir 
114cdf0e10cSrcweir 	rtl::Reference< sdr::SelectionController > mxSelectionController;
115cdf0e10cSrcweir 	rtl::Reference< sdr::SelectionController > mxLastSelectionController;
116cdf0e10cSrcweir 
117cdf0e10cSrcweir private:
11869ffbee1SArmin Le Grand     ::svl::IUndoManager* mpOldTextEditUndoManager;
11969ffbee1SArmin Le Grand 
120cdf0e10cSrcweir 	SVX_DLLPRIVATE void ImpClearVars();
121cdf0e10cSrcweir 
122cdf0e10cSrcweir protected:
1233d9b0034SArmin Le Grand     // central method to get an SdrUndoManager for enhanced TextEdit. Default will
1243d9b0034SArmin Le Grand     // try to return a dynamic_casted GetModel()->GetSdrUndoManager(). Applications
1253d9b0034SArmin Le Grand     // which want to use this feature will need to overload this virtual method,
1263d9b0034SArmin Le Grand     // provide their document UndoManager and derive it from SdrUndoManager.
1273d9b0034SArmin Le Grand     virtual SdrUndoManager* getSdrUndoManagerForEnhancedTextEdit() const;
1283d9b0034SArmin Le Grand 
129cdf0e10cSrcweir 	OutlinerView* ImpFindOutlinerView(Window* pWin) const;
130cdf0e10cSrcweir 
131cdf0e10cSrcweir 	// Eine neue OutlinerView auf dem Heap anlegen und alle erforderlichen Parameter setzen.
132cdf0e10cSrcweir 	// pTextEditObj, pTextEditPV und pTextEditOutliner muessen initiallisiert sein.
133cdf0e10cSrcweir 	OutlinerView* ImpMakeOutlinerView(Window* pWin, sal_Bool bNoPaint, OutlinerView* pGivenView) const;
134a56bd57bSArmin Le Grand 	void ImpPaintOutlinerView(OutlinerView& rOutlView, const Rectangle& rRect, OutputDevice& rTargetDevice) const;
135cdf0e10cSrcweir 	void ImpInvalidateOutlinerView(OutlinerView& rOutlView) const;
136cdf0e10cSrcweir 
137cdf0e10cSrcweir 	// Feststellen, ob der gesamte Text markiert ist. Liefert auch sal_True wenn
138cdf0e10cSrcweir 	// kein Text vorhanden ist.
139cdf0e10cSrcweir 	sal_Bool ImpIsTextEditAllSelected() const;
140cdf0e10cSrcweir 	void ImpMakeTextCursorAreaVisible();
141cdf0e10cSrcweir 
142cdf0e10cSrcweir 	// Handler fuer AutoGrowing Text bei aktivem Outliner
143cdf0e10cSrcweir 	DECL_LINK(ImpOutlinerStatusEventHdl,EditStatus*);
144cdf0e10cSrcweir 	DECL_LINK(ImpOutlinerCalcFieldValueHdl,EditFieldInfo*);
145cdf0e10cSrcweir 
14669ffbee1SArmin Le Grand     // link for EndTextEditHdl
14769ffbee1SArmin Le Grand 	DECL_LINK(EndTextEditHdl, SdrUndoManager*);
14869ffbee1SArmin Le Grand 
14969ffbee1SArmin Le Grand     void ImpMacroUp(const Point& rUpPos);
150cdf0e10cSrcweir 	void ImpMacroDown(const Point& rDownPos);
151cdf0e10cSrcweir 
152cdf0e10cSrcweir    	DECL_LINK( BeginPasteOrDropHdl, PasteOrDropInfos* );
153cdf0e10cSrcweir 	DECL_LINK( EndPasteOrDropHdl, PasteOrDropInfos* );
154cdf0e10cSrcweir 
155cdf0e10cSrcweir protected:
156cdf0e10cSrcweir 	// #i71538# make constructors of SdrView sub-components protected to avoid incomplete incarnations which may get casted to SdrView
157cdf0e10cSrcweir 	SdrObjEditView(SdrModel* pModel1, OutputDevice* pOut = 0L);
158cdf0e10cSrcweir 	virtual ~SdrObjEditView();
159cdf0e10cSrcweir 
160cdf0e10cSrcweir public:
161a56bd57bSArmin Le Grand 	////////////////////////////////////////////////////////////////////////////////////////////////////
162a56bd57bSArmin Le Grand 	// used to call the old ImpPaintOutlinerView. Will be replaced when the
163a56bd57bSArmin Le Grand 	// outliner will be displayed on the overlay in edit mode.
164a56bd57bSArmin Le Grand 	void TextEditDrawing(SdrPaintWindow& rPaintWindow) const;
165a56bd57bSArmin Le Grand 
166cdf0e10cSrcweir 	// Actionhandling fuer Macromodus
167cdf0e10cSrcweir 	virtual sal_Bool IsAction() const;
168cdf0e10cSrcweir 	virtual void MovAction(const Point& rPnt);
169cdf0e10cSrcweir 	virtual void EndAction();
170cdf0e10cSrcweir 	virtual void BrkAction();
171cdf0e10cSrcweir 	virtual void BckAction();
172cdf0e10cSrcweir 	virtual void TakeActionRect(Rectangle& rRect) const;
173cdf0e10cSrcweir 
174cdf0e10cSrcweir 	virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint);
175cdf0e10cSrcweir 	virtual void ModelHasChanged();
176cdf0e10cSrcweir 
177cdf0e10cSrcweir 	//************************************************************************
178cdf0e10cSrcweir 	// TextEdit ueber einen Outliner
179cdf0e10cSrcweir 	//************************************************************************
180cdf0e10cSrcweir 	// QuickTextEditMode bedeutet, dass Objekte mit Text sofort beim Anklicken
181cdf0e10cSrcweir 	// editiert werden sollen. Default=TRUE. Persistent.
SetQuickTextEditMode(sal_Bool bOn)182cdf0e10cSrcweir 	void SetQuickTextEditMode(sal_Bool bOn) { bQuickTextEditMode=bOn; }
IsQuickTextEditMode() const183cdf0e10cSrcweir 	sal_Bool IsQuickTextEditMode() const { return bQuickTextEditMode; }
184cdf0e10cSrcweir 
185cdf0e10cSrcweir 	// Starten des TextEditMode. Ist pWin==NULL, wird das erste an der View
186cdf0e10cSrcweir 	// angemeldete Win verwendet.
187cdf0e10cSrcweir 	// Der Cursor des Fensters an dem Editiert wird wird bei
188cdf0e10cSrcweir 	// SdrBeginTextEdit() gemerkt und bei SdrEndTextEdit() wieder restauriert.
189cdf0e10cSrcweir 	// Die App muss sicherstellen, das die zum Zeitpunkt des BegEdit am
190cdf0e10cSrcweir 	// Windows angemeldete Cursorinstanz beim SdrEndTextEdit noch gueltig ist.
191cdf0e10cSrcweir 	// Ueber den Parameter pEditOutliner kann die Applikation einen eigenen
192cdf0e10cSrcweir 	// Outliner vorgeben, der zum Editieren verwendet wird. Dieser gehoert
193cdf0e10cSrcweir 	// nach Aufruf von SdrBeginTextEdit der SdrObjEditView und wird von dieser
194cdf0e10cSrcweir 	// spaeter via delete zerstoert (falls bDontDeleteOutliner=sal_False). Die
195cdf0e10cSrcweir 	// SdrObjEditView setzt dann das Modusflag (EditEngine/Outliner) an
196cdf0e10cSrcweir 	// dieser Instanz und ausserdem auch den StatusEventHdl.
197cdf0e10cSrcweir 	// Ebenso kann eine spezifische OutlinerView vorgegeben werden.
198cdf0e10cSrcweir 
199cdf0e10cSrcweir 	virtual sal_Bool SdrBeginTextEdit(SdrObject* pObj, SdrPageView* pPV = 0L, ::Window* pWin = 0L, sal_Bool bIsNewObj = sal_False,
200cdf0e10cSrcweir 		SdrOutliner* pGivenOutliner = 0L, OutlinerView* pGivenOutlinerView = 0L,
201cdf0e10cSrcweir         sal_Bool bDontDeleteOutliner = sal_False, sal_Bool bOnlyOneView = sal_False, sal_Bool bGrabFocus = sal_True);
202cdf0e10cSrcweir 	// bDontDeleteReally ist ein Spezialparameter fuer den Writer.
203cdf0e10cSrcweir 	// Ist dieses Flag gesetzt, dann wird ein evtl. leeres Textobjekt
204cdf0e10cSrcweir 	// nicht geloescht. Stattdessen gibt es dann einen Returncode
205cdf0e10cSrcweir 	// SDRENDTEXTEDIT_SHOULDBEDELETED (anstelle von SDRENDTEXTEDIT_BEDELETED)
206cdf0e10cSrcweir 	// der besagt, dass das Objekt geloescht werden sollte.
207cdf0e10cSrcweir 	virtual SdrEndTextEditKind SdrEndTextEdit(sal_Bool bDontDeleteReally = sal_False);
208cdf0e10cSrcweir 	virtual bool IsTextEdit() const;
209cdf0e10cSrcweir 
210cdf0e10cSrcweir 	// sal_True=Es wird ein Textrahmen (OBJ_TEXT,OBJ_OUTLINETEXT,...) editiert
211cdf0e10cSrcweir 	// ansonsten handelt es sich um ein beschriftetes Zeichenobjekt, an dem
212cdf0e10cSrcweir 	// der Text ja bekanntlich hor. und vert. zentriert wird.
213cdf0e10cSrcweir 	sal_Bool IsTextEditFrame() const;
214cdf0e10cSrcweir 
215cdf0e10cSrcweir 	// Diese Methode liefert sal_True, wenn der Punkt rHit innerhalb der
216cdf0e10cSrcweir 	// des Objektbereichs oder der OutlinerView liegt.
217cdf0e10cSrcweir 	sal_Bool IsTextEditHit(const Point& rHit, short nTol) const;
218cdf0e10cSrcweir 
219cdf0e10cSrcweir 	// Diese Methode liefert sal_True, wenn der Punkt rHit innerhalb des
220cdf0e10cSrcweir 	// Handle-dicken Rahmens liegt, der die OutlinerView bei TextFrames
221cdf0e10cSrcweir 	// umschliesst.
222cdf0e10cSrcweir 	sal_Bool IsTextEditFrameHit(const Point& rHit) const;
223cdf0e10cSrcweir 
224cdf0e10cSrcweir 	// Bei aktiver Selektion, also zwischen MouseButtonDown und
225cdf0e10cSrcweir 	// MouseButtonUp liefert diese Methode immer TRUE.
226cdf0e10cSrcweir 	sal_Bool IsTextEditInSelectionMode() const;
227cdf0e10cSrcweir 
228cdf0e10cSrcweir 	// Folgende Methode addiert einen passenden Offset zum MouseEvent
229cdf0e10cSrcweir 	// um diesen an den Outliner weiterzureichen.
230cdf0e10cSrcweir 	void AddTextEditOfs(MouseEvent& rMEvt) const;
231cdf0e10cSrcweir 
232cdf0e10cSrcweir 	// Wer das z.Zt. im TextEdit befindliche Objekt braucht:
GetTextEditObject() const233cdf0e10cSrcweir 	SdrObject* GetTextEditObject() const { return mxTextEditObj.get(); }
234cdf0e10cSrcweir 
235cdf0e10cSrcweir 	// info about TextEditPageView. Default is 0L.
236cdf0e10cSrcweir 	virtual SdrPageView* GetTextEditPageView() const;
237cdf0e10cSrcweir 
238cdf0e10cSrcweir 	// Das aktuelle Win des Outliners
GetTextEditWin() const239cdf0e10cSrcweir 	Window* GetTextEditWin() const { return pTextEditWin; }
240cdf0e10cSrcweir 	void SetTextEditWin(Window* pWin);
241cdf0e10cSrcweir 
242cdf0e10cSrcweir 	// An den hier abgeholten Outliner kann man schliesslich
243cdf0e10cSrcweir 	// Events versenden, Attribute setzen, Cut/Copy/Paste rufen,
244cdf0e10cSrcweir 	// Undo/Redo rufen, etc.
GetTextEditOutliner() const245cdf0e10cSrcweir 	const SdrOutliner* GetTextEditOutliner() const { return pTextEditOutliner; }
GetTextEditOutliner()246cdf0e10cSrcweir 	SdrOutliner* GetTextEditOutliner() { return pTextEditOutliner; }
GetTextEditOutlinerView() const247cdf0e10cSrcweir 	const OutlinerView* GetTextEditOutlinerView() const { return pTextEditOutlinerView; }
GetTextEditOutlinerView()248cdf0e10cSrcweir 	OutlinerView* GetTextEditOutlinerView() { return pTextEditOutlinerView; }
249cdf0e10cSrcweir 
250cdf0e10cSrcweir 	virtual sal_Bool KeyInput(const KeyEvent& rKEvt, Window* pWin);
251cdf0e10cSrcweir 	virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt, Window* pWin);
252cdf0e10cSrcweir 	virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt, Window* pWin);
253cdf0e10cSrcweir 	virtual sal_Bool MouseMove(const MouseEvent& rMEvt, Window* pWin);
254cdf0e10cSrcweir 	virtual sal_Bool Command(const CommandEvent& rCEvt, Window* pWin);
255cdf0e10cSrcweir 	sal_Bool Cut(sal_uIntPtr nFormat=SDR_ANYFORMAT);
256cdf0e10cSrcweir 	sal_Bool Yank(sal_uIntPtr nFormat=SDR_ANYFORMAT);
257cdf0e10cSrcweir     sal_Bool Paste(Window* pWin=NULL, sal_uIntPtr nFormat=SDR_ANYFORMAT);
258cdf0e10cSrcweir 
259cdf0e10cSrcweir 	// #97766# make virtual to change implementation e.g. for SdOutlineView
260cdf0e10cSrcweir 	virtual sal_uInt16 GetScriptType() const;
261cdf0e10cSrcweir 
262cdf0e10cSrcweir 	/* new interface src537 */
263cdf0e10cSrcweir 	sal_Bool GetAttributes(SfxItemSet& rTargetSet, sal_Bool bOnlyHardAttr=sal_False) const;
264cdf0e10cSrcweir 
265cdf0e10cSrcweir 	sal_Bool SetAttributes(const SfxItemSet& rSet, sal_Bool bReplaceAll);
266cdf0e10cSrcweir 	SfxStyleSheet* GetStyleSheet() const; // SfxStyleSheet* GetStyleSheet(sal_Bool& rOk) const;
267cdf0e10cSrcweir 	sal_Bool SetStyleSheet(SfxStyleSheet* pStyleSheet, sal_Bool bDontRemoveHardAttr);
268cdf0e10cSrcweir 
269cdf0e10cSrcweir 	// Intern: Beim Splitteraufziehen neue OutlinerView...
270cdf0e10cSrcweir 	virtual void AddWindowToPaintView(OutputDevice* pNewWin);
271cdf0e10cSrcweir 	virtual void DeleteWindowFromPaintView(OutputDevice* pOldWin);
272cdf0e10cSrcweir 
273*766ce4d0SZheng Fan 	sal_uInt16 GetSelectionLevel() const;
274*766ce4d0SZheng Fan 
275*766ce4d0SZheng Fan 
276cdf0e10cSrcweir 	//************************************************************************
277cdf0e10cSrcweir 	// Object-MacroModus (z.B. Rect als Button oder sowas):
278cdf0e10cSrcweir 	//************************************************************************
279cdf0e10cSrcweir 	// Persistent. Default TRUE. SvDraw wertet das Flag u.a. bei
280cdf0e10cSrcweir 	// SdrView::GetPreferedPointer() aus. Hat nur Wirkung, wenn das Dokument
281cdf0e10cSrcweir 	// Draw-Objekte mit Macrofunktionalitaet hat (SdrObject::HasMacro()==sal_True).
SetMacroMode(sal_Bool bOn)282cdf0e10cSrcweir 	void SetMacroMode(sal_Bool bOn) { bMacroMode=bOn; }
IsMacroMode() const283cdf0e10cSrcweir 	sal_Bool IsMacroMode() const { return bMacroMode; }
284cdf0e10cSrcweir 	sal_Bool BegMacroObj(const Point& rPnt, short nTol, SdrObject* pObj, SdrPageView* pPV, Window* pWin);
BegMacroObj(const Point & rPnt,SdrObject * pObj,SdrPageView * pPV,Window * pWin)285cdf0e10cSrcweir 	sal_Bool BegMacroObj(const Point& rPnt, SdrObject* pObj, SdrPageView* pPV, Window* pWin) { return BegMacroObj(rPnt,-2,pObj,pPV,pWin); }
286cdf0e10cSrcweir 	void MovMacroObj(const Point& rPnt);
287cdf0e10cSrcweir 	void BrkMacroObj();
288cdf0e10cSrcweir 	sal_Bool EndMacroObj();
IsMacroObj() const289cdf0e10cSrcweir 	sal_Bool IsMacroObj() const { return pMacroObj!=NULL; }
IsMacroObjDown() const290cdf0e10cSrcweir 	sal_Bool IsMacroObjDown() const { return bMacroDown; }
291cdf0e10cSrcweir 
292cdf0e10cSrcweir 	/** fills the given any with a XTextCursor for the current text selection.
293cdf0e10cSrcweir 		Leaves the any untouched if there currently is no text selected */
294cdf0e10cSrcweir 	void getTextSelection( ::com::sun::star::uno::Any& rSelection );
295cdf0e10cSrcweir 
296cdf0e10cSrcweir     virtual void MarkListHasChanged();
297cdf0e10cSrcweir 
getSelectionController() const298cdf0e10cSrcweir 	rtl::Reference< sdr::SelectionController > getSelectionController() const { return mxSelectionController; }
299cdf0e10cSrcweir 
300cdf0e10cSrcweir     /** returns true if the shape identified by its inventor and identifier supports format paint brush operation */
301cdf0e10cSrcweir     virtual bool SupportsFormatPaintbrush( sal_uInt32 nObjectInventor, sal_uInt16 nObjectIdentifier ) const;
302cdf0e10cSrcweir 
303cdf0e10cSrcweir 	/** returns a format paint brush set from the current selection */
304cdf0e10cSrcweir 	virtual bool TakeFormatPaintBrush( boost::shared_ptr< SfxItemSet >& rFormatSet  );
305cdf0e10cSrcweir 
306cdf0e10cSrcweir 	/** applies a format paint brush set from the current selection.
307cdf0e10cSrcweir 	    if bNoCharacterFormats is true, no character attributes are changed.
308cdf0e10cSrcweir 	    if bNoParagraphFormats is true, no paragraph attributes are changed.
309cdf0e10cSrcweir 	*/
310cdf0e10cSrcweir 	virtual void ApplyFormatPaintBrush( SfxItemSet& rFormatSet, bool bNoCharacterFormats, bool bNoParagraphFormats );
311cdf0e10cSrcweir 
312cdf0e10cSrcweir     /** helper function for selections with multiple SdrText for one SdrTextObj (f.e. tables ) */
313cdf0e10cSrcweir     void ApplyFormatPaintBrushToText( SfxItemSet& rFormatSet, SdrTextObj& rTextObj, SdrText* pText, bool bNoCharacterFormats, bool bNoParagraphFormats );
314cdf0e10cSrcweir 
315cdf0e10cSrcweir protected:
316cdf0e10cSrcweir     virtual void OnBeginPasteOrDrop( PasteOrDropInfos* pInfos );
317cdf0e10cSrcweir     virtual void OnEndPasteOrDrop( PasteOrDropInfos* pInfos );
318cdf0e10cSrcweir 
319cdf0e10cSrcweir };
320cdf0e10cSrcweir 
321cdf0e10cSrcweir #endif //_SVDEDXV_HXX
322cdf0e10cSrcweir 
323