[ooo-build] [PATCH] sw: preserve character style on 'reset format'

Cédric Bosdonnat cbosdonnat at novell.com
Mon Mar 1 04:52:00 PST 2010


Hi Octavio, Thorsten,

On Sun, 2010-02-28 at 09:21 -0800, Octavio Alvarez wrote:
> > wow, the spec linked from i85464 is an abomination - tried to make
> > some sense from it, then gave up & reverted to just playing with
> > Format->Default & "Clear Formatting".
> 
> And to make it worse, there is also a "Remove Direct Character
> Formats", not shown in the Format menu by default. This command
> does not do anything, as far as I could tell.

Waooh... I'm impressed by this spec: how is that understandable?

> > Skip the RES_TXTATR_INETFMT - RES_TXTATR_INETFMT range here, too?
> > Likely you don't want to clear hyperlink format as well.
> 
> That _would_ be the best to do, as Hyperlink is not a format,
> but an attribute (or a property) with a format (from the user
> POV).
> 
> The problem is that it would leave users with no way
> of removing all hyperlinks from a document, other than
> removing them individually.
> 
> I don't know yet how to create a patch that fixes OO.o
>  from not showing the "Remove hyperlink" option in the context
> menu when more text than a single hyperlink is selected.
> 
> I'd rather leave that for another patch.

But that's one of the most interesting possibilities for the users... If
we leave the hyperlinks in FN_FORMAT_RESET, then we would need to
provide such a feature.

Here is the place to hack to change whether to show that menu item or
not: sw/source/ui/shells/textsh1.cxx line #1540. Search for
FN_REMOVE_HYPERLINK in that file to find the place where the action is
implemented, to make it remove several links.

> I'd rather see it as a severe clean up that is needed in this area.
> 
> "Clear formatting" should be an equivalent of "Clear directly
> applied PARAGRAPH formatting" only, because it appears on a list
> that only allows you to choose paragraph styles. I don't know
> if this command exists, though.
> 
> It would imply creating a "Remove Direct X Formats", where X
> is {"Paragraph", "Frame", "Page", "List"}.

Hum... I don't really understand what you want to do (from the UI point
of view). IMHO the UI of this "Default formatting" stuff has to remain
really simple.

Regards,

--
Cedric




More information about the ooo-build mailing list