summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-02-26 11:48:22 +0100
committerMiklos Vajna <vmiklos@suse.cz>2013-02-26 11:53:40 +0100
commit61f467c8974d6b6face41e7027d75ae4ddb6fdb2 (patch)
tree3ca13198b9404c990645fd34a8151e569f179ec5 /sw
parentd50b7aceed892a273c12e0dbc7b0e00adbd27d43 (diff)
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. Change-Id: Ibd3ea382085fa4cbdc1af73d4be1e5c053a81eaa
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/docvw/edtwin.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index 73b9331ff1f4..f9475d3b7b7e 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -2768,6 +2768,12 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
bool bOverFly = false;
bool bPageAnchored = false;
bool bOverHeaderFooterFly = IsOverHeaderFooterFly( aDocPos, eControl, bOverFly, bPageAnchored );
+
+ sal_Bool bIsDocReadOnly = rView.GetDocShell()->IsReadOnly();
+ if (bOverHeaderFooterFly && (!bIsDocReadOnly && rSh.GetCurFld()))
+ // We have a field here, that should have priority over header/footer fly.
+ bOverHeaderFooterFly = false;
+
int nNbFlyClicks = 1;
// !bOverHeaderFooterFly doesn't mean we have a frame to select
if ( !bPageAnchored && ( ( rSh.IsHeaderFooterEdit( ) && !bOverHeaderFooterFly && bOverFly ) ||
@@ -2864,7 +2870,6 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
// work but in practice ...
rView.SelectShellForDrop();
- sal_Bool bIsDocReadOnly = rView.GetDocShell()->IsReadOnly();
bool bCallBase = true;
if( pQuickHlpData->m_bIsDisplayed )