summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--extensions/source/bibliography/bibconfig.cxx2
-rw-r--r--extensions/source/bibliography/bibload.cxx8
-rw-r--r--extensions/source/bibliography/datman.cxx12
-rw-r--r--extensions/source/bibliography/general.cxx2
-rw-r--r--extensions/source/bibliography/toolbar.cxx8
-rw-r--r--extensions/source/plugin/base/nfuncs.cxx8
-rw-r--r--extensions/source/plugin/base/xplugin.cxx4
-rw-r--r--extensions/source/plugin/inc/plugin/unx/plugcon.hxx2
-rw-r--r--extensions/source/plugin/unx/npnapi.cxx54
-rw-r--r--extensions/source/plugin/unx/nppapi.cxx24
-rw-r--r--extensions/source/plugin/unx/plugcon.cxx2
-rw-r--r--extensions/source/propctrlr/propertyeditor.cxx2
-rw-r--r--extensions/source/propctrlr/selectlabeldialog.cxx4
-rw-r--r--extensions/source/propctrlr/taborder.cxx2
-rw-r--r--extensions/source/update/ui/updatecheckui.cxx2
15 files changed, 68 insertions, 68 deletions
diff --git a/extensions/source/bibliography/bibconfig.cxx b/extensions/source/bibliography/bibconfig.cxx
index 5a3ed541a608..5071767b6e07 100644
--- a/extensions/source/bibliography/bibconfig.cxx
+++ b/extensions/source/bibliography/bibconfig.cxx
@@ -116,7 +116,7 @@ BibConfig::BibConfig()
case 5: pValues[nProp] >>= sQueryText ; break;
case 6: pValues[nProp] >>= sQueryField; break;
case 7:
- bShowColumnAssignmentWarning = *(sal_Bool*)pValues[nProp].getValue();
+ bShowColumnAssignmentWarning = *static_cast<sal_Bool const *>(pValues[nProp].getValue());
break;
}
}
diff --git a/extensions/source/bibliography/bibload.cxx b/extensions/source/bibliography/bibload.cxx
index 1bc0bfd77fe8..e7e01a8a0d79 100644
--- a/extensions/source/bibliography/bibload.cxx
+++ b/extensions/source/bibliography/bibload.cxx
@@ -403,8 +403,8 @@ Reference< sdb::XColumn > BibliographyLoader::GetIdentifierColumn() const
Reference< sdb::XColumn > xReturn;
if (xColumns.is() && xColumns->hasByName(sIdentifierColumnName))
{
- xReturn = Reference< XColumn > (*(Reference< XInterface > *)
- xColumns->getByName(sIdentifierColumnName).getValue(), UNO_QUERY);
+ xReturn = Reference< XColumn > (*static_cast<Reference< XInterface > const *>(
+ xColumns->getByName(sIdentifierColumnName).getValue()), UNO_QUERY);
}
return xReturn;
}
@@ -437,7 +437,7 @@ static OUString lcl_AddProperty(Reference< XNameAccess > xColumns,
OUString uRet;
Reference< sdb::XColumn > xCol;
if (xColumns->hasByName(uColumnName))
- xCol = Reference< sdb::XColumn > (*(Reference< XInterface > *)xColumns->getByName(uColumnName).getValue(), UNO_QUERY);
+ xCol = Reference< sdb::XColumn > (*static_cast<Reference< XInterface > const *>(xColumns->getByName(uColumnName).getValue()), UNO_QUERY);
if (xCol.is())
uRet = xCol->getString();
return uRet;
@@ -464,7 +464,7 @@ Any BibliographyLoader::getByName(const OUString& rName) throw
OUString sId = sIdentifierMapping;
Reference< sdb::XColumn > xColumn;
if (xColumns->hasByName(sId))
- xColumn = Reference< sdb::XColumn > (*(Reference< XInterface > *)xColumns->getByName(sId).getValue(), UNO_QUERY);
+ xColumn = Reference< sdb::XColumn > (*static_cast<Reference< XInterface > const *>(xColumns->getByName(sId).getValue()), UNO_QUERY);
if (xColumn.is())
{
do
diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx
index dd54d571c48d..604aeae748a7 100644
--- a/extensions/source/bibliography/datman.cxx
+++ b/extensions/source/bibliography/datman.cxx
@@ -133,7 +133,7 @@ Reference< XConnection > getConnection(const Reference< XInterface > & xRowSe
if (!xFormProps.is())
return xConn;
- xConn = Reference< XConnection > (*(Reference< XInterface > *)xFormProps->getPropertyValue("ActiveConnection").getValue(), UNO_QUERY);
+ xConn = Reference< XConnection > (*static_cast<Reference< XInterface > const *>(xFormProps->getPropertyValue("ActiveConnection").getValue()), UNO_QUERY);
if (!xConn.is())
{
DBG_WARNING("no active connection");
@@ -165,14 +165,14 @@ Reference< XNameAccess > getColumns(const Reference< XForm > & _rxForm)
{
try
{
- DBG_ASSERT((*(sal_Int32*)xFormProps->getPropertyValue("CommandType").getValue()) == CommandType::TABLE,
+ DBG_ASSERT((*static_cast<sal_Int32 const *>(xFormProps->getPropertyValue("CommandType").getValue())) == CommandType::TABLE,
"::getColumns : invalid form (has no table as data source) !");
OUString sTable;
xFormProps->getPropertyValue("Command") >>= sTable;
Reference< XNameAccess > xTables = xSupplyTables->getTables();
if (xTables.is() && xTables->hasByName(sTable))
xSupplyCols = Reference< XColumnsSupplier > (
- *(Reference< XInterface > *)xTables->getByName(sTable).getValue(), UNO_QUERY);
+ *static_cast<Reference< XInterface > const *>(xTables->getByName(sTable).getValue()), UNO_QUERY);
if (xSupplyCols.is())
xReturn = xSupplyCols->getColumns();
}
@@ -1328,7 +1328,7 @@ void BibDataManager::propertyChange(const beans::PropertyChangeEvent& evt) throw
if( evt.NewValue.getValueType() == cppu::UnoType<io::XInputStream>::get())
{
Reference< io::XDataInputStream > xStream(
- *(const Reference< io::XInputStream > *)evt.NewValue.getValue(), UNO_QUERY );
+ *static_cast<const Reference< io::XInputStream > *>(evt.NewValue.getValue()), UNO_QUERY );
aUID <<= xStream->readUTF();
}
else
@@ -1376,7 +1376,7 @@ void BibDataManager::SetMeAsUidListener()
Any aElement;
aElement = xFields->getByName(theFieldName);
- xPropSet = *(Reference< XPropertySet > *)aElement.getValue();
+ xPropSet = *static_cast<Reference< XPropertySet > const *>(aElement.getValue());
xPropSet->addPropertyChangeListener(FM_PROP_VALUE, this);
}
@@ -1420,7 +1420,7 @@ void BibDataManager::RemoveMeAsUidListener()
Any aElement;
aElement = xFields->getByName(theFieldName);
- xPropSet = *(Reference< XPropertySet > *)aElement.getValue();
+ xPropSet = *static_cast<Reference< XPropertySet > const *>(aElement.getValue());
xPropSet->removePropertyChangeListener(FM_PROP_VALUE, this);
}
diff --git a/extensions/source/bibliography/general.cxx b/extensions/source/bibliography/general.cxx
index 07a149e1578e..91e09ae9df3d 100644
--- a/extensions/source/bibliography/general.cxx
+++ b/extensions/source/bibliography/general.cxx
@@ -129,7 +129,7 @@ void BibPosListener::cursorMoved(const lang::EventObject& /*aEvent*/) throw( uno
if(xValueAcc.is() && xValueAcc->hasByName(uTypeMapping))
{
uno::Any aVal = xValueAcc->getByName(uTypeMapping);
- uno::Reference< uno::XInterface > xInt = *(uno::Reference< uno::XInterface > *)aVal.getValue();
+ uno::Reference< uno::XInterface > xInt = *static_cast<uno::Reference< uno::XInterface > const *>(aVal.getValue());
uno::Reference< sdb::XColumn > xCol(xInt, UNO_QUERY);
DBG_ASSERT(xCol.is(), "BibPosListener::cursorMoved : invalid column (no sdb::XColumn) !");
if (xCol.is())
diff --git a/extensions/source/bibliography/toolbar.cxx b/extensions/source/bibliography/toolbar.cxx
index ecfe1fec0c72..1fe85ad14702 100644
--- a/extensions/source/bibliography/toolbar.cxx
+++ b/extensions/source/bibliography/toolbar.cxx
@@ -66,7 +66,7 @@ void BibToolBarListener::statusChanged(const ::com::sun::star::frame::FeatureSta
::com::sun::star::uno::Any aState=rEvt.State;
if(aState.getValueType()==::getBooleanCppuType())
{
- bool bChecked= *(sal_Bool*)aState.getValue();
+ bool bChecked= *static_cast<sal_Bool const *>(aState.getValue());
pToolBar->CheckItem(nIndex, bChecked);
}
@@ -96,7 +96,7 @@ void BibTBListBoxListener::statusChanged(const ::com::sun::star::frame::FeatureS
pToolBar->UpdateSourceList(false);
pToolBar->ClearSourceList();
- Sequence<OUString>* pStringSeq = (Sequence<OUString>*)aState.getValue();
+ Sequence<OUString> const * pStringSeq = static_cast<Sequence<OUString> const *>(aState.getValue());
const OUString* pStringArray = (const OUString*)pStringSeq->getConstArray();
sal_uInt32 nCount = pStringSeq->getLength();
@@ -134,7 +134,7 @@ void BibTBQueryMenuListener::statusChanged(const frame::FeatureStateEvent& rEvt)
{
pToolBar->ClearFilterMenu();
- Sequence<OUString>* pStringSeq = (Sequence<OUString>*) aState.getValue();
+ Sequence<OUString> const * pStringSeq = static_cast<Sequence<OUString> const *>(aState.getValue());
const OUString* pStringArray = (const OUString*)pStringSeq->getConstArray();
sal_uInt32 nCount = pStringSeq->getLength();
@@ -169,7 +169,7 @@ void BibTBEditListener::statusChanged(const frame::FeatureStateEvent& rEvt)throw
uno::Any aState=rEvt.State;
if(aState.getValueType()== ::cppu::UnoType<OUString>::get())
{
- OUString aStr = *(OUString*) aState.getValue();
+ OUString aStr = *static_cast<OUString const *>(aState.getValue());
pToolBar->SetQueryString(aStr);
}
}
diff --git a/extensions/source/plugin/base/nfuncs.cxx b/extensions/source/plugin/base/nfuncs.cxx
index c3a734fc7ba8..dfeff975ff07 100644
--- a/extensions/source/plugin/base/nfuncs.cxx
+++ b/extensions/source/plugin/base/nfuncs.cxx
@@ -533,7 +533,7 @@ int32_t SAL_CALL NP_LOADDS NPN_Write( NPP instance, NPStream* stream, int32_t l
return 0;
pImpl->enterPluginCallback();
- ::com::sun::star::uno::Sequence<sal_Int8> Bytes( (sal_Int8*)buffer, len );
+ ::com::sun::star::uno::Sequence<sal_Int8> Bytes( static_cast<sal_Int8*>(buffer), len );
static_cast<PluginOutputStream*>(pStream)->getOutputStream()->writeBytes( Bytes );
pImpl->leavePluginCallback();
@@ -570,15 +570,15 @@ NPError SAL_CALL NP_LOADDS NPN_GetValue( NPP instance, NPNVariable variable, vo
#endif
case NPNVjavascriptEnabledBool:
// no javascript
- *(NPBool*)value = false;
+ *static_cast<NPBool*>(value) = false;
break;
case NPNVasdEnabledBool:
// no SmartUpdate
- *(NPBool*)value = false;
+ *static_cast<NPBool*>(value) = false;
break;
case NPNVisOfflineBool:
// no offline browsing
- *(NPBool*)value = false;
+ *static_cast<NPBool*>(value) = false;
break;
}
diff --git a/extensions/source/plugin/base/xplugin.cxx b/extensions/source/plugin/base/xplugin.cxx
index 2107b6de5957..cef5e4be347c 100644
--- a/extensions/source/plugin/base/xplugin.cxx
+++ b/extensions/source/plugin/base/xplugin.cxx
@@ -519,7 +519,7 @@ void XPlugin_Impl::loadPlugin()
#if defined( UNX ) && !(defined(MACOSX))
if (pEnvData->pDisplay) // headless?
{
- XSync( (Display*)pEnvData->pDisplay, False );
+ XSync( static_cast<Display*>(pEnvData->pDisplay), False );
}
#endif
if( ! getPluginComm() )
@@ -573,7 +573,7 @@ void XPlugin_Impl::loadPlugin()
#elif defined( UNX )
if (pEnvData->pDisplay) // headless?
{
- XSync( (Display*)pEnvData->pDisplay, False );
+ XSync( static_cast<Display*>(pEnvData->pDisplay), False );
m_aNPWindow.window = reinterpret_cast<void*>(pEnvData->aWindow);
}
else
diff --git a/extensions/source/plugin/inc/plugin/unx/plugcon.hxx b/extensions/source/plugin/inc/plugin/unx/plugcon.hxx
index 921486e1f941..55ac2af908ab 100644
--- a/extensions/source/plugin/inc/plugin/unx/plugcon.hxx
+++ b/extensions/source/plugin/inc/plugin/unx/plugcon.hxx
@@ -157,7 +157,7 @@ public:
NPError GetNPError( MediatorMessage* pMes )
{
- NPError* pErr = (NPError*)pMes->GetBytes();
+ NPError* pErr = static_cast<NPError*>(pMes->GetBytes());
NPError aErr = *pErr;
delete [] pErr;
return aErr;
diff --git a/extensions/source/plugin/unx/npnapi.cxx b/extensions/source/plugin/unx/npnapi.cxx
index 7e345300a556..9721a55ffdf8 100644
--- a/extensions/source/plugin/unx/npnapi.cxx
+++ b/extensions/source/plugin/unx/npnapi.cxx
@@ -64,7 +64,7 @@ static void* l_NPN_MemAlloc( uint32_t nBytes )
static void l_NPN_MemFree( void* pMem )
{
- delete [] (char*)pMem;
+ delete [] static_cast<char*>(pMem);
}
static uint32_t l_NPN_MemFlush( uint32_t /*nSize*/ )
@@ -382,36 +382,36 @@ static NPError l_NPN_GetValue( NPP, NPNVariable variable, void* value )
switch( (int)variable )
{
case NPNVxDisplay:
- *((Display**)value) = pXtAppDisplay;
+ *static_cast<Display**>(value) = pXtAppDisplay;
SAL_INFO("extensions.plugin", "Display requested");
break;
case NPNVxtAppContext:
- *((XtAppContext*)value) = app_context;
+ *static_cast<XtAppContext*>(value) = app_context;
SAL_INFO("extensions.plugin", "AppContext requested");
break;
case NPNVjavascriptEnabledBool:
// no javascript
- *(NPBool*)value = false;
+ *static_cast<NPBool*>(value) = false;
SAL_INFO("extensions.plugin", "javascript enabled requested");
break;
case NPNVasdEnabledBool:
// no SmartUpdate
- *(NPBool*)value = false;
+ *static_cast<NPBool*>(value) = false;
SAL_INFO("extensions.plugin", "smart update enabled requested");
break;
case NPNVisOfflineBool:
// no offline browsing
- *(NPBool*)value = false;
+ *static_cast<NPBool*>(value) = false;
SAL_INFO("extensions.plugin", "offline browsing requested");
break;
case NPNVSupportsXEmbedBool:
// asking xembed
- *(int*)value = int(true);
+ *static_cast<int*>(value) = int(true);
SAL_INFO("extensions.plugin", "xembed requested");
break;
case NPNVToolkit:
# if ENABLE_GTK
- *(int*)value = NPNVGtk2;
+ *static_cast<int*>(value) = NPNVGtk2;
# else
*(int*)value = 0;
# endif
@@ -557,7 +557,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
// to first destroy the widget and then destroy
// the instance, so mimic that behaviour here
if( pInst->pShell )
- XtDestroyWidget( (Widget)pInst->pShell );
+ XtDestroyWidget( static_cast<Widget>(pInst->pShell) );
pInst->pWidget = pInst->pShell = NULL;
@@ -581,7 +581,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
reinterpret_cast<char*>(&aRet), sizeof( aRet ),
pSave->buf, pSave->len,
NULL );
- delete [] (char*)pSave->buf;
+ delete [] static_cast<char*>(pSave->buf);
}
else
Respond( pMessage->m_nID,
@@ -614,7 +614,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
pStream->end = pMessage->GetUINT32();
pStream->lastmodified = pMessage->GetUINT32();
pStream->pdata = pStream->ndata = pStream->notifyData = NULL;
- NPBool* pSeekable = (NPBool*)pMessage->GetBytes();
+ NPBool* pSeekable = static_cast<NPBool*>(pMessage->GetBytes());
m_aNPWrapStreams.push_back( pStream );
uint16_t nStype = NP_ASFILE;
NPError aRet = aPluginFuncs.newstream( instance, pType, pStream,
@@ -641,15 +641,15 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
case eNPP_New:
{
char* pType = pMessage->GetString();
- uint16_t* pMode = (uint16_t*)pMessage->GetBytes();
- int16_t* pArgc = (int16_t*)pMessage->GetBytes();
+ uint16_t* pMode = static_cast<uint16_t*>(pMessage->GetBytes());
+ int16_t* pArgc = static_cast<int16_t*>(pMessage->GetBytes());
NPP instance = new NPP_t;
instance->pdata = instance->ndata = NULL;
sal_uLong nArgnBytes, nArgvBytes;
- char* pArgn = (char*)pMessage->GetBytes( nArgnBytes );
- char* pArgv = (char*)pMessage->GetBytes( nArgvBytes );
+ char* pArgn = static_cast<char*>(pMessage->GetBytes( nArgnBytes ));
+ char* pArgv = static_cast<char*>(pMessage->GetBytes( nArgvBytes ));
sal_uLong nSaveBytes;
- char* pSavedData = (char*)pMessage->GetBytes( nSaveBytes );
+ char* pSavedData = static_cast<char*>(pMessage->GetBytes( nSaveBytes ));
ConnectorInstance* pInst =
new ConnectorInstance( instance, pType,
*pArgc,
@@ -705,7 +705,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
{
sal_uInt32 nInstance = pMessage->GetUINT32();
ConnectorInstance* pInst= m_aInstances[ nInstance ];
- NPWindow* pWindow = (NPWindow*)pMessage->GetBytes();
+ NPWindow* pWindow = static_cast<NPWindow*>(pMessage->GetBytes());
if( pWindow->width < 1 )
pWindow->width = 1;
@@ -768,7 +768,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
}
// fill in NPWindow and NPCallbackStruct
- pInst->window.window = reinterpret_cast<void*>(XtWindow( (Widget)pInst->pWidget ));
+ pInst->window.window = reinterpret_cast<void*>(XtWindow( static_cast<Widget>(pInst->pWidget) ));
pInst->window.x = 0;
pInst->window.y = 0;
pInst->window.width = pWindow->width;
@@ -780,16 +780,16 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
pInst->window.ws_info = &pInst->ws_info;
pInst->window.type = NPWindowTypeWindow;
pInst->ws_info.type = NP_SETWINDOW;
- pInst->ws_info.display = XtDisplay( (Widget)pInst->pWidget );
- pInst->ws_info.visual = DefaultVisualOfScreen( XtScreen( (Widget)pInst->pWidget ) );
- pInst->ws_info.colormap = DefaultColormapOfScreen( XtScreen( (Widget)pInst->pWidget ) );
- pInst->ws_info.depth = DefaultDepthOfScreen( XtScreen( (Widget)pInst->pWidget ) );
+ pInst->ws_info.display = XtDisplay( static_cast<Widget>(pInst->pWidget) );
+ pInst->ws_info.visual = DefaultVisualOfScreen( XtScreen( static_cast<Widget>(pInst->pWidget) ) );
+ pInst->ws_info.colormap = DefaultColormapOfScreen( XtScreen( static_cast<Widget>(pInst->pWidget) ) );
+ pInst->ws_info.depth = DefaultDepthOfScreen( XtScreen( static_cast<Widget>(pInst->pWidget) ) );
- XtResizeWidget( (Widget)pInst->pShell,
+ XtResizeWidget( static_cast<Widget>(pInst->pShell),
pInst->window.width,
pInst->window.height,
0 );
- XtResizeWidget( (Widget)pInst->pWidget,
+ XtResizeWidget( static_cast<Widget>(pInst->pWidget),
pInst->window.width,
pInst->window.height,
0 );
@@ -824,8 +824,8 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
sal_uInt32 nInstance = pMessage->GetUINT32();
NPP instance = m_aInstances[ nInstance ]->instance;
char* url = pMessage->GetString();
- NPReason* pReason = (NPReason*)pMessage->GetBytes();
- void** notifyData = (void**)pMessage->GetBytes();
+ NPReason* pReason = static_cast<NPReason*>(pMessage->GetBytes());
+ void** notifyData = static_cast<void**>(pMessage->GetBytes());
aPluginFuncs.urlnotify( instance, url, *pReason, *notifyData );
delete [] url;
delete [] pReason;
@@ -859,7 +859,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
NPStream* pStream = m_aNPWrapStreams[ nFileID ];
int32_t offset = pMessage->GetUINT32();
sal_uLong len;
- char* buffer = (char*)pMessage->GetBytes( len );
+ char* buffer = static_cast<char*>(pMessage->GetBytes( len ));
int32_t nRet = aPluginFuncs.write( instance, pStream, offset, len, buffer );
SAL_INFO(
diff --git a/extensions/source/plugin/unx/nppapi.cxx b/extensions/source/plugin/unx/nppapi.cxx
index 68802abfd1cf..6197fcf2f62e 100644
--- a/extensions/source/plugin/unx/nppapi.cxx
+++ b/extensions/source/plugin/unx/nppapi.cxx
@@ -118,7 +118,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
NPP instance = m_aInstances[ nInstance ]->instance;
char* pUrl = pMessage->GetString();
char* pWindow = pMessage->GetString();
- void** pNotifyData = (void**)pMessage->GetBytes();
+ void** pNotifyData = static_cast<void**>(pMessage->GetBytes());
NPError aRet = NPN_GetURLNotify( instance, pUrl, pWindow,
*pNotifyData );
Respond( pMessage->m_nID,
@@ -134,7 +134,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
NPP instance = m_aInstances[ nInstance ]->instance;
sal_uInt32 nFileID = pMessage->GetUINT32();
char* pUrl = pMessage->GetString();
- NPError* pReason = (NPError*)pMessage->GetBytes();
+ NPError* pReason = static_cast<NPError*>(pMessage->GetBytes());
NPError aRet = NPERR_FILE_NOT_FOUND;
if( nFileID < static_cast<sal_uInt32>(m_aNPWrapStreams.size()) )
{
@@ -209,9 +209,9 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
char* pUrl = pMessage->GetString();
char* pTarget = pMessage->GetString();
sal_uInt32 nLen = pMessage->GetUINT32();
- char* pBuf = (char*)pMessage->GetBytes();
- NPBool* pFile = (NPBool*)pMessage->GetBytes();
- void** pNData = (void**)pMessage->GetBytes();
+ char* pBuf = static_cast<char*>(pMessage->GetBytes());
+ NPBool* pFile = static_cast<NPBool*>(pMessage->GetBytes());
+ void** pNData = static_cast<void**>(pMessage->GetBytes());
NPError aRet =
NPN_PostURLNotify( instance, pUrl, pTarget, nLen, pBuf, *pFile, *pNData );
Respond( pMessage->m_nID, reinterpret_cast<char*>(&aRet), sizeof( aRet ), NULL );
@@ -229,8 +229,8 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
char* pUrl = pMessage->GetString();
char* pWindow = pMessage->GetString();
sal_uInt32 nLen = pMessage->GetUINT32();
- char* pBuf = (char*)pMessage->GetBytes();
- NPBool* pFile = (NPBool*)pMessage->GetBytes();
+ char* pBuf = static_cast<char*>(pMessage->GetBytes());
+ NPBool* pFile = static_cast<NPBool*>(pMessage->GetBytes());
NPError aRet =
NPN_PostURL( instance, pUrl, pWindow, nLen, pBuf, *pFile );
Respond( pMessage->m_nID, reinterpret_cast<char*>(&aRet), sizeof( aRet ), NULL );
@@ -245,7 +245,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
sal_uInt32 nFileID = pMessage->GetUINT32();
NPStream* pStream = m_aNPWrapStreams[ nFileID ];
sal_uInt32 nRanges = pMessage->GetUINT32();
- sal_uInt32* pArray = (sal_uInt32*)pMessage->GetBytes();
+ sal_uInt32* pArray = static_cast<sal_uInt32*>(pMessage->GetBytes());
// build ranges table
NPByteRange* pFirst = new NPByteRange;
NPByteRange* pRun = pFirst;
@@ -300,7 +300,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
Respond( pMessage->m_nID,
reinterpret_cast<char*>(&nRet), sizeof( nRet ),
NULL );
- delete [] (char*)pBuffer;
+ delete [] static_cast<char*>(pBuffer);
delete instance;
}
break;
@@ -358,7 +358,7 @@ NPError UnxPluginComm::NPP_Destroy( NPP instance, NPSavedData** save )
aRet = GetNPError( pMes );
sal_uLong nSaveBytes;
void* pSaveData = pMes->GetBytes( nSaveBytes );
- if( nSaveBytes == 4 && *(sal_uInt32*)pSaveData == 0 )
+ if( nSaveBytes == 4 && *static_cast<sal_uInt32*>(pSaveData) == 0 )
*save = NULL;
else
{
@@ -418,7 +418,7 @@ NPError UnxPluginComm::NPP_New( NPMIMEType pluginType, NPP instance, uint16_t mo
m_aInstances.push_back(
new ConnectorInstance( instance, pluginType, 0,
NULL, 0, NULL, 0,
- saved ? (char*)saved->buf : NULL,
+ saved ? static_cast<char*>(saved->buf) : NULL,
saved ? saved->len : 0 ) );
char *pArgnBuf, *pArgvBuf;
@@ -494,7 +494,7 @@ NPError UnxPluginComm::NPP_NewStream( NPP instance, NPMIMEType type, NPStream* s
return NPERR_GENERIC_ERROR;
aRet = GetNPError( pMes );
- uint16_t* pSType = (uint16_t*)pMes->GetBytes();
+ uint16_t* pSType = static_cast<uint16_t*>(pMes->GetBytes());
*stype = *pSType;
delete [] pSType;
diff --git a/extensions/source/plugin/unx/plugcon.cxx b/extensions/source/plugin/unx/plugcon.cxx
index f1995d7ab8ec..c54f7f2368d2 100644
--- a/extensions/source/plugin/unx/plugcon.cxx
+++ b/extensions/source/plugin/unx/plugcon.cxx
@@ -238,7 +238,7 @@ ConnectorInstance::~ConnectorInstance()
delete [] argv;
delete [] pArgnBuf;
delete [] pArgvBuf;
- delete [] (char*)aData.buf;
+ delete [] static_cast<char*>(aData.buf);
}
const char* GetCommandName( CommandAtoms eCommand )
diff --git a/extensions/source/propctrlr/propertyeditor.cxx b/extensions/source/propctrlr/propertyeditor.cxx
index 24bbd498ec01..4a87e124a567 100644
--- a/extensions/source/propctrlr/propertyeditor.cxx
+++ b/extensions/source/propctrlr/propertyeditor.cxx
@@ -364,7 +364,7 @@ namespace pcr
if ( !_pPointerToOUString )
return;
- const OUString& rText( *(const OUString*)_pPointerToOUString );
+ const OUString& rText( *static_cast<const OUString*>(_pPointerToOUString) );
_rPage.getListBox().SetHelpText( rText );
}
diff --git a/extensions/source/propctrlr/selectlabeldialog.cxx b/extensions/source/propctrlr/selectlabeldialog.cxx
index c1302009bd99..79f37b5602b1 100644
--- a/extensions/source/propctrlr/selectlabeldialog.cxx
+++ b/extensions/source/propctrlr/selectlabeldialog.cxx
@@ -151,7 +151,7 @@ namespace pcr
{
void* pData = pLoop->GetUserData();
if (pData)
- delete (Reference< XPropertySet > *)pData;
+ delete static_cast<Reference< XPropertySet > *>(pData);
pLoop = m_pControlTree->Next(pLoop);
}
@@ -240,7 +240,7 @@ namespace pcr
void* pData = pSelected ? pSelected->GetUserData() : NULL;
if (pData)
- m_xSelectedControl = Reference< XPropertySet > (*(Reference< XPropertySet > *)pData);
+ m_xSelectedControl = Reference< XPropertySet > (*static_cast<Reference< XPropertySet > *>(pData));
m_pNoAssignment->SetClickHdl(Link());
m_pNoAssignment->Check(pData == NULL);
diff --git a/extensions/source/propctrlr/taborder.cxx b/extensions/source/propctrlr/taborder.cxx
index fb28ed3ef266..24fb70112512 100644
--- a/extensions/source/propctrlr/taborder.cxx
+++ b/extensions/source/propctrlr/taborder.cxx
@@ -270,7 +270,7 @@ namespace pcr
for( sal_Int32 j=0; j<aControlModels.getLength(); j++ )
{
Reference< XPropertySet > xSet(pControlModels[j], UNO_QUERY);
- if ((XPropertySet*)xSet.get() == ((XPropertySet*)pEntry->GetUserData()))
+ if ((XPropertySet*)xSet.get() == static_cast<XPropertySet*>(pEntry->GetUserData()))
{
pSortedControlModels[i] = pControlModels[j];
break;
diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx
index 9bbe03de776d..cad79ac149d3 100644
--- a/extensions/source/update/ui/updatecheckui.cxx
+++ b/extensions/source/update/ui/updatecheckui.cxx
@@ -700,7 +700,7 @@ IMPL_LINK( UpdateCheckUI, WindowEventHdl, VclWindowEvent*, pEvent )
else if ( VCLEVENT_WINDOW_MENUBARREMOVED == nEventID )
{
SolarMutexGuard aGuard;
- MenuBar *pMBar = (MenuBar*) pEvent->GetData();
+ MenuBar *pMBar = static_cast<MenuBar*>(pEvent->GetData());
if ( pMBar && ( pMBar == mpIconMBar ) )
RemoveBubbleWindow( true );
}