[Libreoffice-commits] .: 4 commits - connectivity/source xmloff/source

David Tardon dtardon at kemper.freedesktop.org
Tue Jan 25 05:45:56 PST 2011


 connectivity/source/drivers/adabas/BDriver.cxx |    4 ++++
 xmloff/source/draw/ximpcustomshape.cxx         |   24 ++++++++++++++++++------
 2 files changed, 22 insertions(+), 6 deletions(-)

New commits:
commit f5174d58eee92a678d56a4b360ba6e57b098eabd
Author: David Tardon <dtardon at redhat.com>
Date:   Tue Jan 25 14:45:21 2011 +0100

    make the test for "-" more robust

diff --git a/xmloff/source/draw/ximpcustomshape.cxx b/xmloff/source/draw/ximpcustomshape.cxx
index d85cb49..d9d55ce 100644
--- a/xmloff/source/draw/ximpcustomshape.cxx
+++ b/xmloff/source/draw/ximpcustomshape.cxx
@@ -320,6 +320,7 @@ sal_Bool GetNextParameter( com::sun::star::drawing::EnhancedCustomShapeParameter
             sal_Int32 nEIndex = 0;  // index of "E" in double
 
             sal_Bool bE = sal_False;	// set if a double is including a "E" statement
+            sal_Bool bENum = sal_False; // there is at least one number after "E"
             sal_Bool bDot = sal_False;	// set if there is a dot included
             sal_Bool bEnd = sal_False;	// set for each value that can not be part of a double/integer
 
@@ -345,7 +346,19 @@ sal_Bool GetNextParameter( com::sun::star::drawing::EnhancedCustomShapeParameter
                         if ( bMustBePositiveWholeNumbered )
                             bValid = sal_False;
                         else
-                            bValid = ( nStartIndex == nIndex ) || ( bE && ( nEIndex + 1 == nIndex ) );
+                        {
+                            if ( nStartIndex == nIndex )
+                               bValid = sal_True;
+                            else if ( bE )
+                            {
+                                if ( nEIndex + 1 == nIndex )
+                                    bValid = sal_True;
+                                else if ( bENum )
+                                    bEnd = sal_True;
+                                else
+                                    bValid = sal_False;
+                            }
+                        }
                     }
                     break;
 
@@ -376,6 +389,10 @@ sal_Bool GetNextParameter( com::sun::star::drawing::EnhancedCustomShapeParameter
                     case '7' :
                     case '8' :
                     case '9' :
+                    {
+                        if ( bE && ! bENum )
+                            bENum = sal_True;
+                    }
                     break;
                     default:
                         bEnd = sal_True;
commit 7bf43f57e8834314a5678f78f680e69fc780c592
Author: David Tardon <dtardon at redhat.com>
Date:   Tue Jan 25 14:42:34 2011 +0100

    fix build with system ODBC

diff --git a/connectivity/source/drivers/adabas/BDriver.cxx b/connectivity/source/drivers/adabas/BDriver.cxx
index 70fbe4e..3db46ed 100644
--- a/connectivity/source/drivers/adabas/BDriver.cxx
+++ b/connectivity/source/drivers/adabas/BDriver.cxx
@@ -30,7 +30,11 @@
 #include "precompiled_connectivity.hxx"
 #include <tools/solar.h>
 #define ULONG ODBC_ULONG
+#ifdef SYSTEM_ODBC_HEADERS
+#include <sqltypes.h>
+#else
 #include <odbc/sqltypes.h>
+#endif
 #undef ULONG
 #undef BOOL
 #include <unotools/tempfile.hxx>
commit 6173c9154f2ed642f0bec2b68b9d303ac6b54662
Author: David Tardon <dtardon at redhat.com>
Date:   Tue Jan 25 13:20:00 2011 +0100

    check for exact pos. of the inner "-"

diff --git a/xmloff/source/draw/ximpcustomshape.cxx b/xmloff/source/draw/ximpcustomshape.cxx
index e9365f6..d85cb49 100644
--- a/xmloff/source/draw/ximpcustomshape.cxx
+++ b/xmloff/source/draw/ximpcustomshape.cxx
@@ -317,6 +317,7 @@ sal_Bool GetNextParameter( com::sun::star::drawing::EnhancedCustomShapeParameter
         if ( bNumberRequired )
         {
             sal_Int32 nStartIndex = nIndex;
+            sal_Int32 nEIndex = 0;  // index of "E" in double
 
             sal_Bool bE = sal_False;	// set if a double is including a "E" statement
             sal_Bool bDot = sal_False;	// set if there is a dot included
@@ -344,9 +345,7 @@ sal_Bool GetNextParameter( com::sun::star::drawing::EnhancedCustomShapeParameter
                         if ( bMustBePositiveWholeNumbered )
                             bValid = sal_False;
                         else
-                        {
-                            bValid = ( nStartIndex == nIndex ) || bE;
-                        }
+                            bValid = ( nStartIndex == nIndex ) || ( bE && ( nEIndex + 1 == nIndex ) );
                     }
                     break;
 
@@ -358,7 +357,10 @@ sal_Bool GetNextParameter( com::sun::star::drawing::EnhancedCustomShapeParameter
                         else
                         {
                             if ( !bE )
+                            {
                                 bE = sal_True;
+                                nEIndex = nIndex;
+                            }
                             else
                                 bEnd = sal_True;
                         }
commit 8e20cb9937a16d49b36b6557d483d2de84e78cf8
Author: David Tardon <dtardon at redhat.com>
Date:   Tue Jan 25 13:18:16 2011 +0100

    WaE: unused variables

diff --git a/xmloff/source/draw/ximpcustomshape.cxx b/xmloff/source/draw/ximpcustomshape.cxx
index e768c8b..e9365f6 100644
--- a/xmloff/source/draw/ximpcustomshape.cxx
+++ b/xmloff/source/draw/ximpcustomshape.cxx
@@ -318,9 +318,7 @@ sal_Bool GetNextParameter( com::sun::star::drawing::EnhancedCustomShapeParameter
         {
             sal_Int32 nStartIndex = nIndex;
 
-            sal_Bool bM = sal_False;	// set if the value is negative
             sal_Bool bE = sal_False;	// set if a double is including a "E" statement
-            sal_Bool bEM = sal_False;	// set if a double is including a "E-"statement
             sal_Bool bDot = sal_False;	// set if there is a dot included
             sal_Bool bEnd = sal_False;	// set for each value that can not be part of a double/integer
 
@@ -347,12 +345,7 @@ sal_Bool GetNextParameter( com::sun::star::drawing::EnhancedCustomShapeParameter
                             bValid = sal_False;
                         else
                         {
-                            if ( nStartIndex == nIndex )
-                                bM = sal_True;
-                            else if ( bE )
-                                bEM = sal_True;
-                            else
-                                bValid = sal_False;
+                            bValid = ( nStartIndex == nIndex ) || bE;
                         }
                     }
                     break;


More information about the Libreoffice-commits mailing list