merge the formfield patch from ooo-build
[ooovba.git] / toolkit / source / layout / core / localized-string.hxx
blobf9093f2ec516c9f06d699f90cbaaf2920026d11d
1 /*************************************************************************
3 * OpenOffice.org - a multi-platform office productivity suite
5 * $RCSfile$
7 * $Revision$
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,
32 * MA 02110-1301 USA
34 ************************************************************************/
36 #ifndef LAYOUT_CORE_LOCALIZED_STRING_HXX
37 #define LAYOUT_CORE_LOCALIZED_STRING_HXX
39 #include <com/sun/star/awt/XFixedText.hpp>
40 #include <toolkit/awt/vclxwindow.hxx>
42 namespace layoutimpl
44 namespace css = ::com::sun::star;
46 // FIXME: misuse XFixedText interface for simple string
47 class LocalizedString : public css::awt::XFixedText
48 , public VCLXWindow
50 public:
51 LocalizedString();
53 // css::uno::XInterface
54 css::uno::Any SAL_CALL queryInterface( css::uno::Type const& rType )
55 throw(css::uno::RuntimeException);
56 void SAL_CALL acquire() throw() { OWeakObject::acquire(); }
57 void SAL_CALL release() throw() { OWeakObject::release(); }
59 // css::awt::XFixedText
60 void SAL_CALL setText( ::rtl::OUString const& s )
61 throw(css::uno::RuntimeException);
62 ::rtl::OUString SAL_CALL getText()
63 throw(css::uno::RuntimeException);
64 void SAL_CALL setAlignment( sal_Int16 )
65 throw(css::uno::RuntimeException) { }
66 sal_Int16 SAL_CALL getAlignment()
67 throw(css::uno::RuntimeException) { return 0; }
69 // css::awt::XLayoutConstrains
70 virtual css::awt::Size SAL_CALL getMinimumSize()
71 throw(css::uno::RuntimeException) { return css::awt::Size( 0, 0 ); }
72 css::awt::Size SAL_CALL getPreferredSize()
73 throw(css::uno::RuntimeException) { return getMinimumSize(); }
74 css::awt::Size SAL_CALL calcAdjustedSize( css::awt::Size const& size )
75 throw(css::uno::RuntimeException) { return size; }
77 static void ImplGetPropertyIds( std::list< sal_uInt16 > &ids );
78 virtual void GetPropertyIds( std::list< sal_uInt16 > &ids )
79 { return ImplGetPropertyIds( ids ); }
82 } // namespace layoutimpl
84 #endif /* LAYOUT_CORE_LOCALIZED_STRING_HXX */