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 .
19 #ifndef INCLUDED_CHART2_SOURCE_MODEL_MAIN_AXIS_HXX
20 #define INCLUDED_CHART2_SOURCE_MODEL_MAIN_AXIS_HXX
22 #include <com/sun/star/uno/XComponentContext.hpp>
23 #include "MutexContainer.hxx"
24 #include "OPropertySet.hxx"
25 #include <cppuhelper/implbase6.hxx>
26 #include <comphelper/uno3.hxx>
28 #include "ModifyListenerHelper.hxx"
29 #include <com/sun/star/lang/XServiceInfo.hpp>
30 #include <com/sun/star/chart2/XAxis.hpp>
31 #include <com/sun/star/chart2/XTitled.hpp>
32 #include <com/sun/star/util/XCloneable.hpp>
33 #include <com/sun/star/util/XModifyBroadcaster.hpp>
34 #include <com/sun/star/util/XModifyListener.hpp>
41 typedef ::cppu::WeakImplHelper6
<
42 ::com::sun::star::chart2::XAxis
,
43 ::com::sun::star::chart2::XTitled
,
44 ::com::sun::star::lang::XServiceInfo
,
45 ::com::sun::star::util::XCloneable
,
46 ::com::sun::star::util::XModifyBroadcaster
,
47 ::com::sun::star::util::XModifyListener
>
52 public MutexContainer
,
53 public impl::Axis_Base
,
54 public ::property::OPropertySet
57 Axis( ::com::sun::star::uno::Reference
<
58 ::com::sun::star::uno::XComponentContext
> const & xContext
);
61 /// establish methods for factory instatiation
62 static css::uno::Reference
< css::uno::XInterface
> SAL_CALL
create( css::uno::Reference
< css::uno::XComponentContext
> const & xContext
)
63 throw(css::uno::Exception
)
65 return (::cppu::OWeakObject
*)new Axis( xContext
);
67 /// XServiceInfo declarations
68 virtual OUString SAL_CALL
getImplementationName()
69 throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
70 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
)
71 throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
72 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames()
73 throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
75 static OUString
getImplementationName_Static();
76 static css::uno::Sequence
< OUString
> getSupportedServiceNames_Static();
78 /// merge XInterface implementations
80 /// merge XTypeProvider implementations
81 DECLARE_XTYPEPROVIDER()
84 explicit Axis( const Axis
& rOther
);
86 // late initialization to call after copy-constructing
87 void Init( const Axis
& rOther
);
89 // ____ OPropertySet ____
90 virtual ::com::sun::star::uno::Any
GetDefaultValue( sal_Int32 nHandle
) const
91 throw (css::beans::UnknownPropertyException
,
92 css::uno::RuntimeException
) SAL_OVERRIDE
;
94 // ____ OPropertySet ____
95 virtual ::cppu::IPropertyArrayHelper
& SAL_CALL
getInfoHelper() SAL_OVERRIDE
;
97 // ____ XPropertySet ____
98 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
100 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
103 virtual void SAL_CALL
setScaleData( const ::com::sun::star::chart2::ScaleData
& rScaleData
)
104 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
105 virtual ::com::sun::star::chart2::ScaleData SAL_CALL
getScaleData()
106 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
107 virtual ::com::sun::star::uno::Reference
<
108 ::com::sun::star::beans::XPropertySet
> SAL_CALL
getGridProperties()
109 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
110 virtual ::com::sun::star::uno::Sequence
<
111 ::com::sun::star::uno::Reference
<
112 ::com::sun::star::beans::XPropertySet
> > SAL_CALL
getSubGridProperties()
113 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
114 virtual ::com::sun::star::uno::Sequence
<
115 ::com::sun::star::uno::Reference
<
116 ::com::sun::star::beans::XPropertySet
> > SAL_CALL
getSubTickProperties()
117 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
120 virtual ::com::sun::star::uno::Reference
<
121 ::com::sun::star::chart2::XTitle
> SAL_CALL
getTitleObject()
122 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
123 virtual void SAL_CALL
setTitleObject(
124 const ::com::sun::star::uno::Reference
<
125 ::com::sun::star::chart2::XTitle
>& Title
)
126 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
128 // ____ XCloneable ____
129 // Note: the coordinate systems are not cloned!
130 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::util::XCloneable
> SAL_CALL
createClone()
131 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
133 // ____ XModifyBroadcaster ____
134 virtual void SAL_CALL
addModifyListener(
135 const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
>& aListener
)
136 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
137 virtual void SAL_CALL
removeModifyListener(
138 const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
>& aListener
)
139 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
141 // ____ XModifyListener ____
142 virtual void SAL_CALL
modified(
143 const ::com::sun::star::lang::EventObject
& aEvent
)
144 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
146 // ____ XEventListener (base of XModifyListener) ____
147 virtual void SAL_CALL
disposing(
148 const ::com::sun::star::lang::EventObject
& Source
)
149 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
151 // ____ OPropertySet ____
152 virtual void firePropertyChangeEvent() SAL_OVERRIDE
;
153 using OPropertySet::disposing
;
155 void fireModifyEvent();
158 void AllocateSubGrids();
162 ::com::sun::star::uno::Reference
<
163 ::com::sun::star::util::XModifyListener
> m_xModifyEventForwarder
;
165 ::com::sun::star::chart2::ScaleData m_aScaleData
;
167 ::com::sun::star::uno::Reference
<
168 ::com::sun::star::beans::XPropertySet
> m_xGrid
;
170 ::com::sun::star::uno::Sequence
<
171 ::com::sun::star::uno::Reference
<
172 ::com::sun::star::beans::XPropertySet
> > m_aSubGridProperties
;
174 ::com::sun::star::uno::Reference
<
175 ::com::sun::star::chart2::XTitle
> m_xTitle
;
180 // INCLUDED_CHART2_SOURCE_MODEL_MAIN_AXIS_HXX
183 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */