summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-03-05 12:19:05 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-03-05 14:25:02 +0100
commitddd43218e9900536381733735adf8681d345e775 (patch)
tree5bb211e63d9b739d20eb248f1ab9f0fb481e118d /filter
parent9c036b1d3db253a1fd43ce76ce1d919e2029af59 (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 'filter')
-rw-r--r--filter/source/svg/svgwriter.cxx3
-rw-r--r--filter/source/xsltfilter/OleHandler.cxx9
2 files changed, 7 insertions, 5 deletions
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index f72317933420..a37c8d001843 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -21,6 +21,7 @@
#include "svgfontexport.hxx"
#include "svgwriter.hxx"
+#include <comphelper/base64.hxx>
#include <rtl/crc.h>
#include <vcl/unohelp.hxx>
#include <vcl/outdev.hxx>
@@ -2731,7 +2732,7 @@ void SVGActionWriter::ImplWriteBmp( const BitmapEx& rBmpEx,
Size aSz;
Sequence< sal_Int8 > aSeq( static_cast<sal_Int8 const *>(aOStm.GetData()), aOStm.Tell() );
OUStringBuffer aBuffer( "data:image/png;base64," );
- ::sax::Converter::encodeBase64( aBuffer, aSeq );
+ ::comphelper::Base64::encode( aBuffer, aSeq );
ImplMap( rPt, aPt );
ImplMap( rSz, aSz );
diff --git a/filter/source/xsltfilter/OleHandler.cxx b/filter/source/xsltfilter/OleHandler.cxx
index 799465f0ca1b..4a1d1c8f1cd1 100644
--- a/filter/source/xsltfilter/OleHandler.cxx
+++ b/filter/source/xsltfilter/OleHandler.cxx
@@ -30,6 +30,7 @@
#include <package/Deflater.hxx>
#include <cppuhelper/factory.hxx>
+#include <comphelper/base64.hxx>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/XInterface.hpp>
@@ -75,7 +76,7 @@ namespace XSLT
void OleHandler::initRootStorageFromBase64(const OString& content)
{
Sequence<sal_Int8> oleData;
- ::sax::Converter::decodeBase64(oleData, OStringToOUString(
+ ::comphelper::Base64::decode(oleData, OStringToOUString(
content, RTL_TEXTENCODING_UTF8));
m_rootStream = createTempFile();
Reference<XOutputStream> xOutput = m_rootStream->getOutputStream();
@@ -142,7 +143,7 @@ namespace XSLT
decompresser.reset();
//return the base64 string of the uncompressed data
OUStringBuffer buf(oleLength);
- ::sax::Converter::encodeBase64(buf, result);
+ ::comphelper::Base64::encode(buf, result);
return OUStringToOString(buf.toString(), RTL_TEXTENCODING_UTF8);
}
@@ -175,7 +176,7 @@ namespace XSLT
xInput->readBytes(oledata, oleLength);
//return the base64 encoded string
OUStringBuffer buf(oleLength);
- ::sax::Converter::encodeBase64(buf, oledata);
+ ::comphelper::Base64::encode(buf, oledata);
return OUStringToOString(buf.toString(), RTL_TEXTENCODING_UTF8);
}
return encodeSubStorage(streamName);
@@ -186,7 +187,7 @@ namespace XSLT
{
//decode the base64 string
Sequence<sal_Int8> oledata;
- ::sax::Converter::decodeBase64(oledata,
+ ::comphelper::Base64::decode(oledata,
OStringToOUString(content, RTL_TEXTENCODING_ASCII_US));
//create a temp stream to write data to
Reference<XStream> subStream = createTempFile();