summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-06-08 16:25:25 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-06-08 16:25:25 +0200
commita1a5588b1b440836a6655ab0af5f854f3f5eb5ed (patch)
treebf96e680ee4b939a0a584d96140b2bf50e1776b6
parent648cf9a56dcb11d2674c48e77672cc124aad1bce (diff)
loplugin:cstylecast: deal with remaining pointer casts
Change-Id: I4a72a60d621c65e63310ef70b991f9c86f00494d
-rw-r--r--framework/source/classes/menumanager.cxx2
-rw-r--r--framework/source/dispatch/menudispatcher.cxx10
-rw-r--r--framework/source/dispatch/popupmenudispatcher.cxx4
-rw-r--r--framework/source/fwe/classes/actiontriggercontainer.cxx8
-rw-r--r--framework/source/fwe/classes/rootactiontriggercontainer.cxx10
-rw-r--r--framework/source/fwe/helper/actiontriggerhelper.cxx4
-rw-r--r--framework/source/fwe/helper/propertysetcontainer.cxx12
-rw-r--r--framework/source/fwe/xml/menudocumenthandler.cxx8
-rw-r--r--framework/source/fwe/xml/statusbardocumenthandler.cxx6
-rw-r--r--framework/source/fwe/xml/toolboxdocumenthandler.cxx6
-rw-r--r--framework/source/fwi/uielement/constitemcontainer.cxx2
-rw-r--r--framework/source/fwi/uielement/itemcontainer.cxx12
-rw-r--r--framework/source/fwi/uielement/rootitemcontainer.cxx16
-rw-r--r--framework/source/helper/ocomponentaccess.cxx2
-rw-r--r--framework/source/helper/oframes.cxx2
-rw-r--r--framework/source/layoutmanager/layoutmanager.cxx2
-rw-r--r--framework/source/services/substitutepathvars.cxx8
-rw-r--r--framework/source/tabwin/tabwindow.cxx2
-rw-r--r--framework/source/uielement/addonstoolbarwrapper.cxx2
-rw-r--r--framework/source/uielement/controlmenucontroller.cxx4
-rw-r--r--framework/source/uielement/fontmenucontroller.cxx4
-rw-r--r--framework/source/uielement/fontsizemenucontroller.cxx4
-rw-r--r--framework/source/uielement/headermenucontroller.cxx4
-rw-r--r--framework/source/uielement/langselectionmenucontroller.cxx4
-rw-r--r--framework/source/uielement/macrosmenucontroller.cxx4
-rw-r--r--framework/source/uielement/menubarmanager.cxx10
-rw-r--r--framework/source/uielement/newmenucontroller.cxx4
-rw-r--r--framework/source/uielement/objectmenucontroller.cxx4
-rw-r--r--framework/source/uielement/recentfilesmenucontroller.cxx4
-rw-r--r--framework/source/uielement/statusbarwrapper.cxx2
-rw-r--r--framework/source/uielement/toolbarsmenucontroller.cxx6
-rw-r--r--framework/source/uielement/toolbarwrapper.cxx2
-rw-r--r--framework/source/uifactory/addonstoolbarfactory.cxx2
-rw-r--r--framework/source/xml/imagesdocumenthandler.cxx10
34 files changed, 93 insertions, 93 deletions
diff --git a/framework/source/classes/menumanager.cxx b/framework/source/classes/menumanager.cxx
index 95ca5babe51d..7ae1e2caaf70 100644
--- a/framework/source/classes/menumanager.cxx
+++ b/framework/source/classes/menumanager.cxx
@@ -274,7 +274,7 @@ MenuManager::~MenuManager()
MenuItemHandler* pItemHandler = *p;
pItemHandler->xMenuItemDispatch.clear();
if ( pItemHandler->pSubMenuManager )
- (static_cast< XInterface* >((OWeakObject*)pItemHandler->pSubMenuManager))->release();
+ (static_cast< XInterface* >(static_cast<OWeakObject*>(pItemHandler->pSubMenuManager)))->release();
delete pItemHandler;
}
diff --git a/framework/source/dispatch/menudispatcher.cxx b/framework/source/dispatch/menudispatcher.cxx
index 58b373f6ee4c..7c5649b382e6 100644
--- a/framework/source/dispatch/menudispatcher.cxx
+++ b/framework/source/dispatch/menudispatcher.cxx
@@ -74,7 +74,7 @@ MenuDispatcher::MenuDispatcher( const uno::Reference< XComponentContext >&
SAL_WARN_IF( !( xContext.is() && xOwner.is() ), "fwk", "MenuDispatcher::MenuDispatcher()\nInvalid parameter detected!" );
m_bActivateListener = true;
- xOwner->addFrameActionListener( uno::Reference< XFrameActionListener >( (OWeakObject *)this, UNO_QUERY ));
+ xOwner->addFrameActionListener( uno::Reference< XFrameActionListener >( static_cast<OWeakObject *>(this), UNO_QUERY ));
}
// destructor
@@ -172,7 +172,7 @@ void SAL_CALL MenuDispatcher::disposing( const EventObject& ) throw( RuntimeExce
uno::Reference< XFrame > xFrame( m_xOwnerWeak.get(), UNO_QUERY );
if ( xFrame.is() )
{
- xFrame->removeFrameActionListener( uno::Reference< XFrameActionListener >( (OWeakObject *)this, UNO_QUERY ));
+ xFrame->removeFrameActionListener( uno::Reference< XFrameActionListener >( static_cast<OWeakObject *>(this), UNO_QUERY ));
m_bActivateListener = false;
if ( m_pMenuManager )
{
@@ -199,7 +199,7 @@ void MenuDispatcher::impl_setAccelerators( Menu* pMenu, const Accelerator& aAcce
sal_uInt16 nId = pMenu->GetItemId(nPos);
::PopupMenu* pPopup = pMenu->GetPopupMenu(nId);
if ( pPopup )
- impl_setAccelerators( (Menu *)pPopup, aAccel );
+ impl_setAccelerators( static_cast<Menu *>(pPopup), aAccel );
else if ( nId && !pMenu->GetPopupMenu(nId))
{
vcl::KeyCode aCode = aAccel.GetKeyCode( nId );
@@ -231,13 +231,13 @@ bool MenuDispatcher::impl_setMenuBar( MenuBar* pMenuBar, bool bMenuFromResource
if ( m_pMenuManager )
{
// remove old menu from our system window if it was set before
- if ( m_pMenuManager->GetMenu() == (Menu *)pSysWindow->GetMenuBar() )
+ if ( m_pMenuManager->GetMenu() == static_cast<Menu *>(pSysWindow->GetMenuBar()) )
pSysWindow->SetMenuBar( NULL );
// remove listener before we destruct ourself, so we cannot be called back afterwards
m_pMenuManager->RemoveListener();
- (static_cast< ::com::sun::star::uno::XInterface* >((OWeakObject*)m_pMenuManager))->release();
+ (static_cast< ::com::sun::star::uno::XInterface* >(static_cast<OWeakObject*>(m_pMenuManager)))->release();
m_pMenuManager = 0;
}
diff --git a/framework/source/dispatch/popupmenudispatcher.cxx b/framework/source/dispatch/popupmenudispatcher.cxx
index 388ff0178bbc..7e7b569ad194 100644
--- a/framework/source/dispatch/popupmenudispatcher.cxx
+++ b/framework/source/dispatch/popupmenudispatcher.cxx
@@ -152,7 +152,7 @@ throw( css::uno::Exception, css::uno::RuntimeException, std::exception)
m_bActivateListener = true;
uno::Reference< css::frame::XFrameActionListener > xFrameActionListener(
- (OWeakObject *)this, css::uno::UNO_QUERY );
+ static_cast<OWeakObject *>(this), css::uno::UNO_QUERY );
xFrame->addFrameActionListener( xFrameActionListener );
}
}
@@ -291,7 +291,7 @@ void SAL_CALL PopupMenuDispatcher::disposing( const EventObject& ) throw( Runtim
uno::Reference< XFrame > xFrame( m_xWeakFrame.get(), UNO_QUERY );
if ( xFrame.is() )
{
- xFrame->removeFrameActionListener( uno::Reference< XFrameActionListener >( (OWeakObject *)this, UNO_QUERY ));
+ xFrame->removeFrameActionListener( uno::Reference< XFrameActionListener >( static_cast<OWeakObject *>(this), UNO_QUERY ));
m_bActivateListener = false;
}
}
diff --git a/framework/source/fwe/classes/actiontriggercontainer.cxx b/framework/source/fwe/classes/actiontriggercontainer.cxx
index 187bf24ab620..7cc366ff72f3 100644
--- a/framework/source/fwe/classes/actiontriggercontainer.cxx
+++ b/framework/source/fwe/classes/actiontriggercontainer.cxx
@@ -74,13 +74,13 @@ Reference< XInterface > SAL_CALL ActionTriggerContainer::createInstance( const O
throw ( ::com::sun::star::uno::Exception, RuntimeException, std::exception)
{
if ( aServiceSpecifier == SERVICENAME_ACTIONTRIGGER )
- return (OWeakObject *)( new ActionTriggerPropertySet());
+ return static_cast<OWeakObject *>( new ActionTriggerPropertySet());
else if ( aServiceSpecifier == SERVICENAME_ACTIONTRIGGERCONTAINER )
- return (OWeakObject *)( new ActionTriggerContainer());
+ return static_cast<OWeakObject *>( new ActionTriggerContainer());
else if ( aServiceSpecifier == SERVICENAME_ACTIONTRIGGERSEPARATOR )
- return (OWeakObject *)( new ActionTriggerSeparatorPropertySet());
+ return static_cast<OWeakObject *>( new ActionTriggerSeparatorPropertySet());
else
- throw com::sun::star::uno::RuntimeException("Unknown service specifier!", (OWeakObject *)this );
+ throw com::sun::star::uno::RuntimeException("Unknown service specifier!", static_cast<OWeakObject *>(this) );
}
Reference< XInterface > SAL_CALL ActionTriggerContainer::createInstanceWithArguments( const OUString& ServiceSpecifier, const Sequence< Any >& /*Arguments*/ )
diff --git a/framework/source/fwe/classes/rootactiontriggercontainer.cxx b/framework/source/fwe/classes/rootactiontriggercontainer.cxx
index 18cae1562ed8..59a5102b2ca4 100644
--- a/framework/source/fwe/classes/rootactiontriggercontainer.cxx
+++ b/framework/source/fwe/classes/rootactiontriggercontainer.cxx
@@ -93,13 +93,13 @@ Reference< XInterface > SAL_CALL RootActionTriggerContainer::createInstance( con
throw ( Exception, RuntimeException, std::exception )
{
if ( aServiceSpecifier == SERVICENAME_ACTIONTRIGGER )
- return (OWeakObject *)( new ActionTriggerPropertySet());
+ return static_cast<OWeakObject *>( new ActionTriggerPropertySet());
else if ( aServiceSpecifier == SERVICENAME_ACTIONTRIGGERCONTAINER )
- return (OWeakObject *)( new ActionTriggerContainer());
+ return static_cast<OWeakObject *>( new ActionTriggerContainer());
else if ( aServiceSpecifier == SERVICENAME_ACTIONTRIGGERSEPARATOR )
- return (OWeakObject *)( new ActionTriggerSeparatorPropertySet());
+ return static_cast<OWeakObject *>( new ActionTriggerSeparatorPropertySet());
else
- throw com::sun::star::uno::RuntimeException("Unknown service specifier!", (OWeakObject *)this );
+ throw com::sun::star::uno::RuntimeException("Unknown service specifier!", static_cast<OWeakObject *>(this) );
}
Reference< XInterface > SAL_CALL RootActionTriggerContainer::createInstanceWithArguments( const OUString& ServiceSpecifier, const Sequence< Any >& /*Arguments*/ )
@@ -287,7 +287,7 @@ void RootActionTriggerContainer::FillContainer()
{
m_bContainerCreated = true;
m_bInContainerCreation = true;
- Reference<XIndexContainer> xXIndexContainer( (OWeakObject *)this, UNO_QUERY );
+ Reference<XIndexContainer> xXIndexContainer( static_cast<OWeakObject *>(this), UNO_QUERY );
ActionTriggerHelper::FillActionTriggerContainerFromMenu(
xXIndexContainer,
m_pMenu );
diff --git a/framework/source/fwe/helper/actiontriggerhelper.cxx b/framework/source/fwe/helper/actiontriggerhelper.cxx
index 2c861ed1b2f5..803acbc2be1f 100644
--- a/framework/source/fwe/helper/actiontriggerhelper.cxx
+++ b/framework/source/fwe/helper/actiontriggerhelper.cxx
@@ -179,7 +179,7 @@ void InsertSubMenuItems( Menu* pSubMenu, sal_uInt16& nItemId, Reference< XIndexC
Sequence< sal_Int8 > aDIBSeq;
{
aDIBSeq = xBitmap->getDIB();
- SvMemoryStream aMem( (void *)aDIBSeq.getConstArray(), aDIBSeq.getLength(), StreamMode::READ );
+ SvMemoryStream aMem( const_cast<sal_Int8 *>(aDIBSeq.getConstArray()), aDIBSeq.getLength(), StreamMode::READ );
ReadDIB(aBitmap, aMem, true);
}
@@ -187,7 +187,7 @@ void InsertSubMenuItems( Menu* pSubMenu, sal_uInt16& nItemId, Reference< XIndexC
if ( aDIBSeq.getLength() > 0 )
{
Bitmap aMaskBitmap;
- SvMemoryStream aMem( (void *)aDIBSeq.getConstArray(), aDIBSeq.getLength(), StreamMode::READ );
+ SvMemoryStream aMem( const_cast<sal_Int8 *>(aDIBSeq.getConstArray()), aDIBSeq.getLength(), StreamMode::READ );
ReadDIB(aMaskBitmap, aMem, true);
aImage = Image( aBitmap, aMaskBitmap );
}
diff --git a/framework/source/fwe/helper/propertysetcontainer.cxx b/framework/source/fwe/helper/propertysetcontainer.cxx
index 8365ab45a50d..c9bde036021c 100644
--- a/framework/source/fwe/helper/propertysetcontainer.cxx
+++ b/framework/source/fwe/helper/propertysetcontainer.cxx
@@ -99,11 +99,11 @@ void SAL_CALL PropertySetContainer::insertByIndex( sal_Int32 Index, const ::com:
{
throw IllegalArgumentException(
WRONG_TYPE_EXCEPTION,
- (OWeakObject *)this, 2 );
+ static_cast<OWeakObject *>(this), 2 );
}
}
else
- throw IndexOutOfBoundsException( OUString(), (OWeakObject *)this );
+ throw IndexOutOfBoundsException( OUString(), static_cast<OWeakObject *>(this) );
}
void SAL_CALL PropertySetContainer::removeByIndex( sal_Int32 nIndex )
@@ -116,7 +116,7 @@ void SAL_CALL PropertySetContainer::removeByIndex( sal_Int32 nIndex )
m_aPropertySetVector.erase(m_aPropertySetVector.begin() + nIndex);
}
else
- throw IndexOutOfBoundsException( OUString(), (OWeakObject *)this );
+ throw IndexOutOfBoundsException( OUString(), static_cast<OWeakObject *>(this) );
}
// XIndexReplace
@@ -135,11 +135,11 @@ void SAL_CALL PropertySetContainer::replaceByIndex( sal_Int32 Index, const ::com
{
throw IllegalArgumentException(
WRONG_TYPE_EXCEPTION,
- (OWeakObject *)this, 2 );
+ static_cast<OWeakObject *>(this), 2 );
}
}
else
- throw IndexOutOfBoundsException( OUString(), (OWeakObject *)this );
+ throw IndexOutOfBoundsException( OUString(), static_cast<OWeakObject *>(this) );
}
// XIndexAccess
@@ -164,7 +164,7 @@ Any SAL_CALL PropertySetContainer::getByIndex( sal_Int32 Index )
return a;
}
else
- throw IndexOutOfBoundsException( OUString(), (OWeakObject *)this );
+ throw IndexOutOfBoundsException( OUString(), static_cast<OWeakObject *>(this) );
}
// XElementAccess
diff --git a/framework/source/fwe/xml/menudocumenthandler.cxx b/framework/source/fwe/xml/menudocumenthandler.cxx
index 9f48ff4ad901..976553c73cca 100644
--- a/framework/source/fwe/xml/menudocumenthandler.cxx
+++ b/framework/source/fwe/xml/menudocumenthandler.cxx
@@ -733,7 +733,7 @@ OWriteMenuDocumentHandler::OWriteMenuDocumentHandler(
m_xWriteDocumentHandler( rDocumentHandler )
{
::comphelper::AttributeList* pList = new ::comphelper::AttributeList;
- m_xEmptyList = Reference< XAttributeList >( (XAttributeList *) pList, UNO_QUERY );
+ m_xEmptyList = Reference< XAttributeList >( static_cast<XAttributeList *>(pList), UNO_QUERY );
m_aAttributeType = ATTRIBUTE_TYPE_CDATA;
}
@@ -745,7 +745,7 @@ void OWriteMenuDocumentHandler::WriteMenuDocument()
throw ( SAXException, RuntimeException )
{
::comphelper::AttributeList* pList = new ::comphelper::AttributeList;
- Reference< XAttributeList > rList( (XAttributeList *) pList , UNO_QUERY );
+ Reference< XAttributeList > rList( static_cast<XAttributeList *>(pList) , UNO_QUERY );
m_xWriteDocumentHandler->startDocument();
@@ -808,7 +808,7 @@ throw ( SAXException, RuntimeException )
else if ( !aCommandURL.isEmpty() && !AddonPopupMenu::IsCommandURLPrefix( aCommandURL ))
{
::comphelper::AttributeList* pListMenu = new ::comphelper::AttributeList;
- Reference< XAttributeList > xListMenu( (XAttributeList *)pListMenu , UNO_QUERY );
+ Reference< XAttributeList > xListMenu( static_cast<XAttributeList *>(pListMenu) , UNO_QUERY );
pListMenu->AddAttribute( OUString( ATTRIBUTE_NS_ID ),
m_aAttributeType,
@@ -859,7 +859,7 @@ throw ( SAXException, RuntimeException )
void OWriteMenuDocumentHandler::WriteMenuItem( const OUString& aCommandURL, const OUString& aLabel, const OUString& aHelpURL, sal_Int16 nStyle )
{
::comphelper::AttributeList* pList = new ::comphelper::AttributeList;
- Reference< XAttributeList > xList( (XAttributeList *) pList , UNO_QUERY );
+ Reference< XAttributeList > xList( static_cast<XAttributeList *>(pList) , UNO_QUERY );
pList->AddAttribute( OUString( ATTRIBUTE_NS_ID ),
m_aAttributeType,
diff --git a/framework/source/fwe/xml/statusbardocumenthandler.cxx b/framework/source/fwe/xml/statusbardocumenthandler.cxx
index 55b6fe89629f..aa36aa822392 100644
--- a/framework/source/fwe/xml/statusbardocumenthandler.cxx
+++ b/framework/source/fwe/xml/statusbardocumenthandler.cxx
@@ -488,7 +488,7 @@ OWriteStatusBarDocumentHandler::OWriteStatusBarDocumentHandler(
m_xWriteDocumentHandler( rWriteDocumentHandler )
{
::comphelper::AttributeList* pList = new ::comphelper::AttributeList;
- m_xEmptyList = Reference< XAttributeList >( (XAttributeList *) pList, UNO_QUERY );
+ m_xEmptyList = Reference< XAttributeList >( static_cast<XAttributeList *>(pList), UNO_QUERY );
m_aAttributeType = ATTRIBUTE_TYPE_CDATA;
m_aXMLXlinkNS = XMLNS_XLINK_PREFIX;
m_aXMLStatusBarNS = XMLNS_STATUSBAR_PREFIX;
@@ -514,7 +514,7 @@ void OWriteStatusBarDocumentHandler::WriteStatusBarDocument() throw
}
::comphelper::AttributeList* pList = new ::comphelper::AttributeList;
- Reference< XAttributeList > xList( (XAttributeList *) pList , UNO_QUERY );
+ Reference< XAttributeList > xList( static_cast<XAttributeList *>(pList) , UNO_QUERY );
pList->AddAttribute( OUString( ATTRIBUTE_XMLNS_STATUSBAR ),
m_aAttributeType,
@@ -572,7 +572,7 @@ void OWriteStatusBarDocumentHandler::WriteStatusBarItem(
throw ( SAXException, RuntimeException )
{
::comphelper::AttributeList* pList = new ::comphelper::AttributeList;
- Reference< XAttributeList > xList( (XAttributeList *) pList , UNO_QUERY );
+ Reference< XAttributeList > xList( static_cast<XAttributeList *>(pList) , UNO_QUERY );
if (m_aAttributeURL.isEmpty() )
{
diff --git a/framework/source/fwe/xml/toolboxdocumenthandler.cxx b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
index a294ca9d788c..2457da9d253f 100644
--- a/framework/source/fwe/xml/toolboxdocumenthandler.cxx
+++ b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
@@ -658,7 +658,7 @@ OWriteToolBoxDocumentHandler::OWriteToolBoxDocumentHandler(
m_rItemAccess( rItemAccess )
{
::comphelper::AttributeList* pList = new ::comphelper::AttributeList;
- m_xEmptyList = Reference< XAttributeList >( (XAttributeList *) pList, UNO_QUERY );
+ m_xEmptyList = Reference< XAttributeList >( static_cast<XAttributeList *>(pList), UNO_QUERY );
m_aAttributeType = ATTRIBUTE_TYPE_CDATA;
m_aXMLXlinkNS = XMLNS_XLINK_PREFIX;
m_aXMLToolbarNS = XMLNS_TOOLBAR_PREFIX;
@@ -697,7 +697,7 @@ void OWriteToolBoxDocumentHandler::WriteToolBoxDocument() throw
}
::comphelper::AttributeList* pList = new ::comphelper::AttributeList;
- Reference< XAttributeList > xList( (XAttributeList *) pList , UNO_QUERY );
+ Reference< XAttributeList > xList( static_cast<XAttributeList *>(pList) , UNO_QUERY );
pList->AddAttribute( OUString( ATTRIBUTE_XMLNS_TOOLBAR ),
m_aAttributeType,
@@ -764,7 +764,7 @@ void OWriteToolBoxDocumentHandler::WriteToolBoxItem(
throw ( SAXException, RuntimeException )
{
::comphelper::AttributeList* pList = new ::comphelper::AttributeList;
- Reference< XAttributeList > xList( (XAttributeList *) pList , UNO_QUERY );
+ Reference< XAttributeList > xList( static_cast<XAttributeList *>(pList) , UNO_QUERY );
if ( m_aAttributeURL.isEmpty() )
{
diff --git a/framework/source/fwi/uielement/constitemcontainer.cxx b/framework/source/fwi/uielement/constitemcontainer.cxx
index f1e88e434dcb..ac077604307a 100644
--- a/framework/source/fwi/uielement/constitemcontainer.cxx
+++ b/framework/source/fwi/uielement/constitemcontainer.cxx
@@ -278,7 +278,7 @@ throw ( IndexOutOfBoundsException, WrappedTargetException, RuntimeException, std
if ( sal_Int32( m_aItemVector.size()) > Index )
return makeAny( m_aItemVector[Index] );
else
- throw IndexOutOfBoundsException( OUString(), (OWeakObject *)this );
+ throw IndexOutOfBoundsException( OUString(), static_cast<OWeakObject *>(this) );
}
// XPropertySet
diff --git a/framework/source/fwi/uielement/itemcontainer.cxx b/framework/source/fwi/uielement/itemcontainer.cxx
index febae153689f..e2bfbb5490c2 100644
--- a/framework/source/fwi/uielement/itemcontainer.cxx
+++ b/framework/source/fwi/uielement/itemcontainer.cxx
@@ -169,7 +169,7 @@ throw ( IndexOutOfBoundsException, WrappedTargetException, RuntimeException, std
if ( sal_Int32( m_aItemVector.size()) > Index )
return makeAny( m_aItemVector[Index] );
else
- throw IndexOutOfBoundsException( OUString(), (OWeakObject *)this );
+ throw IndexOutOfBoundsException( OUString(), static_cast<OWeakObject *>(this) );
}
// XIndexContainer
@@ -189,11 +189,11 @@ throw ( IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetExcept
m_aItemVector.insert( aIter, aSeq );
}
else
- throw IndexOutOfBoundsException( OUString(), (OWeakObject *)this );
+ throw IndexOutOfBoundsException( OUString(), static_cast<OWeakObject *>(this) );
}
else
throw IllegalArgumentException( OUString( WRONG_TYPE_EXCEPTION ),
- (OWeakObject *)this, 2 );
+ static_cast<OWeakObject *>(this), 2 );
}
void SAL_CALL ItemContainer::removeByIndex( sal_Int32 nIndex )
@@ -205,7 +205,7 @@ throw ( IndexOutOfBoundsException, WrappedTargetException, RuntimeException, std
m_aItemVector.erase(m_aItemVector.begin() + nIndex);
}
else
- throw IndexOutOfBoundsException( OUString(), (OWeakObject *)this );
+ throw IndexOutOfBoundsException( OUString(), static_cast<OWeakObject *>(this) );
}
void SAL_CALL ItemContainer::replaceByIndex( sal_Int32 Index, const Any& aItem )
@@ -218,11 +218,11 @@ throw ( IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetExcept
if ( sal_Int32( m_aItemVector.size()) > Index )
m_aItemVector[Index] = aSeq;
else
- throw IndexOutOfBoundsException( OUString(), (OWeakObject *)this );
+ throw IndexOutOfBoundsException( OUString(), static_cast<OWeakObject *>(this) );
}
else
throw IllegalArgumentException( OUString( WRONG_TYPE_EXCEPTION ),
- (OWeakObject *)this, 2 );
+ static_cast<OWeakObject *>(this), 2 );
}
} // namespace framework
diff --git a/framework/source/fwi/uielement/rootitemcontainer.cxx b/framework/source/fwi/uielement/rootitemcontainer.cxx
index e09e840028f5..2b2cf4e2ab4e 100644
--- a/framework/source/fwi/uielement/rootitemcontainer.cxx
+++ b/framework/source/fwi/uielement/rootitemcontainer.cxx
@@ -187,7 +187,7 @@ throw ( IndexOutOfBoundsException, WrappedTargetException, RuntimeException, std
if ( sal_Int32( m_aItemVector.size()) > Index )
return makeAny( m_aItemVector[Index] );
else
- throw IndexOutOfBoundsException( OUString(), (OWeakObject *)this );
+ throw IndexOutOfBoundsException( OUString(), static_cast<OWeakObject *>(this) );
}
// XIndexContainer
@@ -207,10 +207,10 @@ throw ( IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetExcept
m_aItemVector.insert( aIter, aSeq );
}
else
- throw IndexOutOfBoundsException( OUString(), (OWeakObject *)this );
+ throw IndexOutOfBoundsException( OUString(), static_cast<OWeakObject *>(this) );
}
else
- throw IllegalArgumentException( WRONG_TYPE_EXCEPTION, (OWeakObject *)this, 2 );
+ throw IllegalArgumentException( WRONG_TYPE_EXCEPTION, static_cast<OWeakObject *>(this), 2 );
}
void SAL_CALL RootItemContainer::removeByIndex( sal_Int32 nIndex )
@@ -222,7 +222,7 @@ throw ( IndexOutOfBoundsException, WrappedTargetException, RuntimeException, std
m_aItemVector.erase(m_aItemVector.begin() + nIndex);
}
else
- throw IndexOutOfBoundsException( OUString(), (OWeakObject *)this );
+ throw IndexOutOfBoundsException( OUString(), static_cast<OWeakObject *>(this) );
}
void SAL_CALL RootItemContainer::replaceByIndex( sal_Int32 Index, const Any& aItem )
@@ -235,22 +235,22 @@ throw ( IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetExcept
if ( sal_Int32( m_aItemVector.size()) > Index )
m_aItemVector[Index] = aSeq;
else
- throw IndexOutOfBoundsException( OUString(), (OWeakObject *)this );
+ throw IndexOutOfBoundsException( OUString(), static_cast<OWeakObject *>(this) );
}
else
- throw IllegalArgumentException( WRONG_TYPE_EXCEPTION, (OWeakObject *)this, 2 );
+ throw IllegalArgumentException( WRONG_TYPE_EXCEPTION, static_cast<OWeakObject *>(this), 2 );
}
Reference< XInterface > SAL_CALL RootItemContainer::createInstanceWithContext( const Reference< XComponentContext >& )
throw ( Exception, RuntimeException, std::exception)
{
- return (OWeakObject *)(new ItemContainer( m_aShareMutex ));
+ return static_cast<OWeakObject *>(new ItemContainer( m_aShareMutex ));
}
Reference< XInterface > SAL_CALL RootItemContainer::createInstanceWithArgumentsAndContext( const Sequence< Any >&, const Reference< XComponentContext >& )
throw (Exception, RuntimeException, std::exception)
{
- return (OWeakObject *)(new ItemContainer( m_aShareMutex ));
+ return static_cast<OWeakObject *>(new ItemContainer( m_aShareMutex ));
}
// XPropertySet helper
diff --git a/framework/source/helper/ocomponentaccess.cxx b/framework/source/helper/ocomponentaccess.cxx
index edc0dcb5208f..d5f478b0a6b4 100644
--- a/framework/source/helper/ocomponentaccess.cxx
+++ b/framework/source/helper/ocomponentaccess.cxx
@@ -68,7 +68,7 @@ css::uno::Reference< XEnumeration > SAL_CALL OComponentAccess::createEnumeration
Sequence< css::uno::Reference< XComponent > > seqComponents;
impl_collectAllChildComponents( css::uno::Reference< XFramesSupplier >( xLock, UNO_QUERY ), seqComponents );
OComponentEnumeration* pEnumeration = new OComponentEnumeration( seqComponents );
- xReturn = css::uno::Reference< XEnumeration >( (OWeakObject*)pEnumeration, UNO_QUERY );
+ xReturn = css::uno::Reference< XEnumeration >( static_cast<OWeakObject*>(pEnumeration), UNO_QUERY );
}
// Return result of this operation.
diff --git a/framework/source/helper/oframes.cxx b/framework/source/helper/oframes.cxx
index e39ce2a322bf..18f92f83a3e5 100644
--- a/framework/source/helper/oframes.cxx
+++ b/framework/source/helper/oframes.cxx
@@ -232,7 +232,7 @@ Any SAL_CALL OFrames::getByIndex( sal_Int32 nIndex ) throw( IndexOutOfBoundsExce
sal_uInt32 nCount = m_pFrameContainer->getCount();
if ( nIndex < 0 || ( sal::static_int_cast< sal_uInt32 >( nIndex ) >= nCount ))
throw IndexOutOfBoundsException("OFrames::getByIndex - Index out of bounds",
- (OWeakObject *)this );
+ static_cast<OWeakObject *>(this) );
// Set default return value.
Any aReturnValue;
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index 76dfc71ad7e2..2b4a1f935cda 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -1170,7 +1170,7 @@ throw (uno::RuntimeException)
pSysWindow->SetMenuBar(pMenuBar, m_xFrame);
m_bInplaceMenuSet = true;
- m_xInplaceMenuBar = Reference< XComponent >( (OWeakObject *)m_pInplaceMenuBar, UNO_QUERY );
+ m_xInplaceMenuBar = Reference< XComponent >( static_cast<OWeakObject *>(m_pInplaceMenuBar), UNO_QUERY );
}
aWriteLock.clear();
diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx
index acead687f975..faaf2a118754 100644
--- a/framework/source/services/substitutepathvars.cxx
+++ b/framework/source/services/substitutepathvars.cxx
@@ -1052,7 +1052,7 @@ throw ( NoSuchElementException, RuntimeException )
if ( bSubstRequired )
{
OUString aMsg( "Endless recursion detected. Cannot substitute variables!" );
- throw NoSuchElementException( aMsg, (cppu::OWeakObject *)this );
+ throw NoSuchElementException( aMsg, static_cast<cppu::OWeakObject *>(this) );
}
else
aResult = rText;
@@ -1063,7 +1063,7 @@ throw ( NoSuchElementException, RuntimeException )
if ( bSubstRequired )
{
OUString aMsg( "Unknown variable found!" );
- throw NoSuchElementException( aMsg, (cppu::OWeakObject *)this );
+ throw NoSuchElementException( aMsg, static_cast<cppu::OWeakObject *>(this) );
}
else
aResult = aWorkText;
@@ -1201,7 +1201,7 @@ throw ( NoSuchElementException, RuntimeException )
else
{
OUString aExceptionText("Unknown variable!");
- throw NoSuchElementException(aExceptionText, (cppu::OWeakObject *)this);
+ throw NoSuchElementException(aExceptionText, static_cast<cppu::OWeakObject *>(this));
}
}
else
@@ -1216,7 +1216,7 @@ throw ( NoSuchElementException, RuntimeException )
}
OUString aExceptionText("Unknown variable!");
- throw NoSuchElementException(aExceptionText, (cppu::OWeakObject *)this);
+ throw NoSuchElementException(aExceptionText, static_cast<cppu::OWeakObject *>(this));
}
}
diff --git a/framework/source/tabwin/tabwindow.cxx b/framework/source/tabwin/tabwindow.cxx
index 8e8d81427116..245de85a1485 100644
--- a/framework/source/tabwin/tabwindow.cxx
+++ b/framework/source/tabwin/tabwindow.cxx
@@ -541,7 +541,7 @@ throw (css::uno::RuntimeException, std::exception)
void SAL_CALL TabWindow::windowClosing( const css::lang::EventObject& )
throw (css::uno::RuntimeException, std::exception)
{
- css::uno::Reference< css::lang::XComponent > xComponent( (OWeakObject *)this, css::uno::UNO_QUERY );
+ css::uno::Reference< css::lang::XComponent > xComponent( static_cast<OWeakObject *>(this), css::uno::UNO_QUERY );
if ( xComponent.is() )
xComponent->dispose();
}
diff --git a/framework/source/uielement/addonstoolbarwrapper.cxx b/framework/source/uielement/addonstoolbarwrapper.cxx
index 35506a24e86c..18d3d8d32e0e 100644
--- a/framework/source/uielement/addonstoolbarwrapper.cxx
+++ b/framework/source/uielement/addonstoolbarwrapper.cxx
@@ -151,7 +151,7 @@ Reference< XInterface > SAL_CALL AddonsToolBarWrapper::getRealInterface() throw
AddonsToolBarManager* pToolBarManager = static_cast< AddonsToolBarManager *>( m_xToolBarManager.get() );
if ( pToolBarManager )
{
- vcl::Window* pWindow = (vcl::Window *)pToolBarManager->GetToolBar();
+ vcl::Window* pWindow = static_cast<vcl::Window *>(pToolBarManager->GetToolBar());
return Reference< XInterface >( VCLUnoHelper::GetInterface( pWindow ), UNO_QUERY );
}
}
diff --git a/framework/source/uielement/controlmenucontroller.cxx b/framework/source/uielement/controlmenucontroller.cxx
index 2d48f92ef1bb..5f222ddec194 100644
--- a/framework/source/uielement/controlmenucontroller.cxx
+++ b/framework/source/uielement/controlmenucontroller.cxx
@@ -294,14 +294,14 @@ void ControlMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& rP
// XEventListener
void SAL_CALL ControlMenuController::disposing( const EventObject& ) throw ( RuntimeException, std::exception )
{
- Reference< css::awt::XMenuListener > xHolder(( OWeakObject *)this, UNO_QUERY );
+ Reference< css::awt::XMenuListener > xHolder(static_cast<OWeakObject *>(this), UNO_QUERY );
osl::ResettableMutexGuard aLock( m_aMutex );
m_xFrame.clear();
m_xDispatch.clear();
if ( m_xPopupMenu.is() )
- m_xPopupMenu->removeMenuListener( Reference< css::awt::XMenuListener >(( OWeakObject *)this, UNO_QUERY ));
+ m_xPopupMenu->removeMenuListener( Reference< css::awt::XMenuListener >(static_cast<OWeakObject *>(this), UNO_QUERY ));
m_xPopupMenu.clear();
delete m_pResPopupMenu;
}
diff --git a/framework/source/uielement/fontmenucontroller.cxx b/framework/source/uielement/fontmenucontroller.cxx
index e47321f803a2..41bf4ca15275 100644
--- a/framework/source/uielement/fontmenucontroller.cxx
+++ b/framework/source/uielement/fontmenucontroller.cxx
@@ -115,7 +115,7 @@ void FontMenuController::fillPopupMenu( const Sequence< OUString >& rFontNameSeq
// XEventListener
void SAL_CALL FontMenuController::disposing( const EventObject& ) throw ( RuntimeException, std::exception )
{
- Reference< css::awt::XMenuListener > xHolder(( OWeakObject *)this, UNO_QUERY );
+ Reference< css::awt::XMenuListener > xHolder(static_cast<OWeakObject *>(this), UNO_QUERY );
osl::MutexGuard aLock( m_aMutex );
m_xFrame.clear();
@@ -123,7 +123,7 @@ void SAL_CALL FontMenuController::disposing( const EventObject& ) throw ( Runtim
m_xFontListDispatch.clear();
if ( m_xPopupMenu.is() )
- m_xPopupMenu->removeMenuListener( Reference< css::awt::XMenuListener >(( OWeakObject *)this, UNO_QUERY ));
+ m_xPopupMenu->removeMenuListener( Reference< css::awt::XMenuListener >(static_cast<OWeakObject *>(this), UNO_QUERY ));
m_xPopupMenu.clear();
}
diff --git a/framework/source/uielement/fontsizemenucontroller.cxx b/framework/source/uielement/fontsizemenucontroller.cxx
index 7ad43146d4cc..a0229d6b8a11 100644
--- a/framework/source/uielement/fontsizemenucontroller.cxx
+++ b/framework/source/uielement/fontsizemenucontroller.cxx
@@ -240,14 +240,14 @@ void FontSizeMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r
// XEventListener
void SAL_CALL FontSizeMenuController::disposing( const EventObject& ) throw ( RuntimeException, std::exception )
{
- Reference< css::awt::XMenuListener > xHolder(( OWeakObject *)this, UNO_QUERY );
+ Reference< css::awt::XMenuListener > xHolder(static_cast<OWeakObject *>(this), UNO_QUERY );
osl::MutexGuard aLock( m_aMutex );
m_xFrame.clear();
m_xDispatch.clear();
m_xCurrentFontDispatch.clear();
if ( m_xPopupMenu.is() )
- m_xPopupMenu->removeMenuListener( Reference< css::awt::XMenuListener >(( OWeakObject *)this, UNO_QUERY ));
+ m_xPopupMenu->removeMenuListener( Reference< css::awt::XMenuListener >(static_cast<OWeakObject *>(this), UNO_QUERY ));
m_xPopupMenu.clear();
}
diff --git a/framework/source/uielement/headermenucontroller.cxx b/framework/source/uielement/headermenucontroller.cxx
index 0d9424e513cc..7931af4e2dce 100644
--- a/framework/source/uielement/headermenucontroller.cxx
+++ b/framework/source/uielement/headermenucontroller.cxx
@@ -184,14 +184,14 @@ void HeaderMenuController::fillPopupMenu( const Reference< ::com::sun::star::fra
// XEventListener
void SAL_CALL HeaderMenuController::disposing( const EventObject& ) throw ( RuntimeException, std::exception )
{
- Reference< css::awt::XMenuListener > xHolder(( OWeakObject *)this, UNO_QUERY );
+ Reference< css::awt::XMenuListener > xHolder(static_cast<OWeakObject *>(this), UNO_QUERY );
osl::MutexGuard aLock( m_aMutex );
m_xFrame.clear();
m_xDispatch.clear();
if ( m_xPopupMenu.is() )
- m_xPopupMenu->removeMenuListener( Reference< css::awt::XMenuListener >(( OWeakObject *)this, UNO_QUERY ));
+ m_xPopupMenu->removeMenuListener( Reference< css::awt::XMenuListener >(static_cast<OWeakObject *>(this), UNO_QUERY ));
m_xPopupMenu.clear();
}
diff --git a/framework/source/uielement/langselectionmenucontroller.cxx b/framework/source/uielement/langselectionmenucontroller.cxx
index 9e0fbb15219c..0cafd9aac45f 100644
--- a/framework/source/uielement/langselectionmenucontroller.cxx
+++ b/framework/source/uielement/langselectionmenucontroller.cxx
@@ -85,7 +85,7 @@ LanguageSelectionMenuController::~LanguageSelectionMenuController()
// XEventListener
void SAL_CALL LanguageSelectionMenuController::disposing( const EventObject& ) throw ( RuntimeException, std::exception )
{
- Reference< css::awt::XMenuListener > xHolder(( OWeakObject *)this, UNO_QUERY );
+ Reference< css::awt::XMenuListener > xHolder(static_cast<OWeakObject *>(this), UNO_QUERY );
osl::MutexGuard aLock( m_aMutex );
m_xFrame.clear();
@@ -93,7 +93,7 @@ void SAL_CALL LanguageSelectionMenuController::disposing( const EventObject& ) t
m_xLanguageDispatch.clear();
if ( m_xPopupMenu.is() )
- m_xPopupMenu->removeMenuListener( Reference< css::awt::XMenuListener >(( OWeakObject *)this, UNO_QUERY ));
+ m_xPopupMenu->removeMenuListener( Reference< css::awt::XMenuListener >(static_cast<OWeakObject *>(this), UNO_QUERY ));
m_xPopupMenu.clear();
}
diff --git a/framework/source/uielement/macrosmenucontroller.cxx b/framework/source/uielement/macrosmenucontroller.cxx
index 9bcccc489c1a..cd0703fd40d5 100644
--- a/framework/source/uielement/macrosmenucontroller.cxx
+++ b/framework/source/uielement/macrosmenucontroller.cxx
@@ -96,7 +96,7 @@ void MacrosMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& rPo
// XEventListener
void SAL_CALL MacrosMenuController::disposing( const EventObject& ) throw ( RuntimeException, std::exception )
{
- Reference< css::awt::XMenuListener > xHolder(( OWeakObject *)this, UNO_QUERY );
+ Reference< css::awt::XMenuListener > xHolder(static_cast<OWeakObject *>(this), UNO_QUERY );
osl::MutexGuard aLock( m_aMutex );
OSL_TRACE("disposing");
@@ -106,7 +106,7 @@ void SAL_CALL MacrosMenuController::disposing( const EventObject& ) throw ( Runt
if ( m_xPopupMenu.is() )
{
- m_xPopupMenu->removeMenuListener( Reference< css::awt::XMenuListener >(( OWeakObject *)this, UNO_QUERY ));
+ m_xPopupMenu->removeMenuListener( Reference< css::awt::XMenuListener >(static_cast<OWeakObject *>(this), UNO_QUERY ));
OSL_TRACE("removed listener");
}
m_xPopupMenu.clear();
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index 921a75b1fa5e..b17b07e7716f 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -177,7 +177,7 @@ Any SAL_CALL MenuBarManager::queryInterface( const Type & rType ) throw ( Runtim
(static_cast< ::com::sun::star::frame::XStatusListener* >(this)),
(static_cast< ::com::sun::star::frame::XFrameActionListener* >(this)),
(static_cast< ::com::sun::star::ui::XUIConfigurationListener* >(this)),
- (static_cast< XEventListener* >((XStatusListener *)this)),
+ (static_cast< XEventListener* >(static_cast<XStatusListener *>(this))),
(static_cast< XComponent* >(this)),
(static_cast< ::com::sun::star::awt::XSystemDependentMenuPeer* >(this)));
@@ -547,7 +547,7 @@ void MenuBarManager::RemoveListener()
if ( xEventListener.is() )
{
EventObject aEventObject;
- aEventObject.Source = (OWeakObject *)this;
+ aEventObject.Source = static_cast<OWeakObject *>(this);
xEventListener->disposing( aEventObject );
}
@@ -1205,7 +1205,7 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF
VCLXPopupMenu* pVCLXPopupMenu = new VCLXPopupMenu;
PopupMenu* pNewPopupMenu = static_cast<PopupMenu *>(pVCLXPopupMenu->GetMenu());
pMenu->SetPopupMenu( nItemId, pNewPopupMenu );
- pItemHandler->xPopupMenu = Reference< com::sun::star::awt::XPopupMenu >( (OWeakObject *)pVCLXPopupMenu, UNO_QUERY );
+ pItemHandler->xPopupMenu = Reference< com::sun::star::awt::XPopupMenu >( static_cast<OWeakObject *>(pVCLXPopupMenu), UNO_QUERY );
pItemHandler->aMenuItemURL = aItemCommand;
m_aMenuItemHandlerVector.push_back( pItemHandler );
delete pPopup;
@@ -1335,7 +1335,7 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF
VCLXPopupMenu* pVCLXPopupMenu = new VCLXPopupMenu;
PopupMenu* pPopupMenu = static_cast<PopupMenu *>(pVCLXPopupMenu->GetMenu());
pMenu->SetPopupMenu( pItemHandler->nItemId, pPopupMenu );
- pItemHandler->xPopupMenu = Reference< com::sun::star::awt::XPopupMenu >( (OWeakObject *)pVCLXPopupMenu, UNO_QUERY );
+ pItemHandler->xPopupMenu = Reference< com::sun::star::awt::XPopupMenu >( static_cast<OWeakObject *>(pVCLXPopupMenu), UNO_QUERY );
if ( bAccessibilityEnabled && CreatePopupMenuController( pItemHandler ) )
{
@@ -1939,7 +1939,7 @@ void MenuBarManager::Init(const Reference< XFrame >& rFrame,Menu* pAddonMenu,boo
VCLXPopupMenu* pVCLXPopupMenu = new VCLXPopupMenu;
PopupMenu* pCtlPopupMenu = static_cast<PopupMenu *>(pVCLXPopupMenu->GetMenu());
pAddonMenu->SetPopupMenu( pMenuItemHandler->nItemId, pCtlPopupMenu );
- pMenuItemHandler->xPopupMenu = Reference< com::sun::star::awt::XPopupMenu >( (OWeakObject *)pVCLXPopupMenu, UNO_QUERY );
+ pMenuItemHandler->xPopupMenu = Reference< com::sun::star::awt::XPopupMenu >( static_cast<OWeakObject *>(pVCLXPopupMenu), UNO_QUERY );
}
}
diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx
index 9a02716b1082..daa2db7924d7 100644
--- a/framework/source/uielement/newmenucontroller.cxx
+++ b/framework/source/uielement/newmenucontroller.cxx
@@ -364,7 +364,7 @@ void NewMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& rPopup
// XEventListener
void SAL_CALL NewMenuController::disposing( const EventObject& ) throw ( RuntimeException, std::exception )
{
- Reference< css::awt::XMenuListener > xHolder(( OWeakObject *)this, UNO_QUERY );
+ Reference< css::awt::XMenuListener > xHolder(static_cast<OWeakObject *>(this), UNO_QUERY );
osl::MutexGuard aLock( m_aMutex );
m_xFrame.clear();
@@ -372,7 +372,7 @@ void SAL_CALL NewMenuController::disposing( const EventObject& ) throw ( Runtime
m_xContext.clear();
if ( m_xPopupMenu.is() )
- m_xPopupMenu->removeMenuListener( Reference< css::awt::XMenuListener >(( OWeakObject *)this, UNO_QUERY ));
+ m_xPopupMenu->removeMenuListener( Reference< css::awt::XMenuListener >(static_cast<OWeakObject *>(this), UNO_QUERY ));
m_xPopupMenu.clear();
}
diff --git a/framework/source/uielement/objectmenucontroller.cxx b/framework/source/uielement/objectmenucontroller.cxx
index 6b5f3e879072..a3842eecb664 100644
--- a/framework/source/uielement/objectmenucontroller.cxx
+++ b/framework/source/uielement/objectmenucontroller.cxx
@@ -137,7 +137,7 @@ void ObjectMenuController::fillPopupMenu( const Sequence< com::sun::star::embed:
// XEventListener
void SAL_CALL ObjectMenuController::disposing( const EventObject& ) throw ( RuntimeException, std::exception )
{
- Reference< css::awt::XMenuListener > xHolder(( OWeakObject *)this, UNO_QUERY );
+ Reference< css::awt::XMenuListener > xHolder(static_cast<OWeakObject *>(this), UNO_QUERY );
osl::MutexGuard aLock( m_aMutex );
m_xFrame.clear();
@@ -145,7 +145,7 @@ void SAL_CALL ObjectMenuController::disposing( const EventObject& ) throw ( Runt
m_xObjectUpdateDispatch.clear();
if ( m_xPopupMenu.is() )
- m_xPopupMenu->removeMenuListener( Reference< css::awt::XMenuListener >(( OWeakObject *)this, UNO_QUERY ));
+ m_xPopupMenu->removeMenuListener( Reference< css::awt::XMenuListener >(static_cast<OWeakObject *>(this), UNO_QUERY ));
m_xPopupMenu.clear();
}
diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx
index 1ea02d21dc63..8e4fe9d456ba 100644
--- a/framework/source/uielement/recentfilesmenucontroller.cxx
+++ b/framework/source/uielement/recentfilesmenucontroller.cxx
@@ -292,14 +292,14 @@ void RecentFilesMenuController::executeEntry( sal_Int32 nIndex )
// XEventListener
void SAL_CALL RecentFilesMenuController::disposing( const EventObject& ) throw ( RuntimeException, std::exception )
{
- Reference< css::awt::XMenuListener > xHolder(( OWeakObject *)this, UNO_QUERY );
+ Reference< css::awt::XMenuListener > xHolder(static_cast<OWeakObject *>(this), UNO_QUERY );
osl::MutexGuard aLock( m_aMutex );
m_xFrame.clear();
m_xDispatch.clear();
if ( m_xPopupMenu.is() )
- m_xPopupMenu->removeMenuListener( Reference< css::awt::XMenuListener >(( OWeakObject *)this, UNO_QUERY ));
+ m_xPopupMenu->removeMenuListener( Reference< css::awt::XMenuListener >(static_cast<OWeakObject *>(this), UNO_QUERY ));
m_xPopupMenu.clear();
}
diff --git a/framework/source/uielement/statusbarwrapper.cxx b/framework/source/uielement/statusbarwrapper.cxx
index 2f1f74028a0c..a4da08f1c792 100644
--- a/framework/source/uielement/statusbarwrapper.cxx
+++ b/framework/source/uielement/statusbarwrapper.cxx
@@ -169,7 +169,7 @@ Reference< XInterface > SAL_CALL StatusBarWrapper::getRealInterface() throw ( Ru
StatusBarManager* pStatusBarManager = static_cast< StatusBarManager *>( m_xStatusBarManager.get() );
if ( pStatusBarManager )
{
- vcl::Window* pWindow = (vcl::Window *)pStatusBarManager->GetStatusBar();
+ vcl::Window* pWindow = static_cast<vcl::Window *>(pStatusBarManager->GetStatusBar());
if ( pWindow )
return Reference< XInterface >( VCLUnoHelper::GetInterface( pWindow ), UNO_QUERY );
}
diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx
index 1f7de7e056cb..277469bc2646 100644
--- a/framework/source/uielement/toolbarsmenucontroller.cxx
+++ b/framework/source/uielement/toolbarsmenucontroller.cxx
@@ -523,7 +523,7 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r
// XEventListener
void SAL_CALL ToolbarsMenuController::disposing( const EventObject& ) throw ( RuntimeException, std::exception )
{
- Reference< css::awt::XMenuListener > xHolder(( OWeakObject *)this, UNO_QUERY );
+ Reference< css::awt::XMenuListener > xHolder(static_cast<OWeakObject *>(this), UNO_QUERY );
osl::MutexGuard aLock( m_aMutex );
m_xFrame.clear();
@@ -533,7 +533,7 @@ void SAL_CALL ToolbarsMenuController::disposing( const EventObject& ) throw ( Ru
m_xContext.clear();
if ( m_xPopupMenu.is() )
- m_xPopupMenu->removeMenuListener( Reference< css::awt::XMenuListener >(( OWeakObject *)this, UNO_QUERY ));
+ m_xPopupMenu->removeMenuListener( Reference< css::awt::XMenuListener >(static_cast<OWeakObject *>(this), UNO_QUERY ));
m_xPopupMenu.clear();
}
@@ -802,7 +802,7 @@ void SAL_CALL ToolbarsMenuController::setPopupMenu( const Reference< css::awt::X
SolarMutexGuard aSolarMutexGuard;
m_xPopupMenu = xPopupMenu;
- m_xPopupMenu->addMenuListener( Reference< css::awt::XMenuListener >( (OWeakObject*)this, UNO_QUERY ));
+ m_xPopupMenu->addMenuListener( Reference< css::awt::XMenuListener >( static_cast<OWeakObject*>(this), UNO_QUERY ));
fillPopupMenu( m_xPopupMenu );
}
}
diff --git a/framework/source/uielement/toolbarwrapper.cxx b/framework/source/uielement/toolbarwrapper.cxx
index 36f9909a250b..d1baf5c1f9ab 100644
--- a/framework/source/uielement/toolbarwrapper.cxx
+++ b/framework/source/uielement/toolbarwrapper.cxx
@@ -259,7 +259,7 @@ Reference< XInterface > SAL_CALL ToolBarWrapper::getRealInterface( ) throw (::c
ToolBarManager* pToolBarManager = static_cast< ToolBarManager *>( m_xToolBarManager.get() );
if ( pToolBarManager )
{
- vcl::Window* pWindow = (vcl::Window *)pToolBarManager->GetToolBar();
+ vcl::Window* pWindow = static_cast<vcl::Window *>(pToolBarManager->GetToolBar());
return Reference< XInterface >( VCLUnoHelper::GetInterface( pWindow ), UNO_QUERY );
}
}
diff --git a/framework/source/uifactory/addonstoolbarfactory.cxx b/framework/source/uifactory/addonstoolbarfactory.cxx
index a7bac9f9f562..713f95cc32c0 100644
--- a/framework/source/uifactory/addonstoolbarfactory.cxx
+++ b/framework/source/uifactory/addonstoolbarfactory.cxx
@@ -215,7 +215,7 @@ throw ( ::com::sun::star::container::NoSuchElementException,
SolarMutexGuard aGuard;
AddonsToolBarWrapper* pToolBarWrapper = new AddonsToolBarWrapper( m_xContext );
- xToolBar = Reference< ::com::sun::star::ui::XUIElement >( (OWeakObject *)pToolBarWrapper, UNO_QUERY );
+ xToolBar = Reference< ::com::sun::star::ui::XUIElement >( static_cast<OWeakObject *>(pToolBarWrapper), UNO_QUERY );
Reference< XInitialization > xInit( xToolBar, UNO_QUERY );
xInit->initialize( aPropSeq );
}
diff --git a/framework/source/xml/imagesdocumenthandler.cxx b/framework/source/xml/imagesdocumenthandler.cxx
index 8ecf8e4e24a6..aab2c4c64f37 100644
--- a/framework/source/xml/imagesdocumenthandler.cxx
+++ b/framework/source/xml/imagesdocumenthandler.cxx
@@ -601,7 +601,7 @@ OWriteImagesDocumentHandler::OWriteImagesDocumentHandler(
m_xWriteDocumentHandler( rWriteDocumentHandler )
{
::comphelper::AttributeList* pList = new ::comphelper::AttributeList;
- m_xEmptyList = Reference< XAttributeList >( (XAttributeList *) pList, UNO_QUERY );
+ m_xEmptyList = Reference< XAttributeList >( static_cast<XAttributeList *>(pList), UNO_QUERY );
m_aAttributeType = ATTRIBUTE_TYPE_CDATA;
m_aXMLImageNS = XMLNS_IMAGE_PREFIX;
m_aXMLXlinkNS = XMLNS_XLINK_PREFIX;
@@ -629,7 +629,7 @@ void OWriteImagesDocumentHandler::WriteImagesDocument() throw
}
::comphelper::AttributeList* pList = new ::comphelper::AttributeList;
- Reference< XAttributeList > xList( (XAttributeList *) pList , UNO_QUERY );
+ Reference< XAttributeList > xList( static_cast<XAttributeList *>(pList) , UNO_QUERY );
pList->AddAttribute( OUString( ATTRIBUTE_XMLNS_IMAGE),
m_aAttributeType,
@@ -670,7 +670,7 @@ void OWriteImagesDocumentHandler::WriteImageList( const ImageListItemDescriptor*
( SAXException, RuntimeException )
{
::comphelper::AttributeList* pList = new ::comphelper::AttributeList;
- Reference< XAttributeList > xList( (XAttributeList *) pList , UNO_QUERY );
+ Reference< XAttributeList > xList( static_cast<XAttributeList *>(pList) , UNO_QUERY );
// save required attributes
pList->AddAttribute( m_aAttributeXlinkType,
@@ -740,7 +740,7 @@ void OWriteImagesDocumentHandler::WriteImage( const ImageItemDescriptor* pImage
( SAXException, RuntimeException )
{
::comphelper::AttributeList* pList = new ::comphelper::AttributeList;
- Reference< XAttributeList > xList( (XAttributeList *) pList , UNO_QUERY );
+ Reference< XAttributeList > xList( static_cast<XAttributeList *>(pList) , UNO_QUERY );
pList->AddAttribute( m_aXMLImageNS + ATTRIBUTE_BITMAPINDEX,
m_aAttributeType,
@@ -778,7 +778,7 @@ void OWriteImagesDocumentHandler::WriteExternalImage( const ExternalImageItemDes
( SAXException, RuntimeException )
{
::comphelper::AttributeList* pList = new ::comphelper::AttributeList;
- Reference< XAttributeList > xList( (XAttributeList *) pList , UNO_QUERY );
+ Reference< XAttributeList > xList( static_cast<XAttributeList *>(pList) , UNO_QUERY );
// save required attributes
pList->AddAttribute( m_aAttributeXlinkType,