[Libreoffice-commits] core.git: Branch 'libreoffice-4-1-4' - sw/source

Michael Stahl mstahl at redhat.com
Tue Dec 10 08:04:04 PST 2013


 sw/source/core/doc/docfld.cxx     |    3 ++-
 sw/source/filter/html/htmlfld.cxx |    5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 1a37462bb59f036b5b871e6f1361c4b2fd216481
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Dec 9 21:45:16 2013 +0100

    fdo#70198: sw: don't truncate Time values on 32bit platforms
    
    SwDoc::SetFixFields() uses sal_uLong to store Time.GetTime() which needs
    64 bits.
    
    Also fix same problem on Time fields in HTML import.
    
    (regression from 9830fd36dbdb72c79703b0c61efc027fba793c5a)
    
    (cherry picked from commit 17dab5bf8efb3fd676e6854474b199b681d0dc28)
    
    Conflicts:
    	sw/source/filter/html/htmlfld.cxx
    
    Change-Id: I5d0388cbc364e1f9dfb60ff9e83c7d2f101c69d8
    Reviewed-on: https://gerrit.libreoffice.org/7020
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit f0d031c19c45d680b3d468c58a912da2a3ce4c78)
    Reviewed-on: https://gerrit.libreoffice.org/7023
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Reviewed-by: Tor Lillqvist <tml at collabora.com>
    Tested-by: Tor Lillqvist <tml at collabora.com>

diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index a78a592..941e79b 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -1982,7 +1982,8 @@ void SwDoc::SetFixFields( bool bOnlyTimeDate, const DateTime* pNewDateTime )
 {
     sal_Bool bIsModified = IsModified();
 
-    sal_uLong nDate, nTime;
+    sal_Int32 nDate;
+    sal_Int64 nTime;
     if( pNewDateTime )
     {
         nDate = pNewDateTime->GetDate();
diff --git a/sw/source/filter/html/htmlfld.cxx b/sw/source/filter/html/htmlfld.cxx
index 3213bfc..bcf06da 100644
--- a/sw/source/filter/html/htmlfld.cxx
+++ b/sw/source/filter/html/htmlfld.cxx
@@ -327,7 +327,8 @@ void SwHTMLParser::NewField()
     case RES_TIMEFLD:
         {
             sal_uLong nNumFmt = 0;
-            sal_uLong nTime = Time( Time::SYSTEM ).GetTime(), nDate = Date( Date::SYSTEM ).GetDate();
+            sal_Int64 nTime = Time( Time::SYSTEM ).GetTime();
+            sal_Int32 nDate = Date( Date::SYSTEM ).GetDate();
             sal_uInt16 nSub = 0;
             sal_Bool bValidFmt = sal_False;
             HTMLNumFmtTblEntry * pFmtTbl;
@@ -337,7 +338,7 @@ void SwHTMLParser::NewField()
                 nSub = DATEFLD;
                 pFmtTbl = aHTMLDateFldFmtTable;
                 if( aValue.Len() )
-                    nDate = (sal_uLong)aValue.ToInt32();
+                    nDate = aValue.ToInt32();
             }
             else
             {


More information about the Libreoffice-commits mailing list