[Libreoffice-commits] core.git: starmath/inc starmath/source

Takeshi Abe tabe at fixedpoint.jp
Thu Mar 2 01:56:14 UTC 2017


 starmath/inc/error.hxx    |    1 -
 starmath/inc/starmath.hrc |    3 +--
 starmath/source/parse.cxx |    3 +--
 starmath/source/smres.src |    5 -----
 4 files changed, 2 insertions(+), 10 deletions(-)

New commits:
commit a5c947579253a7f4e784004e18929af5ab22fa28
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Wed Mar 1 16:23:48 2017 +0900

    starmath: Drop SmParseError::UnoperExpected
    
    because it cannot happen unless the invariant about TG::UnOper is
    broken.
    
    Change-Id: I2250c785c278d77e991be04353cf34b5c1c45a21
    Reviewed-on: https://gerrit.libreoffice.org/34735
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Takeshi Abe <tabe at fixedpoint.jp>

diff --git a/starmath/inc/error.hxx b/starmath/inc/error.hxx
index ec0c10c..aff5faf 100644
--- a/starmath/inc/error.hxx
+++ b/starmath/inc/error.hxx
@@ -29,7 +29,6 @@ enum class SmParseError
     UnexpectedChar,
     UnexpectedToken,
     FuncExpected,
-    UnoperExpected,
     PoundExpected,
     ColorExpected,
     LgroupExpected,
diff --git a/starmath/inc/starmath.hrc b/starmath/inc/starmath.hrc
index 28106ed..508ad28 100644
--- a/starmath/inc/starmath.hrc
+++ b/starmath/inc/starmath.hrc
@@ -133,8 +133,7 @@
 #define RID_ERR_LBRACEEXPECTED      (RID_APP_START + 925)
 #define RID_ERR_RBRACEEXPECTED      (RID_APP_START + 926)
 #define RID_ERR_FUNCEXPECTED        (RID_APP_START + 927)
-#define RID_ERR_UNOPEREXPECTED      (RID_APP_START + 928)
-// blank: 929 - 931
+// blank: 928 - 931
 #define RID_ERR_POUNDEXPECTED       (RID_APP_START + 932)
 #define RID_ERR_COLOREXPECTED       (RID_APP_START + 933)
 #define RID_ERR_LPARENTEXPECTED     (RID_APP_START + 934)
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index 0a2dbbc..0d38459 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -1678,7 +1678,7 @@ void SmParser::DoUnOper()
             break;
 
         default :
-            Error(SmParseError::UnoperExpected);
+            assert(false);
     }
 
     // get argument
@@ -2346,7 +2346,6 @@ void SmParser::AddError(SmParseError Type, SmNode *pNode)
         case SmParseError::LbraceExpected: nRID = RID_ERR_LBRACEEXPECTED;      break;
         case SmParseError::RbraceExpected: nRID = RID_ERR_RBRACEEXPECTED;      break;
         case SmParseError::FuncExpected:   nRID = RID_ERR_FUNCEXPECTED;        break;
-        case SmParseError::UnoperExpected: nRID = RID_ERR_UNOPEREXPECTED;      break;
         case SmParseError::PoundExpected:  nRID = RID_ERR_POUNDEXPECTED;       break;
         case SmParseError::ColorExpected:  nRID = RID_ERR_COLOREXPECTED;       break;
         case SmParseError::RightExpected:  nRID = RID_ERR_RIGHTEXPECTED;       break;
diff --git a/starmath/source/smres.src b/starmath/source/smres.src
index a11baf4..b5efdeb 100644
--- a/starmath/source/smres.src
+++ b/starmath/source/smres.src
@@ -201,11 +201,6 @@ String RID_ERR_FUNCEXPECTED
     Text [ en-US ] = "Function expected" ;
 };
 
-String RID_ERR_UNOPEREXPECTED
-{
-    Text [ en-US ] = "Unary operator expected" ;
-};
-
 String RID_ERR_POUNDEXPECTED
 {
     Text [ en-US ] = "'#' expected" ;


More information about the Libreoffice-commits mailing list