diff options
author | Katarina Behrens <Katarina.Behrens@cib.de> | 2017-09-04 14:14:39 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2017-11-29 10:54:38 +0100 |
commit | 65066627c26059caedbf239cb41b97c1721334a0 (patch) | |
tree | 57d73783d316565575d62e167fe7cf3f1a94f0a0 /include | |
parent | f0a2fee5006f27b8ebf2b2e583964818986caec5 (diff) |
tdf#109202: Convert images to desired format in (f)odt filter
Pass down mimetype to SvXMLGraphicHelper
Change-Id: I9c81c06d2a1d6168704440094081e99d0bcbbff9
Reviewed-on: https://gerrit.libreoffice.org/41893
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
(cherry picked from commit 082cdbc991a2e31556bab53a5b8214cb89138354)
Reviewed-on: https://gerrit.libreoffice.org/45401
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/comphelper/graphicmimetype.hxx | 27 | ||||
-rw-r--r-- | include/svx/xmlgrhlp.hxx | 12 | ||||
-rw-r--r-- | include/xmloff/xmlexp.hxx | 3 |
3 files changed, 39 insertions, 3 deletions
diff --git a/include/comphelper/graphicmimetype.hxx b/include/comphelper/graphicmimetype.hxx new file mode 100644 index 000000000000..3f2b5308b2d6 --- /dev/null +++ b/include/comphelper/graphicmimetype.hxx @@ -0,0 +1,27 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef INCLUDED_COMPHELPER_GMH_HXX +#define INCLUDED_COMPHELPER_GMH_HXX + +#include <comphelper/comphelperdllapi.h> +#include <rtl/ustring.hxx> + +namespace comphelper +{ +class COMPHELPER_DLLPUBLIC GraphicMimeTypeHelper +{ +public: + static OUString GetMimeTypeForExtension(const OString& rExt); +}; +} + +#endif // INCLUDED_COMPHELPER_GMH_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/svx/xmlgrhlp.hxx b/include/svx/xmlgrhlp.hxx index 0c6eaa1d2124..9aff143b3b04 100644 --- a/include/svx/xmlgrhlp.hxx +++ b/include/svx/xmlgrhlp.hxx @@ -59,6 +59,7 @@ class SVX_DLLPUBLIC SvXMLGraphicHelper final : public cppu::WeakComponentImplHel GraphicOutputStreamVector maGrfStms; URLSet maURLSet; SvXMLGraphicHelperMode meCreateMode; + OUString maOutputMimeType; bool mbDirect; SVX_DLLPRIVATE static bool ImplGetStreamNames( const OUString& rURLStr, @@ -82,7 +83,8 @@ class SVX_DLLPUBLIC SvXMLGraphicHelper final : public cppu::WeakComponentImplHel virtual ~SvXMLGraphicHelper() override; void Init( const css::uno::Reference < css::embed::XStorage >& xXMLStorage, SvXMLGraphicHelperMode eCreateMode, - bool bDirect ); + bool bDirect, + const OUString& rGraphicMimeType = OUString() ); virtual void SAL_CALL disposing() override; @@ -91,8 +93,12 @@ public: static rtl::Reference<SvXMLGraphicHelper> Create( const css::uno::Reference < css::embed::XStorage >& rXMLStorage, SvXMLGraphicHelperMode eCreateMode, - bool bDirect = true ); - static rtl::Reference<SvXMLGraphicHelper> Create( SvXMLGraphicHelperMode eCreateMode ); + bool bDirect = true, + const OUString& rGraphicMimeType = OUString() ); + static rtl::Reference<SvXMLGraphicHelper> Create( SvXMLGraphicHelperMode eCreateMode, + const OUString& rMimeType = OUString() ); + +public: // XGraphicObjectResolver virtual OUString SAL_CALL resolveGraphicObjectURL( const OUString& aURL ) override; diff --git a/include/xmloff/xmlexp.hxx b/include/xmloff/xmlexp.hxx index f981929b3fe7..474d718d5a41 100644 --- a/include/xmloff/xmlexp.hxx +++ b/include/xmloff/xmlexp.hxx @@ -554,6 +554,9 @@ public: /// set null date from model to unit converter, if not already done bool SetNullDateOnUnitConverter(); + + /// Get clamped mimetype for image export (empty if none) + OUString GetImageFilterName() const; }; inline rtl::Reference< XMLTextParagraphExport > const & SvXMLExport::GetTextParagraphExport() |