summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-08-17 22:49:44 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-08-17 23:10:59 -0400
commited8c8a7173d26defac017ed9a1950b47d573898a (patch)
treec345ea30cd5da7e3115422d4c771e4367ace0fd4 /xmloff
parentc19b9679a745a5ebb3eedd7583aedc4d75ae62c9 (diff)
Move static struct to where it's used, and use std::vector for this.
Change-Id: Id68fa488731d3b34213db23bf4d50f73b04c6fe4
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/style/impastp4.cxx20
-rw-r--r--xmloff/source/style/impastpl.hxx6
2 files changed, 12 insertions, 14 deletions
diff --git a/xmloff/source/style/impastp4.cxx b/xmloff/source/style/impastp4.cxx
index bd90fdf7ee93..a5d2f91387ea 100644
--- a/xmloff/source/style/impastp4.cxx
+++ b/xmloff/source/style/impastp4.cxx
@@ -246,9 +246,17 @@ OUString SvXMLAutoStylePoolP_Impl::Find( sal_Int32 nFamily,
return sName;
}
-//
-// export
-//
+namespace {
+
+struct AutoStylePoolExport
+{
+ const OUString* mpParent;
+ const XMLAutoStylePoolProperties* mpProperties;
+
+ AutoStylePoolExport() : mpParent(NULL), mpProperties(NULL) {}
+};
+
+}
void SvXMLAutoStylePoolP_Impl::exportXML(
sal_Int32 nFamily,
@@ -273,9 +281,7 @@ void SvXMLAutoStylePoolP_Impl::exportXML(
// create, initialize and fill helper-structure (SvXMLAutoStylePoolProperties_Impl)
// which contains a parent-name and a SvXMLAutoStylePoolProperties_Impl
- //
- SvXMLAutoStylePoolPExport_Impl* aExpStyles =
- new SvXMLAutoStylePoolPExport_Impl[nCount];
+ std::vector<AutoStylePoolExport> aExpStyles(nCount);
sal_uInt32 i;
for( i=0; i < nCount; i++ )
@@ -390,8 +396,6 @@ void SvXMLAutoStylePoolP_Impl::exportXML(
);
}
}
-
- delete[] aExpStyles;
}
void SvXMLAutoStylePoolP_Impl::ClearEntries()
diff --git a/xmloff/source/style/impastpl.hxx b/xmloff/source/style/impastpl.hxx
index 4ad8486775e9..56eb40a9ec21 100644
--- a/xmloff/source/style/impastpl.hxx
+++ b/xmloff/source/style/impastpl.hxx
@@ -180,12 +180,6 @@ public:
void ClearEntries();
};
-struct SvXMLAutoStylePoolPExport_Impl
-{
- const OUString *mpParent;
- const XMLAutoStylePoolProperties *mpProperties;
-};
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */