summaryrefslogtreecommitdiff
path: root/starmath/inc/parse.hxx
diff options
context:
space:
mode:
authorJonas Finnemann Jensen <jopsen@gmail.com>2010-10-01 22:04:50 +0200
committerJonas Finnemann Jensen <jopsen@gmail.com>2010-10-01 23:08:54 +0200
commit8c340c4270c3e955862f4f56be9fc135a3c2cc43 (patch)
tree58ca65df035ed3d141bd26319b1e2470455e4198 /starmath/inc/parse.hxx
parentc1369970be1d2c0cb19edcac4e1d010635c89730 (diff)
Integrated the visual formula editor patch
Ported the most recent version of the visual formula editor patch, to LibreOffice. This patch is not finished yet, see README for more information.
Diffstat (limited to 'starmath/inc/parse.hxx')
-rw-r--r--starmath/inc/parse.hxx19
1 files changed, 18 insertions, 1 deletions
diff --git a/starmath/inc/parse.hxx b/starmath/inc/parse.hxx
index facf17d561e2..7de103f23caa 100644
--- a/starmath/inc/parse.hxx
+++ b/starmath/inc/parse.hxx
@@ -117,7 +117,7 @@ struct SmToken
String aText;
// token info
SmTokenType eType;
- sal_Unicode cMathChar;
+ sal_Unicode cMathChar;
// parse-help info
ULONG nGroup;
USHORT nLevel;
@@ -126,6 +126,11 @@ struct SmToken
xub_StrLen nCol;
SmToken();
+ SmToken(SmTokenType eTokenType,
+ sal_Unicode cMath,
+ const sal_Char* pText,
+ ULONG nTokenGroup = 0,
+ USHORT nTokenLevel = 0);
};
@@ -167,6 +172,14 @@ enum SmConvert
CONVERT_60_TO_50
};
+struct SmTokenTableEntry
+{
+ const sal_Char* pIdent;
+ SmTokenType eType;
+ sal_Unicode cMathChar;
+ ULONG nGroup;
+ USHORT nLevel;
+};
class SmParser
{
@@ -239,7 +252,10 @@ protected:
public:
SmParser();
+ /** Parse rBuffer to formula tree */
SmNode *Parse(const String &rBuffer);
+ /** Parse rBuffer to formula subtree that constitutes an expression */
+ SmNode *ParseExpression(const String &rBuffer);
const String & GetText() const { return BufferString; };
@@ -256,6 +272,7 @@ public:
const SmErrorDesc * NextError();
const SmErrorDesc * PrevError();
const SmErrorDesc * GetError(USHORT i = 0xFFFF);
+ static const SmTokenTableEntry* GetTokenTableEntry( const String &rName );
};