summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-05-13 12:16:55 +0200
committerNoel Grandin <noel@peralex.com>2015-05-13 12:21:19 +0200
commit4eb16dab21e3e6f47e899060e28ccc515e47316f (patch)
tree03b32dbf733f560fccab646ba971be22de4c824c
parent6850e9b855d3d367ae51111e48cbdb2c28000424 (diff)
wrap some static fields in VclPtr
Change-Id: I2df0929d1b34b9ebf2d5d4c27321abdea072007a
-rw-r--r--sc/source/ui/pagedlg/scuitphfedit.cxx2
-rw-r--r--sc/source/ui/pagedlg/tphfedit.cxx2
-rw-r--r--sw/inc/viewsh.hxx10
-rw-r--r--sw/source/core/view/viewsh.cxx2
-rw-r--r--sw/source/uibase/inc/view.hxx16
-rw-r--r--sw/source/uibase/uiview/view.cxx7
6 files changed, 20 insertions, 19 deletions
diff --git a/sc/source/ui/pagedlg/scuitphfedit.cxx b/sc/source/ui/pagedlg/scuitphfedit.cxx
index f7063f85610e..6de4ed699efb 100644
--- a/sc/source/ui/pagedlg/scuitphfedit.cxx
+++ b/sc/source/ui/pagedlg/scuitphfedit.cxx
@@ -51,7 +51,7 @@
// STATIC DATA -----------------------------------------------------------
-static ScEditWindow* pActiveEdWnd = NULL;
+static VclPtr<ScEditWindow> pActiveEdWnd = NULL;
// class ScHFEditPage
diff --git a/sc/source/ui/pagedlg/tphfedit.cxx b/sc/source/ui/pagedlg/tphfedit.cxx
index a01a89fedc7f..cb6d90b11c13 100644
--- a/sc/source/ui/pagedlg/tphfedit.cxx
+++ b/sc/source/ui/pagedlg/tphfedit.cxx
@@ -48,7 +48,7 @@
#include <boost/scoped_ptr.hpp>
// STATIC DATA -----------------------------------------------------------
-static ScEditWindow* pActiveEdWnd = NULL;
+static VclPtr<ScEditWindow> pActiveEdWnd = NULL;
ScEditWindow* GetScEditWindow ()
{
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index fb1f9c79eec4..fee06ba39842 100644
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -187,8 +187,8 @@ class SW_DLLPUBLIC SwViewShell : public sw::Ring<SwViewShell>
SAL_DLLPRIVATE void ImplApplyViewOptions( const SwViewOption &rOpt );
protected:
- static ShellResource* mpShellRes; ///< Resources for the Shell.
- static vcl::Window* mpCareWindow; ///< Avoid this window.
+ static ShellResource* mpShellRes; ///< Resources for the Shell.
+ static VclPtr<vcl::Window> mpCareWindow; ///< Avoid this window.
SwRect maVisArea; ///< The modern version of VisArea.
SwDoc *mpDoc; ///< The document; never 0.
@@ -440,9 +440,9 @@ public:
static ShellResource* GetShellRes();
static void SetCareWin( vcl::Window* pNew );
- static vcl::Window* GetCareWin(SwViewShell& rVSh)
- { return mpCareWindow ? mpCareWindow : CareChildWin(rVSh); }
- static vcl::Window* CareChildWin(SwViewShell& rVSh);
+ static vcl::Window* GetCareWin(SwViewShell& rVSh)
+ { return mpCareWindow ? mpCareWindow.get() : CareChildWin(rVSh); }
+ static vcl::Window* CareChildWin(SwViewShell& rVSh);
inline SfxViewShell *GetSfxViewShell() { return mpSfxViewShell; }
inline void SetSfxViewShell(SfxViewShell *pNew) { mpSfxViewShell = pNew; }
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index c9b92fb58582..7d5495cc2ddf 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -85,7 +85,7 @@
bool SwViewShell::mbLstAct = false;
ShellResource *SwViewShell::mpShellRes = 0;
-vcl::Window *SwViewShell::mpCareWindow = 0;
+VclPtr<vcl::Window> SwViewShell::mpCareWindow = nullptr;
BitmapEx* SwViewShell::mpErrorBmp = NULL;
BitmapEx* SwViewShell::mpReplaceBmp = NULL;
diff --git a/sw/source/uibase/inc/view.hxx b/sw/source/uibase/inc/view.hxx
index 6f0cec290327..c89d3306c52b 100644
--- a/sw/source/uibase/inc/view.hxx
+++ b/sw/source/uibase/inc/view.hxx
@@ -153,14 +153,14 @@ class SW_DLLPUBLIC SwView: public SfxViewShell
friend class SwClipboardChangeListener;
// search & replace
- static SvxSearchDialog *m_pSrchDlg;
- static SvxSearchItem *m_pSrchItem;
-
- static sal_uInt16 m_nInsertCtrlState;
- static sal_uInt16 m_nWebInsertCtrlState;
- static sal_uInt16 m_nInsertObjectCtrlState;
- static sal_uInt16 m_nInsertFieldCtrlState;
- static sal_uInt16 m_nMoveType; // for buttons below the scrollbar (viewmdi)
+ static VclPtr<SvxSearchDialog> m_pSrchDlg;
+ static SvxSearchItem *m_pSrchItem;
+
+ static sal_uInt16 m_nInsertCtrlState;
+ static sal_uInt16 m_nWebInsertCtrlState;
+ static sal_uInt16 m_nInsertObjectCtrlState;
+ static sal_uInt16 m_nInsertFieldCtrlState;
+ static sal_uInt16 m_nMoveType; // for buttons below the scrollbar (viewmdi)
static sal_Int32 m_nActMark; // current jump mark for unknown mark
static bool m_bExtra;
diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index 5a158033a097..02c00d766132 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -36,6 +36,7 @@
#include <sfx2/printer.hxx>
#include <sfx2/app.hxx>
#include <svx/ruler.hxx>
+#include <svx/srchdlg.hxx>
#include <editeng/protitem.hxx>
#include <svx/fmshell.hxx>
#include <svx/extrusionbar.hxx>
@@ -135,9 +136,9 @@ bool SwView::m_bExtra = false;
bool SwView::m_bFound = false;
bool SwView::m_bJustOpened = false;
-SvxSearchDialog* SwView::m_pSrchDlg = 0;
-SearchAttrItemList* SwView::m_pSrchList = 0;
-SearchAttrItemList* SwView::m_pReplList = 0;
+VclPtr<SvxSearchDialog> SwView::m_pSrchDlg = nullptr;
+SearchAttrItemList* SwView::m_pSrchList = 0;
+SearchAttrItemList* SwView::m_pReplList = 0;
inline SfxDispatcher &SwView::GetDispatcher()
{