Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/1826

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/26/1826/1

OSQLParser::RuleIDToRule should not silently change s_aReverseRuleIDLookup

Change-Id: I2b408a23162b1200bbcd530be7acb42435388b04
---
M connectivity/source/parse/sqlbison.y
M sal/inc/sal/log-areas.dox
2 files changed, 13 insertions(+), 1 deletion(-)



diff --git a/connectivity/source/parse/sqlbison.y b/connectivity/source/parse/sqlbison.y
index 96d0782..a0f7d43 100644
--- a/connectivity/source/parse/sqlbison.y
+++ b/connectivity/source/parse/sqlbison.y
@@ -4772,7 +4772,18 @@
 //-----------------------------------------------------------------------------
 OSQLParseNode::Rule OSQLParser::RuleIDToRule( sal_uInt32 _nRule )
 {
-    return s_aReverseRuleIDLookup[ _nRule ];
+    OSQLParser::RuleIDMap::const_iterator i (s_aReverseRuleIDLookup.find(_nRule));
+    if (i == s_aReverseRuleIDLookup.end())
+    {
+        SAL_WARN("connectivity.parse",
+                "connectivity::OSQLParser::RuleIDToRule cannot reverse-lookup rule. "
+                "Reverse mapping incomplete? "
+                "_nRule='" << _nRule << "' "
+                "yytname[_nRule]='" << yytname[_nRule] << "'");
+        return OSQLParseNode::UNKNOWN_RULE;
+    }
+    else
+        return i->second;
 }
 
 //-----------------------------------------------------------------------------
diff --git a/sal/inc/sal/log-areas.dox b/sal/inc/sal/log-areas.dox
index c167267..b5fa6f9 100644
--- a/sal/inc/sal/log-areas.dox
+++ b/sal/inc/sal/log-areas.dox
@@ -37,6 +37,7 @@
 @section connectivity
 
 @li @c connectivity.mork
+@li @c connectivity.parse
 
 @section cui
 

-- 
To view, visit https://gerrit.libreoffice.org/1826
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2b408a23162b1200bbcd530be7acb42435388b04
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Lionel Elie Mamane <lionel@mamane.lu>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.