Issue 106183 - data labels in pie charts cannot be selected anymore
Summary: data labels in pie charts cannot be selected anymore
Alias: None
Product: Draw
Classification: Application
Component: ui (show other issues)
Version: OOo 1.0.0
Hardware: All All
: P3 Trivial (vote)
Target Milestone: OOo 3.2
Assignee: wolframgarten
QA Contact: issues@graphics
Keywords: regression
Depends on:
Blocks: 99999
  Show dependency tree
Reported: 2009-10-22 10:48 UTC by IngridvdM
Modified: 2017-05-20 10:29 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---

example document to reproduce the problem (22.37 KB, application/vnd.oasis.opendocument.spreadsheet)
2009-10-22 10:50 UTC, IngridvdM
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description IngridvdM 2009-10-22 10:48:08 UTC
Create a pie chart with labels or load the attached document. With the mouse
left click on a  data point label text shape. The labels should be selected but
instead the whole chart is selected wrongly.
Comment 1 IngridvdM 2009-10-22 10:50:10 UTC
Created attachment 65532 [details]
example document to reproduce the problem
Comment 2 IngridvdM 2009-10-22 10:52:41 UTC
This is broken by CWS aw065.
The hit test does not return the correct object.
Seems to have something to do with not up to date bounding rects of group objects.
Comment 3 IngridvdM 2009-10-22 12:43:53 UTC
IHA->AW: Is there a chance to get this fixed for OOo3.2?
Comment 4 Armin Le Grand 2009-10-23 18:10:04 UTC
AW: Evaluating what happens. It would be useful to know what kind of objects is
used for those texts, and if the same kind is used for other charts (where it
works). Getting chart2 with debug...
Comment 5 IngridvdM 2009-10-25 19:57:35 UTC
IHA->AW: The labels are normal text shapes created via service But they are contained within a group shape.
This group shape seems to cause the problems. During the hit test within svx the
object hierarchy is traveled. The mentioned group shape has a negative size and
is skipped. So the text shapes are never tested for the hit.
It makes sense to set a breakpoint into ChartController::execute_MouseButtonDown
and then activate the break point within SdrView::PickObj afterwards. Because
for each mouse move PickObj is called twice - once for the mouse pointer and
once for the tip help. 
Comment 6 Armin Le Grand 2009-10-26 12:11:56 UTC
AW->IHA: Thanks for the helpful information.
AW: Looks like a refresh problem with buffered data at SdrObjList in
Drawinglayer which is a very central, but also very old part. After some
debugging (MANY groups, hierarchies with 4-5 group-in-group depth) i checked the
SdrObjList::GetAllObjBoundRect call and the bRectsDirty flag. Setting it to
dirty by hand for aOutRect's with negative size makes the labels work. This
shows that there are circumstances where this flag is NOT correctly handled (not
Aftre some code reading i guess it's in SdrObjList::NbcInsertObject where the
aOutRect is expanded by the range of the new object, but this cange is NOT
propagated to the parents. Adding a reaction on existing pUpList-list...
PS: Even when this works it's too dangerous to add this to a 3.2; the SdrObjList
is the central class for Page and Group handling and a lot of old code works on
Comment 7 IngridvdM 2009-10-26 13:17:04 UTC
IHA->AW: Thanks for the evaluation! Is it maybe possible to only change the
behavior of SdrView::PickObj to avoid greater risks?  SdrView::PickObj could
maybe check the children of group shapes with negative sizes in addtion as long
as the sizes of group shapes are not reliable..
Comment 8 Armin Le Grand 2009-10-27 13:04:24 UTC
AW->IHA: First i had to evaluate deeper what exactly goes wrong...
A small patch which will fix this and should not be too dangerous is:

--- a/svx/source/svdraw/svdpage.cxx     Thu Oct 22 17:29:01 2009 +0200
+++ b/svx/source/svdraw/svdpage.cxx     Tue Oct 27 12:55:28 2009 +0100
@@ -671,7 +671,8 @@
 const Rectangle& SdrObjList::GetAllObjBoundRect() const
-       if (bRectsDirty) {
+       if (bRectsDirty || aOutRect.IsEmpty()) 
+    {

You may check this and also decide if You want to add this to a current or
OOo3.2 CWS.
Comment 9 IngridvdM 2009-10-27 14:31:12 UTC
IHA->AW: Great, that a fix exsist! :-) I tested it in my local build (dev300m60)
and it works fine. I really think the fix for this regression should go into OOo
3.2 as wrongly calculated bound rects of group shapes can have much further bad
impact on the charts layout.
As I am on vacation starting tomorrow I would like to ask you to take over for
the integration of the fix. Thanks a lot! 
Comment 10 Armin Le Grand 2009-10-28 14:24:29 UTC
AW: Adding task and fix to ooo32gsl03...
Comment 11 Armin Le Grand 2009-10-28 17:06:12 UTC
AW: Fix added to CWS ooo32gsl03, checked in, built, done.
Comment 12 Armin Le Grand 2009-11-05 14:39:16 UTC
AW: Checked in ooo32gsl03 build, works as expected.
AW->WG: Please verify.
Comment 13 wolframgarten 2009-11-09 13:56:59 UTC
Verified in CWS.