Kaydet (Commit) 6c4100cf authored tarafından robert Babiak's avatar robert Babiak Kaydeden (comit) Caolán McNamara

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/15011Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 9aca5ac2
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment