LibreOffice Module chart2 (master) 1
Axis.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 "OPropertySet.hxx"
23#include <comphelper/uno3.hxx>
24
25#include <com/sun/star/lang/XServiceInfo.hpp>
26#include <com/sun/star/chart2/XAxis.hpp>
27#include <com/sun/star/chart2/XTitled.hpp>
28#include <com/sun/star/util/XCloneable.hpp>
30#include "charttoolsdllapi.hxx"
31#include "PropertyHelper.hxx"
32
33namespace chart
34{
35class GridProperties;
36class Title;
37
38namespace impl
39{
40typedef ::cppu::WeakImplHelper<
41 css::chart2::XAxis,
42 css::chart2::XTitled,
43 css::lang::XServiceInfo,
44 css::util::XCloneable,
45 css::util::XModifyBroadcaster,
46 css::util::XModifyListener >
48}
49
51 public impl::Axis_Base,
53{
54public:
55 explicit Axis();
56 virtual ~Axis() override;
57
59 virtual OUString SAL_CALL getImplementationName() override;
60 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
61 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
62
67
68private:
69 explicit Axis( const Axis & rOther );
70
71 // late initialization to call after copy-constructing
72 void Init();
73
74 // ____ OPropertySet ____
75 virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) const override;
76
77 // ____ OPropertySet ____
78 virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
79
80public:
81 // ____ XPropertySet ____
82 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
83 getPropertySetInfo() override;
84
85 // ____ XAxis ____
86 virtual void SAL_CALL setScaleData( const css::chart2::ScaleData& rScaleData ) override;
87 virtual css::chart2::ScaleData SAL_CALL getScaleData() override;
88 virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getGridProperties() override;
89 virtual css::uno::Sequence< css::uno::Reference< css::beans::XPropertySet > > SAL_CALL getSubGridProperties() override;
90 virtual css::uno::Sequence< css::uno::Reference< css::beans::XPropertySet > > SAL_CALL getSubTickProperties() override;
91
92 // ____ XTitled ____
93 virtual css::uno::Reference< css::chart2::XTitle > SAL_CALL getTitleObject() override;
94 virtual void SAL_CALL setTitleObject(
95 const css::uno::Reference< css::chart2::XTitle >& Title ) override;
96
97 // ____ XCloneable ____
98 // Note: the coordinate systems are not cloned!
99 virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() override;
100
101 // ____ XModifyBroadcaster ____
102 virtual void SAL_CALL addModifyListener(
103 const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
104 virtual void SAL_CALL removeModifyListener(
105 const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
106
107 rtl::Reference< ::chart::Title > getTitleObject2() const;
109
111 std::vector< rtl::Reference< ::chart::GridProperties > > getSubGridProperties2();
112
113private:
114 // ____ XModifyListener ____
115 virtual void SAL_CALL modified(
116 const css::lang::EventObject& aEvent ) override;
117
118 // ____ XEventListener (base of XModifyListener) ____
119 virtual void SAL_CALL disposing(
120 const css::lang::EventObject& Source ) override;
121
122 // ____ OPropertySet ____
123 virtual void firePropertyChangeEvent() override;
124 using OPropertySet::disposing;
125
126 void fireModifyEvent();
127
128 void AllocateSubGrids();
129
131
132 css::chart2::ScaleData m_aScaleData;
133
135
136 std::vector< rtl::Reference< ::chart::GridProperties > > m_aSubGridProperties;
137
139};
140
142
143} // namespace chart
144
145/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define OOO_DLLPUBLIC_CHARTTOOLS
rtl::Reference< ::chart::GridProperties > m_xGrid
Definition: Axis.hxx:134
css::chart2::ScaleData m_aScaleData
Definition: Axis.hxx:132
std::vector< rtl::Reference< ::chart::GridProperties > > m_aSubGridProperties
Definition: Axis.hxx:136
rtl::Reference< ModifyEventForwarder > m_xModifyEventForwarder
Definition: Axis.hxx:130
virtual void SAL_CALL setTitleObject(const css::uno::Reference< css::chart2::XTitle > &Title) override
void setTitleObject(const rtl::Reference< ::chart::Title > &xNewTitle)
rtl::Reference< ::chart::Title > m_xTitle
Definition: Axis.hxx:138
void Init()
::cppu::WeakImplHelper< css::chart2::XAxis, css::chart2::XTitled, css::lang::XServiceInfo, css::util::XCloneable, css::util::XModifyBroadcaster, css::util::XModifyListener > Axis_Base
Definition: Axis.hxx:47
std::unordered_map< tPropertyValueMapKey, css::uno::Any > tPropertyValueMap
OOO_DLLPUBLIC_CHARTTOOLSconst ::chart::tPropertyValueMap & StaticAxisDefaults()
Definition: Axis.cxx:212
css::uno::Sequence< OUString > getSupportedServiceNames()
OUString getImplementationName()
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
Title
sal_Int32 nHandle
unsigned char sal_Bool
#define DECLARE_XTYPEPROVIDER()
#define DECLARE_XINTERFACE()