Issue 121791 - [sidebar]: migrate line property panel (W,C,I)
[sidebar]: migrate line property panel (W,C,I)
Status: RESOLVED FIXED
Product: General
Classification: Code
Component: ui
4.0.0-dev
All All
: P3 normal (vote)
: 4.0.0
Assigned To: Armin Le Grand
:
Depends on:
Blocks: [sidebar]
  Show dependency treegraph
 
Reported: 2013-02-19 09:36 UTC by jsc
Modified: 2013-07-11 13:56 UTC (History)
3 users (show)

See Also:
Issue Type: FEATURE
Latest Confirmation on: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description jsc 2013-02-19 09:36:52 UTC
migrate line property panel (W,C,I) 

svx/source/propertypanel/linepropertypage.cxx 

See also 
http://wiki.openoffice.org/wiki/Sidebar#Decks_and_content_panels
Comment 1 Armin Le Grand 2013-02-25 14:14:47 UTC
ALG: Taking over...
Comment 2 Armin Le Grand 2013-02-25 15:23:40 UTC
ALG: Initial migration done. Missing slots for line transparence (SID_ATTR_LINE_TRANSPARENCE). Also: 
- Popups for line width and line color crash the office.
- LineCaps corner and caps style missing (was not in Symphony, probably slots missing, too)
Comment 3 Armin Le Grand 2013-02-26 17:29:23 UTC
ALG: SID_ATTR_LINE_TRANSPARENCE works as expected, usable now. Popups still crashing.
Started implementing EdgeStyle and CapStyle ListBoxes, added slots for this (SID_ATTR_LINE_JOINT, SID_ATTR_LINE_CAP). Adapted ressources, Implemented NotifyItemUpdate, added link handlers for setting these, works well.
Loked at the slots for SID_ATTR_LINE_START/SID_ATTR_LINE_END, these get only called on initialisation, but no more when e.g. having two lines in SW with different LineStart/End. Looking why this happens
Comment 4 Armin Le Grand 2013-02-26 17:30:17 UTC
ALG: Found SwWrtShell::DrawSelChanged where slots get invalidated when draw selection changes. Added all slots from the panels, but still, the LineStart/End gets not triggered. Looking further...
Comment 5 Armin Le Grand 2013-02-27 08:42:42 UTC
ALG: Tried to sort the slot entries in the order they get constructed as ::sfx2::sidebar::ControllerItem to exclude that this may block the slot mechanism, did not help. Looking for more spaces triggering slot changes directly in applications...
Comment 6 Armin Le Grand 2013-02-27 09:00:18 UTC
ALG: Maybe I found the reason; while in AOO only a slot SID_ATTR_LINEEND_STYLE exists (see svx.sdi) which somehow 'groups' SID_ATTR_LINE_START, SID_ATTR_LINE_END, SID_ATTR_LINE_STARTWIDTH and SID_ATTR_LINE_ENDWIDTH, Symphony *has* single slots for these four items.
I already tried to react on triggers of the 'group' slot SID_ATTR_LINE_ENDWIDTH, but it gets not triggered at all.
Trying to add individual slots additionally (as in Symphony)
Comment 7 Armin Le Grand 2013-02-27 12:16:48 UTC
ALG: It's strange; in the executors of the LinePropertyPanel (e.g. ChangeStartHdl) the 'group' slot SID_ATTR_LINEEND_STYLE is triggered to execute the change, but that slot gets *not* triggered when one of the 'group' members changes, so no call to LinePropertyPanel::NotifyItemUpdate is done with the slot id SID_ATTR_LINEEND_STYLE. This may be an error in the sfx implementation (it *should* trigger a 'group' slot when members get changed, shouldn't it?). To get this working, I will now try to add SID_ATTR_LINE_START/SID_ATTR_LINE_END slots directly to the svx slot definitions and to all application slot definitions (also strage that this has to be done in every application).
Comment 8 Ariel Constenla-Haile 2013-02-27 12:53:06 UTC
(In reply to comment #7)
> ALG: It's strange; in the executors of the LinePropertyPanel (e.g.
> ChangeStartHdl) the 'group' slot SID_ATTR_LINEEND_STYLE is triggered to
> execute the change, but that slot gets *not* triggered when one of the
> 'group' members changes, so no call to LinePropertyPanel::NotifyItemUpdate
> is done with the slot id SID_ATTR_LINEEND_STYLE. This may be an error in the
> sfx implementation (it *should* trigger a 'group' slot when members get
> changed, shouldn't it?). To get this working, I will now try to add
> SID_ATTR_LINE_START/SID_ATTR_LINE_END slots directly to the svx slot
> definitions and to all application slot definitions (also strage that this
> has to be done in every application).

Note that in the current implementation these are the slot arguments.
http://opengrok.adfinis-sygroup.org/source/xref/aoo-trunk/main/svx/sdi/svx.sdi#7177

SfxBoolItem LineEndStyle SID_ATTR_LINEEND_STYLE
((XLineStartItem LineStart SID_ATTR_LINE_START,XLineEndItem LineEnd SID_ATTR_LINE_END,SfxUInt32Item StartWidth SID_ATTR_LINE_STARTWIDTH,SfxUInt32Item EndWidth SID_ATTR_LINE_ENDWIDTH)

Translated to the new UNO command implementation, you have only the .uno:LineEndStyle command, and SID_ATTR_LINE_START and SID_ATTR_LINE_END are arguments when you dispatch this command, you put them in the arguments sequence, where the name is "LineStart" and "LineEnd", respective.

This also means that there are no status updates for these, because they are simply arguments of the command .uno:LineEndStyle.

All this is explained in http://wiki.openoffice.org/wiki/Framework/Article/Implementation_of_the_Dispatch_API_In_SFX2

This means you will have to define new slots/UNO Commands if you want to get status updates for these, and dispatch them. The definition can be done globally in svx, but in the interface definition of each sfx2 based module you have to define the methods in the interface of the respective shell responsible for getting the state and executing/dispatching the command/slot.

You can get the example of SID_ATTR_LINEEND_STYLE, that is defined globally in svx; in the modules you have the definition of the methods in the shell interface.

There is a sort of slot "group" with the feature of master-slave slots, but this is a different thing. You can see this relation for example in

master command:
".uno:ArrowShapes"

slave commands:
".uno:ArrowShapes.chevron"
".uno:ArrowShapes.circular-arrow"
".uno:ArrowShapes.corner-right-arrow"
...

Only the master command has a slot definition; when the application requests a state update from one of the slaves or tries to dispatch it, this is handled by the master (see code in sfx2/source/control/bindings.cxx and SfxOfficeDispatch::IsMasterUnoCommand in sfx2/source/control/unoctitm.cxx)
Comment 9 Armin Le Grand 2013-02-27 14:23:28 UTC
ALG: Hi Ariel, thanks for this valuable comments. I ended up exactly with the consequences you describe and I'm about definining the needed slots. It shows that these were never used (up  to now) in any UI desktop element, thus not needed. Let's see how this works out...
Comment 10 Armin Le Grand 2013-02-27 15:40:16 UTC
ALG: The slots SID_ATTR_LINE_START/SID_ATTR_LINE_END get called now seen from SW on object selection, but not on changing object selection (tab). This may have to do with SwWrtShell::DrawSelChanged where I already trigger these slots. Hmmm..
Comment 11 Armin Le Grand 2013-02-27 15:43:44 UTC
ALG: In Draw/Impress changing object with TAB works well, slots get triggered as needed. Calc behaves like Writer. Somehow the slot definitions in the modules seem still to be different (need to check)
Comment 12 Armin Le Grand 2013-03-20 15:57:04 UTC
ALG: Checked LinePropertyPanel, looks pretty good.
Comment 13 SVN Robot 2013-04-03 15:11:55 UTC
"alg" committed SVN revision 1464066 into branches/sidebar:
i121791 Simplified LineStartEnd ListBox preparation, fixed handling of pState...
Comment 14 SVN Robot 2013-04-03 15:12:43 UTC
"alg" committed SVN revision 1464067 into branches/sidebar:
i121791 Comments removed
Comment 15 Armin Le Grand 2013-04-05 09:42:35 UTC
ALG: Looking for the LineStyle/LineDash DropDown box, currently does not use the preset/user defined line dashes. This is bad, it should use these. By looking at these I found the double definitions of XPropertyTable/XPropertyList and it's derivates (e.g. XColorTable/XColorList, but also for XLineEnd, XDash, XHatch, XGradient and XBitmap). Checking if this could be cleaned up/simplified, including UI bitmap creations...
Comment 16 Armin Le Grand 2013-04-05 14:11:56 UTC
ALG: Looks good now, doing code cleanups...
Comment 17 Armin Le Grand 2013-04-05 16:15:09 UTC
ALG: Okay, done. Comitted as r1465024.
Comment 18 SVN Robot 2013-04-05 16:21:04 UTC
"alg" committed SVN revision 1465024 into branches/sidebar:
i121791 Unified usage of LineStyle ListBox, unified XPropertyList/XPropertyTa...
Comment 19 Armin Le Grand 2013-04-05 18:33:18 UTC
ALG:_ Linux test build done, looks good.
Comment 20 SVN Robot 2013-04-10 16:51:46 UTC
"alg" committed SVN revision 1466561 into trunk:
i121791 Enhanced look of the LineStyle previews
Comment 21 Armin Le Grand 2013-04-11 12:40:11 UTC
ALG: Saw that when changing LineStyle (dash) with the panel, the toolbar dies not always update. Checking. Also there are unnecessary ressources from this panel in the master which I had already removed on the branch.
Comment 22 SVN Robot 2013-04-11 14:10:55 UTC
"alg" committed SVN revision 1466893 into trunk:
i121791 Corrected names for LineDashes, cleaned up resources
Comment 23 SVN Robot 2013-04-11 14:10:56 UTC
"alg" committed SVN revision 1466894 into trunk:
i121791 Corrected names for LineDashes, cleaned up resources
Comment 24 SVN Robot 2013-04-11 14:11:46 UTC
"alg" committed SVN revision 1466899 into trunk:
i121791 Corrected names for LineDashes, cleaned up resources