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

Octavio Alvarez alvarezp at alvarezp.ods.org
Tue Mar 2 22:03:05 PST 2010


It changes the behavior of "Default formatting" option to
NOT remove the attribute for character style. It will only
remove directly applied format.

It will also NOT remove hyperlinks anymore.

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.

* patches/dev300/apply:
* patches/dev300/sw-preserve-char-style-on-reset-format.diff:
  sw/source/ui/shells/textsh1.cxx:
    in func void SwTextShell::Execute(SfxRequest &rReq)
      in case FN_FORMAT_RESET

Signed-off-by: Octavio Alvarez <alvarezp at alvarezp.ods.org>
---
 patches/dev300/apply                               |    3 +++
 .../sw-preserve-char-style-on-reset-format.diff    |   13 +++++++++++++
 2 files changed, 16 insertions(+), 0 deletions(-)
 create mode 100644 patches/dev300/sw-preserve-char-style-on-reset-format.diff

diff --git a/patches/dev300/apply b/patches/dev300/apply
index ef37ed1..665fda0 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -652,7 +652,10 @@ sw-uno-fix.diff, i#108426, cbosdo
 sw-num-fix.diff, n#569266, cbosdo
 
 # Added by Octavio Alvarez <alvarezp at alvarezp.ods.org>
+# The first patch is to prevent losing functionality because
+# of the second patch.
 sw-show-Remove-Hyperlink-even-with-selection.diff, alvarezp2000
+sw-preserve-char-style-on-reset-format.diff, i#47893, alvarezp2000
 
 # Refresh the cell formatting after pasting in it
 sw-paste-table.diff, n#564789, cbosdo
diff --git a/patches/dev300/sw-preserve-char-style-on-reset-format.diff b/patches/dev300/sw-preserve-char-style-on-reset-format.diff
new file mode 100644
index 0000000..dbbbfda
--- /dev/null
+++ b/patches/dev300/sw-preserve-char-style-on-reset-format.diff
@@ -0,0 +1,13 @@
+diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx
+index 570d561..a1d5783 100644
+--- a/sw/source/ui/shells/textsh1.cxx
++++ b/sw/source/ui/shells/textsh1.cxx
+@@ -488,8 +488,6 @@ void SwTextShell::Execute(SfxRequest &rReq)
+                 RES_CHRATR_CJK_LANGUAGE + 1, RES_CHRATR_CTL_LANGUAGE - 1,
+                 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,
-- 
1.7.0



More information about the ooo-build mailing list