diff options
Diffstat (limited to 'sd/source/ui/notes/EditWindow.cxx')
-rwxr-xr-x | sd/source/ui/notes/EditWindow.cxx | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/sd/source/ui/notes/EditWindow.cxx b/sd/source/ui/notes/EditWindow.cxx index 54e3589bc87e..8883a319c4bf 100755 --- a/sd/source/ui/notes/EditWindow.cxx +++ b/sd/source/ui/notes/EditWindow.cxx @@ -113,7 +113,7 @@ EditWindow::~EditWindow (void) void SmGetLeftSelectionPart(const ESelection aSel, - USHORT &nPara, USHORT &nPos) + sal_uInt16 &nPara, sal_uInt16 &nPos) // returns paragraph number and position of the selections left part { // compare start and end of selection and use the one that comes first @@ -157,10 +157,10 @@ EditEngine* EditWindow::CreateEditEngine (void) SvtLinguConfig().GetOptions( aOpt ); // struct FontDta { - INT16 nFallbackLang; - INT16 nLang; - USHORT nFontType; - USHORT nFontInfoId; + sal_Int16 nFallbackLang; + sal_Int16 nLang; + sal_uInt16 nFontType; + sal_uInt16 nFontInfoId; } aTable[3] = { // info to get western font to be used @@ -207,8 +207,8 @@ EditEngine* EditWindow::CreateEditEngine (void) pEditEngine = new EditEngine (mpEditEngineItemPool); - pEditEngine->EnableUndo (TRUE); - pEditEngine->SetDefTab (USHORT( + pEditEngine->EnableUndo (sal_True); + pEditEngine->SetDefTab (sal_uInt16( Application::GetDefaultDevice()->GetTextWidth( UniString::CreateFromAscii("XXXX")))); @@ -249,9 +249,9 @@ void EditWindow::DataChanged (const DataChangedEvent&) //! see also SmDocShell::GetEditEngine() ! //! - // pEditEngine->SetDefTab( USHORT( GetTextWidth( C2S("XXXX") ) ) ); + // pEditEngine->SetDefTab( sal_uInt16( GetTextWidth( C2S("XXXX") ) ) ); - USHORT aFntInfoId[3] = { + sal_uInt16 aFntInfoId[3] = { EE_CHAR_FONTINFO, EE_CHAR_FONTINFO_CJK, EE_CHAR_FONTINFO_CTL }; for (int i = 0; i < 3; ++i) { @@ -402,7 +402,7 @@ void EditWindow::KeyInput(const KeyEvent& ) { /* if (rKEvt.GetKeyCode().GetCode() == KEY_ESCAPE) { - BOOL bCallBase = TRUE; + sal_Bool bCallBase = sal_True; SfxViewShell* pViewShell = SfxViewShell::Current(); if ( pViewShell && pViewShell->ISA(SmViewShell) ) { @@ -410,8 +410,8 @@ void EditWindow::KeyInput(const KeyEvent& ) if (pDocSh) { // fuert zum (sofortigen) Zerstoeren von this! - pDocSh->DoInPlaceActivate( FALSE ); - bCallBase = FALSE; + pDocSh->DoInPlaceActivate( sal_False ); + bCallBase = sal_False; } } if ( bCallBase ) @@ -503,7 +503,7 @@ void EditWindow::CreateEditView (void) mpEditView->SetSelection(eSelection); Update(); - mpEditView->ShowCursor(TRUE, TRUE); + mpEditView->ShowCursor(sal_True, sal_True); pEditEngine->SetStatusEventHdl( LINK(this, EditWindow, EditStatusHdl)); @@ -673,16 +673,16 @@ void EditWindow::LoseFocus() } -BOOL EditWindow::IsAllSelected() const +sal_Bool EditWindow::IsAllSelected() const { - BOOL bRes = FALSE; + sal_Bool bRes = sal_False; EditEngine *pEditEngine = ((EditWindow *) this)->GetEditEngine(); DBG_ASSERT( mpEditView, "NULL pointer" ); DBG_ASSERT( pEditEngine, "NULL pointer" ); if (pEditEngine && mpEditView) { ESelection eSelection( mpEditView->GetSelection() ); - INT32 nParaCnt = pEditEngine->GetParagraphCount(); + sal_Int32 nParaCnt = pEditEngine->GetParagraphCount(); if (!(nParaCnt - 1)) { String Text( pEditEngine->GetText( LINEEND_LF ) ); @@ -715,7 +715,7 @@ void EditWindow::MarkError(const Point &rPos) const int Col = rPos.X(); const int Row = rPos.Y() - 1; - mpEditView->SetSelection(ESelection ( (USHORT)Row, (USHORT)(Col - 1), (USHORT)Row, (USHORT)Col)); + mpEditView->SetSelection(ESelection ( (sal_uInt16)Row, (sal_uInt16)(Col - 1), (sal_uInt16)Row, (sal_uInt16)Col)); GrabFocus(); } } @@ -728,10 +728,10 @@ void EditWindow::SelNextMark() if (pEditEngine && mpEditView) { ESelection eSelection = mpEditView->GetSelection(); - USHORT Pos = eSelection.nEndPos; + sal_uInt16 Pos = eSelection.nEndPos; String aMark (UniString::CreateFromAscii("<?>")); String aText; - USHORT nCounts = pEditEngine->GetParagraphCount(); + sal_uInt16 nCounts = pEditEngine->GetParagraphCount(); while (eSelection.nEndPara < nCounts) { @@ -758,15 +758,15 @@ void EditWindow::SelPrevMark() if (pEditEngine && mpEditView) { ESelection eSelection = mpEditView->GetSelection(); - USHORT Pos = STRING_NOTFOUND; + sal_uInt16 Pos = STRING_NOTFOUND; xub_StrLen Max = eSelection.nStartPos; String Text( pEditEngine->GetText( eSelection.nStartPara ) ); String aMark (UniString::CreateFromAscii("<?>")); - USHORT nCounts = pEditEngine->GetParagraphCount(); + sal_uInt16 nCounts = pEditEngine->GetParagraphCount(); do { - USHORT Fnd = Text.Search(aMark, 0); + sal_uInt16 Fnd = Text.Search(aMark, 0); while ((Fnd < Max) && (Fnd != STRING_NOTFOUND)) { @@ -791,7 +791,7 @@ void EditWindow::SelPrevMark() } } -BOOL EditWindow::HasMark(const String& rText) const +sal_Bool EditWindow::HasMark(const String& rText) const // returns true iff 'rText' contains a mark { return rText.SearchAscii("<?>", 0) != STRING_NOTFOUND; @@ -831,15 +831,15 @@ void EditWindow::SetSelection(const ESelection &rSel) mpEditView->SetSelection(rSel); } -BOOL EditWindow::IsEmpty() const +sal_Bool EditWindow::IsEmpty() const { EditEngine *pEditEngine = ((EditWindow *) this)->GetEditEngine(); - return (pEditEngine && (pEditEngine->GetTextLen() == 0)) ? TRUE : FALSE; + return (pEditEngine && (pEditEngine->GetTextLen() == 0)) ? sal_True : sal_False; } -BOOL EditWindow::IsSelected() const +sal_Bool EditWindow::IsSelected() const { - return mpEditView ? mpEditView->HasSelection() : FALSE; + return mpEditView ? mpEditView->HasSelection() : sal_False; } void EditWindow::Cut() |