[Libreoffice-ux-advise] [Bug 115418] Apply character style on markdown-like auto-correction ( e.g. *bold*)

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Wed Feb 28 19:52:38 UTC 2018


https://bugs.documentfoundation.org/show_bug.cgi?id=115418

V Stuart Foote <vstuart.foote at utsa.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vstuart.foote at utsa.edu

--- Comment #11 from V Stuart Foote <vstuart.foote at utsa.edu> ---
Believe the autocorrect mechanism can be adjusted to apply either DF as now, or
alternatively a Character "Style" set by user preference. But here the DF
should probably remain the default.

With Tiago S's addition of markup for Italic and Strikethrough in 2016 [1],
there are now four LO edit engine "autocorrect characters" [2] that when used
in start/end pairs will apply direct text formatting, when that autocorrect
feature is set enabled [3][4]. 

That is the FnChgWeightUnderl autocorrect is active by default now and assigns
"*", "/", "-", "_" markup these character attribute formats respectively [5]:

"*" pair => ( WEIGHT_BOLD, SID_ATTR_CHAR_WEIGHT )
"/" pair => ( ITALIC_NORMAL, SID_ATTR_CHAR_POSTURE )
"-" pair => ( STRIKEOUT_SINGLE, SID_ATTR_CHAR_STRIKEOUT )
"_" pair => ( LINESTYLE_SINGLE, SID_ATTR_CHAR_UNDERLINE )

While "Emphasis" and "Strong Emphasis" character styles exist and could now be
used and adjusted as needed, currently there are no matching character styles
defined suitable to take a Strikethrough or Underline markup. Those would
reqire new styles be defined and added to default templates.


=-ref-=
[1] https://gerrit.libreoffice.org/31076

[2]
https://opengrok.libreoffice.org/xref/core/editeng/source/misc/svxacorr.cxx#249

[3] Tools -> AutoCorrect -> Autocorrect Options -> Options tab: checkbox [M][T]
for "Automatic *bold*, /italic/, -strikeout- and _underline_" (controlling
RID_SVXSTR_BOLD_UNDER and ChgWeightUnderl)

[4]
https://opengrok.libreoffice.org/xref/core/editeng/source/misc/svxacorr.cxx#1315

[5]
https://opengrok.libreoffice.org/xref/core/editeng/source/misc/svxacorr.cxx#733

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Libreoffice-ux-advise mailing list