[Libreoffice-bugs] [Bug 49853] Cmd-V or Cmd-A inside toolbar-hosted edit fields paste into document instead (OS X only)

2016-05-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=49853

Maxim Monastirsky  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Assignee|libreoffice-b...@lists.free |momonas...@gmail.com
   |desktop.org |

--- Comment #149 from Maxim Monastirsky  ---
Well, this is a horrible hack, but it seems to do the trick.

Note that only keyboard shortcuts are covered by this. Mouse click on
Edit->Paste menu will still paste to the document. This is not trivial to fix
for various reasons, so leaving this for a future investigation. Whoever
interested in this part too - please open a new bug, as this one is too long
already.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 49853] Cmd-V or Cmd-A inside toolbar-hosted edit fields paste into document instead (OS X only)

2016-05-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=49853

--- Comment #148 from Commit Notification 
 ---
Maxim Monastirsky committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0975b5e4bdcd564b38b244589a44f5dd6cbdc63d

tdf#49853 Some shortcuts should always end up in the view

It will be available in 5.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 49853] Cmd-V or Cmd-A inside toolbar-hosted edit fields paste into document instead (OS X only)

2016-05-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=49853

Commit Notification  changed:

   What|Removed |Added

 Whiteboard|BSA Confirmed:4.2.0.2:OSX   |BSA Confirmed:4.2.0.2:OSX
   ||target:5.2.0

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 49853] Cmd-V or Cmd-A inside toolbar-hosted edit fields paste into document instead (OS X only)

2016-04-30 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=49853

--- Comment #147 from Maxim Monastirsky  ---
(In reply to Paul Oranje from comment #146)
> The search bar is a SalFrameWindow; true?
No. "Frame" in LO terms is usually the whole app window.

> If so, then the fix would be to add handling of the Cmd-A|C|V|X|z|Z events
> for this window
The find widget already has that handling, it's just that the menu handling
occurs before the find widget gets a chance to handle it.

> That
> these events end up being handled by the document window is obviously the
> wrong
Again - they are not handled by the document window, but by the menu handling
code (going all the way through vcl's Menu and framework::MenuBarManager).

One possible solution is to make Cmd-A|C|V|X|z|Z _never_ go through the menu,
but I doubt that it's the right approach in general, and esp. when considering
comment 144 (i.e. that menu items should also work with the find field). For
the latter, we might try to handle it in SalNSMenuItem::menuItemTriggered, or
even in MenuBarManager::Select.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 49853] Cmd-V or Cmd-A inside toolbar-hosted edit fields paste into document instead (OS X only)

2016-04-28 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=49853

--- Comment #146 from Paul Oranje  ---
(In reply to V Stuart Foote from comment #145)
> (In reply to Maxim Monastirsky from comment #142)
> > Well, the root cause seems
> ...
> > Now we only need to figure out what's the right way to fix this...
> 
> check out Matthew F's similar work for bug 62054
> https://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=0350bcde37edb1f25cca68cb1447ba8f759aea15
> 
> and refs to
> http://stackoverflow.com/questions/970707/cocoa-keyboard-shortcuts-in-dialog-
> without-an-edit-menu

sendEvent() is kind of de-multiplexer. pKeyWin is assigned the keyWindow
property value (window that currently receives keyboard events).
The search bar is a SalFrameWindow; true?

If so, then the fix would be to add handling of the Cmd-A|C|V|X|z|Z events for
this window - currently no special handling for these cases exists. That these
events end up being handled by the document window is obviously the wrong
handler is dispatched.

Where would these dispatch statements be inserted in the code ?
Already the needed dispatch statement can be found in sendEvent() and just
changing but the conditions for these statements to be executed may be all
that's required. Currently the condition is that the window is not a
SalFrameWindow, it should probably be "if (! bHandled)" and the test for
pKeyWin 

The current code does things like "if (cond) { ... return;} else if {...}".
When the if true clause always causes a return, then "else" should be omitted
IMHO. Applied to the code of sendEvent() the control flow will be easier to
grasp.

Question: can sendEvent() recurse ? (possibly via pushback of event)
That would allow for kind of FSM style of code (though I would not dare to open
a Pandorra's box).

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 49853] Cmd-V or Cmd-A inside toolbar-hosted edit fields paste into document instead (OS X only)

2016-04-28 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=49853

--- Comment #145 from V Stuart Foote  ---
(In reply to Maxim Monastirsky from comment #142)
> Well, the root cause seems
...
> Now we only need to figure out what's the right way to fix this...

check out Matthew F's similar work for bug 62054
https://cgit.freedesktop.org/libreoffice/core/commit/?id=0350bcde37edb1f25cca68cb1447ba8f759aea15

and refs to
http://stackoverflow.com/questions/970707/cocoa-keyboard-shortcuts-in-dialog-without-an-edit-menu

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 49853] Cmd-V or Cmd-A inside toolbar-hosted edit fields paste into document instead (OS X only)

2016-04-28 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=49853

steve -_-  changed:

   What|Removed |Added

 OS|All |Mac OS X (All)

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 49853] Cmd-V or Cmd-A inside toolbar-hosted edit fields paste into document instead (OS X only)

2016-04-28 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=49853

Maxim Monastirsky  changed:

   What|Removed |Added

   See Also|https://bugs.freedesktop.or |
   |g/show_bug.cgi?id=60790,|
   |https://bugs.freedesktop.or |
   |g/show_bug.cgi?id=62054,|
   |https://bugs.freedesktop.or |
   |g/show_bug.cgi?id=55914,|
   |https://bugs.documentfounda |
   |tion.org/show_bug.cgi?id=88 |
   |804,|
   |https://bugs.documentfounda |
   |tion.org/show_bug.cgi?id=95 |
   |358 |

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 49853] Cmd-V or Cmd-A inside toolbar-hosted edit fields paste into document instead (OS X only)

2016-04-28 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=49853

--- Comment #144 from xfrz  ---

> Now we only need to figure out what's the right way to fix this...

Seems plausible - doing the main menu paste action manually also writes to the
document where the focus WAS, instead of the search widget where the focus
(cursor) currently is. Which it should not do imho.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 49853] Cmd-V or Cmd-A inside toolbar-hosted edit fields paste into document instead (OS X only)

2016-04-28 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=49853

Maxim Monastirsky  changed:

   What|Removed |Added

 CC||daniel.liab...@gmail.com

--- Comment #143 from Maxim Monastirsky  ---
*** Bug 60790 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 49853] Cmd-V or Cmd-A inside toolbar-hosted edit fields paste into document instead (OS X only)

2016-04-28 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=49853

Maxim Monastirsky  changed:

   What|Removed |Added

 CC||momonas...@gmail.com
Summary|EDITING: Attempting |Cmd-V or Cmd-A inside
   |paste/select all into find  |toolbar-hosted edit fields
   |bar with Cmd-V or Cmd-A on  |paste into document instead
   |OS X pastes into document   |(OS X only)
   |not into search bar |

--- Comment #142 from Maxim Monastirsky  ---
Well, the root cause seems
http://opengrok.libreoffice.org/xref/core/vcl/osx/vclnsapp.mm#159 :

159 // see whether the main menu consumes this event
160 // if not, we want to dispatch it ourselves. Unless we do this
"trick"
161 // the main menu just beeps for an unknown or disabled key
equivalent
162 // and swallows the event wholesale
163 NSMenu* pMainMenu = [NSApp mainMenu];
164 if( ! bHandled && (pMainMenu == nullptr || ! [pMainMenu
performKeyEquivalent: pEvent]) )
165 {
166 [[pKeyWin contentView] keyDown: pEvent];
167 bHandled = GetSalData()->maKeyEventAnswer[ pEvent ];
168 }
169 else
170 {
171 bHandled = true;  // event handled already or main menu
just handled it
172 }

i.e. on OS X when pressing some shortcut, the main menu is checked first, and
if it has an item with this shortcut, then a click on that menu item is
simulated instead of sending the shortcut directly to the app. So because the
Edit menu has "Paste" item, the OS X menu handling hijacks that shortcut, and
it never passed down to the edit widget.

Now we only need to figure out what's the right way to fix this...

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs