summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorThomas Lange [tl] <tl@openoffice.org>2010-04-27 10:25:20 +0200
committerThomas Lange [tl] <tl@openoffice.org>2010-04-27 10:25:20 +0200
commit0b53c49463bbceebe4ea13d4aa9d78db6a2cab8f (patch)
tree2ea86ac80ce4c4313fa2b895199d024b6d77c8d5 /editeng
parent3317eae28d0cc511a54e27e6033eb4ce6ae8689e (diff)
cws tl80: #i74188# fix for cursor positioning when removing indic characters
Diffstat (limited to 'editeng')
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/impedit2.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index bbdfa47e6a57..8f0ad2bc15d4 100644..100755
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -4198,7 +4198,18 @@ long ImpEditEngine::GetXPos( ParaPortion* pParaPortion, EditLine* pLine, USHORT
DBG_ERROR("svx::ImpEditEngine::GetXPos(), index out of range!");
}
+#if 0
long nPosInPortion = pLine->GetCharPosArray().GetObject( nPos );
+#else
+ // #i74188# (positioning the cursor after deleting components of combined indic characters)
+ SvxFont aTmpFont( pParaPortion->GetNode()->GetCharAttribs().GetDefFont() );
+ SeekCursor( pParaPortion->GetNode(), nPos+1, aTmpFont );
+ aTmpFont.SetPhysFont( GetRefDevice() );
+ ImplInitDigitMode( GetRefDevice(), 0, 0, 0, aTmpFont.GetLanguage() );
+ String sSegment(*pParaPortion->GetNode(), pLine->GetStart(), nPos+1);
+ long nPosInPortion = aTmpFont.QuickGetTextSize( GetRefDevice(),
+ sSegment, 0, nPos+1, NULL ).Width();
+#endif
if ( !pPortion->IsRightToLeft() )
{