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>
This commit is contained in:
@@ -839,7 +839,7 @@ static sal_uInt32 lcl_GetRealHeight_Impl(sal_uInt32 nHeight, sal_uInt16 nProp, M
|
||||
short nTemp = static_cast<short>(nProp);
|
||||
nDiff = nTemp * 20;
|
||||
if(!bCoreInTwip)
|
||||
nDiff = static_cast<short>(convertTwipToMm100(static_cast<tools::Long>(nDiff)));
|
||||
nDiff = static_cast<short>(convertTwipToMm100(nDiff));
|
||||
break;
|
||||
}
|
||||
case MapUnit::Map100thMM:
|
||||
|
||||
@@ -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 )
|
||||
{
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -229,10 +229,7 @@ void FontWorkGalleryDialog::insertSelectedFontwork()
|
||||
SfxViewShell::Current() : nullptr;
|
||||
if (pKitViewShell)
|
||||
{
|
||||
aPagePos = pKitViewShell->getLOKVisibleArea().Center();
|
||||
|
||||
aPagePos.setX(convertTwipToMm100(aPagePos.X()));
|
||||
aPagePos.setY(convertTwipToMm100(aPagePos.Y()));
|
||||
aPagePos = convertTwipToMm100(pKitViewShell->getLOKVisibleArea().Center());
|
||||
|
||||
sal_Int32 nLOKViewWidth = 0.8 * convertTwipToMm100(pKitViewShell->getLOKVisibleArea().getOpenWidth());
|
||||
if (aFontworkSize.getWidth() > nLOKViewWidth)
|
||||
|
||||
Reference in New Issue
Block a user