diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-10-08 20:40:00 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-10-08 20:40:00 +0200 |
commit | ee1a8e5323c35c8b578f1524bb65990cfc57b80d (patch) | |
tree | a969be440260c64967e622776b6c2f40814a71f9 /oox | |
parent | f8371ae1e8ac5c3a9be898095508b333d550457d (diff) |
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
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/ole/vbaexport.cxx | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/oox/source/ole/vbaexport.cxx b/oox/source/ole/vbaexport.cxx index 9d423f64bc72..d98f5dd24634 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"); |