summaryrefslogtreecommitdiff
path: root/vcl/inc
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/inc')
-rw-r--r--vcl/inc/brdwin.hxx19
-rw-r--r--vcl/inc/controldata.hxx2
-rw-r--r--vcl/inc/dndevdis.hxx4
-rw-r--r--vcl/inc/helpwin.hxx7
-rw-r--r--vcl/inc/ilstbox.hxx115
-rw-r--r--vcl/inc/outdev.h3
-rw-r--r--vcl/inc/printdlg.hxx118
-rw-r--r--vcl/inc/salframe.hxx9
-rw-r--r--vcl/inc/svdata.hxx67
-rw-r--r--vcl/inc/toolbox.h2
-rw-r--r--vcl/inc/unx/i18n_status.hxx3
-rw-r--r--vcl/inc/window.h65
12 files changed, 210 insertions, 204 deletions
diff --git a/vcl/inc/brdwin.hxx b/vcl/inc/brdwin.hxx
index d47f07103e00..77a690c75dc0 100644
--- a/vcl/inc/brdwin.hxx
+++ b/vcl/inc/brdwin.hxx
@@ -83,14 +83,14 @@ class ImplBorderWindow : public vcl::Window
private:
ImplBorderWindowView* mpBorderView;
- vcl::Window* mpMenuBarWindow;
+ VclPtr<vcl::Window> mpMenuBarWindow;
long mnMinWidth;
long mnMinHeight;
long mnMaxWidth;
long mnMaxHeight;
long mnRollHeight;
long mnOrgMenuHeight;
- sal_uInt16 mnTitleType;
+ sal_uInt16 mnTitleType;
WindowBorderStyle mnBorderStyle;
bool mbFloatWindow;
bool mbSmallOutBorder;
@@ -121,7 +121,8 @@ public:
sal_uInt16 nTypeStyle = 0 );
ImplBorderWindow( vcl::Window* pParent, WinBits nStyle = 0,
sal_uInt16 nTypeStyle = 0 );
- virtual ~ImplBorderWindow();
+ virtual ~ImplBorderWindow();
+ virtual void dispose() SAL_OVERRIDE;
virtual void MouseMove( const MouseEvent& rMEvt ) SAL_OVERRIDE;
virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE;
@@ -173,8 +174,8 @@ public:
struct ImplBorderFrameData
{
- ImplBorderWindow* mpBorderWindow;
- OutputDevice* mpOutDev;
+ VclPtr<ImplBorderWindow> mpBorderWindow;
+ VclPtr<OutputDevice> mpOutDev;
Rectangle maTitleRect;
Rectangle maPinRect;
Rectangle maCloseRect;
@@ -252,8 +253,8 @@ public:
class ImplSmallBorderWindowView : public ImplBorderWindowView
{
- ImplBorderWindow* mpBorderWindow;
- OutputDevice* mpOutDev;
+ VclPtr<ImplBorderWindow> mpBorderWindow;
+ VclPtr<OutputDevice> mpOutDev;
long mnWidth;
long mnHeight;
sal_Int32 mnLeftBorder;
@@ -275,8 +276,8 @@ public:
class ImplStdBorderWindowView : public ImplBorderWindowView
{
ImplBorderFrameData maFrameData;
- VirtualDevice* mpATitleVirDev;
- VirtualDevice* mpDTitleVirDev;
+ VclPtr<VirtualDevice> mpATitleVirDev;
+ VclPtr<VirtualDevice> mpDTitleVirDev;
public:
ImplStdBorderWindowView( ImplBorderWindow* pBorderWindow );
diff --git a/vcl/inc/controldata.hxx b/vcl/inc/controldata.hxx
index 20720911d038..0ef77c809541 100644
--- a/vcl/inc/controldata.hxx
+++ b/vcl/inc/controldata.hxx
@@ -30,7 +30,7 @@ namespace vcl
struct ImplControlData
{
mutable ControlLayoutData* mpLayoutData;
- OutputDevice* mpReferenceDevice;
+ VclPtr<OutputDevice> mpReferenceDevice;
ImplControlData()
:mpLayoutData( NULL )
diff --git a/vcl/inc/dndevdis.hxx b/vcl/inc/dndevdis.hxx
index 978910a46f01..b542581efee1 100644
--- a/vcl/inc/dndevdis.hxx
+++ b/vcl/inc/dndevdis.hxx
@@ -32,9 +32,9 @@ class DNDEventDispatcher: public ::cppu::WeakImplHelper3<
::com::sun::star::datatransfer::dnd::XDropTargetDragContext,
::com::sun::star::datatransfer::dnd::XDragGestureListener >
{
- vcl::Window * m_pTopWindow;
+ VclPtr<vcl::Window> m_pTopWindow;
- vcl::Window * m_pCurrentWindow;
+ VclPtr<vcl::Window> m_pCurrentWindow;
void designate_currentwindow(vcl::Window *pWindow);
DECL_LINK(WindowEventListener, VclSimpleEvent*);
diff --git a/vcl/inc/helpwin.hxx b/vcl/inc/helpwin.hxx
index b6beda35a6d3..c092d292d4ea 100644
--- a/vcl/inc/helpwin.hxx
+++ b/vcl/inc/helpwin.hxx
@@ -38,8 +38,8 @@ private:
Timer maShowTimer;
Timer maHideTimer;
- sal_uInt16 mnHelpWinStyle;
- sal_uInt16 mnStyle;
+ sal_uInt16 mnHelpWinStyle;
+ sal_uInt16 mnStyle;
protected:
DECL_LINK( TimerHdl, Timer* );
@@ -50,7 +50,8 @@ protected:
public:
HelpTextWindow( vcl::Window* pParent, const OUString& rText, sal_uInt16 nHelpWinStyle, sal_uInt16 nStyle );
- virtual ~HelpTextWindow();
+ virtual ~HelpTextWindow();
+ virtual void dispose() SAL_OVERRIDE;
const OUString& GetHelpText() const { return maHelpText; }
void SetHelpText( const OUString& rHelpText );
diff --git a/vcl/inc/ilstbox.hxx b/vcl/inc/ilstbox.hxx
index 0efc7e12988b..dfab1ad7185b 100644
--- a/vcl/inc/ilstbox.hxx
+++ b/vcl/inc/ilstbox.hxx
@@ -87,7 +87,7 @@ struct ImplEntryType
class ImplEntryList
{
private:
- vcl::Window* mpWindow; ///< For getting the current locale when matching strings
+ VclPtr<vcl::Window> mpWindow; ///< For getting the current locale when matching strings
sal_Int32 mnLastSelected;
sal_Int32 mnSelectionAnchor;
sal_Int32 mnImages;
@@ -266,7 +266,8 @@ public:
virtual void FillLayoutData() const SAL_OVERRIDE;
ImplListBoxWindow( vcl::Window* pParent, WinBits nWinStyle );
- virtual ~ImplListBoxWindow();
+ virtual ~ImplListBoxWindow();
+ virtual void dispose() SAL_OVERRIDE;
ImplEntryList* GetEntryList() const { return mpEntryList; }
@@ -380,10 +381,10 @@ protected:
class ImplListBox : public Control
{
private:
- ImplListBoxWindow maLBWindow;
- ScrollBar* mpHScrollBar;
- ScrollBar* mpVScrollBar;
- ScrollBarBox* mpScrollBarBox;
+ VclPtr<ImplListBoxWindow> maLBWindow;
+ VclPtr<ScrollBar> mpHScrollBar;
+ VclPtr<ScrollBar> mpVScrollBar;
+ VclPtr<ScrollBarBox> mpScrollBarBox;
/// bitfield
bool mbVScroll : 1; // VScroll an oder aus
@@ -412,9 +413,10 @@ protected:
public:
ImplListBox( vcl::Window* pParent, WinBits nWinStyle );
virtual ~ImplListBox();
+ virtual void dispose() SAL_OVERRIDE;
- const ImplEntryList* GetEntryList() const { return maLBWindow.GetEntryList(); }
- ImplListBoxWindow& GetMainWindow() { return maLBWindow; }
+ const ImplEntryList* GetEntryList() const { return maLBWindow->GetEntryList(); }
+ ImplListBoxWindow* GetMainWindow() { return maLBWindow.get(); }
virtual void Resize() SAL_OVERRIDE;
virtual const Wallpaper& GetDisplayBackground() const SAL_OVERRIDE;
@@ -423,91 +425,91 @@ public:
sal_Int32 InsertEntry( sal_Int32 nPos, const OUString& rStr );
sal_Int32 InsertEntry( sal_Int32 nPos, const OUString& rStr, const Image& rImage );
void RemoveEntry( sal_Int32 nPos );
- void SetEntryData( sal_Int32 nPos, void* pNewData ) { maLBWindow.GetEntryList()->SetEntryData( nPos, pNewData ); }
+ void SetEntryData( sal_Int32 nPos, void* pNewData ) { maLBWindow->GetEntryList()->SetEntryData( nPos, pNewData ); }
void Clear();
void SetEntryFlags( sal_Int32 nPos, long nFlags );
void SelectEntry( sal_Int32 nPos, bool bSelect );
void SetNoSelection();
- void ResetCurrentPos() { maLBWindow.ResetCurrentPos(); }
- sal_Int32 GetCurrentPos() const { return maLBWindow.GetCurrentPos(); }
+ void ResetCurrentPos() { maLBWindow->ResetCurrentPos(); }
+ sal_Int32 GetCurrentPos() const { return maLBWindow->GetCurrentPos(); }
- bool ProcessKeyInput( const KeyEvent& rKEvt ) { return maLBWindow.ProcessKeyInput( rKEvt ); }
+ bool ProcessKeyInput( const KeyEvent& rKEvt ) { return maLBWindow->ProcessKeyInput( rKEvt ); }
bool HandleWheelAsCursorTravel( const CommandEvent& rCEvt );
- void SetSeparatorPos( sal_Int32 n ) { maLBWindow.SetSeparatorPos( n ); }
- sal_Int32 GetSeparatorPos() const { return maLBWindow.GetSeparatorPos(); }
+ void SetSeparatorPos( sal_Int32 n ) { maLBWindow->SetSeparatorPos( n ); }
+ sal_Int32 GetSeparatorPos() const { return maLBWindow->GetSeparatorPos(); }
- void SetTopEntry( sal_Int32 nTop ) { maLBWindow.SetTopEntry( nTop ); }
- sal_Int32 GetTopEntry() const { return maLBWindow.GetTopEntry(); }
- void ShowProminentEntry( sal_Int32 nPos ) { maLBWindow.ShowProminentEntry( nPos ); }
+ void SetTopEntry( sal_Int32 nTop ) { maLBWindow->SetTopEntry( nTop ); }
+ sal_Int32 GetTopEntry() const { return maLBWindow->GetTopEntry(); }
+ void ShowProminentEntry( sal_Int32 nPos ) { maLBWindow->ShowProminentEntry( nPos ); }
using Window::IsVisible;
- bool IsVisible( sal_Int32 nEntry ) const { return maLBWindow.IsVisible( nEntry ); }
+ bool IsVisible( sal_Int32 nEntry ) const { return maLBWindow->IsVisible( nEntry ); }
- void SetProminentEntryType( ProminentEntry eType ) { maLBWindow.SetProminentEntryType( eType ); }
- ProminentEntry GetProminentEntryType() const { return maLBWindow.GetProminentEntryType(); }
+ void SetProminentEntryType( ProminentEntry eType ) { maLBWindow->SetProminentEntryType( eType ); }
+ ProminentEntry GetProminentEntryType() const { return maLBWindow->GetProminentEntryType(); }
- long GetLeftIndent() const { return maLBWindow.GetLeftIndent(); }
- void SetLeftIndent( sal_uInt16 n ) { maLBWindow.SetLeftIndent( n ); }
- void ScrollHorz( short nDiff ) { maLBWindow.ScrollHorz( nDiff ); }
+ long GetLeftIndent() const { return maLBWindow->GetLeftIndent(); }
+ void SetLeftIndent( sal_uInt16 n ) { maLBWindow->SetLeftIndent( n ); }
+ void ScrollHorz( short nDiff ) { maLBWindow->ScrollHorz( nDiff ); }
- void SetTravelSelect( bool bTravelSelect ) { maLBWindow.SetTravelSelect( bTravelSelect ); }
- bool IsTravelSelect() const { return maLBWindow.IsTravelSelect(); }
- bool IsTrackingSelect() const { return maLBWindow.IsTrackingSelect(); }
+ void SetTravelSelect( bool bTravelSelect ) { maLBWindow->SetTravelSelect( bTravelSelect ); }
+ bool IsTravelSelect() const { return maLBWindow->IsTravelSelect(); }
+ bool IsTrackingSelect() const { return maLBWindow->IsTrackingSelect(); }
- void EnableMultiSelection( bool bMulti, bool bStackMode ) { maLBWindow.EnableMultiSelection( bMulti, bStackMode ); }
- bool IsMultiSelectionEnabled() const { return maLBWindow.IsMultiSelectionEnabled(); }
+ void EnableMultiSelection( bool bMulti, bool bStackMode ) { maLBWindow->EnableMultiSelection( bMulti, bStackMode ); }
+ bool IsMultiSelectionEnabled() const { return maLBWindow->IsMultiSelectionEnabled(); }
- void SetMultiSelectionSimpleMode( bool bSimple ) { maLBWindow.SetMultiSelectionSimpleMode( bSimple ); }
- bool IsMultiSelectionSimpleMode() const { return maLBWindow.IsMultiSelectionSimpleMode(); }
+ void SetMultiSelectionSimpleMode( bool bSimple ) { maLBWindow->SetMultiSelectionSimpleMode( bSimple ); }
+ bool IsMultiSelectionSimpleMode() const { return maLBWindow->IsMultiSelectionSimpleMode(); }
- void SetReadOnly( bool b ) { maLBWindow.SetReadOnly( b ); }
- bool IsReadOnly() const { return maLBWindow.IsReadOnly(); }
+ void SetReadOnly( bool b ) { maLBWindow->SetReadOnly( b ); }
+ bool IsReadOnly() const { return maLBWindow->IsReadOnly(); }
- Size CalcSize( sal_Int32 nMaxLines ) const { return maLBWindow.CalcSize( nMaxLines ); }
- long GetEntryHeight() const { return maLBWindow.GetEntryHeight(); }
- long GetMaxEntryWidth() const { return maLBWindow.GetMaxEntryWidth(); }
+ Size CalcSize( sal_Int32 nMaxLines ) const { return maLBWindow->CalcSize( nMaxLines ); }
+ long GetEntryHeight() const { return maLBWindow->GetEntryHeight(); }
+ long GetMaxEntryWidth() const { return maLBWindow->GetMaxEntryWidth(); }
void SetScrollHdl( const Link& rLink ) { maScrollHdl = rLink; }
const Link& GetScrollHdl() const { return maScrollHdl; }
- void SetSelectHdl( const Link& rLink ) { maLBWindow.SetSelectHdl( rLink ); }
- const Link& GetSelectHdl() const { return maLBWindow.GetSelectHdl(); }
- void SetCancelHdl( const Link& rLink ) { maLBWindow.SetCancelHdl( rLink ); }
- const Link& GetCancelHdl() const { return maLBWindow.GetCancelHdl(); }
- void SetDoubleClickHdl( const Link& rLink ) { maLBWindow.SetDoubleClickHdl( rLink ); }
- const Link& GetDoubleClickHdl() const { return maLBWindow.GetDoubleClickHdl(); }
+ void SetSelectHdl( const Link& rLink ) { maLBWindow->SetSelectHdl( rLink ); }
+ const Link& GetSelectHdl() const { return maLBWindow->GetSelectHdl(); }
+ void SetCancelHdl( const Link& rLink ) { maLBWindow->SetCancelHdl( rLink ); }
+ const Link& GetCancelHdl() const { return maLBWindow->GetCancelHdl(); }
+ void SetDoubleClickHdl( const Link& rLink ) { maLBWindow->SetDoubleClickHdl( rLink ); }
+ const Link& GetDoubleClickHdl() const { return maLBWindow->GetDoubleClickHdl(); }
boost::signals2::signal< void ( UserDrawEvent* ) > userDrawSignal;
- void SetFocusHdl( const Link& rLink ) { maLBWindow.SetFocusHdl( rLink ); }
- const Link& GetFocusHdl() const { return maLBWindow.GetFocusHdl(); }
- void SetListItemSelectHdl( const Link& rLink ) { maLBWindow.SetListItemSelectHdl( rLink ); }
- const Link& GetListItemSelectHdl() const { return maLBWindow.GetListItemSelectHdl(); }
- void SetSelectionChangedHdl( const Link& rLnk ) { maLBWindow.GetEntryList()->SetSelectionChangedHdl( rLnk ); }
- void SetCallSelectionChangedHdl( bool bCall ) { maLBWindow.GetEntryList()->SetCallSelectionChangedHdl( bCall ); }
- bool IsSelectionChanged() const { return maLBWindow.IsSelectionChanged(); }
- sal_uInt16 GetSelectModifier() const { return maLBWindow.GetSelectModifier(); }
+ void SetFocusHdl( const Link& rLink ) { maLBWindow->SetFocusHdl( rLink ); }
+ const Link& GetFocusHdl() const { return maLBWindow->GetFocusHdl(); }
+ void SetListItemSelectHdl( const Link& rLink ) { maLBWindow->SetListItemSelectHdl( rLink ); }
+ const Link& GetListItemSelectHdl() const { return maLBWindow->GetListItemSelectHdl(); }
+ void SetSelectionChangedHdl( const Link& rLnk ) { maLBWindow->GetEntryList()->SetSelectionChangedHdl( rLnk ); }
+ void SetCallSelectionChangedHdl( bool bCall ) { maLBWindow->GetEntryList()->SetCallSelectionChangedHdl( bCall ); }
+ bool IsSelectionChanged() const { return maLBWindow->IsSelectionChanged(); }
+ sal_uInt16 GetSelectModifier() const { return maLBWindow->GetSelectModifier(); }
void SetMRUEntries( const OUString& rEntries, sal_Unicode cSep );
OUString GetMRUEntries( sal_Unicode cSep ) const;
- void SetMaxMRUCount( sal_Int32 n ) { maLBWindow.GetEntryList()->SetMaxMRUCount( n ); }
- sal_Int32 GetMaxMRUCount() const { return maLBWindow.GetEntryList()->GetMaxMRUCount(); }
+ void SetMaxMRUCount( sal_Int32 n ) { maLBWindow->GetEntryList()->SetMaxMRUCount( n ); }
+ sal_Int32 GetMaxMRUCount() const { return maLBWindow->GetEntryList()->GetMaxMRUCount(); }
sal_uInt16 GetDisplayLineCount() const
- { return maLBWindow.GetDisplayLineCount(); }
+ { return maLBWindow->GetDisplayLineCount(); }
bool GetEdgeBlending() const { return mbEdgeBlending; }
void SetEdgeBlending(bool bNew);
/// pb: #106948# explicit mirroring for calc
- inline void EnableMirroring() { maLBWindow.EnableMirroring(); }
+ inline void EnableMirroring() { maLBWindow->EnableMirroring(); }
inline void SetDropTraget(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& i_xDNDListenerContainer){ mxDNDListenerContainer= i_xDNDListenerContainer; }
};
class ImplListBoxFloatingWindow : public FloatingWindow
{
private:
- ImplListBox* mpImplLB;
+ VclPtr<ImplListBox> mpImplLB;
Size maPrefSz;
sal_uInt16 mnDDLineCount;
sal_Int32 mnPopupModeStartSaveSelection;
@@ -518,7 +520,8 @@ protected:
public:
ImplListBoxFloatingWindow( vcl::Window* pParent );
-
+ virtual ~ImplListBoxFloatingWindow();
+ virtual void dispose() SAL_OVERRIDE;
void SetImplListBox( ImplListBox* pLB ) { mpImplLB = pLB; }
void SetPrefSize( const Size& rSz ) { maPrefSz = rSz; }
@@ -565,7 +568,6 @@ protected:
public:
ImplWin( vcl::Window* pParent, WinBits nWinStyle = 0 );
- virtual ~ImplWin() {};
virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE;
virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE;
@@ -607,7 +609,6 @@ private:
public:
ImplBtn( vcl::Window* pParent, WinBits nWinStyle = 0 );
- virtual ~ImplBtn() {};
virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE;
void MBDown();
diff --git a/vcl/inc/outdev.h b/vcl/inc/outdev.h
index a1e1b850d66c..eae0c597a03b 100644
--- a/vcl/inc/outdev.h
+++ b/vcl/inc/outdev.h
@@ -25,6 +25,7 @@
#include <vector>
#include <tools/gen.hxx>
+#include <vcl/vclptr.hxx>
#include "outfont.hxx"
#include "PhysicalFontFace.hxx"
@@ -164,7 +165,7 @@ namespace basegfx { class B2DHomMatrix; }
struct ImplOutDevData
{
- VirtualDevice* mpRotateDev;
+ VclPtr<VirtualDevice> mpRotateDev;
vcl::ControlLayoutData* mpRecordLayout;
Rectangle maRecordRect;
diff --git a/vcl/inc/printdlg.hxx b/vcl/inc/printdlg.hxx
index fef1da807543..a071c9d5cbac 100644
--- a/vcl/inc/printdlg.hxx
+++ b/vcl/inc/printdlg.hxx
@@ -51,19 +51,20 @@ namespace vcl
GDIMetaFile maMtf;
Size maOrigSize;
Size maPreviewSize;
- VirtualDevice maPageVDev;
+ VclPtr<VirtualDevice> maPageVDev;
Bitmap maPreviewBitmap;
- OUString maReplacementString;
- OUString maToolTipString;
+ OUString maReplacementString;
+ OUString maToolTipString;
bool mbGreyscale;
- FixedLine maHorzDim;
- FixedLine maVertDim;
+ VclPtr<FixedLine> maHorzDim;
+ VclPtr<FixedLine> maVertDim;
void preparePreviewBitmap();
public:
PrintPreviewWindow( vcl::Window* pParent );
virtual ~PrintPreviewWindow();
+ virtual void dispose() SAL_OVERRIDE;
virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE;
virtual void Command( const CommandEvent& ) SAL_OVERRIDE;
@@ -86,7 +87,6 @@ namespace vcl
void ImplInitSettings();
public:
ShowNupOrderWindow( vcl::Window* pParent );
- virtual ~ShowNupOrderWindow();
virtual Size GetOptimalSize() const SAL_OVERRIDE;
@@ -106,31 +106,31 @@ namespace vcl
class NUpTabPage
{
public:
- RadioButton* mpPagesBtn;
- RadioButton* mpBrochureBtn;
- FixedText* mpPagesBoxTitleTxt;
- ListBox* mpNupPagesBox;
+ VclPtr<RadioButton> mpPagesBtn;
+ VclPtr<RadioButton> mpBrochureBtn;
+ VclPtr<FixedText> mpPagesBoxTitleTxt;
+ VclPtr<ListBox> mpNupPagesBox;
// controls for "Custom" page mode
- FixedText* mpNupNumPagesTxt;
- NumericField* mpNupColEdt;
- FixedText* mpNupTimesTxt;
- NumericField* mpNupRowsEdt;
- FixedText* mpPageMarginTxt1;
- MetricField* mpPageMarginEdt;
- FixedText* mpPageMarginTxt2;
- FixedText* mpSheetMarginTxt1;
- MetricField* mpSheetMarginEdt;
- FixedText* mpSheetMarginTxt2;
- FixedText* mpNupOrientationTxt;
- ListBox* mpNupOrientationBox;
+ VclPtr<FixedText> mpNupNumPagesTxt;
+ VclPtr<NumericField> mpNupColEdt;
+ VclPtr<FixedText> mpNupTimesTxt;
+ VclPtr<NumericField> mpNupRowsEdt;
+ VclPtr<FixedText> mpPageMarginTxt1;
+ VclPtr<MetricField> mpPageMarginEdt;
+ VclPtr<FixedText> mpPageMarginTxt2;
+ VclPtr<FixedText> mpSheetMarginTxt1;
+ VclPtr<MetricField> mpSheetMarginEdt;
+ VclPtr<FixedText> mpSheetMarginTxt2;
+ VclPtr<FixedText> mpNupOrientationTxt;
+ VclPtr<ListBox> mpNupOrientationBox;
// page order ("left to right, then down")
- FixedText* mpNupOrderTxt;
- ListBox* mpNupOrderBox;
- ShowNupOrderWindow* mpNupOrderWin;
+ VclPtr<FixedText> mpNupOrderTxt;
+ VclPtr<ListBox> mpNupOrderBox;
+ VclPtr<ShowNupOrderWindow> mpNupOrderWin;
/// border around each page
- CheckBox* mpBorderCB;
+ VclPtr<CheckBox> mpBorderCB;
void setupLayout();
@@ -145,18 +145,18 @@ namespace vcl
class JobTabPage
{
public:
- ListBox* mpPrinters;
- FixedText* mpStatusTxt;
- FixedText* mpLocationTxt;
- FixedText* mpCommentTxt;
+ VclPtr<ListBox> mpPrinters;
+ VclPtr<FixedText> mpStatusTxt;
+ VclPtr<FixedText> mpLocationTxt;
+ VclPtr<FixedText> mpCommentTxt;
- PushButton* mpSetupButton;
+ VclPtr<PushButton> mpSetupButton;
- FixedLine* mpCopySpacer;
- NumericField* mpCopyCountField;
- CheckBox* mpCollateBox;
- FixedImage* mpCollateImage;
- CheckBox* mpReverseOrderBox;
+ VclPtr<FixedLine> mpCopySpacer;
+ VclPtr<NumericField> mpCopyCountField;
+ VclPtr<CheckBox> mpCollateBox;
+ VclPtr<FixedImage> mpCollateImage;
+ VclPtr<CheckBox> mpReverseOrderBox;
Image maCollateImg;
Image maNoCollateImg;
@@ -172,9 +172,9 @@ namespace vcl
class OutputOptPage
{
public:
- CheckBox* mpToFileBox;
- CheckBox* mpCollateSingleJobsBox;
- CheckBox* mpPapersizeFromSetup;
+ VclPtr<CheckBox> mpToFileBox;
+ VclPtr<CheckBox> mpCollateSingleJobsBox;
+ VclPtr<CheckBox> mpPapersizeFromSetup;
OutputOptPage( VclBuilder* );
@@ -185,31 +185,31 @@ namespace vcl
VclBuilder* mpCustomOptionsUIBuilder;
std::shared_ptr<PrinterController> maPController;
- TabControl* mpTabCtrl;
+ VclPtr<TabControl> mpTabCtrl;
NUpTabPage maNUpPage;
JobTabPage maJobPage;
OutputOptPage maOptionsPage;
- PrintPreviewWindow* mpPreviewWindow;
- NumericField* mpPageEdit;
+ VclPtr<PrintPreviewWindow> mpPreviewWindow;
+ VclPtr<NumericField> mpPageEdit;
- FixedText* mpNumPagesText;
- PushButton* mpBackwardBtn;
- PushButton* mpForwardBtn;
+ VclPtr<FixedText> mpNumPagesText;
+ VclPtr<PushButton> mpBackwardBtn;
+ VclPtr<PushButton> mpForwardBtn;
- OKButton* mpOKButton;
- CancelButton* mpCancelButton;
- HelpButton* mpHelpButton;
+ VclPtr<OKButton> mpOKButton;
+ VclPtr<CancelButton> mpCancelButton;
+ VclPtr<HelpButton> mpHelpButton;
- OUString maPageStr;
- OUString maNoPageStr;
+ OUString maPageStr;
+ OUString maNoPageStr;
sal_Int32 mnCurPage;
sal_Int32 mnCachedPages;
- std::map< vcl::Window*, OUString > maControlToPropertyMap;
- std::map< OUString, std::vector< vcl::Window* > >
+ std::map< VclPtr<vcl::Window>, OUString > maControlToPropertyMap;
+ std::map< OUString, std::vector< VclPtr<vcl::Window> > >
maPropertyToWindowMap;
- std::map< vcl::Window*, sal_Int32 > maControlToNumValMap;
- std::set< OUString > maReverseDependencySet;
+ std::map< VclPtr<vcl::Window>, sal_Int32 > maControlToNumValMap;
+ std::set< OUString > maReverseDependencySet;
Size maNupPortraitSize;
Size maNupLandscapeSize;
@@ -258,6 +258,7 @@ namespace vcl
public:
PrintDialog( vcl::Window*, const std::shared_ptr< PrinterController >& );
virtual ~PrintDialog();
+ virtual void dispose() SAL_OVERRIDE;
bool isPrintToFile();
bool isCollate();
@@ -270,9 +271,9 @@ namespace vcl
class PrintProgressDialog : public ModelessDialog
{
OUString maStr;
- FixedText* mpText;
- ProgressBar* mpProgress;
- CancelButton* mpButton;
+ VclPtr<FixedText> mpText;
+ VclPtr<ProgressBar> mpProgress;
+ VclPtr<CancelButton> mpButton;
bool mbCanceled;
sal_Int32 mnCur;
@@ -282,7 +283,8 @@ namespace vcl
public:
PrintProgressDialog(vcl::Window* i_pParent, int i_nMax);
-
+ virtual ~PrintProgressDialog();
+ virtual void dispose() SAL_OVERRIDE;
bool isCanceled() const { return mbCanceled; }
void setProgress( int i_nCurrent, int i_nMax = -1 );
void tick();
diff --git a/vcl/inc/salframe.hxx b/vcl/inc/salframe.hxx
index 6d54ca9a0864..84cd1f53567c 100644
--- a/vcl/inc/salframe.hxx
+++ b/vcl/inc/salframe.hxx
@@ -33,6 +33,8 @@
#include <vcl/impdel.hxx>
#include <rtl/ustring.hxx>
#include <vcl/keycod.hxx>
+#include <vcl/window.hxx>
+#include <vcl/vclptr.hxx>
#include <vcl/window.hxx>
// complete vcl::Window for SalFrame::CallCallback under -fsanitize=function
@@ -100,11 +102,11 @@ class VCL_PLUGIN_PUBLIC SalFrame
, public SalGeometryProvider
{
// the VCL window corresponding to this frame
- vcl::Window* m_pWindow;
+ VclPtr<vcl::Window> m_pWindow;
SALFRAMEPROC m_pProc;
public:
- SalFrame() : m_pWindow( NULL ), m_pProc( NULL ) {}
+ SalFrame();
virtual ~SalFrame();
SalFrameGeometry maGeometry;
@@ -230,8 +232,7 @@ public:
// Callbacks (indepent part in vcl/source/window/winproc.cxx)
// for default message handling return 0
- void SetCallback( vcl::Window* pWindow, SALFRAMEPROC pProc )
- { m_pWindow = pWindow; m_pProc = pProc; }
+ void SetCallback( vcl::Window* pWindow, SALFRAMEPROC pProc );
// returns the instance set
vcl::Window* GetWindow() const { return m_pWindow; }
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index c4da2e8db51c..82ae80ebbde6 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -122,7 +122,7 @@ struct ImplSVAppData
Help* mpHelp; // Application help
PopupMenu* mpActivePopupMenu; // Actives Popup-Menu (in Execute)
ImplIdleMgr* mpIdleMgr; // Idle-Manager
- ImplWheelWindow* mpWheelWindow; // WheelWindow
+ VclPtr<ImplWheelWindow> mpWheelWindow; // WheelWindow
ImplHotKey* mpFirstHotKey; // HotKey-Verwaltung
ImplEventHook* mpFirstEventHook; // Event-Hooks
VclEventListeners2* mpPostYieldListeners; // post yield listeners
@@ -153,18 +153,20 @@ struct ImplSVAppData
struct ImplSVGDIData
{
- OutputDevice* mpFirstWinGraphics; // First OutputDevice with a Frame Graphics
- OutputDevice* mpLastWinGraphics; // Last OutputDevice with a Frame Graphics
- OutputDevice* mpFirstVirGraphics; // First OutputDevice with a VirtualDevice Graphics
- OutputDevice* mpLastVirGraphics; // Last OutputDevice with a VirtualDevice Graphics
- OutputDevice* mpFirstPrnGraphics; // First OutputDevice with a InfoPrinter Graphics
- OutputDevice* mpLastPrnGraphics; // Last OutputDevice with a InfoPrinter Graphics
- VirtualDevice* mpFirstVirDev; // First VirtualDevice
- VirtualDevice* mpLastVirDev; // Last VirtualDevice
+ ~ImplSVGDIData();
+
+ VclPtr<OutputDevice> mpFirstWinGraphics; // First OutputDevice with a Frame Graphics
+ VclPtr<OutputDevice> mpLastWinGraphics; // Last OutputDevice with a Frame Graphics
+ VclPtr<OutputDevice> mpFirstVirGraphics; // First OutputDevice with a VirtualDevice Graphics
+ VclPtr<OutputDevice> mpLastVirGraphics; // Last OutputDevice with a VirtualDevice Graphics
+ VclPtr<OutputDevice> mpFirstPrnGraphics; // First OutputDevice with a InfoPrinter Graphics
+ VclPtr<OutputDevice> mpLastPrnGraphics; // Last OutputDevice with a InfoPrinter Graphics
+ VclPtr<VirtualDevice> mpFirstVirDev; // First VirtualDevice
+ VclPtr<VirtualDevice> mpLastVirDev; // Last VirtualDevice
OpenGLContext* mpFirstContext; // First OpenGLContext
OpenGLContext* mpLastContext; // Last OpenGLContext
- Printer* mpFirstPrinter; // First Printer
- Printer* mpLastPrinter; // Last Printer
+ VclPtr<Printer> mpFirstPrinter; // First Printer
+ VclPtr<Printer> mpLastPrinter; // Last Printer
ImplPrnQueueList* mpPrinterQueueList; // List of all printer queue
PhysicalFontCollection* mpScreenFontList; // Screen-Font-List
ImplFontCache* mpScreenFontCache; // Screen-Font-Cache
@@ -179,20 +181,20 @@ struct ImplSVGDIData
struct ImplSVWinData
{
- vcl::Window* mpFirstFrame; // First FrameWindow
- vcl::Window* mpDefDialogParent; // Default Dialog Parent
- WorkWindow* mpAppWin; // Application-Window
- vcl::Window* mpFocusWin; // window, that has the focus
- vcl::Window* mpActiveApplicationFrame; // the last active application frame, can be used as DefModalDialogParent if no focuswin set
- vcl::Window* mpCaptureWin; // window, that has the mouse capture
- vcl::Window* mpLastDeacWin; // Window, that need a deactivate (FloatingWindow-Handling)
- FloatingWindow* mpFirstFloat; // First FloatingWindow in PopupMode
- Dialog* mpLastExecuteDlg; // First Dialog that is in Execute
- vcl::Window* mpExtTextInputWin; // Window, which is in ExtTextInput
- vcl::Window* mpTrackWin; // window, that is in tracking mode
+ VclPtr<vcl::Window> mpFirstFrame; // First FrameWindow
+ VclPtr<vcl::Window> mpDefDialogParent; // Default Dialog Parent
+ VclPtr<WorkWindow> mpAppWin; // Application-Window
+ VclPtr<vcl::Window> mpFocusWin; // window, that has the focus
+ VclPtr<vcl::Window> mpActiveApplicationFrame; // the last active application frame, can be used as DefModalDialogParent if no focuswin set
+ VclPtr<vcl::Window> mpCaptureWin; // window, that has the mouse capture
+ VclPtr<vcl::Window> mpLastDeacWin; // Window, that need a deactivate (FloatingWindow-Handling)
+ VclPtr<FloatingWindow> mpFirstFloat; // First FloatingWindow in PopupMode
+ VclPtr<Dialog> mpLastExecuteDlg; // First Dialog that is in Execute
+ VclPtr<vcl::Window> mpExtTextInputWin; // Window, which is in ExtTextInput
+ VclPtr<vcl::Window> mpTrackWin; // window, that is in tracking mode
AutoTimer* mpTrackTimer; // tracking timer
ImageList* mpMsgBoxImgList; // ImageList for MessageBox
- vcl::Window* mpAutoScrollWin; // window, that is in AutoScrollMode mode
+ VclPtr<vcl::Window> mpAutoScrollWin; // window, that is in AutoScrollMode mode
sal_uInt16 mnTrackFlags; // tracking flags
sal_uInt16 mnAutoScrollFlags; // auto scroll flags
bool mbNoDeactivate; // true: do not execute Deactivate
@@ -239,7 +241,7 @@ struct ImplSVHelpData
bool mbKeyboardHelp : 1; // tiphelp was activated by keyboard
bool mbAutoHelpId : 1; // generate HelpIds
bool mbRequestingHelp : 1; // In Window::RequestHelp
- HelpTextWindow* mpHelpWin; // HelpWindow
+ VclPtr<HelpTextWindow> mpHelpWin; // HelpWindow
sal_uInt64 mnLastHelpHideTime; // ticks of last show
};
@@ -307,7 +309,7 @@ struct ImplSVData
SalData* mpSalData;
SalInstance* mpDefInst; // Default SalInstance
Application* mpApp; // pApp
- WorkWindow* mpDefaultWin; // Default-Window
+ VclPtr<WorkWindow> mpDefaultWin; // Default-Window
bool mbDeInit; // Is VCL deinitializing
sal_uLong mnThreadCount; // is VCL MultiThread enabled
ImplConfigData* mpFirstConfigData; // pointer to the first config block
@@ -325,7 +327,7 @@ struct ImplSVData
ImplSVHelpData maHelpData; // indepen data for Help classes
ImplSVNWFData maNWFData;
UnoWrapperBase* mpUnoWrapper;
- vcl::Window* mpIntroWindow; // the splash screen
+ VclPtr<vcl::Window> mpIntroWindow; // the splash screen
DockingManager* mpDockingManager;
BlendFrameCache* mpBlendFrameCache;
bool mbIsTestTool;
@@ -372,15 +374,10 @@ FieldUnitStringList* ImplGetCleanedFieldUnits();
struct ImplDelData
{
ImplDelData* mpNext;
- const vcl::Window* mpWindow;
+ VclPtr<vcl::Window> mpWindow;
bool mbDel;
- ImplDelData( const vcl::Window* pWindow = NULL ) :
- mpNext( NULL ),
- mpWindow( NULL ),
- mbDel( false )
- { if( pWindow ) AttachToWindow( pWindow ); }
-
+ ImplDelData( vcl::Window* pWindow = NULL );
virtual ~ImplDelData();
bool IsDead() const
@@ -396,14 +393,14 @@ private:
struct ImplFocusDelData : public ImplDelData
{
- vcl::Window* mpFocusWin;
+ VclPtr<vcl::Window> mpFocusWin;
};
struct ImplSVEvent
{
void* mpData;
Link* mpLink;
- vcl::Window* mpWindow;
+ VclPtr<vcl::Window> mpWindow;
ImplDelData maDelData;
bool mbCall;
};
diff --git a/vcl/inc/toolbox.h b/vcl/inc/toolbox.h
index 935d1184e81c..61d247bd270b 100644
--- a/vcl/inc/toolbox.h
+++ b/vcl/inc/toolbox.h
@@ -37,7 +37,7 @@ namespace vcl { class Window; }
struct ImplToolItem
{
- vcl::Window* mpWindow;
+ VclPtr<vcl::Window> mpWindow;
void* mpUserData;
Image maImage;
Image maImageOriginal;
diff --git a/vcl/inc/unx/i18n_status.hxx b/vcl/inc/unx/i18n_status.hxx
index ee0ff3419bb8..ff954ceb37c4 100644
--- a/vcl/inc/unx/i18n_status.hxx
+++ b/vcl/inc/unx/i18n_status.hxx
@@ -22,6 +22,7 @@
#include <rtl/ustring.hxx>
#include <salimestatus.hxx>
+#include <vcl/vclptr.hxx>
#include <vector>
@@ -57,7 +58,7 @@ public:
};
private:
SalFrame* m_pParent;
- StatusWindow* m_pStatusWindow;
+ VclPtr<StatusWindow> m_pStatusWindow;
OUString m_aCurrentIM;
::std::vector< ChoiceData > m_aChoices;
diff --git a/vcl/inc/window.h b/vcl/inc/window.h
index 75b8f5af3f61..a2066d4bf5b0 100644
--- a/vcl/inc/window.h
+++ b/vcl/inc/window.h
@@ -35,6 +35,7 @@
#include <vcl/timer.hxx>
#include <vcl/idle.hxx>
#include <vcl/vclevent.hxx>
+#include <vcl/vclptr.hxx>
#include <vector>
struct SalPaintEvent;
@@ -114,15 +115,15 @@ struct ImplWinData
sal_uInt16 mnIsTopWindow;
bool mbMouseOver; //< tracks mouse over for native widget paint effect
bool mbEnableNativeWidget; //< toggle native widget rendering
- ::std::list< vcl::Window* >
+ ::std::list< VclPtr<vcl::Window> >
maTopWindowChildren;
};
struct ImplOverlapData
{
- VirtualDevice* mpSaveBackDev; //< saved background bitmap
- vcl::Region* mpSaveBackRgn; //< saved region, which must be invalidated
- vcl::Window* mpNextBackWin; //< next window with saved background
+ VclPtr<VirtualDevice> mpSaveBackDev; //< saved background bitmap
+ vcl::Region* mpSaveBackRgn; //< saved region, which must be invalidated
+ VclPtr<vcl::Window> mpNextBackWin; //< next window with saved background
sal_uIntPtr mnSaveBackSize; //< bitmap size of saved background
bool mbSaveBack; //< true: save background
sal_uInt8 mnTopLevel; //< Level for Overlap-Window
@@ -133,13 +134,13 @@ struct ImplFrameData
Idle maPaintIdle; //< paint idle handler
Idle maResizeIdle; //< resize timer
InputContext maOldInputContext; //< last set Input Context
- vcl::Window* mpNextFrame; //< next frame window
- vcl::Window* mpFirstOverlap; //< first overlap vcl::Window
- vcl::Window* mpFocusWin; //< focus window (is also set, when frame doesn't have the focous)
- vcl::Window* mpMouseMoveWin; //< last window, where MouseMove() called
- vcl::Window* mpMouseDownWin; //< last window, where MouseButtonDown() called
- vcl::Window* mpFirstBackWin; //< first overlap-window with saved background
- ::std::vector<vcl::Window *> maOwnerDrawList; //< List of system windows with owner draw decoration
+ VclPtr<vcl::Window> mpNextFrame; //< next frame window
+ VclPtr<vcl::Window> mpFirstOverlap; //< first overlap vcl::Window
+ VclPtr<vcl::Window> mpFocusWin; //< focus window (is also set, when frame doesn't have the focous)
+ VclPtr<vcl::Window> mpMouseMoveWin; //< last window, where MouseMove() called
+ VclPtr<vcl::Window> mpMouseDownWin; //< last window, where MouseButtonDown() called
+ VclPtr<vcl::Window> mpFirstBackWin; //< first overlap-window with saved background
+ ::std::vector<VclPtr<vcl::Window> > maOwnerDrawList; //< List of system windows with owner draw decoration
PhysicalFontCollection* mpFontCollection; //< Font-List for this frame
ImplFontCache* mpFontCache; //< Font-Cache for this frame
sal_Int32 mnDPIX; //< Original Screen Resolution
@@ -188,9 +189,9 @@ struct ImplAccessibleInfos
sal_uInt16 nAccessibleRole;
OUString* pAccessibleName;
OUString* pAccessibleDescription;
- vcl::Window* pLabeledByWindow;
- vcl::Window* pLabelForWindow;
- vcl::Window* pMemberOfWindow;
+ VclPtr<vcl::Window> pLabeledByWindow;
+ VclPtr<vcl::Window> pLabelForWindow;
+ VclPtr<vcl::Window> pMemberOfWindow;
ImplAccessibleInfos();
~ImplAccessibleInfos();
@@ -212,21 +213,21 @@ public:
ImplFrameData* mpFrameData;
SalFrame* mpFrame;
SalObject* mpSysObj;
- vcl::Window* mpFrameWindow;
- vcl::Window* mpOverlapWindow;
- vcl::Window* mpBorderWindow;
- vcl::Window* mpClientWindow;
- vcl::Window* mpParent;
- vcl::Window* mpRealParent;
- vcl::Window* mpFirstChild;
- vcl::Window* mpLastChild;
- vcl::Window* mpFirstOverlap;
- vcl::Window* mpLastOverlap;
- vcl::Window* mpPrev;
- vcl::Window* mpNext;
- vcl::Window* mpNextOverlap;
- vcl::Window* mpLastFocusWindow;
- vcl::Window* mpDlgCtrlDownWindow;
+ VclPtr<vcl::Window> mpFrameWindow;
+ VclPtr<vcl::Window> mpOverlapWindow;
+ VclPtr<vcl::Window> mpBorderWindow;
+ VclPtr<vcl::Window> mpClientWindow;
+ VclPtr<vcl::Window> mpParent;
+ VclPtr<vcl::Window> mpRealParent;
+ VclPtr<vcl::Window> mpFirstChild;
+ VclPtr<vcl::Window> mpLastChild;
+ VclPtr<vcl::Window> mpFirstOverlap;
+ VclPtr<vcl::Window> mpLastOverlap;
+ VclPtr<vcl::Window> mpPrev;
+ VclPtr<vcl::Window> mpNext;
+ VclPtr<vcl::Window> mpNextOverlap;
+ VclPtr<vcl::Window> mpLastFocusWindow;
+ VclPtr<vcl::Window> mpDlgCtrlDownWindow;
VclEventListeners maEventListeners;
VclEventListeners maChildEventListeners;
@@ -261,8 +262,8 @@ public:
InputContext maInputContext;
::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > mxWindowPeer;
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > mxAccessible;
- std::shared_ptr<VclSizeGroup> m_xSizeGroup;
- std::vector<FixedText*> m_aMnemonicLabels;
+ std::shared_ptr< VclSizeGroup > m_xSizeGroup;
+ std::vector< VclPtr<FixedText> > m_aMnemonicLabels;
ImplAccessibleInfos* mpAccessibleInfos;
VCLXWindow* mpVCLXWindow;
vcl::Region maWinRegion; //< region to 'shape' the VCL window (frame coordinates)
@@ -354,7 +355,7 @@ public:
mbCompoundControlHasFocus:1,
mbPaintDisabled:1,
mbAllResize:1,
- mbInDtor:1,
+ mbInDispose:1,
mbExtTextInput:1,
mbInFocusHdl:1,
mbOverlapVisible:1,