tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / chart2 / source / view / inc / PlotterBase.hxx
blob73695507fd480df82587dc0c93d8d1a115c08877
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 #pragma once
21 #include <rtl/ustring.hxx>
22 #include <svx/unoshape.hxx>
23 #include <vector>
25 namespace com::sun::star::drawing { struct HomogenMatrix; }
26 namespace com::sun::star::drawing { struct Position3D; }
27 namespace com::sun::star::drawing { class XShapes; }
28 namespace com::sun::star::lang { class XMultiServiceFactory; }
30 namespace chart { struct ExplicitScaleData; }
32 namespace chart
35 class PlottingPositionHelper;
36 class ShapeFactory;
38 /** This class provides methods for setting axis scales and for performing
39 * scene to screen transformations. It is used as the base class for all
40 * plotter classes.
42 class PlotterBase
44 public:
45 PlotterBase( sal_Int32 nDimension );
46 virtual ~PlotterBase();
48 /// @throws css::uno::RuntimeException
49 virtual void initPlotter(
50 const rtl::Reference<SvxShapeGroupAnyD>& xLogicTarget
51 , const rtl::Reference<SvxShapeGroupAnyD>& xFinalTarget
52 , const OUString& rCID
55 virtual void setScales( std::vector< ExplicitScaleData >&& rScales, bool bSwapXAndYAxis );
57 virtual void setTransformationSceneToScreen( const css::drawing::HomogenMatrix& rMatrix );
59 virtual void createShapes() = 0;
61 static bool isValidPosition( const css::drawing::Position3D& rPos );
63 protected: //methods
64 rtl::Reference< SvxShapeGroupAnyD >
65 createGroupShape( const rtl::Reference< SvxShapeGroupAnyD >& xTarget
66 , const OUString& rName=OUString() );
68 protected: //member
69 rtl::Reference< SvxShapeGroupAnyD > m_xLogicTarget;
70 rtl::Reference< SvxShapeGroupAnyD > m_xFinalTarget;
71 OUString m_aCID;
73 const sal_Int32 m_nDimension;
74 // needs to be created and deleted by the derived class
75 PlottingPositionHelper* m_pPosHelper;
77 } //namespace chart
79 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */