xref: /aoo41x/main/sw/source/core/inc/dview.hxx (revision 8218eba2)
11d2dbeb0SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
31d2dbeb0SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
41d2dbeb0SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
51d2dbeb0SAndrew Rist  * distributed with this work for additional information
61d2dbeb0SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
71d2dbeb0SAndrew Rist  * to you under the Apache License, Version 2.0 (the
81d2dbeb0SAndrew Rist  * "License"); you may not use this file except in compliance
91d2dbeb0SAndrew Rist  * with the License.  You may obtain a copy of the License at
101d2dbeb0SAndrew Rist  *
111d2dbeb0SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
121d2dbeb0SAndrew Rist  *
131d2dbeb0SAndrew Rist  * Unless required by applicable law or agreed to in writing,
141d2dbeb0SAndrew Rist  * software distributed under the License is distributed on an
151d2dbeb0SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
161d2dbeb0SAndrew Rist  * KIND, either express or implied.  See the License for the
171d2dbeb0SAndrew Rist  * specific language governing permissions and limitations
181d2dbeb0SAndrew Rist  * under the License.
191d2dbeb0SAndrew Rist  *
201d2dbeb0SAndrew Rist  *************************************************************/
211d2dbeb0SAndrew Rist 
221d2dbeb0SAndrew Rist 
23cdf0e10cSrcweir #ifndef _DVIEW_HXX
24cdf0e10cSrcweir #define	_DVIEW_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <svx/fmview.hxx>
28cdf0e10cSrcweir 
29cdf0e10cSrcweir class OutputDevice;
30cdf0e10cSrcweir class SwViewImp;
31cdf0e10cSrcweir class SwFrm;
32cdf0e10cSrcweir class SwFlyFrm;
33cdf0e10cSrcweir class SwAnchoredObject;
34*8218eba2SArmin Le Grand class SdrUndoManager;
35cdf0e10cSrcweir 
36cdf0e10cSrcweir class SwDrawView : public FmFormView
37cdf0e10cSrcweir {
38cdf0e10cSrcweir 	//Fuer den Anker
39cdf0e10cSrcweir 	Point			aAnchorPoint;		//Ankerposition
40cdf0e10cSrcweir 	SwViewImp	   &rImp;				//Die View gehoert immer zu einer Shell
41cdf0e10cSrcweir 
42cdf0e10cSrcweir 	const SwFrm *CalcAnchor();
43cdf0e10cSrcweir 
44cdf0e10cSrcweir     /** determine maximal order number for a 'child' object of given 'parent' object
45cdf0e10cSrcweir 
46cdf0e10cSrcweir         OD 2004-08-20 #110810#
47cdf0e10cSrcweir         The maximal order number will be determined on the current object
48cdf0e10cSrcweir         order hierarchy. It's the order number of the 'child' object with the
49cdf0e10cSrcweir         highest order number. The calculation can be influenced by parameter
50cdf0e10cSrcweir         <_pExclChildObj> - this 'child' object won't be considered.
51cdf0e10cSrcweir 
52cdf0e10cSrcweir         @param <_rParentObj>
53cdf0e10cSrcweir         input parameter - 'parent' object, for which the maximal order number
54cdf0e10cSrcweir         for its 'childs' will be determined.
55cdf0e10cSrcweir 
56cdf0e10cSrcweir         @param <_pExclChildObj>
57cdf0e10cSrcweir         optional input parameter - 'child' object, which will not be considered
58cdf0e10cSrcweir         on the calculation of the maximal order number
59cdf0e10cSrcweir 
60cdf0e10cSrcweir         @author OD
61cdf0e10cSrcweir     */
62cdf0e10cSrcweir     sal_uInt32 _GetMaxChildOrdNum( const SwFlyFrm& _rParentObj,
63cdf0e10cSrcweir                                    const SdrObject* _pExclChildObj = 0L ) const;
64cdf0e10cSrcweir 
65cdf0e10cSrcweir     /** method to move 'repeated' objects of the given moved object to the
66cdf0e10cSrcweir         according level
67cdf0e10cSrcweir 
68cdf0e10cSrcweir         OD 2004-08-23 #110810#
69cdf0e10cSrcweir 
70cdf0e10cSrcweir         @param <_rMovedAnchoredObj>
71cdf0e10cSrcweir         input parameter - moved object, for which the 'repeated' ones have also
72cdf0e10cSrcweir         to be moved.
73cdf0e10cSrcweir 
74cdf0e10cSrcweir         @param <_rMovedChildsObjs>
75cdf0e10cSrcweir         input parameter - data collection of moved 'child' objects - the 'repeated'
76cdf0e10cSrcweir         ones of these 'childs' will also been moved.
77cdf0e10cSrcweir 
78cdf0e10cSrcweir         @author OD
79cdf0e10cSrcweir     */
80cdf0e10cSrcweir     void _MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj,
81cdf0e10cSrcweir                             const std::vector<SdrObject*>& _rMovedChildObjs ) const;
82cdf0e10cSrcweir 
83cdf0e10cSrcweir protected:
84cdf0e10cSrcweir 	// add custom handles (used by other apps, e.g. AnchorPos)
85cdf0e10cSrcweir     virtual void AddCustomHdl();
86cdf0e10cSrcweir 
87cdf0e10cSrcweir     // overloaded to allow extra handling when picking SwVirtFlyDrawObj's
88cdf0e10cSrcweir     using FmFormView::CheckSingleSdrObjectHit;
89cdf0e10cSrcweir     virtual SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObject* pObj, SdrPageView* pPV, sal_uLong nOptions, const SetOfByte* pMVisLay) const;
90cdf0e10cSrcweir 
91*8218eba2SArmin Le Grand     // support enhanced text edit for draw objects
92*8218eba2SArmin Le Grand     virtual SdrUndoManager* getSdrUndoManagerForEnhancedTextEdit() const;
93*8218eba2SArmin Le Grand 
94cdf0e10cSrcweir public:
95cdf0e10cSrcweir 	SwDrawView( SwViewImp &rI, SdrModel *pMd, OutputDevice* pOutDev=NULL );
96cdf0e10cSrcweir 
97cdf0e10cSrcweir 	//aus der Basisklasse
98cdf0e10cSrcweir     virtual SdrObject*   GetMaxToTopObj(SdrObject* pObj) const;
99cdf0e10cSrcweir     virtual SdrObject*   GetMaxToBtmObj(SdrObject* pObj) const;
100cdf0e10cSrcweir 	virtual void         MarkListHasChanged();
101cdf0e10cSrcweir 
102cdf0e10cSrcweir 	// #i7672#
103cdf0e10cSrcweir 	// Overload to resue edit background color in active text edit view (OutlinerView)
104cdf0e10cSrcweir 	virtual void ModelHasChanged();
105cdf0e10cSrcweir 
106cdf0e10cSrcweir 	virtual void 	     ObjOrderChanged( SdrObject* pObj, sal_uLong nOldPos,
107cdf0e10cSrcweir 											sal_uLong nNewPos );
108cdf0e10cSrcweir     virtual sal_Bool TakeDragLimit(SdrDragMode eMode, Rectangle& rRect) const;
109cdf0e10cSrcweir 	virtual void MakeVisible( const Rectangle&, Window &rWin );
110cdf0e10cSrcweir 	virtual void CheckPossibilities();
111cdf0e10cSrcweir 
Imp() const112cdf0e10cSrcweir 	const SwViewImp &Imp() const { return rImp; }
Imp()113cdf0e10cSrcweir 		  SwViewImp &Imp()		 { return rImp; }
114cdf0e10cSrcweir 
115cdf0e10cSrcweir 	//Anker und Xor fuer das Draggen.
116cdf0e10cSrcweir 	void ShowDragAnchor();
117cdf0e10cSrcweir 
118cdf0e10cSrcweir 	virtual void DeleteMarked();
119cdf0e10cSrcweir 
120cdf0e10cSrcweir 	//JP 06.10.98: 2. Versuch
ValidateMarkList()121cdf0e10cSrcweir 	inline void ValidateMarkList() { FlushComeBackTimer(); }
122cdf0e10cSrcweir 
123cdf0e10cSrcweir     // --> OD 2009-03-05 #i99665#
124cdf0e10cSrcweir     sal_Bool IsAntiAliasing() const;
125cdf0e10cSrcweir     // <--
126cdf0e10cSrcweir 
127cdf0e10cSrcweir     // OD 18.06.2003 #108784# - method to replace marked/selected <SwDrawVirtObj>
128cdf0e10cSrcweir     // by its reference object for delete of selection and group selection
129cdf0e10cSrcweir     static void ReplaceMarkedDrawVirtObjs( SdrMarkView& _rMarkView );
130cdf0e10cSrcweir };
131cdf0e10cSrcweir 
132cdf0e10cSrcweir 
133cdf0e10cSrcweir #endif
134cdf0e10cSrcweir 
135