Issue 63017 - new chart: Format::Arrangement always visible in menu
Summary: new chart: Format::Arrangement always visible in menu
Status: CLOSED FIXED
Alias: None
Product: General
Classification: Code
Component: chart (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: kla
QA Contact: issues@graphics
URL:
Keywords: new_implementation
Depends on:
Blocks:
 
Reported: 2006-03-10 14:18 UTC by peter.junge
Modified: 2013-02-24 21:22 UTC (History)
6 users (show)

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


Attachments
Patch for the arrangement feature (52.85 KB, patch)
2006-08-09 15:52 UTC, pagalmes.lists
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description peter.junge 2006-03-10 14:18:11 UTC
new chart (in Inplace mode)
-> Format::Arrangement::* is always visible in menu even when it cannot be applied
Comment 1 peter.junge 2006-03-10 14:20:00 UTC
add keyword
Comment 2 IngridvdM 2006-03-11 12:51:35 UTC
accepted
Comment 3 IngridvdM 2006-03-22 11:32:15 UTC
changed issue type from defect to task to better reflect that this issue is only
a working issue for the chart reimplementation
Comment 4 bjoern.milcke 2006-03-27 12:11:27 UTC
Note: The menu items can only be executed when a series is selected, and the
selection is valid. Meaning: "Send Backwards" is only valid if series 1,..,n-1
is selected. "Bring Forward" is only valid if series 2,...,n is selected.

Note, that in the old chart implementation both items were only available when
being inside Calc. I don't know if this really makes sense, but we may ignore
that for the first start.
Comment 5 pagalmes.lists 2006-03-27 12:47:31 UTC
To add some comments about this feature :

At the moment, even when you just do not select any particular range, you can
access to the At the moment, even when you just do not select any particular
range, you can access to the Format::Arrangement::(Bring forward / Send Backward).

For example, if you double-click on the chart, you will have access to the menu
"Bring forward / Send Backward". This should not be the case, as you need to
select a particular column in order to that Arragment feature to make sense
the feature should be disabled ("in gray").

Now, we should establish when this features should be "in gray" and when they
should be enabled.

Should be choose the same behavior as in the current chart implementation ?

Do you think writing a spec about it would be a good idea ?
Comment 6 IngridvdM 2006-03-27 13:49:58 UTC
I don't think that we ned an own specification here. Instead the enableing and
disabling of this menu item should be described in the chart menu specification:
http://specs.openoffice.org/chart/menus/MenuStructure.odt
So we should change that spec if necessary.
Comment 7 IngridvdM 2006-03-27 14:32:22 UTC
The logic when a series can be moved and when not depends not only on the index
of the series. If a chart does contain multiple charttypes it is also important
whether neighboured  charttypes are compatible. The concrete logic is
implemented in the method:
DiagramHelper::moveSeries(). I strongly suggest to have only one implementation
of this logic. So it would be good to enhance this method by a paramter which
tells the method to indicate the possibility only or instead execute the move 
(bExecute for example). The return value than describes wheter a move is
possible or wether it was actually done dependent on that input parameter.
Comment 8 bjoern.milcke 2006-06-23 10:03:00 UTC
Changed target to 2.x
Comment 9 pagalmes.lists 2006-08-04 17:38:29 UTC
Notes :

The argument which is at the moment called "bIsWritable" is the
condition expressing if the menu "Backward/Forward" will be visible.

ControllerCommandDispatch::fireStatusEvent()
{
  [...]
  conditionalFireStatusEventForURL( C2U(".uno:Backward"), [...] , bIsWritable );
}

Hence, we need to add two booleans (bMayMoveSeriesForward and
MayMoveSeriesBackward) which will explicit if the series can be moved or not. 

Those booleans will be added to the "ModelState" structure (in the file
ControllerCommandDispatch.cxx). and will be updated when the function
ModelState::update() will be called.
Comment 10 pagalmes.lists 2006-08-09 10:16:54 UTC
In the class "ControllerCommandDispatch" :

A new structure "ControllerState" has been created. This structure is designed
to cache the state of the selected series : can a series be moved forward/backward.

The ControllerCommandDispatch now inherits from XSelectionChangeListener. This
means that when the selected series changes, the ControllerState will be updated.

In the class "DiagramHelper" :

The private method "lcl_moveSeriesOrCheckIfMoveIsAllowed()" has been added to
abstract the logic of testing that a series can/has to be moved.

This function is used by "DiagramHelper::moveSeries()" and
DiagramHelper::isSeriesMoveable().
Comment 11 pagalmes.lists 2006-08-09 15:52:19 UTC
Created attachment 38370 [details]
Patch for the arrangement feature
Comment 12 bjoern.milcke 2006-08-09 16:42:59 UTC
Added me for CC
Comment 13 IngridvdM 2006-08-10 10:21:29 UTC
->pagalmes: To you, as you are working on this already.
Comment 14 pagalmes.lists 2006-08-10 11:01:22 UTC
I will set this issue as fixed, even if the contextual menu (right-click)
Arrangement is not working at the moment.

The contextual menu issue is described as issue 68330.
Comment 15 IngridvdM 2006-12-13 16:59:46 UTC
@Thomas: Fixed in CWS chart2mst3 milestone10, please verify.
Comment 16 IngridvdM 2007-01-18 11:48:58 UTC
changed target to 2.3
Comment 17 kla 2007-03-13 15:39:09 UTC
verified follow up issue i 64495
Comment 18 andreschnabel 2007-07-17 19:16:02 UTC
ok in SRC680m220 -> closing