Kaydet (Commit) ed8c8a71 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Move static struct to where it's used, and use std::vector for this.

Change-Id: Id68fa488731d3b34213db23bf4d50f73b04c6fe4
üst c19b9679
......@@ -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()
......
......@@ -180,12 +180,6 @@ public:
void ClearEntries();
};
struct SvXMLAutoStylePoolPExport_Impl
{
const OUString *mpParent;
const XMLAutoStylePoolProperties *mpProperties;
};
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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