diff options
author | Noel Grandin <noel@peralex.com> | 2015-01-06 10:29:11 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-09 19:57:33 +0100 |
commit | a632fa5f2e059642f0feffb200e8c9a71ee75802 (patch) | |
tree | ab1c9cc0dee047fd2fa2d050ebeb12c6ab8bb6a9 /vcl | |
parent | 10981bc4e349f59818d8f750db378e1ae579ba09 (diff) |
vcl: rename VclReference to VclPtr
and remove the typedefs. The code is more obvious this way.
Change-Id: I4c8f5b5ab050dd96216302a03e760ed0e3ab3464
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/printdlg.hxx | 8 | ||||
-rw-r--r-- | vcl/qa/cppunit/lifecycle.cxx | 34 | ||||
-rw-r--r-- | vcl/source/app/dbggui.cxx | 22 | ||||
-rw-r--r-- | vcl/source/control/combobox.cxx | 2 | ||||
-rw-r--r-- | vcl/source/control/edit.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/dialog.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/layout.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/menubarwindow.hxx | 8 | ||||
-rw-r--r-- | vcl/unx/generic/app/i18n_status.cxx | 4 | ||||
-rw-r--r-- | vcl/workben/svpclient.cxx | 8 |
10 files changed, 47 insertions, 49 deletions
diff --git a/vcl/inc/printdlg.hxx b/vcl/inc/printdlg.hxx index 52b1cbf5f0f2..bfc8a29e8a74 100644 --- a/vcl/inc/printdlg.hxx +++ b/vcl/inc/printdlg.hxx @@ -53,11 +53,11 @@ namespace vcl Size maPreviewSize; VirtualDevice maPageVDev; Bitmap maPreviewBitmap; - OUString maReplacementString; - OUString maToolTipString; + OUString maReplacementString; + OUString maToolTipString; bool mbGreyscale; - FixedLinePtr maHorzDim; - FixedLinePtr maVertDim; + VclPtr<FixedLine> maHorzDim; + VclPtr<FixedLine> maVertDim; void preparePreviewBitmap(); diff --git a/vcl/qa/cppunit/lifecycle.cxx b/vcl/qa/cppunit/lifecycle.cxx index c4eef2eb2109..8a453d46aeaa 100644 --- a/vcl/qa/cppunit/lifecycle.cxx +++ b/vcl/qa/cppunit/lifecycle.cxx @@ -39,21 +39,21 @@ public: // A compile time sanity check void LifecycleTest::testCast() { - VclReference<PushButton> xButton(new PushButton(NULL, 0)); - VclReference<vcl::Window> xWindow(xButton); + VclPtr<PushButton> xButton(new PushButton(NULL, 0)); + VclPtr<vcl::Window> xWindow(xButton); - VclReference<MetricField> xField(new MetricField(NULL, 0)); - VclReference<SpinField> xSpin(xField); - VclReference<Edit> xEdit(xField); + VclPtr<MetricField> xField(new MetricField(NULL, 0)); + VclPtr<SpinField> xSpin(xField); + VclPtr<Edit> xEdit(xField); // the following line should NOT compile -// VclReference<PushButton> xButton2(xWindow); +// VclPtr<PushButton> xButton2(xWindow); } void LifecycleTest::testMultiDispose() { - VclReference<WorkWindow> xWin(new WorkWindow((vcl::Window *)NULL, - WB_APP|WB_STDWORK)); + VclPtr<WorkWindow> xWin(new WorkWindow((vcl::Window *)NULL, + WB_APP|WB_STDWORK)); CPPUNIT_ASSERT(xWin.get() != NULL); xWin->dispose(); xWin->dispose(); @@ -65,19 +65,19 @@ void LifecycleTest::testMultiDispose() void LifecycleTest::testWidgets(vcl::Window *pParent) { - { PushButtonPtr aPtr(new PushButton(pParent)); } - { OKButtonPtr aPtr(new OKButton(pParent)); } - { CancelButtonPtr aPtr(new CancelButton(pParent)); } - { HelpButtonPtr aPtr(new HelpButton(pParent)); } + { VclPtr<PushButton> aPtr(new PushButton(pParent)); } + { VclPtr<OKButton> aPtr(new OKButton(pParent)); } + { VclPtr<CancelButton> aPtr(new CancelButton(pParent)); } + { VclPtr<HelpButton> aPtr(new HelpButton(pParent)); } // Some widgets really insist on adoption. if (pParent) { - { CheckBoxPtr aPtr(new CheckBox(pParent)); } -// { EditRef aPtr(new Edit(pParent)); } -// { ComboBoxPtr aPtr(new ComboBox(pParent)); } + { VclPtr<CheckBox> aPtr(new CheckBox(pParent)); } +// { VclPtr<Edit> aPtr(new Edit(pParent)); } +// { VclPtr<ComboBox> aPtr(new ComboBox(pParent)); } } -// { RadioButtonPtr aPtr(new RadioButton(pParent)); } +// { VclPtr<RadioButton> aPtr(new RadioButton(pParent)); } } void LifecycleTest::testIsolatedWidgets() @@ -87,7 +87,7 @@ void LifecycleTest::testIsolatedWidgets() void LifecycleTest::testParentedWidgets() { - VclReference<WorkWindow> xWin(new WorkWindow((vcl::Window *)NULL, + VclPtr<WorkWindow> xWin(new WorkWindow((vcl::Window *)NULL, WB_APP|WB_STDWORK)); CPPUNIT_ASSERT(xWin.get() != NULL); testWidgets(xWin); diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx index 0cca9cbbd62c..6dfe9b063af2 100644 --- a/vcl/source/app/dbggui.cxx +++ b/vcl/source/app/dbggui.cxx @@ -207,9 +207,9 @@ NULL class DbgInfoDialog : public ModalDialog { private: - ListBoxPtr maListBox; - OKButtonPtr maOKButton; - bool mbHelpText; + VclPtr<ListBox> maListBox; + VclPtr<OKButton> maOKButton; + bool mbHelpText; public: DbgInfoDialog( vcl::Window* pParent, bool bHelpText = false ); @@ -222,14 +222,14 @@ private: class DbgDialog : public ModalDialog { private: - CheckBoxPtr maRes; - CheckBoxPtr maDialog; - CheckBoxPtr maBoldAppFont; - GroupBoxPtr maBox3; - - OKButtonPtr maOKButton; - CancelButtonPtr maCancelButton; - HelpButtonPtr maHelpButton; + VclPtr<CheckBox> maRes; + VclPtr<CheckBox> maDialog; + VclPtr<CheckBox> maBoldAppFont; + VclPtr<GroupBox> maBox3; + + VclPtr<OKButton> maOKButton; + VclPtr<CancelButton> maCancelButton; + VclPtr<HelpButton> maHelpButton; public: DbgDialog(); diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index 3866d99a219e..4a4de5cd842d 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -68,7 +68,7 @@ ComboBox::ComboBox( vcl::Window* pParent, const ResId& rResId ) : ComboBox::~ComboBox() { - SetSubEdit(VclReference<Edit>()); + SetSubEdit(VclPtr<Edit>()); ImplListBox *pImplLB = mpImplLB; mpImplLB = NULL; diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index d748ee1d37bd..4b7e27132c3c 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -285,7 +285,7 @@ void Edit::dispose() void Edit::ImplInitEditData() { - mpSubEdit = EditRef(); + mpSubEdit = VclPtr<Edit>(); mpUpdateDataTimer = NULL; mpFilterText = NULL; mnXOffset = 0; @@ -2706,7 +2706,7 @@ void Edit::ClearModifyFlag() mbModified = false; } -void Edit::SetSubEdit( VclReference<Edit> pEdit ) +void Edit::SetSubEdit( VclPtr<Edit> pEdit ) { mpSubEdit.disposeAndClear(); mpSubEdit = pEdit; diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index 51445a0747e6..771563f1a536 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -509,12 +509,12 @@ Dialog::Dialog(vcl::Window* pParent, WinBits nStyle) ImplInit( pParent, nStyle ); } -void Dialog::set_action_area(const VclButtonBoxRef &xBox) +void Dialog::set_action_area(const VclPtr<VclButtonBox> &xBox) { mpActionArea = xBox; } -void Dialog::set_content_area(const VclBoxRef &xBox) +void Dialog::set_content_area(const VclPtr<VclBox> &xBox) { mpContentArea = xBox; } diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index 79f8f67cc06e..d79abdee7575 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -2159,7 +2159,7 @@ short MessageDialog::Execute() VclButtonBox *pButtonBox = get_action_area(); assert(pButtonBox); - PushButtonPtr pBtn; + VclPtr<PushButton> pBtn; switch (m_eButtonsType) { case VCL_BUTTONS_NONE: diff --git a/vcl/source/window/menubarwindow.hxx b/vcl/source/window/menubarwindow.hxx index b34784780ebc..8b2e14d36fac 100644 --- a/vcl/source/window/menubarwindow.hxx +++ b/vcl/source/window/menubarwindow.hxx @@ -52,8 +52,6 @@ public: Image maImage; }; -typedef VclReference<DecoToolBox> DecoToolBoxPtr; - /** Class that implements the actual window of the menu bar. */ @@ -81,9 +79,9 @@ private: bool bIgnoreFirstMove; bool bStayActive; - DecoToolBoxPtr aCloseBtn; - PushButtonPtr aFloatBtn; - PushButtonPtr aHideBtn; + VclPtr<DecoToolBox> aCloseBtn; + VclPtr<PushButton> aFloatBtn; + VclPtr<PushButton> aHideBtn; std::map< sal_uInt16, AddButtonEntry > m_aAddButtons; diff --git a/vcl/unx/generic/app/i18n_status.cxx b/vcl/unx/generic/app/i18n_status.cxx index 684a4ee8fa1d..b779c52716db 100644 --- a/vcl/unx/generic/app/i18n_status.cxx +++ b/vcl/unx/generic/app/i18n_status.cxx @@ -77,7 +77,7 @@ namespace vcl { class XIMStatusWindow : public StatusWindow { - FixedTextPtr m_aStatusText; + VclPtr<FixedText> m_aStatusText; SalFrame* m_pLastParent; Size m_aWindowSize; bool m_bAnchoredAtRight; @@ -302,7 +302,7 @@ namespace vcl { class IIIMPStatusWindow : public StatusWindow { - MenuButtonPtr m_aStatusBtn; + VclPtr<MenuButton> m_aStatusBtn; PopupMenu m_aMenu; SalFrame* m_pResetFocus; bool m_bShow; diff --git a/vcl/workben/svpclient.cxx b/vcl/workben/svpclient.cxx index b3ad5db2694f..708efb9144d3 100644 --- a/vcl/workben/svpclient.cxx +++ b/vcl/workben/svpclient.cxx @@ -92,10 +92,10 @@ SAL_IMPLEMENT_MAIN() class MyWin : public WorkWindow { - PushButtonPtr m_aListButton; - ListBoxPtr m_aSvpBitmaps; - ImageControlPtr m_aImage; - PushButtonPtr m_aQuitButton; + VclPtr<PushButton> m_aListButton; + VclPtr<ListBox> m_aSvpBitmaps; + VclPtr<ImageControl> m_aImage; + VclPtr<PushButton> m_aQuitButton; public: MyWin( vcl::Window* pParent, WinBits nWinStyle ); |