summaryrefslogtreecommitdiff
path: root/oox/source/ole/vbaexport.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'oox/source/ole/vbaexport.cxx')
-rw-r--r--oox/source/ole/vbaexport.cxx28
1 files changed, 3 insertions, 25 deletions
diff --git a/oox/source/ole/vbaexport.cxx b/oox/source/ole/vbaexport.cxx
index cd26bf486615..4aeff993b926 100644
--- a/oox/source/ole/vbaexport.cxx
+++ b/oox/source/ole/vbaexport.cxx
@@ -31,9 +31,8 @@
#include <sot/storage.hxx>
-#include <rtl/uuid.h>
-
#include <comphelper/string.hxx>
+#include <comphelper/xmltools.hxx>
#define USE_UTF8_CODEPAGE 0
#if USE_UTF8_CODEPAGE
@@ -88,28 +87,6 @@ OUString createHexStringFromDigit(sal_uInt8 nDigit)
return aString.toAsciiUpperCase();
}
-OUString createGuidStringFromInt(sal_uInt8 const nGuid[16])
-{
- OUStringBuffer aBuffer;
- aBuffer.append('{');
- for(size_t i = 0; i < 16; ++i)
- {
- aBuffer.append(createHexStringFromDigit(nGuid[i]));
- if(i == 3|| i == 5 || i == 7 || i == 9 )
- aBuffer.append('-');
- }
- aBuffer.append('}');
- OUString aString = aBuffer.makeStringAndClear();
- return aString.toAsciiUpperCase();
-}
-
-OUString generateGUIDString()
-{
- sal_uInt8 nGuid[16];
- rtl_createUuid(nGuid, nullptr, true);
- return createGuidStringFromInt(nGuid);
-}
-
}
VBACompressionChunk::VBACompressionChunk(SvStream& rCompressedStream, const sal_uInt8* pData, std::size_t nChunkSize)
@@ -877,7 +854,8 @@ void exportPROJECTStream(SvStream& rStrm, const css::uno::Reference<css::contain
// section 2.3.1.2 ProjectId
exportString(rStrm, "ID=\"");
- OUString aProjectID = generateGUIDString();
+ OUString aProjectID
+ = OStringToOUString(comphelper::xml::generateGUIDString(), RTL_TEXTENCODING_UTF8);
exportString(rStrm, aProjectID);
exportString(rStrm, "\"\r\n");