diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2018-11-29 20:34:56 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2018-11-30 20:03:13 +0100 |
commit | 4632afbd9ecdf85f3980b41fa9d58b6099aa2d81 (patch) | |
tree | abdc0f6e02dc3c8fcb7c251f54d0867d2d597688 /sfx2 | |
parent | f52399177fcab220867c1dcae35c6db5c904138d (diff) |
tdf#93005, tdf#100611, remove the incomplete ODC export feature
Change-Id: I96a3882cd412ea5d993971df7e20b1fd8da73642
Reviewed-on: https://gerrit.libreoffice.org/64283
Tested-by: Jenkins
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
(cherry picked from commit d543e8dfd3d8ae718e29304a155e1cf70d08325d)
Reviewed-on: https://gerrit.libreoffice.org/64311
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/guisaveas.cxx | 21 | ||||
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 49 |
2 files changed, 5 insertions, 65 deletions
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index 1f75ff2dc1fa..c9692ca90d8c 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -355,27 +355,6 @@ ModelData_Impl::ModelData_Impl( SfxStoringHelper& aOwner, , m_bRecommendReadOnly( false ) { CheckInteractionHandler(); - try - { - uno::Reference< lang::XComponent > xCurrentComponent = frame::Desktop::create( comphelper::getProcessComponentContext() )->getCurrentComponent(); - if (aOwner.GetModuleManager()->identify(xCurrentComponent) == "com.sun.star.chart2.ChartDocument") - { - // let us switch the model and set the xStorable and - // XStorable2 to the old model. - // This is an ugly hack because we have no SfxObjectShell for chart2 yet. - // We need SfxObjectShell for the heavy work around ODF document creation - // because chart2 only writes the basic stream out. - // In future in might make sense to implement a full scale object shell in - // chart2 and make chart2 an own program. - m_xModel.set(xCurrentComponent, uno::UNO_QUERY_THROW ); - m_xStorable.set(xModel, uno::UNO_QUERY_THROW ); - m_xStorable2.set(xModel, uno::UNO_QUERY_THROW ); - } - } - catch(...) - { - // we don't want to pass on any errors; - } } diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 78f00adceb57..f1ae5b009231 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -300,38 +300,9 @@ SvGlobalName const & SfxObjectShell::GetClassName() const return GetFactory().GetClassId(); } -namespace { - -/** - * Chart2 does not have an Object shell, so handle this here for now - * If we ever implement a full scale object shell in chart2 move it there - */ -SotClipboardFormatId GetChartVersion( sal_Int32 nVersion, bool bTemplate ) -{ - if( nVersion == SOFFICE_FILEFORMAT_60) - { - return SotClipboardFormatId::STARCHART_60; - } - else if( nVersion == SOFFICE_FILEFORMAT_8) - { - if (bTemplate) - { - SAL_WARN("sfx.doc", "no chart template support yet"); - return SotClipboardFormatId::STARCHART_8; - } - else - return SotClipboardFormatId::STARCHART_8; - } - - SAL_WARN("sfx.doc", "unsupported version"); - return SotClipboardFormatId::NONE; -} - -} - void SfxObjectShell::SetupStorage( const uno::Reference< embed::XStorage >& xStorage, - sal_Int32 nVersion, bool bTemplate, bool bChart ) const + sal_Int32 nVersion, bool bTemplate ) const { uno::Reference< beans::XPropertySet > xProps( xStorage, uno::UNO_QUERY ); @@ -339,14 +310,9 @@ void SfxObjectShell::SetupStorage( const uno::Reference< embed::XStorage >& xSto { SotClipboardFormatId nClipFormat = SotClipboardFormatId::NONE; - if(!bChart) - { - SvGlobalName aName; - OUString aFullTypeName, aShortTypeName, aAppName; - FillClass( &aName, &nClipFormat, &aAppName, &aFullTypeName, &aShortTypeName, nVersion, bTemplate ); - } - else - nClipFormat = GetChartVersion(nVersion, bTemplate); + SvGlobalName aName; + OUString aFullTypeName, aShortTypeName, aAppName; + FillClass( &aName, &nClipFormat, &aAppName, &aFullTypeName, &aShortTypeName, nVersion, bTemplate ); if ( nClipFormat != SotClipboardFormatId::NONE ) { @@ -3069,12 +3035,7 @@ bool SfxObjectShell::SaveAsOwnFormat( SfxMedium& rMedium ) const bool bTemplate = rMedium.GetFilter()->IsOwnTemplateFormat() && nVersion > SOFFICE_FILEFORMAT_60; - std::shared_ptr<const SfxFilter> pFilter = rMedium.GetFilter(); - bool bChart = false; - if(pFilter->GetName() == "chart8") - bChart = true; - - SetupStorage( xStorage, nVersion, bTemplate, bChart ); + SetupStorage( xStorage, nVersion, bTemplate ); #if HAVE_FEATURE_SCRIPTING if ( HasBasic() ) { |