summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-09-30 20:45:36 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-09-30 20:51:52 +0200
commit79dbac32afd3a937e323231ec310ec1f0e476fe5 (patch)
tree024c3478525985a0df3f430cd12c9e834f34c1e4 /sc
parenta842b5690e77de51d933bd9a4224303abba1d870 (diff)
create guids that excel accepts
Change-Id: I69868ad65b6eb6405d5723cb4d65d5e30c72e3ae
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/excel/xecontent.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index 6bef29b1f5ce..abca86f96d68 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -1082,13 +1082,21 @@ void XclExpColorScale::SaveXml( XclExpXmlStream& rStrm )
namespace {
+rtl::OString createHexStringFromDigit(sal_uInt8 nDigit)
+{
+ rtl::OString aString = rtl::OString::valueOf( static_cast<sal_Int32>(nDigit), 16 );
+ if(aString.getLength() == 1)
+ aString = aString + rtl::OString::valueOf(static_cast<sal_Int32>(0));
+ return aString;
+}
+
rtl::OString createGuidStringFromInt(sal_uInt8 nGuid[16])
{
rtl::OStringBuffer aBuffer;
aBuffer.append('{');
for(size_t i = 0; i < 16; ++i)
{
- aBuffer.append(static_cast<sal_Int32>(nGuid[i]), 16);
+ aBuffer.append(createHexStringFromDigit(nGuid[i]));
if(i == 3|| i == 5 || i == 7 || i == 9 )
aBuffer.append('-');
}