diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2018-12-14 17:50:18 +0100 |
---|---|---|
committer | Tamás Zolnai <tamas.zolnai@collabora.com> | 2018-12-14 19:52:48 +0100 |
commit | b052974a6574e4074794ffa590fe60f7c1726768 (patch) | |
tree | c6d03687cb870a4e034f7e6167565ceb19e4650b /desktop/source | |
parent | 68aef0a3df1dd4c83dc3c26e4d3280649f4d3265 (diff) |
lok: Implement SVG export for Writer (SelectionOnly mode)
Separate generic code from Impress / Draw specific code
and implement shape selection handling in case of Writer.
This is an internal filter, so it can be called only from
the code.
Change-Id: I807e04a0949530d6029037bb964c10c80197ff33
Reviewed-on: https://gerrit.libreoffice.org/65174
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'desktop/source')
-rw-r--r-- | desktop/source/lib/init.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 90994a92c257..65ccfdf4a411 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -2618,7 +2618,14 @@ static size_t doc_renderShapeSelection(LibreOfficeKitDocument* pThis, char** pOu uno::Reference<io::XOutputStream> xOut = new utl::OOutputStreamWrapper(aOutStream); utl::MediaDescriptor aMediaDescriptor; - aMediaDescriptor["FilterName"] <<= OUString("impress_svg_Export"); + if (doc_getDocumentType(pThis) == LOK_DOCTYPE_PRESENTATION) + { + aMediaDescriptor["FilterName"] <<= OUString("impress_svg_Export"); + } + else if(doc_getDocumentType(pThis) == LOK_DOCTYPE_TEXT) + { + aMediaDescriptor["FilterName"] <<= OUString("writer_svg_Export"); + } aMediaDescriptor["SelectionOnly"] <<= true; aMediaDescriptor["OutputStream"] <<= xOut; |