1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef RPT_REPORTCOMPONENT_HXX
25 #define RPT_REPORTCOMPONENT_HXX
26 
27 #include <com/sun/star/uno/XComponentContext.hpp>
28 #include <com/sun/star/container/XChild.hpp>
29 #include <com/sun/star/drawing/XShape.hpp>
30 #include <com/sun/star/lang/XServiceInfo.hpp>
31 #include <com/sun/star/lang/XTypeProvider.hpp>
32 #include <com/sun/star/lang/XUnoTunnel.hpp>
33 #include <com/sun/star/uno/XAggregation.hpp>
34 #include <com/sun/star/report/XReportComponent.hpp>
35 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
36 #include <cppuhelper/weakref.hxx>
37 #include <comphelper/uno3.hxx>
38 
39 namespace reportdesign
40 {
41 	class OReportComponentProperties
42 	{
43     public:
44 		::com::sun::star::uno::WeakReference< ::com::sun::star::container::XChild >	m_xParent;
45 		::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
46         ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
47                                                                                     m_xFactory;
48         ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >       m_xShape;
49         ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation >     m_xProxy;
50         ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >   m_xProperty;
51 		::com::sun::star::uno::Reference< ::com::sun::star::lang::XTypeProvider >   m_xTypeProvider;
52 		::com::sun::star::uno::Reference< ::com::sun::star::lang::XUnoTunnel >      m_xUnoTunnel;
53 		::com::sun::star::uno::Reference< ::com::sun::star::lang::XServiceInfo >    m_xServiceInfo;
54         ::com::sun::star::uno::Sequence< ::rtl::OUString > 						    m_aMasterFields;
55 	    ::com::sun::star::uno::Sequence< ::rtl::OUString > 						    m_aDetailFields;
56 		::rtl::OUString 															m_sName;
57 		::sal_Int32 																m_nHeight;
58 		::sal_Int32 																m_nWidth;
59 		::sal_Int32 																m_nPosX;
60 		::sal_Int32 																m_nPosY;
61 		::sal_Int32 																m_nBorderColor;
62 		::sal_Int16																	m_nBorder;
63 		::sal_Bool																	m_bPrintRepeatedValues;
64 
OReportComponentProperties(::com::sun::star::uno::Reference<::com::sun::star::uno::XComponentContext> const & _xContext)65 		OReportComponentProperties(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & _xContext
66 			)
67 			:m_xContext(_xContext)
68 			,m_nHeight(0)
69 			,m_nWidth(0)
70 			,m_nPosX(0)
71 			,m_nPosY(0)
72 			,m_nBorderColor(0)
73 			,m_nBorder(2)
74 			,m_bPrintRepeatedValues(sal_True)
75 		{}
76         ~OReportComponentProperties();
77 
78         void setShape(::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& _xShape
79                     ,const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent>& _xTunnel
80                     ,oslInterlockedCount& _rRefCount);
81 	};
82 }
83 #endif // RPT_REPORTCOMPONENT_HXX
84 
85