diff options
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/xml/xmlcondformat.cxx | 14 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlexprt.cxx | 12 |
2 files changed, 10 insertions, 16 deletions
diff --git a/sc/source/filter/xml/xmlcondformat.cxx b/sc/source/filter/xml/xmlcondformat.cxx index be215df81d72..3db4904f99ca 100644 --- a/sc/source/filter/xml/xmlcondformat.cxx +++ b/sc/source/filter/xml/xmlcondformat.cxx @@ -457,15 +457,13 @@ ScXMLDataBarFormatContext::ScXMLDataBarFormatContext( ScXMLImport& rImport, if(!sPositiveColor.isEmpty()) { - sal_Int32 nColor = 0; - sax::Converter::convertColor( nColor, sPositiveColor ); - mpFormatData->maPositiveColor = Color(nColor); + sax::Converter::convertColor( mpFormatData->maPositiveColor, sPositiveColor ); } if(!sNegativeColor.isEmpty()) { // we might check here for 0xff0000 and don't write it - sal_Int32 nColor = 0; + Color nColor; sax::Converter::convertColor( nColor, sNegativeColor ); mpFormatData->mpNegativeColor.reset(new Color(nColor)); } @@ -482,9 +480,7 @@ ScXMLDataBarFormatContext::ScXMLDataBarFormatContext( ScXMLImport& rImport, if(!sAxisColor.isEmpty()) { - sal_Int32 nColor = 0; - sax::Converter::convertColor( nColor, sAxisColor ); - mpFormatData->maAxisColor = Color(nColor); + sax::Converter::convertColor( mpFormatData->maAxisColor, sAxisColor ); } if(!sShowValue.isEmpty()) @@ -889,9 +885,7 @@ ScXMLColorScaleFormatEntryContext::ScXMLColorScaleFormatEntryContext( ScXMLImpor } } - sal_Int32 nColor; - sax::Converter::convertColor(nColor, sColor); - aColor = Color(nColor); + sax::Converter::convertColor(aColor, sColor); if(!sVal.isEmpty()) sax::Converter::convertDouble(nVal, sVal); diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index d41bc3ba2b5a..baf55bb3213e 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -3971,7 +3971,7 @@ void ScXMLExport::WriteScenario() if (!(nFlags & ScScenarioFlags::ShowFrame)) AddAttribute(XML_NAMESPACE_TABLE, XML_DISPLAY_BORDER, XML_FALSE); OUStringBuffer aBuffer; - ::sax::Converter::convertColor(aBuffer, aColor.GetColor()); + ::sax::Converter::convertColor(aBuffer, aColor); AddAttribute(XML_NAMESPACE_TABLE, XML_BORDER_COLOR, aBuffer.makeStringAndClear()); if (!(nFlags & ScScenarioFlags::TwoWay)) AddAttribute(XML_NAMESPACE_TABLE, XML_COPY_BACK, XML_FALSE); @@ -4426,7 +4426,7 @@ void ScXMLExport::ExportConditionalFormat(SCTAB nTab) AddAttribute(XML_NAMESPACE_CALC_EXT, XML_TYPE, getCondFormatEntryType(*it[0])); OUStringBuffer aBuffer; - ::sax::Converter::convertColor(aBuffer, it[0]->GetColor().GetColor()); + ::sax::Converter::convertColor(aBuffer, it[0]->GetColor()); AddAttribute(XML_NAMESPACE_CALC_EXT, XML_COLOR, aBuffer.makeStringAndClear()); SvXMLElementExport aElementColorScaleEntry(*this, XML_NAMESPACE_CALC_EXT, XML_COLOR_SCALE_ENTRY, true, true); } @@ -4450,13 +4450,13 @@ void ScXMLExport::ExportConditionalFormat(SCTAB nTab) if(pFormatData->mpNegativeColor) { OUStringBuffer aBuffer; - ::sax::Converter::convertColor(aBuffer, pFormatData->mpNegativeColor->GetColor()); + ::sax::Converter::convertColor(aBuffer, *pFormatData->mpNegativeColor); AddAttribute(XML_NAMESPACE_CALC_EXT, XML_NEGATIVE_COLOR, aBuffer.makeStringAndClear()); } else { OUStringBuffer aBuffer; - ::sax::Converter::convertColor(aBuffer, sal_Int32(COL_LIGHTRED)); + ::sax::Converter::convertColor(aBuffer, COL_LIGHTRED); AddAttribute(XML_NAMESPACE_CALC_EXT, XML_NEGATIVE_COLOR, aBuffer.makeStringAndClear()); } } @@ -4474,11 +4474,11 @@ void ScXMLExport::ExportConditionalFormat(SCTAB nTab) } OUStringBuffer aBuffer; - ::sax::Converter::convertColor(aBuffer, pFormatData->maPositiveColor.GetColor()); + ::sax::Converter::convertColor(aBuffer, pFormatData->maPositiveColor); AddAttribute(XML_NAMESPACE_CALC_EXT, XML_POSITIVE_COLOR, aBuffer.makeStringAndClear()); aBuffer.truncate(); - ::sax::Converter::convertColor(aBuffer, pFormatData->maAxisColor.GetColor()); + ::sax::Converter::convertColor(aBuffer, pFormatData->maAxisColor); AddAttribute(XML_NAMESPACE_CALC_EXT, XML_AXIS_COLOR, aBuffer.makeStringAndClear()); SvXMLElementExport aElementDataBar(*this, XML_NAMESPACE_CALC_EXT, XML_DATA_BAR, true, true); |