summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/inc/viewsh.hxx8
-rw-r--r--sw/source/core/doc/notxtfrm.cxx2
-rw-r--r--sw/source/core/layout/paintfrm.cxx2
-rw-r--r--sw/source/core/view/viewsh.cxx10
-rw-r--r--sw/source/core/view/vnew.cxx11
-rw-r--r--sw/source/uibase/docvw/edtwin3.cxx2
6 files changed, 19 insertions, 16 deletions
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index 8b8875b620eb..254e4ec5b840 100644
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -107,8 +107,8 @@ class SW_DLLPUBLIC SwViewShell : public sw::Ring<SwViewShell>
// Set SwVisArea in order to enable clean formatting before printing.
friend void SetSwVisArea( SwViewShell *pSh, const SwRect & );
- static BitmapEx* mpReplaceBmp; ///< replaced display of still loaded images
- static BitmapEx* mpErrorBmp; ///< error display of missed images
+ BitmapEx* m_pReplaceBmp; ///< replaced display of still loaded images
+ BitmapEx* m_pErrorBmp; ///< error display of missed images
static bool mbLstAct; // true if EndAction of last Shell
// i.e. if the EndActions of the other
@@ -555,8 +555,8 @@ public:
inline bool IsInConstructor() const { return mbInConstructor; }
- static const BitmapEx& GetReplacementBitmap( bool bIsErrorState );
- static void DeleteReplacementBitmaps();
+ const BitmapEx& GetReplacementBitmap(bool bIsErrorState);
+ void DeleteReplacementBitmaps();
const SwPostItMgr* GetPostItMgr() const { return (const_cast<SwViewShell*>(this))->GetPostItMgr(); }
SwPostItMgr* GetPostItMgr();
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index 5b1532fbd4f3..9bb0bdebf891 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -139,7 +139,7 @@ static void lcl_PaintReplacement( const SwRect &rRect, const OUString &rText,
pFont->SetUnderline( eUnderline );
pFont->SetColor( aCol );
- const BitmapEx& rBmp = SwViewShell::GetReplacementBitmap( bDefect );
+ const BitmapEx& rBmp = const_cast<SwViewShell&>(rSh).GetReplacementBitmap(bDefect);
Graphic::DrawEx( rSh.GetOut(), rText, *pFont, rBmp, rRect.Pos(), rRect.SSize() );
}
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 25bf3c75f9d4..54d8a82b40db 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -2306,7 +2306,7 @@ void DrawGraphic(
if( bReplaceGrfNum )
{
- const BitmapEx& rBmp = SwViewShell::GetReplacementBitmap( false );
+ const BitmapEx& rBmp = rSh.GetReplacementBitmap(false);
vcl::Font aTmp( pOutDev->GetFont() );
Graphic::DrawEx( pOutDev, aEmptyOUStr, aTmp, rBmp, rOrg.Pos(), rOrg.SSize() );
}
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 226b12325174..bf919a97f623 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -88,8 +88,6 @@
bool SwViewShell::mbLstAct = false;
ShellResource *SwViewShell::mpShellRes = nullptr;
VclPtr<vcl::Window> SwViewShell::mpCareWindow = nullptr;
-BitmapEx* SwViewShell::mpErrorBmp = nullptr;
-BitmapEx* SwViewShell::mpReplaceBmp = nullptr;
bool bInSizeNotify = false;
@@ -2486,12 +2484,12 @@ const BitmapEx& SwViewShell::GetReplacementBitmap( bool bIsErrorState )
sal_uInt16 nResId = 0;
if( bIsErrorState )
{
- ppRet = &mpErrorBmp;
+ ppRet = &m_pErrorBmp;
nResId = RID_GRAPHIC_ERRORBMP;
}
else
{
- ppRet = &mpReplaceBmp;
+ ppRet = &m_pReplaceBmp;
nResId = RID_GRAPHIC_REPLACEBMP;
}
@@ -2504,8 +2502,8 @@ const BitmapEx& SwViewShell::GetReplacementBitmap( bool bIsErrorState )
void SwViewShell::DeleteReplacementBitmaps()
{
- DELETEZ( mpErrorBmp );
- DELETEZ( mpReplaceBmp );
+ DELETEZ( m_pErrorBmp );
+ DELETEZ( m_pReplaceBmp );
}
SwPostItMgr* SwViewShell::GetPostItMgr()
diff --git a/sw/source/core/view/vnew.cxx b/sw/source/core/view/vnew.cxx
index dd702b51593e..2b8300cdd742 100644
--- a/sw/source/core/view/vnew.cxx
+++ b/sw/source/core/view/vnew.cxx
@@ -149,7 +149,9 @@ void SwViewShell::Init( const SwViewOption *pNewOpt )
SwViewShell::SwViewShell( SwDoc& rDocument, vcl::Window *pWindow,
const SwViewOption *pNewOpt, OutputDevice *pOutput,
long nFlags )
- :
+ : m_pReplaceBmp(nullptr)
+ , m_pErrorBmp(nullptr)
+ ,
maBrowseBorder(),
mpSfxViewShell( nullptr ),
mpImp( new SwViewShellImp( this ) ),
@@ -225,8 +227,11 @@ SwViewShell::SwViewShell( SwDoc& rDocument, vcl::Window *pWindow,
/// CTor for further Shells on a document.
SwViewShell::SwViewShell( SwViewShell& rShell, vcl::Window *pWindow,
- OutputDevice *pOutput, long nFlags ) :
- Ring( &rShell ),
+ OutputDevice * pOutput, long const nFlags)
+ : Ring( &rShell )
+ , m_pReplaceBmp(nullptr)
+ , m_pErrorBmp(nullptr)
+ ,
maBrowseBorder( rShell.maBrowseBorder ),
mpSfxViewShell( nullptr ),
mpImp( new SwViewShellImp( this ) ),
diff --git a/sw/source/uibase/docvw/edtwin3.cxx b/sw/source/uibase/docvw/edtwin3.cxx
index b8c4279f5bea..c69ebfcbd4eb 100644
--- a/sw/source/uibase/docvw/edtwin3.cxx
+++ b/sw/source/uibase/docvw/edtwin3.cxx
@@ -144,7 +144,7 @@ void SwEditWin::DataChanged( const DataChangedEvent& rDCEvt )
{
pSh->LockPaint();
bUnlockPaint = true;
- SwViewShell::DeleteReplacementBitmaps();
+ pSh->DeleteReplacementBitmaps();
GetView().InvalidateBorder(); //Scrollbar work
}
break;