diff options
Diffstat (limited to 'sw/source/core/doc/extinput.cxx')
-rw-r--r-- | sw/source/core/doc/extinput.cxx | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/sw/source/core/doc/extinput.cxx b/sw/source/core/doc/extinput.cxx index f627870932f9..93d177aed548 100644 --- a/sw/source/core/doc/extinput.cxx +++ b/sw/source/core/doc/extinput.cxx @@ -28,19 +28,23 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" +#include <com/sun/star/i18n/ScriptType.hpp> + +#include <editeng/langitem.hxx> +#include <editeng/scripttypeitem.hxx> -#include <hintids.hxx> #include <vcl/keycodes.hxx> #include <vcl/cmdevt.hxx> + +#include <hintids.hxx> #include <extinput.hxx> #include <doc.hxx> +#include <IDocumentUndoRedo.hxx> #include <index.hxx> #include <ndtxt.hxx> #include <txtfrm.hxx> #include <swundo.hxx> -#include <editeng/langitem.hxx> -#include <editeng/scripttypeitem.hxx> -#include <com/sun/star/i18n/ScriptType.hpp> + using namespace ::com::sun::star; @@ -48,8 +52,8 @@ SwExtTextInput::SwExtTextInput( const SwPaM& rPam, Ring* pRing ) : SwPaM( *rPam.GetPoint(), (SwPaM*)pRing ), eInputLanguage(LANGUAGE_DONTKNOW) { - bIsOverwriteCursor = FALSE; - bInsText = TRUE; + bIsOverwriteCursor = sal_False; + bInsText = sal_True; } SwExtTextInput::~SwExtTextInput() @@ -78,7 +82,7 @@ SwExtTextInput::~SwExtTextInput() // for CJK/CTL scripts. bool bLang = true; // <-- - USHORT nWhich = RES_CHRATR_LANGUAGE; + sal_uInt16 nWhich = RES_CHRATR_LANGUAGE; switch(GetI18NScriptTypeOfLanguage(eInputLanguage)) { case i18n::ScriptType::ASIAN: nWhich = RES_CHRATR_CJK_LANGUAGE; break; @@ -106,12 +110,14 @@ SwExtTextInput::~SwExtTextInput() if( bInsText ) { rIdx = nSttCnt; - pDoc->StartUndo( UNDO_OVERWRITE, NULL ); + pDoc->GetIDocumentUndoRedo().StartUndo( + UNDO_OVERWRITE, NULL ); pDoc->Overwrite( *this, sTxt.Copy( 0, sOverwriteText.Len() )); pDoc->InsertString( *this, sTxt.Copy( sOverwriteText.Len() ) ); - pDoc->EndUndo( UNDO_OVERWRITE, NULL ); + pDoc->GetIDocumentUndoRedo().EndUndo( + UNDO_OVERWRITE, NULL ); } } else @@ -205,7 +211,7 @@ void SwExtTextInput::SetInputData( const CommandExtTextInputData& rData ) } } -void SwExtTextInput::SetOverwriteCursor( BOOL bFlag ) +void SwExtTextInput::SetOverwriteCursor( sal_Bool bFlag ) { bIsOverwriteCursor = bFlag; @@ -258,17 +264,17 @@ SwExtTextInput* SwDoc::GetExtTextInput( const SwNode& rNd, SwExtTextInput* pRet = 0; if( pExtInputRing ) { - ULONG nNdIdx = rNd.GetIndex(); + sal_uLong nNdIdx = rNd.GetIndex(); SwExtTextInput* pTmp = (SwExtTextInput*)pExtInputRing; do { - ULONG nPt = pTmp->GetPoint()->nNode.GetIndex(), + sal_uLong nPt = pTmp->GetPoint()->nNode.GetIndex(), nMk = pTmp->GetMark()->nNode.GetIndex(); xub_StrLen nPtCnt = pTmp->GetPoint()->nContent.GetIndex(), nMkCnt = pTmp->GetMark()->nContent.GetIndex(); if( nPt < nMk || ( nPt == nMk && nPtCnt < nMkCnt )) { - ULONG nTmp = nMk; nMk = nPt; nPt = nTmp; + sal_uLong nTmp = nMk; nMk = nPt; nPt = nTmp; nTmp = nMkCnt; nMkCnt = nPtCnt; nPtCnt = (xub_StrLen)nTmp; } |