[Libreoffice-commits] core.git: 3 commits - sc/source

Markus Mohrhard markus.mohrhard at collabora.co.uk
Sat Dec 27 10:30:59 PST 2014


 sc/source/core/tool/compiler.cxx |   39 +++++++++------------------------------
 1 file changed, 9 insertions(+), 30 deletions(-)

New commits:
commit 757ce63f7346aea132f11c3d9a328b0a1a776403
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Sat Dec 27 19:27:19 2014 +0100

    remove copy&paste code
    
    Change-Id: I5710856fdb9fb91573de89eeb5a29d3d106ad7a6

diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 7419a37..f6c868d 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -986,6 +986,10 @@ struct ConventionOOO_A1_ODF : public ConventionOOO_A1
 
 struct ConventionXL
 {
+    virtual ~ConventionXL()
+    {
+    }
+
     static void GetTab(
         const ScAddress& rPos, const std::vector<OUString>& rTabNames,
         const ScSingleRefData& rRef, OUString& rTabName )
@@ -1100,7 +1104,7 @@ struct ConventionXL
         }
     }
 
-    static void parseExternalDocName( const OUString& rFormula, sal_Int32& rSrcPos )
+    virtual void parseExternalDocName( const OUString& rFormula, sal_Int32& rSrcPos ) const
     {
         sal_Int32 nLen = rFormula.getLength();
         const sal_Unicode* p = rFormula.getStr();
@@ -1236,7 +1240,7 @@ struct ConventionXL_A1 : public Convention_A1, public ConventionXL
                                        sal_Int32 nSrcPos,
                                        const CharClass* pCharClass) const SAL_OVERRIDE
     {
-        ConventionXL::parseExternalDocName(rFormula, nSrcPos);
+        parseExternalDocName(rFormula, nSrcPos);
 
         ParseResult aRet;
         if ( lcl_isValidQuotedText(rFormula, nSrcPos, aRet) )
@@ -1322,7 +1326,7 @@ struct ConventionXL_OOX : public ConventionXL_A1
          * CellStr. */
     }
 
-    static void parseExternalDocNameOOX(const OUString& rFormula, sal_Int32& rSrcPos)
+    virtual void parseExternalDocName(const OUString& rFormula, sal_Int32& rSrcPos) const SAL_OVERRIDE
     {
         sal_Int32 nLen = rFormula.getLength();
         const sal_Unicode* p = rFormula.getStr();
@@ -1343,25 +1347,6 @@ struct ConventionXL_OOX : public ConventionXL_A1
         }
     }
 
-    virtual ParseResult parseAnyToken( const OUString& rFormula,
-                                       sal_Int32 nSrcPos,
-                                       const CharClass* pCharClass) const SAL_OVERRIDE
-    {
-        parseExternalDocNameOOX(rFormula, nSrcPos);
-
-        ParseResult aRet;
-        if ( lcl_isValidQuotedText(rFormula, nSrcPos, aRet) )
-            return aRet;
-
-        static const sal_Int32 nStartFlags = KParseTokens::ANY_LETTER_OR_NUMBER |
-            KParseTokens::ASC_UNDERSCORE | KParseTokens::ASC_DOLLAR;
-        static const sal_Int32 nContFlags = nStartFlags | KParseTokens::ASC_DOT;
-        // '?' allowed in range names
-        const OUString aAddAllowed("?!");
-        return pCharClass->parseAnyToken( rFormula,
-                nSrcPos, nStartFlags, aAddAllowed, nContFlags, aAddAllowed );
-    }
-
     virtual void makeExternalRefStr(
         OUStringBuffer& rBuffer, const ScAddress& rPos, sal_uInt16 nFileId, const OUString& /*rFileName*/,
         const OUString& rTabName, const ScSingleRefData& rRef ) const SAL_OVERRIDE
@@ -1501,7 +1486,7 @@ struct ConventionXL_R1C1 : public ScCompiler::Convention, public ConventionXL
                                sal_Int32 nSrcPos,
                                const CharClass* pCharClass) const SAL_OVERRIDE
     {
-        ConventionXL::parseExternalDocName(rFormula, nSrcPos);
+        parseExternalDocName(rFormula, nSrcPos);
 
         ParseResult aRet;
         if ( lcl_isValidQuotedText(rFormula, nSrcPos, aRet) )
commit 02caf8f2eef75d8b5acb6a4ec40277355c3c6c6e
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Sat Dec 27 19:12:16 2014 +0100

    that method is the same as in the base class
    
    Change-Id: I8cb6f59795d9461c0e02ab70d7edd60af1410c1f

diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 2764648..7419a37 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -1362,13 +1362,6 @@ struct ConventionXL_OOX : public ConventionXL_A1
                 nSrcPos, nStartFlags, aAddAllowed, nContFlags, aAddAllowed );
     }
 
-    virtual bool parseExternalName( const OUString& rSymbol, OUString& rFile, OUString& rName,
-            const ScDocument* pDoc,
-            const uno::Sequence<sheet::ExternalLinkInfo>* pExternalLinks ) const SAL_OVERRIDE
-    {
-        return ConventionXL::parseExternalName( rSymbol, rFile, rName, pDoc, pExternalLinks);
-    }
-
     virtual void makeExternalRefStr(
         OUStringBuffer& rBuffer, const ScAddress& rPos, sal_uInt16 nFileId, const OUString& /*rFileName*/,
         const OUString& rTabName, const ScSingleRefData& rRef ) const SAL_OVERRIDE
commit cef36587674b6472471478524e87b1add4109507
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Sat Dec 27 19:11:22 2014 +0100

    return after finding the reference
    
    Change-Id: Ia22b97b0a45d8d840095737638c2ccf68373e27a

diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 1c292aa..2764648 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -1338,6 +1338,7 @@ struct ConventionXL_OOX : public ConventionXL_A1
             else if (c == ']')
             {
                 rSrcPos = i + 1;
+                return;
             }
         }
     }


More information about the Libreoffice-commits mailing list