1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _SVT_FONTSUBSTCONFIG_HXX
24 #define _SVT_FONTSUBSTCONFIG_HXX
25 
26 #include "svtools/svtdllapi.h"
27 #include <unotools/configitem.hxx>
28 
29 struct SvtFontSubstConfig_Impl;
30 
31 //-----------------------------------------------------------------------------
32 struct SubstitutionStruct
33 {
34 	rtl::OUString 	sFont;
35 	rtl::OUString 	sReplaceBy;
36 	sal_Bool		bReplaceAlways;
37 	sal_Bool		bReplaceOnScreenOnly;
38 };
39 //-----------------------------------------------------------------------------
40 class SVT_DLLPUBLIC SvtFontSubstConfig : public utl::ConfigItem
41 {
42 	sal_Bool					bIsEnabled;
43 	SvtFontSubstConfig_Impl*	pImpl;
44 public:
45 	SvtFontSubstConfig();
46 	virtual ~SvtFontSubstConfig();
47 
48 	virtual void			Commit();
49 	virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString >& _rPropertyNames);
50 
IsEnabled() const51 	sal_Bool 				IsEnabled() const {return bIsEnabled;}
Enable(sal_Bool bSet)52 	void	 				Enable(sal_Bool bSet)  {bIsEnabled = bSet; SetModified();}
53 
54 	sal_Int32					SubstitutionCount() const;
55 	void						ClearSubstitutions();
56 	const SubstitutionStruct*	GetSubstitution(sal_Int32 nPos);
57 	void						AddSubstitution(const SubstitutionStruct&	rToAdd);
58 	void						Apply();
59 };
60 
61 #endif
62 
63 
64 
65