diff options
author | Uray M. János <uray.janos@gmail.com> | 2012-08-07 14:33:56 +0200 |
---|---|---|
committer | Tor Lillqvist <tlillqvist@suse.com> | 2012-08-07 16:00:14 +0300 |
commit | 51bb488ac1b3e0c18947d6c68be6b577106f27d9 (patch) | |
tree | 3b139929d7319f4a32f6116850e0a2dac4a48538 /basctl/source/basicide/tbxctl.cxx | |
parent | 69a70bf0285e8dfdbba10694fe56bbc80f0fdae0 (diff) |
IDE: PTR_CAST, ISA to dynamic_cast
Convert the obsolete PTR_CAST and ISA macros (from tools/rtti.hxx) to
C++ dynamic_cast is basctl.
Change-Id: I45530d1d34d132904f812e238ee3b59b1a4f227b
Diffstat (limited to 'basctl/source/basicide/tbxctl.cxx')
-rw-r--r-- | basctl/source/basicide/tbxctl.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/basctl/source/basicide/tbxctl.cxx b/basctl/source/basicide/tbxctl.cxx index 171fa00f51c7..a80381b276de 100644 --- a/basctl/source/basicide/tbxctl.cxx +++ b/basctl/source/basicide/tbxctl.cxx @@ -67,12 +67,10 @@ void TbxControls::StateChanged( sal_uInt16 nSID, SfxItemState eState, { if( pState ) { - SfxAllEnumItem* pItem = PTR_CAST(SfxAllEnumItem, pState); - if( pItem ) + if (SfxAllEnumItem* pItem = dynamic_cast<SfxAllEnumItem*>(pState)) { - sal_uInt16 nLastEnum = pItem->GetValue(); sal_uInt16 nTemp = 0; - switch( nLastEnum ) + switch (sal_uInt16 nLastEnum = pItem->GetValue()) { case SVX_SNAP_PUSHBUTTON: nTemp = SID_INSERT_PUSHBUTTON; break; case SVX_SNAP_CHECKBOX: nTemp = SID_INSERT_CHECKBOX; break; |