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: smmod.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 ************************************************************************/
34 #ifndef _SV_RESARY_HXX
35 #include <tools/resary.hxx>
37 #ifndef _SFXLSTNER_HXX
38 #include <bf_svtools/lstner.hxx>
40 #ifndef INCLUDED_SVTOOLS_COLORCFG_HXX
41 #include <bf_svtools/colorcfg.hxx>
45 #define _SM_DLL // fuer SD_MOD()
46 #include <bf_starmath/smdll.hxx> // fuer SdModuleDummy
49 #include "starmath.hrc"
55 class SvxErrorHandler
;
63 /*************************************************************************
65 |* This subclass of <SfxModule> (which is a subclass of <SfxShell>) is
66 |* linked to the DLL. One instance of this class exists while the DLL is
69 |* SdModule is like to be compared with the <SfxApplication>-subclass.
71 |* Remember: Don`t export this class! It uses DLL-internal symbols.
73 \************************************************************************/
77 /////////////////////////////////////////////////////////////////
79 /*N*/ class SmNamesArray
: public Resource
81 /*N*/ ResStringArray aNamesAry
;
82 /*N*/ LanguageType nLanguage
;
85 /*N*/ SmNamesArray( LanguageType nLang
, int nRID
) :
86 /*N*/ Resource( SmResId(RID_LOCALIZED_NAMES
) ),
87 /*N*/ nLanguage (nLang
),
88 /*N*/ aNamesAry (SmResId(nRID
))
93 /*N*/ LanguageType
GetLanguage() const { return nLanguage
; }
94 /*N*/ const ResStringArray
& GetNamesArray() const { return aNamesAry
; }
97 /////////////////////////////////////////////////////////////////
99 class SmLocalizedSymbolData
: public Resource
101 ResStringArray aUiSymbolNamesAry
;
102 ResStringArray aExportSymbolNamesAry
;
103 ResStringArray aUiSymbolSetNamesAry
;
104 ResStringArray aExportSymbolSetNamesAry
;
105 SmNamesArray
*p50NamesAry
;
106 SmNamesArray
*p60NamesAry
;
107 LanguageType n50NamesLang
;
108 LanguageType n60NamesLang
;
111 SmLocalizedSymbolData();
112 ~SmLocalizedSymbolData();
114 const ResStringArray
& GetUiSymbolNamesArray() const { return aUiSymbolNamesAry
; }
115 const ResStringArray
& GetExportSymbolNamesArray() const { return aExportSymbolNamesAry
; }
116 const String
GetUiSymbolName( const String
&rExportName
) const;
117 const String
GetExportSymbolName( const String
&rUiName
) const;
119 const ResStringArray
& GetUiSymbolSetNamesArray() const { return aUiSymbolSetNamesAry
; }
120 const ResStringArray
& GetExportSymbolSetNamesArray() const { return aExportSymbolSetNamesAry
; }
121 const String
GetUiSymbolSetName( const String
&rExportName
) const;
123 const ResStringArray
* Get50NamesArray( LanguageType nLang
);
124 const ResStringArray
* Get60NamesArray( LanguageType nLang
);
127 /////////////////////////////////////////////////////////////////
129 class SmModule
: public SmModuleDummy
, public SfxListener
131 ColorConfig
*pColorConfig
;
133 SmLocalizedSymbolData
*pLocSymbolData
;
134 SmRectCache
*pRectCache
;
135 SvtSysLocale
*pSysLocale
;
136 VirtualDevice
*pVirtualDev
;
138 void _CreateSysLocale() const;
139 void _CreateVirtualDev() const;
141 void ApplyColorConfigValues( const ColorConfig
&rColorCfg
);
146 SmModule(SvFactory
* pObjFact
);
151 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
153 ColorConfig
& GetColorConfig();
155 SmConfig
* GetConfig();
156 SmRectCache
* GetRectCache() { return pRectCache
; }
158 SmLocalizedSymbolData
& GetLocSymbolData() const;
160 const SvtSysLocale
& GetSysLocale() const
167 VirtualDevice
& GetDefaultVirtualDev()
174 //virtuelle Methoden fuer den Optionendialog
177 #define SM_MOD1() ( *(SmModule**) GetAppData(BF_SHL_SM) )
179 } //namespace binfilter