LibreOffice Module chart2 (master) 1
DrawViewWrapper.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
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 http://mozilla.org/MPL/2.0/.
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 http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19#pragma once
20
21#include <memory>
22#include <svx/view3d.hxx>
23
24namespace com::sun::star::drawing { class XShape; }
25namespace com::sun::star::frame { class XModel; }
26
27class SdrModel;
28
29namespace chart
30{
31
37{
38public:
39 virtual bool getMarkHandles( SdrHdlList& rHdlList ) =0;
40 virtual bool getFrameDragSingles() =0;
41
42protected:
44};
45
46class DrawViewWrapper final : public E3dView
47{
48public:
50 SdrModel& rSdrModel,
52
53 virtual ~DrawViewWrapper() override;
54
55 //triggers the use of an updated first page
56 void ReInit();
57
60 const css::uno::Reference< css::frame::XModel > & xChartModel );
61
62 //fill list of selection handles 'aHdl'
63 virtual void SetMarkHandles(SfxViewShell* pOtherShell) override;
64
65 SdrPageView* GetPageView() const;
66
67 SdrObject* getHitObject( const Point& rPnt ) const;
68
69 void MarkObject( SdrObject* pObj );
70
71 //pMarkHandleProvider can be NULL; ownership is not taken
72 void setMarkHandleProvider( MarkHandleProvider* pMarkHandleProvider );
73 void CompleteRedraw(OutputDevice* pOut, const vcl::Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector = nullptr) override;
74
77 SdrOutliner* getOutliner() const;
78
80
81 SdrObject* getNamedSdrObject( const OUString& rName ) const;
82 static bool IsObjectHit( SdrObject const * pObj, const Point& rPnt );
83
84 virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
85
86 static SdrObject* getSdrObject( const css::uno::Reference< css::drawing::XShape >& xShape );
87
88private:
90
91 std::unique_ptr< SdrOutliner > m_apOutliner;
92
93 // #i79965# scroll back view when ending text edit
96};
97
98} //namespace chart
99
100/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
SdrPageView * GetPageView() const
void attachParentReferenceDevice(const css::uno::Reference< css::frame::XModel > &xChartModel)
tries to get an OutputDevice from the XParent of the model to use as reference device
void setMarkHandleProvider(MarkHandleProvider *pMarkHandleProvider)
void MarkObject(SdrObject *pObj)
SdrObject * getTextEditObject() const
SdrObject * getHitObject(const Point &rPnt) const
void CompleteRedraw(OutputDevice *pOut, const vcl::Region &rReg, sdr::contact::ViewObjectContactRedirector *pRedirector=nullptr) override
virtual ~DrawViewWrapper() override
static SdrObject * getSdrObject(const css::uno::Reference< css::drawing::XShape > &xShape)
SdrOutliner * getOutliner() const
MarkHandleProvider * m_pMarkHandleProvider
SdrObject * getNamedSdrObject(const OUString &rName) const
static bool IsObjectHit(SdrObject const *pObj, const Point &rPnt)
virtual void SetMarkHandles(SfxViewShell *pOtherShell) override
SdrObject * getSelectedObject() const
SfxItemSet getPositionAndSizeItemSetFromMarkedObject() const
std::unique_ptr< SdrOutliner > m_apOutliner
DrawViewWrapper(SdrModel &rSdrModel, OutputDevice *pOut)
The DrawViewWrapper should help us to reduce effort if the underlying DrawingLayer changes.
virtual bool getFrameDragSingles()=0
virtual bool getMarkHandles(SdrHdlList &rHdlList)=0
oslFileHandle & pOut