diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-04-04 20:58:07 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-04-04 20:58:07 +0100 |
commit | ee4317e4cf84b67f9afdba692590c367c1c63a70 (patch) | |
tree | d0fe26a5c3e27dab0641fbb994565617c407c433 /oox | |
parent | 071ad23d8f09c46a6e5b20eab9e49c6dea8ccc6a (diff) |
I wonder if I make this less obscure if coverity will grok it
Change-Id: Ie3494fe4cee904d8eec65aa5cad861ab1916e8d9
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/table/tableproperties.cxx | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/oox/source/drawingml/table/tableproperties.cxx b/oox/source/drawingml/table/tableproperties.cxx index e71f05593767..d49823310800 100644 --- a/oox/source/drawingml/table/tableproperties.cxx +++ b/oox/source/drawingml/table/tableproperties.cxx @@ -143,12 +143,11 @@ static void SetTableStyleProperties(TableStyle* &pTableStyle , const sal_Int32& pTableStyle->getLastCol().getTextBoldStyle() = textBoldStyle; } - bool CreateTableStyle(TableStyle* &pTableStyle , const OUString& styleId) +TableStyle* CreateTableStyle(const OUString& styleId) { - bool createdTblStyle = false; + TableStyle* pTableStyle = NULL; if(styleId == "{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}") { //Medium Style 2 Accenat 1 pTableStyle = new TableStyle(); - createdTblStyle = true; //first row style //fill color and type oox::drawingml::FillPropertiesPtr pFstRowFillProperties( new oox::drawingml::FillProperties ); @@ -185,7 +184,6 @@ static void SetTableStyleProperties(TableStyle* &pTableStyle , const sal_Int32& else if (styleId == "{21E4AEA4-8DFA-4A89-87EB-49C32662AFE0}") //Medium Style 2 Accent 2 { pTableStyle = new TableStyle(); - createdTblStyle = true; oox::drawingml::FillPropertiesPtr pFstRowFillProperties( new oox::drawingml::FillProperties ); pFstRowFillProperties->moFillType.set(XML_solidFill); pFstRowFillProperties->maFillColor.setSchemeClr(XML_accent2); @@ -217,11 +215,10 @@ static void SetTableStyleProperties(TableStyle* &pTableStyle , const sal_Int32& else if (styleId == "{C4B1156A-380E-4F78-BDF5-A606A8083BF9}") //Medium Style 4 Accent 4 { pTableStyle = new TableStyle(); - createdTblStyle = true; SetTableStyleProperties(pTableStyle, XML_accent4, XML_dk1, XML_accent4); } - return createdTblStyle; + return pTableStyle; } const TableStyle& TableProperties::getUsedTableStyle( const ::oox::core::XmlFilterBase& rFilterBase, bool &isCreateTabStyle ) @@ -246,9 +243,10 @@ const TableStyle& TableProperties::getUsedTableStyle( const ::oox::core::XmlFilt ++aIter; } //if the pptx just has table style id, but no table style content, we will create the table style ourselves - if ( !pTableStyle ) + if (!pTableStyle) { - isCreateTabStyle = CreateTableStyle(pTableStyle , aStyleId); + pTableStyle = CreateTableStyle(aStyleId); + isCreateTabStyle = (pTableStyle != NULL); } } |