summaryrefslogtreecommitdiffstats
path: root/sw/source/ui/inc
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2013-10-11 17:54:15 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2013-10-11 18:20:14 +0200
commite2cdde1f187de7b6fd0cab740ab7be54fc6fb1f0 (patch)
tree13895f97c9616aef32afe340c95c67980fa4a42e /sw/source/ui/inc
parentFix equality operator for SharedString & write test for it. (diff)
downloadcore-e2cdde1f187de7b6fd0cab740ab7be54fc6fb1f0.tar.gz
core-e2cdde1f187de7b6fd0cab740ab7be54fc6fb1f0.zip
sw: make it possible to accept/reject changes if they contain spelling errors
If there were spelling errors in a text portion that is to be accepted/rejected, right mouse click just shown the spellcheck menu, so oddly if an inserted text contained spelling mistakes and we wanted to reject them, Writer didn't allow that. Fix this by adding the redline operations (accept change, reject change, next change, previous change) to the spellcheck menu, but make it only a wrapper around the SwView code, so all the logic on what to do and when to hide these menu items is not duplicated. Change-Id: I76cad2f58a47575f8ef9517af51f1ffe7c4b6844
Diffstat (limited to 'sw/source/ui/inc')
-rw-r--r--sw/source/ui/inc/misc.hrc27
-rw-r--r--sw/source/ui/inc/olmenu.hxx3
2 files changed, 30 insertions, 0 deletions
diff --git a/sw/source/ui/inc/misc.hrc b/sw/source/ui/inc/misc.hrc
index 95113ff989f2..ff200908babc 100644
--- a/sw/source/ui/inc/misc.hrc
+++ b/sw/source/ui/inc/misc.hrc
@@ -21,6 +21,7 @@
#define _MISC_HRC
#include "rcid.hrc"
+#include "cmdid.h"
#define DLG_INSERT_BOOKMARK (RC_MISC_BEGIN + 17)
#define DLG_NUM_NAMES (RC_MISC_BEGIN + 18)
@@ -55,6 +56,32 @@
#error Resource-Id Ueberlauf in #file, #line
#endif
+#define MN_EDIT_REDLINE \
+ MenuItem \
+ { \
+ Identifier = FN_REDLINE_ACCEPT_DIRECT; \
+ HelpId = CMD_FN_REDLINE_ACCEPT_DIRECT ; \
+ Text [ en-US ] = "Accept Change" ; \
+ };\
+ MenuItem \
+ { \
+ Identifier = FN_REDLINE_REJECT_DIRECT ; \
+ HelpId = CMD_FN_REDLINE_REJECT_DIRECT ; \
+ Text [ en-US ] = "Reject Change" ; \
+ }; \
+ MenuItem \
+ { \
+ Identifier = FN_REDLINE_NEXT_CHANGE; \
+ HelpId = CMD_FN_REDLINE_NEXT_CHANGE ; \
+ Text [ en-US ] = "Next Change" ; \
+ };\
+ MenuItem \
+ { \
+ Identifier = FN_REDLINE_PREV_CHANGE; \
+ HelpId = CMD_FN_REDLINE_PREV_CHANGE ; \
+ Text [ en-US ] = "Previous Change" ; \
+ };
+
#endif // _MISC_HRC
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/olmenu.hxx b/sw/source/ui/inc/olmenu.hxx
index c10712ee284a..23d1fd315500 100644
--- a/sw/source/ui/inc/olmenu.hxx
+++ b/sw/source/ui/inc/olmenu.hxx
@@ -67,6 +67,9 @@ class SwSpellPopup : public PopupMenu
using PopupMenu::Execute;
+ /// Checks if any of the redline menu items should be hidden.
+ void checkRedline();
+
public:
SwSpellPopup( SwWrtShell *pWrtSh,
const ::com::sun::star::uno::Reference<