summaryrefslogtreecommitdiffstats
path: root/svx/source/editeng/impedit2.cxx
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2003-12-17 13:19:47 +0000
committerVladimir Glazounov <vg@openoffice.org>2003-12-17 13:19:47 +0000
commit1526fdf013d8dd6b5b4de9df8c384e21673fbbc1 (patch)
tree0548674eeb39b3a0207532fec3e3af0c54c3b796 /svx/source/editeng/impedit2.cxx
parentINTEGRATION: CWS geordi2q11 (1.40.224); FILE MERGED (diff)
downloadcore-1526fdf013d8dd6b5b4de9df8c384e21673fbbc1.tar.gz
core-1526fdf013d8dd6b5b4de9df8c384e21673fbbc1.zip
INTEGRATION: CWS geordi2q11 (1.91.52); FILE MERGED
2003/12/15 15:50:24 hr 1.91.52.1: #111934#: join CWS editeng7pp2
Diffstat (limited to 'svx/source/editeng/impedit2.cxx')
-rw-r--r--svx/source/editeng/impedit2.cxx18
1 files changed, 14 insertions, 4 deletions
diff --git a/svx/source/editeng/impedit2.cxx b/svx/source/editeng/impedit2.cxx
index c4cd7361365d..a812b65256f4 100644
--- a/svx/source/editeng/impedit2.cxx
+++ b/svx/source/editeng/impedit2.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: impedit2.cxx,v $
*
- * $Revision: 1.91 $
+ * $Revision: 1.92 $
*
- * last change: $Author: hr $ $Date: 2003-11-07 15:07:15 $
+ * last change: $Author: vg $ $Date: 2003-12-17 14:19:47 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1540,7 +1540,7 @@ EditSelection ImpEditEngine::SelectWord( const EditSelection& rCurSel, sal_Int16
i18n::Boundary aBoundary = xBI->getWordBoundary( *aPaM.GetNode(), aPaM.GetIndex(), GetLocale( aPaM ), nWordType, sal_True );
// don't select when curser at end of word
if ( ( aBoundary.endPos > aPaM.GetIndex() ) &&
- ( bAcceptStartOfWord || ( aBoundary.startPos < aPaM.GetIndex() ) ) )
+ ( ( aBoundary.startPos < aPaM.GetIndex() ) || ( bAcceptStartOfWord && ( aBoundary.startPos == aPaM.GetIndex() ) ) ) )
{
aNewSel.Min().SetIndex( (USHORT)aBoundary.startPos );
aNewSel.Max().SetIndex( (USHORT)aBoundary.endPos );
@@ -1597,7 +1597,8 @@ void ImpEditEngine::InitScriptTypes( USHORT nPara )
}
}
}
- pField = pNode->GetCharAttribs().FindNextAttrib( EE_FEATURE_FIELD, pField->GetEnd() );
+ // #112831# Last Field might go from 0xffff to 0x0000
+ pField = pField->GetEnd() ? pNode->GetCharAttribs().FindNextAttrib( EE_FEATURE_FIELD, pField->GetEnd() ) : NULL;
}
::rtl::OUString aOUText( aText );
@@ -2523,6 +2524,9 @@ EditPaM ImpEditEngine::ImpInsertFeature( EditSelection aCurSel, const SfxPoolIte
else
aPaM = aCurSel.Max();
+ if ( aPaM.GetIndex() >= 0xfffe )
+ return aPaM;
+
#ifndef SVX_LIGHT
if ( IsUndoEnabled() && !IsInUndo() )
InsertUndo( new EditUndoInsertFeature( this, CreateEPaM( aPaM ), rItem ) );
@@ -2551,6 +2555,12 @@ EditPaM ImpEditEngine::ImpInsertParaBreak( const EditSelection& rCurSel, BOOL bK
EditPaM ImpEditEngine::ImpInsertParaBreak( const EditPaM& rPaM, BOOL bKeepEndingAttribs )
{
+ if ( aEditDoc.Count() >= 0xFFFE )
+ {
+ DBG_ERROR( "Can't process more than 64K paragraphs!" );
+ return rPaM;
+ }
+
#ifndef SVX_LIGHT
if ( IsUndoEnabled() && !IsInUndo() )
InsertUndo( new EditUndoSplitPara( this, aEditDoc.GetPos( rPaM.GetNode() ), rPaM.GetIndex() ) );