Kaydet (Commit) f2f3dd24 authored tarafından Jan Holesovsky's avatar Jan Holesovsky

static const to avoid re-init all the time + c++11.

Change-Id: I24ac6405f03e2d55f832d1ffe0c71e575883c5c8
üst b1751e6e
...@@ -281,7 +281,7 @@ ShapeExport& ShapeExport::WriteGroupShape(uno::Reference<drawing::XShape> xShape ...@@ -281,7 +281,7 @@ ShapeExport& ShapeExport::WriteGroupShape(uno::Reference<drawing::XShape> xShape
static bool lcl_IsOnBlacklist(OUString& rShapeType) static bool lcl_IsOnBlacklist(OUString& rShapeType)
{ {
OUString aBlacklist[] = { static const std::vector<OUString> vBlacklist = {
"ring", "ring",
"can", "can",
"cube", "cube",
...@@ -336,18 +336,16 @@ static bool lcl_IsOnBlacklist(OUString& rShapeType) ...@@ -336,18 +336,16 @@ static bool lcl_IsOnBlacklist(OUString& rShapeType)
"flowchart-direct-access-storage", "flowchart-direct-access-storage",
"flowchart-display" "flowchart-display"
}; };
std::vector<OUString> vBlacklist(aBlacklist, aBlacklist + SAL_N_ELEMENTS(aBlacklist));
return std::find(vBlacklist.begin(), vBlacklist.end(), rShapeType) != vBlacklist.end(); return std::find(vBlacklist.begin(), vBlacklist.end(), rShapeType) != vBlacklist.end();
} }
static bool lcl_IsOnWhitelist(OUString& rShapeType) static bool lcl_IsOnWhitelist(OUString& rShapeType)
{ {
OUString aWhitelist[] = { static const std::vector<OUString> vWhitelist = {
"heart", "heart",
"puzzle" "puzzle"
}; };
std::vector<OUString> vWhitelist(aWhitelist, aWhitelist + SAL_N_ELEMENTS(aWhitelist));
return std::find(vWhitelist.begin(), vWhitelist.end(), rShapeType) != vWhitelist.end(); return std::find(vWhitelist.begin(), vWhitelist.end(), rShapeType) != vWhitelist.end();
} }
......
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