1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: formcontrolfont.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef FORMS_SOURCE_COMPONENT_FORMCONTROLFONT_HXX
32 #define FORMS_SOURCE_COMPONENT_FORMCONTROLFONT_HXX
34 #include <com/sun/star/io/XObjectOutputStream.hpp>
35 #include <com/sun/star/awt/FontDescriptor.hpp>
36 #include <com/sun/star/beans/Property.hpp>
37 #include <com/sun/star/lang/IllegalArgumentException.hpp>
39 //.........................................................................
42 //.........................................................................
44 //=====================================================================
46 //=====================================================================
47 class FontControlModel
51 ::com::sun::star::awt::FontDescriptor m_aFont
;
52 sal_Int16 m_nFontRelief
;
53 sal_Int16 m_nFontEmphasis
;
54 ::com::sun::star::uno::Any m_aTextLineColor
;
55 ::com::sun::star::uno::Any m_aTextColor
;
58 bool m_bToolkitCompatibleDefaults
;
61 const ::com::sun::star::awt::FontDescriptor
& getFont() const { return m_aFont
; }
62 void setFont( const ::com::sun::star::awt::FontDescriptor
& _rFont
) { m_aFont
= _rFont
; }
64 void setTextColor( sal_Int32 _nColor
) { m_aTextColor
<<= _nColor
; }
65 void clearTextColor( ) { m_aTextColor
.clear(); }
66 bool hasTextColor( ) const { return m_aTextColor
.hasValue(); }
67 sal_Int32
getTextColor( ) const;
69 void setTextLineColor( sal_Int32 _nColor
) { m_aTextLineColor
<<= _nColor
; }
70 void clearTextLineColor( ) { m_aTextLineColor
.clear(); }
71 bool hasTextLineColor( ) const { return m_aTextLineColor
.hasValue(); }
72 sal_Int32
getTextLineColor( ) const;
75 FontControlModel( bool _bToolkitCompatibleDefaults
);
76 FontControlModel( const FontControlModel
* _pOriginal
);
79 bool isFontRelatedProperty( sal_Int32 _nPropertyHandle
) const;
80 bool isFontAggregateProperty( sal_Int32 _nPropertyHandle
) const;
82 /// appends (!) the description of all font related properties to the given sequence
83 void describeFontRelatedProperties(
84 ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::Property
>& /* [out] */ _rProps
) const;
86 void getFastPropertyValue ( ::com::sun::star::uno::Any
& _rValue
, sal_Int32 _nHandle
) const;
87 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
);
88 void setFastPropertyValue_NoBroadcast( sal_Int32 _nHandle
, const ::com::sun::star::uno::Any
& _rValue
) throw ( ::com::sun::star::uno::Exception
);
89 ::com::sun::star::uno::Any
90 getPropertyDefaultByHandle ( sal_Int32 _nHandle
) const;
95 FontControlModel(); // never implemented
96 FontControlModel( const FontControlModel
& ); // never implemented
97 FontControlModel
& operator=( const FontControlModel
& ); // never implemented
100 //.........................................................................
102 //.........................................................................
104 #endif // FORMS_SOURCE_COMPONENT_FORMCONTROLFONT_HXX