summaryrefslogtreecommitdiff
path: root/sc/source/ui/Accessibility
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-10-19 15:17:25 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-20 08:04:35 +0200
commitb225980d2d65694278c9ed89512fbe21b08febd6 (patch)
treeacd7e008fdabbed097fd97f6c4ba8ddc366946bb /sc/source/ui/Accessibility
parent6eefea359fe1e51adfd4a2002614013a7c060a33 (diff)
use tools::Long in sc
Change-Id: I8f37a8d1174ed816df971b8cee036d4e88d4a7fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104526 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/Accessibility')
-rw-r--r--sc/source/ui/Accessibility/AccessibleCell.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocument.cxx4
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx22
-rw-r--r--sc/source/ui/Accessibility/AccessiblePreviewTable.cxx10
-rw-r--r--sc/source/ui/Accessibility/AccessibleText.cxx30
5 files changed, 34 insertions, 34 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleCell.cxx b/sc/source/ui/Accessibility/AccessibleCell.cxx
index d400e1123c93..61cb5a9b0f12 100644
--- a/sc/source/ui/Accessibility/AccessibleCell.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCell.cxx
@@ -166,7 +166,7 @@ tools::Rectangle ScAccessibleCell::GetBoundingBox() const
tools::Rectangle aCellRect;
if (mpViewShell)
{
- long nSizeX, nSizeY;
+ tools::Long nSizeX, nSizeY;
mpViewShell->GetViewData().GetMergeSizePixel(
maCellAddress.Col(), maCellAddress.Row(), nSizeX, nSizeY);
aCellRect.SetSize(Size(nSizeX, nSizeY));
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index 1efcd4091702..1015063d1ce2 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -215,7 +215,7 @@ public:
virtual bool ReplaceChild (
::accessibility::AccessibleShape* pCurrentChild,
const css::uno::Reference< css::drawing::XShape >& _rxShape,
- const long _nIndex,
+ const tools::Long _nIndex,
const ::accessibility::AccessibleShapeTreeInfo& _rShapeTreeInfo
) override;
@@ -418,7 +418,7 @@ void ScChildrenShapes::Notify(SfxBroadcaster&, const SfxHint& rHint)
bool ScChildrenShapes::ReplaceChild (::accessibility::AccessibleShape* pCurrentChild,
const css::uno::Reference< css::drawing::XShape >& _rxShape,
- const long /*_nIndex*/, const ::accessibility::AccessibleShapeTreeInfo& _rShapeTreeInfo)
+ const tools::Long /*_nIndex*/, const ::accessibility::AccessibleShapeTreeInfo& _rShapeTreeInfo)
{
// create the new child
rtl::Reference< ::accessibility::AccessibleShape > pReplacement(::accessibility::ShapeTypeHandler::Instance().CreateAccessibleObject (
diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
index d7a9ebb5845a..568b4a2c59ee 100644
--- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
@@ -653,7 +653,7 @@ public:
virtual bool ReplaceChild (
::accessibility::AccessibleShape* pCurrentChild,
const css::uno::Reference< css::drawing::XShape >& _rxShape,
- const long _nIndex,
+ const tools::Long _nIndex,
const ::accessibility::AccessibleShapeTreeInfo& _rShapeTreeInfo
) override;
@@ -802,7 +802,7 @@ void ScShapeChildren::VisAreaChanged() const
bool ScShapeChildren::ReplaceChild (::accessibility::AccessibleShape* /* pCurrentChild */,
const css::uno::Reference< css::drawing::XShape >& /* _rxShape */,
- const long /* _nIndex */, const ::accessibility::AccessibleShapeTreeInfo& /* _rShapeTreeInfo */)
+ const tools::Long /* _nIndex */, const ::accessibility::AccessibleShapeTreeInfo& /* _rShapeTreeInfo */)
{
OSL_FAIL("should not be called in the page preview");
return false;
@@ -1079,18 +1079,18 @@ struct ScPagePreviewCountData
// order is background shapes, header, table or notes, footer, foreground shapes, controls
tools::Rectangle aVisRect;
- long nBackShapes;
- long nHeaders;
- long nTables;
- long nNoteParagraphs;
- long nFooters;
- long nForeShapes;
- long nControls;
+ tools::Long nBackShapes;
+ tools::Long nHeaders;
+ tools::Long nTables;
+ tools::Long nNoteParagraphs;
+ tools::Long nFooters;
+ tools::Long nForeShapes;
+ tools::Long nControls;
ScPagePreviewCountData( const ScPreviewLocationData& rData, const vcl::Window* pSizeWindow,
const ScNotesChildren* pNotesChildren, const ScShapeChildren* pShapeChildren );
- long GetTotal() const
+ tools::Long GetTotal() const
{
return nBackShapes + nHeaders + nTables + nNoteParagraphs + nFooters + nForeShapes + nControls;
}
@@ -1347,7 +1347,7 @@ sal_Int32 SAL_CALL ScAccessibleDocumentPagePreview::getAccessibleChildCount()
SolarMutexGuard aGuard;
IsObjectValid();
- long nRet = 0;
+ tools::Long nRet = 0;
if ( mpViewShell )
{
ScPagePreviewCountData aCount( mpViewShell->GetLocationData(), mpViewShell->GetWindow(), GetNotesChildren(), GetShapeChildren() );
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
index bd47bf57e40a..5db9a2097972 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
@@ -290,7 +290,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewTable::getAccessibleCe
if ( mpTableInfo && nColumn >= 0 && nRow >= 0 && nColumn < mpTableInfo->GetCols() && nRow < mpTableInfo->GetRows() )
{
// index iterates horizontally
- long nNewIndex = nRow * mpTableInfo->GetCols() + nColumn;
+ tools::Long nNewIndex = nRow * mpTableInfo->GetCols() + nColumn;
const ScPreviewColRowInfo& rColInfo = mpTableInfo->GetColInfo()[nColumn];
const ScPreviewColRowInfo& rRowInfo = mpTableInfo->GetRowInfo()[nRow];
@@ -460,7 +460,7 @@ sal_Int32 SAL_CALL ScAccessiblePreviewTable::getAccessibleChildCount()
FillTableInfo();
- long nRet = 0;
+ tools::Long nRet = 0;
if ( mpTableInfo )
nRet = static_cast<sal_Int32>(mpTableInfo->GetCols()) * mpTableInfo->GetRows();
return nRet;
@@ -476,12 +476,12 @@ uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewTable::getAccessibleCh
uno::Reference<XAccessible> xRet;
if ( mpTableInfo )
{
- long nColumns = mpTableInfo->GetCols();
+ tools::Long nColumns = mpTableInfo->GetCols();
if ( nColumns > 0 )
{
// nCol, nRow are within the visible table, not the document
- long nCol = nIndex % nColumns;
- long nRow = nIndex / nColumns;
+ tools::Long nCol = nIndex % nColumns;
+ tools::Long nRow = nIndex / nColumns;
xRet = getAccessibleCellAt( nRow, nCol );
}
diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx
index fd43850ce8a5..3166fbd513a4 100644
--- a/sc/source/ui/Accessibility/AccessibleText.cxx
+++ b/sc/source/ui/Accessibility/AccessibleText.cxx
@@ -488,14 +488,14 @@ SvxTextForwarder* ScAccessibleCellTextData::GetTextForwarder()
if ( pDocShell && pEditEngine && mpViewShell )
{
ScDocument& rDoc = pDocShell->GetDocument();
- long nSizeX, nSizeY;
+ tools::Long nSizeX, nSizeY;
mpViewShell->GetViewData().GetMergeSizePixel(
aCellPos.Col(), aCellPos.Row(), nSizeX, nSizeY);
Size aSize(nSizeX, nSizeY);
// #i92143# text getRangeExtents reports incorrect 'x' values for spreadsheet cells
- long nIndent = 0;
+ tools::Long nIndent = 0;
const SvxHorJustifyItem* pHorJustifyItem = rDoc.GetAttr( aCellPos, ATTR_HOR_JUSTIFY );
SvxCellHorJustify eHorJust = pHorJustifyItem ? pHorJustifyItem->GetValue() : SvxCellHorJustify::Standard;
if ( eHorJust == SvxCellHorJustify::Left )
@@ -503,7 +503,7 @@ SvxTextForwarder* ScAccessibleCellTextData::GetTextForwarder()
const ScIndentItem* pIndentItem = rDoc.GetAttr( aCellPos, ATTR_INDENT );
if ( pIndentItem )
{
- nIndent = static_cast< long >( pIndentItem->GetValue() );
+ nIndent = static_cast< tools::Long >( pIndentItem->GetValue() );
}
}
@@ -511,11 +511,11 @@ SvxTextForwarder* ScAccessibleCellTextData::GetTextForwarder()
ScViewData& rViewData = mpViewShell->GetViewData();
double nPPTX = rViewData.GetPPTX();
double nPPTY = rViewData.GetPPTY();
- long nLeftM = ( pMarginItem ? static_cast< long >( ( pMarginItem->GetLeftMargin() + nIndent ) * nPPTX ) : 0 );
- long nTopM = ( pMarginItem ? static_cast< long >( pMarginItem->GetTopMargin() * nPPTY ) : 0 );
- long nRightM = ( pMarginItem ? static_cast< long >( pMarginItem->GetRightMargin() * nPPTX ) : 0 );
- long nBottomM = ( pMarginItem ? static_cast< long >( pMarginItem->GetBottomMargin() * nPPTY ) : 0 );
- long nWidth = aSize.getWidth() - nLeftM - nRightM;
+ tools::Long nLeftM = ( pMarginItem ? static_cast< tools::Long >( ( pMarginItem->GetLeftMargin() + nIndent ) * nPPTX ) : 0 );
+ tools::Long nTopM = ( pMarginItem ? static_cast< tools::Long >( pMarginItem->GetTopMargin() * nPPTY ) : 0 );
+ tools::Long nRightM = ( pMarginItem ? static_cast< tools::Long >( pMarginItem->GetRightMargin() * nPPTX ) : 0 );
+ tools::Long nBottomM = ( pMarginItem ? static_cast< tools::Long >( pMarginItem->GetBottomMargin() * nPPTY ) : 0 );
+ tools::Long nWidth = aSize.getWidth() - nLeftM - nRightM;
aSize.setWidth( nWidth );
aSize.setHeight( aSize.getHeight() - nTopM - nBottomM );
@@ -539,7 +539,7 @@ SvxTextForwarder* ScAccessibleCellTextData::GetTextForwarder()
if( pItem && (pItem->GetValue() != 0) )
{
pEditEngine->SetPaperSize( Size( LONG_MAX, aSize.getHeight() ) );
- long nTxtWidth = static_cast< long >( pEditEngine->CalcTextWidth() );
+ tools::Long nTxtWidth = static_cast< tools::Long >( pEditEngine->CalcTextWidth() );
aSize.setWidth( std::max( aSize.getWidth(), nTxtWidth + 2 ) );
}
else
@@ -549,7 +549,7 @@ SvxTextForwarder* ScAccessibleCellTextData::GetTextForwarder()
bool bLineBreak = ( pLineBreakItem && pLineBreakItem->GetValue() );
if ( !bLineBreak )
{
- long nTxtWidth = static_cast< long >( pEditEngine->CalcTextWidth() );
+ tools::Long nTxtWidth = static_cast< tools::Long >( pEditEngine->CalcTextWidth() );
aSize.setWidth( ::std::max( aSize.getWidth(), nTxtWidth ) );
}
}
@@ -567,11 +567,11 @@ SvxTextForwarder* ScAccessibleCellTextData::GetTextForwarder()
{
aTextSize = pWin->LogicToPixel( Size( pEditEngine->CalcTextWidth(), pEditEngine->GetTextHeight() ), pEditEngine->GetRefMapMode() );
}
- long nTextWidth = aTextSize.Width();
- long nTextHeight = aTextSize.Height();
+ tools::Long nTextWidth = aTextSize.Width();
+ tools::Long nTextHeight = aTextSize.Height();
- long nOffsetX = nLeftM;
- long nDiffX = nTextWidth - nWidth;
+ tools::Long nOffsetX = nLeftM;
+ tools::Long nDiffX = nTextWidth - nWidth;
if ( nDiffX > 0 )
{
switch ( eHorJust )
@@ -593,7 +593,7 @@ SvxTextForwarder* ScAccessibleCellTextData::GetTextForwarder()
}
}
- long nOffsetY = 0;
+ tools::Long nOffsetY = 0;
const SvxVerJustifyItem* pVerJustifyItem = rDoc.GetAttr( aCellPos, ATTR_VER_JUSTIFY );
SvxCellVerJustify eVerJust = ( pVerJustifyItem ? pVerJustifyItem->GetValue() : SvxCellVerJustify::Standard );
switch ( eVerJust )