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 INCLUDED_FIXEDTEXTCOLOR_HXX
25 #define INCLUDED_FIXEDTEXTCOLOR_HXX
26 
27 /** === begin UNO includes === **/
28 #include <com/sun/star/beans/PropertyChangeEvent.hpp>
29 #include <com/sun/star/container/XChild.hpp>
30 #include <com/sun/star/awt/XVclWindowPeer.hpp>
31 #include <com/sun/star/awt/XControl.hpp>
32 #include <com/sun/star/lang/XComponent.hpp>
33 #include <com/sun/star/report/XFixedText.hpp>
34 /** === end UNO includes === **/
35 
36 #include <IReportControllerObserver.hxx>
37 
38 //#include <boost/noncopyable.hpp>
39 #include <vector>
40 
41 namespace rptui
42 {
43     class OReportController;
44 
45     class FixedTextColor : public IReportControllerObserver
46     {
47         const OReportController& m_rReportController;
48 
49         ::com::sun::star::uno::Reference< ::com::sun::star::awt::XVclWindowPeer > getVclWindowPeer(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XFixedText >& _xComponent) throw(::com::sun::star::uno::RuntimeException);
50         ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > getXControl(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XFixedText >& _xFixedText) throw(::com::sun::star::uno::RuntimeException);
51 
52         void setPropertyTextColor(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XVclWindowPeer >& _xVclWindowPeer, sal_Int32 _nFormatKey);
53 
54         // sal_Int32 getTextColor();
55 
56     public:
57         FixedTextColor(const OReportController & _aObserver);
58         virtual ~FixedTextColor();
59 
60         void    notifyPropertyChange( const ::com::sun::star::beans::PropertyChangeEvent& _rEvent );
61         void    notifyElementInserted( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxElement );
62         void    handle( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxElement );
63 
64     };
65 
66 } // namespace rptui
67 
68 
69 #endif
70