/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ #pragma once
namespace com::sun::star::beans { struct PropertyValue; } namespace com::sun::star::chart2 { class XDataSeries; } namespace com::sun::star::chart2::data { class XDataSource; } namespace com::sun::star::uno { class XComponentContext; }
namespace chart
{ class Axis; class BaseCoordinateSystem; class ChartType; class ChartTypeManager; class ChartTypeTemplate; class DataSeries; class Legend; class DataTable; class RegressionCurveModel; enumclass StackMode; class Wall; enumclass ThreeDLookScheme;
enumclass DiagramPositioningMode
{ Auto, Excluding, Including
};
class Diagram
final
: public impl::Diagram_Base
, public ::property::OPropertySet
{ public:
Diagram( css::uno::Reference< css::uno::XComponentContext > xContext ); virtual ~Diagram() override;
/** * Move a series forward or backward. * * @param xDiagram * Reference to the diagram that contains the series. * * @param xGivenDataSeries * Reference to the series that should be moved. * * @param bForward * Direction in which the series should be moved. * * @returns </sal_True> if the series was moved successfully. *
*/ bool moveSeries( const rtl::Reference< DataSeries >& xGivenDataSeries, bool bForward );
/** * Test if a series can be moved. * * @param xDiagram * Reference to the diagram that contains the series. * * @param xGivenDataSeries * Reference to the series that should be tested for moving. * * @param bForward * Direction of the move to be checked. * * @returns </sal_True> if the series can be moved. *
*/ bool isSeriesMoveable( const rtl::Reference< DataSeries >& xGivenDataSeries, bool bForward );
void setCategories( const css::uno::Reference< css::chart2::data::XLabeledDataSequence >& xCategories, bool bSetAxisType = false, // when this flag is true ... bool bCategoryAxis = true);// set the AxisType to CATEGORY or back to REALNUMBER
bool isCategory();
/** return all data series in this diagram grouped by chart-types
*/
std::vector<
std::vector<
rtl::Reference< ::chart::DataSeries > > >
getDataSeriesGroups();
/** Replaces all occurrences of xCooSysToReplace in the tree with xReplacement in the diagram's tree
*/ void replaceCoordinateSystem( const rtl::Reference< ::chart::BaseCoordinateSystem > & xCooSysToReplace, const rtl::Reference< ::chart::BaseCoordinateSystem > & xReplacement );
/** Returns the dimension found for all chart types in the tree. If the dimension is not unique, 0 is returned.
*/
sal_Int32 getDimension();
/** Sets the dimension of the diagram given.
1. Sets the dimension of all used ChartTypes 2. Adapts the DataSeriesTree to reflect the new dimension 3. If new coordinate-systems have to be created, adapts the XCoordinateSystemContainer of the diagram.
*/ void setDimension( sal_Int32 nNewDimensionCount );
/** The stacking mode is only set at the series found inside the first chart type. This is the standard for all current templates (the only template that has more than one chart-type and allows stacking is bar/line combi, and for this the stacking only applies to the first chart type/the bars)
*/ void setStackMode(StackMode eStackMode);
/** Sets the "SwapXAndYAxis" property at all coordinate systems found in the given diagram.
"vertical==true" for bar charts, "vertical==false" for column charts
*/ void setVertical( bool bVertical );
/** Gets the "SwapXAndYAxis" property at all coordinate systems found in the given diagram.
"vertical==true" for bar charts, "vertical==false" for column charts
*/ bool getVertical( bool& rbOutFoundResult, bool& rbOutAmbiguousResult );
/** tries to find a template in the chart-type manager that matches this diagram.
@return A pair containing a template with the correct properties set as first entry and the service name of the templates second entry. If no template was found both elements are empty.
*/
tTemplateWithServiceName
getTemplate(const rtl::Reference< ::chart::ChartTypeManager > & xChartTypeManager);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.