Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / include / svx / charthelper.hxx
blobacc1349c93c52b64c970cc212e46ca6133ee8ecb
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 .
20 #ifndef INCLUDED_SVX_CHARTHELPER_HXX
21 #define INCLUDED_SVX_CHARTHELPER_HXX
23 #include <com/sun/star/uno/Reference.hxx>
24 #include <drawinglayer/primitive2d/baseprimitive2d.hxx>
25 #include <sal/types.h>
26 #include <svx/svxdllapi.h>
28 namespace com { namespace sun { namespace star {
29 namespace chart2 { class XDiagram; }
30 namespace embed { class XEmbeddedObject; }
31 namespace frame { class XModel; }
32 } } }
34 namespace basegfx { class B2DRange; }
36 class SAL_WARN_UNUSED SVX_DLLPUBLIC ChartHelper
38 public:
39 /// Check that the XDiagram is a real 3D chart.
40 static bool isGL3DDiagram(const css::uno::Reference<css::chart2::XDiagram>& xDiagram);
42 /// Use chart's XUpdatable::update() to update values.
43 static void updateChart( const css::uno::Reference< css::frame::XModel >& rXModel, bool bHardUpdate );
45 // try to access rXModel in case of a chart to get the chart content
46 // as sequence of primitives. Return range of primitives (chart size) in rRange;
47 // it will be used to embed the chart to the SdrObject transformation. This
48 // allows to define possible distances between chart and SDrObject bounds here
49 static drawinglayer::primitive2d::Primitive2DContainer tryToGetChartContentAsPrimitive2DSequence(
50 const css::uno::Reference< css::frame::XModel >& rXModel,
51 basegfx::B2DRange& rRange);
53 // #i121334# Allow to switch off line and fill style by setting these as attributes
54 // at the OLE chart object. This is needed to allow fill styles of the covering objects
55 // to make their own fill/line settings work. This should not be done by changing
56 // the defaults at the chart (see StaticPageBackgroundDefaults_Initializer::lcl_AddDefaultsToMap)
57 // since this would not be saved/loaded, thus the compatibility will be better when setting it at
58 // newly created charts using this method
59 static void AdaptDefaultsForChart(
60 const css::uno::Reference < css::embed::XEmbeddedObject > & xEmbObj);
63 #endif // INCLUDED_SVX_CHARTHELPER_HXX
65 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */