1 /*************************************************************************
3 * OpenOffice.org - a multi-platform office productivity suite
9 * last change: $Author$ $Date$
11 * The Contents of this file are made available subject to
12 * the terms of GNU Lesser General Public License Version 2.1.
15 * GNU Lesser General Public License Version 2.1
16 * =============================================
17 * Copyright 2005 by Sun Microsystems, Inc.
18 * 901 San Antonio Road, Palo Alto, CA 94303, USA
20 * This library is free software; you can redistribute it and/or
21 * modify it under the terms of the GNU Lesser General Public
22 * License version 2.1, as published by the Free Software Foundation.
24 * This library is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
27 * Lesser General Public License for more details.
29 * You should have received a copy of the GNU Lesser General Public
30 * License along with this library; if not, write to the Free Software
31 * Foundation, Inc., 51 Franklin Street, 5th Floor, Boston,
34 ************************************************************************/
36 #include "localized-string.hxx"
38 #include <toolkit/helper/property.hxx>
39 #include <vcl/window.hxx>
44 namespace css
= ::com::sun::star
;
48 LocalizedString::LocalizedString()
53 void LocalizedString::ImplGetPropertyIds( std::list
< sal_uInt16
> &ids
)
55 PushPropertyIds( ids
, BASEPROPERTY_TEXT
, 0);
56 VCLXWindow::ImplGetPropertyIds( ids
);
60 uno::Any
LocalizedString::queryInterface( uno::Type
const& rType
)
61 throw(uno::RuntimeException
)
63 uno::Any aRet
= ::cppu::queryInterface( rType
,
64 SAL_STATIC_CAST( awt::XFixedText
*, this ) );
65 return (aRet
.hasValue() ? aRet
: VCLXWindow::queryInterface( rType
));
68 void LocalizedString::setText( OUString
const& s
)
69 throw(uno::RuntimeException
)
71 ::vos::OGuard
aGuard( GetMutex() );
73 if ( Window
*w
= GetWindow() )
74 return w
->SetText( s
);
77 OUString
LocalizedString::getText()
78 throw(uno::RuntimeException
)
80 ::vos::OGuard
aGuard( GetMutex() );
82 if ( Window
*w
= GetWindow() )
87 } // namespace layoutimpl