Kaydet (Commit) 013c278d authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:returnconstant in ScXMLChartExportWrapper

Change-Id: Ibf448058d5c67455a747a276717ba659559017bc
Reviewed-on: https://gerrit.libreoffice.org/58957
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst c5155f59
...@@ -96,7 +96,7 @@ class ScXMLChartExportWrapper ...@@ -96,7 +96,7 @@ class ScXMLChartExportWrapper
{ {
public: public:
ScXMLChartExportWrapper( css::uno::Reference< css::frame::XModel > const & xModel, SfxMedium& rMed ); ScXMLChartExportWrapper( css::uno::Reference< css::frame::XModel > const & xModel, SfxMedium& rMed );
bool Export(); void Export();
private: private:
css::uno::Reference< css::frame::XModel > mxModel; css::uno::Reference< css::frame::XModel > mxModel;
......
...@@ -22,12 +22,11 @@ ScXMLChartExportWrapper::ScXMLChartExportWrapper( css::uno::Reference< css::fram ...@@ -22,12 +22,11 @@ ScXMLChartExportWrapper::ScXMLChartExportWrapper( css::uno::Reference< css::fram
} }
bool ScXMLChartExportWrapper::Export() void ScXMLChartExportWrapper::Export()
{ {
if ( !mxStorage.is() ) if ( !mxStorage.is() )
mxStorage = mrMedium.GetOutputStorage(); mxStorage = mrMedium.GetOutputStorage();
uno::Reference< document::XStorageBasedDocument>(mxModel, uno::UNO_QUERY_THROW)->storeToStorage(mxStorage, uno::Sequence< beans::PropertyValue >() ); uno::Reference< document::XStorageBasedDocument>(mxModel, uno::UNO_QUERY_THROW)->storeToStorage(mxStorage, uno::Sequence< beans::PropertyValue >() );
return true;
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -579,8 +579,6 @@ bool ScDocShell::SaveXML( SfxMedium* pSaveMedium, const css::uno::Reference< css ...@@ -579,8 +579,6 @@ bool ScDocShell::SaveXML( SfxMedium* pSaveMedium, const css::uno::Reference< css
bool ScDocShell::SaveCurrentChart( SfxMedium& rMedium ) bool ScDocShell::SaveCurrentChart( SfxMedium& rMedium )
{ {
bool bRet = false;
try try
{ {
...@@ -591,13 +589,14 @@ bool ScDocShell::SaveCurrentChart( SfxMedium& rMedium ) ...@@ -591,13 +589,14 @@ bool ScDocShell::SaveCurrentChart( SfxMedium& rMedium )
uno::Reference< frame::XModel > xChartDoc ( xCurrentComponent, uno::UNO_QUERY_THROW ); uno::Reference< frame::XModel > xChartDoc ( xCurrentComponent, uno::UNO_QUERY_THROW );
ScXMLChartExportWrapper aExport( xChartDoc, rMedium ); ScXMLChartExportWrapper aExport( xChartDoc, rMedium );
bRet = aExport.Export(); aExport.Export();
return true;
} }
catch(...) catch(...)
{ {
SAL_WARN("sc", "exception thrown while saving chart. Bug!!!"); SAL_WARN("sc", "exception thrown while saving chart. Bug!!!");
return false;
} }
return bRet;
} }
bool ScDocShell::Load( SfxMedium& rMedium ) bool ScDocShell::Load( SfxMedium& rMedium )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment