diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2019-12-16 17:02:46 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-12-16 19:50:21 +0100 |
commit | e0f20211a8048a87b078aa4cf0f28c0c847487ad (patch) | |
tree | 64a80f7cee0dad62f55aec3a6b8cc8000eaf8dd9 /sfx2 | |
parent | b6f4d3b92789e972d9b079a5561723f3e73e07a6 (diff) |
sw reqif-xhtml import: add a new AllowedRTFOLEMimeTypes parameter
The HTML import is an old-style filter, so it has no XFilter
implementation where filter() would get custom parameters out of the
box. One way would be to fix by adding one more entry to the aFormalArgs
table under sfx2/, but doing that with a random parameter of a random
import filter feels dirty.
So instead make SfxMedium store all arguments as-is, this way accessing
other keys is as easy to accessing the already available FilterOptions
(string) key.
Regarding the actual filter change, don't require "text/rtf" as a mime
type for embedded objects in the reqif XHTML import, so that in case the
file has e.g. application/rtf, then that works as well.
In case an (UNO) client wants to still limit the accepted set of MIME
types, that's possible via the new parameter.
Change-Id: Ia60da44d692f550d8ad5bbf374171cac67d9e04f
Reviewed-on: https://gerrit.libreoffice.org/85229
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 0e646ae723b5..69c4b1a248ff 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -328,6 +328,8 @@ public: util::DateTime m_aDateTime; + uno::Sequence<beans::PropertyValue> m_aArgs; + explicit SfxMedium_Impl(); ~SfxMedium_Impl(); SfxMedium_Impl(const SfxMedium_Impl&) = delete; @@ -3240,6 +3242,7 @@ SfxMedium::SfxMedium( const uno::Sequence<beans::PropertyValue>& aArgs ) : SfxAllItemSet *pParams = new SfxAllItemSet( SfxGetpApp()->GetPool() ); pImpl->m_pSet.reset( pParams ); TransformParameters( SID_OPENDOC, aArgs, *pParams ); + pImpl->m_aArgs = aArgs; OUString aFilterProvider, aFilterName; { @@ -3301,6 +3304,7 @@ SfxMedium::SfxMedium( const uno::Sequence<beans::PropertyValue>& aArgs ) : Init_Impl(); } +uno::Sequence<beans::PropertyValue> SfxMedium::GetArgs() const { return pImpl->m_aArgs; } SfxMedium::SfxMedium( const uno::Reference < embed::XStorage >& rStor, const OUString& rBaseURL, const std::shared_ptr<SfxItemSet>& p ) : pImpl(new SfxMedium_Impl) |