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