[ooo-build-commit] .: 2 commits - patches/dev300

Cédric Bosdonnat cbosdo at kemper.freedesktop.org
Thu Mar 4 02:52:01 PST 2010


 patches/dev300/apply                                             |    6 +
 patches/dev300/sw-preserve-char-style-on-reset-format.diff       |   13 +++
 patches/dev300/sw-show-Remove-Hyperlink-even-with-selection.diff |   33 ++++++++++
 3 files changed, 52 insertions(+)

New commits:
commit 197809decd870fc7ec50ffa97bca4f3a0c3ea818
Author: Octavio Alvarez <alvarezp at alvarezp.ods.org>
Date:   Wed Mar 3 09:41:08 2010 -0800

    sw: preserve character style on 'reset format'
    
    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. People should
    use the Remove Hyperlink command.
    
    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>

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 75b722c..b889f77 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -658,7 +658,10 @@ sw-uno-fix.diff, i#108426, cbosdo
 
 [ WriterFixes ]
 # 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..2894044
--- /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
+--- sw/source/ui/shells/textsh1.cxx
++++ 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,
commit e01a6b323311c0896813a0973721d22c551a595e
Author: Octavio Alvarez <alvarezp at alvarezp.ods.org>
Date:   Wed Mar 3 09:41:07 2010 -0800

    sw: show 'Remove Hyperlink' even with selection
    
    Currently, the 'Remove Hyperlink' context menu is only shown
    when directly clicking a hyperlink. However, it should be
    shown also when selecting any text that contains one or more
    hyperlinks.
    
    * patches/dev300/apply:
    * patches/dev300/sw-show-Remove-Hyperlink-even-with-selection.diff:
       in func: SwTextShell::GetState(...)
          it separates case FN_REMOVE_HYPERLINK.
    
    Signed-off-by: Octavio Alvarez <alvarezp at alvarezp.ods.org>

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 5e8249a..75b722c 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -657,6 +657,9 @@ sw-ww8-field-fix.diff, i#61075, i#89667, cbosdo
 sw-uno-fix.diff, i#108426, cbosdo
 
 [ WriterFixes ]
+# Added by Octavio Alvarez <alvarezp at alvarezp.ods.org>
+sw-show-Remove-Hyperlink-even-with-selection.diff, alvarezp2000
+
 # Refresh the cell formatting after pasting in it
 sw-paste-table.diff, n#564789, cbosdo
 
diff --git a/patches/dev300/sw-show-Remove-Hyperlink-even-with-selection.diff b/patches/dev300/sw-show-Remove-Hyperlink-even-with-selection.diff
new file mode 100644
index 0000000..c3d92f8
--- /dev/null
+++ b/patches/dev300/sw-show-Remove-Hyperlink-even-with-selection.diff
@@ -0,0 +1,33 @@
+diff --git sw/source/ui/shells/textsh1.cxx sw/source/ui/shells/textsh1.cxx
+index e9f7dcd..570d561 100644
+--- sw/source/ui/shells/textsh1.cxx
++++ sw/source/ui/shells/textsh1.cxx
+@@ -1544,7 +1544,6 @@ void SwTextShell::GetState( SfxItemSet &rSet )
+                                 GetViewFrame()->GetChildWindow( nWhich ) ));
+                 break;
+             case FN_EDIT_HYPERLINK:
+-            case FN_REMOVE_HYPERLINK:
+             case FN_COPY_HYPERLINK_LOCATION:
+             {
+                 SfxItemSet aSet(GetPool(),
+@@ -1557,6 +1556,20 @@ void SwTextShell::GetState( SfxItemSet &rSet )
+                 }
+             }
+             break;
++            case FN_REMOVE_HYPERLINK:
++            {
++                SfxItemSet aSet(GetPool(),
++                                RES_TXTATR_INETFMT,
++                                RES_TXTATR_INETFMT);
++                rSh.GetCurAttr(aSet);
++
++		// If a hyperlink is selected, either alone or along with other text...
++                if( ((SFX_ITEM_DONTCARE & aSet.GetItemState( RES_TXTATR_INETFMT, TRUE )) == 0) || rSh.HasReadonlySel())
++                {
++                    rSet.DisableItem(nWhich);
++                }
++            }
++            break;
+             case SID_TRANSLITERATE_HALFWIDTH:
+             case SID_TRANSLITERATE_FULLWIDTH:
+             case SID_TRANSLITERATE_HIRAGANA:


More information about the ooo-build-commit mailing list