summaryrefslogtreecommitdiff
path: root/oox/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-02-06 18:24:46 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-02-06 18:41:42 +0100
commitf1359d1221b335c4856821948f89868f021135eb (patch)
tree7739703036994becc0ffc5ab0f4f2f1cad6a7888 /oox/source
parent3e79e6584453cb211f75d36a076b588e32f5e980 (diff)
Make OUStringLiteral more useful
...don't dare make it non-explicit, yet. Along the way, introduce SAL_CONSTEXPR. Change-Id: Ia3179d0d5e001fd7aa92237c97437e9b74366ee1
Diffstat (limited to 'oox/source')
-rw-r--r--oox/source/export/shapes.cxx116
1 files changed, 59 insertions, 57 deletions
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 2d040c732396..64a0e3f121cc 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -25,6 +25,8 @@
#include <oox/token/tokens.hxx>
#include <cstdio>
+#include <initializer_list>
+
#include <com/sun/star/awt/CharSet.hpp>
#include <com/sun/star/awt/FontDescriptor.hpp>
#include <com/sun/star/awt/FontSlant.hpp>
@@ -281,60 +283,60 @@ ShapeExport& ShapeExport::WriteGroupShape(uno::Reference<drawing::XShape> xShape
static bool lcl_IsOnBlacklist(OUString& rShapeType)
{
- static const std::vector<OUString> vBlacklist = {
- "ring",
- "can",
- "cube",
- "paper",
- "frame",
- "smiley",
- "sun",
- "flower",
- "forbidden",
- "bracket-pair",
- "brace-pair",
- "col-60da8460",
- "col-502ad400",
- "quad-bevel",
- "cloud-callout",
- "line-callout-1",
- "line-callout-2",
- "line-callout-3",
- "paper",
- "vertical-scroll",
- "horizontal-scroll",
- "mso-spt34",
- "mso-spt75",
- "mso-spt164",
- "mso-spt180",
- "flowchart-process",
- "flowchart-alternate-process",
- "flowchart-decision",
- "flowchart-data",
- "flowchart-predefined-process",
- "flowchart-internal-storage",
- "flowchart-document",
- "flowchart-multidocument",
- "flowchart-terminator",
- "flowchart-preparation",
- "flowchart-manual-input",
- "flowchart-manual-operation",
- "flowchart-connector",
- "flowchart-off-page-connector",
- "flowchart-card",
- "flowchart-punched-tape",
- "flowchart-summing-junction",
- "flowchart-or",
- "flowchart-collate",
- "flowchart-sort",
- "flowchart-extract",
- "flowchart-merge",
- "flowchart-stored-data",
- "flowchart-delay",
- "flowchart-sequential-access",
- "flowchart-magnetic-disk",
- "flowchart-direct-access-storage",
- "flowchart-display"
+ static const std::initializer_list<OUStringLiteral> vBlacklist = {
+ OUStringLiteral("ring"),
+ OUStringLiteral("can"),
+ OUStringLiteral("cube"),
+ OUStringLiteral("paper"),
+ OUStringLiteral("frame"),
+ OUStringLiteral("smiley"),
+ OUStringLiteral("sun"),
+ OUStringLiteral("flower"),
+ OUStringLiteral("forbidden"),
+ OUStringLiteral("bracket-pair"),
+ OUStringLiteral("brace-pair"),
+ OUStringLiteral("col-60da8460"),
+ OUStringLiteral("col-502ad400"),
+ OUStringLiteral("quad-bevel"),
+ OUStringLiteral("cloud-callout"),
+ OUStringLiteral("line-callout-1"),
+ OUStringLiteral("line-callout-2"),
+ OUStringLiteral("line-callout-3"),
+ OUStringLiteral("paper"),
+ OUStringLiteral("vertical-scroll"),
+ OUStringLiteral("horizontal-scroll"),
+ OUStringLiteral("mso-spt34"),
+ OUStringLiteral("mso-spt75"),
+ OUStringLiteral("mso-spt164"),
+ OUStringLiteral("mso-spt180"),
+ OUStringLiteral("flowchart-process"),
+ OUStringLiteral("flowchart-alternate-process"),
+ OUStringLiteral("flowchart-decision"),
+ OUStringLiteral("flowchart-data"),
+ OUStringLiteral("flowchart-predefined-process"),
+ OUStringLiteral("flowchart-internal-storage"),
+ OUStringLiteral("flowchart-document"),
+ OUStringLiteral("flowchart-multidocument"),
+ OUStringLiteral("flowchart-terminator"),
+ OUStringLiteral("flowchart-preparation"),
+ OUStringLiteral("flowchart-manual-input"),
+ OUStringLiteral("flowchart-manual-operation"),
+ OUStringLiteral("flowchart-connector"),
+ OUStringLiteral("flowchart-off-page-connector"),
+ OUStringLiteral("flowchart-card"),
+ OUStringLiteral("flowchart-punched-tape"),
+ OUStringLiteral("flowchart-summing-junction"),
+ OUStringLiteral("flowchart-or"),
+ OUStringLiteral("flowchart-collate"),
+ OUStringLiteral("flowchart-sort"),
+ OUStringLiteral("flowchart-extract"),
+ OUStringLiteral("flowchart-merge"),
+ OUStringLiteral("flowchart-stored-data"),
+ OUStringLiteral("flowchart-delay"),
+ OUStringLiteral("flowchart-sequential-access"),
+ OUStringLiteral("flowchart-magnetic-disk"),
+ OUStringLiteral("flowchart-direct-access-storage"),
+ OUStringLiteral("flowchart-display")
};
return std::find(vBlacklist.begin(), vBlacklist.end(), rShapeType) != vBlacklist.end();
@@ -342,9 +344,9 @@ static bool lcl_IsOnBlacklist(OUString& rShapeType)
static bool lcl_IsOnWhitelist(OUString& rShapeType)
{
- static const std::vector<OUString> vWhitelist = {
- "heart",
- "puzzle"
+ static const std::initializer_list<OUStringLiteral> vWhitelist = {
+ OUStringLiteral("heart"),
+ OUStringLiteral("puzzle")
};
return std::find(vWhitelist.begin(), vWhitelist.end(), rShapeType) != vWhitelist.end();