[Libreoffice-commits] .: svtools/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Sep 14 00:52:09 PDT 2012
svtools/source/table/gridtablerenderer.cxx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit b68f053b765f37fc43fc2d67c57686c121acdfbf
Author: Norbert Thiebaud <nthiebaud at gmail.com>
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 <vmiklos at suse.cz>
Tested-by: Miklos Vajna <vmiklos at suse.cz>
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;
More information about the Libreoffice-commits
mailing list