Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


On Mon, Jan 17, 2011 at 04:58:28PM +0000, Caolán McNamara wrote:
On Mon, 2011-01-17 at 15:18 +0100, Lionel Elie Mamane wrote:

(...) we have to make these three places
agree. As to whether it is in the direction of "C/C++ long" everywhere
or in the direction of "uno long == sal_Int32" everywhere, (..)
[no] opinion.

Well, we have to assume from that LoadTableWindowData that the
values may have been cached on disk somewhere, and have been
assigned a data type of sal_Int32 for the purposes of file
storage. So I say we use sal_Int32 everywhere for those four
"long"s.

OK, here's the patch that changes the setters to sal_Int32 then.

-- 
Lionel
From 75bb623d7f03cc58d0d722b1a15a9f89e7103944 Mon Sep 17 00:00:00 2001
From: Lionel Elie Mamane <lionel@mamane.lu>
Date: Fri, 21 Jan 2011 07:48:14 +0100
Subject: [PATCH] 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 |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dbaccess/source/ui/querydesign/JoinController.cxx 
b/dbaccess/source/ui/querydesign/JoinController.cxx
index 77b31a8..d816794 100644
--- a/dbaccess/source/ui/querydesign/JoinController.cxx
+++ b/dbaccess/source/ui/querydesign/JoinController.cxx
@@ -444,10 +444,10 @@ void OJoinController::saveTableWindows( ::comphelper::NamedValueCollection& 
o_rV
             aWindowData.put( "ComposedName", (*aIter)->GetComposedName() );
             aWindowData.put( "TableName", (*aIter)->GetTableName() );
             aWindowData.put( "WindowName", (*aIter)->GetWinName() );
-            aWindowData.put( "WindowTop", (*aIter)->GetPosition().Y() );
-            aWindowData.put( "WindowLeft", (*aIter)->GetPosition().X() );
-            aWindowData.put( "WindowWidth", (*aIter)->GetSize().Width() );
-            aWindowData.put( "WindowHeight", (*aIter)->GetSize().Height() );
+            aWindowData.put( "WindowTop", (sal_Int32)(*aIter)->GetPosition().Y() );
+            aWindowData.put( "WindowLeft", (sal_Int32)(*aIter)->GetPosition().X() );
+            aWindowData.put( "WindowWidth", (sal_Int32)(*aIter)->GetSize().Width() );
+            aWindowData.put( "WindowHeight", (sal_Int32)(*aIter)->GetSize().Height() );
             aWindowData.put( "ShowAll", (*aIter)->IsShowAll() );
 
             const ::rtl::OUString sTableName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 
"Table" ) ) + ::rtl::OUString::valueOf( i ) );
-- 
1.7.2.3


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.