summaryrefslogtreecommitdiff
path: root/sd/source/filter/xml/sdxmlwrp.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-06-25 19:10:54 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-26 11:01:43 +0200
commitb59b4a38b45e1bf158701355c8c70f1c59f3e112 (patch)
treee40ff4daa9acec5031a28453ad8686bd6267b024 /sd/source/filter/xml/sdxmlwrp.cxx
parent742f030d67f3d4179d3d0153cc16be35095eb580 (diff)
loplugin:oncevar in sd
Change-Id: I56649b4df8c517f152ed4e9132985bbef22f8634 Reviewed-on: https://gerrit.libreoffice.org/39241 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/filter/xml/sdxmlwrp.cxx')
-rw-r--r--sd/source/filter/xml/sdxmlwrp.cxx15
1 files changed, 5 insertions, 10 deletions
diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx
index 29313c60f32d..01cba586eb44 100644
--- a/sd/source/filter/xml/sdxmlwrp.cxx
+++ b/sd/source/filter/xml/sdxmlwrp.cxx
@@ -522,7 +522,6 @@ bool SdXMLFilter::Import( ErrCode& nError )
if(mxStatusIndicator.is())
{
sal_Int32 nProgressRange(1000000);
- sal_Int32 nProgressCurrent(0);
OUString aMsg(SdResId(STR_LOAD_DOC));
mxStatusIndicator->start(aMsg, nProgressRange);
@@ -533,7 +532,7 @@ bool SdXMLFilter::Import( ErrCode& nError )
// set ProgressCurrent
uno::Any aProgCurrent;
- aProgCurrent <<= nProgressCurrent;
+ aProgCurrent <<= sal_Int32(0);
xInfoSet->setPropertyValue( "ProgressCurrent" , aProgCurrent);
}
}
@@ -543,8 +542,7 @@ bool SdXMLFilter::Import( ErrCode& nError )
tools::SvRef<SotStorageStream> xDocStream;
uno::Reference < embed::XStorage > xStorage = mrMedium.GetStorage();
- OUString sSourceStorage( "SourceStorage");
- xInfoSet->setPropertyValue( sSourceStorage, Any( xStorage ) );
+ xInfoSet->setPropertyValue( "SourceStorage", Any( xStorage ) );
if( !xStorage.is() )
nRet = SD_XML_READERROR;
@@ -827,9 +825,8 @@ bool SdXMLFilter::Export()
uno::Reference< beans::XPropertySet > xInfoSet( GenericPropertySet_CreateInstance( new PropertySetInfo( aExportInfoMap ) ) );
SvtSaveOptions aSaveOpt;
- OUString sUsePrettyPrinting("UsePrettyPrinting");
bool bUsePrettyPrinting( aSaveOpt.IsPrettyPrinting() );
- xInfoSet->setPropertyValue( sUsePrettyPrinting, makeAny( bUsePrettyPrinting ) );
+ xInfoSet->setPropertyValue( "UsePrettyPrinting", makeAny( bUsePrettyPrinting ) );
const uno::Reference < embed::XStorage >& xStorage = mrMedium.GetOutputStorage();
@@ -837,8 +834,7 @@ bool SdXMLFilter::Export()
OUString sPropName( "BaseURI" );
xInfoSet->setPropertyValue( sPropName, makeAny( mrMedium.GetBaseURL( true ) ) );
- OUString sTargetStorage( "TargetStorage" );
- xInfoSet->setPropertyValue( sTargetStorage, Any( xStorage ) );
+ xInfoSet->setPropertyValue( "TargetStorage", Any( xStorage ) );
if( SfxObjectCreateMode::EMBEDDED == mrDocShell.GetCreateMode() )
{
@@ -883,7 +879,6 @@ bool SdXMLFilter::Export()
if(mxStatusIndicator.is())
{
sal_Int32 nProgressRange(1000000);
- sal_Int32 nProgressCurrent(0);
OUString aMsg(SdResId(STR_SAVE_DOC));
mxStatusIndicator->start(aMsg, nProgressRange);
@@ -894,7 +889,7 @@ bool SdXMLFilter::Export()
// set ProgressCurrent
uno::Any aProgCurrent;
- aProgCurrent <<= nProgressCurrent;
+ aProgCurrent <<= sal_Int32(0);
xInfoSet->setPropertyValue( "ProgressCurrent" , aProgCurrent);
}