[dba-issues] [Issue 116187] RPT: Page margin setting ignored

2011-01-14 Thread lmamane
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=116187


User lmamane changed the following:

What|Old value |New value

  Status|CLOSED|UNCONFIRMED

Platform|All   |Opteron/x86_64

  Resolution|WORKSFORME|





--- Additional comments from lmam...@openoffice.org Sat Jan 15 04:32:00 
+ 2011 ---
r4zoli, I bet you tried on a 32-bit architecture machine. Because I nailed down
this bug, and it only happens on 64-bit architectures (and not Microsoft 
Windows).

The problem is in this line in ReportController.cxx:
   
xProp-setPropertyValue(PROPERTY_LEFTMARGIN,uno::makeAny((sal_Int32)static_castconst
SvxLRSpaceItem*(pItem)-GetLeft()));

SvxLRSpaceItem*-GetLeft() returns a C/C++ long (from lrspitem.hxx):

longnLeftMargin;// nLeft oder der neg. Erstzeileneinzug
(...)
inline long GetLeft()  const { return nLeftMargin; }

On a 32-bit machine, this is a 32-bit value, so a long in uno terms, and all
goes well.

But on a 64-bit machine, with a debug build, you get on stderr:

Error: caught an exception!
in function:void rptui::OReportController::openPageDialog(const
com::sun::star::uno::Referencecom::sun::star::report::XSection)
type: com.sun.star.lang.IllegalArgumentException
message: The given value cannot be converted to the required property type.
(property name LeftMargin, found value type hyper, required property type
long)

That's because a C/C++ long is 64 bits, thus a hyper in uno terms...
setPropertyValue refuses to downgrade the hyper (64 bits) to a long (32 bits),
even when the actual value being presented would fit. Thus exception is raised,
the whole try block is broken, and everything that is below that line (like
saving the user-set top/bottom margin values) is not done.

The same for Right margin. You won't get this bug in Microsoft Windows, because
there, even in a 64-bit environment, a long is still 32 bits.


By contrast, in the lines just below:

xProp-setPropertyValue(PROPERTY_TOPMARGIN,uno::makeAny(static_castconst
SvxULSpaceItem*(pItem)-GetUpper()));
xProp-setPropertyValue(PROPERTY_BOTTOMMARGIN,uno::makeAny(static_castconst
SvxULSpaceItem*(pItem)-GetLower()));


GetUpper and GetLower are C/C++ USHORT, and hence fit in a uno long without
problem. As they are expressed in hundreths of millimeters, this also tells us
they wrap around at 65.535 cm (well, as the UI rounds at tenths of millimeters,
let's say 65.53cm)... In other words, one can't set margins bigger than that.
(One can set paper size up to 3m*3m.)


The attached patch closes the hole to fix the user-visible bug in an immediate
way, but possibly the best way to fix this is to change SvxLRSpaceItem to not
use C/C++ long, but a type of fixed length, or fix setPropertyValue to accept
values that come in a type that is too big, but fit in the type that it wants,
or possibly something else altogether.


-
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

-
To unsubscribe, e-mail: issues-unsubscr...@dba.openoffice.org
For additional commands, e-mail: issues-h...@dba.openoffice.org


-
To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org
For additional commands, e-mail: allbugs-h...@openoffice.org



[dba-issues] [Issue 116187] RPT: Page margin setting ignored

2011-01-14 Thread lmamane
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=116187


User lmamane changed the following:

What|Old value |New value

 Attachment is patch|  |Created an attachment (id=
|  |75567)
stop-gap patch






--- Additional comments from lmam...@openoffice.org Sat Jan 15 04:32:50 
+ 2011 ---
Created an attachment (id=75567)
stop-gap patch


-
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

-
To unsubscribe, e-mail: issues-unsubscr...@dba.openoffice.org
For additional commands, e-mail: issues-h...@dba.openoffice.org


-
To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org
For additional commands, e-mail: allbugs-h...@openoffice.org



[dba-issues] [Issue 116187] RPT: Page margin setting ignored

2010-12-20 Thread lmamane
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=116187


User lmamane changed the following:

What|Old value |New value

 Summary|Page margin setting ignore|RPT: Page margin setting i
|d |gnored





--- Additional comments from lmam...@openoffice.org Mon Dec 20 16:26:14 
+ 2010 ---
If I change (directly in the file) fo:margin-bottom to 0.5cm, but *not* the 
fo:margin-top, then the GUI 
interface lets me change *both* the top and bottom margin successfully, but 
still not the left/right 
margin.

Even further testing shows that if I change _only_ the top/bottom margins in 
the GUI, then that setting 
sticks. But if I change the left or right margin, then the new setting of *all* 
margins is lost, even the 
setting of top/bottom.

-
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

-
To unsubscribe, e-mail: issues-unsubscr...@dba.openoffice.org
For additional commands, e-mail: issues-h...@dba.openoffice.org


-
To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org
For additional commands, e-mail: allbugs-h...@openoffice.org



[dba-issues] [Issue 116187] RPT: Page margin setting ignored

2010-12-20 Thread r4zoli
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=116187


User r4zoli changed the following:

What|Old value |New value

  Status|UNCONFIRMED   |RESOLVED

  Resolution|  |WORKSFORME





--- Additional comments from r4z...@openoffice.org Tue Dec 21 07:37:22 
+ 2010 ---
I checked in ubuntu 10.10 with OOo 3.2.1 with ubuntu report builder 1.2.1
(similar to debian packaged), OOo 3.3RC with Oracle source 1.2.1 and I can set
all margins to 1cm, and this settings retained after saving report. The finished
report all margins are 1cm.
I set this issue as works for me. 
Submit your problem to debian bugreport.

-
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

-
To unsubscribe, e-mail: issues-unsubscr...@dba.openoffice.org
For additional commands, e-mail: issues-h...@dba.openoffice.org


-
To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org
For additional commands, e-mail: allbugs-h...@openoffice.org



[dba-issues] [Issue 116187] RPT: Page margin setting ignored

2010-12-20 Thread r4zoli
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=116187


User r4zoli changed the following:

What|Old value |New value

  Status|RESOLVED  |CLOSED





--- Additional comments from r4z...@openoffice.org Tue Dec 21 07:37:57 
+ 2010 ---
Worksforme-Closing.

-
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

-
To unsubscribe, e-mail: issues-unsubscr...@dba.openoffice.org
For additional commands, e-mail: issues-h...@dba.openoffice.org


-
To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org
For additional commands, e-mail: allbugs-h...@openoffice.org