Kaydet (Commit) 0761f975 authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Noel Grandin

loplugin:constantparam in accessibility to basic

Change-Id: Id77cbcaefebf310a5d99c6ac12d154e182fd0a1c
Reviewed-on: https://gerrit.libreoffice.org/28860Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
Tested-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst e44addfd
...@@ -76,8 +76,7 @@ namespace accessibility ...@@ -76,8 +76,7 @@ namespace accessibility
AccessibleGridControlTableCell( const css::uno::Reference< css::accessibility::XAccessible >& _rxParent, AccessibleGridControlTableCell( const css::uno::Reference< css::accessibility::XAccessible >& _rxParent,
::svt::table::IAccessibleTable& _rTable, ::svt::table::IAccessibleTable& _rTable,
sal_Int32 _nRowId, sal_Int32 _nRowId,
sal_uInt16 _nColId, sal_uInt16 _nColId);
svt::table::AccessibleTableControlObjType eObjType);
// XInterface ------------------------------------------------------------- // XInterface -------------------------------------------------------------
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
class VCLXAccessibleMenuSeparator : public OAccessibleMenuItemComponent class VCLXAccessibleMenuSeparator : public OAccessibleMenuItemComponent
{ {
public: public:
VCLXAccessibleMenuSeparator( Menu* pParent, sal_uInt16 nItemPos, Menu* pMenu = nullptr ); VCLXAccessibleMenuSeparator( Menu* pParent, sal_uInt16 nItemPos );
virtual ~VCLXAccessibleMenuSeparator() override; virtual ~VCLXAccessibleMenuSeparator() override;
// XServiceInfo // XServiceInfo
......
...@@ -66,7 +66,7 @@ AccessibleGridControlTable::getAccessibleChild( sal_Int32 nChildIndex ) ...@@ -66,7 +66,7 @@ AccessibleGridControlTable::getAccessibleChild( sal_Int32 nChildIndex )
} }
if(!m_pAccessCellVector[nChildIndex].is()) if(!m_pAccessCellVector[nChildIndex].is())
{ {
AccessibleGridControlTableCell* pCell = new AccessibleGridControlTableCell(this, m_aTable, nChildIndex/m_aTable.GetColumnCount(), nChildIndex%m_aTable.GetColumnCount(), TCTYPE_TABLECELL); AccessibleGridControlTableCell* pCell = new AccessibleGridControlTableCell(this, m_aTable, nChildIndex/m_aTable.GetColumnCount(), nChildIndex%m_aTable.GetColumnCount());
m_pCellVector[nChildIndex] = pCell; m_pCellVector[nChildIndex] = pCell;
m_pAccessCellVector[nChildIndex] = pCell; m_pAccessCellVector[nChildIndex] = pCell;
} }
...@@ -99,7 +99,7 @@ AccessibleGridControlTable::getAccessibleAtPoint( const awt::Point& rPoint ) ...@@ -99,7 +99,7 @@ AccessibleGridControlTable::getAccessibleAtPoint( const awt::Point& rPoint )
sal_Int32 nRow = 0; sal_Int32 nRow = 0;
sal_Int32 nColumnPos = 0; sal_Int32 nColumnPos = 0;
if( m_aTable.ConvertPointToCellAddress( nRow, nColumnPos, VCLPoint( rPoint ) ) ) if( m_aTable.ConvertPointToCellAddress( nRow, nColumnPos, VCLPoint( rPoint ) ) )
xChild = new AccessibleGridControlTableCell(this, m_aTable, nRow, nColumnPos, TCTYPE_TABLECELL); xChild = new AccessibleGridControlTableCell(this, m_aTable, nRow, nColumnPos);
return xChild; return xChild;
} }
...@@ -219,7 +219,7 @@ Reference< XAccessible > SAL_CALL AccessibleGridControlTable::getAccessibleCellA ...@@ -219,7 +219,7 @@ Reference< XAccessible > SAL_CALL AccessibleGridControlTable::getAccessibleCellA
} }
if(!m_pAccessCellVector[nChildIndex].is()) if(!m_pAccessCellVector[nChildIndex].is())
{ {
AccessibleGridControlTableCell* pCell = new AccessibleGridControlTableCell(this, m_aTable, nRow, nColumn, TCTYPE_TABLECELL); AccessibleGridControlTableCell* pCell = new AccessibleGridControlTableCell(this, m_aTable, nRow, nColumn);
m_pCellVector[nChildIndex] = pCell; m_pCellVector[nChildIndex] = pCell;
m_pAccessCellVector[nChildIndex] = pCell; m_pAccessCellVector[nChildIndex] = pCell;
} }
......
...@@ -103,9 +103,8 @@ namespace accessibility ...@@ -103,9 +103,8 @@ namespace accessibility
AccessibleGridControlTableCell::AccessibleGridControlTableCell(const css::uno::Reference<XAccessible >& _rxParent, AccessibleGridControlTableCell::AccessibleGridControlTableCell(const css::uno::Reference<XAccessible >& _rxParent,
::svt::table::IAccessibleTable& _rTable, ::svt::table::IAccessibleTable& _rTable,
sal_Int32 _nRowPos, sal_Int32 _nRowPos,
sal_uInt16 _nColPos, sal_uInt16 _nColPos)
::svt::table::AccessibleTableControlObjType eObjType) :AccessibleGridControlCell( _rxParent, _rTable, _nRowPos, _nColPos, TCTYPE_TABLECELL )
:AccessibleGridControlCell( _rxParent, _rTable, _nRowPos, _nColPos, eObjType )
{ {
} }
......
...@@ -31,8 +31,8 @@ using namespace ::comphelper; ...@@ -31,8 +31,8 @@ using namespace ::comphelper;
// class VCLXAccessibleMenuSeparator // class VCLXAccessibleMenuSeparator
VCLXAccessibleMenuSeparator::VCLXAccessibleMenuSeparator( Menu* pParent, sal_uInt16 nItemPos, Menu* pMenu ) VCLXAccessibleMenuSeparator::VCLXAccessibleMenuSeparator( Menu* pParent, sal_uInt16 nItemPos )
:OAccessibleMenuItemComponent( pParent, nItemPos, pMenu ) :OAccessibleMenuItemComponent( pParent, nItemPos, nullptr )
{ {
} }
......
...@@ -119,15 +119,7 @@ void SbxBase::AddFactory( SbxFactory* pFac ) ...@@ -119,15 +119,7 @@ void SbxBase::AddFactory( SbxFactory* pFac )
{ {
SbxAppData& r = GetSbxData_Impl(); SbxAppData& r = GetSbxData_Impl();
// From 1996-03-06: take the HandleLast-Flag into account r.m_Factories.insert(r.m_Factories.begin(), std::unique_ptr<SbxFactory>(pFac));
sal_uInt16 nPos = r.m_Factories.size(); // Insert position
if( !pFac->IsHandleLast() ) // Only if not self HandleLast
{
// Rank new factory in front of factories with HandleLast
while (nPos > 0 && r.m_Factories[ nPos-1 ]->IsHandleLast())
nPos--;
}
r.m_Factories.insert(r.m_Factories.begin() + nPos, std::unique_ptr<SbxFactory>(pFac));
} }
void SbxBase::RemoveFactory( SbxFactory* pFac ) void SbxBase::RemoveFactory( SbxFactory* pFac )
......
...@@ -29,11 +29,9 @@ class SbxObject; ...@@ -29,11 +29,9 @@ class SbxObject;
class BASIC_DLLPUBLIC SbxFactory class BASIC_DLLPUBLIC SbxFactory
{ {
bool bHandleLast; // true: Factory is asked at last because of its expensiveness
public: public:
virtual ~SbxFactory(); virtual ~SbxFactory();
SbxFactory( bool bLast=false ) { bHandleLast = bLast; } SbxFactory() {}
bool IsHandleLast() { return bHandleLast; }
virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 ); virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 );
virtual SbxObject* CreateObject( const OUString& ); virtual SbxObject* CreateObject( const OUString& );
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment