update dev300-m58
[ooovba.git] / sw / source / core / inc / dview.hxx
blobf566a1c2181da6d3e9f6b2b3ed11705e734e43a9
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: dview.hxx,v $
10 * $Revision: 1.9 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _DVIEW_HXX
31 #define _DVIEW_HXX
34 #include <svx/fmview.hxx>
36 class OutputDevice;
37 class SwViewImp;
38 class SwFrm;
39 class SwFlyFrm;
40 class SwAnchoredObject;
42 class SwDrawView : public FmFormView
44 //Fuer den Anker
45 Point aAnchorPoint; //Ankerposition
46 SwViewImp &rImp; //Die View gehoert immer zu einer Shell
48 const SwFrm *CalcAnchor();
50 /** determine maximal order number for a 'child' object of given 'parent' object
52 OD 2004-08-20 #110810#
53 The maximal order number will be determined on the current object
54 order hierarchy. It's the order number of the 'child' object with the
55 highest order number. The calculation can be influenced by parameter
56 <_pExclChildObj> - this 'child' object won't be considered.
58 @param <_rParentObj>
59 input parameter - 'parent' object, for which the maximal order number
60 for its 'childs' will be determined.
62 @param <_pExclChildObj>
63 optional input parameter - 'child' object, which will not be considered
64 on the calculation of the maximal order number
66 @author OD
68 sal_uInt32 _GetMaxChildOrdNum( const SwFlyFrm& _rParentObj,
69 const SdrObject* _pExclChildObj = 0L ) const;
71 /** method to move 'repeated' objects of the given moved object to the
72 according level
74 OD 2004-08-23 #110810#
76 @param <_rMovedAnchoredObj>
77 input parameter - moved object, for which the 'repeated' ones have also
78 to be moved.
80 @param <_rMovedChildsObjs>
81 input parameter - data collection of moved 'child' objects - the 'repeated'
82 ones of these 'childs' will also been moved.
84 @author OD
86 void _MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj,
87 const std::vector<SdrObject*>& _rMovedChildObjs ) const;
89 protected:
90 // add custom handles (used by other apps, e.g. AnchorPos)
91 virtual void AddCustomHdl();
93 // overloaded to allow extra handling when picking SwVirtFlyDrawObj's
94 using FmFormView::CheckSingleSdrObjectHit;
95 virtual SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, USHORT nTol, SdrObject* pObj, SdrPageView* pPV, ULONG nOptions, const SetOfByte* pMVisLay) const;
97 public:
98 SwDrawView( SwViewImp &rI, SdrModel *pMd, OutputDevice* pOutDev=NULL );
100 //aus der Basisklasse
101 virtual SdrObject* GetMaxToTopObj(SdrObject* pObj) const;
102 virtual SdrObject* GetMaxToBtmObj(SdrObject* pObj) const;
103 virtual void MarkListHasChanged();
105 // #i7672#
106 // Overload to resue edit background color in active text edit view (OutlinerView)
107 virtual void ModelHasChanged();
109 virtual void ObjOrderChanged( SdrObject* pObj, ULONG nOldPos,
110 ULONG nNewPos );
111 virtual BOOL TakeDragLimit(SdrDragMode eMode, Rectangle& rRect) const;
112 virtual void MakeVisible( const Rectangle&, Window &rWin );
113 virtual void CheckPossibilities();
115 const SwViewImp &Imp() const { return rImp; }
116 SwViewImp &Imp() { return rImp; }
118 //Anker und Xor fuer das Draggen.
119 void ShowDragAnchor();
121 virtual void DeleteMarked();
123 //JP 06.10.98: 2. Versuch
124 inline void ValidateMarkList() { FlushComeBackTimer(); }
126 // --> OD 2009-03-05 #i99665#
127 sal_Bool IsAntiAliasing() const;
128 // <--
130 // OD 18.06.2003 #108784# - method to replace marked/selected <SwDrawVirtObj>
131 // by its reference object for delete of selection and group selection
132 static void ReplaceMarkedDrawVirtObjs( SdrMarkView& _rMarkView );
136 #endif