sc/source/filter/excel/excdoc.cxx  |    3 ++-
 sc/source/filter/excel/xestyle.cxx |    2 ++
 sc/source/filter/inc/xltable.hxx   |    2 +-
 3 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 4a332d54b80bbc502ccc98bf924a269e00c10070
Author: Tor Lillqvist <t...@collabora.com>
Date:   Mon Mar 6 20:42:46 2017 +0200

    The 'fLockObj' field of an 'ObjProtect' MUST be 0x0001 says the spec
    
    So generate such a record only when the protection state is on.
    
    See https://msdn.microsoft.com/en-us/library/dd922139(v=office.12).aspx
    
    Change-Id: I710395527cd53dc47018806e51fcc699e11fb461

diff --git a/sc/source/filter/excel/excdoc.cxx 
b/sc/source/filter/excel/excdoc.cxx
index 67e2ae4..1788f8f 100644
--- a/sc/source/filter/excel/excdoc.cxx
+++ b/sc/source/filter/excel/excdoc.cxx
@@ -490,7 +490,8 @@ void ExcTable::FillAsTableBinary( SCTAB nCodeNameIdx )
     {
         Add( new XclExpProtection(true) );
         Add( new XclExpBoolRecord(0x00DD, 
pTabProtect->isOptionEnabled(ScTableProtection::SCENARIOS)) );
-        Add( new XclExpBoolRecord(0x0063, 
pTabProtect->isOptionEnabled(ScTableProtection::OBJECTS)) );
+        if (pTabProtect->isOptionEnabled(ScTableProtection::OBJECTS))
+            Add( new XclExpBoolRecord(0x0063, true ));
         Add( new XclExpPassHash(pTabProtect->getPasswordHash(PASSHASH_XL)) );
     }
 
commit 727ee3f92a8882914ac3f68eaf53ac519ace5f38
Author: Tor Lillqvist <t...@collabora.com>
Date:   Mon Mar 6 20:28:02 2017 +0200

    The 'reserved1' bit of a 'Formula' MUST be zero according to current spec
    
    See https://msdn.microsoft.com/en-us/library/dd908919(v=office.12).aspx .
    
    This means we will never set the EXC_FORMULA_RECALC_ONLOAD flag, hmm?
    
    Change-Id: Ic081caa7f98426394cbc7b0b320fa1a5a9a34f6c

diff --git a/sc/source/filter/inc/xltable.hxx b/sc/source/filter/inc/xltable.hxx
index 4d06dd2..44aea94 100644
--- a/sc/source/filter/inc/xltable.hxx
+++ b/sc/source/filter/inc/xltable.hxx
@@ -65,7 +65,7 @@ const sal_uInt16 EXC_ID4_FORMULA            = 0x0406;
 const sal_uInt16 EXC_FORMULA_RECALC_ALWAYS  = 0x0001;
 const sal_uInt16 EXC_FORMULA_RECALC_ONLOAD  = 0x0002;
 const sal_uInt16 EXC_FORMULA_SHARED         = 0x0008;
-const sal_uInt16 EXC_FORMULA_DEFAULTFLAGS   = EXC_FORMULA_RECALC_ONLOAD;
+const sal_uInt16 EXC_FORMULA_DEFAULTFLAGS   = 0x0000;
 
 const sal_uInt8 EXC_FORMULA_RES_STRING      = 0x00;     /// Result is a string.
 const sal_uInt8 EXC_FORMULA_RES_BOOL        = 0x01;     /// Result is Boolean 
value.
commit 970f8dc7847967719652590f71f0f19e46ba7268
Author: Tor Lillqvist <t...@collabora.com>
Date:   Mon Mar 6 20:11:24 2017 +0200

    Set the 'unused2' bit of 'Font' to 1 iff 'uls' is greater than 0 per spec
    
    See https://msdn.microsoft.com/en-us/library/dd906117(v=office.12).aspx .
    
    Change-Id: I4ff278f4cdd388947bbe81b88b6c39ff2b208b1a

diff --git a/sc/source/filter/excel/xestyle.cxx 
b/sc/source/filter/excel/xestyle.cxx
index 529b086..19e7463 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -993,6 +993,8 @@ void XclExpFont::WriteBody( XclExpStream& rStrm )
 {
     sal_uInt16 nAttr = EXC_FONTATTR_NONE;
     ::set_flag( nAttr, EXC_FONTATTR_ITALIC, maData.mbItalic );
+    if( maData.mnUnderline > 0 )
+        ::set_flag( nAttr, EXC_FONTATTR_UNDERLINE, true );
     ::set_flag( nAttr, EXC_FONTATTR_STRIKEOUT, maData.mbStrikeout );
     ::set_flag( nAttr, EXC_FONTATTR_OUTLINE, maData.mbOutline );
     ::set_flag( nAttr, EXC_FONTATTR_SHADOW, maData.mbShadow );
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to