diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2024-06-29 16:22:24 +0500 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2024-06-29 14:37:45 +0200 |
commit | 0748844975b1b241b9e80e82605177f7d31a724f (patch) | |
tree | 43c8756d8a16f13b853f915a4eeea5bbb0d16a92 /sc | |
parent | 11ad465075d7f99627997dcc2b6c50117a549562 (diff) |
Simplify some uses of convertTwipToMm100
Change-Id: I073ac7358c1bcb82992ec7746f4b3986d6d35633
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169755
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/unoobj/cellsuno.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/view/drawview.cxx | 9 |
2 files changed, 5 insertions, 10 deletions
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index 9e1b77732c41..a3338bba3496 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -8386,8 +8386,7 @@ void ScTableColumnObj::GetOnePropertyValue( const SfxItemPropertyMapEntry* pEntr // for hidden column, return original height sal_uInt16 nWidth = rDoc.GetOriginalWidth( nCol, nTab ); // property is 1/100mm, column width is twips - nWidth = static_cast<sal_uInt16>(convertTwipToMm100(nWidth)); - rAny <<= static_cast<sal_Int32>(nWidth); + rAny <<= static_cast<sal_Int32>(convertTwipToMm100(nWidth)); } else if ( pEntry->nWID == SC_WID_UNO_CELLVIS ) { @@ -8532,8 +8531,7 @@ void ScTableRowObj::GetOnePropertyValue( const SfxItemPropertyMapEntry* pEntry, // for hidden row, return original height sal_uInt16 nHeight = rDoc.GetOriginalHeight( nRow, nTab ); // property is 1/100mm, row height is twips - nHeight = static_cast<sal_uInt16>(convertTwipToMm100(nHeight)); - rAny <<= static_cast<sal_Int32>(nHeight); + rAny <<= static_cast<sal_Int32>(convertTwipToMm100(nHeight)); } else if ( pEntry->nWID == SC_WID_UNO_CELLVIS ) { diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx index 1c96d86facf0..8a6670d4f419 100644 --- a/sc/source/ui/view/drawview.cxx +++ b/sc/source/ui/view/drawview.cxx @@ -952,8 +952,7 @@ void ScDrawView::SyncForGrid( SdrObject* pObj ) MapMode aDrawMode = pGridWin->GetDrawMapMode(); // find pos anchor position Point aOldPos( rDoc.GetColOffset( aOldStt.Col(), aOldStt.Tab() ), rDoc.GetRowOffset( aOldStt.Row(), aOldStt.Tab() ) ); - aOldPos.setX(convertTwipToMm100(aOldPos.X())); - aOldPos.setY(convertTwipToMm100(aOldPos.Y())); + aOldPos = convertTwipToMm100(aOldPos); // find position of same point on the screen ( e.g. grid ) Point aCurPos = pViewData->GetScrPos( aOldStt.Col(), aOldStt.Row(), eWhich, true ); Point aCurPosHmm = pGridWin->PixelToLogic(aCurPos, aDrawMode ); @@ -1029,8 +1028,7 @@ bool ScDrawView::calculateGridOffsetForSdrObject( // find pos anchor position Point aOldPos(rDoc.GetColOffset(aOldStt.Col(), aOldStt.Tab()), rDoc.GetRowOffset(aOldStt.Row(), aOldStt.Tab())); - aOldPos.setX(convertTwipToMm100(aOldPos.X())); - aOldPos.setY(convertTwipToMm100(aOldPos.Y())); + aOldPos = convertTwipToMm100(aOldPos); // find position of same point on the screen ( e.g. grid ) ScSplitPos eWhich(pViewData->GetActivePart()); @@ -1080,8 +1078,7 @@ bool ScDrawView::calculateGridOffsetForB2DRange( // find pos anchor position Point aOldPos(rDoc.GetColOffset(aOldStt.Col(), aOldStt.Tab()), rDoc.GetRowOffset(aOldStt.Row(), aOldStt.Tab())); - aOldPos.setX(convertTwipToMm100(aOldPos.X())); - aOldPos.setY(convertTwipToMm100(aOldPos.Y())); + aOldPos = convertTwipToMm100(aOldPos); // find position of same point on the screen ( e.g. grid ) ScSplitPos eWhich(pViewData->GetActivePart()); |