Hi Eicke,
The second one:
0001-fdo42286-extend-down-but-also-shrink-if-cells-are-em.patch
For consistency it makes sense to also shrink the area, as
re-initializing the filter area with only one cell or one row selected
.....
erroneously included. Please go ahead with this one.
OK
Please check that a defined data base range did not change behavior with
your previous changes.
I have look at the code where GetDataArea is called. The only places
where a behaviour change could happen are in function GetDBData (
sc/source/ui/docshell/docsh5.cxx )
if bOnlyDown is true. In this case, the area will be shrink - if needed
- only for the number of rows. Before, all 4 sides (top, right, left
and bottom) could be shrink. But this change exists only if we shrink.
For expanding, the behaviour was already ensured as described (bOnlyDown
= true would have expanded only down, not the other directions).
This now makes the behaviour symmetric between shrinking / expanding the
area. Based on flags and description, the former behaviour was buggy,
but maybe something has been build depending of it. Despite knowing what
is changed, I was not able to produce a way of using it that seemed to
be problematic. I see you have worked on this function, maybe something
will strike you immediately :- ).
So here the patch. If no one object, I will push it during my Christmas
Holiday.
Best regards
Pierre-André
From 994b2c2e5a760503f8e466ae8068cf1cc453a712 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Andr=C3=A9=20Jacquod?= <pjacquod@alumni.ethz.ch>
Date: Thu, 15 Dec 2011 19:29:17 +0100
Subject: [PATCH 1/2] fdo42286 better solution: extend and shrink end of row if needed
---
sc/source/core/tool/dbdata.cxx | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx
index 3d60554..3cc4146 100644
--- a/sc/source/core/tool/dbdata.cxx
+++ b/sc/source/core/tool/dbdata.cxx
@@ -544,10 +544,8 @@ void ScDBData::UpdateReference(ScDocument* pDoc, UpdateRefMode eUpdateRefMode,
void ScDBData::ExtendDataArea(ScDocument* pDoc)
{
// Extend the DB area to include data rows immediately below.
- SCCOL nCol1a = nStartCol, nCol2a = nEndCol;
- SCROW nRow1a = nStartRow, nRow2a = nEndRow;
- pDoc->GetDataArea(nTable, nCol1a, nRow1a, nCol2a, nRow2a, true, true);
- nEndRow = nRow2a;
+ // or shrink it if all cells are empty
+ pDoc->GetDataArea(nTable, nStartCol, nStartRow, nEndCol, nEndRow, false, true);
}
namespace {
--
1.7.3.4
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.