summaryrefslogtreecommitdiff
path: root/starmath/inc
diff options
context:
space:
mode:
Diffstat (limited to 'starmath/inc')
-rw-r--r--starmath/inc/applicat.hxx4
-rw-r--r--starmath/inc/dialog.hxx6
-rwxr-xr-x[-rw-r--r--]starmath/inc/format.hxx4
-rw-r--r--starmath/inc/node.hxx23
-rwxr-xr-x[-rw-r--r--]starmath/inc/starmath.hrc22
-rw-r--r--starmath/inc/symbol.hxx20
-rwxr-xr-x[-rw-r--r--]starmath/inc/toolbox.hxx6
-rw-r--r--starmath/inc/utility.hxx4
8 files changed, 41 insertions, 48 deletions
diff --git a/starmath/inc/applicat.hxx b/starmath/inc/applicat.hxx
index 9c756496ae95..38fcf2b8445c 100644
--- a/starmath/inc/applicat.hxx
+++ b/starmath/inc/applicat.hxx
@@ -51,10 +51,6 @@ class SvxErrorHandler;
**
**/
-#ifdef WIN
-#define RELEASE "WIN304"
-#endif
-
#ifdef PM2
#define RELEASE "PM304"
#endif
diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx
index ad4e69c7308a..a421cc8a164e 100644
--- a/starmath/inc/dialog.hxx
+++ b/starmath/inc/dialog.hxx
@@ -30,9 +30,7 @@
#include <vcl/image.hxx>
#include <vcl/dialog.hxx>
#include <vcl/fixed.hxx>
-#ifndef _SV_BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
#include <vcl/image.hxx>
#include <sfx2/tabdlg.hxx>
#include <vcl/combobox.hxx>
@@ -403,8 +401,8 @@ public:
{
}
- void SetChar(xub_Unicode aChar);
- void SetFont(const Font &rFont);
+ void SetSymbol( const SmSym *pSym );
+ void SetSymbol( sal_UCS4 cChar, const Font &rFont );
};
////////////////////////////////////////////////////////////////////////////////
diff --git a/starmath/inc/format.hxx b/starmath/inc/format.hxx
index f632131d834f..4d13ea48185e 100644..100755
--- a/starmath/inc/format.hxx
+++ b/starmath/inc/format.hxx
@@ -109,6 +109,7 @@ class SmFormat : public SfxBroadcaster
USHORT vSize[SIZ_END + 1];
USHORT vDist[DIS_END + 1];
SmHorAlign eHorAlign;
+ INT16 nGreekCharStyle;
BOOL bIsTextmode,
bScaleNormalBrackets;
@@ -138,6 +139,9 @@ public:
BOOL IsTextmode() const { return bIsTextmode; }
void SetTextmode(BOOL bVal) { bIsTextmode = bVal; }
+ INT16 GetGreekCharStyle() const { return nGreekCharStyle; }
+ void SetGreekCharStyle(INT16 nVal) { nGreekCharStyle = nVal; }
+
BOOL IsScaleNormalBrackets() const { return bScaleNormalBrackets; }
void SetScaleNormalBrackets(BOOL bVal) { bScaleNormalBrackets = bVal; }
diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx
index 6ef89ea5ec1b..92c9d4621292 100644
--- a/starmath/inc/node.hxx
+++ b/starmath/inc/node.hxx
@@ -311,19 +311,10 @@ class SmTextNode : public SmVisibleNode
USHORT nFontDesc;
protected:
- SmTextNode(SmNodeType eNodeType, const SmToken &rNodeToken, USHORT nFontDescP)
- : SmVisibleNode(eNodeType, rNodeToken)
- {
- nFontDesc = nFontDescP;
- }
+ SmTextNode(SmNodeType eNodeType, const SmToken &rNodeToken, USHORT nFontDescP );
public:
- SmTextNode(const SmToken &rNodeToken, USHORT nFontDescP)
- : SmVisibleNode(NTEXT, rNodeToken)
- {
- nFontDesc = nFontDescP;
- }
-
+ SmTextNode(const SmToken &rNodeToken, USHORT nFontDescP );
USHORT GetFontDesc() const { return nFontDesc; }
void SetText(const XubString &rText) { aText = rText; }
@@ -347,15 +338,13 @@ public:
class SmSpecialNode : public SmTextNode
{
+ bool bIsFromGreekSymbolSet;
+
protected:
- SmSpecialNode(SmNodeType eNodeType, const SmToken &rNodeToken, USHORT _nFontDesc)
- : SmTextNode(eNodeType, rNodeToken, _nFontDesc)
- {}
+ SmSpecialNode(SmNodeType eNodeType, const SmToken &rNodeToken, USHORT _nFontDesc);
public:
- SmSpecialNode(const SmToken &rNodeToken)
- : SmTextNode(NSPECIAL, rNodeToken, FNT_MATH) //! default Font nicht immer richtig
- {}
+ SmSpecialNode(const SmToken &rNodeToken);
virtual void Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell);
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
diff --git a/starmath/inc/starmath.hrc b/starmath/inc/starmath.hrc
index f83ae0fc8c23..1b919471115c 100644..100755
--- a/starmath/inc/starmath.hrc
+++ b/starmath/inc/starmath.hrc
@@ -36,28 +36,28 @@
#define SID_PREVERR (SID_SMA_START + 2)
#define SID_NEXTMARK (SID_SMA_START + 3)
#define SID_PREVMARK (SID_SMA_START + 4)
-#define SID_SYMBOLS_CATALOGUE (SID_SMA_START + 5)
+#define SID_SYMBOLS_CATALOGUE (SID_SMA_START + 5)
#define SID_PREFERENCES (SID_SMA_START + 6)
#define SID_VIEW050 (SID_SMA_START + 7)
#define SID_VIEW100 (SID_SMA_START + 8)
#define SID_VIEW200 (SID_SMA_START + 9)
-#define SID_ZOOMIN (SID_SMA_START + 10)
+#define SID_ZOOMIN (SID_SMA_START + 10)
#define SID_ZOOMOUT (SID_SMA_START + 11)
-#define SID_DRAW (SID_SMA_START + 12)
-#define SID_ADJUST (SID_SMA_START + 13)
+#define SID_DRAW (SID_SMA_START + 12)
+#define SID_ADJUST (SID_SMA_START + 13)
#define SID_TOOLBOX (SID_SMA_START + 14)
#define SID_FORMULACURSOR (SID_SMA_START + 15)
-#define SID_FONT (SID_SMA_START + 50)
+#define SID_FONT (SID_SMA_START + 50)
#define SID_FONTSIZE (SID_SMA_START + 51)
#define SID_DISTANCE (SID_SMA_START + 52)
-#define SID_ALIGN (SID_SMA_START + 53)
+#define SID_ALIGN (SID_SMA_START + 53)
#define SID_AUTO_REDRAW (SID_SMA_START + 55)
#define SID_SYMBOLS (SID_SMA_START + 56) // Muss erstmal wieder aufgenommen werden !
#define SID_TEXTMODE (SID_SMA_START + 57)
-#define SID_INSERT_FORMULA (SID_SMA_START + 58)
-#define SID_TEXT (SID_SMA_START + 100)
-#define SID_GAPHIC_SM (SID_SMA_START + 101)
+#define SID_IMPORT_FORMULA (SID_SMA_START + 58)
+#define SID_TEXT (SID_SMA_START + 100)
+#define SID_GAPHIC_SM (SID_SMA_START + 101)
#define SID_FITINWINDOW (SID_SMA_START + 103)
#define SID_INSERTTEXT (SID_SMA_START + 104)
#define SID_INSERTCOMMAND (SID_SMA_START + 105)
@@ -82,7 +82,7 @@
#define SID_CMDBOXWINDOW (SID_SMA_START + 122)
#define SID_TOOLBOXWINDOW (SID_SMA_START + 123)
#define SID_NO_RIGHT_SPACES (SID_SMA_START + 124)
-#define SID_DUMMY (SID_SMA_START + 254)
+#define SID_DUMMY (SID_SMA_START + 254)
//#define GID_FORMEL (RID_GROUPS_OFFSET + 1)
//#define GID_ERROR (RID_GROUPS_OFFSET + 2)
@@ -108,7 +108,7 @@
#define RID_READSYMBOLERROR (RID_APP_START + 203)
#define RID_NOMATHTYPEFACEWARNING (RID_APP_START + 204)
#define RID_OBJECTNAME (RID_APP_START + 501)
-#define RID_VIEWNAME (RID_APP_START + 502)
+ // free
#define RID_UNDOEDITNAME (RID_APP_START + 503)
#define RID_UNDOFORMATNAME (RID_APP_START + 504)
#define RID_APPICO (RID_APP_START + 601)
diff --git a/starmath/inc/symbol.hxx b/starmath/inc/symbol.hxx
index 503859485095..621538790300 100644
--- a/starmath/inc/symbol.hxx
+++ b/starmath/inc/symbol.hxx
@@ -38,7 +38,10 @@
#include <map>
#include <vector>
#include <set>
+#include <functional>
+#include <algorithm>
+#include "unomodel.hxx"
#include "utility.hxx"
#include "smmod.hxx"
@@ -79,24 +82,24 @@ class SmSym
String m_aName;
String m_aExportName;
String m_aSetName;
- sal_Unicode m_cChar;
+ sal_UCS4 m_cChar;
BOOL m_bPredefined;
BOOL m_bDocSymbol;
public:
SmSym();
- SmSym(const String& rName, const Font& rFont, sal_Unicode cChar,
+ SmSym(const String& rName, const Font& rFont, sal_UCS4 cChar,
const String& rSet, BOOL bIsPredefined = FALSE);
SmSym(const SmSym& rSymbol);
SmSym& operator = (const SmSym& rSymbol);
const Font& GetFace() const { return m_aFace; }
- sal_Unicode GetCharacter() const { return m_cChar; }
+ sal_UCS4 GetCharacter() const { return m_cChar; }
const String& GetName() const { return m_aName; }
void SetFace( const Font& rFont ) { m_aFace = rFont; }
- void SetCharacter( sal_Unicode cChar ) { m_cChar = cChar; }
+ void SetCharacter( sal_UCS4 cChar ) { m_cChar = cChar; }
//! since the symbol name is also used as key in the map it should not be possible to change the name
//! because ten the key would not be the same as its supposed copy here
@@ -133,6 +136,15 @@ typedef std::map< String, SmSym, lt_String > SymbolMap_t;
// vector of pointers to the actual symbols in the above container
typedef std::vector< const SmSym * > SymbolPtrVec_t;
+struct lt_SmSymPtr : public std::binary_function< const SmSym *, const SmSym *, bool >
+{
+ bool operator() ( const SmSym *pSym1, const SmSym *pSym2 )
+ {
+ return pSym1->GetCharacter() < pSym2->GetCharacter();
+ }
+};
+
+
class SmSymbolManager : public SfxListener
{
SymbolMap_t m_aSymbols;
diff --git a/starmath/inc/toolbox.hxx b/starmath/inc/toolbox.hxx
index 1881adc0f845..fcc1b046f2dd 100644..100755
--- a/starmath/inc/toolbox.hxx
+++ b/starmath/inc/toolbox.hxx
@@ -30,12 +30,10 @@
#include <sfx2/basedlgs.hxx>
#include <sfx2/childwin.hxx>
#include <vcl/toolbox.hxx>
+
#include "smmod.hxx"
#include "config.hxx"
-
-#include "dialog.hrc"
-
-#define NUM_TBX_CATEGORIES 9
+#include "toolbox.hrc"
class SmToolBoxWindow : public SfxFloatingWindow
{
diff --git a/starmath/inc/utility.hxx b/starmath/inc/utility.hxx
index e7db51152e25..d01c894af592 100644
--- a/starmath/inc/utility.hxx
+++ b/starmath/inc/utility.hxx
@@ -42,10 +42,6 @@ class String;
#define C2S(cChar) String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM(cChar))
-/////////////////////////////////////////////////////////////////
-
-const ByteString ExportString( const String& rString );
-const String ImportString( const ByteString& rByteString );
/////////////////////////////////////////////////////////////////