summaryrefslogtreecommitdiff
path: root/xmloff/source/text/txtdrope.cxx
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-10-01 11:00:51 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-01 12:23:08 +0200
commit7bd7ff5a8d938e474a8f15e2c6facad632a342bb (patch)
tree6321afdb483360b1130b0d2a0d995b6f27bbe59b /xmloff/source/text/txtdrope.cxx
parentcc2b7c1f930bc05253153f3c8381fb4fb352f3ca (diff)
loplugin:reducevarscope in xmloff
Change-Id: Ib67311f84a6a7a490afb392e642d74693fde3113 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103747 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source/text/txtdrope.cxx')
-rw-r--r--xmloff/source/text/txtdrope.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmloff/source/text/txtdrope.cxx b/xmloff/source/text/txtdrope.cxx
index e85aa839b505..63b9222e14a3 100644
--- a/xmloff/source/text/txtdrope.cxx
+++ b/xmloff/source/text/txtdrope.cxx
@@ -47,8 +47,6 @@ void XMLTextDropCapExport::exportXML( const Any& rAny,
{
DropCapFormat aFormat;
rAny >>= aFormat;
- OUString sValue;
- OUStringBuffer sBuffer;
if( aFormat.Lines > 1 )
{
SvXMLUnitConverter& rUnitConv = rExport.GetMM100UnitConverter();
@@ -58,6 +56,7 @@ void XMLTextDropCapExport::exportXML( const Any& rAny,
OUString::number( aFormat.Lines ) );
// style:length
+ OUString sValue;
if( bWholeWord )
{
sValue = GetXMLToken(XML_WORD);
@@ -72,6 +71,7 @@ void XMLTextDropCapExport::exportXML( const Any& rAny,
// style:distance
if( aFormat.Distance > 0 )
{
+ OUStringBuffer sBuffer;
rUnitConv.convertMeasureToXML( sBuffer, aFormat.Distance );
rExport.AddAttribute( XML_NAMESPACE_STYLE, XML_DISTANCE,
sBuffer.makeStringAndClear() );