From 013c278d564d4e50c81bec7915c33f4edd75c00e Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 13 Aug 2018 10:19:56 +0200 Subject: loplugin:returnconstant in ScXMLChartExportWrapper Change-Id: Ibf448058d5c67455a747a276717ba659559017bc Reviewed-on: https://gerrit.libreoffice.org/58957 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sc/source/ui/docshell/docsh.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'sc/source/ui/docshell/docsh.cxx') diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index fba755a6e823..076d52c20afa 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -579,8 +579,6 @@ bool ScDocShell::SaveXML( SfxMedium* pSaveMedium, const css::uno::Reference< css bool ScDocShell::SaveCurrentChart( SfxMedium& rMedium ) { - bool bRet = false; - try { @@ -591,13 +589,14 @@ bool ScDocShell::SaveCurrentChart( SfxMedium& rMedium ) uno::Reference< frame::XModel > xChartDoc ( xCurrentComponent, uno::UNO_QUERY_THROW ); ScXMLChartExportWrapper aExport( xChartDoc, rMedium ); - bRet = aExport.Export(); + aExport.Export(); + return true; } catch(...) { SAL_WARN("sc", "exception thrown while saving chart. Bug!!!"); + return false; } - return bRet; } bool ScDocShell::Load( SfxMedium& rMedium ) -- cgit