Lines 60-65
Link Here
|
60 |
#include "swfntcch.hxx" // SwFontAccess |
60 |
#include "swfntcch.hxx" // SwFontAccess |
61 |
#include "flyfrm.hxx" |
61 |
#include "flyfrm.hxx" |
62 |
|
62 |
|
|
|
63 |
#include <com/sun/star/i18n/ScriptType.hdl> |
64 |
#include <com/sun/star/i18n/CharacterIteratorMode.hpp> |
65 |
#include "breakit.hxx" |
66 |
|
63 |
#if OSL_DEBUG_LEVEL > 1 |
67 |
#if OSL_DEBUG_LEVEL > 1 |
64 |
#include "txtpaint.hxx" |
68 |
#include "txtpaint.hxx" |
65 |
#endif |
69 |
#endif |
Lines 289-295
Link Here
|
289 |
nMaxY = pFrm->SwitchVerticalToHorizontal( nMaxY ); |
293 |
nMaxY = pFrm->SwitchVerticalToHorizontal( nMaxY ); |
290 |
|
294 |
|
291 |
sal_Bool bGoOn = sal_True; |
295 |
sal_Bool bGoOn = sal_True; |
292 |
xub_StrLen nOffset = rPos.nContent.GetIndex(); |
296 |
xub_StrLen nOffset = rPos.nContent.GetIndex(); |
|
|
297 |
|
298 |
// #i74188 Ensure that the cursor is not drawn inside a combined char |
299 |
const SwTxtNode* pTxtNd = ((const SwTxtFrm*)this)->GetTxtNode(); |
300 |
if( pTxtNd && ::com::sun::star::i18n::ScriptType::COMPLEX == |
301 |
pBreakIt->GetBreakIter()->getScriptType( pTxtNd->GetTxt(), nOffset ) ) |
302 |
{ |
303 |
sal_Int32 nCount = 1; |
304 |
const ::com::sun::star::lang::Locale &rLocale = |
305 |
pBreakIt->GetLocale( pTxtNd->GetLang( nOffset ) ); |
306 |
xub_StrLen nRight = (xub_StrLen)pBreakIt->GetBreakIter()->nextCharacters( |
307 |
pTxtNd->GetTxt(), nOffset, rLocale, |
308 |
::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL, |
309 |
nCount, nCount ); |
310 |
|
311 |
xub_StrLen nLeft = (xub_StrLen)pBreakIt->GetBreakIter()->previousCharacters( |
312 |
pTxtNd->GetTxt(), nRight, rLocale, |
313 |
::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL, |
314 |
nCount, nCount ); |
315 |
|
316 |
if ( ( nLeft != nOffset ) && ( nRight != nOffset ) ) |
317 |
{ |
318 |
nOffset = ( Abs( nRight - nOffset ) < Abs( nLeft - nOffset ) ) ? |
319 |
nRight : nLeft; |
320 |
} |
321 |
} |
322 |
|
293 |
xub_StrLen nNextOfst; |
323 |
xub_StrLen nNextOfst; |
294 |
|
324 |
|
295 |
do |
325 |
do |