1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
22 #include <svx/svdmark.hxx>
23 #include <svx/svdhdl.hxx>
24 #include <svx/svdsnpv.hxx>
25 #include <svx/svdtypes.hxx>
26 #include <svx/svxdllapi.h>
27 #include <o3tl/typed_flags_set.hxx>
28 #include <basegfx/range/b2drectangle.hxx>
29 #include <unotools/resmgr.hxx>
33 // The following is not yet implemented, or just partially:
34 enum class SdrSearchOptions
37 DEEP
= 0x0001, /* recursive into group objects */
38 ALSOONMASTER
= 0x0002, /* MasterPages are also scanned */
39 WHOLEPAGE
= 0x0004, /* Not just the ObjList of PageView */
40 TESTMARKABLE
= 0x0008, /* just markable objects/points/handles/... */
41 TESTMACRO
= 0x0010, /* Just objects with macro */
42 TESTTEXTEDIT
= 0x0020, /* Just TextEdit-enabled objects */
43 MARKED
= 0x0040, /* Just marked objects/points/... */
44 PASS2BOUND
= 0x0080, /* In case of empty search results, then 2nd. try with BoundRectHit */
45 BEFOREMARK
= 0x0100, /* if one marked one found, ignore all behind that */
47 IMPISMASTER
= 0x0200, /* MasterPage is being searched right now */
48 PICKMARKABLE
= TESTMARKABLE
,
49 PICKTEXTEDIT
= DEEP
| TESTMARKABLE
| TESTTEXTEDIT
,
50 PICKMACRO
= DEEP
| ALSOONMASTER
| WHOLEPAGE
| TESTMACRO
,
54 template<> struct typed_flags
<SdrSearchOptions
> : is_typed_flags
<SdrSearchOptions
, 0x03ff> {};
61 Handle
, // Marking handle
62 HelpLine
, // Reference line
63 Gluepoint
, // Gluepoint
64 TextEdit
, // Open OutlinerView was hit
65 TextEditObj
, // Object for SdrBeginTextEdit (Textbereich)
66 UrlField
, // Field in TextObj was hit (while it is currently not edited)
67 Macro
, // Object for BegMacroObj
68 MarkedObject
, // Marked object (e.g. for dragging)
69 UnmarkedObject
, // non-marked Object (e.g. for marking)
70 Cell
// hit on a cell inside a table shape (outside of the cells text area)
73 enum class SdrViewEditMode
{
74 Edit
, // Also known as arrow or pointer mode
75 Create
, // Tool for object creation
76 GluePointEdit
// Gluepoint editing mode
79 /** options for ImpGetDescriptionString() */
80 enum class ImpGetDescriptionOptions
87 class ImplMarkingOverlay
;
88 class MarkingSelectionOverlay
;
89 class MarkingSubSelectionOverlay
;
91 class SVXCORE_DLLPUBLIC SdrMarkView
: public SdrSnapView
93 friend class SdrPageView
;
95 // #114409#-3 Migrate selections
96 std::unique_ptr
<ImplMarkingOverlay
> mpMarkObjOverlay
;
97 std::unique_ptr
<ImplMarkingOverlay
> mpMarkPointsOverlay
;
98 std::unique_ptr
<ImplMarkingOverlay
> mpMarkGluePointsOverlay
;
100 std::unique_ptr
<MarkingSelectionOverlay
> mpMarkingSelectionOverlay
;
101 std::unique_ptr
<MarkingSubSelectionOverlay
> mpMarkingSubSelectionOverlay
;
104 SdrObject
* mpMarkedObj
; // If not just one object ( i.e. More than one object ) is marked.
105 SdrPageView
* mpMarkedPV
; // If all marked objects are situated on the same PageView.
107 Point maRef1
; // Persistent - Rotation center / axis of reflection
108 Point maRef2
; // Persistent
109 SdrHdlList maHdlList
;
111 sdr::ViewSelection maSdrViewSelection
;
113 std::vector
<basegfx::B2DRectangle
> maSubSelectionList
;
114 tools::Rectangle maMarkedObjRect
;
115 tools::Rectangle maMarkedPointsRect
;
116 tools::Rectangle maMarkedGluePointsRect
;
118 static constexpr sal_uInt16 mnFrameHandlesLimit
= 50;
120 SdrDragMode meDragMode
; // Persistent
121 SdrViewEditMode meEditMode
; // Persistent
122 SdrViewEditMode meEditMode0
; // Persistent
124 bool mbDesignMode
: 1; // DesignMode for SdrUnoObj
125 bool mbForceFrameHandles
: 1; // Persistent - FrameDrag also for single objects
126 bool mbPlusHdlAlways
: 1; // Persistent
127 bool mbInsPolyPoint
: 1; // at this time InsPolyPointDragging
128 bool mbMarkedObjRectDirty
: 1;
129 bool mbMrkPntDirty
: 1;
130 bool mbMarkedPointsRectsDirty
: 1;
132 // flag to completely disable handles at the view
133 bool mbMarkHandlesHidden
: 1;
135 // flag indicating whether all x coordinates are negated or not
136 bool mbNegativeX
: 1;
138 // Helper to get a possible GridOffset from SdrObject
139 SAL_DLLPRIVATE
bool getPossibleGridOffsetForSdrObject(
140 basegfx::B2DVector
& rOffset
,
141 const SdrObject
* pObj
,
142 const SdrPageView
* pPV
) const;
144 // Helper to get a possible GridOffset from Position
145 SAL_DLLPRIVATE
bool getPossibleGridOffsetForPosition(
146 basegfx::B2DVector
& rOffset
,
147 const basegfx::B2DPoint
& rPoint
,
148 const SdrPageView
* pPV
) const;
151 SVX_DLLPRIVATE
void ImpSetPointsRects() const;
152 void UndirtyMrkPnt() const;
154 SAL_DLLPRIVATE
void SetMarkHandlesForLOKit(tools::Rectangle
const & rRect
, const SfxViewShell
* pOtherShell
);
155 SAL_DLLPRIVATE OString
CreateInnerTextRectString() const;
156 SAL_DLLPRIVATE
bool dumpGluePointsToJSON(boost::property_tree::ptree
& rTree
);
159 SAL_DLLPRIVATE
virtual void Notify(SfxBroadcaster
& rBC
, const SfxHint
& rHint
) override
;
160 SAL_DLLPRIVATE
virtual void ModelHasChanged() override
; // Is called by the PaintView
161 SAL_DLLPRIVATE
virtual void SetMarkHandles(SfxViewShell
* pOtherShell
); // maHdlList - fill (List of handles)
162 SAL_DLLPRIVATE
void modelHasChangedLOKit();
163 SAL_DLLPRIVATE
void SetMarkRects(); // Rects at the PageViews
164 void CheckMarked(); // Scan MarkList after Del and Lock Layer ...
165 SAL_DLLPRIVATE
void AddDragModeHdl(SdrDragMode eMode
);
166 SAL_DLLPRIVATE
virtual bool MouseMove(const MouseEvent
& rMEvt
, OutputDevice
* pWin
) override
;
167 virtual bool RequestHelp(const HelpEvent
& rHEvt
) override
;
169 // add custom handles (used by other apps, e.g. AnchorPos)
170 virtual void AddCustomHdl();
172 SAL_DLLPRIVATE
void ForceRefToMarked();
173 void ForceUndirtyMrkPnt() const { if (mbMrkPntDirty
) UndirtyMrkPnt(); }
175 virtual SdrObject
* CheckSingleSdrObjectHit(const Point
& rPnt
, sal_uInt16 nTol
, SdrObject
* pObj
, SdrPageView
* pPV
, SdrSearchOptions nOptions
, const SdrLayerIDSet
* pMVisLay
) const;
176 SAL_DLLPRIVATE SdrObject
* CheckSingleSdrObjectHit(const Point
& rPnt
, sal_uInt16 nTol
, SdrObjList
const * pOL
, SdrPageView
* pPV
, SdrSearchOptions nOptions
, const SdrLayerIDSet
* pMVisLay
, SdrObject
*& rpRootObj
) const;
177 SAL_DLLPRIVATE SdrObject
* CheckSingleSdrObjectHit(const Point
& rPnt
, sal_uInt16 nTol
, SdrObjList
const * pOL
, SdrPageView
* pPV
, SdrSearchOptions nOptions
, const SdrLayerIDSet
* pMVisLay
, SdrObject
*& rpRootObj
,const SdrMarkList
* pMarkList
) const;
178 SAL_DLLPRIVATE
bool ImpIsFrameHandles() const;
179 SAL_DLLPRIVATE OUString
ImpGetDescriptionString(TranslateId pStrCacheID
, ImpGetDescriptionOptions nOpt
=ImpGetDescriptionOptions::NONE
) const;
181 // Generates a string including degrees symbol, from an angel specification in 1/100deg
182 SAL_DLLPRIVATE
bool ImpMarkPoint(SdrHdl
* pHdl
, SdrMark
* pMark
, bool bUnmark
);
183 virtual bool MarkPoints(const tools::Rectangle
* pRect
, bool bUnmark
);
184 bool MarkGluePoints(const tools::Rectangle
* pRect
, bool bUnmark
);
186 SAL_DLLPRIVATE
void SetMoveOutside(bool bOn
);
187 bool MarkableObjectsExceed( int n
) const;
190 // #i71538# make constructors of SdrView sub-components protected to avoid incomplete incarnations which may get casted to SdrView
191 SAL_DLLPRIVATE
SdrMarkView(
195 SAL_DLLPRIVATE
virtual ~SdrMarkView() override
;
198 SAL_DLLPRIVATE
virtual bool IsAction() const override
;
199 SAL_DLLPRIVATE
virtual void MovAction(const Point
& rPnt
) override
;
200 SAL_DLLPRIVATE
virtual void EndAction() override
;
201 SAL_DLLPRIVATE
virtual void BckAction() override
;
202 SAL_DLLPRIVATE
virtual void BrkAction() override
;
203 SAL_DLLPRIVATE
virtual void TakeActionRect(tools::Rectangle
& rRect
) const override
;
205 virtual void ClearPageView() override
;
206 SAL_DLLPRIVATE
virtual void HideSdrPage() override
;
207 bool IsObjMarkable(SdrObject
const * pObj
, SdrPageView
const * pPV
) const;
209 // Returns sal_True if objects, points or gluepoints are selected by drawing a frame
210 // (as long as the frame is drawn).
211 bool IsMarking() const { return IsMarkObj() || IsMarkPoints() || IsMarkGluePoints(); }
213 // Marking objects by drawing of a selection frame
214 void BegMarkObj(const Point
& rPnt
, bool bUnmark
= false);
215 SAL_DLLPRIVATE
void MovMarkObj(const Point
& rPnt
);
217 SAL_DLLPRIVATE
void BrkMarkObj();
218 bool IsMarkObj() const { return (nullptr != mpMarkObjOverlay
); }
220 // DragModes: SDRDRAG_CREATE,SdrDragMode::Move,SdrDragMode::Resize,SdrDragMode::Rotate,SdrDragMode::Mirror,SdrDragMode::Shear,SdrDragMode::Crook
222 // The interface might maybe be changed in the future because of Ortho-Drag
223 void SetDragMode(SdrDragMode eMode
);
224 SdrDragMode
GetDragMode() const { return meDragMode
; }
225 void SetFrameHandles(bool bOn
);
226 bool IsFrameHandles() const { return mbForceFrameHandles
; }
228 // returns true if number of markable objects is greater than 1
229 bool HasMultipleMarkableObjects() const { return MarkableObjectsExceed(1); };
231 void SetEditMode(SdrViewEditMode eMode
);
232 SdrViewEditMode
GetEditMode() const { return meEditMode
; }
234 void SetEditMode(bool bOn
) { SetEditMode(bOn
?SdrViewEditMode::Edit
:SdrViewEditMode::Create
); }
235 bool IsEditMode() const { return meEditMode
==SdrViewEditMode::Edit
; }
236 void SetCreateMode(bool bOn
) { SetEditMode(bOn
?SdrViewEditMode::Create
:SdrViewEditMode::Edit
); }
237 bool IsCreateMode() const { return meEditMode
==SdrViewEditMode::Create
; }
238 void SetGluePointEditMode(bool bOn
) { SetEditMode(bOn
?SdrViewEditMode::GluePointEdit
:meEditMode0
); }
239 bool IsGluePointEditMode() const { return meEditMode
==SdrViewEditMode::GluePointEdit
; }
241 void SetDesignMode(bool bOn
= true);
242 bool IsDesignMode() const { return mbDesignMode
; }
244 void SetFrameDragSingles(bool bOn
=true) { SetFrameHandles(bOn
); }
245 bool IsFrameDragSingles() const { return IsFrameHandles(); }
247 bool HasMarkableObj() const { return MarkableObjectsExceed(0); };
249 /// whether all x coordinates in use are negated or not
250 void SetNegativeX(bool bOn
) { mbNegativeX
= bOn
; }
251 bool IsNegativeX() const { return mbNegativeX
; }
252 SAL_DLLPRIVATE
void SetInnerTextAreaForLOKit() const;
254 // migrate selections
257 // all available changing methods
258 SdrMarkList
& GetMarkedObjectListWriteAccess() { return maSdrViewSelection
.GetMarkedObjectListWriteAccess(); }
261 // all available const methods for read access to selection
262 const SdrMarkList
& GetMarkedObjectList() const { return maSdrViewSelection
.GetMarkedObjectList(); }
264 // Get a list of all those links which are connected to marked nodes,
265 // but which are not marked themselves.
266 const SdrMarkList
& GetEdgesOfMarkedNodes() const { return maSdrViewSelection
.GetEdgesOfMarkedNodes(); }
267 const SdrMarkList
& GetMarkedEdgesOfMarkedNodes() const { return maSdrViewSelection
.GetMarkedEdgesOfMarkedNodes(); }
268 const std::vector
<SdrObject
*>& GetTransitiveHullOfMarkedObjects() const { return maSdrViewSelection
.GetAllMarkedObjects(); }
271 // mechanism to complete disable handles at the view. Handles will be hidden and deleted
272 // when set, no new ones created, no interaction allowed. Handles will be recreated and shown
273 // when reset. Default is false.
274 void hideMarkHandles();
275 void showMarkHandles();
276 bool areMarkHandlesHidden() const { return mbMarkHandlesHidden
; }
278 bool IsMarkedHit(const Point
& rPnt
, short nTol
=-2) const { return IsMarkedObjHit(rPnt
,nTol
); }
279 bool IsMarkedObjHit(const Point
& rPnt
, short nTol
=-2) const;
281 SdrHdl
* PickHandle(const Point
& rPnt
) const;
283 // Pick: Supported options for nOptions are:
284 // SdrSearchOptions::DEEP SdrSearchOptions::ALSOONMASTER SdrSearchOptions::TESTMARKABLE SdrSearchOptions::TESTTEXTEDIT
285 // SdrSearchOptions::MARKED
286 // SdrSearchOptions::WHOLEPAGE
287 SAL_DLLPRIVATE SdrObject
* PickObj(const Point
& rPnt
, short nTol
, SdrPageView
*& rpPV
, SdrSearchOptions nOptions
, SdrObject
** ppRootObj
, bool* pbHitPassDirect
=nullptr) const;
288 SdrObject
* PickObj(const Point
& rPnt
, short nTol
, SdrPageView
*& rpPV
, SdrSearchOptions nOptions
=SdrSearchOptions::NONE
) const;
289 bool MarkObj(const Point
& rPnt
, short nTol
=-2, bool bToggle
=false, bool bDeep
=false);
291 // Pick: Supported options for nOptions are SdrSearchOptions::PASS2BOUND
292 SAL_DLLPRIVATE
bool PickMarkedObj(const Point
& rPnt
, SdrObject
*& rpObj
, SdrPageView
*& rpPV
, SdrSearchOptions nOptions
) const;
294 // Selects the most upper of the marked objects (O1) and scans from there
295 // towards bottom direction, selecting the first non-marked object (O2).
296 // In case of success the marking of O1 is deleted, a marking is created at
297 // O2 and TRUE is returned. With the parameter bPrev=sal_True the scan
298 // direction is turned to the other direction.
299 bool MarkNextObj(bool bPrev
=false);
301 // Selects the most upper of the marked objects which is hit by rPnt/nTol
302 // and scans from there to bottom direction, selecting the first non-marked
303 // object (O2). In case of success the marking of O1 is deleted, a marking
304 // is created at O2 and sal_True is returned. With the parameter
305 // bPrev=sal_True the scan direction is turned to the other direction.
306 bool MarkNextObj(const Point
& rPnt
, short nTol
, bool bPrev
);
308 // Mark all objects within a rectangular area
309 // Just objects are marked which are inclosed completely
310 void MarkObj(const tools::Rectangle
& rRect
, bool bUnmark
);
311 void MarkObj(SdrObject
* pObj
, SdrPageView
* pPV
, bool bUnmark
= false, bool bDoNoSetMarkHdl
= false,
312 std::vector
<basegfx::B2DRectangle
> && rSubSelections
= std::vector
<basegfx::B2DRectangle
>());
313 void MarkAllObj(SdrPageView
* pPV
=nullptr); // pPage=NULL => all displayed pages
314 void UnmarkAllObj(SdrPageView
const * pPV
=nullptr); // pPage=NULL => all displayed pages
316 // This function is time-consuming intensive, as the MarkList has to be scanned.
317 bool IsObjMarked(SdrObject
const * pObj
) const;
318 void UnMarkAll(SdrPageView
const * pPV
=nullptr) { UnmarkAllObj(pPV
); }
320 // Request/set the size of the marking handles. Declaration in Pixel.
321 // The value is meant to be the edge length ( link length ).
322 // Pair values are round up to impair values: 3->3, 4->5, 5->5, 6->7, 7->7, ...
323 // Default value is 7, minimum value is 3 Pixels.
324 sal_uInt16
GetMarkHdlSizePixel() const;
325 void SetMarkHdlSizePixel(sal_uInt16 nSiz
);
327 virtual bool HasMarkablePoints() const;
328 virtual sal_Int32
GetMarkablePointCount() const;
329 virtual bool HasMarkedPoints() const;
331 // There might be points which can't be marked:
332 bool IsPointMarkable(const SdrHdl
& rHdl
) const;
333 virtual bool MarkPoint(SdrHdl
& rHdl
, bool bUnmark
=false);
335 /** should only be used from outside svx for special ui elements */
336 bool MarkPointHelper(SdrHdl
* pHdl
, SdrMark
* pMark
, bool bUnmark
);
338 bool UnmarkPoint(SdrHdl
& rHdl
) { return MarkPoint(rHdl
,true); }
339 bool IsPointMarked(const SdrHdl
& rHdl
) const { ForceUndirtyMrkPnt(); return rHdl
.IsSelected(); }
340 bool MarkAllPoints() { return MarkPoints(nullptr,false); }
341 bool UnmarkAllPoints() { return MarkPoints(nullptr,true); }
343 // Selects the first marked point (P1) which is hit by rPnt
344 // and from there it searches the first non-marked point(P2).
345 // In case of success the marking of
346 // P1 is deleted, a mark is set at P2.
347 SAL_DLLPRIVATE
void MarkNextPoint();
349 // Search for the number of the suitable handle. In case of empty search result,
350 // SAL_MAX_SIZE is returned.
351 size_t GetHdlNum(SdrHdl
const * pHdl
) const { return maHdlList
.GetHdlNum(pHdl
); }
352 SdrHdl
* GetHdl(size_t nHdlNum
) const { return maHdlList
.GetHdl(nHdlNum
); }
353 const SdrHdlList
& GetHdlList() const { return maHdlList
; }
355 // Draw a selection frame for marking of points.
356 // This routine will just be started in case that HasMarkablePoints() returns sal_True.
357 bool BegMarkPoints(const Point
& rPnt
, bool bUnmark
= false);
358 void MovMarkPoints(const Point
& rPnt
);
359 bool EndMarkPoints();
360 SAL_DLLPRIVATE
void BrkMarkPoints();
361 bool IsMarkPoints() const { return (nullptr != mpMarkPointsOverlay
); }
363 // Select that additional handles are displayed permanently.
364 void SetPlusHandlesAlwaysVisible(bool bOn
);
365 bool IsPlusHandlesAlwaysVisible() const { return mbPlusHdlAlways
; }
367 SAL_DLLPRIVATE
bool HasMarkableGluePoints() const;
368 SAL_DLLPRIVATE
bool HasMarkedGluePoints() const;
370 // A gluepoint is clearly identified by the SdrObject
371 // (to which it belongs) as well as by a sal_uInt16 nId (as each SdrObject may consist of
372 // several gluepoints. Here at the View there is an additional
373 // SdrPageView, which should be defined correctly always.
374 // Alternatively a gluepoint may be characterized by a SdrHdl.
375 // In this case the SdrHdl instance consists of all required information.
376 // And in this case, the gluepoint are always is marked by enforcement
377 // (Handlers are just situated at marked gluepoints )
378 // Attention: With each change of the gluepoint status the handle list is re-calculated.
379 // All previously saved SdrHdl* became invalid by this, the same with the point IDs!
380 bool PickGluePoint(const Point
& rPnt
, SdrObject
*& rpObj
, sal_uInt16
& rnId
, SdrPageView
*& rpPV
) const;
381 bool MarkGluePoint(const SdrObject
* pObj
, sal_uInt16 nId
, bool bUnmark
);
382 void UnmarkGluePoint(const SdrObject
* pObj
, sal_uInt16 nId
) { MarkGluePoint(pObj
,nId
,true); }
383 bool IsGluePointMarked(const SdrObject
* pObj
, sal_uInt16 nId
) const;
385 // Get the Hdl (handle) of a marked GluePoint. Non-marked
386 // GluePoints don`t have handles
387 SdrHdl
* GetGluePointHdl(const SdrObject
* pObj
, sal_uInt16 nId
) const;
389 // Mark all points within this rectangular (View coordinates)
390 bool MarkAllGluePoints() { return MarkGluePoints(nullptr,false); }
391 bool UnmarkAllGluePoints() { return MarkGluePoints(nullptr,true); }
393 // Selects the first marked point (P1) which is hit by rPnt
394 // and from there it searches the first non-marked point(P2).
395 // In case of success the marking of
396 // P1 is deleted, a mark is set at P2.
397 SAL_DLLPRIVATE
void MarkNextGluePoint();
399 // Draw a selection frame for gluepoint marking.
400 // This routine will just be started in case that HasMarkablePoints() returns sal_True.
401 // The GlueEditMode sal_True is disregarded.
402 // bool BegMarkGluePoints(const Point& rPnt, OutputDevice* pOut);
403 bool BegMarkGluePoints(const Point
& rPnt
, bool bUnmark
= false);
404 SAL_DLLPRIVATE
void MovMarkGluePoints(const Point
& rPnt
);
405 SAL_DLLPRIVATE
void EndMarkGluePoints();
406 SAL_DLLPRIVATE
void BrkMarkGluePoints();
407 bool IsMarkGluePoints() const { return (nullptr != mpMarkGluePointsOverlay
); }
409 // bRestraintPaint=sal_False causes the handles not to be drawn immediately.
410 // AdjustMarkHdl is just called in case of changes; usually this causes an Invalidate
411 // At the end of a redraw the handles are drawn automatically.
412 // The purpose is to avoid unnecessary flickering. -> This does not yet work, that's why sal_True!
413 void AdjustMarkHdl(SfxViewShell
* pOtherShell
= nullptr); //HMHBOOL bRestraintPaint=sal_True);
415 const tools::Rectangle
& GetMarkedObjRect() const; // SnapRects of Objects, without line width
416 tools::Rectangle
GetMarkedObjBoundRect() const; // incl. line width, overlapping rags, ...
417 SAL_DLLPRIVATE
const tools::Rectangle
& GetMarkedPointsRect() const; // Enclosing rectangle of all marked points
418 SAL_DLLPRIVATE
const tools::Rectangle
& GetMarkedGluePointsRect() const; // Enclosing rectangle of all marked gluepoints
419 const tools::Rectangle
& GetAllMarkedRect() const { return GetMarkedObjRect(); }
420 tools::Rectangle
GetAllMarkedBoundRect() const { return GetMarkedObjBoundRect(); }
422 // Will be always called, if the list of marked objects might be changed.
423 // If you override this method, be sure that you call the
424 // methods of the base class!
425 SAL_DLLPRIVATE
virtual void MarkListHasChanged();
427 // Entering (Editing) of a maybe marked object group. If there are several
428 // object groups marked, the most upper group is selected. After that
429 // all member objects of the group are directly accessible. All other
430 // objects may not be processed in the meantime (until the next
431 // LeaveGroup()). With markings which overlaps pages, every page is processed
432 // separately. The method returns sal_True, if at least one group was entered.
433 void EnterMarkedGroup();
435 // Rotation center point and start point of the axis of reflection, respectively
436 const Point
& GetRef1() const { return maRef1
; }
437 SAL_DLLPRIVATE
void SetRef1(const Point
& rPt
);
439 // End point of the axis of reflection
440 const Point
& GetRef2() const { return maRef2
; }
441 SAL_DLLPRIVATE
void SetRef2(const Point
& rPt
);
442 /// Get access to the view shell owning this draw view, if any.
443 SAL_RET_MAYBENULL
virtual SfxViewShell
* GetSfxViewShell() const;
448 // It has to be declared in logical coordinates. So please translate the
449 // wanted pixel value with PixelToLogic in Logical values.
450 // Taking as example a logical value of 100:
451 // - For a horizontal hairline (Object with height 0), the generated data is +/-100, i.e.
452 // a vertical area of 200 logical units is sensitive.
453 // - For a polygon, a rectangular of the size (200,200) is generated and a
454 // touch test between Poly and this Rect is processed.
455 // - Objects which respond SdrObject::HasEdit()==TRUE ( e.g. a text frame ),
456 // are specially treated: An additional sensitive area with a width of
457 // 2*Tol (200 units for this example) is created around the object.
458 // When an object is directly hit, the Edit method is called.
459 // In opposite, a hit in the surrounding sensitive area enables Dragging.
462 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */