Version 4.3.0.0.beta1, tag libreoffice-4.3.0.0.beta1
[LibreOffice.git] / include / svx / charthelper.hxx
blob296fccca34d634b4405f1a475ff7596f6ed8cfff
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/frame/XModel.hpp>
24 #include <com/sun/star/uno/Sequence.hxx>
25 #include <basegfx/range/b2drange.hxx>
26 #include <svx/svxdllapi.h>
27 #include <drawinglayer/primitive2d/baseprimitive2d.hxx>
28 #include <com/sun/star/embed/XEmbeddedObject.hpp>
31 // predeclarations
33 namespace svt { class EmbeddedObjectRef; }
37 class SVX_DLLPUBLIC ChartHelper
39 public:
40 // test if given reference is a chart
41 static bool IsChart(const svt::EmbeddedObjectRef& xObjRef);
43 // try to access rXModel in case of a chart to to get the chart content
44 // as sequence of primitives. Return range of primitives (chart size) in rRange;
45 // it will be used to embed the chart to the SdrObject transformation. This
46 // allows to define possible distances between chart and SDrObject bounds here
47 static drawinglayer::primitive2d::Primitive2DSequence tryToGetChartContentAsPrimitive2DSequence(
48 const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rXModel,
49 basegfx::B2DRange& rRange);
51 // #i121334# Allow to switch off line and fill style by setting these as attributes
52 // at the OLE chart object. This is needed to allow fill styles of the covering objects
53 // to make their own fill/line settings work. This should not be done by changing
54 // the defaults at the chart (see StaticPageBackgroundDefaults_Initializer::lcl_AddDefaultsToMap)
55 // since this would not be saved/loaded, thus the compatibility will be better when setting it at
56 // newly created charts using this method
57 static void AdaptDefaultsForChart(
58 const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > & xEmbObj,
59 bool bNoFillStyle = true,
60 bool bNoLineStyle = true);
65 #endif // INCLUDED_SVX_CHARTHELPER_HXX
67 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */