[Libreoffice-commits] .: sw/source
Cédric Bosdonnat
cbosdo at kemper.freedesktop.org
Tue Jul 5 08:38:49 PDT 2011
sw/source/core/crsr/crsrsh.cxx | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit 8f7f10904a5c7149f6cb3ba67a6cefcd11bd55c3
Author: Cédric Bosdonnat <cedric.bosdonnat.ooo at free.fr>
Date: Tue Jul 5 17:36:23 2011 +0200
Header/Footer: Toggled edit mode in SwCrsrShell::SetCrsr
This fixes the edit mode when the first position after opening the doc
isn't the main body or when switching from preview to main edition...
and possibly other uncovered cases.
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 33469f9..75ccd21 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -676,6 +676,11 @@ int SwCrsrShell::SetCrsr( const Point &rLPt, sal_Bool bOnlyText, bool bBlock )
// -> zurueck
return bRet;
+ // Toggle the Header/Footer mode if needed
+ bool bInHeaderFooter = pFrm && ( pFrm->IsHeaderFrm() || pFrm->IsFooterFrm() );
+ if ( bInHeaderFooter ^ IsHeaderFooterEdit() )
+ ToggleHeaderFooterEdit();
+
if( pBlockCrsr && bBlock )
{
pBlockCrsr->setEndPoint( rLPt );
More information about the Libreoffice-commits
mailing list