1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #include "vclxfixedline.hxx"
29 
30 #include <com/sun/star/awt/PosSize.hpp>
31 #include <toolkit/helper/property.hxx>
32 #include <toolkit/helper/vclunohelper.hxx>
33 #include <tools/debug.hxx>
34 #include <vcl/fixed.hxx>
35 
36 #include "forward.hxx"
37 
38 namespace layoutimpl
39 {
40 
41 using namespace ::com::sun::star::uno;
42 using namespace ::com::sun::star::awt;
43 using namespace ::com::sun::star::lang;
44 using namespace ::com::sun::star::beans;
45 using namespace ::com::sun::star;
46 
47 DBG_NAME( VCLXFixedLine )
48 
49 VCLXFixedLine::VCLXFixedLine()
50   : VCLXWindow()
51 {
52     DBG_CTOR( VCLXFixedLine, NULL );
53 }
54 
55 VCLXFixedLine::~VCLXFixedLine()
56 {
57     DBG_DTOR( VCLXFixedLine, NULL );
58 }
59 
60 IMPLEMENT_FORWARD_XTYPEPROVIDER1( VCLXFixedLine, VCLXWindow );
61 
62 void SAL_CALL VCLXFixedLine::dispose() throw(RuntimeException)
63 {
64     {
65         ::vos::OGuard aGuard( GetMutex() );
66 
67         EventObject aDisposeEvent;
68         aDisposeEvent.Source = W3K_EXPLICIT_CAST (*this);
69     }
70 
71     VCLXWindow::dispose();
72 }
73 
74 ::com::sun::star::awt::Size SAL_CALL VCLXFixedLine::getMinimumSize()
75     throw(::com::sun::star::uno::RuntimeException)
76 {
77     return awt::Size( 8, 8 );
78 }
79 
80 void VCLXFixedLine::ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent )
81 {
82     ::vos::OClearableGuard aGuard( GetMutex() );
83 /*
84     switch ( _rVclWindowEvent.GetId() )
85     {
86         default:
87             aGuard.clear();
88 */
89             VCLXWindow::ProcessWindowEvent( _rVclWindowEvent );
90 /*
91             break;
92     }
93 */
94 }
95 
96 void SAL_CALL VCLXFixedLine::setProperty( const ::rtl::OUString& PropertyName, const Any &Value ) throw(RuntimeException)
97 {
98     ::vos::OGuard aGuard( GetMutex() );
99 
100     if ( GetWindow() )
101     {
102 /*
103         sal_uInt16 nPropertyId = GetPropertyId( PropertyName );
104         switch ( nPropertyId )
105         {
106             default:
107 */
108                 VCLXWindow::setProperty( PropertyName, Value );
109 //        }
110     }
111 }
112 
113 Any SAL_CALL VCLXFixedLine::getProperty( const ::rtl::OUString& PropertyName ) throw(RuntimeException)
114 {
115     ::vos::OGuard aGuard( GetMutex() );
116 
117     Any aReturn;
118     if ( GetWindow() )
119     {
120 /*
121         sal_uInt16 nPropertyId = GetPropertyId( PropertyName );
122         switch ( nPropertyId )
123         {
124             default:
125 */
126                 aReturn = VCLXWindow::getProperty( PropertyName );
127   //      }
128     }
129     return aReturn;
130 }
131 
132 } // namespace layoutimpl
133