LibreOffice Module sw (master) 1
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
4 *
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
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
22#include <svx/fmview.hxx>
24class FmFormModel;
25class OutputDevice;
26class SwViewShellImp;
27class SwFrame;
28class SwFlyFrame;
30class SdrUndoManager;
32class SwDrawView final : public FmFormView
34 Point m_aAnchorPoint; // anchor position
35 SwViewShellImp &m_rImp; // a view is always part of a shell
37 const SwFrame *CalcAnchor();
54 static sal_uInt32 GetMaxChildOrdNum( const SwFlyFrame& _rParentObj,
55 const SdrObject* _pExclChildObj = nullptr );
68 void MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj,
69 const std::vector<SdrObject*>& _rMovedChildObjs ) const;
71 // add custom handles (used by other apps, e.g. AnchorPos)
72 virtual void AddCustomHdl() override;
74 // override to allow extra handling when picking SwVirtFlyDrawObj's
76 virtual SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObject* pObj, SdrPageView* pPV, SdrSearchOptions nOptions, const SdrLayerIDSet* pMVisLay) const override;
78 // Create a local UndoManager
79 std::unique_ptr<SdrUndoManager> createLocalTextUndoManager() override;
84 FmFormModel& rFmFormModel,
85 OutputDevice* pOutDev);
87 // from base class
88 virtual SdrObject* GetMaxToTopObj(SdrObject* pObj) const override;
89 virtual SdrObject* GetMaxToBtmObj(SdrObject* pObj) const override;
90 virtual void MarkListHasChanged() override;
92 // #i7672#
93 // Override to reuse edit background color in active text edit view (OutlinerView)
94 virtual void ModelHasChanged() override;
96 virtual void ObjOrderChanged( SdrObject* pObj, size_t nOldPos,
97 size_t nNewPos ) override;
98 virtual bool TakeDragLimit(SdrDragMode eMode, tools::Rectangle& rRect) const override;
99 virtual void MakeVisible( const tools::Rectangle&, vcl::Window &rWin ) override;
100 virtual void CheckPossibilities() override;
102 const SwViewShellImp &Imp() const { return m_rImp; }
103 SwViewShellImp &Imp() { return m_rImp; }
105 // anchor and Xor for dragging
106 void ShowDragAnchor();
108 virtual void DeleteMarked() override;
112 // #i99665#
113 static bool IsAntiAliasing();
115 // method to replace marked/selected <SwDrawVirtObj>
116 // by its reference object for delete of selection and group selection
117 static void ReplaceMarkedDrawVirtObjs( SdrMarkView& _rMarkView );
120 SfxViewShell* GetSfxViewShell() const override;
125/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual SdrObject * CheckSingleSdrObjectHit(const Point &rPnt, sal_uInt16 nTol, SdrObject *pObj, SdrPageView *pPV, SdrSearchOptions nOptions, const SdrLayerIDSet *pMVisLay) const
void FlushComeBackTimer() const
wrapper class for the positioning of Writer fly frames and drawing objects
virtual SdrObject * GetMaxToBtmObj(SdrObject *pObj) const override
Definition: dview.cxx:303
const SwViewShellImp & Imp() const
Definition: dview.hxx:102
Point m_aAnchorPoint
Definition: dview.hxx:34
virtual void MarkListHasChanged() override
Definition: dview.cxx:775
virtual void CheckPossibilities() override
Definition: dview.cxx:820
static void ReplaceMarkedDrawVirtObjs(SdrMarkView &_rMarkView)
replace marked <SwDrawVirtObj>-objects by its reference object for delete marked objects.
Definition: dview.cxx:914
SwViewShellImp & m_rImp
Definition: dview.hxx:35
void MoveRepeatedObjs(const SwAnchoredObject &_rMovedAnchoredObj, const std::vector< SdrObject * > &_rMovedChildObjs) const
method to move 'repeated' objects of the given moved object to the according level
Definition: dview.cxx:355
SwViewShellImp & Imp()
Definition: dview.hxx:103
std::unique_ptr< SdrUndoManager > createLocalTextUndoManager() override
Definition: dview.cxx:1012
virtual void ObjOrderChanged(SdrObject *pObj, size_t nOldPos, size_t nNewPos) override
Definition: dview.cxx:437
SwDrawView(SwViewShellImp &rI, FmFormModel &rFmFormModel, OutputDevice *pOutDev)
Definition: dview.cxx:100
static bool IsAntiAliasing()
Definition: dview.cxx:130
virtual void DeleteMarked() override
Definition: dview.cxx:960
const SwFrame * CalcAnchor()
Definition: dview.cxx:683
virtual SdrObject * GetMaxToTopObj(SdrObject *pObj) const override
Definition: dview.cxx:259
SfxViewShell * GetSfxViewShell() const override
See SdrMarkView::GetSfxViewShell().
Definition: dview.cxx:955
virtual SdrObject * CheckSingleSdrObjectHit(const Point &rPnt, sal_uInt16 nTol, SdrObject *pObj, SdrPageView *pPV, SdrSearchOptions nOptions, const SdrLayerIDSet *pMVisLay) const override
Definition: dview.cxx:194
virtual void MakeVisible(const tools::Rectangle &, vcl::Window &rWin) override
Definition: dview.cxx:814
static sal_uInt32 GetMaxChildOrdNum(const SwFlyFrame &_rParentObj, const SdrObject *_pExclChildObj=nullptr)
determine maximal order number for a 'child' object of given 'parent' object
Definition: dview.cxx:323
virtual void AddCustomHdl() override
Gets called every time the handles need to be build.
Definition: dview.cxx:209
void ShowDragAnchor()
Definition: dview.cxx:762
virtual bool TakeDragLimit(SdrDragMode eMode, tools::Rectangle &rRect) const override
Definition: dview.cxx:665
void ValidateMarkList()
Definition: dview.hxx:110
virtual void ModelHasChanged() override
Definition: dview.cxx:782
general base class for all free-flowing frames
Definition: flyfrm.hxx:79
Base class of the Writer layout elements.
Definition: frame.hxx:315