[Libreoffice-commits] core.git: writerfilter/source
Mike Kaganski
mike.kaganski at collabora.com
Tue Jul 25 13:33:55 UTC 2017
writerfilter/source/ooxml/OOXMLPropertySet.cxx | 27 ++++++-------------------
1 file changed, 7 insertions(+), 20 deletions(-)
New commits:
commit 123ea883b0643894c928bd8edd4203bdc60cc054
Author: Mike Kaganski <mike.kaganski at collabora.com>
Date: Tue Jul 25 13:15:36 2017 +0200
OOXMLPropertySet: initialize variables on creation and cleanup
Change-Id: Iea92bdb4759ed9514674125325352d2fd2b372f8
Reviewed-on: https://gerrit.libreoffice.org/40400
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/writerfilter/source/ooxml/OOXMLPropertySet.cxx b/writerfilter/source/ooxml/OOXMLPropertySet.cxx
index 118850144686..4947eef47475 100644
--- a/writerfilter/source/ooxml/OOXMLPropertySet.cxx
+++ b/writerfilter/source/ooxml/OOXMLPropertySet.cxx
@@ -75,9 +75,7 @@ writerfilter::Reference<Properties>::Pointer_t OOXMLProperty::getProps()
#ifdef DEBUG_WRITERFILTER
string OOXMLProperty::getName() const
{
- string sResult;
-
- sResult = (*QNameToString::Instance())(mId);
+ string sResult((*QNameToString::Instance())(mId));
if (sResult.length() == 0)
sResult = fastTokenToId(mId);
@@ -113,17 +111,14 @@ string OOXMLProperty::toString() const
void OOXMLProperty::resolve(writerfilter::Properties & rProperties)
{
- writerfilter::Properties * pProperties = nullptr;
- pProperties = &rProperties;
-
switch (meType)
{
case SPRM:
if (mId != 0x0)
- pProperties->sprm(*this);
+ rProperties.sprm(*this);
break;
case ATTRIBUTE:
- pProperties->attribute(mId, *getValue());
+ rProperties.attribute(mId, *getValue());
break;
}
}
@@ -250,9 +245,7 @@ int OOXMLBooleanValue::getInt() const
uno::Any OOXMLBooleanValue::getAny() const
{
- uno::Any aResult(mbValue);
-
- return aResult;
+ return uno::Any(mbValue);
}
#ifdef DEBUG_WRITERFILTER
@@ -282,9 +275,7 @@ OOXMLStringValue::~OOXMLStringValue()
uno::Any OOXMLStringValue::getAny() const
{
- uno::Any aAny(mStr);
-
- return aAny;
+ return uno::Any(mStr);
}
OUString OOXMLStringValue::getString() const
@@ -318,9 +309,7 @@ OOXMLInputStreamValue::~OOXMLInputStreamValue()
uno::Any OOXMLInputStreamValue::getAny() const
{
- uno::Any aAny(mxInputStream);
-
- return aAny;
+ return uno::Any(mxInputStream);
}
#ifdef DEBUG_WRITERFILTER
@@ -526,9 +515,7 @@ int OOXMLIntegerValue::getInt() const
uno::Any OOXMLIntegerValue::getAny() const
{
- uno::Any aResult(mnValue);
-
- return aResult;
+ return uno::Any(mnValue);
}
OOXMLValue * OOXMLIntegerValue::clone() const
More information about the Libreoffice-commits
mailing list