[ooo-build] [PATCH 1/2] sw: show 'Remove Hyperlink' even with selection
Octavio Alvarez
alvarezp at alvarezp.ods.org
Tue Mar 2 22:03:04 PST 2010
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>
---
patches/dev300/apply | 3 ++
...-show-Remove-Hyperlink-even-with-selection.diff | 33 ++++++++++++++++++++
2 files changed, 36 insertions(+), 0 deletions(-)
create mode 100644 patches/dev300/sw-show-Remove-Hyperlink-even-with-selection.diff
diff --git a/patches/dev300/apply b/patches/dev300/apply
index a1c1306..ef37ed1 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -651,6 +651,9 @@ sw-uno-fix.diff, i#108426, cbosdo
[ WriterFixes ]
sw-num-fix.diff, n#569266, cbosdo
+# 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..3380225
--- /dev/null
+++ b/patches/dev300/sw-show-Remove-Hyperlink-even-with-selection.diff
@@ -0,0 +1,33 @@
+diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx
+index 570d561..e9f7dcd 100644
+--- a/sw/source/ui/shells/textsh1.cxx
++++ b/sw/source/ui/shells/textsh1.cxx
+@@ -1544,6 +1544,7 @@ 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(),
+@@ -1556,20 +1557,6 @@ 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:
--
1.7.0
More information about the ooo-build
mailing list