Update ooo320-m1
[ooovba.git] / toolkit / source / awt / vclxfixedline.cxx
blob9e29c769b779a937f9e1a0958ed64feede5eb53b
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: vclxfixedline.cxx,v $
11 * $Revision: 1.5 $
13 * This file is part of OpenOffice.org.
15 * OpenOffice.org is free software: you can redistribute it and/or modify
16 * it under the terms of the GNU Lesser General Public License version 3
17 * only, as published by the Free Software Foundation.
19 * OpenOffice.org is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU Lesser General Public License version 3 for more details
23 * (a copy is included in the LICENSE file that accompanied this code).
25 * You should have received a copy of the GNU Lesser General Public License
26 * version 3 along with OpenOffice.org. If not, see
27 * <http://www.openoffice.org/license.html>
28 * for a copy of the LGPLv3 License.
30 ************************************************************************/
32 #include "vclxfixedline.hxx"
34 #include <com/sun/star/awt/PosSize.hpp>
35 #include <toolkit/helper/property.hxx>
36 #include <toolkit/helper/vclunohelper.hxx>
37 #include <tools/debug.hxx>
38 #include <vcl/fixed.hxx>
40 #include "forward.hxx"
42 namespace layoutimpl
45 using namespace ::com::sun::star::uno;
46 using namespace ::com::sun::star::awt;
47 using namespace ::com::sun::star::lang;
48 using namespace ::com::sun::star::beans;
49 using namespace ::com::sun::star;
51 DBG_NAME( VCLXFixedLine )
53 VCLXFixedLine::VCLXFixedLine()
54 : VCLXWindow()
56 DBG_CTOR( VCLXFixedLine, NULL );
59 VCLXFixedLine::~VCLXFixedLine()
61 DBG_DTOR( VCLXFixedLine, NULL );
64 IMPLEMENT_FORWARD_XTYPEPROVIDER1( VCLXFixedLine, VCLXWindow );
66 void SAL_CALL VCLXFixedLine::dispose() throw(RuntimeException)
69 ::vos::OGuard aGuard( GetMutex() );
71 EventObject aDisposeEvent;
72 aDisposeEvent.Source = W3K_EXPLICIT_CAST (*this);
75 VCLXWindow::dispose();
78 ::com::sun::star::awt::Size SAL_CALL VCLXFixedLine::getMinimumSize()
79 throw(::com::sun::star::uno::RuntimeException)
81 return awt::Size( 8, 8 );
84 void VCLXFixedLine::ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent )
86 ::vos::OClearableGuard aGuard( GetMutex() );
88 switch ( _rVclWindowEvent.GetId() )
90 default:
91 aGuard.clear();
93 VCLXWindow::ProcessWindowEvent( _rVclWindowEvent );
95 break;
100 void SAL_CALL VCLXFixedLine::setProperty( const ::rtl::OUString& PropertyName, const Any &Value ) throw(RuntimeException)
102 ::vos::OGuard aGuard( GetMutex() );
104 if ( GetWindow() )
107 sal_uInt16 nPropertyId = GetPropertyId( PropertyName );
108 switch ( nPropertyId )
110 default:
112 VCLXWindow::setProperty( PropertyName, Value );
113 // }
117 Any SAL_CALL VCLXFixedLine::getProperty( const ::rtl::OUString& PropertyName ) throw(RuntimeException)
119 ::vos::OGuard aGuard( GetMutex() );
121 Any aReturn;
122 if ( GetWindow() )
125 sal_uInt16 nPropertyId = GetPropertyId( PropertyName );
126 switch ( nPropertyId )
128 default:
130 aReturn = VCLXWindow::getProperty( PropertyName );
131 // }
133 return aReturn;
136 } // namespace layoutimpl