You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by pf...@apache.org on 2013/01/24 03:43:26 UTC

svn commit: r1437842 - /openoffice/trunk/main/sw/source/core/bastyp/calc.cxx

Author: pfg
Date: Thu Jan 24 02:43:26 2013
New Revision: 1437842

URL: http://svn.apache.org/viewvc?rev=1437842&view=rev
Log:
i108228 - table: bool has negative sign when used in formula expression.

The root problem is that the boolean expression "true"
evaluates to -1 rather than +1 in formulas in Writer.

The problem is solved by considering that the type can
be a Boolean (SBxBool in addition to SbxSTRING.

Author:	Mattias Johnnson

Modified:
    openoffice/trunk/main/sw/source/core/bastyp/calc.cxx

Modified: openoffice/trunk/main/sw/source/core/bastyp/calc.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/bastyp/calc.cxx?rev=1437842&r1=1437841&r2=1437842&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/bastyp/calc.cxx (original)
+++ openoffice/trunk/main/sw/source/core/bastyp/calc.cxx Thu Jan 24 02:43:26 2013
@@ -1760,7 +1760,7 @@ double SwSbxValue::GetDouble() const
 
 SwSbxValue& SwSbxValue::MakeDouble()
 {
-	if( SbxSTRING == GetType() )
+	if( SbxSTRING == GetType() || SbxBOOL == GetType() )
 		PutDouble( GetDouble() );
 	return *this;
 }