[Libreoffice] [PATCH] Unix 64 bits property type / default value mismatch
Lionel Elie Mamane
lionel at mamane.lu
Sun Jan 16 14:32:40 PST 2011
Another of those places in code the that assumes C long == 32 bit
integer. These four variables are used to give default values to
properties WindowTop, WindowLeft, WindowWidth and WindowHeight:
nY = i_rTableWindowSettings.getOrDefault( "WindowTop", nY );
nX = i_rTableWindowSettings.getOrDefault( "WindowLeft", nX );
nWidth = i_rTableWindowSettings.getOrDefault( "WindowWidth", nWidth );
nHeight = i_rTableWindowSettings.getOrDefault( "WindowHeight", nHeight );
But these properties are initialised with a "long":
aWindowData.put( "WindowTop", (*aIter)->GetPosition().Y() );
aWindowData.put( "WindowLeft", (*aIter)->GetPosition().X() );
aWindowData.put( "WindowWidth", (*aIter)->GetSize().Width() );
aWindowData.put( "WindowHeight", (*aIter)->GetSize().Height() );
GetPosition() returns a Point, and that returns "long" for X and Y.
GetSize() returns a Size, and that returns "long" for Width and Height.
Point and Size defined in libs-gui/tools/inc/tools/gen.hxx
---
Fix property type / default value mismatch
Fixes:
Error: caught an exception
message: Invalid value type for 'WindowTop'.
Expected: long
Found: hyper
From File dbaccess/source/ui/querydesign/querycontroller.cxx at Line 1722
when editing a query
---
dbaccess/source/ui/querydesign/JoinController.cxx | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dbaccess/source/ui/querydesign/JoinController.cxx b/dbaccess/source/ui/querydesign/JoinController.cxx
index 77b31a8..6ac8e2e 100644
--- a/dbaccess/source/ui/querydesign/JoinController.cxx
+++ b/dbaccess/source/ui/querydesign/JoinController.cxx
@@ -402,7 +402,7 @@ void OJoinController::loadTableWindows( const ::comphelper::NamedValueCollection
// -----------------------------------------------------------------------------
void OJoinController::loadTableWindow( const ::comphelper::NamedValueCollection& i_rTableWindowSettings )
{
- sal_Int32 nX = -1, nY = -1, nHeight = -1, nWidth = -1;
+ long nX = -1, nY = -1, nHeight = -1, nWidth = -1;
::rtl::OUString sComposedName,sTableName,sWindowName;
sal_Bool bShowAll = false;
--
1.7.2.3
More information about the LibreOffice
mailing list