1*b0724fc6SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*b0724fc6SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*b0724fc6SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*b0724fc6SAndrew Rist  * distributed with this work for additional information
6*b0724fc6SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*b0724fc6SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*b0724fc6SAndrew Rist  * "License"); you may not use this file except in compliance
9*b0724fc6SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*b0724fc6SAndrew Rist  *
11*b0724fc6SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*b0724fc6SAndrew Rist  *
13*b0724fc6SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*b0724fc6SAndrew Rist  * software distributed under the License is distributed on an
15*b0724fc6SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*b0724fc6SAndrew Rist  * KIND, either express or implied.  See the License for the
17*b0724fc6SAndrew Rist  * specific language governing permissions and limitations
18*b0724fc6SAndrew Rist  * under the License.
19*b0724fc6SAndrew Rist  *
20*b0724fc6SAndrew Rist  *************************************************************/
21*b0724fc6SAndrew Rist 
22*b0724fc6SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #include "vclxfixedline.hxx"
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #include <com/sun/star/awt/PosSize.hpp>
27cdf0e10cSrcweir #include <toolkit/helper/property.hxx>
28cdf0e10cSrcweir #include <toolkit/helper/vclunohelper.hxx>
29cdf0e10cSrcweir #include <tools/debug.hxx>
30cdf0e10cSrcweir #include <vcl/fixed.hxx>
31cdf0e10cSrcweir 
32cdf0e10cSrcweir #include "forward.hxx"
33cdf0e10cSrcweir 
34cdf0e10cSrcweir namespace layoutimpl
35cdf0e10cSrcweir {
36cdf0e10cSrcweir 
37cdf0e10cSrcweir using namespace ::com::sun::star::uno;
38cdf0e10cSrcweir using namespace ::com::sun::star::awt;
39cdf0e10cSrcweir using namespace ::com::sun::star::lang;
40cdf0e10cSrcweir using namespace ::com::sun::star::beans;
41cdf0e10cSrcweir using namespace ::com::sun::star;
42cdf0e10cSrcweir 
DBG_NAME(VCLXFixedLine)43cdf0e10cSrcweir DBG_NAME( VCLXFixedLine )
44cdf0e10cSrcweir 
45cdf0e10cSrcweir VCLXFixedLine::VCLXFixedLine()
46cdf0e10cSrcweir   : VCLXWindow()
47cdf0e10cSrcweir {
48cdf0e10cSrcweir     DBG_CTOR( VCLXFixedLine, NULL );
49cdf0e10cSrcweir }
50cdf0e10cSrcweir 
~VCLXFixedLine()51cdf0e10cSrcweir VCLXFixedLine::~VCLXFixedLine()
52cdf0e10cSrcweir {
53cdf0e10cSrcweir     DBG_DTOR( VCLXFixedLine, NULL );
54cdf0e10cSrcweir }
55cdf0e10cSrcweir 
56cdf0e10cSrcweir IMPLEMENT_FORWARD_XTYPEPROVIDER1( VCLXFixedLine, VCLXWindow );
57cdf0e10cSrcweir 
dispose()58cdf0e10cSrcweir void SAL_CALL VCLXFixedLine::dispose() throw(RuntimeException)
59cdf0e10cSrcweir {
60cdf0e10cSrcweir     {
61cdf0e10cSrcweir         ::vos::OGuard aGuard( GetMutex() );
62cdf0e10cSrcweir 
63cdf0e10cSrcweir         EventObject aDisposeEvent;
64cdf0e10cSrcweir         aDisposeEvent.Source = W3K_EXPLICIT_CAST (*this);
65cdf0e10cSrcweir     }
66cdf0e10cSrcweir 
67cdf0e10cSrcweir     VCLXWindow::dispose();
68cdf0e10cSrcweir }
69cdf0e10cSrcweir 
getMinimumSize()70cdf0e10cSrcweir ::com::sun::star::awt::Size SAL_CALL VCLXFixedLine::getMinimumSize()
71cdf0e10cSrcweir     throw(::com::sun::star::uno::RuntimeException)
72cdf0e10cSrcweir {
73cdf0e10cSrcweir     return awt::Size( 8, 8 );
74cdf0e10cSrcweir }
75cdf0e10cSrcweir 
ProcessWindowEvent(const VclWindowEvent & _rVclWindowEvent)76cdf0e10cSrcweir void VCLXFixedLine::ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent )
77cdf0e10cSrcweir {
78cdf0e10cSrcweir     ::vos::OClearableGuard aGuard( GetMutex() );
79cdf0e10cSrcweir /*
80cdf0e10cSrcweir     switch ( _rVclWindowEvent.GetId() )
81cdf0e10cSrcweir     {
82cdf0e10cSrcweir         default:
83cdf0e10cSrcweir             aGuard.clear();
84cdf0e10cSrcweir */
85cdf0e10cSrcweir             VCLXWindow::ProcessWindowEvent( _rVclWindowEvent );
86cdf0e10cSrcweir /*
87cdf0e10cSrcweir             break;
88cdf0e10cSrcweir     }
89cdf0e10cSrcweir */
90cdf0e10cSrcweir }
91cdf0e10cSrcweir 
setProperty(const::rtl::OUString & PropertyName,const Any & Value)92cdf0e10cSrcweir void SAL_CALL VCLXFixedLine::setProperty( const ::rtl::OUString& PropertyName, const Any &Value ) throw(RuntimeException)
93cdf0e10cSrcweir {
94cdf0e10cSrcweir     ::vos::OGuard aGuard( GetMutex() );
95cdf0e10cSrcweir 
96cdf0e10cSrcweir     if ( GetWindow() )
97cdf0e10cSrcweir     {
98cdf0e10cSrcweir /*
99cdf0e10cSrcweir         sal_uInt16 nPropertyId = GetPropertyId( PropertyName );
100cdf0e10cSrcweir         switch ( nPropertyId )
101cdf0e10cSrcweir         {
102cdf0e10cSrcweir             default:
103cdf0e10cSrcweir */
104cdf0e10cSrcweir                 VCLXWindow::setProperty( PropertyName, Value );
105cdf0e10cSrcweir //        }
106cdf0e10cSrcweir     }
107cdf0e10cSrcweir }
108cdf0e10cSrcweir 
getProperty(const::rtl::OUString & PropertyName)109cdf0e10cSrcweir Any SAL_CALL VCLXFixedLine::getProperty( const ::rtl::OUString& PropertyName ) throw(RuntimeException)
110cdf0e10cSrcweir {
111cdf0e10cSrcweir     ::vos::OGuard aGuard( GetMutex() );
112cdf0e10cSrcweir 
113cdf0e10cSrcweir     Any aReturn;
114cdf0e10cSrcweir     if ( GetWindow() )
115cdf0e10cSrcweir     {
116cdf0e10cSrcweir /*
117cdf0e10cSrcweir         sal_uInt16 nPropertyId = GetPropertyId( PropertyName );
118cdf0e10cSrcweir         switch ( nPropertyId )
119cdf0e10cSrcweir         {
120cdf0e10cSrcweir             default:
121cdf0e10cSrcweir */
122cdf0e10cSrcweir                 aReturn = VCLXWindow::getProperty( PropertyName );
123cdf0e10cSrcweir   //      }
124cdf0e10cSrcweir     }
125cdf0e10cSrcweir     return aReturn;
126cdf0e10cSrcweir }
127cdf0e10cSrcweir 
128cdf0e10cSrcweir } // namespace layoutimpl
129