summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx6
-rw-r--r--accessibility/source/extended/AccessibleBrowseBoxHeaderCell.cxx2
-rw-r--r--accessibility/source/extended/AccessibleBrowseBoxTable.cxx6
-rw-r--r--accessibility/source/extended/AccessibleBrowseBoxTableBase.cxx2
-rw-r--r--accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx2
-rw-r--r--accessibility/source/extended/AccessibleGridControlTable.cxx6
-rw-r--r--accessibility/source/extended/accessiblelistboxentry.cxx6
-rw-r--r--accessibility/source/extended/accessibletabbar.cxx2
-rw-r--r--accessibility/source/extended/accessibletabbarbase.cxx2
-rw-r--r--accessibility/source/extended/accessibletabbarpagelist.cxx30
-rw-r--r--accessibility/source/extended/textwindowaccessibility.cxx10
-rw-r--r--accessibility/source/helper/characterattributeshelper.cxx22
-rw-r--r--accessibility/source/standard/accessiblemenubasecomponent.cxx34
-rw-r--r--accessibility/source/standard/vclxaccessiblebox.cxx2
-rw-r--r--accessibility/source/standard/vclxaccessiblebutton.cxx6
-rw-r--r--accessibility/source/standard/vclxaccessiblecheckbox.cxx22
-rw-r--r--accessibility/source/standard/vclxaccessiblelist.cxx8
-rw-r--r--accessibility/source/standard/vclxaccessiblelistitem.cxx16
-rw-r--r--accessibility/source/standard/vclxaccessiblemenuitem.cxx8
-rw-r--r--accessibility/source/standard/vclxaccessibleradiobutton.cxx6
-rw-r--r--accessibility/source/standard/vclxaccessiblescrollbar.cxx2
-rw-r--r--accessibility/source/standard/vclxaccessiblestatusbar.cxx24
-rw-r--r--accessibility/source/standard/vclxaccessibletabcontrol.cxx26
-rw-r--r--accessibility/source/standard/vclxaccessibletoolbox.cxx4
-rw-r--r--accessibility/source/standard/vclxaccessibletoolboxitem.cxx8
25 files changed, 131 insertions, 131 deletions
diff --git a/accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx b/accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx
index 762728a934b3..7891b7a21334 100644
--- a/accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx
+++ b/accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx
@@ -99,9 +99,9 @@ namespace accessibility
Any aValue;
if ( m_bIsTriState )
- aValue <<= (sal_Int32) 2;
+ aValue <<= sal_Int32(2);
else
- aValue <<= (sal_Int32) 1;
+ aValue <<= sal_Int32(1);
return aValue;
}
@@ -109,7 +109,7 @@ namespace accessibility
Any SAL_CALL AccessibleCheckBoxCell::getMinimumValue( )
{
Any aValue;
- aValue <<= (sal_Int32) 0;
+ aValue <<= sal_Int32(0);
return aValue;
}
diff --git a/accessibility/source/extended/AccessibleBrowseBoxHeaderCell.cxx b/accessibility/source/extended/AccessibleBrowseBoxHeaderCell.cxx
index 79bb01f3a39a..15318b079f4a 100644
--- a/accessibility/source/extended/AccessibleBrowseBoxHeaderCell.cxx
+++ b/accessibility/source/extended/AccessibleBrowseBoxHeaderCell.cxx
@@ -120,7 +120,7 @@ namespace
tools::Rectangle getRectangle(IAccessibleTableProvider* _pBrowseBox,sal_Int32 _nRowColIndex, bool _bOnScreen,bool _bRowBar)
{
sal_Int32 nRow = 0;
- sal_uInt16 nCol = (sal_uInt16)_nRowColIndex;
+ sal_uInt16 nCol = static_cast<sal_uInt16>(_nRowColIndex);
if ( _bRowBar )
{
nRow = _nRowColIndex + 1;
diff --git a/accessibility/source/extended/AccessibleBrowseBoxTable.cxx b/accessibility/source/extended/AccessibleBrowseBoxTable.cxx
index 40ce9340127d..7235d52c7405 100644
--- a/accessibility/source/extended/AccessibleBrowseBoxTable.cxx
+++ b/accessibility/source/extended/AccessibleBrowseBoxTable.cxx
@@ -55,7 +55,7 @@ AccessibleBrowseBoxTable::getAccessibleChild( sal_Int32 nChildIndex )
ensureIsValidIndex( nChildIndex );
return mpBrowseBox->CreateAccessibleCell(
- implGetRow( nChildIndex ), (sal_Int16)implGetColumn( nChildIndex ) );
+ implGetRow( nChildIndex ), static_cast<sal_Int16>(implGetColumn( nChildIndex )) );
}
sal_Int32 SAL_CALL AccessibleBrowseBoxTable::getAccessibleIndexInParent()
@@ -105,7 +105,7 @@ OUString SAL_CALL AccessibleBrowseBoxTable::getAccessibleColumnDescription( sal_
ensureIsAlive();
ensureIsValidColumn( nColumn );
- return mpBrowseBox->GetColumnDescription( (sal_uInt16)nColumn );
+ return mpBrowseBox->GetColumnDescription( static_cast<sal_uInt16>(nColumn) );
}
Reference< XAccessibleTable > SAL_CALL AccessibleBrowseBoxTable::getAccessibleRowHeaders()
@@ -167,7 +167,7 @@ Reference< XAccessible > SAL_CALL AccessibleBrowseBoxTable::getAccessibleCellAt(
ensureIsAlive();
ensureIsValidAddress( nRow, nColumn );
- return mpBrowseBox->CreateAccessibleCell( nRow, (sal_Int16)nColumn );
+ return mpBrowseBox->CreateAccessibleCell( nRow, static_cast<sal_Int16>(nColumn) );
}
sal_Bool SAL_CALL AccessibleBrowseBoxTable::isAccessibleSelected(
diff --git a/accessibility/source/extended/AccessibleBrowseBoxTableBase.cxx b/accessibility/source/extended/AccessibleBrowseBoxTableBase.cxx
index 160abb9f138b..c88705f8e7c3 100644
--- a/accessibility/source/extended/AccessibleBrowseBoxTableBase.cxx
+++ b/accessibility/source/extended/AccessibleBrowseBoxTableBase.cxx
@@ -242,7 +242,7 @@ void AccessibleBrowseBoxTableBase::implSelectRow( sal_Int32 nRow, bool bSelect )
void AccessibleBrowseBoxTableBase::implSelectColumn( sal_Int32 nColumnPos, bool bSelect )
{
- mpBrowseBox->SelectColumn( (sal_uInt16)nColumnPos, bSelect );
+ mpBrowseBox->SelectColumn( static_cast<sal_uInt16>(nColumnPos), bSelect );
}
sal_Int32 AccessibleBrowseBoxTableBase::implGetSelectedRowCount() const
diff --git a/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx b/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx
index b267baf51163..2c8c4204a4d1 100644
--- a/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx
+++ b/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx
@@ -75,7 +75,7 @@ namespace accessibility
sal_Int32 _nOffset )
:AccessibleBrowseBoxCell( _rxParent, _rBrowseBox, _xFocusWindow, _nRowPos, _nColPos )
{
- m_nOffset = ( _nOffset == OFFSET_DEFAULT ) ? (sal_Int32)BBINDEX_FIRSTCONTROL : _nOffset;
+ m_nOffset = ( _nOffset == OFFSET_DEFAULT ) ? sal_Int32(BBINDEX_FIRSTCONTROL) : _nOffset;
sal_Int32 nIndex = getIndex_Impl( _nRowPos, _nColPos, _rBrowseBox.GetColumnCount() );
setAccessibleName( _rBrowseBox.GetAccessibleObjectName( BBTYPE_TABLECELL, nIndex ) );
setAccessibleDescription( _rBrowseBox.GetAccessibleObjectDescription( BBTYPE_TABLECELL, nIndex ) );
diff --git a/accessibility/source/extended/AccessibleGridControlTable.cxx b/accessibility/source/extended/AccessibleGridControlTable.cxx
index 3ae129674ece..4d19c1eac509 100644
--- a/accessibility/source/extended/AccessibleGridControlTable.cxx
+++ b/accessibility/source/extended/AccessibleGridControlTable.cxx
@@ -58,7 +58,7 @@ AccessibleGridControlTable::getAccessibleChild( sal_Int32 nChildIndex )
ensureIsAlive();
ensureIsValidIndex( nChildIndex );
sal_Int32 nCount = getAccessibleChildCount();
- if(m_pAccessCellVector.empty() || m_pAccessCellVector.size() != (unsigned)nCount)
+ if(m_pAccessCellVector.empty() || m_pAccessCellVector.size() != static_cast<unsigned>(nCount))
{
m_pAccessCellVector.resize(nCount);
m_pCellVector.resize(nCount);
@@ -125,7 +125,7 @@ OUString SAL_CALL AccessibleGridControlTable::getAccessibleColumnDescription( sa
ensureIsAlive();
ensureIsValidColumn( nColumn );
- return m_aTable.GetColumnDescription( (sal_uInt16)nColumn );
+ return m_aTable.GetColumnDescription( static_cast<sal_uInt16>(nColumn) );
}
Reference< XAccessibleTable > SAL_CALL AccessibleGridControlTable::getAccessibleRowHeaders()
@@ -198,7 +198,7 @@ Reference< XAccessible > SAL_CALL AccessibleGridControlTable::getAccessibleCellA
ensureIsValidAddress( nRow, nColumn );
sal_Int32 nCount = getAccessibleChildCount();
sal_Int32 nChildIndex = nRow*m_aTable.GetColumnCount() + nColumn;
- if(m_pAccessCellVector.empty() || m_pAccessCellVector.size() != (unsigned)nCount)
+ if(m_pAccessCellVector.empty() || m_pAccessCellVector.size() != static_cast<unsigned>(nCount))
{
m_pAccessCellVector.resize(nCount);
m_pCellVector.resize(nCount);
diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx b/accessibility/source/extended/accessiblelistboxentry.cxx
index 19e87ea15fa0..922ba3721f7a 100644
--- a/accessibility/source/extended/accessiblelistboxentry.cxx
+++ b/accessibility/source/extended/accessiblelistboxentry.cxx
@@ -1098,7 +1098,7 @@ namespace accessibility
{
::osl::MutexGuard aGuard( m_aMutex );
Any aValue;
- sal_Int32 level = ((sal_Int32) m_aEntryPath.size() - 1);
+ sal_Int32 level = (static_cast<sal_Int32>(m_aEntryPath.size()) - 1);
level = level < 0 ? 0: level;
aValue <<= level;
return aValue;
@@ -1145,7 +1145,7 @@ namespace accessibility
switch(getAccessibleRole())
{
case AccessibleRole::CHECK_BOX:
- aValue <<= (sal_Int32)1;
+ aValue <<= sal_Int32(1);
break;
case AccessibleRole::LABEL:
default:
@@ -1165,7 +1165,7 @@ namespace accessibility
switch(getAccessibleRole())
{
case AccessibleRole::CHECK_BOX:
- aValue <<= (sal_Int32)0;
+ aValue <<= sal_Int32(0);
break;
case AccessibleRole::LABEL:
default:
diff --git a/accessibility/source/extended/accessibletabbar.cxx b/accessibility/source/extended/accessibletabbar.cxx
index 662e1b745338..0c60565e7bc7 100644
--- a/accessibility/source/extended/accessibletabbar.cxx
+++ b/accessibility/source/extended/accessibletabbar.cxx
@@ -245,7 +245,7 @@ namespace accessibility
if ( i < nCount )
{
- vcl::Window* pChild = m_pTabBar->GetAccessibleChildWindow( (sal_uInt16)i );
+ vcl::Window* pChild = m_pTabBar->GetAccessibleChildWindow( static_cast<sal_uInt16>(i) );
if ( pChild )
xChild = pChild->GetAccessible();
}
diff --git a/accessibility/source/extended/accessibletabbarbase.cxx b/accessibility/source/extended/accessibletabbarbase.cxx
index 9a8b630c8daa..a512b8672140 100644
--- a/accessibility/source/extended/accessibletabbarbase.cxx
+++ b/accessibility/source/extended/accessibletabbarbase.cxx
@@ -45,7 +45,7 @@ IMPL_LINK( AccessibleTabBarBase, WindowEventListener, VclWindowEvent&, rEvent, v
OSL_ENSURE( pEventWindow, "AccessibleTabBarBase::WindowEventListener: no window!" );
if( ( rEvent.GetId() == VclEventId::TabbarPageRemoved ) &&
- ( (sal_uInt16)reinterpret_cast<sal_IntPtr>(rEvent.GetData()) == TabBar::PAGE_NOT_FOUND ) &&
+ ( static_cast<sal_uInt16>(reinterpret_cast<sal_IntPtr>(rEvent.GetData())) == TabBar::PAGE_NOT_FOUND ) &&
(dynamic_cast<AccessibleTabBarPageList *>(this) == nullptr))
{
return;
diff --git a/accessibility/source/extended/accessibletabbarpagelist.cxx b/accessibility/source/extended/accessibletabbarpagelist.cxx
index 1bb3b73ddd7f..e9537939e39a 100644
--- a/accessibility/source/extended/accessibletabbarpagelist.cxx
+++ b/accessibility/source/extended/accessibletabbarpagelist.cxx
@@ -77,7 +77,7 @@ namespace accessibility
{
NotifyAccessibleEvent( AccessibleEventId::SELECTION_CHANGED, Any(), Any() );
- if ( i >= 0 && i < (sal_Int32)m_aAccessibleChildren.size() )
+ if ( i >= 0 && i < static_cast<sal_Int32>(m_aAccessibleChildren.size()) )
{
Reference< XAccessible > xChild( m_aAccessibleChildren[i] );
if ( xChild.is() )
@@ -92,7 +92,7 @@ namespace accessibility
void AccessibleTabBarPageList::UpdatePageText( sal_Int32 i )
{
- if ( i >= 0 && i < (sal_Int32)m_aAccessibleChildren.size() )
+ if ( i >= 0 && i < static_cast<sal_Int32>(m_aAccessibleChildren.size()) )
{
Reference< XAccessible > xChild( m_aAccessibleChildren[i] );
if ( xChild.is() )
@@ -102,7 +102,7 @@ namespace accessibility
{
if ( m_pTabBar )
{
- OUString sPageText = m_pTabBar->GetPageText( m_pTabBar->GetPageId( (sal_uInt16)i ) );
+ OUString sPageText = m_pTabBar->GetPageText( m_pTabBar->GetPageId( static_cast<sal_uInt16>(i) ) );
pAccessibleTabBarPage->SetPageText( sPageText );
}
}
@@ -113,7 +113,7 @@ namespace accessibility
void AccessibleTabBarPageList::InsertChild( sal_Int32 i )
{
- if ( i >= 0 && i <= (sal_Int32)m_aAccessibleChildren.size() )
+ if ( i >= 0 && i <= static_cast<sal_Int32>(m_aAccessibleChildren.size()) )
{
// insert entry in child list
m_aAccessibleChildren.insert( m_aAccessibleChildren.begin() + i, Reference< XAccessible >() );
@@ -132,7 +132,7 @@ namespace accessibility
void AccessibleTabBarPageList::RemoveChild( sal_Int32 i )
{
- if ( i >= 0 && i < (sal_Int32)m_aAccessibleChildren.size() )
+ if ( i >= 0 && i < static_cast<sal_Int32>(m_aAccessibleChildren.size()) )
{
// get the accessible of the removed page
Reference< XAccessible > xChild( m_aAccessibleChildren[i] );
@@ -157,8 +157,8 @@ namespace accessibility
void AccessibleTabBarPageList::MoveChild( sal_Int32 i, sal_Int32 j )
{
- if ( i >= 0 && i < (sal_Int32)m_aAccessibleChildren.size() &&
- j >= 0 && j <= (sal_Int32)m_aAccessibleChildren.size() )
+ if ( i >= 0 && i < static_cast<sal_Int32>(m_aAccessibleChildren.size()) &&
+ j >= 0 && j <= static_cast<sal_Int32>(m_aAccessibleChildren.size()) )
{
if ( i < j )
--j;
@@ -222,7 +222,7 @@ namespace accessibility
{
if ( m_pTabBar )
{
- sal_uInt16 nPageId = (sal_uInt16)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData());
+ sal_uInt16 nPageId = static_cast<sal_uInt16>(reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData()));
sal_uInt16 nPagePos = m_pTabBar->GetPagePos( nPageId );
UpdateSelected( nPagePos, true );
}
@@ -232,7 +232,7 @@ namespace accessibility
{
if ( m_pTabBar )
{
- sal_uInt16 nPageId = (sal_uInt16)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData());
+ sal_uInt16 nPageId = static_cast<sal_uInt16>(reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData()));
sal_uInt16 nPagePos = m_pTabBar->GetPagePos( nPageId );
UpdateSelected( nPagePos, false );
}
@@ -242,7 +242,7 @@ namespace accessibility
{
if ( m_pTabBar )
{
- sal_uInt16 nPageId = (sal_uInt16)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData());
+ sal_uInt16 nPageId = static_cast<sal_uInt16>(reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData()));
sal_uInt16 nPagePos = m_pTabBar->GetPagePos( nPageId );
InsertChild( nPagePos );
}
@@ -252,7 +252,7 @@ namespace accessibility
{
if ( m_pTabBar )
{
- sal_uInt16 nPageId = (sal_uInt16)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData());
+ sal_uInt16 nPageId = static_cast<sal_uInt16>(reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData()));
if ( nPageId == TabBar::PAGE_NOT_FOUND )
{
@@ -287,7 +287,7 @@ namespace accessibility
break;
case VclEventId::TabbarPageTextChanged:
{
- sal_uInt16 nPageId = (sal_uInt16)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData());
+ sal_uInt16 nPageId = static_cast<sal_uInt16>(reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData()));
sal_uInt16 nPagePos = m_pTabBar->GetPagePos( nPageId );
UpdatePageText( nPagePos );
}
@@ -417,7 +417,7 @@ namespace accessibility
{
if ( m_pTabBar )
{
- sal_uInt16 nPageId = m_pTabBar->GetPageId( (sal_uInt16)i );
+ sal_uInt16 nPageId = m_pTabBar->GetPageId( static_cast<sal_uInt16>(i) );
xChild = new AccessibleTabBarPage( m_pTabBar, nPageId, this );
@@ -621,7 +621,7 @@ namespace accessibility
if ( m_pTabBar )
{
- m_pTabBar->SetCurPageId( m_pTabBar->GetPageId( (sal_uInt16)nChildIndex ) );
+ m_pTabBar->SetCurPageId( m_pTabBar->GetPageId( static_cast<sal_uInt16>(nChildIndex) ) );
m_pTabBar->Update();
m_pTabBar->ActivatePage();
m_pTabBar->Select();
@@ -637,7 +637,7 @@ namespace accessibility
throw IndexOutOfBoundsException();
bool bSelected = false;
- if ( m_pTabBar && m_pTabBar->GetCurPageId() == m_pTabBar->GetPageId( (sal_uInt16)nChildIndex ) )
+ if ( m_pTabBar && m_pTabBar->GetCurPageId() == m_pTabBar->GetPageId( static_cast<sal_uInt16>(nChildIndex) ) )
bSelected = true;
return bSelected;
diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx
index c33f9baa4a60..c418ab5c7abf 100644
--- a/accessibility/source/extended/textwindowaccessibility.cxx
+++ b/accessibility/source/extended/textwindowaccessibility.cxx
@@ -957,14 +957,14 @@ Document::retrieveCharacterAttributes(
//character height
aAttribs[i].Name = "CharHeight";
aAttribs[i].Handle = -1;
- aAttribs[i].Value <<= (sal_Int16)aFont.GetFontHeight();
+ aAttribs[i].Value <<= static_cast<sal_Int16>(aFont.GetFontHeight());
aAttribs[i].State = css::beans::PropertyState_DIRECT_VALUE;
i++;
//character posture
aAttribs[i].Name = "CharPosture";
aAttribs[i].Handle = -1;
- aAttribs[i].Value <<= (sal_Int16)aFont.GetItalic();
+ aAttribs[i].Value <<= static_cast<sal_Int16>(aFont.GetItalic());
aAttribs[i].State = css::beans::PropertyState_DIRECT_VALUE;
i++;
@@ -980,21 +980,21 @@ Document::retrieveCharacterAttributes(
//character strikeout
aAttribs[i].Name = "CharStrikeout";
aAttribs[i].Handle = -1;
- aAttribs[i].Value <<= (sal_Int16)aFont.GetStrikeout();
+ aAttribs[i].Value <<= static_cast<sal_Int16>(aFont.GetStrikeout());
aAttribs[i].State = css::beans::PropertyState_DIRECT_VALUE;
i++;
//character underline
aAttribs[i].Name = "CharUnderline";
aAttribs[i].Handle = -1;
- aAttribs[i].Value <<= (sal_Int16)aFont.GetUnderline();
+ aAttribs[i].Value <<= static_cast<sal_Int16>(aFont.GetUnderline());
aAttribs[i].State = css::beans::PropertyState_DIRECT_VALUE;
i++;
//character weight
aAttribs[i].Name = "CharWeight";
aAttribs[i].Handle = -1;
- aAttribs[i].Value <<= (float)aFont.GetWeight();
+ aAttribs[i].Value <<= static_cast<float>(aFont.GetWeight());
aAttribs[i].State = css::beans::PropertyState_DIRECT_VALUE;
i++;
diff --git a/accessibility/source/helper/characterattributeshelper.cxx b/accessibility/source/helper/characterattributeshelper.cxx
index 302ee29145b4..4935c4865de5 100644
--- a/accessibility/source/helper/characterattributeshelper.cxx
+++ b/accessibility/source/helper/characterattributeshelper.cxx
@@ -29,17 +29,17 @@ CharacterAttributesHelper::CharacterAttributesHelper( const vcl::Font& rFont, sa
{
m_aAttributeMap.emplace( OUString( "CharBackColor" ), Any( nBackColor ) );
m_aAttributeMap.emplace( OUString( "CharColor" ), Any( nColor ) );
- m_aAttributeMap.emplace( OUString( "CharFontCharSet" ), Any( (sal_Int16) rFont.GetCharSet() ) );
- m_aAttributeMap.emplace( OUString( "CharFontFamily" ), Any( (sal_Int16) rFont.GetFamilyType() ) );
+ m_aAttributeMap.emplace( OUString( "CharFontCharSet" ), Any( static_cast<sal_Int16>(rFont.GetCharSet()) ) );
+ m_aAttributeMap.emplace( OUString( "CharFontFamily" ), Any( static_cast<sal_Int16>(rFont.GetFamilyType()) ) );
m_aAttributeMap.emplace( OUString( "CharFontName" ), Any( rFont.GetFamilyName() ) );
- m_aAttributeMap.emplace( OUString( "CharFontPitch" ), Any( (sal_Int16) rFont.GetPitch() ) );
+ m_aAttributeMap.emplace( OUString( "CharFontPitch" ), Any( static_cast<sal_Int16>(rFont.GetPitch()) ) );
m_aAttributeMap.emplace( OUString( "CharFontStyleName" ), Any( rFont.GetStyleName() ) );
- m_aAttributeMap.emplace( OUString( "CharHeight" ), Any( (sal_Int16) rFont.GetFontSize().Height() ) );
- m_aAttributeMap.emplace( OUString( "CharScaleWidth" ), Any( (sal_Int16) rFont.GetFontSize().Width() ) );
- m_aAttributeMap.emplace( OUString( "CharStrikeout" ), Any( (sal_Int16) rFont.GetStrikeout() ) );
- m_aAttributeMap.emplace( OUString( "CharUnderline" ), Any( (sal_Int16) rFont.GetUnderline() ) );
- m_aAttributeMap.emplace( OUString( "CharWeight" ), Any( (float) rFont.GetWeight() ) );
- m_aAttributeMap.emplace( OUString( "CharPosture" ), Any( (sal_Int16)rFont.GetItalic() ) );
+ m_aAttributeMap.emplace( OUString( "CharHeight" ), Any( static_cast<sal_Int16>(rFont.GetFontSize().Height()) ) );
+ m_aAttributeMap.emplace( OUString( "CharScaleWidth" ), Any( static_cast<sal_Int16>(rFont.GetFontSize().Width()) ) );
+ m_aAttributeMap.emplace( OUString( "CharStrikeout" ), Any( static_cast<sal_Int16>(rFont.GetStrikeout()) ) );
+ m_aAttributeMap.emplace( OUString( "CharUnderline" ), Any( static_cast<sal_Int16>(rFont.GetUnderline()) ) );
+ m_aAttributeMap.emplace( OUString( "CharWeight" ), Any( static_cast<float>(rFont.GetWeight()) ) );
+ m_aAttributeMap.emplace( OUString( "CharPosture" ), Any( static_cast<sal_Int16>(rFont.GetItalic()) ) );
}
@@ -50,7 +50,7 @@ std::vector< PropertyValue > CharacterAttributesHelper::GetCharacterAttributes()
for ( const auto& aIt : m_aAttributeMap)
{
- aValues.emplace_back(aIt.first, (sal_Int32) -1, aIt.second, PropertyState_DIRECT_VALUE);
+ aValues.emplace_back(aIt.first, sal_Int32(-1), aIt.second, PropertyState_DIRECT_VALUE);
}
return aValues;
@@ -68,7 +68,7 @@ Sequence< PropertyValue > CharacterAttributesHelper::GetCharacterAttributes( con
{
AttributeMap::iterator aFound = m_aAttributeMap.find( aRequestedAttribute );
if ( aFound != m_aAttributeMap.end() )
- aValues.emplace_back(aFound->first, (sal_Int32) -1, aFound->second, PropertyState_DIRECT_VALUE);
+ aValues.emplace_back(aFound->first, sal_Int32(-1), aFound->second, PropertyState_DIRECT_VALUE);
}
return comphelper::containerToSequence(aValues);
diff --git a/accessibility/source/standard/accessiblemenubasecomponent.cxx b/accessibility/source/standard/accessiblemenubasecomponent.cxx
index 5aae312b0176..33e67b3bc63a 100644
--- a/accessibility/source/standard/accessiblemenubasecomponent.cxx
+++ b/accessibility/source/standard/accessiblemenubasecomponent.cxx
@@ -194,7 +194,7 @@ void OAccessibleMenuBaseComponent::SetChecked( bool bChecked )
void OAccessibleMenuBaseComponent::UpdateEnabled( sal_Int32 i, bool bEnabled )
{
- if ( i >= 0 && i < (sal_Int32)m_aAccessibleChildren.size() )
+ if ( i >= 0 && i < static_cast<sal_Int32>(m_aAccessibleChildren.size()) )
{
Reference< XAccessible > xChild( m_aAccessibleChildren[i] );
if ( xChild.is() )
@@ -209,7 +209,7 @@ void OAccessibleMenuBaseComponent::UpdateEnabled( sal_Int32 i, bool bEnabled )
void OAccessibleMenuBaseComponent::UpdateFocused( sal_Int32 i, bool bFocused )
{
- if ( i >= 0 && i < (sal_Int32)m_aAccessibleChildren.size() )
+ if ( i >= 0 && i < static_cast<sal_Int32>(m_aAccessibleChildren.size()) )
{
Reference< XAccessible > xChild( m_aAccessibleChildren[i] );
if ( xChild.is() )
@@ -241,7 +241,7 @@ void OAccessibleMenuBaseComponent::UpdateSelected( sal_Int32 i, bool bSelected )
{
NotifyAccessibleEvent( AccessibleEventId::SELECTION_CHANGED, Any(), Any() );
- if ( i >= 0 && i < (sal_Int32)m_aAccessibleChildren.size() )
+ if ( i >= 0 && i < static_cast<sal_Int32>(m_aAccessibleChildren.size()) )
{
Reference< XAccessible > xChild( m_aAccessibleChildren[i] );
if ( xChild.is() )
@@ -256,7 +256,7 @@ void OAccessibleMenuBaseComponent::UpdateSelected( sal_Int32 i, bool bSelected )
void OAccessibleMenuBaseComponent::UpdateChecked( sal_Int32 i, bool bChecked )
{
- if ( i >= 0 && i < (sal_Int32)m_aAccessibleChildren.size() )
+ if ( i >= 0 && i < static_cast<sal_Int32>(m_aAccessibleChildren.size()) )
{
Reference< XAccessible > xChild( m_aAccessibleChildren[i] );
if ( xChild.is() )
@@ -271,7 +271,7 @@ void OAccessibleMenuBaseComponent::UpdateChecked( sal_Int32 i, bool bChecked )
void OAccessibleMenuBaseComponent::UpdateAccessibleName( sal_Int32 i )
{
- if ( i >= 0 && i < (sal_Int32)m_aAccessibleChildren.size() )
+ if ( i >= 0 && i < static_cast<sal_Int32>(m_aAccessibleChildren.size()) )
{
Reference< XAccessible > xChild( m_aAccessibleChildren[i] );
if ( xChild.is() )
@@ -286,7 +286,7 @@ void OAccessibleMenuBaseComponent::UpdateAccessibleName( sal_Int32 i )
void OAccessibleMenuBaseComponent::UpdateItemText( sal_Int32 i )
{
- if ( i >= 0 && i < (sal_Int32)m_aAccessibleChildren.size() )
+ if ( i >= 0 && i < static_cast<sal_Int32>(m_aAccessibleChildren.size()) )
{
Reference< XAccessible > xChild( m_aAccessibleChildren[i] );
if ( xChild.is() )
@@ -315,21 +315,21 @@ Reference< XAccessible > OAccessibleMenuBaseComponent::GetChild( sal_Int32 i )
// create a new child
OAccessibleMenuBaseComponent* pChild;
- if ( m_pMenu->GetItemType( (sal_uInt16)i ) == MenuItemType::SEPARATOR )
+ if ( m_pMenu->GetItemType( static_cast<sal_uInt16>(i) ) == MenuItemType::SEPARATOR )
{
- pChild = new VCLXAccessibleMenuSeparator( m_pMenu, (sal_uInt16)i );
+ pChild = new VCLXAccessibleMenuSeparator( m_pMenu, static_cast<sal_uInt16>(i) );
}
else
{
- PopupMenu* pPopupMenu = m_pMenu->GetPopupMenu( m_pMenu->GetItemId( (sal_uInt16)i ) );
+ PopupMenu* pPopupMenu = m_pMenu->GetPopupMenu( m_pMenu->GetItemId( static_cast<sal_uInt16>(i) ) );
if ( pPopupMenu )
{
- pChild = new VCLXAccessibleMenu( m_pMenu, (sal_uInt16)i, pPopupMenu );
+ pChild = new VCLXAccessibleMenu( m_pMenu, static_cast<sal_uInt16>(i), pPopupMenu );
pPopupMenu->SetAccessible( pChild );
}
else
{
- pChild = new VCLXAccessibleMenuItem( m_pMenu, (sal_uInt16)i );
+ pChild = new VCLXAccessibleMenuItem( m_pMenu, static_cast<sal_uInt16>(i) );
}
}
@@ -375,7 +375,7 @@ Reference< XAccessible > OAccessibleMenuBaseComponent::GetChildAt( const awt::Po
void OAccessibleMenuBaseComponent::InsertChild( sal_Int32 i )
{
- if ( i > (sal_Int32)m_aAccessibleChildren.size() )
+ if ( i > static_cast<sal_Int32>(m_aAccessibleChildren.size()) )
i = m_aAccessibleChildren.size();
if ( i >= 0 )
@@ -391,7 +391,7 @@ void OAccessibleMenuBaseComponent::InsertChild( sal_Int32 i )
{
OAccessibleMenuItemComponent* pComp = static_cast< OAccessibleMenuItemComponent* >( xAcc.get() );
if ( pComp )
- pComp->SetItemPos( (sal_uInt16)j );
+ pComp->SetItemPos( static_cast<sal_uInt16>(j) );
}
}
@@ -409,7 +409,7 @@ void OAccessibleMenuBaseComponent::InsertChild( sal_Int32 i )
void OAccessibleMenuBaseComponent::RemoveChild( sal_Int32 i )
{
- if ( i >= 0 && i < (sal_Int32)m_aAccessibleChildren.size() )
+ if ( i >= 0 && i < static_cast<sal_Int32>(m_aAccessibleChildren.size()) )
{
// keep the accessible of the removed item
Reference< XAccessible > xChild( m_aAccessibleChildren[i] );
@@ -425,7 +425,7 @@ void OAccessibleMenuBaseComponent::RemoveChild( sal_Int32 i )
{
OAccessibleMenuItemComponent* pComp = static_cast< OAccessibleMenuItemComponent* >( xAcc.get() );
if ( pComp )
- pComp->SetItemPos( (sal_uInt16)j );
+ pComp->SetItemPos( static_cast<sal_uInt16>(j) );
}
}
@@ -479,7 +479,7 @@ void OAccessibleMenuBaseComponent::SelectChild( sal_Int32 i )
// highlight the child
if ( m_pMenu )
- m_pMenu->HighlightItem( (sal_uInt16)i );
+ m_pMenu->HighlightItem( static_cast<sal_uInt16>(i) );
}
@@ -494,7 +494,7 @@ bool OAccessibleMenuBaseComponent::IsChildSelected( sal_Int32 i )
{
bool bSelected = false;
- if ( m_pMenu && m_pMenu->IsHighlighted( (sal_uInt16)i ) )
+ if ( m_pMenu && m_pMenu->IsHighlighted( static_cast<sal_uInt16>(i) ) )
bSelected = true;
return bSelected;
diff --git a/accessibility/source/standard/vclxaccessiblebox.cxx b/accessibility/source/standard/vclxaccessiblebox.cxx
index 03d095d845d4..35e3f9210563 100644
--- a/accessibility/source/standard/vclxaccessiblebox.cxx
+++ b/accessibility/source/standard/vclxaccessiblebox.cxx
@@ -470,7 +470,7 @@ Any VCLXAccessibleBox::getCurrentValue( )
{
if(pList->getSelectedAccessibleChildCount()>0)
{
- Reference<XAccessibleContext> xName (pList->getSelectedAccessibleChild((sal_Int32)0), UNO_QUERY);
+ Reference<XAccessibleContext> xName (pList->getSelectedAccessibleChild(sal_Int32(0)), UNO_QUERY);
if(xName.is())
{
aAny <<= xName->getAccessibleName();
diff --git a/accessibility/source/standard/vclxaccessiblebutton.cxx b/accessibility/source/standard/vclxaccessiblebutton.cxx
index 915d7ce96dc3..07d4d780e90c 100644
--- a/accessibility/source/standard/vclxaccessiblebutton.cxx
+++ b/accessibility/source/standard/vclxaccessiblebutton.cxx
@@ -258,7 +258,7 @@ Any VCLXAccessibleButton::getCurrentValue( )
VclPtr< PushButton > pButton = GetAs< PushButton >();
if ( pButton )
- aValue <<= (sal_Int32) pButton->IsPressed();
+ aValue <<= static_cast<sal_Int32>(pButton->IsPressed());
return aValue;
}
@@ -294,7 +294,7 @@ Any VCLXAccessibleButton::getMaximumValue( )
OExternalLockGuard aGuard( this );
Any aValue;
- aValue <<= (sal_Int32) 1;
+ aValue <<= sal_Int32(1);
return aValue;
}
@@ -305,7 +305,7 @@ Any VCLXAccessibleButton::getMinimumValue( )
OExternalLockGuard aGuard( this );
Any aValue;
- aValue <<= (sal_Int32) 0;
+ aValue <<= sal_Int32(0);
return aValue;
}
diff --git a/accessibility/source/standard/vclxaccessiblecheckbox.cxx b/accessibility/source/standard/vclxaccessiblecheckbox.cxx
index d411c8ca54a2..9f0c6a794140 100644
--- a/accessibility/source/standard/vclxaccessiblecheckbox.cxx
+++ b/accessibility/source/standard/vclxaccessiblecheckbox.cxx
@@ -63,7 +63,7 @@ bool VCLXAccessibleCheckBox::IsChecked()
bool bChecked = false;
VCLXCheckBox* pVCLXCheckBox = static_cast< VCLXCheckBox* >( GetVCLXWindow() );
- if ( pVCLXCheckBox && pVCLXCheckBox->getState() == (sal_Int16) 1 )
+ if ( pVCLXCheckBox && pVCLXCheckBox->getState() == sal_Int16(1) )
bChecked = true;
return bChecked;
@@ -75,7 +75,7 @@ bool VCLXAccessibleCheckBox::IsIndeterminate()
bool bIndeterminate = false;
VCLXCheckBox* pVCLXCheckBox = static_cast< VCLXCheckBox* >( GetVCLXWindow() );
- if ( pVCLXCheckBox && pVCLXCheckBox->getState() == (sal_Int16) 2 )
+ if ( pVCLXCheckBox && pVCLXCheckBox->getState() == sal_Int16(2) )
bIndeterminate = true;
return bIndeterminate;
@@ -191,19 +191,19 @@ sal_Bool VCLXAccessibleCheckBox::doAccessibleAction ( sal_Int32 nIndex )
VCLXCheckBox* pVCLXCheckBox = static_cast< VCLXCheckBox* >( GetVCLXWindow() );
if ( pCheckBox && pVCLXCheckBox )
{
- sal_Int32 nValueMax = (sal_Int32) 1;
+ sal_Int32 nValueMax = sal_Int32(1);
if ( pCheckBox->IsTriStateEnabled() )
- nValueMax = (sal_Int32) 2;
+ nValueMax = sal_Int32(2);
- sal_Int32 nValue = (sal_Int32) pVCLXCheckBox->getState();
+ sal_Int32 nValue = static_cast<sal_Int32>(pVCLXCheckBox->getState());
++nValue;
if ( nValue > nValueMax )
nValue = 0;
- pVCLXCheckBox->setState( (sal_Int16) nValue );
+ pVCLXCheckBox->setState( static_cast<sal_Int16>(nValue) );
}
return true;
@@ -273,7 +273,7 @@ Any VCLXAccessibleCheckBox::getCurrentValue( )
VCLXCheckBox* pVCLXCheckBox = static_cast< VCLXCheckBox* >( GetVCLXWindow() );
if ( pVCLXCheckBox )
- aValue <<= (sal_Int32) pVCLXCheckBox->getState();
+ aValue <<= static_cast<sal_Int32>(pVCLXCheckBox->getState());
return aValue;
}
@@ -298,7 +298,7 @@ sal_Bool VCLXAccessibleCheckBox::setCurrentValue( const Any& aNumber )
else if ( nValue > nValueMax )
nValue = nValueMax;
- pVCLXCheckBox->setState( (sal_Int16) nValue );
+ pVCLXCheckBox->setState( static_cast<sal_Int16>(nValue) );
bReturn = true;
}
@@ -314,9 +314,9 @@ Any VCLXAccessibleCheckBox::getMaximumValue( )
VclPtr< CheckBox > pCheckBox = GetAs< CheckBox >();
if ( pCheckBox && pCheckBox->IsTriStateEnabled() )
- aValue <<= (sal_Int32) 2;
+ aValue <<= sal_Int32(2);
else
- aValue <<= (sal_Int32) 1;
+ aValue <<= sal_Int32(1);
return aValue;
}
@@ -327,7 +327,7 @@ Any VCLXAccessibleCheckBox::getMinimumValue( )
OExternalLockGuard aGuard( this );
Any aValue;
- aValue <<= (sal_Int32) 0;
+ aValue <<= sal_Int32(0);
return aValue;
}
diff --git a/accessibility/source/standard/vclxaccessiblelist.cxx b/accessibility/source/standard/vclxaccessiblelist.cxx
index 4828649ac699..c09db9eb1ad3 100644
--- a/accessibility/source/standard/vclxaccessiblelist.cxx
+++ b/accessibility/source/standard/vclxaccessiblelist.cxx
@@ -740,7 +740,7 @@ void SAL_CALL VCLXAccessibleList::selectAccessibleChild( sal_Int32 nChildIndex )
{
checkSelection_Impl(nChildIndex,*m_pListBoxHelper,false);
- m_pListBoxHelper->SelectEntryPos( (sal_uInt16)nChildIndex );
+ m_pListBoxHelper->SelectEntryPos( static_cast<sal_uInt16>(nChildIndex) );
// call the select handler, don't handle events in this time
m_bDisableProcessEvent = true;
m_pListBoxHelper->Select();
@@ -763,7 +763,7 @@ sal_Bool SAL_CALL VCLXAccessibleList::isAccessibleChildSelected( sal_Int32 nChil
{
checkSelection_Impl(nChildIndex,*m_pListBoxHelper,false);
- bRet = m_pListBoxHelper->IsEntryPosSelected( (sal_uInt16)nChildIndex );
+ bRet = m_pListBoxHelper->IsEntryPosSelected( static_cast<sal_uInt16>(nChildIndex) );
}
return bRet;
}
@@ -831,7 +831,7 @@ Reference< XAccessible > SAL_CALL VCLXAccessibleList::getSelectedAccessibleChild
if ( m_pListBoxHelper )
{
checkSelection_Impl(nSelectedChildIndex,*m_pListBoxHelper,true);
- return getAccessibleChild( m_pListBoxHelper->GetSelectedEntryPos( (sal_uInt16)nSelectedChildIndex ) );
+ return getAccessibleChild( m_pListBoxHelper->GetSelectedEntryPos( static_cast<sal_uInt16>(nSelectedChildIndex) ) );
}
return nullptr;
@@ -849,7 +849,7 @@ void SAL_CALL VCLXAccessibleList::deselectAccessibleChild( sal_Int32 nSelectedCh
{
checkSelection_Impl(nSelectedChildIndex,*m_pListBoxHelper,false);
- m_pListBoxHelper->SelectEntryPos( (sal_uInt16)nSelectedChildIndex, false );
+ m_pListBoxHelper->SelectEntryPos( static_cast<sal_uInt16>(nSelectedChildIndex), false );
// call the select handler, don't handle events in this time
m_bDisableProcessEvent = true;
m_pListBoxHelper->Select();
diff --git a/accessibility/source/standard/vclxaccessiblelistitem.cxx b/accessibility/source/standard/vclxaccessiblelistitem.cxx
index 6cfe7f82b42c..988d4ea1e204 100644
--- a/accessibility/source/standard/vclxaccessiblelistitem.cxx
+++ b/accessibility/source/standard/vclxaccessiblelistitem.cxx
@@ -75,7 +75,7 @@ VCLXAccessibleListItem::VCLXAccessibleListItem(sal_Int32 _nIndexInParent, const
m_xParentContext = m_xParent->getAccessibleContext();
::accessibility::IComboListBoxHelper* pListBoxHelper = m_xParent->getListBoxHelper();
if (pListBoxHelper)
- m_sEntryText = pListBoxHelper->GetEntry((sal_uInt16)_nIndexInParent);
+ m_sEntryText = pListBoxHelper->GetEntry(static_cast<sal_uInt16>(_nIndexInParent));
}
VCLXAccessibleListItem::~VCLXAccessibleListItem()
@@ -304,7 +304,7 @@ sal_Bool SAL_CALL VCLXAccessibleListItem::containsPoint( const awt::Point& _aPoi
::accessibility::IComboListBoxHelper* pListBoxHelper = m_xParent.is() ? m_xParent->getListBoxHelper() : nullptr;
if (pListBoxHelper)
{
- tools::Rectangle aRect(pListBoxHelper->GetBoundingRectangle((sal_uInt16)m_nIndexInParent));
+ tools::Rectangle aRect(pListBoxHelper->GetBoundingRectangle(static_cast<sal_uInt16>(m_nIndexInParent)));
aRect.Move(-aRect.TopLeft().X(),-aRect.TopLeft().Y());
bInside = aRect.IsInside( VCLPoint( _aPoint ) );
}
@@ -324,7 +324,7 @@ awt::Rectangle SAL_CALL VCLXAccessibleListItem::getBounds( )
awt::Rectangle aRect;
::accessibility::IComboListBoxHelper* pListBoxHelper = m_xParent.is() ? m_xParent->getListBoxHelper() : nullptr;
if (pListBoxHelper)
- aRect = AWTRectangle(pListBoxHelper->GetBoundingRectangle((sal_uInt16)m_nIndexInParent));
+ aRect = AWTRectangle(pListBoxHelper->GetBoundingRectangle(static_cast<sal_uInt16>(m_nIndexInParent)));
return aRect;
}
@@ -338,7 +338,7 @@ awt::Point SAL_CALL VCLXAccessibleListItem::getLocation( )
::accessibility::IComboListBoxHelper* pListBoxHelper = m_xParent.is() ? m_xParent->getListBoxHelper() : nullptr;
if (pListBoxHelper)
{
- tools::Rectangle aRect = pListBoxHelper->GetBoundingRectangle( (sal_uInt16)m_nIndexInParent );
+ tools::Rectangle aRect = pListBoxHelper->GetBoundingRectangle( static_cast<sal_uInt16>(m_nIndexInParent) );
aPoint = aRect.TopLeft();
}
return AWTPoint( aPoint );
@@ -353,7 +353,7 @@ awt::Point SAL_CALL VCLXAccessibleListItem::getLocationOnScreen( )
::accessibility::IComboListBoxHelper* pListBoxHelper = m_xParent.is() ? m_xParent->getListBoxHelper() : nullptr;
if (pListBoxHelper)
{
- tools::Rectangle aRect = pListBoxHelper->GetBoundingRectangle((sal_uInt16)m_nIndexInParent);
+ tools::Rectangle aRect = pListBoxHelper->GetBoundingRectangle(static_cast<sal_uInt16>(m_nIndexInParent));
aPoint = aRect.TopLeft();
aPoint += pListBoxHelper->GetWindowExtentsRelative().TopLeft();
}
@@ -368,7 +368,7 @@ awt::Size SAL_CALL VCLXAccessibleListItem::getSize( )
Size aSize;
::accessibility::IComboListBoxHelper* pListBoxHelper = m_xParent.is() ? m_xParent->getListBoxHelper() : nullptr;
if (pListBoxHelper)
- aSize = pListBoxHelper->GetBoundingRectangle( (sal_uInt16)m_nIndexInParent ).GetSize();
+ aSize = pListBoxHelper->GetBoundingRectangle( static_cast<sal_uInt16>(m_nIndexInParent) ).GetSize();
return AWTSize( aSize );
}
@@ -428,7 +428,7 @@ awt::Rectangle SAL_CALL VCLXAccessibleListItem::getCharacterBounds( sal_Int32 nI
if (pListBoxHelper)
{
tools::Rectangle aCharRect = pListBoxHelper->GetEntryCharacterBounds( m_nIndexInParent, nIndex );
- tools::Rectangle aItemRect = pListBoxHelper->GetBoundingRectangle( (sal_uInt16)m_nIndexInParent );
+ tools::Rectangle aItemRect = pListBoxHelper->GetBoundingRectangle( static_cast<sal_uInt16>(m_nIndexInParent) );
aCharRect.Move( -aItemRect.Left(), -aItemRect.Top() );
aBounds = AWTRectangle( aCharRect );
}
@@ -454,7 +454,7 @@ sal_Int32 SAL_CALL VCLXAccessibleListItem::getIndexAtPoint( const awt::Point& aP
if (pListBoxHelper)
{
sal_Int32 nPos = LISTBOX_ENTRY_NOTFOUND;
- tools::Rectangle aItemRect = pListBoxHelper->GetBoundingRectangle( (sal_uInt16)m_nIndexInParent );
+ tools::Rectangle aItemRect = pListBoxHelper->GetBoundingRectangle( static_cast<sal_uInt16>(m_nIndexInParent) );
Point aPnt( VCLPoint( aPoint ) );
aPnt += aItemRect.TopLeft();
sal_Int32 nI = pListBoxHelper->GetIndexForPoint( aPnt, nPos );
diff --git a/accessibility/source/standard/vclxaccessiblemenuitem.cxx b/accessibility/source/standard/vclxaccessiblemenuitem.cxx
index 812add0d491f..873ceecee143 100644
--- a/accessibility/source/standard/vclxaccessiblemenuitem.cxx
+++ b/accessibility/source/standard/vclxaccessiblemenuitem.cxx
@@ -508,9 +508,9 @@ Any VCLXAccessibleMenuItem::getCurrentValue( )
Any aValue;
if ( IsSelected() )
- aValue <<= (sal_Int32) 1;
+ aValue <<= sal_Int32(1);
else
- aValue <<= (sal_Int32) 0;
+ aValue <<= sal_Int32(0);
return aValue;
}
@@ -542,7 +542,7 @@ sal_Bool VCLXAccessibleMenuItem::setCurrentValue( const Any& aNumber )
Any VCLXAccessibleMenuItem::getMaximumValue( )
{
Any aValue;
- aValue <<= (sal_Int32) 1;
+ aValue <<= sal_Int32(1);
return aValue;
}
@@ -551,7 +551,7 @@ Any VCLXAccessibleMenuItem::getMaximumValue( )
Any VCLXAccessibleMenuItem::getMinimumValue( )
{
Any aValue;
- aValue <<= (sal_Int32) 0;
+ aValue <<= sal_Int32(0);
return aValue;
}
diff --git a/accessibility/source/standard/vclxaccessibleradiobutton.cxx b/accessibility/source/standard/vclxaccessibleradiobutton.cxx
index 0be409f1aed9..63666e799162 100644
--- a/accessibility/source/standard/vclxaccessibleradiobutton.cxx
+++ b/accessibility/source/standard/vclxaccessibleradiobutton.cxx
@@ -231,7 +231,7 @@ Any VCLXAccessibleRadioButton::getCurrentValue( )
VCLXRadioButton* pVCLXRadioButton = static_cast< VCLXRadioButton* >( GetVCLXWindow() );
if ( pVCLXRadioButton )
- aValue <<= (sal_Int32) pVCLXRadioButton->getState();
+ aValue <<= static_cast<sal_Int32>(pVCLXRadioButton->getState());
return aValue;
}
@@ -267,7 +267,7 @@ Any VCLXAccessibleRadioButton::getMaximumValue( )
OExternalLockGuard aGuard( this );
Any aValue;
- aValue <<= (sal_Int32) 1;
+ aValue <<= sal_Int32(1);
return aValue;
}
@@ -278,7 +278,7 @@ Any VCLXAccessibleRadioButton::getMinimumValue( )
OExternalLockGuard aGuard( this );
Any aValue;
- aValue <<= (sal_Int32) 0;
+ aValue <<= sal_Int32(0);
return aValue;
}
diff --git a/accessibility/source/standard/vclxaccessiblescrollbar.cxx b/accessibility/source/standard/vclxaccessiblescrollbar.cxx
index a412ed6a761e..f5922f3fc79e 100644
--- a/accessibility/source/standard/vclxaccessiblescrollbar.cxx
+++ b/accessibility/source/standard/vclxaccessiblescrollbar.cxx
@@ -251,7 +251,7 @@ Any VCLXAccessibleScrollBar::getMinimumValue( )
OExternalLockGuard aGuard( this );
Any aValue;
- aValue <<= (sal_Int32) 0;
+ aValue <<= sal_Int32(0);
return aValue;
}
diff --git a/accessibility/source/standard/vclxaccessiblestatusbar.cxx b/accessibility/source/standard/vclxaccessiblestatusbar.cxx
index 05281f20189a..3e7169a2d864 100644
--- a/accessibility/source/standard/vclxaccessiblestatusbar.cxx
+++ b/accessibility/source/standard/vclxaccessiblestatusbar.cxx
@@ -52,7 +52,7 @@ VCLXAccessibleStatusBar::~VCLXAccessibleStatusBar()
void VCLXAccessibleStatusBar::UpdateShowing( sal_Int32 i, bool bShowing )
{
- if ( i >= 0 && i < (sal_Int32)m_aAccessibleChildren.size() )
+ if ( i >= 0 && i < static_cast<sal_Int32>(m_aAccessibleChildren.size()) )
{
Reference< XAccessible > xChild( m_aAccessibleChildren[i] );
if ( xChild.is() )
@@ -67,7 +67,7 @@ void VCLXAccessibleStatusBar::UpdateShowing( sal_Int32 i, bool bShowing )
void VCLXAccessibleStatusBar::UpdateItemName( sal_Int32 i )
{
- if ( i >= 0 && i < (sal_Int32)m_aAccessibleChildren.size() )
+ if ( i >= 0 && i < static_cast<sal_Int32>(m_aAccessibleChildren.size()) )
{
Reference< XAccessible > xChild( m_aAccessibleChildren[i] );
if ( xChild.is() )
@@ -85,7 +85,7 @@ void VCLXAccessibleStatusBar::UpdateItemName( sal_Int32 i )
void VCLXAccessibleStatusBar::UpdateItemText( sal_Int32 i )
{
- if ( i >= 0 && i < (sal_Int32)m_aAccessibleChildren.size() )
+ if ( i >= 0 && i < static_cast<sal_Int32>(m_aAccessibleChildren.size()) )
{
Reference< XAccessible > xChild( m_aAccessibleChildren[i] );
if ( xChild.is() )
@@ -103,7 +103,7 @@ void VCLXAccessibleStatusBar::UpdateItemText( sal_Int32 i )
void VCLXAccessibleStatusBar::InsertChild( sal_Int32 i )
{
- if ( i >= 0 && i <= (sal_Int32)m_aAccessibleChildren.size() )
+ if ( i >= 0 && i <= static_cast<sal_Int32>(m_aAccessibleChildren.size()) )
{
// insert entry in child list
m_aAccessibleChildren.insert( m_aAccessibleChildren.begin() + i, Reference< XAccessible >() );
@@ -122,7 +122,7 @@ void VCLXAccessibleStatusBar::InsertChild( sal_Int32 i )
void VCLXAccessibleStatusBar::RemoveChild( sal_Int32 i )
{
- if ( i >= 0 && i < (sal_Int32)m_aAccessibleChildren.size() )
+ if ( i >= 0 && i < static_cast<sal_Int32>(m_aAccessibleChildren.size()) )
{
// get the accessible of the removed page
Reference< XAccessible > xChild( m_aAccessibleChildren[i] );
@@ -153,7 +153,7 @@ void VCLXAccessibleStatusBar::ProcessWindowEvent( const VclWindowEvent& rVclWind
{
if ( m_pStatusBar )
{
- sal_uInt16 nItemId = (sal_uInt16)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData());
+ sal_uInt16 nItemId = static_cast<sal_uInt16>(reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData()));
sal_uInt16 nItemPos = m_pStatusBar->GetItemPos( nItemId );
InsertChild( nItemPos );
}
@@ -163,7 +163,7 @@ void VCLXAccessibleStatusBar::ProcessWindowEvent( const VclWindowEvent& rVclWind
{
if ( m_pStatusBar )
{
- sal_uInt16 nItemId = (sal_uInt16)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData());
+ sal_uInt16 nItemId = static_cast<sal_uInt16>(reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData()));
for ( sal_Int32 i = 0, nCount = getAccessibleChildCount(); i < nCount; ++i )
{
Reference< XAccessible > xChild( getAccessibleChild( i ) );
@@ -191,7 +191,7 @@ void VCLXAccessibleStatusBar::ProcessWindowEvent( const VclWindowEvent& rVclWind
{
if ( m_pStatusBar )
{
- sal_uInt16 nItemId = (sal_uInt16)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData());
+ sal_uInt16 nItemId = static_cast<sal_uInt16>(reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData()));
sal_uInt16 nItemPos = m_pStatusBar->GetItemPos( nItemId );
UpdateShowing( nItemPos, rVclWindowEvent.GetId() == VclEventId::StatusbarShowItem );
}
@@ -201,7 +201,7 @@ void VCLXAccessibleStatusBar::ProcessWindowEvent( const VclWindowEvent& rVclWind
{
if ( m_pStatusBar )
{
- sal_uInt16 nItemId = (sal_uInt16)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData());
+ sal_uInt16 nItemId = static_cast<sal_uInt16>(reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData()));
sal_uInt16 nItemPos = m_pStatusBar->GetItemPos( nItemId );
UpdateItemName( nItemPos );
}
@@ -211,7 +211,7 @@ void VCLXAccessibleStatusBar::ProcessWindowEvent( const VclWindowEvent& rVclWind
{
if ( m_pStatusBar )
{
- sal_uInt16 nItemId = (sal_uInt16)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData());
+ sal_uInt16 nItemId = static_cast<sal_uInt16>(reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData()));
sal_uInt16 nItemPos = m_pStatusBar->GetItemPos( nItemId );
UpdateItemText( nItemPos );
}
@@ -303,7 +303,7 @@ Reference< XAccessible > VCLXAccessibleStatusBar::getAccessibleChild( sal_Int32
{
if ( m_pStatusBar )
{
- sal_uInt16 nItemId = m_pStatusBar->GetItemId( (sal_uInt16)i );
+ sal_uInt16 nItemId = m_pStatusBar->GetItemId( static_cast<sal_uInt16>(i) );
xChild = new VCLXAccessibleStatusBarItem( m_pStatusBar, nItemId );
@@ -328,7 +328,7 @@ Reference< XAccessible > VCLXAccessibleStatusBar::getAccessibleAtPoint( const aw
{
sal_uInt16 nItemId = m_pStatusBar->GetItemId( VCLPoint( rPoint ) );
sal_Int32 nItemPos = m_pStatusBar->GetItemPos( nItemId );
- if ( nItemPos >= 0 && nItemPos < (sal_Int32)m_aAccessibleChildren.size() )
+ if ( nItemPos >= 0 && nItemPos < static_cast<sal_Int32>(m_aAccessibleChildren.size()) )
xChild = getAccessibleChild( nItemPos );
}
diff --git a/accessibility/source/standard/vclxaccessibletabcontrol.cxx b/accessibility/source/standard/vclxaccessibletabcontrol.cxx
index 274af0e7ad36..bbe78443dc72 100644
--- a/accessibility/source/standard/vclxaccessibletabcontrol.cxx
+++ b/accessibility/source/standard/vclxaccessibletabcontrol.cxx
@@ -76,7 +76,7 @@ void VCLXAccessibleTabControl::UpdateFocused()
void VCLXAccessibleTabControl::UpdateSelected( sal_Int32 i, bool bSelected )
{
- if ( i >= 0 && i < (sal_Int32)m_aAccessibleChildren.size() )
+ if ( i >= 0 && i < static_cast<sal_Int32>(m_aAccessibleChildren.size()) )
{
Reference< XAccessible > xChild( m_aAccessibleChildren[i] );
if ( xChild.is() )
@@ -91,7 +91,7 @@ void VCLXAccessibleTabControl::UpdateSelected( sal_Int32 i, bool bSelected )
void VCLXAccessibleTabControl::UpdatePageText( sal_Int32 i )
{
- if ( i >= 0 && i < (sal_Int32)m_aAccessibleChildren.size() )
+ if ( i >= 0 && i < static_cast<sal_Int32>(m_aAccessibleChildren.size()) )
{
Reference< XAccessible > xChild( m_aAccessibleChildren[i] );
if ( xChild.is() )
@@ -106,7 +106,7 @@ void VCLXAccessibleTabControl::UpdatePageText( sal_Int32 i )
void VCLXAccessibleTabControl::UpdateTabPage( sal_Int32 i, bool bNew )
{
- if ( i >= 0 && i < (sal_Int32)m_aAccessibleChildren.size() )
+ if ( i >= 0 && i < static_cast<sal_Int32>(m_aAccessibleChildren.size()) )
{
Reference< XAccessible > xChild( m_aAccessibleChildren[i] );
if ( xChild.is() )
@@ -121,7 +121,7 @@ void VCLXAccessibleTabControl::UpdateTabPage( sal_Int32 i, bool bNew )
void VCLXAccessibleTabControl::InsertChild( sal_Int32 i )
{
- if ( i >= 0 && i <= (sal_Int32)m_aAccessibleChildren.size() )
+ if ( i >= 0 && i <= static_cast<sal_Int32>(m_aAccessibleChildren.size()) )
{
// insert entry in child list
m_aAccessibleChildren.insert( m_aAccessibleChildren.begin() + i, Reference< XAccessible >() );
@@ -140,7 +140,7 @@ void VCLXAccessibleTabControl::InsertChild( sal_Int32 i )
void VCLXAccessibleTabControl::RemoveChild( sal_Int32 i )
{
- if ( i >= 0 && i < (sal_Int32)m_aAccessibleChildren.size() )
+ if ( i >= 0 && i < static_cast<sal_Int32>(m_aAccessibleChildren.size()) )
{
// get the accessible of the removed page
Reference< XAccessible > xChild( m_aAccessibleChildren[i] );
@@ -172,7 +172,7 @@ void VCLXAccessibleTabControl::ProcessWindowEvent( const VclWindowEvent& rVclWin
{
if ( m_pTabControl )
{
- sal_uInt16 nPageId = (sal_uInt16)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData());
+ sal_uInt16 nPageId = static_cast<sal_uInt16>(reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData()));
sal_uInt16 nPagePos = m_pTabControl->GetPagePos( nPageId );
UpdateFocused();
UpdateSelected( nPagePos, rVclWindowEvent.GetId() == VclEventId::TabpageActivate );
@@ -183,7 +183,7 @@ void VCLXAccessibleTabControl::ProcessWindowEvent( const VclWindowEvent& rVclWin
{
if ( m_pTabControl )
{
- sal_uInt16 nPageId = (sal_uInt16)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData());
+ sal_uInt16 nPageId = static_cast<sal_uInt16>(reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData()));
sal_uInt16 nPagePos = m_pTabControl->GetPagePos( nPageId );
UpdatePageText( nPagePos );
}
@@ -193,7 +193,7 @@ void VCLXAccessibleTabControl::ProcessWindowEvent( const VclWindowEvent& rVclWin
{
if ( m_pTabControl )
{
- sal_uInt16 nPageId = (sal_uInt16)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData());
+ sal_uInt16 nPageId = static_cast<sal_uInt16>(reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData()));
sal_uInt16 nPagePos = m_pTabControl->GetPagePos( nPageId );
InsertChild( nPagePos );
}
@@ -203,7 +203,7 @@ void VCLXAccessibleTabControl::ProcessWindowEvent( const VclWindowEvent& rVclWin
{
if ( m_pTabControl )
{
- sal_uInt16 nPageId = (sal_uInt16)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData());
+ sal_uInt16 nPageId = static_cast<sal_uInt16>(reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData()));
for ( sal_Int32 i = 0, nCount = getAccessibleChildCount(); i < nCount; ++i )
{
Reference< XAccessible > xChild( getAccessibleChild( i ) );
@@ -271,7 +271,7 @@ void VCLXAccessibleTabControl::ProcessWindowChildEvent( const VclWindowEvent& rV
{
for ( sal_Int32 i = 0, nCount = m_pTabControl->GetPageCount(); i < nCount; ++i )
{
- sal_uInt16 nPageId = m_pTabControl->GetPageId( (sal_uInt16)i );
+ sal_uInt16 nPageId = m_pTabControl->GetPageId( static_cast<sal_uInt16>(i) );
TabPage* pTabPage = m_pTabControl->GetTabPage( nPageId );
if ( pTabPage == static_cast<TabPage*>(pChild) )
UpdateTabPage( i, rVclWindowEvent.GetId() == VclEventId::WindowShow );
@@ -366,7 +366,7 @@ Reference< XAccessible > VCLXAccessibleTabControl::getAccessibleChild( sal_Int32
Reference< XAccessible > xChild = m_aAccessibleChildren[i];
if ( !xChild.is() )
{
- sal_uInt16 nPageId = m_pTabControl ? m_pTabControl->GetPageId((sal_uInt16)i) : 0;
+ sal_uInt16 nPageId = m_pTabControl ? m_pTabControl->GetPageId(static_cast<sal_uInt16>(i)) : 0;
if (nPageId)
{
xChild = new VCLXAccessibleTabPage( m_pTabControl, nPageId );
@@ -407,7 +407,7 @@ void VCLXAccessibleTabControl::selectAccessibleChild( sal_Int32 nChildIndex )
throw IndexOutOfBoundsException();
if ( m_pTabControl )
- m_pTabControl->SelectTabPage( m_pTabControl->GetPageId( (sal_uInt16)nChildIndex ) );
+ m_pTabControl->SelectTabPage( m_pTabControl->GetPageId( static_cast<sal_uInt16>(nChildIndex) ) );
}
@@ -419,7 +419,7 @@ sal_Bool VCLXAccessibleTabControl::isAccessibleChildSelected( sal_Int32 nChildIn
throw IndexOutOfBoundsException();
bool bSelected = false;
- if ( m_pTabControl && m_pTabControl->GetCurPageId() == m_pTabControl->GetPageId( (sal_uInt16)nChildIndex ) )
+ if ( m_pTabControl && m_pTabControl->GetCurPageId() == m_pTabControl->GetPageId( static_cast<sal_uInt16>(nChildIndex) ) )
bSelected = true;
return bSelected;
diff --git a/accessibility/source/standard/vclxaccessibletoolbox.cxx b/accessibility/source/standard/vclxaccessibletoolbox.cxx
index 83828e6b0b65..a4f2f941492c 100644
--- a/accessibility/source/standard/vclxaccessibletoolbox.cxx
+++ b/accessibility/source/standard/vclxaccessibletoolbox.cxx
@@ -375,7 +375,7 @@ void VCLXAccessibleToolBox::UpdateItem_Impl( ToolBox::ImplToolItems::size_type _
// TODO: we should make this dependent on the existence of event listeners
// with the current implementation, we always create accessible object
- Any aNewChild = Any( getAccessibleChild( (sal_Int32)_nPos ) );
+ Any aNewChild = Any( getAccessibleChild( static_cast<sal_Int32>(_nPos) ) );
//TODO: ToolBox::ImplToolItems::size_type -> sal_Int32!
NotifyAccessibleEvent( AccessibleEventId::CHILD, Any(), aNewChild );
}
@@ -399,7 +399,7 @@ void VCLXAccessibleToolBox::UpdateAllItems_Impl()
for ( i = 0; i < nCount; ++i )
{
Any aNewValue;
- aNewValue <<= getAccessibleChild( (sal_Int32)i );
+ aNewValue <<= getAccessibleChild( static_cast<sal_Int32>(i) );
//TODO: ToolBox::ImplToolItems::size_type -> sal_Int32!
NotifyAccessibleEvent( AccessibleEventId::CHILD, Any(), aNewValue );
}
diff --git a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx
index 1c96c9b1ef2d..f309445fad11 100644
--- a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx
+++ b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx
@@ -684,10 +684,10 @@ Any VCLXAccessibleToolBoxItem::getCurrentValue( )
Any aValue;
if ( m_pToolBox )
- aValue <<= (sal_Int32)m_pToolBox->IsItemChecked( m_nItemId );
+ aValue <<= static_cast<sal_Int32>(m_pToolBox->IsItemChecked( m_nItemId ));
if( m_nRole == AccessibleRole::PANEL )
- aValue <<= (sal_Int32)0;
+ aValue <<= sal_Int32(0);
return aValue;
}
@@ -716,12 +716,12 @@ sal_Bool VCLXAccessibleToolBoxItem::setCurrentValue( const Any& aNumber )
Any VCLXAccessibleToolBoxItem::getMaximumValue( )
{
- return Any((sal_Int32)1);
+ return Any(sal_Int32(1));
}
Any VCLXAccessibleToolBoxItem::getMinimumValue( )
{
- return Any((sal_Int32)0);
+ return Any(sal_Int32(0));
}