Kaydet (Commit) 5d157ce0 authored tarafından Michael Meeks's avatar Michael Meeks

fdo#76260 - don't allocate and free std::strings on each element.

This debug code is quite expensive; 2.5% of document load time;
Avoid the pointless heap allocation, and punt the rest to fdo#80798.

Change-Id: I499b3cf48867d5ed0f2b33b9d12f1c128c993aae
üst 5a83b31a
......@@ -402,8 +402,9 @@ bool OOXMLPropertySetImplCompare::operator()(const OOXMLProperty::Pointer_t x,
*/
OOXMLPropertySetImpl::OOXMLPropertySetImpl()
: msType("OOXMLPropertySetImpl")
{
static OString aName("OOXMLPropertySetImpl");
maType = aName;
}
OOXMLPropertySetImpl::~OOXMLPropertySetImpl()
......@@ -449,7 +450,7 @@ OOXMLPropertySetImpl::end() const
string OOXMLPropertySetImpl::getType() const
{
return msType;
return string(maType.getStr());
}
void OOXMLPropertySetImpl::add(OOXMLProperty::Pointer_t pProperty)
......@@ -497,7 +498,7 @@ OOXMLPropertySet * OOXMLPropertySetImpl::clone() const
void OOXMLPropertySetImpl::setType(const string & rsType)
{
msType = rsType;
maType = OString(rsType.c_str(), rsType.size());
}
#ifdef DEBUG_DOMAINMAPPER
......
......@@ -164,7 +164,7 @@ public:
typedef std::vector<OOXMLProperty::Pointer_t> OOXMLProperties_t;
private:
OOXMLProperties_t mProperties;
std::string msType;
OString maType;
public:
OOXMLPropertySetImpl();
virtual ~OOXMLPropertySetImpl();
......
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