[Libreoffice-commits] .: sc/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Sep 30 11:52:36 PDT 2012


 sc/source/filter/excel/xecontent.cxx |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 79dbac32afd3a937e323231ec310ec1f0e476fe5
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Sun Sep 30 20:45:36 2012 +0200

    create guids that excel accepts
    
    Change-Id: I69868ad65b6eb6405d5723cb4d65d5e30c72e3ae

diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index 6bef29b..abca86f 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('-');
     }


More information about the Libreoffice-commits mailing list