tdf#117066 Saving ODT document with ~1500 bookmarks is slow, part 3

Individually, these don't make much difference, but they add up
to a halving the time to save on my machine.

ManifestImport::characters was spending time adding data to an OUString,
so convert that to an OUStringBuffer.

Change-Id: I267e701f4e7998044763f44199b1fe8a37325b68
Reviewed-on: https://gerrit.libreoffice.org/70311
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
diff --git a/package/source/manifest/ManifestImport.cxx b/package/source/manifest/ManifestImport.cxx
index 7f2ef54..b333cf5 100644
--- a/package/source/manifest/ManifestImport.cxx
+++ b/package/source/manifest/ManifestImport.cxx
@@ -173,7 +173,7 @@
    {
        aKeyInfoSequence[2].Name = "CipherValue";
        uno::Sequence < sal_Int8 > aDecodeBuffer;
        ::comphelper::Base64::decode(aDecodeBuffer, aCurrentCharacters);
        ::comphelper::Base64::decode(aDecodeBuffer, aCurrentCharacters.toString());
        aKeyInfoSequence[2].Value <<= aDecodeBuffer;
        aCurrentCharacters = ""; // consumed
    }
@@ -187,7 +187,7 @@
    {
        aKeyInfoSequence[0].Name = "KeyId";
        uno::Sequence < sal_Int8 > aDecodeBuffer;
        ::comphelper::Base64::decode(aDecodeBuffer, aCurrentCharacters);
        ::comphelper::Base64::decode(aDecodeBuffer, aCurrentCharacters.toString());
        aKeyInfoSequence[0].Value <<= aDecodeBuffer;
        aCurrentCharacters = ""; // consumed
    }
@@ -201,7 +201,7 @@
    {
        aKeyInfoSequence[1].Name = "KeyPacket";
        uno::Sequence < sal_Int8 > aDecodeBuffer;
        ::comphelper::Base64::decode(aDecodeBuffer, aCurrentCharacters);
        ::comphelper::Base64::decode(aDecodeBuffer, aCurrentCharacters.toString());
        aKeyInfoSequence[1].Value <<= aDecodeBuffer;
        aCurrentCharacters = ""; // consumed
    }
@@ -510,7 +510,7 @@

void SAL_CALL ManifestImport::characters( const OUString& aChars )
{
    aCurrentCharacters += aChars;
    aCurrentCharacters.append(aChars);
}

void SAL_CALL ManifestImport::ignorableWhitespace( const OUString& /*aWhitespaces*/ )
diff --git a/package/source/manifest/ManifestImport.hxx b/package/source/manifest/ManifestImport.hxx
index 1502337..671713d 100644
--- a/package/source/manifest/ManifestImport.hxx
+++ b/package/source/manifest/ManifestImport.hxx
@@ -24,6 +24,7 @@
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
#include <vector>
#include <rtl/ustrbuf.hxx>

#include <HashMaps.hxx>

@@ -54,7 +55,7 @@
    std::vector< css::beans::NamedValue > aKeyInfoSequence;
    std::vector< css::uno::Sequence< css::beans::NamedValue > > aKeys;
    std::vector< css::beans::PropertyValue > aSequence;
    OUString aCurrentCharacters;
    OUStringBuffer aCurrentCharacters;
    ManifestStack aStack;
    bool bIgnoreEncryptData;
    bool bPgpEncryption;