summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basic/source/sbx/sbxvalue.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx
index add49e101a8a..e1aa67de13f8 100644
--- a/basic/source/sbx/sbxvalue.cxx
+++ b/basic/source/sbx/sbxvalue.cxx
@@ -1271,8 +1271,10 @@ Lbl_OpIsDouble:
default:
SetError( SbxERR_NOTIMP );
}
- // #45465 Date needs with "+" a special handling: forces date type
- if( GetType() == SbxDATE || rOp.GetType() == SbxDATE )
+ // Date with "+" or "-" needs special handling that
+ // forces the Date type ( except if lhs AND rhs are already
+ // Date types
+ if( ( eOp == SbxPLUS || eOp == SbxMINUS )&& ( ( GetType() == SbxDATE || rOp.GetType() == SbxDATE )&& ( GetType() != rOp.GetType() ) ) )
aL.eType = SbxDATE;
}