1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
28 #ifndef FORMS_SOURCE_COMPONENT_FORMCONTROLFONT_HXX
29 #define FORMS_SOURCE_COMPONENT_FORMCONTROLFONT_HXX
31 #include <com/sun/star/io/XObjectOutputStream.hpp>
32 #include <com/sun/star/awt/FontDescriptor.hpp>
33 #include <com/sun/star/beans/Property.hpp>
34 #include <com/sun/star/lang/IllegalArgumentException.hpp>
36 //.........................................................................
39 //.........................................................................
41 //=====================================================================
43 //=====================================================================
44 class FontControlModel
48 ::com::sun::star::awt::FontDescriptor m_aFont
;
49 sal_Int16 m_nFontRelief
;
50 sal_Int16 m_nFontEmphasis
;
51 ::com::sun::star::uno::Any m_aTextLineColor
;
52 ::com::sun::star::uno::Any m_aTextColor
;
55 bool m_bToolkitCompatibleDefaults
;
58 const ::com::sun::star::awt::FontDescriptor
& getFont() const { return m_aFont
; }
59 void setFont( const ::com::sun::star::awt::FontDescriptor
& _rFont
) { m_aFont
= _rFont
; }
61 void setTextColor( sal_Int32 _nColor
) { m_aTextColor
<<= _nColor
; }
62 void clearTextColor( ) { m_aTextColor
.clear(); }
63 bool hasTextColor( ) const { return m_aTextColor
.hasValue(); }
64 sal_Int32
getTextColor( ) const;
66 void setTextLineColor( sal_Int32 _nColor
) { m_aTextLineColor
<<= _nColor
; }
67 void clearTextLineColor( ) { m_aTextLineColor
.clear(); }
68 bool hasTextLineColor( ) const { return m_aTextLineColor
.hasValue(); }
69 sal_Int32
getTextLineColor( ) const;
72 FontControlModel( bool _bToolkitCompatibleDefaults
);
73 FontControlModel( const FontControlModel
* _pOriginal
);
76 bool isFontRelatedProperty( sal_Int32 _nPropertyHandle
) const;
77 bool isFontAggregateProperty( sal_Int32 _nPropertyHandle
) const;
79 /// appends (!) the description of all font related properties to the given sequence
80 void describeFontRelatedProperties(
81 ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::Property
>& /* [out] */ _rProps
) const;
83 void getFastPropertyValue ( ::com::sun::star::uno::Any
& _rValue
, sal_Int32 _nHandle
) const;
84 sal_Bool
convertFastPropertyValue ( ::com::sun::star::uno::Any
& _rConvertedValue
, ::com::sun::star::uno::Any
& _rOldValue
, sal_Int32 _nHandle
, const ::com::sun::star::uno::Any
& _rValue
) throw( ::com::sun::star::lang::IllegalArgumentException
);
85 void setFastPropertyValue_NoBroadcast( sal_Int32 _nHandle
, const ::com::sun::star::uno::Any
& _rValue
) throw ( ::com::sun::star::uno::Exception
);
86 ::com::sun::star::uno::Any
87 getPropertyDefaultByHandle ( sal_Int32 _nHandle
) const;
92 FontControlModel(); // never implemented
93 FontControlModel( const FontControlModel
& ); // never implemented
94 FontControlModel
& operator=( const FontControlModel
& ); // never implemented
97 //.........................................................................
99 //.........................................................................
101 #endif // FORMS_SOURCE_COMPONENT_FORMCONTROLFONT_HXX