diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-02-26 11:48:22 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-04-02 10:26:57 +0200 |
commit | 88d46b9198a42956c521080f2aa7f3acf73cde06 (patch) | |
tree | 1cd661c9af646eef1455489ff9325db3960fbcc5 /sw | |
parent | a53e649884bb94dd99e9c930b583d8235add6363 (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
(cherry picked from commit 61f467c8974d6b6face41e7027d75ae4ddb6fdb2)
Conflicts:
sw/source/ui/docvw/edtwin.cxx
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/docvw/edtwin.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index 27853a856a7d..1529566883de 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -2774,6 +2774,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 ) || @@ -2870,7 +2876,6 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) // work but in practice ... rView.SelectShellForDrop(); - sal_Bool bIsDocReadOnly = rView.GetDocShell()->IsReadOnly(); sal_Bool bCallBase = sal_True; if( pQuickHlpData->m_bIsDisplayed ) |