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