summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2000-09-18 16:07:07 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2000-09-18 16:07:07 +0000
commitd791366863cf9659a01b171ce0e727bfe2f28cdf (patch)
treec44591abc4bf9e7207814d6d9a7756c37657249a /starmath
initial import
Diffstat (limited to 'starmath')
-rw-r--r--starmath/inc/action.hxx105
-rw-r--r--starmath/inc/applicat.hxx160
-rw-r--r--starmath/inc/config.hxx161
-rw-r--r--starmath/inc/dialog.hxx654
-rw-r--r--starmath/inc/document.hxx277
-rw-r--r--starmath/inc/edit.hxx160
-rw-r--r--starmath/inc/format.hxx203
-rw-r--r--starmath/inc/node.hxx867
-rw-r--r--starmath/inc/parse.hxx301
-rw-r--r--starmath/inc/rect.hxx304
-rw-r--r--starmath/inc/smdll.hxx108
-rw-r--r--starmath/inc/smmod.hxx128
-rw-r--r--starmath/inc/starmath.hrc758
-rw-r--r--starmath/inc/symbol.hxx225
-rw-r--r--starmath/inc/toolbox.hxx124
-rw-r--r--starmath/inc/types.hxx216
-rw-r--r--starmath/inc/unomodel.hxx139
-rw-r--r--starmath/inc/utility.hxx471
-rw-r--r--starmath/inc/view.hxx313
-rw-r--r--starmath/prj/d.lst18
-rw-r--r--starmath/sdi/makefile.mk120
-rw-r--r--starmath/sdi/smath.sdi881
-rw-r--r--starmath/sdi/smslots.sdi505
-rw-r--r--starmath/sdi/svxitems.sdi570
-rw-r--r--starmath/source/action.cxx128
-rw-r--r--starmath/source/commands.src2714
-rw-r--r--starmath/source/config.cxx381
-rw-r--r--starmath/source/dialog.cxx2405
-rw-r--r--starmath/source/document.cxx1641
-rw-r--r--starmath/source/edit.cxx783
-rw-r--r--starmath/source/format.cxx311
-rw-r--r--starmath/source/makefile.mk163
-rw-r--r--starmath/source/math_pch.cxx893
-rw-r--r--starmath/source/mathtype.cxx3081
-rw-r--r--starmath/source/mathtype.hxx203
-rw-r--r--starmath/source/node.cxx2490
-rw-r--r--starmath/source/parse.cxx2087
-rw-r--r--starmath/source/rect.cxx908
-rw-r--r--starmath/source/smdll.cxx166
-rw-r--r--starmath/source/smmod.cxx231
-rw-r--r--starmath/source/smres.src10674
-rw-r--r--starmath/source/symbol.cxx657
-rw-r--r--starmath/source/toolbox.cxx274
-rw-r--r--starmath/source/typemap.cxx190
-rw-r--r--starmath/source/unomodel.cxx782
-rw-r--r--starmath/source/utility.cxx651
-rw-r--r--starmath/source/view.cxx1559
-rw-r--r--starmath/util/hidother.src151
-rw-r--r--starmath/util/makefile.mk149
-rw-r--r--starmath/util/sm.map9
50 files changed, 41449 insertions, 0 deletions
diff --git a/starmath/inc/action.hxx b/starmath/inc/action.hxx
new file mode 100644
index 000000000000..1482372779d2
--- /dev/null
+++ b/starmath/inc/action.hxx
@@ -0,0 +1,105 @@
+/*************************************************************************
+ *
+ * $RCSfile: action.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:57:24 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef ACTION_HXX
+#define ACTION_HXX
+
+#ifndef _UNDO_HXX //autogen
+#include <svtools/undo.hxx>
+#endif
+
+#ifndef FORMAT_HXX
+#include "format.hxx"
+#endif
+
+class SmDocShell;
+
+class SmEditAction: public SfxUndoAction
+{
+ SmDocShell *pDoc;
+ String aOldText;
+ String aNewText;
+
+public:
+ SmEditAction(SmDocShell *pDocSh, const String& rOldText, const String& rNewText);
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SmDocShell *pDocSh);
+ virtual String GetComment() const;
+};
+
+class SmFormatAction: public SfxUndoAction
+{
+ SmDocShell *pDoc;
+ SmFormat aOldFormat;
+ SmFormat aNewFormat;
+
+public:
+ SmFormatAction(SmDocShell *pDocSh, const SmFormat& rOldFormat, const SmFormat& rNewFormat);
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SmDocShell *pDocSh);
+ virtual String GetComment() const;
+};
+
+#endif
+
diff --git a/starmath/inc/applicat.hxx b/starmath/inc/applicat.hxx
new file mode 100644
index 000000000000..21e438ffcb44
--- /dev/null
+++ b/starmath/inc/applicat.hxx
@@ -0,0 +1,160 @@
+/*************************************************************************
+ *
+ * $RCSfile: applicat.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:57:24 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+
+#ifndef APPLICAT_HXX
+#define APPLICAT_HXX
+
+class SvxErrorHandler;
+
+#ifndef _SFXAPP_HXX //autogen
+#include <sfx2/app.hxx>
+#endif
+
+/**************************************************************************/
+/*
+**
+** MACRO DEFINITION
+**
+**/
+
+#define SMDLL 1
+
+#define APPLICATIONNAME "smath3"
+
+/**************************************************************************/
+/*
+**
+** CLASS DEFINITION
+**
+**/
+
+#ifdef WIN
+#define RELEASE "WIN304"
+#endif
+
+#ifdef PM2
+#define RELEASE "PM304"
+#endif
+
+#ifdef MAC
+#define RELEASE "MAC304"
+#endif
+
+#ifdef WNT
+#define RELEASE "WNT304"
+#endif
+
+#ifdef UNX
+#define RELEASE "UNX304"
+#endif
+
+#ifndef SMDLL
+class SmResId : public ResId
+{
+public:
+ SmResId(USHORT nId) :
+ ResId(nId)
+ {
+ }
+
+};
+
+#endif
+
+#ifndef _DLL_
+class SmDLL;
+
+class SmApplicat: public SfxApplication
+{
+protected:
+ SvxErrorHandler *pSvxErrorHandler;
+
+ // factories
+ virtual SfxFileDialog* CreateDocFileDialog(ULONG nBits,
+ const SfxObjectFactory &rFact);
+ virtual void OpenClients();
+
+ // initialization / deinitialization
+#ifndef VCL
+ virtual void Init(int nArgs, char* pArgs[]);
+#else
+ virtual void Init();
+#endif
+ virtual void Exit();
+
+public:
+#ifndef VCL
+ void Main(int nArgc, char* pArgv[]);
+#else
+ void Main();
+#endif
+
+ SmApplicat() :
+ SfxApplication("iso")
+ {
+ }
+
+};
+
+#endif
+#endif
+
diff --git a/starmath/inc/config.hxx b/starmath/inc/config.hxx
new file mode 100644
index 000000000000..77b6455ccc7e
--- /dev/null
+++ b/starmath/inc/config.hxx
@@ -0,0 +1,161 @@
+/*************************************************************************
+ *
+ * $RCSfile: config.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:57:24 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef CONFIG_HXX
+#define CONFIG_HXX
+
+#ifndef _SFXBRDCST_HXX //autogen
+#include <svtools/brdcst.hxx>
+#endif
+#ifndef _SFXLSTNER_HXX //autogen
+#include <svtools/lstner.hxx>
+#endif
+#ifndef _SFXCFGITEM_HXX //autogen
+#include <sfx2/cfgitem.hxx>
+#endif
+
+#ifndef _FORMAT_HXX
+#include "format.hxx"
+#endif
+
+#define HINT_CONFIGCHANGED 10002
+#define SMCONFIGITEM (SID_SMA_START+1)
+
+
+class SmPreferenceDialog;
+class SmPrintDialog;
+class SmPrintOptionDialog;
+class SfxItemSet;
+
+enum SmPrintSize { PRINT_SIZE_NORMAL, PRINT_SIZE_SCALED, PRINT_SIZE_ZOOMED };
+
+class SmConfig : public SfxBroadcaster, public SfxListener, public SfxConfigItem
+{
+ String aSymbolFile;
+ SmFormat aStandardFormat;
+ SmFontPickList vFontPickList[7];
+
+ SmPrintSize ePrintSize;
+ USHORT nPrintZoom;
+
+ BOOL bPrintTitle,
+ bPrintText,
+ bPrintFrame,
+ bWarnNoSymbols,
+ bToolBoxVisible,
+ bCmdBoxWindow,
+ bAutoRedraw,
+ bFormulaCursor,
+ bNoRightSpaces; // ignorieren von ~ und ` am Zeilenende
+
+ virtual void SFX_NOTIFY(SfxBroadcaster &rBC, const TypeId &rBCType,
+ const SfxHint &rHint, const TypeId &rHintType);
+
+ void ConfigChangedAction();
+ void SetValueIfNE(BOOL &rItem, const BOOL bVal);
+
+public:
+ SmConfig();
+ virtual ~SmConfig();
+
+ virtual int Load (SvStream &rStream);
+ virtual BOOL Store(SvStream &rStream);
+
+ virtual void UseDefault();
+ virtual String GetName() const;
+
+ SmFormat & GetFormat() { return aStandardFormat; }
+ SmFontPickList & GetFontPickList(USHORT nIdent) { return vFontPickList[nIdent]; }
+
+ const String & GetSymbolFile() const { return aSymbolFile; }
+ void SetSymbolFile(const String &rText);
+
+ SmPrintSize GetPrintSize() const { return ePrintSize; }
+ USHORT GetPrintZoom() const { return nPrintZoom; }
+
+ BOOL IsCmdBoxWindowEnabled() const { return bCmdBoxWindow; }
+
+ BOOL IsPrintTitle() const { return bPrintTitle; }
+ BOOL IsPrintText() const { return bPrintText; }
+ BOOL IsPrintFrame() const { return bPrintFrame; }
+ BOOL IsNoRightSpaces() const { return bNoRightSpaces; }
+
+ BOOL IsToolBoxVisible() const { return bToolBoxVisible; }
+ void SetToolBoxVisible(BOOL bVal) { SetValueIfNE(bToolBoxVisible, bVal); }
+
+ BOOL IsAutoRedraw() const { return bAutoRedraw; }
+ void SetAutoRedraw(BOOL bVal) { SetValueIfNE(bAutoRedraw, bVal); }
+
+ BOOL IsWarnNoSymbols() const { return bWarnNoSymbols; }
+ void SetWarnNoSymbols(BOOL bVal) { SetValueIfNE(bWarnNoSymbols, bVal); }
+
+ BOOL IsShowFormulaCursor() const { return bFormulaCursor; }
+ void SetShowFormulaCursor(BOOL bVal) { SetValueIfNE(bFormulaCursor, bVal); }
+
+ void ItemSetToConfig(const SfxItemSet &rSet);
+ void ConfigToItemSet(SfxItemSet &rSet) const;
+
+ friend SvStream & operator << (SvStream &rStream, const SmConfig &rConfig);
+ friend SvStream & operator >> (SvStream &rStream, SmConfig &rConfig);
+};
+
+#endif
+
+
diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx
new file mode 100644
index 000000000000..6a1591c212bb
--- /dev/null
+++ b/starmath/inc/dialog.hxx
@@ -0,0 +1,654 @@
+/*************************************************************************
+ *
+ * $RCSfile: dialog.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:57:24 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef DIALOG_HXX
+#define DIALOG_HXX
+
+#ifndef _SV_DIALOG_HXX //autogen
+#include <vcl/dialog.hxx>
+#endif
+#ifndef _SV_FIXED_HXX //autogen
+#include <vcl/fixed.hxx>
+#endif
+#ifndef _SV_BUTTON_HXX //autogen
+#include <vcl/button.hxx>
+#endif
+#ifndef _SV_IMAGE_HXX
+#include <vcl/image.hxx>
+#endif
+#ifndef _SFXTABDLG_HXX //autogen
+#include <sfx2/tabdlg.hxx>
+#endif
+#ifndef _SV_GROUP_HXX //autogen
+#include <vcl/group.hxx>
+#endif
+#ifndef _SV_COMBOBOX_HXX //autogen
+#include <vcl/combobox.hxx>
+#endif
+#ifndef _SVX_OPTGENRL_HXX //autogen
+#include <svx/optgenrl.hxx>
+#endif
+#ifndef _BASEDLGS_HXX //autogen
+#include <sfx2/basedlgs.hxx>
+#endif
+#ifndef _SV_FIELD_HXX //autogen
+#include <vcl/field.hxx>
+#endif
+#ifndef _SV_MENUBTN_HXX //autogen
+#include <vcl/menubtn.hxx>
+#endif
+#ifndef _SV_SCRBAR_HXX //autogen
+#include <vcl/scrbar.hxx>
+#endif
+#ifndef _SV_CTRL_HXX //autogen
+#include <vcl/ctrl.hxx>
+#endif
+#ifndef _SV_MENU_HXX //autogen
+#include <vcl/menu.hxx>
+#endif
+#ifndef _CTRLBOX_HXX //autogen
+#include <svtools/ctrlbox.hxx>
+#endif
+#ifndef _CTRLTOOL_HXX //autogen
+#include <svtools/ctrltool.hxx>
+#endif
+
+#ifndef UTILITY_HXX
+#include "utility.hxx"
+#endif
+#ifndef FORMAT_HXX
+#include "format.hxx"
+#endif
+#ifndef SYMBOL_HXX
+#include "symbol.hxx"
+#endif
+
+
+#define CATEGORY_NONE 0xFFFF
+
+/**************************************************************************/
+
+const XubString GetFontStyleName(const Font &rFont);
+void SetFontStyle(const XubString &rStyleName, Font &rFont);
+
+/**************************************************************************/
+
+class SmAboutDialog : public ModalDialog
+{
+ FixedText aFixedText1;
+ FixedText aFixedText2;
+ FixedText aFixedText3;
+ FixedText aFixedText4;
+ FixedText aFixedText5;
+ FixedText aFixedText6;
+ FixedText aReleaseText;
+ FixedBitmap aFixedBitmap1;
+ OKButton aOKButton1;
+
+public:
+ SmAboutDialog(Window *pParent, BOOL bFreeRes = TRUE);
+};
+
+/**************************************************************************/
+
+class SmPrintOptionsTabPage : public SfxTabPage
+{
+ GroupBox aGroupBox1;
+ CheckBox aTitle;
+ CheckBox aText;
+ CheckBox aFrame;
+ GroupBox aGroupBox3;
+ CheckBox aNoRightSpaces;
+ GroupBox aGroupBox2;
+ RadioButton aSizeNormal;
+ RadioButton aSizeScaled;
+ RadioButton aSizeZoomed;
+ MetricField aZoom;
+
+ DECL_LINK(SizeButtonClickHdl, Button *);
+
+ virtual BOOL FillItemSet(SfxItemSet& rSet);
+ virtual void Reset(const SfxItemSet& rSet);
+
+public:
+ static SfxTabPage* Create(Window *pWindow, const SfxItemSet &rSet);
+
+ SmPrintOptionsTabPage(Window *pParent, const SfxItemSet &rOptions);
+};
+
+
+#ifdef NEVER
+class SmGeneralTabPage : public SvxGeneralTabPage
+{
+public :
+ static SfxTabPage* Create(Window* pWindow, const SfxItemSet& rSet);
+
+ SmGeneralTabPage (Window *pParent, const SfxItemSet &rAttrSet) :
+ SvxGeneralTabPage (pParent, rAttrSet)
+ {
+ }
+};
+#endif //NEVER
+
+/**************************************************************************/
+
+#ifdef NEVER
+class SmExtraOptionsTabPage : public SfxTabPage
+{
+ CheckBox aAutoRedraw;
+ FixedText aFixedText1;
+ SmInfoText aSymbolFile;
+ PushButton aBrowseButton;
+
+ DECL_LINK(SymClickHdl, PushButton*);
+
+ virtual BOOL FillItemSet(SfxItemSet& rOutSet);
+ virtual void Reset(const SfxItemSet& rOutSet);
+
+public:
+ SmExtraOptionsTabPage(const SfxItemSet& rInSet, Window *pParent, BOOL bFreeRes = TRUE);
+
+ static SfxTabPage* Create(Window* pWindow, const SfxItemSet& rSet);
+};
+#endif //NEVER
+
+/**************************************************************************/
+
+class SmShowFont : public Control
+{
+ virtual void Paint(const Rectangle&);
+
+public:
+ SmShowFont(Window *pParent, const ResId& rResId) :
+ Control(pParent, rResId)
+ {
+ }
+
+ void SetFont(const Font& rFont);
+};
+
+class SmFontDialog : public ModalDialog
+{
+ FixedText aFixedText1;
+ ComboBox aFontBox;
+ CheckBox aBoldCheckBox;
+ CheckBox aItalicCheckBox;
+ OKButton aOKButton1;
+ CancelButton aCancelButton1;
+ SmShowFont aShowFont;
+ GroupBox aGroupBox1;
+ GroupBox aGroupBox2;
+
+ Font Face;
+
+ DECL_LINK(FontChangeHdl, ComboBox *);
+ DECL_LINK(AttrChangeHdl, CheckBox *);
+
+public:
+ SmFontDialog(Window * pParent, BOOL bFreeRes = TRUE);
+
+ const Font& GetFont() const { return Face; }
+ void SetFont(const Font &rFont);
+};
+
+/**************************************************************************/
+
+class SmFontSizeDialog : public ModalDialog
+{
+ FixedText aFixedText1;
+ MetricField aBaseSize;
+ FixedText aFixedText4;
+ MetricField aTextSize;
+ FixedText aFixedText5;
+ MetricField aIndexSize;
+ FixedText aFixedText6;
+ MetricField aFunctionSize;
+ FixedText aFixedText7;
+ MetricField aOperatorSize;
+ FixedText aFixedText8;
+ MetricField aBorderSize;
+ GroupBox aGroupBox1;
+ OKButton aOKButton1;
+ CancelButton aCancelButton1;
+ PushButton aDefaultButton;
+
+ DECL_LINK(DefaultButtonClickHdl, Button *);
+
+public:
+ SmFontSizeDialog(Window *pParent, BOOL bFreeRes = TRUE);
+
+ void ReadFrom(const SmFormat &rFormat);
+ void WriteTo (SmFormat &rFormat) const;
+};
+
+/**************************************************************************/
+
+class SmFontTypeDialog : public ModalDialog
+{
+ FixedText aFixedText1;
+ SmFontPickListBox aVariableFont;
+ FixedText aFixedText2;
+ SmFontPickListBox aFunctionFont;
+ FixedText aFixedText3;
+ SmFontPickListBox aNumberFont;
+ FixedText aFixedText4;
+ SmFontPickListBox aTextFont;
+ FixedText aFixedText5;
+ SmFontPickListBox aSerifFont;
+ FixedText aFixedText6;
+ SmFontPickListBox aSansFont;
+ FixedText aFixedText7;
+ SmFontPickListBox aFixedFont;
+ GroupBox aGroupBox1;
+ GroupBox aGroupBox2;
+ OKButton aOKButton1;
+ CancelButton aCancelButton1;
+ MenuButton aMenuButton;
+ PushButton aDefaultButton;
+
+ DECL_LINK(MenuSelectHdl, Menu *);
+ DECL_LINK(DefaultButtonClickHdl, Button *);
+
+public:
+ SmFontTypeDialog(Window *pParent, BOOL bFreeRes = TRUE);
+
+ void ReadFrom(const SmFormat &rFormat);
+ void WriteTo (SmFormat &rFormat) const;
+};
+
+/**************************************************************************/
+
+#define NOCATEGORIES 10
+
+class SmCategoryDesc : public Resource
+{
+ XubString Name;
+ XubString *Strings[4];
+ Bitmap *Graphics[4];
+ USHORT Minimum[4];
+ USHORT Maximum[4];
+ USHORT Value[4];
+
+public:
+ SmCategoryDesc(const ResId &rResId, USHORT nCategoryIdx);
+ ~SmCategoryDesc();
+
+ const XubString & GetName() const { return Name; }
+ const XubString * GetString(USHORT Index) const { return Strings[Index]; }
+ const Bitmap * GetGraphic(USHORT Index) const { return Graphics[Index]; }
+ USHORT GetMinimum(USHORT Index) { return Minimum[Index]; }
+ USHORT GetMaximum(USHORT Index) { return Maximum[Index]; }
+ USHORT GetValue(USHORT Index) const { return Value[Index]; }
+ void SetValue(USHORT Index, USHORT nVal) { Value[Index] = nVal;}
+};
+
+
+class SmDistanceDialog : public ModalDialog
+{
+ FixedText aFixedText1;
+ MetricField aMetricField1;
+ FixedText aFixedText2;
+ MetricField aMetricField2;
+ FixedText aFixedText3;
+ MetricField aMetricField3;
+ CheckBox aCheckBox1;
+ FixedText aFixedText4;
+ MetricField aMetricField4;
+ OKButton aOKButton1;
+ CancelButton aCancelButton1;
+ MenuButton aMenuButton;
+ PushButton aDefaultButton;
+ FixedBitmap aBitmap;
+ GroupBox aGroupBox;
+
+ SmCategoryDesc *Categories[NOCATEGORIES];
+ USHORT nActiveCategory;
+ BOOL bScaleAllBrackets;
+
+ DECL_LINK(GetFocusHdl, Control *);
+ DECL_LINK(MenuSelectHdl, Menu *);
+ DECL_LINK(DefaultButtonClickHdl, Button *);
+ DECL_LINK(CheckBoxClickHdl, CheckBox *);
+
+ void SetHelpId(MetricField &rField, ULONG nHelpId);
+ void SetCategory(USHORT Category);
+
+public:
+ SmDistanceDialog(Window *pParent, BOOL bFreeRes = TRUE);
+ ~SmDistanceDialog();
+
+ void ReadFrom(const SmFormat &rFormat);
+ void WriteTo (SmFormat &rFormat) /*const*/;
+};
+
+
+/**************************************************************************/
+
+
+class SmAlignDialog : public ModalDialog
+{
+ RadioButton aLeft;
+ RadioButton aCenter;
+ RadioButton aRight;
+ GroupBox aGroupBox1;
+ OKButton aOKButton1;
+ CancelButton aCancelButton1;
+ PushButton aDefaultButton;
+
+ DECL_LINK(DefaultButtonClickHdl, Button *);
+
+public:
+ SmAlignDialog(Window *pParent, BOOL bFreeRes = TRUE);
+
+ void ReadFrom(const SmFormat &rFormat);
+ void WriteTo (SmFormat &rFormat) const;
+};
+
+/**************************************************************************/
+
+class SmShowSymbolSet : public Control
+{
+ SmSymSet aSymbolSet;
+ ScrollBar aVScrollBar;
+ Size aOutputSize;
+ Link aSelectHdlLink;
+ Link aDblClickHdlLink;
+ USHORT nLen;
+ USHORT nRows, nColumns;
+ USHORT nSelectSymbol;
+
+ virtual void Paint(const Rectangle&);
+ virtual void MouseButtonDown(const MouseEvent& rMEvt);
+ virtual void KeyInput(const KeyEvent& rKEvt);
+
+ DECL_LINK( ScrollHdl, ScrollBar* );
+
+public:
+ SmShowSymbolSet(Window *pParent, const ResId& rResId);
+
+ void SetSymbolSet(const SmSymSet& rSymbolSet);
+
+ void SelectSymbol(USHORT nSymbol);
+ USHORT GetSelectSymbol() const { return nSelectSymbol; }
+
+ void SetSelectHdl(const Link& rLink) { aSelectHdlLink = rLink; }
+ void SetDblClickHdl(const Link& rLink) { aDblClickHdlLink = rLink; }
+};
+
+////////////////////////////////////////////////////////////////////////////////
+
+class SmShowSymbol : public Control
+{
+ Link aDblClickHdlLink;
+
+ virtual void Paint(const Rectangle&);
+ virtual void MouseButtonDown(const MouseEvent& rMEvt);
+
+public:
+ SmShowSymbol(Window *pParent, const ResId& rResId) :
+ Control(pParent, rResId) {}
+
+ void SetSymbol(const SmSym *pSymbol);
+ void SetDblClickHdl(const Link &rLink) { aDblClickHdlLink = rLink; }
+};
+
+////////////////////////////////////////////////////////////////////////////////
+
+class SmSymDefineDialog;
+
+class SmSymbolDialog : public ModalDialog
+{
+ FixedText aSymbolSetText;
+ ListBox aSymbolSets;
+ SmShowSymbolSet aSymbolSetDisplay;
+ GroupBox aGrpBox;
+ FixedText aSymbolName;
+ SmShowSymbol aSymbolDisplay;
+ PushButton aCloseBtn;
+ PushButton aEditBtn;
+ PushButton aGetBtn;
+
+ SmSymSetManager &rSymSetMgr;
+ const SmSymSet *pSymSet;
+
+ DECL_LINK(SymbolSetChangeHdl, ListBox *);
+ DECL_LINK(SymbolChangeHdl, SmShowSymbolSet *);
+ DECL_LINK(SymbolDblClickHdl, SmShowSymbolSet *);
+ DECL_LINK(CloseClickHdl, Button *);
+ DECL_LINK(EditClickHdl, Button *);
+ DECL_LINK(GetClickHdl, Button *);
+
+ void FillSymbolSets(BOOL bDeleteText = TRUE);
+ void SetSymbolSetManager(SmSymSetManager &rMgr);
+ const SmSym *GetSymbol() const;
+
+public:
+ SmSymbolDialog(Window * pParent, SmSymSetManager &rSymSetMgr, BOOL bFreeRes = TRUE);
+
+ BOOL SelectSymbolSet(const XubString &rSymbolSetName);
+ void SelectSymbol(USHORT nSymbolNo);
+};
+
+/**************************************************************************/
+
+class SmShowCharset : public Control
+{
+ Link aSelectHdlLink;
+ Link aDblClickHdlLink;
+ USHORT nLen;
+ USHORT nRows, nColumns;
+ xub_Unicode aChar;
+
+ virtual void Paint(const Rectangle&);
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void KeyInput(const KeyEvent& rKEvt);
+
+public:
+ SmShowCharset(Window *pParent, const ResId& rResId);
+
+ void SetSelectHdl(const Link& rLink)
+ {
+ aSelectHdlLink = rLink;
+ }
+
+ void SetDblClickHdl(const Link& rLink)
+ {
+ aDblClickHdlLink = rLink;
+ }
+
+ void SetFont(const Font &rFont);
+ void SelectChar(xub_Unicode aChar);
+ xub_Unicode GetSelectChar() const { return aChar; }
+};
+
+////////////////////////////////////////////////////////////////////////////////
+
+class SmShowChar : public Control
+{
+ virtual void Paint(const Rectangle&);
+
+public:
+ SmShowChar(Window *pParent, const ResId& rResId)
+ : Control(pParent, rResId)
+ {
+ }
+
+ void SetChar(xub_Unicode aChar);
+ void SetFont(const Font &rFont);
+};
+
+////////////////////////////////////////////////////////////////////////////////
+
+class SmSymDefineDialog : public ModalDialog
+{
+ FixedText aOldSymbolText;
+ ComboBox aOldSymbols;
+ FixedText aOldSymbolSetText;
+ ComboBox aOldSymbolSets;
+ SmShowCharset aCharsetDisplay;
+ FixedText aSymbolText;
+ ComboBox aSymbols;
+ FixedText aSymbolSetText;
+ ComboBox aSymbolSets;
+ FixedText aFontText;
+ ListBox aFonts;
+ FixedText aStyleText;
+ FontStyleBox aStyles;
+ FixedText aOldSymbolName;
+ SmShowChar aOldSymbolDisplay;
+ FixedText aOldSymbolSetName;
+ FixedText aSymbolName;
+ SmShowChar aSymbolDisplay;
+ FixedText aSymbolSetName;
+ OKButton aOkBtn;
+ CancelButton aCancelBtn;
+ PushButton aAddBtn;
+ PushButton aChangeBtn;
+ PushButton aDeleteBtn;
+ FixedImage aRightArrow;
+
+ SmSymSetManager aSymSetMgrCopy,
+ &rSymSetMgr;
+ const SmSym *pOrigSymbol;
+
+ FontList *pFontList;
+
+ DECL_LINK(OldSymbolChangeHdl, ComboBox *);
+ DECL_LINK(OldSymbolSetChangeHdl, ComboBox *);
+ DECL_LINK(ModifyHdl, ComboBox *);
+ DECL_LINK(FontChangeHdl, ListBox *);
+ DECL_LINK(StyleChangeHdl, ComboBox *);
+ DECL_LINK(CharSelectHdl, SmShowCharset *);
+ DECL_LINK(AddClickHdl, Button *);
+ DECL_LINK(ChangeClickHdl, Button *);
+ DECL_LINK(DeleteClickHdl, Button *);
+
+ void FillSymbols(ComboBox &rComboBox, BOOL bDeleteText = TRUE);
+ void FillSymbolSets(ComboBox &rComboBox, BOOL bDeleteText = TRUE);
+ void FillFonts(BOOL bDeleteText = TRUE);
+ void FillStyles(BOOL bDeleteText = TRUE);
+
+ void SetSymbolSetManager(const SmSymSetManager &rMgr);
+ void SetFont(const XubString &rFontName, const XubString &rStyleName);
+ void SetOrigSymbol(const SmSym *pSymbol, const XubString &rSymbolSetName);
+ void UpdateButtons();
+
+ BOOL SelectSymbolSet(ComboBox &rComboBox, const XubString &rSymbolSetName,
+ BOOL bDeleteText);
+ BOOL SelectSymbol(ComboBox &rComboBox, const XubString &rSymbolName,
+ BOOL bDeleteText);
+ BOOL SelectFont(const XubString &rFontName, BOOL bApplyFont);
+ BOOL SelectStyle(const XubString &rStyleName, BOOL bApplyFont);
+
+
+ SmSymSet *GetSymbolSet(const ComboBox &rComboBox);
+ inline const SmSymSet *GetSymbolSet(const ComboBox &rComboBox) const;
+ SmSym *GetSymbol(const ComboBox &rComboBox);
+ inline const SmSym *GetSymbol(const ComboBox &rComboBox) const;
+
+public:
+ SmSymDefineDialog(Window *pParent, SmSymSetManager &rMgr, BOOL bFreeRes = TRUE);
+ ~SmSymDefineDialog();
+
+ // Dialog
+ virtual short Execute();
+
+ inline BOOL SelectOldSymbolSet(const XubString &rSymbolSetName);
+ inline BOOL SelectOldSymbol(const XubString &rSymbolName);
+ inline BOOL SelectSymbolSet(const XubString &rSymbolSetName);
+ inline BOOL SelectSymbol(const XubString &rSymbolName);
+ BOOL SelectFont(const XubString &rFontName) { return SelectFont(rFontName, TRUE); }
+ BOOL SelectStyle(const XubString &rStyleName) { return SelectStyle(rStyleName, TRUE); };
+ void SelectChar(xub_Unicode cChar);
+};
+
+inline const SmSymSet * SmSymDefineDialog::GetSymbolSet(const ComboBox &rComboBox) const
+{
+ return ((SmSymDefineDialog *) this)->GetSymbolSet(rComboBox);
+}
+
+inline const SmSym * SmSymDefineDialog::GetSymbol(const ComboBox &rComboBox) const
+{
+ return ((SmSymDefineDialog *) this)->GetSymbol(rComboBox);
+}
+
+inline BOOL SmSymDefineDialog::SelectOldSymbolSet(const XubString &rSymbolSetName)
+{
+ return SelectSymbolSet(aOldSymbolSets, rSymbolSetName, FALSE);
+}
+
+inline BOOL SmSymDefineDialog::SelectOldSymbol(const XubString &rSymbolName)
+{
+ return SelectSymbol(aOldSymbols, rSymbolName, FALSE);
+}
+
+inline BOOL SmSymDefineDialog::SelectSymbolSet(const XubString &rSymbolSetName)
+{
+ return SelectSymbolSet(aSymbolSets, rSymbolSetName, FALSE);
+}
+
+inline BOOL SmSymDefineDialog::SelectSymbol(const XubString &rSymbolName)
+{
+ return SelectSymbol(aSymbols, rSymbolName, FALSE);
+}
+
+
+#endif
+
diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx
new file mode 100644
index 000000000000..f33ef8169193
--- /dev/null
+++ b/starmath/inc/document.hxx
@@ -0,0 +1,277 @@
+/*************************************************************************
+ *
+ * $RCSfile: document.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:57:24 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef DOCUMENT_HXX
+#define DOCUMENT_HXX
+
+#define SMDLL 1
+
+#ifndef _SVSTOR_HXX //autogen
+#include <so3/svstor.hxx>
+#endif
+#ifndef _SOT_SOTREF_HXX //autogen
+#include <sot/sotref.hxx>
+#endif
+#ifndef _SFX_OBJSH_HXX //autogen
+#include <sfx2/objsh.hxx>
+#endif
+#ifndef _SFX_INTERNO_HXX //autogen
+#include <sfx2/interno.hxx>
+#endif
+#ifndef _SFXLSTNER_HXX //autogen
+#include <svtools/lstner.hxx>
+#endif
+#ifndef _SFX_OBJFAC_HXX //autogen
+#include <sfx2/docfac.hxx>
+#endif
+#ifndef _SV_VIRDEV_HXX //autogen
+#include <vcl/virdev.hxx>
+#endif
+
+#ifndef _FORMAT_HXX
+#include "format.hxx"
+#endif
+#ifndef PARSE_HXX
+#include "parse.hxx"
+#endif
+#ifndef SMMOD_HXX
+#include "smmod.hxx"
+#endif
+
+class SmNode;
+class SfxPrinter;
+class Printer;
+
+
+#ifndef SO2_DECL_SVSTORAGESTREAM_DEFINED
+#define SO2_DECL_SVSTORAGESTREAM_DEFINED
+SO2_DECL_REF(SvStorageStream)
+#endif
+
+#define HINT_DATACHANGED 1004
+
+#define SM30BIDENT ((ULONG)0x534D3033L)
+#define SM30IDENT ((ULONG)0x30334d53L)
+#define SM304AIDENT ((ULONG)0x34303330L)
+#define SM30VERSION ((ULONG)0x00010000L)
+#define SM50VERSION ((ULONG)0x00010001L) //Unterschied zur SM30VERSION ist
+ //der neue Border im Format.
+
+#define FRMIDENT ((ULONG)0x03031963L)
+#define FRMVERSION ((ULONG)0x00010001L)
+
+/* Zugriff auf den Drucker sollte ausschliesslich ueber diese Klasse erfolgen
+ * ==========================================================================
+ *
+ * Der Drucker kann dem Dokument oder auch dem OLE-Container gehoeren. Wenn
+ * das Dokument also eine OLE-Dokument ist, so gehoert der Drucker auch
+ * grundsaetzlich dem Container. Der Container arbeitet aber eventuell mit
+ * einer anderen MapUnit als der Server. Der Drucker wird bezueglich des MapMode
+ * im Konstruktor entsprechend eingestellt und im Destruktor wieder restauriert.
+ * Das bedingt natuerlich, das diese Klasse immer nur kurze Zeit existieren darf
+ * (etwa waehrend des Paints).
+ * Die Kontrolle darueber ob der Drucker selbst angelegt, vom Server besorgt
+ * oder dann auch NULL ist, uebernimmt die DocShell in der Methode GetPrt(),
+ * fuer die der Access auch Friend der DocShell ist.
+*/
+class SmDocShell;
+
+class SmPrinterAccess
+{
+ Printer *pPrinter;
+public:
+ SmPrinterAccess( SmDocShell &rDocShell );
+ ~SmPrinterAccess();
+ Printer *GetPrinter() { return pPrinter; }
+};
+
+
+////////////////////////////////////////////////////////////
+
+class SmDocShell : public SfxObjectShell, public SfxInPlaceObject, public SfxListener
+{
+ friend class SmPrinterAccess;
+
+ String aText;
+ SmFormat aFormat;
+ SmParser aInterpreter;
+ SvDataTypeList aDataTypeList;
+ SvStorageStreamRef aDocStream;
+ SmNode *pTree;
+ SvInPlaceMenuBar *pMenuBar;
+ SfxMenuBarManager *pMenuMgr;
+ SfxUndoManager *pUndoMgr;
+ SfxPrinter *pPrinter; //Siehe Kommentar zum SmPrinter Access!
+ Printer *pTmpPrinter; //ebenfalls
+ long nLeftBorder,
+ nRightBorder,
+ nTopBorder,
+ nBottomBorder;
+ USHORT nModifyCount;
+ BOOL bIsFormulaArranged;
+
+
+
+ virtual void SFX_NOTIFY(SfxBroadcaster& rBC, const TypeId& rBCType,
+ const SfxHint& rHint, const TypeId& rHintType);
+
+ void RestartFocusTimer ();
+
+ BOOL Try3x( SvStorage *pStor, StreamMode eMode);
+ BOOL Try2x( SvStorage *pStor, StreamMode eMode);
+ BOOL WriteAsMathType3( SfxMedium& );
+
+ virtual void Draw(OutputDevice *pDevice,
+ const JobSetup & rSetup,
+ USHORT nAspect = ASPECT_CONTENT);
+
+ virtual void FillRegInfo(SvEmbeddedRegistryInfo * pInfo);
+ virtual void FillClass(SvGlobalName* pClassName,
+ ULONG* pFormat,
+ String* pAppName,
+ String* pFullTypeName,
+ String* pShortTypeName,
+ long nFileFormat = SOFFICE_FILEFORMAT_NOW) const;
+
+ virtual const SvDataTypeList& GetTypeList() const;
+ virtual BOOL GetData(SvData *pData);
+ virtual BOOL SetData(SvData *pData);
+ virtual ULONG GetMiscStatus() const;
+ virtual void OnDocumentPrinterChanged( Printer * );
+ virtual BOOL InitNew(SvStorage *);
+ virtual BOOL Load(SvStorage *);
+ virtual BOOL Insert(SvStorage *);
+ void ImplSave( SvStorageStreamRef xStrm );
+ virtual BOOL Save();
+ virtual BOOL SaveAs( SvStorage *pNewStor );
+ virtual BOOL ConvertTo( SfxMedium &rMedium );
+ virtual BOOL SaveCompleted( SvStorage *pNewStor );
+ virtual void HandsOff();
+
+ Printer *GetPrt();
+
+ void Convert40To50Txt();
+
+ BOOL IsFormulaArranged() const { return bIsFormulaArranged; }
+ void SetFormulaArranged(BOOL bVal) { bIsFormulaArranged = bVal; }
+ void ArrangeFormula();
+
+ virtual BOOL ConvertFrom(SfxMedium &rMedium);
+ BOOL InsertFrom(SfxMedium &rMedium);
+
+ BOOL ImportSM20File(SvStream *pStream, BOOL bInsert = FALSE);
+
+public:
+ TYPEINFO();
+ SFX_DECL_INTERFACE(SFX_INTERFACE_SMA_START+1);
+#if 0
+ SFX_DECL_OBJECTFACTORY(SmDocShell);
+#else
+ SFX_DECL_OBJECTFACTORY_DLL(SmDocShell, SM_MOD());
+#endif
+
+ SmDocShell(SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED);
+ virtual ~SmDocShell();
+
+ void LoadSymbols();
+ void SaveSymbols();
+
+ //Zugriff fuer die View. Diese Zugriffe sind nur fuer den nicht OLE-Fall!
+ //und fuer die Kommunikation mit dem SFX!
+ //Alle internen Verwendungen des Printers sollten ausschlieslich uber
+ //den SmPrinterAccess funktionieren.
+ BOOL HasPrinter() { return 0 != pPrinter; }
+ SfxPrinter *GetPrinter() { GetPrt(); return pPrinter; }
+ void SetPrinter( SfxPrinter * );
+
+ const String &GetTitle() const;
+ const String &GetComment() const;
+
+ void SetText(const String& rBuffer);
+ String& GetText() { return (aText); }
+ void SetFormat(SmFormat& rFormat);
+ SmFormat& GetFormat() { return (aFormat); }
+
+ void Parse();
+ SmParser & GetParser() { return aInterpreter; }
+ const SmNode * GetFormulaTree() const { return pTree; }
+
+ void Draw(OutputDevice &rDev, Point &rPosition);
+ Size GetSize();
+
+ void Resize();
+
+ virtual SfxUndoManager *GetUndoManager ();
+
+ virtual SfxItemPool& GetPool();
+
+ void Execute( SfxRequest& rReq );
+ void GetState(SfxItemSet &);
+
+ virtual SvDataMemberObjectRef CreateSnapshot ();
+ virtual void SetVisArea (const Rectangle & rVisArea);
+ virtual void UIActivate (BOOL bActivate);
+
+virtual void SetModified(BOOL bModified);
+};
+
+
+#endif
+
diff --git a/starmath/inc/edit.hxx b/starmath/inc/edit.hxx
new file mode 100644
index 000000000000..7fee113a88df
--- /dev/null
+++ b/starmath/inc/edit.hxx
@@ -0,0 +1,160 @@
+/*************************************************************************
+ *
+ * $RCSfile: edit.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:57:24 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef EDIT_HXX
+#define EDIT_HXX
+
+#ifndef _SV_WINDOW_HXX //autogen
+#include <vcl/window.hxx>
+#endif
+#ifndef _SV_TIMER_HXX //autogen
+#include <vcl/timer.hxx>
+#endif
+#ifndef _MyEDITDATA_HXX //autogen
+#include <svx/editdata.hxx>
+#endif
+
+class SmDocShell;
+class SmViewShell;
+class EditView;
+class EditEngine;
+class EditStatus;
+class ScrollBar;
+class ScrollBarBox;
+class DataChangedEvent;
+class Menu;
+
+/**************************************************************************/
+
+ void SmGetLeftSelectionPart(const ESelection aSelection,
+ USHORT &nPara, USHORT &nPos);
+
+/**************************************************************************/
+
+class SmEditWindow: public Window
+{
+ EditView *pEditView;
+#if SUPD >= 602
+ SfxItemPool *pEditEngineItemPool;
+#endif
+ EditEngine *pEditEngine;
+ ScrollBar *pHScrollBar,
+ *pVScrollBar;
+ ScrollBarBox *pScrollBox;
+ Timer aModifyTimer,
+ aCursorMoveTimer;
+ ESelection aOldSelection;
+
+ virtual void KeyInput(const KeyEvent& rKEvt);
+ virtual void Command(const CommandEvent& rCEvt);
+ DECL_LINK(MenuSelectHdl, Menu *);
+ DECL_LINK(ModifyTimerHdl, Timer *);
+ DECL_LINK(CursorMoveTimerHdl, Timer *);
+
+ virtual void DataChanged( const DataChangedEvent& );
+ virtual void Resize();
+ virtual void MouseMove(const MouseEvent &rEvt);
+ virtual void MouseButtonUp(const MouseEvent &rEvt);
+ virtual void MouseButtonDown(const MouseEvent &rEvt);
+
+ virtual BOOL Drop(const DropEvent& rEvt);
+ virtual BOOL QueryDrop(DropEvent & rEvt);
+ virtual void Paint(const Rectangle& rRect);
+
+ DECL_LINK(EditStatusHdl ,EditStatus *);
+ DECL_LINK(ScrollHdl, ScrollBar *);
+
+ void CreateEditEngine();
+
+ Rectangle AdjustScrollBars();
+ void SetScrollBarRanges();
+ void InitScrollBars();
+ void ImplSetFont();
+
+public:
+ SmEditWindow(Window *pParent);
+ ~SmEditWindow();
+
+ virtual void SetText(const XubString &rText);
+ virtual XubString GetText();
+
+ ESelection GetSelection() const;
+ void SetSelection(const ESelection &rSel);
+
+ BOOL IsEmpty() const;
+ BOOL IsSelected() const;
+ BOOL IsAllSelected() const;
+ void Cut();
+ void Copy();
+ void Paste();
+ void Delete();
+ void SelectAll();
+ void InsertText(const String &rText);
+ void InsertCommand(USHORT nCommand);
+ void MarkError(const Point &rPos);
+ void SelNextMark();
+ void SelPrevMark();
+ BOOL HasMark(const String &rText) const;
+
+ void Flush();
+};
+
+#endif
+
diff --git a/starmath/inc/format.hxx b/starmath/inc/format.hxx
new file mode 100644
index 000000000000..8b17d8893fb9
--- /dev/null
+++ b/starmath/inc/format.hxx
@@ -0,0 +1,203 @@
+/*************************************************************************
+ *
+ * $RCSfile: format.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:57:24 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef FORMAT_HXX
+#define FORMAT_HXX
+
+
+#ifndef _SFXSMPLHINT_HXX //autogen
+#include <svtools/smplhint.hxx>
+#endif
+#ifndef _SFXBRDCST_HXX //autogen
+#include <svtools/brdcst.hxx>
+#endif
+
+#ifndef UTILITY_HXX
+#include "utility.hxx"
+#endif
+
+
+#define SM_FMT_VERSION_51 ((BYTE) 0x01)
+#define SM_FMT_VERSION_NOW SM_FMT_VERSION_51
+
+#ifndef MAC
+#define FNTNAME_TIMES "Times New Roman"
+#else
+#define FNTNAME_TIMES "Times"
+#endif
+#define FNTNAME_HELV "Helvetica"
+#define FNTNAME_COUR "Courier"
+#define FNTNAME_MATH "StarMath"
+
+
+// symbolic names used as array indices
+#define SIZ_BEGIN 0
+#define SIZ_TEXT 0
+#define SIZ_INDEX 1
+#define SIZ_FUNCTION 2
+#define SIZ_OPERATOR 3
+#define SIZ_LIMITS 4
+#define SIZ_END 4
+
+// symbolic names used as array indices
+#define FNT_BEGIN 0
+#define FNT_VARIABLE 0
+#define FNT_FUNCTION 1
+#define FNT_NUMBER 2
+#define FNT_TEXT 3
+#define FNT_SERIF 4
+#define FNT_SANS 5
+#define FNT_FIXED 6
+#define FNT_MATH 7
+#define FNT_END 7
+
+// symbolic names used as array indices
+#define DIS_BEGIN 0
+#define DIS_HORIZONTAL 0
+#define DIS_VERTICAL 1
+#define DIS_ROOT 2
+#define DIS_SUPERSCRIPT 3
+#define DIS_SUBSCRIPT 4
+#define DIS_NUMERATOR 5
+#define DIS_DENOMINATOR 6
+#define DIS_FRACTION 7
+#define DIS_STROKEWIDTH 8
+#define DIS_UPPERLIMIT 9
+#define DIS_LOWERLIMIT 10
+#define DIS_BRACKETSIZE 11
+#define DIS_BRACKETSPACE 12
+#define DIS_MATRIXROW 13
+#define DIS_MATRIXCOL 14
+#define DIS_ORNAMENTSIZE 15
+#define DIS_ORNAMENTSPACE 16
+#define DIS_OPERATORSIZE 17
+#define DIS_OPERATORSPACE 18
+#define DIS_LEFTSPACE 19
+#define DIS_RIGHTSPACE 20
+#define DIS_TOPSPACE 21
+#define DIS_BOTTOMSPACE 22
+#define DIS_NORMALBRACKETSIZE 23
+#define DIS_END 23
+
+
+// to be broadcastet on format changes:
+#define HINT_FORMATCHANGED 10003
+
+enum SmHorAlign { AlignLeft, AlignCenter, AlignRight };
+
+class SmFormat : public SfxBroadcaster
+{
+ SmFace vFont[FNT_END + 1];
+ Size aBaseSize;
+ long nVersion;
+ USHORT vSize[SIZ_END + 1];
+ USHORT vDist[DIS_END + 1];
+ SmHorAlign eHorAlign;
+ BOOL bIsTextmode,
+ bScaleNormalBrackets;
+
+public:
+ SmFormat();
+ SmFormat(const SmFormat &rFormat) { *this = rFormat; }
+
+ const Size & GetBaseSize() const { return aBaseSize; }
+ void SetBaseSize(const Size &rSize) { aBaseSize = rSize; }
+
+ const SmFace & GetFont(USHORT nIdent) const { return vFont[nIdent]; }
+ SmFace & Font (USHORT nIdent) { return vFont[nIdent]; }
+ void SetFont(USHORT nIdent, const SmFace &rFont) { vFont[nIdent] = rFont; }
+
+ USHORT GetRelSize(USHORT nIdent) const { return vSize[nIdent]; }
+ void SetRelSize(USHORT nIdent, USHORT nVal) { vSize[nIdent] = nVal;}
+
+ USHORT GetDistance(USHORT nIdent) const { return vDist[nIdent]; }
+ void SetDistance(USHORT nIdent, USHORT nVal) { vDist[nIdent] = nVal; }
+
+ SmHorAlign GetHorAlign() const { return eHorAlign; }
+ void SetHorAlign(SmHorAlign eAlign) { eHorAlign = eAlign; }
+
+ BOOL IsTextmode() const { return bIsTextmode; }
+ void SetTextmode(BOOL bVal) { bIsTextmode = bVal; }
+
+ BOOL IsScaleNormalBrackets() const { return bScaleNormalBrackets; }
+ void SetScaleNormalBrackets(BOOL bVal) { bScaleNormalBrackets = bVal; }
+
+ long GetVersion() const { return nVersion; }
+
+ //! at time (5.1) use only the lower byte!!!
+ void SetVersion(long nVer) { nVersion = nVer; }
+
+ SmFormat & operator = (const SmFormat &rFormat);
+
+ void RequestApplyChanges() const
+ {
+ ((SmFormat *) this)->Broadcast(SfxSimpleHint(HINT_FORMATCHANGED));
+ }
+
+ // functions for compatibility with older versions
+ void ReadSM20Format(SvStream &rStream);
+ void From300To304a();
+
+ friend SvStream & operator << (SvStream &rStream, const SmFormat &rFormat);
+ friend SvStream & operator >> (SvStream &rStream, SmFormat &rFormat);
+};
+
+#endif
+
diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx
new file mode 100644
index 000000000000..7218c4dc478b
--- /dev/null
+++ b/starmath/inc/node.hxx
@@ -0,0 +1,867 @@
+/*************************************************************************
+ *
+ * $RCSfile: node.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:57:24 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+
+#ifndef NODE_HXX
+#define NODE_HXX
+
+
+#ifndef _DYNARY_HXX //autogen
+#include <tools/dynary.hxx>
+#endif
+
+#include "parse.hxx"
+#include "xchar.hxx"
+#include "types.hxx"
+#include "rect.hxx"
+#include "format.hxx"
+
+
+#define ATTR_BOLD 0x0001
+#define ATTR_ITALIC 0x0002
+
+#define FNTSIZ_ABSOLUT 1
+#define FNTSIZ_PLUS 2
+#define FNTSIZ_MINUS 3
+#define FNTSIZ_MULTIPLY 4
+#define FNTSIZ_DIVIDE 5
+
+// flags to interdict respective status changes
+#define FLG_FONT 0x0001
+#define FLG_SIZE 0x0002
+#define FLG_BOLD 0x0004
+#define FLG_ITALIC 0x0008
+#define FLG_COLOR 0x0010
+#define FLG_VISIBLE 0x0020
+#define FLG_HORALIGN 0x0040
+
+
+extern SmFormat *pActiveFormat;
+
+class SmNode;
+DECLARE_DYNARRAY(SmNodeArray, SmNode *);
+
+enum SmScaleMode { SCALE_NONE, SCALE_WIDTH, SCALE_HEIGHT };
+
+enum SmNodeType
+{
+ NTABLE, NBRACE, NBRACEBODY, NOPER, NALIGN,
+ NATTRIBUT, NFONT, NUNHOR, NBINHOR, NBINVER,
+ NBINDIAGONAL, NSUBSUP, NMATRIX, NPLACE, NTEXT,
+ NSPECIAL, NGLYPH_SPECIAL, NMATH, NBLANK, NERROR,
+ NLINE, NEXPRESSION, NPOLYGON, NPOLYLINE, NROOT,
+ NROOTSYMBOL, NRECTANGLE, NVERTICAL_BRACE
+};
+
+
+////////////////////////////////////////////////////////////////////////////////
+
+
+class SmNode : public SmRect
+{
+ SmFace aFace;
+
+ SmToken aNodeToken;
+ SmNodeType eType;
+ SmScaleMode eScaleMode;
+ RectHorAlign eRectHorAlign;
+ USHORT nFlags,
+ nAttributes;
+ BOOL bIsPhantom,
+ bIsDebug;
+protected:
+ SmNode(SmNodeType eNodeType, const SmToken &rNodeToken);
+
+public:
+ virtual ~SmNode();
+
+ virtual BOOL IsVisible() const = 0;
+
+ virtual USHORT GetNumSubNodes() const = 0;
+ virtual SmNode * GetSubNode(USHORT nIndex) = 0;
+ const SmNode * GetSubNode(USHORT nIndex) const
+ {
+ return ((SmNode *) this)->GetSubNode(nIndex);
+ }
+
+ virtual SmNode * GetLeftMost();
+ const SmNode * GetLeftMost() const
+ {
+ return ((SmNode *) this)->GetLeftMost();
+ }
+
+ USHORT & Flags() { return nFlags; }
+ USHORT & Attributes() { return nAttributes; }
+
+ BOOL IsDebug() const { return bIsDebug; }
+ BOOL IsPhantom() const { return bIsPhantom; }
+ void SetPhantom(BOOL bIsPhantom);
+ void SetColor(const Color &rColor);
+
+ void SetAttribut(USHORT nAttrib);
+ void ClearAttribut(USHORT nAttrib);
+
+ const SmFace & GetFont() const { return aFace; };
+ SmFace & GetFont() { return aFace; };
+
+ void SetFont(const SmFace &rFace);
+ void SetFontSize(const Fraction &rRelSize, USHORT nType);
+ void SetSize(const Fraction &rScale);
+
+ virtual void Prepare(const SmFormat &rFormat);
+ virtual void PrepareAttributes();
+
+ void ToggleDebug() const;
+
+ void SetRectHorAlign(RectHorAlign eHorAlign);
+ RectHorAlign GetRectHorAlign() const { return eRectHorAlign; }
+
+ const SmRect & GetRect() const { return *this; }
+ SmRect & GetRect() { return *this; }
+
+ virtual void Move(const Point &rPosition);
+ void MoveTo(const Point &rPosition) { Move(rPosition - GetTopLeft()); }
+ virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+
+ virtual void Draw(OutputDevice &rDev, const Point &rPosition) const;
+
+ USHORT GetRow() const { return aNodeToken.nRow; }
+ USHORT GetColumn() const { return aNodeToken.nCol; }
+
+ SmScaleMode GetScaleMode() const { return eScaleMode; }
+ void SetScaleMode(SmScaleMode eMode) { eScaleMode = eMode; }
+
+ virtual void AdaptToX(const OutputDevice &rDev, ULONG nWidth) {};
+ virtual void AdaptToY(const OutputDevice &rDev, ULONG nHeight) {};
+
+ SmNodeType GetType() const { return eType; }
+ const SmToken & GetToken() const { return aNodeToken; }
+
+ const SmNode * FindTokenAt(USHORT nRow, USHORT nCol) const;
+ const SmNode * FindRectClosestTo(const Point &rPoint) const;
+};
+
+
+////////////////////////////////////////////////////////////////////////////////
+
+class SmStructureNode;
+
+DECLARE_DYNARRAY(SmStructureNodeArray, SmStructureNode *);
+
+class SmStructureNode : public SmNode
+{
+ SmNodeArray aSubNodes;
+
+protected:
+ SmStructureNode(SmNodeType eNodeType, const SmToken &rNodeToken)
+ : SmNode(eNodeType, rNodeToken)
+ {}
+
+public:
+ virtual ~SmStructureNode();
+
+ virtual BOOL IsVisible() const { return FALSE; }
+
+ virtual USHORT GetNumSubNodes() const { return aSubNodes.GetSize(); }
+ void SetNumSubNodes(USHORT nSize) { aSubNodes.SetSize(nSize); }
+
+ virtual SmNode * GetSubNode(USHORT nIndex) { return aSubNodes.Get(nIndex); }
+ void SetSubNodes(SmNode *pFirst, SmNode *pSecond,
+ SmNode *pThird = NULL);
+ void SetSubNodes(const SmNodeArray &rNodeArray);
+};
+
+
+////////////////////////////////////////////////////////////////////////////////
+
+
+class SmVisibleNode : public SmNode
+{
+protected:
+ SmVisibleNode(SmNodeType eNodeType, const SmToken &rNodeToken)
+ : SmNode(eNodeType, rNodeToken)
+ {}
+
+public:
+
+ virtual BOOL IsVisible() const { return TRUE; }
+ virtual USHORT GetNumSubNodes() const { return 0; }
+ virtual SmNode * GetSubNode(USHORT nIndex) { return NULL; }
+};
+
+
+////////////////////////////////////////////////////////////////////////////////
+
+
+class SmGraphicNode : public SmVisibleNode
+{
+protected:
+ SmGraphicNode(SmNodeType eNodeType, const SmToken &rNodeToken)
+ : SmVisibleNode(eNodeType, rNodeToken)
+ {}
+
+public:
+};
+
+
+////////////////////////////////////////////////////////////////////////////////
+
+
+class SmRectangleNode : public SmGraphicNode
+{
+ Size aToSize;
+
+public:
+ SmRectangleNode(const SmToken &rNodeToken)
+ : SmGraphicNode(NRECTANGLE, rNodeToken)
+ {}
+
+ virtual void AdaptToX(const OutputDevice &rDev, ULONG nWidth);
+ virtual void AdaptToY(const OutputDevice &rDev, ULONG nHeight);
+
+ virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+ virtual void Draw(OutputDevice &rDev, const Point &rPosition) const;
+};
+
+
+////////////////////////////////////////////////////////////////////////////////
+
+
+class SmPolyLineNode : public SmGraphicNode
+{
+ Polygon aPoly;
+ Size aToSize;
+ long nWidth;
+
+public:
+ SmPolyLineNode(const SmToken &rNodeToken);
+
+ long GetWidth() const { return nWidth; }
+
+ virtual void AdaptToX(const OutputDevice &rDev, ULONG nWidth);
+ virtual void AdaptToY(const OutputDevice &rDev, ULONG nHeight);
+
+ virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+ virtual void Draw(OutputDevice &rDev, const Point &rPosition) const;
+};
+
+
+////////////////////////////////////////////////////////////////////////////////
+
+
+class SmPolygonNode : public SmGraphicNode
+{
+ SmPolygon aPolygon;
+ Size aToSize;
+
+protected:
+ SmPolygonNode(SmNodeType eNodeType, const SmToken &rNodeToken)
+ : SmGraphicNode(eNodeType, rNodeToken),
+ aPolygon(rNodeToken.cMathChar)
+ {}
+
+public:
+ SmPolygonNode(const SmToken &rNodeToken)
+ : SmGraphicNode(NPOLYGON, rNodeToken),
+ aPolygon(rNodeToken.cMathChar)
+ {}
+
+ SmPolygon & GetPolygon() { return aPolygon; }
+ inline const SmPolygon & GetPolygon() const;
+
+ virtual void AdaptToX(const OutputDevice &rDev, ULONG nWidth);
+ virtual void AdaptToY(const OutputDevice &rDev, ULONG nHeight);
+
+ virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+ virtual void Draw(OutputDevice &rDev, const Point &rPosition) const;
+};
+
+inline const SmPolygon & SmPolygonNode::GetPolygon() const
+{
+ return ((SmPolygonNode *) this)->GetPolygon();
+}
+
+
+////////////////////////////////////////////////////////////////////////////////
+
+
+class SmRootSymbolNode : public SmPolygonNode
+{
+ ULONG nBodyWidth; // width of body (argument) of root sign
+
+ void DrawBar(OutputDevice &rDev, const Point &rPosition) const;
+
+public:
+ SmRootSymbolNode(const SmToken &rNodeToken)
+ : SmPolygonNode(NROOTSYMBOL, rNodeToken)
+ {}
+
+
+ virtual void AdaptToX(const OutputDevice &rDev, ULONG nWidth) { nBodyWidth = nWidth; }
+ virtual void AdaptToY(const OutputDevice &rDev, ULONG nHeight);
+
+ virtual void Draw(OutputDevice &rDev, const Point &rPosition) const;
+};
+
+
+////////////////////////////////////////////////////////////////////////////////
+
+
+class SmTextNode : public SmVisibleNode
+{
+ XubString aText;
+ USHORT nFontDesc;
+
+protected:
+ SmTextNode(SmNodeType eNodeType, const SmToken &rNodeToken, USHORT nFontDescP)
+ : SmVisibleNode(eNodeType, rNodeToken)
+ {
+ nFontDesc = nFontDescP;
+ }
+
+public:
+ SmTextNode(const SmToken &rNodeToken, USHORT nFontDescP)
+ : SmVisibleNode(NTEXT, rNodeToken)
+ {
+ nFontDesc = nFontDescP;
+ }
+
+
+ USHORT GetFontDesc() const { return nFontDesc; }
+ void SetText(const XubString &rText) { aText = rText; }
+ const XubString & GetText() const { return aText; }
+
+ virtual void Prepare(const SmFormat &rFormat);
+ virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+ virtual void Draw(OutputDevice &rDev, const Point &rPosition) const;
+};
+
+
+////////////////////////////////////////////////////////////////////////////////
+
+
+class SmSpecialNode : public SmTextNode
+{
+protected:
+ SmSpecialNode(SmNodeType eNodeType, const SmToken &rNodeToken, USHORT nFontDesc)
+ : SmTextNode(eNodeType, rNodeToken, nFontDesc)
+ {}
+
+public:
+ SmSpecialNode(const SmToken &rNodeToken)
+ : SmTextNode(NSPECIAL, rNodeToken, FNT_MATH) //! default Font nicht immer richtig
+ {}
+
+ virtual void Prepare(const SmFormat &rFormat);
+ virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+ virtual void Draw(OutputDevice &rDev, const Point &rPosition) const;
+};
+
+
+////////////////////////////////////////////////////////////////////////////////
+
+
+class SmGlyphSpecialNode : public SmSpecialNode
+{
+public:
+ SmGlyphSpecialNode(const SmToken &rNodeToken)
+ : SmSpecialNode(NGLYPH_SPECIAL, rNodeToken, FNT_MATH)
+ {}
+
+ virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+};
+
+
+////////////////////////////////////////////////////////////////////////////////
+
+
+class SmMathSymbolNode : public SmSpecialNode
+{
+protected:
+ SmMathSymbolNode(SmNodeType eNodeType, const SmToken &rNodeToken)
+ : SmSpecialNode(eNodeType, rNodeToken, FNT_MATH)
+ {}
+
+public:
+ SmMathSymbolNode(const SmToken &rNodeToken);
+
+ virtual void AdaptToX(const OutputDevice &rDev, ULONG nWidth);
+ virtual void AdaptToY(const OutputDevice &rDev, ULONG nHeight);
+
+ virtual void Prepare(const SmFormat &rFormat);
+ virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+};
+
+
+////////////////////////////////////////////////////////////////////////////////
+
+
+class SmPlaceNode : public SmMathSymbolNode
+{
+public:
+ SmPlaceNode(const SmToken &rNodeToken)
+ : SmMathSymbolNode(NPLACE, rNodeToken)
+ {
+ SetText((xub_Unicode) MS_PLACE);
+ }
+
+ virtual void Prepare(const SmFormat &rFormat);
+ virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+};
+
+
+////////////////////////////////////////////////////////////////////////////////
+
+
+class SmErrorNode : public SmMathSymbolNode
+{
+public:
+ SmErrorNode(SmParseError eError, const SmToken &rNodeToken)
+ : SmMathSymbolNode(NERROR, rNodeToken)
+ {
+ SetText((xub_Unicode) MS_ERROR);
+ }
+
+ virtual void Prepare(const SmFormat &rFormat);
+ virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+};
+
+
+////////////////////////////////////////////////////////////////////////////////
+
+
+class SmTableNode : public SmStructureNode
+{
+public:
+ SmTableNode(const SmToken &rNodeToken)
+ : SmStructureNode(NTABLE, rNodeToken)
+ {}
+
+ virtual SmNode * GetLeftMost() { return this; }
+
+ virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+};
+
+
+////////////////////////////////////////////////////////////////////////////////
+
+
+class SmLineNode : public SmStructureNode
+{
+protected:
+ SmLineNode(SmNodeType eNodeType, const SmToken &rNodeToken)
+ : SmStructureNode(eNodeType, rNodeToken)
+ {}
+
+public:
+ SmLineNode(const SmToken &rNodeToken)
+ : SmStructureNode(NLINE, rNodeToken)
+ {}
+
+ virtual void Prepare(const SmFormat &rFormat);
+ virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+};
+
+
+////////////////////////////////////////////////////////////////////////////////
+
+
+class SmExpressionNode : public SmLineNode
+{
+public:
+ SmExpressionNode(const SmToken &rNodeToken)
+ : SmLineNode(NEXPRESSION, rNodeToken)
+ {}
+
+ virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+};
+
+
+////////////////////////////////////////////////////////////////////////////////
+
+
+class SmUnHorNode : public SmStructureNode
+{
+public:
+ SmUnHorNode(const SmToken &rNodeToken)
+ : SmStructureNode(NUNHOR, rNodeToken)
+ {
+ SetNumSubNodes(2);
+ }
+
+ virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+};
+
+
+////////////////////////////////////////////////////////////////////////////////
+
+
+class SmRootNode : public SmStructureNode
+{
+protected:
+ void GetHeightVerOffset(const SmRect &rRect,
+ long &rHeight, long &rVerOffset) const;
+ Point GetExtraPos(const SmRect &rRootSymbol, const SmRect &rExtra) const;
+
+public:
+ SmRootNode(const SmToken &rNodeToken)
+ : SmStructureNode(NROOT, rNodeToken)
+ {
+ SetNumSubNodes(3);
+ }
+
+ virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+};
+
+
+////////////////////////////////////////////////////////////////////////////////
+
+
+class SmBinHorNode : public SmStructureNode
+{
+public:
+ SmBinHorNode(const SmToken &rNodeToken)
+ : SmStructureNode(NBINHOR, rNodeToken)
+ {
+ SetNumSubNodes(3);
+ }
+
+
+
+ virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+};
+
+
+////////////////////////////////////////////////////////////////////////////////
+
+
+class SmBinVerNode : public SmStructureNode
+{
+public:
+ SmBinVerNode(const SmToken &rNodeToken)
+ : SmStructureNode(NBINVER, rNodeToken)
+ {
+ SetNumSubNodes(3);
+ }
+
+ virtual SmNode * GetLeftMost() { return this; }
+
+ virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+};
+
+
+////////////////////////////////////////////////////////////////////////////////
+
+
+class SmBinDiagonalNode : public SmStructureNode
+{
+ BOOL bAscending;
+
+ void GetOperPosSize(Point &rPos, Size &rSize,
+ const Point &rDiagPoint, double fAngleDeg) const;
+
+public:
+ SmBinDiagonalNode(const SmToken &rNodeToken);
+
+ BOOL IsAscending() const { return bAscending; }
+ void SetAscending(BOOL bVal) { bAscending = bVal; }
+
+ virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+};
+
+
+////////////////////////////////////////////////////////////////////////////////
+
+
+// enums used to index sub-/supscripts in the 'aSubNodes' array
+// in 'SmSubSupNode'
+// See graphic for positions at char:
+//
+// CSUP
+//
+// LSUP H H RSUP
+// H H
+// HHHH
+// H H
+// LSUB H H RSUB
+//
+// CSUB
+//
+enum SmSubSup
+{ CSUB, CSUP, RSUB, RSUP, LSUB, LSUP
+};
+
+// numbers of entries in the above enum (that is: the number of possible
+// sub-/supscripts)
+#define SUBSUP_NUM_ENTRIES 6
+
+
+class SmSubSupNode : public SmStructureNode
+{
+ BOOL bUseLimits;
+
+public:
+ SmSubSupNode(const SmToken &rNodeToken)
+ : SmStructureNode(NSUBSUP, rNodeToken)
+ {
+ SetNumSubNodes(1 + SUBSUP_NUM_ENTRIES);
+ bUseLimits = FALSE;
+ }
+
+ SmNode * GetBody() { return GetSubNode(0); }
+ const SmNode * GetBody() const
+ {
+ return ((SmSubSupNode *) this)->GetBody();
+ }
+
+ void SetUseLimits(BOOL bVal) { bUseLimits = bVal; }
+ BOOL IsUseLimits() const { return bUseLimits; };
+
+ SmNode * GetSubSup(SmSubSup eSubSup) { return GetSubNode(1 + eSubSup); };
+
+ virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+};
+
+
+////////////////////////////////////////////////////////////////////////////////
+
+
+class SmBraceNode : public SmStructureNode
+{
+public:
+ SmBraceNode(const SmToken &rNodeToken)
+ : SmStructureNode(NBRACE, rNodeToken)
+ {
+ SetNumSubNodes(3);
+ }
+
+ virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+};
+
+
+////////////////////////////////////////////////////////////////////////////////
+
+
+class SmBracebodyNode : public SmStructureNode
+{
+ long nBodyHeight;
+
+public:
+ inline SmBracebodyNode(const SmToken &rNodeToken);
+
+ virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+ long GetBodyHeight() const { return nBodyHeight; }
+};
+
+
+inline SmBracebodyNode::SmBracebodyNode(const SmToken &rNodeToken)
+: SmStructureNode(NBRACEBODY, rNodeToken)
+{
+ nBodyHeight = 0;
+}
+
+
+////////////////////////////////////////////////////////////////////////////////
+
+
+class SmVerticalBraceNode : public SmStructureNode
+{
+public:
+ inline SmVerticalBraceNode(const SmToken &rNodeToken);
+
+ virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+};
+
+
+SmVerticalBraceNode::SmVerticalBraceNode(const SmToken &rNodeToken)
+: SmStructureNode(NVERTICAL_BRACE, rNodeToken)
+{
+ SetNumSubNodes(3);
+}
+
+
+////////////////////////////////////////////////////////////////////////////////
+
+
+class SmOperNode : public SmStructureNode
+{
+public:
+ SmOperNode(const SmToken &rNodeToken)
+ : SmStructureNode(NOPER, rNodeToken)
+ {
+ SetNumSubNodes(2);
+ }
+
+ SmNode * GetSymbol();
+ const SmNode * GetSymbol() const
+ {
+ return ((SmOperNode *) this)->GetSymbol();
+ }
+
+ long CalcSymbolHeight(const SmNode &rSymbol, const SmFormat &rFormat) const;
+
+ virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+};
+
+
+////////////////////////////////////////////////////////////////////////////////
+
+
+class SmAlignNode : public SmStructureNode
+{
+public:
+ SmAlignNode(const SmToken &rNodeToken)
+ : SmStructureNode(NALIGN, rNodeToken)
+ {}
+
+ virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+};
+
+
+////////////////////////////////////////////////////////////////////////////////
+
+
+class SmAttributNode : public SmStructureNode
+{
+public:
+ SmAttributNode(const SmToken &rNodeToken)
+ : SmStructureNode(NATTRIBUT, rNodeToken)
+ {}
+
+ virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+};
+
+
+////////////////////////////////////////////////////////////////////////////////
+
+
+class SmFontNode : public SmStructureNode
+{
+ USHORT nSizeType;
+ Fraction aFontSize;
+
+public:
+ SmFontNode(const SmToken &rNodeToken)
+ : SmStructureNode(NFONT, rNodeToken)
+ {
+ nSizeType = FNTSIZ_MULTIPLY;
+ aFontSize = Fraction(1L);
+ }
+
+ void SetSizeParameter(const Fraction &rValue, USHORT nType);
+
+ virtual void Prepare(const SmFormat &rFormat);
+ virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+};
+
+
+////////////////////////////////////////////////////////////////////////////////
+
+
+class SmMatrixNode : public SmStructureNode
+{
+ USHORT nNumRows,
+ nNumCols;
+
+public:
+ SmMatrixNode(const SmToken &rNodeToken)
+ : SmStructureNode(NMATRIX, rNodeToken)
+ {
+ nNumRows = nNumCols = 0;
+ }
+
+ USHORT GetNumRows() {return nNumRows;}
+ USHORT GetNumCols() {return nNumCols;}
+ void SetRowCol(USHORT nMatrixRows, USHORT nMatrixCols);
+
+ virtual SmNode * GetLeftMost() { return this; }
+
+ virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+};
+
+
+////////////////////////////////////////////////////////////////////////////////
+
+
+class SmBlankNode : public SmGraphicNode
+{
+ USHORT nNum;
+
+public:
+ SmBlankNode(const SmToken &rNodeToken)
+ : SmGraphicNode(NBLANK, rNodeToken)
+ {
+ nNum = 0;
+ }
+
+ void IncreaseBy(const SmToken &rToken);
+ void Clear() { nNum = 0; }
+
+ virtual void Prepare(const SmFormat &rFormat);
+ virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+};
+
+
+////////////////////////////////////////////////////////////////////////////////
+
+#endif
+
+
diff --git a/starmath/inc/parse.hxx b/starmath/inc/parse.hxx
new file mode 100644
index 000000000000..265fc66699bf
--- /dev/null
+++ b/starmath/inc/parse.hxx
@@ -0,0 +1,301 @@
+/*************************************************************************
+ *
+ * $RCSfile: parse.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:57:24 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef PARSE_HXX
+#define PARSE_HXX
+
+
+#include <ctype.h>
+
+#ifndef _STACK_HXX //autogen
+#include <tools/stack.hxx>
+#endif
+#ifndef _LIST_HXX //autogen
+#include <tools/list.hxx>
+#endif
+#ifndef _STRING_HXX //autogen
+#include <tools/string.hxx>
+#endif
+
+#include "types.hxx"
+
+class SmNode;
+
+
+// TokenGroups
+#define TGOPER 0x00000001
+#define TGRELATION 0x00000002
+#define TGSUM 0x00000004
+#define TGPRODUCT 0x00000008
+#define TGUNOPER 0x00000010
+#define TGPOWER 0x00000020
+#define TGATTRIBUT 0x00000040
+#define TGALIGN 0x00000080
+#define TGFUNCTION 0x00000100
+#define TGBLANK 0x00000200
+#define TGLBRACES 0x00000400
+#define TGRBRACES 0x00000800
+#define TGCOLOR 0x00001000
+#define TGFONT 0x00002000
+#define TGSTANDALONE 0x00004000
+#define TGDISCARDED 0x00008000
+#define TGLIMIT 0x00010000
+#define TGFONTATTR 0x00020000
+
+
+enum SmTokenType
+{
+ TEND, TLGROUP, TRGROUP, TLPARENT, TRPARENT,
+ TLBRACKET, TRBRACKET, TPLUS, TMINUS, TMULTIPLY,
+ TDIVIDEBY, TASSIGN, TPOUND, TSPECIAL, TSLASH,
+ TBACKSLASH, TBLANK, TSBLANK, TRSUB, TRSUP,
+ TCSUB, TCSUP, TLSUB, TLSUP, TGT,
+ TLT, TAND, TOR, TINTERSECT, TUNION,
+ TNEWLINE, TBINOM, TFROM, TTO, TINT,
+ TSUM, TOPER, TABS, TSQRT, TFACT,
+ TNROOT, TOVER, TTIMES, TGE, TLE,
+ TGG, TLL, TDOTSAXIS, TDOTSLOW, TDOTSVERT,
+ TDOTSDIAG, TDOTSUP, TDOTSDOWN, TACUTE, TBAR,
+ TBREVE, TCHECK, TCIRCLE, TDOT, TDDOT,
+ TDDDOT, TGRAVE, THAT, TTILDE, TVEC,
+ TUNDERLINE, TOVERLINE, TOVERSTRIKE, TITALIC, TNITALIC,
+ TBOLD, TNBOLD, TPHANTOM, TFONT, TSIZE,
+ TCOLOR, TALIGNL, TALIGNC, TALIGNR, TLEFT,
+ TRIGHT, TLANGLE, TLBRACE, TLLINE, TLDLINE,
+ TLCEIL, TLFLOOR, TNONE, TMLINE, TRANGLE,
+ TRBRACE, TRLINE, TRDLINE, TRCEIL, TRFLOOR,
+ TSIN, TCOS, TTAN, TCOT, TFUNC,
+ TSTACK, TMATRIX, TMATFORM, TDPOUND, TPLACE,
+ TTEXT, TNUMBER, TCHARACTER, TIDENT, TNEQ,
+ TEQUIV, TDEF, TPROP, TSIM, TSIMEQ,
+ TAPPROX, TPARALLEL, TORTHO, TIN, TNOTIN,
+ TSUBSET, TSUBSETEQ, TSUPSET, TSUPSETEQ, TPLUSMINUS,
+ TMINUSPLUS, TOPLUS, TOMINUS, TDIV, TOTIMES,
+ TODIVIDE, TTRANSL, TTRANSR, TIINT, TIIINT,
+ TLINT, TLLINT, TLLLINT, TPROD, TCOPROD,
+ TFORALL, TEXISTS, TLIM, TNABLA, TTOWARD,
+ TSINH, TCOSH, TTANH, TCOTH, TASIN,
+ TACOS, TATAN, TLN, TLOG, TUOPER,
+ TBOPER, TBLACK, TWHITE, TRED, TGREEN,
+ TBLUE, TCYAN, TMAGENTA, TYELLOW, TFIXED,
+ TSANS, TSERIF, TPOINT, TASINH, TACOSH,
+ TATANH, TACOTH, TACOT, TEXP, TCDOT,
+ TODOT, TLESLANT, TGESLANT, TNSUBSET, TNSUPSET,
+ TNSUBSETEQ, TNSUPSETEQ, TPARTIAL, TNEG, TNI,
+ TBACKEPSILON, TALEPH, TIM, TRE, TWP,
+ TEMPTYSET, TINFINITY, TESCAPE, TLIMSUP, TLIMINF,
+ TNDIVIDES, TDRARROW, TDLARROW, TDLRARROW, TUNDERBRACE,
+ TOVERBRACE, TCIRC, TTOP, THBAR, TLAMBDABAR,
+ TLEFTARROW, TRIGHTARROW, TUPARROW, TDOWNARROW, TDIVIDES,
+ TNDIBVIDES, TSETN, TSETZ, TSETQ, TSETR,
+ TSETC, TWIDEVEC, TWIDETILDE, TWIDEHAT, TWIDESLASH,
+ TWIDEBACKSLASH, TLDBRACKET, TRDBRACKET,
+ TUNKNOWN, TDEBUG
+};
+
+
+struct SmToken
+{
+ // token text
+ XubString aText;
+ // token info
+ SmTokenType eType;
+ xub_Unicode cMathChar;
+ // parse-help info
+ ULONG nGroup;
+ USHORT nLevel;
+ // token position
+ USHORT nRow;
+ USHORT nCol;
+
+ SmToken();
+};
+
+
+enum SmParseError
+{
+ PE_NONE, PE_UNEXPECTED_END_OF_INPUT,
+ PE_UNEXPECTED_CHAR, PE_UNEXPECTED_TOKEN,
+ PE_FUNC_EXPECTED, PE_UNOPER_EXPECTED,
+ PE_BINOPER_EXPECTED, PE_SYMBOL_EXPECTED,
+ PE_IDENTIFIER_EXPECTED, PE_POUND_EXPECTED,
+ PE_COLOR_EXPECTED, PE_LGROUP_EXPECTED,
+ PE_RGROUP_EXPECTED, PE_LBRACE_EXPECTED,
+ PE_RBRACE_EXPECTED, PE_PARENT_MISMATCH,
+ PE_RIGHT_EXPECTED, PE_FONT_EXPECTED,
+ PE_SIZE_EXPECTED, PE_DOUBLE_ALIGN,
+ PE_DOUBLE_SUBSUPSCRIPT
+};
+
+
+struct SmErrorDesc
+{
+ SmParseError Type;
+ SmNode *pNode;
+ XubString Text;
+};
+
+DECLARE_STACK(SmNodeStack, SmNode *);
+DECLARE_LIST(SmErrDescList, SmErrorDesc *);
+
+/**************************************************************************/
+
+class SmParser
+{
+ XubString BufferString;
+ SmToken CurToken;
+ SmNodeStack NodeStack;
+ SmErrDescList ErrDescList;
+ int CurError;
+ xub_StrLen BufferIndex,
+ nTokenIndex;
+ USHORT Row,
+ Column;
+ xub_Unicode CharLineEnd;
+ BOOL bConvert40To50;
+
+ // declare copy-constructor and assignment-operator private
+ SmParser(const SmParser &);
+ SmParser & operator = (const SmParser &);
+
+protected:
+ BOOL IsDelimiter(xub_Unicode cChar);
+ void NextToken();
+ xub_StrLen GetTokenIndex() const { return nTokenIndex; }
+ void Insert(const XubString &rText, USHORT nPos);
+
+ inline BOOL TokenInGroup(ULONG nGroup);
+ inline BOOL IsWhiteSpace(const xub_Unicode cChar) const;
+ inline BOOL IsComment(const xub_Unicode *pPos) const;
+
+ const xub_Unicode * SkipWhiteSpaces(const xub_Unicode *pPos, USHORT &nRow, USHORT &nColumn);
+ const xub_Unicode * SkipComment(const xub_Unicode *pPos, USHORT &nRow, USHORT &nColumn);
+
+ // grammar
+ void Table();
+ void Line();
+ void Expression();
+ void Relation();
+ void Sum();
+ void Product();
+ void SubSup(ULONG nActiveGroup);
+ void OpSubSup();
+ void Power();
+ void Blank();
+ void Term();
+ void Escape();
+ void Operator();
+ void Oper();
+ void UnOper();
+ void Align();
+ void FontAttribut();
+ void Attribut();
+ void Font();
+ void FontSize();
+ void Color();
+ void Brace();
+ void Bracebody(BOOL bIsLeftRight);
+ void Function();
+ void Binom();
+ void Stack();
+ void Matrix();
+ void Special();
+ void GlyphSpecial();
+ // end of grammar
+
+ void Error(SmParseError Error);
+
+public:
+ SmParser();
+
+ BOOL CheckSyntax(const XubString &rBuffer);
+ SmNode *Parse(const XubString &rBuffer);
+
+ const XubString & GetText() const { return BufferString; };
+
+ BOOL IsConvert40To50() const { return bConvert40To50; }
+ void SetConvert40To50(BOOL bConvert) { bConvert40To50 = bConvert; }
+
+ USHORT AddError(SmParseError Type, SmNode *pNode);
+
+ const SmErrorDesc * NextError();
+ const SmErrorDesc * PrevError();
+ const SmErrorDesc * GetError(USHORT i = 0xFFFF);
+};
+
+
+inline BOOL SmParser::TokenInGroup(ULONG nGroup)
+{
+ return (CurToken.nGroup & nGroup) ? TRUE : FALSE;
+}
+
+inline BOOL SmParser::IsWhiteSpace(const xub_Unicode cChar) const
+{
+ return isspace(cChar) != 0;
+}
+
+inline BOOL SmParser::IsComment(const xub_Unicode *pPos) const
+{
+ return *pPos == '%' && *(pPos + 1) == '%';
+}
+
+
+#endif
+
diff --git a/starmath/inc/rect.hxx b/starmath/inc/rect.hxx
new file mode 100644
index 000000000000..6e8b9d6b6203
--- /dev/null
+++ b/starmath/inc/rect.hxx
@@ -0,0 +1,304 @@
+/*************************************************************************
+ *
+ * $RCSfile: rect.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:57:24 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef RECT_HXX
+#define RECT_HXX
+
+#include <new.h>
+
+
+#ifndef _GEN_HXX //autogen
+#include <tools/gen.hxx>
+#endif
+
+#ifndef _SV_OUTDEV_HXX //autogen
+#include <vcl/outdev.hxx>
+#endif
+
+#ifndef _SV_METRIC_HXX //autogen
+#include <vcl/metric.hxx>
+#endif
+
+#ifndef _TOOLS_DEBUG_HXX //autogen
+#include <tools/debug.hxx>
+#endif
+
+#include "format.hxx"
+
+
+class SmPolygon;
+
+BOOL SmGetGlyphBoundRect(const OutputDevice &rDev,
+ const XubString &rText, Rectangle &rRect);
+
+BOOL SmIsMathAlpha(const XubString &rText);
+
+
+inline long SmFromTo(long nFrom, long nTo, double fRelDist)
+{
+ return nFrom + (long) (fRelDist * (nTo - nFrom));
+}
+
+
+////////////////////////////////////////
+// SmRect
+// ... (to be done)
+// This Implementation assumes that the x-axis points to the right and the
+// y-axis to the bottom.
+// Note: however, italic spaces can be negative!
+//
+
+// possible flags for the 'Draw' function below (just for debugging)
+#define SM_RECT_CORE 0x0001
+#define SM_RECT_ITALIC 0x0002
+#define SM_RECT_LINES 0x0004
+#define SM_RECT_MID 0x0008
+
+// possible positions and alignments for the 'AlignTo' function
+enum RectPos
+ // (RP_LEFT : align the current object to the left of the argument, ...)
+{ RP_LEFT, RP_RIGHT,
+ RP_TOP, RP_BOTTOM,
+ RP_ATTRIBUT
+};
+enum RectHorAlign
+{ RHA_LEFT, RHA_CENTER, RHA_RIGHT
+};
+enum RectVerAlign
+{ RVA_TOP, RVA_MID, RVA_BOTTOM, RVA_BASELINE, RVA_CENTERY,
+ RVA_ATTRIBUT_HI, RVA_ATTRIBUT_MID, RVA_ATTRIBUT_LO
+};
+
+// different methods of copying baselines and mid's in 'ExtendBy' function
+enum RectCopyMBL
+{ RCP_THIS, // keep baseline of current object even if it has none
+ RCP_ARG, // as above but for the argument
+ RCP_NONE, // result will have no baseline
+ RCP_XOR // if current object has a baseline keep it else copy
+ // the arguments baseline (even if it has none)
+};
+
+
+class SmRect
+{
+ Point aTopLeft;
+ Size aSize;
+ long nBaseline,
+ nAlignT,
+ nAlignM,
+ nAlignB,
+ nGlyphTop,
+ nGlyphBottom,
+ nItalicLeftSpace,
+ nItalicRightSpace,
+ nLoAttrFence,
+ nHiAttrFence;
+ BOOL bHasBaseline,
+ bHasAlignInfo;
+
+protected:
+ void BuildRect (const OutputDevice &rDev, const SmFormat *pFormat,
+ const XubString &rText, long nBorderWidth);
+ void Init(const OutputDevice &rDev, const SmFormat *pFormat,
+ const XubString &rText, long nBorderWidth);
+
+ void ClearBaseline() { bHasBaseline = FALSE; };
+ inline void CopyMBL(const SmRect& rRect);
+ void CopyAlignInfo(const SmRect& rRect);
+
+ SmRect & Union(const SmRect &rRect);
+
+public:
+ SmRect();
+ SmRect(const OutputDevice &rDev, const SmFormat *pFormat,
+ const XubString &rText, long nBorderWidth);
+ SmRect(const OutputDevice &rDev, const SmFormat *pFormat,
+ const SmPolygon &rPoly, long nBorderWidth);
+ SmRect(long nWidth, long nHeight);
+ SmRect(const SmRect &rRect);
+
+ inline void SetItalicSpaces(long nLeftSpace, long nRightSpace);
+
+ void SetWidth(ULONG nWidth) { aSize.Width() = nWidth; }
+ void SetHeight(ULONG nHeight) { aSize.Height() = nHeight; }
+
+ void SetLeft(long nLeft);
+ void SetRight(long nRight);
+ void SetBottom(long nBottom);
+ void SetTop(long nTop);
+
+ const Point & GetTopLeft() const { return aTopLeft; }
+
+ long GetTop() const { return GetTopLeft().Y(); }
+ long GetLeft() const { return GetTopLeft().X(); }
+ long GetBottom() const { return GetTop() + GetHeight() - 1; }
+ long GetRight() const { return GetLeft() + GetWidth() - 1; }
+ long GetCenterX() const { return (GetLeft() + GetRight()) / 2L; }
+ long GetCenterY() const { return (GetTop() + GetBottom()) / 2L; }
+ long GetWidth() const { return GetSize().Width(); }
+ long GetHeight() const { return GetSize().Height(); }
+
+ long GetItalicLeftSpace() const { return nItalicLeftSpace; }
+ long GetItalicRightSpace() const { return nItalicRightSpace; }
+
+ void SetHiAttrFence(long nVal) { nHiAttrFence = nVal; }
+ void SetLoAttrFence(long nVal) { nLoAttrFence = nVal; }
+ long GetHiAttrFence() const { return nHiAttrFence; }
+ long GetLoAttrFence() const { return nLoAttrFence; }
+
+ long GetItalicLeft() const { return GetLeft() - GetItalicLeftSpace(); }
+ long GetItalicCenterX() const { return (GetItalicLeft() + GetItalicRight()) / 2; }
+ long GetItalicRight() const { return GetRight() + GetItalicRightSpace(); }
+ long GetItalicWidth() const { return GetWidth() + GetItalicLeftSpace() + GetItalicRightSpace(); }
+
+ BOOL HasBaseline() const { return bHasBaseline; }
+ inline long GetBaseline() const;
+ long GetBaselineOffset() const { return GetBaseline() - GetTop(); }
+
+ void SetAlignTop(long nVal) { nAlignT = nVal; }
+
+ long GetAlignT() const { return nAlignT; }
+ long GetAlignM() const { return nAlignM; }
+ long GetAlignB() const { return nAlignB; }
+
+ void SetAlignT(long nVal) { nAlignT = nVal; }
+
+ const Point GetCenter() const
+ { return Point(GetCenterX(), GetCenterY()); }
+
+ const Size & GetSize() const { return aSize; }
+
+ const Size GetItalicSize() const
+ { return Size(GetItalicWidth(), GetHeight()); }
+
+ void Move (const Point &rPosition);
+ void MoveTo(const Point &rPosition) { Move(rPosition - GetTopLeft()); }
+
+ BOOL IsEmpty() const
+ {
+ return GetWidth() == 0 || GetHeight() == 0;
+ }
+
+ BOOL HasAlignInfo() const { return bHasAlignInfo; }
+
+ const Point AlignTo(const SmRect &rRect, RectPos ePos,
+ RectHorAlign eHor, RectVerAlign eVer) const;
+
+ SmRect & ExtendBy(const SmRect &rRect, RectCopyMBL eCopyMode);
+ SmRect & ExtendBy(const SmRect &rRect, RectCopyMBL eCopyMode,
+ long nNewAlignM);
+ SmRect & ExtendBy(const SmRect &rRect, RectCopyMBL eCopyMode,
+ BOOL bKeepVerAlignParams);
+ SmRect & ExtendBy(const Point &rPoint);
+
+ long OrientedDist(const Point &rPoint) const;
+ BOOL IsInsideRect(const Point &rPoint) const;
+ BOOL IsInsideItalicRect(const Point &rPoint) const;
+
+ inline SmRect & operator = (const SmRect &rRect);
+
+ inline Rectangle AsRectangle() const;
+ SmRect AsGlyphRect() const;
+
+ void Draw(OutputDevice &rDev, const Point &rPosition, int nFlags) const;
+};
+
+
+inline void SmRect::SetItalicSpaces(long nLeftSpace, long nRightSpace)
+ // set extra spacing to the left and right for (italic)
+ // letters/text
+{
+ nItalicLeftSpace = nLeftSpace;
+ nItalicRightSpace = nRightSpace;
+}
+
+
+inline void SmRect::CopyMBL(const SmRect &rRect)
+ // copy AlignM baseline and value of 'rRect'
+{
+ nBaseline = rRect.nBaseline;
+ bHasBaseline = rRect.bHasBaseline;
+ nAlignM = rRect.nAlignM;
+}
+
+
+inline long SmRect::GetBaseline() const
+{
+ DBG_ASSERT(HasBaseline(), "Sm: Baseline nicht vorhanden");
+ return nBaseline;
+}
+
+
+inline SmRect & SmRect::operator = (const SmRect &rRect)
+{
+ new (this) SmRect(rRect); // placement new
+ return *this;
+}
+
+
+inline Rectangle SmRect::AsRectangle() const
+{
+ return Rectangle(Point(GetItalicLeft(), GetTop()), GetItalicSize());
+}
+
+
+
+#endif
diff --git a/starmath/inc/smdll.hxx b/starmath/inc/smdll.hxx
new file mode 100644
index 000000000000..8d68db066e16
--- /dev/null
+++ b/starmath/inc/smdll.hxx
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * $RCSfile: smdll.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:57:24 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef SMDLL_HXX
+#define SMDLL_HXX
+
+#define SMDLL 1
+
+#ifndef _SMDLL0_HXX
+#include <smdll0.hxx>
+#endif
+#ifndef _TOOLS_RESID_HXX //autogen
+#include <tools/resid.hxx>
+#endif
+#ifndef _SFXDEFS_HXX
+#include <sfx2/sfxdefs.hxx>
+#endif
+
+class SmData;
+class SfxMedium;
+class SfxFilter;
+
+class SmDLL
+{
+ static BOOL bInitialized;
+public:
+ SmDLL();
+ ~SmDLL();
+
+ static void Init();
+ static void LibInit();
+ static void Exit();
+ static void LibExit();
+
+ static ULONG DetectFilter( SfxMedium& rMedium, const SfxFilter **ppFilter,
+ SfxFilterFlags nMust, SfxFilterFlags nDont );
+};
+
+#ifdef SMDLL
+class SmResId : public ResId
+{
+public:
+ SmResId(USHORT nId) :
+ ResId(nId, SM_MOD()->GetResMgr())
+ {
+ }
+};
+#endif
+
+#endif
+
diff --git a/starmath/inc/smmod.hxx b/starmath/inc/smmod.hxx
new file mode 100644
index 000000000000..a99ca19e654c
--- /dev/null
+++ b/starmath/inc/smmod.hxx
@@ -0,0 +1,128 @@
+/*************************************************************************
+ *
+ * $RCSfile: smmod.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:57:24 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SMMOD_HXX
+#define _SMMOD_HXX
+
+
+#ifndef _SMDLL_HXX
+#define _SM_DLL // fuer SD_MOD()
+#include "smdll.hxx" // fuer SdModuleDummy
+#endif
+
+class SvxErrorHandler;
+class SvFactory;
+
+class SmConfig;
+class SmSymSetManager;
+class SmModule;
+
+/*************************************************************************
+|*
+|* This subclass of <SfxModule> (which is a subclass of <SfxShell>) is
+|* linked to the DLL. One instance of this class exists while the DLL is
+|* loaded.
+|*
+|* SdModule is like to be compared with the <SfxApplication>-subclass.
+|*
+|* Remember: Don`t export this class! It uses DLL-internal symbols.
+|*
+\************************************************************************/
+
+class SmRectCache;
+
+class SmModule : public SmModuleDummy
+{
+ SmConfig *pConfig;
+ SmSymSetManager *pSymSetManager;
+ SmRectCache *pRectCache;
+
+ virtual void FillStatusBar(StatusBar &rBar);
+
+public:
+ TYPEINFO();
+ SFX_DECL_INTERFACE(SFX_INTERFACE_SMA_START + 0);
+
+ SmModule(SvFactory* pObjFact);
+ virtual ~SmModule();
+
+ virtual SfxModule * Load();
+ virtual void Free();
+
+ SmConfig * GetConfig() { return pConfig; }
+ SmSymSetManager * GetSymSetManager() { return pSymSetManager; }
+ SmRectCache * GetRectCache() { return pRectCache; }
+
+ void GetState(SfxItemSet&);
+ void InitManager();
+
+ //virtuelle Methoden fuer den Optionendialog
+ virtual SfxItemSet* CreateItemSet( USHORT nId );
+ virtual void ApplyItemSet( USHORT nId, const SfxItemSet& rSet );
+ virtual SfxTabPage* CreateTabPage( USHORT nId, Window* pParent, const SfxItemSet& rSet );
+};
+
+
+#define SM_MOD1() ( *(SmModule**) GetAppData(SHL_SM) )
+
+
+#endif // _SDMOD_HXX
+
diff --git a/starmath/inc/starmath.hrc b/starmath/inc/starmath.hrc
new file mode 100644
index 000000000000..7ef5fd663018
--- /dev/null
+++ b/starmath/inc/starmath.hrc
@@ -0,0 +1,758 @@
+/*************************************************************************
+ *
+ * $RCSfile: starmath.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:57:25 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _STARMATH_HRC
+#define _STARMATH_HRC
+
+#ifndef _SVX_SVXIDS_HRC
+#include <svtools/solar.hrc>
+#endif
+#ifndef _SFXSIDS_HRC //autogen
+#include <sfx2/sfxsids.hrc>
+#endif
+
+
+#define SID_NEXTERR (SID_SMA_START + 1)
+#define SID_PREVERR (SID_SMA_START + 2)
+#define SID_NEXTMARK (SID_SMA_START + 3)
+#define SID_PREVMARK (SID_SMA_START + 4)
+#define SID_SYMBOLS_CATALOGUE (SID_SMA_START + 5)
+#define SID_PREFERENCES (SID_SMA_START + 6)
+#define SID_VIEW050 (SID_SMA_START + 7)
+#define SID_VIEW100 (SID_SMA_START + 8)
+#define SID_VIEW200 (SID_SMA_START + 9)
+#define SID_ZOOMIN (SID_SMA_START + 10)
+#define SID_ZOOMOUT (SID_SMA_START + 11)
+#define SID_DRAW (SID_SMA_START + 12)
+#define SID_ADJUST (SID_SMA_START + 13)
+#define SID_TOOLBOX (SID_SMA_START + 14)
+#define SID_FORMULACURSOR (SID_SMA_START + 15)
+#define SID_FONT (SID_SMA_START + 50)
+#define SID_FONTSIZE (SID_SMA_START + 51)
+#define SID_DISTANCE (SID_SMA_START + 52)
+#define SID_ALIGN (SID_SMA_START + 53)
+#define SID_SYMBOLS_LOAD (SID_SMA_START + 54)
+#define SID_AUTO_REDRAW (SID_SMA_START + 55)
+#define SID_SYMBOLS (SID_SMA_START + 56) // Muss erstmal wieder aufgenommen werden !
+#define SID_TEXTMODE (SID_SMA_START + 57)
+#define SID_INSERT_FORMULA (SID_SMA_START + 58)
+#define SID_TEXT (SID_SMA_START + 100)
+#define SID_GRAPHIC (SID_SMA_START + 101)
+#define SID_FITINWINDOW (SID_SMA_START + 103)
+#define SID_INSERTTEXT (SID_SMA_START + 104)
+#define SID_INSERTCOMMAND (SID_SMA_START + 105)
+
+#define SID_LOADSYMBOLS (SID_SMA_START + 107)
+#define SID_SAVESYMBOLS (SID_SMA_START + 108)
+#define SID_ZOOMSTATUS (SID_SMA_START + 109)
+#define SID_MODIFYSTATUS (SID_SMA_START + 110)
+#define SID_TEXTSTATUS (SID_SMA_START + 111)
+
+#define SID_PRINTTITLE (SID_SMA_START + 112)
+#define SID_PRINTTEXT (SID_SMA_START + 113)
+#define SID_PRINTFRAME (SID_SMA_START + 114)
+#define SID_PRINTSIZE (SID_SMA_START + 115)
+#define SID_PRINTZOOM (SID_SMA_START + 116)
+
+#define SID_COPYOBJECT (SID_SMA_START + 117)
+#define SID_PASTEOBJECT (SID_SMA_START + 118)
+#define SID_AUTOREDRAW (SID_SMA_START + 119)
+#define SID_SYMBOLFILE (SID_SMA_START + 120)
+#define SID_GETEDITTEXT (SID_SMA_START + 121)
+#define SID_CMDBOXWINDOW (SID_SMA_START + 122)
+#define SID_TOOLBOXWINDOW (SID_SMA_START + 123)
+#define SID_NO_RIGHT_SPACES (SID_SMA_START + 124)
+#define SID_DUMMY (SID_SMA_START + 254)
+
+//#define GID_FORMEL (RID_GROUPS_OFFSET + 1)
+//#define GID_ERROR (RID_GROUPS_OFFSET + 2)
+
+//#define RID_OPTIONSDIALOG (RID_APP_START + 1)
+#define RID_FONTDIALOG (RID_APP_START + 2)
+#define RID_FONTSIZEDIALOG (RID_APP_START + 3)
+#define RID_FONTTYPEDIALOG (RID_APP_START + 4)
+#define RID_DISTANCEDIALOG (RID_APP_START + 5)
+#define RID_ALIGNDIALOG (RID_APP_START + 6)
+#define RID_PRINTOPTIONPAGE (RID_APP_START + 7)
+#define RID_SYMBOLDIALOG (RID_APP_START + 8)
+#define RID_SYMDEFINEDIALOG (RID_APP_START + 9)
+#define RID_EXTRAOPTIONPAGE (RID_APP_START + 10)
+#define RID_MATH_TOOLBOX (RID_APP_START + 50)
+// wegen #58705# entfernt
+//#define RID_DRAW_OBJECTBAR (RID_APP_START + 51)
+
+#define RID_DEFAULTSAVEQUERY (RID_APP_START + 102)
+#define RID_WRITESYMBOLERROR (RID_APP_START + 202)
+#define RID_READSYMBOLERROR (RID_APP_START + 203)
+#define RID_NOMATHTYPEFACEWARNING (RID_APP_START + 204)
+#define RID_OBJECTNAME (RID_APP_START + 501)
+#define RID_VIEWNAME (RID_APP_START + 502)
+#define RID_UNDOEDITNAME (RID_APP_START + 503)
+#define RID_UNDOFORMATNAME (RID_APP_START + 504)
+#define RID_APPICO (RID_APP_START + 601)
+#define RID_TMPICO (RID_APP_START + 603)
+#define RID_COMMANDMENU (RID_APP_START + 701)
+#define RID_VIEWMENU (RID_APP_START + 702)
+#define RID_DISTANCEMENU (RID_APP_START + 703)
+#define RID_FONTMENU (RID_APP_START + 704)
+#define RID_STARTUPWINDOW (RID_APP_START + 800)
+#define RID_TOOLBOXWINDOW (RID_APP_START + 801)
+#define RID_CMDBOXWINDOW (RID_APP_START + 802)
+#define RID_FONTREGULAR (RID_APP_START + 804)
+#define RID_FONTITALIC (RID_APP_START + 805)
+#define RID_FONTBOLD (RID_APP_START + 806)
+//#define RID_PRINTOPTION (RID_APP_START + 807)
+#define RID_DOCUMENTSTR (RID_APP_START + 808)
+#define RID_SYMBOLFILESSTR (RID_APP_START + 809)
+#define RID_ALLFILESSTR (RID_APP_START + 810)
+#define RID_CREATORSTR (RID_APP_START + 811)
+#define RID_FILESMFTYP (RID_APP_START + 812)
+#define RID_FILESYMTYP (RID_APP_START + 813)
+#define RID_SMMENU (RID_APP_START + 814)
+#define RID_SMACCEL (RID_APP_START + 815)
+#define RID_STATUSBAR (RID_APP_START + 816)
+#define RID_APPNAMESTR (RID_APP_START + 817)
+#define STR_MATH_DOCUMENT_FULLTYPE_40 (RID_APP_START + 818)
+#define STR_MATH_DOCUMENT_FULLTYPE_31 (RID_APP_START + 819)
+#define STR_MATH_DOCUMENT_FULLTYPE_50 (RID_APP_START + 820)
+
+#define RID_ERR_IDENT (RID_APP_START + 920)
+#define RID_ERR_UNKOWN (RID_APP_START + 921)
+#define RID_ERR_UNEXPECTEDCHARACTER (RID_APP_START + 922)
+#define RID_ERR_LGROUPEXPECTED (RID_APP_START + 923)
+#define RID_ERR_RGROUPEXPECTED (RID_APP_START + 924)
+#define RID_ERR_LBRACEEXPECTED (RID_APP_START + 925)
+#define RID_ERR_RBRACEEXPECTED (RID_APP_START + 926)
+#define RID_ERR_FUNCEXPECTED (RID_APP_START + 927)
+#define RID_ERR_UNOPEREXPECTED (RID_APP_START + 928)
+#define RID_ERR_BINOPEREXPECTED (RID_APP_START + 929)
+#define RID_ERR_SYMBOLEXPECTED (RID_APP_START + 930)
+#define RID_ERR_IDENTEXPECTED (RID_APP_START + 931)
+#define RID_ERR_POUNDEXPECTED (RID_APP_START + 932)
+#define RID_ERR_COLOREXPECTED (RID_APP_START + 933)
+#define RID_ERR_LPARENTEXPECTED (RID_APP_START + 934)
+#define RID_ERR_RPARENTEXPECTED (RID_APP_START + 935)
+#define RID_ERR_RIGHTEXPECTED (RID_APP_START + 936)
+#define RID_ERR_OVERFLOW (RID_APP_START + 937)
+
+#define RID_UNBINOPS_CAT (RID_APP_START + 1101)
+#define RID_RELATIONS_CAT (RID_APP_START + 1102)
+#define RID_SETOPERATIONS_CAT (RID_APP_START + 1103)
+#define RID_FUNCTIONS_CAT (RID_APP_START + 1104)
+#define RID_OPERATORS_CAT (RID_APP_START + 1105)
+#define RID_ATTRIBUTES_CAT (RID_APP_START + 1106)
+#define RID_BRACKETS_CAT (RID_APP_START + 1107)
+#define RID_FORMAT_CAT (RID_APP_START + 1108)
+#define RID_UNBINOPS_CAT_HLP (RID_APP_START + 1109)
+#define RID_RELATIONS_CAT_HLP (RID_APP_START + 1110)
+#define RID_SETOPEROPERATIONS_CAT_HLP (RID_APP_START + 1111)
+#define RID_FUNCTIONS_CAT_HLP (RID_APP_START + 1112)
+#define RID_OPERATORS_CAT_HLP (RID_APP_START + 1113)
+#define RID_ATTRIBUTES_CAT_HLP (RID_APP_START + 1114)
+#define RID_BRACKETS_CAT_HLP (RID_APP_START + 1115)
+#define RID_FORMAT_CAT_HLP (RID_APP_START + 1116)
+#define RID_MISC_CAT (RID_APP_START + 1117)
+#define RID_MISC_CAT_HLP (RID_APP_START + 1118)
+
+// new resource ID's
+#define RID_PLUSX (RID_APP_START + 1201)
+#define RID_MINUSX (RID_APP_START + 1202)
+#define RID_PLUSMINUSX (RID_APP_START + 1203)
+#define RID_MINUSPLUSX (RID_APP_START + 1204)
+#define RID_XPLUSY (RID_APP_START + 1205)
+#define RID_XCDOTY (RID_APP_START + 1206)
+#define RID_XTIMESY (RID_APP_START + 1207)
+#define RID_XSYMTIMESY (RID_APP_START + 1208)
+#define RID_XMINUSY (RID_APP_START + 1209)
+#define RID_XOVERY (RID_APP_START + 1210)
+#define RID_XDIVY (RID_APP_START + 1211)
+#define RID_XSYMDIVIDEY (RID_APP_START + 1212)
+#define RID_NEGX (RID_APP_START + 1213)
+#define RID_XANDY (RID_APP_START + 1214)
+#define RID_XORY (RID_APP_START + 1215)
+#define RID_XODIVIDEY (RID_APP_START + 1216)
+#define RID_XODOTY (RID_APP_START + 1217)
+#define RID_XOMINUSY (RID_APP_START + 1218)
+#define RID_XOPLUSY (RID_APP_START + 1219)
+#define RID_XOTIMESY (RID_APP_START + 1220)
+#define RID_XCIRCY (RID_APP_START + 1221)
+#define RID_XWIDESLASHY (RID_APP_START + 1222)
+#define RID_XWIDEBSLASHY (RID_APP_START + 1223)
+
+#define RID_XEQY (RID_APP_START + 1301)
+#define RID_XNEQY (RID_APP_START + 1302)
+#define RID_XEQUIVY (RID_APP_START + 1303)
+#define RID_XORTHOY (RID_APP_START + 1304)
+#define RID_XLTY (RID_APP_START + 1305)
+#define RID_XGTY (RID_APP_START + 1306)
+#define RID_XAPPROXY (RID_APP_START + 1307)
+#define RID_XPARALLELY (RID_APP_START + 1308)
+#define RID_XLESLANTY (RID_APP_START + 1309)
+#define RID_XGESLANTY (RID_APP_START + 1310)
+#define RID_XSIMEQY (RID_APP_START + 1311)
+#define RID_XPROPY (RID_APP_START + 1312)
+#define RID_XLEY (RID_APP_START + 1313)
+#define RID_XGEY (RID_APP_START + 1314)
+#define RID_XSIMY (RID_APP_START + 1315)
+#define RID_XTOWARDY (RID_APP_START + 1316)
+#define RID_XLLY (RID_APP_START + 1317)
+#define RID_XGGY (RID_APP_START + 1318)
+#define RID_XDEFY (RID_APP_START + 1319)
+#define RID_XTRANSLY (RID_APP_START + 1320)
+#define RID_XTRANSRY (RID_APP_START + 1321)
+#define RID_XDIVIDESY (RID_APP_START + 1322)
+#define RID_XNDIVIDESY (RID_APP_START + 1323)
+#define RID_DLARROW (RID_APP_START + 1324)
+#define RID_DLRARROW (RID_APP_START + 1325)
+#define RID_DRARROW (RID_APP_START + 1326)
+
+#define RID_XINY (RID_APP_START + 1401)
+#define RID_XNOTINY (RID_APP_START + 1402)
+#define RID_XOWNSY (RID_APP_START + 1403)
+#define RID_XINTERSECTIONY (RID_APP_START + 1405)
+#define RID_XUNIONY (RID_APP_START + 1406)
+#define RID_XSETMINUSY (RID_APP_START + 1407)
+#define RID_XSLASHY (RID_APP_START + 1408)
+#define RID_XSUBSETY (RID_APP_START + 1409)
+#define RID_XSUBSETEQY (RID_APP_START + 1410)
+#define RID_XSUPSETY (RID_APP_START + 1411)
+#define RID_XSUPSETEQY (RID_APP_START + 1412)
+#define RID_XNSUBSETY (RID_APP_START + 1413)
+#define RID_XNSUBSETEQY (RID_APP_START + 1414)
+#define RID_XNSUPSETY (RID_APP_START + 1415)
+#define RID_XNSUPSETEQY (RID_APP_START + 1416)
+#define RID_SETN (RID_APP_START + 1417)
+#define RID_SETZ (RID_APP_START + 1418)
+#define RID_SETQ (RID_APP_START + 1419)
+#define RID_SETR (RID_APP_START + 1420)
+#define RID_SETC (RID_APP_START + 1421)
+
+#define RID_ABSX (RID_APP_START + 1501)
+#define RID_FACTX (RID_APP_START + 1502)
+#define RID_SQRTX (RID_APP_START + 1503)
+#define RID_NROOTXY (RID_APP_START + 1504)
+#define RID_EX (RID_APP_START + 1505)
+#define RID_LNX (RID_APP_START + 1506)
+#define RID_EXPX (RID_APP_START + 1507)
+#define RID_LOGX (RID_APP_START + 1508)
+#define RID_SINX (RID_APP_START + 1509)
+#define RID_COSX (RID_APP_START + 1510)
+#define RID_TANX (RID_APP_START + 1511)
+#define RID_COTX (RID_APP_START + 1512)
+#define RID_SINHX (RID_APP_START + 1513)
+#define RID_COSHX (RID_APP_START + 1514)
+#define RID_TANHX (RID_APP_START + 1515)
+#define RID_COTHX (RID_APP_START + 1516)
+#define RID_ARCSINX (RID_APP_START + 1517)
+#define RID_ARCCOSX (RID_APP_START + 1518)
+#define RID_ARCTANX (RID_APP_START + 1519)
+#define RID_ARCCOTX (RID_APP_START + 1520)
+#define RID_ARSINHX (RID_APP_START + 1521)
+#define RID_ARCOSHX (RID_APP_START + 1522)
+#define RID_ARTANHX (RID_APP_START + 1523)
+#define RID_ARCOTHX (RID_APP_START + 1524)
+
+#define RID_LIMX (RID_APP_START + 1601)
+#define RID_SUMX (RID_APP_START + 1602)
+#define RID_PRODX (RID_APP_START + 1603)
+#define RID_COPRODX (RID_APP_START + 1604)
+#define RID_INTX (RID_APP_START + 1605)
+#define RID_IINTX (RID_APP_START + 1606)
+#define RID_IIINTX (RID_APP_START + 1607)
+#define RID_LINTX (RID_APP_START + 1609)
+#define RID_LLINTX (RID_APP_START + 1610)
+#define RID_LLLINTX (RID_APP_START + 1611)
+#define RID_FROMXTOY (RID_APP_START + 1613)
+#define RID_FROMX (RID_APP_START + 1614)
+#define RID_TOX (RID_APP_START + 1615)
+#define RID_LIMINFX (RID_APP_START + 1616)
+#define RID_LIMSUPX (RID_APP_START + 1617)
+
+#define RID_ACUTEX (RID_APP_START + 1701)
+#define RID_GRAVEX (RID_APP_START + 1702)
+#define RID_CHECKX (RID_APP_START + 1703)
+#define RID_BREVEX (RID_APP_START + 1704)
+#define RID_BARX (RID_APP_START + 1705)
+#define RID_VECX (RID_APP_START + 1706)
+#define RID_HATX (RID_APP_START + 1707)
+#define RID_TILDEX (RID_APP_START + 1708)
+#define RID_CIRCLEX (RID_APP_START + 1709)
+#define RID_DOTX (RID_APP_START + 1710)
+#define RID_DDOTX (RID_APP_START + 1711)
+#define RID_DDDOTX (RID_APP_START + 1712)
+#define RID_OVERLINEX (RID_APP_START + 1713)
+#define RID_UNDERLINEX (RID_APP_START + 1714)
+#define RID_OVERSTRIKEX (RID_APP_START + 1715)
+#define RID_PHANTOMX (RID_APP_START + 1716)
+#define RID_BOLDX (RID_APP_START + 1717)
+#define RID_ITALX (RID_APP_START + 1718)
+#define RID_SIZEXY (RID_APP_START + 1719)
+#define RID_FONTXY (RID_APP_START + 1720)
+#define RID_COLORX (RID_APP_START + 1721)
+#define RID_WIDEHATX (RID_APP_START + 1722)
+#define RID_WIDETILDEX (RID_APP_START + 1723)
+#define RID_WIDEVECX (RID_APP_START + 1724)
+
+#define RID_LRPARENTX (RID_APP_START + 1801)
+#define RID_LRBRACKETX (RID_APP_START + 1802)
+#define RID_LRANGLEX (RID_APP_START + 1803)
+#define RID_LRBRACEX (RID_APP_START + 1804)
+#define RID_LRLINEX (RID_APP_START + 1805)
+#define RID_LRDLINEX (RID_APP_START + 1806)
+#define RID_LRGROUPX (RID_APP_START + 1808)
+#define RID_SLRPARENTX (RID_APP_START + 1809)
+#define RID_SLRBRACKETX (RID_APP_START + 1810)
+#define RID_SLRANGLEX (RID_APP_START + 1811)
+#define RID_SLRBRACEX (RID_APP_START + 1812)
+#define RID_SLRLINEX (RID_APP_START + 1813)
+#define RID_SLRDLINEX (RID_APP_START + 1814)
+#define RID_LRCEILX (RID_APP_START + 1817)
+#define RID_LRFLOORX (RID_APP_START + 1818)
+#define RID_SLRCEILX (RID_APP_START + 1819)
+#define RID_SLRFLOORX (RID_APP_START + 1820)
+#define RID_LMRANGLEXY (RID_APP_START + 1821)
+#define RID_SLMRANGLEXY (RID_APP_START + 1822)
+#define RID_LRDBRACKETX (RID_APP_START + 1823)
+#define RID_SLRDBRACKETX (RID_APP_START + 1824)
+#define RID_XOVERBRACEY (RID_APP_START + 1825)
+#define RID_XUNDERBRACEY (RID_APP_START + 1826)
+
+#define RID_NEWLINE (RID_APP_START + 1901)
+#define RID_SBLANK (RID_APP_START + 1902)
+#define RID_BLANK (RID_APP_START + 1903)
+#define RID_RSUBX (RID_APP_START + 1904)
+#define RID_BINOMXY (RID_APP_START + 1905)
+#define RID_STACK (RID_APP_START + 1906)
+#define RID_MATRIX (RID_APP_START + 1907)
+#define RID_RSUPX (RID_APP_START + 1908)
+#define RID_ALIGNLX (RID_APP_START + 1909)
+#define RID_ALIGNCX (RID_APP_START + 1910)
+#define RID_ALIGNRX (RID_APP_START + 1911)
+#define RID_LSUBX (RID_APP_START + 1912)
+#define RID_LSUPX (RID_APP_START + 1916)
+#define RID_CSUBX (RID_APP_START + 1917)
+#define RID_CSUPX (RID_APP_START + 1918)
+
+#define RID_ALEPH (RID_APP_START + 2001)
+#define RID_EMPTYSET (RID_APP_START + 2002)
+#define RID_RE (RID_APP_START + 2003)
+#define RID_IM (RID_APP_START + 2004)
+#define RID_INFINITY (RID_APP_START + 2005)
+#define RID_PARTIAL (RID_APP_START + 2006)
+#define RID_WP (RID_APP_START + 2007)
+#define RID_DOTSAXIS (RID_APP_START + 2008)
+#define RID_DOTSUP (RID_APP_START + 2009)
+#define RID_DOTSDOWN (RID_APP_START + 2010)
+#define RID_DOTSLOW (RID_APP_START + 2011)
+#define RID_DOTSVERT (RID_APP_START + 2012)
+#define RID_NABLA (RID_APP_START + 2013)
+#define RID_HBAR (RID_APP_START + 2014)
+#define RID_LAMBDABAR (RID_APP_START + 2015)
+#define RID_LEFTARROW (RID_APP_START + 2016)
+#define RID_RIGHTARROW (RID_APP_START + 2017)
+#define RID_UPARROW (RID_APP_START + 2018)
+#define RID_DOWNARROW (RID_APP_START + 2019)
+#define RID_EXISTS (RID_APP_START + 1608)
+#define RID_FORALL (RID_APP_START + 1612)
+
+// new menue resource ID's
+#define RID_UNBINOPS_MENU (RID_APP_START + 2164)
+#define RID_RELATIONS_MENU (RID_APP_START + 2165)
+#define RID_SETOPERATIONS_MENU (RID_APP_START + 2166)
+#define RID_FUNCTIONS_MENU (RID_APP_START + 2167)
+#define RID_OPERATORS_MENU (RID_APP_START + 2168)
+#define RID_ATTRIBUTES_MENU (RID_APP_START + 2169)
+#define RID_BRACKETS_MENU (RID_APP_START + 2170)
+#define RID_FORMAT_MENU (RID_APP_START + 2171)
+#define RID_MISC_MENU (RID_APP_START + 2172)
+#define RID_FUNCTIONSOTHER1_MENU (RID_APP_START + 2173)
+
+#define RID_XPP_LINE (RID_APP_START + 3000)
+#define RID_XPP_DLINE (RID_APP_START + 3001)
+#define RID_XPP_SQRT (RID_APP_START + 3002)
+#define RID_XPP_SQRT2 (RID_APP_START + 3003)
+#define RID_XPP_HAT (RID_APP_START + 3004)
+#define RID_XPP_TILDE (RID_APP_START + 3005)
+#define RID_XPP_BAR (RID_APP_START + 3006)
+#define RID_XPP_VEC (RID_APP_START + 3007)
+#define RID_XPP_LBRACE (RID_APP_START + 3008)
+#define RID_XPP_RBRACE (RID_APP_START + 3009)
+#define RID_XPP_LPARENT (RID_APP_START + 3010)
+#define RID_XPP_RPARENT (RID_APP_START + 3011)
+#define RID_XPP_LANGLE (RID_APP_START + 3012)
+#define RID_XPP_RANGLE (RID_APP_START + 3013)
+#define RID_XPP_LBRACKET (RID_APP_START + 3014)
+#define RID_XPP_RBRACKET (RID_APP_START + 3015)
+#define RID_XPP_LDBRACKET (RID_APP_START + 3016)
+#define RID_XPP_RDBRACKET (RID_APP_START + 3017)
+#define RID_XPP_LCEIL (RID_APP_START + 3018)
+#define RID_XPP_RCEIL (RID_APP_START + 3019)
+#define RID_XPP_LFLOOR (RID_APP_START + 3020)
+#define RID_XPP_RFLOOR (RID_APP_START + 3021)
+#define RID_XPP_OVERBRACE (RID_APP_START + 3022)
+#define RID_XPP_UNDERBRACE (RID_APP_START + 3023)
+
+#define HID_SMA_OPTIONSDIALOG (HID_SMA_START + 1)
+#define HID_SMA_FONTDIALOG (HID_SMA_START + 2)
+#define HID_SMA_FONTSIZEDIALOG (HID_SMA_START + 3)
+#define HID_SMA_FONTTYPEDIALOG (HID_SMA_START + 4)
+#define HID_SMA_DISTANCEDIALOG (HID_SMA_START + 5)
+#define HID_SMA_ALIGNDIALOG (HID_SMA_START + 6)
+#define HID_SMA_PRINTOPTIONPAGE (HID_SMA_START + 7)
+#define HID_SMA_SYMBOLDIALOG (HID_SMA_START + 8)
+#define HID_SMA_SYMDEFINEDIALOG (HID_SMA_START + 9)
+#define HID_SMA_EXTRAOPTIONPAGE (HID_SMA_START + 10)
+#define HID_SMA_DOCSAVEQUERY (HID_SMA_START + 11)
+#define HID_SMA_OBJECTSAVEQUERY (HID_SMA_START + 12)
+#define HID_SMA_DEFAULTSAVEQUERY (HID_SMA_START + 13)
+#define HID_SMA_ILLEGALOBJECTERROR (HID_SMA_START + 14)
+#define HID_SMA_ILLEGALFILEERROR (HID_SMA_START + 15)
+#define HID_SMA_WRITESYMBOLERROR (HID_SMA_START + 16)
+#define HID_SMA_READSYMBOLERROR (HID_SMA_START + 17)
+#define HID_SMA_NOMATHTYPEFACEWARNING (HID_SMA_START + 18)
+#define HID_SMA_OBJECTNAME (HID_SMA_START + 19)
+#define HID_SMA_VIEWNAME (HID_SMA_START + 20)
+#define HID_SMA_UNDOEDITNAME (HID_SMA_START + 21)
+#define HID_SMA_UNDOFORMATNAME (HID_SMA_START + 22)
+#define HID_SMA_APPICO (HID_SMA_START + 23)
+#define HID_SMA_DOCICO (HID_SMA_START + 24)
+#define HID_SMA_TMPICO (HID_SMA_START + 25)
+#define HID_SMA_COMMANDMENU (HID_SMA_START + 26)
+#define HID_SMA_VIEWMENU (HID_SMA_START + 27)
+#define HID_SMA_DISTANCEMENU (HID_SMA_START + 28)
+#define HID_SMA_FONTMENU (HID_SMA_START + 29)
+#define HID_SMA_STARTUPWINDOW (HID_SMA_START + 30)
+#define HID_SMA_TOOLBOXWINDOW (HID_SMA_START + 31)
+#define HID_SMA_CMDBOXWINDOW (HID_SMA_START + 32)
+#define HID_SMA_UPDATEOBJECT (HID_SMA_START + 33)
+#define HID_SMA_FONTREGULAR (HID_SMA_START + 34)
+#define HID_SMA_FONTITALIC (HID_SMA_START + 35)
+#define HID_SMA_FONTBOLD (HID_SMA_START + 36)
+#define HID_SMA_PRINTOPTION (HID_SMA_START + 37)
+#define HID_SMA_DOCUMENTSTR (HID_SMA_START + 38)
+#define HID_SMA_SYMBOLFILESSTR (HID_SMA_START + 39)
+#define HID_SMA_ALLFILESSTR (HID_SMA_START + 40)
+#define HID_SMA_CREATORSTR (HID_SMA_START + 41)
+#define HID_SMA_FILESMFTYP (HID_SMA_START + 42)
+#define HID_SMA_FILESYMTYP (HID_SMA_START + 43)
+#define HID_SMA_WIN_DOCUMENT (HID_SMA_START + 44)
+#define HID_SMA_COMMAND_WIN_EDIT (HID_SMA_START + 45)
+
+#define HID_SMA_PLUSX (HID_SMA_START + 50)
+#define HID_SMA_MINUSX (HID_SMA_START + 51)
+#define HID_SMA_PLUSMINUSX (HID_SMA_START + 52)
+#define HID_SMA_MINUSPLUSX (HID_SMA_START + 53)
+#define HID_SMA_NEGX (HID_SMA_START + 54)
+#define HID_SMA_XPLUSY (HID_SMA_START + 55)
+#define HID_SMA_XMINUSY (HID_SMA_START + 56)
+#define HID_SMA_XCDOTY (HID_SMA_START + 57)
+#define HID_SMA_XTIMESY (HID_SMA_START + 58)
+#define HID_SMA_XSYMTIMESY (HID_SMA_START + 59)
+#define HID_SMA_XSYMDIVIDEY (HID_SMA_START + 60)
+#define HID_SMA_XDIVY (HID_SMA_START + 61)
+#define HID_SMA_XOVERY (HID_SMA_START + 62)
+#define HID_SMA_XODIVIDEY (HID_SMA_START + 63)
+#define HID_SMA_XODOTY (HID_SMA_START + 64)
+#define HID_SMA_XOMINUSY (HID_SMA_START + 65)
+#define HID_SMA_XOPLUSY (HID_SMA_START + 66)
+#define HID_SMA_XOTIMESY (HID_SMA_START + 67)
+#define HID_SMA_XANDY (HID_SMA_START + 68)
+#define HID_SMA_XORY (HID_SMA_START + 69)
+#define HID_SMA_XEQY (HID_SMA_START + 70)
+#define HID_SMA_XNEQY (HID_SMA_START + 71)
+#define HID_SMA_XLTY (HID_SMA_START + 72)
+#define HID_SMA_XGTY (HID_SMA_START + 73)
+#define HID_SMA_XLEY (HID_SMA_START + 74)
+#define HID_SMA_XGEY (HID_SMA_START + 75)
+#define HID_SMA_XLESLANTY (HID_SMA_START + 76)
+#define HID_SMA_XGESLANTY (HID_SMA_START + 77)
+#define HID_SMA_XLLY (HID_SMA_START + 78)
+#define HID_SMA_XGGY (HID_SMA_START + 79)
+#define HID_SMA_XDEFY (HID_SMA_START + 80)
+#define HID_SMA_XEQUIVY (HID_SMA_START + 81)
+#define HID_SMA_XAPPROXY (HID_SMA_START + 82)
+#define HID_SMA_XSIMY (HID_SMA_START + 83)
+#define HID_SMA_XSIMEQY (HID_SMA_START + 84)
+#define HID_SMA_XPROPY (HID_SMA_START + 85)
+#define HID_SMA_XORTHOY (HID_SMA_START + 86)
+#define HID_SMA_XPARALLELY (HID_SMA_START + 87)
+#define HID_SMA_XTOWARDY (HID_SMA_START + 88)
+#define HID_SMA_XTRANSLY (HID_SMA_START + 89)
+#define HID_SMA_XTRANSRY (HID_SMA_START + 90)
+#define HID_SMA_XINY (HID_SMA_START + 91)
+#define HID_SMA_XNOTINY (HID_SMA_START + 92)
+#define HID_SMA_XOWNSY (HID_SMA_START + 93)
+#define HID_SMA_XUNIONY (HID_SMA_START + 94)
+#define HID_SMA_XINTERSECTIONY (HID_SMA_START + 95)
+#define HID_SMA_XSETMINUSY (HID_SMA_START + 96)
+#define HID_SMA_XSLASHY (HID_SMA_START + 97)
+#define HID_SMA_XSUBSETY (HID_SMA_START + 98)
+#define HID_SMA_XSUBSETEQY (HID_SMA_START + 99)
+#define HID_SMA_XSUPSETY (HID_SMA_START + 100)
+#define HID_SMA_XSUPSETEQY (HID_SMA_START + 101)
+#define HID_SMA_XNSUBSETY (HID_SMA_START + 102)
+#define HID_SMA_XNSUBSETEQY (HID_SMA_START + 103)
+#define HID_SMA_XNSUPSETY (HID_SMA_START + 104)
+#define HID_SMA_XNSUPSETEQY (HID_SMA_START + 105)
+#define HID_SMA_ABSX (HID_SMA_START + 106)
+#define HID_SMA_FACTX (HID_SMA_START + 107)
+#define HID_SMA_SQRTX (HID_SMA_START + 108)
+#define HID_SMA_NROOTXY (HID_SMA_START + 109)
+#define HID_SMA_EX (HID_SMA_START + 110)
+#define HID_SMA_EXPX (HID_SMA_START + 111)
+#define HID_SMA_LNX (HID_SMA_START + 112)
+#define HID_SMA_LOGX (HID_SMA_START + 113)
+#define HID_SMA_SINX (HID_SMA_START + 114)
+#define HID_SMA_COSX (HID_SMA_START + 115)
+#define HID_SMA_TANX (HID_SMA_START + 116)
+#define HID_SMA_COTX (HID_SMA_START + 117)
+#define HID_SMA_ARCSINX (HID_SMA_START + 118)
+#define HID_SMA_ARCCOSX (HID_SMA_START + 119)
+#define HID_SMA_ARCTANX (HID_SMA_START + 120)
+#define HID_SMA_ARCCOTX (HID_SMA_START + 121)
+#define HID_SMA_SINHX (HID_SMA_START + 122)
+#define HID_SMA_COSHX (HID_SMA_START + 123)
+#define HID_SMA_TANHX (HID_SMA_START + 124)
+#define HID_SMA_COTHX (HID_SMA_START + 125)
+#define HID_SMA_ARSINHX (HID_SMA_START + 126)
+#define HID_SMA_ARCOSHX (HID_SMA_START + 127)
+#define HID_SMA_ARTANHX (HID_SMA_START + 128)
+#define HID_SMA_ARCOTHX (HID_SMA_START + 129)
+#define HID_SMA_SUMX (HID_SMA_START + 130)
+#define HID_SMA_PRODX (HID_SMA_START + 131)
+#define HID_SMA_COPRODX (HID_SMA_START + 132)
+#define HID_SMA_LIMX (HID_SMA_START + 133)
+#define HID_SMA_LIMINFX (HID_SMA_START + 134)
+#define HID_SMA_LIMSUPX (HID_SMA_START + 135)
+#define HID_SMA_EXISTS (HID_SMA_START + 136)
+#define HID_SMA_FORALL (HID_SMA_START + 137)
+#define HID_SMA_NABLA (HID_SMA_START + 138)
+#define HID_SMA_INTX (HID_SMA_START + 139)
+#define HID_SMA_IINTX (HID_SMA_START + 140)
+#define HID_SMA_IIINTX (HID_SMA_START + 141)
+#define HID_SMA_LINTX (HID_SMA_START + 142)
+#define HID_SMA_LLINTX (HID_SMA_START + 143)
+#define HID_SMA_LLLINTX (HID_SMA_START + 144)
+#define HID_SMA_FROMX (HID_SMA_START + 145)
+#define HID_SMA_TOX (HID_SMA_START + 146)
+#define HID_SMA_FROMXTOY (HID_SMA_START + 147)
+#define HID_SMA_XCIRCY (HID_SMA_START + 148)
+#define HID_SMA_XDIVIDESY (HID_SMA_START + 149)
+#define HID_SMA_XNDIVIDESY (HID_SMA_START + 150)
+#define HID_SMA_DLARROW (HID_SMA_START + 151)
+#define HID_SMA_DLRARROW (HID_SMA_START + 152)
+#define HID_SMA_DRARROW (HID_SMA_START + 153)
+
+#define HID_SMA_MISC_CAT (HID_SMA_START + 154)
+#define HID_SMA_UNBINOPS_CAT (HID_SMA_START + 155)
+#define HID_SMA_RELATIONS_CAT (HID_SMA_START + 156)
+#define HID_SMA_SETOPERATIONS_CAT (HID_SMA_START + 157)
+#define HID_SMA_FUNCTIONS_CAT (HID_SMA_START + 158)
+#define HID_SMA_OPERATORS_CAT (HID_SMA_START + 159)
+#define HID_SMA_ATTRIBUTES_CAT (HID_SMA_START + 160)
+#define HID_SMA_BRACKETS_CAT (HID_SMA_START + 161)
+#define HID_SMA_FORMAT_CAT (HID_SMA_START + 162)
+
+#define HID_SMA_OPERATOR_WIN (HID_SMA_START + 163)
+#define HID_SMA_UNBINOPS_TBX (HID_SMA_START + 164)
+#define HID_SMA_RELATIONS_TBX (HID_SMA_START + 165)
+#define HID_SMA_SETOPERATIONS_TBX (HID_SMA_START + 166)
+#define HID_SMA_FUNCTIONS_TBX (HID_SMA_START + 167)
+#define HID_SMA_OPERATORS_TBX (HID_SMA_START + 168)
+#define HID_SMA_ATTRIBUTES_TBX (HID_SMA_START + 169)
+#define HID_SMA_BRACKETS_TBX (HID_SMA_START + 170)
+#define HID_SMA_FORMAT_TBX (HID_SMA_START + 171)
+#define HID_SMA_SELECTION_TBX (HID_SMA_START + 172)
+#define HID_SMA_COMMAND_WIN (HID_SMA_START + 173)
+#define HID_SMA_MISC_MENU (HID_SMA_START + 174)
+#define HID_SMA_FUNCTIONSOTHER1_MENU (HID_SMA_START + 175)
+
+#define HID_SMA_ACUTEX (HID_SMA_START + 180)
+#define HID_SMA_BARX (HID_SMA_START + 181)
+#define HID_SMA_BREVEX (HID_SMA_START + 182)
+#define HID_SMA_CHECKX (HID_SMA_START + 183)
+#define HID_SMA_CIRCLEX (HID_SMA_START + 184)
+#define HID_SMA_DOTX (HID_SMA_START + 185)
+#define HID_SMA_DDOTX (HID_SMA_START + 186)
+#define HID_SMA_DDDOTX (HID_SMA_START + 187)
+#define HID_SMA_GRAVEX (HID_SMA_START + 188)
+#define HID_SMA_HATX (HID_SMA_START + 189)
+#define HID_SMA_TILDEX (HID_SMA_START + 190)
+#define HID_SMA_VECX (HID_SMA_START + 191)
+#define HID_SMA_UNDERLINEX (HID_SMA_START + 192)
+#define HID_SMA_OVERLINEX (HID_SMA_START + 193)
+#define HID_SMA_OVERSTRIKEX (HID_SMA_START + 194)
+#define HID_SMA_PHANTOMX (HID_SMA_START + 195)
+#define HID_SMA_BOLDX (HID_SMA_START + 196)
+#define HID_SMA_ITALX (HID_SMA_START + 197)
+#define HID_SMA_SIZEXY (HID_SMA_START + 198)
+#define HID_SMA_FONTXY (HID_SMA_START + 199)
+#define HID_SMA_COLORX (HID_SMA_START + 200)
+#define HID_SMA_LRGROUPX (HID_SMA_START + 201)
+#define HID_SMA_LRPARENTX (HID_SMA_START + 202)
+#define HID_SMA_LRBRACKETX (HID_SMA_START + 203)
+#define HID_SMA_LRBRACEX (HID_SMA_START + 204)
+#define HID_SMA_LRANGLEX (HID_SMA_START + 205)
+#define HID_SMA_LRCEILX (HID_SMA_START + 206)
+#define HID_SMA_LRFLOORX (HID_SMA_START + 207)
+#define HID_SMA_LRLINEX (HID_SMA_START + 208)
+#define HID_SMA_LRDLINEX (HID_SMA_START + 209)
+#define HID_SMA_SLRPARENTX (HID_SMA_START + 210)
+#define HID_SMA_SLRBRACKETX (HID_SMA_START + 211)
+#define HID_SMA_SLRBRACEX (HID_SMA_START + 212)
+#define HID_SMA_SLRANGLEX (HID_SMA_START + 213)
+#define HID_SMA_SLRCEILX (HID_SMA_START + 214)
+#define HID_SMA_SLRFLOORX (HID_SMA_START + 215)
+#define HID_SMA_SLRLINEX (HID_SMA_START + 216)
+#define HID_SMA_SLRDLINEX (HID_SMA_START + 217)
+#define HID_SMA_RSUBX (HID_SMA_START + 218)
+#define HID_SMA_RSUPX (HID_SMA_START + 219)
+#define HID_SMA_LSUBX (HID_SMA_START + 220)
+#define HID_SMA_LSUPX (HID_SMA_START + 221)
+#define HID_SMA_SBLANK (HID_SMA_START + 222)
+#define HID_SMA_BLANK (HID_SMA_START + 223)
+#define HID_SMA_NEWLINE (HID_SMA_START + 224)
+#define HID_SMA_BINOMXY (HID_SMA_START + 225)
+#define HID_SMA_STACK (HID_SMA_START + 226)
+#define HID_SMA_MATRIX (HID_SMA_START + 227)
+#define HID_SMA_ALIGNLX (HID_SMA_START + 228)
+#define HID_SMA_ALIGNCX (HID_SMA_START + 229)
+#define HID_SMA_ALIGNRX (HID_SMA_START + 230)
+#define HID_SMA_ALEPH (HID_SMA_START + 231)
+#define HID_SMA_EMPTYSET (HID_SMA_START + 232)
+#define HID_SMA_RE (HID_SMA_START + 233)
+#define HID_SMA_IM (HID_SMA_START + 234)
+#define HID_SMA_INFINITY (HID_SMA_START + 235)
+#define HID_SMA_PARTIAL (HID_SMA_START + 236)
+#define HID_SMA_WP (HID_SMA_START + 237)
+#define HID_SMA_DOTSAXIS (HID_SMA_START + 238)
+#define HID_SMA_DOTSUP (HID_SMA_START + 239)
+#define HID_SMA_DOTSDOWN (HID_SMA_START + 240)
+#define HID_SMA_DOTSLOW (HID_SMA_START + 241)
+#define HID_SMA_DOTSVERT (HID_SMA_START + 242)
+
+#define HID_SMA_SETN (HID_SMA2_START + 1)
+#define HID_SMA_SETZ (HID_SMA2_START + 2)
+#define HID_SMA_SETQ (HID_SMA2_START + 3)
+#define HID_SMA_SETR (HID_SMA2_START + 4)
+#define HID_SMA_SETC (HID_SMA2_START + 5)
+#define HID_SMA_WIDEHATX (HID_SMA2_START + 6)
+#define HID_SMA_WIDETILDEX (HID_SMA2_START + 7)
+#define HID_SMA_WIDEVECX (HID_SMA2_START + 8)
+#define HID_SMA_CSUBX (HID_SMA2_START + 9)
+#define HID_SMA_CSUPX (HID_SMA2_START + 10)
+#define HID_SMA_HBAR (HID_SMA2_START + 11)
+#define HID_SMA_LAMBDABAR (HID_SMA2_START + 12)
+#define HID_SMA_LEFTARROW (HID_SMA2_START + 13)
+#define HID_SMA_RIGHTARROW (HID_SMA2_START + 14)
+#define HID_SMA_UPARROW (HID_SMA2_START + 15)
+#define HID_SMA_DOWNARROW (HID_SMA2_START + 16)
+
+#define HID_SMA_DEFAULT_DIST (HID_SMA2_START + 17)
+#define HID_SMA_LINE_DIST (HID_SMA2_START + 18)
+#define HID_SMA_ROOT_DIST (HID_SMA2_START + 19)
+#define HID_SMA_SUP_DIST (HID_SMA2_START + 20)
+#define HID_SMA_SUB_DIST (HID_SMA2_START + 21)
+#define HID_SMA_NUMERATOR_DIST (HID_SMA2_START + 22)
+#define HID_SMA_DENOMINATOR_DIST (HID_SMA2_START + 23)
+#define HID_SMA_FRACLINE_EXCWIDTH (HID_SMA2_START + 24)
+#define HID_SMA_FRACLINE_LINEWIDTH (HID_SMA2_START + 25)
+#define HID_SMA_UPPERLIMIT_DIST (HID_SMA2_START + 26)
+#define HID_SMA_LOWERLIMIT_DIST (HID_SMA2_START + 27)
+#define HID_SMA_BRACKET_EXCHEIGHT (HID_SMA2_START + 28)
+#define HID_SMA_BRACKET_DIST (HID_SMA2_START + 29)
+#define HID_SMA_MATRIXROW_DIST (HID_SMA2_START + 30)
+#define HID_SMA_MATRIXCOL_DIST (HID_SMA2_START + 31)
+#define HID_SMA_ATTRIBUT_DIST (HID_SMA2_START + 32)
+#define HID_SMA_INTERATTRIBUT_DIST (HID_SMA2_START + 33)
+#define HID_SMA_OPERATOR_EXCHEIGHT (HID_SMA2_START + 34)
+#define HID_SMA_OPERATOR_DIST (HID_SMA2_START + 35)
+#define HID_SMA_LEFTBORDER_DIST (HID_SMA2_START + 36)
+#define HID_SMA_RIGHTBORDER_DIST (HID_SMA2_START + 37)
+#define HID_SMA_UPPERBORDER_DIST (HID_SMA2_START + 38)
+#define HID_SMA_LOWERBORDER_DIST (HID_SMA2_START + 39)
+#define HID_SMA_SCALE_ALL_BRACKETS (HID_SMA2_START + 40)
+#define HID_SMA_BRACKET_EXCHEIGHT2 (HID_SMA2_START + 41)
+#define HID_SMA_LMRANGLEXY (HID_SMA2_START + 42)
+#define HID_SMA_SLMRANGLEXY (HID_SMA2_START + 43)
+#define HID_SMA_XWIDESLASHY (HID_SMA2_START + 44)
+#define HID_SMA_XWIDEBSLASHY (HID_SMA2_START + 45)
+#define HID_SMA_XOVERBRACEY (HID_SMA2_START + 46)
+#define HID_SMA_XUNDERBRACEY (HID_SMA2_START + 47)
+#define HID_SMA_LRDBRACKETX (HID_SMA2_START + 48)
+#define HID_SMA_SLRDBRACKETX (HID_SMA2_START + 49)
+
+
+#define BMP_ARROW_RIGHT 1
+
+#define MN_WIN 60
+#define MN_SUB_VIEW 31
+#define MN_SUB_TOOLBAR 32
+#define MN_SUB_GRAPHIC 33
+#define MN_SUB_SPELLING 34
+#define MN_SUB_TEMPLATES 35
+#define MN_SUB_SYMBOLS 90
+
+// 342 == SCH_IF_SMAVIEWSHELL, da SFX_INTERFACE_LIB kein
+// Define sondern neuerdings ein Enum ist
+#define HID_SMA_VIEWSHELL_DOCUMENT (342)
+
+#endif
+
diff --git a/starmath/inc/symbol.hxx b/starmath/inc/symbol.hxx
new file mode 100644
index 000000000000..b10fd7b67047
--- /dev/null
+++ b/starmath/inc/symbol.hxx
@@ -0,0 +1,225 @@
+/*************************************************************************
+ *
+ * $RCSfile: symbol.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:57:25 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef SYMBOL_HXX
+#define SYMBOL_HXX
+
+#ifndef _FONT_HXX //autogen
+#include <vcl/font.hxx>
+#endif
+#ifndef _LIST_HXX //autogen
+#include <tools/list.hxx>
+#endif
+#ifndef _TOOLS_DEBUG_HXX //autogen
+#include <tools/debug.hxx>
+#endif
+#ifndef _SFXLSTNER_HXX //autogen
+#include <svtools/lstner.hxx>
+#endif
+#ifndef _DYNARY_HXX //autogen
+#include <tools/dynary.hxx>
+#endif
+#ifndef UTILITY_HXX
+#include "utility.hxx"
+#endif
+
+
+#define SS_ATTR_ACCESS 0x80
+
+#define SYMBOLSET_NONE 0xFFFF
+#define SYMBOL_NONE 0xFFFF
+
+////////////////////////////////////////////////////////////////////////////////
+
+class SmSym
+{
+ friend class SmSymSetManager;
+
+ SmFace Face;
+ String Name;
+ SmSym *pHashNext;
+ SmSymSetManager *pSymSetManager;
+ sal_Unicode Character;
+ BYTE Attribut;
+
+public:
+ SmSym();
+ SmSym(const SmSym& rSymbol);
+ SmSym(const String& rName, const Font& rFont, sal_Unicode aChar);
+
+ SmSym& operator = (const SmSym& rSymbol);
+
+ void SetSymbolName(const String& rName);
+
+ const Font& GetFace() const { return Face; }
+ sal_Unicode GetCharacter() const { return Character; }
+ const String& GetName() const { return Name; }
+
+ Font& GetFace() { return Face; }
+ sal_Unicode& GetCharacter() { return Character; }
+ String& GetName() { return Name; }
+
+ friend SvStream& operator << (SvStream& rStream, const SmSym& rSymbol);
+ friend SvStream& operator >> (SvStream& rStream, SmSym& rSymbol);
+};
+
+DECLARE_LIST(SmListSym, SmSym *);
+
+/**************************************************************************/
+
+class SmSymSet
+{
+ friend class SmSymSetManager;
+
+ SmListSym SymbolList;
+ String Name;
+ SmSymSetManager *pSymSetManager;
+
+public:
+ SmSymSet();
+ SmSymSet(const SmSymSet& rSymbolSet);
+ SmSymSet(const String& rName);
+ ~SmSymSet();
+
+ SmSymSet& operator = (const SmSymSet& rSymbolSet);
+
+ const String& GetName() const { return Name; }
+ void SetName(String& rName);
+ USHORT GetCount() const { return (USHORT) SymbolList.Count(); }
+
+ const SmSym& GetSymbol(USHORT SymbolNo) const
+ {
+ DBG_ASSERT(SymbolList.GetObject(SymbolNo), "Symbol nicht vorhanden");
+ return *SymbolList.GetObject(SymbolNo);
+ }
+
+ USHORT AddSymbol(SmSym* pSymbol);
+ void DeleteSymbol(USHORT SymbolNo);
+ void RenameSymbol(USHORT SymbolNo, String& rName);
+ void ReplaceSymbol(USHORT SymbolNo, SmSym& rSymbol);
+ SmSym * RemoveSymbol(USHORT SymbolNo);
+ USHORT GetSymbolPos(const String& rName);
+
+ friend SvStream& operator << (SvStream& rStream, const SmSymSet& rSymbolSet);
+ friend SvStream& operator >> (SvStream& rStream, SmSymSet& rSymbolSet);
+};
+
+DECLARE_DYNARRAY(SmArraySymSet, SmSymSet *)
+
+/**************************************************************************/
+
+class SmSymbolDialog;
+
+class SmSymSetManager : public SfxListener
+{
+ SmArraySymSet SymbolSets;
+ String aStreamName;
+ SmSym **HashEntries;
+ UINT32 NoSymbolSets;
+ UINT32 NoHashEntries;
+ BOOL Modified;
+
+ virtual void SFX_NOTIFY(SfxBroadcaster& rBC, const TypeId& rBCType,
+ const SfxHint& rHint, const TypeId& rHintType);
+
+ UINT32 GetHashIndex(const String& rSymbolName);
+ void EnterHashTable(SmSymSet& rSymbolSet);
+ void FillHashTable();
+
+public:
+ void Init();
+ void Exit();
+
+ SmSymSetManager(UINT32 HashTableSize = 137);
+ SmSymSetManager(const SmSymSetManager& rSymbolSetManager);
+ ~SmSymSetManager();
+
+ SmSymSetManager& operator = (const SmSymSetManager& rSymbolSetManager);
+
+ USHORT GetCount() const { return NoSymbolSets; }
+ SmSymSet *GetSymbolSet(USHORT SymbolSetNo) const { return SymbolSets.Get(SymbolSetNo);}
+
+ USHORT AddSymbolSet(SmSymSet* pSymbolSet);
+ void ChangeSymbolSet(SmSymSet* pSymbolSet);
+ void DeleteSymbolSet(USHORT SymbolSetNo);
+ USHORT GetSymbolSetPos(const String& rSymbolSetName) const;
+
+ SmSym * GetSymbol(const String& rSymbolName);
+ const SmSym * GetSymbol(const String& rSymbolName) const
+ {
+ return ((SmSymSetManager *) this)->GetSymbol(rSymbolName);
+ }
+
+ void AppendExtraSymbolSet(SmSymSet* pSymbolSet) {}
+ void ResetAccessedSymbols() {}
+ SmSymSet GetAccessedSymbols() { return SmSymSet(); }
+
+ BOOL IsModified() const { return (Modified); }
+ void SetModified(BOOL Modify) { Modified = Modify; }
+
+ void Load(const String& rURL);
+ void Save();
+
+ friend SvStream& operator << (SvStream& rStream, SmSymSetManager& rSymbolSetManager);
+ friend SvStream& operator >> (SvStream& rStream, SmSymSetManager& rSymbolSetManager);
+};
+
+#endif
+
diff --git a/starmath/inc/toolbox.hxx b/starmath/inc/toolbox.hxx
new file mode 100644
index 000000000000..8391a8800eb1
--- /dev/null
+++ b/starmath/inc/toolbox.hxx
@@ -0,0 +1,124 @@
+/*************************************************************************
+ *
+ * $RCSfile: toolbox.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:57:25 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef TOOLBOX_HXX
+#define TOOLBOX_HXX
+
+#ifndef _BASEDLGS_HXX //autogen
+#include <sfx2/basedlgs.hxx>
+#endif
+#ifndef _SFX_CHILDWIN_HXX //autogen
+#include <sfx2/childwin.hxx>
+#endif
+#ifndef _SV_TOOLBOX_HXX //autogen
+#include <vcl/toolbox.hxx>
+#endif
+
+#ifndef _SMMOD_HXX
+#include "smmod.hxx"
+#endif
+#ifndef CONFIG_HXX
+#include "config.hxx"
+#endif
+
+
+#define NUM_TBX_CATEGORIES 9
+
+class SmToolBoxWindow : public SfxFloatingWindow
+{
+
+protected:
+ ToolBox aToolBoxCat;
+ ToolBox *pToolBoxCmd;
+ ToolBox *vToolBoxCategories[NUM_TBX_CATEGORIES];
+ USHORT nActiveCategory;
+
+ virtual BOOL Close();
+
+ DECL_LINK( CategoryClickHdl, ToolBox* );
+ DECL_LINK( CmdSelectHdl, ToolBox* );
+
+public:
+ SmToolBoxWindow(SfxBindings *pBindings,
+ SfxChildWindow *pChildWindow,
+ Window *pParent);
+ ~SmToolBoxWindow();
+
+ // Window
+ virtual void StateChanged( StateChangedType nStateChange );
+
+ void AdjustPosition(const Point &rPoint);
+ void SetCategory(USHORT nCategory);
+ void ShowWindows();
+};
+
+/**************************************************************************/
+
+class SmToolBoxWrapper : public SfxChildWindow
+{
+ SFX_DECL_CHILDWINDOW(SmToolBoxWrapper);
+
+protected:
+ SmToolBoxWrapper(Window *pParentWindow,
+ USHORT, SfxBindings*, SfxChildWinInfo*);
+};
+
+#endif
+
diff --git a/starmath/inc/types.hxx b/starmath/inc/types.hxx
new file mode 100644
index 000000000000..c7aac531e8bf
--- /dev/null
+++ b/starmath/inc/types.hxx
@@ -0,0 +1,216 @@
+/*************************************************************************
+ *
+ * $RCSfile: types.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:57:25 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef TYPES_HXX
+#define TYPES_HXX
+
+
+////////////////////////////////////////
+// enum definitions for characters from the 'StarMath' font
+// (some chars have more than one alias!)
+//! Note: not listed here does not(!) mean "not used"
+//! (see %alpha ... %gamma for example)
+//
+enum MathSymbol
+{
+ MS_FACT = (xub_Unicode) 0xF021,
+ MS_INFINITY = (xub_Unicode) 0xF027,
+ MS_SLASH = (xub_Unicode) 0xF02F,
+
+ MS_NDIVIDES = (xub_Unicode) 0xF030,
+ MS_DRARROW = (xub_Unicode) 0xF031,
+ MS_DLARROW = (xub_Unicode) 0xF032,
+ MS_DLRARROW = (xub_Unicode) 0xF033,
+ MS_UNDERBRACE = (xub_Unicode) 0xF034,
+ MS_OVERBRACE = (xub_Unicode) 0xF035,
+ MS_CIRC = (xub_Unicode) 0xF036,
+ MS_ASSIGN = (xub_Unicode) 0xF03D,
+ MS_ERROR = (xub_Unicode) 0xF03F,
+
+ MS_NEQ = (xub_Unicode) 0xF040,
+ MS_PLUS = (xub_Unicode) 0xF041,
+ MS_MINUS = (xub_Unicode) 0xF042,
+ MS_MULTIPLY = (xub_Unicode) 0xF043,
+ MS_TIMES = (xub_Unicode) 0xF044,
+ MS_CDOT = (xub_Unicode) 0xF045,
+ MS_DIV = (xub_Unicode) 0xF046,
+ MS_PLUSMINUS = (xub_Unicode) 0xF047,
+ MS_MINUSPLUS = (xub_Unicode) 0xF048,
+ MS_OPLUS = (xub_Unicode) 0xF049,
+ MS_OMINUS = (xub_Unicode) 0xF04A,
+ MS_OTIMES = (xub_Unicode) 0xF04B,
+ MS_ODIVIDE = (xub_Unicode) 0xF04C,
+ MS_ODOT = (xub_Unicode) 0xF04D,
+ MS_UNION = (xub_Unicode) 0xF04E,
+ MS_INTERSECT = (xub_Unicode) 0xF04F,
+
+ MS_LT = (xub_Unicode) 0xF050,
+ MS_GT = (xub_Unicode) 0xF051,
+ MS_LE = (xub_Unicode) 0xF052,
+ MS_GE = (xub_Unicode) 0xF053,
+ MS_LESLANT = (xub_Unicode) 0xF054,
+ MS_GESLANT = (xub_Unicode) 0xF055,
+ MS_LL = (xub_Unicode) 0xF056,
+ MS_GG = (xub_Unicode) 0xF057,
+ MS_SIM = (xub_Unicode) 0xF058,
+ MS_SIMEQ = (xub_Unicode) 0xF059,
+ MS_APPROX = (xub_Unicode) 0xF05A,
+ MS_DEF = (xub_Unicode) 0xF05B,
+ MS_EQUIV = (xub_Unicode) 0xF05C,
+ MS_PROP = (xub_Unicode) 0xF05D,
+ MS_PARTIAL = (xub_Unicode) 0xF05E,
+ MS_SUBSET = (xub_Unicode) 0xF05F,
+
+ MS_SUPSET = (xub_Unicode) 0xF060,
+ MS_SUBSETEQ = (xub_Unicode) 0xF061,
+ MS_SUPSETEQ = (xub_Unicode) 0xF062,
+ MS_NSUBSET = (xub_Unicode) 0xF063,
+ MS_NSUPSET = (xub_Unicode) 0xF064,
+ MS_NSUBSETEQ = (xub_Unicode) 0xF065,
+ MS_NSUPSETEQ = (xub_Unicode) 0xF066,
+ MS_IN = (xub_Unicode) 0xF067,
+ MS_NOTIN = (xub_Unicode) 0xF068,
+ MS_EXISTS = (xub_Unicode) 0xF06A,
+ MS_BACKEPSILON = (xub_Unicode) 0xF06B,
+ MS_ALEPH = (xub_Unicode) 0xF06C,
+ MS_IM = (xub_Unicode) 0xF06D,
+ MS_RE = (xub_Unicode) 0xF06E,
+ MS_WP = (xub_Unicode) 0xF06F,
+
+ MS_LINE = (xub_Unicode) 0xF073,
+ MS_DLINE = (xub_Unicode) 0xF074,
+ MS_ORTHO = (xub_Unicode) 0xF075,
+ MS_DOTSLOW = (xub_Unicode) 0xF076,
+ MS_DOTSAXIS = (xub_Unicode) 0xF077,
+ MS_DOTSVERT = (xub_Unicode) 0xF078,
+ MS_DOTSUP = (xub_Unicode) 0xF079,
+ MS_DOTSDOWN = (xub_Unicode) 0xF07A,
+ MS_TRANSR = (xub_Unicode) 0xF07B,
+ MS_TRANSL = (xub_Unicode) 0xF07C,
+ MS_RIGHTARROW = (xub_Unicode) 0xF07D,
+ MS_BACKSLASH = (xub_Unicode) 0xF07E,
+ MS_NEG = (xub_Unicode) 0xF07F,
+
+ MS_INT = (xub_Unicode) 0xF080,
+ MS_IINT = (xub_Unicode) 0xF081,
+ MS_IIINT = (xub_Unicode) 0xF082,
+ MS_LINT = (xub_Unicode) 0xF083,
+ MS_LLINT = (xub_Unicode) 0xF084,
+ MS_LLLINT = (xub_Unicode) 0xF085,
+ MS_SQRT = (xub_Unicode) 0xF087,
+ MS_SQRT2 = (xub_Unicode) 0xF089,
+ MS_COPROD = (xub_Unicode) 0xF08A,
+ MS_PROD = (xub_Unicode) 0xF08B,
+ MS_SUM = (xub_Unicode) 0xF08C,
+ MS_NABLA = (xub_Unicode) 0xF08D,
+ MS_FORALL = (xub_Unicode) 0xF08E,
+
+ MS_HAT = (xub_Unicode) 0xF090,
+ MS_CHECK = (xub_Unicode) 0xF091,
+ MS_BREVE = (xub_Unicode) 0xF092,
+ MS_ACUTE = (xub_Unicode) 0xF093,
+ MS_GRAVE = (xub_Unicode) 0xF094,
+ MS_TILDE = (xub_Unicode) 0xF095,
+ MS_BAR = (xub_Unicode) 0xF096,
+ MS_VEC = (xub_Unicode) 0xF097,
+ MS_DOT = (xub_Unicode) 0xF098,
+ MS_DDOT = (xub_Unicode) 0xF099,
+ MS_DDDOT = (xub_Unicode) 0xF09A,
+ MS_CIRCLE = (xub_Unicode) 0xF09B,
+ MS_AND = (xub_Unicode) 0xF09C,
+ MS_OR = (xub_Unicode) 0xF09D,
+ MS_NI = (xub_Unicode) 0xF09E,
+ MS_EMPTYSET = (xub_Unicode) 0xF09F,
+
+ MS_LBRACE = (xub_Unicode) 0xF0A0,
+ MS_RBRACE = (xub_Unicode) 0xF0A1,
+ MS_LPARENT = (xub_Unicode) 0xF0A2,
+ MS_RPARENT = (xub_Unicode) 0xF0A3,
+ MS_LANGLE = (xub_Unicode) 0xF0A4,
+ MS_RANGLE = (xub_Unicode) 0xF0A5,
+ MS_LBRACKET = (xub_Unicode) 0xF0A6,
+ MS_RBRACKET = (xub_Unicode) 0xF0A7,
+
+ MS_LDBRACKET = (xub_Unicode) 0xF0B2,
+ MS_RDBRACKET = (xub_Unicode) 0xF0B3,
+ MS_PLACE = (xub_Unicode) 0xF0BF,
+
+ MS_LCEIL = (xub_Unicode) 0xF0C0,
+ MS_LFLOOR = (xub_Unicode) 0xF0C1,
+ MS_RCEIL = (xub_Unicode) 0xF0C2,
+ MS_RFLOOR = (xub_Unicode) 0xF0C3,
+ MS_SQRT2_X = (xub_Unicode) 0xF0C5,
+
+ MS_TOP = (xub_Unicode) 0xF0F5,
+ MS_HBAR = (xub_Unicode) 0xF0F6,
+ MS_LAMBDABAR = (xub_Unicode) 0xF0F7,
+ MS_LEFTARROW = (xub_Unicode) 0xF0F8,
+ MS_UPARROW = (xub_Unicode) 0xF0F9,
+ MS_DOWNARROW = (xub_Unicode) 0xF0FA,
+ MS_SETN = (xub_Unicode) 0xF0FB,
+ MS_SETZ = (xub_Unicode) 0xF0FC,
+ MS_SETQ = (xub_Unicode) 0xF0FD,
+ MS_SETR = (xub_Unicode) 0xF0FE,
+ MS_SETC = (xub_Unicode) 0xF0FF
+};
+
+
+#endif
+
diff --git a/starmath/inc/unomodel.hxx b/starmath/inc/unomodel.hxx
new file mode 100644
index 000000000000..b4629caff162
--- /dev/null
+++ b/starmath/inc/unomodel.hxx
@@ -0,0 +1,139 @@
+/*************************************************************************
+ *
+ * $RCSfile: unomodel.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:57:25 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef UNOMODEL_HXX
+#define UNOMODEL_HXX
+
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XUNOTUNNEL_HPP_
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#endif
+#ifndef _SFX_SFXBASEMODEL_HXX_
+#include <sfx2/sfxbasemodel.hxx>
+#endif
+#ifndef _CPPUHELPER_IMPLBASE3_HXX_
+#include <cppuhelper/implbase3.hxx> // helper for implementations
+#endif
+
+struct SfxItemPropertyMap;
+
+//-----------------------------------------------------------------------------
+typedef
+cppu::WeakImplHelper3
+<
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::lang::XUnoTunnel
+>
+SmModelBaseClass;
+class SmModel : public SmModelBaseClass,
+ public SfxBaseModel
+{
+
+ SfxItemPropertyMap* _pMap;
+
+public:
+ SmModel( SfxObjectShell *pObjSh = 0 );
+ virtual ~SmModel();
+
+ //XInterface
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL release( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XTypeProvider
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ inline ::rtl::OUString SmModel::getImplementationName_Static() throw( );
+
+ void * SAL_CALL operator new( size_t ) throw();
+ void SAL_CALL operator delete( void * ) throw();
+};
+
+inline ::rtl::OUString SmModel::getImplementationName_Static() throw( )
+{
+ return rtl::OUString::createFromAscii("math.SmModel");
+}
+
+#endif
diff --git a/starmath/inc/utility.hxx b/starmath/inc/utility.hxx
new file mode 100644
index 000000000000..bde78f80d4f1
--- /dev/null
+++ b/starmath/inc/utility.hxx
@@ -0,0 +1,471 @@
+/*************************************************************************
+ *
+ * $RCSfile: utility.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:57:25 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef UTILITY_HXX
+#define UTILITY_HXX
+
+#ifndef _SFXVARARR_HXX //autogen
+#include <sfx2/minarray.hxx>
+#endif
+#ifndef _FONT_HXX //autogen
+#include <vcl/font.hxx>
+#endif
+#ifndef _SV_FIXED_HXX //autogen
+#include <vcl/fixed.hxx>
+#endif
+#ifndef _SV_COMBOBOX_HXX //autogen
+#include <vcl/combobox.hxx>
+#endif
+#ifndef _SV_LSTBOX_HXX //autogen
+#include <vcl/lstbox.hxx>
+#endif
+#ifndef _STREAM_HXX //autogen
+#include <tools/stream.hxx>
+#endif
+#ifndef _FRACT_HXX //autogen
+#include <tools/fract.hxx>
+#endif
+
+
+class SmRect;
+class String;
+
+#define C2S(cChar) String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM(cChar))
+
+const ByteString ExportString(const String& rString);
+
+
+inline long SmPtsTo100th_mm(long nNumPts)
+ // returns the length (in 100th of mm) that corresponds to the length
+ // 'nNumPts' (in units points).
+ // 72.27 [pt] = 1 [inch] = 2,54 [cm] = 2540 [100th of mm].
+ // result is being rounded to the nearest integer.
+{
+ DBG_ASSERT(nNumPts >= 0, "Sm : Ooops...");
+ // broken into multiple and fraction of 'nNumPts' to reduce chance
+ // of overflow
+ // (7227 / 2) is added in order to round to the nearest integer
+ return 35 * nNumPts + (nNumPts * 1055L + (7227 / 2)) / 7227L;
+}
+
+
+inline long SmPtsTo100th_mm(const Fraction &rNumPts)
+ // as above but with argument 'rNumPts' as 'Fraction'
+{
+ Fraction aTmp (254000L, 7227L);
+ return aTmp *= rNumPts;
+}
+
+
+inline Fraction Sm100th_mmToPts(long nNum100th_mm)
+ // returns the length (in points) that corresponds to the length
+ // 'nNum100th_mm' (in 100th of mm).
+{
+ DBG_ASSERT(nNum100th_mm >= 0, "Sm : Ooops...");
+ Fraction aTmp (7227L, 254000L);
+ return aTmp *= Fraction(nNum100th_mm);
+}
+
+
+inline long SmRoundFraction(const Fraction &rFrac)
+{
+ DBG_ASSERT(rFrac > Fraction(), "Sm : Ooops...");
+ return (rFrac.GetNumerator() + rFrac.GetDenominator() / 2) / rFrac.GetDenominator();
+}
+
+
+class SmViewShell;
+SmViewShell * SmGetActiveView();
+
+
+////////////////////////////////////////////////////////////
+
+class SmFace;
+
+SvStream& operator << (SvStream& rStream, const SmFace& rFont);
+SvStream& operator >> (SvStream& rStream, SmFace& rFont);
+
+void ReadSM20Font(SvStream& rStream, Font& rFont);
+
+
+////////////////////////////////////////////////////////////
+//
+// SmRectCache
+//
+
+class SmRectCache
+{
+ VirtualDevice *pVirDev;
+
+ SmRectCache(const SmRectCache &);
+ SmRectCache & operator = (const SmRectCache &);
+
+public:
+ struct Key
+ { XubString aText,
+ aFontName;
+ Size aFontSize;
+ FontWeight eFontWeight;
+ FontItalic eFontItalic;
+
+ Key(const XubString &rText, const Font &rFont);
+
+ BOOL operator < (const Key &rKey) const;
+ BOOL operator == (const Key &rKey) const;
+ };
+
+ SmRectCache();
+ ~SmRectCache();
+
+ const SmRect * Search(const Key &rKey) const;
+ const SmRect * Add(const Key &rKey, const SmRect &rRect);
+
+ VirtualDevice * GetVirDev();
+
+ void Reset();
+};
+
+
+////////////////////////////////////////////////////////////
+//
+// SmFace
+//
+
+
+class SmFace : public Font
+{
+ long nBorderWidth;
+
+public:
+ SmFace() :
+ Font(), nBorderWidth(-1) {}
+ SmFace(const Font& rFont) :
+ Font(rFont), nBorderWidth(-1) { SetSize(GetSize()); }
+ SmFace(const String& rName, const Size& rSize) :
+ Font(rName, rSize), nBorderWidth(-1) { SetSize(GetSize()); }
+ SmFace( FontFamily eFamily, const Size& rSize) :
+ Font(eFamily, rSize), nBorderWidth(-1) { SetSize(GetSize()); }
+
+ SmFace(const SmFace &rFace) :
+ Font(rFace), nBorderWidth(-1) { SetSize(GetSize()); }
+
+ // overloaded version in order to supply a min value
+ // for font size (height). (Also used in ctor's to do so.)
+ void SetSize(const Size& rSize);
+
+ void SetBorderWidth(long nWidth) { nBorderWidth = nWidth; }
+ long GetBorderWidth() const;
+ long GetDefaultBorderWidth() const { return GetSize().Height() / 20 ; }
+ void FreezeBorderWidth() { nBorderWidth = GetDefaultBorderWidth(); }
+
+ SmFace & operator = (const SmFace &rFace);
+};
+
+SmFace & operator *= (SmFace &rFace, const Fraction &rFrac);
+
+
+#ifdef NEVER
+////////////////////////////////////////////////////////////
+//
+// SmInfoText
+//
+
+class SmInfoText : public FixedText
+{
+protected:
+ USHORT nMaxLen;
+ String aText;
+
+public:
+ SmInfoText(Window* pParent, WinBits nWinStyle = 0, USHORT nMax = 128);
+ SmInfoText(Window* pParent, const ResId& rResId, USHORT nMax = 128);
+
+ void SetText(const String& rStr);
+
+ XubString GetText() const { return (aText); }
+};
+#endif
+
+
+////////////////////////////////////////////////////////////
+//
+// SmPickList
+//
+
+class SmPickList : public SfxPtrArr
+{
+protected:
+ USHORT nSize;
+
+ virtual void *CreateItem(const String& rString) = 0;
+ virtual void *CreateItem(const void *pItem) = 0;
+ virtual void DestroyItem(void *pItem) = 0;
+
+ virtual BOOL CompareItem(const void *pFirstItem, const void *pSecondItem) const = 0;
+
+ virtual String GetStringItem(void *pItem) = 0;
+
+ virtual void LoadItem(SvStream& rStream, void *pItem) = 0;
+ virtual void SaveItem(SvStream& rStream, const void *pItem) const = 0;
+
+ void *GetPtr(USHORT nPos) const { return SfxPtrArr::GetObject(nPos); }
+ void *&GetPtr(USHORT nPos) { return SfxPtrArr::GetObject(nPos); }
+ void InsertPtr(USHORT nPos, void *pItem) { SfxPtrArr::Insert(nPos, pItem); }
+ void RemovePtr(USHORT nPos, USHORT nCount = 1) { SfxPtrArr::Remove(nPos, nCount); }
+
+public:
+ SmPickList(USHORT nInitSize = 0, USHORT nMaxSize = 5);
+ ~SmPickList();
+
+ SmPickList& operator = (const SmPickList& rList);
+
+ void *Get(USHORT nPos = 0) const { return GetPtr(nPos); }
+ void Insert(const void* pItem);
+ void Update(const void* pItem, const void *pNewItem);
+ void Remove(const void* pItem);
+
+ void *operator [] (USHORT nPos) const { return GetPtr(nPos); }
+
+ void SetSize(USHORT nNewSize);
+ USHORT GetSize() const { return nSize; }
+ USHORT Count() const { return SfxPtrArr::Count(); }
+
+ BOOL Contains(const void *pItem) const;
+ void Clear();
+
+ friend SvStream& operator << (SvStream& rStream, const SmPickList& rPickList);
+ friend SvStream& operator >> (SvStream& rStream, SmPickList& rPickList);
+};
+
+
+////////////////////////////////////////////////////////////
+//
+// SmStringPickList
+//
+#ifdef NEVER
+class SmStringPickList : public SmPickList
+{
+protected:
+ virtual void *CreateItem(const String& rString);
+ virtual void *CreateItem(const void *pItem);
+ virtual void DestroyItem(void *pItem);
+
+ virtual BOOL CompareItem(const void *pFirstItem, const void *pSecondItem) const;
+
+ virtual String GetStringItem(void *pItem);
+
+ virtual void LoadItem(SvStream& rStream, void *pItem);
+ virtual void SaveItem(SvStream& rStream, const void *pItem) const;
+
+public:
+ SmStringPickList()
+ : SmPickList(0, 5) {}
+ SmStringPickList(USHORT nInitSize, USHORT nMaxSize)
+ : SmPickList(nInitSize, nMaxSize) {}
+ SmStringPickList(const SmPickList& rOrig )
+ : SmPickList(rOrig) {}
+ ~SmStringPickList() { Clear(); }
+
+ virtual void Insert(const String &rString);
+ virtual void Update(const String &rString, const String &rNewString);
+ virtual void Remove(const String &rString);
+
+ inline BOOL Contains(const String &rString) const;
+ inline String Get(USHORT nPos = 0) const;
+
+ inline SmStringPickList& operator = (const SmStringPickList& rList);
+ inline String operator [] (USHORT nPos) const;
+};
+
+inline SmStringPickList& SmStringPickList::operator = (const SmStringPickList& rList)
+{
+ *(SmPickList *)this = *(SmPickList *)&rList; return *this;
+}
+
+inline String SmStringPickList::operator [] (USHORT nPos) const
+{
+ return *((String *)SmPickList::operator[](nPos));
+}
+
+inline String SmStringPickList::Get(USHORT nPos) const
+{
+ return nPos < Count() ? *((String *)SmPickList::Get(nPos)) : String();
+}
+
+inline BOOL SmStringPickList::Contains(const String &rString) const
+{
+ return SmPickList::Contains((void *)&rString);
+}
+#endif
+
+////////////////////////////////////////////////////////////
+//
+// SmFontPickList
+//
+
+class SmFontDialog;
+
+class SmFontPickList : public SmPickList
+{
+protected:
+ virtual void *CreateItem(const String& rString);
+ virtual void *CreateItem(const void *pItem);
+ virtual void DestroyItem(void *pItem);
+
+ virtual BOOL CompareItem(const void *pFirstItem, const void *pSecondItem) const;
+
+ virtual String GetStringItem(void *pItem);
+
+ virtual void LoadItem(SvStream& rStream, void *pItem);
+ virtual void SaveItem(SvStream& rStream, const void *pItem) const;
+
+public:
+ SmFontPickList()
+ : SmPickList(0, 5) {}
+ SmFontPickList(USHORT nInitSize, USHORT nMaxSize)
+ : SmPickList(nInitSize, nMaxSize) {}
+ SmFontPickList(const SmPickList& rOrig )
+ : SmPickList(rOrig) {}
+ ~SmFontPickList() { Clear(); }
+
+ virtual void Insert(const Font &rFont);
+ virtual void Update(const Font &rFont, const Font &rNewFont);
+ virtual void Remove(const Font &rFont);
+
+ inline BOOL Contains(const Font &rFont) const;
+ inline Font Get(USHORT nPos = 0) const;
+
+ inline SmFontPickList& operator = (const SmFontPickList& rList);
+ inline Font operator [] (USHORT nPos) const;
+
+ void ReadFrom(const SmFontDialog& rDialog);
+ void WriteTo(SmFontDialog& rDialog) const;
+};
+
+inline SmFontPickList& SmFontPickList::operator = (const SmFontPickList& rList)
+{
+ *(SmPickList *)this = *(SmPickList *)&rList; return *this;
+}
+
+inline Font SmFontPickList::operator [] (USHORT nPos) const
+{
+ return *((Font *)SmPickList::operator[](nPos));
+}
+
+inline Font SmFontPickList::Get(USHORT nPos) const
+{
+ return nPos < Count() ? *((Font *)SmPickList::Get(nPos)) : Font();
+}
+
+inline BOOL SmFontPickList::Contains(const Font &rFont) const
+{
+ return SmPickList::Contains((void *)&rFont);
+}
+
+
+////////////////////////////////////////////////////////////
+//
+// SmStringPickComboBox
+//
+#ifdef NEVER
+class SmStringPickComboBox : public SmStringPickList, public ComboBox
+{
+protected:
+ virtual void LoseFocus();
+
+ DECL_LINK(SelectHdl, ComboBox *);
+
+public:
+ SmStringPickComboBox(Window* pParent, WinBits nWinStyle = 0, USHORT nMax = 4);
+ SmStringPickComboBox(Window* pParent, const ResId& rResId, USHORT nMax = 4);
+
+ SmStringPickComboBox& operator = (const SmStringPickList& rList);
+
+ void SetText(const String& rStr);
+
+ virtual void Insert(const String &rString);
+ virtual void Update(const String &rString, const String &rNewString);
+ virtual void Remove(const String &rString);
+};
+#endif
+
+////////////////////////////////////////////////////////////
+//
+// SmFontPickListBox
+//
+
+class SmFontPickListBox : public SmFontPickList, public ListBox
+{
+protected:
+ DECL_LINK(SelectHdl, ListBox *);
+
+public:
+ SmFontPickListBox(Window* pParent, WinBits nWinStyle = 0, USHORT nMax = 4);
+ SmFontPickListBox(Window* pParent, const ResId& rResId, USHORT nMax = 4);
+
+ SmFontPickListBox& operator = (const SmFontPickList& rList);
+
+ virtual void Insert(const Font &rFont);
+ virtual void Update(const Font &rFont, const Font &rNewFont);
+ virtual void Remove(const Font &rFont);
+};
+
+#endif
+
diff --git a/starmath/inc/view.hxx b/starmath/inc/view.hxx
new file mode 100644
index 000000000000..34a2cd4f19d9
--- /dev/null
+++ b/starmath/inc/view.hxx
@@ -0,0 +1,313 @@
+/*************************************************************************
+ *
+ * $RCSfile: view.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:57:25 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef VIEW_HXX
+#define VIEW_HXX
+
+
+#ifndef _SFXDOCKWIN_HXX //autogen
+#include <sfx2/dockwin.hxx>
+#endif
+#ifndef _SFXVIEWSH_HXX //autogen
+#include <sfx2/viewsh.hxx>
+#endif
+#ifndef _SCRWIN_HXX //autogen
+#include <svtools/scrwin.hxx>
+#endif
+#ifndef _SFXCTRLITEM_HXX //autogen
+#include <sfx2/ctrlitem.hxx>
+#endif
+#ifndef _SFX_SHELL_HXX //autogen
+#include <sfx2/shell.hxx>
+#endif
+#ifndef _VIEWFAC_HXX //autogen
+#include <sfx2/viewfac.hxx>
+#endif
+#ifndef _SFXVIEWFRM_HXX //autogen
+#include <sfx2/viewfrm.hxx>
+#endif
+
+#ifndef EDIT_HXX
+#include "edit.hxx"
+#endif
+
+#ifndef NODE_HXX
+#include "node.hxx"
+#endif
+
+class Menu;
+class DataChangedEvent;
+class SmDocShell;
+class SmViewShell;
+
+/**************************************************************************/
+
+class SmGraphicWindow: public ScrollableWindow
+{
+ Point aFormulaDrawPos;
+ Rectangle aCursorRect;
+ SmViewShell *pViewShell;
+ USHORT nZoom;
+ short nModifyCount;
+ BOOL bIsCursorVisible;
+
+protected:
+ void SetFormulaDrawPos(const Point &rPos) { aFormulaDrawPos = rPos; }
+ Point GetFormulaDrawPos() const { return aFormulaDrawPos; }
+ void SetIsCursorVisible(BOOL bVis) { bIsCursorVisible = bVis; }
+ void SetCursor(const SmNode *pNode);
+ void SetCursor(const Rectangle &rRect);
+
+ virtual void DataChanged( const DataChangedEvent& );
+ virtual void Paint(const Rectangle&);
+ virtual void KeyInput(const KeyEvent& rKEvt);
+ virtual void Command(const CommandEvent& rCEvt);
+ virtual void StateChanged( StateChangedType eChanged );
+ DECL_LINK(MenuSelectHdl, Menu *);
+
+public:
+ SmGraphicWindow(SmViewShell* pShell);
+
+ virtual void MouseButtonDown(const MouseEvent &rMEvt);
+
+ void SetZoom(USHORT Factor);
+ USHORT GetZoom() const { return nZoom; }
+
+ void ZoomToFitInWindow();
+ void SetTotalSize();
+
+ BOOL IsCursorVisible() const { return bIsCursorVisible; }
+ void ShowCursor(BOOL bShow);
+ const SmNode * SetCursorPos(USHORT nRow, USHORT nCol);
+};
+
+/**************************************************************************/
+
+class SmGraphicController: public SfxControllerItem
+{
+protected:
+ SmGraphicWindow &rGraphic;
+public:
+ SmGraphicController(SmGraphicWindow &, USHORT, SfxBindings & );
+ virtual void StateChanged(USHORT nSID,
+ SfxItemState eState,
+ const SfxPoolItem* pState);
+};
+
+/**************************************************************************/
+
+class SmEditController: public SfxControllerItem
+{
+protected:
+ SmEditWindow &rEdit;
+
+public:
+ SmEditController(SmEditWindow &, USHORT, SfxBindings & );
+ virtual void StateChanged(USHORT nSID,
+ SfxItemState eState,
+ const SfxPoolItem* pState);
+};
+
+/**************************************************************************/
+
+class SmCmdBoxWindow : public SfxDockingWindow
+{
+ SmEditWindow aEdit;
+ SmEditController aController;
+ Timer aGrabTimer;
+
+ virtual void Resize();
+ virtual void Paint(const Rectangle& rRect);
+ virtual Size CalcDockingSize(SfxChildAlignment eAlign);
+ virtual SfxChildAlignment CheckAlignment(SfxChildAlignment eActual,
+ SfxChildAlignment eWish);
+
+protected :
+ DECL_LINK(UpdateTimeoutHdl, Timer *);
+
+public:
+ SmCmdBoxWindow(SfxBindings *pBindings,
+ SfxChildWindow *pChildWindow,
+ Window *pParent);
+
+ virtual ~SmCmdBoxWindow ();
+
+ void AdjustPosition();
+
+ SmEditWindow *GetEditWindow() { return (&aEdit); }
+
+ void ShowWindows ();
+
+ void RestartFocusTimer ()
+ {
+ aGrabTimer.SetTimeout (100);
+ aGrabTimer.Start ();
+ }
+
+ virtual void ToggleFloatingMode();
+
+ // Window
+ virtual void StateChanged( StateChangedType nStateChange );
+
+ void Grab ();
+
+};
+
+/**************************************************************************/
+
+class SmCmdBoxWrapper : public SfxChildWindow
+{
+ SFX_DECL_CHILDWINDOW(SmCmdBoxWrapper);
+
+protected:
+ SmCmdBoxWrapper(Window *pParentWindow,
+ USHORT nId,
+ SfxBindings *pBindings,
+ SfxChildWinInfo *pInfo);
+
+public:
+ Size aSize;
+
+ SmEditWindow *GetEditWindow()
+ {
+ return (((SmCmdBoxWindow *)pWindow)->GetEditWindow());
+ }
+
+ void RestartFocusTimer ()
+ {
+ ((SmCmdBoxWindow *)pWindow)->RestartFocusTimer ();
+ }
+
+// virtual void FillInfo(SfxChildWinInfo &rInfo) const;
+
+ void Grab ();
+};
+
+/**************************************************************************/
+
+class SmViewShell: public SfxViewShell
+{
+ SmGraphicWindow aGraphic;
+ SmGraphicController aGraphicController;
+ String StatusText;
+ Window *pViewFrame;
+
+protected:
+
+ Size GetTextLineSize(OutputDevice& rDevice,
+ const String& rLine);
+ Size GetTextSize(OutputDevice& rDevice,
+ const String& rText,
+ long MaxWidth);
+ void DrawTextLine(OutputDevice& rDevice,
+ const Point& rPosition,
+ const String& rLine);
+ void DrawText(OutputDevice& rDevice,
+ const Point& rPosition,
+ const String& rText,
+ USHORT MaxWidth);
+
+ virtual USHORT Print(SfxProgress &rProgress,
+ PrintDialog *pPrintDialog = 0);
+ virtual SfxPrinter *GetPrinter(BOOL bCreate = FALSE);
+ virtual USHORT SetPrinter(SfxPrinter *pNewPrinter,
+ USHORT nDiffFlags = SFX_PRINTER_ALL);
+
+ virtual SfxTabPage *CreatePrintOptionsPage(Window *pParent,
+ const SfxItemSet &rOptions);
+ virtual void Deactivate(BOOL IsMDIActivate);
+ virtual void Activate(BOOL IsMDIActivate);
+ virtual Size GetOptimalSizePixel() const;
+ virtual void AdjustPosSizePixel(const Point &rPos, const Size &rSize);
+ virtual void InnerResizePixel(const Point &rOfs, const Size &rSize);
+ virtual void OuterResizePixel(const Point &rOfs, const Size &rSize);
+ virtual void QueryObjAreaPixel( Rectangle& rRect ) const;
+ virtual void SetZoomFactor( const Fraction &rX, const Fraction &rY );
+
+public:
+ TYPEINFO();
+
+ SmDocShell * GetDoc()
+ {
+ return (SmDocShell *) GetViewFrame()->GetObjectShell();
+ }
+
+ SmEditWindow * GetEditWindow();
+ SmGraphicWindow & GetGraphicWindow() { return aGraphic; }
+ const SmGraphicWindow & GetGraphicWindow() const { return aGraphic; }
+
+ void SetStatusText(const String& Text);
+
+ void ShowError( const SmErrorDesc *pErrorDesc );
+ void NextError();
+ void PrevError();
+
+ SFX_DECL_INTERFACE(SFX_INTERFACE_SMA_START+2);
+ SFX_DECL_VIEWFACTORY(SmViewShell);
+
+ virtual void Execute( SfxRequest& rReq );
+ virtual void GetState(SfxItemSet &);
+
+ SmViewShell(SfxViewFrame *pFrame, SfxViewShell *pOldSh);
+ ~SmViewShell();
+};
+
+#endif
+
diff --git a/starmath/prj/d.lst b/starmath/prj/d.lst
new file mode 100644
index 000000000000..a2726db3677e
--- /dev/null
+++ b/starmath/prj/d.lst
@@ -0,0 +1,18 @@
+..\%__SRC%\slb\lib*.* %_DEST%\lib%_EXT%\lib*.*
+..\%__SRC%\lib\lib*.* %_DEST%\lib%_EXT%\lib*.*
+..\%__SRC%\slb\ysm.lib %_DEST%\lib%_EXT%\ysm.lib
+..\%__SRC%\bin\smath3.exe %_DEST%\bin%_EXT%\smath3.exe
+..\%__SRC%\bin\smath3.sym %_DEST%\bin%_EXT%\smath3.sym
+..\%__SRC%\misc\*.map %_DEST%\bin%_EXT%\*.map
+touch: ..\%__SRC%\misc\sm.hid %_DEST%\bin%_EXT%\sm.hid
+..\%__SRC%\misc\sm.csv %_DEST%\inc%_EXT%\sm.csv
+..\%__SRC%\bin\smslots.tlb %_DEST%\bin%_EXT%\smslots.tlb
+..\%__SRC%\bin\sm%upd%*.dll %_DEST%\bin%_EXT%\sm%upd%*.dll
+..\%__SRC%\bin\sm%upd%*.res %_DEST%\bin%_EXT%\sm%upd%*.res
+..\%__SRC%\bin\sm%upd%*.sym %_DEST%\bin%_EXT%\sm%upd%*.sym
+dos: mkdir %_DEST%\inc\starmath
+
+hedabu: ..\inc\smdll.hxx %_DEST%\inc%_EXT%\starmath\smdll.hxx
+hedabu: ..\inc\smdll0.hxx %_DEST%\inc%_EXT%\starmath\smdll0.hxx
+hedabu: ..\inc\smmod.hxx %_DEST%\inc%_EXT%\starmath\smmod.hxx
+
diff --git a/starmath/sdi/makefile.mk b/starmath/sdi/makefile.mk
new file mode 100644
index 000000000000..968aa01b8709
--- /dev/null
+++ b/starmath/sdi/makefile.mk
@@ -0,0 +1,120 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 16:57:25 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning the Software.
+#
+# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+#
+# Copyright: 2000 by Sun Microsystems, Inc.
+#
+# All Rights Reserved.
+#
+# Contributor(s): _______________________________________
+#
+#
+#
+#*************************************************************************
+
+PRJ=..
+
+PRJNAME=smath3
+TARGET=smslots
+SDIEXPORT=smnew
+SVSDIINC=$(PRJ)$/inc
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+
+# --- Files --------------------------------------------------------
+
+
+SDINAME=$(TARGET)
+
+SVSDIDEPEND= \
+ $(SOLARINCDIR)$/svxslots.ilb \
+ smnew.sdi \
+ smath.sdi \
+ smslots.sdi \
+ $(SVSDIINC)$/starmath.hrc
+
+SRCFILES= \
+ smslots.src
+
+# --- Targets -------------------------------------------------------
+
+.IF "$(depend)" == ""
+
+TLBLIST+=\
+ $(BIN)$/$(SDINAME).tlb
+
+ALL: \
+ ALLTAR \
+ $(TLBLIST)
+
+.ENDIF
+
+.INCLUDE : target.mk
+
+.IF "$(GUIBASE)$(VCL)"=="WIN"
+$(BIN)$/$(SDINAME).tlb: \
+ $(MISCX)$/$(SDINAME).odl
+ rscpp -I.;$(SVSDIINC);$(INC) -DSOLAR_VERSION=$(solar_version) $(MISC)$/$(SDINAME).odl $(MISC)$/$(SDINAME).odx
+.IF "$(GUI)"=="WIN"
+ wx /w /a mktyplib /nocpp /o $(MISC)$/$(SDINAME).err /tlb $(BIN)$/$(SDINAME).tlb $(MISC)$/$(SDINAME).odx
+.ELSE
+ mktyplib /win32 /nocpp /o $(MISC)$/$(SDINAME).err /tlb $(BIN)$/$(SDINAME).tlb $(MISC)$/$(SDINAME).odx
+.ENDIF
+ +type $(MISC)$/$(SDINAME).err
+.ELSE
+$(BIN)$/$(SDINAME).tlb:
+ @echo nix
+.ENDIF
+
diff --git a/starmath/sdi/smath.sdi b/starmath/sdi/smath.sdi
new file mode 100644
index 000000000000..be4e6bc82250
--- /dev/null
+++ b/starmath/sdi/smath.sdi
@@ -0,0 +1,881 @@
+//--------------------------------------------------------------------------
+SfxVoidItem NextMark SID_NEXTMARK
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Volatile,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SetPaperSize SID_GETEDITTEXT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_MATH;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem PrevMark SID_PREVMARK
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Volatile,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem View50 SID_VIEW050
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Config SID_PREFERENCES
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem ModifyStatus SID_MODIFYSTATUS
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = TRUE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem ConfigName SID_TEXT
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem InsertFormula SID_INSERT_FORMULA
+(SfxStringItem Name SID_INSERT_FORMULA,SfxStringItem Filter FN_PARAM_1)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem CopyObject SID_COPYOBJECT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ToolBox SID_TOOLBOX
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Volatile,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem NextError SID_NEXTERR
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Volatile,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem CommandWindow SID_CMDBOXWINDOW
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem View200 SID_VIEW200
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ZoomIn SID_ZOOMIN
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Textmode SID_TEXTMODE
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Volatile,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ToolBowWindow SID_TOOLBOXWINDOW
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem TextStatus SID_TEXTSTATUS
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = TRUE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SymbolCatalogue SID_SYMBOLS_CATALOGUE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Symbols SID_SYMBOLS
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem View100 SID_VIEW100
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem RedrawAutomatic SID_AUTO_REDRAW
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Volatile,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem PasteObject SID_PASTEOBJECT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ChangeFontSize SID_FONTSIZE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SymbolsLoad SID_SYMBOLS_LOAD
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SaveSymbols SID_SAVESYMBOLS
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxInt16Item Graphic SID_GRAPHIC
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_MATH;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ChangeFont SID_FONT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ChangeDistance SID_DISTANCE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ZoomOut SID_ZOOMOUT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Draw SID_DRAW
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Volatile,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertCommand SID_INSERTCOMMAND
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertConfigName SID_INSERTTEXT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ChangeAlignment SID_ALIGN
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem LoadSymbols SID_LOADSYMBOLS
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem PrevError SID_PREVERR
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Volatile,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem FormelCursor SID_FORMULACURSOR
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_MATH;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem FitInWindow SID_FITINWINDOW
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Adjust SID_ADJUST
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Volatile,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
diff --git a/starmath/sdi/smslots.sdi b/starmath/sdi/smslots.sdi
new file mode 100644
index 000000000000..3ca9d366cb2f
--- /dev/null
+++ b/starmath/sdi/smslots.sdi
@@ -0,0 +1,505 @@
+/*************************************************************************
+#*
+#* $Workfile: SMSLOTS.SDI $
+#*
+#*
+#* Beschreibung Starmath IDL-File
+#*
+#* Letzte Aenderung $Author: hr $ $Date: 2000-09-18 16:57:26 $
+#* $Revision: 1.1.1.1 $
+#*
+#* $Logfile: T:/starmath/sdi/smslots.sdv $
+#*
+#* Copyright (c) 1989 - 1995, STAR DIVISION
+#*
+#*************************************************************************
+
+ Source Code Control System - Header
+
+ $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/starmath/sdi/smslots.sdi,v 1.1.1.1 2000-09-18 16:57:26 hr Exp $
+
+*************************************************************************/
+
+
+
+import "svxslots.ilb"
+
+module
+"312C4240-35E7-101C-B12A-04021C007002"
+"58216740-35E7-101C-B12A-04021C007002"
+StarMath
+[
+ HelpText ( "StarMath Application" )
+ SlotIdFile ( "starmath.hrc" )
+ SlotIdFile ( "sfx2/sfxsids.hrc" )
+ SlotIdFile ( "svx/svxids.hrc" )
+ TypeLibFile ( "smslots.tlb" )
+]
+{
+ include "smnew.sdi"
+ include "smath.sdi"
+ interface StarMath : Module
+ [
+ uuid ( "92B0FD20-2FC1-11CF-89CA-008029E4B0B1" )
+ ]
+ {
+ SID_CONFIGEVENT //idlpp ole : no , status : no
+ [
+ StateMethod = GetState ;
+ Export = FALSE ;
+ ]
+}
+
+shell SmModule
+{
+ import StarMath[Automation];
+}
+
+interface FormulaDocument : OfficeDocument
+[
+ uuid ( "815CBB20-2FC3-11CF-89CA-008029E4B0B1" )
+]
+{
+ SID_DOCTEMPLATE //idlpp ole : no , status : no
+ [
+ StateMethod = GetState ;
+ Export = FALSE ;
+ ]
+ SID_SYMBOLS_CATALOGUE //idlpp ole : no , status : no
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_SYMBOLS_LOAD //idlpp ole : no , status : no
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_AUTO_REDRAW //idlpp ole : no , status : no
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_TOOLBOX //idlpp ole : no , status : no
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ //idlpp kein Menuepunkt , also keine Texte
+ SID_LOADSYMBOLS //idlpp ole : no , status : no
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ //idlpp kein Menuepunkt , also keine Texte
+ SID_SAVESYMBOLS //idlpp ole : no , status : no
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_INSERT_FORMULA //idlpp ole : no , status : no
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ Export = FALSE ;
+ ]
+ SID_FONT //idlpp ole : no , status : no
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FONTSIZE //idlpp ole : no , status : no
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_DISTANCE //idlpp ole : no , status : no
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_ALIGN //idlpp ole : no , status : no
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_TEXTMODE //idlpp ole : no , status : no
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ //idlpp kein Menueeintrag , also keine Texte
+ SID_MODIFYSTATUS //idlpp ole : no , status : no
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ //idlpp kein Menueeintrag , also keine Texte
+ SID_TEXT //idlpp ole : no , status : no
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ //idlpp kein Menueeintrag , also keine Texte
+ SID_GRAPHIC //idlpp ole : no , status : no
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ //idlpp kein Menueeintrag , also keine Texte
+ SID_COPYOBJECT //idlpp ole : no , status : no
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ //idlpp kein Menueeintrag , also keine Texte
+ SID_PASTEOBJECT //idlpp ole : no , status : no
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+}
+
+shell SmDocShell : SfxObjectShell
+{
+ import FormulaDocument[Automation];
+}
+
+
+interface FormulaView : View
+[
+ uuid ( "CE1A6C00-2FC3-11CF-89CA-008029E4B0B1" )
+]
+{
+ SID_FORMULACURSOR
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_NEXTERR //idlpp ole : no , status : no
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_PREVERR //idlpp ole : no , status : no
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_NEXTMARK //idlpp ole : no , status : no
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_PREVMARK //idlpp ole : no , status : no
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_VIEW050 //idlpp ole : no , status : no
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_VIEW100 //idlpp ole : no , status : no
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_VIEW200 //idlpp ole : no , status : no
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_ZOOMIN //idlpp ole : no , status : no
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_ZOOMOUT //idlpp ole : no , status : no
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_DRAW //idlpp ole : no , status : no
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_ADJUST //idlpp ole : no , status : no
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ //idlpp kein Menueeintrag , also keine Texte
+ SID_FITINWINDOW //idlpp ole : no , status : no
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_CUT //idlpp ole : no , status : no
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ Volatile;
+ ]
+ SID_COPY //idlpp ole : no , status : no
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ Volatile;
+ ]
+ SID_PASTE //idlpp ole : no , status : no
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ Volatile;
+ ]
+ SID_DELETE //idlpp ole : no , status : no
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ Volatile;
+ ]
+ SID_SELECT //idlpp ole : no , status : no
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ //idlpp kein Menueeintrag , also keine Texte
+ SID_INSERTCOMMAND //idlpp ole : no , status : no
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ //idlpp kein Menueeintrag , also keine Texte
+ SID_INSERTTEXT //idlpp ole : no , status : no
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ //idlpp kein Menueeintrag , also keine Texte
+ SID_ATTR_ZOOM //idlpp ole : no , status : no
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ Export = FALSE ;
+ ]
+ //idlpp kein Menueeintrag , also keine Texte
+ SID_TEXTSTATUS //idlpp ole : no , status : no
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ //idlpp kein Menueeintrag , also keine Texte
+ SID_GETEDITTEXT //idlpp ole : no , status : no
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ //idlpp kein Menueeintrag , also keine Texte
+ SID_CMDBOXWINDOW //idlpp ole : no , status : no
+ [
+ ExecMethod = NoExec ;
+ StateMethod = NoState ;
+ ]
+ //idlpp kein Menueeintrag , also keine Texte
+ SID_TOOLBOXWINDOW //idlpp ole : no , status : no
+ [
+ ExecMethod = NoExec ;
+ StateMethod = NoState ;
+ ]
+}
+
+shell SmViewShell : SfxViewShell
+{
+ import FormulaView[Automation];
+}
+
+}
+
+/*************************************************************************
+
+ Source Code Control System - History
+
+ $Log: not supported by cvs2svn $
+ Revision 1.61 1999/07/02 10:22:24 TL
+ #67357# SID_MARKERROR deleted.
+
+
+ Rev 1.60 02 Jul 1999 12:22:24 TL
+ #67357# SID_MARKERROR deleted.
+
+ Rev 1.59 29 Jun 1999 13:23:38 TL
+ #67233# SID_INSERTDOC in SID_INSERT_FORMULA umbenannt.
+
+ Rev 1.58 23 Mar 1999 12:32:00 MA
+ #63806# ConfigName nur noch in der Resource
+
+ Rev 1.57 17 Mar 1999 15:54:14 MBA
+ #63611#: kein HelpTexte/ConfigNames mehr
+
+ Rev 1.56 17 Feb 1999 15:52:44 OS
+ #61890# Methoden fuer alte Optionsdialoge geloescht
+
+ Rev 1.55 23 Nov 1998 16:02:16 TL
+ Task #58286#: Neuer Slot fuer Textmodus
+
+ Rev 1.54 12 Nov 1998 15:53:32 MA
+ Task #58163#: Slot SDI_FORMULACURSOR neu. (pz von TL gemacht)
+
+ Rev 1.53 02 Oct 1998 19:43:10 MA
+ #57466# RELOAD hat hier nichts zu suchen
+
+ Rev 1.52 22 Jul 1998 12:49:08 MA
+ #53584# Clipboard-Slots mussen volatile sein
+
+ Rev 1.51 07 Jul 1998 15:48:02 MH
+ verlorende header wieder eingesammelt
+
+ Rev 1.50 22 Apr 1998 16:39:24 MA
+ diverse Fixes, komplette Umstellung inplace-Verhalten
+
+ Rev 1.49 09 Mar 1998 19:34:32 RG
+ idl -> sdi
+
+ Rev 1.48 04 Sep 1997 13:34:40 MBA
+ Document von OfficeDocument abgeleitet
+
+ Rev 1.47 03 Sep 1997 16:50:30 MBA
+ Neue Interface-Namen
+
+ Rev 1.46 02 Sep 1997 16:51:50 MBA
+ StarMath von Module abgeleitet
+
+ Rev 1.45 28 Aug 1997 12:32:10 MBA
+ Neue Interface-Namen
+
+ Rev 1.44 27 Jan 1997 18:42:22 MBA
+ [Automation] fehlte beim Import
+
+ Rev 1.43 20 Dec 1996 17:44:52 RB
+ Optionen in Modul verschoben
+
+ Rev 1.42 19 Dec 1996 08:48:16 TRI
+ SID_LASTVERSIONDOC -> SID_RELOAD
+
+ Rev 1.41 11 Dec 1996 12:41:40 TRI
+ kein ofa.ibl benutzen
+
+ Rev 1.40 10 Dec 1996 15:03:56 RB
+ Neuer Name
+
+ Rev 1.39 09 Dec 1996 12:09:44 SOH
+ * OptionsDialogSlot -> SID_SM_EDITOPTIONS
+
+ Rev 1.38 12 Nov 1996 14:30:30 RB
+ Umstellung auf neues DLL-Handling
+
+ Rev 1.37 05 Nov 1996 15:18:10 NF
+ ofa.ilb raus, svxslots rein ...
+
+ Rev 1.36 23 Oct 1996 12:44:22 SOH
+ + include smnew.idl
+
+ Rev 1.35 22 Oct 1996 21:39:16 HJS
+ merge 22.10.96
+
+ Rev 1.34 07 Oct 1996 14:49:18 HJS
+ merge 07.10.96
+
+ Rev 1.33 19 Sep 1996 19:25:38 MBA
+ Syntaxfehler
+
+ Rev 1.32 19 Sep 1996 19:06:14 MBA
+ Anpassung
+
+ Rev 1.31 25 Jul 1996 12:30:34 RB
+ Slot SID_GETEDITTEXT
+
+ Rev 1.30 21 Jun 1996 12:30:28 RB
+ Muss-Umstellungen idlpp
+
+ Rev 1.29 04 Apr 1996 14:38:58 RB
+ Container weg Fensterslots (#26769#)
+
+ Rev 1.28 03 Apr 1996 16:08:38 RB
+ Slots fuer Kommando- und Toolboxfenster
+
+ Rev 1.27 06 Dec 1995 15:47:28 RB
+ uuids verteilt und neue syntax, SID_LASTVERSIONDOC neu
+
+ Rev 1.26 27 Nov 1995 17:26:36 RB
+ include beseitigt
+
+ Rev 1.25 27 Nov 1995 15:02:18 RB
+ initial revision
+
+ Rev 1.24 24 Nov 1995 18:59:18 RB
+ ExecNo beseitigt
+
+ Rev 1.23 24 Nov 1995 14:14:50 RB
+ Export=FALSE und Comments
+
+ Rev 1.22 24 Nov 1995 13:42:56 RB
+ Anpassungen an neue Syntax
+
+ Rev 1.21 24 Nov 1995 12:03:54 RB
+ etwas aufgeraeumt
+
+ Rev 1.20 22 Nov 1995 17:54:54 RB
+ SID_DOCTEMPLATE neu
+
+ Rev 1.19 17 Nov 1995 18:09:20 RB
+ SID_DOCINFO vorbereitet
+
+ Rev 1.18 16 Nov 1995 14:02:26 RB
+ SID_CONFIGEVENT
+
+ Rev 1.17 13 Nov 1995 17:45:58 RB
+ ???
+
+ Rev 1.16 09 Nov 1995 18:02:38 RB
+ SID_ATTR_ZOOM wieder verfuegbar
+
+ Rev 1.15 02 Nov 1995 17:55:18 RB
+ SID_ATTR_ZOOM beseitigt
+
+ Rev 1.14 01 Nov 1995 18:30:00 RB
+ SID_TEXT... wieder verfuegbar
+
+ Rev 1.13 15 Oct 1995 16:19:42 RB
+ Umlaute
+
+ Rev 1.12 12 Oct 1995 12:49:22 RB
+
+ Rev 1.11 07 Oct 1995 15:14:02 RB
+ HelpText und ConfigName eingetragen
+
+ Rev 1.10 04 Oct 1995 18:39:50 RB
+ GID_ geaendert und //idlpp HelpText//idlpp/ ConfigName
+
+ Rev 1.9 03 Oct 1995 15:55:54 RB
+ SID_DOCINFO ueberladen rueckgaengig
+
+ Rev 1.8 29 Sep 1995 13:42:18 RB
+ slots configurierbar (bugfix 15993)
+
+ Rev 1.7 08 Sep 1995 09:01:46 RB
+ SID_DOCINFO ueberladen
+
+ Rev 1.6 12 Aug 1995 12:28:28 TRI
+
+ Rev 1.5 10 Jul 1995 09:15:56 TRI
+ RH Aenderung
+
+ Rev 1.4 06 Jul 1995 01:47:06 MH
+ CutCopyPaste-Fehler beseitigt
+
+ Rev 1.3 19 Jun 1995 08:55:30 TRI
+ Revisions-Nr
+
+
+*************************************************************************/
+
+
diff --git a/starmath/sdi/svxitems.sdi b/starmath/sdi/svxitems.sdi
new file mode 100644
index 000000000000..06cc471bfd29
--- /dev/null
+++ b/starmath/sdi/svxitems.sdi
@@ -0,0 +1,570 @@
+
+//-------------------------------------------------------------------------
+
+enum SvxAdjust
+{
+ SVX_ADJUST_LEFT,
+ SVX_ADJUST_RIGHT,
+ SVX_ADJUST_BLOCK,
+ SVX_ADJUST_CENTER,
+ SVX_ADJUST_BLOCKLINE,
+ SVX_ADJUST_END
+};
+item SvxAdjust SvxAdjustItem;
+
+//-------------------------------------------------------------------------
+
+enum SvxCaseMap
+{
+ SVX_CASEMAP_NOT_MAPPED,
+ SVX_CASEMAP_VERSALIEN,
+ SVX_CASEMAP_GEMEINE,
+ SVX_CASEMAP_TITEL,
+ SVX_CASEMAP_KAPITAELCHEN,
+ SVX_CASEMAP_END
+};
+item SvxCaseMap SvxCaseMapItem;
+
+//-------------------------------------------------------------------------
+
+enum CharSet
+{
+ CHARSET_DONTKNOW,
+ CHARSET_ANSI,
+ CHARSET_MAC,
+ CHARSET_IBMPC_437,
+ CHARSET_IBMPC_850,
+ CHARSET_IBMPC_860,
+ CHARSET_IBMPC_861,
+ CHARSET_IBMPC_863,
+ CHARSET_IBMPC_865,
+ CHARSET_SYSTEM,
+ CHARSET_SYMBOL
+};
+item CharSet CharSetItem;
+
+//-------------------------------------------------------------------------
+
+enum FontFamily
+{
+ FAMILY_DONTKNOW,
+ FAMILY_DECORATIVE,
+ FAMILY_MODERN,
+ FAMILY_ROMAN,
+ FAMILY_SCRIPT,
+ FAMILY_SWISS,
+ FAMILY_SYSTEM
+};
+item FontFamily FontFamilyItem;
+
+//-------------------------------------------------------------------------
+
+enum FontPitch
+{
+ PITCH_DONTKNOW,
+ PITCH_FIXED,
+ PITCH_VARIABLE
+};
+item FontPitch FontPitchItem;
+
+//-------------------------------------------------------------------------
+
+enum FontAlign
+{
+ ALIGN_TOP,
+ ALIGN_BASELINE,
+ ALIGN_BOTTOM
+};
+item FontAlign FontAlignItem;
+
+//-------------------------------------------------------------------------
+
+enum FontWeight
+{
+ WEIGHT_DONTKNOW,
+ WEIGHT_THIN,
+ WEIGHT_ULTRALIGHT,
+ WEIGHT_LIGHT,
+ WEIGHT_SEMILIGHT,
+ WEIGHT_NORMAL,
+ WEIGHT_MEDIUM,
+ WEIGHT_SEMIBOLD,
+ WEIGHT_BOLD,
+ WEIGHT_ULTRABOLD,
+ WEIGHT_BLACK
+};
+item FontWeight FontWeightItem;
+
+//-------------------------------------------------------------------------
+
+enum FontUnderline
+{
+ UNDERLINE_NONE,
+ UNDERLINE_SINGLE,
+ UNDERLINE_DOUBLE,
+ UNDERLINE_DOTTED
+};
+item FontUnderline FontUnderlineItem;
+
+//-------------------------------------------------------------------------
+
+enum FontStrikeout
+{
+ STRIKEOUT_NONE,
+ STRIKEOUT_SINGLE,
+ STRIKEOUT_DOUBLE
+};
+item FontStrikeout FontStrikeoutItem;
+
+//-------------------------------------------------------------------------
+
+enum FontItalic
+{
+ ITALIC_NONE,
+ ITALIC_OBLIQUE,
+ ITALIC_NORMAL
+};
+item FontItalic FontItalicItem;
+
+//-------------------------------------------------------------------------
+
+enum SvxDbType
+{
+ DBTYPE_STARBASE,
+ DBTYPE_ODBC,
+ DBTYPE_WATCOM
+};
+item SvxDbType SvxDbTypeItem;
+
+//-------------------------------------------------------------------------
+
+enum SvxLineSpace
+{
+ SVX_LINE_SPACE_AUTO,
+ SVX_LINE_SPACE_MAX,
+ SVX_LINE_SPACE_MIN,
+ SVX_LINE_SPACE_END
+};
+item SvxLineSpace SvxLineSpaceItem;
+
+//-------------------------------------------------------------------------
+
+enum SvxInterLineSpace
+{
+ SVX_INTER_LINE_SPACE_OFF,
+ SVX_INTER_LINE_SPACE_PROP,
+ SVX_INTER_LINE_SPACE_FIX,
+ SVX_INTER_LINE_SPACE_END
+};
+item SvxInterLineSpace SvxInterLineSpaceItem;
+
+//-------------------------------------------------------------------------
+
+enum SvxBreak
+{
+ SVX_BREAK_NONE,
+ SVX_BREAK_COLUMN_BEFORE,
+ SVX_BREAK_COLUMN_AFTER,
+ SVX_BREAK_COLUMN_BOTH,
+ SVX_BREAK_PAGE_BEFORE,
+ SVX_BREAK_PAGE_AFTER,
+ SVX_BREAK_PAGE_BOTH,
+ SVX_BREAK_END
+};
+item SvxBreak SvxBreakItem;
+
+//-------------------------------------------------------------------------
+
+enum BrushStyle
+{
+ BRUSH_NULL,
+ BRUSH_SOLID,
+ BRUSH_HORZ,
+ BRUSH_VERT,
+ BRUSH_CROSS,
+ BRUSH_DIAGCROSS,
+ BRUSH_UPDIAG,
+ BRUSH_DOWNDIAG,
+ BRUSH_25,
+ BRUSH_50,
+ BRUSH_75,
+ BRUSH_BITMAP
+};
+item BrushStyle BrushStyleItem;
+
+//-------------------------------------------------------------------------
+
+enum SvxNumType
+{
+ SVX_CHARS_UPPER_LETTER,
+ SVX_CHARS_LOWER_LETTER,
+ SVX_ROMAN_UPPER,
+ SVX_ROMAN_LOWER,
+ SVX_ARABIC,
+ SVX_NUMBER_NONE,
+ SVX_CHAR_SPECIAL,
+ SVX_PAGEDESC
+};
+item SvxNumType SvxNumTypeItem;
+
+//-------------------------------------------------------------------------
+
+enum SvxShadowLocation
+{
+ SVX_SHADOW_NONE,
+ SVX_SHADOW_TOPLEFT,
+ SVX_SHADOW_TOPRIGHT,
+ SVX_SHADOW_BOTTOMLEFT,
+ SVX_SHADOW_BOTTOMRIGHT,
+ SVX_SHADOW_END
+};
+item SvxShadowLocation SvxShadowLocationItem;
+
+//-------------------------------------------------------------------------
+
+struct SvxBrush
+{
+ BrushStyle Style MID_BRUSHSTYLE;
+ BOOL Transparent MID_TRANSPARENT;
+ UINT32 BackColor MID_BG_COLOR;
+ UINT32 FillColor MID_FG_COLOR;
+};
+item SvxBrush SvxBrushItem;
+
+//-------------------------------------------------------------------------
+
+struct SvxCharSetColor
+{
+ CharSet CharSet MID_CHARSET;
+ UINT32 Color MID_FG_COLOR;
+};
+item SvxCharSetColor SvxCharSetColorItem;
+
+//-------------------------------------------------------------------------
+
+item BOOL SvxAutoKernItem;
+item UINT32 SvxColorItem;
+item BOOL SvxContourItem;
+item FontStrikeout SvxCrossedOutItem;
+
+//-------------------------------------------------------------------------
+
+struct SvxEscapement
+{
+ INT16 Esc MID_ESCAPEMENT;
+ BYTE Prop MID_PROPORTIONAL;
+};
+item SvxEscapement SvxEscapementItem;
+
+//-------------------------------------------------------------------------
+
+struct SvxFmtBreak
+{
+ BOOL Auto MID_AUTOBREAK;
+ UINT16 Break MID_BREAKxxx;
+}
+item SvxFmtBreak SvxFmtBreakItem;
+
+//-------------------------------------------------------------------------
+
+item BOOL SvxFmtKeepItem;
+item BOOL SvxFmtSplitItem;
+
+struct SvxFontHeight
+{
+ UINT32 Height MID_HEIGHT;
+ BYTE Prop MID_PROPORTIONAL;
+};
+item SvxFontHeight SvxFontHeightItem;
+
+//-------------------------------------------------------------------------
+
+struct SvxFont
+{
+ String StyleName MID_FONTSTYLE;
+ FontPitch Pitch MID_FONTPICTH;
+ CharSet CharSet MID_CHARSET;
+ FontFamily Family MID_FONTFAMILY;
+ String FamilyName MID_FONTFAMILYNAME;
+};
+item SvxFont SvxFontItem;
+
+//-------------------------------------------------------------------------
+
+struct SvxHyphenZone
+{
+ BOOL Hyphen MID_HYPHEN;
+ BOOL PageEnd MID_PAGEEND;
+ BYTE MinLead MID_MINLEAD;
+ BYTE MinTrail MID_MINTRAIL;
+ BYTE MaxHyphens MID_MAXHYPHENS;
+};
+item SvxHyphenZone SvxHyphenZoneItem;
+
+//-------------------------------------------------------------------------
+
+item INT16 SvxKerningItem;
+
+//-------------------------------------------------------------------------
+
+struct SvxLine
+{
+ UINT32 Color MID_FG_COLOR;
+ UINT16 OutWidth MID_OUTER_WIDTH;
+ UINT16 InWidth MID_INNER_WIDTH;
+ UINT16 Distance MID_DISTANCE;
+};
+item SvxLine SvxLineItem;
+
+//-------------------------------------------------------------------------
+
+struct SvxLRSpace
+{
+ INT16 FirstLineOffset MID_FIRSTLINE_OFFSET; // % or direct
+ UINT16 LeftMargin MID_LEFT_MARGIN; // % or direct
+ UINT16 RightMargin MID_RIGHT_MARGIN; // % or direct
+};
+item SvxLRSpace SvxLRSpaceItem;
+
+//-------------------------------------------------------------------------
+
+item UINT16 SvxLanguage;
+
+struct SvxLineSpacing
+{
+ SvxLineSpace LineSpace MID_LINESPACE;
+ UINT16 LineHeight MID_HEIGHT; // % or direct
+ SvxInterLineSpace InterLineSpace MID_INTER_LINESPACE;
+ INT16 InterSpace MID_INTER_SPACE;
+};
+item SvxLineSpacing SvxLineSpacingItem;
+
+//-------------------------------------------------------------------------
+
+item BOOL SvxNoHyphenItem;
+item BOOL SvxNoLinebreakItem;
+item BOOL SvxOpaqueItem;
+item BYTE SvxOrphansItem;
+
+//-------------------------------------------------------------------------
+
+struct SvxPage
+{
+ String DescName MID_DESCNAMExxx;
+ BOOL Landscape MID_LANDSCAPE;
+ UINT16 Use MID_USExxx;
+ SvxNumType NumType MID_NUMTYPExxx;
+};
+item SvxPage SvxPageItem;
+
+//-------------------------------------------------------------------------
+
+item String SvxPageModelItem;
+
+//-------------------------------------------------------------------------
+
+struct SvxPagePosSize
+{
+ INT32 XPos MID_X;
+ INT32 YPos MID_Y;
+ INT32 Width MID_WIDTH;
+ INT32 Height MID_HEIGHT;
+};
+item SvxPagePosSize SvxPagePosSizeItem;
+
+//-------------------------------------------------------------------------
+
+item BYTE SvxPaperBinItem;
+
+//-------------------------------------------------------------------------
+
+item String SvxPostItAuthorItem;
+item String SvxPostItDateItem;
+item String SvxPostItTextItem;
+item FontItalic SvxPostureItem;
+item BOOL SvxPrintItem;
+item UINT16 SvxPropSizeItem;
+
+//-------------------------------------------------------------------------
+
+struct SvxProtect
+{
+ BOOL Content MID_CONTENT;
+ BOOL Pos MID_POS;
+ BOOL Size MID_SIZE;
+};
+item SvxProtect SvxProtectItem;
+
+//-------------------------------------------------------------------------
+
+struct SvxSearch
+{
+ UINT16 Command MID_COMMAND;
+ String SearchString MID_SEARCH_STRING;
+ String ReplaceString MID_REPLACE_STRING;
+ // W)ord, E)xact, B)ack, S)election, R)egExpr, P)attern
+ String Flags MID_FLAGS;
+ UINT16 Family MID_FAMILY;
+ UINT16 CellType MID_CELLTYPE;
+ BOOL RowDirection MID_ROW_DIRECTION;
+ UINT16 AppFlag MID_APPFLAG;
+};
+item SvxSearch SvxSearchItem;
+
+//-------------------------------------------------------------------------
+
+item BOOL SvxShadowedItem;
+
+//-------------------------------------------------------------------------
+
+struct SvxShadow
+{
+ SvxShadowLocation Location MID_LOCATION;
+ UINT16 Width MID_WIDTH;
+ BrushStyle Style MID_BRUSHSTYLE;
+ BOOL Transparent MID_TRANSPARENT;
+ UINT32 BackColor MID_BG_COLOR;
+ UINT32 FillColor MID_FG_COLOR;
+};
+item SvxShadow SvxShadowItem;
+
+//-------------------------------------------------------------------------
+
+struct SvxSize
+{
+ UINT32 Width MID_WIDTH;
+ UINT32 Height MID_HEIGHT;
+};
+item SvxSize SvxSizeItem;
+
+//-------------------------------------------------------------------------
+
+struct SvxULSpace
+{
+ UINT16 Upper MID_UPPER; // % or direct
+ UINT16 Lower MID_LOWER; // % or direct
+};
+item SvxULSpace SvxULSpaceItem
+
+//-------------------------------------------------------------------------
+
+enum SvxChooseControlEnum
+{
+ SVX_SNAP_PUSHBUTTON,
+ SVX_SNAP_CHECKBOX,
+ SVX_SNAP_RADIOBUTTON,
+ SVX_SNAP_SPINBUTTON,
+ SVX_SNAP_FIXEDTEXT,
+ SVX_SNAP_GROUPBOX,
+ SVX_SNAP_LISTBOX,
+ SVX_SNAP_COMBOBOX,
+ SVX_SNAP_EDIT,
+ SVX_SNAP_HSCROLLBAR,
+ SVX_SNAP_VSCROLLBAR,
+ SVX_SNAP_PREVIEW,
+ SVX_SNAP_SELECT,
+ SVX_SNAP_NOTHING
+}
+item SvxChooseControlEnum SvxChooseControlEnumItem;
+
+//-------------------------------------------------------------------------
+
+enum SvxDrawToolEnum
+{
+ SVX_SNAP_DRAW_SELECT,
+ //
+ SVX_SNAP_DRAW_LINE,
+ SVX_SNAP_DRAW_RECT,
+ SVX_SNAP_DRAW_ELLIPSE,
+ SVX_SNAP_DRAW_POLYGON,
+ SVX_SNAP_DRAW_ARC,
+ SVX_SNAP_DRAW_PIE,
+ SVX_SNAP_DRAW_CIRCLECUT,
+ SVX_SNAP_DRAW_TEXT,
+ SVX_SNAP_DRAW_CAPTION,
+ SVX_SNAP_DRAW_NOTHING
+}
+item SvxDrawToolEnum SvxDrawToolEnumItem;
+
+//-------------------------------------------------------------------------
+
+item SvxChooseControlEnum SvxChooseControlItem;
+item SvxDrawToolEnum SvxDrawToolItem;
+item FontUnderline SvxUnderlineItem;
+item FontWeight SvxWeightItem;
+item BYTE SvxWidowsItem;
+item BOOL SvxWordLineModeItem;
+item String SvxBoxItem; //! Dummy
+
+//-------------------------------------------------------------------------
+
+enum SvxCellHorJustifyEnum
+{
+ SVX_HOR_JUSTIFY_STANDARD,
+ SVX_HOR_JUSTIFY_LEFT,
+ SVX_HOR_JUSTIFY_CENTER,
+ SVX_HOR_JUSTIFY_RIGHT,
+ SVX_HOR_JUSTIFY_BLOCK,
+ SVX_HOR_JUSTIFY_REPEAT
+};
+item SvxCellHorJustifyEnum SvxCellHorJustifyEnumItem;
+
+enum SvxCellVerJustifyEnum
+{
+ SVX_VER_JUSTIFY_STANDARD,
+ SVX_VER_JUSTIFY_TOP,
+ SVX_VER_JUSTIFY_CENTER,
+ SVX_VER_JUSTIFY_BOTTOM
+};
+item SvxCellVerJustifyEnum SvxCellVerJustifyEnumItem;
+
+//-------------------------------------------------------------------------
+
+enum SvxCellOrientationEnum
+{
+ SVX_ORIENTATION_STANDARD,
+ SVX_ORIENTATION_TOPBOTTOM,
+ SVX_ORIENTATION_BOTTOMTOP,
+ SVX_ORIENTATION_STACKED
+};
+item SvxCellOrientationEnum SvxCellOrientationEnumItem;
+
+//-------------------------------------------------------------------------
+
+item SvxCellHorJustifyEnum SvxHorJustifyItem;
+item SvxCellVerJustifyEnum SvxVerJustifyItem;
+item SvxCellOrientationEnum SvxOrientationItem;
+
+//-------------------------------------------------------------------------
+
+struct SvxLongLRSpace
+{
+ INT32 Left MID_LEFT;
+ INT32 Right MID_RIGHT;
+};
+item SvxLongLRSpace SvxLongLRSpaceItem;
+
+//-------------------------------------------------------------------------
+
+struct SvxLongULSpace
+{
+ INT32 Upper MID_UPPER;
+ INT32 Lower MID_LOWER;
+};
+item SvxLongULSpace SvxLongULSpaceItem;
+
+//-------------------------------------------------------------------------
+
+struct SvxZoom
+{
+ INT32 Type MID_TYPE;
+ UINT16 ValueSet MID_VALUESET;
+ INT32 Percent MID_PERCENT;
+};
+item SvxZoom SvxZoomItem;
+
+//-------------------------------------------------------------------------
+
+item SbxObject SvxTabStopItem;
+
+
diff --git a/starmath/source/action.cxx b/starmath/source/action.cxx
new file mode 100644
index 000000000000..15b052264e66
--- /dev/null
+++ b/starmath/source/action.cxx
@@ -0,0 +1,128 @@
+/*************************************************************************
+ *
+ * $RCSfile: action.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:57:26 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#pragma hdrstop
+
+#include "action.hxx"
+#include "smdll.hxx"
+#include "document.hxx"
+#include "starmath.hrc"
+
+SmEditAction::SmEditAction(SmDocShell *pDocSh,
+ const String& rOldText,
+ const String& rNewText) :
+ pDoc( pDocSh ),
+ aOldText( rOldText ),
+ aNewText( rNewText )
+{
+}
+
+void SmEditAction::Undo()
+{
+ pDoc->SetText(aOldText);
+}
+
+void SmEditAction::Redo()
+{
+ pDoc->SetText(aNewText);
+}
+
+void SmEditAction::Repeat(SmDocShell *pDocSh)
+{
+ pDocSh->SetText(aNewText);
+}
+
+String SmEditAction::GetComment() const
+{
+ return (SmResId(RID_UNDOEDITNAME));
+}
+
+
+SmFormatAction::SmFormatAction(SmDocShell *pDocSh,
+ const SmFormat& rOldFormat,
+ const SmFormat& rNewFormat) :
+ pDoc( pDocSh ),
+ aOldFormat( rOldFormat ),
+ aNewFormat( rNewFormat )
+{
+}
+
+void SmFormatAction::Undo()
+{
+ pDoc->SetFormat(aOldFormat);
+}
+
+void SmFormatAction::Redo()
+{
+ pDoc->SetFormat(aNewFormat);
+}
+
+void SmFormatAction::Repeat(SmDocShell *pDocSh)
+{
+ pDocSh->SetFormat(aNewFormat);
+}
+
+String SmFormatAction::GetComment() const
+{
+ return (SmResId(RID_UNDOFORMATNAME));
+}
+
+
diff --git a/starmath/source/commands.src b/starmath/source/commands.src
new file mode 100644
index 000000000000..5482aef9e103
--- /dev/null
+++ b/starmath/source/commands.src
@@ -0,0 +1,2714 @@
+/*************************************************************************
+ *
+ * $RCSfile: commands.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:57:26 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+
+#include <sfx2/sfx.hrc>
+#include "starmath.hrc"
+
+
+////////////////////////////////////////////////////////////
+//
+// XPolyPolygon data for some characters from StarMath font
+//
+
+Resource RID_XPP_LINE
+{
+ ExtraData =
+ {
+// Zeichen: 0x73 Font: StarMath
+ 29457; 512; 76; 768; 146; 0; 59; 0;
+ 44; 0; 83; 768; 1; 5; 146; 0;
+ 141; 768; 146; 0; 59; 0; 189; 0;
+ 59; 0; 189; 0; 141; 768; 146; 0;
+ 141; 768; 0; 0; 0;
+#ifdef NO_MORE
+ // Zeichen: 0x73 Font: StarMath
+ "\x73\x11\x02\x00\x00\x4C\x03\x00\x00\x92\x00\x00\x00\x3B\x00\x00"
+ "\x00\x2C\x00\x00\x00\x53\x03\x00\x00\x01\x00\x05\x00\x92\x00\x00"
+ "\x00\x8D\x03\x00\x00\x92\x00\x00\x00\x3B\x00\x00\x00\xBD\x00\x00"
+ "\x00\x3B\x00\x00\x00\xBD\x00\x00\x00\x8D\x03\x00\x00\x92\x00\x00"
+ "\x00\x8D\x03\x00\x00\x00\x00\x00\x00\x00";
+#endif
+ };
+};
+
+
+Resource RID_XPP_DLINE
+{
+ ExtraData =
+ {
+// Zeichen: 0x74 Font: StarMath
+ 29713; 512; 76; 768; 136; 0; 59; 0;
+ 214; 0; 78; 768; 2; 5; 51; 256;
+ 136; 768; 51; 256; 59; 0; 93; 256;
+ 59; 0; 93; 256; 136; 768; 51; 256;
+ 136; 768; 0; 0; 0; 1280; -30720; 0;
+-30717; 0; -30720; 0; 15104; 0; -19968; 0;
+ 15104; 0; -19968; 0; -30717; 0; -30720; 0;
+-30717; 0; 0; 0; 0;
+#ifdef NO_MORE
+ // Zeichen: 0x74 Font: StarMath
+ "\x74\x11\x02\x00\x00\x4C\x03\x00\x00\x88\x00\x00\x00\x3B\x00\x00"
+ "\x00\xD6\x00\x00\x00\x4E\x03\x00\x00\x02\x00\x05\x00\x33\x01\x00"
+ "\x00\x88\x03\x00\x00\x33\x01\x00\x00\x3B\x00\x00\x00\x5D\x01\x00"
+ "\x00\x3B\x00\x00\x00\x5D\x01\x00\x00\x88\x03\x00\x00\x33\x01\x00"
+ "\x00\x88\x03\x00\x00\x00\x00\x00\x00\x00\x05\x00\x88\x00\x00\x00"
+ "\x88\x03\x00\x00\x88\x00\x00\x00\x3B\x00\x00\x00\xB2\x00\x00\x00"
+ "\x3B\x00\x00\x00\xB2\x00\x00\x00\x88\x03\x00\x00\x88\x00\x00\x00"
+ "\x88\x03\x00\x00\x00\x00\x00\x00\x00";
+#endif
+ };
+};
+
+
+Resource RID_XPP_SQRT
+{
+ ExtraData =
+ {
+// Zeichen: 0x87 Font: StarMath
+-30959; 512; 76; 768; 26; 0; 48; 0;
+ 184; 256; 170; 512; 1; 10; 2; 256;
+ 217; 512; 97; 0; 184; 256; 37; 0;
+ 208; 256; 26; 0; 196; 256; 131; 0;
+ 155; 256; 15; 256; 153; 512; 189; 256;
+ 48; 0; 209; 256; 48; 0; 22; 256;
+ 217; 512; 2; 256; 217; 512; 0; 0;
+ 0; 0; 0; 0;
+#ifdef NO_MORE
+ // Zeichen: 0x87 Font: StarMath
+ "\x87\x11\x02\x00\x00\x4C\x03\x00\x00\x1A\x00\x00\x00\x30\x00\x00"
+ "\x00\xB8\x01\x00\x00\xAA\x02\x00\x00\x01\x00\x0A\x00\x02\x01\x00"
+ "\x00\xD9\x02\x00\x00\x61\x00\x00\x00\xB8\x01\x00\x00\x25\x00\x00"
+ "\x00\xD0\x01\x00\x00\x1A\x00\x00\x00\xC4\x01\x00\x00\x83\x00\x00"
+ "\x00\x9B\x01\x00\x00\x0F\x01\x00\x00\x99\x02\x00\x00\xBD\x01\x00"
+ "\x00\x30\x00\x00\x00\xD1\x01\x00\x00\x30\x00\x00\x00\x16\x01\x00"
+ "\x00\xD9\x02\x00\x00\x02\x01\x00\x00\xD9\x02\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00";
+#endif
+ };
+};
+
+
+Resource RID_XPP_SQRT2
+{
+ ExtraData =
+ {
+// Zeichen: 0x89 Font: StarMath
+-30447; 512; 76; 768; 26; 0; 48; 0;
+ 218; 0; 170; 512; 1; 10; 227; 0;
+ 217; 512; 74; 0; 203; 256; 35; 0;
+ 225; 256; 26; 0; 213; 256; 91; 0;
+ 176; 256; 229; 0; 156; 512; 227; 0;
+ 48; 0; 243; 0; 48; 0; 243; 0;
+ 217; 512; 227; 0; 217; 512; 0; 0;
+ 0; 0; 0; 0;
+#ifdef NO_MORE
+ // Zeichen: 0x89 Font: StarMath
+ "\x89\x11\x02\x00\x00\x4C\x03\x00\x00\x1A\x00\x00\x00\x30\x00\x00"
+ "\x00\xDA\x00\x00\x00\xAA\x02\x00\x00\x01\x00\x0A\x00\xE3\x00\x00"
+ "\x00\xD9\x02\x00\x00\x4A\x00\x00\x00\xCB\x01\x00\x00\x23\x00\x00"
+ "\x00\xE1\x01\x00\x00\x1A\x00\x00\x00\xD5\x01\x00\x00\x5B\x00\x00"
+ "\x00\xB0\x01\x00\x00\xE5\x00\x00\x00\x9C\x02\x00\x00\xE3\x00\x00"
+ "\x00\x30\x00\x00\x00\xF3\x00\x00\x00\x30\x00\x00\x00\xF3\x00\x00"
+ "\x00\xD9\x02\x00\x00\xE3\x00\x00\x00\xD9\x02\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00";
+#endif
+ };
+};
+
+
+Resource RID_XPP_HAT
+{
+ ExtraData =
+ {
+// Zeichen: 0x90 Font: StarMath
+-28655; 512; 76; 768; 13; 0; 113; 0;
+ 7; 256; 161; 0; 1; 7; 19; 256;
+ 12; 256; 3; 256; 14; 256; 148; 0;
+ 182; 0; 32; 0; 17; 256; 13; 0;
+ 12; 256; 150; 0; 113; 0; 19; 256;
+ 12; 256; 0; 0; 0; 0;
+#ifdef NO_MORE
+ // Zeichen: 0x90 Font: StarMath
+ "\x90\x11\x02\x00\x00\x4C\x03\x00\x00\x0D\x00\x00\x00\x71\x00\x00"
+ "\x00\x07\x01\x00\x00\xA1\x00\x00\x00\x01\x00\x07\x00\x13\x01\x00"
+ "\x00\x0C\x01\x00\x00\x03\x01\x00\x00\x0E\x01\x00\x00\x94\x00\x00"
+ "\x00\xB6\x00\x00\x00\x20\x00\x00\x00\x11\x01\x00\x00\x0D\x00\x00"
+ "\x00\x0C\x01\x00\x00\x96\x00\x00\x00\x71\x00\x00\x00\x13\x01\x00"
+ "\x00\x0C\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00";
+#endif
+ };
+};
+
+
+Resource RID_XPP_TILDE
+{
+ ExtraData =
+ {
+// Zeichen: 0x95 Font: StarMath
+-27375; 512; 76; 768; 8; 0; 119; 0;
+ 8; 256; 109; 0; 1; 26; 21; 0;
+ 227; 0; 8; 0; 227; 0; 11; 0;
+ 157; 0; 37; 0; 119; 0; 86; 0;
+ 119; 0; 97; 0; 119; 0; 141; 0;
+ 140; 0; 219; 0; 177; 0; 238; 0;
+ 177; 0; 251; 0; 158; 0; 3; 256;
+ 119; 0; 15; 256; 119; 0; 15; 256;
+ 124; 0; 15; 256; 151; 0; 9; 256;
+ 175; 0; 253; 0; 194; 0; 238; 0;
+ 217; 0; 217; 0; 227; 0; 194; 0;
+ 227; 0; 177; 0; 227; 0; 131; 0;
+ 209; 0; 60; 0; 168; 0; 42; 0;
+ 168; 0; 28; 0; 189; 0; 21; 0;
+ 227; 0; 21; 0; 227; 0; 0; 2;
+ 512; 514; 2; 512; 0; 514; 2; 512;
+ 514; 2; 512; 0;
+#ifdef NO_MORE
+ // Zeichen: 0x95 Font: StarMath
+ "\x95\x11\x02\x00\x00\x4C\x03\x00\x00\x08\x00\x00\x00\x77\x00\x00"
+ "\x00\x08\x01\x00\x00\x6D\x00\x00\x00\x01\x00\x1A\x00\x15\x00\x00"
+ "\x00\xE3\x00\x00\x00\x08\x00\x00\x00\xE3\x00\x00\x00\x0B\x00\x00"
+ "\x00\x9D\x00\x00\x00\x25\x00\x00\x00\x77\x00\x00\x00\x56\x00\x00"
+ "\x00\x77\x00\x00\x00\x61\x00\x00\x00\x77\x00\x00\x00\x8D\x00\x00"
+ "\x00\x8C\x00\x00\x00\xDB\x00\x00\x00\xB1\x00\x00\x00\xEE\x00\x00"
+ "\x00\xB1\x00\x00\x00\xFB\x00\x00\x00\x9E\x00\x00\x00\x03\x01\x00"
+ "\x00\x77\x00\x00\x00\x0F\x01\x00\x00\x77\x00\x00\x00\x0F\x01\x00"
+ "\x00\x7C\x00\x00\x00\x0F\x01\x00\x00\x97\x00\x00\x00\x09\x01\x00"
+ "\x00\xAF\x00\x00\x00\xFD\x00\x00\x00\xC2\x00\x00\x00\xEE\x00\x00"
+ "\x00\xD9\x00\x00\x00\xD9\x00\x00\x00\xE3\x00\x00\x00\xC2\x00\x00"
+ "\x00\xE3\x00\x00\x00\xB1\x00\x00\x00\xE3\x00\x00\x00\x83\x00\x00"
+ "\x00\xD1\x00\x00\x00\x3C\x00\x00\x00\xA8\x00\x00\x00\x2A\x00\x00"
+ "\x00\xA8\x00\x00\x00\x1C\x00\x00\x00\xBD\x00\x00\x00\x15\x00\x00"
+ "\x00\xE3\x00\x00\x00\x15\x00\x00\x00\xE3\x00\x00\x00\x00\x00\x02"
+ "\x02\x00\x02\x02\x00\x02\x02\x00\x00\x00\x02\x02\x00\x02\x02\x00"
+ "\x02\x02\x00\x02\x02\x00\x00";
+#endif
+ };
+};
+
+
+Resource RID_XPP_BAR
+{
+ ExtraData =
+ {
+// Zeichen: 0x96 Font: StarMath
+-27119; 512; 76; 768; 42; 0; 146; 0;
+ 87; 256; 33; 0; 1; 5; 42; 0;
+ 146; 0; 128; 256; 146; 0; 128; 256;
+ 178; 0; 42; 0; 178; 0; 42; 0;
+ 146; 0; 0; 0; 0;
+#ifdef NO_MORE
+ // Zeichen: 0x96 Font: StarMath
+ "\x96\x11\x02\x00\x00\x4C\x03\x00\x00\x2A\x00\x00\x00\x92\x00\x00"
+ "\x00\x57\x01\x00\x00\x21\x00\x00\x00\x01\x00\x05\x00\x2A\x00\x00"
+ "\x00\x92\x00\x00\x00\x80\x01\x00\x00\x92\x00\x00\x00\x80\x01\x00"
+ "\x00\xB2\x00\x00\x00\x2A\x00\x00\x00\xB2\x00\x00\x00\x2A\x00\x00"
+ "\x00\x92\x00\x00\x00\x00\x00\x00\x00\x00";
+#endif
+ };
+};
+
+
+Resource RID_XPP_VEC
+{
+ ExtraData =
+ {
+// Zeichen: 0x97 Font: StarMath
+-26863; 512; 76; 768; 40; 0; 77; 0;
+ 128; 256; 172; 0; 1; 8; 40; 0;
+ 185; 0; 40; 0; 138; 0; 27; 256;
+ 138; 0; 10; 256; 77; 0; 167; 256;
+ 163; 0; 10; 256; 248; 0; 27; 256;
+ 185; 0; 40; 0; 185; 0; 0; 0;
+ 0; 0; 0;
+#ifdef NO_MORE
+ // Zeichen: 0x97 Font: StarMath
+ "\x97\x11\x02\x00\x00\x4C\x03\x00\x00\x28\x00\x00\x00\x4D\x00\x00"
+ "\x00\x80\x01\x00\x00\xAC\x00\x00\x00\x01\x00\x08\x00\x28\x00\x00"
+ "\x00\xB9\x00\x00\x00\x28\x00\x00\x00\x8A\x00\x00\x00\x1B\x01\x00"
+ "\x00\x8A\x00\x00\x00\x0A\x01\x00\x00\x4D\x00\x00\x00\xA7\x01\x00"
+ "\x00\xA3\x00\x00\x00\x0A\x01\x00\x00\xF8\x00\x00\x00\x1B\x01\x00"
+ "\x00\xB9\x00\x00\x00\x28\x00\x00\x00\xB9\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00";
+#endif
+ };
+};
+
+
+Resource RID_XPP_LBRACE
+{
+ ExtraData =
+ {
+// Zeichen: 0xA0 Font: StarMath
+-24559; 512; 76; 768; 38; 0; 43; 0;
+ 168; 0; 104; 768; 1; 42; 205; 0;
+ 146; 768; 200; 0; 146; 768; 163; 0;
+ 146; 768; 136; 0; 133; 768; 116; 0;
+ 109; 768; 97; 0; 86; 768; 89; 0;
+ 57; 768; 89; 0; 20; 768; 89; 0;
+ 26; 512; 89; 0; 247; 256; 72; 0;
+ 228; 256; 38; 0; 228; 256; 38; 0;
+ 214; 256; 57; 0; 214; 256; 70; 0;
+ 211; 256; 79; 0; 203; 256; 86; 0;
+ 196; 256; 89; 0; 181; 256; 89; 0;
+ 160; 256; 89; 0; 168; 0; 89; 0;
+ 131; 0; 99; 0; 101; 0; 119; 0;
+ 77; 0; 138; 0; 55; 0; 167; 0;
+ 43; 0; 205; 0; 43; 0; 205; 0;
+ 57; 0; 151; 0; 57; 0; 123; 0;
+ 91; 0; 123; 0; 157; 0; 119; 0;
+ 138; 256; 119; 0; 177; 256; 101; 0;
+ 206; 256; 65; 0; 223; 256; 101; 0;
+ 240; 256; 119; 0; 13; 512; 119; 0;
+ 51; 512; 123; 0; 32; 768; 123; 0;
+ 99; 768; 151; 0; 133; 768; 205; 0;
+ 133; 768; 205; 0; 146; 768; 0; 2;
+ 512; 514; 0; 514; 0; 514; 2; 512;
+ 2; 512; 514; 0; 514; 0; 514; 2;
+ 512; 2; 512; 0;
+#ifdef NO_MORE
+ // Zeichen: 0xA0 Font: StarMath
+ "\xA0\x11\x02\x00\x00\x4C\x03\x00\x00\x26\x00\x00\x00\x2B\x00\x00"
+ "\x00\xA8\x00\x00\x00\x68\x03\x00\x00\x01\x00\x2D\x00\xCD\x00\x00"
+ "\x00\x92\x03\x00\x00\xC8\x00\x00\x00\x92\x03\x00\x00\xA3\x00\x00"
+ "\x00\x92\x03\x00\x00\x88\x00\x00\x00\x85\x03\x00\x00\x74\x00\x00"
+ "\x00\x6D\x03\x00\x00\x61\x00\x00\x00\x56\x03\x00\x00\x59\x00\x00"
+ "\x00\x39\x03\x00\x00\x59\x00\x00\x00\x14\x03\x00\x00\x59\x00\x00"
+ "\x00\x1A\x02\x00\x00\x59\x00\x00\x00\x06\x02\x00\x00\x54\x00\x00"
+ "\x00\xF8\x01\x00\x00\x4D\x00\x00\x00\xF0\x01\x00\x00\x46\x00\x00"
+ "\x00\xE9\x01\x00\x00\x39\x00\x00\x00\xE4\x01\x00\x00\x26\x00\x00"
+ "\x00\xE4\x01\x00\x00\x26\x00\x00\x00\xD6\x01\x00\x00\x3B\x00\x00"
+ "\x00\xD6\x01\x00\x00\x48\x00\x00\x00\xD3\x01\x00\x00\x4F\x00\x00"
+ "\x00\xCB\x01\x00\x00\x56\x00\x00\x00\xC4\x01\x00\x00\x59\x00\x00"
+ "\x00\xB5\x01\x00\x00\x59\x00\x00\x00\xA0\x01\x00\x00\x59\x00\x00"
+ "\x00\xA8\x00\x00\x00\x59\x00\x00\x00\x83\x00\x00\x00\x63\x00\x00"
+ "\x00\x65\x00\x00\x00\x77\x00\x00\x00\x4D\x00\x00\x00\x8A\x00\x00"
+ "\x00\x37\x00\x00\x00\xA7\x00\x00\x00\x2B\x00\x00\x00\xCD\x00\x00"
+ "\x00\x2B\x00\x00\x00\xCD\x00\x00\x00\x39\x00\x00\x00\x97\x00\x00"
+ "\x00\x39\x00\x00\x00\x7B\x00\x00\x00\x5B\x00\x00\x00\x7B\x00\x00"
+ "\x00\x9D\x00\x00\x00\x77\x00\x00\x00\x8A\x01\x00\x00\x77\x00\x00"
+ "\x00\xB1\x01\x00\x00\x65\x00\x00\x00\xCE\x01\x00\x00\x41\x00\x00"
+ "\x00\xDF\x01\x00\x00\x65\x00\x00\x00\xF0\x01\x00\x00\x77\x00\x00"
+ "\x00\x0D\x02\x00\x00\x77\x00\x00\x00\x33\x02\x00\x00\x7B\x00\x00"
+ "\x00\x20\x03\x00\x00\x7B\x00\x00\x00\x63\x03\x00\x00\x97\x00\x00"
+ "\x00\x85\x03\x00\x00\xCD\x00\x00\x00\x85\x03\x00\x00\xCD\x00\x00"
+ "\x00\x92\x03\x00\x00\x00\x00\x02\x02\x00\x02\x02\x00\x00\x02\x02"
+ "\x00\x02\x02\x00\x00\x02\x02\x00\x02\x02\x00\x00\x02\x02\x00\x02"
+ "\x02\x00\x00\x02\x02\x00\x00\x02\x02\x00\x02\x02\x00\x00\x02\x02"
+ "\x00\x00";
+#endif
+ };
+};
+
+
+Resource RID_XPP_RBRACE
+{
+ ExtraData =
+ {
+// Zeichen: 0xA1 Font: StarMath
+-24303; 512; 76; 768; 38; 0; 43; 0;
+ 168; 0; 104; 768; 1; 63; 38; 0;
+ 146; 768; 38; 0; 133; 768; 92; 0;
+ 133; 768; 121; 0; 99; 768; 121; 0;
+ 32; 768; 121; 0; 5; 768; 119; 0;
+ 222; 512; 119; 0; 169; 512; 116; 0;
+ 117; 512; 116; 0; 78; 512; 116; 0;
+ 51; 512; 116; 0; 14; 512; 135; 0;
+ 243; 256; 172; 0; 223; 256; 135; 0;
+ 206; 256; 116; 0; 177; 256; 116; 0;
+ 138; 256; 116; 0; 111; 256; 116; 0;
+ 73; 256; 119; 0; 19; 256; 119; 0;
+ 222; 0; 121; 0; 183; 0; 121; 0;
+ 157; 0; 121; 0; 91; 0; 92; 0;
+ 57; 0; 38; 0; 57; 0; 38; 0;
+ 43; 0; 43; 0; 43; 0; 79; 0;
+ 43; 0; 108; 0; 57; 0; 128; 0;
+ 81; 0; 145; 0; 102; 0; 155; 0;
+ 133; 0; 155; 0; 170; 0; 155; 0;
+ 197; 0; 153; 0; 239; 0; 150; 0;
+ 37; 256; 146; 0; 93; 256; 145; 0;
+ 135; 256; 145; 0; 162; 256; 145; 0;
+ 184; 256; 148; 0; 198; 256; 158; 0;
+ 204; 256; 167; 0; 213; 256; 182; 0;
+ 216; 256; 205; 0; 216; 256; 205; 0;
+ 230; 256; 182; 0; 230; 256; 167; 0;
+ 233; 256; 158; 0; 240; 256; 148; 0;
+ 247; 256; 145; 0; 6; 512; 145; 0;
+ 28; 512; 145; 0; 55; 512; 146; 0;
+ 97; 512; 150; 0; 151; 512; 153; 0;
+ 207; 512; 155; 0; 247; 512; 155; 0;
+ 20; 768; 155; 0; 104; 768; 116; 0;
+ 146; 768; 38; 0; 146; 768; 38; 0;
+ 146; 768; 0; 2; 512; 514; 2; 512;
+ 514; 2; 512; 514; 2; 512; 514; 0;
+ 2; 512; 514; 2; 512; 514; 2; 512;
+ 514; 0; 514; 2; 512; 514; 2; 512;
+ 514; 0;
+#ifdef NO_MORE
+ // Zeichen: 0xA1 Font: StarMath
+ "\xA1\x11\x02\x00\x00\x4C\x03\x00\x00\x26\x00\x00\x00\x2B\x00\x00"
+ "\x00\xA8\x00\x00\x00\x68\x03\x00\x00\x01\x00\x3F\x00\x26\x00\x00"
+ "\x00\x92\x03\x00\x00\x26\x00\x00\x00\x85\x03\x00\x00\x5C\x00\x00"
+ "\x00\x85\x03\x00\x00\x79\x00\x00\x00\x63\x03\x00\x00\x79\x00\x00"
+ "\x00\x20\x03\x00\x00\x79\x00\x00\x00\x05\x03\x00\x00\x77\x00\x00"
+ "\x00\xDE\x02\x00\x00\x77\x00\x00\x00\xA9\x02\x00\x00\x74\x00\x00"
+ "\x00\x75\x02\x00\x00\x74\x00\x00\x00\x4E\x02\x00\x00\x74\x00\x00"
+ "\x00\x33\x02\x00\x00\x74\x00\x00\x00\x0E\x02\x00\x00\x87\x00\x00"
+ "\x00\xF3\x01\x00\x00\xAC\x00\x00\x00\xDF\x01\x00\x00\x87\x00\x00"
+ "\x00\xCE\x01\x00\x00\x74\x00\x00\x00\xB1\x01\x00\x00\x74\x00\x00"
+ "\x00\x8A\x01\x00\x00\x74\x00\x00\x00\x6F\x01\x00\x00\x74\x00\x00"
+ "\x00\x49\x01\x00\x00\x77\x00\x00\x00\x13\x01\x00\x00\x77\x00\x00"
+ "\x00\xDE\x00\x00\x00\x79\x00\x00\x00\xB7\x00\x00\x00\x79\x00\x00"
+ "\x00\x9D\x00\x00\x00\x79\x00\x00\x00\x5B\x00\x00\x00\x5C\x00\x00"
+ "\x00\x39\x00\x00\x00\x26\x00\x00\x00\x39\x00\x00\x00\x26\x00\x00"
+ "\x00\x2B\x00\x00\x00\x2B\x00\x00\x00\x2B\x00\x00\x00\x4F\x00\x00"
+ "\x00\x2B\x00\x00\x00\x6C\x00\x00\x00\x39\x00\x00\x00\x80\x00\x00"
+ "\x00\x51\x00\x00\x00\x91\x00\x00\x00\x66\x00\x00\x00\x9B\x00\x00"
+ "\x00\x85\x00\x00\x00\x9B\x00\x00\x00\xAA\x00\x00\x00\x9B\x00\x00"
+ "\x00\xC5\x00\x00\x00\x99\x00\x00\x00\xEF\x00\x00\x00\x96\x00\x00"
+ "\x00\x25\x01\x00\x00\x92\x00\x00\x00\x5D\x01\x00\x00\x91\x00\x00"
+ "\x00\x87\x01\x00\x00\x91\x00\x00\x00\xA2\x01\x00\x00\x91\x00\x00"
+ "\x00\xB8\x01\x00\x00\x94\x00\x00\x00\xC6\x01\x00\x00\x9E\x00\x00"
+ "\x00\xCC\x01\x00\x00\xA7\x00\x00\x00\xD5\x01\x00\x00\xB6\x00\x00"
+ "\x00\xD8\x01\x00\x00\xCD\x00\x00\x00\xD8\x01\x00\x00\xCD\x00\x00"
+ "\x00\xE6\x01\x00\x00\xB6\x00\x00\x00\xE6\x01\x00\x00\xA7\x00\x00"
+ "\x00\xE9\x01\x00\x00\x9E\x00\x00\x00\xF0\x01\x00\x00\x94\x00\x00"
+ "\x00\xF7\x01\x00\x00\x91\x00\x00\x00\x06\x02\x00\x00\x91\x00\x00"
+ "\x00\x1C\x02\x00\x00\x91\x00\x00\x00\x37\x02\x00\x00\x92\x00\x00"
+ "\x00\x61\x02\x00\x00\x96\x00\x00\x00\x97\x02\x00\x00\x99\x00\x00"
+ "\x00\xCF\x02\x00\x00\x9B\x00\x00\x00\xF7\x02\x00\x00\x9B\x00\x00"
+ "\x00\x14\x03\x00\x00\x9B\x00\x00\x00\x68\x03\x00\x00\x74\x00\x00"
+ "\x00\x92\x03\x00\x00\x26\x00\x00\x00\x92\x03\x00\x00\x26\x00\x00"
+ "\x00\x92\x03\x00\x00\x00\x00\x02\x02\x00\x02\x02\x00\x02\x02\x00"
+ "\x02\x02\x00\x02\x02\x00\x02\x02\x00\x02\x02\x00\x02\x02\x00\x00"
+ "\x00\x02\x02\x00\x02\x02\x00\x02\x02\x00\x02\x02\x00\x02\x02\x00"
+ "\x02\x02\x00\x00\x02\x02\x00\x02\x02\x00\x02\x02\x00\x02\x02\x00"
+ "\x02\x02\x00\x00";
+#endif
+ };
+};
+
+
+Resource RID_XPP_LPARENT
+{
+ ExtraData =
+ {
+// Zeichen: 0xA2 Font: StarMath
+-24047; 512; 76; 768; 60; 0; 67; 0;
+ 162; 0; 69; 768; 1; 27; 221; 0;
+ 135; 768; 167; 0; 89; 768; 126; 0;
+ 25; 768; 99; 0; 200; 512; 72; 0;
+ 127; 512; 60; 0; 51; 512; 60; 0;
+ 228; 256; 60; 0; 152; 256; 72; 0;
+ 76; 256; 99; 0; 2; 256; 128; 0;
+ 172; 0; 168; 0; 108; 0; 221; 0;
+ 67; 0; 221; 0; 87; 0; 182; 0;
+ 124; 0; 153; 0; 185; 0; 133; 0;
+ 17; 256; 116; 0; 88; 256; 109; 0;
+ 157; 256; 109; 0; 228; 256; 109; 0;
+ 43; 512; 116; 0; 114; 512; 133; 0;
+ 183; 512; 153; 0; 16; 768; 182; 0;
+ 79; 768; 221; 0; 113; 768; 221; 0;
+ 135; 768; 0; 514; 2; 512; 514; 2;
+ 512; 2; 512; 514; 2; 512; 514; 0;
+#ifdef NO_MORE
+ // Zeichen: 0xA2 Font: StarMath
+ "\xA2\x11\x02\x00\x00\x4C\x03\x00\x00\x3C\x00\x00\x00\x43\x00\x00"
+ "\x00\xA2\x00\x00\x00\x45\x03\x00\x00\x01\x00\x1B\x00\xDD\x00\x00"
+ "\x00\x87\x03\x00\x00\xA7\x00\x00\x00\x59\x03\x00\x00\x7E\x00\x00"
+ "\x00\x19\x03\x00\x00\x63\x00\x00\x00\xC8\x02\x00\x00\x48\x00\x00"
+ "\x00\x7F\x02\x00\x00\x3C\x00\x00\x00\x33\x02\x00\x00\x3C\x00\x00"
+ "\x00\xE4\x01\x00\x00\x3C\x00\x00\x00\x98\x01\x00\x00\x48\x00\x00"
+ "\x00\x4C\x01\x00\x00\x63\x00\x00\x00\x02\x01\x00\x00\x80\x00\x00"
+ "\x00\xAC\x00\x00\x00\xA8\x00\x00\x00\x6C\x00\x00\x00\xDD\x00\x00"
+ "\x00\x43\x00\x00\x00\xDD\x00\x00\x00\x57\x00\x00\x00\xB6\x00\x00"
+ "\x00\x7C\x00\x00\x00\x99\x00\x00\x00\xB9\x00\x00\x00\x85\x00\x00"
+ "\x00\x11\x01\x00\x00\x74\x00\x00\x00\x58\x01\x00\x00\x6D\x00\x00"
+ "\x00\x9D\x01\x00\x00\x6D\x00\x00\x00\xE4\x01\x00\x00\x6D\x00\x00"
+ "\x00\x2B\x02\x00\x00\x74\x00\x00\x00\x72\x02\x00\x00\x85\x00\x00"
+ "\x00\xB7\x02\x00\x00\x99\x00\x00\x00\x10\x03\x00\x00\xB6\x00\x00"
+ "\x00\x4F\x03\x00\x00\xDD\x00\x00\x00\x71\x03\x00\x00\xDD\x00\x00"
+ "\x00\x87\x03\x00\x00\x00\x02\x02\x00\x02\x02\x00\x02\x02\x00\x02"
+ "\x02\x00\x00\x02\x02\x00\x02\x02\x00\x02\x02\x00\x02\x02\x00\x00";
+#endif
+ };
+};
+
+
+Resource RID_XPP_RPARENT
+{
+ ExtraData =
+ {
+// Zeichen: 0xA3 Font: StarMath
+-23791; 512; 76; 768; 43; 0; 67; 0;
+ 162; 0; 69; 768; 1; 27; 43; 0;
+ 113; 768; 81; 0; 79; 768; 109; 0;
+ 20; 768; 129; 0; 191; 512; 146; 0;
+ 124; 512; 155; 0; 58; 512; 155; 0;
+ 247; 256; 155; 0; 169; 256; 146; 0;
+ 95; 256; 133; 0; 25; 256; 113; 0;
+ 190; 0; 84; 0; 126; 0; 43; 0;
+ 87; 0; 43; 0; 67; 0; 96; 0;
+ 104; 0; 136; 0; 168; 0; 167; 0;
+ 0; 256; 190; 0; 74; 256; 204; 0;
+ 150; 256; 204; 0; 228; 256; 204; 0;
+ 51; 512; 190; 0; 127; 512; 167; 0;
+ 200; 512; 136; 0; 30; 768; 96; 0;
+ 94; 768; 43; 0; 135; 768; 43; 0;
+ 113; 768; 0; 514; 2; 512; 514; 2;
+ 512; 2; 512; 514; 2; 512; 514; 0;
+#ifdef NO_MORE
+ // Zeichen: 0xA3 Font: StarMath
+ "\xA3\x11\x02\x00\x00\x4C\x03\x00\x00\x2B\x00\x00\x00\x43\x00\x00"
+ "\x00\xA2\x00\x00\x00\x45\x03\x00\x00\x01\x00\x1B\x00\x2B\x00\x00"
+ "\x00\x71\x03\x00\x00\x51\x00\x00\x00\x4F\x03\x00\x00\x6D\x00\x00"
+ "\x00\x14\x03\x00\x00\x81\x00\x00\x00\xBF\x02\x00\x00\x92\x00\x00"
+ "\x00\x7C\x02\x00\x00\x9B\x00\x00\x00\x38\x02\x00\x00\x9B\x00\x00"
+ "\x00\xF7\x01\x00\x00\x9B\x00\x00\x00\xA9\x01\x00\x00\x92\x00\x00"
+ "\x00\x5F\x01\x00\x00\x85\x00\x00\x00\x19\x01\x00\x00\x71\x00\x00"
+ "\x00\xBE\x00\x00\x00\x54\x00\x00\x00\x7C\x00\x00\x00\x2B\x00\x00"
+ "\x00\x57\x00\x00\x00\x2B\x00\x00\x00\x43\x00\x00\x00\x60\x00\x00"
+ "\x00\x68\x00\x00\x00\x88\x00\x00\x00\xA8\x00\x00\x00\xA7\x00\x00"
+ "\x00\x00\x01\x00\x00\xBE\x00\x00\x00\x4C\x01\x00\x00\xCC\x00\x00"
+ "\x00\x98\x01\x00\x00\xCC\x00\x00\x00\xE4\x01\x00\x00\xCC\x00\x00"
+ "\x00\x32\x02\x00\x00\xBE\x00\x00\x00\x7E\x02\x00\x00\xA7\x00\x00"
+ "\x00\xC8\x02\x00\x00\x88\x00\x00\x00\x20\x03\x00\x00\x60\x00\x00"
+ "\x00\x5E\x03\x00\x00\x2B\x00\x00\x00\x87\x03\x00\x00\x2B\x00\x00"
+ "\x00\x71\x03\x00\x00\x00\x02\x02\x00\x02\x02\x00\x02\x02\x00\x02"
+ "\x02\x00\x00\x02\x02\x00\x02\x02\x00\x02\x02\x00\x02\x02\x00\x00";
+#endif
+ };
+};
+
+
+Resource RID_XPP_LANGLE
+{
+ ExtraData =
+ {
+// Zeichen: 0xA4 Font: StarMath
+-23535; 512; 76; 768; 35; 0; 65; 0;
+ 222; 0; 69; 768; 1; 7; 35; 0;
+ 226; 256; 238; 0; 65; 0; 0; 256;
+ 75; 0; 57; 0; 226; 256; 0; 256;
+ 123; 768; 238; 0; 133; 768; 35; 0;
+ 226; 256; 0; 0; 0; 0;
+#ifdef NO_MORE
+ // Zeichen: 0xA4 Font: StarMath
+ "\xA4\x11\x02\x00\x00\x4C\x03\x00\x00\x23\x00\x00\x00\x41\x00\x00"
+ "\x00\xDE\x00\x00\x00\x45\x03\x00\x00\x01\x00\x07\x00\x23\x00\x00"
+ "\x00\xE2\x01\x00\x00\xEE\x00\x00\x00\x41\x00\x00\x00\x00\x01\x00"
+ "\x00\x4B\x00\x00\x00\x39\x00\x00\x00\xE2\x01\x00\x00\x00\x01\x00"
+ "\x00\x7B\x03\x00\x00\xEE\x00\x00\x00\x85\x03\x00\x00\x23\x00\x00"
+ "\x00\xE2\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00";
+#endif
+ };
+};
+
+
+Resource RID_XPP_RANGLE
+{
+ ExtraData =
+ {
+// Zeichen: 0xA5 Font: StarMath
+-23279; 512; 76; 768; 23; 0; 65; 0;
+ 226; 0; 69; 768; 1; 7; 248; 0;
+ 226; 256; 45; 0; 133; 768; 23; 0;
+ 123; 768; 222; 0; 225; 256; 25; 0;
+ 75; 0; 45; 0; 65; 0; 248; 0;
+ 226; 256; 0; 0; 0; 0;
+#ifdef NO_MORE
+ // Zeichen: 0xA5 Font: StarMath
+ "\xA5\x11\x02\x00\x00\x4C\x03\x00\x00\x17\x00\x00\x00\x41\x00\x00"
+ "\x00\xE2\x00\x00\x00\x45\x03\x00\x00\x01\x00\x07\x00\xF8\x00\x00"
+ "\x00\xE2\x01\x00\x00\x2D\x00\x00\x00\x85\x03\x00\x00\x17\x00\x00"
+ "\x00\x7B\x03\x00\x00\xDE\x00\x00\x00\xE1\x01\x00\x00\x19\x00\x00"
+ "\x00\x4B\x00\x00\x00\x2D\x00\x00\x00\x41\x00\x00\x00\xF8\x00\x00"
+ "\x00\xE2\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00";
+#endif
+ };
+};
+
+
+Resource RID_XPP_LBRACKET
+{
+ ExtraData =
+ {
+// Zeichen: 0xA6 Font: StarMath
+-23023; 512; 76; 768; 60; 0; 59; 0;
+ 148; 0; 68; 768; 1; 9; 60; 0;
+ 126; 768; 60; 0; 59; 0; 207; 0;
+ 59; 0; 207; 0; 75; 0; 102; 0;
+ 75; 0; 102; 0; 108; 768; 207; 0;
+ 108; 768; 207; 0; 126; 768; 60; 0;
+ 126; 768; 0; 0; 0; 0; 0;
+#ifdef NO_MORE
+ // Zeichen: 0xA6 Font: StarMath
+ "\xA6\x11\x02\x00\x00\x4C\x03\x00\x00\x3C\x00\x00\x00\x3B\x00\x00"
+ "\x00\x94\x00\x00\x00\x44\x03\x00\x00\x01\x00\x09\x00\x3C\x00\x00"
+ "\x00\x7E\x03\x00\x00\x3C\x00\x00\x00\x3B\x00\x00\x00\xCF\x00\x00"
+ "\x00\x3B\x00\x00\x00\xCF\x00\x00\x00\x4B\x00\x00\x00\x66\x00\x00"
+ "\x00\x4B\x00\x00\x00\x66\x00\x00\x00\x6C\x03\x00\x00\xCF\x00\x00"
+ "\x00\x6C\x03\x00\x00\xCF\x00\x00\x00\x7E\x03\x00\x00\x3C\x00\x00"
+ "\x00\x7E\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00";
+#endif
+ };
+};
+
+
+Resource RID_XPP_RBRACKET
+{
+ ExtraData =
+ {
+// Zeichen: 0xA7 Font: StarMath
+-22767; 512; 76; 768; 32; 0; 59; 0;
+ 147; 0; 68; 768; 1; 9; 178; 0;
+ 126; 768; 32; 0; 126; 768; 32; 0;
+ 108; 768; 136; 0; 108; 768; 136; 0;
+ 75; 0; 32; 0; 75; 0; 32; 0;
+ 59; 0; 178; 0; 59; 0; 178; 0;
+ 126; 768; 0; 0; 0; 0; 0;
+#ifdef NO_MORE
+ // Zeichen: 0xA7 Font: StarMath
+ "\xA7\x11\x02\x00\x00\x4C\x03\x00\x00\x20\x00\x00\x00\x3B\x00\x00"
+ "\x00\x93\x00\x00\x00\x44\x03\x00\x00\x01\x00\x09\x00\xB2\x00\x00"
+ "\x00\x7E\x03\x00\x00\x20\x00\x00\x00\x7E\x03\x00\x00\x20\x00\x00"
+ "\x00\x6C\x03\x00\x00\x88\x00\x00\x00\x6C\x03\x00\x00\x88\x00\x00"
+ "\x00\x4B\x00\x00\x00\x20\x00\x00\x00\x4B\x00\x00\x00\x20\x00\x00"
+ "\x00\x3B\x00\x00\x00\xB2\x00\x00\x00\x3B\x00\x00\x00\xB2\x00\x00"
+ "\x00\x7E\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00";
+#endif
+ };
+};
+
+
+Resource RID_XPP_LDBRACKET
+{
+ ExtraData =
+ {
+// Zeichen: 0xB2 Font: StarMath
+-19951; 512; 76; 768; 60; 0; 59; 0;
+ 207; 0; 68; 768; 2; 9; 60; 0;
+ 126; 768; 60; 0; 59; 0; 10; 256;
+ 59; 0; 10; 256; 75; 0; 180; 0;
+ 75; 0; 180; 0; 108; 768; 10; 256;
+ 108; 768; 10; 256; 126; 768; 60; 0;
+ 126; 768; 0; 0; 0; 0; 0; 1280;
+-27136; 0; 19200; 0; 26112; 0; 19200; 0;
+ 26112; 0; 27651; 0; -27136; 0; 27651; 0;
+-27136; 0; 19200; 0; 0; 0; 0;
+#ifdef NO_MORE
+ // Zeichen: 0xB2 Font: StarMath
+ "\xB2\x11\x02\x00\x00\x4C\x03\x00\x00\x3C\x00\x00\x00\x3B\x00\x00"
+ "\x00\xCF\x00\x00\x00\x44\x03\x00\x00\x02\x00\x09\x00\x3C\x00\x00"
+ "\x00\x7E\x03\x00\x00\x3C\x00\x00\x00\x3B\x00\x00\x00\x0A\x01\x00"
+ "\x00\x3B\x00\x00\x00\x0A\x01\x00\x00\x4B\x00\x00\x00\xB4\x00\x00"
+ "\x00\x4B\x00\x00\x00\xB4\x00\x00\x00\x6C\x03\x00\x00\x0A\x01\x00"
+ "\x00\x6C\x03\x00\x00\x0A\x01\x00\x00\x7E\x03\x00\x00\x3C\x00\x00"
+ "\x00\x7E\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x00"
+ "\x96\x00\x00\x00\x4B\x00\x00\x00\x66\x00\x00\x00\x4B\x00\x00\x00"
+ "\x66\x00\x00\x00\x6C\x03\x00\x00\x96\x00\x00\x00\x6C\x03\x00\x00"
+ "\x96\x00\x00\x00\x4B\x00\x00\x00\x00\x00\x00\x00\x00";
+#endif
+ };
+};
+
+
+Resource RID_XPP_RDBRACKET
+{
+ ExtraData =
+ {
+// Zeichen: 0xB3 Font: StarMath
+-19695; 512; 76; 768; 60; 0; 59; 0;
+ 207; 0; 68; 768; 2; 9; 10; 256;
+ 126; 768; 60; 0; 126; 768; 60; 0;
+ 108; 768; 138; 0; 108; 768; 138; 0;
+ 75; 0; 60; 0; 75; 0; 60; 0;
+ 59; 0; 10; 256; 59; 0; 10; 256;
+ 126; 768; 0; 0; 0; 0; 0; 1280;
+-22528; 0; 19200; 0; -22528; 0; 27651; 0;
+ -8192; 0; 27651; 0; -8192; 0; 19200; 0;
+-22528; 0; 19200; 0; 0; 0; 0;
+#ifdef NO_MORE
+ // Zeichen: 0xB3 Font: StarMath
+ "\xB3\x11\x02\x00\x00\x4C\x03\x00\x00\x3C\x00\x00\x00\x3B\x00\x00"
+ "\x00\xCF\x00\x00\x00\x44\x03\x00\x00\x02\x00\x09\x00\x0A\x01\x00"
+ "\x00\x7E\x03\x00\x00\x3C\x00\x00\x00\x7E\x03\x00\x00\x3C\x00\x00"
+ "\x00\x6C\x03\x00\x00\x8A\x00\x00\x00\x6C\x03\x00\x00\x8A\x00\x00"
+ "\x00\x4B\x00\x00\x00\x3C\x00\x00\x00\x4B\x00\x00\x00\x3C\x00\x00"
+ "\x00\x3B\x00\x00\x00\x0A\x01\x00\x00\x3B\x00\x00\x00\x0A\x01\x00"
+ "\x00\x7E\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x00"
+ "\xA8\x00\x00\x00\x4B\x00\x00\x00\xA8\x00\x00\x00\x6C\x03\x00\x00"
+ "\xE0\x00\x00\x00\x6C\x03\x00\x00\xE0\x00\x00\x00\x4B\x00\x00\x00"
+ "\xA8\x00\x00\x00\x4B\x00\x00\x00\x00\x00\x00\x00\x00";
+#endif
+ };
+};
+
+
+Resource RID_XPP_LCEIL
+{
+ ExtraData =
+ {
+// Zeichen: 0xC0 Font: StarMath
+-16367; 512; 76; 768; 60; 0; 59; 0;
+ 148; 0; 68; 768; 1; 7; 60; 0;
+ 126; 768; 60; 0; 59; 0; 207; 0;
+ 59; 0; 207; 0; 75; 0; 102; 0;
+ 75; 0; 102; 0; 126; 768; 60; 0;
+ 126; 768; 0; 0; 0; 0;
+#ifdef NO_MORE
+ // Zeichen: 0xC0 Font: StarMath
+ "\xC0\x11\x02\x00\x00\x4C\x03\x00\x00\x3C\x00\x00\x00\x3B\x00\x00"
+ "\x00\x94\x00\x00\x00\x44\x03\x00\x00\x01\x00\x07\x00\x3C\x00\x00"
+ "\x00\x7E\x03\x00\x00\x3C\x00\x00\x00\x3B\x00\x00\x00\xCF\x00\x00"
+ "\x00\x3B\x00\x00\x00\xCF\x00\x00\x00\x4B\x00\x00\x00\x66\x00\x00"
+ "\x00\x4B\x00\x00\x00\x66\x00\x00\x00\x7E\x03\x00\x00\x3C\x00\x00"
+ "\x00\x7E\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00";
+#endif
+ };
+};
+
+
+Resource RID_XPP_RCEIL
+{
+ ExtraData =
+ {
+// Zeichen: 0xC2 Font: StarMath
+-15855; 512; 76; 768; 32; 0; 59; 0;
+ 147; 0; 68; 768; 1; 7; 178; 0;
+ 126; 768; 136; 0; 126; 768; 136; 0;
+ 75; 0; 32; 0; 75; 0; 32; 0;
+ 59; 0; 178; 0; 59; 0; 178; 0;
+ 126; 768; 0; 0; 0; 0;
+#ifdef NO_MORE
+ // Zeichen: 0xC2 Font: StarMath
+ "\xC2\x11\x02\x00\x00\x4C\x03\x00\x00\x20\x00\x00\x00\x3B\x00\x00"
+ "\x00\x93\x00\x00\x00\x44\x03\x00\x00\x01\x00\x07\x00\xB2\x00\x00"
+ "\x00\x7E\x03\x00\x00\x88\x00\x00\x00\x7E\x03\x00\x00\x88\x00\x00"
+ "\x00\x4B\x00\x00\x00\x20\x00\x00\x00\x4B\x00\x00\x00\x20\x00\x00"
+ "\x00\x3B\x00\x00\x00\xB2\x00\x00\x00\x3B\x00\x00\x00\xB2\x00\x00"
+ "\x00\x7E\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00";
+#endif
+ };
+};
+
+
+Resource RID_XPP_LFLOOR
+{
+ ExtraData =
+ {
+// Zeichen: 0xC1 Font: StarMath
+-16111; 512; 76; 768; 60; 0; 59; 0;
+ 148; 0; 68; 768; 1; 7; 60; 0;
+ 126; 768; 60; 0; 59; 0; 102; 0;
+ 59; 0; 102; 0; 108; 768; 207; 0;
+ 108; 768; 207; 0; 126; 768; 60; 0;
+ 126; 768; 0; 0; 0; 0;
+#ifdef NO_MORE
+ // Zeichen: 0xC1 Font: StarMath
+ "\xC1\x11\x02\x00\x00\x4C\x03\x00\x00\x3C\x00\x00\x00\x3B\x00\x00"
+ "\x00\x94\x00\x00\x00\x44\x03\x00\x00\x01\x00\x07\x00\x3C\x00\x00"
+ "\x00\x7E\x03\x00\x00\x3C\x00\x00\x00\x3B\x00\x00\x00\x66\x00\x00"
+ "\x00\x3B\x00\x00\x00\x66\x00\x00\x00\x6C\x03\x00\x00\xCF\x00\x00"
+ "\x00\x6C\x03\x00\x00\xCF\x00\x00\x00\x7E\x03\x00\x00\x3C\x00\x00"
+ "\x00\x7E\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00";
+#endif
+ };
+};
+
+
+Resource RID_XPP_RFLOOR
+{
+ ExtraData =
+ {
+// Zeichen: 0xC3 Font: StarMath
+-15599; 512; 76; 768; 32; 0; 59; 0;
+ 147; 0; 68; 768; 1; 7; 178; 0;
+ 126; 768; 32; 0; 126; 768; 32; 0;
+ 108; 768; 136; 0; 108; 768; 136; 0;
+ 59; 0; 178; 0; 59; 0; 178; 0;
+ 126; 768; 0; 0; 0; 0;
+#ifdef NO_MORE
+ // Zeichen: 0xC3 Font: StarMath
+ "\xC3\x11\x02\x00\x00\x4C\x03\x00\x00\x20\x00\x00\x00\x3B\x00\x00"
+ "\x00\x93\x00\x00\x00\x44\x03\x00\x00\x01\x00\x07\x00\xB2\x00\x00"
+ "\x00\x7E\x03\x00\x00\x20\x00\x00\x00\x7E\x03\x00\x00\x20\x00\x00"
+ "\x00\x6C\x03\x00\x00\x88\x00\x00\x00\x6C\x03\x00\x00\x88\x00\x00"
+ "\x00\x3B\x00\x00\x00\xB2\x00\x00\x00\x3B\x00\x00\x00\xB2\x00\x00"
+ "\x00\x7E\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00";
+#endif
+ };
+};
+
+
+Resource RID_XPP_OVERBRACE
+{
+ ExtraData =
+ {
+// Zeichen: 0x35 Font: StarMath
+ 13585; 512; 76; 768; 20; 0; 8; 0;
+ 104; 768; 168; 0; 1; 45; 20; 0;
+ 175; 0; 20; 0; 172; 0; 20; 0;
+ 135; 0; 32; 0; 108; 0; 57; 0;
+ 87; 0; 79; 0; 70; 0; 109; 0;
+ 60; 0; 146; 0; 60; 0; 140; 256;
+ 60; 0; 159; 256; 60; 0; 172; 256;
+ 57; 0; 181; 256; 48; 0; 187; 256;
+ 42; 0; 193; 256; 28; 0; 193; 256;
+ 8; 0; 206; 256; 8; 0; 206; 256;
+ 28; 0; 209; 256; 42; 0; 218; 256;
+ 48; 0; 225; 256; 57; 0; 240; 256;
+ 60; 0; 4; 512; 60; 0; 254; 512;
+ 60; 0; 35; 768; 60; 0; 65; 768;
+ 70; 0; 89; 768; 89; 0; 111; 768;
+ 109; 0; 123; 768; 138; 0; 123; 768;
+ 175; 0; 109; 768; 175; 0; 109; 768;
+ 123; 0; 76; 768; 96; 0; 10; 768;
+ 94; 0; 28; 512; 89; 0; 245; 256;
+ 89; 0; 216; 256; 70; 0; 199; 256;
+ 35; 0; 182; 256; 70; 0; 154; 256;
+ 89; 0; 115; 256; 89; 0; 135; 0;
+ 94; 0; 67; 0; 96; 0; 33; 0;
+ 123; 0; 33; 0; 175; 0; 20; 0;
+ 175; 0; 0; 2; 512; 514; 0; 514;
+ 2; 512; 2; 512; 514; 0; 514; 2;
+ 512; 2; 512; 2; 512; 514; 0; 514;
+ 0;
+#ifdef NO_MORE
+ // Zeichen: 0x35 Font: StarMath
+ "\x35\x11\x02\x00\x00\x4C\x03\x00\x00\x14\x00\x00\x00\x08\x00\x00"
+ "\x00\x68\x03\x00\x00\xA8\x00\x00\x00\x01\x00\x2D\x00\x14\x00\x00"
+ "\x00\xAF\x00\x00\x00\x14\x00\x00\x00\xAA\x00\x00\x00\x14\x00\x00"
+ "\x00\x85\x00\x00\x00\x20\x00\x00\x00\x6A\x00\x00\x00\x39\x00\x00"
+ "\x00\x56\x00\x00\x00\x4F\x00\x00\x00\x45\x00\x00\x00\x6D\x00\x00"
+ "\x00\x3B\x00\x00\x00\x92\x00\x00\x00\x3B\x00\x00\x00\x8C\x01\x00"
+ "\x00\x3B\x00\x00\x00\x9F\x01\x00\x00\x3B\x00\x00\x00\xAC\x01\x00"
+ "\x00\x37\x00\x00\x00\xB5\x01\x00\x00\x30\x00\x00\x00\xBB\x01\x00"
+ "\x00\x2A\x00\x00\x00\xC1\x01\x00\x00\x1C\x00\x00\x00\xC1\x01\x00"
+ "\x00\x08\x00\x00\x00\xCE\x01\x00\x00\x08\x00\x00\x00\xCE\x01\x00"
+ "\x00\x1C\x00\x00\x00\xD1\x01\x00\x00\x2A\x00\x00\x00\xDA\x01\x00"
+ "\x00\x30\x00\x00\x00\xE1\x01\x00\x00\x37\x00\x00\x00\xF0\x01\x00"
+ "\x00\x3B\x00\x00\x00\x04\x02\x00\x00\x3B\x00\x00\x00\xFE\x02\x00"
+ "\x00\x3B\x00\x00\x00\x23\x03\x00\x00\x3B\x00\x00\x00\x41\x03\x00"
+ "\x00\x45\x00\x00\x00\x59\x03\x00\x00\x59\x00\x00\x00\x6F\x03\x00"
+ "\x00\x6D\x00\x00\x00\x7B\x03\x00\x00\x8A\x00\x00\x00\x7B\x03\x00"
+ "\x00\xAF\x00\x00\x00\x6D\x03\x00\x00\xAF\x00\x00\x00\x6D\x03\x00"
+ "\x00\x79\x00\x00\x00\x4C\x03\x00\x00\x5E\x00\x00\x00\x0A\x03\x00"
+ "\x00\x5C\x00\x00\x00\x1C\x02\x00\x00\x57\x00\x00\x00\xF5\x01\x00"
+ "\x00\x57\x00\x00\x00\xD8\x01\x00\x00\x46\x00\x00\x00\xC7\x01\x00"
+ "\x00\x23\x00\x00\x00\xB6\x01\x00\x00\x46\x00\x00\x00\x9A\x01\x00"
+ "\x00\x57\x00\x00\x00\x73\x01\x00\x00\x57\x00\x00\x00\x87\x00\x00"
+ "\x00\x5C\x00\x00\x00\x43\x00\x00\x00\x5E\x00\x00\x00\x21\x00\x00"
+ "\x00\x79\x00\x00\x00\x21\x00\x00\x00\xAF\x00\x00\x00\x14\x00\x00"
+ "\x00\xAF\x00\x00\x00\x00\x00\x02\x02\x00\x02\x02\x00\x00\x02\x02"
+ "\x00\x02\x02\x00\x00\x02\x02\x00\x02\x02\x00\x00\x02\x02\x00\x02"
+ "\x02\x00\x00\x02\x02\x00\x00\x02\x02\x00\x02\x02\x00\x00\x02\x02"
+ "\x00\x00";
+#endif
+ };
+};
+
+
+Resource RID_XPP_UNDERBRACE
+{
+ ExtraData =
+ {
+// Zeichen: 0x34 Font: StarMath
+ 13329; 512; 76; 768; 11; 0; 244; 512;
+ 104; 768; 166; 0; 1; 45; 114; 768;
+ 244; 512; 114; 768; 247; 512; 114; 768;
+ 28; 768; 103; 768; 55; 768; 79; 768;
+ 74; 768; 55; 768; 92; 768; 25; 768;
+ 103; 768; 244; 512; 103; 768; 252; 256;
+ 103; 768; 231; 256; 103; 768; 218; 256;
+ 106; 768; 209; 256; 114; 768; 201; 256;
+ 121; 768; 198; 256; 133; 768; 198; 256;
+ 153; 768; 184; 256; 153; 768; 184; 256;
+ 133; 768; 179; 256; 119; 768; 172; 256;
+ 113; 768; 164; 256; 106; 768; 150; 256;
+ 103; 768; 130; 256; 103; 768; 136; 0;
+ 103; 768; 97; 0; 103; 768; 67; 0;
+ 92; 768; 45; 0; 74; 768; 21; 0;
+ 54; 768; 11; 0; 25; 768; 11; 0;
+ 244; 512; 25; 0; 244; 512; 25; 0;
+ 40; 768; 57; 0; 67; 768; 124; 0;
+ 69; 768; 106; 256; 74; 768; 144; 256;
+ 74; 768; 172; 256; 91; 768; 191; 256;
+ 126; 768; 208; 256; 91; 768; 235; 256;
+ 74; 768; 19; 512; 74; 768; 0; 768;
+ 69; 768; 67; 768; 67; 768; 101; 768;
+ 40; 768; 101; 768; 244; 512; 114; 768;
+ 244; 512; 0; 2; 512; 514; 0; 514;
+ 2; 512; 2; 512; 514; 0; 514; 2;
+ 512; 2; 512; 2; 512; 514; 0; 514;
+ 0;
+#ifdef NO_MORE
+ // Zeichen: 0x34 Font: StarMath
+ "\x34\x11\x02\x00\x00\x4C\x03\x00\x00\x0B\x00\x00\x00\xF4\x02\x00"
+ "\x00\x68\x03\x00\x00\xA6\x00\x00\x00\x01\x00\x2D\x00\x72\x03\x00"
+ "\x00\xF4\x02\x00\x00\x72\x03\x00\x00\xF7\x02\x00\x00\x72\x03\x00"
+ "\x00\x1C\x03\x00\x00\x67\x03\x00\x00\x37\x03\x00\x00\x4F\x03\x00"
+ "\x00\x4A\x03\x00\x00\x37\x03\x00\x00\x5C\x03\x00\x00\x19\x03\x00"
+ "\x00\x67\x03\x00\x00\xF4\x02\x00\x00\x67\x03\x00\x00\xFA\x01\x00"
+ "\x00\x67\x03\x00\x00\xE6\x01\x00\x00\x67\x03\x00\x00\xD8\x01\x00"
+ "\x00\x6A\x03\x00\x00\xD1\x01\x00\x00\x71\x03\x00\x00\xC9\x01\x00"
+ "\x00\x77\x03\x00\x00\xC6\x01\x00\x00\x85\x03\x00\x00\xC6\x01\x00"
+ "\x00\x99\x03\x00\x00\xB8\x01\x00\x00\x99\x03\x00\x00\xB8\x01\x00"
+ "\x00\x85\x03\x00\x00\xB3\x01\x00\x00\x77\x03\x00\x00\xAC\x01\x00"
+ "\x00\x71\x03\x00\x00\xA4\x01\x00\x00\x6A\x03\x00\x00\x96\x01\x00"
+ "\x00\x67\x03\x00\x00\x82\x01\x00\x00\x67\x03\x00\x00\x88\x00\x00"
+ "\x00\x67\x03\x00\x00\x61\x00\x00\x00\x67\x03\x00\x00\x43\x00\x00"
+ "\x00\x5C\x03\x00\x00\x2D\x00\x00\x00\x4A\x03\x00\x00\x15\x00\x00"
+ "\x00\x36\x03\x00\x00\x0B\x00\x00\x00\x19\x03\x00\x00\x0B\x00\x00"
+ "\x00\xF4\x02\x00\x00\x19\x00\x00\x00\xF4\x02\x00\x00\x19\x00\x00"
+ "\x00\x28\x03\x00\x00\x39\x00\x00\x00\x43\x03\x00\x00\x7C\x00\x00"
+ "\x00\x45\x03\x00\x00\x6A\x01\x00\x00\x4A\x03\x00\x00\x90\x01\x00"
+ "\x00\x4A\x03\x00\x00\xAC\x01\x00\x00\x5B\x03\x00\x00\xBF\x01\x00"
+ "\x00\x7E\x03\x00\x00\xD0\x01\x00\x00\x5B\x03\x00\x00\xEB\x01\x00"
+ "\x00\x4A\x03\x00\x00\x13\x02\x00\x00\x4A\x03\x00\x00\x00\x03\x00"
+ "\x00\x45\x03\x00\x00\x43\x03\x00\x00\x43\x03\x00\x00\x65\x03\x00"
+ "\x00\x28\x03\x00\x00\x65\x03\x00\x00\xF4\x02\x00\x00\x72\x03\x00"
+ "\x00\xF4\x02\x00\x00\x00\x00\x02\x02\x00\x02\x02\x00\x00\x02\x02"
+ "\x00\x02\x02\x00\x00\x02\x02\x00\x02\x02\x00\x00\x02\x02\x00\x02"
+ "\x02\x00\x00\x02\x02\x00\x00\x02\x02\x00\x02\x02\x00\x00\x02\x02"
+ "\x00\x00";
+#endif
+ };
+};
+
+
+////////////////////////////////////////////////////////////
+
+
+String RID_PLUSX { Text = "+<?> " ; };
+String RID_MINUSX { Text = "-<?> " ; };
+String RID_PLUSMINUSX { Text = "+-<?> " ; };
+String RID_MINUSPLUSX { Text = "-+<?> " ; };
+String RID_NEGX { Text = "neg <?> " ; };
+String RID_XPLUSY { Text = "<?> + <?> " ; };
+String RID_XMINUSY { Text = "<?> - <?> " ; };
+String RID_XCDOTY { Text = "<?> cdot <?> " ; };
+String RID_XTIMESY { Text = "<?> times <?> " ; };
+String RID_XSYMTIMESY { Text = "<?> * <?> " ; };
+String RID_XSYMDIVIDEY { Text = "<?> / <?> " ; };
+String RID_XDIVY { Text = "<?> div <?> " ; };
+String RID_XOVERY { Text = "<?> over <?> " ; };
+String RID_XODIVIDEY { Text = "<?> odivide <?> " ; };
+String RID_XODOTY { Text = "<?> odot <?> " ; };
+String RID_XOMINUSY { Text = "<?> ominus <?> " ; };
+String RID_XOPLUSY { Text = "<?> oplus <?> " ; };
+String RID_XOTIMESY { Text = "<?> otimes <?> " ; };
+String RID_XANDY { Text = "<?> and <?> " ; };
+String RID_XORY { Text = "<?> or <?> " ; };
+String RID_XEQY { Text = "<?> = <?> " ; };
+String RID_XNEQY { Text = "<?> <> <?> " ; };
+String RID_XLTY { Text = "<?> < <?> " ; };
+String RID_XGTY { Text = "<?> > <?> " ; };
+String RID_XLEY { Text = "<?> <= <?> " ; };
+String RID_XGEY { Text = "<?> >= <?> " ; };
+String RID_XLESLANTY { Text = "<?> leslant <?> " ; };
+String RID_XGESLANTY { Text = "<?> geslant <?> " ; };
+String RID_XLLY { Text = "<?> << <?> " ; };
+String RID_XGGY { Text = "<?> >> <?> " ; };
+String RID_XDEFY { Text = "<?> def <?> " ; };
+String RID_XEQUIVY { Text = "<?> equiv <?> " ; };
+String RID_XAPPROXY { Text = "<?> approx <?> " ; };
+String RID_XSIMY { Text = "<?> sim <?> " ; };
+String RID_XSIMEQY { Text = "<?> simeq <?> " ; };
+String RID_XPROPY { Text = "<?> prop <?> " ; };
+String RID_XORTHOY { Text = "<?> ortho <?> " ; };
+String RID_XPARALLELY { Text = "<?> parallel <?> " ; };
+String RID_XTOWARDY { Text = "<?> toward <?> " ; };
+String RID_XTRANSLY { Text = "<?> transl <?> " ; };
+String RID_XTRANSRY { Text = "<?> transr <?> " ; };
+String RID_XINY { Text = "<?> in <?> " ; };
+String RID_XNOTINY { Text = "<?> notin <?> " ; };
+String RID_XOWNSY { Text = "<?> owns <?> " ; };
+String RID_XUNIONY { Text = "<?> union <?> " ; };
+String RID_XINTERSECTIONY { Text = "<?> intersection <?> " ; };
+String RID_XSETMINUSY { Text = "<?> setminus <?> " ; };
+String RID_XSLASHY { Text = "<?> slash <?> " ; };
+String RID_XSUBSETY { Text = "<?> subset <?> " ; };
+String RID_XSUBSETEQY { Text = "<?> subseteq <?> " ; };
+String RID_XSUPSETY { Text = "<?> supset <?> " ; };
+String RID_XSUPSETEQY { Text = "<?> supseteq <?> " ; };
+String RID_XNSUBSETY { Text = "<?> nsubset <?> " ; };
+String RID_XNSUBSETEQY { Text = "<?> nsubseteq <?> " ; };
+String RID_XNSUPSETY { Text = "<?> nsupset <?> " ; };
+String RID_XNSUPSETEQY { Text = "<?> nsupseteq <?> " ; };
+String RID_ABSX { Text = "abs{<?>} " ; };
+String RID_FACTX { Text = "fact <?> " ; };
+String RID_SQRTX { Text = "sqrt{<?>} " ; };
+String RID_NROOTXY { Text = "nroot{<?>}{<?>} " ; };
+String RID_EX { Text = "func e^{<?>} " ; };
+String RID_EXPX { Text = "exp(<?>) " ; };
+String RID_LNX { Text = "ln(<?>) " ; };
+String RID_LOGX { Text = "log(<?>) " ; };
+String RID_SINX { Text = "sin(<?>) " ; };
+String RID_COSX { Text = "cos(<?>) " ; };
+String RID_TANX { Text = "tan(<?>) " ; };
+String RID_COTX { Text = "cot(<?>) " ; };
+String RID_ARCSINX { Text = "arcsin(<?>) " ; };
+String RID_ARCCOSX { Text = "arccos(<?>) " ; };
+String RID_ARCTANX { Text = "arctan(<?>) " ; };
+String RID_ARCCOTX { Text = "arccot(<?>) " ; };
+String RID_SINHX { Text = "sinh(<?>) " ; };
+String RID_COSHX { Text = "cosh(<?>) " ; };
+String RID_TANHX { Text = "tanh(<?>) " ; };
+String RID_COTHX { Text = "coth(<?>) " ; };
+String RID_ARSINHX { Text = "arsinh(<?>) " ; };
+String RID_ARCOSHX { Text = "arcosh(<?>) " ; };
+String RID_ARTANHX { Text = "artanh(<?>) " ; };
+String RID_ARCOTHX { Text = "arcoth(<?>) " ; };
+String RID_SUMX { Text = "sum <?> " ; };
+String RID_PRODX { Text = "prod <?> " ; };
+String RID_COPRODX { Text = "coprod <?> " ; };
+String RID_LIMX { Text = "lim <?> " ; };
+String RID_LIMINFX { Text = "liminf <?> " ; };
+String RID_LIMSUPX { Text = "limsup <?> " ; };
+String RID_EXISTS { Text = "exists " ; };
+String RID_FORALL { Text = "forall " ; };
+String RID_INTX { Text = "int <?> " ; };
+String RID_IINTX { Text = "iint <?> " ; };
+String RID_IIINTX { Text = "iiint <?> " ; };
+String RID_LINTX { Text = "lint <?> " ; };
+String RID_LLINTX { Text = "llint <?> " ; };
+String RID_LLLINTX { Text = "lllint <?> " ; };
+String RID_FROMX { Text = "from{<?>} <?> " ; };
+String RID_TOX { Text = "to{<?>} <?> " ; };
+String RID_FROMXTOY { Text = "from{<?>} to{<?>} <?> " ; };
+String RID_ACUTEX { Text = "acute <?> " ; };
+String RID_BARX { Text = "bar <?> " ; };
+String RID_BREVEX { Text = "breve <?> " ; };
+String RID_CHECKX { Text = "check <?> " ; };
+String RID_CIRCLEX { Text = "circle <?> " ; };
+String RID_DOTX { Text = "dot <?> " ; };
+String RID_DDOTX { Text = "ddot <?> " ; };
+String RID_DDDOTX { Text = "dddot <?> " ; };
+String RID_GRAVEX { Text = "grave <?> " ; };
+String RID_HATX { Text = "hat <?> " ; };
+String RID_TILDEX { Text = "tilde <?> " ; };
+String RID_VECX { Text = "vec <?> " ; };
+String RID_UNDERLINEX { Text = "underline <?> " ; };
+String RID_OVERLINEX { Text = "overline <?> " ; };
+String RID_OVERSTRIKEX { Text = "overstrike <?> " ; };
+String RID_PHANTOMX { Text = "phantom <?> " ; };
+String RID_BOLDX { Text = "bold <?> " ; };
+String RID_ITALX { Text = "ital <?> " ; };
+String RID_SIZEXY { Text = "size <?> <?> " ; };
+String RID_FONTXY { Text = "font <?> <?> " ; };
+String RID_COLORX { Text = "color <?> <?> " ; };
+String RID_LRGROUPX { Text = "{<?>} " ; };
+String RID_LRPARENTX { Text = "(<?>) " ; };
+String RID_LRBRACKETX { Text = "[<?>] " ; };
+String RID_LRDBRACKETX { Text = "ldbracket <?> rdbracket " ; };
+String RID_LRBRACEX { Text = "lbrace <?> rbrace " ; };
+String RID_LRANGLEX { Text = "langle <?> rangle " ; };
+String RID_LRCEILX { Text = "lceil <?> rceil " ; };
+String RID_LRFLOORX { Text = "lfloor <?> rfloor " ; };
+String RID_LRLINEX { Text = "lline <?> rline " ; };
+String RID_LRDLINEX { Text = "ldline <?> rdline " ; };
+String RID_LMRANGLEXY { Text = "langle <?> mline <?> rangle " ; };
+String RID_SLRPARENTX { Text = "left ( <?> right ) " ; };
+String RID_SLRBRACKETX { Text = "left [ <?> right ] " ; };
+String RID_SLRDBRACKETX { Text = "left ldbracket <?> right rdbracket " ; };
+String RID_SLRBRACEX { Text = "left lbrace <?> right rbrace " ; };
+String RID_SLRANGLEX { Text = "left langle <?> right rangle " ; };
+String RID_SLRCEILX { Text = "left lceil <?> right rceil " ; };
+String RID_SLRFLOORX { Text = "left lfloor <?> right rfloor " ; };
+String RID_SLRLINEX { Text = "left lline <?> right rline " ; };
+String RID_SLRDLINEX { Text = "left ldline <?> right rdline " ; };
+String RID_SLMRANGLEXY { Text = "left langle <?> mline <?> right rangle " ; };
+String RID_XOVERBRACEY { Text = "<?> overbrace <?> " ; };
+String RID_XUNDERBRACEY { Text = "<?> underbrace <?> " ; };
+String RID_RSUBX { Text = "<?>_{<?>}" ; };
+String RID_RSUPX { Text = "<?>^{<?>}" ; };
+String RID_LSUBX { Text = "<?> lsub{<?>} " ; };
+String RID_LSUPX { Text = "<?> lsup{<?>} " ; };
+String RID_CSUBX { Text = "<?> csub{<?>} " ; };
+String RID_CSUPX { Text = "<?> csup{<?>} " ; };
+String RID_SBLANK { Text = "`" ; };
+String RID_BLANK { Text = "~" ; };
+String RID_NEWLINE { Text = "newline " ; };
+String RID_BINOMXY { Text = "binom{<?>}{<?>} " ; };
+String RID_STACK { Text = "stack{<?> # <?> # <?>} " ; };
+String RID_MATRIX { Text = "matrix{<?> # <?> ## <?> # <?>} " ; };
+String RID_ALIGNLX { Text = "alignl <?> " ; };
+String RID_ALIGNCX { Text = "alignc <?> " ; };
+String RID_ALIGNRX { Text = "alignr <?> " ; };
+String RID_ALEPH { Text = "aleph " ; };
+String RID_EMPTYSET { Text = "emptyset " ; };
+String RID_RE { Text = "Re " ; };
+String RID_IM { Text = "Im " ; };
+String RID_INFINITY { Text = "infinity " ; };
+String RID_PARTIAL { Text = "partial " ; };
+String RID_NABLA { Text = "nabla " ; };
+String RID_WP { Text = "wp " ; };
+String RID_DOTSAXIS { Text = "dotsaxis " ; };
+String RID_DOTSUP { Text = "dotsup " ; };
+String RID_DOTSDOWN { Text = "dotsdown " ; };
+String RID_DOTSLOW { Text = "dotslow " ; };
+String RID_DOTSVERT { Text = "dotsvert " ; };
+String RID_XCIRCY { Text = "<?> circ <?> " ; };
+String RID_XWIDESLASHY { Text = "<?> wideslash <?> " ; };
+String RID_XWIDEBSLASHY { Text = "<?> widebslash <?> " ; };
+String RID_XDIVIDESY { Text = "<?> divides <?> " ; };
+String RID_XNDIVIDESY { Text = "<?> ndivides <?> " ; };
+String RID_DLARROW { Text = "<?> dlarrow <?> " ; };
+String RID_DLRARROW { Text = "<?> dlrarrow <?> " ; };
+String RID_DRARROW { Text = "<?> drarrow <?> " ; };
+String RID_SETN { Text = "setN " ; };
+String RID_SETZ { Text = "setZ " ; };
+String RID_SETQ { Text = "setQ " ; };
+String RID_SETR { Text = "setR " ; };
+String RID_SETC { Text = "setC " ; };
+String RID_WIDEHATX { Text = "widehat <?> " ; };
+String RID_WIDETILDEX { Text = "widetilde <?> " ; };
+String RID_WIDEVECX { Text = "widevec <?> " ; };
+String RID_HBAR { Text = "hbar " ; };
+String RID_LAMBDABAR { Text = "lambdabar " ; };
+String RID_LEFTARROW { Text = "leftarrow " ; };
+String RID_RIGHTARROW { Text = "rightarrow " ; };
+String RID_UPARROW { Text = "uparrow " ; };
+String RID_DOWNARROW { Text = "downarrow " ; };
+
+
+//////////////////////////////////////////
+
+
+Menu RID_COMMANDMENU
+{
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = RID_UNBINOPS_MENU ;
+ HelpId = HID_SMA_UNBINOPS_TBX ;
+ Text = "~Un鋜e/Bin鋜e Operatoren" ;
+ Text [ ENGLISH ] = "Unary/binary operators" ;
+ Text [ english_us ] = "Unary/Binary Operators" ;
+ Text [ portuguese_brazilian ] = "Un鋜e/Bin鋜e Operatoren" ;
+ Text [ swedish ] = "~Mon鋜a/Bin鋜a operatorer" ;
+ Text [ danish ] = "Monadiske/bin鎟e operatorer" ;
+ Text [ italian ] = "Operatori unari/binari" ;
+ Text [ spanish ] = "Operadores ~unarios/binarios" ;
+ Text [ french ] = "Op閞ateurs u~naires/binaires" ;
+ Text [ dutch ] = "~Unaire/binaire operatoren" ;
+ Text [ portuguese ] = "Operadores ~un醨ios/bin醨ios" ;
+ SubMenu = Menu
+ {
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = RID_PLUSX;
+ HelpId = HID_SMA_PLUSX;
+ Text = "+a";
+ };
+ MenuItem
+ {
+ Identifier = RID_MINUSX;
+ HelpId = HID_SMA_MINUSX;
+ Text = "-a";
+ };
+ MenuItem
+ {
+ Identifier = RID_PLUSMINUSX;
+ HelpId = HID_SMA_PLUSMINUSX;
+ Text = "+-a";
+ };
+ MenuItem
+ {
+ Identifier = RID_MINUSPLUSX;
+ HelpId = HID_SMA_MINUSPLUSX;
+ Text = "-+a";
+ };
+ MenuItem
+ {
+ Separator = TRUE;
+ };
+ MenuItem
+ {
+ Identifier = RID_XPLUSY;
+ HelpId = HID_SMA_XPLUSY;
+ Text = "a + b";
+ };
+ MenuItem
+ {
+ Identifier = RID_XMINUSY;
+ HelpId = HID_SMA_XMINUSY;
+ Text = "a - b";
+ };
+ MenuItem
+ {
+ Identifier = RID_XCDOTY;
+ HelpId = HID_SMA_XCDOTY;
+ Text = "a cdot b";
+ };
+ MenuItem
+ {
+ Identifier = RID_XTIMESY;
+ HelpId = HID_SMA_XTIMESY;
+ Text = "a times b";
+ };
+ MenuItem
+ {
+ Identifier = RID_XSYMTIMESY;
+ HelpId = HID_SMA_XSYMTIMESY;
+ Text = "a * b";
+ };
+ MenuItem
+ {
+ Identifier = RID_XOVERY;
+ HelpId = HID_SMA_XOVERY;
+ Text = "a over b";
+ };
+ MenuItem
+ {
+ Identifier = RID_XDIVY;
+ HelpId = HID_SMA_XDIVY;
+ Text = "a div b";
+ };
+ MenuItem
+ {
+ Identifier = RID_XSYMDIVIDEY;
+ HelpId = HID_SMA_XSYMDIVIDEY;
+ Text = "a / b";
+ };
+ MenuItem
+ {
+ Identifier = RID_XCIRCY;
+ HelpId = HID_SMA_XCIRCY;
+ Text = "a circ b";
+ };
+ MenuItem
+ {
+ Separator = TRUE;
+ };
+ MenuItem
+ {
+ Identifier = RID_XWIDESLASHY;
+ HelpId = HID_SMA_XWIDESLASHY;
+ Text = "a wideslash b";
+ };
+ MenuItem
+ {
+ Identifier = RID_XWIDEBSLASHY;
+ HelpId = HID_SMA_XWIDEBSLASHY;
+ Text = "a widebslash b";
+ };
+ MenuItem
+ {
+ Separator = TRUE;
+ };
+ MenuItem
+ {
+ Identifier = RID_NEGX;
+ HelpId = HID_SMA_NEGX;
+ Text = "neg a";
+ };
+ MenuItem
+ {
+ Identifier = RID_XANDY;
+ HelpId = HID_SMA_XANDY;
+ Text = "a and b";
+ };
+ MenuItem
+ {
+ Identifier = RID_XORY;
+ HelpId = HID_SMA_XORY;
+ Text = "a or b";
+ };
+ };
+ };
+ Text[ chinese_simplified ] = "一元/二元运算符";
+ Text[ russian ] = "禹囵睇/凌磬痦 铒屦囹铕";
+ Text[ polish ] = "Unarne/binarne operatory";
+ Text[ japanese ] = "嫁咆/兽才 低呲袄";
+ Text[ chinese_traditional ] = "じ/じ笲衡才";
+ Text[ dutch ] = "~Unaire/binaire operatoren";
+ Text[ chinese_simplified ] = "一元/二元运算符";
+ Text[ greek ] = "彭醻溟觑/孽徜殛镞 翦脲篝蒡";
+ Text[ korean ] = "老柳/捞柳 楷魂磊";
+ Text[ arabic ] = "阪倾 试垌 猛窍砩/虽瞧砩";
+ Text[ turkish ] = "Birli/ikili ie鏻er";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = RID_RELATIONS_MENU ;
+ HelpId = HID_SMA_RELATIONS_TBX ;
+ Text = "~Relationen" ;
+ Text [ ENGLISH ] = "Relations" ;
+ Text [ english_us ] = "Relations" ;
+ Text [ portuguese_brazilian ] = "Relationen" ;
+ Text [ swedish ] = "~Relationer" ;
+ Text [ danish ] = "Relationer" ;
+ Text [ italian ] = "Relazioni" ;
+ Text [ spanish ] = "~Relaciones" ;
+ Text [ french ] = "~Relations" ;
+ Text [ dutch ] = "~Relaties" ;
+ Text [ portuguese ] = "~Rela珲es" ;
+ SubMenu = Menu
+ {
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = RID_XEQY;
+ HelpId = HID_SMA_XEQY;
+ Text = "a = b";
+ };
+ MenuItem
+ {
+ Identifier = RID_XNEQY;
+ HelpId = HID_SMA_XNEQY;
+ Text = "a <> b";
+ };
+ MenuItem
+ {
+ Identifier = RID_XLTY;
+ HelpId = HID_SMA_XLTY;
+ Text = "a < b";
+ };
+ MenuItem
+ {
+ Identifier = RID_XLEY;
+ HelpId = HID_SMA_XLEY;
+ Text = "a <= b";
+ };
+ MenuItem
+ {
+ Identifier = RID_XLESLANTY;
+ HelpId = HID_SMA_XLESLANTY;
+ Text = "a leslant b";
+ };
+ MenuItem
+ {
+ Identifier = RID_XGTY;
+ HelpId = HID_SMA_XGTY;
+ Text = "a > b";
+ };
+ MenuItem
+ {
+ Identifier = RID_XGEY;
+ HelpId = HID_SMA_XGEY;
+ Text = "a >= b";
+ };
+ MenuItem
+ {
+ Identifier = RID_XGESLANTY;
+ HelpId = HID_SMA_XGESLANTY;
+ Text = "a geslant b";
+ };
+ MenuItem
+ {
+ Separator = TRUE;
+ };
+ MenuItem
+ {
+ Identifier = RID_XAPPROXY;
+ HelpId = HID_SMA_XAPPROXY;
+ Text = "a approx b";
+ };
+ MenuItem
+ {
+ Identifier = RID_XSIMY;
+ HelpId = HID_SMA_XSIMY;
+ Text = "a sim b";
+ };
+ MenuItem
+ {
+ Identifier = RID_XSIMEQY;
+ HelpId = HID_SMA_XSIMEQY;
+ Text = "a simeq b";
+ };
+ MenuItem
+ {
+ Identifier = RID_XEQUIVY;
+ HelpId = HID_SMA_XEQUIVY;
+ Text = "a equiv b";
+ };
+ MenuItem
+ {
+ Identifier = RID_XPROPY;
+ HelpId = HID_SMA_XPROPY;
+ Text = "a prop b";
+ };
+ MenuItem
+ {
+ Identifier = RID_XPARALLELY;
+ HelpId = HID_SMA_XPARALLELY;
+ Text = "a parallel b";
+ };
+ MenuItem
+ {
+ Identifier = RID_XORTHOY;
+ HelpId = HID_SMA_XORTHOY;
+ Text = "a ortho b";
+ };
+ MenuItem
+ {
+ Identifier = RID_XDIVIDESY;
+ HelpId = HID_SMA_XDIVIDESY;
+ Text = "a divides b";
+ };
+ MenuItem
+ {
+ Identifier = RID_XNDIVIDESY;
+ HelpId = HID_SMA_XNDIVIDESY;
+ Text = "a ndivides b";
+ };
+ MenuItem
+ {
+ Identifier = RID_XTOWARDY;
+ HelpId = HID_SMA_XTOWARDY;
+ Text = "a toward b";
+ };
+ MenuItem
+ {
+ Separator = TRUE;
+ };
+ MenuItem
+ {
+ Identifier = RID_DLARROW;
+ HelpId = HID_SMA_DLARROW;
+ Text = "a dlarrow b";
+ };
+ MenuItem
+ {
+ Identifier = RID_DLRARROW;
+ HelpId = HID_SMA_DLRARROW;
+ Text = "a dlrarrow b";
+ };
+ MenuItem
+ {
+ Identifier = RID_DRARROW;
+ HelpId = HID_SMA_DRARROW;
+ Text = "a drarrow b";
+ };
+ };
+ };
+ Text[ chinese_simplified ] = "关系";
+ Text[ russian ] = "砚玷";
+ Text[ polish ] = "Relacje";
+ Text[ japanese ] = "刳凹";
+ Text[ chinese_traditional ] = "闽玒";
+ Text[ dutch ] = "~Relaties";
+ Text[ chinese_simplified ] = "关系";
+ Text[ greek ] = "~喻蒹彘";
+ Text[ korean ] = "包拌";
+ Text[ arabic ] = "卺寝鞘";
+ Text[ turkish ] = "輑i⺧iler";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = RID_SETOPERATIONS_MENU ;
+ HelpId = HID_SMA_SETOPERATIONS_TBX ;
+ Text = "~Mengenoperationen" ;
+ Text [ ENGLISH ] = "Set operations" ;
+ Text [ english_us ] = "Set Operations" ;
+ Text [ portuguese_brazilian ] = "Mengenoperationen" ;
+ Text [ swedish ] = "~M鋘gdoperationer" ;
+ Text [ danish ] = "M鎛gdeoperationer" ;
+ Text [ italian ] = "Operazioni degli insiemi" ;
+ Text [ spanish ] = "~Operaciones de conjuntos" ;
+ Text [ french ] = "O~p閞ations quantitatives" ;
+ Text [ dutch ] = "~Definities" ;
+ Text [ portuguese ] = "~Opera珲es de conjuntos" ;
+ SubMenu = Menu
+ {
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = RID_XINY;
+ HelpId = HID_SMA_XINY;
+ Text = "a in A";
+ };
+ MenuItem
+ {
+ Identifier = RID_XNOTINY;
+ HelpId = HID_SMA_XNOTINY;
+ Text = "a notin A";
+ };
+ MenuItem
+ {
+ Identifier = RID_XOWNSY;
+ HelpId = HID_SMA_XOWNSY;
+ Text = "A owns a";
+ };
+ MenuItem
+ {
+ Separator = TRUE;
+ };
+ MenuItem
+ {
+ Identifier = RID_XINTERSECTIONY;
+ HelpId = HID_SMA_XINTERSECTIONY;
+ Text = "A intersection B";
+ };
+ MenuItem
+ {
+ Identifier = RID_XUNIONY;
+ HelpId = HID_SMA_XUNIONY;
+ Text = "A union B";
+ };
+ MenuItem
+ {
+ Identifier = RID_XSETMINUSY;
+ HelpId = HID_SMA_XSETMINUSY;
+ Text = "A \\ B";
+ };
+ MenuItem
+ {
+ Identifier = RID_XSLASHY;
+ HelpId = HID_SMA_XSLASHY;
+ Text = "A / B";
+ };
+ MenuItem
+ {
+ Identifier = RID_XSUBSETY;
+ HelpId = HID_SMA_XSUBSETY;
+ Text = "A subset B";
+ };
+ MenuItem
+ {
+ Identifier = RID_XSUBSETEQY;
+ HelpId = HID_SMA_XSUBSETEQY;
+ Text = "A subseteq B";
+ };
+ MenuItem
+ {
+ Identifier = RID_XSUPSETY;
+ HelpId = HID_SMA_XSUPSETY;
+ Text = "A supset B";
+ };
+ MenuItem
+ {
+ Identifier = RID_XSUPSETEQY;
+ HelpId = HID_SMA_XSUPSETEQY;
+ Text = "A supseteq B";
+ };
+ MenuItem
+ {
+ Identifier = RID_XNSUBSETY;
+ HelpId = HID_SMA_XNSUBSETY;
+ Text = "A nsubset B";
+ };
+ MenuItem
+ {
+ Identifier = RID_XNSUBSETEQY;
+ HelpId = HID_SMA_XNSUBSETEQY;
+ Text = "A nsubseteq B";
+ };
+ MenuItem
+ {
+ Identifier = RID_XNSUPSETY;
+ HelpId = HID_SMA_XNSUPSETY;
+ Text = "A nsupset B";
+ };
+ MenuItem
+ {
+ Identifier = RID_XNSUPSETEQY;
+ HelpId = HID_SMA_XNSUPSETEQY;
+ Text = "A nsupseteq B";
+ };
+ MenuItem
+ {
+ Separator = TRUE;
+ };
+ MenuItem
+ {
+ Identifier = RID_EMPTYSET;
+ HelpId = HID_SMA_EMPTYSET;
+ Text = "emptyset";
+ };
+ MenuItem
+ {
+ Identifier = RID_ALEPH;
+ HelpId = HID_SMA_ALEPH;
+ Text = "aleph";
+ };
+ MenuItem
+ {
+ Identifier = RID_SETN;
+ HelpId = HID_SMA_SETN;
+ Text = "setN";
+ };
+ MenuItem
+ {
+ Identifier = RID_SETZ;
+ HelpId = HID_SMA_SETZ;
+ Text = "setZ";
+ };
+ MenuItem
+ {
+ Identifier = RID_SETQ;
+ HelpId = HID_SMA_SETQ;
+ Text = "setQ";
+ };
+ MenuItem
+ {
+ Identifier = RID_SETR;
+ HelpId = HID_SMA_SETR;
+ Text = "setR";
+ };
+ MenuItem
+ {
+ Identifier = RID_SETC;
+ HelpId = HID_SMA_SETC;
+ Text = "setC";
+ };
+ };
+ };
+ Text[ chinese_simplified ] = "数量计算";
+ Text[ russian ] = "物屦圉梃 祉铈羼蜮";
+ Text[ polish ] = "Operacje na zbiorach";
+ Text[ japanese ] = "廤崌墘嶼";
+ Text[ chinese_traditional ] = "计秖璸衡";
+ Text[ dutch ] = "~Definities";
+ Text[ chinese_simplified ] = "数量计算";
+ Text[ greek ] = "~旭茴彘 篚睃膣";
+ Text[ korean ] = "楷魂磊 汲沥";
+ Text[ arabic ] = "闾沔谏 阢犴鞘";
+ Text[ turkish ] = "K黰e iemleri";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = RID_FUNCTIONS_MENU ;
+ HelpId = HID_SMA_FUNCTIONS_TBX ;
+ Text = "~Funktionen" ;
+ Text [ ENGLISH ] = "Functions" ;
+ Text [ english_us ] = "Functions" ;
+ Text [ portuguese_brazilian ] = "Funktionen" ;
+ Text [ swedish ] = "~Funktioner" ;
+ Text [ danish ] = "Funktioner" ;
+ Text [ italian ] = "Funzioni" ;
+ Text [ spanish ] = "~Funciones" ;
+ Text [ french ] = "~Fonctions" ;
+ Text [ dutch ] = "~Functies" ;
+ Text [ portuguese ] = "~Fun珲es" ;
+ SubMenu = Menu
+ {
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = RID_ABSX;
+ HelpId = HID_SMA_ABSX;
+ Text = "|x|";
+ };
+ MenuItem
+ {
+ Identifier = RID_FACTX;
+ HelpId = HID_SMA_FACTX;
+ Text = "x!";
+ };
+ MenuItem
+ {
+ Identifier = RID_SQRTX;
+ HelpId = HID_SMA_SQRTX;
+ Text = "sqrt x";
+ };
+ MenuItem
+ {
+ Identifier = RID_NROOTXY;
+ HelpId = HID_SMA_NROOTXY;
+ Text = "nroot x y";
+ };
+ MenuItem
+ {
+ Identifier = RID_RSUPX;
+ HelpId = HID_SMA_RSUPX;
+ Text = "x^y";
+ };
+ MenuItem
+ {
+ Identifier = RID_EX;
+ HelpId = HID_SMA_EX;
+ Text = "e^x";
+ };
+ MenuItem
+ {
+ Identifier = RID_LNX;
+ HelpId = HID_SMA_LNX;
+ Text = "ln(x)";
+ };
+ MenuItem
+ {
+ Identifier = RID_EXPX;
+ HelpId = HID_SMA_EXPX;
+ Text = "exp(x)";
+ };
+ MenuItem
+ {
+ Identifier = RID_LOGX;
+ HelpId = HID_SMA_LOGX;
+ Text = "log(x)";
+ };
+ MenuItem
+ {
+ Separator = TRUE;
+ };
+ MenuItem
+ {
+ Identifier = RID_SINX;
+ HelpId = HID_SMA_SINX;
+ Text = "sin(x)";
+ };
+ MenuItem
+ {
+ Identifier = RID_COSX;
+ HelpId = HID_SMA_COSX;
+ Text = "cos(x)";
+ };
+ MenuItem
+ {
+ Identifier = RID_TANX;
+ HelpId = HID_SMA_TANX;
+ Text = "tan(x)";
+ };
+ MenuItem
+ {
+ Identifier = RID_COTX;
+ HelpId = HID_SMA_COTX;
+ Text = "cot(x)";
+ };
+ MenuItem
+ {
+ Identifier = RID_SINHX;
+ HelpId = HID_SMA_SINHX;
+ Text = "sinh(x)";
+ };
+ MenuItem
+ {
+ Identifier = RID_COSHX;
+ HelpId = HID_SMA_COSHX;
+ Text = "cosh(x)";
+ };
+ MenuItem
+ {
+ Identifier = RID_TANHX;
+ HelpId = HID_SMA_TANHX;
+ Text = "tanh(x)";
+ };
+ MenuItem
+ {
+ Identifier = RID_COTHX;
+ HelpId = HID_SMA_COTHX;
+ Text = "coth(x)";
+ };
+ MenuItem
+ {
+ Separator = TRUE;
+ };
+ MenuItem
+ {
+ Identifier = RID_FUNCTIONSOTHER1_MENU;
+ HelpId = HID_SMA_FUNCTIONSOTHER1_MENU;
+ Text = "andere";
+ Text [ ENGLISH ] = "other";
+ TEXT[ italian ] = "altri";
+ TEXT[ portuguese_brazilian ] = "andere";
+ TEXT[ portuguese ] = "Outros";
+ TEXT[ danish ] = "andre";
+ TEXT[ french ] = "Autres";
+ TEXT[ swedish ] = "andra";
+ TEXT[ dutch ] = "andere";
+ TEXT[ spanish ] = "otros";
+ TEXT[ english_us ] = "Other";
+ SubMenu = Menu
+ {
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = RID_ARCSINX;
+ HelpId = HID_SMA_ARCSINX;
+ Text = "arcsin(x)";
+ };
+ MenuItem
+ {
+ Identifier = RID_ARCCOSX;
+ HelpId = HID_SMA_ARCCOSX;
+ Text = "arccos(x)";
+ };
+ MenuItem
+ {
+ Identifier = RID_ARCTANX;
+ HelpId = HID_SMA_ARCTANX;
+ Text = "arctan(x)";
+ };
+ MenuItem
+ {
+ Identifier = RID_ARCCOTX;
+ HelpId = HID_SMA_ARCCOTX;
+ Text = "arcot(x)";
+ };
+ MenuItem
+ {
+ Identifier = RID_ARSINHX;
+ HelpId = HID_SMA_ARSINHX;
+ Text = "arsinh(x)";
+ };
+ MenuItem
+ {
+ Identifier = RID_ARCOSHX;
+ HelpId = HID_SMA_ARCOSHX;
+ Text = "arcosh(x)";
+ };
+ MenuItem
+ {
+ Identifier = RID_ARTANHX;
+ HelpId = HID_SMA_ARTANHX;
+ Text = "artanh(x)";
+ };
+ MenuItem
+ {
+ Identifier = RID_ARCOTHX;
+ HelpId = HID_SMA_ARCOTHX;
+ Text = "arcoth(x)";
+ };
+ };
+ };
+ TEXT[ chinese_simplified ] = "其他";
+ TEXT[ russian ] = "漯筱桢";
+ TEXT[ polish ] = "inne";
+ TEXT[ japanese ] = "偦偺懠";
+ TEXT[ chinese_traditional ] = "ㄤ";
+ TEXT[ language_user1 ] = " ";
+ TEXT[ dutch ] = "andere";
+ TEXT[ chinese_simplified ] = "其他";
+ TEXT[ greek ] = "茈脶";
+ TEXT[ korean ] = "扁鸥";
+ TEXT[ arabic ] = "垌 嗅";
+ TEXT[ turkish ] = "Di餰r";
+ };
+ };
+ };
+ Text[ chinese_simplified ] = "函数";
+ Text[ russian ] = "泽黻鲨";
+ Text[ polish ] = "Funkcje";
+ Text[ japanese ] = "娭悢";
+ Text[ chinese_traditional ] = "ㄧ计";
+ Text[ dutch ] = "~Functies";
+ Text[ chinese_simplified ] = "函数";
+ Text[ greek ] = "~吁磲耵摅彘";
+ Text[ korean ] = "窃荐";
+ Text[ arabic ] = "锨崆";
+ Text[ turkish ] = "Fonksiyon";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = RID_OPERATORS_MENU ;
+ HelpId = HID_SMA_OPERATORS_TBX ;
+ Text = "~Operatoren" ;
+ Text [ ENGLISH ] = "Operators" ;
+ Text [ english_us ] = "Operators" ;
+ Text [ portuguese_brazilian ] = "Operatoren" ;
+ Text [ swedish ] = "~Operatorer" ;
+ Text [ danish ] = "Operatorer" ;
+ Text [ italian ] = "Operatori" ;
+ Text [ spanish ] = "~Operadores" ;
+ Text [ french ] = "~Op閞ateurs" ;
+ Text [ dutch ] = "O~peratoren" ;
+ Text [ portuguese ] = "~Operadores" ;
+ SubMenu = Menu
+ {
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = RID_LIMX;
+ HelpId = HID_SMA_LIMX;
+ Text = "lim x";
+ };
+ MenuItem
+ {
+ Identifier = RID_SUMX;
+ HelpId = HID_SMA_SUMX;
+ Text = "sum x";
+ };
+ MenuItem
+ {
+ Identifier = RID_PRODX;
+ HelpId = HID_SMA_PRODX;
+ Text = "prod x";
+ };
+ MenuItem
+ {
+ Identifier = RID_COPRODX;
+ HelpId = HID_SMA_COPRODX;
+ Text = "coprod x";
+ };
+ MenuItem
+ {
+ Identifier = RID_INTX;
+ HelpId = HID_SMA_INTX;
+ Text = "int x";
+ };
+ MenuItem
+ {
+ Identifier = RID_IINTX;
+ HelpId = HID_SMA_IINTX;
+ Text = "iint x";
+ };
+ MenuItem
+ {
+ Identifier = RID_IIINTX;
+ HelpId = HID_SMA_IIINTX;
+ Text = "iiint x";
+ };
+ MenuItem
+ {
+ Identifier = RID_LINTX;
+ HelpId = HID_SMA_LINTX;
+ Text = "lint x";
+ };
+ MenuItem
+ {
+ Identifier = RID_LLINTX;
+ HelpId = HID_SMA_LLINTX;
+ Text = "llint x";
+ };
+ MenuItem
+ {
+ Identifier = RID_LLLINTX;
+ HelpId = HID_SMA_LLLINTX;
+ Text = "lllint x";
+ };
+ MenuItem
+ {
+ Separator = TRUE;
+ };
+ MenuItem
+ {
+ Identifier = RID_FROMXTOY;
+ HelpId = HID_SMA_FROMXTOY;
+ Text = "... from a to b";
+ };
+ MenuItem
+ {
+ Identifier = RID_FROMX;
+ HelpId = HID_SMA_FROMX;
+ Text = "... from a";
+ };
+ MenuItem
+ {
+ Identifier = RID_TOX;
+ HelpId = HID_SMA_TOX;
+ Text = "... to b";
+ };
+ };
+ };
+ Text[ chinese_simplified ] = "运算符";
+ Text[ russian ] = "物屦囹铕";
+ Text[ polish ] = "Operatory";
+ Text[ japanese ] = "墘嶼巕";
+ Text[ chinese_traditional ] = "笲衡才";
+ Text[ dutch ] = "O~peratoren";
+ Text[ chinese_simplified ] = "运算符";
+ Text[ greek ] = "~藻脲篝蒡";
+ Text[ korean ] = "楷魂磊";
+ Text[ arabic ] = "阪倾 轻试垌";
+ Text[ turkish ] = "蔺le鏻er";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = RID_ATTRIBUTES_MENU ;
+ HelpId = HID_SMA_ATTRIBUTES_TBX ;
+ Text = "~Attribute" ;
+ Text [ ENGLISH ] = "Attributes" ;
+ Text [ portuguese ] = "~Atributos" ;
+ Text [ english_us ] = "Attributes" ;
+ Text [ portuguese_brazilian ] = "Attribute" ;
+ Text [ swedish ] = "~Attribut" ;
+ Text [ danish ] = "Attributter" ;
+ Text [ italian ] = "Attributi" ;
+ Text [ spanish ] = "~Atributos" ;
+ Text [ french ] = "~Attributs" ;
+ Text [ dutch ] = "~Attributen" ;
+ SubMenu = Menu
+ {
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = RID_ACUTEX;
+ HelpId = HID_SMA_ACUTEX;
+ Text = "acute a";
+ };
+ MenuItem
+ {
+ Identifier = RID_GRAVEX;
+ HelpId = HID_SMA_GRAVEX;
+ Text = "grave a";
+ };
+ MenuItem
+ {
+ Identifier = RID_CHECKX;
+ HelpId = HID_SMA_CHECKX;
+ Text = "check a";
+ };
+ MenuItem
+ {
+ Identifier = RID_BREVEX;
+ HelpId = HID_SMA_BREVEX;
+ Text = "breve a";
+ };
+ MenuItem
+ {
+ Identifier = RID_CIRCLEX;
+ HelpId = HID_SMA_CIRCLEX;
+ Text = "circle a";
+ };
+ MenuItem
+ {
+ Identifier = RID_DOTX;
+ HelpId = HID_SMA_DOTX;
+ Text = "dot a";
+ };
+ MenuItem
+ {
+ Identifier = RID_DDOTX;
+ HelpId = HID_SMA_DDOTX;
+ Text = "ddot a";
+ };
+ MenuItem
+ {
+ Identifier = RID_DDDOTX;
+ HelpId = HID_SMA_DDDOTX;
+ Text = "dddot a";
+ };
+ MenuItem
+ {
+ Identifier = RID_BARX;
+ HelpId = HID_SMA_BARX;
+ Text = "bar a";
+ };
+ MenuItem
+ {
+ Identifier = RID_VECX;
+ HelpId = HID_SMA_VECX;
+ Text = "vec a";
+ };
+ MenuItem
+ {
+ Identifier = RID_TILDEX;
+ HelpId = HID_SMA_TILDEX;
+ Text = "tilde a";
+ };
+ MenuItem
+ {
+ Identifier = RID_HATX;
+ HelpId = HID_SMA_HATX;
+ Text = "hat a";
+ };
+ MenuItem
+ {
+ Separator = TRUE;
+ };
+ MenuItem
+ {
+ Identifier = RID_WIDEVECX;
+ HelpId = HID_SMA_WIDEVECX;
+ Text = "widevec abc";
+ };
+ MenuItem
+ {
+ Identifier = RID_WIDETILDEX;
+ HelpId = HID_SMA_WIDETILDEX;
+ Text = "widetilde abc";
+ };
+ MenuItem
+ {
+ Identifier = RID_WIDEHATX;
+ HelpId = HID_SMA_WIDEHATX;
+ Text = "widehat abc";
+ };
+ MenuItem
+ {
+ Identifier = RID_OVERLINEX;
+ HelpId = HID_SMA_OVERLINEX;
+ Text = "overline abc";
+ };
+ MenuItem
+ {
+ Identifier = RID_UNDERLINEX;
+ HelpId = HID_SMA_UNDERLINEX;
+ Text = "underline abc";
+ };
+ MenuItem
+ {
+ Identifier = RID_OVERSTRIKEX;
+ HelpId = HID_SMA_OVERSTRIKEX;
+ Text = "overstrike abc";
+ };
+ MenuItem
+ {
+ Separator = TRUE;
+ };
+ MenuItem
+ {
+ Identifier = RID_PHANTOMX;
+ HelpId = HID_SMA_PHANTOMX;
+ Text = "phantom b";
+ };
+ MenuItem
+ {
+ Identifier = RID_BOLDX;
+ HelpId = HID_SMA_BOLDX;
+ Text = "bold b";
+ };
+ MenuItem
+ {
+ Identifier = RID_ITALX;
+ HelpId = HID_SMA_ITALX;
+ Text = "ital b";
+ };
+ MenuItem
+ {
+ Identifier = RID_SIZEXY;
+ HelpId = HID_SMA_SIZEXY;
+ Text = "size s b";
+ };
+ MenuItem
+ {
+ Identifier = RID_FONTXY;
+ HelpId = HID_SMA_FONTXY;
+ Text = "font f b";
+ };
+ };
+ };
+ Text[ chinese_simplified ] = "属性";
+ Text[ russian ] = "莉痂狍螓";
+ Text[ polish ] = "Atrybuty";
+ Text[ japanese ] = "懏惈";
+ Text[ chinese_traditional ] = "妮┦";
+ Text[ dutch ] = "~Attributen";
+ Text[ chinese_simplified ] = "属性";
+ Text[ greek ] = "~射辄翮翦";
+ Text[ korean ] = "加己";
+ Text[ arabic ] = "鱼鞘";
+ Text[ turkish ] = "謟nitelikler";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = RID_BRACKETS_MENU ;
+ HelpId = HID_SMA_BRACKETS_TBX ;
+ Text = "~Klammern" ;
+ Text [ ENGLISH ] = "Parentheses" ;
+ Text [ english_us ] = "Brackets" ;
+ Text [ portuguese_brazilian ] = "Klammern" ;
+ Text [ swedish ] = "~Parenteser" ;
+ Text [ danish ] = "Parenteser" ;
+ Text [ italian ] = "Parentesi" ;
+ Text [ spanish ] = "~Par閚tesis" ;
+ Text [ french ] = "~Parenth鑣es" ;
+ Text [ dutch ] = "~Haakjes" ;
+ Text [ portuguese ] = "~Par阯teses" ;
+ SubMenu = Menu
+ {
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = RID_LRGROUPX;
+ HelpId = HID_SMA_LRGROUPX;
+ Text = "{...}";
+ };
+ MenuItem
+ {
+ Separator = TRUE;
+ };
+ MenuItem
+ {
+ Identifier = RID_LRPARENTX;
+ HelpId = HID_SMA_LRPARENTX;
+ Text = "(x)";
+ };
+ MenuItem
+ {
+ Identifier = RID_LRBRACKETX;
+ HelpId = HID_SMA_LRBRACKETX;
+ Text = "[x]";
+ };
+ MenuItem
+ {
+ Identifier = RID_LRDBRACKETX;
+ HelpId = HID_SMA_LRDBRACKETX;
+ Text = "ldbracket x rdbracket ";
+ };
+ MenuItem
+ {
+ Identifier = RID_LRBRACEX;
+ HelpId = HID_SMA_LRBRACEX;
+ Text = "{x}";
+ };
+ MenuItem
+ {
+ Identifier = RID_LRANGLEX;
+ HelpId = HID_SMA_LRANGLEX;
+ Text = "langle x rangle";
+ };
+ MenuItem
+ {
+ Identifier = RID_LMRANGLEXY;
+ HelpId = HID_SMA_LMRANGLEXY;
+ Text = "langle x mline y rangle";
+ };
+ MenuItem
+ {
+ Identifier = RID_LRCEILX;
+ HelpId = HID_SMA_LRCEILX;
+ Text = "lceil x rceil";
+ };
+ MenuItem
+ {
+ Identifier = RID_LRFLOORX;
+ HelpId = HID_SMA_LRFLOORX;
+ Text = "lfloor x rfloor";
+ };
+ MenuItem
+ {
+ Identifier = RID_LRLINEX;
+ HelpId = HID_SMA_LRLINEX;
+ Text = "lline x rline";
+ };
+ MenuItem
+ {
+ Identifier = RID_LRDLINEX;
+ HelpId = HID_SMA_LRDLINEX;
+ Text = "ldline x rdline";
+ };
+ MenuItem
+ {
+ Separator = TRUE;
+ };
+ MenuItem
+ {
+ Identifier = RID_SLRPARENTX;
+ HelpId = HID_SMA_SLRPARENTX;
+ Text = "left ( x rigth )";
+ };
+ MenuItem
+ {
+ Identifier = RID_SLRBRACKETX;
+ HelpId = HID_SMA_SLRBRACKETX;
+ Text = "left [ x right ]";
+ };
+ MenuItem
+ {
+ Identifier = RID_SLRDBRACKETX;
+ HelpId = HID_SMA_SLRDBRACKETX;
+ Text = "left ldbracket x right rdbracket ";
+ };
+ MenuItem
+ {
+ Identifier = RID_SLRBRACEX;
+ HelpId = HID_SMA_SLRBRACEX;
+ Text = "left { x right }";
+ };
+ MenuItem
+ {
+ Identifier = RID_SLRANGLEX;
+ HelpId = HID_SMA_SLRANGLEX;
+ Text = "left langle x right rangle";
+ };
+ MenuItem
+ {
+ Identifier = RID_SLMRANGLEXY;
+ HelpId = HID_SMA_SLMRANGLEXY;
+ Text = "left langle x mline y right rangle";
+ };
+ MenuItem
+ {
+ Identifier = RID_SLRCEILX;
+ HelpId = HID_SMA_SLRCEILX;
+ Text = "left lceil x right rceil";
+ };
+ MenuItem
+ {
+ Identifier = RID_SLRFLOORX;
+ HelpId = HID_SMA_SLRFLOORX;
+ Text = "left lfloor x right rfloor";
+ };
+ MenuItem
+ {
+ Identifier = RID_SLRLINEX;
+ HelpId = HID_SMA_SLRLINEX;
+ Text = "left lline x right rline";
+ };
+ MenuItem
+ {
+ Identifier = RID_SLRDLINEX;
+ HelpId = HID_SMA_SLRDLINEX;
+ Text = "left ldline x right rdline";
+ };
+ MenuItem
+ {
+ Separator = TRUE;
+ };
+ MenuItem
+ {
+ Identifier = RID_XOVERBRACEY;
+ HelpId = HID_SMA_XOVERBRACEY;
+ Text = "x overbrace y";
+ };
+ MenuItem
+ {
+ Identifier = RID_XUNDERBRACEY;
+ HelpId = HID_SMA_XUNDERBRACEY;
+ Text = "x underbrace y";
+ };
+ };
+ };
+ Text[ chinese_simplified ] = "括号";
+ Text[ russian ] = "殃钺觇";
+ Text[ polish ] = "Nawiasy";
+ Text[ japanese ] = "妵屖";
+ Text[ chinese_traditional ] = "珹腹";
+ Text[ dutch ] = "~Haakjes";
+ Text[ chinese_simplified ] = "括号";
+ Text[ greek ] = "~嗅皴龛蒹彘";
+ Text[ korean ] = "褒龋";
+ Text[ arabic ] = "棉媲";
+ Text[ turkish ] = "Ayra鏻ar";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = RID_FORMAT_MENU ;
+ HelpId = HID_SMA_FORMAT_TBX ;
+ Text = "Formatieru~ngen" ;
+ Text [ ENGLISH ] = "Format" ;
+ Text [ english_us ] = "F~ormat" ;
+ Text [ portuguese_brazilian ] = "Formatierungen" ;
+ Text [ swedish ] = "~Formateringar" ;
+ Text [ danish ] = "Formateringer" ;
+ Text [ italian ] = "Formattazioni" ;
+ Text [ spanish ] = "~Formatos" ;
+ Text [ french ] = "Format~age" ;
+ Text [ dutch ] = "~Opmaak" ;
+ Text [ portuguese ] = "~Formatos" ;
+ SubMenu = Menu
+ {
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = RID_RSUPX;
+ HelpId = HID_SMA_RSUPX;
+ Text = "^x";
+ };
+ MenuItem
+ {
+ Identifier = RID_RSUBX;
+ HelpId = HID_SMA_RSUBX;
+ Text = "_x";
+ };
+ MenuItem
+ {
+ Identifier = RID_LSUPX;
+ HelpId = HID_SMA_LSUPX;
+ Text = "lsup x";
+ };
+ MenuItem
+ {
+ Identifier = RID_LSUBX;
+ HelpId = HID_SMA_LSUBX;
+ Text = "lsub x";
+ };
+ MenuItem
+ {
+ Identifier = RID_CSUPX;
+ HelpId = HID_SMA_CSUPX;
+ Text = "csup x";
+ };
+ MenuItem
+ {
+ Identifier = RID_CSUBX;
+ HelpId = HID_SMA_CSUBX;
+ Text = "csub x";
+ };
+ MenuItem
+ {
+ Separator = TRUE;
+ };
+ MenuItem
+ {
+ Identifier = RID_NEWLINE;
+ HelpId = HID_SMA_NEWLINE;
+ Text = "neue Zeile";
+ Text [ ENGLISH ] = "new line" ;
+ Text[ italian ] = "Nuova riga";
+ Text[ portuguese_brazilian ] = "new line";
+ Text[ portuguese ] = "nova linha";
+ Text[ danish ] = "ny linje";
+ Text[ french ] = "nouvelle ligne";
+ Text[ swedish ] = "ny rad";
+ Text[ dutch ] = "nieuwe regel";
+ Text[ spanish ] = "nueva l韓ea";
+ Text[ english_us ] = "New Line";
+ Text[ chinese_simplified ] = "换行";
+ Text[ russian ] = "眍忄 耱痤赅";
+ Text[ polish ] = "nowy wiersz";
+ Text[ japanese ] = "怴偟偄峴";
+ Text[ chinese_traditional ] = "传︽";
+ Text[ dutch ] = "nieuwe regel";
+ Text[ chinese_simplified ] = "换行";
+ Text[ greek ] = "洼 泷犰燹";
+ Text[ korean ] = "货 临";
+ Text[ arabic ] = "呜 滔硐";
+ Text[ turkish ] = "Yeni sat齬";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = RID_SBLANK;
+ HelpId = HID_SMA_SBLANK;
+ Text = "kleiner Zwischenraum";
+ Text [ ENGLISH ] = "small space" ;
+ Text[ italian ] = "Spazio intemedio piccolo";
+ Text[ portuguese_brazilian ] = "small space";
+ Text[ portuguese ] = "espa鏰mento pequeno";
+ Text[ danish ] = "lille mellemrum";
+ Text[ french ] = "Petit espace";
+ Text[ swedish ] = "litet mellanrum";
+ Text[ dutch ] = "kleine spatie";
+ Text[ spanish ] = "espacio peque駉";
+ Text[ english_us ] = "Small Gap";
+ Text[ chinese_simplified ] = "小间隔";
+ Text[ russian ] = "觐痤蜿栝 镳钺咫";
+ Text[ polish ] = "Ma硑 odst阷 mi阣zy ramkami";
+ Text[ japanese ] = "彫酵甙";
+ Text[ chinese_traditional ] = "丁筳";
+ Text[ dutch ] = "kleine spatie";
+ Text[ chinese_simplified ] = "小间隔";
+ Text[ greek ] = "扉犟 溟荜屙";
+ Text[ korean ] = "累篮 埃拜";
+ Text[ arabic ] = "嗜勤 折硌";
+ Text[ turkish ] = "K黭 aral齥";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = RID_BLANK;
+ HelpId = HID_SMA_BLANK;
+ Text = "Zwischenraum";
+ Text [ ENGLISH ] = "space" ;
+ Text[ italian ] = "Spazio intermedio";
+ Text[ portuguese_brazilian ] = "space";
+ Text[ portuguese ] = "espa鏰mento";
+ Text[ danish ] = "mellemrum";
+ Text[ french ] = "Espace";
+ Text[ swedish ] = "mellanrum";
+ Text[ dutch ] = "spatie";
+ Text[ spanish ] = "espacio";
+ Text[ english_us ] = "Gap";
+ Text[ chinese_simplified ] = "间隔";
+ Text[ russian ] = "橡钺咫";
+ Text[ polish ] = "Odst阷 ramek";
+ Text[ japanese ] = "酵甙";
+ Text[ chinese_traditional ] = "丁筳";
+ Text[ dutch ] = "spatie";
+ Text[ chinese_simplified ] = "间隔";
+ Text[ greek ] = "拈荜屙";
+ Text[ korean ] = "埃拜";
+ Text[ arabic ] = "嗜勤";
+ Text[ turkish ] = "Aral齥";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = RID_BINOMXY;
+ HelpId = HID_SMA_BINOMXY;
+ Text = "binom x y";
+ };
+ MenuItem
+ {
+ Identifier = RID_STACK;
+ HelpId = HID_SMA_STACK;
+ Text = "stack {...}";
+ };
+ MenuItem
+ {
+ Identifier = RID_MATRIX;
+ HelpId = HID_SMA_MATRIX;
+ Text = "matrix {...}";
+ };
+ MenuItem
+ {
+ Separator = TRUE;
+ };
+ MenuItem
+ {
+ Identifier = RID_ALIGNLX;
+ HelpId = HID_SMA_ALIGNLX;
+ Text = "alignl x";
+ };
+ MenuItem
+ {
+ Identifier = RID_ALIGNCX;
+ HelpId = HID_SMA_ALIGNCX;
+ Text = "alignc x";
+ };
+ MenuItem
+ {
+ Identifier = RID_ALIGNRX;
+ HelpId = HID_SMA_ALIGNRX;
+ Text = "alignr x";
+ };
+ };
+ };
+ Text[ chinese_simplified ] = "格式(~O)";
+ Text[ russian ] = "灶痨囹";
+ Text[ polish ] = "Formatowania";
+ Text[ japanese ] = "彂幃愝掕(~O)";
+ Text[ chinese_traditional ] = "Α(~O)";
+ Text[ dutch ] = "~Opmaak";
+ Text[ chinese_simplified ] = "格式(~O)";
+ Text[ greek ] = "田駘鲲痫檗箦轵";
+ Text[ korean ] = "辑侥(~O)";
+ Text[ arabic ] = "输禹";
+ Text[ turkish ] = "Format";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = RID_MISC_MENU ;
+ HelpId = HID_SMA_MISC_MENU ;
+ Text = "~Sonstiges" ;
+ Text [ ENGLISH ] = "Misc" ;
+ Text [ english_us ] = "~Others" ;
+ Text [ portuguese_brazilian ] = "Sonstiges" ;
+ Text [ swedish ] = "謣vrigt" ;
+ Text [ danish ] = "Andet" ;
+ Text [ italian ] = "Altro" ;
+ Text [ spanish ] = "~Otros" ;
+ Text [ french ] = "~Autres" ;
+ Text [ dutch ] = "D~iversen" ;
+ Text [ portuguese ] = "~Outros" ;
+ SubMenu = Menu
+ {
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = RID_INFINITY;
+ HelpId = HID_SMA_INFINITY;
+ Text = "infinity";
+ };
+ MenuItem
+ {
+ Identifier = RID_PARTIAL;
+ HelpId = HID_SMA_PARTIAL;
+ Text = "partial";
+ };
+ MenuItem
+ {
+ Identifier = RID_NABLA;
+ HelpId = HID_SMA_NABLA;
+ Text = "nabla";
+ };
+ MenuItem
+ {
+ Identifier = RID_EXISTS;
+ HelpId = HID_SMA_EXISTS;
+ Text = "exists";
+ };
+ MenuItem
+ {
+ Identifier = RID_FORALL;
+ HelpId = HID_SMA_FORALL;
+ Text = "forall";
+ };
+ MenuItem
+ {
+ Identifier = RID_HBAR;
+ HelpId = HID_SMA_HBAR;
+ Text = "hbar";
+ };
+ MenuItem
+ {
+ Identifier = RID_LAMBDABAR;
+ HelpId = HID_SMA_LAMBDABAR;
+ Text = "lambdabar";
+ };
+ MenuItem
+ {
+ Identifier = RID_RE;
+ HelpId = HID_SMA_RE;
+ Text = "Re";
+ };
+ MenuItem
+ {
+ Identifier = RID_IM;
+ HelpId = HID_SMA_IM;
+ Text = "Im";
+ };
+ MenuItem
+ {
+ Identifier = RID_WP;
+ HelpId = HID_SMA_WP;
+ Text = "wp";
+ };
+ MenuItem
+ {
+ Separator = TRUE;
+ };
+ MenuItem
+ {
+ Identifier = RID_LEFTARROW;
+ HelpId = HID_SMA_LEFTARROW;
+ Text = "leftarrow";
+ };
+ MenuItem
+ {
+ Identifier = RID_RIGHTARROW;
+ HelpId = HID_SMA_RIGHTARROW;
+ Text = "rightarrow";
+ };
+ MenuItem
+ {
+ Identifier = RID_UPARROW;
+ HelpId = HID_SMA_UPARROW;
+ Text = "uparrow";
+ };
+ MenuItem
+ {
+ Identifier = RID_DOWNARROW;
+ HelpId = HID_SMA_DOWNARROW;
+ Text = "downarrow";
+ };
+ MenuItem
+ {
+ Separator = TRUE;
+ };
+ MenuItem
+ {
+ Identifier = RID_DOTSLOW;
+ HelpId = HID_SMA_DOTSLOW;
+ Text = "dotslow";
+ };
+ MenuItem
+ {
+ Identifier = RID_DOTSAXIS;
+ HelpId = HID_SMA_DOTSAXIS;
+ Text = "dotsaxis";
+ };
+ MenuItem
+ {
+ Identifier = RID_DOTSVERT;
+ HelpId = HID_SMA_DOTSVERT;
+ Text = "dotsvert";
+ };
+ MenuItem
+ {
+ Identifier = RID_DOTSUP;
+ HelpId = HID_SMA_DOTSUP;
+ Text = "dotsup";
+ };
+ MenuItem
+ {
+ Identifier = RID_DOTSDOWN;
+ HelpId = HID_SMA_DOTSDOWN;
+ Text = "dotsdown";
+ };
+ };
+ };
+ Text[ chinese_simplified ] = "其他";
+ Text[ russian ] = "橡铟邋";
+ Text[ polish ] = "R罂ne";
+ Text[ japanese ] = "偦偺懠";
+ Text[ chinese_traditional ] = "ㄤ";
+ Text[ dutch ] = "D~iversen";
+ Text[ chinese_simplified ] = "其他";
+ Text[ greek ] = "~拈荟锺";
+ Text[ korean ] = "扁鸥(~O)";
+ Text[ arabic ] = "闱 谙 嗅";
+ Text[ turkish ] = "Di餰r";
+ Text[ language_user1 ] = " ";
+ };
+ };
+};
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/starmath/source/config.cxx b/starmath/source/config.cxx
new file mode 100644
index 000000000000..2a26b23275c3
--- /dev/null
+++ b/starmath/source/config.cxx
@@ -0,0 +1,381 @@
+/*************************************************************************
+ *
+ * $RCSfile: config.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:57:26 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#pragma hdrstop
+
+#ifndef _SFXITEMSET_HXX //autogen
+#include <svtools/itemset.hxx>
+#endif
+#ifndef _SFXHINT_HXX //autogen
+#include <svtools/hint.hxx>
+#endif
+#ifndef _SFXSMPLHINT_HXX //autogen
+#include <svtools/smplhint.hxx>
+#endif
+#ifndef _SFX_INIMGR_HXX //autogen
+#include <sfx2/inimgr.hxx>
+#endif
+#ifndef _SFXSIDS_HRC //autogen
+#include <sfx2/sfxsids.hrc>
+#endif
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _SFXITEMPOOL_HXX //autogen
+#include <svtools/itempool.hxx>
+#endif
+#ifndef _SFXSTRITEM_HXX //autogen
+#include <svtools/stritem.hxx>
+#endif
+#ifndef _SFXINTITEM_HXX //autogen
+#include <svtools/intitem.hxx>
+#endif
+
+
+#ifndef CONFIG_HXX
+#include "config.hxx"
+#endif
+#ifndef FORMAT_HXX
+#include "format.hxx"
+#endif
+#ifndef _SMMOD_HXX
+#include "smmod.hxx"
+#endif
+#ifndef _STARMATH_HRC
+#include "starmath.hrc"
+#endif
+
+#define DEFSYMFILE "starmath$(lang).sms"
+#define CONFIGVERSION (INT16)0x0001;
+
+
+SmConfig::SmConfig() :
+ SfxConfigItem(SMCONFIGITEM)
+{
+ UseDefault();
+ StartListening(aStandardFormat);
+}
+
+
+SmConfig::~SmConfig()
+{
+ EndListening(aStandardFormat);
+}
+
+
+void SmConfig::SFX_NOTIFY(SfxBroadcaster &, const TypeId &,
+ const SfxHint &rHint, const TypeId &)
+{
+ switch (((SfxSimpleHint &) rHint).GetId())
+ {
+ case HINT_FORMATCHANGED:
+ SetModified(TRUE);
+ SetDefault (FALSE);
+ break;
+ }
+}
+
+
+void SmConfig::ConfigChangedAction()
+{
+ SetModified(TRUE);
+ SetDefault(FALSE);
+ //Broadcast(SfxSimpleHint(HINT_CONFIGCHANGED));
+}
+
+
+void SmConfig::SetValueIfNE(BOOL &rItem, const BOOL bVal)
+ // "Set 'Modified' and 'Value' if not equal"
+{
+ if (rItem != bVal)
+ { rItem = bVal;
+ ConfigChangedAction();
+ }
+}
+
+
+void SmConfig::SetSymbolFile(const String &rText)
+{
+ if (aSymbolFile != rText)
+ {
+ aSymbolFile = rText;
+ ConfigChangedAction();
+ }
+}
+
+
+int SmConfig::Load(SvStream &rStream)
+{
+ // Da die Fileformat Version in ConfigItems nur einen Defaultwert hat setzen
+ // wir diesen hier auf die aktuelle Version, damit beim folgenden (impliziten)
+ // einlesen des 'SmFormat' Objekts aus dem Stream dieses entsprechend
+ // reagieren kann.
+ rStream.SetVersion(SOFFICE_FILEFORMAT_NOW);
+
+ rStream >> *this;
+ SetDefault(FALSE);
+ return SfxConfigItem::ERR_OK;
+}
+
+
+BOOL SmConfig::Store(SvStream &rStream)
+{
+ rStream << *this;
+ return TRUE;
+}
+
+/**************************************************************************/
+
+void SmConfig::UseDefault()
+{
+ SfxConfigItem::UseDefault(); // this implicitly calls 'SetDefault(TRUE)'
+
+ bToolBoxVisible = bCmdBoxWindow = bAutoRedraw = bFormulaCursor =
+ bPrintTitle = bPrintText = bPrintFrame = bWarnNoSymbols =
+ bNoRightSpaces = TRUE;
+
+ aSymbolFile = C2S(DEFSYMFILE);
+ SfxIniManager* pIniMgr = SFX_INIMANAGER();
+ pIniMgr->SearchFile( aSymbolFile, SFX_KEY_USERCONFIG_PATH );
+
+ ePrintSize = PRINT_SIZE_NORMAL;
+ nPrintZoom = 100;
+}
+
+/**************************************************************************/
+
+String SmConfig::GetName() const
+{
+ return C2S("StarMath");
+}
+
+/**************************************************************************/
+
+void SmConfig::ItemSetToConfig(const SfxItemSet &rSet)
+{
+ const SfxPoolItem *pItem = NULL;
+ BOOL bModified = FALSE;
+ String aSymbolFile;
+
+ if (rSet.GetItemState(SID_SYMBOLFILE, TRUE, &pItem) == SFX_ITEM_SET)
+ { aSymbolFile = ((const SfxStringItem *) pItem)->GetValue();
+ DBG_ASSERT(aSymbolFile.Len() > 0, "Symboldatei nicht angegeben !");
+
+ if (aSymbolFile != aSymbolFile)
+ {
+ SfxModule *p = SM_MOD1();
+ SmModule *pp = (SmModule *) p;
+
+ pp->GetConfig()->SetWarnNoSymbols(TRUE);
+ aSymbolFile = aSymbolFile;
+
+ bModified = TRUE;
+ }
+ }
+
+ UINT16 nU16;
+ if (rSet.GetItemState(SID_PRINTSIZE, TRUE, &pItem) == SFX_ITEM_SET)
+ { nU16 = ((const SfxUInt16Item *) pItem)->GetValue();
+ if (ePrintSize != nU16)
+ { ePrintSize = (SmPrintSize) nU16;
+ bModified = TRUE;
+ }
+ }
+ if (rSet.GetItemState(SID_PRINTZOOM, TRUE, &pItem) == SFX_ITEM_SET)
+ { nU16 = ((const SfxUInt16Item *) pItem)->GetValue();
+ if (nPrintZoom != nU16)
+ { nPrintZoom = (USHORT) nU16;
+ bModified = TRUE;
+ }
+ }
+
+ BOOL bVal;
+ if (rSet.GetItemState(SID_PRINTTITLE, TRUE, &pItem) == SFX_ITEM_SET)
+ { bVal = ((const SfxBoolItem *) pItem)->GetValue();
+ if (bPrintTitle != bVal)
+ { bPrintTitle = bVal;
+ bModified = TRUE;
+ }
+ }
+ if (rSet.GetItemState(SID_PRINTTEXT, TRUE, &pItem) == SFX_ITEM_SET)
+ { bVal = ((const SfxBoolItem *) pItem)->GetValue();
+ if (bPrintText != bVal)
+ { bPrintText = bVal;
+ bModified = TRUE;
+ }
+ }
+ if (rSet.GetItemState(SID_PRINTFRAME, TRUE, &pItem) == SFX_ITEM_SET)
+ { bVal = ((const SfxBoolItem *) pItem)->GetValue();
+ if (bPrintFrame != bVal)
+ { bPrintFrame = bVal;
+ bModified = TRUE;
+ }
+ }
+ if (rSet.GetItemState(SID_AUTOREDRAW, TRUE, &pItem) == SFX_ITEM_SET)
+ { bVal = ((const SfxBoolItem *) pItem)->GetValue();
+ if (bAutoRedraw != bVal)
+ { bAutoRedraw = bVal;
+ bModified = TRUE;
+ }
+ }
+ if (rSet.GetItemState(SID_NO_RIGHT_SPACES, TRUE, &pItem) == SFX_ITEM_SET)
+ { bVal = ((const SfxBoolItem *) pItem)->GetValue();
+ if (bNoRightSpaces != bVal)
+ { bNoRightSpaces = bVal;
+ bModified = TRUE;
+
+ // (angezeigte) Formeln m黶sen entsprechen neu formatiert werden.
+ // Das erreichen wir mit:
+ Broadcast(SfxSimpleHint(HINT_FORMATCHANGED));
+ }
+ }
+
+ if (bModified)
+ ConfigChangedAction();
+}
+
+
+void SmConfig::ConfigToItemSet(SfxItemSet &rSet) const
+{
+ const SfxItemPool *pPool = rSet.GetPool();
+
+ rSet.Put(SfxStringItem(pPool->GetWhich(SID_SYMBOLFILE),
+ aSymbolFile));
+
+ rSet.Put(SfxUInt16Item(pPool->GetWhich(SID_PRINTSIZE),
+ (UINT16) ePrintSize));
+ rSet.Put(SfxUInt16Item(pPool->GetWhich(SID_PRINTZOOM),
+ (UINT16) nPrintZoom));
+
+ rSet.Put(SfxBoolItem(pPool->GetWhich(SID_PRINTTITLE), bPrintTitle));
+ rSet.Put(SfxBoolItem(pPool->GetWhich(SID_PRINTTEXT), bPrintText));
+ rSet.Put(SfxBoolItem(pPool->GetWhich(SID_PRINTFRAME), bPrintFrame));
+ rSet.Put(SfxBoolItem(pPool->GetWhich(SID_AUTOREDRAW), bAutoRedraw));
+ rSet.Put(SfxBoolItem(pPool->GetWhich(SID_NO_RIGHT_SPACES), bNoRightSpaces));
+}
+
+
+/**************************************************************************/
+
+
+SvStream & operator << (SvStream &rStream, const SmConfig &rConfig)
+{
+ rStream << CONFIGVERSION;
+
+ UINT16 nFlags = rConfig.bPrintTitle
+ | (rConfig.bPrintText << 1)
+ | (rConfig.bPrintFrame << 2)
+ | (rConfig.bWarnNoSymbols << 3)
+ | (rConfig.bToolBoxVisible << 4)
+ | (rConfig.bCmdBoxWindow << 5)
+ | (rConfig.bAutoRedraw << 6)
+ | (rConfig.bFormulaCursor << 7)
+ | (rConfig.bNoRightSpaces << 8);
+
+ rStream << nFlags;
+
+ rStream << (INT16) rConfig.ePrintSize;
+ rStream << (INT16) rConfig.nPrintZoom;
+
+ rStream.WriteByteString(rConfig.aSymbolFile, gsl_getSystemTextEncoding());
+ rStream << rConfig.aStandardFormat;
+
+ for (int i = 0; i < 7; i++)
+ rStream << rConfig.vFontPickList[i];
+
+ return rStream;
+}
+
+
+SvStream & operator >> (SvStream &rStream, SmConfig &rConfig)
+{
+ INT16 nVer;
+ rStream >> nVer;
+
+ UINT16 nFlags;
+ rStream >> nFlags;
+
+ rConfig.bPrintTitle = nFlags & 0x01;
+ rConfig.bPrintText = (nFlags >> 1) & 0x01;
+ rConfig.bPrintFrame = (nFlags >> 2) & 0x01;
+ rConfig.bWarnNoSymbols = (nFlags >> 3) & 0x01;
+ rConfig.bToolBoxVisible = (nFlags >> 4) & 0x01;
+ rConfig.bCmdBoxWindow = (nFlags >> 5) & 0x01;
+ rConfig.bAutoRedraw = (nFlags >> 6) & 0x01;
+ rConfig.bFormulaCursor = (nFlags >> 7) & 0x01;
+ rConfig.bNoRightSpaces = (nFlags >> 8) & 0x01;
+
+ INT16 nI16;
+ rStream >> nI16;
+ rConfig.ePrintSize = (SmPrintSize) nI16;
+ rStream >> nI16;
+ rConfig.nPrintZoom = (USHORT) nI16;
+
+ rStream.ReadByteString(rConfig.aSymbolFile, gsl_getSystemTextEncoding());
+ rStream >> rConfig.aStandardFormat;
+
+ for (int i = 0; i < 7; i++)
+ rStream >> rConfig.vFontPickList[i];
+
+ return rStream;
+}
+
+
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
new file mode 100644
index 000000000000..056103b3c61b
--- /dev/null
+++ b/starmath/source/dialog.cxx
@@ -0,0 +1,2405 @@
+/*************************************************************************
+ *
+ * $RCSfile: dialog.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:57:26 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#pragma hdrstop
+
+#define SMDLL 1
+
+#ifndef _TOOLS_RCID_H
+#include "tools/rcid.h"
+#endif
+
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _SFXINTITEM_HXX //autogen
+#include <svtools/intitem.hxx>
+#endif
+#ifndef _IODLG_HXX
+#include <sfx2/iodlg.hxx>
+#endif
+#ifndef _SFXSTRITEM_HXX //autogen
+#include <svtools/stritem.hxx>
+#endif
+#ifndef _SFXAPP_HXX //autogen
+#include <sfx2/app.hxx>
+#endif
+#ifndef _SV_MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _CTRLTOOL_HXX //autogen
+#include <svtools/ctrltool.hxx>
+#endif
+#ifndef _SFX_PRINTER_HXX
+#include <sfx2/printer.hxx>
+#endif
+#ifndef _SV_SOUND_HXX //autogen
+#include <vcl/sound.hxx>
+#endif
+#ifndef _SV_SNDSTYLE_HXX //autogen
+#include <vcl/sndstyle.hxx>
+#endif
+#ifndef _SV_WAITOBJ_HXX
+#include <vcl/waitobj.hxx>
+#endif
+#ifndef _SFXDISPATCH_HXX //autogen
+#include <sfx2/dispatch.hxx>
+#endif
+#ifndef _SFX_HRC //autogen
+#include <sfx2/sfx.hrc>
+#endif
+#ifndef _STRING_HXX //autogen
+#include <tools/string.hxx>
+#endif
+#ifndef _TOOLS_DEBUG_HXX //autogen
+#include <tools/debug.hxx>
+#endif
+
+
+#ifndef CONFIG_HXX
+#include "config.hxx"
+#endif
+#ifndef DIALOG_HXX
+#include "dialog.hxx"
+#endif
+#ifndef _STARMATH_HRC
+#include "starmath.hrc"
+#endif
+#ifndef _SMMOD_HXX
+#include "smmod.hxx"
+#endif
+#ifndef SYMBOL_HXX
+#include "symbol.hxx"
+#endif
+#ifndef VIEW_HXX
+#include "view.hxx"
+#endif
+#ifndef DOCUMENT_HXX
+#include "document.hxx"
+#endif
+
+////////////////////////////////////////
+//
+// Da der FontStyle besser 黚er die Attribute gesetzt/abgefragt wird als 黚er
+// den StyleName bauen wir uns hier unsere eigene 躡ersetzung
+// Attribute <-> StyleName
+// Die Bits des Index stellen die Attribute dar:
+// Bit 0 : italic
+// Bit 1 : bold
+//
+
+static XubString __READONLY_DATA aStyleName[4] =
+{
+ C2S("normal"), C2S("italic"),
+ C2S("bold"), C2S("bold italic")
+};
+
+USHORT aStyleNameCount = sizeof(aStyleName) / sizeof(aStyleName[0]);
+
+
+const XubString GetFontStyleName(const Font &rFont)
+{
+ USHORT nIndex = 2 * (rFont.GetWeight() == WEIGHT_BOLD)
+ + 1 * (rFont.GetItalic() == ITALIC_NORMAL);
+ return aStyleName[nIndex];
+}
+
+
+void SetFontStyle(const XubString &rStyleName, Font &rFont)
+{
+ // finden des Index passend zum StyleName fuer den leeren StyleName wird
+ // 0 (nicht bold nicht italic) angenommen.
+ USHORT nIndex = 0;
+ if (rStyleName.Len())
+ {
+ USHORT i;
+ for (i = 0; i < aStyleNameCount; i++)
+ if (rStyleName.CompareTo(aStyleName[i]) == COMPARE_EQUAL)
+ break;
+ DBG_ASSERT(i < aStyleNameCount, "Sm : StyleName unbekannt");
+ nIndex = i;
+ }
+
+ rFont.SetItalic((nIndex & 0x1) ? ITALIC_NORMAL : ITALIC_NONE);
+ rFont.SetWeight((nIndex & 0x2) ? WEIGHT_BOLD : WEIGHT_NORMAL);
+}
+
+
+/**************************************************************************/
+
+SmAboutDialog::SmAboutDialog(Window *pParent, BOOL bFreeRes) :
+ ModalDialog (pParent, SmResId(RID_DEFAULTABOUT)),
+ aFixedText1 (this, ResId(1)),
+ aFixedText2 (this, ResId(2)),
+ aFixedText3 (this, ResId(3)),
+ aFixedText4 (this, ResId(4)),
+ aFixedText5 (this, ResId(5)),
+ aFixedText6 (this, ResId(6)),
+ aReleaseText (this, ResId(7)),
+ aFixedBitmap1(this, ResId(1)),
+ aOKButton1 (this, ResId(1))
+{
+ if (bFreeRes)
+ FreeResource();
+
+#ifndef PRODUCT
+ aReleaseText.Show();
+#else
+ aReleaseText.Hide();
+#endif
+
+}
+
+/**************************************************************************/
+
+
+IMPL_LINK_INLINE_START( SmPrintOptionsTabPage, SizeButtonClickHdl, Button *, pButton )
+{
+ aZoom.Enable(aSizeZoomed.IsChecked());
+ return 0;
+}
+IMPL_LINK_INLINE_END( SmPrintOptionsTabPage, SizeButtonClickHdl, Button *, pButton )
+
+
+SmPrintOptionsTabPage::SmPrintOptionsTabPage(Window *pParent, const SfxItemSet &rOptions)
+ : SfxTabPage(pParent, SmResId(RID_PRINTOPTIONPAGE), rOptions),
+ aGroupBox1 (this, ResId(1)),
+ aTitle (this, ResId(1)),
+ aText (this, ResId(2)),
+ aFrame (this, ResId(3)),
+ aGroupBox3 (this, ResId(3)),
+ aNoRightSpaces (this, ResId(4)),
+ aGroupBox2 (this, ResId(2)),
+ aSizeNormal (this, ResId(1)),
+ aSizeScaled (this, ResId(2)),
+ aSizeZoomed (this, ResId(3)),
+ aZoom (this, ResId(1))
+{
+ FreeResource();
+
+ aSizeNormal.SetClickHdl(LINK(this, SmPrintOptionsTabPage, SizeButtonClickHdl));
+ aSizeScaled.SetClickHdl(LINK(this, SmPrintOptionsTabPage, SizeButtonClickHdl));
+ aSizeZoomed.SetClickHdl(LINK(this, SmPrintOptionsTabPage, SizeButtonClickHdl));
+
+ Reset(rOptions);
+}
+
+
+BOOL SmPrintOptionsTabPage::FillItemSet(SfxItemSet& rSet)
+{
+ UINT16 nPrintSize;
+ if (aSizeNormal.IsChecked())
+ nPrintSize = PRINT_SIZE_NORMAL;
+ else if (aSizeScaled.IsChecked())
+ nPrintSize = PRINT_SIZE_SCALED;
+ else
+ nPrintSize = PRINT_SIZE_ZOOMED;
+
+ rSet.Put(SfxUInt16Item(GetWhich(SID_PRINTSIZE), (UINT16) nPrintSize));
+ rSet.Put(SfxUInt16Item(GetWhich(SID_PRINTZOOM), (UINT16) aZoom.GetValue()));
+ rSet.Put(SfxBoolItem(GetWhich(SID_PRINTTITLE), aTitle.IsChecked()));
+ rSet.Put(SfxBoolItem(GetWhich(SID_PRINTTEXT), aText.IsChecked()));
+ rSet.Put(SfxBoolItem(GetWhich(SID_PRINTFRAME), aFrame.IsChecked()));
+ rSet.Put(SfxBoolItem(GetWhich(SID_NO_RIGHT_SPACES), aNoRightSpaces.IsChecked()));
+
+ return TRUE;
+}
+
+
+void SmPrintOptionsTabPage::Reset(const SfxItemSet& rSet)
+{
+ SmPrintSize ePrintSize = (SmPrintSize)((const SfxUInt16Item &)rSet.Get(GetWhich(SID_PRINTSIZE))).GetValue();
+
+ aSizeNormal.Check(ePrintSize == PRINT_SIZE_NORMAL);
+ aSizeScaled.Check(ePrintSize == PRINT_SIZE_SCALED);
+ aSizeZoomed.Check(ePrintSize == PRINT_SIZE_ZOOMED);
+
+ aZoom.Enable(aSizeZoomed.IsChecked());
+
+ aZoom.SetValue(((const SfxUInt16Item &)rSet.Get(GetWhich(SID_PRINTZOOM))).GetValue());
+
+ aTitle.Check(((const SfxBoolItem &)rSet.Get(GetWhich(SID_PRINTTITLE))).GetValue());
+ aText.Check(((const SfxBoolItem &)rSet.Get(GetWhich(SID_PRINTTEXT))).GetValue());
+ aFrame.Check(((const SfxBoolItem &)rSet.Get(GetWhich(SID_PRINTFRAME))).GetValue());
+ aNoRightSpaces.Check(((const SfxBoolItem &)rSet.Get(GetWhich(SID_NO_RIGHT_SPACES))).GetValue());
+}
+
+
+SfxTabPage* SmPrintOptionsTabPage::Create(Window* pWindow, const SfxItemSet& rSet)
+{
+ return (new SmPrintOptionsTabPage(pWindow, rSet));
+}
+
+/**************************************************************************/
+
+
+#ifdef NEVER
+SmExtraOptionsTabPage::SmExtraOptionsTabPage(const SfxItemSet& rInSet, Window * pParent, BOOL bFreeRes)
+ : SfxTabPage(pParent, SmResId(RID_EXTRAOPTIONPAGE), rInSet),
+ aAutoRedraw (this, ResId(1)),
+ aFixedText1 (this, ResId(1)),
+ aSymbolFile (this, ResId(2), 32),
+ aBrowseButton (this, ResId(1))
+{
+ if (bFreeRes)
+ FreeResource();
+
+ aBrowseButton.SetClickHdl(LINK(this, SmExtraOptionsTabPage, SymClickHdl));
+}
+
+
+IMPL_LINK( SmExtraOptionsTabPage, SymClickHdl, PushButton *, pPushButton )
+{
+ SfxSimpleFileDialog *pFileDialog =
+ new SfxSimpleFileDialog(this, WinBits(WB_OPEN | WB_3DLOOK));
+
+#ifdef MAC
+ pFileDialog->AddFilter(SmResId(RID_SYMBOLFILESSTR), SmResId(RID_FILESYMTYP));
+ pFileDialog->AddFilter(SmResId(RID_ALLFILESSTR), "****");
+
+ pFileDialog->SetCurFilter(SmResId(RID_SYMBOLFILESSTR));
+#else
+ pFileDialog->AddFilter(SmResId(RID_SYMBOLFILESSTR), C2S("*.sms"));
+ pFileDialog->AddFilter(SmResId(RID_ALLFILESSTR), C2S("*.*"));
+
+ pFileDialog->SetCurFilter(SmResId(RID_SYMBOLFILESSTR));
+
+ pFileDialog->SetDefaultExt(C2S("*.sms"));
+#endif
+
+ pFileDialog->SetPath(aSymbolFile.GetText());
+
+ if (pFileDialog->Execute() == RET_OK)
+ aSymbolFile.SetText(pFileDialog->GetPath());
+
+ delete pFileDialog;
+ return 0;
+}
+
+
+BOOL SmExtraOptionsTabPage::FillItemSet(SfxItemSet& rOutSet)
+{
+ rOutSet.Put(SfxBoolItem(GetWhich(SID_AUTOREDRAW), aAutoRedraw.IsChecked()));
+ rOutSet.Put(SfxStringItem(GetWhich(SID_SYMBOLFILE), aSymbolFile.GetText()));
+
+ return (TRUE);
+}
+
+
+void SmExtraOptionsTabPage::Reset(const SfxItemSet& rOutSet)
+{
+ aAutoRedraw.Check(((const SfxBoolItem&)rOutSet.Get(GetWhich(SID_AUTOREDRAW))).GetValue());
+ aSymbolFile.SetText(((const SfxStringItem&)rOutSet.Get(GetWhich(SID_SYMBOLFILE))).GetValue());
+}
+
+
+SfxTabPage* SmExtraOptionsTabPage::Create(Window* pWindow, const SfxItemSet& rSet)
+{
+ return (new SmExtraOptionsTabPage(rSet, pWindow));
+}
+#endif //NEVER
+
+/**************************************************************************/
+
+
+void SmShowFont::Paint(const Rectangle&)
+{
+ XubString Text (GetFont().GetName());
+ Size TextSize(GetTextWidth(Text), GetTextHeight());
+
+ DrawText(Point((GetOutputSize().Width() - TextSize.Width()) / 2,
+ (GetOutputSize().Height() - TextSize.Height()) / 2), Text);
+}
+
+
+void SmShowFont::SetFont(const Font& rFont)
+{
+ Font aFont (rFont);
+
+ Invalidate();
+ aFont.SetSize(Size(0, 24));
+ aFont.SetAlign(ALIGN_TOP);
+ Control::SetFont(aFont);
+}
+
+
+IMPL_LINK_INLINE_START( SmFontDialog, FontChangeHdl, ComboBox *, pComboBox )
+{
+ Face.SetName(pComboBox->GetText());
+ aShowFont.SetFont(Face);
+ return 0;
+}
+IMPL_LINK_INLINE_END( SmFontDialog, FontChangeHdl, ComboBox *, pComboBox )
+
+
+IMPL_LINK( SmFontDialog, AttrChangeHdl, CheckBox *, pCheckBox )
+{
+ if (aBoldCheckBox.IsChecked())
+ Face.SetWeight(FontWeight(WEIGHT_BOLD));
+ else
+ Face.SetWeight(FontWeight(WEIGHT_NORMAL));
+
+ if (aItalicCheckBox.IsChecked())
+ Face.SetItalic(ITALIC_NORMAL);
+ else
+ Face.SetItalic(ITALIC_NONE);
+
+ aShowFont.SetFont(Face);
+ return 0;
+}
+
+
+void SmFontDialog::SetFont(const Font &rFont)
+{
+ Face = rFont;
+
+ aFontBox.SetText(Face.GetName());
+ aBoldCheckBox.Check(Face.GetWeight() == WEIGHT_BOLD);
+ aItalicCheckBox.Check(Face.GetItalic() != ITALIC_NONE);
+
+ aShowFont.SetFont(Face);
+}
+
+
+SmFontDialog::SmFontDialog(Window * pParent, BOOL bFreeRes)
+ : ModalDialog(pParent,SmResId(RID_FONTDIALOG)),
+ aFixedText1 (this, ResId(1)),
+ aFontBox (this, ResId(1)),
+ aBoldCheckBox (this, ResId(1)),
+ aItalicCheckBox (this, ResId(2)),
+ aOKButton1 (this, ResId(1)),
+ aCancelButton1 (this, ResId(1)),
+ aShowFont (this, ResId(1)),
+ aGroupBox1 (this, ResId(1)),
+ aGroupBox2 (this, ResId(2))
+{
+ if (bFreeRes)
+ FreeResource();
+
+ {
+ WaitObject( this );
+ //Application::EnterWait();
+
+ // get FontList from printer (if possible), otherwise from application window
+ SmViewShell *pView = SmGetActiveView();
+ DBG_ASSERT(pView, "Sm : NULL pointer");
+ OutputDevice *pDev = pView->GetDoc()->GetPrinter();
+ if (!pDev || pDev->GetDevFontCount() == 0)
+ pDev = &pView->GetGraphicWindow();
+ FontList aFontList(pDev);
+
+ USHORT nCount = aFontList.GetFontNameCount();
+ for (USHORT i = 0; i < nCount; i++)
+ aFontBox.InsertEntry( aFontList.GetFontName(i).GetName() );
+
+ Face.SetSize(Size(0, 24));
+ Face.SetWeight(WEIGHT_NORMAL);
+ Face.SetItalic(ITALIC_NONE);
+ Face.SetFamily(FAMILY_DONTKNOW);
+ Face.SetPitch(PITCH_DONTKNOW);
+ Face.SetCharSet(RTL_TEXTENCODING_DONTKNOW);
+ Face.SetTransparent(TRUE);
+
+ aShowFont.SetFillColor( Color(COL_LIGHTGRAY) );
+
+ //Application::LeaveWait();
+ }
+
+ aFontBox.SetSelectHdl(LINK(this, SmFontDialog, FontChangeHdl));
+ aBoldCheckBox.SetClickHdl(LINK(this, SmFontDialog, AttrChangeHdl));
+ aItalicCheckBox.SetClickHdl(LINK(this, SmFontDialog, AttrChangeHdl));
+}
+
+/**************************************************************************/
+
+
+IMPL_LINK( SmFontSizeDialog, DefaultButtonClickHdl, Button *, pButton )
+{
+ QueryBox *pQueryBox = new QueryBox(this, SmResId(RID_DEFAULTSAVEQUERY));
+
+ if (pQueryBox->Execute() == RET_YES)
+ {
+ SmModule *pp = SM_MOD1();
+ WriteTo(pp->GetConfig()->GetFormat());
+ }
+
+ delete pQueryBox;
+ return 0;
+}
+
+
+SmFontSizeDialog::SmFontSizeDialog(Window * pParent, BOOL bFreeRes)
+ : ModalDialog(pParent, SmResId(RID_FONTSIZEDIALOG)),
+ aFixedText1(this, ResId(1)),
+ aBaseSize(this, ResId(1)),
+ aFixedText4(this, ResId(4)),
+ aTextSize(this, ResId(4)),
+ aFixedText5(this, ResId(5)),
+ aIndexSize(this, ResId(5)),
+ aFixedText6(this, ResId(6)),
+ aFunctionSize(this, ResId(6)),
+ aFixedText7(this, ResId(7)),
+ aOperatorSize(this, ResId(7)),
+ aFixedText8(this, ResId(8)),
+ aBorderSize(this, ResId(8)),
+ aGroupBox1(this, ResId(1)),
+ aOKButton1(this, ResId(1)),
+ aCancelButton1(this, ResId(1)),
+ aDefaultButton(this, ResId(1))
+{
+ if (bFreeRes)
+ FreeResource();
+
+ aDefaultButton.SetClickHdl(LINK(this, SmFontSizeDialog, DefaultButtonClickHdl));
+}
+
+
+void SmFontSizeDialog::ReadFrom(const SmFormat &rFormat)
+{
+ //! aufpassen: richtig runden!
+ aBaseSize.SetValue( SmRoundFraction(
+ Sm100th_mmToPts( rFormat.GetBaseSize().Height() ) ) );
+
+ aTextSize .SetValue( rFormat.GetRelSize(SIZ_TEXT) );
+ aIndexSize .SetValue( rFormat.GetRelSize(SIZ_INDEX) );
+ aFunctionSize.SetValue( rFormat.GetRelSize(SIZ_FUNCTION) );
+ aOperatorSize.SetValue( rFormat.GetRelSize(SIZ_OPERATOR) );
+ aBorderSize .SetValue( rFormat.GetRelSize(SIZ_LIMITS) );
+}
+
+
+void SmFontSizeDialog::WriteTo(SmFormat &rFormat) const
+{
+ rFormat.SetBaseSize( Size(0, SmPtsTo100th_mm(aBaseSize.GetValue())) );
+
+ rFormat.SetRelSize(SIZ_TEXT, (USHORT) aTextSize .GetValue());
+ rFormat.SetRelSize(SIZ_INDEX, (USHORT) aIndexSize .GetValue());
+ rFormat.SetRelSize(SIZ_FUNCTION, (USHORT) aFunctionSize.GetValue());
+ rFormat.SetRelSize(SIZ_OPERATOR, (USHORT) aOperatorSize.GetValue());
+ rFormat.SetRelSize(SIZ_LIMITS, (USHORT) aBorderSize .GetValue());
+
+ const Size aTmp (rFormat.GetBaseSize());
+ for (USHORT i = FNT_BEGIN; i <= FNT_END; i++)
+ rFormat.Font(i).SetSize(aTmp);
+
+ rFormat.RequestApplyChanges();
+}
+
+
+/**************************************************************************/
+
+
+IMPL_LINK( SmFontTypeDialog, MenuSelectHdl, Menu *, pMenu )
+{
+ SmFontPickListBox *pActiveListBox;
+
+ switch (pMenu->GetCurItemId())
+ {
+ case 1: pActiveListBox = &aVariableFont; break;
+ case 2: pActiveListBox = &aFunctionFont; break;
+ case 3: pActiveListBox = &aNumberFont; break;
+ case 4: pActiveListBox = &aTextFont; break;
+ case 5: pActiveListBox = &aSerifFont; break;
+ case 6: pActiveListBox = &aSansFont; break;
+ case 7: pActiveListBox = &aFixedFont; break;
+ default:pActiveListBox = NULL;
+ }
+
+ if (pActiveListBox)
+ {
+ SmFontDialog *pFontDialog = new SmFontDialog(this);
+
+ pActiveListBox->WriteTo(*pFontDialog);
+ if (pFontDialog->Execute() == RET_OK)
+ pActiveListBox->ReadFrom(*pFontDialog);
+ delete pFontDialog;
+ }
+ return 0;
+}
+
+
+IMPL_LINK_INLINE_START( SmFontTypeDialog, DefaultButtonClickHdl, Button *, pButton )
+{
+ QueryBox *pQueryBox = new QueryBox(this, SmResId(RID_DEFAULTSAVEQUERY));
+ if (pQueryBox->Execute() == RET_YES)
+ {
+ SmModule *pp = SM_MOD1();
+ WriteTo(pp->GetConfig()->GetFormat());
+ }
+
+ delete pQueryBox;
+ return 0;
+}
+IMPL_LINK_INLINE_END( SmFontTypeDialog, DefaultButtonClickHdl, Button *, pButton )
+
+
+SmFontTypeDialog::SmFontTypeDialog(Window * pParent, BOOL bFreeRes)
+ : ModalDialog(pParent, SmResId(RID_FONTTYPEDIALOG)),
+ aFixedText1 (this, ResId(1)),
+ aVariableFont (this, ResId(1)),
+ aFixedText2 (this, ResId(2)),
+ aFunctionFont (this, ResId(2)),
+ aFixedText3 (this, ResId(3)),
+ aNumberFont (this, ResId(3)),
+ aFixedText4 (this, ResId(4)),
+ aTextFont (this, ResId(4)),
+ aFixedText5 (this, ResId(5)),
+ aSerifFont (this, ResId(5)),
+ aFixedText6 (this, ResId(6)),
+ aSansFont (this, ResId(6)),
+ aFixedText7 (this, ResId(7)),
+ aFixedFont (this, ResId(7)),
+ aGroupBox1 (this, ResId(1)),
+ aGroupBox2 (this, ResId(2)),
+ aOKButton1 (this, ResId(1)),
+ aCancelButton1 (this, ResId(1)),
+ aMenuButton (this, ResId(1)),
+ aDefaultButton (this, ResId(2))
+{
+ if (bFreeRes)
+ FreeResource();
+
+ aDefaultButton.SetClickHdl(LINK(this, SmFontTypeDialog, DefaultButtonClickHdl));
+
+ aMenuButton.GetPopupMenu()->SetSelectHdl(LINK(this, SmFontTypeDialog, MenuSelectHdl));
+}
+
+void SmFontTypeDialog::ReadFrom(const SmFormat &rFormat)
+{
+ SmModule *pp = SM_MOD1();
+
+ aVariableFont = pp->GetConfig()->GetFontPickList(FNT_VARIABLE);
+ aFunctionFont = pp->GetConfig()->GetFontPickList(FNT_FUNCTION);
+ aNumberFont = pp->GetConfig()->GetFontPickList(FNT_NUMBER);
+ aTextFont = pp->GetConfig()->GetFontPickList(FNT_TEXT);
+ aSerifFont = pp->GetConfig()->GetFontPickList(FNT_SERIF);
+ aSansFont = pp->GetConfig()->GetFontPickList(FNT_SANS);
+ aFixedFont = pp->GetConfig()->GetFontPickList(FNT_FIXED);
+
+ aVariableFont.Insert( rFormat.GetFont(FNT_VARIABLE) );
+ aFunctionFont.Insert( rFormat.GetFont(FNT_FUNCTION) );
+ aNumberFont .Insert( rFormat.GetFont(FNT_NUMBER) );
+ aTextFont .Insert( rFormat.GetFont(FNT_TEXT) );
+ aSerifFont .Insert( rFormat.GetFont(FNT_SERIF) );
+ aSansFont .Insert( rFormat.GetFont(FNT_SANS) );
+ aFixedFont .Insert( rFormat.GetFont(FNT_FIXED) );
+}
+
+
+void SmFontTypeDialog::WriteTo(SmFormat &rFormat) const
+{
+ SmModule *pp = SM_MOD1();
+
+ pp->GetConfig()->GetFontPickList(FNT_VARIABLE) = aVariableFont;
+ pp->GetConfig()->GetFontPickList(FNT_FUNCTION) = aFunctionFont;
+ pp->GetConfig()->GetFontPickList(FNT_NUMBER) = aNumberFont;
+ pp->GetConfig()->GetFontPickList(FNT_TEXT) = aTextFont;
+ pp->GetConfig()->GetFontPickList(FNT_SERIF) = aSerifFont;
+ pp->GetConfig()->GetFontPickList(FNT_SANS) = aSansFont;
+ pp->GetConfig()->GetFontPickList(FNT_FIXED) = aFixedFont;
+
+ rFormat.SetFont( FNT_VARIABLE, aVariableFont.Get(0) );
+ rFormat.SetFont( FNT_FUNCTION, aFunctionFont.Get(0) );
+ rFormat.SetFont( FNT_NUMBER, aNumberFont .Get(0) );
+ rFormat.SetFont( FNT_TEXT, aTextFont .Get(0) );
+ rFormat.SetFont( FNT_SERIF, aSerifFont .Get(0) );
+ rFormat.SetFont( FNT_SANS, aSansFont .Get(0) );
+ rFormat.SetFont( FNT_FIXED, aFixedFont .Get(0) );
+
+ for (USHORT i = FNT_BEGIN; i <= FNT_FIXED; i++)
+ rFormat.Font(i).SetTransparent(TRUE);
+
+ rFormat.RequestApplyChanges();
+}
+
+/**************************************************************************/
+
+struct FieldMinMax
+{
+ USHORT nMin, nMax;
+};
+
+// Data for min and max values of the 4 metric fields
+// for each of the 10 categories
+static const FieldMinMax pMinMaxData[10][4] =
+{
+ // 0
+ {{ 0, 200 }, { 0, 200 }, { 0, 100 }, { 0, 0 }},
+ // 1
+ {{ 0, 100 }, { 0, 100 }, { 0, 0 }, { 0, 0 }},
+ // 2
+ {{ 0, 100 }, { 0, 100 }, { 0, 0 }, { 0, 0 }},
+ // 3
+ {{ 0, 100 }, { 1, 100 }, { 0, 0 }, { 0, 0 }},
+ // 4
+ {{ 0, 100 }, { 0, 100 }, { 0, 0 }, { 0, 0 }},
+ // 5
+ {{ 0, 100 }, { 0, 100 }, { 0, 0 }, { 0, 100 }},
+ // 6
+ {{ 0, 300 }, { 0, 300 }, { 0, 0 }, { 0, 0 }},
+ // 7
+ {{ 0, 100 }, { 0, 100 }, { 0, 0 }, { 0, 0 }},
+ // 8
+ {{ 0, 100 }, { 0, 100 }, { 0, 0 }, { 0, 0 }},
+ // 9
+ {{ 0, 10000 }, { 0, 10000 }, { 0, 10000 }, { 0, 10000 }}
+};
+
+SmCategoryDesc::SmCategoryDesc(const ResId& rResId, USHORT nCategoryIdx) :
+ Resource(rResId)
+{
+ if (IsAvailableRes(ResId(1).SetRT(RSC_STRING)))
+ {
+ Name = XubString(ResId(1));
+
+ int i;
+ for (i = 0; i < 4; i++)
+ {
+ int nI2 = i + 2;
+
+ if (IsAvailableRes(ResId(nI2).SetRT(RSC_STRING)))
+ {
+ Strings[i] = new XubString(ResId(nI2));
+ Graphics[i] = new Bitmap(ResId(nI2));
+ }
+ else
+ {
+ Strings[i] = 0;
+ Graphics[i] = 0;
+ }
+ }
+
+ for (i = 0; i < 4; i++)
+ {
+ const FieldMinMax &rMinMax = pMinMaxData[ nCategoryIdx ][i];
+ Value[i] = Minimum[i] = rMinMax.nMin;
+ Maximum[i] = rMinMax.nMax;
+ }
+ }
+
+ FreeResource();
+}
+
+
+SmCategoryDesc::~SmCategoryDesc()
+{
+ for (int i = 0; i < 4; i++)
+ {
+ delete Strings[i];
+ delete Graphics[i];
+ }
+}
+
+/**************************************************************************/
+
+IMPL_LINK( SmDistanceDialog, GetFocusHdl, Control *, pControl )
+{
+ if (Categories[nActiveCategory])
+ {
+ USHORT i;
+
+ if (pControl == &aMetricField1)
+ i = 0;
+ else if (pControl == &aMetricField2)
+ i = 1;
+ else if (pControl == &aMetricField3)
+ i = 2;
+ else if (pControl == &aMetricField4)
+ i = 3;
+ else
+ return 0;
+ aBitmap.SetBitmap(*(Categories[nActiveCategory]->GetGraphic(i)));
+ }
+ return 0;
+}
+
+IMPL_LINK( SmDistanceDialog, MenuSelectHdl, Menu *, pMenu )
+{
+ SetCategory(pMenu->GetCurItemId() - 1);
+ return 0;
+}
+
+
+IMPL_LINK( SmDistanceDialog, DefaultButtonClickHdl, Button *, pButton )
+{
+ QueryBox *pQueryBox = new QueryBox(this, SmResId(RID_DEFAULTSAVEQUERY));
+
+ if (pQueryBox->Execute() == RET_YES)
+ {
+ SmModule *pp = SM_MOD1();
+ WriteTo(pp->GetConfig()->GetFormat());
+ }
+ delete pQueryBox;
+ return 0;
+}
+
+
+IMPL_LINK( SmDistanceDialog, CheckBoxClickHdl, CheckBox *, pCheckBox )
+{
+ if (pCheckBox == &aCheckBox1)
+ {
+ aCheckBox1.Toggle();
+
+ BOOL bChecked = aCheckBox1.IsChecked();
+ aFixedText4 .Enable( bChecked );
+ aMetricField4.Enable( bChecked );
+ }
+ return 0;
+}
+
+
+void SmDistanceDialog::SetHelpId(MetricField &rField, ULONG nHelpId)
+{
+ //! HelpID's die auf diese Weise explizit gesetzt werden, m黶sen im
+ //! util Verzeichnis im File "hidother.src" mit Hilfe von "hidspecial"
+ //! definiert werden!
+
+ const XubString aEmptyText;
+ DBG_ASSERT(aEmptyText.Len() == 0, "Sm: Ooops...");
+
+ rField.SetHelpId(nHelpId);
+ rField.SetHelpText(aEmptyText);
+
+ // since MetricField inherits from SpinField which has a sub Edit field
+ // (which is actually the one we modify) we have to set the help-id
+ // for it too.
+ Edit *pSubEdit = rField.GetSubEdit();
+ if (pSubEdit)
+ { pSubEdit->SetHelpId(nHelpId);
+ pSubEdit->SetHelpText(aEmptyText);
+ }
+}
+
+
+void SmDistanceDialog::SetCategory(USHORT nCategory)
+{
+ DBG_ASSERT(0 <= nCategory && nCategory < NOCATEGORIES,
+ "Sm: falsche Kategorienummer in SmDistanceDialog");
+
+ // array to convert category- and metricfield-number in help ids.
+ // 0 is used in case of unused combinations.
+ DBG_ASSERT(NOCATEGORIES == 10, "Sm : Array pa遲 nicht zu Anzahl der Kategorien");
+ ULONG __READONLY_DATA aCatMf2Hid[10][4] =
+ {
+ HID_SMA_DEFAULT_DIST, HID_SMA_LINE_DIST, HID_SMA_ROOT_DIST, 0,
+ HID_SMA_SUP_DIST, HID_SMA_SUB_DIST , 0, 0,
+ HID_SMA_NUMERATOR_DIST, HID_SMA_DENOMINATOR_DIST, 0, 0,
+ HID_SMA_FRACLINE_EXCWIDTH, HID_SMA_FRACLINE_LINEWIDTH, 0, 0,
+ HID_SMA_UPPERLIMIT_DIST, HID_SMA_LOWERLIMIT_DIST, 0, 0,
+ HID_SMA_BRACKET_EXCHEIGHT, HID_SMA_BRACKET_DIST, 0, HID_SMA_BRACKET_EXCHEIGHT2,
+ HID_SMA_MATRIXROW_DIST, HID_SMA_MATRIXCOL_DIST, 0, 0,
+ HID_SMA_ATTRIBUT_DIST, HID_SMA_INTERATTRIBUT_DIST, 0, 0,
+ HID_SMA_OPERATOR_EXCHEIGHT, HID_SMA_OPERATOR_DIST, 0, 0,
+ HID_SMA_LEFTBORDER_DIST, HID_SMA_RIGHTBORDER_DIST, HID_SMA_UPPERBORDER_DIST, HID_SMA_LOWERBORDER_DIST
+ };
+
+ // array to help iterate over the controls
+ Window * __READONLY_DATA aWin[4][2] =
+ {
+ &aFixedText1, &aMetricField1,
+ &aFixedText2, &aMetricField2,
+ &aFixedText3, &aMetricField3,
+ &aFixedText4, &aMetricField4
+ };
+
+ SmCategoryDesc *pCat;
+
+ // merken der (evtl neuen) Einstellungen der aktiven SmCategoryDesc
+ // bevor zu der neuen gewechselt wird.
+ if (nActiveCategory != CATEGORY_NONE)
+ {
+ pCat = Categories[nActiveCategory];
+ pCat->SetValue(0, (USHORT) aMetricField1.GetValue());
+ pCat->SetValue(1, (USHORT) aMetricField2.GetValue());
+ pCat->SetValue(2, (USHORT) aMetricField3.GetValue());
+ pCat->SetValue(3, (USHORT) aMetricField4.GetValue());
+
+ if (nActiveCategory == 5)
+ bScaleAllBrackets = aCheckBox1.IsChecked();
+
+ aMenuButton.GetPopupMenu()->CheckItem(nActiveCategory + 1, FALSE);
+ }
+
+ // aktivieren/deaktivieren der zugeh鰎igen Controls in Abh鋘gigkeit von der
+ // gew鋒lten Kategorie.
+ BOOL bActive;
+ for (int i = 0; i < 4; i++)
+ {
+ FixedText *pFT = (FixedText * const) aWin[i][0];
+ MetricField *pMF = (MetricField * const) aWin[i][1];
+
+ // Um feststellen welche Controls aktiv sein sollen wird das
+ // vorhandensein einer zugeh鰎igen HelpID 黚erpr黤t.
+ bActive = aCatMf2Hid[nCategory][i] != 0;
+
+ pFT->Show(bActive);
+ pFT->Enable(bActive);
+ pMF->Show(bActive);
+ pMF->Enable(bActive);
+
+ // setzen von Ma遝inheit und Anzahl der Nachkommastellen
+ FieldUnit eUnit;
+ USHORT nDigits;
+ if (nCategory < 9)
+ {
+ eUnit = FUNIT_CUSTOM;
+ nDigits = 0;
+ pMF->SetCustomUnitText( '%' );
+ }
+ else
+ {
+ eUnit = FUNIT_100TH_MM;
+ nDigits = 2;
+ }
+ pMF->SetUnit(eUnit); //! ver鋘dert den Wert
+ pMF->SetDecimalDigits(nDigits);
+
+ if (bActive)
+ {
+ pCat = Categories[nCategory];
+ pFT->SetText(*pCat->GetString(i));
+
+ pMF->SetMin(pCat->GetMinimum(i));
+ pMF->SetMax(pCat->GetMaximum(i));
+ pMF->SetValue(pCat->GetValue(i));
+
+ SetHelpId(*pMF, aCatMf2Hid[nCategory][i]);
+ }
+ }
+ // nun noch die CheckBox und das zugeh鰎ige MetricField genau dann aktivieren,
+ // falls es sich um das Klammer Menu handelt.
+ bActive = nCategory == 5;
+ aCheckBox1.Show(bActive);
+ aCheckBox1.Enable(bActive);
+ if (bActive)
+ {
+ aCheckBox1.Check( bScaleAllBrackets );
+
+ BOOL bChecked = aCheckBox1.IsChecked();
+ aFixedText4 .Enable( bChecked );
+ aMetricField4.Enable( bChecked );
+ }
+
+ aMenuButton.GetPopupMenu()->CheckItem(nCategory + 1, TRUE);
+ aGroupBox.SetText(Categories[nCategory]->GetName());
+
+ nActiveCategory = nCategory;
+
+ aMetricField1.GrabFocus();
+ Invalidate();
+ Update();
+}
+
+
+SmDistanceDialog::SmDistanceDialog(Window *pParent, BOOL bFreeRes)
+ : ModalDialog(pParent, SmResId(RID_DISTANCEDIALOG)),
+ aFixedText1 (this, ResId(1)),
+ aFixedText2 (this, ResId(2)),
+ aFixedText3 (this, ResId(3)),
+ aFixedText4 (this, ResId(4)),
+ aMetricField1 (this, ResId(1)),
+ aMetricField2 (this, ResId(2)),
+ aMetricField3 (this, ResId(3)),
+ aMetricField4 (this, ResId(4)),
+ aOKButton1 (this, ResId(1)),
+ aCancelButton1 (this, ResId(1)),
+ aMenuButton (this, ResId(1)),
+ aDefaultButton (this, ResId(1)),
+ aCheckBox1 (this, ResId(1)),
+ aBitmap (this, ResId(1)),
+ aGroupBox (this, ResId(1))
+{
+ for (int i = 0; i < NOCATEGORIES; i++)
+ Categories[i] = new SmCategoryDesc(SmResId(i + 1), i);
+ nActiveCategory = CATEGORY_NONE;
+ bScaleAllBrackets = FALSE;
+
+ if (bFreeRes)
+ FreeResource();
+
+ aMetricField1.SetGetFocusHdl(LINK(this, SmDistanceDialog, GetFocusHdl));
+ aMetricField2.SetGetFocusHdl(LINK(this, SmDistanceDialog, GetFocusHdl));
+ aMetricField3.SetGetFocusHdl(LINK(this, SmDistanceDialog, GetFocusHdl));
+ aMetricField4.SetGetFocusHdl(LINK(this, SmDistanceDialog, GetFocusHdl));
+ aCheckBox1.SetClickHdl(LINK(this, SmDistanceDialog, CheckBoxClickHdl));
+
+ aMenuButton.GetPopupMenu()->SetSelectHdl(LINK(this, SmDistanceDialog, MenuSelectHdl));
+
+ aDefaultButton.SetClickHdl(LINK(this, SmDistanceDialog, DefaultButtonClickHdl));
+ }
+
+
+SmDistanceDialog::~SmDistanceDialog()
+{
+ for (int i = 0; i < NOCATEGORIES; i++)
+ DELETEZ(Categories[i]);
+}
+
+
+void SmDistanceDialog::ReadFrom(const SmFormat &rFormat)
+{
+ Categories[0]->SetValue(0, rFormat.GetDistance(DIS_HORIZONTAL));
+ Categories[0]->SetValue(1, rFormat.GetDistance(DIS_VERTICAL));
+ Categories[0]->SetValue(2, rFormat.GetDistance(DIS_ROOT));
+ Categories[1]->SetValue(0, rFormat.GetDistance(DIS_SUPERSCRIPT));
+ Categories[1]->SetValue(1, rFormat.GetDistance(DIS_SUBSCRIPT));
+ Categories[2]->SetValue(0, rFormat.GetDistance(DIS_NUMERATOR));
+ Categories[2]->SetValue(1, rFormat.GetDistance(DIS_DENOMINATOR));
+ Categories[3]->SetValue(0, rFormat.GetDistance(DIS_FRACTION));
+ Categories[3]->SetValue(1, rFormat.GetDistance(DIS_STROKEWIDTH));
+ Categories[4]->SetValue(0, rFormat.GetDistance(DIS_UPPERLIMIT));
+ Categories[4]->SetValue(1, rFormat.GetDistance(DIS_LOWERLIMIT));
+ Categories[5]->SetValue(0, rFormat.GetDistance(DIS_BRACKETSIZE));
+ Categories[5]->SetValue(1, rFormat.GetDistance(DIS_BRACKETSPACE));
+ Categories[5]->SetValue(3, rFormat.GetDistance(DIS_NORMALBRACKETSIZE));
+ Categories[6]->SetValue(0, rFormat.GetDistance(DIS_MATRIXROW));
+ Categories[6]->SetValue(1, rFormat.GetDistance(DIS_MATRIXCOL));
+ Categories[7]->SetValue(0, rFormat.GetDistance(DIS_ORNAMENTSIZE));
+ Categories[7]->SetValue(1, rFormat.GetDistance(DIS_ORNAMENTSPACE));
+ Categories[8]->SetValue(0, rFormat.GetDistance(DIS_OPERATORSIZE));
+ Categories[8]->SetValue(1, rFormat.GetDistance(DIS_OPERATORSPACE));
+ Categories[9]->SetValue(0, rFormat.GetDistance(DIS_LEFTSPACE));
+ Categories[9]->SetValue(1, rFormat.GetDistance(DIS_RIGHTSPACE));
+ Categories[9]->SetValue(2, rFormat.GetDistance(DIS_TOPSPACE));
+ Categories[9]->SetValue(3, rFormat.GetDistance(DIS_BOTTOMSPACE));
+
+ bScaleAllBrackets = rFormat.IsScaleNormalBrackets();
+
+ // force update (even of category 0) by setting nActiveCategory to a
+ // non-existent category number
+ nActiveCategory = CATEGORY_NONE;
+ SetCategory(0);
+}
+
+
+void SmDistanceDialog::WriteTo(SmFormat &rFormat) /*const*/
+{
+ // hmm... k攏nen die tats刢hlich unterschiedlich sein?
+ // wenn nicht kann oben n刴lich das const stehen!
+ SetCategory(nActiveCategory);
+
+ rFormat.SetDistance( DIS_HORIZONTAL, Categories[0]->GetValue(0) );
+ rFormat.SetDistance( DIS_VERTICAL, Categories[0]->GetValue(1) );
+ rFormat.SetDistance( DIS_ROOT, Categories[0]->GetValue(2) );
+ rFormat.SetDistance( DIS_SUPERSCRIPT, Categories[1]->GetValue(0) );
+ rFormat.SetDistance( DIS_SUBSCRIPT, Categories[1]->GetValue(1) );
+ rFormat.SetDistance( DIS_NUMERATOR, Categories[2]->GetValue(0) );
+ rFormat.SetDistance( DIS_DENOMINATOR, Categories[2]->GetValue(1) );
+ rFormat.SetDistance( DIS_FRACTION, Categories[3]->GetValue(0) );
+ rFormat.SetDistance( DIS_STROKEWIDTH, Categories[3]->GetValue(1) );
+ rFormat.SetDistance( DIS_UPPERLIMIT, Categories[4]->GetValue(0) );
+ rFormat.SetDistance( DIS_LOWERLIMIT, Categories[4]->GetValue(1) );
+ rFormat.SetDistance( DIS_BRACKETSIZE, Categories[5]->GetValue(0) );
+ rFormat.SetDistance( DIS_BRACKETSPACE, Categories[5]->GetValue(1) );
+ rFormat.SetDistance( DIS_MATRIXROW, Categories[6]->GetValue(0) );
+ rFormat.SetDistance( DIS_MATRIXCOL, Categories[6]->GetValue(1) );
+ rFormat.SetDistance( DIS_ORNAMENTSIZE, Categories[7]->GetValue(0) );
+ rFormat.SetDistance( DIS_ORNAMENTSPACE, Categories[7]->GetValue(1) );
+ rFormat.SetDistance( DIS_OPERATORSIZE, Categories[8]->GetValue(0) );
+ rFormat.SetDistance( DIS_OPERATORSPACE, Categories[8]->GetValue(1) );
+ rFormat.SetDistance( DIS_LEFTSPACE, Categories[9]->GetValue(0) );
+ rFormat.SetDistance( DIS_RIGHTSPACE, Categories[9]->GetValue(1) );
+ rFormat.SetDistance( DIS_TOPSPACE, Categories[9]->GetValue(2) );
+ rFormat.SetDistance( DIS_BOTTOMSPACE, Categories[9]->GetValue(3) );
+ rFormat.SetDistance( DIS_NORMALBRACKETSIZE, Categories[5]->GetValue(3) );
+
+ rFormat.SetScaleNormalBrackets( bScaleAllBrackets );
+
+ rFormat.RequestApplyChanges();
+}
+
+
+/**************************************************************************/
+
+
+IMPL_LINK( SmAlignDialog, DefaultButtonClickHdl, Button *, pButton )
+{
+ QueryBox *pQueryBox = new QueryBox(this, SmResId(RID_DEFAULTSAVEQUERY));
+
+ if (pQueryBox->Execute() == RET_YES)
+ {
+ SmModule *pp = SM_MOD1();
+ WriteTo(pp->GetConfig()->GetFormat());
+ }
+
+ delete pQueryBox;
+ return 0;
+}
+
+
+SmAlignDialog::SmAlignDialog(Window * pParent, BOOL bFreeRes)
+ : ModalDialog(pParent, SmResId(RID_ALIGNDIALOG)),
+ aLeft (this, ResId(1)),
+ aCenter (this, ResId(2)),
+ aRight (this, ResId(3)),
+ aGroupBox1 (this, ResId(1)),
+ aOKButton1 (this, ResId(1)),
+ aCancelButton1 (this, ResId(1)),
+ aDefaultButton (this, ResId(1))
+{
+ if (bFreeRes)
+ FreeResource();
+
+ aDefaultButton.SetClickHdl(LINK(this, SmAlignDialog, DefaultButtonClickHdl));
+}
+
+
+void SmAlignDialog::ReadFrom(const SmFormat &rFormat)
+{
+ switch (rFormat.GetHorAlign())
+ {
+ case AlignLeft:
+ aLeft .Check(TRUE);
+ aCenter.Check(FALSE);
+ aRight .Check(FALSE);
+ break;
+
+ case AlignCenter:
+ aLeft .Check(FALSE);
+ aCenter.Check(TRUE);
+ aRight .Check(FALSE);
+ break;
+
+ case AlignRight:
+ aLeft .Check(FALSE);
+ aCenter.Check(FALSE);
+ aRight .Check(TRUE);
+ break;
+ }
+}
+
+
+void SmAlignDialog::WriteTo(SmFormat &rFormat) const
+{
+ if (aLeft.IsChecked())
+ rFormat.SetHorAlign(AlignLeft);
+ else if (aRight.IsChecked())
+ rFormat.SetHorAlign(AlignRight);
+ else
+ rFormat.SetHorAlign(AlignCenter);
+
+ rFormat.RequestApplyChanges();
+}
+
+
+/**************************************************************************/
+
+
+void SmShowSymbolSet::Paint(const Rectangle&)
+{
+ Push(PUSH_MAPMODE);
+
+ // MapUnit einstellen f黵 die 'nLen' berechnet wurde
+ SetMapMode(MapMode(MAP_PIXEL));
+
+ int v = (int) (aVScrollBar.GetThumbPos() * nColumns);
+ int nSymbols = (int) aSymbolSet.GetCount();
+
+ for (int i = v; i < nSymbols ; i++)
+ {
+ SmSym aSymbol (aSymbolSet.GetSymbol(i));
+ Font aFont (aSymbol.GetFace());
+
+ // etwas kleinere FontSize nehmen (als nLen) um etwas Luft zu haben
+ // (hoffentlich auch genug f黵 links und rechts!)
+ aFont.SetSize(Size(0, nLen - (nLen / 3)));
+ SetFont(aFont);
+
+ int nIV = i - v;
+ Size aSize(GetTextWidth(aSymbol.GetCharacter()), GetTextHeight());
+
+ DrawText(Point((nIV % nColumns) * nLen + (nLen - aSize.Width()) / 2,
+ (nIV / nColumns) * nLen + (nLen - aSize.Height()) / 2),
+ aSymbol.GetCharacter());
+ }
+
+ if (nSelectSymbol != SYMBOL_NONE)
+ {
+ Invert(Rectangle(Point(((nSelectSymbol - v) % nColumns) * nLen,
+ ((nSelectSymbol - v) / nColumns) * nLen),
+ Size(nLen, nLen)));
+ }
+
+ Pop();
+}
+
+
+void SmShowSymbolSet::MouseButtonDown(const MouseEvent& rMEvt)
+{
+ GrabFocus();
+
+ if (rMEvt.IsLeft() && Rectangle(Point(0, 0), aOutputSize).IsInside(rMEvt.GetPosPixel()))
+ {
+ SelectSymbol ((rMEvt.GetPosPixel().Y() / nLen) * nColumns + (rMEvt.GetPosPixel().X() / nLen) +
+ aVScrollBar.GetThumbPos() * nColumns);
+
+ aSelectHdlLink.Call(this);
+
+ if (rMEvt.GetClicks() > 1) aDblClickHdlLink.Call(this);
+ }
+ else Control::MouseButtonDown (rMEvt);
+}
+
+
+void SmShowSymbolSet::KeyInput(const KeyEvent& rKEvt)
+{
+ USHORT n = nSelectSymbol;
+
+ if (n != SYMBOL_NONE)
+ {
+ switch (rKEvt.GetKeyCode().GetCode())
+ {
+ case KEY_DOWN: n += nColumns; break;
+ case KEY_UP: n -= nColumns; break;
+ case KEY_LEFT: n -= 1; break;
+ case KEY_RIGHT: n += 1; break;
+ case KEY_HOME: n = 0; break;
+ case KEY_END: n = aSymbolSet.GetCount() - 1; break;
+ case KEY_PAGEUP: n -= nColumns * nRows; break;
+ case KEY_PAGEDOWN: n += nColumns * nRows; break;
+
+ default:
+ Control::KeyInput(rKEvt);
+ return;
+ }
+ }
+ else
+ n = 0;
+
+ if (n >= aSymbolSet.GetCount())
+ n = nSelectSymbol;
+
+ // adjust scrollbar
+ if ((n < (USHORT) (aVScrollBar.GetThumbPos() * nColumns)) ||
+ (n >= (USHORT) ((aVScrollBar.GetThumbPos() + nRows) * nColumns)))
+ {
+ aVScrollBar.SetThumbPos(n / nColumns);
+ Invalidate();
+ Update();
+ }
+
+ SelectSymbol(n);
+ aSelectHdlLink.Call(this);
+}
+
+
+SmShowSymbolSet::SmShowSymbolSet(Window *pParent, const ResId& rResId) :
+ Control(pParent, rResId),
+ aVScrollBar(this, WinBits(WB_VSCROLL))
+{
+ nSelectSymbol = SYMBOL_NONE;
+
+ aOutputSize = GetOutputSizePixel();
+ long nScrollBarWidth = aVScrollBar.GetSizePixel().Width(),
+ nUseableWidth = aOutputSize.Width() - nScrollBarWidth;
+
+ // H鰄e von 16pt in Pixeln (passend zu 'aOutputSize')
+ nLen = (USHORT) LogicToPixel(Size(0, 16), MapMode(MAP_POINT)).Height();
+
+ nColumns = nUseableWidth / nLen;
+ if (nColumns > 2 && nColumns % 2 != 0)
+ nColumns--;
+ nRows = aOutputSize.Height() / nLen;
+ DBG_ASSERT(nColumns > 0, "Sm : keine Spalten");
+ DBG_ASSERT(nRows > 0, "Sm : keine Zeilen");
+
+ // genau passend machen
+ aOutputSize.Width() = nColumns * nLen;
+ aOutputSize.Height() = nRows * nLen;
+
+ aVScrollBar.SetPosSizePixel(Point(aOutputSize.Width() + 1, -1),
+ Size(nScrollBarWidth, aOutputSize.Height() + 2));
+ aVScrollBar.Enable(FALSE);
+ aVScrollBar.Show();
+ aVScrollBar.SetScrollHdl(LINK(this, SmShowSymbolSet, ScrollHdl));
+
+ Size WindowSize (aOutputSize);
+ WindowSize.Width() += nScrollBarWidth;
+ SetOutputSizePixel(WindowSize);
+
+}
+
+
+void SmShowSymbolSet::SetSymbolSet(const SmSymSet& rSymbolSet)
+{
+ aSymbolSet = rSymbolSet;
+
+ if (aSymbolSet.GetCount() > (nColumns * nRows))
+ {
+ aVScrollBar.SetRange(Range(0, ((aSymbolSet.GetCount() + (nColumns - 1)) / nColumns) - nRows));
+ aVScrollBar.Enable(TRUE);
+ }
+ else
+ {
+ aVScrollBar.SetRange(Range(0,0));
+ aVScrollBar.Enable (FALSE);
+ }
+
+ Invalidate();
+}
+
+
+void SmShowSymbolSet::SelectSymbol(USHORT nSymbol)
+{
+ int v = (int) (aVScrollBar.GetThumbPos() * nColumns);
+
+ if (nSelectSymbol != SYMBOL_NONE)
+ Invalidate(Rectangle(Point(((nSelectSymbol - v) % nColumns) * nLen,
+ ((nSelectSymbol - v) / nColumns) * nLen),
+ Size(nLen, nLen)));
+
+ if (nSymbol < aSymbolSet.GetCount())
+ nSelectSymbol = nSymbol;
+
+ if (aSymbolSet.GetCount() == 0)
+ nSelectSymbol = SYMBOL_NONE;
+
+ if (nSelectSymbol != SYMBOL_NONE)
+ Invalidate(Rectangle(Point(((nSelectSymbol - v) % nColumns) * nLen,
+ ((nSelectSymbol - v) / nColumns) * nLen),
+ Size(nLen, nLen)));
+
+ Update();
+}
+
+IMPL_LINK( SmShowSymbolSet, ScrollHdl, ScrollBar*, pScrollBar)
+{
+ Invalidate();
+ return 0;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+void SmShowSymbol::Paint(const Rectangle&)
+{
+ const XubString &rText = GetText();
+ Size aTextSize(GetTextWidth(rText), GetTextHeight());
+
+ DrawText(Point((GetOutputSize().Width() - aTextSize.Width()) / 2,
+ (GetOutputSize().Height() - aTextSize.Height()) / 2), rText);
+}
+
+
+void SmShowSymbol::MouseButtonDown(const MouseEvent& rMEvt)
+{
+ if (rMEvt.GetClicks() > 1)
+ aDblClickHdlLink.Call(this);
+ else
+ Control::MouseButtonDown (rMEvt);
+}
+
+
+void SmShowSymbol::SetSymbol(const SmSym *pSymbol)
+{
+ if (pSymbol)
+ {
+ Font aFont (pSymbol->GetFace());
+ aFont.SetSize(Size(0, GetOutputSize().Height() - GetOutputSize().Height() / 3));
+ SetFont(aFont);
+
+ SetText(XubString(pSymbol->GetCharacter()));
+ }
+
+ // 'Invalidate' f黮lt den background mit der background-Farbe.
+ // Falls der NULL pointer 黚ergeben wurde reicht dies also zum l鰏chen
+ // der Anzeige
+ Invalidate();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+void SmSymbolDialog::FillSymbolSets(BOOL bDeleteText)
+ // f黮lt die Eintr鋑e der m鰃lichen 'SymbolsSet's im Dialog mit den
+ // aktuellen Werten des SymbolSet Managers, selektiert aber keinen.
+{
+ aSymbolSets.Clear();
+ if (bDeleteText)
+ aSymbolSets.SetNoSelection();
+
+ USHORT nNumSymSets = rSymSetMgr.GetCount();
+ for (USHORT i = 0; i < nNumSymSets; i++)
+ aSymbolSets.InsertEntry(rSymSetMgr.GetSymbolSet(i)->GetName());
+}
+
+
+IMPL_LINK( SmSymbolDialog, SymbolSetChangeHdl, ListBox *, pListBox )
+{
+ DBG_ASSERT(pListBox == &aSymbolSets, "Sm : falsches Argument");
+
+ SelectSymbolSet(aSymbolSets.GetSelectEntry());
+ return 0;
+}
+
+
+IMPL_LINK( SmSymbolDialog, SymbolChangeHdl, SmShowSymbolSet *, pShowSymbolSet )
+{
+ DBG_ASSERT(pShowSymbolSet == &aSymbolSetDisplay, "Sm : falsches Argument");
+
+ SelectSymbol(aSymbolSetDisplay.GetSelectSymbol());
+ return 0;
+}
+
+IMPL_LINK( SmSymbolDialog, EditClickHdl, Button *, pButton )
+{
+ DBG_ASSERT(pButton == &aEditBtn, "Sm : falsches Argument");
+
+ SmSymDefineDialog *pDialog = new SmSymDefineDialog(this, rSymSetMgr);
+
+ // aktuelles Symbol und SymbolSet am neuen Dialog setzen
+ const XubString aSymSetName (aSymbolSets.GetSelectEntry()),
+ aSymName (aSymbolName.GetText());
+ pDialog->SelectOldSymbolSet(aSymSetName);
+ pDialog->SelectOldSymbol(aSymName);
+ pDialog->SelectSymbolSet(aSymSetName);
+ pDialog->SelectSymbol(aSymName);
+
+ // altes SymbolSet merken
+ XubString aOldSymbolSet (aSymbolSets.GetSelectEntry());
+
+ // Dialog an evtl ge鋘derte Daten des SymbolSet Manager anpassen
+ if (pDialog->Execute() == RET_OK && rSymSetMgr.IsModified())
+ FillSymbolSets();
+
+ // wenn das alte SymbolSet nicht mehr existiert zum ersten gehen
+ // (soweit eines vorhanden ist)
+ if (!SelectSymbolSet(aOldSymbolSet) && aSymbolSets.GetEntryCount() > 0)
+ SelectSymbolSet(aSymbolSets.GetEntry(0));
+
+ delete pDialog;
+ return 0;
+}
+
+
+IMPL_LINK( SmSymbolDialog, SymbolDblClickHdl, SmShowSymbolSet *, pShowSymbolSet )
+{
+ DBG_ASSERT(pShowSymbolSet == &aSymbolSetDisplay, "Sm : falsches Argument");
+
+ GetClickHdl(&aGetBtn);
+ EndDialog(RET_OK);
+ return 0;
+}
+
+
+IMPL_LINK( SmSymbolDialog, GetClickHdl, Button *, pButton )
+{
+ DBG_ASSERT(pButton == &aGetBtn, "Sm : falscher Button");
+
+ const SmSym *pSym = GetSymbol();
+ if (pSym)
+ {
+ XubString aText ('%');
+ aText += pSym->GetName();
+
+ SmViewShell *pViewSh = SmGetActiveView();
+ if (pViewSh)
+ pViewSh->GetViewFrame()->GetDispatcher()->Execute(
+ SID_INSERTTEXT, SFX_CALLMODE_STANDARD,
+ new SfxStringItem(SID_INSERTTEXT, aText), 0L);
+ }
+
+ return 0;
+}
+
+
+IMPL_LINK_INLINE_START( SmSymbolDialog, CloseClickHdl, Button *, pButton )
+{
+ DBG_ASSERT(pButton == &aCloseBtn, "Sm : falscher Button");
+
+ EndDialog(TRUE);
+ return 0;
+}
+IMPL_LINK_INLINE_END( SmSymbolDialog, CloseClickHdl, Button *, pButton )
+
+
+SmSymbolDialog::SmSymbolDialog(Window *pParent, SmSymSetManager &rMgr, BOOL bFreeRes) :
+ ModalDialog (pParent, SmResId(RID_SYMBOLDIALOG)),
+ aSymbolSetText (this, ResId(1)),
+ aSymbolSets (this, ResId(1)),
+ aSymbolSetDisplay (this, ResId(1)),
+ aGrpBox (this, ResId(1)),
+ aSymbolName (this, ResId(2)),
+ aSymbolDisplay (this, ResId(2)),
+ aCloseBtn (this, ResId(3)),
+ aEditBtn (this, ResId(1)),
+ aGetBtn (this, ResId(2)),
+ rSymSetMgr (rMgr)
+{
+ if (bFreeRes)
+ FreeResource();
+
+ pSymSet = NULL;
+ FillSymbolSets();
+ if (aSymbolSets.GetEntryCount() > 0)
+ SelectSymbolSet(aSymbolSets.GetEntry(0));
+
+ // set background color to white
+ Wallpaper aWhiteWall( (Color) Color(COL_WHITE) );
+ aSymbolDisplay .SetBackground( aWhiteWall );
+ aSymbolSetDisplay.SetBackground( aWhiteWall );
+
+ aSymbolSets .SetSelectHdl (LINK(this, SmSymbolDialog, SymbolSetChangeHdl));
+ aSymbolSetDisplay.SetSelectHdl (LINK(this, SmSymbolDialog, SymbolChangeHdl));
+ aSymbolSetDisplay.SetDblClickHdl(LINK(this, SmSymbolDialog, SymbolDblClickHdl));
+ aSymbolDisplay .SetDblClickHdl(LINK(this, SmSymbolDialog, SymbolDblClickHdl));
+ aCloseBtn .SetClickHdl (LINK(this, SmSymbolDialog, CloseClickHdl));
+ aEditBtn .SetClickHdl (LINK(this, SmSymbolDialog, EditClickHdl));
+ aGetBtn .SetClickHdl (LINK(this, SmSymbolDialog, GetClickHdl));
+}
+
+
+BOOL SmSymbolDialog::SelectSymbolSet(const XubString &rSymbolSetName)
+{
+ BOOL bRet = FALSE;
+ USHORT nPos = aSymbolSets.GetEntryPos(rSymbolSetName);
+
+ pSymSet = NULL;
+ if (nPos != LISTBOX_ENTRY_NOTFOUND)
+ {
+ aSymbolSets.SelectEntryPos(nPos);
+ USHORT nSymbolSetNo = rSymSetMgr.GetSymbolSetPos(aSymbolSets.GetSelectEntry());
+ pSymSet = rSymSetMgr.GetSymbolSet(nSymbolSetNo);
+ DBG_ASSERT(pSymSet, "Sm : NULL pointer");
+
+ aSymbolSetDisplay.SetSymbolSet(*pSymSet);
+ if (pSymSet->GetCount() > 0)
+ SelectSymbol(0);
+
+ bRet = TRUE;
+ }
+ else
+ aSymbolSets.SetNoSelection();
+
+ return bRet;
+}
+
+
+void SmSymbolDialog::SelectSymbol(USHORT nSymbolNo)
+{
+ const SmSym *pSym = NULL;
+ if (pSymSet && nSymbolNo < pSymSet->GetCount())
+ pSym = &pSymSet->GetSymbol(nSymbolNo);
+
+ aSymbolSetDisplay.SelectSymbol(nSymbolNo);
+ aSymbolDisplay.SetSymbol(pSym);
+ aSymbolName.SetText(pSym ? pSym->GetName() : XubString());
+}
+
+
+const SmSym * SmSymbolDialog::GetSymbol() const
+{
+ USHORT nSymbolNo = aSymbolSetDisplay.GetSelectSymbol();
+ return pSymSet == NULL ? NULL : &pSymSet->GetSymbol(nSymbolNo);
+}
+
+
+/**************************************************************************/
+
+
+void SmShowCharset::Paint(const Rectangle&)
+{
+ Size OutputSize = GetOutputSizePixel();
+
+ int i;
+ for (i = 1; i < (int) nColumns; i++)
+ {
+ int nLenI = nLen * i;
+
+ DrawLine(Point(nLenI, 0), Point(nLenI, OutputSize.Height()));
+ }
+
+ for (i = 1; i < (int) nRows; i++)
+ {
+ int nLenI = nLen * i;
+
+ DrawLine(Point(0, nLenI), Point(OutputSize.Width(), nLenI));
+ }
+
+ for (i = 1; i < 256; i++)
+ {
+ int x = (i % nColumns) * nLen;
+ int y = (i / nColumns) * nLen;
+
+ Size aTextSize(GetTextWidth(aChar), GetTextHeight());
+
+ XubString aChar((xub_Unicode) i);
+ DrawText(Point(x + (nLen - aTextSize.Width()) / 2,
+ y + (nLen - aTextSize.Height()) / 2), aChar);
+ }
+}
+
+
+void SmShowCharset::MouseButtonDown(const MouseEvent& rMEvt)
+{
+ if (rMEvt.IsLeft())
+ {
+ GrabFocus();
+
+ USHORT n = (USHORT) ((rMEvt.GetPosPixel().Y() / nLen) * nColumns +
+ (rMEvt.GetPosPixel().X() / nLen));
+ SelectChar((xub_Unicode)Min((USHORT) n, (USHORT) 255));
+
+ aSelectHdlLink.Call(this);
+
+ if (rMEvt.GetClicks() > 1)
+ aDblClickHdlLink.Call(this);
+ }
+ else Control::MouseButtonDown (rMEvt);
+}
+
+
+void SmShowCharset::KeyInput(const KeyEvent& rKEvt)
+{
+ xub_Unicode n = aChar;
+
+ switch (rKEvt.GetKeyCode().GetCode())
+ {
+ case KEY_DOWN: n += (xub_Unicode) nColumns; break;
+ case KEY_UP: n -= (xub_Unicode) nColumns; break;
+ case KEY_LEFT: n -= 1; break;
+ case KEY_RIGHT: n += 1; break;
+ case KEY_HOME: n = 0; break;
+ case KEY_END: n = (xub_Unicode) 255; break;
+ case KEY_PAGEUP: n -= (xub_Unicode) nColumns; break;
+ case KEY_PAGEDOWN: n += (xub_Unicode) nColumns; break;
+
+ default:
+ Control::KeyInput(rKEvt);
+ return;
+ }
+
+ SelectChar(n);
+ aSelectHdlLink.Call(this);
+}
+
+
+SmShowCharset::SmShowCharset(Window *pParent, const ResId& rResId) :
+ Control(pParent, rResId)
+{
+ aChar = xub_Unicode('\0');
+
+ Size aOutputSize (GetOutputSizePixel());
+
+ nColumns = 32;
+ nRows = 8;
+
+ // FontSize passend w鋒len
+ nLen = Min(aOutputSize.Width() / nColumns, aOutputSize.Height() / nRows);
+
+ // Fenster genau passend machen (wird h鯿hstens kleiner!)
+ aOutputSize.Width() = nColumns * nLen;
+ aOutputSize.Height() = nRows * nLen;
+
+ SetOutputSizePixel(aOutputSize);
+}
+
+
+void SmShowCharset::SetFont(const Font &rFont)
+{
+ Font aFont (rFont);
+
+ // etwas kleinere FontSize nehmen (als nLen) um etwas Luft zu haben
+ // (hofentlich auch genug f黵 links und rechts)
+ aFont.SetSize(Size(0, nLen - (nLen / 3)));
+ aFont.SetTransparent(TRUE);
+ Control::SetFont(aFont);
+
+ Invalidate();
+}
+
+
+void SmShowCharset::SelectChar(xub_Unicode aCharP)
+{
+ int c = aChar & 0xFF;
+ Size aNSize (nLen, nLen);
+
+ Invalidate(Rectangle(Point((c % nColumns) * nLen, (c / nColumns) * nLen), aNSize));
+
+ aChar = aCharP;
+ c = aChar & 0xFF;
+ Invalidate(Rectangle(Point((c % nColumns) * nLen, (c / nColumns) * nLen), aNSize));
+
+ Update();
+}
+
+
+////////////////////////////////////////////////////////////////////////////////
+
+
+void SmShowChar::Paint(const Rectangle&)
+{
+ XubString Text (GetText ());
+
+ if (Text.Len() > 0)
+ {
+ Size aTextSize(GetTextWidth(Text), GetTextHeight());
+
+ DrawText(Point((GetOutputSize().Width() - aTextSize.Width()) / 2,
+ (GetOutputSize().Height() - aTextSize.Height()) / 2), Text);
+ }
+}
+
+
+void SmShowChar::SetChar(xub_Unicode aChar)
+{
+ SetText(XubString(aChar));
+ Invalidate();
+}
+
+
+void SmShowChar::SetFont(const Font &rFont)
+{
+ Font aFont (rFont);
+ Size aSize (Size(0, GetOutputSize().Height() - GetOutputSize().Height() / 3));
+
+ aFont.SetSize(aSize);
+ aFont.SetTransparent(TRUE);
+ Control::SetFont(aFont);
+
+ Invalidate();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+void SmSymDefineDialog::FillSymbols(ComboBox &rComboBox, BOOL bDeleteText)
+{
+ DBG_ASSERT(&rComboBox == &aOldSymbols || &rComboBox == &aSymbols,
+ "Sm : falsche ComboBox");
+
+ rComboBox.Clear();
+ if (bDeleteText)
+ rComboBox.SetText(XubString());
+
+ ComboBox &rSymbolSets = &rComboBox == &aOldSymbols ?
+ aOldSymbolSets : aSymbolSets;
+ const SmSymSet *pSymSet = GetSymbolSet(rSymbolSets);
+ if (pSymSet)
+ { USHORT nNumSymbols = pSymSet->GetCount();
+ for (USHORT i = 0; i < nNumSymbols; i++)
+ rComboBox.InsertEntry(pSymSet->GetSymbol(i).GetName());
+ }
+
+}
+
+
+void SmSymDefineDialog::FillSymbolSets(ComboBox &rComboBox, BOOL bDeleteText)
+{
+ DBG_ASSERT(&rComboBox == &aOldSymbolSets || &rComboBox == &aSymbolSets,
+ "Sm : falsche ComboBox");
+
+ rComboBox.Clear();
+ if (bDeleteText)
+ rComboBox.SetText(XubString());
+
+ USHORT nNumSymSets = aSymSetMgrCopy.GetCount();
+ for (USHORT i = 0; i < nNumSymSets; i++)
+ rComboBox.InsertEntry(aSymSetMgrCopy.GetSymbolSet(i)->GetName());
+}
+
+
+void SmSymDefineDialog::FillFonts(BOOL bDelete)
+{
+ aFonts.Clear();
+ if (bDelete)
+ aFonts.SetNoSelection();
+
+ // alle Fonts der 'FontList' in die Fontliste aufnehmen
+ // von denen mit gleichen Namen jedoch nur einen (denn der Style wird
+ // 黚er die 'FontStyleBox' gew鋒lt und nicht auch noch hier)
+ DBG_ASSERT(pFontList, "Sm : NULL pointer");
+ USHORT nCount = pFontList->GetFontNameCount();
+ for (USHORT i = 0; i < nCount; i++)
+ aFonts.InsertEntry( pFontList->GetFontName(i).GetName() );
+}
+
+
+void SmSymDefineDialog::FillStyles(BOOL bDeleteText)
+{
+ aStyles.Clear();
+ if (bDeleteText)
+ aStyles.SetText(XubString());
+
+ XubString aText (aFonts.GetSelectEntry());
+ if (aText.Len() != 0)
+ {
+ //aStyles.Fill(aText, &aFontList);
+ // eigene StyleName's verwenden
+ for (USHORT i = 0; i < aStyleNameCount; i++)
+ aStyles.InsertEntry( aStyleName[i] );
+
+ DBG_ASSERT(aStyles.GetEntryCount() > 0, "Sm : keine Styles vorhanden");
+ aStyles.SetText( aStyles.GetEntry(0) );
+ }
+}
+
+
+SmSymSet * SmSymDefineDialog::GetSymbolSet(const ComboBox &rComboBox)
+{
+ DBG_ASSERT(&rComboBox == &aOldSymbolSets || &rComboBox == &aSymbolSets,
+ "Sm : falsche ComboBox");
+
+ USHORT nSymbolSetNo = aSymSetMgrCopy.GetSymbolSetPos(rComboBox.GetText());
+
+ return nSymbolSetNo == SYMBOLSET_NONE ?
+ NULL : aSymSetMgrCopy.GetSymbolSet(nSymbolSetNo);
+}
+
+
+SmSym * SmSymDefineDialog::GetSymbol(const ComboBox &rComboBox)
+{
+ DBG_ASSERT(&rComboBox == &aOldSymbols || &rComboBox == &aSymbols,
+ "Sm : falsche ComboBox");
+
+ return aSymSetMgrCopy.GetSymbol(rComboBox.GetText());
+}
+
+
+IMPL_LINK( SmSymDefineDialog, OldSymbolChangeHdl, ComboBox *, pComboBox )
+{
+ DBG_ASSERT(pComboBox == &aOldSymbols, "Sm : falsches Argument");
+ SelectSymbol(aOldSymbols, aOldSymbols.GetText(), FALSE);
+ return 0;
+}
+
+
+IMPL_LINK( SmSymDefineDialog, OldSymbolSetChangeHdl, ComboBox *, pComboBox )
+{
+ DBG_ASSERT(pComboBox == &aOldSymbolSets, "Sm : falsches Argument");
+ SelectSymbolSet(aOldSymbolSets, aOldSymbolSets.GetText(), FALSE);
+ return 0;
+}
+
+
+IMPL_LINK( SmSymDefineDialog, ModifyHdl, ComboBox *, pComboBox )
+{
+ // merken der Cursorposition zum wiederherstellen derselben
+ Selection aSelection (pComboBox->GetSelection());
+
+ if (pComboBox == &aSymbols)
+ SelectSymbol(aSymbols, aSymbols.GetText(), FALSE);
+ else if (pComboBox == &aSymbolSets)
+ SelectSymbolSet(aSymbolSets, aSymbolSets.GetText(), FALSE);
+ else if (pComboBox == &aOldSymbols)
+ // nur Namen aus der Liste erlauben
+ SelectSymbol(aOldSymbols, aOldSymbols.GetText(), TRUE);
+ else if (pComboBox == &aOldSymbolSets)
+ // nur Namen aus der Liste erlauben
+ SelectSymbolSet(aOldSymbolSets, aOldSymbolSets.GetText(), TRUE);
+ else if (pComboBox == &aStyles)
+ // nur Namen aus der Liste erlauben (ist hier eh immer der Fall)
+ SelectStyle(aStyles.GetText(), TRUE);
+ else
+ DBG_ASSERT(0, "Sm : falsche ComboBox Argument");
+
+ pComboBox->SetSelection(aSelection);
+
+ UpdateButtons();
+
+ return 0;
+}
+
+
+IMPL_LINK( SmSymDefineDialog, FontChangeHdl, ListBox *, pListBox )
+{
+ DBG_ASSERT(pListBox == &aFonts, "Sm : falsches Argument");
+
+ SelectFont(aFonts.GetSelectEntry());
+ return 0;
+}
+
+
+IMPL_LINK( SmSymDefineDialog, StyleChangeHdl, ComboBox *, pComboBox )
+{
+ DBG_ASSERT(pComboBox == &aStyles, "Sm : falsches Argument");
+
+ SelectStyle(aStyles.GetText());
+ return 0;
+}
+
+
+IMPL_LINK_INLINE_START( SmSymDefineDialog, CharSelectHdl, SmShowCharset *, pShowCharset )
+{
+ DBG_ASSERT(pShowCharset == &aCharsetDisplay, "Sm : falsches Argument");
+
+ SelectChar(aCharsetDisplay.GetSelectChar());
+ return 0;
+}
+IMPL_LINK_INLINE_END( SmSymDefineDialog, CharSelectHdl, SmShowCharset *, pShowCharset )
+
+
+IMPL_LINK( SmSymDefineDialog, AddClickHdl, Button *, pButton )
+{
+ DBG_ASSERT(pButton == &aAddBtn, "Sm : falsches Argument");
+ DBG_ASSERT(aAddBtn.IsEnabled(), "Sm : Voraussetzungen erf黮lt ??");
+
+ SmSymSet *pSymSet = GetSymbolSet(aSymbolSets);
+
+ // SymbolSet einf黦en falls es noch nicht existiert
+ if (!pSymSet)
+ {
+ pSymSet = new SmSymSet(aSymbolSets.GetText());
+ aSymSetMgrCopy.AddSymbolSet(pSymSet);
+ FillSymbolSets(aOldSymbolSets, FALSE);
+ FillSymbolSets(aSymbolSets, FALSE);
+ }
+ DBG_ASSERT(pSymSet, "Sm : NULL pointer");
+
+ // Symbol ins SymbolSet einf黦en
+ SmSym *pSym = new SmSym(aSymbols.GetText(), aCharsetDisplay.GetFont(),
+ aCharsetDisplay.GetSelectChar());
+ pSymSet->AddSymbol(pSym);
+
+ // update der Hash Tabelle erzwingen (damit aAddBtn disabled wird).
+ // (wird sp鋞er nach 躡erarbeitung von symbol.cxx 黚erfl黶sig werden).
+ aSymSetMgrCopy.ChangeSymbolSet((SmSymSet *)1);
+
+ // Symbolliste aktualiseren
+ FillSymbols(aOldSymbols ,FALSE);
+ FillSymbols(aSymbols ,FALSE);
+
+ UpdateButtons();
+
+ return 0;
+}
+
+
+IMPL_LINK( SmSymDefineDialog, ChangeClickHdl, Button *, pButton )
+{
+ DBG_ASSERT(pButton == &aChangeBtn, "Sm : falsches Argument");
+ DBG_ASSERT(aChangeBtn.IsEnabled(), "Sm : Voraussetzungen erf黮lt ??");
+
+ // finden des SymbolSets zum alten Symbol
+ SmSymSet *pOldSymSet = GetSymbolSet(aOldSymbolSets);
+ DBG_ASSERT(pOldSymSet, "Sm : NULL pointer");
+
+ // suchen des neuen SymbolSets
+ SmSymSet *pNewSymSet = GetSymbolSet(aSymbolSets);
+ // SymbolSet einf黦en falls es noch nicht existiert
+ if (!pNewSymSet)
+ {
+ pNewSymSet = new SmSymSet(aSymbolSets.GetText());
+ aSymSetMgrCopy.AddSymbolSet(pNewSymSet);
+ FillSymbolSets(aOldSymbolSets, FALSE);
+ FillSymbolSets(aSymbolSets, FALSE);
+ }
+
+ // das (alte) Symbol besorgen
+ USHORT nSymbol = pOldSymSet->GetSymbolPos(aOldSymbols.GetText());
+ SmSym *pSym = (SmSym *) &pOldSymSet->GetSymbol(nSymbol);
+ DBG_ASSERT(pSym, "Sm : NULL pointer");
+
+ // 膎derungen durchf黨ren;
+ pSym->GetName() = aSymbols.GetText();
+ pSym->GetFace() = aCharsetDisplay.GetFont();
+ pSym->GetCharacter() = aCharsetDisplay.GetSelectChar();
+
+ // das SymbolSet wechseln wenn n鰐ig
+ if (pOldSymSet != pNewSymSet)
+ {
+ pOldSymSet->RemoveSymbol(nSymbol);
+ pNewSymSet->AddSymbol(pSym);
+ }
+
+ //!! den SymbolSet Manger dazu zwingen seinen HashTable zu aktualisieren,
+ //!! um mit m鰃lich neuen bzw fehlenden alten Symbol Namen konform zu sein.
+ aSymSetMgrCopy.ChangeSymbolSet((SmSymSet *)1);
+
+ UpdateButtons();
+
+ return 0;
+}
+
+
+IMPL_LINK( SmSymDefineDialog, DeleteClickHdl, Button *, pButton )
+{
+ DBG_ASSERT(pButton == &aDeleteBtn, "Sm : falsches Argument");
+ DBG_ASSERT(aDeleteBtn.IsEnabled(), "Sm : Voraussetzungen erf黮lt ??");
+
+ if (pOrigSymbol)
+ {
+ // l鰏chen des Symbols:
+ //
+ // zugeh鰎iges SymbolSet finden
+ SmSymSet *pSymSet = GetSymbolSet(aOldSymbolSets);
+ DBG_ASSERT(pSymSet, "Sm : NULL pointer");
+ // finden des Index
+ XubString aOldSymbolName (pOrigSymbol->GetName());
+ USHORT nSymbolNo = pSymSet->GetSymbolPos(aOldSymbolName);
+ DBG_ASSERT(nSymbolNo != SYMBOL_NONE, "Sm : kein Symbol");
+ // Bez黦e auf das Symbols l鰏chen
+ DBG_ASSERT(pOrigSymbol == &pSymSet->GetSymbol(nSymbolNo),
+ "Sm : Fehler beim l鰏chen des Symbols");
+ SetOrigSymbol(NULL, XubString());
+ // und weg mit dem Symbol
+ pSymSet->DeleteSymbol(nSymbolNo);
+
+ //!! den SymbolSet Manger dazu zwingen seinen HashTable zu aktualisieren,
+ //!! was er n鋗lich nicht tut, wenn in einem seiner SymbolSets ge鋘dert/
+ //!! gel鰏cht wird, was wiederum zu einem Absturz f黨ren kann (wenn er
+ //!! 黚er ein nicht mehr existentes aber nicht entferntes Symbol iteriert).
+ aSymSetMgrCopy.ChangeSymbolSet((SmSymSet *)1);
+
+ // aktualisieren der Symboleintr鋑e des Dialogs
+ aOldSymbols.SetText(XubString());
+ aOldSymbols.RemoveEntry(aOldSymbolName);
+ if (aSymbolSets.GetText() == aOldSymbolSets.GetText())
+ aSymbols.RemoveEntry(aOldSymbolName);
+ }
+
+ UpdateButtons();
+
+ return 0;
+}
+
+
+void SmSymDefineDialog::UpdateButtons()
+{
+ BOOL bAdd = FALSE,
+ bChange = FALSE,
+ bDelete = FALSE,
+ bEqual;
+ XubString aSymbolName (aSymbols.GetText()),
+ aSymbolSetName (aSymbolSets.GetText());
+
+ if (aSymbolName.Len() > 0 && aSymbolSetName.Len() > 0)
+ {
+ // alle Einstellungen gleich?
+ //! (Font-, Style- und SymbolSet Name werden nicht case sensitiv verglichen)
+ bEqual = pOrigSymbol
+ && aSymbolSetName.EqualsIgnoreCaseAscii(aOldSymbolSetName.GetText())
+ && aSymbolName.Equals(pOrigSymbol->GetName())
+ && aFonts.GetSelectEntry().EqualsIgnoreCaseAscii(pOrigSymbol->GetFace().GetName())
+ && aStyles.GetText().EqualsIgnoreCaseAscii(GetFontStyleName(pOrigSymbol->GetFace()))
+ && aCharsetDisplay.GetSelectChar() == pOrigSymbol->GetCharacter();
+
+ // hinzuf黦en nur wenn es noch kein Symbol desgleichen Namens gibt
+ bAdd = aSymSetMgrCopy.GetSymbol(aSymbolName) == NULL;
+
+ // l鰏chen nur wenn alle Einstellungen gleich sind
+ bDelete = pOrigSymbol != NULL;
+
+ // 鋘dern wenn bei gleichem Namen mindestens eine Einstellung anders ist
+ // oder wenn es noch kein Symbol des neuen Namens gibt (w黵de implizites
+ // l鰏chen des bereits vorhandenen Symbols erfordern)
+ BOOL bEqualName = pOrigSymbol && aSymbolName == pOrigSymbol->GetName();
+ bChange = pOrigSymbol && (bEqualName && !bEqual || !bEqualName && bAdd);
+ }
+
+ aAddBtn .Enable(bAdd);
+ aChangeBtn.Enable(bChange);
+ aDeleteBtn.Enable(bDelete);
+}
+
+
+SmSymDefineDialog::SmSymDefineDialog(Window * pParent, SmSymSetManager &rMgr, BOOL bFreeRes) :
+ ModalDialog (pParent, SmResId(RID_SYMDEFINEDIALOG)),
+ aOldSymbolText (this, ResId(1)),
+ aOldSymbols (this, ResId(1)),
+ aOldSymbolSetText (this, ResId(2)),
+ aOldSymbolSets (this, ResId(2)),
+ aCharsetDisplay (this, ResId(1)),
+ aSymbolText (this, ResId(9)),
+ aSymbols (this, ResId(4)),
+ aSymbolSetText (this, ResId(10)),
+ aSymbolSets (this, ResId(5)),
+ aFontText (this, ResId(3)),
+ aFonts (this, ResId(1)),
+ aStyleText (this, ResId(4)),
+ aStyles (this, ResId(3)),
+ aOldSymbolName (this, ResId(7)),
+ aOldSymbolDisplay (this, ResId(3)),
+ aOldSymbolSetName (this, ResId(8)),
+ aSymbolName (this, ResId(5)),
+ aSymbolDisplay (this, ResId(2)),
+ aSymbolSetName (this, ResId(6)),
+ aAddBtn (this, ResId(1)),
+ aChangeBtn (this, ResId(2)),
+ aDeleteBtn (this, ResId(3)),
+ aOkBtn (this, ResId(1)),
+ aCancelBtn (this, ResId(1)),
+ aRightArrow (this, ResId(1)),
+ pFontList (NULL),
+ rSymSetMgr (rMgr)
+{
+ if (bFreeRes)
+ FreeResource();
+
+ // get FontList from printer (if possible), otherwise from application window
+ SmViewShell *pView = SmGetActiveView();
+ DBG_ASSERT(pView, "Sm : NULL pointer");
+ OutputDevice *pDev = pView->GetDoc()->GetPrinter();
+ if (!pDev || pDev->GetDevFontCount() == 0)
+ pDev = &pView->GetGraphicWindow();
+ pFontList = new FontList(pDev);
+
+
+ pOrigSymbol = 0;
+
+ // make autocompletion for symbols case-sensitive
+ aOldSymbols.EnableAutocomplete(TRUE, TRUE);
+ aSymbols .EnableAutocomplete(TRUE, TRUE);
+
+ FillFonts();
+ if (aFonts.GetEntryCount() > 0)
+ SelectFont(aFonts.GetEntry(0));
+
+ // set background color to white
+ Wallpaper aWhiteWall( (Color) Color(COL_WHITE) );
+ aCharsetDisplay .SetBackground( aWhiteWall );
+ aOldSymbolDisplay.SetBackground( aWhiteWall );
+ aOldSymbolDisplay.SetBackground( aWhiteWall );
+
+ SetSymbolSetManager(rSymSetMgr);
+
+ aOldSymbols .SetSelectHdl(LINK(this, SmSymDefineDialog, OldSymbolChangeHdl));
+ aOldSymbolSets .SetSelectHdl(LINK(this, SmSymDefineDialog, OldSymbolSetChangeHdl));
+ aSymbolSets .SetModifyHdl(LINK(this, SmSymDefineDialog, ModifyHdl));
+ aOldSymbolSets .SetModifyHdl(LINK(this, SmSymDefineDialog, ModifyHdl));
+ aSymbols .SetModifyHdl(LINK(this, SmSymDefineDialog, ModifyHdl));
+ aOldSymbols .SetModifyHdl(LINK(this, SmSymDefineDialog, ModifyHdl));
+ aStyles .SetModifyHdl(LINK(this, SmSymDefineDialog, ModifyHdl));
+ aFonts .SetSelectHdl(LINK(this, SmSymDefineDialog, FontChangeHdl));
+ aStyles .SetSelectHdl(LINK(this, SmSymDefineDialog, StyleChangeHdl));
+ aAddBtn .SetClickHdl (LINK(this, SmSymDefineDialog, AddClickHdl));
+ aChangeBtn .SetClickHdl (LINK(this, SmSymDefineDialog, ChangeClickHdl));
+ aDeleteBtn .SetClickHdl (LINK(this, SmSymDefineDialog, DeleteClickHdl));
+ aCharsetDisplay.SetSelectHdl(LINK(this, SmSymDefineDialog, CharSelectHdl));
+}
+
+
+SmSymDefineDialog::~SmSymDefineDialog()
+{
+ delete pFontList;
+}
+
+
+short SmSymDefineDialog::Execute()
+{
+ short nResult = ModalDialog::Execute();
+
+ // 膎derungen 黚ernehmen falls Dialog mit OK beendet wurde
+ if (aSymSetMgrCopy.IsModified() && nResult == RET_OK)
+ {
+ // leere SymbolSets aus dem Ergebnis entfernen.
+ // Dabei von hinten durch das array iterieren, da beim l鰏chen die
+ // Elemente aufr點ken.
+ USHORT nSymbolSets = aSymSetMgrCopy.GetCount();
+ for (int i = nSymbolSets - 1; i >= 0; i--)
+ if (aSymSetMgrCopy.GetSymbolSet(i)->GetCount() == 0)
+ aSymSetMgrCopy.DeleteSymbolSet(i);
+
+ rSymSetMgr = aSymSetMgrCopy;
+ }
+
+ return nResult;
+}
+
+
+void SmSymDefineDialog::SetSymbolSetManager(const SmSymSetManager &rMgr)
+{
+ aSymSetMgrCopy = rMgr;
+
+ // Das modified Flag der Kopie auf FALSE setzen, damit man sp鋞er damit
+ // testen kann ob sich was ge鋘dert hat.
+ aSymSetMgrCopy.SetModified(FALSE);
+
+ FillSymbolSets(aOldSymbolSets);
+ if (aOldSymbolSets.GetEntryCount() > 0)
+ SelectSymbolSet(aOldSymbolSets.GetEntry(0));
+ FillSymbolSets(aSymbolSets);
+ if (aSymbolSets.GetEntryCount() > 0)
+ SelectSymbolSet(aSymbolSets.GetEntry(0));
+ FillSymbols(aOldSymbols);
+ if (aOldSymbols.GetEntryCount() > 0)
+ SelectSymbol(aOldSymbols.GetEntry(0));
+ FillSymbols(aSymbols);
+ if (aSymbols.GetEntryCount() > 0)
+ SelectSymbol(aSymbols.GetEntry(0));
+
+ UpdateButtons();
+}
+
+
+BOOL SmSymDefineDialog::SelectSymbolSet(ComboBox &rComboBox,
+ const XubString &rSymbolSetName, BOOL bDeleteText)
+{
+ DBG_ASSERT(&rComboBox == &aOldSymbolSets || &rComboBox == &aSymbolSets,
+ "Sm : falsche ComboBox");
+
+ // 'Normalisieren' des SymbolNamens (ohne leading und trailing Leerzeichen)
+ XubString aNormName (rSymbolSetName);
+ aNormName.EraseLeadingChars(' ');
+ aNormName.EraseTrailingChars(' ');
+ // und evtl Abweichungen in der Eingabe beseitigen
+ rComboBox.SetText(aNormName);
+
+ BOOL bRet = FALSE;
+ USHORT nPos = rComboBox.GetEntryPos(aNormName);
+
+ if (nPos != COMBOBOX_ENTRY_NOTFOUND)
+ {
+ rComboBox.SetText(rComboBox.GetEntry(nPos));
+ bRet = TRUE;
+ }
+ else if (bDeleteText)
+ rComboBox.SetText(XubString());
+
+ BOOL bIsOld = &rComboBox == &aOldSymbolSets;
+
+ // setzen des SymbolSet Namens an der zugeh鰎igen Darstellung
+ FixedText &rFT = bIsOld ? aOldSymbolSetName : aSymbolSetName;
+ rFT.SetText(rComboBox.GetText());
+
+ // setzen der zum SymbolSet geh鰎enden Symbol Namen an der zugeh鰎igen
+ // Auswahbox
+ ComboBox &rCB = bIsOld ? aOldSymbols : aSymbols;
+ FillSymbols(rCB, FALSE);
+
+ // bei Wechsel des SymbolSets f黵 das alte Zeichen ein g黮tiges
+ // Symbol bzw keins zur Anzeige bringen
+ if (bIsOld)
+ {
+ XubString aOldSymbolName;
+ if (aOldSymbols.GetEntryCount() > 0)
+ aOldSymbolName = aOldSymbols.GetEntry(0);
+ SelectSymbol(aOldSymbols, aOldSymbolName, TRUE);
+ }
+
+ UpdateButtons();
+
+ return bRet;
+}
+
+
+void SmSymDefineDialog::SetOrigSymbol(const SmSym *pSymbol,
+ const XubString &rSymbolSetName)
+{
+ pOrigSymbol = pSymbol;
+
+ XubString aSymName,
+ aSymSetName;
+ if (pSymbol)
+ {
+ aSymName = pSymbol->GetName();
+ aSymSetName = rSymbolSetName;
+ aOldSymbolDisplay.SetFont(pSymbol->GetFace());
+ aOldSymbolDisplay.SetChar(pSymbol->GetCharacter());
+ }
+ else
+ { // l鰏chen des angezeigten Symbols
+ aOldSymbolDisplay.SetText(XubString());
+ aOldSymbolDisplay.Invalidate();
+ }
+ aOldSymbolName .SetText(aSymName);
+ aOldSymbolSetName.SetText(aSymSetName);
+}
+
+
+BOOL SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox,
+ const XubString &rSymbolName, BOOL bDeleteText)
+{
+ DBG_ASSERT(&rComboBox == &aOldSymbols || &rComboBox == &aSymbols,
+ "Sm : falsche ComboBox");
+
+ // 'Normalisieren' des SymbolNamens (ohne Leerzeichen)
+ XubString aNormName (rSymbolName);
+ aNormName.EraseAllChars(' ');
+ // und evtl Abweichungen in der Eingabe beseitigen
+ rComboBox.SetText(aNormName);
+
+ BOOL bRet = FALSE;
+ USHORT nPos = rComboBox.GetEntryPos(aNormName);
+
+ BOOL bIsOld = &rComboBox == &aOldSymbols;
+
+ if (nPos != COMBOBOX_ENTRY_NOTFOUND)
+ {
+ rComboBox.SetText(rComboBox.GetEntry(nPos));
+
+ if (!bIsOld)
+ {
+ const SmSym *pSymbol = GetSymbol(aSymbols);
+ if (pSymbol)
+ {
+ // Font und Style entsprechend w鋒len
+ const Font &rFont = pSymbol->GetFace();
+ SelectFont(rFont.GetName(), FALSE);
+ SelectStyle(GetFontStyleName(rFont), FALSE);
+
+ // da das setzen des Fonts 黚er den Style Namen des SymbolsFonts nicht
+ // so gut klappt (er kann zB leer sein obwohl der Font selbst 'bold' und
+ // 'italic' ist!). Setzen wir hier den Font wie er zum Symbol geh鰎t
+ // zu Fu.
+ aCharsetDisplay.SetFont(rFont);
+ aSymbolDisplay.SetFont(rFont);
+
+ // das zugeh鰎ige Zeichen ausw鋒len
+ SelectChar(pSymbol->GetCharacter());
+ }
+ }
+
+ bRet = TRUE;
+ }
+ else if (bDeleteText)
+ rComboBox.SetText(XubString());
+
+ if (bIsOld)
+ {
+ // bei Wechsel des alten Symbols nur vorhandene anzeigen sonst keins
+ const SmSym *pOldSymbol = NULL;
+ XubString aOldSymbolSetName;
+ if (nPos != COMBOBOX_ENTRY_NOTFOUND)
+ {
+ pOldSymbol = aSymSetMgrCopy.GetSymbol(aNormName);
+ aOldSymbolSetName = aOldSymbolSets.GetText();
+ }
+ SetOrigSymbol(pOldSymbol, aOldSymbolSetName);
+ }
+ else
+ aSymbolName.SetText(rComboBox.GetText());
+
+ UpdateButtons();
+
+ return bRet;
+}
+
+
+void SmSymDefineDialog::SetFont(const XubString &rFontName, const XubString &rStyleName)
+{
+ // Font (FontInfo) passend zu Namen und Style holen
+ DBG_ASSERT(pFontList, "Sm : NULL pointer");
+ FontInfo aFI( pFontList->Get(rFontName, WEIGHT_NORMAL, ITALIC_NONE) );
+ SetFontStyle(rStyleName, aFI);
+
+ aCharsetDisplay.SetFont(aFI);
+ aSymbolDisplay.SetFont(aFI);
+}
+
+
+BOOL SmSymDefineDialog::SelectFont(const XubString &rFontName, BOOL bApplyFont)
+{
+ BOOL bRet = FALSE;
+ USHORT nPos = aFonts.GetEntryPos(rFontName);
+
+ if (nPos != LISTBOX_ENTRY_NOTFOUND)
+ {
+ aFonts.SelectEntryPos(nPos);
+ if (aStyles.GetEntryCount() > 0)
+ SelectStyle(aStyles.GetEntry(0));
+ if (bApplyFont)
+ SetFont(aFonts.GetSelectEntry(), aStyles.GetText());
+ bRet = TRUE;
+ }
+ else
+ aFonts.SetNoSelection();
+ FillStyles();
+
+ UpdateButtons();
+
+ return bRet;
+}
+
+
+BOOL SmSymDefineDialog::SelectStyle(const XubString &rStyleName, BOOL bApplyFont)
+{
+ BOOL bRet = FALSE;
+ USHORT nPos = aStyles.GetEntryPos(rStyleName);
+
+ // falls der Style nicht zur Auswahl steht nehmen wir den erst m鰃lichen
+ // (sofern vorhanden)
+ if (nPos == COMBOBOX_ENTRY_NOTFOUND && aStyles.GetEntryCount() > 0)
+ nPos = 0;
+
+ if (nPos != COMBOBOX_ENTRY_NOTFOUND)
+ {
+ aStyles.SetText(aStyles.GetEntry(nPos));
+ if (bApplyFont)
+ SetFont(aFonts.GetSelectEntry(), aStyles.GetText());
+ bRet = TRUE;
+ }
+ else
+ aStyles.SetText(XubString());
+
+ UpdateButtons();
+
+ return bRet;
+}
+
+
+void SmSymDefineDialog::SelectChar(xub_Unicode cChar)
+{
+ aCharsetDisplay.SelectChar(cChar);
+ aSymbolDisplay.SetChar(cChar);
+
+ UpdateButtons();
+}
+
+
+/**************************************************************************/
+
+#ifdef NEVER
+SfxTabPage* SmGeneralTabPage::Create(Window* pWindow, const SfxItemSet& rSet)
+{
+ return new SmGeneralTabPage(pWindow, rSet);
+}
+#endif NEVER
+
+
+
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
new file mode 100644
index 000000000000..130f00126f47
--- /dev/null
+++ b/starmath/source/document.cxx
@@ -0,0 +1,1641 @@
+/*************************************************************************
+ *
+ * $RCSfile: document.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:57:26 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#pragma hdrstop
+
+#ifndef _UCBHELPER_CONTENT_HXX
+#include <ucbhelper/content.hxx>
+#endif
+#include <sot/formats.hxx>
+#ifndef _SVSTOR_HXX //autogen
+#include <so3/svstor.hxx>
+#endif
+#ifndef _SFXSMPLHINT_HXX //autogen
+#include <svtools/smplhint.hxx>
+#endif
+#ifndef _SO_CLSIDS_HXX //autogen
+#include <so3/clsids.hxx>
+#endif
+#ifndef _SOT_EXCHANGE_HXX //autogen
+#include <sot/exchange.hxx>
+#endif
+#ifndef _SV_MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _SFX_WHITER_HXX //autogen
+#include <svtools/whiter.hxx>
+#endif
+#ifndef _SFXINTITEM_HXX //autogen
+#include <svtools/intitem.hxx>
+#endif
+#ifndef _SFXSTRITEM_HXX //autogen
+#include <svtools/stritem.hxx>
+#endif
+#ifndef _SFXPTITEM_HXX //autogen
+#include <svtools/ptitem.hxx>
+#endif
+#ifndef _UNDO_HXX //autogen
+#include <svtools/undo.hxx>
+#endif
+#ifndef _SFXITEMPOOL_HXX //autogen
+#include <svtools/itempool.hxx>
+#endif
+#ifndef SVTOOLS_URIHELPER_HXX
+#include <svtools/urihelper.hxx>
+#endif
+#ifndef _SFXDISPATCH_HXX //autogen
+#include <sfx2/dispatch.hxx>
+#endif
+#ifndef _SFXDOCINF_HXX //autogen
+#include <sfx2/docinf.hxx>
+#endif
+#ifndef _SFXDOCFILE_HXX //autogen
+#include <sfx2/docfile.hxx>
+#endif
+#ifndef _SFXAPP_HXX //autogen
+#include <sfx2/app.hxx>
+#endif
+#ifndef _SFXREQUEST_HXX //autogen
+#include <sfx2/request.hxx>
+#endif
+#ifndef _IODLG_HXX
+#include <sfx2/iodlg.hxx>
+#endif
+#ifndef _SFXECODE_HXX //autogen
+#include <svtools/sfxecode.hxx>
+#endif
+#ifndef _SV_EXCHANGE_HXX //autogen
+#include <vcl/exchange.hxx>
+#endif
+#ifndef _SFX_PRINTER_HXX //autogen
+#include <sfx2/printer.hxx>
+#endif
+#ifndef _SFX_DOCFILT_HACK_HXX
+#include <sfx2/docfilt.hxx>
+#endif
+
+#ifndef STARMATH_HRC
+#include <starmath.hrc>
+#endif
+#ifndef DOCUMENT_HXX
+#include <document.hxx>
+#endif
+#ifndef UNOMODEL_HXX
+#include <unomodel.hxx>
+#endif
+#ifndef CONFIG_HXX
+#include <config.hxx>
+#endif
+#ifndef SYMBOL_HXX
+#include <symbol.hxx>
+#endif
+#ifndef TOOLBOX_HXX
+#include <toolbox.hxx>
+#endif
+#ifndef DIALOG_HXX
+#include <dialog.hxx>
+#endif
+#ifndef ACTION_HXX
+#include <action.hxx>
+#endif
+#ifndef VIEW_HXX
+#include <view.hxx>
+#endif
+#ifndef FORMAT_HXX
+#include <format.hxx>
+#endif
+#ifndef MATHTYPE_HXX
+#include <mathtype.hxx>
+#endif
+
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::ucb;
+using namespace ::com::sun::star::uno;
+using namespace ::rtl;
+
+#ifndef SO2_DECL_SVSTORAGESTREAM_DEFINED
+#define SO2_DECL_SVSTORAGESTREAM_DEFINED
+SO2_DECL_REF(SvStorageStream)
+#endif
+#ifndef SO2_DECL_SVSTORAGE_DEFINED
+#define SO2_DECL_SVSTORAGE_DEFINED
+SO2_DECL_REF(SvStorage)
+#endif
+
+#define DOCUMENT_BUFFER_SIZE (USHORT)32768
+
+static const char __FAR_DATA pStarMathDoc[] = "StarMathDocument";
+
+
+/**************************************************************************/
+/*
+**
+** CLASS IMPLEMENTATION
+**
+**/
+
+#define SmDocShell
+#include "smslots.hxx"
+
+TYPEINIT1( SmDocShell, SfxObjectShell );
+
+SFX_IMPL_INTERFACE(SmDocShell, SfxObjectShell, SmResId(0))
+{
+ SFX_POPUPMENU_REGISTRATION(SmResId(RID_VIEWMENU));
+ SFX_POPUPMENU_REGISTRATION(SmResId(RID_COMMANDMENU));
+// SFX_OBJECTBAR_REGISTRATION(
+// SFX_OBJECTBAR_OBJECT|SFX_VISIBILITY_STANDARD|SFX_VISIBILITY_SERVER,
+// SmResId(RID_DEFAULTTOOLBOX));
+}
+
+#if 0
+SFX_IMPL_OBJECTFACTORY(SmDocShell, SFXOBJECTSHELL_STD_NORMAL, smath, SvGlobalName(SO3_SM_CLASSID_50) )
+{
+ SFX_SIMPLE_FILTER_REGISTRATION( C2S("StarMath 5.0"), C2S("*.smf"),
+ SFX_FILTER_OWN | SFX_FILTER_IMPORT | SFX_FILTER_EXPORT,
+ SOT_FORMATSTR_ID_STARMATH_50,
+ C2S("SVsm0.smf"), C2S("OS2"), 0, C2S("0"), String());
+
+//JP 13.06.00: das fehlt vwohl noch, oder??
+// SfxObjectFactory& rFactory = (SfxObjectFactory&)Factory();
+// SfxFactoryFilterContainer *pFltContainer = rFactory.GetFilterContainer( FALSE );
+// rFactory.GetFilterContainer()->SetDetectFilter( &SmDLL::DetectFilter );
+
+ // FG: Sonst gibts keine Hilfe im Math #38447#
+ Factory().RegisterHelpFile (C2S("smath.svh"));
+}
+#else
+SFX_IMPL_OBJECTFACTORY_DLL(SmDocShell, smath, SvGlobalName(SO3_SM_CLASSID_50), Sm);
+#endif
+
+void SmDocShell::SFX_NOTIFY(SfxBroadcaster&, const TypeId&,
+ const SfxHint& rHint, const TypeId&)
+{
+ switch (((SfxSimpleHint&)rHint).GetId())
+ {
+ case HINT_CONFIGCHANGED:
+ {
+ SmModule *pp = SM_MOD1();
+
+ if (pp->GetConfig()->IsAutoRedraw())
+ { nModifyCount++; //! merkw乺dig...
+ // ohne dies wird die Grafik letztlich
+ // nicht geupdatet
+ Resize();
+ }
+ break;
+ }
+
+ case HINT_FORMATCHANGED:
+ SetFormulaArranged(FALSE);
+ nModifyCount++; //! merkw乺dig...
+ // ohne dies wird die Grafik letztlich
+ // nicht geupdatet
+ Resize();
+ break;
+ }
+}
+
+void SmDocShell::LoadSymbols()
+{
+ SmModule *pp = SM_MOD1();
+ String sURL(pp->GetConfig()->GetSymbolFile());
+ SfxIniManager* pIniMgr = SFX_INIMANAGER();
+ sURL = pIniMgr->SubstPathVars( sURL );
+ BOOL bExist = FALSE;
+ INetURLObject aURLObj;
+ aURLObj.SetSmartProtocol( INET_PROT_FILE );
+ aURLObj.SetSmartURL(sURL);
+ try
+ {
+ if(aURLObj.GetProtocol() == INET_PROT_FILE)
+ bExist = ::ucb::Content( aURLObj.GetMainURL(),
+ uno::Reference< XCommandEnvironment >()).isDocument();
+ }
+ catch(...){}
+ if(!bExist)
+ pIniMgr->SearchFile( sURL, SFX_KEY_USERCONFIG_PATH );
+
+ sURL = URIHelper::SmartRelToAbs(sURL);
+ pp->GetSymSetManager()->Load(sURL);
+}
+
+const String &SmDocShell::GetTitle() const
+{
+ return ((SmDocShell *) this)->GetDocInfo().GetTitle();
+}
+
+
+
+const String &SmDocShell::GetComment() const
+{
+ return ((SmDocShell *) this)->GetDocInfo().GetComment();
+}
+
+
+
+void SmDocShell::SetText(const String& rBuffer)
+{
+ if (rBuffer != aText)
+ {
+ aText = rBuffer;
+ Parse();
+ SetFormulaArranged(FALSE);
+ Resize();
+ SmViewShell *pViewSh = SmGetActiveView();
+ if (pViewSh)
+ pViewSh->GetViewFrame()->GetBindings().Invalidate(SID_TEXT);
+ SetModified(TRUE);
+ }
+}
+
+void SmDocShell::SetFormat(SmFormat& rFormat)
+{
+ aFormat = rFormat;
+ SetFormulaArranged(FALSE);
+ SmViewShell *pViewSh = SmGetActiveView();
+ if (pViewSh)
+ pViewSh->GetViewFrame()->GetBindings().Invalidate(SID_GRAPHIC);
+ SetModified(TRUE);
+}
+
+
+void SmDocShell::Parse()
+{
+ if (pTree)
+ delete pTree;
+ pTree = aInterpreter.Parse(aText);
+ nModifyCount++;
+}
+
+
+void SmDocShell::ArrangeFormula()
+{
+ //! Nur f黵 die Dauer der Existenz dieses Objekts sind am Drucker die
+ //! richtigen Einstellungen garantiert.
+ SmPrinterAccess aPrtAcc(*this);
+
+ OutputDevice *pOutDev = aPrtAcc.GetPrinter();
+
+#ifndef PRODUCT
+ if (!pOutDev)
+ DBG_WARNING("Sm : kein Drucker vorhanden");
+#endif
+
+ // falls n鰐ig ein anderes OutputDevice holen f黵 das formatiert wird
+ if (!pOutDev)
+ {
+ SmViewShell *pView = SmGetActiveView();
+ if (pView)
+ pOutDev = &pView->GetGraphicWindow();
+ else
+ { pOutDev = new VirtualDevice;
+ pOutDev->SetMapMode( MapMode(MAP_100TH_MM) );
+ }
+ }
+ DBG_ASSERT(pOutDev->GetMapMode().GetMapUnit() == MAP_100TH_MM,
+ "Sm : falscher MapMode");
+
+ const SmFormat &rFormat = GetFormat();
+ pTree->Prepare(rFormat);
+ pTree->Arrange(*pOutDev, rFormat);
+
+ SetFormulaArranged(TRUE);
+}
+
+
+void SmDocShell::Draw(OutputDevice &rDev, Point &rPosition)
+{
+ if (!pTree)
+ Parse();
+ DBG_ASSERT(pTree, "Sm : NULL pointer");
+
+ if (!IsFormulaArranged())
+ ArrangeFormula();
+
+ //Problem: Was passiert mit dem WYSIWYG? Wir haben waehrend wir inplace aktiv
+ //sind kein Referenzdevice und sind auch nicht darauf ausgerichtet. Es kann
+ //also jetzt eine Differenz zwischen der VisArea (spricht die Groesse im Client)
+ //und der jetzt vorliegenden Groese geben.
+ //Idee: Die Differenz koennte, zumindest behelfsmaessig, mit SmNod::SetSize
+ //angepasst werden.
+
+ rPosition.X() += aFormat.GetDistance( DIS_LEFTSPACE );
+ rPosition.Y() += aFormat.GetDistance( DIS_TOPSPACE );
+ pTree->Draw(rDev, rPosition);
+}
+
+
+
+Size SmDocShell::GetSize()
+{
+ Size aRet;
+
+ if (!pTree)
+ Parse();
+
+ if (pTree)
+ {
+ if (!IsFormulaArranged())
+ ArrangeFormula();
+ aRet = pTree->GetSize();
+
+ if ( !aRet.Width() )
+ aRet.Width() = 2000;
+ else
+ aRet.Width() += aFormat.GetDistance( DIS_LEFTSPACE ) +
+ aFormat.GetDistance( DIS_RIGHTSPACE );
+ if ( !aRet.Height() )
+ aRet.Height() = 1000;
+ else
+ aRet.Height() += aFormat.GetDistance( DIS_TOPSPACE ) +
+ aFormat.GetDistance( DIS_BOTTOMSPACE );
+ }
+
+ return aRet;
+}
+
+////////////////////////////////////////
+
+SmPrinterAccess::SmPrinterAccess( SmDocShell &rDocShell )
+{
+ if ( 0 != (pPrinter = rDocShell.GetPrt()) )
+ {
+ pPrinter->Push( PUSH_MAPMODE );
+ if ( rDocShell.GetProtocol().IsInPlaceActive() ||
+ SFX_CREATE_MODE_EMBEDDED == rDocShell.GetCreateMode() )
+ {
+ // if it is an embedded object (without it's own printer)
+ // we change the MapMode temporarily.
+ //!If it is a document with it's own printer the MapMode should
+ //!be set correct (once) elsewhere(!), in order to avoid numerous
+ //!superfluous pushing and poping of the MapMode when using
+ //!this class.
+
+ const MapUnit eOld = pPrinter->GetMapMode().GetMapUnit();
+ if ( MAP_100TH_MM != eOld )
+ {
+ MapMode aMap( pPrinter->GetMapMode() );
+ aMap.SetMapUnit( MAP_100TH_MM );
+ Point aTmp( aMap.GetOrigin() );
+ aTmp.X() = OutputDevice::LogicToLogic( aTmp.X(), eOld, MAP_100TH_MM );
+ aTmp.Y() = OutputDevice::LogicToLogic( aTmp.Y(), eOld, MAP_100TH_MM );
+ aMap.SetOrigin( aTmp );
+ pPrinter->SetMapMode( aMap );
+ }
+ }
+ }
+}
+
+SmPrinterAccess::~SmPrinterAccess()
+{
+ if ( pPrinter )
+ pPrinter->Pop();
+}
+
+////////////////////////////////////////
+
+Printer *SmDocShell::GetPrt()
+{
+ if ( GetProtocol().IsInPlaceActive() ||
+ SFX_CREATE_MODE_EMBEDDED == GetCreateMode() )
+ {
+ //Normalerweise wird der Printer vom Server besorgt. Wenn dieser aber
+ //keinen liefert (weil etwa noch keine connection da ist), kann es
+ //dennoch sein, dass wir den Printer kennen, denn dieser wird in
+ //OnDocumentPrinterChanged vom Server durchgereicht und dann temporaer
+ //festgehalten.
+ Printer *pPrt = GetDocumentPrinter();
+ if ( !pPrt )
+ pPrt = pTmpPrinter;
+ return pPrt;
+ }
+ else if ( !pPrinter )
+ {
+ SfxItemSet *pOptions =
+ new SfxItemSet(GetPool(),
+ SID_PRINTSIZE, SID_PRINTSIZE,
+ SID_PRINTZOOM, SID_PRINTZOOM,
+ SID_PRINTTITLE, SID_PRINTTITLE,
+ SID_PRINTTEXT, SID_PRINTTEXT,
+ SID_PRINTFRAME, SID_PRINTFRAME,
+ SID_NO_RIGHT_SPACES, SID_NO_RIGHT_SPACES,
+ 0);
+
+ SmModule *pp = SM_MOD1();
+ pp->GetConfig()->ConfigToItemSet(*pOptions);
+ pPrinter = new SfxPrinter(pOptions);
+ pPrinter->SetMapMode( MapMode(MAP_100TH_MM) );
+ }
+ return pPrinter;
+}
+
+
+void SmDocShell::SetPrinter( SfxPrinter *pNew )
+{
+ delete pPrinter;
+ pPrinter = pNew; //Eigentumsuebergang!
+ pPrinter->SetMapMode( MapMode(MAP_100TH_MM) );
+ SetFormulaArranged(FALSE);
+ SM_MOD1()->GetRectCache()->Reset();
+ Resize();
+}
+
+void SmDocShell::OnDocumentPrinterChanged( Printer *pPrt )
+{
+ pTmpPrinter = pPrt;
+ SetFormulaArranged(FALSE);
+ SM_MOD1()->GetRectCache()->Reset();
+ Size aOldSize = GetVisArea().GetSize();
+ Resize();
+ if ( aOldSize != GetVisArea().GetSize() )
+ SetModified( TRUE );
+ pTmpPrinter = 0;
+}
+
+void SmDocShell::Resize()
+{
+ Size aVisSize = GetSize();
+
+ BOOL bIsEnabled = IsEnableSetModified();
+ if ( bIsEnabled )
+ EnableSetModified( FALSE );
+
+ SetUpdateTimeout( 0L );
+ SetVisAreaSize( aVisSize );
+ SmViewShell *pViewSh = SmGetActiveView();
+ if (pViewSh)
+ pViewSh->GetViewFrame()->GetBindings().Invalidate(SID_GRAPHIC);
+
+ if ( bIsEnabled )
+ EnableSetModified( bIsEnabled );
+}
+
+
+SmDocShell::SmDocShell(SfxObjectCreateMode eMode) :
+ SfxObjectShell(eMode),
+ aDataTypeList(SvEmbeddedObject::GetStdFormatList()),
+ pTree( 0 ),
+ pPrinter( 0 ),
+ pTmpPrinter( 0 ),
+ nModifyCount( 0 ),
+ bIsFormulaArranged( FALSE )
+{
+ SetPool(&SFX_APP()->GetPool());
+
+ SmModule *pp = SM_MOD1();
+ aFormat = pp->GetConfig()->GetFormat();
+
+ StartListening(aFormat);
+ StartListening(*pp->GetConfig());
+ LoadSymbols();
+
+ SetShell(this);
+ SetModel( new SmModel(this) ); //! das hier mit new erzeugte Model brauch
+ //! im Destruktor nicht explizit gel鰏cht werden.
+ //! Dies erledigt das Sfx.
+ pUndoMgr = new SfxUndoManager;
+ aDataTypeList.Append(SvDataType(FORMAT_STRING, MEDIUM_MEMORY));
+}
+
+
+
+SmDocShell::~SmDocShell()
+{
+ SmModule *pp = SM_MOD1();
+
+ EndListening(aFormat);
+ EndListening(*pp->GetConfig());
+
+ SaveSymbols();
+
+ delete pUndoMgr;
+ delete pTree;
+ delete pPrinter;
+}
+
+
+
+BOOL SmDocShell::GetData(SvData *pData)
+{
+ if ( FORMAT_STRING == pData->GetFormat() )
+ {
+ pData->SetData(GetText());
+ return TRUE;
+ }
+
+ return SfxInPlaceObject::GetData(pData);
+}
+
+BOOL SmDocShell::SetData( SvData *pData )
+{
+ if ( FORMAT_STRING == pData->GetFormat() )
+ {
+ String aData;
+ if ( pData->GetData( aData ) )
+ {
+ SetText( aData );
+ return TRUE;
+ }
+ }
+ return SfxInPlaceObject::SetData( pData );
+}
+
+void SmDocShell::Convert40To50Txt()
+ // adapts the text 'aText' to be parsed from 4.0 version, to changes made
+ // in 5.0 version. (Namely that functions do not need arguments any more)
+ // Example: "2 over sin x" acts very different in 4.0 and 5.0
+{
+ if (pTree)
+ delete pTree;
+
+ // parse in old 4.0 style and make changes for 5.0 style
+ BOOL bVal = aInterpreter.IsConvert40To50();
+ aInterpreter.SetConvert40To50(TRUE);
+ pTree = aInterpreter.Parse(aText);
+ aInterpreter.SetConvert40To50(bVal);
+
+ // get new to 5.0 version converted text
+ aText = aInterpreter.GetText();
+
+ // clean up tree parsed in old style
+ if (pTree)
+ { delete pTree;
+ pTree = NULL;
+ }
+}
+
+
+BOOL SmDocShell::ConvertFrom(SfxMedium &rMedium)
+{
+ BOOL bSuccess = FALSE;
+ String aTmpStr( C2S( "Equation Native" ));
+ if( rMedium.IsStorage() && rMedium.GetStorage()->IsStream( aTmpStr ))
+ {
+ // is this a MathType Storage?
+ MathType aEquation( aText );
+ bSuccess = aEquation.Parse( rMedium.GetStorage() );
+ }
+ else
+ {
+ SvStream *pStream = rMedium.GetInStream();
+ if (pStream)
+ {
+ bSuccess = ImportSM20File( pStream );
+ rMedium.CloseInStream();
+ }
+ }
+ FinishedLoading( SFX_LOADED_ALL );
+ return bSuccess;
+}
+
+
+
+BOOL SmDocShell::InsertFrom(SfxMedium &rMedium)
+{
+ BOOL bSuccess = FALSE;
+ SvStream *pStream = rMedium.GetInStream();
+
+ if (pStream)
+ {
+ bSuccess = ImportSM20File( pStream, TRUE );
+ rMedium.CloseInStream();
+ }
+ return bSuccess;
+}
+
+
+
+BOOL SmDocShell::InitNew(SvStorage * pStor)
+{
+ BOOL bRet = FALSE;
+ if (SfxInPlaceObject::InitNew(pStor))
+ {
+ bRet = TRUE;
+ SetVisArea(Rectangle(Point(0, 0), Size(2000, 1000)));
+ if (pStor)
+ {
+ aDocStream = pStor->OpenStream(String::CreateFromAscii(pStarMathDoc));
+ aDocStream->SetVersion (pStor->GetVersion ());
+ GetPool().SetFileFormatVersion(USHORT(pStor->GetVersion()));
+
+ if (! aDocStream )
+ bRet = FALSE;
+ }
+ }
+ return bRet;
+}
+
+
+BOOL SmDocShell::Load(SvStorage *pStor)
+{
+ BOOL bRet = FALSE;
+ if( SfxInPlaceObject::Load( pStor ))
+ {
+ String aTmpStr( C2S( "Equation Native" ));
+ if( pStor->IsStream( aTmpStr ))
+ {
+ // is this a MathType Storage?
+ MathType aEquation(aText);
+ bRet = (1 == aEquation.Parse(pStor));
+ }
+ else
+ {
+ bRet = 0 != Try3x (pStor, STREAM_READWRITE);
+
+ if( !bRet )
+ {
+ pStor->Remove(String::CreateFromAscii(pStarMathDoc));
+ bRet = 0 != Try2x (pStor, STREAM_READWRITE);
+ pStor->Remove(C2S("\1Ole10Native"));
+ }
+ else
+ {
+ if ( pStor->GetVersion() <= SOFFICE_FILEFORMAT_40 )
+ Convert40To50Txt();
+ }
+ }
+ }
+ FinishedLoading( SFX_LOADED_ALL );
+ return bRet;
+}
+
+
+
+BOOL SmDocShell::Insert(SvStorage *pStor)
+{
+ String aTemp = aText;
+ BOOL bRet = TRUE;
+
+ if (!Try3x (pStor, STREAM_STD_READ))
+ {
+ pStor->Remove (String::CreateFromAscii(pStarMathDoc));
+ bRet = !Try2x (pStor, STREAM_STD_READ);
+ pStor->Remove(C2S("\1Ole10Native"));
+ }
+
+ if ( bRet )
+ {
+ aTemp += aText;
+ aText = aTemp;
+
+ if ( pStor->GetVersion() <= SOFFICE_FILEFORMAT_40 )
+ Convert40To50Txt();
+
+ Parse();
+ SetModified(TRUE);
+ SmViewShell *pViewSh = SmGetActiveView();
+ if (pViewSh)
+ {
+ SfxBindings &rBnd = pViewSh->GetViewFrame()->GetBindings();
+ rBnd.Invalidate(SID_GRAPHIC);
+ rBnd.Invalidate(SID_TEXT);
+ }
+ }
+ return bRet;
+}
+
+//------------------------------------------------------------------
+
+void SmDocShell::ImplSave( SvStorageStreamRef xStrm )
+{
+ ByteString exString (ExportString(aText));
+ SmModule *pp = SM_MOD1();
+
+ *xStrm << SM304AIDENT << SM50VERSION
+ << 'T';
+ xStrm->WriteByteString(exString);
+ *xStrm << 'F' << aFormat
+ << 'S' << pp->GetSymSetManager()->GetAccessedSymbols()
+ << '\0';
+}
+
+BOOL SmDocShell::Save()
+{
+ if ( SfxInPlaceObject::Save() && aDocStream.Is() )
+ {
+ aDocStream->Seek(0);
+ ImplSave( aDocStream );
+ return TRUE;
+ }
+ return FALSE;
+}
+
+
+BOOL SmDocShell::SaveAs(SvStorage * pNewStor)
+{
+ BOOL bRet = FALSE;
+ if ( SfxInPlaceObject::SaveAs( pNewStor ) )
+ {
+ SvStorageStreamRef aStm = pNewStor->OpenStream(
+ String::CreateFromAscii(pStarMathDoc));
+ aStm->SetVersion( pNewStor->GetVersion() );
+ GetPool().SetFileFormatVersion( USHORT( pNewStor->GetVersion() ));
+ aStm->SetBufferSize(DOCUMENT_BUFFER_SIZE);
+ aStm->SetKey( pNewStor->GetKey() ); // Passwort setzen
+
+ if ( aStm.Is() )
+ {
+ ImplSave( aStm );
+ bRet = TRUE;
+ }
+ }
+ return bRet;
+}
+
+BOOL SmDocShell::ConvertTo( SfxMedium &rMedium )
+{
+ BOOL bRet = FALSE;
+ const SfxFilter* pFlt = rMedium.GetFilter();
+ if( pFlt && pFlt->GetFilterName().EqualsAscii( "MathType 3.x" ))
+ bRet = WriteAsMathType3( rMedium );
+ return bRet;
+}
+
+BOOL SmDocShell::SaveCompleted(SvStorage * pStor)
+{
+ if( SfxInPlaceObject::SaveCompleted( pStor ))
+ {
+ if (! pStor)
+ return TRUE;
+
+ aDocStream = pStor->OpenStream(String::CreateFromAscii(pStarMathDoc));
+ aDocStream->SetVersion (pStor->GetVersion ());
+ GetPool().SetFileFormatVersion(USHORT(pStor->GetVersion()));
+ aDocStream->SetBufferSize(DOCUMENT_BUFFER_SIZE);
+ aDocStream->SetKey( pStor->GetKey() ); // Passwort setzen
+ return aDocStream.Is();
+ }
+ return FALSE;
+}
+
+
+
+BOOL SmDocShell::ImportSM20File(SvStream *pStream, BOOL bInsert)
+{
+ void ReadSM20SymSet(SvStream*, SmSymSet*);
+
+ char cTag;
+ ULONG lIdent, lVersion;
+ long lTime;
+ ULONG lDate;
+ String aBuffer;
+ SmSymSet *pSymbolSet;
+ ULONG FilePos = pStream->Tell();
+
+ *pStream >> lIdent >> lVersion;
+
+ if (lIdent == FRMIDENT)
+ {
+ DBG_ASSERT((lVersion == FRMVERSION), "Illegal file version");
+
+ *pStream >> cTag;
+ rtl_TextEncoding eEnc = gsl_getSystemTextEncoding();
+ while (cTag && !pStream->IsEof())
+ {
+ switch (cTag)
+ {
+ case 'T':
+ pStream->ReadByteString(aBuffer, eEnc);
+ if (! bInsert)
+ {
+ aText = aBuffer;
+ Parse();
+ }
+ else
+ {
+ SmViewShell *pViewSh = SmGetActiveView();
+ if (pViewSh)
+ pViewSh->GetViewFrame()->GetDispatcher()->Execute(
+ SID_INSERTTEXT, SFX_CALLMODE_STANDARD,
+ new SfxStringItem(SID_INSERTTEXT, aBuffer), 0L);
+ }
+ break;
+
+ case 'D':
+ {
+ pStream->ReadByteString(aBuffer, eEnc);
+ pStream->ReadByteString(aBuffer, eEnc);
+ *pStream >> lDate >> lTime;
+ pStream->ReadByteString(aBuffer, eEnc);
+ *pStream >> lDate >> lTime;
+ pStream->ReadByteString(aBuffer, eEnc);
+ }
+ break;
+
+ case 'F':
+ aFormat.ReadSM20Format(*pStream);
+ aFormat.From300To304a ();
+ break;
+
+ case 'S':
+ pSymbolSet = new SmSymSet();
+ ReadSM20SymSet(pStream, pSymbolSet);
+ if (! bInsert)
+ {
+ SmModule *pp = SM_MOD1();
+ pp->GetSymSetManager()->AppendExtraSymbolSet(pSymbolSet);
+ }
+ else
+ delete pSymbolSet;
+ break;
+
+ default:
+ DBG_ASSERT((cTag != 0), "Illegal data tag");
+ }
+ *pStream >> cTag;
+ }
+
+ return TRUE;
+ }
+
+ pStream->Seek(FilePos);
+
+ return FALSE;
+}
+
+
+void SmDocShell::Execute(SfxRequest& rReq)
+{
+ SfxBindings *pBindings = NULL;
+ SmViewShell *pViewSh = SmGetActiveView();
+ if (pViewSh)
+ pBindings = &pViewSh->GetViewFrame()->GetBindings();
+ switch (rReq.GetSlot())
+ {
+ case SID_TEXTMODE:
+ {
+ SmFormat &rFormat = GetFormat();
+ rFormat.SetTextmode(!rFormat.IsTextmode());
+ rFormat.RequestApplyChanges();
+ break;
+ }
+
+ case SID_SYMBOLS_LOAD:
+ {
+ SmModule *pp = SM_MOD1();
+
+ SfxSimpleFileDialog *pFileDialog =
+ new SfxSimpleFileDialog(0, WinBits(WB_OPEN | WB_3DLOOK));
+
+#ifdef MAC
+ pFileDialog->AddFilter(SmResId(RID_SYMBOLFILESSTR), SmResId(RID_FILESYMTYP));
+ pFileDialog->AddFilter(SmResId(RID_ALLFILESSTR), C2S("****"));
+
+ pFileDialog->SetCurFilter(SmResId(RID_SYMBOLFILESSTR));
+#else
+ String aExt( C2S("*.sms" ));
+ pFileDialog->AddFilter(SmResId(RID_SYMBOLFILESSTR), aExt);
+ pFileDialog->AddFilter(SmResId(RID_ALLFILESSTR), C2S("*.*"));
+ pFileDialog->SetCurFilter(SmResId(RID_SYMBOLFILESSTR));
+ pFileDialog->SetDefaultExt(aExt);
+#endif
+
+ pFileDialog->SetPath(pp->GetConfig()->GetSymbolFile());
+
+ if ( RET_OK == pFileDialog->Execute() )
+ {
+ // save old symbols and sets if necessary
+ if (pp->GetSymSetManager()->IsModified())
+ pp->GetSymSetManager()->Save();
+ // load new symbols and sets from file
+ INetURLObject aURLObj;
+ aURLObj.SetSmartProtocol( INET_PROT_FILE );
+ aURLObj.SetSmartURL( pFileDialog->GetPath() );
+ pp->GetSymSetManager()->Load( aURLObj.GetMainURL() );
+ // make that file the new default symbolfile
+ pp->GetConfig()->SetSymbolFile( pFileDialog->GetPath() );
+ }
+
+ delete pFileDialog;
+ }
+ break;
+
+ case SID_AUTO_REDRAW :
+ {
+ SmModule *pp = SM_MOD1();
+ BOOL bRedraw = pp->GetConfig()->IsAutoRedraw();
+ pp->GetConfig()->SetAutoRedraw(!bRedraw);
+ break;
+ }
+
+ case SID_SYMBOLS_CATALOGUE:
+ {
+ SmSymSetManager *pSymSetMgr = SM_MOD1()->GetSymSetManager();
+ SmSymbolDialog(NULL, *pSymSetMgr).Execute();
+ RestartFocusTimer();
+ break;
+ }
+
+ case SID_TOOLBOX:
+ {
+ SmViewShell *pView = SmGetActiveView();
+ pView->GetViewFrame()->ToggleChildWindow(
+ SmToolBoxWrapper::GetChildWindowId() );
+ break;
+ }
+
+ case SID_INSERT_FORMULA:
+ {
+ SfxMedium *pMedium = SFX_APP()->
+ InsertDocumentDialog(SFXWB_INSERT | WB_OPEN | WB_3DLOOK,
+ SmDocShell::Factory());
+
+ if (pMedium != NULL)
+ {
+ if (pMedium->IsStorage())
+ Insert(pMedium->GetStorage());
+ else
+ InsertFrom(*pMedium);
+ delete pMedium;
+
+ SetFormulaArranged(FALSE);
+ // Fenster anpassen, neuzeichnen, ModifyCount erh鰄en,...
+ if (pBindings)
+ pBindings->Invalidate(SID_GRAPHIC);
+ }
+ RestartFocusTimer();
+ rReq.SetReturnValue (SfxBoolItem (rReq.GetSlot(), TRUE));
+ break;
+ }
+
+ case SID_LOADSYMBOLS:
+ LoadSymbols();
+ break;
+
+ case SID_SAVESYMBOLS:
+ SaveSymbols();
+ break;
+
+ case SID_FONT:
+ {
+ SmFontTypeDialog *pFontTypeDialog = new SmFontTypeDialog(NULL);
+
+ pFontTypeDialog->ReadFrom(GetFormat());
+ if (pFontTypeDialog->Execute() == RET_OK)
+ {
+ SmFormat& rOldFormat = GetFormat();
+
+ pFontTypeDialog->WriteTo(GetFormat());
+ GetUndoManager()->AddUndoAction(
+ new SmFormatAction(this, rOldFormat, GetFormat()));
+
+ if (aText.Len ())
+ {
+ SetModified(TRUE);
+ if (pBindings)
+ pBindings->Invalidate(SID_GRAPHIC);
+ }
+ else SetModified (FALSE);
+ }
+ delete pFontTypeDialog;
+ RestartFocusTimer ();
+ break;
+ }
+
+ case SID_FONTSIZE:
+ {
+ SmFontSizeDialog *pFontSizeDialog = new SmFontSizeDialog(NULL);
+
+ pFontSizeDialog->ReadFrom(GetFormat());
+ if (pFontSizeDialog->Execute() == RET_OK)
+ {
+ SmFormat& rOldFormat = GetFormat();
+
+ pFontSizeDialog->WriteTo(GetFormat());
+
+ GetUndoManager()->AddUndoAction(
+ new SmFormatAction(this, rOldFormat, GetFormat()));
+
+ if (aText.Len ())
+ {
+ SetModified(TRUE);
+ if (pBindings)
+ pBindings->Invalidate(SID_GRAPHIC);
+ }
+ else SetModified (FALSE);
+ }
+ delete pFontSizeDialog;
+ RestartFocusTimer ();
+ break;
+ }
+
+ case SID_DISTANCE:
+ {
+ SmDistanceDialog *pDistanceDialog = new SmDistanceDialog(NULL);
+
+ pDistanceDialog->ReadFrom(GetFormat());
+ if (pDistanceDialog->Execute() == RET_OK)
+ {
+ SmFormat& rOldFormat = GetFormat();
+
+ pDistanceDialog->WriteTo(GetFormat());
+
+ GetUndoManager()->AddUndoAction(
+ new SmFormatAction(this, rOldFormat, GetFormat()));
+
+ if (aText.Len ())
+ {
+ SetModified(TRUE);
+ if (pBindings)
+ pBindings->Invalidate(SID_GRAPHIC);
+ }
+ else
+ SetModified (FALSE);
+ }
+ delete pDistanceDialog;
+ RestartFocusTimer ();
+ break;
+ }
+
+ case SID_ALIGN:
+ {
+ SmAlignDialog *pAlignDialog = new SmAlignDialog(NULL);
+
+ pAlignDialog->ReadFrom(GetFormat());
+ if (pAlignDialog->Execute() == RET_OK)
+ {
+ SmFormat& rOldFormat = GetFormat();
+
+ pAlignDialog->WriteTo(GetFormat());
+ SmModule *pp = SM_MOD1();
+ pAlignDialog->WriteTo(pp->GetConfig()->GetFormat());
+
+ GetUndoManager()->AddUndoAction(
+ new SmFormatAction(this, rOldFormat, GetFormat()));
+
+ if (aText.Len ())
+ {
+ SetModified(TRUE);
+ if (pBindings)
+ pBindings->Invalidate(SID_GRAPHIC);
+ }
+ else
+ SetModified (FALSE);
+ }
+ delete pAlignDialog;
+ RestartFocusTimer ();
+ break;
+ }
+
+ case SID_TEXT:
+ {
+ const SfxStringItem& rItem =
+ (const SfxStringItem&)rReq.GetArgs()->Get(SID_TEXT);
+
+ if (GetText() != rItem.GetValue())
+ {
+ GetUndoManager()->AddUndoAction(
+ new SmEditAction(this, GetText(), rItem.GetValue()));
+
+ SetText(rItem.GetValue());
+ }
+ break;
+ }
+
+ case SID_COPYOBJECT:
+ {
+ SvDataMemberObjectRef ObjRef = CreateSnapshot();
+ ObjRef->CopyClipboard();
+ break;
+ }
+
+ case SID_PASTEOBJECT:
+ {
+ SvDataObjectRef ObjRef = SvDataObject::PasteClipboard();
+
+ if (ObjRef.Is())
+ {
+ SvObjectDescriptor ObjDesc(ObjRef);
+
+ if (ObjDesc.GetClassName() == *GetSvFactory())
+ {
+ SvStorageRef StorageRef(new SvStorage(String()));
+ SvData ObjData(SOT_FORMATSTR_ID_EMBED_SOURCE);
+
+ ObjData.SetData(StorageRef, TRANSFER_REFERENCE);
+
+ if (ObjRef->GetDataHere(&ObjData))
+ Insert(StorageRef);
+ }
+ }
+
+ break;
+ }
+ }
+}
+
+
+void SmDocShell::GetState(SfxItemSet &rSet)
+{
+ SfxWhichIter aIter(rSet);
+
+ for (USHORT nWh = aIter.FirstWhich(); 0 != nWh; nWh = aIter.NextWhich())
+ {
+ switch (nWh)
+ {
+ case SID_TEXTMODE:
+ {
+ rSet.Put(SfxBoolItem(SID_TEXTMODE, GetFormat().IsTextmode()));
+ break;
+ }
+
+ case SID_DOCTEMPLATE :
+ rSet.DisableItem (SID_DOCTEMPLATE);
+ break;
+
+ case SID_AUTO_REDRAW :
+ {
+ SmModule *pp = SM_MOD1();
+ BOOL bRedraw = pp->GetConfig()->IsAutoRedraw();
+
+ rSet.Put (SfxBoolItem(SID_AUTO_REDRAW, bRedraw));
+ break;
+ }
+
+ case SID_TOOLBOX:
+ {
+ BOOL bState = FALSE;
+ SmViewShell *pView = SmGetActiveView();
+ SfxChildWindow *pChildWnd = pView->GetViewFrame()->
+ GetChildWindow( SmToolBoxWrapper::GetChildWindowId() );
+
+ if (pChildWnd && pChildWnd->GetWindow()->IsVisible())
+ bState = TRUE;
+ rSet.Put(SfxBoolItem(SID_TOOLBOX, bState));
+ break;
+ }
+
+ case SID_MODIFYSTATUS:
+ {
+ char cMod = ' ';
+ if (IsModified())
+ cMod = '*';
+ rSet.Put(SfxStringItem(SID_MODIFYSTATUS, String(cMod)));
+ break;
+ }
+
+ case SID_TEXT:
+ rSet.Put(SfxStringItem(SID_TEXT, GetText()));
+ break;
+
+ case SID_GRAPHIC:
+ rSet.Put(SfxInt16Item(SID_GRAPHIC, nModifyCount));
+ break;
+ }
+ }
+}
+
+
+
+void SmDocShell::FillRegInfo(SvEmbeddedRegistryInfo * pInfo)
+{
+ SfxInPlaceObject::FillRegInfo(pInfo);
+ pInfo->aObjName.AssignAscii( RTL_CONSTASCII_STRINGPARAM(pStarMathDoc));
+ pInfo->nMajorVers = 5;
+ pInfo->nMinorVers = 0;
+ pInfo->aHumanShortTypeName = String(SmResId(RID_DOCUMENTSTR));
+ pInfo->nShell = REG_SHELL_OPEN | REG_SHELL_PRINT | REG_SHELL_PRINTTO;
+ pInfo->aExt.AssignAscii( RTL_CONSTASCII_STRINGPARAM(".SMF"));
+ pInfo->nIconResId = REG_ICON_RESID_MATH;
+}
+
+
+
+SfxUndoManager *SmDocShell::GetUndoManager ()
+{
+ if (! pUndoMgr)
+ {
+ pUndoMgr = new SfxUndoManager;
+ SetUndoManager(pUndoMgr);
+ }
+ return pUndoMgr;
+}
+
+
+
+void SmDocShell::SaveSymbols()
+{
+ SmModule *pp = SM_MOD1();
+ pp->GetSymSetManager()->Save();
+}
+
+
+
+void SmDocShell::RestartFocusTimer ()
+{
+ SmCmdBoxWrapper *pWrapper = NULL;
+ SmViewShell *pView = SmGetActiveView();
+ if (pView)
+ pWrapper = (SmCmdBoxWrapper *) pView->GetViewFrame()->
+ GetChildWindow( SmCmdBoxWrapper::GetChildWindowId() );
+
+ if (pWrapper)
+ pWrapper->RestartFocusTimer ();
+}
+
+
+
+void SmDocShell::Draw(OutputDevice *pDevice,
+ const JobSetup &,
+ USHORT nAspect)
+{
+ pDevice->IntersectClipRegion(GetVisArea());
+ Point atmppoint;
+ Draw(*pDevice, atmppoint);
+}
+
+
+
+void SmDocShell::HandsOff()
+{
+ SfxInPlaceObject::HandsOff();
+ aDocStream.Clear();
+}
+
+
+
+SvDataMemberObjectRef SmDocShell::CreateSnapshot ()
+{
+ return SfxInPlaceObject::CreateSnapshot ();
+}
+
+
+
+SfxItemPool& SmDocShell::GetPool()
+{
+ return SFX_APP()->GetPool();
+}
+
+const SvDataTypeList& SmDocShell::GetTypeList() const
+{
+ return aDataTypeList;
+}
+
+void SmDocShell::SetVisArea (const Rectangle & rVisArea)
+{
+ Rectangle aNewRect (rVisArea);
+
+ aNewRect.SetPos(Point ());
+
+ if (! aNewRect.Right ()) aNewRect.Right () = 2000;
+ if (! aNewRect.Bottom ()) aNewRect.Bottom () = 1000;
+
+ BOOL bIsEnabled = IsEnableSetModified();
+ if ( bIsEnabled )
+ EnableSetModified( FALSE );
+
+ // If outplace editing, then dont resize the OutplaceWindow. But the
+ // ObjectShell has to resize. Bug 56470
+ BOOL bUnLockFrame;
+ if( GetProtocol().IsEmbed() && !GetProtocol().IsInPlaceActive() &&
+ GetFrame() )
+ {
+ GetFrame()->LockAdjustPosSizePixel();
+ bUnLockFrame = TRUE;
+ }
+ else
+ bUnLockFrame = FALSE;
+
+ SfxInPlaceObject::SetVisArea( aNewRect );
+
+ if( bUnLockFrame )
+ GetFrame()->UnlockAdjustPosSizePixel();
+
+ if ( bIsEnabled )
+ EnableSetModified( bIsEnabled );
+}
+
+
+BOOL SmDocShell::Try3x (SvStorage *pStor,
+ StreamMode eMode)
+
+{
+ BOOL bRet = FALSE;
+
+ SvStorageStreamRef aTempStream = pStor->OpenStream(
+ String::CreateFromAscii(pStarMathDoc), eMode);
+ aTempStream->SetVersion (pStor->GetVersion ());
+ GetPool().SetFileFormatVersion (USHORT(pStor->GetVersion()));
+ aTempStream->SetBufferSize(DOCUMENT_BUFFER_SIZE);
+ aTempStream->SetKey( pStor->GetKey() ); // Passwort setzen
+
+ if (aTempStream->GetError() == 0)
+ {
+ SvStream* pSvStream = aTempStream;
+ char cTag;
+ ULONG lIdent, lVersion;
+ long lTime;
+ ULONG lDate;
+ String aBuffer;
+ SmSymSet *pSymbolSet;
+
+ *pSvStream >> lIdent >> lVersion;
+
+ if ((lIdent == SM30IDENT) || (lIdent == SM30BIDENT) || (lIdent == SM304AIDENT))
+ {
+ DBG_ASSERT((lVersion == SM30VERSION) ||
+ (lVersion == SM50VERSION), "Illegal file version");
+
+ *pSvStream >> cTag;
+ rtl_TextEncoding eEnc = gsl_getSystemTextEncoding();
+ while (cTag && !pSvStream->IsEof())
+ {
+ switch (cTag)
+ {
+ case 'T':
+ pSvStream->ReadByteString(aText, eEnc);
+ Parse();
+ break;
+
+ case 'D':
+ pSvStream->ReadByteString(aBuffer, eEnc);
+ pSvStream->ReadByteString(aBuffer, eEnc);
+ *pSvStream >> lDate >> lTime;
+ pSvStream->ReadByteString(aBuffer, eEnc);
+ *pSvStream >> lDate >> lTime;
+ pSvStream->ReadByteString(aBuffer, eEnc);
+ break;
+
+ case 'F':
+ *pSvStream >> aFormat;
+ if (lIdent != SM304AIDENT)
+ aFormat.From300To304a ();
+ else if ( lVersion == SM30VERSION )
+ {
+ aFormat.SetDistance(DIS_LEFTSPACE, 100);
+ aFormat.SetDistance(DIS_RIGHTSPACE, 100);
+ aFormat.SetDistance(DIS_TOPSPACE, 100);
+ aFormat.SetDistance(DIS_BOTTOMSPACE, 100);
+ }
+ break;
+
+ case 'S':
+ {
+ pSymbolSet = new SmSymSet();
+ *pSvStream >> *pSymbolSet;
+
+ SmModule *pp = SM_MOD1();
+
+ pp->GetSymSetManager()->AppendExtraSymbolSet(pSymbolSet);
+ break;
+ }
+
+ default:
+ DBG_ASSERT((cTag != 0), "Illegal data tag");
+ }
+ *pSvStream >> cTag;
+ }
+
+ bRet = TRUE;
+ aDocStream = aTempStream;
+ }
+ }
+
+ if (!bRet)
+ {
+ // kein Passwort gesetzt --> Datei marode
+ if (pStor->GetKey().Len() == 0)
+ {
+ SetError(ERRCODE_SFX_DOLOADFAILED);
+ }
+ // Passwort gesetzt --> war wohl falsch
+ else
+ {
+ SetError(ERRCODE_SFX_WRONGPASSWORD);
+ }
+ }
+
+ return bRet;
+}
+
+
+
+BOOL SmDocShell::Try2x (SvStorage *pStor,
+ StreamMode eMode)
+{
+ SvStorageStreamRef aTempStream = pStor->OpenStream(C2S("\1Ole10Native"), eMode);
+ aTempStream->SetVersion (pStor->GetVersion ());
+ GetPool().SetFileFormatVersion(USHORT(pStor->GetVersion ()));
+
+ if (aTempStream->GetError() == SVSTREAM_OK)
+ {
+ void ReadSM20SymSet(SvStream*, SmSymSet*);
+
+ SvStream* pSvStream = aTempStream;
+ char cTag;
+ ULONG lIdent, lVersion;
+ long lTime;
+ ULONG lDate;
+ UINT32 lDataSize;
+ String aBuffer;
+ SmSymSet *pSymbolSet;
+
+ *pSvStream >> lDataSize >> lIdent >> lVersion;
+
+ if (lIdent == FRMIDENT)
+ {
+ DBG_ASSERT((lVersion == FRMVERSION), "Illegal file version");
+
+ *pSvStream >> cTag;
+ rtl_TextEncoding eEnc = gsl_getSystemTextEncoding();
+ while (cTag && !pSvStream->IsEof())
+ {
+ switch (cTag)
+ {
+ case 'T':
+ pSvStream->ReadByteString(aBuffer, eEnc);
+ aText = aBuffer;
+ Parse();
+ break;
+
+ case 'D':
+ {
+ pSvStream->ReadByteString(aBuffer, eEnc);
+ pSvStream->ReadByteString(aBuffer, eEnc);
+ *pSvStream >> lDate >> lTime;
+ pSvStream->ReadByteString(aBuffer, eEnc);
+ *pSvStream >> lDate >> lTime;
+ pSvStream->ReadByteString(aBuffer, eEnc);
+ }
+ break;
+
+ case 'F':
+ {
+ //SmFormat aFormat;
+ aFormat.ReadSM20Format(*pSvStream);
+ aFormat.From300To304a ();
+ }
+ break;
+
+ case 'S':
+ {
+ pSymbolSet = new SmSymSet();
+ ReadSM20SymSet(pSvStream, pSymbolSet);
+
+ SmModule *pp = SM_MOD1();
+
+ pp->GetSymSetManager()->AppendExtraSymbolSet(pSymbolSet);
+ break;
+ }
+
+ default:
+ DBG_ASSERT((cTag != 0), "Illegal data tag");
+ }
+ *pSvStream >> cTag;
+ }
+
+ return TRUE;
+ }
+ }
+
+ return FALSE;
+}
+
+
+
+void SmDocShell::UIActivate (BOOL bActivate)
+{
+ if (bActivate)
+ {
+ SfxInPlaceObject::UIActivate (bActivate);
+ SmCmdBoxWrapper *pWrapper = NULL;
+ SmViewShell *pView = SmGetActiveView();
+ if (pView)
+ pWrapper = (SmCmdBoxWrapper *)pView->GetViewFrame()->
+ GetChildWindow( SmCmdBoxWrapper::GetChildWindowId() );
+
+ if (pWrapper)
+ pWrapper->Grab ();
+ }
+ else
+ {
+ SmViewShell *pViewSh = SmGetActiveView();
+ if (pViewSh)
+ {
+ pViewSh->GetViewFrame()->GetDispatcher()->Execute(
+ SID_GETEDITTEXT, SFX_CALLMODE_STANDARD,
+ new SfxVoidItem (SID_GETEDITTEXT), 0L);
+ SfxInPlaceObject::UIActivate (bActivate);
+ Resize();
+ }
+ }
+}
+
+
+
+void SmDocShell::FillClass(SvGlobalName* pClassName,
+ ULONG* pFormat,
+ String* pAppName,
+ String* pFullTypeName,
+ String* pShortTypeName,
+ long nFileFormat) const
+{
+ SfxInPlaceObject::FillClass(pClassName, pFormat, pAppName, pFullTypeName,
+ pShortTypeName, nFileFormat);
+
+ if (nFileFormat == SOFFICE_FILEFORMAT_31)
+ {
+ *pClassName = SvGlobalName(SO3_SM_CLASSID_30);
+ *pFormat = SOT_FORMATSTR_ID_STARMATH;
+ pAppName->AssignAscii( RTL_CONSTASCII_STRINGPARAM("Smath 3.1"));
+ *pFullTypeName = String(SmResId(STR_MATH_DOCUMENT_FULLTYPE_31));
+ *pShortTypeName = String(SmResId(RID_DOCUMENTSTR));
+ }
+ else if (nFileFormat == SOFFICE_FILEFORMAT_40)
+ {
+ *pClassName = SvGlobalName(SO3_SM_CLASSID_40);
+ *pFormat = SOT_FORMATSTR_ID_STARMATH_40;
+ *pFullTypeName = String(SmResId(STR_MATH_DOCUMENT_FULLTYPE_40));
+ *pShortTypeName = String(SmResId(RID_DOCUMENTSTR));
+ }
+ else if (nFileFormat == SOFFICE_FILEFORMAT_NOW)
+ {
+ *pFullTypeName = String(SmResId(STR_MATH_DOCUMENT_FULLTYPE_50));
+ *pShortTypeName = String(SmResId(RID_DOCUMENTSTR));
+ }
+}
+
+ULONG SmDocShell::GetMiscStatus() const
+{
+ return SfxInPlaceObject::GetMiscStatus() | SVOBJ_MISCSTATUS_NOTRESIZEABLE
+ | SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE;
+}
+
+void SmDocShell::SetModified(BOOL bModified)
+{
+ SfxObjectShell::SetModified(bModified);
+ Broadcast(SfxSimpleHint(SFX_HINT_DOCCHANGED));
+}
+
+BOOL SmDocShell::WriteAsMathType3( SfxMedium& rMedium )
+{
+ MathType aEquation( aText, pTree );
+ BOOL bRet = 0 != aEquation.ConvertFromStarMath( rMedium.GetStorage() );
+ return bRet;
+}
+
+
+
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx
new file mode 100644
index 000000000000..6b1bcc163791
--- /dev/null
+++ b/starmath/source/edit.cxx
@@ -0,0 +1,783 @@
+/*************************************************************************
+ *
+ * $RCSfile: edit.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:57:26 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#pragma hdrstop
+
+#include "starmath.hrc"
+#define ITEMID_FONT 1
+#define ITEMID_FONTHEIGHT 2
+#define ITEMID_LRSPACE 3
+#define ITEMID_WEIGHT 4
+
+
+#ifndef _SV_MENU_HXX //autogen
+#include <vcl/menu.hxx>
+#endif
+#ifndef _MyEDITVIEW_HXX //autogen
+#include <svx/editview.hxx>
+#endif
+#ifndef _MyEDITENG_HXX //autogen
+#include <svx/editeng.hxx>
+#endif
+#ifndef _EDITSTAT_HXX //autogen
+#include <svx/editstat.hxx>
+#endif
+#ifndef _EEITEM_HXX //autogen
+#include <svx/eeitem.hxx>
+#endif
+#ifndef _SFXDISPATCH_HXX //autogen
+#include <sfx2/dispatch.hxx>
+#endif
+#ifndef _SFXINTITEM_HXX //autogen
+#include <svtools/intitem.hxx>
+#endif
+#ifndef _SFXITEMPOOL_HXX //autogen
+#include <svtools/itempool.hxx>
+#endif
+#ifndef _SFXSTRITEM_HXX //autogen
+#include <svtools/stritem.hxx>
+#endif
+#ifndef _SVX_FHGTITEM_HXX //autogen
+#include <svx/fhgtitem.hxx>
+#endif
+#ifndef _SVX_WGHTITEM_HXX //autogen
+#include <svx/wghtitem.hxx>
+#endif
+#ifndef _SVX_LRSPITEM_HXX //autogen
+#include <svx/lrspitem.hxx>
+#endif
+#ifndef _SFXITEMSET_HXX //autogen
+#include <svtools/itemset.hxx>
+#endif
+#ifndef _SVX_FONTITEM_HXX //autogen
+#include <svx/fontitem.hxx>
+#endif
+
+
+#include "edit.hxx"
+#include "view.hxx"
+#include "document.hxx"
+#include "config.hxx"
+
+#define SCROLL_LINE 24
+
+#define MINWIDTH 200
+#define MINHEIGHT 200
+#define MINSPLIT 40
+#define SPLITTERWIDTH 2
+
+
+////////////////////////////////////////
+
+
+void SmGetLeftSelectionPart(const ESelection aSel,
+ USHORT &nPara, USHORT &nPos)
+ // returns paragraph number and position of the selections left part
+{
+ // compare start and end of selection and use the one that comes first
+ if ( aSel.nStartPara < aSel.nEndPara
+ || aSel.nStartPara == aSel.nEndPara && aSel.nStartPos < aSel.nEndPos)
+ { nPara = aSel.nStartPara;
+ nPos = aSel.nStartPos;
+ }
+ else
+ { nPara = aSel.nEndPara;
+ nPos = aSel.nEndPos;
+ }
+}
+
+////////////////////////////////////////
+
+SmEditWindow::SmEditWindow(Window* pParent) :
+ Window(pParent),
+ pEditView( 0 ),
+#if SUPD >= 602
+ pEditEngineItemPool( 0 ),
+#endif
+ pEditEngine( 0 ),
+ pHScrollBar( 0 ),
+ pVScrollBar( 0 ),
+ pScrollBox( 0 )
+{
+ SetHelpId(HID_SMA_COMMAND_WIN_EDIT);
+ EnableDrop();
+ SetMapMode(MAP_PIXEL);
+
+ SetBackground( GetSettings().GetStyleSettings().GetWindowColor() );
+
+ aModifyTimer.SetTimeoutHdl(LINK(this, SmEditWindow, ModifyTimerHdl));
+ aModifyTimer.SetTimeout(2000);
+ aModifyTimer.Start();
+
+ aCursorMoveTimer.SetTimeoutHdl(LINK(this, SmEditWindow, CursorMoveTimerHdl));
+ aCursorMoveTimer.SetTimeout(500);
+}
+
+SmEditWindow::~SmEditWindow()
+{
+ aCursorMoveTimer.Stop();
+ aModifyTimer.Stop();
+ if ( pEditEngine )
+ {
+ pEditEngine->RemoveView(pEditView);
+ delete pEditView;
+ delete pEditEngine;
+#if SUPD >= 602
+ delete pEditEngineItemPool;
+#endif
+ delete pHScrollBar;
+ delete pVScrollBar;
+ delete pScrollBox;
+ }
+}
+
+
+void SmEditWindow::ImplSetFont()
+{
+ SetPointFont( GetSettings().GetStyleSettings().GetAppFont() );
+ if ( pEditEngine )
+ {
+ Font aFont = GetFont();
+ pEditEngine->SetDefTab( USHORT( GetTextWidth( C2S("XXXX") ) ) );
+
+#if SUPD >= 602
+ DBG_ASSERT( pEditEngineItemPool, "NULL pointer");
+ pEditEngineItemPool->SetPoolDefaultItem(
+ SvxFontItem( aFont.GetFamily(), aFont.GetName(),
+ aFont.GetStyleName(), aFont.GetPitch(), aFont.GetCharSet(),
+ EE_CHAR_FONTINFO ) );
+ pEditEngineItemPool->SetPoolDefaultItem(
+ SvxFontHeightItem( aFont.GetSize().Height(), 100,
+ EE_CHAR_FONTHEIGHT ) );
+// pEditEngineItemPool->SetPoolDefaultItem(
+// SvxWeightItem( WEIGHT_BOLD, EE_CHAR_WEIGHT ) );
+#else
+ SfxItemSet aSet( pEditEngine->GetEmptyItemSet() );
+ aSet.Put( SvxFontItem( aFont.GetFamily(), aFont.GetName(),
+ aFont.GetStyleName(), aFont.GetPitch(), aFont.GetCharSet(),
+ EE_CHAR_FONTINFO ) );
+ aSet.Put( SvxFontHeightItem( aFont.GetSize().Height(), 100, EE_CHAR_FONTHEIGHT ) );
+// aSet.Put( SvxWeightItem(WEIGHT_BOLD, EE_CHAR_WEIGHT ) );
+
+ pEditEngine->SetDefaults(aSet);
+#endif
+ }
+}
+
+void SmEditWindow::DataChanged( const DataChangedEvent& )
+{
+ SetBackground( GetSettings().GetStyleSettings().GetWindowColor() );
+ ImplSetFont();
+ AdjustScrollBars();
+ Resize();
+}
+
+IMPL_LINK( SmEditWindow, ModifyTimerHdl, Timer *, pTimer )
+{
+ SmModule *pp = SM_MOD1();
+ if (pp->GetConfig()->IsAutoRedraw())
+ Flush();
+ aModifyTimer.Start();
+ return 0;
+}
+
+
+IMPL_LINK(SmEditWindow, CursorMoveTimerHdl, Timer *, pTimer)
+ // every once in a while check cursor position (selection) of edit
+ // window and if it has changed (try to) set the formula-cursor
+ // according to that.
+{
+ ESelection aNewSelection (GetSelection());
+
+ if (!aNewSelection.IsEqual(aOldSelection))
+ { SmViewShell *pView = SmGetActiveView();
+ //! woher wei man, dass die Shell die wir hier kriegen die ist, die
+ //! zu dem SmEditWindow gehoert fuer das er gestartet wurde?
+ //! (Eine ViewShell vom Math ist es immer)
+ //! Siehe auch Kommentar zu:
+ //! SmEditWindow::SetText und SmViewShell::Activate
+
+ if (pView)
+ {
+ // get row and column to look for
+ USHORT nRow, nCol;
+ SmGetLeftSelectionPart(aNewSelection, nRow, nCol);
+ nRow++;
+ nCol++;
+
+ pView->GetGraphicWindow().SetCursorPos(nRow, nCol);
+
+ aOldSelection = aNewSelection;
+ }
+ }
+
+ return 0;
+}
+
+
+void SmEditWindow::Resize()
+{
+ if (!pEditEngine)
+ CreateEditEngine();
+
+ if (pEditView)
+ {
+ pEditView->SetOutputArea(AdjustScrollBars());
+ pEditView->ShowCursor();
+
+ const long nMaxVisAreaStart = pEditView->GetEditEngine()->GetTextHeight() -
+ pEditView->GetOutputArea().GetHeight();
+ if (pEditView->GetVisArea().Top() > nMaxVisAreaStart)
+ {
+ Rectangle aVisArea(pEditView->GetVisArea() );
+ aVisArea.Top() = (nMaxVisAreaStart > 0 ) ? nMaxVisAreaStart : 0;
+ aVisArea.SetSize(pEditView->GetOutputArea().GetSize());
+ pEditView->SetVisArea(aVisArea);
+ pEditView->ShowCursor();
+ }
+ InitScrollBars();
+ }
+ Invalidate();
+}
+
+void SmEditWindow::MouseButtonUp(const MouseEvent &rEvt)
+{
+ if (pEditView)
+ pEditView->MouseButtonUp(rEvt);
+ else
+ Window::MouseButtonUp (rEvt);
+
+ // ggf FormulaCursor neu positionieren
+ CursorMoveTimerHdl(&aCursorMoveTimer);
+}
+
+void SmEditWindow::MouseButtonDown(const MouseEvent &rEvt)
+{
+ if (pEditView)
+ pEditView->MouseButtonDown(rEvt);
+ else
+ Window::MouseButtonDown (rEvt);
+
+ GrabFocus();
+}
+
+void SmEditWindow::Command(const CommandEvent& rCEvt)
+{
+ if (rCEvt.GetCommand() == COMMAND_CONTEXTMENU)
+ {
+ GetParent()->ToTop();
+
+ PopupMenu* pPopupMenu = new PopupMenu(SmResId(RID_COMMANDMENU));
+ pPopupMenu->SetSelectHdl(LINK(this, SmEditWindow, MenuSelectHdl));
+
+ pPopupMenu->Execute( this, OutputToScreenPixel(
+ rCEvt.GetMousePosPixel() ) );
+ delete pPopupMenu;
+ }
+ else if (pEditView)
+ pEditView->Command( rCEvt );
+ else
+ Window::Command (rCEvt);
+}
+
+IMPL_LINK_INLINE_START( SmEditWindow, MenuSelectHdl, Menu *, pMenu )
+{
+ SmViewShell *pViewSh = SmGetActiveView();
+ if (pViewSh)
+ pViewSh->GetViewFrame()->GetDispatcher()->Execute(
+ SID_INSERTCOMMAND, SFX_CALLMODE_STANDARD,
+ new SfxInt16Item(SID_INSERTCOMMAND, pMenu->GetCurItemId()), 0L);
+ return 0;
+}
+IMPL_LINK_INLINE_END( SmEditWindow, MenuSelectHdl, Menu *, pMenu )
+
+void SmEditWindow::KeyInput(const KeyEvent& rKEvt)
+{
+ if (rKEvt.GetKeyCode().GetCode() == KEY_ESCAPE)
+ {
+ BOOL bCallBase = TRUE;
+ SfxViewShell* pViewShell = SfxViewShell::Current();
+ if ( pViewShell && pViewShell->ISA(SmViewShell) )
+ {
+ SmDocShell* pDocSh = (SmDocShell*) pViewShell->GetViewFrame()->GetObjectShell();
+ if (pDocSh)
+ {
+ /* fuert zum (sofortigen) Zerstoeren von this! */
+ pDocSh->DoInPlaceActivate( FALSE );
+ bCallBase = FALSE;
+ }
+ }
+ if ( bCallBase )
+ Window::KeyInput( rKEvt );
+ }
+ else
+ {
+ // Timer neu starten, um den Handler (auch bei l鋘geren Eingaben)
+ // m鰃lichst nur einmal am Ende aufzurufen.
+ aCursorMoveTimer.Start();
+
+ if ( !pEditView->PostKeyEvent(rKEvt) )
+ {
+ if ( !SfxViewShell::Current()->KeyInput(rKEvt) )
+ {
+ /* fuert bei F1 (Hilfe) zum Zerstoeren von this! */
+ Flush();
+ if ( aModifyTimer.IsActive() )
+ aModifyTimer.Stop();
+ Window::KeyInput(rKEvt);
+ }
+ else
+ {
+ //SFX hat evtl. Slot an der View gecallt und dabei (wg. Hack
+ //im SFX) den Focus auf die View gesetzt
+ SfxViewShell* pVShell = SfxViewShell::Current();
+ if ( pVShell && pVShell->ISA(SmViewShell) &&
+ ((SmViewShell*)pVShell)->GetGraphicWindow().HasFocus() )
+ {
+ GrabFocus();
+ }
+ }
+ }
+ else
+ aModifyTimer.Start();
+ }
+}
+
+void SmEditWindow::Paint(const Rectangle& rRect)
+{
+ if (!pEditEngine)
+ CreateEditEngine();
+
+ pEditView->Paint(rRect);
+}
+
+void SmEditWindow::CreateEditEngine()
+{
+ if (! pEditEngine)
+ {
+#if SUPD >= 602
+ pEditEngineItemPool = EditEngine::CreatePool();
+ pEditEngine = new EditEngine( pEditEngineItemPool );
+#else
+ pEditEngine = new EditEngine;
+#endif
+ pEditView = new EditView(pEditEngine, this);
+ pEditEngine->SetUpdateMode(FALSE);
+ pEditEngine->InsertView(pEditView);
+
+ pEditEngine->SetControlWord((pEditEngine->GetControlWord() | EE_CNTRL_AUTOINDENTING) &
+ (~EE_CNTRL_UNDOATTRIBS) & (~EE_CNTRL_PASTESPECIAL));
+
+ pEditEngine->SetWordDelimiters( C2S(" .=+-*/(){}[];\"" ));
+ pEditEngine->SetRefMapMode(MAP_PIXEL);
+
+ ImplSetFont();
+ pEditEngine->Clear(); //#77957 incorrect font size
+
+ pEditEngine->SetPaperSize( Size( 800, 0 ) );
+
+ pVScrollBar = new ScrollBar(this, WinBits(WB_VSCROLL));
+ pHScrollBar = new ScrollBar(this, WinBits(WB_HSCROLL));
+ pVScrollBar->SetScrollHdl(LINK(this, SmEditWindow, ScrollHdl));
+ pHScrollBar->SetScrollHdl(LINK(this, SmEditWindow, ScrollHdl));
+ pScrollBox = new ScrollBarBox(this);
+
+ pEditView->SetOutputArea(AdjustScrollBars());
+
+ ESelection eSelection;
+
+ pEditView->SetSelection(eSelection);
+ pEditEngine->SetUpdateMode(TRUE);
+ Update();
+ pEditView->ShowCursor(TRUE, TRUE);
+
+ pEditEngine->SetStatusEventHdl(LINK(this, SmEditWindow, EditStatusHdl));
+ SetPointer(pEditView->GetPointer());
+
+ pEditEngine->EraseVirtualDevice();
+ pEditEngine->ClearModifyFlag();
+
+ SetScrollBarRanges();
+ }
+}
+
+IMPL_LINK( SmEditWindow, EditStatusHdl, EditStatus *, pStat )
+{
+ if (! pEditView)
+ return 1;
+ else
+ {
+ SetScrollBarRanges();
+ return 0;
+ }
+}
+
+IMPL_LINK_INLINE_START( SmEditWindow, ScrollHdl, ScrollBar *, pScrollBar )
+{
+ pEditView->SetVisArea(Rectangle(Point(pHScrollBar->GetThumbPos(),
+ pVScrollBar->GetThumbPos()),
+ pEditView->GetVisArea().GetSize()));
+ pEditView->Invalidate();
+ return 0;
+}
+IMPL_LINK_INLINE_END( SmEditWindow, ScrollHdl, ScrollBar *, pScrollBar )
+
+Rectangle SmEditWindow::AdjustScrollBars()
+{
+ const Size aOut( GetOutputSizePixel() );
+ Point aPoint;
+ Rectangle aRect( aPoint, aOut );
+
+ if ( pEditEngine )
+ {
+ const long nTmp = GetSettings().GetStyleSettings().GetScrollBarSize();
+ Point aPt( aRect.TopRight() ); aPt.X() -= nTmp -1L;
+ pVScrollBar->SetPosSizePixel( aPt, Size(nTmp, aOut.Height() - nTmp));
+
+ aPt = aRect.BottomLeft(); aPt.Y() -= nTmp - 1L;
+ pHScrollBar->SetPosSizePixel( aPt, Size(aOut.Width() - nTmp, nTmp));
+
+ aPt.X() = pHScrollBar->GetSizePixel().Width();
+ aPt.Y() = pVScrollBar->GetSizePixel().Height();
+ pScrollBox->SetPosSizePixel(aPt, Size(nTmp, nTmp ));
+
+ aRect.Right() = aPt.X() - 2;
+ aRect.Bottom() = aPt.Y() - 2;
+ }
+ return aRect;
+}
+
+void SmEditWindow::SetScrollBarRanges()
+{
+ // Extra-Methode, nicht InitScrollBars, da auch fuer EditEngine-Events.
+ if (pEditEngine )
+ {
+ long nTmp = pEditEngine->GetTextHeight();
+ pVScrollBar->SetRange(Range(0, nTmp));
+ pVScrollBar->SetThumbPos(pEditView->GetVisArea().Top());
+
+ nTmp = pEditEngine->GetPaperSize().Width();
+ pHScrollBar->SetRange(Range(0,nTmp));
+ pHScrollBar->SetThumbPos(pEditView->GetVisArea().Left());
+ }
+}
+
+void SmEditWindow::InitScrollBars()
+{
+ if (pEditEngine )
+ {
+ const Size aOut( pEditView->GetOutputArea().GetSize() );
+ pVScrollBar->SetVisibleSize(aOut.Height());
+ pVScrollBar->SetPageSize(aOut.Height() * 8 / 10);
+ pVScrollBar->SetLineSize(aOut.Height() * 2 / 10);
+
+ pHScrollBar->SetVisibleSize(aOut.Width());
+ pHScrollBar->SetPageSize(aOut.Width() * 8 / 10);
+ pHScrollBar->SetLineSize(SCROLL_LINE );
+
+ SetScrollBarRanges();
+
+ pVScrollBar->Show();
+ pHScrollBar->Show();
+ pScrollBox->Show();
+ }
+}
+
+XubString SmEditWindow::GetText()
+{
+ if (!pEditEngine)
+ CreateEditEngine();
+
+ String aText (pEditEngine->GetText( LINEEND_LF ));
+ return aText;
+}
+
+void SmEditWindow::SetText(const XubString& rText)
+{
+ if (!pEditEngine)
+ CreateEditEngine();
+
+ if (!pEditEngine->IsModified())
+ {
+ ESelection eSelection = pEditView->GetSelection();
+
+ pEditEngine->SetText(rText);
+ pEditEngine->ClearModifyFlag();
+
+ //! Hier die Timer neu zu starten verhindert, dass die Handler f黵 andere
+ //! (im Augenblick nicht mehr aktive) Math Tasks aufgerufen werden.
+ aModifyTimer.Start();
+ aCursorMoveTimer.Start();
+
+ pEditView->SetSelection(eSelection);
+ }
+}
+
+BOOL SmEditWindow::IsAllSelected() const
+{
+ ESelection eSelection = pEditView->GetSelection();
+
+ if (!(pEditEngine->GetParagraphCount() - 1))
+ {
+ String Text (pEditEngine->GetText( LINEEND_LF ));
+ return !eSelection.nStartPos && (eSelection.nEndPos == Text.Len () - 1);
+ }
+ else
+ return !eSelection.nStartPara && (eSelection.nEndPara == (pEditEngine->GetParagraphCount() - 1));
+}
+
+void SmEditWindow::SelectAll()
+{
+ // set selection from first paragraph, first char to
+ // last paragraph, last char
+ ULONG nParaCnt = pEditEngine->GetParagraphCount(); //! always >= 1
+ DBG_ASSERT( nParaCnt >= 1, "Sm : paragraph count is 0!" );
+ ULONG nParaLen = pEditEngine->GetTextLen( nParaCnt - 1 );
+ pEditView->SetSelection( ESelection( 0, 0, nParaCnt - 1, nParaLen - 1 ) );
+}
+
+void SmEditWindow::InsertCommand(USHORT Command)
+{
+ //Anfang der Selektion merken und hinterher den Cursor daraufsetzen. Nur so
+ //macht das SelNextMark() Sinn.
+ ESelection aSelection = pEditView->GetSelection();
+ aSelection.nEndPos = aSelection.nStartPos;
+ aSelection.nEndPara = aSelection.nStartPara;
+
+ String aText = String(SmResId(Command));
+ pEditView->InsertText(aText);
+
+ if (HasMark(aText))
+ { // set selection to next mark
+ pEditView->SetSelection(aSelection);
+ SelNextMark();
+ }
+ else
+ { // set selection after inserted text
+ aSelection.nStartPos =
+ aSelection.nEndPos += aText.Len();
+ pEditView->SetSelection(aSelection);
+ }
+
+ GrabFocus();
+}
+
+void SmEditWindow::MarkError(const Point &rPos)
+{
+ const int Col = rPos.X();
+ const int Row = rPos.Y() - 1;
+
+ pEditView->SetSelection(ESelection (Row, Col - 1, Row, Col));
+ GrabFocus();
+}
+
+void SmEditWindow::SelNextMark()
+{
+ ESelection eSelection = pEditView->GetSelection();
+ USHORT Pos = eSelection.nEndPos;
+ String aMark (C2S("<?>"));
+ String aText;
+ USHORT nCounts = pEditEngine->GetParagraphCount();
+
+ while (eSelection.nEndPara < nCounts)
+ {
+ aText = pEditEngine->GetText(eSelection.nEndPara);
+ Pos = aText.Search(aMark, Pos);
+
+ if (Pos != STRING_NOTFOUND)
+ {
+ pEditView->SetSelection(ESelection (eSelection.nEndPara, Pos, eSelection.nEndPara, Pos + 3));
+ break;
+ }
+
+ Pos = 0;
+ eSelection.nEndPara++;
+ }
+}
+
+void SmEditWindow::SelPrevMark()
+{
+ ESelection eSelection = pEditView->GetSelection();
+ USHORT Pos = STRING_NOTFOUND;
+ xub_StrLen Max = eSelection.nStartPos;
+ String Text (pEditEngine->GetText(eSelection.nStartPara));
+ String aMark (C2S("<?>"));
+ USHORT nCounts = pEditEngine->GetParagraphCount();
+
+ do
+ {
+ USHORT Fnd = Text.Search(aMark, 0);
+
+ while ((Fnd < Max) && (Fnd != STRING_NOTFOUND))
+ {
+ Pos = Fnd;
+ Fnd = Text.Search(aMark, Fnd + 1);
+ }
+
+ if (Pos == STRING_NOTFOUND)
+ {
+ eSelection.nStartPara--;
+ Text = pEditEngine->GetText(eSelection.nStartPara);
+ Max = Text.Len();
+ }
+ }
+ while ((eSelection.nStartPara < nCounts) &&
+ (Pos == STRING_NOTFOUND));
+
+ if (Pos != STRING_NOTFOUND)
+ {
+ pEditView->SetSelection(ESelection (eSelection.nStartPara, Pos, eSelection.nStartPara, Pos + 3));
+ }
+}
+
+BOOL SmEditWindow::HasMark(const String& rText) const
+ // returns true iff 'rText' contains a mark
+{
+ return rText.SearchAscii("<?>", 0) != STRING_NOTFOUND;
+}
+
+void SmEditWindow::MouseMove(const MouseEvent &rEvt)
+{
+ if (pEditView) pEditView->MouseMove(rEvt);
+}
+
+BOOL SmEditWindow::Drop(const DropEvent& rEvt)
+{
+ return pEditView
+ ? (pEditView->Drop(rEvt))
+ : FALSE;
+}
+
+BOOL SmEditWindow::QueryDrop(DropEvent& rEvt)
+{
+ return pEditView
+ ? pEditView->QueryDrop(rEvt)
+ : FALSE;
+}
+
+ESelection SmEditWindow::GetSelection() const
+{
+ DBG_ASSERT(pEditView, "Sm : NULL pointer");
+ return pEditView->GetSelection();
+}
+
+void SmEditWindow::SetSelection(const ESelection &rSel)
+{
+ DBG_ASSERT(pEditView, "Sm : NULL pointer");
+ pEditView->SetSelection(rSel);
+}
+
+BOOL SmEditWindow::IsEmpty() const
+{
+ return pEditEngine->GetTextLen() == 0;
+}
+
+BOOL SmEditWindow::IsSelected() const
+{
+ return pEditView->HasSelection();
+}
+
+void SmEditWindow::Cut()
+{
+ pEditView->Cut();
+}
+
+void SmEditWindow::Copy()
+{
+ pEditView->Copy();
+}
+
+void SmEditWindow::Paste()
+{
+ pEditView->Paste();
+}
+
+void SmEditWindow::Delete()
+{
+ pEditView->DeleteSelected();
+}
+
+void SmEditWindow::InsertText(const String& Text)
+{
+ pEditView->InsertText(Text);
+}
+
+void SmEditWindow::Flush()
+{
+ if ( pEditEngine && pEditEngine->IsModified() )
+ {
+ pEditEngine->ClearModifyFlag();
+ SmViewShell *pViewSh = SmGetActiveView();
+ if (pViewSh)
+ pViewSh->GetViewFrame()->GetDispatcher()->Execute(
+ SID_TEXT, SFX_CALLMODE_STANDARD,
+ new SfxStringItem(SID_TEXT, GetText()), 0L);
+ }
+
+ if (aCursorMoveTimer.IsActive())
+ {
+ aCursorMoveTimer.Stop();
+ // ggf noch die (neue) FormulaCursor Position setzen
+ CursorMoveTimerHdl(&aCursorMoveTimer);
+ }
+}
+
+
diff --git a/starmath/source/format.cxx b/starmath/source/format.cxx
new file mode 100644
index 000000000000..b5ed6622f2ff
--- /dev/null
+++ b/starmath/source/format.cxx
@@ -0,0 +1,311 @@
+/*************************************************************************
+ *
+ * $RCSfile: format.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:57:26 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#pragma hdrstop
+
+
+#ifndef FORMAT_HXX
+#include "format.hxx"
+#endif
+
+SmFormat::SmFormat()
+: aBaseSize(0, SmPtsTo100th_mm(12))
+{
+ nVersion = SM_FMT_VERSION_NOW;
+
+ eHorAlign = AlignCenter;
+ bIsTextmode = bScaleNormalBrackets = FALSE;
+
+ vSize[SIZ_TEXT] = 100;
+ vSize[SIZ_INDEX] = 60;
+ vSize[SIZ_FUNCTION] =
+ vSize[SIZ_OPERATOR] = 100;
+ vSize[SIZ_LIMITS] = 60;
+
+ vDist[DIS_HORIZONTAL] = 10;
+ vDist[DIS_VERTICAL] = 5;
+ vDist[DIS_ROOT] = 0;
+ vDist[DIS_SUPERSCRIPT] =
+ vDist[DIS_SUBSCRIPT] = 20;
+ vDist[DIS_NUMERATOR] =
+ vDist[DIS_DENOMINATOR] = 0;
+ vDist[DIS_FRACTION] = 10;
+ vDist[DIS_STROKEWIDTH] = 5;
+ vDist[DIS_UPPERLIMIT] =
+ vDist[DIS_LOWERLIMIT] = 0;
+ vDist[DIS_BRACKETSIZE] =
+ vDist[DIS_BRACKETSPACE] = 5;
+ vDist[DIS_MATRIXROW] = 3;
+ vDist[DIS_MATRIXCOL] = 30;
+ vDist[DIS_ORNAMENTSIZE] =
+ vDist[DIS_ORNAMENTSPACE] = 0;
+ vDist[DIS_OPERATORSIZE] = 50;
+ vDist[DIS_OPERATORSPACE] = 20;
+ vDist[DIS_LEFTSPACE] =
+ vDist[DIS_RIGHTSPACE] = 100;
+ vDist[DIS_TOPSPACE] =
+ vDist[DIS_BOTTOMSPACE] =
+ vDist[DIS_NORMALBRACKETSIZE] = 0;
+
+ vFont[FNT_VARIABLE] =
+ vFont[FNT_FUNCTION] =
+ vFont[FNT_NUMBER] =
+ vFont[FNT_TEXT] =
+ vFont[FNT_SERIF] = SmFace(C2S(FNTNAME_TIMES), aBaseSize);
+ vFont[FNT_SANS] = SmFace(C2S(FNTNAME_HELV), aBaseSize);
+ vFont[FNT_FIXED] = SmFace(C2S(FNTNAME_COUR), aBaseSize);
+ vFont[FNT_MATH] = SmFace(C2S(FNTNAME_MATH), aBaseSize);
+
+ vFont[FNT_VARIABLE].SetItalic(ITALIC_NORMAL);
+ vFont[FNT_FUNCTION].SetItalic(ITALIC_NONE);
+ vFont[FNT_TEXT].SetItalic(ITALIC_NONE);
+
+ for ( USHORT i = FNT_BEGIN; i <= FNT_END; i++ )
+ {
+ vFont[i].SetTransparent(TRUE);
+ vFont[i].SetAlign(ALIGN_BASELINE);
+ }
+}
+
+
+SmFormat & SmFormat::operator = (const SmFormat &rFormat)
+{
+ SetBaseSize(rFormat.GetBaseSize());
+ SetVersion (rFormat.GetVersion());
+ SetHorAlign(rFormat.GetHorAlign());
+ SetTextmode(rFormat.IsTextmode());
+ SetScaleNormalBrackets(rFormat.IsScaleNormalBrackets());
+
+ USHORT i;
+ for (i = FNT_BEGIN; i <= FNT_END; i++)
+ SetFont(i, rFormat.GetFont(i));
+ for (i = SIZ_BEGIN; i <= SIZ_END; i++)
+ SetRelSize(i, rFormat.GetRelSize(i));
+ for (i = DIS_BEGIN; i <= DIS_END; i++)
+ SetDistance(i, rFormat.GetDistance(i));
+
+ return *this;
+}
+
+
+SvStream & operator << (SvStream &rStream, const SmFormat &rFormat)
+{
+ //Da hier keinerlei Kompatibilit則 vorgesehen ist muessen wir leider
+ //heftig tricksen. Gluecklicherweise sind offenbar einige Informationen
+ //ueberfluessig geworden. In diese quetschen wir jetzt vier neue
+ //Einstellungen fuer die Rander.
+ //Bei Gelegenheit wird hier ein Im- Und Export gebraucht. Dann muessen
+ //die Stream-Operatoren dieser Klassen dringend mit Versionsverwaltung
+ //versehen werden!
+
+ UINT16 n;
+
+ // convert the heigth (in 100th of mm) to Pt and round the result to the
+ // nearest integer
+ n = (UINT16) SmRoundFraction(Sm100th_mmToPts(rFormat.aBaseSize.Height()));
+ DBG_ASSERT((n & 0xFF00) == 0, "Sm : higher Byte nicht leer");
+
+ // to be compatible with the old format (size and order) we put the info
+ // about textmode in the higher byte (height is already restricted to a
+ // maximum of 127!)
+ n |= (rFormat.bIsTextmode != 0) << 8
+ | (rFormat.bScaleNormalBrackets != 0) << 9;
+ rStream << n;
+
+ rStream << rFormat.vDist[DIS_LEFTSPACE]; //Wir nutzen den Platz
+ rStream << rFormat.vDist[DIS_RIGHTSPACE]; //Wir nutzen den Platz
+
+ for ( n = SIZ_BEGIN; n <= SIZ_END; ++n )
+ rStream << rFormat.vSize[n];
+
+ rStream << rFormat.vDist[DIS_TOPSPACE]; //Wir nutzen den Platz
+
+ for ( n = 0; n <= FNT_FIXED; ++n )
+ rStream << rFormat.vFont[n];
+
+ // Den zweiten Wert noch im HigherByte unterbringen
+ USHORT uTmp = rFormat.vDist[DIS_BRACKETSIZE]
+ | rFormat.vDist[DIS_NORMALBRACKETSIZE] << 8;
+ // und dann dieses rausstreamen
+ for ( n = 0; n <= DIS_OPERATORSPACE; ++n )
+ rStream << (USHORT)(n != DIS_BRACKETSIZE ? rFormat.vDist[(USHORT) n] : uTmp);
+
+ // higher byte is version number, lower byte is horizontal alignment
+ n = rFormat.eHorAlign | SM_FMT_VERSION_NOW << 8;
+ rStream << n;
+
+ rStream << rFormat.vDist[DIS_BOTTOMSPACE]; //Wir nutzen den Platz
+
+ return rStream;
+}
+
+
+SvStream & operator >> (SvStream &rStream, SmFormat &rFormat)
+{
+ UINT16 n;
+
+ rStream >> n;
+ long nBaseHeight = n & 0x00FF;
+ rFormat.bIsTextmode = ((n >> 8) & 0x01) != 0;
+ rFormat.bScaleNormalBrackets = ((n >> 9) & 0x01) != 0;
+ rFormat.aBaseSize = Size(0, SmPtsTo100th_mm(nBaseHeight));
+
+ rStream >> rFormat.vDist[DIS_LEFTSPACE]; //Wir nutzen den Platz
+ rStream >> rFormat.vDist[DIS_RIGHTSPACE]; //Wir nutzen den Platz
+
+ for ( n = SIZ_BEGIN; n <= SIZ_END; ++n )
+ rStream >> rFormat.vSize[n];
+
+ rStream >> rFormat.vDist[DIS_TOPSPACE]; //Wir nutzen den Platz
+
+ for ( n = 0; n <= FNT_FIXED; ++n )
+ rStream >> rFormat.vFont[n];
+
+ for ( n = 0; n <= DIS_OPERATORSPACE; ++n )
+ rStream >> rFormat.vDist[n];
+ // den zweiten Wert aus dem HigherByte holen
+ rFormat.vDist[DIS_NORMALBRACKETSIZE] = rFormat.vDist[DIS_BRACKETSIZE] >> 8;
+ // und dieses dann ausblenden
+ rFormat.vDist[DIS_BRACKETSIZE] &= 0x00FF;
+
+ // higher byte is version number, lower byte is horizontal alignment
+ rStream >> n;
+ rFormat.nVersion = n >> 8;
+ rFormat.eHorAlign = (SmHorAlign) (n & 0x00FF);
+
+ rStream >> rFormat.vDist[DIS_BOTTOMSPACE]; //Wir nutzen den Platz
+
+ const Size aTmp( rFormat.GetBaseSize() );
+ for ( USHORT i = 0; i <= FNT_FIXED; ++i )
+ {
+ rFormat.vFont[i].SetSize(aTmp);
+ rFormat.vFont[i].SetTransparent(TRUE);
+ rFormat.vFont[i].SetAlign(ALIGN_BASELINE);
+ }
+ rFormat.vFont[FNT_MATH].SetSize(aTmp);
+
+ // F黵 Version 4.0 (und 鋖ter) sollen auch die normalen Klammern skalierbar
+ // sein und wachsen (so wie es der Fall war), in der 5.0 Version jedoch nicht.
+ // In sp鋞eren Versionen (>= 5.1) ist das Verhalten nun durch den Anwender
+ // festzulegen (bleibt also wie aus dem Stream gelesen).
+ if (rFormat.nVersion < SM_FMT_VERSION_51)
+ {
+ BOOL bIs50Stream = rStream.GetVersion() == SOFFICE_FILEFORMAT_50;
+ BOOL bVal = bIs50Stream ? FALSE : TRUE;
+ USHORT nExcHeight = bIs50Stream ? 0 : rFormat.vDist[DIS_BRACKETSIZE];
+
+ rFormat.SetScaleNormalBrackets(bVal);
+ rFormat.SetDistance(DIS_NORMALBRACKETSIZE, nExcHeight);
+ }
+
+ return rStream;
+}
+
+void SmFormat::ReadSM20Format(SvStream &rStream)
+{
+ UINT16 n;
+ USHORT i;
+
+ rStream >> n;
+ SetBaseSize( Size(0, SmPtsTo100th_mm(n)) );
+
+ rStream >> n >> n;
+
+ for (i = SIZ_BEGIN; i <= SIZ_LIMITS; i++)
+ { rStream >> n;
+ SetRelSize(i, n);
+ }
+
+ rStream >> n;
+
+ for (i = FNT_BEGIN; i <= FNT_FIXED; i++)
+ ReadSM20Font(rStream, Font(i));
+
+ for (i = DIS_BEGIN; i <= DIS_OPERATORSPACE; i++)
+ { rStream >> n;
+ SetDistance(i, n);
+ }
+
+ rStream >> n;
+ SetHorAlign((SmHorAlign) n);
+ rStream >> n;
+
+ const Size aTmp (GetBaseSize());
+ for (i = FNT_BEGIN; i <= FNT_FIXED; i++)
+ {
+ Font(i).SetSize(aTmp);
+ Font(i).SetTransparent(TRUE);
+ Font(i).SetAlign(ALIGN_BASELINE);
+ }
+ Font(FNT_MATH).SetSize(aTmp);
+}
+
+
+void SmFormat::From300To304a()
+{
+ long nBaseSize = SmRoundFraction(Sm100th_mmToPts(aBaseSize.Height()))
+ * 2540l / 72l;
+ for (USHORT i = DIS_BEGIN; i < DIS_OPERATORSPACE; i++)
+ SetDistance(i, USHORT(GetDistance(i) * 254000L / 72L / nBaseSize));
+}
+
+
+
diff --git a/starmath/source/makefile.mk b/starmath/source/makefile.mk
new file mode 100644
index 000000000000..fed1043b88d0
--- /dev/null
+++ b/starmath/source/makefile.mk
@@ -0,0 +1,163 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 16:57:26 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning the Software.
+#
+# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+#
+# Copyright: 2000 by Sun Microsystems, Inc.
+#
+# All Rights Reserved.
+#
+# Contributor(s): _______________________________________
+#
+#
+#
+#*************************************************************************
+
+#MKDEPENDSOLVER=YES
+PROJECTPCH4DLL=TRUE
+
+PRJ=..
+
+PRJNAME=starmath
+TARGET=starmath
+
+PROJECTPCH=math_pch
+PDBTARGET=math_pch
+PROJECTPCHSOURCE=math_pch
+
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+
+.INCLUDE : $(UPD)minor.mk
+RSCUPDVER=$(RSCREVISION)(SV$(UPD)$(UPDMINOR))
+
+IMGLST_SRS=$(SRS)$/smres.srs
+
+# --- Files --------------------------------------------------------
+
+SMDLL=TRUE
+
+SRS2NAME =smres
+SRC2FILES = smres.src \
+ commands.src
+
+SLOFILES = \
+ $(SLO)$/frmload.obj \
+ $(SLO)$/typemap.obj \
+ $(SLO)$/symbol.obj \
+ $(SLO)$/toolbox.obj \
+ $(SLO)$/action.obj \
+ $(SLO)$/config.obj \
+ $(SLO)$/dialog.obj \
+ $(SLO)$/document.obj \
+ $(SLO)$/mathtype.obj \
+ $(SLO)$/format.obj \
+ $(SLO)$/node.obj \
+ $(SLO)$/parse.obj \
+ $(SLO)$/utility.obj \
+ $(SLO)$/smdll.obj \
+ $(SLO)$/smmod.obj \
+ $(SLO)$/view.obj \
+ $(SLO)$/edit.obj \
+ $(SLO)$/rect.obj \
+ $(SLO)$/unomodel.obj \
+ $(SLO)$/xchar.obj
+
+EXCEPTIONSFILES = \
+ $(SLO)$/document.obj \
+ $(SLO)$/frmload.obj \
+ $(SLO)$/symbol.obj \
+ $(SLO)$/unomodel.obj
+
+
+LIB2TARGET = $(SLB)$/ysm.lib
+LIB2ARCHIV = $(LB)$/libysm.a
+LIB2OBJFILES = $(SLO)$/smlib.obj
+
+DEPOBJFILES = $(SLO)$/smlib.obj
+# --- Targets -------------------------------------------------------
+
+.IF "$(depend)" == ""
+
+ALL: \
+ $(INCCOM)$/dllname.hxx \
+ ALLTAR
+
+.IF "$(GUI)"=="UNX" || "$(GUI)"=="MAC"
+CDEFS+=-DUSE_POLYGON
+.ENDIF
+
+$(INCCOM)$/dllname.hxx: makefile.mk
+.IF "$(GUI)"=="OS2"
+ echo #define DLL_NAME "sm$(UPD)$(DLLPOSTFIX)" >$@
+.ELSE
+.IF "$(GUI)"=="MAC"
+ echo "$(HASHMARK)define DLL_NAME "sm$(UPD)$(DLLPOSTFIX).dll"" > $@
+.ELSE
+.IF "$(GUI)"=="UNX"
+ $(RM) $@
+ echo #define DLL_NAME \"libsm$(UPD)$(DLLPOSTFIX)$(DLLPOST)\" >$@
+.ELSE
+ echo #define DLL_NAME "sm$(UPD)$(DLLPOSTFIX)$(DLLPOST)" >$@
+.ENDIF
+.ENDIF
+.ENDIF
+
+.ENDIF
+
+.INCLUDE : target.mk
+
+$(SRS)$/smres.srs: $(SOLARINCDIR)$/svx$/globlmn.hrc
+
diff --git a/starmath/source/math_pch.cxx b/starmath/source/math_pch.cxx
new file mode 100644
index 000000000000..8570ebc4d579
--- /dev/null
+++ b/starmath/source/math_pch.cxx
@@ -0,0 +1,893 @@
+/*************************************************************************
+ *
+ * $RCSfile: math_pch.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:57:26 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#define SMDLL 1
+
+#include "starmath.hrc"
+
+#define ITEMID_FONT 1
+#define ITEMID_FONTHEIGHT 2
+#define ITEMID_LRSPACE 3
+#define ITEMID_WEIGHT 4
+
+//--------- ab hier die "generierten"
+#include <tools/string.hxx>
+#include <tools/solar.h>
+#include <tools/list.hxx>
+#include <tools/contnr.hxx>
+#include <tools/rtti.hxx>
+#include <tools/ref.hxx>
+#include <tools/link.hxx>
+#include <svtools/brdcst.hxx>
+#include <svtools/svarray.hxx>
+#include <tools/debug.hxx>
+#include <svtools/hint.hxx>
+#include <svtools/smplhint.hxx>
+#include <sot/sotref.hxx>
+#include <tools/globname.hxx>
+#include <sot/factory.hxx>
+#include <vcl/sv.h>
+#include <svtools/sbxdef.hxx>
+#include <tools/time.hxx>
+#include <tools/gen.hxx>
+#include <tools/stream.hxx>
+#include <tools/errinf.hxx>
+#include <tools/errcode.hxx>
+#include <sot/object.hxx>
+#include <sot/sotdata.hxx>
+#include <sfx2/shell.hxx>
+#include <sal/types.h>
+#include <sal/config.h>
+#include <tools/date.hxx>
+#include <sot/dtrans.hxx>
+#include <tools/ownlist.hxx>
+#include <vcl/accel.hxx>
+#include <vcl/resid.hxx>
+#include <tools/resid.hxx>
+#include <vcl/rc.hxx>
+#include <tools/rc.hxx>
+#include <tools/lang.hxx>
+#include <tools/resmgr.hxx>
+#include <vcl/keycod.hxx>
+#include <vcl/keycodes.hxx>
+#include <vcl/vclenum.hxx>
+#include <vcl/timer.hxx>
+#include <vcl/cmdevt.hxx>
+#include <vcl/font.hxx>
+#include <vcl/color.hxx>
+#include <vcl/outdev.hxx>
+#include <vcl/region.hxx>
+#include <vcl/mapmod.hxx>
+#include <tools/fract.hxx>
+#include <vcl/wall.hxx>
+#include <vcl/settings.hxx>
+#include <tools/intn.hxx>
+#include <vcl/bitmap.hxx>
+#include <vcl/pointr.hxx>
+#include <vcl/ptrstyle.hxx>
+#include <vcl/wintypes.hxx>
+#include <vcl/inputctx.hxx>
+#include <vcl/event.hxx>
+#include <format.hxx>
+#include <utility.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/image.hxx>
+#include <vcl/ctrl.hxx>
+#include <vcl/window.hxx>
+#include <vcl/icon.hxx>
+#include <sfx2/minarray.hxx>
+#include <vcl/combobox.hxx>
+#include <vcl/combobox.h>
+#include <vcl/edit.hxx>
+#include <vcl/menu.hxx>
+#include <vcl/bitmapex.hxx>
+#include <vcl/lstbox.hxx>
+#include <vcl/lstbox.h>
+#include <usr/guid.hxx>
+#include <usr/sequ.hxx>
+#include <uno/types.h>
+#include <uno/macros.h>
+#include <vos/xception.hxx>
+#include <osl/mutex.h>
+#include <tools/shl.hxx>
+#include <sfx2/module.hxx>
+#include <sfx2/imgdef.hxx>
+#include <usr/uno.hxx>
+#include <usr/xiface.hxx>
+#include <usr/ustring.hxx>
+#include <vos/refernce.hxx>
+#include <vos/types.hxx>
+#include <osl/types.h>
+#include <osl/interlck.h>
+#include <vos/object.hxx>
+#include <vos/macros.hxx>
+#include <smdll.hxx>
+#include <smdll0.hxx>
+#include <sfx2/sfxsids.hrc>
+#include <chaos/cntids.hrc>
+#include <svtools/cntwids.hrc>
+#include <svtools/solar.hrc>
+#include <svtools/lstner.hxx>
+#include <starmath.hrc>
+#include <svtools/sbx.hxx>
+#include <svtools/sbxform.hxx>
+#include <svtools/sbxobj.hxx>
+#include <svtools/sbxvar.hxx>
+#include <svtools/sbxcore.hxx>
+#include <svtools/sbxprop.hxx>
+#include <svtools/sbxmeth.hxx>
+#include <tools/unqid.hxx>
+#include <tools/unqidx.hxx>
+#include <svtools/poolitem.hxx>
+#include <svtools/args.hxx>
+#include <smmod.hxx>
+#include <vos/thread.hxx>
+#include <osl/thread.h>
+#include <vos/runnable.hxx>
+#include <vcl/apptypes.hxx>
+#include <tools/dynary.hxx>
+#include <vcl/metric.hxx>
+#include <vcl/svapp.hxx>
+#include <svtools/iniman.hxx>
+#include <vcl/timer.hxx>
+#include <sfx2/app.hxx>
+#include <svtools/plugapp.hxx>
+#include <sfx2/sfx.hrc>
+#include <svtools/memberid.hrc>
+#include <vcl/syswin.hxx>
+#include <vcl/virdev.hxx>
+#include <tools/datetime.hxx>
+#include <tools/wldcrd.hxx>
+#include <parse.hxx>
+#include <tools/stack.hxx>
+#include <types.hxx>
+#include <config.hxx>
+#include <sfx2/cfgitem.hxx>
+#include <svtools/confitem.hxx>
+#include <xchar.hxx>
+#include <vcl/poly.hxx>
+#include <svx/xpoly.hxx>
+#include <rect.hxx>
+#include <vcl/outdev.hxx>
+#include <so3/so2ref.hxx>
+#ifndef _SMART_COM_SUN_STAR_FRAME_XDISPATCHPROVIDERINTERCEPTOR_HXX_
+#include <smart/com/sun/star/frame/XDispatchProviderInterceptor.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_FRAME_XDISPATCH_HXX_
+#include <smart/com/sun/star/frame/XDispatch.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_FRAME_XDISPATCHPROVIDER_HXX_
+#include <smart/com/sun/star/frame/XDispatchProvider.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_FRAME_XSTATUSLISTENER_HXX_
+#include <smart/com/sun/star/frame/XStatusListener.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_FRAME_FRAMESEARCHFLAG_HXX_
+#include <smart/com/sun/star/frame/FrameSearchFlag.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_FRAME_XDISPATCHPROVIDERINTERCEPTION_HXX_
+#include <smart/com/sun/star/frame/XDispatchProviderInterception.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_FRAME_FEATURESTATEEVENT_HXX_
+#include <smart/com/sun/star/frame/FeatureStateEvent.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_FRAME_DISPATCHDESCRIPTOR_HXX_
+#include <smart/com/sun/star/frame/DispatchDescriptor.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_FRAME_XFRAMEACTIONLISTENER_HXX_
+#include <smart/com/sun/star/frame/XFrameActionListener.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_FRAME_XCOMPONENTLOADER_HXX_
+#include <smart/com/sun/star/frame/XComponentLoader.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_FRAME_XFRAME_HXX_
+#include <smart/com/sun/star/frame/XFrame.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_FRAME_FRAMEACTIONEVENT_HXX_
+#include <smart/com/sun/star/frame/FrameActionEvent.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_FRAME_FRAMEACTION_HXX_
+#include <smart/com/sun/star/frame/FrameAction.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_UTIL_XURLTRANSFORMER_HXX_
+#include <smart/com/sun/star/util/XURLTransformer.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_TASK_XSTATUSINDICATORFACTORY_HXX_
+#include <smart/com/sun/star/task/XStatusIndicatorFactory.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_TASK_XSTATUSINDICATORSUPPLIER_HXX_
+#include <smart/com/sun/star/task/XStatusIndicatorSupplier.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_TASK_XSTATUSINDICATOR_HXX_
+#include <smart/com/sun/star/task/XStatusIndicator.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_FRAME_XBROWSEHISTORYREGISTRY_HXX_
+#include <smart/com/sun/star/frame/XBrowseHistoryRegistry.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_IO_BUFFERSIZEEXCEEDEDEXCEPTION_HXX_
+#include <smart/com/sun/star/io/BufferSizeExceededException.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_IO_NOTCONNECTEDEXCEPTION_HXX_
+#include <smart/com/sun/star/io/NotConnectedException.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_IO_IOEXCEPTION_HXX_
+#include <smart/com/sun/star/io/IOException.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_IO_UNEXPECTEDEOFEXCEPTION_HXX_
+#include <smart/com/sun/star/io/UnexpectedEOFException.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_IO_WRONGFORMATEXCEPTION_HXX_
+#include <smart/com/sun/star/io/WrongFormatException.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_LANG_SERVICENOTREGISTEREDEXCEPTION_HXX_
+#include <smart/com/sun/star/lang/ServiceNotRegisteredException.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_LANG_NULLPOINTEREXCEPTION_HXX_
+#include <smart/com/sun/star/lang/NullPointerException.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_LANG_CLASSNOTFOUNDEXCEPTION_HXX_
+#include <smart/com/sun/star/lang/ClassNotFoundException.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_LANG_NOSUCHMETHODEXCEPTION_HXX_
+#include <smart/com/sun/star/lang/NoSuchMethodException.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_LANG_SECURITYEXCEPTION_HXX_
+#include <smart/com/sun/star/lang/SecurityException.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_LANG_NOSUCHFIELDEXCEPTION_HXX_
+#include <smart/com/sun/star/lang/NoSuchFieldException.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_LANG_DISPOSEDEXCEPTION_HXX_
+#include <smart/com/sun/star/lang/DisposedException.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_LANG_ARRAYINDEXOUTOFBOUNDSEXCEPTION_HXX_
+#include <smart/com/sun/star/lang/ArrayIndexOutOfBoundsException.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_LANG_ILLEGALACCESSEXCEPTION_HXX_
+#include <smart/com/sun/star/lang/IllegalAccessException.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_LANG_INDEXOUTOFBOUNDSEXCEPTION_HXX_
+#include <smart/com/sun/star/lang/IndexOutOfBoundsException.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_LANG_ILLEGALARGUMENTEXCEPTION_HXX_
+#include <smart/com/sun/star/lang/IllegalArgumentException.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_LANG_NOSUPPORTEXCEPTION_HXX_
+#include <smart/com/sun/star/lang/NoSupportException.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_LANG_WRAPPEDTARGETEXCEPTION_HXX_
+#include <smart/com/sun/star/lang/WrappedTargetException.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_REFLECTION_PARAMINFO_HXX_
+#include <smart/com/sun/star/reflection/ParamInfo.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_REFLECTION_XIDLARRAY_HXX_
+#include <smart/com/sun/star/reflection/XIdlArray.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_REFLECTION_XIDLCLASSPROVIDER_HXX_
+#include <smart/com/sun/star/reflection/XIdlClassProvider.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_REFLECTION_FIELDACCESSMODE_HXX_
+#include <smart/com/sun/star/reflection/FieldAccessMode.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_REFLECTION_XIDLCLASS_HXX_
+#include <smart/com/sun/star/reflection/XIdlClass.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_REFLECTION_XIDLFIELD_HXX_
+#include <smart/com/sun/star/reflection/XIdlField.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_REFLECTION_PARAMMODE_HXX_
+#include <smart/com/sun/star/reflection/ParamMode.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_REFLECTION_METHODMODE_HXX_
+#include <smart/com/sun/star/reflection/MethodMode.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_REFLECTION_XIDLMEMBER_HXX_
+#include <smart/com/sun/star/reflection/XIdlMember.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_REFLECTION_XIDLREFLECTION_HXX_
+#include <smart/com/sun/star/reflection/XIdlReflection.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_REFLECTION_XIDLMETHOD_HXX_
+#include <smart/com/sun/star/reflection/XIdlMethod.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_REFLECTION_INVOCATIONTARGETEXCEPTION_HXX_
+#include <smart/com/sun/star/reflection/InvocationTargetException.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_BEANS_PROPERTYVALUES_HXX_
+#include <smart/com/sun/star/beans/PropertyValues.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_BEANS_XPROPERTYSET_HXX_
+#include <smart/com/sun/star/beans/XPropertySet.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_BEANS_PROPERTYVALUE_HXX_
+#include <smart/com/sun/star/beans/PropertyValue.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_BEANS_PROPERTYSTATE_HXX_
+#include <smart/com/sun/star/beans/PropertyState.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_BEANS_XPROPERTYSETINFO_HXX_
+#include <smart/com/sun/star/beans/XPropertySetInfo.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_BEANS_XMULTIPROPERTYSET_HXX_
+#include <smart/com/sun/star/beans/XMultiPropertySet.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_BEANS_XFASTPROPERTYSET_HXX_
+#include <smart/com/sun/star/beans/XFastPropertySet.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_BEANS_XVETOABLECHANGELISTENER_HXX_
+#include <smart/com/sun/star/beans/XVetoableChangeListener.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_BEANS_XPROPERTYSTATE_HXX_
+#include <smart/com/sun/star/beans/XPropertyState.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_BEANS_XPROPERTYSTATECHANGELISTENER_HXX_
+#include <smart/com/sun/star/beans/XPropertyStateChangeListener.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HXX_
+#include <smart/com/sun/star/beans/PropertyAttribute.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_BEANS_XPROPERTIESCHANGELISTENER_HXX_
+#include <smart/com/sun/star/beans/XPropertiesChangeListener.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_BEANS_XPROPERTYCHANGELISTENER_HXX_
+#include <smart/com/sun/star/beans/XPropertyChangeListener.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_BEANS_XPROPERTYACCESS_HXX_
+#include <smart/com/sun/star/beans/XPropertyAccess.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_BEANS_XPROPERTYCONTAINER_HXX_
+#include <smart/com/sun/star/beans/XPropertyContainer.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_BEANS_PROPERTYSTATECHANGEEVENT_HXX_
+#include <smart/com/sun/star/beans/PropertyStateChangeEvent.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_BEANS_PROPERTYCHANGEEVENT_HXX_
+#include <smart/com/sun/star/beans/PropertyChangeEvent.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_BEANS_UNKNOWNPROPERTYEXCEPTION_HXX_
+#include <smart/com/sun/star/beans/UnknownPropertyException.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_BEANS_INTROSPECTIONEXCEPTION_HXX_
+#include <smart/com/sun/star/beans/IntrospectionException.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_BEANS_PROPERTYEXISTEXCEPTION_HXX_
+#include <smart/com/sun/star/beans/PropertyExistException.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_BEANS_ILLEGALTYPEEXCEPTION_HXX_
+#include <smart/com/sun/star/beans/IllegalTypeException.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_BEANS_PROPERTYVETOEXCEPTION_HXX_
+#include <smart/com/sun/star/beans/PropertyVetoException.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_CONTAINER_XENUMERATIONACCESS_HXX_
+#include <smart/com/sun/star/container/XEnumerationAccess.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_CONTAINER_XHIERARCHICALNAMEACCESS_HXX_
+#include <smart/com/sun/star/container/XHierarchicalNameAccess.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_CONTAINER_XNAMEACCESS_HXX_
+#include <smart/com/sun/star/container/XNameAccess.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_CONTAINER_XCONTENTENUMERATIONACCESS_HXX_
+#include <smart/com/sun/star/container/XContentEnumerationAccess.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_CONTAINER_XENUMERATION_HXX_
+#include <smart/com/sun/star/container/XEnumeration.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_CONTAINER_XELEMENTACCESS_HXX_
+#include <smart/com/sun/star/container/XElementAccess.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_CONTAINER_XINDEXACCESS_HXX_
+#include <smart/com/sun/star/container/XIndexAccess.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_LANG_XEVENTLISTENER_HXX_
+#include <smart/com/sun/star/lang/XEventListener.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_LANG_EVENTOBJECT_HXX_
+#include <smart/com/sun/star/lang/EventObject.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_SCRIPT_XALLLISTENERADAPTERSERVICE_HXX_
+#include <smart/com/sun/star/script/XAllListenerAdapterService.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_SCRIPT_XALLLISTENER_HXX_
+#include <smart/com/sun/star/script/XAllListener.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_SCRIPT_ALLEVENTOBJECT_HXX_
+#include <smart/com/sun/star/script/AllEventObject.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_CONTAINER_XCOMPONENTENUMERATION_HXX_
+#include <smart/com/sun/star/container/XComponentEnumeration.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_LANG_XCOMPONENT_HXX_
+#include <smart/com/sun/star/lang/XComponent.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_CONTAINER_XCOMPONENTENUMERATIONACCESS_HXX_
+#include <smart/com/sun/star/container/XComponentEnumerationAccess.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_LANG_LISTENEREXISTEXCEPTION_HXX_
+#include <smart/com/sun/star/lang/ListenerExistException.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_CONTAINER_ELEMENTEXISTEXCEPTION_HXX_
+#include <smart/com/sun/star/container/ElementExistException.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_LANG_INVALIDLISTENEREXCEPTION_HXX_
+#include <smart/com/sun/star/lang/InvalidListenerException.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_CONTAINER_NOSUCHELEMENTEXCEPTION_HXX_
+#include <smart/com/sun/star/container/NoSuchElementException.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XKEYLISTENER_HXX_
+#include <smart/com/sun/star/awt/XKeyListener.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XPAINTLISTENER_HXX_
+#include <smart/com/sun/star/awt/XPaintListener.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_KEYEVENT_HXX_
+#include <smart/com/sun/star/awt/KeyEvent.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_KEYMODIFIER_HXX_
+#include <smart/com/sun/star/awt/KeyModifier.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XMOUSEMOTIONLISTENER_HXX_
+#include <smart/com/sun/star/awt/XMouseMotionListener.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_FOCUSEVENT_HXX_
+#include <smart/com/sun/star/awt/FocusEvent.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XWINDOWLISTENER_HXX_
+#include <smart/com/sun/star/awt/XWindowListener.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XACTIVATELISTENER_HXX_
+#include <smart/com/sun/star/awt/XActivateListener.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_MOUSEEVENT_HXX_
+#include <smart/com/sun/star/awt/MouseEvent.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XTOPWINDOWLISTENER_HXX_
+#include <smart/com/sun/star/awt/XTopWindowListener.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_PAINTEVENT_HXX_
+#include <smart/com/sun/star/awt/PaintEvent.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_INPUTEVENT_HXX_
+#include <smart/com/sun/star/awt/InputEvent.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_KEYGROUP_HXX_
+#include <smart/com/sun/star/awt/KeyGroup.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_KEY_HXX_
+#include <smart/com/sun/star/awt/Key.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_WINDOWEVENT_HXX_
+#include <smart/com/sun/star/awt/WindowEvent.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XMOUSELISTENER_HXX_
+#include <smart/com/sun/star/awt/XMouseListener.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_KEYFUNCTION_HXX_
+#include <smart/com/sun/star/awt/KeyFunction.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_FOCUSCHANGEREASON_HXX_
+#include <smart/com/sun/star/awt/FocusChangeReason.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_MOUSEBUTTON_HXX_
+#include <smart/com/sun/star/awt/MouseButton.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XFOCUSLISTENER_HXX_
+#include <smart/com/sun/star/awt/XFocusListener.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XADJUSTMENTLISTENER_HXX_
+#include <smart/com/sun/star/awt/XAdjustmentListener.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XACTIONLISTENER_HXX_
+#include <smart/com/sun/star/awt/XActionListener.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XTEXTLISTENER_HXX_
+#include <smart/com/sun/star/awt/XTextListener.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XSPINLISTENER_HXX_
+#include <smart/com/sun/star/awt/XSpinListener.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XITEMLISTENER_HXX_
+#include <smart/com/sun/star/awt/XItemListener.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XVCLCONTAINERLISTENER_HXX_
+#include <smart/com/sun/star/awt/XVclContainerListener.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XFILEDIALOG_HXX_
+#include <smart/com/sun/star/awt/XFileDialog.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XTEXTCOMPONENT_HXX_
+#include <smart/com/sun/star/awt/XTextComponent.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XLISTBOX_HXX_
+#include <smart/com/sun/star/awt/XListBox.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XPROGRESSMONITOR_HXX_
+#include <smart/com/sun/star/awt/XProgressMonitor.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_TEXTALIGN_HXX_
+#include <smart/com/sun/star/awt/TextAlign.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XSCROLLBAR_HXX_
+#include <smart/com/sun/star/awt/XScrollBar.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XVCLCONTAINERPEER_HXX_
+#include <smart/com/sun/star/awt/XVclContainerPeer.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XTABCONTROLLERMODEL_HXX_
+#include <smart/com/sun/star/awt/XTabControllerModel.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XMESSAGEBOX_HXX_
+#include <smart/com/sun/star/awt/XMessageBox.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XTEXTEDITFIELD_HXX_
+#include <smart/com/sun/star/awt/XTextEditField.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_STYLE_HXX_
+#include <smart/com/sun/star/awt/Style.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XTIMEFIELD_HXX_
+#include <smart/com/sun/star/awt/XTimeField.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XVCLWINDOWPEER_HXX_
+#include <smart/com/sun/star/awt/XVclWindowPeer.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XCONTROLMODEL_HXX_
+#include <smart/com/sun/star/awt/XControlModel.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XSPINFIELD_HXX_
+#include <smart/com/sun/star/awt/XSpinField.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XUNOCONTROLCONTAINER_HXX_
+#include <smart/com/sun/star/awt/XUnoControlContainer.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XTEXTLAYOUTCONSTRAINS_HXX_
+#include <smart/com/sun/star/awt/XTextLayoutConstrains.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XNUMERICFIELD_HXX_
+#include <smart/com/sun/star/awt/XNumericField.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XBUTTON_HXX_
+#include <smart/com/sun/star/awt/XButton.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XTEXTAREA_HXX_
+#include <smart/com/sun/star/awt/XTextArea.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XIMAGEBUTTON_HXX_
+#include <smart/com/sun/star/awt/XImageButton.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XFIXEDTEXT_HXX_
+#include <smart/com/sun/star/awt/XFixedText.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XCONTROLCONTAINER_HXX_
+#include <smart/com/sun/star/awt/XControlContainer.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XDIALOG_HXX_
+#include <smart/com/sun/star/awt/XDialog.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_SCROLLBARORIENTATION_HXX_
+#include <smart/com/sun/star/awt/ScrollBarOrientation.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XRADIOBUTTON_HXX_
+#include <smart/com/sun/star/awt/XRadioButton.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XCURRENCYFIELD_HXX_
+#include <smart/com/sun/star/awt/XCurrencyField.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XPATTERNFIELD_HXX_
+#include <smart/com/sun/star/awt/XPatternField.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_VCLWINDOWPEERATTRIBUTE_HXX_
+#include <smart/com/sun/star/awt/VclWindowPeerAttribute.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XTABCONTROLLER_HXX_
+#include <smart/com/sun/star/awt/XTabController.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XVCLCONTAINER_HXX_
+#include <smart/com/sun/star/awt/XVclContainer.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XDATEFIELD_HXX_
+#include <smart/com/sun/star/awt/XDateField.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XCOMBOBOX_HXX_
+#include <smart/com/sun/star/awt/XComboBox.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XCONTROL_HXX_
+#include <smart/com/sun/star/awt/XControl.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XCHECKBOX_HXX_
+#include <smart/com/sun/star/awt/XCheckBox.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_MESSAGEBOXCOMMAND_HXX_
+#include <smart/com/sun/star/awt/MessageBoxCommand.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XLAYOUTCONSTRAINS_HXX_
+#include <smart/com/sun/star/awt/XLayoutConstrains.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XPROGRESSBAR_HXX_
+#include <smart/com/sun/star/awt/XProgressBar.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_SIMPLEFONTMETRIC_HXX_
+#include <smart/com/sun/star/awt/SimpleFontMetric.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_FONTWEIGHT_HXX_
+#include <smart/com/sun/star/awt/FontWeight.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_FONTSLANT_HXX_
+#include <smart/com/sun/star/awt/FontSlant.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_CHARSET_HXX_
+#include <smart/com/sun/star/awt/CharSet.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_FONTDESCRIPTOR_HXX_
+#include <smart/com/sun/star/awt/FontDescriptor.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_FONTWIDTH_HXX_
+#include <smart/com/sun/star/awt/FontWidth.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XFONT_HXX_
+#include <smart/com/sun/star/awt/XFont.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_FONTTYPE_HXX_
+#include <smart/com/sun/star/awt/FontType.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_FONTUNDERLINE_HXX_
+#include <smart/com/sun/star/awt/FontUnderline.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_FONTSTRIKEOUT_HXX_
+#include <smart/com/sun/star/awt/FontStrikeout.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_FONTFAMILY_HXX_
+#include <smart/com/sun/star/awt/FontFamily.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_FONTPITCH_HXX_
+#include <smart/com/sun/star/awt/FontPitch.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XTOPWINDOW_HXX_
+#include <smart/com/sun/star/awt/XTopWindow.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XWINDOW_HXX_
+#include <smart/com/sun/star/awt/XWindow.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_POSSIZE_HXX_
+#include <smart/com/sun/star/awt/PosSize.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_VCLCONTAINEREVENT_HXX_
+#include <smart/com/sun/star/awt/VclContainerEvent.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_ITEMEVENT_HXX_
+#include <smart/com/sun/star/awt/ItemEvent.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_SPINEVENT_HXX_
+#include <smart/com/sun/star/awt/SpinEvent.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_TEXTEVENT_HXX_
+#include <smart/com/sun/star/awt/TextEvent.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_ADJUSTMENTTYPE_HXX_
+#include <smart/com/sun/star/awt/AdjustmentType.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_ACTIONEVENT_HXX_
+#include <smart/com/sun/star/awt/ActionEvent.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_ADJUSTMENTEVENT_HXX_
+#include <smart/com/sun/star/awt/AdjustmentEvent.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_RECTANGLE_HXX_
+#include <smart/com/sun/star/awt/Rectangle.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_SELECTION_HXX_
+#include <smart/com/sun/star/awt/Selection.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_SIZE_HXX_
+#include <smart/com/sun/star/awt/Size.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_WINDOWDESCRIPTOR_HXX_
+#include <smart/com/sun/star/awt/WindowDescriptor.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_INVALIDATESTYLE_HXX_
+#include <smart/com/sun/star/awt/InvalidateStyle.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XTOOLKIT_HXX_
+#include <smart/com/sun/star/awt/XToolkit.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XWINDOWPEER_HXX_
+#include <smart/com/sun/star/awt/XWindowPeer.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_WINDOWCLASS_HXX_
+#include <smart/com/sun/star/awt/WindowClass.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XSYSTEMDEPENDENTWINDOWPEER_HXX_
+#include <smart/com/sun/star/awt/XSystemDependentWindowPeer.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_WINDOWATTRIBUTE_HXX_
+#include <smart/com/sun/star/awt/WindowAttribute.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_XPOINTER_HXX_
+#include <smart/com/sun/star/awt/XPointer.hxx>
+#endif
+#ifndef _SMART_COM_SUN_STAR_AWT_SYSTEMPOINTER_HXX_
+#include <smart/com/sun/star/awt/SystemPointer.hxx>