From b05ccad57915efc7977101b3cb8c6cd37f929fd7 Mon Sep 17 00:00:00 2001 From: RĂ¼diger Timm Date: Thu, 4 Sep 2008 09:18:33 +0000 Subject: INTEGRATION: CWS swenhancedfields2 (1.20.232); FILE MERGED 2008/08/06 15:39:29 b_michaelsen 1.20.232.3: fixed formatting in crbm.cxx pam.cxx and docbm.cxx 2008/08/04 14:18:21 b_michaelsen 1.20.232.2: RESYNC: (1.20-1.21); FILE MERGED 2008/04/23 14:29:16 ama 1.20.232.1: #i33737#: Enhanced fields --- sw/source/core/crsr/pam.cxx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx index 90bd836230b3..520f0af39800 100644 --- a/sw/source/core/crsr/pam.cxx +++ b/sw/source/core/crsr/pam.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: pam.cxx,v $ - * $Revision: 1.21 $ + * $Revision: 1.22 $ * * This file is part of OpenOffice.org. * @@ -55,6 +55,8 @@ // <-- #include // #111827# +#include + // fuer den dummen ?MSC-? Compiler inline xub_StrLen GetSttOrEnd( BOOL bCondition, const SwCntntNode& rNd ) { @@ -765,6 +767,16 @@ BOOL SwPaM::HasReadonlySel( bool bFormView ) const } } } + if( !bRet ) + { + const SwDoc *pDoc=GetDoc(); + SwBookmark *pA = ( pDoc && pPoint ? pDoc->getFieldBookmarkFor( *pPoint ) : NULL ); + SwBookmark *pB = ( pDoc && pMark ? pDoc->getFieldBookmarkFor( *pMark ) : pA ); + bRet = ( pA != pB ); + bool bProtectForm = pDoc->get( IDocumentSettingAccess::PROTECT_FORM ); + if( bProtectForm ) + bRet |= ( pA==NULL || pB==NULL ); + } return bRet; } -- cgit