Kaydet (Commit) 05dcb073 authored tarafından Miklos Vajna's avatar Miklos Vajna

Use std::make_shared

Change-Id: I27281dfbb95c410c2725ec7ce93b91eed41061e2
üst b739e6ae
......@@ -733,9 +733,9 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, ShapeOrPict const shap
}
while (nI >= 0);
RTFSprms aPathAttributes;
aPathAttributes.set(NS_ooxml::LN_CT_Point2D_x, RTFValue::Pointer_t(new RTFValue(*oX)));
aPathAttributes.set(NS_ooxml::LN_CT_Point2D_y, RTFValue::Pointer_t(new RTFValue(*oY)));
aPolygonSprms.set(NS_ooxml::LN_CT_WrapPath_lineTo, RTFValue::Pointer_t(new RTFValue(aPathAttributes)), RTFOverwrite::NO_APPEND);
aPathAttributes.set(NS_ooxml::LN_CT_Point2D_x, std::make_shared<RTFValue>(*oX));
aPathAttributes.set(NS_ooxml::LN_CT_Point2D_y, std::make_shared<RTFValue>(*oY));
aPolygonSprms.set(NS_ooxml::LN_CT_WrapPath_lineTo, std::make_shared<RTFValue>(aPathAttributes), RTFOverwrite::NO_APPEND);
}
}
while (nCharIndex >= 0);
......@@ -890,7 +890,7 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, ShapeOrPict const shap
if (m_rImport.isInBackground())
{
RTFSprms aAttributes;
aAttributes.set(NS_ooxml::LN_CT_Background_color, RTFValue::Pointer_t(new RTFValue(xPropertySet->getPropertyValue("FillColor").get<sal_Int32>())));
aAttributes.set(NS_ooxml::LN_CT_Background_color, std::make_shared<RTFValue>(xPropertySet->getPropertyValue("FillColor").get<sal_Int32>()));
writerfilter::Reference<Properties>::Pointer_t const pProperties(new RTFReferenceProperties(aAttributes));
m_rImport.Mapper().props(pProperties);
......
......@@ -144,7 +144,7 @@ static RTFValue::Pointer_t getDefaultSPRM(Id const id)
case NS_ooxml::LN_CT_Spacing_before:
case NS_ooxml::LN_CT_Spacing_after:
case NS_ooxml::LN_EG_RPrBase_b:
return RTFValue::Pointer_t(new RTFValue(0));
return std::make_shared<RTFValue>(0);
default:
return RTFValue::Pointer_t();
......@@ -193,7 +193,7 @@ RTFSprms RTFSprms::cloneAndDeduplicate(RTFSprms& rReference) const
RTFSprms().cloneAndDeduplicate(i->second->getAttributes()));
if (!sprms.empty() || !attributes.empty())
{
ret.set(i->first, RTFValue::Pointer_t(new RTFValue(attributes, sprms)));
ret.set(i->first, std::make_shared<RTFValue>(attributes, sprms));
}
}
}
......
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