diff options
Diffstat (limited to 'sw/source/core/layout/wsfrm.cxx')
-rw-r--r-- | sw/source/core/layout/wsfrm.cxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx index de7417879a0c..60cdad6d2959 100644 --- a/sw/source/core/layout/wsfrm.cxx +++ b/sw/source/core/layout/wsfrm.cxx @@ -75,6 +75,7 @@ #include <editeng/frmdiritem.hxx> // OD 2004-05-24 #i28701# #include <sortedobjs.hxx> +#include <viewopt.hxx> using namespace ::com::sun::star; @@ -130,6 +131,25 @@ void SwFrm::RegisterToFormat( SwFmt& rFmt ) rFmt.Add( this ); } +sal_uInt64 SwFrm::SetHeaderFooterEditMask( OutputDevice* pOut ) const +{ + sal_uInt64 nOldDrawMode = pOut->GetDrawMode(); + ViewShell* pShell = getRootFrm()->GetCurrShell(); + if ( !pShell->IsPreView() && + !pShell->GetViewOptions()->IsPDFExport() && + !pShell->GetViewOptions()->IsPrinting() ) + { + bool bInHdrFtr = FindFooterOrHeader( ) != NULL; + bool bEditHdrFtr = pShell->IsHeaderFooterEdit(); + if ( ( bInHdrFtr && !bEditHdrFtr ) || ( !bInHdrFtr && bEditHdrFtr ) ) + pOut->SetDrawMode( DRAWMODE_GHOSTEDLINE | DRAWMODE_GHOSTEDFILL | + DRAWMODE_GHOSTEDTEXT | DRAWMODE_GHOSTEDBITMAP | + DRAWMODE_GHOSTEDGRADIENT ); + } + + return nOldDrawMode; +} + void SwFrm::CheckDir( sal_uInt16 nDir, sal_Bool bVert, sal_Bool bOnlyBiDi, sal_Bool bBrowse ) { if( FRMDIR_ENVIRONMENT == nDir || ( bVert && bOnlyBiDi ) ) |