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 .
19 #ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DRAWVIEWWRAPPER_HXX
20 #define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DRAWVIEWWRAPPER_HXX
23 #include <svx/view3d.hxx>
25 namespace com
{ namespace sun
{ namespace star
{ namespace drawing
{ class XShape
; } } } }
26 namespace com
{ namespace sun
{ namespace star
{ namespace frame
{ class XModel
; } } } }
33 /** The DrawViewWrapper should help us to reduce effort if the underlying DrawingLayer changes.
34 Another task is to hide functionality we do not need, for example more than one page.
37 class MarkHandleProvider
40 virtual bool getMarkHandles( SdrHdlList
& rHdlList
) =0;
41 virtual bool getFrameDragSingles() =0;
44 ~MarkHandleProvider() {}
47 class DrawViewWrapper
: public E3dView
54 virtual ~DrawViewWrapper() override
;
56 //triggers the use of an updated first page
59 /// tries to get an OutputDevice from the XParent of the model to use as reference device
60 void attachParentReferenceDevice(
61 const css::uno::Reference
< css::frame::XModel
> & xChartModel
);
63 //fill list of selection handles 'aHdl'
64 virtual void SetMarkHandles(SfxViewShell
* pOtherShell
) override
;
66 SdrPageView
* GetPageView() const;
68 SdrObject
* getHitObject( const Point
& rPnt
) const;
70 void MarkObject( SdrObject
* pObj
);
72 //pMarkHandleProvider can be NULL; ownership is not taken
73 void setMarkHandleProvider( MarkHandleProvider
* pMarkHandleProvider
);
74 void CompleteRedraw(OutputDevice
* pOut
, const vcl::Region
& rReg
, sdr::contact::ViewObjectContactRedirector
* pRedirector
= nullptr) override
;
76 SdrObject
* getSelectedObject() const;
77 SdrObject
* getTextEditObject() const;
78 SdrOutliner
* getOutliner() const;
80 SfxItemSet
getPositionAndSizeItemSetFromMarkedObject() const;
82 SdrObject
* getNamedSdrObject( const OUString
& rName
) const;
83 static bool IsObjectHit( SdrObject
const * pObj
, const Point
& rPnt
);
85 virtual void Notify(SfxBroadcaster
& rBC
, const SfxHint
& rHint
) override
;
87 static SdrObject
* getSdrObject( const css::uno::Reference
< css::drawing::XShape
>& xShape
);
90 mutable MarkHandleProvider
* m_pMarkHandleProvider
;
92 std::unique_ptr
< SdrOutliner
> m_apOutliner
;
94 // #i79965# scroll back view when ending text edit
95 bool m_bRestoreMapMode
;
96 MapMode m_aMapModeToRestore
;
102 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */