Hi Andre,

comments inside

Andre Fischer schrieb:
On 12.05.2013 18:47, Regina Henschel wrote:
Hi Ariel,

again an excellent answer by you. You are often a great help to me.

Ariel Constenla-Haile schrieb:
Hi Regina,

On Sat, May 11, 2013 at 03:15:43PM +0200, Regina Henschel wrote:
Hi,

Look at the character background icon in the text section of the
sidebar.
It has the command .uno:CharacterBackgroundPattern

1. Why has this command been introduced? There exists already
.uno:Backcolor

The slot/command was there since 2002
http://hg.services.openoffice.org/OOO340/rev/8dc02b58193f (at least in
that file)

I also see that for the Font Color the sidebar uses ".uno:Color", while
the toolbar has ".uno:FontColor".

The text edit toolbar has the command .uno:Color in Impress, so there
the command in the toolbar and in the sidepane is the same.

Currently both font commands have the same help text, although they
behave different. The help in Impress is not exactly fitting. I think,
the help texts have to be divided. The texts are in
main\helpcontent2\source\text\shared\01\05020200.xhp.

I skip the explanation of the dispatcher here. I have learned a lot.
[..]


Back to this case, I've no idea why the sidebar uses a SvxBrushItem,
this items allows to set a background color or a background graphic, but
AFAIK background graphic is implemented for paragraph, not for (a set
of) characters in a paragraph (Format - Character - Background offers
only color).

We might hear a reason from the developers who implemented it.

I have not implemented the original Symphony panel and have only done
very little work on its migration to AOO, but maybe I can make an
educated guess.  What I have done is to add the UNO command name to the
ControllerItem for the SID_ATTR_BRUSH_CHAR slot.  I had been wondering
about the unexpected name (I had expected something like
.uno:BackgroundColor) but it worked and there was so many other things
to do that I did not follow this any further.

In the toolbar it is .uno:BackColor. The command .uno:BackgroundColor belongs to the paragraph background.


One reason for this command my be the issue that Ariel dug up.  An
additional explanation is that the Symphony panels where probably
implemented in a hurry.  They don't use the most straightforward
techniques for their controls.  Everything is hand coded and does not
use any Toolbox controllers that already provide most of the
functionality of the property panels.  See issue 121960
(https://issues.apache.org/ooo/show_bug.cgi?id=121960) for problems
caused by this and svx/source/sidebar/insert/InsertPropertyPanel.cxx for
how this could be done a little better.

So, I think that the main reason as one of pragmatism: the
SID_ATTR_BRUSH_CHAR worked as it should, so why spend more time on
searching for a more elegant solution?

Maybe we can do that now.



3. The icon in the sidebar behaves different from the corresponding
icon in the 'Formatting' toolbar. Especially it does not remember
the last color and it has no 'can' modus. Is that intended?

The toolbar button has this problem, right?  The sidebar highlight color
drop down shows the current color.

What is the 'can' modus?

'Gießkannen-Modus'

With the icon in the toolbar (tooltip 'Highlighting', command '.uno:BackColor') in Writer do this:
1. Set the cursor into a paragraph without selecting something.
2. Click on the icon. The cursor changes to a watering can.
3. Drag over a portion of text. The text gets that background color, which is actually shown on the icon.
4. Finish with Esc-key or single click on the icon.

Or
1. see above
2. Open the color palette with the black triangle and click on a color. The cursor changes to a watering can.
3.4. see above

This corresponds to the help text, "If no text is selected, click the Highlighting icon, select the text that you want to highlight, and then click the Highlighting icon again." (in /text/shared/02/02160000.xhp)

The icon '.uno:BackColor' remembers the chosen color.

Now with the icon in the sidebar panel (tooltip 'Highlight Color', command '.uno:CharacterBackgroundPattern')

1. see above
2. Open the color palette and click on a color. The word in which the cursor has been set, gets this color as background.
3. no need for Esc-key. The command finishes itself immediately.

Notice, that this icon do not remember the chosen color, but always shows the color at the actual cursor position.

The icon '.uno:CharacterBackgroundPattern' has no help text and is not available in the customize dialog in Writer.

The modules Draw, Impress, Calc have no objects, where a character background can be set. Therefore this problem does not exists there.



There is a bug pointing to the incongruent behaviour of the color
related toolbar icons across the different modules
https://issues.apache.org/ooo/show_bug.cgi?id=10864

It might help, to use different icons for the different commands.

The commands may be different, but the behavior should be the same. If
we change this, then we should change the command/slot to what is used
in the toolbar.

The behavior is not the same, see above.

The same difference in behavior exists for the font color, with the following additional problems: 1. In the toolbar in Writer the icon '.uno:FontColor' is used, which behaves as '.uno:BackColor', with can-mode and color remembering. In Draw/Impress/Calc only command '.uno:Color' is available, which behaves as '.uno:CharacterBackgroundPattern' with no can-mode, no color remembering but immediately action on whole word. 2. Both commands are mapped to the same help text, although they behave different.




To this incongruence, it has to be added that now the toolbar item popup
a floating window, while the items in sidebar do it different.

I don't see this as a big problem.  But I don't like any of the two
versions.  I think they should be replaced by a third that is currently
used for example by the 'shape toolbar'.  The drop down menus for
selecting shapes to insert into the document look mostly like standard
drop down menus but have a small control for detaching them from the
toolbar.

You mean what is called "toolbox" in the commands, in contrast to the "floating window" of OOo1.1? Will such change happen for version 4.0?

I'm currently working on the help and therefore come across these problems.

Kind regards
Regina



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

Reply via email to