[Libreoffice-commits] .: binfilter/bf_sc binfilter/bf_xmloff binfilter/inc

Caolán McNamara caolan at kemper.freedesktop.org
Thu May 31 06:35:32 PDT 2012


 binfilter/bf_sc/source/filter/xml/sc_XMLChangeTrackingExportHelper.cxx    |    5 
 binfilter/bf_sc/source/filter/xml/sc_XMLTrackedChangesContext.cxx         |    5 
 binfilter/bf_sc/source/filter/xml/sc_xmlbodyi.cxx                         |    5 
 binfilter/bf_sc/source/filter/xml/sc_xmlexprt.cxx                         |    5 
 binfilter/bf_sc/source/filter/xml/sc_xmlsubti.cxx                         |    4 
 binfilter/bf_sc/util/makefile.mk                                          |    1 
 binfilter/bf_xmloff/source/core/xmloff_DocumentSettingsContext.cxx        |    6 
 binfilter/bf_xmloff/source/core/xmloff_SettingsExportHelper.cxx           |    3 
 binfilter/bf_xmloff/source/core/xmloff_XMLBase64Export.cxx                |    4 
 binfilter/bf_xmloff/source/core/xmloff_XMLBase64ImportContext.cxx         |    5 
 binfilter/bf_xmloff/source/core/xmloff_xmluconv.cxx                       |   92 ----------
 binfilter/bf_xmloff/source/text/xmloff_XMLRedlineExport.cxx               |    3 
 binfilter/bf_xmloff/source/text/xmloff_XMLSectionExport.cxx               |    4 
 binfilter/bf_xmloff/source/text/xmloff_XMLSectionImportContext.cxx        |    4 
 binfilter/bf_xmloff/source/text/xmloff_XMLTextFrameContext.cxx            |    4 
 binfilter/bf_xmloff/source/text/xmloff_XMLTrackedChangesImportContext.cxx |    3 
 binfilter/bf_xmloff/util/makefile.mk                                      |    1 
 binfilter/inc/bf_xmloff/xmluconv.hxx                                      |   11 -
 18 files changed, 41 insertions(+), 124 deletions(-)

New commits:
commit 5b278ca5fd540592951ad460d8950a931ab755a8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed May 30 15:09:18 2012 +0100

    use sax::Converter:: base64 code instead
    
    Change-Id: I92fd4459bed7c38ff2063899b20d24d781ac45bd

diff --git a/binfilter/bf_sc/source/filter/xml/sc_XMLChangeTrackingExportHelper.cxx b/binfilter/bf_sc/source/filter/xml/sc_XMLChangeTrackingExportHelper.cxx
index 2916fa7..4b878dc 100644
--- a/binfilter/bf_sc/source/filter/xml/sc_XMLChangeTrackingExportHelper.cxx
+++ b/binfilter/bf_sc/source/filter/xml/sc_XMLChangeTrackingExportHelper.cxx
@@ -39,6 +39,9 @@
 #include <bf_xmloff/xmluconv.hxx>
 
 #include <bf_svtools/zforlist.hxx>
+
+#include <sax/tools/converter.hxx>
+
 namespace binfilter {
 
 #define SC_CHANGE_ID_PREFIX "ct"
@@ -758,7 +761,7 @@ void ScChangeTrackingExportHelper::CollectAndWriteChanges()
         if (pChangeTrack->IsProtected())
         {
             ::rtl::OUStringBuffer aBuffer;
-            SvXMLUnitConverter::encodeBase64(aBuffer, pChangeTrack->GetProtection());
+            ::sax::Converter::encodeBase64(aBuffer, pChangeTrack->GetProtection());
             if (aBuffer.getLength())
                 rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_PROTECTION_KEY, aBuffer.makeStringAndClear());
         }
diff --git a/binfilter/bf_sc/source/filter/xml/sc_XMLTrackedChangesContext.cxx b/binfilter/bf_sc/source/filter/xml/sc_XMLTrackedChangesContext.cxx
index 4456480..b5d495c 100644
--- a/binfilter/bf_sc/source/filter/xml/sc_XMLTrackedChangesContext.cxx
+++ b/binfilter/bf_sc/source/filter/xml/sc_XMLTrackedChangesContext.cxx
@@ -47,6 +47,9 @@
 #include <bf_svtools/zforlist.hxx>
 
 #include <com/sun/star/text/ControlCharacter.hpp>
+
+#include <sax/tools/converter.hxx>
+
 namespace binfilter {
 
 using namespace ::com::sun::star;
@@ -562,7 +565,7 @@ ScXMLTrackedChangesContext::ScXMLTrackedChangesContext( ScXMLImport& rInImport,
                 if (sValue.getLength())
                 {
                     uno::Sequence<sal_Int8> aPass;
-                    SvXMLUnitConverter::decodeBase64(aPass, sValue);
+                    ::sax::Converter::decodeBase64(aPass, sValue);
                     pChangeTrackingImportHelper->SetProtection(aPass);
                 }
             }
diff --git a/binfilter/bf_sc/source/filter/xml/sc_xmlbodyi.cxx b/binfilter/bf_sc/source/filter/xml/sc_xmlbodyi.cxx
index fb51806..42a4e2e 100644
--- a/binfilter/bf_sc/source/filter/xml/sc_xmlbodyi.cxx
+++ b/binfilter/bf_sc/source/filter/xml/sc_xmlbodyi.cxx
@@ -56,6 +56,9 @@
 #include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
 
 #include <sal/types.h>
+
+#include <sax/tools/converter.hxx>
+
 namespace binfilter {
 
 using namespace ::com::sun::star;
@@ -193,7 +196,7 @@ void ScXMLBodyContext::EndElement()
         {
             uno::Sequence<sal_Int8> aPass;
             if (sPassword.getLength())
-                SvXMLUnitConverter::decodeBase64(aPass, sPassword);
+                ::sax::Converter::decodeBase64(aPass, sPassword);
             pDoc->SetDocProtection(bProtected, aPass);
         }
         uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( GetScImport().GetModel(), uno::UNO_QUERY );
diff --git a/binfilter/bf_sc/source/filter/xml/sc_xmlexprt.cxx b/binfilter/bf_sc/source/filter/xml/sc_xmlexprt.cxx
index 02813dc..3a1f8c3 100644
--- a/binfilter/bf_sc/source/filter/xml/sc_xmlexprt.cxx
+++ b/binfilter/bf_sc/source/filter/xml/sc_xmlexprt.cxx
@@ -86,6 +86,7 @@
 #include <com/sun/star/sheet/NamedRangeFlag.hpp>
 #include <com/sun/star/form/XFormsSupplier.hpp>
 #include <legacysmgr/legacy_binfilters_smgr.hxx>
+#include <sax/tools/converter.hxx>
 namespace binfilter {
 //! not found in unonames.hxx
 #define SC_STANDARDFORMAT "StandardFormat"
@@ -1213,7 +1214,7 @@ void ScXMLExport::SetBodyAttributes()
     {
         AddAttribute(XML_NAMESPACE_TABLE, XML_STRUCTURE_PROTECTED, XML_TRUE);
         ::rtl::OUStringBuffer aBuffer;
-        SvXMLUnitConverter::encodeBase64(aBuffer, pDoc->GetDocPassword());
+        ::sax::Converter::encodeBase64(aBuffer, pDoc->GetDocPassword());
         if (aBuffer.getLength())
             AddAttribute(XML_NAMESPACE_TABLE, XML_PROTECTION_KEY, aBuffer.makeStringAndClear());
     }
@@ -1285,7 +1286,7 @@ void ScXMLExport::_ExportContent()
                                     AddAttribute(XML_NAMESPACE_TABLE, XML_PROTECTED, XML_TRUE);
                                     ::rtl::OUStringBuffer aBuffer;
                                     if (pDoc)
-                                        SvXMLUnitConverter::encodeBase64(aBuffer, pDoc->GetTabPassword(nTable));
+                                        ::sax::Converter::encodeBase64(aBuffer, pDoc->GetTabPassword(nTable));
                                     if (aBuffer.getLength())
                                         AddAttribute(XML_NAMESPACE_TABLE, XML_PROTECTION_KEY, aBuffer.makeStringAndClear());
                                 }
diff --git a/binfilter/bf_sc/source/filter/xml/sc_xmlsubti.cxx b/binfilter/bf_sc/source/filter/xml/sc_xmlsubti.cxx
index b517fb0..f53aacb 100644
--- a/binfilter/bf_sc/source/filter/xml/sc_xmlsubti.cxx
+++ b/binfilter/bf_sc/source/filter/xml/sc_xmlsubti.cxx
@@ -45,6 +45,8 @@
 #include <com/sun/star/sheet/XCellRangeAddressable.hpp>
 #include <com/sun/star/sheet/XCellRangeMovement.hpp>
 #include <com/sun/star/drawing/XDrawPageSupplier.hpp>
+
+#include <sax/tools/converter.hxx>
 namespace binfilter {
 
 //------------------------------------------------------------------
@@ -593,7 +595,7 @@ void ScMyTables::DeleteTable()
     if (rImport.GetDocument() && bProtection)
     {
         uno::Sequence<sal_Int8> aPass;
-        SvXMLUnitConverter::decodeBase64(aPass, sPassword);
+        ::sax::Converter::decodeBase64SomeChars(aPass, sPassword);
         rImport.GetDocument()->SetTabProtection(nCurrentSheet, bProtection, aPass);
         /*uno::Reference <util::XProtectable> xProtectable(xCurrentSheet, uno::UNO_QUERY);
         if (xProtectable.is())
diff --git a/binfilter/bf_sc/util/makefile.mk b/binfilter/bf_sc/util/makefile.mk
index bbe7286..ca55b96 100644
--- a/binfilter/bf_sc/util/makefile.mk
+++ b/binfilter/bf_sc/util/makefile.mk
@@ -71,6 +71,7 @@ SHL1STDLIBS+=       \
     $(BFSVXLIB)		\
     $(BFOFALIB)		\
     $(VCLLIB)		\
+    $(SAXLIB)		\
     $(CPPULIB)		\
     $(CPPUHELPERLIB)	\
     $(COMPHELPERLIB)	\
diff --git a/binfilter/bf_xmloff/source/core/xmloff_DocumentSettingsContext.cxx b/binfilter/bf_xmloff/source/core/xmloff_DocumentSettingsContext.cxx
index 3ffa5d5..e8b6538 100644
--- a/binfilter/bf_xmloff/source/core/xmloff_DocumentSettingsContext.cxx
+++ b/binfilter/bf_xmloff/source/core/xmloff_DocumentSettingsContext.cxx
@@ -37,9 +37,7 @@
 #include "xmluconv.hxx"
 #include <tools/debug.hxx>
 
-#ifndef __SGI_STL_LIST
 #include <list>
-#endif
 
 #include <com/sun/star/i18n/XForbiddenCharacters.hpp>
 #include <com/sun/star/container/XIndexContainer.hpp>
@@ -48,6 +46,7 @@
 #include <com/sun/star/util/DateTime.hpp>
 #include <com/sun/star/document/XViewDataSupplier.hpp>
 #include <com/sun/star/document/PrinterIndependentLayout.hpp>
+#include <sax/tools/converter.hxx>
 #include <xmlenums.hxx>
 namespace binfilter {
 
@@ -516,8 +515,7 @@ void XMLConfigItemContext::Characters( const ::rtl::OUString& rChars )
             }
             uno::Sequence<sal_Int8> aBuffer((sChars.getLength() / 4) * 3 );
             sal_Int32 nCharsDecoded =
-                GetImport().GetMM100UnitConverter().
-                    decodeBase64SomeChars( aBuffer, sChars );
+                ::sax::Converter::decodeBase64SomeChars(aBuffer, sChars);
             sal_uInt32 nStartPos(aDecoded.getLength());
             sal_uInt32 nCount(aBuffer.getLength());
             aDecoded.realloc(nStartPos + nCount);
diff --git a/binfilter/bf_xmloff/source/core/xmloff_SettingsExportHelper.cxx b/binfilter/bf_xmloff/source/core/xmloff_SettingsExportHelper.cxx
index a60824a..f7fbcfd 100644
--- a/binfilter/bf_xmloff/source/core/xmloff_SettingsExportHelper.cxx
+++ b/binfilter/bf_xmloff/source/core/xmloff_SettingsExportHelper.cxx
@@ -39,6 +39,7 @@
 #include <com/sun/star/util/DateTime.hpp>
 #include <com/sun/star/container/XIndexContainer.hpp>
 #include <com/sun/star/document/PrinterIndependentLayout.hpp>
+#include <sax/tools/converter.hxx>
 #include <xmlenums.hxx>
 namespace binfilter {
 
@@ -355,7 +356,7 @@ void XMLSettingsExportHelper::exportbase64Binary(
     if(nLength)
     {
         ::rtl::OUStringBuffer sBuffer;
-        SvXMLUnitConverter::encodeBase64(sBuffer, aProps);
+        ::sax::Converter::encodeBase64(sBuffer, aProps);
         rExport.GetDocHandler()->characters(sBuffer.makeStringAndClear());
     }
 }
diff --git a/binfilter/bf_xmloff/source/core/xmloff_XMLBase64Export.cxx b/binfilter/bf_xmloff/source/core/xmloff_XMLBase64Export.cxx
index 73457cb..5e8738a 100644
--- a/binfilter/bf_xmloff/source/core/xmloff_XMLBase64Export.cxx
+++ b/binfilter/bf_xmloff/source/core/xmloff_XMLBase64Export.cxx
@@ -28,6 +28,7 @@
 
 
 #include <com/sun/star/io/XInputStream.hpp>
+#include <sax/tools/converter.hxx>
 
 #include "xmluconv.hxx"
 #include "xmlexp.hxx"
@@ -62,8 +63,7 @@ sal_Bool XMLBase64Export::exportXML( const Reference < XInputStream> & rIn )
             nRead = rIn->readBytes( aInBuff, INPUT_BUFFER_SIZE );
             if( nRead > 0 )
             {
-                GetExport().GetMM100UnitConverter().encodeBase64( aOutBuff,
-                                                                  aInBuff );
+                ::sax::Converter::encodeBase64(aOutBuff, aInBuff);
                 GetExport().Characters( aOutBuff.makeStringAndClear() );
                 if( nRead == INPUT_BUFFER_SIZE )
                     GetExport().IgnorableWhitespace();
diff --git a/binfilter/bf_xmloff/source/core/xmloff_XMLBase64ImportContext.cxx b/binfilter/bf_xmloff/source/core/xmloff_XMLBase64ImportContext.cxx
index 0f46e86..ced6fff 100644
--- a/binfilter/bf_xmloff/source/core/xmloff_XMLBase64ImportContext.cxx
+++ b/binfilter/bf_xmloff/source/core/xmloff_XMLBase64ImportContext.cxx
@@ -31,6 +31,8 @@
 
 #include <com/sun/star/io/XOutputStream.hpp>
 
+#include <sax/tools/converter.hxx>
+
 #include "XMLBase64ImportContext.hxx"
 namespace binfilter {
 
@@ -82,8 +84,7 @@ void XMLBase64ImportContext::Characters( const ::rtl::OUString& rChars )
         }
         Sequence< sal_Int8 > aBuffer( (sChars.getLength() / 4) * 3 );
         sal_Int32 nCharsDecoded =
-            GetImport().GetMM100UnitConverter().
-                decodeBase64SomeChars( aBuffer, sChars );
+            ::sax::Converter::decodeBase64SomeChars(aBuffer, sChars);
         xOut->writeBytes( aBuffer );
         if( nCharsDecoded != sChars.getLength() )
             sBase64CharsLeft = sChars.copy( nCharsDecoded );
diff --git a/binfilter/bf_xmloff/source/core/xmloff_xmluconv.cxx b/binfilter/bf_xmloff/source/core/xmloff_xmluconv.cxx
index 96abc80..48946da 100644
--- a/binfilter/bf_xmloff/source/core/xmloff_xmluconv.cxx
+++ b/binfilter/bf_xmloff/source/core/xmloff_xmluconv.cxx
@@ -1537,98 +1537,6 @@ void ThreeByteToFourByte (const sal_Int8* pBuffer, const sal_Int32 nStart, const
     sBuffer.append(buf, SAL_N_ELEMENTS(buf));
 }
 
-void SvXMLUnitConverter::encodeBase64( ::rtl::OUStringBuffer& aStrBuffer, const uno::Sequence<sal_Int8>& aPass)
-{
-    sal_Int32 i(0);
-    sal_Int32 nBufferLength(aPass.getLength());
-    const sal_Int8* pBuffer = aPass.getConstArray();
-    while (i < nBufferLength)
-    {
-        ThreeByteToFourByte (pBuffer, i, nBufferLength, aStrBuffer);
-        i += 3;
-    }
-}
-
-void SvXMLUnitConverter::decodeBase64(uno::Sequence<sal_Int8>& aBuffer, const ::rtl::OUString& sBuffer)
-{
-#if OSL_DEBUG_LEVEL > 0
-    sal_Int32 nCharsDecoded =
-#endif
-        decodeBase64SomeChars( aBuffer, sBuffer );
-    OSL_ENSURE( nCharsDecoded == sBuffer.getLength(),
-                "some bytes left in base64 decoding!" );
-}
-
-sal_Int32 SvXMLUnitConverter::decodeBase64SomeChars(
-        uno::Sequence<sal_Int8>& rOutBuffer,
-        const ::rtl::OUString& rInBuffer)
-{
-    sal_Int32 nInBufferLen = rInBuffer.getLength();
-    sal_Int32 nMinOutBufferLen = (nInBufferLen / 4) * 3;
-    if( rOutBuffer.getLength() < nMinOutBufferLen )
-        rOutBuffer.realloc( nMinOutBufferLen );
-
-    const sal_Unicode *pInBuffer = rInBuffer.getStr();
-    sal_Int8 *pOutBuffer = rOutBuffer.getArray();
-    sal_Int8 *pOutBufferStart = pOutBuffer;
-    sal_Int32 nCharsDecoded = 0;
-
-    sal_uInt8 aDecodeBuffer[4];
-    sal_Int32 nBytesToDecode = 0;
-    sal_Int32 nBytesGotFromDecoding = 3;
-    sal_Int32 nInBufferPos= 0;
-    while( nInBufferPos < nInBufferLen )
-    {
-        sal_Unicode cChar = *pInBuffer;
-        if( cChar >= '+' && cChar <= 'z' )
-        {
-            sal_uInt8 nByte = aBase64DecodeTable[cChar-'+'];
-            if( nByte != 255 )
-            {
-                // We have found a valid character!
-                aDecodeBuffer[nBytesToDecode++] = nByte;
-
-                // One '=' character at the end means 2 out bytes
-                // Two '=' characters at the end mean 1 out bytes
-                if( '=' == cChar && nBytesToDecode > 2 )
-                    nBytesGotFromDecoding--;
-                if( 4 == nBytesToDecode )
-                {
-                    // Four characters found, so we may convert now!
-                    sal_uInt32 nOut = (aDecodeBuffer[0] << 18) +
-                                      (aDecodeBuffer[1] << 12) +
-                                      (aDecodeBuffer[2] << 6) +
-                                       aDecodeBuffer[3];
-
-                    *pOutBuffer++  = (sal_Int8)((nOut & 0xff0000) >> 16);
-                    if( nBytesGotFromDecoding > 1 )
-                        *pOutBuffer++  = (sal_Int8)((nOut & 0xff00) >> 8);
-                    if( nBytesGotFromDecoding > 2 )
-                        *pOutBuffer++  = (sal_Int8)(nOut & 0xff);
-                    nCharsDecoded = nInBufferPos + 1;
-                    nBytesToDecode = 0;
-                    nBytesGotFromDecoding = 3;
-                }
-            }
-            else
-            {
-                nCharsDecoded++;
-            }
-        }
-        else
-        {
-            nCharsDecoded++;
-        }
-
-        nInBufferPos++;
-        pInBuffer++;
-    }
-    if( (pOutBuffer - pOutBufferStart) != rOutBuffer.getLength() )
-        rOutBuffer.realloc( pOutBuffer - pOutBufferStart );
-
-    return nCharsDecoded;
-}
-
 sal_Bool SvXMLUnitConverter::convertNumFormat(
         sal_Int16& rType,
         const OUString& rNumFmt,
diff --git a/binfilter/bf_xmloff/source/text/xmloff_XMLRedlineExport.cxx b/binfilter/bf_xmloff/source/text/xmloff_XMLRedlineExport.cxx
index ffb638e..963716d 100644
--- a/binfilter/bf_xmloff/source/text/xmloff_XMLRedlineExport.cxx
+++ b/binfilter/bf_xmloff/source/text/xmloff_XMLRedlineExport.cxx
@@ -45,6 +45,7 @@
 
 #include <com/sun/star/util/DateTime.hpp>
 
+#include <sax/tools/converter.hxx>
 
 #include "xmlnmspe.hxx"
 
@@ -238,7 +239,7 @@ void XMLRedlineExport::ExportChangesListElements()
         if ( aKey.getLength() > 0 )
         {
             OUStringBuffer aBuffer;
-            SvXMLUnitConverter::encodeBase64( aBuffer, aKey );
+            ::sax::Converter::encodeBase64(aBuffer, aKey);
             rExport.AddAttribute( XML_NAMESPACE_TEXT, XML_PROTECTION_KEY,
                                   aBuffer.makeStringAndClear() );
         }
diff --git a/binfilter/bf_xmloff/source/text/xmloff_XMLSectionExport.cxx b/binfilter/bf_xmloff/source/text/xmloff_XMLSectionExport.cxx
index 59456bc..348a70e 100644
--- a/binfilter/bf_xmloff/source/text/xmloff_XMLSectionExport.cxx
+++ b/binfilter/bf_xmloff/source/text/xmloff_XMLSectionExport.cxx
@@ -39,6 +39,8 @@
 #include <com/sun/star/text/XTextFieldsSupplier.hpp>
 #include <com/sun/star/text/XChapterNumberingSupplier.hpp>
 
+#include <sax/tools/converter.hxx>
+
 #include "xmlkywd.hxx"
 #include "xmluconv.hxx"
 #include "xmlexp.hxx"
@@ -452,7 +454,7 @@ void XMLSectionExport::ExportRegularSectionStart(
     if (aPassword.getLength() > 0)
     {
         OUStringBuffer aBuffer;
-        SvXMLUnitConverter::encodeBase64(aBuffer, aPassword);
+        ::sax::Converter::encodeBase64(aBuffer, aPassword);
         GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_PROTECTION_KEY,
                                  aBuffer.makeStringAndClear());
     }
diff --git a/binfilter/bf_xmloff/source/text/xmloff_XMLSectionImportContext.cxx b/binfilter/bf_xmloff/source/text/xmloff_XMLSectionImportContext.cxx
index ebd58bb..e31b328 100644
--- a/binfilter/bf_xmloff/source/text/xmloff_XMLSectionImportContext.cxx
+++ b/binfilter/bf_xmloff/source/text/xmloff_XMLSectionImportContext.cxx
@@ -40,6 +40,8 @@
 #include <com/sun/star/text/XTextContent.hpp>
 #include <com/sun/star/text/ControlCharacter.hpp>
 
+#include <sax/tools/converter.hxx>
+
 namespace binfilter {
 
 
@@ -308,7 +310,7 @@ void XMLSectionImportContext::ProcessAttributes(
                 }
                 break;
             case XML_TOK_SECTION_PROTECTION_KEY:
-                SvXMLUnitConverter::decodeBase64(aSequence, sAttr);
+                ::sax::Converter::decodeBase64(aSequence, sAttr);
                 bSequenceOK = sal_True;
                 break;
             case XML_TOK_SECTION_PROTECT:
diff --git a/binfilter/bf_xmloff/source/text/xmloff_XMLTextFrameContext.cxx b/binfilter/bf_xmloff/source/text/xmloff_XMLTextFrameContext.cxx
index 33dfe6c..39fde1f 100644
--- a/binfilter/bf_xmloff/source/text/xmloff_XMLTextFrameContext.cxx
+++ b/binfilter/bf_xmloff/source/text/xmloff_XMLTextFrameContext.cxx
@@ -35,6 +35,7 @@
 #include <com/sun/star/io/XOutputStream.hpp>
 #include <com/sun/star/text/HoriOrientation.hpp>
 #include <com/sun/star/text/VertOrientation.hpp>
+#include <sax/tools/converter.hxx>
 #include "xmlimp.hxx"
 #include "xmlnmspe.hxx"
 #include "xmlkywd.hxx"
@@ -1111,8 +1112,7 @@ void XMLTextFrameContext::Characters( const OUString& rChars )
                 }
                 Sequence< sal_Int8 > aBuffer( (sChars.getLength() / 4) * 3 );
                 sal_Int32 nCharsDecoded =
-                    GetImport().GetMM100UnitConverter().
-                        decodeBase64SomeChars( aBuffer, sChars );
+                    ::sax::Converter::decodeBase64SomeChars(aBuffer, sChars);
                 xBase64Stream->writeBytes( aBuffer );
                 if( nCharsDecoded != sChars.getLength() )
                     sBase64CharsLeft = sChars.copy( nCharsDecoded );
diff --git a/binfilter/bf_xmloff/source/text/xmloff_XMLTrackedChangesImportContext.cxx b/binfilter/bf_xmloff/source/text/xmloff_XMLTrackedChangesImportContext.cxx
index d24d31c..b5f3bbf 100644
--- a/binfilter/bf_xmloff/source/text/xmloff_XMLTrackedChangesImportContext.cxx
+++ b/binfilter/bf_xmloff/source/text/xmloff_XMLTrackedChangesImportContext.cxx
@@ -30,6 +30,7 @@
 #include "XMLChangedRegionImportContext.hxx"
 #include <com/sun/star/uno/Reference.h>
 #include <com/sun/star/uno/Sequence.h>
+#include <sax/tools/converter.hxx>
 #include "xmlimp.hxx"
 #include "xmlnmspe.hxx"
 #include "nmspmap.hxx"
@@ -84,7 +85,7 @@ void XMLTrackedChangesImportContext::StartElement(
             }
             else if ( IsXMLToken( sLocalName, XML_PROTECTION_KEY ) )            {
                 Sequence<sal_Int8> aSequence;
-                SvXMLUnitConverter::decodeBase64(
+                ::sax::Converter::decodeBase64(
                     aSequence, xAttrList->getValueByIndex(i));
                 if ( aSequence.getLength() > 0 )
                 {
diff --git a/binfilter/bf_xmloff/util/makefile.mk b/binfilter/bf_xmloff/util/makefile.mk
index ff6b544..bb803a6 100644
--- a/binfilter/bf_xmloff/util/makefile.mk
+++ b/binfilter/bf_xmloff/util/makefile.mk
@@ -69,6 +69,7 @@ SHL1IMPLIB= _ibf_xo
 
 SHL1STDLIBS= \
         $(BFSVTOOLLIB)	\
+        $(SAXLIB)		\
         $(TOOLSLIB)		\
         $(I18NISOLANGLIB) \
         $(CPPULIB)		\
diff --git a/binfilter/inc/bf_xmloff/xmluconv.hxx b/binfilter/inc/bf_xmloff/xmluconv.hxx
index 71dd84b..d0d45ae 100644
--- a/binfilter/inc/bf_xmloff/xmluconv.hxx
+++ b/binfilter/inc/bf_xmloff/xmluconv.hxx
@@ -309,17 +309,6 @@ public:
     static sal_Int32 indexOfComma( const ::rtl::OUString& rStr,
                                    sal_Int32 nPos );
 
-    static void encodeBase64( ::rtl::OUStringBuffer& aStrBuffer, const ::com::sun::star::uno::Sequence<sal_Int8>& aPass);
-
-    // Decode a base 64 encoded string into a sequence of bytes. The first
-    // version can be used for attribute values only, bacause it does not
-    // return any chars left from conversion.
-    // For text submitted throgh the SAX characters call, the later method
-    // must be used!
-    static void decodeBase64( ::com::sun::star::uno::Sequence<sal_Int8>& aPass, const ::rtl::OUString& sBuffer);
-
-    static sal_Int32 decodeBase64SomeChars( ::com::sun::star::uno::Sequence<sal_Int8>& aPass, const ::rtl::OUString& sBuffer);
-
     /** convert num-forat and num-letter-sync values to NumberingType */
     sal_Bool convertNumFormat( sal_Int16& rType,
                                 const ::rtl::OUString& rNumFormat,


More information about the Libreoffice-commits mailing list