Kaydet (Commit) e7827d55 authored tarafından Lionel Elie Mamane's avatar Lionel Elie Mamane Kaydeden (comit) Miklos Vajna

OSQLParser::RuleIDToRule should not silently change s_aReverseRuleIDLookup

Change-Id: I2b408a23162b1200bbcd530be7acb42435388b04
Reviewed-on: https://gerrit.libreoffice.org/1826Reviewed-by: 's avatarMiklos Vajna <vmiklos@suse.cz>
Tested-by: 's avatarMiklos Vajna <vmiklos@suse.cz>
üst 13421b4c
...@@ -4772,7 +4772,18 @@ sal_uInt32 OSQLParser::StrToRuleID(const ::rtl::OString & rValue) ...@@ -4772,7 +4772,18 @@ sal_uInt32 OSQLParser::StrToRuleID(const ::rtl::OString & rValue)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
OSQLParseNode::Rule OSQLParser::RuleIDToRule( sal_uInt32 _nRule ) 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;
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
......
...@@ -37,6 +37,7 @@ certain functionality. ...@@ -37,6 +37,7 @@ certain functionality.
@section connectivity @section connectivity
@li @c connectivity.mork @li @c connectivity.mork
@li @c connectivity.parse
@section cui @section cui
......
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