[Libreoffice-commits] core.git: 4 commits - bridges/source lingucomponent/source sd/source vcl/inc vcl/osx vcl/quartz
Stephan Bergmann
sbergman at redhat.com
Thu Jan 22 10:37:35 PST 2015
bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx | 4 +--
bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx | 16 ++++++------
lingucomponent/source/spellcheck/macosxspell/macspellimp.mm | 2 -
sd/source/ui/remotecontrol/BluetoothServer.cxx | 2 -
vcl/inc/osx/a11yfocustracker.hxx | 2 -
vcl/osx/DragSource.cxx | 2 -
vcl/osx/a11yfocustracker.cxx | 8 ++++--
vcl/osx/salframeview.mm | 3 +-
vcl/osx/salmenu.cxx | 2 -
vcl/quartz/salbmp.cxx | 2 -
10 files changed, 24 insertions(+), 19 deletions(-)
New commits:
commit 3f075756588c23bf5a8e967b1d3a0e6670c3c279
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jan 22 19:36:09 2015 +0100
loplugin:cstylecast (MACOSX)
Change-Id: Ia4c8920ce2ce44286c5042d4b5dbeaa41fe355cc
diff --git a/vcl/inc/osx/a11yfocustracker.hxx b/vcl/inc/osx/a11yfocustracker.hxx
index 9cd9e6f..e45f74a 100644
--- a/vcl/inc/osx/a11yfocustracker.hxx
+++ b/vcl/inc/osx/a11yfocustracker.hxx
@@ -74,7 +74,7 @@ protected:
void toolbox_open_floater(vcl::Window *pWindow);
// callback function for Application::addEventListener
- static long WindowEventHandler(AquaA11yFocusTracker *pFocusTracker, ::VclSimpleEvent const *pEvent);
+ static sal_IntPtr WindowEventHandler(void * pThis, void * pCaller);
private:
// the accessible object that has the keyboard focus (if any)
diff --git a/vcl/osx/DragSource.cxx b/vcl/osx/DragSource.cxx
index 5601d25..5cf1602 100644
--- a/vcl/osx/DragSource.cxx
+++ b/vcl/osx/DragSource.cxx
@@ -192,7 +192,7 @@ void SAL_CALL DragSource::initialize(const Sequence< Any >& aArguments)
throw Exception("DragSource::initialize: Provided view is not attached to a vcl frame",
static_cast<OWeakObject*>(this));
}
- mpFrame = (AquaSalFrame*)[pWin performSelector: @selector(getSalFrame)];
+ mpFrame = static_cast<AquaSalFrame*>([pWin performSelector: @selector(getSalFrame)]);
mDragSourceHelper = [[DragSourceHelper alloc] initWithDragSource: this];
diff --git a/vcl/osx/a11yfocustracker.cxx b/vcl/osx/a11yfocustracker.cxx
index 877d2a7..47dd652 100644
--- a/vcl/osx/a11yfocustracker.cxx
+++ b/vcl/osx/a11yfocustracker.cxx
@@ -43,8 +43,12 @@ getWindow(const ::VclSimpleEvent *pEvent)
// callback function for Application::addEventListener
-long AquaA11yFocusTracker::WindowEventHandler(AquaA11yFocusTracker *pFocusTracker, ::VclSimpleEvent const *pEvent)
+sal_IntPtr AquaA11yFocusTracker::WindowEventHandler(
+ void * pThis, void * pCaller)
{
+ AquaA11yFocusTracker *pFocusTracker = static_cast<AquaA11yFocusTracker *>(
+ pThis);
+ VclSimpleEvent const *pEvent = static_cast<VclSimpleEvent const *>(pCaller);
switch (pEvent->GetId())
{
case VCLEVENT_WINDOW_PAINT:
@@ -89,7 +93,7 @@ long AquaA11yFocusTracker::WindowEventHandler(AquaA11yFocusTracker *pFocusTracke
}
AquaA11yFocusTracker::AquaA11yFocusTracker() :
- m_aWindowEventLink(this, (PSTUB) WindowEventHandler),
+ m_aWindowEventLink(this, WindowEventHandler),
m_xDocumentFocusListener(new DocumentFocusListener(*this))
{
Application::AddEventListener(m_aWindowEventLink);
diff --git a/vcl/osx/salframeview.mm b/vcl/osx/salframeview.mm
index 248c8eb..04c6e90 100644
--- a/vcl/osx/salframeview.mm
+++ b/vcl/osx/salframeview.mm
@@ -1726,7 +1726,8 @@ private:
}
-(id)parentAttribute {
- return (NSView*) mpFrame->getNSWindow();
+ return reinterpret_cast<NSView*>(mpFrame->getNSWindow());
+ //TODO: odd cast really needed for fdo#74121?
}
-(::com::sun::star::accessibility::XAccessibleContext *)accessibleContext
diff --git a/vcl/osx/salmenu.cxx b/vcl/osx/salmenu.cxx
index 6d2c6d8..a69d884 100644
--- a/vcl/osx/salmenu.cxx
+++ b/vcl/osx/salmenu.cxx
@@ -246,7 +246,7 @@ AquaSalMenu::AquaSalMenu( bool bMenuBar ) :
if( ! mbMenuBar )
{
mpMenu = [[SalNSMenu alloc] initWithMenu: this];
- [mpMenu setDelegate: (id<NSMenuDelegate>)mpMenu];
+ [mpMenu setDelegate: static_cast<id<NSMenuDelegate>>(mpMenu)];
}
else
{
diff --git a/vcl/quartz/salbmp.cxx b/vcl/quartz/salbmp.cxx
index 78064c2..1de8195 100644
--- a/vcl/quartz/salbmp.cxx
+++ b/vcl/quartz/salbmp.cxx
@@ -400,7 +400,7 @@ public:
virtual void StartLine( sal_uInt8* pLine ) SAL_OVERRIDE
{
- pData16 = (sal_uInt16*)pLine;
+ pData16 = reinterpret_cast<sal_uInt16*>(pLine);
}
virtual void SkipPixel( sal_uInt32 nPixel ) SAL_OVERRIDE
{
commit 25442edcad1b0a2284cfaac6e5ed2bc17fb55478
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jan 22 19:35:53 2015 +0100
loplugin:cstylecast (MACOSX)
Change-Id: I8a2785e90dae7edacb6dfb3e4362e5fb6a981b0e
diff --git a/sd/source/ui/remotecontrol/BluetoothServer.cxx b/sd/source/ui/remotecontrol/BluetoothServer.cxx
index 93180f2..72ca128 100644
--- a/sd/source/ui/remotecontrol/BluetoothServer.cxx
+++ b/sd/source/ui/remotecontrol/BluetoothServer.cxx
@@ -467,7 +467,7 @@ sal_Int32 OSXBluetoothWrapper::readLine( OString& aLine )
std::ostringstream s;
if (mBuffer.size() > 0)
{
- for (unsigned char *p = (unsigned char *) &mBuffer.front(); p != (unsigned char *) &mBuffer.front() + mBuffer.size(); p++)
+ for (unsigned char *p = reinterpret_cast<unsigned char *>(&mBuffer.front()); p != reinterpret_cast<unsigned char *>(&mBuffer.front()) + mBuffer.size(); p++)
{
if (*p == '\n')
s << "\\n";
commit ee5443b8daef4196150fd7e4e98e8ed8ffec219f
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jan 22 19:35:41 2015 +0100
loplugin:cstylecast (MACOSX)
Change-Id: I1dac5542d711133f30fb4e61590a19bd2beccf53
diff --git a/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm b/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm
index aa06d13..609e315 100644
--- a/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm
+++ b/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm
@@ -360,7 +360,7 @@ Reference< XSpellAlternatives >
{
// if needed add: if (suglst[ii] == NULL) continue;
NSString* guess = [guesses objectAtIndex:ii];
- OUString cvtwrd((const sal_Unicode*)[guess cStringUsingEncoding:NSUnicodeStringEncoding], (sal_Int32)[guess length]);
+ OUString cvtwrd(reinterpret_cast<const sal_Unicode*>([guess cStringUsingEncoding:NSUnicodeStringEncoding]), (sal_Int32)[guess length]);
pStr[ii] = cvtwrd;
}
}
commit 59e928b010279f002c0553b5c69a7de510ff5036
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jan 22 19:35:21 2015 +0100
loplugin:cstylecast (MACOSX)
Change-Id: Iaefde6a2fbe1b37f31435217c9f57d611d255b11
diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx b/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx
index b1e40bd..8055a8b 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx
@@ -173,7 +173,7 @@ std::type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr )
{
std::type_info * rtti;
- OUString const & unoName = *(OUString const *)&pTypeDescr->aBase.pTypeName;
+ OUString const & unoName = OUString::unacquired(&pTypeDescr->aBase.pTypeName);
MutexGuard guard( m_mutex );
t_rtti_map::const_iterator iFind( m_rttis.find( unoName ) );
@@ -311,7 +311,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
#endif
}
}
- rtti = s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
+ rtti = s_rtti->getRTTI( reinterpret_cast<typelib_CompoundTypeDescription *>(pTypeDescr) );
TYPELIB_DANGER_RELEASE( pTypeDescr );
assert(rtti && "### no rtti for throwing exception!");
if (! rtti)
diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx
index 7a9654c..a90d030 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx
@@ -318,7 +318,7 @@ void unoInterfaceProxyDispatch(
{
#if OSL_DEBUG_LEVEL > 0
// determine vtable call index
- sal_Int32 nMemberPos = ((typelib_InterfaceMemberTypeDescription *)pMemberDescr)->nPosition;
+ sal_Int32 nMemberPos = reinterpret_cast<typelib_InterfaceMemberTypeDescription const *>(pMemberDescr)->nPosition;
assert(nMemberPos < pTypeDescr->nAllMembers);
#endif
VtableSlot aVtableSlot(
@@ -332,7 +332,7 @@ void unoInterfaceProxyDispatch(
// dependent dispatch
cpp_call(
pThis, aVtableSlot,
- ((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef,
+ reinterpret_cast<typelib_InterfaceAttributeTypeDescription const *>(pMemberDescr)->pAttributeTypeRef,
0, 0, // no params
pReturn, pArgs, ppException );
}
@@ -341,7 +341,7 @@ void unoInterfaceProxyDispatch(
// is SET
typelib_MethodParameter aParam;
aParam.pTypeRef =
- ((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef;
+ reinterpret_cast<typelib_InterfaceAttributeTypeDescription const *>(pMemberDescr)->pAttributeTypeRef;
aParam.bIn = sal_True;
aParam.bOut = sal_False;
@@ -367,7 +367,7 @@ void unoInterfaceProxyDispatch(
{
#if OSL_DEBUG_LEVEL > 0
// determine vtable call index
- sal_Int32 nMemberPos = ((typelib_InterfaceMemberTypeDescription *)pMemberDescr)->nPosition;
+ sal_Int32 nMemberPos = reinterpret_cast<typelib_InterfaceMemberTypeDescription const *>(pMemberDescr)->nPosition;
assert(nMemberPos < pTypeDescr->nAllMembers);
#endif
VtableSlot aVtableSlot(
@@ -396,7 +396,7 @@ void unoInterfaceProxyDispatch(
uno_Interface * pInterface = 0;
(*pThis->getBridge()->getUnoEnv()->getRegisteredInterface)(
pThis->getBridge()->getUnoEnv(),
- (void **)&pInterface, pThis->oid.pData, (typelib_InterfaceTypeDescription *)pTD );
+ reinterpret_cast<void **>(&pInterface), pThis->oid.pData, reinterpret_cast<typelib_InterfaceTypeDescription *>(pTD) );
if (pInterface)
{
@@ -415,9 +415,9 @@ void unoInterfaceProxyDispatch(
// dependent dispatch
cpp_call(
pThis, aVtableSlot,
- ((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->pReturnTypeRef,
- ((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->nParams,
- ((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->pParams,
+ reinterpret_cast<typelib_InterfaceMethodTypeDescription const *>(pMemberDescr)->pReturnTypeRef,
+ reinterpret_cast<typelib_InterfaceMethodTypeDescription const *>(pMemberDescr)->nParams,
+ reinterpret_cast<typelib_InterfaceMethodTypeDescription const *>(pMemberDescr)->pParams,
pReturn, pArgs, ppException );
}
break;
More information about the Libreoffice-commits
mailing list