From bb850eead3dd2883343029a863368360e03fcfee Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 26 Feb 2013 11:48:22 +0100 Subject: n#802888 SwEditWin: let fields have priority over header/footer flys http://people.freedesktop.org/~vmiklos/2013/watermark-field-click.odt is a reproducer, double-click was catched by the fly frame from the header, so the field edit dialog didn't appear. (cherry picked from commit 61f467c8974d6b6face41e7027d75ae4ddb6fdb2) Conflicts: sw/source/ui/docvw/edtwin.cxx Change-Id: Ibd3ea382085fa4cbdc1af73d4be1e5c053a81eaa --- sw/source/ui/docvw/edtwin.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index 712b31f01ad5..36db79562a7b 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -2731,7 +2731,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) } } - if ( lcl_CheckHeaderFooterClick( rSh, aDocPos, rMEvt.GetClicks() ) ) + sal_Bool bIsDocReadOnly = rView.GetDocShell()->IsReadOnly(); + if ( (bIsDocReadOnly || !rSh.GetCurFld()) && lcl_CheckHeaderFooterClick( rSh, aDocPos, rMEvt.GetClicks() ) ) return; @@ -2750,7 +2751,6 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) // work but in practice ... lcl_SelectShellForDrop( rView ); - sal_Bool bIsDocReadOnly = rView.GetDocShell()->IsReadOnly(); sal_Bool bCallBase = sal_True; if( pQuickHlpData->bClear ) -- cgit