diff options
Diffstat (limited to 'sw/source/ui/utlui/navipi.cxx')
-rw-r--r-- | sw/source/ui/utlui/navipi.cxx | 201 |
1 files changed, 106 insertions, 95 deletions
diff --git a/sw/source/ui/utlui/navipi.cxx b/sw/source/ui/utlui/navipi.cxx index 4908f69f66..eac367ce43 100644 --- a/sw/source/ui/utlui/navipi.cxx +++ b/sw/source/ui/utlui/navipi.cxx @@ -63,6 +63,8 @@ #include <navipi.hrc> #include <utlui.hrc> +#include "access.hrc" + #include <unomid.h> #define PAGE_CHANGE_TIMEOUT 1000 //Timeout fuer Seitenwechsel @@ -92,7 +94,7 @@ SFX_IMPL_CHILDWINDOW_CONTEXT( SwNavigationChild, SID_NAVIGATOR, SwView ) void SwNavigationPI::CleanEntry( String& rEntry ) { - USHORT i = rEntry.Len(); + sal_uInt16 i = rEntry.Len(); if( i ) for( sal_Unicode* pStr = rEntry.GetBufferAccess(); i; --i, ++pStr ) if( *pStr == 10 || *pStr == 9 ) @@ -103,8 +105,8 @@ void SwNavigationPI::CleanEntry( String& rEntry ) mit und ohne Childs ------------------------------------------------------------------------*/ -void SwNavigationPI::MoveOutline(USHORT nSource, USHORT nTarget, - BOOL bWithChilds) +void SwNavigationPI::MoveOutline(sal_uInt16 nSource, sal_uInt16 nTarget, + sal_Bool bWithChilds) { SwView *pView = GetCreateView(); SwWrtShell &rSh = pView->GetWrtShell(); @@ -116,9 +118,9 @@ void SwNavigationPI::MoveOutline(USHORT nSource, USHORT nTarget, short nMove = nTarget-nSource; //( nDir<0 ) ? 1 : 0 ; rSh.GotoOutline(nSource); if (bWithChilds) - rSh.MakeOutlineSel(nSource, nSource, TRUE); + rSh.MakeOutlineSel(nSource, nSource, sal_True); // Die selektierten Children zaehlen bei der Bewegung vorwaerts nicht mit - USHORT nLastOutlinePos = rSh.GetOutlinePos(MAXLEVEL); + sal_uInt16 nLastOutlinePos = rSh.GetOutlinePos(MAXLEVEL); if(bWithChilds && nMove > 1 && nLastOutlinePos < nTarget) { @@ -190,7 +192,7 @@ void SwNavigationPI::FillBox() if(pContentWrtShell) { aContentTree.SetHiddenShell( pContentWrtShell ); - aContentTree.Display( FALSE ); + aContentTree.Display( sal_False ); } else { @@ -205,7 +207,7 @@ void SwNavigationPI::FillBox() aContentTree.SetActiveShell(pWrtShell); } else - aContentTree.Display( TRUE ); + aContentTree.Display( sal_True ); pActContView = pView; } } @@ -221,8 +223,8 @@ void SwNavigationPI::UsePage(SwWrtShell *pSh) } if (pSh) { - const USHORT nPageCnt = pSh->GetPageCnt(); - USHORT nPhyPage, nVirPage; + const sal_uInt16 nPageCnt = pSh->GetPageCnt(); + sal_uInt16 nPhyPage, nVirPage; pSh->GetPageNum(nPhyPage, nVirPage); GetPageEdit().SetMax(nPageCnt); @@ -238,7 +240,7 @@ void SwNavigationPI::UsePage(SwWrtShell *pSh) IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox ) { - const USHORT nCurrItemId = pBox->GetCurItemId(); + const sal_uInt16 nCurrItemId = pBox->GetCurItemId(); SwView *pView = GetCreateView(); if (!pView) return 1; @@ -247,9 +249,9 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox ) //Standard: Unterebenen werden mitgenommen // mit Ctrl Unterebenen nicht mitnehmen - BOOL bOutlineWithChilds = ( KEY_MOD1 != pBox->GetModifier()); + sal_Bool bOutlineWithChilds = ( KEY_MOD1 != pBox->GetModifier()); int nFuncId = 0; - BOOL bFocusToDoc = FALSE; + sal_Bool bFocusToDoc = sal_False; switch (nCurrItemId) { case FN_UP: @@ -278,13 +280,13 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox ) _ZoomIn(); } } - return TRUE; + return sal_True; // Funktionen, die eine direkte Aktion ausloesen case FN_SELECT_FOOTER: { rSh.MoveCrsr(); - const USHORT eType = rSh.GetFrmType(0,FALSE); + const sal_uInt16 eType = rSh.GetFrmType(0,sal_False); if (eType & FRMTYPE_FOOTER) { if (rSh.EndPg()) @@ -292,13 +294,13 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox ) } else if (rSh.GotoFooterTxt()) nFuncId = FN_TO_FOOTER; - bFocusToDoc = TRUE; + bFocusToDoc = sal_True; } break; case FN_SELECT_HEADER: { rSh.MoveCrsr(); - const USHORT eType = rSh.GetFrmType(0,FALSE); + const sal_uInt16 eType = rSh.GetFrmType(0,sal_False); if (eType & FRMTYPE_HEADER) { if (rSh.SttPg()) @@ -306,13 +308,13 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox ) } else if (rSh.GotoHeaderTxt()) nFuncId = FN_TO_HEADER; - bFocusToDoc = TRUE; + bFocusToDoc = sal_True; } break; case FN_SELECT_FOOTNOTE: { rSh.MoveCrsr(); - const USHORT eFrmType = rSh.GetFrmType(0,FALSE); + const sal_uInt16 eFrmType = rSh.GetFrmType(0,sal_False); // aus Fussnote zum Anker springen if (eFrmType & FRMTYPE_FOOTNOTE) { @@ -331,7 +333,7 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox ) else if (rSh.GotoPrevFtnAnchor()) nFuncId = FN_PREV_FOOTNOTE; } - bFocusToDoc = TRUE; + bFocusToDoc = sal_True; } break; @@ -358,7 +360,7 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox ) break; case FN_GLOBAL_SAVE_CONTENT: { - BOOL bSave = rSh.IsGlblDocSaveLinks(); + sal_Bool bSave = rSh.IsGlblDocSaveLinks(); rSh.SetGlblDocSaveLinks( !bSave ); pBox->CheckItem(FN_GLOBAL_SAVE_CONTENT, !bSave ); } @@ -371,7 +373,7 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox ) } if(bFocusToDoc) pView->GetEditWin().GrabFocus(); - return TRUE; + return sal_True; } /*------------------------------------------------------------------------ Beschreibung: ClickHandler der Toolboxen @@ -380,7 +382,7 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox ) IMPL_LINK( SwNavigationPI, ToolBoxClickHdl, ToolBox *, pBox ) { - const USHORT nCurrItemId = pBox->GetCurItemId(); + const sal_uInt16 nCurrItemId = pBox->GetCurItemId(); switch (nCurrItemId) { case FN_GLOBAL_UPDATE: @@ -391,36 +393,41 @@ IMPL_LINK( SwNavigationPI, ToolBoxClickHdl, ToolBox *, pBox ) break; } - return TRUE; + return sal_True; } IMPL_LINK( SwNavigationPI, ToolBoxDropdownClickHdl, ToolBox*, pBox ) { - const USHORT nCurrItemId = pBox->GetCurItemId(); + const sal_uInt16 nCurrItemId = pBox->GetCurItemId(); switch (nCurrItemId) { case FN_CREATE_NAVIGATION: { - CreateNavigationTool(pBox->GetItemRect(FN_CREATE_NAVIGATION), TRUE); + CreateNavigationTool(pBox->GetItemRect(FN_CREATE_NAVIGATION), sal_True); } break; case FN_DROP_REGION: { + static const char* aHIDs[] = + { + HID_NAVI_DRAG_HYP, + HID_NAVI_DRAG_LINK, + HID_NAVI_DRAG_COPY, + }; PopupMenu *pMenu = new PopupMenu; - for (USHORT i = 0; i <= REGION_MODE_EMBEDDED; i++) + for (sal_uInt16 i = 0; i <= REGION_MODE_EMBEDDED; i++) { pMenu->InsertItem( i + 1, aContextArr[i] ); - pMenu->SetHelpId(i + 1, HID_NAVI_DRAG_HYP + i); - + pMenu->SetHelpId(i + 1, aHIDs[i]); } pMenu->CheckItem( nRegionMode + 1 ); pMenu->SetSelectHdl(LINK(this, SwNavigationPI, MenuSelectHdl)); - pBox->SetItemDown( nCurrItemId, TRUE ); + pBox->SetItemDown( nCurrItemId, sal_True ); pMenu->Execute( pBox, pBox->GetItemRect(FN_DROP_REGION), POPUPMENU_EXECUTE_DOWN ); - pBox->SetItemDown( nCurrItemId, FALSE ); + pBox->SetItemDown( nCurrItemId, sal_False ); pBox->EndSelection(); delete pMenu; pBox->Invalidate(); @@ -429,25 +436,25 @@ IMPL_LINK( SwNavigationPI, ToolBoxDropdownClickHdl, ToolBox*, pBox ) case FN_OUTLINE_LEVEL: { PopupMenu *pMenu = new PopupMenu; - for (USHORT i = 101; i <= 100 + MAXLEVEL; i++) + for (sal_uInt16 i = 101; i <= 100 + MAXLEVEL; i++) { pMenu->InsertItem( i, String::CreateFromInt32(i - 100) ); pMenu->SetHelpId( i, HID_NAVI_OUTLINES ); } pMenu->CheckItem( aContentTree.GetOutlineLevel() + 100 ); pMenu->SetSelectHdl(LINK(this, SwNavigationPI, MenuSelectHdl)); - pBox->SetItemDown( nCurrItemId, TRUE ); + pBox->SetItemDown( nCurrItemId, sal_True ); pMenu->Execute( pBox, pBox->GetItemRect(FN_OUTLINE_LEVEL), POPUPMENU_EXECUTE_DOWN ); - pBox->SetItemDown( nCurrItemId, FALSE ); + pBox->SetItemDown( nCurrItemId, sal_False ); delete pMenu; pBox->EndSelection(); pBox->Invalidate(); } break; } - return TRUE; + return sal_True; } @@ -460,13 +467,13 @@ void SwNavHelpToolBox::MouseButtonDown(const MouseEvent &rEvt) if(rEvt.GetButtons() == MOUSE_LEFT && FN_CREATE_NAVIGATION == GetItemId(rEvt.GetPosPixel())) { - ((SwNavigationPI*)GetParent())->CreateNavigationTool(GetItemRect(FN_CREATE_NAVIGATION), FALSE); + ((SwNavigationPI*)GetParent())->CreateNavigationTool(GetItemRect(FN_CREATE_NAVIGATION), sal_False); } else SwHelpToolBox::MouseButtonDown(rEvt); } -void SwNavigationPI::CreateNavigationTool(const Rectangle& rRect, BOOL bSetFocus) +void SwNavigationPI::CreateNavigationTool(const Rectangle& rRect, sal_Bool bSetFocus) { Reference< XFrame > xFrame = GetCreateView()->GetViewFrame()->GetFrame().GetFrameInterface(); SwScrollNaviPopup* pPopup = new @@ -488,7 +495,7 @@ void SwNavigationPI::CreateNavigationTool(const Rectangle& rRect, BOOL bSetFocus void SwNavHelpToolBox::RequestHelp( const HelpEvent& rHEvt ) { - USHORT nItemId = GetItemId(ScreenToOutputPixel(rHEvt.GetMousePosPixel())); + sal_uInt16 nItemId = GetItemId(ScreenToOutputPixel(rHEvt.GetMousePosPixel())); if( FN_UP == nItemId || FN_DOWN == nItemId ) { SetItemText(nItemId, SwScrollNaviPopup::GetQuickHelpText((FN_DOWN == nItemId))); @@ -509,7 +516,7 @@ IMPL_LINK( SwNavigationPI, EditAction, NumEditAction *, pEdit ) { if(aPageChgTimer.IsActive()) aPageChgTimer.Stop(); - pCreateView->GetWrtShell().GotoPage((USHORT)pEdit->GetValue(), TRUE); + pCreateView->GetWrtShell().GotoPage((sal_uInt16)pEdit->GetValue(), sal_True); pCreateView->GetEditWin().GrabFocus(); pCreateView->GetViewFrame()->GetBindings().Invalidate(FN_STAT_PAGE); } @@ -529,18 +536,18 @@ IMPL_LINK( SwNavigationPI, EditGetFocus, NumEditAction *, pEdit ) return 0; SwWrtShell &rSh = pView->GetWrtShell(); - const USHORT nPageCnt = rSh.GetPageCnt(); + const sal_uInt16 nPageCnt = rSh.GetPageCnt(); pEdit->SetMax(nPageCnt); pEdit->SetLast(nPageCnt); return 0; } -BOOL SwNavigationPI::Close() +sal_Bool SwNavigationPI::Close() { SfxViewFrame* pVFrame = pCreateView->GetViewFrame(); pVFrame->GetBindings().Invalidate(SID_NAVIGATOR); pVFrame->GetDispatcher()->Execute(SID_NAVIGATOR); - return TRUE; + return sal_True; } /*------------------------------------------------------------------------ @@ -592,7 +599,7 @@ void SwNavigationPI::_ZoomOut() if (_IsZoomedIn()) { FloatingWindow* pFloat = pContextWin->GetFloatingWindow(); - bIsZoomedIn = FALSE; + bIsZoomedIn = sal_False; Size aSz(GetOutputSizePixel()); aSz.Height() = nZoomOut; Size aMinOutSizePixel = ((SfxDockingWindow*)GetParent())->GetMinOutputSizePixel(); @@ -611,8 +618,8 @@ void SwNavigationPI::_ZoomOut() } SvLBoxEntry* pFirst = aContentTree.FirstSelected(); if(pFirst) - aContentTree.Select(pFirst, TRUE); // toolbox enablen - pConfig->SetSmall( FALSE ); + aContentTree.Select(pFirst, sal_True); // toolbox enablen + pConfig->SetSmall( sal_False ); aContentToolBox.CheckItem(FN_SHOW_CONTENT_BOX); } } @@ -626,7 +633,7 @@ void SwNavigationPI::_ZoomIn() aContentTree.HideTree(); aDocListBox.Hide(); aGlobalTree.HideTree(); - bIsZoomedIn = TRUE; + bIsZoomedIn = sal_True; Size aSz(GetOutputSizePixel()); if( aSz.Height() > nZoomIn ) nZoomOut = ( short ) aSz.Height(); @@ -638,9 +645,9 @@ void SwNavigationPI::_ZoomIn() pFloat->SetOutputSizePixel(aSz); SvLBoxEntry* pFirst = aContentTree.FirstSelected(); if(pFirst) - aContentTree.Select(pFirst, TRUE); // toolbox enablen - pConfig->SetSmall( TRUE ); - aContentToolBox.CheckItem(FN_SHOW_CONTENT_BOX, FALSE); + aContentTree.Select(pFirst, sal_True); // toolbox enablen + pConfig->SetSmall( sal_True ); + aContentToolBox.CheckItem(FN_SHOW_CONTENT_BOX, sal_False); } } @@ -723,10 +730,10 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings, nAutoMarkIdx(1), nRegionMode(REGION_MODE_NONE), - bSmallMode(FALSE), - bIsZoomedIn(FALSE), - bPageCtrlsVisible(FALSE), - bGlobalMode(FALSE) + bSmallMode(sal_False), + bIsZoomedIn(sal_False), + bPageCtrlsVisible(sal_False), + bGlobalMode(sal_False) { GetCreateView(); InitImageList(); @@ -744,14 +751,14 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings, pEdit->SetActionHdl(LINK(this, SwNavigationPI, EditAction)); pEdit->SetGetFocusHdl(LINK(this, SwNavigationPI, EditGetFocus)); pEdit->SetModifyHdl(LINK(this, SwNavigationPI, PageEditModifyHdl)); - - bPageCtrlsVisible = TRUE; + pEdit->SetAccessibleName(pEdit->GetQuickHelpText()); + bPageCtrlsVisible = sal_True; //doppelte Separatoren sind nicht erlaubt, also muss //die passende Groesse anders ermittelt werden Rectangle aFirstRect = aContentToolBox.GetItemRect(FN_SELECT_FOOTNOTE); Rectangle aSecondRect = aContentToolBox.GetItemRect(FN_SELECT_HEADER); - USHORT nWidth = USHORT(aFirstRect.Left() - aSecondRect.Left()); + sal_uInt16 nWidth = sal_uInt16(aFirstRect.Left() - aSecondRect.Left()); Size aItemWinSize( nWidth , aFirstRect.Bottom() - aFirstRect.Top() ); pEdit->SetSizePixel(aItemWinSize); @@ -761,7 +768,7 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings, aContentToolBox.SetHelpId(FN_PAGENUMBER, HID_NAVI_TBX16); aContentToolBox.ShowItem( FN_PAGENUMBER ); - for( USHORT i = 0; i <= REGION_MODE_EMBEDDED; i++ ) + for( sal_uInt16 i = 0; i <= REGION_MODE_EMBEDDED; i++ ) { aContextArr[i] = SW_RESSTR(ST_HYPERLINK + i); aStatusArr[i] = SW_RESSTR(ST_STATUS_FIRST + i); @@ -802,21 +809,21 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings, ((SfxDockingWindow*)pParent)->SetOutputSizePixel(aMinSize); aContentTree.SetPosSizePixel( 0, nListboxYPos, 0, 0, WINDOW_POSSIZE_Y ); - aContentTree.SetWindowBits( WB_HASBUTTONS|WB_HASBUTTONSATROOT| + aContentTree.SetStyle( aContentTree.GetStyle()|WB_HASBUTTONS|WB_HASBUTTONSATROOT| WB_CLIPCHILDREN|WB_HSCROLL|WB_FORCE_MAKEVISIBLE ); aContentTree.SetSpaceBetweenEntries(3); aContentTree.SetSelectionMode( SINGLE_SELECTION ); aContentTree.SetDragDropMode( SV_DRAGDROP_CTRL_MOVE | SV_DRAGDROP_CTRL_COPY | SV_DRAGDROP_ENABLE_TOP ); - aContentTree.EnableAsyncDrag(TRUE); + aContentTree.EnableAsyncDrag(sal_True); aContentTree.ShowTree(); - aContentToolBox.CheckItem(FN_SHOW_CONTENT_BOX, TRUE); + aContentToolBox.CheckItem(FN_SHOW_CONTENT_BOX, sal_True); // TreeListBox fuer Globaldokument aGlobalTree.SetPosSizePixel( 0, nListboxYPos, 0, 0, WINDOW_POSSIZE_Y ); aGlobalTree.SetSelectionMode( MULTIPLE_SELECTION ); - aGlobalTree.SetWindowBits( WB_HASBUTTONS|WB_HASBUTTONSATROOT| + aGlobalTree.SetStyle( aGlobalTree.GetStyle()|WB_HASBUTTONS|WB_HASBUTTONSATROOT| WB_CLIPCHILDREN|WB_HSCROLL ); Size aGlblSize(aGlobalToolBox.CalcWindowSizePixel()); aGlobalToolBox.SetSizePixel(aGlblSize); @@ -832,7 +839,7 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings, aContentToolBox.SetDropdownClickHdl( LINK(this, SwNavigationPI, ToolBoxDropdownClickHdl) ); aGlobalToolBox.SetClickHdl( LINK(this, SwNavigationPI, ToolBoxClickHdl) ); aGlobalToolBox.SetDropdownClickHdl( LINK(this, SwNavigationPI, ToolBoxDropdownClickHdl) ); - aGlobalToolBox.CheckItem(FN_GLOBAL_SWITCH, TRUE); + aGlobalToolBox.CheckItem(FN_GLOBAL_SWITCH, sal_True); Font aFont(GetFont()); aFont.SetWeight(WEIGHT_NORMAL); @@ -867,6 +874,10 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings, UsePage(0); aPageChgTimer.SetTimeoutHdl(LINK(this, SwNavigationPI, ChangePageHdl)); aPageChgTimer.SetTimeout(PAGE_CHANGE_TIMEOUT); + + aContentTree.SetAccessibleName(SW_RESSTR(STR_ACCESS_TL_CONTENT)); + aGlobalTree.SetAccessibleName(SW_RESSTR(STR_ACCESS_TL_GLOBAL)); + aDocListBox.SetAccessibleName(aStatusArr[3]); } SwNavigationPI::~SwNavigationPI() @@ -876,7 +887,7 @@ SwNavigationPI::~SwNavigationPI() SwView *pView = GetCreateView(); SwWrtShell &rSh = pView->GetWrtShell(); if( !rSh.IsAllProtect() ) - pView->GetDocShell()->SetReadOnlyUI(FALSE); + pView->GetDocShell()->SetReadOnlyUI(sal_False); } EndListening(*SFX_APP()); @@ -936,7 +947,7 @@ IMPL_LINK( SwNavigationPI, ClosePopupWindow, SfxPopupWindow *, pWindow ) return 1; } -void SwNavigationPI::StateChanged( USHORT nSID, SfxItemState /*eState*/, +void SwNavigationPI::StateChanged( sal_uInt16 nSID, SfxItemState /*eState*/, const SfxPoolItem* /*pState*/ ) { if(nSID == SID_DOCFULLNAME) @@ -946,7 +957,7 @@ void SwNavigationPI::StateChanged( USHORT nSID, SfxItemState /*eState*/, { SwWrtShell* pWrtShell = pActView->GetWrtShellPtr(); aContentTree.SetActiveShell(pWrtShell); - BOOL bGlobal = IsGlobalDoc(); + sal_Bool bGlobal = IsGlobalDoc(); aContentToolBox.EnableItem(FN_GLOBAL_SWITCH, bGlobal); if( (!bGlobal && IsGlobalMode()) || (!IsGlobalMode() && pConfig->IsGlobalActive()) ) @@ -1046,7 +1057,7 @@ void SwNavigationPI::Notify( SfxBroadcaster& rBrdc, const SfxHint& rHint ) aContentTree.SetActiveShell(pWrtShell); if(aGlobalTree.IsVisible()) { - if(aGlobalTree.Update( FALSE )) + if(aGlobalTree.Update( sal_False )) aGlobalTree.Display(); else // wenn kein Update notwendig, dann zumindest painten @@ -1061,27 +1072,27 @@ void SwNavigationPI::Notify( SfxBroadcaster& rBrdc, const SfxHint& rHint ) IMPL_LINK( SwNavigationPI, MenuSelectHdl, Menu *, pMenu ) { - USHORT nMenuId = pMenu->GetCurItemId(); + sal_uInt16 nMenuId = pMenu->GetCurItemId(); if(nMenuId != USHRT_MAX) { if(nMenuId < 100) SetRegionDropMode( --nMenuId); else - aContentTree.SetOutlineLevel( static_cast< BYTE >(nMenuId - 100) ); + aContentTree.SetOutlineLevel( static_cast< sal_uInt8 >(nMenuId - 100) ); } return 0; } void SwNavigationPI::UpdateListBox() { - aDocListBox.SetUpdateMode(FALSE); + aDocListBox.SetUpdateMode(sal_False); aDocListBox.Clear(); SwView *pActView = GetCreateView(); - BOOL bDisable = pActView == 0; + sal_Bool bDisable = pActView == 0; SwView *pView = SwModule::GetFirstView(); - USHORT nCount = 0; - USHORT nAct = 0; - USHORT nConstPos = 0; + sal_uInt16 nCount = 0; + sal_uInt16 nAct = 0; + sal_uInt16 nConstPos = 0; const SwView* pConstView = aContentTree.IsConstantView() && aContentTree.GetActiveWrtShell() ? &aContentTree.GetActiveWrtShell()->GetView(): @@ -1123,12 +1134,12 @@ void SwNavigationPI::UpdateListBox() sEntry += aStatusArr[ST_HIDDEN - ST_STATUS_FIRST]; sEntry += ')'; aDocListBox.InsertEntry(sEntry); - bDisable = FALSE; + bDisable = sal_False; } if(aContentTree.IsActiveView()) { //entweder den Namen des akt. Docs oder "Aktives Dokument" - USHORT nTmp = pActView ? nAct : --nCount; + sal_uInt16 nTmp = pActView ? nAct : --nCount; aDocListBox.SelectEntryPos( nTmp ); } else if(aContentTree.IsHiddenView()) @@ -1139,7 +1150,7 @@ void SwNavigationPI::UpdateListBox() aDocListBox.SelectEntryPos(nConstPos); aDocListBox.Enable( !bDisable ); - aDocListBox.SetUpdateMode(TRUE); + aDocListBox.SetUpdateMode(sal_True); } IMPL_LINK(SwNavigationPI, DoneLink, SfxPoolItem *, pItem) @@ -1168,7 +1179,7 @@ IMPL_LINK(SwNavigationPI, DoneLink, SfxPoolItem *, pItem) String SwNavigationPI::CreateDropFileName( TransferableDataHelper& rData ) { String sFileName; - ULONG nFmt; + sal_uLong nFmt; if( rData.HasFormat( nFmt = FORMAT_FILE_LIST )) { FileList aFileList; @@ -1249,12 +1260,12 @@ sal_Int8 SwNavigationPI::ExecuteDrop( const ExecuteDropEvent& rEvt ) return nRet; } -void SwNavigationPI::SetRegionDropMode(USHORT nNewMode) +void SwNavigationPI::SetRegionDropMode(sal_uInt16 nNewMode) { nRegionMode = nNewMode; pConfig->SetRegionMode( nRegionMode ); - USHORT nDropId = FN_DROP_REGION; + sal_uInt16 nDropId = FN_DROP_REGION; if(nRegionMode == REGION_MODE_LINK) nDropId = FN_DROP_REGION_LINK; else if(nRegionMode == REGION_MODE_EMBEDDED) @@ -1266,13 +1277,13 @@ void SwNavigationPI::SetRegionDropMode(USHORT nNewMode) } -BOOL SwNavigationPI::ToggleTree() +sal_Bool SwNavigationPI::ToggleTree() { - BOOL bRet = TRUE; - BOOL bGlobalDoc = IsGlobalDoc(); + sal_Bool bRet = sal_True; + sal_Bool bGlobalDoc = IsGlobalDoc(); if(!IsGlobalMode() && bGlobalDoc) { - SetUpdateMode(FALSE); + SetUpdateMode(sal_False); if(_IsZoomedIn()) _ZoomOut(); aGlobalTree.ShowTree(); @@ -1280,8 +1291,8 @@ BOOL SwNavigationPI::ToggleTree() aContentTree.HideTree(); aContentToolBox.Hide(); aDocListBox.Hide(); - SetGlobalMode(TRUE); - SetUpdateMode(TRUE); + SetGlobalMode(sal_True); + SetUpdateMode(sal_True); } else { @@ -1293,15 +1304,15 @@ BOOL SwNavigationPI::ToggleTree() aContentToolBox.Show(); aDocListBox.Show(); } - bRet = FALSE; - SetGlobalMode(FALSE); + bRet = sal_False; + SetGlobalMode(sal_False); } return bRet; } -BOOL SwNavigationPI::IsGlobalDoc() const +sal_Bool SwNavigationPI::IsGlobalDoc() const { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; SwView *pView = GetCreateView(); if(pView) { @@ -1346,7 +1357,7 @@ SwView* SwNavigationPI::GetCreateView() const } SwNavigationChild::SwNavigationChild( Window* pParent, - USHORT nId, + sal_uInt16 nId, SfxBindings* _pBindings, SfxChildWinInfo* pInfo ) : SfxChildWindowContext( nId ) @@ -1358,14 +1369,14 @@ SwNavigationChild::SwNavigationChild( Window* pParent, SwNavigationConfig* pNaviConfig = SW_MOD()->GetNavigationConfig(); - USHORT nRootType = static_cast< USHORT >( pNaviConfig->GetRootType() ); + sal_uInt16 nRootType = static_cast< sal_uInt16 >( pNaviConfig->GetRootType() ); if( nRootType < CONTENT_TYPE_MAX ) { pNavi->aContentTree.SetRootType(nRootType); - pNavi->aContentToolBox.CheckItem(FN_SHOW_ROOT, TRUE); + pNavi->aContentToolBox.CheckItem(FN_SHOW_ROOT, sal_True); } - pNavi->aContentTree.SetOutlineLevel( static_cast< BYTE >( pNaviConfig->GetOutlineLevel() ) ); - pNavi->SetRegionDropMode( static_cast< USHORT >( pNaviConfig->GetRegionMode() ) ); + pNavi->aContentTree.SetOutlineLevel( static_cast< sal_uInt8 >( pNaviConfig->GetOutlineLevel() ) ); + pNavi->SetRegionDropMode( static_cast< sal_uInt16 >( pNaviConfig->GetRegionMode() ) ); if(GetFloatingWindow() && pNaviConfig->IsSmall()) { @@ -1389,7 +1400,7 @@ void SwNavigationPI::DataChanged( const DataChangedEvent& rDCEvt ) void SwNavigationPI::InitImageList() { - USHORT k; + sal_uInt16 k; ImageList& rImgLst = aContentImageList; for( k = 0; k < aContentToolBox.GetItemCount(); k++) @@ -1400,7 +1411,7 @@ void SwNavigationPI::InitImageList() aGlobalToolBox.SetItemImage(aGlobalToolBox.GetItemId(k), rImgLst.GetImage(aGlobalToolBox.GetItemId(k))); - USHORT nDropId = FN_DROP_REGION; + sal_uInt16 nDropId = FN_DROP_REGION; if(nRegionMode == REGION_MODE_LINK) nDropId = FN_DROP_REGION_LINK; else if(nRegionMode == REGION_MODE_EMBEDDED) |