summaryrefslogtreecommitdiff
path: root/winaccessibility
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-01-22 13:11:34 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-01-23 07:54:51 +0100
commit9af8f190ed1bf3f76897ad0c078db16451d6fb69 (patch)
tree015089ee72a67eca7db999845cabb8104c8ce3aa /winaccessibility
parent9602e63c818722c3910343b7af53917d031861c8 (diff)
More loplugin:cstylecast on Windows
Automatic rewrite (of loplugin:cstylecast and loplugin:unnecessaryparen) after cab0427cadddb3aaf1349c66f2fa13a4234ba4b2 "Enable loplugin:cstylecast for some more cases" and a409d32e7f6fc09e041079d6dbc3c927497adfed "More loplugin:cstylecast" Change-Id: Ib3355159dd08333e1b7a8d091caf2069cdcc7862 Reviewed-on: https://gerrit.libreoffice.org/48317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'winaccessibility')
-rw-r--r--winaccessibility/source/UAccCOM/AccComponentBase.cxx4
-rw-r--r--winaccessibility/source/UAccCOM/AccEditableText.cxx18
-rw-r--r--winaccessibility/source/UAccCOM/EnumVariant.cxx2
-rw-r--r--winaccessibility/source/service/AccObject.cxx2
-rw-r--r--winaccessibility/source/service/AccObjectWinManager.cxx2
-rw-r--r--winaccessibility/source/service/AccTopWindowListener.cxx2
-rw-r--r--winaccessibility/source/service/msaaservice_impl.cxx2
7 files changed, 16 insertions, 16 deletions
diff --git a/winaccessibility/source/UAccCOM/AccComponentBase.cxx b/winaccessibility/source/UAccCOM/AccComponentBase.cxx
index 68f800f2c20d..e41123ea33e9 100644
--- a/winaccessibility/source/UAccCOM/AccComponentBase.cxx
+++ b/winaccessibility/source/UAccCOM/AccComponentBase.cxx
@@ -142,7 +142,7 @@ STDMETHODIMP CAccComponentBase::get_foreground(IA2Color * foreground)
{
return E_FAIL;
}
- *foreground = (long)GetXInterface()->getForeground();
+ *foreground = static_cast<long>(GetXInterface()->getForeground());
return S_OK;
@@ -167,7 +167,7 @@ STDMETHODIMP CAccComponentBase::get_background(IA2Color * background)
{
return E_FAIL;
}
- *background = (long)GetXInterface()->getBackground();
+ *background = static_cast<long>(GetXInterface()->getBackground());
return S_OK;
diff --git a/winaccessibility/source/UAccCOM/AccEditableText.cxx b/winaccessibility/source/UAccCOM/AccEditableText.cxx
index 7c5b87171fc7..a53d99b0a935 100644
--- a/winaccessibility/source/UAccCOM/AccEditableText.cxx
+++ b/winaccessibility/source/UAccCOM/AccEditableText.cxx
@@ -295,7 +295,7 @@ void CAccEditableText::get_AnyFromOLECHAR(const ::rtl::OUString &ouName, const :
ouName == "CharFontPitch" )
{
// Convert to short.
- short nValue = (short)ouValue.toInt32();
+ short nValue = static_cast<short>(ouValue.toInt32());
rAny.setValue(&nValue, cppu::UnoType<short>::get());
}
else if(ouName == "CharHeight" ||
@@ -313,7 +313,7 @@ void CAccEditableText::get_AnyFromOLECHAR(const ::rtl::OUString &ouName, const :
else if(ouName == "CharPosture" )
{
// Convert to FontSlant.
- css::awt::FontSlant fontSlant = (css::awt::FontSlant)ouValue.toInt32();
+ css::awt::FontSlant fontSlant = static_cast<css::awt::FontSlant>(ouValue.toInt32());
rAny.setValue(&fontSlant, cppu::UnoType<css::awt::FontSlant>::get());
}
else if(ouName == "ParaTabStops" )
@@ -346,7 +346,7 @@ void CAccEditableText::get_AnyFromOLECHAR(const ::rtl::OUString &ouName, const :
if(posComma != -1)
{
ouSubValue = ouValue.copy(pos + 9, posComma - pos - 9);
- tabStop.Alignment = (css::style::TabAlign)ouSubValue.toInt32();
+ tabStop.Alignment = static_cast<css::style::TabAlign>(ouSubValue.toInt32());
pos = posComma + 1;
// DecimalChar.
@@ -439,30 +439,30 @@ void CAccEditableText::get_AnyFromOLECHAR(const ::rtl::OUString &ouName, const :
if(posComma != -1)
{
ouSubValue = ouValue.copy(pos + 5, posComma - pos - 5);
- lineSpacing.Mode = (sal_Int16)ouSubValue.toInt32();
+ lineSpacing.Mode = static_cast<sal_Int16>(ouSubValue.toInt32());
pos = posComma + 1;
pos = ouValue.indexOf("Height=", pos);
if(pos != -1)
{
ouSubValue = ouValue.copy(pos + 7);
- lineSpacing.Height = (sal_Int16)ouSubValue.toInt32();
+ lineSpacing.Height = static_cast<sal_Int16>(ouSubValue.toInt32());
}
else
{
- lineSpacing.Height = (sal_Int16)100; // Default height.
+ lineSpacing.Height = sal_Int16(100); // Default height.
}
}
else
{
- lineSpacing.Height = (sal_Int16)100; // Default height.
+ lineSpacing.Height = sal_Int16(100); // Default height.
}
}
else
{
// Default Mode and Height.
- lineSpacing.Mode = (sal_Int16)0;
- lineSpacing.Height = (sal_Int16)100; // Default height.
+ lineSpacing.Mode = sal_Int16(0);
+ lineSpacing.Height = sal_Int16(100); // Default height.
}
// Convert to Any object.
diff --git a/winaccessibility/source/UAccCOM/EnumVariant.cxx b/winaccessibility/source/UAccCOM/EnumVariant.cxx
index ba2d443ca91f..ec21526e2d19 100644
--- a/winaccessibility/source/UAccCOM/EnumVariant.cxx
+++ b/winaccessibility/source/UAccCOM/EnumVariant.cxx
@@ -103,7 +103,7 @@ HRESULT STDMETHODCALLTYPE CEnumVariant::Skip(ULONG cElements)
SolarMutexGuard g;
m_lCurrent += cElements;
- if (m_lCurrent > (long)(m_lLBound+m_pXAccessibleSelection->getSelectedAccessibleChildCount()))
+ if (m_lCurrent > static_cast<long>(m_lLBound+m_pXAccessibleSelection->getSelectedAccessibleChildCount()))
{
m_lCurrent = m_lLBound+m_pXAccessibleSelection->getSelectedAccessibleChildCount();
return E_FAIL;
diff --git a/winaccessibility/source/service/AccObject.cxx b/winaccessibility/source/service/AccObject.cxx
index c72b41c7fa6f..ed0ac90eebb7 100644
--- a/winaccessibility/source/service/AccObject.cxx
+++ b/winaccessibility/source/service/AccObject.cxx
@@ -367,7 +367,7 @@ void AccObject::UpdateDefaultAction( )
case CHECK_BOX:
case TREE_ITEM:
case BUTTON_DROPDOWN:
- m_pIMAcc->Put_ActionDescription( o3tl::toW(m_xAccActionRef->getAccessibleActionDescription((sal_Int32)0).getStr()) );
+ m_pIMAcc->Put_ActionDescription( o3tl::toW(m_xAccActionRef->getAccessibleActionDescription(sal_Int32(0)).getStr()) );
return;
}
}
diff --git a/winaccessibility/source/service/AccObjectWinManager.cxx b/winaccessibility/source/service/AccObjectWinManager.cxx
index 4298dff3d4d1..d5557d685539 100644
--- a/winaccessibility/source/service/AccObjectWinManager.cxx
+++ b/winaccessibility/source/service/AccObjectWinManager.cxx
@@ -1015,7 +1015,7 @@ void AccObjectWinManager::SetRole( XAccessible* pXAcc, long Role )
{
AccObject* pAccObj = GetAccObjByXAcc( pXAcc );
if( pAccObj )
- pAccObj->SetRole( (short)Role );
+ pAccObj->SetRole( static_cast<short>(Role) );
}
/**
diff --git a/winaccessibility/source/service/AccTopWindowListener.cxx b/winaccessibility/source/service/AccTopWindowListener.cxx
index 5ddb8deffb9a..65b95c6e7bbe 100644
--- a/winaccessibility/source/service/AccTopWindowListener.cxx
+++ b/winaccessibility/source/service/AccTopWindowListener.cxx
@@ -77,7 +77,7 @@ void AccTopWindowListener::HandleWindowOpened( css::accessibility::XAccessible*
AddAllListeners(pAccessible,nullptr,systemdata->hWnd);
if( window->GetStyle() & WB_MOVEABLE )
- accManagerAgent.IncreaseState( pAccessible, (unsigned short) -1 /* U_MOVEBLE */ );
+ accManagerAgent.IncreaseState( pAccessible, static_cast<unsigned short>(-1) /* U_MOVEBLE */ );
short role = pAccessibleContext->getAccessibleRole();
diff --git a/winaccessibility/source/service/msaaservice_impl.cxx b/winaccessibility/source/service/msaaservice_impl.cxx
index cc3b92116fdc..95968c4d65ad 100644
--- a/winaccessibility/source/service/msaaservice_impl.cxx
+++ b/winaccessibility/source/service/msaaservice_impl.cxx
@@ -216,7 +216,7 @@ static void AccessBridgeHandleExistingWindow(const Reference< XMSAAService > &xA
*/
static void AccessBridgeUpdateOldTopWindows( const Reference< XMSAAService > &xAccMgr )
{
- sal_uInt16 nTopWindowCount = (sal_uInt16)Application::GetTopWindowCount();
+ sal_uInt16 nTopWindowCount = static_cast<sal_uInt16>(Application::GetTopWindowCount());
for ( sal_uInt16 i = 0; i < nTopWindowCount; i++ )
{