[Libreoffice-commits] core.git: Branch 'feature/vba-export' - oox/source

Markus Mohrhard markus.mohrhard at googlemail.com
Mon Aug 10 08:48:29 PDT 2015


 oox/source/ole/vbaexport.cxx |   11 +++++++++++
 1 file changed, 11 insertions(+)

New commits:
commit d9c3f48ec551dd429437656576913254622026fe
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Mon Aug 10 17:24:26 2015 +0200

    implement utf16 string export
    
    Change-Id: I569aac676764c356a5ffc8d47153e70cb3224af9

diff --git a/oox/source/ole/vbaexport.cxx b/oox/source/ole/vbaexport.cxx
index 6a5365b..6cdf5a1 100644
--- a/oox/source/ole/vbaexport.cxx
+++ b/oox/source/ole/vbaexport.cxx
@@ -35,6 +35,17 @@ void exportString(SvStream& rStrm, const OUString& rString)
     rStrm.WriteOString(aStringCorrectCodepage);
 }
 
+void exportUTF16String(SvStream& rStrm, const OUString& rString)
+{
+    sal_Int32 n = rString.getLength();
+    const sal_Unicode* pString = rString.getStr();
+    for (sal_Int32 i = 0; i < n; ++i)
+    {
+        sal_Unicode character = pString[i];
+        rStrm.WriteUnicode(character);
+    }
+}
+
 }
 
 VbaExport::VbaExport(css::uno::Reference<css::frame::XModel> xModel):


More information about the Libreoffice-commits mailing list