summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorrobert Babiak <babiakr3@mymail.macewan.ca>2015-03-25 15:28:32 -0600
committerCaolán McNamara <caolanm@redhat.com>2015-03-26 14:10:38 +0000
commit6c4100cf81e1678ff386549c0cdaa2f73a154ddc (patch)
treefed2373c82105c7f047b4949ff7d2099708f7059 /starmath
parent9aca5ac2290718fd87204968d7e2d0e1b51fb791 (diff)
Added shortcut for arrows when doing start math formulas
Added shortcut of <- and -> for entering leftarrow and right arrow. This greatly speeds up entering formula when taking notes. Change-Id: Ib84e330b15aab4e8068870df63d808d8ce90b9fe Reviewed-on: https://gerrit.libreoffice.org/15011 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/parse.cxx20
1 files changed, 20 insertions, 0 deletions
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index 35d3a735e263..cb47ab9228b7 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -557,6 +557,16 @@ void SmParser::NextToken()
rnEndPos = nRealStart + 2;
}
+ else if (m_aBufferString.match("<-", nRealStart))
+ {
+ m_aCurToken.eType = TLEFTARROW;
+ m_aCurToken.cMathChar = MS_LEFTARROW;
+ m_aCurToken.nGroup = TGSTANDALONE;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText = "<-";
+
+ rnEndPos = nRealStart + 2;
+ }
else if (m_aBufferString.match("<>", nRealStart))
{
m_aCurToken.eType = TNEQ;
@@ -854,6 +864,16 @@ void SmParser::NextToken()
rnEndPos = nRealStart + 2;
}
+ else if (m_aBufferString.match("->", nRealStart))
+ {
+ m_aCurToken.eType = TRIGHTARROW;
+ m_aCurToken.cMathChar = MS_RIGHTARROW;
+ m_aCurToken.nGroup = TGSTANDALONE;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText = "->";
+
+ rnEndPos = nRealStart + 2;
+ }
else
{
m_aCurToken.eType = TMINUS;