LibreOffice Module chart2 (master) 1
ReferenceSizeProvider.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19#pragma once
20
21#include <com/sun/star/uno/Reference.hxx>
22#include <com/sun/star/awt/Size.hpp>
23#include "charttoolsdllapi.hxx"
24#include <rtl/ref.hxx>
25#include <ChartModel.hxx>
26
27namespace com::sun::star {
28 namespace chart2 {
29 class XTitle;
30 class XTitled;
31 class XChartDocument;
32 }
33 namespace beans {
34 class XPropertySet;
35 }
36}
37
38namespace chart
39{
40
42{
43public:
44
46 {
50 AUTO_RESIZE_UNKNOWN
51 };
52
54 css::awt::Size aPageSize,
55 const rtl::Reference<::chart::ChartModel> & xChartDoc );
56
57 const css::awt::Size& getPageSize() const { return m_aPageSize;}
58
67 static AutoResizeState getAutoResizeState(
68 const rtl::Reference<::chart::ChartModel> & xChartDoc );
69
75 void toggleAutoResizeState();
76
81 SAL_DLLPRIVATE void setValuesAtPropertySet(
82 const css::uno::Reference< css::beans::XPropertySet > & xProp,
83 bool bAdaptFontSizes = true );
84
89 SAL_DLLPRIVATE void setValuesAtTitle(
90 const css::uno::Reference< css::chart2::XTitle > & xTitle );
91
96 void setValuesAtAllDataSeries();
97
98private:
99 SAL_DLLPRIVATE bool useAutoScale() const { return m_bUseAutoScale;}
100
104 SAL_DLLPRIVATE void setAutoResizeState( AutoResizeState eNewState );
105
113 SAL_DLLPRIVATE static void getAutoResizeFromPropSet(
114 const css::uno::Reference< css::beans::XPropertySet > & xProp,
115 AutoResizeState & rInOutState );
116
117 SAL_DLLPRIVATE void impl_setValuesAtTitled(
118 const css::uno::Reference< css::chart2::XTitled > & xTitled );
119 SAL_DLLPRIVATE static void impl_getAutoResizeFromTitled(
120 const css::uno::Reference< css::chart2::XTitled > & xTitled,
121 AutoResizeState & rInOutState );
122
123 css::awt::Size m_aPageSize;
126};
127
128} // namespace chart
129
130/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define OOO_DLLPUBLIC_CHARTTOOLS
const css::awt::Size & getPageSize() const
rtl::Reference<::chart::ChartModel > m_xChartDoc
SAL_DLLPRIVATE bool useAutoScale() const
class SAL_NO_VTABLE XPropertySet