summaryrefslogtreecommitdiff
path: root/sc/source/filter/xml/xmlexprt.cxx
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-09-30 09:37:56 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-09-30 12:36:51 +0200
commitb29ec8b26bddc03661c527b603863d9e738d1210 (patch)
tree829f01d36d867f717d4a3c9373842510bbc76e77 /sc/source/filter/xml/xmlexprt.cxx
parent9373320fc88c1582a2ad25bda9c5264c7c58a97e (diff)
loplugin:reducevarscope in sc
Change-Id: If88c71351fb157b8eab242fceb65422f05eec3d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103645 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/filter/xml/xmlexprt.cxx')
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 18d94fec4e11..9c8dff177c95 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -3348,7 +3348,6 @@ void ScXMLExport::ExportShape(const uno::Reference < drawing::XShape >& xShape,
{
uno::Reference < beans::XPropertySet > xShapeProps ( xShape, uno::UNO_QUERY );
bool bIsChart( false );
- OUString sPropCLSID ("CLSID");
if (xShapeProps.is())
{
sal_Int32 nZOrder = 0;
@@ -3357,6 +3356,7 @@ void ScXMLExport::ExportShape(const uno::Reference < drawing::XShape >& xShape,
AddAttribute(XML_NAMESPACE_DRAW, XML_ZINDEX, OUString::number(nZOrder));
}
uno::Reference< beans::XPropertySetInfo > xPropSetInfo = xShapeProps->getPropertySetInfo();
+ OUString sPropCLSID ("CLSID");
if( xPropSetInfo->hasPropertyByName( sPropCLSID ) )
{
OUString sCLSID;
@@ -3546,11 +3546,11 @@ void ScXMLExport::WriteAreaLink( const ScMyCell& rMyCell )
AddAttribute( XML_NAMESPACE_TABLE, XML_FILTER_NAME, rAreaLink.sFilter );
if( !rAreaLink.sFilterOptions.isEmpty() )
AddAttribute( XML_NAMESPACE_TABLE, XML_FILTER_OPTIONS, rAreaLink.sFilterOptions );
- OUStringBuffer sValue;
AddAttribute( XML_NAMESPACE_TABLE, XML_LAST_COLUMN_SPANNED, OUString::number(rAreaLink.GetColCount()) );
AddAttribute( XML_NAMESPACE_TABLE, XML_LAST_ROW_SPANNED, OUString::number(rAreaLink.GetRowCount()) );
if( rAreaLink.nRefresh )
{
+ OUStringBuffer sValue;
::sax::Converter::convertDuration( sValue,
static_cast<double>(rAreaLink.nRefresh) / 86400 );
AddAttribute( XML_NAMESPACE_TABLE, XML_REFRESH_DELAY, sValue.makeStringAndClear() );
@@ -3819,7 +3819,6 @@ void ScXMLExport::WriteCalculationSettings(const uno::Reference <sheet::XSpreads
}
if (bIsIterationEnabled || nIterationCount != 100 || !::rtl::math::approxEqual(fIterationEpsilon, 0.001))
{
- OUStringBuffer sBuffer;
if (bIsIterationEnabled)
AddAttribute(XML_NAMESPACE_TABLE, XML_STATUS, XML_ENABLE);
if (nIterationCount != 100)
@@ -3828,6 +3827,7 @@ void ScXMLExport::WriteCalculationSettings(const uno::Reference <sheet::XSpreads
}
if (!::rtl::math::approxEqual(fIterationEpsilon, 0.001))
{
+ OUStringBuffer sBuffer;
::sax::Converter::convertDouble(sBuffer,
fIterationEpsilon);
AddAttribute(XML_NAMESPACE_TABLE, XML_MAXIMUM_DIFFERENCE, sBuffer.makeStringAndClear());