sc/source/ui/view/tabvwsh4.cxx | 35 ----------------------------------- 1 file changed, 35 deletions(-)
New commits: commit 7b5c7aa98901501b9f73354b3c77432287b6c8a4 Author: Jan Holesovsky <ke...@collabora.com> Date: Wed May 3 15:36:37 2017 +0200 Revert "Calc Lok: prevent a new view from resetting tiled view dimensions" This reverts commit a70c34ccf5c446967bf9a258b8da2bd7addc9695. Change-Id: I3c6de1385e9e4f9de8c59d06fd6a02dd505c5b52 Reviewed-on: https://gerrit.libreoffice.org/37204 Reviewed-by: Marco Cecchetti <mrcek...@gmail.com> Tested-by: Marco Cecchetti <mrcek...@gmail.com> diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx index 2f31b44dcfb1..e8f4491ae26e 100644 --- a/sc/source/ui/view/tabvwsh4.cxx +++ b/sc/source/ui/view/tabvwsh4.cxx @@ -1684,32 +1684,6 @@ ScTabViewShell::ScTabViewShell( SfxViewFrame* pViewFrame, pAccessibilityBroadcaster(nullptr), mbInSwitch(false) { - // FIXME this is just a workaround, the real fix is to move the - // CurMaxCol/Row to ScTable, so that we maintain them consistently - // for all the views: - // If another view had enlarged the dimensions, preserve it - // lest we reduce it to the original, and they get blank tiles - // (in the area outside the original dimensions). - long nMaxTiledRow = 0; - long nMaxTiledCol = 0; - SfxViewShell* pViewShell = SfxViewShell::GetFirst(); - while (pViewShell) - { - ScTabViewShell* pTabViewShell = dynamic_cast<ScTabViewShell*>(pViewShell); - if (pTabViewShell && getPart() == pTabViewShell->getPart()) - { - ScViewData& rViewData = pTabViewShell->GetViewData(); - const long nCurMaxTiledRow = rViewData.GetMaxTiledRow(); - const long nCurMaxTiledCol = rViewData.GetMaxTiledCol(); - SAL_INFO("sc.lok.docsize", "sfxlokhelper::createview: maxTiledRow: " << - nCurMaxTiledRow << ", maxTiledCol: " << nCurMaxTiledCol); - nMaxTiledRow = std::max(nCurMaxTiledRow, nMaxTiledRow); - nMaxTiledCol = std::max(nCurMaxTiledCol, nMaxTiledCol); - } - - pViewShell = SfxViewShell::GetNext(*pViewShell); - } - const ScAppOptions& rAppOpt = SC_MOD()->GetAppOptions(); // if switching back from print preview, @@ -1770,15 +1744,6 @@ ScTabViewShell::ScTabViewShell( SfxViewFrame* pViewFrame, //put things back as we found them if (bInstalledScTabViewObjAsTempController) GetViewData().GetDocShell()->GetModel()->setCurrentController(nullptr); - - // Set the maximum dimensions as explained above, but only if they have - // the default values. - SAL_INFO("sc.lok.docsize", "sfxlokhelper::createview: overwriting new view's maxTiledRow: " << - nMaxTiledRow << ", maxTiledCol: " << nMaxTiledCol); - if (GetViewData().GetMaxTiledRow() == 50 && nMaxTiledRow > 0) - GetViewData().SetMaxTiledRow(nMaxTiledRow); - if (GetViewData().GetMaxTiledCol() == 20 && nMaxTiledCol > 0) - GetViewData().SetMaxTiledCol(nMaxTiledCol); } ScTabViewShell::~ScTabViewShell() _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits