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

Thorsten Behrens thb at openoffice.org
Fri Feb 26 03:02:10 PST 2010


Octavio Alvarez wrote:
> It changes the behavior of "Default formatting" option to
> NOT remove the attribute for character style. It will only
> remove directly applied format.
> 
> For those that would need to set all the marked text to
> "Default" style, they can still do it through F11 > Default.
> 
> See discussion in i#47893 and i#85464 and the corresponding
> duplicates.
> 
Hi Octavio,

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". A bit surprised by the
behaviour, and then noticed that both are internally hard-wired to
the FN_FORMAT_RESET you've fixed. So much for specs. ;)

> +--- sw/source/ui/shells/textsh1.cxx
> ++++ sw/source/ui/shells/textsh1.cxx
> +@@ -489,7 +489,6 @@ void SwTextShell::Execute(SfxRequest &rReq)
> +                 RES_CHRATR_CTL_LANGUAGE + 1, RES_CHRATR_END-1,
> +                 RES_PARATR_BEGIN, RES_PARATR_END-1,
> +                 RES_TXTATR_INETFMT, RES_TXTATR_INETFMT,
> +-                RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT,
> +                 RES_TXTATR_CJK_RUBY, RES_TXTATR_CJK_RUBY,
> +                 RES_TXTATR_UNKNOWN_CONTAINER, RES_TXTATR_UNKNOWN_CONTAINER,
> +                 RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
>
Skip the RES_TXTATR_INETFMT - RES_TXTATR_INETFMT range here, too?
Likely you don't want to clear hyperlink format as well.

Given the fact that there are two distinct ways to trigger
FN_FORMAT_RESET from the UI, would you consider it an acceptable
compromise to redirect _one_ of them to a different slot, with the
then-updated behaviour of yours?

Many thanks for the patch,

-- Thorsten
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/ooo-build/attachments/20100226/9053d030/attachment.pgp>


More information about the ooo-build mailing list