From d791366863cf9659a01b171ce0e727bfe2f28cdf Mon Sep 17 00:00:00 2001
From: Jens-Heiner Rechtien
Date: Mon, 18 Sep 2000 16:07:07 +0000
Subject: initial import
---
starmath/source/action.cxx | 128 +
starmath/source/commands.src | 2714 +++++++++++
starmath/source/config.cxx | 381 ++
starmath/source/dialog.cxx | 2405 ++++++++++
starmath/source/document.cxx | 1641 +++++++
starmath/source/edit.cxx | 783 +++
starmath/source/format.cxx | 311 ++
starmath/source/makefile.mk | 163 +
starmath/source/math_pch.cxx | 893 ++++
starmath/source/mathtype.cxx | 3081 ++++++++++++
starmath/source/mathtype.hxx | 203 +
starmath/source/node.cxx | 2490 ++++++++++
starmath/source/parse.cxx | 2087 ++++++++
starmath/source/rect.cxx | 908 ++++
starmath/source/smdll.cxx | 166 +
starmath/source/smmod.cxx | 231 +
starmath/source/smres.src | 10674 +++++++++++++++++++++++++++++++++++++++++
starmath/source/symbol.cxx | 657 +++
starmath/source/toolbox.cxx | 274 ++
starmath/source/typemap.cxx | 190 +
starmath/source/unomodel.cxx | 782 +++
starmath/source/utility.cxx | 651 +++
starmath/source/view.cxx | 1559 ++++++
23 files changed, 33372 insertions(+)
create mode 100644 starmath/source/action.cxx
create mode 100644 starmath/source/commands.src
create mode 100644 starmath/source/config.cxx
create mode 100644 starmath/source/dialog.cxx
create mode 100644 starmath/source/document.cxx
create mode 100644 starmath/source/edit.cxx
create mode 100644 starmath/source/format.cxx
create mode 100644 starmath/source/makefile.mk
create mode 100644 starmath/source/math_pch.cxx
create mode 100644 starmath/source/mathtype.cxx
create mode 100644 starmath/source/mathtype.hxx
create mode 100644 starmath/source/node.cxx
create mode 100644 starmath/source/parse.cxx
create mode 100644 starmath/source/rect.cxx
create mode 100644 starmath/source/smdll.cxx
create mode 100644 starmath/source/smmod.cxx
create mode 100644 starmath/source/smres.src
create mode 100644 starmath/source/symbol.cxx
create mode 100644 starmath/source/toolbox.cxx
create mode 100644 starmath/source/typemap.cxx
create mode 100644 starmath/source/unomodel.cxx
create mode 100644 starmath/source/utility.cxx
create mode 100644 starmath/source/view.cxx
(limited to 'starmath/source')
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
+#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äre/Binäre Operatoren" ;
+ Text [ ENGLISH ] = "Unary/binary operators" ;
+ Text [ english_us ] = "Unary/Binary Operators" ;
+ Text [ portuguese_brazilian ] = "Unäre/Binäre Operatoren" ;
+ Text [ swedish ] = "~Monära/Binära operatorer" ;
+ Text [ danish ] = "Monadiske/binære operatorer" ;
+ Text [ italian ] = "Operatori unari/binari" ;
+ Text [ spanish ] = "Operadores ~unarios/binarios" ;
+ Text [ french ] = "Opérateurs u~naires/binaires" ;
+ Text [ dutch ] = "~Unaire/binaire operatoren" ;
+ Text [ portuguese ] = "Operadores ~unários/binários" ;
+ 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 ] = "¤@¤¸/¤G¤¸¹Bºâ²Å";
+ Text[ dutch ] = "~Unaire/binaire operatoren";
+ Text[ chinese_simplified ] = "Ò»Ôª/¶þÔªÔËËã·û";
+ Text[ greek ] = "Åíá~äéêïß/Äõáäéêïß ôåëåóôÝò";
+ Text[ korean ] = "ÀÏÁø/ÀÌÁø ¿¬»êÀÚ";
+ Text[ arabic ] = "ÚæÇãá ÊÔÛíá ÃÍÇÏíÉ/ËäÇÆíÉ";
+ Text[ turkish ] = "Birli/ikili iþleçler";
+ 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 ] = "Ãö«Y";
+ Text[ dutch ] = "~Relaties";
+ Text[ chinese_simplified ] = "¹Øϵ";
+ Text[ greek ] = "~Ó÷Ýóåéò";
+ Text[ korean ] = "°ü°è";
+ Text[ arabic ] = "ÚáÇÞÇÊ";
+ Text[ turkish ] = "Ýliþkiler";
+ 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ängdoperationer" ;
+ Text [ danish ] = "Mængdeoperationer" ;
+ Text [ italian ] = "Operazioni degli insiemi" ;
+ Text [ spanish ] = "~Operaciones de conjuntos" ;
+ Text [ french ] = "O~pérations 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 ] = "W‡‰‰ŽZ";
+ Text[ chinese_traditional ] = "¼Æ¶qpºâ";
+ Text[ dutch ] = "~Definities";
+ Text[ chinese_simplified ] = "ÊýÁ¿¼ÆËã";
+ Text[ greek ] = "~ÐñÜîåéò óõíüëùí";
+ Text[ korean ] = "¿¬»êÀÚ ¼³Á¤";
+ Text[ arabic ] = "ãÌãæÚÉ ÚãáíÇÊ";
+ Text[ turkish ] = "Küme iþlemleri";
+ 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 ] = "¨ä¥L";
+ TEXT[ language_user1 ] = " ";
+ TEXT[ dutch ] = "andere";
+ TEXT[ chinese_simplified ] = "ÆäËû";
+ TEXT[ greek ] = "Üëëá";
+ TEXT[ korean ] = "±âŸ";
+ TEXT[ arabic ] = "ÛíÑ Ðáß";
+ TEXT[ turkish ] = "Diðer";
+ };
+ };
+ };
+ 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érateurs" ;
+ 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 ] = "‰‰ŽZŽq";
+ Text[ chinese_traditional ] = "¹Bºâ²Å";
+ Text[ dutch ] = "O~peratoren";
+ Text[ chinese_simplified ] = "ÔËËã·û";
+ Text[ greek ] = "~ÔåëåóôÝò";
+ Text[ korean ] = "¿¬»êÀÚ";
+ Text[ arabic ] = "ÚæÇãá ÇáÊÔÛíá";
+ Text[ turkish ] = "Ýþleçler";
+ 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 ] = "Öznitelikler";
+ 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éntesis" ;
+ Text [ french ] = "~Parenthèses" ;
+ Text [ dutch ] = "~Haakjes" ;
+ Text [ portuguese ] = "~Parênteses" ;
+ 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 ] = "¬A¸¹";
+ Text[ dutch ] = "~Haakjes";
+ Text[ chinese_simplified ] = "À¨ºÅ";
+ Text[ greek ] = "~ÐáñåíèÝóåéò";
+ Text[ korean ] = "°ýÈ£";
+ Text[ arabic ] = "ÃÞæÇÓ";
+ Text[ turkish ] = "Ayraçlar";
+ 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ínea";
+ Text[ english_us ] = "New Line";
+ Text[ chinese_simplified ] = "»»ÐÐ";
+ Text[ russian ] = "íîâàÿ ñòðîêà";
+ Text[ polish ] = "nowy wiersz";
+ Text[ japanese ] = "V‚µ‚¢s";
+ Text[ chinese_traditional ] = "´«¦æ";
+ Text[ dutch ] = "nieuwe regel";
+ Text[ chinese_simplified ] = "»»ÐÐ";
+ Text[ greek ] = "ÍÝá ãñáììÞ";
+ Text[ korean ] = "»õ ÁÙ";
+ Text[ arabic ] = "ÎØ ÌÏíÏ";
+ Text[ turkish ] = "Yeni satýr";
+ 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çamento pequeno";
+ Text[ danish ] = "lille mellemrum";
+ Text[ french ] = "Petit espace";
+ Text[ swedish ] = "litet mellanrum";
+ Text[ dutch ] = "kleine spatie";
+ Text[ spanish ] = "espacio pequeño";
+ Text[ english_us ] = "Small Gap";
+ Text[ chinese_simplified ] = "С¼ä¸ô";
+ Text[ russian ] = "êîðîòêèé ïðîáåë";
+ Text[ polish ] = "Ma³y odstêp miêdzy ramkami";
+ Text[ japanese ] = "¬½Íß°½";
+ Text[ chinese_traditional ] = "¤p¶¡¹j";
+ Text[ dutch ] = "kleine spatie";
+ Text[ chinese_simplified ] = "С¼ä¸ô";
+ Text[ greek ] = "ìéêñü äéÜêåíï";
+ Text[ korean ] = "ÀÛÀº °£°Ý";
+ Text[ arabic ] = "ÊÈÇÚÏ ÕÛíÑ";
+ Text[ turkish ] = "Küçük aralýk";
+ 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çamento";
+ 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êp ramek";
+ Text[ japanese ] = "½Íß°½";
+ Text[ chinese_traditional ] = "¶¡¹j";
+ Text[ dutch ] = "spatie";
+ Text[ chinese_simplified ] = "¼ä¸ô";
+ Text[ greek ] = "ÄéÜêåíï";
+ Text[ korean ] = "°£°Ý";
+ Text[ arabic ] = "ÊÈÇÚÏ";
+ Text[ turkish ] = "Aralýk";
+ 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 ] = "¨ä¥L";
+ Text[ dutch ] = "D~iversen";
+ Text[ chinese_simplified ] = "ÆäËû";
+ Text[ greek ] = "~ÄéÜöïñá";
+ Text[ korean ] = "±âŸ(~O)";
+ Text[ arabic ] = "ãÇ ÚÏì Ðáß";
+ Text[ turkish ] = "Diðer";
+ 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
+#endif
+#ifndef _SFXHINT_HXX //autogen
+#include
+#endif
+#ifndef _SFXSMPLHINT_HXX //autogen
+#include
+#endif
+#ifndef _SFX_INIMGR_HXX //autogen
+#include
+#endif
+#ifndef _SFXSIDS_HRC //autogen
+#include
+#endif
+#ifndef _SFXENUMITEM_HXX //autogen
+#include
+#endif
+#ifndef _SFXITEMPOOL_HXX //autogen
+#include
+#endif
+#ifndef _SFXSTRITEM_HXX //autogen
+#include
+#endif
+#ifndef _SFXINTITEM_HXX //autogen
+#include
+#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üssen 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
+#endif
+#ifndef _SFXINTITEM_HXX //autogen
+#include
+#endif
+#ifndef _IODLG_HXX
+#include
+#endif
+#ifndef _SFXSTRITEM_HXX //autogen
+#include
+#endif
+#ifndef _SFXAPP_HXX //autogen
+#include
+#endif
+#ifndef _SV_MSGBOX_HXX //autogen
+#include
+#endif
+#ifndef _CTRLTOOL_HXX //autogen
+#include
+#endif
+#ifndef _SFX_PRINTER_HXX
+#include
+#endif
+#ifndef _SV_SOUND_HXX //autogen
+#include
+#endif
+#ifndef _SV_SNDSTYLE_HXX //autogen
+#include
+#endif
+#ifndef _SV_WAITOBJ_HXX
+#include
+#endif
+#ifndef _SFXDISPATCH_HXX //autogen
+#include
+#endif
+#ifndef _SFX_HRC //autogen
+#include
+#endif
+#ifndef _STRING_HXX //autogen
+#include
+#endif
+#ifndef _TOOLS_DEBUG_HXX //autogen
+#include
+#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 über die Attribute gesetzt/abgefragt wird als über
+// den StyleName bauen wir uns hier unsere eigene Übersetzung
+// 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üssen 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ßt 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örigen Controls in Abhängigkeit von der
+ // gewählten 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örigen HelpID überprüft.
+ bActive = aCatMf2Hid[nCategory][i] != 0;
+
+ pFT->Show(bActive);
+ pFT->Enable(bActive);
+ pMF->Show(bActive);
+ pMF->Enable(bActive);
+
+ // setzen von Maßeinheit 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ändert 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örige 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”nnen die tats„chlich unterschiedlich sein?
+ // wenn nicht kann oben n„mlich 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ür 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ür 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öhe 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üllt den background mit der background-Farbe.
+ // Falls der NULL pointer übergeben wurde reicht dies also zum löschen
+ // der Anzeige
+ Invalidate();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+void SmSymbolDialog::FillSymbolSets(BOOL bDeleteText)
+ // füllt die Einträge der möglichen '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änderte 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ählen
+ nLen = Min(aOutputSize.Width() / nColumns, aOutputSize.Height() / nRows);
+
+ // Fenster genau passend machen (wird höchstens 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ür 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
+ // über die 'FontStyleBox' gewählt 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üllt ??");
+
+ SmSymSet *pSymSet = GetSymbolSet(aSymbolSets);
+
+ // SymbolSet einfügen 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ügen
+ SmSym *pSym = new SmSym(aSymbols.GetText(), aCharsetDisplay.GetFont(),
+ aCharsetDisplay.GetSelectChar());
+ pSymSet->AddSymbol(pSym);
+
+ // update der Hash Tabelle erzwingen (damit aAddBtn disabled wird).
+ // (wird später nach Überarbeitung von symbol.cxx überflüssig 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üllt ??");
+
+ // 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ügen 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");
+
+ // Änderungen durchführen;
+ pSym->GetName() = aSymbols.GetText();
+ pSym->GetFace() = aCharsetDisplay.GetFont();
+ pSym->GetCharacter() = aCharsetDisplay.GetSelectChar();
+
+ // das SymbolSet wechseln wenn nötig
+ if (pOldSymSet != pNewSymSet)
+ {
+ pOldSymSet->RemoveSymbol(nSymbol);
+ pNewSymSet->AddSymbol(pSym);
+ }
+
+ //!! den SymbolSet Manger dazu zwingen seinen HashTable zu aktualisieren,
+ //!! um mit möglich 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üllt ??");
+
+ if (pOrigSymbol)
+ {
+ // löschen des Symbols:
+ //
+ // zugehöriges 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üge auf das Symbols löschen
+ DBG_ASSERT(pOrigSymbol == &pSymSet->GetSymbol(nSymbolNo),
+ "Sm : Fehler beim löschen 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ämlich nicht tut, wenn in einem seiner SymbolSets geändert/
+ //!! gelöscht wird, was wiederum zu einem Absturz führen kann (wenn er
+ //!! über ein nicht mehr existentes aber nicht entferntes Symbol iteriert).
+ aSymSetMgrCopy.ChangeSymbolSet((SmSymSet *)1);
+
+ // aktualisieren der Symboleinträge 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ügen nur wenn es noch kein Symbol desgleichen Namens gibt
+ bAdd = aSymSetMgrCopy.GetSymbol(aSymbolName) == NULL;
+
+ // löschen nur wenn alle Einstellungen gleich sind
+ bDelete = pOrigSymbol != NULL;
+
+ // ändern wenn bei gleichem Namen mindestens eine Einstellung anders ist
+ // oder wenn es noch kein Symbol des neuen Namens gibt (würde implizites
+ // löschen 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();
+
+ // Änderungen übernehmen 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öschen die
+ // Elemente aufrücken.
+ 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äter damit
+ // testen kann ob sich was geändert 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örigen Darstellung
+ FixedText &rFT = bIsOld ? aOldSymbolSetName : aSymbolSetName;
+ rFT.SetText(rComboBox.GetText());
+
+ // setzen der zum SymbolSet gehörenden Symbol Namen an der zugehörigen
+ // Auswahbox
+ ComboBox &rCB = bIsOld ? aOldSymbols : aSymbols;
+ FillSymbols(rCB, FALSE);
+
+ // bei Wechsel des SymbolSets für das alte Zeichen ein gültiges
+ // 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öschen 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ählen
+ const Font &rFont = pSymbol->GetFace();
+ SelectFont(rFont.GetName(), FALSE);
+ SelectStyle(GetFontStyleName(rFont), FALSE);
+
+ // da das setzen des Fonts über 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ört
+ // zu Fuß.
+ aCharsetDisplay.SetFont(rFont);
+ aSymbolDisplay.SetFont(rFont);
+
+ // das zugehörige Zeichen auswählen
+ 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öglichen
+ // (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
+#endif
+#include
+#ifndef _SVSTOR_HXX //autogen
+#include
+#endif
+#ifndef _SFXSMPLHINT_HXX //autogen
+#include
+#endif
+#ifndef _SO_CLSIDS_HXX //autogen
+#include
+#endif
+#ifndef _SOT_EXCHANGE_HXX //autogen
+#include
+#endif
+#ifndef _SV_MSGBOX_HXX //autogen
+#include
+#endif
+#ifndef _SFXENUMITEM_HXX //autogen
+#include
+#endif
+#ifndef _SFX_WHITER_HXX //autogen
+#include
+#endif
+#ifndef _SFXINTITEM_HXX //autogen
+#include
+#endif
+#ifndef _SFXSTRITEM_HXX //autogen
+#include
+#endif
+#ifndef _SFXPTITEM_HXX //autogen
+#include
+#endif
+#ifndef _UNDO_HXX //autogen
+#include
+#endif
+#ifndef _SFXITEMPOOL_HXX //autogen
+#include
+#endif
+#ifndef SVTOOLS_URIHELPER_HXX
+#include
+#endif
+#ifndef _SFXDISPATCH_HXX //autogen
+#include
+#endif
+#ifndef _SFXDOCINF_HXX //autogen
+#include
+#endif
+#ifndef _SFXDOCFILE_HXX //autogen
+#include
+#endif
+#ifndef _SFXAPP_HXX //autogen
+#include
+#endif
+#ifndef _SFXREQUEST_HXX //autogen
+#include
+#endif
+#ifndef _IODLG_HXX
+#include
+#endif
+#ifndef _SFXECODE_HXX //autogen
+#include
+#endif
+#ifndef _SV_EXCHANGE_HXX //autogen
+#include
+#endif
+#ifndef _SFX_PRINTER_HXX //autogen
+#include
+#endif
+#ifndef _SFX_DOCFILT_HACK_HXX
+#include
+#endif
+
+#ifndef STARMATH_HRC
+#include
+#endif
+#ifndef DOCUMENT_HXX
+#include
+#endif
+#ifndef UNOMODEL_HXX
+#include
+#endif
+#ifndef CONFIG_HXX
+#include
+#endif
+#ifndef SYMBOL_HXX
+#include
+#endif
+#ifndef TOOLBOX_HXX
+#include
+#endif
+#ifndef DIALOG_HXX
+#include
+#endif
+#ifndef ACTION_HXX
+#include
+#endif
+#ifndef VIEW_HXX
+#include
+#endif
+#ifndef FORMAT_HXX
+#include
+#endif
+#ifndef MATHTYPE_HXX
+#include
+#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++; //! merkwrdig...
+ // ohne dies wird die Grafik letztlich
+ // nicht geupdatet
+ Resize();
+ }
+ break;
+ }
+
+ case HINT_FORMATCHANGED:
+ SetFormulaArranged(FALSE);
+ nModifyCount++; //! merkwrdig...
+ // 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ür 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ötig ein anderes OutputDevice holen für 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öscht 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öhen,...
+ 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
+#endif
+#ifndef _MyEDITVIEW_HXX //autogen
+#include
+#endif
+#ifndef _MyEDITENG_HXX //autogen
+#include
+#endif
+#ifndef _EDITSTAT_HXX //autogen
+#include
+#endif
+#ifndef _EEITEM_HXX //autogen
+#include
+#endif
+#ifndef _SFXDISPATCH_HXX //autogen
+#include
+#endif
+#ifndef _SFXINTITEM_HXX //autogen
+#include
+#endif
+#ifndef _SFXITEMPOOL_HXX //autogen
+#include
+#endif
+#ifndef _SFXSTRITEM_HXX //autogen
+#include
+#endif
+#ifndef _SVX_FHGTITEM_HXX //autogen
+#include
+#endif
+#ifndef _SVX_WGHTITEM_HXX //autogen
+#include
+#endif
+#ifndef _SVX_LRSPITEM_HXX //autogen
+#include
+#endif
+#ifndef _SFXITEMSET_HXX //autogen
+#include
+#endif
+#ifndef _SVX_FONTITEM_HXX //autogen
+#include
+#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ängeren Eingaben)
+ // möglichst 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ür 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„t 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ür Version 4.0 (und älter) sollen auch die normalen Klammern skalierbar
+ // sein und wachsen (so wie es der Fall war), in der 5.0 Version jedoch nicht.
+ // In späteren 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
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#ifndef _SMART_COM_SUN_STAR_FRAME_XDISPATCHPROVIDERINTERCEPTOR_HXX_
+#include
+#endif
+#ifndef _SMART_COM_SUN_STAR_FRAME_XDISPATCH_HXX_
+#include
+#endif
+#ifndef _SMART_COM_SUN_STAR_FRAME_XDISPATCHPROVIDER_HXX_
+#include
+#endif
+#ifndef _SMART_COM_SUN_STAR_FRAME_XSTATUSLISTENER_HXX_
+#include
+#endif
+#ifndef _SMART_COM_SUN_STAR_FRAME_FRAMESEARCHFLAG_HXX_
+#include
+#endif
+#ifndef _SMART_COM_SUN_STAR_FRAME_XDISPATCHPROVIDERINTERCEPTION_HXX_
+#include
+#endif
+#ifndef _SMART_COM_SUN_STAR_FRAME_FEATURESTATEEVENT_HXX_
+#include
+#endif
+#ifndef _SMART_COM_SUN_STAR_FRAME_DISPATCHDESCRIPTOR_HXX_
+#include
+#endif
+#ifndef _SMART_COM_SUN_STAR_FRAME_XFRAMEACTIONLISTENER_HXX_
+#include
+#endif
+#ifndef _SMART_COM_SUN_STAR_FRAME_XCOMPONENTLOADER_HXX_
+#include
+#endif
+#ifndef _SMART_COM_SUN_STAR_FRAME_XFRAME_HXX_
+#include
+#endif
+#ifndef _SMART_COM_SUN_STAR_FRAME_FRAMEACTIONEVENT_HXX_
+#include
+#endif
+#ifndef _SMART_COM_SUN_STAR_FRAME_FRAMEACTION_HXX_
+#include
+#endif
+#ifndef _SMART_COM_SUN_STAR_UTIL_XURLTRANSFORMER_HXX_
+#include
+#endif
+#ifndef _SMART_COM_SUN_STAR_TASK_XSTATUSINDICATORFACTORY_HXX_
+#include
+#endif
+#ifndef _SMART_COM_SUN_STAR_TASK_XSTATUSINDICATORSUPPLIER_HXX_
+#include
+#endif
+#ifndef _SMART_COM_SUN_STAR_TASK_XSTATUSINDICATOR_HXX_
+#include
+#endif
+#ifndef _SMART_COM_SUN_STAR_FRAME_XBROWSEHISTORYREGISTRY_HXX_
+#include
+#endif
+#ifndef _SMART_COM_SUN_STAR_IO_BUFFERSIZEEXCEEDEDEXCEPTION_HXX_
+#include
+#endif
+#ifndef _SMART_COM_SUN_STAR_IO_NOTCONNECTEDEXCEPTION_HXX_
+#include
+#endif
+#ifndef _SMART_COM_SUN_STAR_IO_IOEXCEPTION_HXX_
+#include
+#endif
+#ifndef _SMART_COM_SUN_STAR_IO_UNEXPECTEDEOFEXCEPTION_HXX_
+#include
+#endif
+#ifndef _SMART_COM_SUN_STAR_IO_WRONGFORMATEXCEPTION_HXX_
+#include
+#endif
+#ifndef _SMART_COM_SUN_STAR_LANG_SERVICENOTREGISTEREDEXCEPTION_HXX_
+#include
+#endif
+#ifndef _SMART_COM_SUN_STAR_LANG_NULLPOINTEREXCEPTION_HXX_
+#include
+#endif
+#ifndef _SMART_COM_SUN_STAR_LANG_CLASSNOTFOUNDEXCEPTION_HXX_
+#include
+#endif
+#ifndef _SMART_COM_SUN_STAR_LANG_NOSUCHMETHODEXCEPTION_HXX_
+#include
+#endif
+#ifndef _SMART_COM_SUN_STAR_LANG_SECURITYEXCEPTION_HXX_
+#include
+#endif
+#ifndef _SMART_COM_SUN_STAR_LANG_NOSUCHFIELDEXCEPTION_HXX_
+#include
+#endif
+#ifndef _SMART_COM_SUN_STAR_LANG_DISPOSEDEXCEPTION_HXX_
+#include
+#endif
+#ifndef _SMART_COM_SUN_STAR_LANG_ARRAYINDEXOUTOFBOUNDSEXCEPTION_HXX_
+#include
+#endif
+#ifndef _SMART_COM_SUN_STAR_LANG_ILLEGALACCESSEXCEPTION_HXX_
+#include
+#endif
+#ifndef _SMART_COM_SUN_STAR_LANG_INDEXOUTOFBOUNDSEXCEPTION_HXX_
+#include
+#endif
+#ifndef _SMART_COM_SUN_STAR_LANG_ILLEGALARGUMENTEXCEPTION_HXX_
+#include
+#endif
+#ifndef _SMART_COM_SUN_STAR_LANG_NOSUPPORTEXCEPTION_HXX_
+#include
+#endif
+#ifndef _SMART_COM_SUN_STAR_LANG_WRAPPEDTARGETEXCEPTION_HXX_
+#include
+#endif
+#ifndef _SMART_COM_SUN_STAR_REFLECTION_PARAMINFO_HXX_
+#include
+#endif
+#ifndef _SMART_COM_SUN_STAR_REFLECTION_XIDLARRAY_HXX_
+#include
+#endif
+#ifndef _SMART_COM_SUN_STAR_REFLECTION_XIDLCLASSPROVIDER_HXX_
+#include
+#endif
+#ifndef _SMART_COM_SUN_STAR_REFLECTION_FIELDACCESSMODE_HXX_
+#include