1 |
From ff83a4fc52c1ff7603dd2b26593a5231c4a5c2f2 Mon Sep 17 00:00:00 2001 |
2 |
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com> |
3 |
Date: Tue, 1 Mar 2011 13:31:10 +0000 |
4 |
Subject: [PATCH] Resolves: rhbz#681159 bandaid for crash |
5 |
|
6 |
--- |
7 |
sw/source/ui/uiview/viewtab.cxx | 4 ++-- |
8 |
1 files changed, 2 insertions(+), 2 deletions(-) |
9 |
|
10 |
diff --git a/sw/source/ui/uiview/viewtab.cxx b/sw/source/ui/uiview/viewtab.cxx |
11 |
index 0307a69..02fede0 100644 |
12 |
--- a/sw/source/ui/uiview/viewtab.cxx |
13 |
+++ b/sw/source/ui/uiview/viewtab.cxx |
14 |
@@ -694,7 +694,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) |
15 |
if(bIsTableRTL) |
16 |
{ |
17 |
USHORT nColCount = aColItem.Count() - 1; |
18 |
- for ( USHORT i = 0; i < nColCount; ++i ) |
19 |
+ for ( USHORT i = 0; i < nColCount && i < aTabCols.Count(); ++i ) |
20 |
{ |
21 |
const SvxColumnDescription& rCol = aColItem[nColCount - i]; |
22 |
aTabCols[i] = aTabCols.GetRight() - rCol.nStart; |
23 |
@@ -703,7 +703,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) |
24 |
} |
25 |
else |
26 |
{ |
27 |
- for ( USHORT i = 0; i < aColItem.Count()-1; ++i ) |
28 |
+ for ( USHORT i = 0; i < aColItem.Count()-1 && i < aTabCols.Count(); ++i ) |
29 |
{ |
30 |
const SvxColumnDescription& rCol = aColItem[i]; |
31 |
aTabCols[i] = rCol.nEnd + aTabCols.GetLeft(); |
32 |
-- |
33 |
1.7.4.1 |
34 |
|
35 |
|