[Libreoffice-commits] core.git: 2 commits - include/sal svtools/source svx/source
Lionel Elie Mamane
lionel at mamane.lu
Mon Jan 19 04:21:11 PST 2015
include/sal/log-areas.dox | 1 +
svtools/source/brwbox/brwbox2.cxx | 7 ++++++-
svx/source/fmcomp/fmgridcl.cxx | 11 ++++++-----
3 files changed, 13 insertions(+), 6 deletions(-)
New commits:
commit e8c0a29797250fd54eb41a4399f1fda39ef25647
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date: Mon Jan 19 11:47:43 2015 +0100
initializeControlModel needs parent to be set
And thus it seems it expects to be called *after* insertion.
Change-Id: I752dcd84c76c7beba75cd564162def5eaee7de4c
diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
index 4418a47..16a37bd1 100644
--- a/svx/source/fmcomp/fmgridcl.cxx
+++ b/svx/source/fmcomp/fmgridcl.cxx
@@ -533,6 +533,12 @@ IMPL_LINK( FmGridHeader, OnAsyncExecuteDrop, void*, /*NOTINTERESTEDIN*/ )
else
xCol->setPropertyValue(FM_PROP_LABEL, makeAny(sFieldName));
+ // jetzt einfuegen
+ Any aElement;
+ aElement <<= xCol;
+
+ xCols->insertByIndex(nPos, aElement);
+
FormControlFactory aControlFactory;
aControlFactory.initializeControlModel( DocumentClassification::classifyHostDocument( xCols ), xCol );
aControlFactory.initializeFieldDependentProperties( xField, xCol, xNumberFormats );
@@ -567,11 +573,6 @@ IMPL_LINK( FmGridHeader, OnAsyncExecuteDrop, void*, /*NOTINTERESTEDIN*/ )
else
xCol->setPropertyValue(FM_PROP_NAME, makeAny(sFieldName));
- // jetzt einfuegen
- Any aElement;
- aElement <<= xCol;
- xCols->insertByIndex(nPos, aElement);
-
if (bDateNTimeCol)
{
aElement <<= xSecondCol;
commit e8a68c1f50f32a0f9d8bcdf16c1270c319910baa
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date: Mon Jan 19 11:44:55 2015 +0100
fixup previous commit:
OSL_ENSURE does not execute in non-debug builds (and is deprecated).
Do not try to seek back if paint did not seek.
This happens in particular when there is no data source attached (and thus trying to seek fails).
Change-Id: I3f4908c4dcae2bb120bf58c1218e3386c40d5721
diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 2cd8546..12645df 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -298,6 +298,7 @@ certain functionality.
@section svtools
@li @c svtools
+ at li @c svtools.brwbox
@li @c svtools.config
@li @c svtools.contnr
@li @c svtools.control
diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx
index 70486e9..a3fe78c 100644
--- a/svtools/source/brwbox/brwbox2.cxx
+++ b/svtools/source/brwbox/brwbox2.cxx
@@ -888,6 +888,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, bool
Color aDelimiterLineColor( ::svtools::ColorConfig().GetColorValue( ::svtools::CALCGRID ).nColor );
// redraw the invalid fields
+ bool paint_seeked(false);
for ( sal_uLong nRelRow = nRelTopRow;
nRelRow <= nRelBottomRow && (sal_uLong)nTopRow+nRelRow < (sal_uLong)nRowCount;
++nRelRow, aPos.Y() += nDataRowHeigt )
@@ -900,6 +901,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, bool
// prepare row
sal_uLong nRow = nTopRow+nRelRow;
+ paint_seeked = true;
if ( !SeekRow( nRow) ) {
OSL_FAIL("BrowseBox::ImplPaintData: SeekRow failed");
}
@@ -1032,7 +1034,10 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, bool
}
}
- OSL_ENSURE(SeekRow(nCurRow), "BrowseBox::ImplPaintData could not seek back to current row after paint");
+ if (paint_seeked && !SeekRow(nCurRow))
+ {
+ SAL_WARN("svtools.brwbox", "BrowseBox::ImplPaintData could not seek back to current row after paint");
+ }
if (aPos.Y() > aOverallAreaBRPos.Y() + 1)
aPos.Y() = aOverallAreaBRPos.Y() + 1;
More information about the Libreoffice-commits
mailing list