summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compilerplugins/clang/vclwidgets.cxx2
-rw-r--r--extensions/source/propctrlr/standardcontrol.cxx4
-rw-r--r--extensions/source/propctrlr/standardcontrol.hxx2
-rw-r--r--include/svtools/svmedit.hxx1
-rw-r--r--include/vcl/button.hxx13
-rw-r--r--include/vcl/combobox.hxx3
-rw-r--r--include/vcl/dialog.hxx13
-rw-r--r--include/vcl/edit.hxx7
-rw-r--r--include/vcl/fixed.hxx4
-rw-r--r--include/vcl/group.hxx2
-rw-r--r--include/vcl/imgctrl.hxx2
-rw-r--r--include/vcl/layout.hxx33
-rw-r--r--include/vcl/lstbox.hxx1
-rw-r--r--include/vcl/menubtn.hxx2
-rw-r--r--include/vcl/scrbar.hxx2
-rw-r--r--include/vcl/vclmedit.hxx1
-rw-r--r--include/vcl/vclptr.hxx (renamed from include/vcl/vclref.hxx)20
-rw-r--r--include/vcl/window.hxx4
-rw-r--r--sd/source/ui/animations/CustomAnimationDialog.cxx22
-rw-r--r--vcl/inc/printdlg.hxx8
-rw-r--r--vcl/qa/cppunit/lifecycle.cxx34
-rw-r--r--vcl/source/app/dbggui.cxx22
-rw-r--r--vcl/source/control/combobox.cxx2
-rw-r--r--vcl/source/control/edit.cxx4
-rw-r--r--vcl/source/window/dialog.cxx4
-rw-r--r--vcl/source/window/layout.cxx2
-rw-r--r--vcl/source/window/menubarwindow.hxx8
-rw-r--r--vcl/unx/generic/app/i18n_status.cxx4
-rw-r--r--vcl/workben/svpclient.cxx8
29 files changed, 92 insertions, 142 deletions
diff --git a/compilerplugins/clang/vclwidgets.cxx b/compilerplugins/clang/vclwidgets.cxx
index e7de68edd18b..faffbada80c8 100644
--- a/compilerplugins/clang/vclwidgets.cxx
+++ b/compilerplugins/clang/vclwidgets.cxx
@@ -72,7 +72,7 @@ bool VCLWidgets::VisitFieldDecl(const FieldDecl * fieldDecl) {
report(
DiagnosticsEngine::Warning,
- "vcl::Window subclass allocated as a class member, should be allocated via VclReference.",
+ "vcl::Window subclass allocated as a class member, should be allocated via VclPtr.",
fieldDecl->getLocation())
<< fieldDecl->getSourceRange();
return true;
diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx
index 0592b06a5955..9bab3502e305 100644
--- a/extensions/source/propctrlr/standardcontrol.cxx
+++ b/extensions/source/propctrlr/standardcontrol.cxx
@@ -1029,7 +1029,7 @@ namespace pcr
{
SetCompoundControl( true );
- m_pImplEdit = MultiLineEditRef( new MultiLineEdit( this, WB_TABSTOP | WB_IGNORETAB | WB_NOBORDER | (_nStyle & WB_READONLY) ) );
+ m_pImplEdit = VclPtr<MultiLineEdit>( new MultiLineEdit( this, WB_TABSTOP | WB_IGNORETAB | WB_NOBORDER | (_nStyle & WB_READONLY) ) );
SetSubEdit( m_pImplEdit.get() );
m_pImplEdit->Show();
@@ -1064,7 +1064,7 @@ namespace pcr
boost::scoped_ptr<vcl::Window> aTemp(m_pFloatingEdit);
m_pFloatingEdit = NULL;
}
- SetSubEdit(EditRef());
+ SetSubEdit(VclPtr<Edit>());
{
boost::scoped_ptr<vcl::Window> aTemp(m_pDropdownButton);
m_pDropdownButton = NULL;
diff --git a/extensions/source/propctrlr/standardcontrol.hxx b/extensions/source/propctrlr/standardcontrol.hxx
index 8b125633ee2d..17865f84888a 100644
--- a/extensions/source/propctrlr/standardcontrol.hxx
+++ b/extensions/source/propctrlr/standardcontrol.hxx
@@ -375,7 +375,7 @@ namespace pcr
{
private:
OMultilineFloatingEdit* m_pFloatingEdit;
- VclReference<MultiLineEdit> m_pImplEdit;
+ VclPtr<MultiLineEdit> m_pImplEdit;
PushButton* m_pDropdownButton;
MultiLineOperationMode m_nOperationMode;
bool m_bDropdown : 1;
diff --git a/include/svtools/svmedit.hxx b/include/svtools/svmedit.hxx
index 726980fa77d4..0c322f267e04 100644
--- a/include/svtools/svmedit.hxx
+++ b/include/svtools/svmedit.hxx
@@ -35,7 +35,6 @@ public:
virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >
GetComponentInterface(bool bCreate = true) SAL_OVERRIDE;
};
-typedef VclReference<MultiLineEdit> MultiLineEditRef;
#endif // INCLUDED_SVTOOLS_SVMEDIT_HXX
diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx
index 8cc6fe2d14b5..c0f348f6552a 100644
--- a/include/vcl/button.hxx
+++ b/include/vcl/button.hxx
@@ -28,7 +28,7 @@
#include <vcl/bitmap.hxx>
#include <vcl/salnativewidgets.hxx>
#include <rsc/rsc-vcl-shared-types.hxx>
-#include <vcl/vclref.hxx>
+#include <vcl/vclptr.hxx>
#include <vector>
class UserDrawEvent;
@@ -200,8 +200,6 @@ public:
virtual bool set_property(const OString &rKey, const OString &rValue) SAL_OVERRIDE;
};
-typedef VclReference<PushButton> PushButtonPtr;
-
inline void PushButton::Check( bool bCheck )
{
SetState( (bCheck) ? TRISTATE_TRUE : TRISTATE_FALSE );
@@ -228,8 +226,6 @@ public:
virtual void Click() SAL_OVERRIDE;
};
-typedef VclReference<OKButton> OKButtonPtr;
-
class VCL_DLLPUBLIC CancelButton : public PushButton
{
protected:
@@ -246,8 +242,6 @@ public:
virtual void Click() SAL_OVERRIDE;
};
-typedef VclReference<CancelButton> CancelButtonPtr;
-
class VCL_DLLPUBLIC CloseButton : public CancelButton
{
public:
@@ -275,7 +269,6 @@ public:
virtual void Click() SAL_OVERRIDE;
};
-typedef VclReference<HelpButton> HelpButtonPtr;
// - RadioButton -
class VCL_DLLPUBLIC RadioButton : public Button
@@ -499,8 +492,6 @@ public:
virtual bool set_property(const OString &rKey, const OString &rValue) SAL_OVERRIDE;
};
-typedef VclReference<CheckBox> CheckBoxPtr;
-
inline void CheckBox::Check( bool bCheck )
{
SetState( (bCheck) ? TRISTATE_TRUE : TRISTATE_FALSE );
@@ -561,8 +552,6 @@ public:
virtual void KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE;
};
-typedef VclReference<DisclosureButton> DisclosureButtonPtr;
-
#endif // INCLUDED_VCL_BUTTON_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/combobox.hxx b/include/vcl/combobox.hxx
index cde4846bdb2f..8842477a6c40 100644
--- a/include/vcl/combobox.hxx
+++ b/include/vcl/combobox.hxx
@@ -39,7 +39,7 @@ class ImplBtn;
class VCL_DLLPUBLIC ComboBox : public Edit
{
private:
- VclReference<Edit> mpSubEdit;
+ VclPtr<Edit> mpSubEdit;
ImplListBox* mpImplLB;
ImplBtn* mpBtn;
ImplListBoxFloatingWindow* mpFloatWin;
@@ -225,7 +225,6 @@ public:
virtual bool set_property(const OString &rKey, const OString &rValue) SAL_OVERRIDE;
};
-typedef VclReference<ComboBox> ComboBoxPtr;
#endif // _COMBOBOX_HXX
diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx
index 8dad86385b34..bd418e8de2d1 100644
--- a/include/vcl/dialog.hxx
+++ b/include/vcl/dialog.hxx
@@ -24,7 +24,7 @@
#include <vcl/dllapi.h>
#include <vcl/syswin.hxx>
#include <vcl/timer.hxx>
-#include <vcl/vclref.hxx>
+#include <vcl/vclptr.hxx>
// parameter to pass to the dialog constructor if really no parent is wanted
// whereas NULL chooses the default dialog parent
@@ -48,8 +48,8 @@ private:
bool mbInClose;
bool mbModalMode;
- VclReference<VclButtonBox> mpActionArea;
- VclReference<VclBox> mpContentArea;
+ VclPtr<VclButtonBox> mpActionArea;
+ VclPtr<VclBox> mpContentArea;
SAL_DLLPRIVATE void ImplInitDialogData();
SAL_DLLPRIVATE void ImplInitSettings();
@@ -75,8 +75,8 @@ protected:
protected:
friend class VclBuilder;
- void set_action_area(const VclReference<VclButtonBox> &xBox);
- void set_content_area(const VclReference<VclBox> &xBox);
+ void set_action_area(const VclPtr<VclButtonBox> &xBox);
+ void set_content_area(const VclPtr<VclBox> &xBox);
public:
explicit Dialog( vcl::Window* pParent, WinBits nStyle = WB_STDDIALOG );
@@ -122,7 +122,6 @@ public:
void GrabFocusToFirstControl();
};
-typedef VclReference<Dialog> DialogRef;
// - ModelessDialog -
class VCL_DLLPUBLIC ModelessDialog : public Dialog
@@ -133,7 +132,6 @@ class VCL_DLLPUBLIC ModelessDialog : public Dialog
public:
explicit ModelessDialog( vcl::Window* pParent, const OUString& rID, const OUString& rUIXMLDescription );
};
-typedef VclReference<ModelessDialog> ModelessDialogRef;
// - ModalDialog -
class VCL_DLLPUBLIC ModalDialog : public Dialog
@@ -153,7 +151,6 @@ private:
SAL_DLLPRIVATE ModalDialog (const ModalDialog &) SAL_DELETED_FUNCTION;
SAL_DLLPRIVATE ModalDialog & operator= (const ModalDialog &) SAL_DELETED_FUNCTION;
};
-typedef VclReference<ModalDialog> ModalDialogRef;
#endif // INCLUDED_VCL_DIALOG_HXX
diff --git a/include/vcl/edit.hxx b/include/vcl/edit.hxx
index 959a8555095e..34902fb34c6e 100644
--- a/include/vcl/edit.hxx
+++ b/include/vcl/edit.hxx
@@ -28,7 +28,7 @@
#include <vcl/ctrl.hxx>
#include <vcl/menu.hxx>
#include <vcl/dndhelp.hxx>
-#include <vcl/vclref.hxx>
+#include <vcl/vclptr.hxx>
#include <com/sun/star/uno/Reference.h>
namespace com {
@@ -69,7 +69,7 @@ enum AutocompleteAction{ AUTOCOMPLETE_KEYINPUT, AUTOCOMPLETE_TABFORWARD, AUTOCOM
class VCL_DLLPUBLIC Edit : public Control, public vcl::unohelper::DragAndDropClient
{
private:
- VclReference<Edit> mpSubEdit;
+ VclPtr<Edit> mpSubEdit;
Timer* mpUpdateDataTimer;
TextFilter* mpFilterText;
DDInfo* mpDDInfo;
@@ -237,7 +237,7 @@ public:
virtual const Link& GetModifyHdl() const { return maModifyHdl; }
virtual void SetUpdateDataHdl( const Link& rLink ) { maUpdateDataHdl = rLink; }
- void SetSubEdit( VclReference<Edit> pEdit );
+ void SetSubEdit( VclPtr<Edit> pEdit );
Edit* GetSubEdit() const { return mpSubEdit; }
boost::signals2::signal< void ( Edit* ) > autocompleteSignal;
@@ -270,7 +270,6 @@ public:
// global style settings (needed by sc's inputwin.cxx)
static Size GetMinimumEditSize();
};
-typedef VclReference<Edit> EditRef;
#endif // INCLUDED_VCL_EDIT_HXX
diff --git a/include/vcl/fixed.hxx b/include/vcl/fixed.hxx
index e9688d59a2ac..f11f0e03485f 100644
--- a/include/vcl/fixed.hxx
+++ b/include/vcl/fixed.hxx
@@ -83,8 +83,6 @@ public:
vcl::Window* get_mnemonic_widget() const { return m_pMnemonicWindow; }
};
-typedef VclReference<FixedText> FixedTextPtr;
-
class VCL_DLLPUBLIC SelectableFixedText : public Edit
{
public:
@@ -127,8 +125,6 @@ public:
virtual Size GetOptimalSize() const SAL_OVERRIDE;
};
-typedef VclReference<FixedLine> FixedLinePtr;
-
// - FixedBitmap -
class VCL_DLLPUBLIC FixedBitmap : public Control
{
diff --git a/include/vcl/group.hxx b/include/vcl/group.hxx
index 3d6c2a47462a..9e7b933fe228 100644
--- a/include/vcl/group.hxx
+++ b/include/vcl/group.hxx
@@ -55,8 +55,6 @@ public:
virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
};
-typedef VclReference<GroupBox> GroupBoxPtr;
-
#endif // INCLUDED_VCL_GROUP_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/imgctrl.hxx b/include/vcl/imgctrl.hxx
index 8ec454a2a690..753ad9f126d2 100644
--- a/include/vcl/imgctrl.hxx
+++ b/include/vcl/imgctrl.hxx
@@ -51,8 +51,6 @@ protected:
void ImplDraw( OutputDevice& rDev, sal_uLong nDrawFlags, const Point& rPos, const Size& rSize ) const;
};
-typedef VclReference<ImageControl> ImageControlPtr;
-
#endif // INCLUDED_VCL_IMGCTRL_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx
index c0d8c505f581..522b856d9cbc 100644
--- a/include/vcl/layout.hxx
+++ b/include/vcl/layout.hxx
@@ -17,7 +17,7 @@
#include <vcl/scrbar.hxx>
#include <vcl/vclmedit.hxx>
#include <vcl/window.hxx>
-#include <vcl/vclref.hxx>
+#include <vcl/vclptr.hxx>
#include <boost/multi_array.hpp>
#include <set>
@@ -59,7 +59,6 @@ public:
private:
bool m_bLayoutDirty;
};
-typedef VclReference<VclContainer> VclContainerRef;
class VCL_DLLPUBLIC VclBox : public VclContainer
{
@@ -111,7 +110,6 @@ protected:
virtual bool getPrimaryDimensionChildExpand(const vcl::Window &rWindow) const = 0;
};
-typedef VclReference<VclBox> VclBoxRef;
class VCL_DLLPUBLIC VclVBox : public VclBox
{
@@ -159,7 +157,6 @@ protected:
return rWindow.get_expand() || rWindow.get_vexpand();
}
};
-typedef VclReference<VclVBox> VclVBoxRef;
class VCL_DLLPUBLIC VclHBox : public VclBox
{
@@ -207,7 +204,6 @@ protected:
return rWindow.get_expand() || rWindow.get_hexpand();
}
};
-typedef VclReference<VclHBox> VclHBoxRef;
enum VclButtonBoxStyle
{
@@ -253,7 +249,6 @@ private:
Requisition calculatePrimarySecondaryRequisitions() const;
Size addReqGroups(const VclButtonBox::Requisition &rReq) const;
};
-typedef VclReference<VclButtonBox> VclButtonBoxRef;
class VCL_DLLPUBLIC VclVButtonBox : public VclButtonBox
{
@@ -301,7 +296,6 @@ protected:
return rWindow.get_expand() || rWindow.get_vexpand();
}
};
-typedef VclReference<VclVButtonBox> VclVButtonBoxRef;
class VCL_DLLPUBLIC VclHButtonBox : public VclButtonBox
{
@@ -349,7 +343,6 @@ protected:
return rWindow.get_expand() || rWindow.get_hexpand();
}
};
-typedef VclReference<VclHButtonBox> VclHButtonBoxRef;
class VCL_DLLPUBLIC VclGrid : public VclContainer
{
@@ -443,7 +436,6 @@ public:
}
virtual bool set_property(const OString &rKey, const OString &rValue) SAL_OVERRIDE;
};
-typedef VclReference<VclGrid> VclGridRef;
VCL_DLLPUBLIC void setGridAttach(vcl::Window &rWidget, sal_Int32 nLeft, sal_Int32 nTop,
sal_Int32 nWidth = 1, sal_Int32 nHeight = 1);
@@ -460,7 +452,6 @@ public:
virtual Size calculateRequisition() const SAL_OVERRIDE;
virtual void setAllocation(const Size &rAllocation) SAL_OVERRIDE;
};
-typedef VclReference<VclBin> VclBinRef;
class VCL_DLLPUBLIC VclFrame : public VclBin
{
@@ -487,7 +478,6 @@ protected:
virtual void setAllocation(const Size &rAllocation) SAL_OVERRIDE;
virtual OUString getDefaultAccessibleName() const SAL_OVERRIDE;
};
-typedef VclReference<VclFrame> VclFrameRef;
class VCL_DLLPUBLIC VclAlignment : public VclBin
{
@@ -518,7 +508,6 @@ private:
float m_fYAlign;
float m_fYScale;
};
-typedef VclReference<VclAlignment> VclAlignmentRef;
class VCL_DLLPUBLIC VclExpander : public VclBin
{
@@ -559,11 +548,10 @@ protected:
void dispose() SAL_OVERRIDE { m_pDisclosureButton.disposeAndClear(); VclBin::dispose(); }
private:
bool m_bResizeTopLevel;
- DisclosureButtonPtr m_pDisclosureButton;
+ VclPtr<DisclosureButton> m_pDisclosureButton;
Link maExpandedHdl;
DECL_DLLPRIVATE_LINK(ClickHdl, DisclosureButton* pBtn);
};
-typedef VclReference<VclExpander> VclExpanderRef;
class VCL_DLLPUBLIC VclScrolledWindow : public VclBin
{
@@ -587,11 +575,10 @@ protected:
void dispose() SAL_OVERRIDE { m_pVScroll.disposeAndClear(); m_pHScroll.disposeAndClear(); VclBin::dispose(); }
private:
bool m_bUserManagedScrolling;
- ScrollBarPtr m_pVScroll;
- ScrollBarPtr m_pHScroll;
+ VclPtr<ScrollBar> m_pVScroll;
+ VclPtr<ScrollBar> m_pHScroll;
ScrollBarBox m_aScrollBarBox;
};
-typedef VclReference<VclScrolledWindow> VclScrolledWindowRef;
class VCL_DLLPUBLIC VclViewport : public VclBin
{
@@ -603,7 +590,6 @@ public:
protected:
virtual void setAllocation(const Size &rAllocation) SAL_OVERRIDE;
};
-typedef VclReference<VclViewport> VclViewportRef;
//Enforces that its children are always the same size as itself.
//Intercepts any Commands intended for its children.
@@ -648,7 +634,6 @@ public:
virtual void Command(const CommandEvent& rCEvt) SAL_OVERRIDE;
};
-typedef VclReference<VclEventBox> VclEventBoxRef;
enum VclSizeGroupMode
{
@@ -700,7 +685,6 @@ public:
}
bool set_property(const OString &rKey, const OString &rValue);
};
-typedef VclReference<VclSizeGroup> VclSizeGroupRef;
enum VclButtonsType
{
@@ -725,13 +709,13 @@ class VCL_DLLPUBLIC MessageDialog : public Dialog
private:
VclButtonsType m_eButtonsType;
VclMessageType m_eMessageType;
- VclBoxRef m_pOwnedContentArea;
- VclButtonBoxRef m_pOwnedActionArea;
- VclGridRef m_pGrid;
+ VclPtr<VclBox> m_pOwnedContentArea;
+ VclPtr<VclButtonBox> m_pOwnedActionArea;
+ VclPtr<VclGrid> m_pGrid;
FixedImage* m_pImage;
VclMultiLineEdit* m_pPrimaryMessage;
VclMultiLineEdit* m_pSecondaryMessage;
- std::vector<PushButtonPtr> m_aOwnedButtons;
+ std::vector<VclPtr<PushButton> > m_aOwnedButtons;
std::map<const vcl::Window*, short> m_aResponses;
OUString m_sPrimaryString;
OUString m_sSecondaryString;
@@ -764,7 +748,6 @@ public:
static void SetMessagesWidths(vcl::Window *pParent, VclMultiLineEdit *pPrimaryMessage,
VclMultiLineEdit *pSecondaryMessage);
};
-typedef VclReference<MessageDialog> MessageDialogRef;
VCL_DLLPUBLIC Size bestmaxFrameSizeForScreenSize(const Size &rScreenSize);
diff --git a/include/vcl/lstbox.hxx b/include/vcl/lstbox.hxx
index 3e53ab997918..29d219920844 100644
--- a/include/vcl/lstbox.hxx
+++ b/include/vcl/lstbox.hxx
@@ -239,7 +239,6 @@ public:
void EnableQuickSelection( const bool& b );
};
-typedef VclReference<ListBox> ListBoxPtr;
// - MultiListBox -
diff --git a/include/vcl/menubtn.hxx b/include/vcl/menubtn.hxx
index 9159a6d8033e..41e03c6462f9 100644
--- a/include/vcl/menubtn.hxx
+++ b/include/vcl/menubtn.hxx
@@ -82,8 +82,6 @@ public:
const Link& GetSelectHdl() const { return maSelectHdl; }
};
-typedef VclReference<MenuButton> MenuButtonPtr;
-
#endif // INCLUDED_VCL_MENUBTN_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/scrbar.hxx b/include/vcl/scrbar.hxx
index 6255db3b78c8..f3bef63b723a 100644
--- a/include/vcl/scrbar.hxx
+++ b/include/vcl/scrbar.hxx
@@ -141,8 +141,6 @@ public:
virtual Size GetOptimalSize() const SAL_OVERRIDE;
};
-typedef VclReference<ScrollBar> ScrollBarPtr;
-
// - ScrollBarBox -
diff --git a/include/vcl/vclmedit.hxx b/include/vcl/vclmedit.hxx
index 382059b9a420..75f96ed9e65b 100644
--- a/include/vcl/vclmedit.hxx
+++ b/include/vcl/vclmedit.hxx
@@ -130,7 +130,6 @@ public:
virtual bool set_property(const OString &rKey, const OString &rValue) SAL_OVERRIDE;
};
-typedef VclReference<VclMultiLineEdit> VclMultiLineEditRef;
#endif // INCLUDED_VCL_VCLMEDIT_HXX
diff --git a/include/vcl/vclref.hxx b/include/vcl/vclptr.hxx
index 0827af66bdd2..5aa0c6959497 100644
--- a/include/vcl/vclref.hxx
+++ b/include/vcl/vclptr.hxx
@@ -17,8 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_VCL_REFERENCE_HXX
-#define INCLUDED_VCL_REFERENCE_HXX
+#ifndef INCLUDED_VCL_PTR_HXX
+#define INCLUDED_VCL_PTR_HXX
#include <rtl/ref.hxx>
@@ -73,7 +73,7 @@ public:
* @param reference_type must be a subclass of vcl::Window
*/
template <class reference_type>
-class VclReference
+class VclPtr
{
::rtl::Reference<reference_type> m_rInnerRef;
@@ -81,21 +81,21 @@ class VclReference
public:
/** Constructor...
*/
- inline VclReference()
+ inline VclPtr()
: m_rInnerRef()
{}
/** Constructor...
*/
- inline VclReference (reference_type * pBody)
+ inline VclPtr (reference_type * pBody)
: m_rInnerRef(pBody)
{}
/** Copy constructor...
*/
- inline VclReference (const VclReference<reference_type> & handle)
+ inline VclPtr (const VclPtr<reference_type> & handle)
: m_rInnerRef (handle.m_rInnerRef)
{}
@@ -108,8 +108,8 @@ public:
@param rRef another reference
*/
template< class derived_type >
- inline VclReference(
- const VclReference< derived_type > & rRef,
+ inline VclPtr(
+ const VclPtr< derived_type > & rRef,
typename ::vcl::detail::UpCast< reference_type, derived_type >::t = 0 )
: m_rInnerRef( static_cast<reference_type*>(rRef) )
{
@@ -150,8 +150,8 @@ public:
aTmp->dispose();
}
-}; // class VclReference
+}; // class VclPtr
-#endif // INCLUDED_VCL_REFERENCE_HXX
+#endif // INCLUDED_VCL_PTR_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 90c5d858f0eb..904e48117891 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -119,7 +119,7 @@ namespace vcl {
namespace svt { class PopupWindowControllerImpl; }
-template<class T> class VclReference;
+template<class T> class VclPtr;
// - WindowTypes -
@@ -502,7 +502,7 @@ public:
private:
template<typename T> friend class ::rtl::Reference;
- template<typename T> friend class ::VclReference;
+ template<typename T> friend class ::VclPtr;
inline void acquire() const
{
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx
index 6497b0e83c21..db14887a5bef 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -320,7 +320,7 @@ Control* FontPropertyBox::getControl()
class DropdownMenuBox : public Edit
{
public:
- DropdownMenuBox( vcl::Window* pParent, const EditRef &pSubControl, PopupMenu* pMenu );
+ DropdownMenuBox( vcl::Window* pParent, const VclPtr<Edit> &pSubControl, PopupMenu* pMenu );
virtual ~DropdownMenuBox();
void Resize() SAL_OVERRIDE;
@@ -329,12 +329,12 @@ public:
void SetMenuSelectHdl( const Link& rLink ) { mpDropdownButton->SetSelectHdl( rLink ); }
private:
- EditRef mpSubControl;
- MenuButton* mpDropdownButton;
- PopupMenu* mpMenu;
+ VclPtr<Edit> mpSubControl;
+ MenuButton* mpDropdownButton;
+ PopupMenu* mpMenu;
};
-DropdownMenuBox::DropdownMenuBox( vcl::Window* pParent, const EditRef &pSubControl, PopupMenu* pMenu )
+DropdownMenuBox::DropdownMenuBox( vcl::Window* pParent, const VclPtr<Edit> &pSubControl, PopupMenu* pMenu )
: Edit( pParent, WB_BORDER|WB_TABSTOP| WB_DIALOGCONTROL ),
mpSubControl(pSubControl),mpDropdownButton(0),mpMenu(pMenu)
{
@@ -350,7 +350,7 @@ DropdownMenuBox::DropdownMenuBox( vcl::Window* pParent, const EditRef &pSubContr
DropdownMenuBox::~DropdownMenuBox()
{
- SetSubEdit(EditRef());
+ SetSubEdit(VclPtr<Edit>());
delete mpDropdownButton;
delete mpMenu;
}
@@ -406,7 +406,7 @@ public:
private:
DropdownMenuBox* mpControl;
PopupMenu* mpMenu;
- VclReference<MetricField> mpMetric;
+ VclPtr<MetricField> mpMetric;
};
CharHeightPropertyBox::CharHeightPropertyBox( sal_Int32 nControlType, vcl::Window* pParent, const Any& rValue, const Link& rModifyHdl )
@@ -486,7 +486,7 @@ public:
private:
DropdownMenuBox* mpControl;
PopupMenu* mpMenu;
- VclReference<MetricField> mpMetric;
+ VclPtr<MetricField> mpMetric;
Link maModifyHdl;
};
@@ -590,7 +590,7 @@ public:
private:
DropdownMenuBox* mpControl;
PopupMenu* mpMenu;
- VclReference<MetricField> mpMetric;
+ VclPtr<MetricField> mpMetric;
Link maModifyHdl;
};
@@ -715,7 +715,7 @@ public:
private:
DropdownMenuBox* mpControl;
PopupMenu* mpMenu;
- VclReference<MetricField> mpMetric;
+ VclPtr<MetricField> mpMetric;
Link maModifyHdl;
int mnDirection;
};
@@ -877,7 +877,7 @@ public:
private:
DropdownMenuBox* mpControl;
PopupMenu* mpMenu;
- EditRef mpEdit;
+ VclPtr<Edit> mpEdit;
Link maModifyHdl;
float mfFontWeight;
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 );