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 <lio...@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
_______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice