[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - svx/source
Caolán McNamara
caolanm at redhat.com
Fri Jul 22 12:17:45 UTC 2016
svx/source/fmcomp/gridcell.cxx | 25 ++++++++++++++++---------
1 file changed, 16 insertions(+), 9 deletions(-)
New commits:
commit 90a26f7501b3829eba28e61f5dbae6ce6927b1f1
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jul 20 13:04:54 2016 +0100
Resolves: tdf#100845 exception during vcl painting -> std::terminate
GetText throws under the circumstances described in the bug where
the record is missing
Change-Id: I03b0ce9a19d93a7eb8842831b433b80a20628541
(cherry picked from commit d8e225304b7c8465f5e7f038ec02270445e1b600)
Reviewed-on: https://gerrit.libreoffice.org/27341
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Eike Rathke <erack at redhat.com>
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index ac2b744..be49a60 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -3552,17 +3552,24 @@ void FmXTextCell::PaintFieldToCell(OutputDevice& rDev,
nStyle |= DrawTextFlags::Left;
}
- Color* pColor = nullptr;
- OUString aText = GetText(_rxField, xFormatter, &pColor);
- if (pColor != nullptr)
+ try
{
- Color aOldTextColor( rDev.GetTextColor() );
- rDev.SetTextColor( *pColor );
- rDev.DrawText(rRect, aText, nStyle);
- rDev.SetTextColor( aOldTextColor );
+ Color* pColor = nullptr;
+ OUString aText = GetText(_rxField, xFormatter, &pColor);
+ if (pColor != nullptr)
+ {
+ Color aOldTextColor( rDev.GetTextColor() );
+ rDev.SetTextColor( *pColor );
+ rDev.DrawText(rRect, aText, nStyle);
+ rDev.SetTextColor( aOldTextColor );
+ }
+ else
+ rDev.DrawText(rRect, aText, nStyle);
+ }
+ catch (const Exception& e)
+ {
+ SAL_WARN("svx.form", "PaintFieldToCell: caught an exception: " << e.Message);
}
- else
- rDev.DrawText(rRect, aText, nStyle);
}
FmXEditCell::FmXEditCell( DbGridColumn* pColumn, DbCellControl& _rControl )
More information about the Libreoffice-commits
mailing list