1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: AxisWrapper.hxx,v $
10 * $Revision: 1.6.8.1 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef CHART_AXISWRAPPER_HXX
31 #define CHART_AXISWRAPPER_HXX
33 #include "WrappedPropertySet.hxx"
34 #include "ReferenceSizePropertyProvider.hxx"
35 #include "ServiceMacros.hxx"
36 #include <cppuhelper/implbase4.hxx>
37 #include <comphelper/uno3.hxx>
38 #include <cppuhelper/interfacecontainer.hxx>
39 #include <com/sun/star/chart2/XAxis.hpp>
40 #include <com/sun/star/frame/XModel.hpp>
41 #include <com/sun/star/drawing/XShape.hpp>
42 #include <com/sun/star/lang/XComponent.hpp>
43 #include <com/sun/star/lang/XServiceInfo.hpp>
44 #include <com/sun/star/uno/XComponentContext.hpp>
45 #include <com/sun/star/util/XNumberFormatsSupplier.hpp>
47 #include <boost/shared_ptr.hpp>
55 class Chart2ModelContact
;
57 class AxisWrapper
: public ::cppu::ImplInheritanceHelper4
<
59 , com::sun::star::drawing::XShape
60 , com::sun::star::lang::XComponent
61 , com::sun::star::lang::XServiceInfo
62 , com::sun::star::util::XNumberFormatsSupplier
64 , public ReferenceSizePropertyProvider
76 AxisWrapper( tAxisType eType
, ::boost::shared_ptr
< Chart2ModelContact
> spChart2ModelContact
);
77 virtual ~AxisWrapper();
79 static void getDimensionAndMainAxisBool( tAxisType eType
, sal_Int32
& rnDimensionIndex
, sal_Bool
& rbMainAxis
);
81 /// XServiceInfo declarations
82 APPHELPER_XSERVICEINFO_DECL()
84 //ReferenceSizePropertyProvider
85 virtual void updateReferenceSize();
86 virtual ::com::sun::star::uno::Any
getReferenceSize();
87 virtual ::com::sun::star::awt::Size
getCurrentSizeForReference();
89 // ____ XComponent ____
90 virtual void SAL_CALL
dispose()
91 throw (::com::sun::star::uno::RuntimeException
);
92 virtual void SAL_CALL
addEventListener( const ::com::sun::star::uno::Reference
<
93 ::com::sun::star::lang::XEventListener
>& xListener
)
94 throw (::com::sun::star::uno::RuntimeException
);
95 virtual void SAL_CALL
removeEventListener( const ::com::sun::star::uno::Reference
<
96 ::com::sun::star::lang::XEventListener
>& aListener
)
97 throw (::com::sun::star::uno::RuntimeException
);
100 virtual ::com::sun::star::awt::Point SAL_CALL
getPosition()
101 throw (::com::sun::star::uno::RuntimeException
);
102 virtual void SAL_CALL
setPosition( const ::com::sun::star::awt::Point
& aPosition
)
103 throw (::com::sun::star::uno::RuntimeException
);
104 virtual ::com::sun::star::awt::Size SAL_CALL
getSize()
105 throw (::com::sun::star::uno::RuntimeException
);
106 virtual void SAL_CALL
setSize( const ::com::sun::star::awt::Size
& aSize
)
107 throw (::com::sun::star::beans::PropertyVetoException
,
108 ::com::sun::star::uno::RuntimeException
);
110 // ____ XShapeDescriptor (base of XShape) ____
111 virtual ::rtl::OUString SAL_CALL
getShapeType()
112 throw (::com::sun::star::uno::RuntimeException
);
114 // ____ XNumberFormatsSupplier ____
115 virtual ::com::sun::star::uno::Reference
<
116 ::com::sun::star::beans::XPropertySet
> SAL_CALL
getNumberFormatSettings()
117 throw (::com::sun::star::uno::RuntimeException
);
118 virtual ::com::sun::star::uno::Reference
<
119 ::com::sun::star::util::XNumberFormats
> SAL_CALL
getNumberFormats()
120 throw (::com::sun::star::uno::RuntimeException
);
123 // ____ WrappedPropertySet ____
124 virtual const ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::Property
>& getPropertySequence();
125 virtual const std::vector
< WrappedProperty
* > createWrappedProperties();
126 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
> getInnerPropertySet();
129 ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XAxis
> getAxis();
132 ::boost::shared_ptr
< Chart2ModelContact
> m_spChart2ModelContact
;
133 ::cppu::OInterfaceContainerHelper m_aEventListenerContainer
;
136 ::com::sun::star::uno::Any m_aTemporaryHelpStepValue
;
139 } // namespace wrapper
142 // CHART_AXISWRAPPER_HXX