svtools/source/table/gridtablerenderer.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit b68f053b765f37fc43fc2d67c57686c121acdfbf Author: Norbert Thiebaud <[email protected]> Date: Mon Sep 3 16:20:38 2012 -0500 gridfixes: lcl_getAlignmentTextDrawFlags: row header w/o columns care the rare cases that the table has row headers, but no columns at all Change-Id: Iece17add6f5e0adf425c33f0817e8b1be953e1a7 Reviewed-on: https://gerrit.libreoffice.org/552 Reviewed-by: Miklos Vajna <[email protected]> Tested-by: Miklos Vajna <[email protected]> diff --git a/svtools/source/table/gridtablerenderer.cxx b/svtools/source/table/gridtablerenderer.cxx index 8e227b6..8196a8b 100644 --- a/svtools/source/table/gridtablerenderer.cxx +++ b/svtools/source/table/gridtablerenderer.cxx @@ -170,7 +170,9 @@ namespace svt { namespace table } sal_uLong nHorzFlag = TEXT_DRAW_LEFT; - HorizontalAlignment const eHorzAlign = i_impl.rModel.getColumnModel( i_columnPos )->getHorizontalAlign(); + HorizontalAlignment const eHorzAlign = i_impl.rModel.getColumnCount() > 0 + ? i_impl.rModel.getColumnModel( i_columnPos )->getHorizontalAlign() + : HorizontalAlignment_CENTER; switch ( eHorzAlign ) { case HorizontalAlignment_CENTER: nHorzFlag = TEXT_DRAW_CENTER; break; _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
