[PATCH] restore special DATE handling code for SbxValue::Compute fdo#44385

Noel Power noel.power at novell.com
Thu Jan 12 07:46:52 PST 2012


restore code that seemed to be erroneously moved as part of the currency enhancement feature
---
 basic/source/sbx/sbxvalue.cxx |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx
index e21234c..39dfadb 100644
--- a/basic/source/sbx/sbxvalue.cxx
+++ b/basic/source/sbx/sbxvalue.cxx
@@ -1311,9 +1311,6 @@ Lbl_OpIsDouble:
                             else aL.nDouble /= aR.nDouble; break;
                         case SbxPLUS:
                             aL.nDouble += aR.nDouble; break;
-                            // #45465 Date needs with "+" a special handling: forces date type
-                            if( GetType() == SbxDATE || rOp.GetType() == SbxDATE )
-                                aL.eType = SbxDATE;
                         case SbxMINUS:
                             aL.nDouble -= aR.nDouble; break;
                         case SbxNEG:
@@ -1321,6 +1318,9 @@ Lbl_OpIsDouble:
                         default:
                             SetError( SbxERR_NOTIMP );
                     }
+                    // #45465 Date needs with "+" a special handling: forces date type
+                    if( GetType() == SbxDATE || rOp.GetType() == SbxDATE )
+                        aL.eType = SbxDATE;
 
                 }
             }
-- 
1.7.3.4


--------------080300060204000001010200--


More information about the LibreOffice mailing list