summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2017-05-03 15:36:37 +0200
committerJan Holesovsky <kendy@collabora.com>2017-05-03 16:17:45 +0200
commit7b5c7aa98901501b9f73354b3c77432287b6c8a4 (patch)
tree9aeac842c080cb2298a1602ff78d9b9ee435e7f3
parentbd4fd10cb6a71a00412fb876b5d0de880545a305 (diff)
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 <mrcekets@gmail.com> Tested-by: Marco Cecchetti <mrcekets@gmail.com>
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx35
1 files changed, 0 insertions, 35 deletions
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()