summaryrefslogtreecommitdiffstats
path: root/svx/source/dialog/svxruler.cxx
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2006-02-06 15:14:10 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2006-02-06 15:14:10 +0000
commit2648943ec6678f26c780a107a6c10f15c5adaf1b (patch)
treeaaae82df8e0369e1f3a600c8984d605d6f9a2871 /svx/source/dialog/svxruler.cxx
parentINTEGRATION: CWS c05v002followup (1.33.130); FILE MERGED (diff)
downloadcore-2648943ec6678f26c780a107a6c10f15c5adaf1b.tar.gz
core-2648943ec6678f26c780a107a6c10f15c5adaf1b.zip
INTEGRATION: CWS os75 (1.29.76); FILE MERGED
2006/02/03 08:44:02 os 1.29.76.1: #128121# crash in SvxRuler::TabMenuSelect fixed
Diffstat (limited to 'svx/source/dialog/svxruler.cxx')
-rw-r--r--svx/source/dialog/svxruler.cxx23
1 files changed, 13 insertions, 10 deletions
diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx
index 6d14a5bbe928..b2fbf0bc2634 100644
--- a/svx/source/dialog/svxruler.cxx
+++ b/svx/source/dialog/svxruler.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: svxruler.cxx,v $
*
- * $Revision: 1.29 $
+ * $Revision: 1.30 $
*
- * last change: $Author: kz $ $Date: 2006-01-05 14:54:00 $
+ * last change: $Author: rt $ $Date: 2006-02-06 16:14:10 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -3632,14 +3632,17 @@ IMPL_LINK( SvxRuler, TabMenuSelect, Menu *, pMenu )
*/
{
- SvxTabStop aTabStop = (*pTabStopItem)[pRuler_Imp->nIdx];
- aTabStop.GetAdjustment() = ToAttrTab_Impl(pMenu->GetCurItemId()-1);
- pTabStopItem->Remove(pRuler_Imp->nIdx);
- pTabStopItem->Insert(aTabStop);
- USHORT nTabStopId = bHorz ? SID_ATTR_TABSTOP : SID_ATTR_TABSTOP_VERTICAL;
- pBindings->GetDispatcher()->Execute( nTabStopId, SFX_CALLMODE_RECORD, pTabStopItem, 0L );
- UpdateTabs();
- pRuler_Imp->nIdx = 0;
+ if(pTabStopItem && pTabStopItem->Count() > pRuler_Imp->nIdx)
+ {
+ SvxTabStop aTabStop = (*pTabStopItem)[pRuler_Imp->nIdx];
+ aTabStop.GetAdjustment() = ToAttrTab_Impl(pMenu->GetCurItemId()-1);
+ pTabStopItem->Remove(pRuler_Imp->nIdx);
+ pTabStopItem->Insert(aTabStop);
+ USHORT nTabStopId = bHorz ? SID_ATTR_TABSTOP : SID_ATTR_TABSTOP_VERTICAL;
+ pBindings->GetDispatcher()->Execute( nTabStopId, SFX_CALLMODE_RECORD, pTabStopItem, 0L );
+ UpdateTabs();
+ pRuler_Imp->nIdx = 0;
+ }
return 0;
}