xref: /trunk/main/sw/source/core/inc/dview.hxx (revision 1d2dbeb0)
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 _DVIEW_HXX
24 #define	_DVIEW_HXX
25 
26 
27 #include <svx/fmview.hxx>
28 
29 class OutputDevice;
30 class SwViewImp;
31 class SwFrm;
32 class SwFlyFrm;
33 class SwAnchoredObject;
34 
35 class SwDrawView : public FmFormView
36 {
37 	//Fuer den Anker
38 	Point			aAnchorPoint;		//Ankerposition
39 	SwViewImp	   &rImp;				//Die View gehoert immer zu einer Shell
40 
41 	const SwFrm *CalcAnchor();
42 
43     /** determine maximal order number for a 'child' object of given 'parent' object
44 
45         OD 2004-08-20 #110810#
46         The maximal order number will be determined on the current object
47         order hierarchy. It's the order number of the 'child' object with the
48         highest order number. The calculation can be influenced by parameter
49         <_pExclChildObj> - this 'child' object won't be considered.
50 
51         @param <_rParentObj>
52         input parameter - 'parent' object, for which the maximal order number
53         for its 'childs' will be determined.
54 
55         @param <_pExclChildObj>
56         optional input parameter - 'child' object, which will not be considered
57         on the calculation of the maximal order number
58 
59         @author OD
60     */
61     sal_uInt32 _GetMaxChildOrdNum( const SwFlyFrm& _rParentObj,
62                                    const SdrObject* _pExclChildObj = 0L ) const;
63 
64     /** method to move 'repeated' objects of the given moved object to the
65         according level
66 
67         OD 2004-08-23 #110810#
68 
69         @param <_rMovedAnchoredObj>
70         input parameter - moved object, for which the 'repeated' ones have also
71         to be moved.
72 
73         @param <_rMovedChildsObjs>
74         input parameter - data collection of moved 'child' objects - the 'repeated'
75         ones of these 'childs' will also been moved.
76 
77         @author OD
78     */
79     void _MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj,
80                             const std::vector<SdrObject*>& _rMovedChildObjs ) const;
81 
82 protected:
83 	// add custom handles (used by other apps, e.g. AnchorPos)
84     virtual void AddCustomHdl();
85 
86     // overloaded to allow extra handling when picking SwVirtFlyDrawObj's
87     using FmFormView::CheckSingleSdrObjectHit;
88     virtual SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObject* pObj, SdrPageView* pPV, sal_uLong nOptions, const SetOfByte* pMVisLay) const;
89 
90 public:
91 	SwDrawView( SwViewImp &rI, SdrModel *pMd, OutputDevice* pOutDev=NULL );
92 
93 	//aus der Basisklasse
94     virtual SdrObject*   GetMaxToTopObj(SdrObject* pObj) const;
95     virtual SdrObject*   GetMaxToBtmObj(SdrObject* pObj) const;
96 	virtual void         MarkListHasChanged();
97 
98 	// #i7672#
99 	// Overload to resue edit background color in active text edit view (OutlinerView)
100 	virtual void ModelHasChanged();
101 
102 	virtual void 	     ObjOrderChanged( SdrObject* pObj, sal_uLong nOldPos,
103 											sal_uLong nNewPos );
104     virtual sal_Bool TakeDragLimit(SdrDragMode eMode, Rectangle& rRect) const;
105 	virtual void MakeVisible( const Rectangle&, Window &rWin );
106 	virtual void CheckPossibilities();
107 
108 	const SwViewImp &Imp() const { return rImp; }
109 		  SwViewImp &Imp()		 { return rImp; }
110 
111 	//Anker und Xor fuer das Draggen.
112 	void ShowDragAnchor();
113 
114 	virtual void DeleteMarked();
115 
116 	//JP 06.10.98: 2. Versuch
117 	inline void ValidateMarkList() { FlushComeBackTimer(); }
118 
119     // --> OD 2009-03-05 #i99665#
120     sal_Bool IsAntiAliasing() const;
121     // <--
122 
123     // OD 18.06.2003 #108784# - method to replace marked/selected <SwDrawVirtObj>
124     // by its reference object for delete of selection and group selection
125     static void ReplaceMarkedDrawVirtObjs( SdrMarkView& _rMarkView );
126 };
127 
128 
129 #endif
130 
131