[Libreoffice-commits] core.git: oox/source

Markus Mohrhard markus.mohrhard at googlemail.com
Thu Oct 8 11:41:29 PDT 2015


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

New commits:
commit ee1a8e5323c35c8b578f1524bb65990cfc57b80d
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Thu Oct 8 20:40:00 2015 +0200

    don't hardcode the project id
    
    Now that we have the encryption we no longer need to use the hardcoded
    project id.
    
    Change-Id: I014aa35344960eb960d9b05b76a11f8d8d7e0de6

diff --git a/oox/source/ole/vbaexport.cxx b/oox/source/ole/vbaexport.cxx
index 9d423f6..d98f5dd 100644
--- a/oox/source/ole/vbaexport.cxx
+++ b/oox/source/ole/vbaexport.cxx
@@ -824,18 +824,17 @@ void exportVBAProjectStream(SvStream& rStrm)
     rStrm.WriteUInt16(0x0000); // Undefined
 }
 
-/*
-OString createHexStringFromDigit(sal_uInt8 nDigit)
+OUString createHexStringFromDigit(sal_uInt8 nDigit)
 {
-    OString aString = OString::number( nDigit, 16 );
+    OUString aString = OUString::number( nDigit, 16 );
     if(aString.getLength() == 1)
-        aString = aString + OString::number(0);
+        aString = aString + OUString::number(0);
     return aString;
 }
 
-OString createGuidStringFromInt(sal_uInt8 nGuid[16])
+OUString createGuidStringFromInt(sal_uInt8 nGuid[16])
 {
-    OStringBuffer aBuffer;
+    OUStringBuffer aBuffer;
     aBuffer.append('{');
     for(size_t i = 0; i < 16; ++i)
     {
@@ -844,19 +843,17 @@ OString createGuidStringFromInt(sal_uInt8 nGuid[16])
             aBuffer.append('-');
     }
     aBuffer.append('}');
-    OString aString = aBuffer.makeStringAndClear();
+    OUString aString = aBuffer.makeStringAndClear();
     return aString.toAsciiUpperCase();
 }
 
-OString generateGUIDString()
+OUString generateGUIDString()
 {
     sal_uInt8 nGuid[16];
     rtl_createUuid(nGuid, NULL, true);
     return createGuidStringFromInt(nGuid);
 }
 
-*/
-
 // section 2.3.1 PROJECT Stream
 void exportPROJECTStream(SvStream& rStrm, css::uno::Reference<css::container::XNameContainer> xNameContainer,
         const OUString& projectName, const std::vector<sal_Int32>& rLibraryMap)
@@ -870,7 +867,7 @@ void exportPROJECTStream(SvStream& rStrm, css::uno::Reference<css::container::XN
 
     // section 2.3.1.2 ProjectId
     exportString(rStrm, "ID=\"");
-    OUString aProjectID("{9F10AB9C-89AC-4C0F-8AFB-8E9B96D5F170}");
+    OUString aProjectID = generateGUIDString();
     exportString(rStrm, aProjectID);
     exportString(rStrm, "\"\r\n");
 


More information about the Libreoffice-commits mailing list