[Libreoffice-commits] .: 2 commits - sw/source
Caolán McNamara
caolan at kemper.freedesktop.org
Tue Mar 1 12:41:05 PST 2011
sw/source/filter/xml/xmltbli.cxx | 2 +-
sw/source/ui/uiview/viewtab.cxx | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 49959923a534b930b1c3170f523179ac959d497b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Mar 1 14:07:01 2011 +0000
avoid implicit casting
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index b45cc5d..d3bd25b 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -2074,7 +2074,7 @@ SwTableBox *SwXMLTableContext::MakeTableBox(
{
// set style
const SfxItemSet *pAutoItemSet = 0;
- if( pCell->GetStartNode() && sStyleName &&
+ if( pCell->GetStartNode() && sStyleName.getLength() &&
GetSwImport().FindAutomaticStyle(
XML_STYLE_FAMILY_TABLE_CELL, sStyleName, &pAutoItemSet ) )
{
commit ce3f35b105c1b7be960d369296729a656adb1aa0
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Mar 1 13:31:10 2011 +0000
Resolves: rhbz#681159 bandaid for crash
diff --git a/sw/source/ui/uiview/viewtab.cxx b/sw/source/ui/uiview/viewtab.cxx
index 0307a69..02fede0 100644
--- a/sw/source/ui/uiview/viewtab.cxx
+++ b/sw/source/ui/uiview/viewtab.cxx
@@ -694,7 +694,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
if(bIsTableRTL)
{
USHORT nColCount = aColItem.Count() - 1;
- for ( USHORT i = 0; i < nColCount; ++i )
+ for ( USHORT i = 0; i < nColCount && i < aTabCols.Count(); ++i )
{
const SvxColumnDescription& rCol = aColItem[nColCount - i];
aTabCols[i] = aTabCols.GetRight() - rCol.nStart;
@@ -703,7 +703,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
}
else
{
- for ( USHORT i = 0; i < aColItem.Count()-1; ++i )
+ for ( USHORT i = 0; i < aColItem.Count()-1 && i < aTabCols.Count(); ++i )
{
const SvxColumnDescription& rCol = aColItem[i];
aTabCols[i] = rCol.nEnd + aTabCols.GetLeft();
More information about the Libreoffice-commits
mailing list