diff options
author | Henry Castro <hcastro@collabora.com> | 2016-01-22 16:47:51 -0400 |
---|---|---|
committer | Henry Castro <hcastro@collabora.com> | 2016-01-23 02:28:33 +0000 |
commit | c99502a1c00ccec1b061dee10fe6a69715e14b8b (patch) | |
tree | 122be2188ab11b580c24bdfe8e8852279c30b95d /sc | |
parent | a6c8b41c4df79183c5d2c1450c010768ac7d82f6 (diff) |
sc lokit: update zoom values to graphic and text selection
Change-Id: I750f31c5698d9dc5ed589a1812a6993991915dc5
Reviewed-on: https://gerrit.libreoffice.org/21724
Reviewed-by: Henry Castro <hcastro@collabora.com>
Tested-by: Henry Castro <hcastro@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/unoobj/docuno.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index ebcb87b715c7..f39c8698bde3 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -631,7 +631,8 @@ void ScModelObj::setTextSelection(int nType, int nX, int nY) ScDrawView* pDrawView = pViewData->GetScDrawView(); // update the aLogicMode in ScViewData to something predictable - pViewData->SetZoom(Fraction(1, 1), Fraction(1, 1), true); + pViewData->SetZoom(Fraction(mnTilePixelWidth * TWIPS_PER_PIXEL, mnTileTwipWidth), + Fraction(mnTilePixelHeight * TWIPS_PER_PIXEL, mnTileTwipHeight), true); bool bHandled = false; @@ -786,7 +787,8 @@ void ScModelObj::setGraphicSelection(int nType, int nX, int nY) ScGridWindow* pGridWindow = pViewData->GetActiveWin(); // update the aLogicMode in ScViewData to something predictable - pViewData->SetZoom(Fraction(1, 1), Fraction(1, 1), true); + pViewData->SetZoom(Fraction(mnTilePixelWidth * TWIPS_PER_PIXEL, mnTileTwipWidth), + Fraction(mnTilePixelHeight * TWIPS_PER_PIXEL, mnTileTwipHeight), true); int nPixelX = nX * pViewData->GetPPTX(); int nPixelY = nY * pViewData->GetPPTY(); |