diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-03-05 12:19:05 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-03-05 14:25:02 +0100 |
commit | ddd43218e9900536381733735adf8681d345e775 (patch) | |
tree | 5bb211e63d9b739d20eb248f1ab9f0fb481e118d /svx | |
parent | 9c036b1d3db253a1fd43ce76ce1d919e2029af59 (diff) |
drop sax::tools::*base64 methods
and use the underlying comphelper methods rather. This is so that I can
break the dependency that tools has on sax, and can add methods that
make sax depend on tools.
Change-Id: I8a2d6ce2ffc3529a0020710ade6a1748ee5af7d5
Reviewed-on: https://gerrit.libreoffice.org/50767
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/xoutdev/_xoutbmp.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx index 1220a72f93bd..a6e072197e8c 100644 --- a/svx/source/xoutdev/_xoutbmp.cxx +++ b/svx/source/xoutdev/_xoutbmp.cxx @@ -19,6 +19,7 @@ #include <sal/config.h> +#include <comphelper/base64.hxx> #include <tools/poly.hxx> #include <vcl/bitmapaccess.hxx> #include <vcl/virdev.hxx> @@ -391,7 +392,7 @@ bool XOutBitmap::GraphicToBase64(const Graphic& rGraphic, OUString& rOUString) aOStm.Seek(STREAM_SEEK_TO_END); css::uno::Sequence<sal_Int8> aOStmSeq( static_cast<sal_Int8 const *>(aOStm.GetData()),aOStm.Tell() ); OUStringBuffer aStrBuffer; - ::sax::Converter::encodeBase64(aStrBuffer,aOStmSeq); + ::comphelper::Base64::encode(aStrBuffer,aOStmSeq); OUString aEncodedBase64Image = aStrBuffer.makeStringAndClear(); if( aLink.GetType() == GfxLinkType::NativeSvg ) { @@ -405,7 +406,7 @@ bool XOutBitmap::GraphicToBase64(const Graphic& rGraphic, OUString& rOUString) *pOutBuffer++ = pBuffer[ite]; ite++; } - ::sax::Converter::encodeBase64(aStrBuffer, newTempSeq); + ::comphelper::Base64::encode(aStrBuffer, newTempSeq); aEncodedBase64Image = aStrBuffer.makeStringAndClear(); sal_Int32 SVGFixLength = aEncodedBase64Image.getLength(); aEncodedBase64Image = aEncodedBase64Image.replaceAt(SVGFixLength - 12, SVGFixLength, "") + "PC9zdmc+Cg=="; // removes rear 12 bits of garbage and adds svg closing tag in base64 |