/[pkgs]/devel/openoffice.org/openoffice.org-2.2.0.ooo74188.sw.cursorinsideglyph.patch
ViewVC logotype

Contents of /devel/openoffice.org/openoffice.org-2.2.0.ooo74188.sw.cursorinsideglyph.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download) (as text)
Sun Oct 11 11:52:10 2009 UTC (6 weeks, 3 days ago) by caolanm
Branch: MAIN
CVS Tags: openoffice_org-3_2_0-5_2_fc13, openoffice_org-3_2_0-2_5_fc13, openoffice_org-3_2_0-2_4_fc13, openoffice_org-3_2_0-1_2_fc13, openoffice_org-3_2_0-4_1_fc13, openoffice_org-3_2_0-2_3_fc13, openoffice_org-3_2_0-3_1_fc13, openoffice_org-3_2_0-3_2_fc13, openoffice_org-3_2_0-1_1_fc13, openoffice_org-3_2_0-3_4_fc13, openoffice_org-3_2_0-2_2_fc13, openoffice_org-3_2_0-2_1_fc13, openoffice_org-3_2_0-4_2_fc13, openoffice_org-3_2_0-5_1_fc13, HEAD
Changes since 1.2: +5 -5 lines
File MIME type: text/x-patch
fix openoffice.org-2.2.0.ooo74188.sw.cursorinsideglyph.patch
1 Index: source/core/text/frmcrsr.cxx
2 ===================================================================
3 RCS file: /cvs/sw/sw/source/core/text/frmcrsr.cxx,v
4 retrieving revision 1.42
5 diff -u -r1.42 frmcrsr.cxx
6 --- openoffice.org.orig/sw/source/core/text/frmcrsr.cxx 16 Sep 2006 21:33:39 -0000 1.42
7 +++ openoffice.org/sw/source/core/text/frmcrsr.cxx 5 Feb 2007 13:42:51 -0000
8 @@ -60,6 +60,10 @@
9 #include "swfntcch.hxx" // SwFontAccess
10 #include "flyfrm.hxx"
11
12 +#include <com/sun/star/i18n/ScriptType.hdl>
13 +#include <com/sun/star/i18n/CharacterIteratorMode.hpp>
14 +#include "breakit.hxx"
15 +
16 #if OSL_DEBUG_LEVEL > 1
17 #include "txtpaint.hxx"
18 #endif
19 @@ -289,7 +293,33 @@
20 nMaxY = pFrm->SwitchVerticalToHorizontal( nMaxY );
21
22 sal_Bool bGoOn = sal_True;
23 - xub_StrLen nOffset = rPos.nContent.GetIndex();
24 + xub_StrLen nOffset = rPos.nContent.GetIndex();
25 +
26 + // #i74188 Ensure that the cursor is not drawn inside a combined char
27 + const SwTxtNode* pTxtNd = ((const SwTxtFrm*)this)->GetTxtNode();
28 + if( pTxtNd && ::com::sun::star::i18n::ScriptType::COMPLEX ==
29 + pBreakIt->GetBreakIter()->getScriptType( pTxtNd->GetTxt(), nOffset ) )
30 + {
31 + sal_Int32 nCount = 1;
32 + const ::com::sun::star::lang::Locale &rLocale =
33 + pBreakIt->GetLocale( pTxtNd->GetLang( nOffset ) );
34 + xub_StrLen nRight = (xub_StrLen)pBreakIt->GetBreakIter()->nextCharacters(
35 + pTxtNd->GetTxt(), nOffset, rLocale,
36 + ::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL,
37 + nCount, nCount );
38 +
39 + xub_StrLen nLeft = (xub_StrLen)pBreakIt->GetBreakIter()->previousCharacters(
40 + pTxtNd->GetTxt(), nRight, rLocale,
41 + ::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL,
42 + nCount, nCount );
43 +
44 + if ( ( nLeft != nOffset ) && ( nRight != nOffset ) )
45 + {
46 + nOffset = ( Abs( nRight - nOffset ) < Abs( nLeft - nOffset ) ) ?
47 + nRight : nLeft;
48 + }
49 + }
50 +
51 xub_StrLen nNextOfst;
52
53 do

admin@fedoraproject.org
ViewVC Help
Powered by ViewVC 1.1.2