summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-06-05 04:39:29 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-06-05 04:39:29 +0200
commitd82eaaec2e1cd4c2def22301b134ece27e93b283 (patch)
treeed1d0f813ba999f8929ed03501425139c0674b7d
parent551fd0ec64c774fa46b177f2a77c59f668645954 (diff)
fix a few bugs in blacklist parser
Change-Id: Iaeaa568c24d6814bb696d040bef02470bd46e8e1
-rw-r--r--vcl/opengl/win/blocklist_parser.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/vcl/opengl/win/blocklist_parser.cxx b/vcl/opengl/win/blocklist_parser.cxx
index 83bf490f4d95..ef4771ab37f9 100644
--- a/vcl/opengl/win/blocklist_parser.cxx
+++ b/vcl/opengl/win/blocklist_parser.cxx
@@ -122,6 +122,10 @@ void WinBlocklistParser::handleDevice(wgl::DriverInfo& rDriver, xmlreader::XmlRe
{
rDriver.mbWhitelisted = true;
}
+ else if (meBlockType == BlockType::BLACKLIST)
+ {
+ rDriver.mbWhitelisted = false;
+ }
else if (meBlockType == BlockType::UNKNOWN)
{
throw InvalidFileException();
@@ -173,7 +177,8 @@ void WinBlocklistParser::handleDevice(wgl::DriverInfo& rDriver, xmlreader::XmlRe
}
else
{
- SAL_WARN("vcl.opengl.win", "unsupported attribute");
+ OString aAttrName(name.begin, name.length);
+ SAL_WARN("vcl.opengl.win", "unsupported attribute: " << aAttrName);
}
}
@@ -185,7 +190,7 @@ void WinBlocklistParser::handleDevice(wgl::DriverInfo& rDriver, xmlreader::XmlRe
int nsId;
xmlreader::XmlReader::Result res = rReader.nextItem(
- xmlreader::XmlReader::TEXT_NONE, &name, &nsId);
+ xmlreader::XmlReader::TEXT_NORMALIZED, &name, &nsId);
if (res == xmlreader::XmlReader::RESULT_BEGIN)
{
@@ -203,6 +208,7 @@ void WinBlocklistParser::handleDevice(wgl::DriverInfo& rDriver, xmlreader::XmlRe
if (!bSuccess || !name.equals("id"))
throw InvalidFileException();
+ name = rReader.getAttributeValue(false);
OString aDeviceId(name.begin, name.length);
rDriver.maDevices.push_back(OStringToOUString(aDeviceId, RTL_TEXTENCODING_UTF8));
}