Issue 120420

Summary: Drawing Visible Area is wrong
Product: App Dev Reporter: gamp-ba <huh.frey>
Component: apiAssignee: AOO issues mailing list <issues>
Status: UNCONFIRMED --- QA Contact:
Severity: Normal    
Priority: P3 CC: issues
Version: 3.3.0 or older (OOo)   
Target Milestone: ---   
Hardware: PC   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

Description gamp-ba 2012-07-31 15:02:26 UTC
The problem:
I start a drawing with a default drawing. Format A4, margins top, bottom, left, right with values 1,0 cm.
To see the problem easyly I create a square size width and height of five, position X/Y at 5.0 and 5.0
Then I set the zoom to 150% and move the square to the top left position.
With Xray-tool I check the visible area in a Makro

Sub MainVisiblearea 
oContr = ThisComponent.CurrentController 
xray ocontr 
End Sub 

The visible area now should be in X/Y at about 5,0 (a bit less, because the square can completely be seen.
BUT it is about 5.9 !!!! and this is WRONG

Pay attention: the drawing with the square is only an example to quickliy check my  problem, in principle it has nothing to do with the error.

The error disappears, when I set the margins instead of  the default values of 1,0 cm to zero (and only, if I set it to zero. Using an other margin greater then zero leads to another wrong visible area. I THINK, the problem is, that the wrong visiblearea values (X/Y) correspond directly with the MARGINS!

I reported this problem to the open office forum. they found out, that the visiblearea is wrong with default values for the margin. see there my discussion about  "VisibleArea seems to be wrong in Draw Makro" from sun, july 29. 2012 under  http://www.oooforum.org/forum/viewtopic.phtml?p=510359#510359

You see, I can work with this problem, using a specific template for my drawing. But it is a bug and it took me nearly a week to check and understand the problem. I hope, nobody else gets crazy about the same topic, so I report it.

I think, in the code for the visible area the MARGIN (top and left) is added to the  "correct" starting point of the visibleaerea, and thats wrong

Backgroung for my situation. I tried to get the mousecoordinates of a selection and compute it to the papercoordinates. (papercoordinates are always correct in the status bar! )
Problem occurs in LibreOffice 3.3.1 and in Open Office 3.3 ! So, it is inherited from OpenOffice Code