[Libreoffice-commits] core.git: Branch 'feature/vclref' - compilerplugins/clang extensions/source include/svtools include/vcl sd/source vcl/inc vcl/qa vcl/source vcl/unx vcl/workben
Noel Grandin
noel at peralex.com
Tue Jan 6 07:38:03 PST 2015
compilerplugins/clang/vclwidgets.cxx | 2
extensions/source/propctrlr/standardcontrol.cxx | 4
extensions/source/propctrlr/standardcontrol.hxx | 2
include/svtools/svmedit.hxx | 1
include/vcl/button.hxx | 14 -
include/vcl/combobox.hxx | 3
include/vcl/dialog.hxx | 13 -
include/vcl/edit.hxx | 7
include/vcl/fixed.hxx | 4
include/vcl/group.hxx | 2
include/vcl/imgctrl.hxx | 2
include/vcl/layout.hxx | 33 +---
include/vcl/lstbox.hxx | 1
include/vcl/menubtn.hxx | 2
include/vcl/scrbar.hxx | 2
include/vcl/vclmedit.hxx | 1
include/vcl/vclptr.hxx | 157 ++++++++++++++++++++++
include/vcl/vclref.hxx | 157 ----------------------
include/vcl/window.hxx | 4
sd/source/ui/animations/CustomAnimationDialog.cxx | 22 +--
vcl/inc/printdlg.hxx | 8 -
vcl/qa/cppunit/lifecycle.cxx | 34 ++--
vcl/source/app/dbggui.cxx | 22 +--
vcl/source/control/combobox.cxx | 2
vcl/source/control/edit.cxx | 4
vcl/source/window/dialog.cxx | 4
vcl/source/window/layout.cxx | 2
vcl/source/window/menubarwindow.hxx | 8 -
vcl/unx/generic/app/i18n_status.cxx | 4
vcl/workben/svpclient.cxx | 8 -
30 files changed, 239 insertions(+), 290 deletions(-)
New commits:
commit f0996e0435aa918d7814c4db9a70e2cac2ee5eab
Author: Noel Grandin <noel at peralex.com>
Date: Tue Jan 6 10:29:11 2015 +0200
vcl: rename VclReference to VclPtr
and remove the typedefs. The code is more obvious this way.
Change-Id: I4c8f5b5ab050dd96216302a03e760ed0e3ab3464
diff --git a/compilerplugins/clang/vclwidgets.cxx b/compilerplugins/clang/vclwidgets.cxx
index e7de68e..faffbad 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 d0ca9e7..071ea12 100644
--- a/extensions/source/propctrlr/standardcontrol.cxx
+++ b/extensions/source/propctrlr/standardcontrol.cxx
@@ -1031,7 +1031,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();
@@ -1066,7 +1066,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 6fae7db..31a5aa2 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 726980f..0c322f2 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 65c586d..bbea9d7 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;
@@ -202,8 +202,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 );
@@ -231,8 +229,6 @@ public:
virtual void Click() SAL_OVERRIDE;
};
-typedef VclReference<OKButton> OKButtonPtr;
-
class VCL_DLLPUBLIC CancelButton : public PushButton
{
protected:
@@ -250,8 +246,6 @@ public:
virtual void Click() SAL_OVERRIDE;
};
-typedef VclReference<CancelButton> CancelButtonPtr;
-
class VCL_DLLPUBLIC CloseButton : public CancelButton
{
public:
@@ -280,11 +274,9 @@ public:
virtual void Click() SAL_OVERRIDE;
};
-typedef VclReference<HelpButton> HelpButtonPtr;
// - RadioButton -
-
class VCL_DLLPUBLIC RadioButton : public Button
{
private:
@@ -508,8 +500,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 );
@@ -573,8 +563,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 5f5f6ea..99db232 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;
@@ -224,7 +224,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 c87adad..832c239 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();
@@ -76,8 +76,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 );
@@ -123,7 +123,6 @@ public:
void GrabFocusToFirstControl();
};
-typedef VclReference<Dialog> DialogRef;
// - ModelessDialog -
class VCL_DLLPUBLIC ModelessDialog : public Dialog
@@ -135,7 +134,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
@@ -156,7 +154,6 @@ private:
SAL_DLLPRIVATE ModalDialog (const ModalDialog &);
SAL_DLLPRIVATE ModalDialog & operator= (const ModalDialog &);
};
-typedef VclReference<ModalDialog> ModalDialogRef;
#endif // INCLUDED_VCL_DIALOG_HXX
diff --git a/include/vcl/edit.hxx b/include/vcl/edit.hxx
index 62d0730..ff9d2a0 100644
--- a/include/vcl/edit.hxx
+++ b/include/vcl/edit.hxx
@@ -27,7 +27,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 {
@@ -68,7 +68,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;
@@ -236,7 +236,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;
@@ -269,7 +269,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 54b9f19..a5069fc 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 3d6c2a4..9e7b933 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 8ec454a..753ad9f 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 d8d5e5f0..ed84144 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 d1b0e41..621b571 100644
--- a/include/vcl/lstbox.hxx
+++ b/include/vcl/lstbox.hxx
@@ -238,7 +238,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 9274ff5..83087ab 100644
--- a/include/vcl/menubtn.hxx
+++ b/include/vcl/menubtn.hxx
@@ -83,8 +83,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 47a8544..65bbca0 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 751a627..b8b5933 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
similarity index 92%
rename from include/vcl/vclref.hxx
rename to include/vcl/vclptr.hxx
index 0827af6..5aa0c69 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 b13d0ad..2d8818e 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -118,7 +118,7 @@ namespace vcl {
namespace svt { class PopupWindowControllerImpl; }
-template<class T> class VclReference;
+template<class T> class VclPtr;
// - WindowTypes -
@@ -487,7 +487,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 90a2dad..a96334a 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 31b2968..fc4683a 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 c4eef2e..8a453d4 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 bc6a2d1..936d57c 100644
--- a/vcl/source/app/dbggui.cxx
+++ b/vcl/source/app/dbggui.cxx
@@ -208,9 +208,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 );
@@ -223,14 +223,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 39c382f..0a1674f 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 1d157d4..ab3b1f0 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 29dc077..62f612f 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -513,12 +513,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 2500329..820ad29 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 b347847..8b2e14d 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 f9ecc21..2095491 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 86704e2..8d763a0 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 );
More information about the Libreoffice-commits
mailing list