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


On Sat, Jan 15, 2011 at 08:00:05PM +0000, Caolán McNamara wrote:
On Sat, 2011-01-15 at 05:59 +0100, Lionel Elie Mamane wrote:
Does not fit release blocker criteria, but would still be *very* nice
to have for the release, as it easily fixes / papers over a rather
annoying / stupid (from the user's point of view) bug:

I pushed this to master and to the stable 3-3 branch, thanks for
this.

FYI, the OpenOffice.org side fixed this in a way that seems more
robust to eventual future changes; you might want to push that way
into at least master (IMHO maybe not stable 3-3 branch, probably not
3-3-0).

OTOH, if that's the robust way, why is it not the idiom to get the
value *everywhere*? I mean, why not replace *all* the

  xProp->setPropertyValue(FOO,  uno::makeAny(static_cast<BAR*>(BAZ)->QUX()));

by

  static_cast<const BAR*>(BAZ)->QueryValue(aValue,QUUX);
  xProp->setPropertyValue(FOO,aValue);
instead of only for the left/right margin? At least for those BARs
where a QueryValue interface is available.
From c966ba973376470086d3edf0e75e0e81009f9937 Mon Sep 17 00:00:00 2001
From: Lionel Elie Mamane <lionel@mamane.lu>
Date: Fri, 21 Jan 2011 08:22:55 +0100
Subject: [PATCH] amend i#116187 (report left/right page margin setting ignored on Unix 64 bit)

---
 reportdesign/source/ui/report/ReportController.cxx |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/reportdesign/source/ui/report/ReportController.cxx 
b/reportdesign/source/ui/report/ReportController.cxx
index 0c4f5e0..46d39f4 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -2500,8 +2500,11 @@ void OReportController::openPageDialog(const 
uno::Reference<report::XSection>& _
 
                     if ( SFX_ITEM_SET == pSet->GetItemState( RPTUI_ID_LRSPACE,sal_True,&pItem))
                     {
-                        
xProp->setPropertyValue(PROPERTY_LEFTMARGIN,uno::makeAny((sal_Int32)static_cast<const 
SvxLRSpaceItem*>(pItem)->GetLeft()));
-                        
xProp->setPropertyValue(PROPERTY_RIGHTMARGIN,uno::makeAny((sal_Int32)static_cast<const 
SvxLRSpaceItem*>(pItem)->GetRight()));
+                        Any aValue;
+                        static_cast<const SvxLRSpaceItem*>(pItem)->QueryValue(aValue,MID_L_MARGIN);
+                        xProp->setPropertyValue(PROPERTY_LEFTMARGIN,aValue);
+                        static_cast<const SvxLRSpaceItem*>(pItem)->QueryValue(aValue,MID_R_MARGIN);
+                        xProp->setPropertyValue(PROPERTY_RIGHTMARGIN,aValue);
                     }
                     if ( SFX_ITEM_SET == pSet->GetItemState( RPTUI_ID_ULSPACE,sal_True,&pItem))
                     {
-- 
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.