diff options
author | Noel Grandin <noel@peralex.com> | 2014-09-26 15:19:06 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-09-29 12:50:35 +0200 |
commit | 0ecf6afbd104b53836c7a4d45fbc2a6ce1e356e0 (patch) | |
tree | a1253c850347f9df39254fe9cf82b6ebf39d73f0 /include | |
parent | c353caee1c86476d98cd483f963f63c4195975f4 (diff) |
loplugin: cstylecast
Change-Id: Iea517d2287bded4a702c73dfdd1f182023425d67
Diffstat (limited to 'include')
-rw-r--r-- | include/svtools/editbrowsebox.hxx | 9 | ||||
-rw-r--r-- | include/svtools/grfmgr.hxx | 8 | ||||
-rw-r--r-- | include/toolkit/awt/vclxwindow.hxx | 4 |
3 files changed, 12 insertions, 9 deletions
diff --git a/include/svtools/editbrowsebox.hxx b/include/svtools/editbrowsebox.hxx index db10afd92f49..cb696925e260 100644 --- a/include/svtools/editbrowsebox.hxx +++ b/include/svtools/editbrowsebox.hxx @@ -27,6 +27,7 @@ #include <vcl/window.hxx> #include <vcl/combobox.hxx> #include <vcl/lstbox.hxx> +#include <vcl/spinfld.hxx> #include <vcl/button.hxx> #include <svtools/brwbox.hxx> @@ -256,7 +257,8 @@ namespace svt public: TYPEINFO_OVERRIDE(); SpinCellController(SpinField* pSpinField); - SpinField& GetSpinWindow() const {return (SpinField &)GetWindow();} + const SpinField& GetSpinWindow() const { return static_cast<const SpinField &>(GetWindow()); } + SpinField& GetSpinWindow() { return static_cast<SpinField &>(GetWindow()); } virtual void SetModified() SAL_OVERRIDE; virtual bool IsModified() const SAL_OVERRIDE; @@ -342,7 +344,7 @@ namespace svt TYPEINFO_OVERRIDE(); ComboBoxCellController(ComboBoxControl* pParent); - ComboBoxControl& GetComboBox() const {return (ComboBoxControl &)GetWindow();} + ComboBoxControl& GetComboBox() const { return static_cast<ComboBoxControl &>(GetWindow()); } virtual bool IsModified() const SAL_OVERRIDE; virtual void ClearModified() SAL_OVERRIDE; @@ -375,7 +377,8 @@ namespace svt TYPEINFO_OVERRIDE(); ListBoxCellController(ListBoxControl* pParent); - ListBoxControl& GetListBox() const {return (ListBoxControl &)GetWindow();} + const ListBoxControl& GetListBox() const { return static_cast<const ListBoxControl &>(GetWindow()); } + ListBoxControl& GetListBox() { return static_cast<ListBoxControl &>(GetWindow()); } virtual bool IsModified() const SAL_OVERRIDE; virtual void ClearModified() SAL_OVERRIDE; diff --git a/include/svtools/grfmgr.hxx b/include/svtools/grfmgr.hxx index 4ef7e10f3b32..bca790be0472 100644 --- a/include/svtools/grfmgr.hxx +++ b/include/svtools/grfmgr.hxx @@ -33,10 +33,10 @@ // AutoSwap defines -#define GRFMGR_AUTOSWAPSTREAM_LINK ((SvStream*)0x00000000UL) -#define GRFMGR_AUTOSWAPSTREAM_LOADED ((SvStream*)0xfffffffdUL) -#define GRFMGR_AUTOSWAPSTREAM_TEMP ((SvStream*)0xfffffffeUL) -#define GRFMGR_AUTOSWAPSTREAM_NONE ((SvStream*)0xffffffffUL) +#define GRFMGR_AUTOSWAPSTREAM_LINK (reinterpret_cast<SvStream*>(0x00000000UL)) +#define GRFMGR_AUTOSWAPSTREAM_LOADED (reinterpret_cast<SvStream*>(0xfffffffdUL)) +#define GRFMGR_AUTOSWAPSTREAM_TEMP (reinterpret_cast<SvStream*>(0xfffffffeUL)) +#define GRFMGR_AUTOSWAPSTREAM_NONE (reinterpret_cast<SvStream*>(0xffffffffUL)) // Adjustment defines diff --git a/include/toolkit/awt/vclxwindow.hxx b/include/toolkit/awt/vclxwindow.hxx index f3f1e133bd53..6306ce6717e3 100644 --- a/include/toolkit/awt/vclxwindow.hxx +++ b/include/toolkit/awt/vclxwindow.hxx @@ -23,6 +23,7 @@ #include <toolkit/dllapi.h> #include <toolkit/awt/vclxdevice.hxx> #include <toolkit/helper/listenermultiplexer.hxx> +#include <vcl/window.hxx> #include <com/sun/star/awt/XWindow2.hpp> #include <com/sun/star/awt/XVclWindowPeer.hpp> @@ -46,7 +47,6 @@ #include <list> #include <boost/function.hpp> -namespace vcl { class Window; } class VclSimpleEvent; class VclWindowEvent; struct SystemParentData; @@ -129,7 +129,7 @@ public: virtual ~VCLXWindow(); virtual void SetWindow( vcl::Window* pWindow ); - vcl::Window* GetWindow() const { return (vcl::Window*)GetOutputDevice(); } + vcl::Window* GetWindow() const { return static_cast<vcl::Window*>(GetOutputDevice()); } void suspendVclEventListening( ); void resumeVclEventListening( ); |