Revert "reduce symbol visibility in sw"
[LibreOffice.git] / sw / source / core / inc / dview.hxx
blobcdcf3f2659858aa2251cb94490e9a2cbe035acf8
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
19 #ifndef INCLUDED_SW_SOURCE_CORE_INC_DVIEW_HXX
20 #define INCLUDED_SW_SOURCE_CORE_INC_DVIEW_HXX
22 #include <svx/fmview.hxx>
24 class FmFormModel;
25 class OutputDevice;
26 class SwViewShellImp;
27 class SwFrame;
28 class SwFlyFrame;
29 class SwAnchoredObject;
30 class SdrUndoManager;
32 class 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();
39 /** determine maximal order number for a 'child' object of given 'parent' object
41 The maximal order number will be determined on the current object
42 order hierarchy. It's the order number of the 'child' object with the
43 highest order number. The calculation can be influenced by parameter
44 <_pExclChildObj> - this 'child' object won't be considered.
46 @param <_rParentObj>
47 input parameter - 'parent' object, for which the maximal order number
48 for its 'children' will be determined.
50 @param <_pExclChildObj>
51 optional input parameter - 'child' object, which will not be considered
52 on the calculation of the maximal order number
54 static sal_uInt32 GetMaxChildOrdNum( const SwFlyFrame& _rParentObj,
55 const SdrObject* _pExclChildObj = nullptr );
57 /** method to move 'repeated' objects of the given moved object to the
58 according level
60 @param <_rMovedAnchoredObj>
61 input parameter - moved object, for which the 'repeated' ones have also
62 to be moved.
64 @param <_rMovedChildrenObjs>
65 input parameter - data collection of moved 'child' objects - the 'repeated'
66 ones of these 'children' will also been moved.
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
75 using FmFormView::CheckSingleSdrObjectHit;
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;
81 public:
82 SwDrawView(
83 SwViewShellImp &rI,
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;
110 void ValidateMarkList() { FlushComeBackTimer(); }
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 );
119 /// See SdrMarkView::GetSfxViewShell().
120 SfxViewShell* GetSfxViewShell() const override;
123 #endif
125 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */