summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2013-09-10 14:36:13 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2013-09-10 14:37:46 -0400
commit6eb71f711e84cd285fe997bebdb5896f7e16b33f (patch)
tree4da9d659908336848e463cc2f2b3da2078cc9ea8 /sd/source
parent7a0ac3d38f521ffee36d90f24b4574f22745bf4f (diff)
We can use plain char array for these, only to avoid C++11 construct.
Hopefully this will keep our tinderboxes happy. Change-Id: I3f7d398407fea2da858a1567c264f4c9bc35ff7b
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/core/sdpage.cxx41
1 files changed, 25 insertions, 16 deletions
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index bd806eeb15e8..6e21aef0fde6 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -850,16 +850,23 @@ void SdPage::CreateTitleAndLayout(sal_Bool bInit, sal_Bool bCreate )
}
}
-static const std::vector<rtl::OUString> PageKindVector = {"PK_STANDARD","PK_NOTES" , "PK_HANDOUT"};
-static const std::vector<rtl::OUString> PresObjKindVector = {"PRESOBJ_NONE", "PRESOBJ_TITLE", "PRESOBJ_OUTLINE",
- "PRESOBJ_TEXT" ,"PRESOBJ_GRAPHIC" , "PRESOBJ_OBJECT",
- "PRESOBJ_CHART", "PRESOBJ_ORGCHART", "PRESOBJ_TABLE",
- "PRESOBJ_IMAGE", "PRESOBJ_PAGE", "PRESOBJ_HANDOUT",
- "PRESOBJ_NOTES","PRESOBJ_HEADER", "PRESOBJ_FOOTER",
- "PRESOBJ_DATETIME", "PRESOBJ_SLIDENUMBER", "PRESOBJ_CALC",
- "PRESOBJ_MEDIA", "PRESOBJ_MAX" };
-
-void getPresObjProp( SdPage rPage, const rtl::OUString& sObjKind, const rtl::OUString& sPageKind, double presObjPropValue[])
+namespace {
+
+const char* PageKindVector[] = {
+ "PK_STANDARD","PK_NOTES" , "PK_HANDOUT"
+};
+
+const char* PresObjKindVector[] = {
+ "PRESOBJ_NONE", "PRESOBJ_TITLE", "PRESOBJ_OUTLINE",
+ "PRESOBJ_TEXT" ,"PRESOBJ_GRAPHIC" , "PRESOBJ_OBJECT",
+ "PRESOBJ_CHART", "PRESOBJ_ORGCHART", "PRESOBJ_TABLE",
+ "PRESOBJ_IMAGE", "PRESOBJ_PAGE", "PRESOBJ_HANDOUT",
+ "PRESOBJ_NOTES","PRESOBJ_HEADER", "PRESOBJ_FOOTER",
+ "PRESOBJ_DATETIME", "PRESOBJ_SLIDENUMBER", "PRESOBJ_CALC",
+ "PRESOBJ_MEDIA", "PRESOBJ_MAX"
+};
+
+void getPresObjProp( SdPage rPage, const char* sObjKind, const char* sPageKind, double presObjPropValue[] )
{
bool bNoObjectFound = true; //used to break from outer loop
@@ -873,7 +880,7 @@ void getPresObjProp( SdPage rPage, const rtl::OUString& sObjKind, const rtl::OUS
Reference<XNode> objectattr = objectattrlist->getNamedItem("type");
rtl::OUString sObjType = objectattr->getNodeValue();
- if(sObjType == sObjKind)
+ if (sObjType.equalsAscii(sObjKind))
{
Reference<XNodeList> objectChildren = objectNode->getChildNodes();
const int objSize = objectChildren->getLength();
@@ -890,7 +897,7 @@ void getPresObjProp( SdPage rPage, const rtl::OUString& sObjKind, const rtl::OUS
Reference<XNode> ObjPageKind = ObjAttributes->getNamedItem("pagekind");
rtl::OUString sObjPageKind = ObjPageKind->getNodeValue();
- if(sObjPageKind == sPageKind)
+ if (sObjPageKind.equalsAscii(sPageKind))
{
Reference<XNode> ObjSizeHeight = ObjAttributes->getNamedItem("relative-height");
rtl::OUString sValue = ObjSizeHeight->getNodeValue();
@@ -920,6 +927,8 @@ void getPresObjProp( SdPage rPage, const rtl::OUString& sObjKind, const rtl::OUS
}
}
+}
+
SdrObject* SdPage::CreateDefaultPresObj(PresObjKind eObjKind, bool bInsert)
{
double propvalue[] = {0,0,0,0};
@@ -941,8 +950,8 @@ SdrObject* SdPage::CreateDefaultPresObj(PresObjKind eObjKind, bool bInsert)
}
else if( (eObjKind == PRESOBJ_FOOTER) || (eObjKind == PRESOBJ_DATETIME) || (eObjKind == PRESOBJ_SLIDENUMBER) || (eObjKind == PRESOBJ_HEADER ) )
{
- rtl::OUString sObjKind = PresObjKindVector[eObjKind];
- rtl::OUString sPageKind = PageKindVector[mePageKind];
+ const char* sObjKind = PresObjKindVector[eObjKind];
+ const char* sPageKind = PageKindVector[mePageKind];
// create footer objects for standard master page
if( mePageKind == PK_STANDARD )
{
@@ -1026,7 +1035,7 @@ Rectangle SdPage::GetTitleRect() const
Size aTitleSize ( GetSize() );
aTitleSize.Width() -= GetLftBorder() + GetRgtBorder();
aTitleSize.Height() -= GetUppBorder() + GetLwrBorder();
- rtl::OUString sPageKind = PageKindVector[mePageKind];
+ const char* sPageKind = PageKindVector[mePageKind];
if (mePageKind == PK_STANDARD)
{
@@ -1107,7 +1116,7 @@ Rectangle SdPage::GetLayoutRect() const
Size aLayoutSize ( GetSize() );
aLayoutSize.Width() -= GetLftBorder() + GetRgtBorder();
aLayoutSize.Height() -= GetUppBorder() + GetLwrBorder();
- rtl::OUString sPageKind = PageKindVector[mePageKind];
+ const char* sPageKind = PageKindVector[mePageKind];
if (mePageKind == PK_STANDARD)
{