summaryrefslogtreecommitdiff
path: root/sw/source/ui/utlui
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/utlui')
-rw-r--r--sw/source/ui/utlui/attrdesc.cxx38
-rw-r--r--sw/source/ui/utlui/bookctrl.cxx18
-rw-r--r--sw/source/ui/utlui/condedit.cxx2
-rw-r--r--sw/source/ui/utlui/content.cxx62
-rw-r--r--sw/source/ui/utlui/glbltree.cxx230
-rw-r--r--sw/source/ui/utlui/gloslst.cxx76
-rw-r--r--sw/source/ui/utlui/initui.cxx18
-rw-r--r--sw/source/ui/utlui/makefile.mk79
-rw-r--r--sw/source/ui/utlui/navicfg.cxx4
-rw-r--r--sw/source/ui/utlui/navipi.cxx182
-rw-r--r--sw/source/ui/utlui/numfmtlb.cxx80
-rw-r--r--sw/source/ui/utlui/prcntfld.cxx10
-rw-r--r--sw/source/ui/utlui/shdwcrsr.cxx10
-rw-r--r--sw/source/ui/utlui/textcontrolcombo.cxx6
-rw-r--r--sw/source/ui/utlui/tmplctrl.cxx14
-rw-r--r--sw/source/ui/utlui/uiitems.cxx24
-rw-r--r--sw/source/ui/utlui/uitool.cxx104
-rw-r--r--sw/source/ui/utlui/unotools.cxx8
-rw-r--r--sw/source/ui/utlui/viewlayoutctrl.cxx14
-rw-r--r--sw/source/ui/utlui/zoomctrl.cxx6
20 files changed, 445 insertions, 540 deletions
diff --git a/sw/source/ui/utlui/attrdesc.cxx b/sw/source/ui/utlui/attrdesc.cxx
index 418ea4a4559b..1b4dcc90f82d 100644
--- a/sw/source/ui/utlui/attrdesc.cxx
+++ b/sw/source/ui/utlui/attrdesc.cxx
@@ -88,7 +88,7 @@ static sal_Char __READONLY_DATA sKomma[] = ", ";
SfxItemIter aIter( *this );
const IntlWrapper rInt( ::comphelper::getProcessServiceFactory(),
GetAppLanguage() );
- while( TRUE )
+ while( sal_True )
{
aIter.GetCurItem()->GetPresentation( ePres, eCoreMetric,
ePresMetric, aStr,
@@ -284,7 +284,7 @@ SfxItemPresentation SwRegisterItem::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId = GetValue() ? STR_REGISTER_ON : STR_REGISTER_OFF;
+ sal_uInt16 nId = GetValue() ? STR_REGISTER_ON : STR_REGISTER_OFF;
rText = SW_RESSTR( nId );
return ePres;
}
@@ -347,7 +347,7 @@ SfxItemPresentation SwParaConnectBorderItem::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId = GetValue() ? STR_CONNECT_BORDER_ON : STR_CONNECT_BORDER_OFF;
+ sal_uInt16 nId = GetValue() ? STR_CONNECT_BORDER_ON : STR_CONNECT_BORDER_OFF;
rText = SW_RESSTR( nId );
return ePres;
}
@@ -398,7 +398,7 @@ SfxItemPresentation SwFmtFrmSize::GetPresentation
{
rText += ',';
rText += ' ';
- const USHORT nId = ATT_FIX_SIZE == eFrmHeightType ?
+ const sal_uInt16 nId = ATT_FIX_SIZE == eFrmHeightType ?
STR_FRM_FIXEDHEIGHT : STR_FRM_MINHEIGHT;
rText += SW_RESSTR( nId );
rText += ' ';
@@ -441,7 +441,7 @@ SfxItemPresentation SwFmtHeader::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- const USHORT nId = GetHeaderFmt() ? STR_HEADER : STR_NO_HEADER;
+ const sal_uInt16 nId = GetHeaderFmt() ? STR_HEADER : STR_NO_HEADER;
rText = SW_RESSTR( nId );
return ePres;
}
@@ -471,7 +471,7 @@ SfxItemPresentation SwFmtFooter::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- const USHORT nId = GetFooterFmt() ? STR_FOOTER : STR_NO_FOOTER;
+ const sal_uInt16 nId = GetFooterFmt() ? STR_FOOTER : STR_NO_FOOTER;
rText = SW_RESSTR( nId );
return ePres;
}
@@ -498,7 +498,7 @@ SfxItemPresentation SwFmtSurround::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
switch ( (SwSurround)GetValue() )
{
case SURROUND_NONE:
@@ -558,7 +558,7 @@ SfxItemPresentation SwFmtVertOrient::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
switch ( GetVertOrient() )
{
case text::VertOrientation::NONE:
@@ -619,7 +619,7 @@ SfxItemPresentation SwFmtHoriOrient::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
switch ( GetHoriOrient() )
{
case text::HoriOrientation::NONE:
@@ -679,7 +679,7 @@ SfxItemPresentation SwFmtAnchor::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
switch ( GetAnchorId() )
{
case FLY_AT_PARA:
@@ -752,7 +752,7 @@ SfxItemPresentation SwFmtCol::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nCnt = GetNumCols();
+ sal_uInt16 nCnt = GetNumCols();
if ( nCnt > 1 )
{
rText = String::CreateFromInt32(nCnt);
@@ -760,7 +760,7 @@ SfxItemPresentation SwFmtCol::GetPresentation
rText += SW_RESSTR( STR_COLUMNS );
if ( COLADJ_NONE != GetLineAdj() )
{
- USHORT nWdth = USHORT(GetLineWidth());
+ sal_uInt16 nWdth = sal_uInt16(GetLineWidth());
rText += ' ';
rText += SW_RESSTR( STR_LINE_WIDTH );
rText += ' ';
@@ -923,7 +923,7 @@ SfxItemPresentation SwFmtFtnEndAtTxtEnd::GetPresentation
// String sPrefix;
// String sSuffix;
// SvxNumberType aFmt;
-// USHORT nOffset;
+// sal_uInt16 nOffset;
// rText +=
}
break;
@@ -1026,7 +1026,7 @@ SfxItemPresentation SwTextGridItem::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
switch ( GetGridType() )
{
@@ -1092,7 +1092,7 @@ SfxItemPresentation SwMirrorGrf::GetPresentation(
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId;
+ sal_uInt16 nId;
switch( GetValue() )
{
case RES_MIRROR_GRAPH_DONT: nId = STR_NO_MIRROR; break;
@@ -1197,7 +1197,7 @@ SfxItemPresentation SwChannelGrf::GetPresentation(
case SFX_ITEM_PRESENTATION_COMPLETE:
if( SFX_ITEM_PRESENTATION_COMPLETE == ePres )
{
- USHORT nId;
+ sal_uInt16 nId;
switch ( Which() )
{
case RES_GRFATR_CHANNELR: nId = STR_CHANNELR; break;
@@ -1257,7 +1257,7 @@ SfxItemPresentation SwInvertGrf::GetPresentation(
case SFX_ITEM_PRESENTATION_COMPLETE:
if( SFX_ITEM_PRESENTATION_COMPLETE == ePres )
{
- USHORT nId = 0 != GetValue() ? STR_INVERT : STR_INVERT_NOT;
+ sal_uInt16 nId = 0 != GetValue() ? STR_INVERT : STR_INVERT_NOT;
rText = SW_RESSTR( nId );
}
break;
@@ -1303,7 +1303,7 @@ SfxItemPresentation SwDrawModeGrf::GetPresentation(
case SFX_ITEM_PRESENTATION_COMPLETE:
if( SFX_ITEM_PRESENTATION_COMPLETE == ePres )
{
- USHORT nId;
+ sal_uInt16 nId;
switch ( GetValue() )
{
@@ -1336,7 +1336,7 @@ SfxItemPresentation SwFmtFollowTextFlow::GetPresentation( SfxItemPresentation eP
break;
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId = GetValue() ? STR_FOLLOW_TEXT_FLOW : STR_DONT_FOLLOW_TEXT_FLOW;
+ sal_uInt16 nId = GetValue() ? STR_FOLLOW_TEXT_FLOW : STR_DONT_FOLLOW_TEXT_FLOW;
rText = SW_RESSTR( nId );
}
break;
diff --git a/sw/source/ui/utlui/bookctrl.cxx b/sw/source/ui/utlui/bookctrl.cxx
index 3b2567673020..5b112f84ba0d 100644
--- a/sw/source/ui/utlui/bookctrl.cxx
+++ b/sw/source/ui/utlui/bookctrl.cxx
@@ -63,10 +63,10 @@ class BookmarkPopup_Impl : public PopupMenu
public:
BookmarkPopup_Impl();
- USHORT GetCurId() const { return nCurId; }
+ sal_uInt16 GetCurId() const { return nCurId; }
private:
- USHORT nCurId;
+ sal_uInt16 nCurId;
virtual void Select();
};
@@ -88,8 +88,8 @@ void BookmarkPopup_Impl::Select()
// class SvxZoomStatusBarControl ------------------------------------------
-SwBookmarkControl::SwBookmarkControl( USHORT _nSlotId,
- USHORT _nId,
+SwBookmarkControl::SwBookmarkControl( sal_uInt16 _nSlotId,
+ sal_uInt16 _nId,
StatusBar& rStb ) :
SfxStatusBarControl( _nSlotId, _nId, rStb )
{
@@ -104,7 +104,7 @@ SwBookmarkControl::~SwBookmarkControl()
// -----------------------------------------------------------------------
void SwBookmarkControl::StateChanged(
- USHORT /*nSID*/, SfxItemState eState, const SfxPoolItem* pState )
+ sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState )
{
if( eState != SFX_ITEM_AVAILABLE || pState->ISA( SfxVoidItem ) )
GetStatusBar().SetItemText( GetId(), String() );
@@ -136,8 +136,8 @@ void SwBookmarkControl::Command( const CommandEvent& rCEvt )
{
IDocumentMarkAccess* const pMarkAccess = pWrtShell->getIDocumentMarkAccess();
IDocumentMarkAccess::const_iterator_t ppBookmarkStart = pMarkAccess->getBookmarksBegin();
- USHORT nPopupId = 1;
- ::std::map<sal_Int32, USHORT> aBookmarkIdx;
+ sal_uInt16 nPopupId = 1;
+ ::std::map<sal_Int32, sal_uInt16> aBookmarkIdx;
for(IDocumentMarkAccess::const_iterator_t ppBookmark = ppBookmarkStart;
ppBookmark != pMarkAccess->getBookmarksEnd();
ppBookmark++)
@@ -145,12 +145,12 @@ void SwBookmarkControl::Command( const CommandEvent& rCEvt )
if(IDocumentMarkAccess::BOOKMARK == IDocumentMarkAccess::GetType(**ppBookmark))
{
aPop.InsertItem( nPopupId, ppBookmark->get()->GetName() );
- aBookmarkIdx[nPopupId] = static_cast<USHORT>(ppBookmark - ppBookmarkStart);
+ aBookmarkIdx[nPopupId] = static_cast<sal_uInt16>(ppBookmark - ppBookmarkStart);
nPopupId++;
}
}
aPop.Execute( &GetStatusBar(), rCEvt.GetMousePosPixel());
- USHORT nCurrId = aPop.GetCurId();
+ sal_uInt16 nCurrId = aPop.GetCurId();
if( nCurrId != USHRT_MAX)
{
SfxUInt16Item aBookmark( FN_STAT_BOOKMARK, aBookmarkIdx[nCurrId] );
diff --git a/sw/source/ui/utlui/condedit.cxx b/sw/source/ui/utlui/condedit.cxx
index b534b538ca54..ed2379dae8b1 100644
--- a/sw/source/ui/utlui/condedit.cxx
+++ b/sw/source/ui/utlui/condedit.cxx
@@ -51,7 +51,7 @@ using namespace ::com::sun::star::uno;
ConditionEdit::ConditionEdit( Window* pParent, const ResId& rResId )
: Edit( pParent, rResId ),
DropTargetHelper( this ),
- bBrackets( TRUE ), bEnableDrop( TRUE )
+ bBrackets( sal_True ), bEnableDrop( sal_True )
{
}
diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx
index 38ecb34051e5..62ceb3860fe6 100644
--- a/sw/source/ui/utlui/content.cxx
+++ b/sw/source/ui/utlui/content.cxx
@@ -36,9 +36,7 @@
#include <tools/urlobj.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/dispatch.hxx>
-#ifndef _HELP_HXX
#include <vcl/help.hxx>
-#endif
#include <sot/formats.hxx>
#include <vcl/sound.hxx>
#include <uiitems.hxx>
@@ -47,13 +45,9 @@
#include <fmtfld.hxx>
#include <swmodule.hxx>
#include <wrtsh.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <errhdl.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <content.hxx>
#include <frmfmt.hxx>
#include <fldbas.hxx>
@@ -69,24 +63,12 @@
#include <doc.hxx>
#include <unotools.hxx>
#include <crsskip.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
-#ifndef _NAVIPI_HRC
#include <navipi.hrc>
-#endif
-#ifndef _UTLUI_HRC
#include <utlui.hrc>
-#endif
-#ifndef _MISC_HRC
#include <misc.hrc>
-#endif
-#ifndef _COMCORE_HRC
#include <comcore.hrc>
-#endif
#include <com/sun/star/text/XTextSectionsSupplier.hpp>
#include <com/sun/star/text/XTextGraphicObjectsSupplier.hpp>
#include <com/sun/star/text/XTextTablesSupplier.hpp>
@@ -102,7 +84,9 @@
#include <svx/svdview.hxx>
#include <vcl/scrbar.hxx>
#include <comcore.hrc>
-#include <undobj.hxx>
+#include <SwRewriter.hxx>
+#include <hints.hxx>
+#include <numrule.hxx>
#include <swundo.hxx>
#include <ndtxt.hxx>
#include <PostItMgr.hxx>
@@ -303,7 +287,7 @@ void SwContentType::Init(sal_Bool* pbInvalidateWindow)
case CONTENT_TYPE_BOOKMARK:
{
IDocumentMarkAccess* const pMarkAccess = pWrtShell->getIDocumentMarkAccess();
- nMemberCount = static_cast<USHORT>(count_if(
+ nMemberCount = static_cast<sal_uInt16>(count_if(
pMarkAccess->getBookmarksBegin(),
pMarkAccess->getBookmarksEnd(),
&lcl_IsUiVisibleBookmark));
@@ -336,7 +320,7 @@ void SwContentType::Init(sal_Bool* pbInvalidateWindow)
{
const String& rSectionName =
pFmt->GetSection()->GetSectionName();
- BYTE nLevel = 0;
+ sal_uInt8 nLevel = 0;
SwSectionFmt* pParentFmt = pFmt->GetParent();
while(pParentFmt)
{
@@ -699,7 +683,7 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged)
{
String sSectionName = pFmt->GetSection()->GetSectionName();
- BYTE nLevel = 0;
+ sal_uInt8 nLevel = 0;
SwSectionFmt* pParentFmt = pFmt->GetParent();
while(pParentFmt)
{
@@ -873,7 +857,7 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged)
pMember->Insert(pCnt);
nMemberCount++;
if(nOldMemberCount > (int)i &&
- (pOldMember->GetObject((USHORT)i))->IsInvisible() != pCnt->IsInvisible())
+ (pOldMember->GetObject((sal_uInt16)i))->IsInvisible() != pCnt->IsInvisible())
*pbLevelOrVisibiblityChanged = sal_True;
}
}
@@ -1352,7 +1336,7 @@ void SwContentTree::Display( sal_Bool bActive )
{
if(!bIsImageListInitialized)
{
- USHORT nResId = GetSettings().GetStyleSettings().GetHighContrastMode() ? IMG_NAVI_ENTRYBMPH : IMG_NAVI_ENTRYBMP;
+ sal_uInt16 nResId = GetSettings().GetStyleSettings().GetHighContrastMode() ? IMG_NAVI_ENTRYBMPH : IMG_NAVI_ENTRYBMP;
aEntryImages = ImageList(SW_RES(nResId));
bIsImageListInitialized = sal_True;
}
@@ -2071,7 +2055,7 @@ void SwContentTree::ExecCommand(sal_uInt16 nCmd, sal_Bool bModifier)
SvLBoxEntry* pFirstEntry = FirstSelected();
if (pFirstEntry && lcl_IsContent(pFirstEntry))
{
- if(bIsRoot && nRootType == CONTENT_TYPE_OUTLINE ||
+ if((bIsRoot && nRootType == CONTENT_TYPE_OUTLINE) ||
((SwContent*)pFirstEntry->GetUserData())->GetParent()->GetType()
== CONTENT_TYPE_OUTLINE)
{
@@ -2089,8 +2073,8 @@ void SwContentTree::ExecCommand(sal_uInt16 nCmd, sal_Bool bModifier)
if( nMove )
{
short nDir = nCmd == FN_ITEM_UP ? -1 : 1;
- if( !bModifier && (nDir == -1 && nActPos > 0 ||
- nDir == 1 && nActPos < GetEntryCount() - 2 ) )
+ if( !bModifier && ((nDir == -1 && nActPos > 0) ||
+ (nDir == 1 && nActPos < GetEntryCount() - 2 )) )
{
pShell->MoveOutlinePara( nDir );
//Cursor wieder an die aktuelle Position setzen
@@ -2304,7 +2288,7 @@ DragDropMode SwContentTree::NotifyStartDrag(
sal_Bool SwContentTree::NotifyMoving( SvLBoxEntry* pTarget,
- SvLBoxEntry* pEntry, SvLBoxEntry*& , ULONG& )
+ SvLBoxEntry* pEntry, SvLBoxEntry*& , sal_uLong& )
{
if(!bDocChgdInDragging)
{
@@ -2344,7 +2328,7 @@ sal_Bool SwContentTree::NotifyMoving( SvLBoxEntry* pTarget,
sal_Bool SwContentTree::NotifyCopying( SvLBoxEntry* pTarget,
- SvLBoxEntry* pEntry, SvLBoxEntry*& , ULONG& )
+ SvLBoxEntry* pEntry, SvLBoxEntry*& , sal_uLong& )
{
if(!bDocChgdInDragging)
{
@@ -2476,7 +2460,7 @@ void SwContentTree::KeyInput(const KeyEvent& rEvent)
!pActiveShell->GetView().GetDocShell()->IsReadOnly())
{
EditEntry(pEntry, EDIT_MODE_DELETE);
- bViewHasChanged = TRUE;
+ bViewHasChanged = sal_True;
GetParentWindow()->UpdateListBox();
TimerUpdate(&aUpdTimer);
GrabFocus();
@@ -2494,7 +2478,7 @@ void SwContentTree::KeyInput(const KeyEvent& rEvent)
void SwContentTree::RequestHelp( const HelpEvent& rHEvt )
{
- BOOL bCallBase = TRUE;
+ sal_Bool bCallBase = sal_True;
if( rHEvt.GetMode() & HELPMODE_QUICK )
{
Point aPos( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ));
@@ -2593,13 +2577,13 @@ void SwContentTree::RequestHelp( const HelpEvent& rHEvt )
else
Help::ShowQuickHelp( this, aItemRect, sEntry,
QUICKHELP_LEFT|QUICKHELP_VCENTER );
- bCallBase = FALSE;
+ bCallBase = sal_False;
}
}
else
{
Help::ShowQuickHelp( this, Rectangle(), aEmptyStr, 0 );
- bCallBase = FALSE;
+ bCallBase = sal_False;
}
}
}
@@ -2612,7 +2596,7 @@ void SwContentTree::RequestHelp( const HelpEvent& rHEvt )
***************************************************************************/
-void SwContentTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
+void SwContentTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry )
{
SvLBoxEntry* pFirst = FirstSelected();
switch( nSelectedPopupEntry )
@@ -2762,8 +2746,8 @@ sal_Bool SwContentTree::Select( SvLBoxEntry* pEntry, sal_Bool bSelect )
sal_Bool bEnable = sal_False;
SvLBoxEntry* pParentEntry = GetParent(pEntry);
if(!bIsLastReadOnly && (!IsVisible() ||
- (bIsRoot && nRootType == CONTENT_TYPE_OUTLINE && pParentEntry ||
- lcl_IsContent(pEntry) && ((SwContentType*)pParentEntry->GetUserData())->GetType() == CONTENT_TYPE_OUTLINE)))
+ ((bIsRoot && nRootType == CONTENT_TYPE_OUTLINE && pParentEntry) ||
+ (lcl_IsContent(pEntry) && ((SwContentType*)pParentEntry->GetUserData())->GetType() == CONTENT_TYPE_OUTLINE))))
bEnable = sal_True;
SwNavigationPI* pNavi = GetParentWindow();
pNavi->aContentToolBox.EnableItem(FN_ITEM_UP , bEnable);
@@ -2834,7 +2818,7 @@ void SwContentTree::EditEntry(SvLBoxEntry* pEntry, sal_uInt8 nMode)
pActiveShell->StartUndo(UNDO_DELETE, &aRewriter);
pActiveShell->GetView().GetViewFrame()->GetDispatcher()->Execute(FN_TABLE_SELECT_ALL);
pActiveShell->DeleteRow();
- pActiveShell->EndUndo(UNDO_DELETE);
+ pActiveShell->EndUndo();
pActiveShell->EndAction();
}
else if(nMode == EDIT_MODE_RENAME)
@@ -3193,7 +3177,7 @@ sal_Bool NaviContentBookmark::Paste( TransferableDataHelper& rData )
xub_StrLen nPos = 0;
aUrl = sStr.GetToken(0, NAVI_BOOKMARK_DELIM, nPos );
aDescr = sStr.GetToken(0, NAVI_BOOKMARK_DELIM, nPos );
- nDefDrag= (USHORT)sStr.GetToken(0, NAVI_BOOKMARK_DELIM, nPos ).ToInt32();
+ nDefDrag= (sal_uInt16)sStr.GetToken(0, NAVI_BOOKMARK_DELIM, nPos ).ToInt32();
nDocSh = sStr.GetToken(0, NAVI_BOOKMARK_DELIM, nPos ).ToInt32();
}
return bRet;
@@ -3255,7 +3239,7 @@ void SwContentTree::DataChanged( const DataChangedEvent& rDCEvt )
if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE) )
{
- USHORT nResId = GetSettings().GetStyleSettings().GetHighContrastMode() ? IMG_NAVI_ENTRYBMPH : IMG_NAVI_ENTRYBMP;
+ sal_uInt16 nResId = GetSettings().GetStyleSettings().GetHighContrastMode() ? IMG_NAVI_ENTRYBMPH : IMG_NAVI_ENTRYBMP;
aEntryImages = ImageList(SW_RES(nResId));
FindActiveTypeAndRemoveUserData();
Display(sal_True);
diff --git a/sw/source/ui/utlui/glbltree.cxx b/sw/source/ui/utlui/glbltree.cxx
index d8849b48e10f..2b7efb0037b5 100644
--- a/sw/source/ui/utlui/glbltree.cxx
+++ b/sw/source/ui/utlui/glbltree.cxx
@@ -153,17 +153,17 @@ static const char* __FAR_DATA aHelpForMenu[] =
---------------------------------------------------------------------------*/
class SwGlobalFrameListener_Impl : public SfxListener
{
- BOOL bValid;
+ sal_Bool bValid;
public:
SwGlobalFrameListener_Impl(SfxViewFrame& rFrame) :
- bValid(TRUE)
+ bValid(sal_True)
{
StartListening(rFrame);
}
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
- BOOL IsValid() const {return bValid;}
+ sal_Bool IsValid() const {return bValid;}
};
/* -----------------------------24.08.00 12:05--------------------------------
@@ -172,7 +172,7 @@ void SwGlobalFrameListener_Impl::Notify( SfxBroadcaster& /*rBC*/, const SfxHi
{
if( rHint.ISA(SfxSimpleHint) &&
(((SfxSimpleHint&) rHint).GetId() == SFX_HINT_DYING))
- bValid = FALSE;
+ bValid = sal_False;
}
/*-----------------12.06.97 09:38-------------------
@@ -190,9 +190,9 @@ SwGlobalTree::SwGlobalTree(Window* pParent, const ResId& rResId) :
pDocContent ( NULL ),
pDocInserter ( NULL ),
- bIsInternalDrag ( FALSE ),
- bLastEntryEmphasis ( FALSE ),
- bIsImageListInitialized ( FALSE )
+ bIsInternalDrag ( sal_False ),
+ bLastEntryEmphasis ( sal_False ),
+ bIsImageListInitialized ( sal_False )
{
SetDragDropMode(SV_DRAGDROP_APP_COPY |
@@ -202,7 +202,7 @@ SwGlobalTree::SwGlobalTree(Window* pParent, const ResId& rResId) :
aUpdateTimer.SetTimeout(GLOBAL_UPDATE_TIMEOUT);
aUpdateTimer.SetTimeoutHdl(LINK(this, SwGlobalTree, Timeout));
aUpdateTimer.Start();
- for(USHORT i = 0; i < GLOBAL_CONTEXT_COUNT; i++)
+ for(sal_uInt16 i = 0; i < GLOBAL_CONTEXT_COUNT; i++)
{
aContextStrings[i] = SW_RESSTR(i+ ST_GLOBAL_CONTEXT_FIRST);
}
@@ -230,19 +230,19 @@ sal_Int8 SwGlobalTree::ExecuteDrop( const ExecuteDropEvent& rEvt )
SvLBoxEntry* pLast = (SvLBoxEntry*)LastVisible();
if(pEmphasisEntry)
{
- ImplShowTargetEmphasis( Prev(pEmphasisEntry), FALSE );
+ ImplShowTargetEmphasis( Prev(pEmphasisEntry), sal_False );
pEmphasisEntry = 0;
}
else if(bLastEntryEmphasis && pLast)
{
- ImplShowTargetEmphasis( pLast, FALSE);
+ ImplShowTargetEmphasis( pLast, sal_False);
}
SvLBoxEntry* pDropEntry = bLastEntryEmphasis ? 0 : GetEntry(rEvt.maPosPixel);
if( bIsInternalDrag )
{
SvLBoxEntry* pDummy = 0;
- ULONG nInsertionPos = LIST_APPEND;
+ sal_uLong nInsertionPos = LIST_APPEND;
NotifyMoving( pDropEntry, pDDSource, pDummy, nInsertionPos );
}
else
@@ -260,12 +260,12 @@ sal_Int8 SwGlobalTree::ExecuteDrop( const ExecuteDropEvent& rEvt )
int nAbsContPos = pDropEntry ?
(int) GetModel()->GetAbsPos(pDropEntry):
- 1;
- USHORT nEntryCount = (USHORT)GetEntryCount();
+ sal_uInt16 nEntryCount = (sal_uInt16)GetEntryCount();
// Daten holen
FileList aFileList;
aData.GetFileList( FORMAT_FILE_LIST, aFileList );
- for ( USHORT n = (USHORT)aFileList.Count(); n--; )
+ for ( sal_uInt16 n = (sal_uInt16)aFileList.Count(); n--; )
{
sFileName = aFileList.GetFile(n);
InsertRegion(pCnt, &sFileName);
@@ -281,7 +281,7 @@ sal_Int8 SwGlobalTree::ExecuteDrop( const ExecuteDropEvent& rEvt )
{
nEntryCount++;
nAbsContPos++;
- pCnt = pTempContents->GetObject( static_cast< USHORT >(nAbsContPos) );
+ pCnt = pTempContents->GetObject( static_cast< sal_uInt16 >(nAbsContPos) );
}
}
}
@@ -299,7 +299,7 @@ sal_Int8 SwGlobalTree::ExecuteDrop( const ExecuteDropEvent& rEvt )
}
}
}
- bLastEntryEmphasis = FALSE;
+ bLastEntryEmphasis = sal_False;
return nRet;
}
@@ -317,14 +317,14 @@ sal_Int8 SwGlobalTree::AcceptDrop( const AcceptDropEvent& rEvt )
{
if( pEmphasisEntry )
{
- ImplShowTargetEmphasis( Prev(pEmphasisEntry), FALSE );
+ ImplShowTargetEmphasis( Prev(pEmphasisEntry), sal_False );
pEmphasisEntry = 0;
}
else if(bLastEntryEmphasis && pLast)
{
- ImplShowTargetEmphasis( pLast, FALSE);
+ ImplShowTargetEmphasis( pLast, sal_False);
}
- bLastEntryEmphasis = FALSE;
+ bLastEntryEmphasis = sal_False;
}
else
{
@@ -346,11 +346,11 @@ sal_Int8 SwGlobalTree::AcceptDrop( const AcceptDropEvent& rEvt )
nRet = DND_ACTION_LINK;
if(pEmphasisEntry && pEmphasisEntry != pDropEntry)
- ImplShowTargetEmphasis( Prev(pEmphasisEntry), FALSE );
+ ImplShowTargetEmphasis( Prev(pEmphasisEntry), sal_False );
else if(pLast && bLastEntryEmphasis && pDropEntry)
{
- ImplShowTargetEmphasis( pLast, FALSE);
- bLastEntryEmphasis = FALSE;
+ ImplShowTargetEmphasis( pLast, sal_False);
+ bLastEntryEmphasis = sal_False;
}
if(pDropEntry)
@@ -358,7 +358,7 @@ sal_Int8 SwGlobalTree::AcceptDrop( const AcceptDropEvent& rEvt )
else if(pLast)
{
ImplShowTargetEmphasis( pLast, DND_ACTION_NONE != nRet );
- bLastEntryEmphasis = TRUE;
+ bLastEntryEmphasis = sal_True;
}
pEmphasisEntry = pDropEntry;
}
@@ -373,12 +373,12 @@ PopupMenu* SwGlobalTree::CreateContextMenu()
if(pActiveShell &&
!pActiveShell->GetView().GetDocShell()->IsReadOnly())
{
- USHORT nEnableFlags = GetEnableFlags();
+ sal_uInt16 nEnableFlags = GetEnableFlags();
pPop = new PopupMenu;
PopupMenu* pSubPop1 = new PopupMenu;
PopupMenu* pSubPop2 = new PopupMenu;
- for (USHORT i = CTX_UPDATE_SEL; i <= CTX_UPDATE_ALL; i++)
+ for (sal_uInt16 i = CTX_UPDATE_SEL; i <= CTX_UPDATE_ALL; i++)
{
pSubPop2->InsertItem( i, aContextStrings[ST_UPDATE_SEL - ST_GLOBAL_CONTEXT_FIRST - CTX_UPDATE_SEL+ i] );
pSubPop2->SetHelpId(i, aHelpForMenu[i]);
@@ -430,13 +430,13 @@ PopupMenu* SwGlobalTree::CreateContextMenu()
/*-----------------16.06.97 10:41-------------------
--------------------------------------------------*/
-void SwGlobalTree::TbxMenuHdl(USHORT nTbxId, ToolBox* pBox)
+void SwGlobalTree::TbxMenuHdl(sal_uInt16 nTbxId, ToolBox* pBox)
{
- USHORT nEnableFlags = GetEnableFlags();
+ sal_uInt16 nEnableFlags = GetEnableFlags();
if(FN_GLOBAL_OPEN == nTbxId)
{
PopupMenu *pMenu = new PopupMenu;
- for (USHORT i = CTX_INSERT_ANY_INDEX; i <= CTX_INSERT_TEXT; i++)
+ for (sal_uInt16 i = CTX_INSERT_ANY_INDEX; i <= CTX_INSERT_TEXT; i++)
{
pMenu->InsertItem( i, aContextStrings[ST_INDEX - ST_GLOBAL_CONTEXT_FIRST - CTX_INSERT_ANY_INDEX + i] );
pMenu->SetHelpId(i, aHelpForMenu[i] );
@@ -456,7 +456,7 @@ void SwGlobalTree::TbxMenuHdl(USHORT nTbxId, ToolBox* pBox)
else if(FN_GLOBAL_UPDATE == nTbxId)
{
PopupMenu *pMenu = new PopupMenu;
- for (USHORT i = CTX_UPDATE_SEL; i <= CTX_UPDATE_ALL; i++)
+ for (sal_uInt16 i = CTX_UPDATE_SEL; i <= CTX_UPDATE_ALL; i++)
{
pMenu->InsertItem( i, aContextStrings[ST_UPDATE_SEL - ST_GLOBAL_CONTEXT_FIRST - CTX_UPDATE_SEL+ i] );
pMenu->SetHelpId(i, aHelpForMenu[i] );
@@ -472,14 +472,14 @@ void SwGlobalTree::TbxMenuHdl(USHORT nTbxId, ToolBox* pBox)
/*-----------------16.06.97 11:02-------------------
--------------------------------------------------*/
-USHORT SwGlobalTree::GetEnableFlags() const
+sal_uInt16 SwGlobalTree::GetEnableFlags() const
{
SvLBoxEntry* pEntry = FirstSelected();
- USHORT nSelCount = (USHORT)GetSelectionCount();
- USHORT nEntryCount = (USHORT)GetEntryCount();
+ sal_uInt16 nSelCount = (sal_uInt16)GetSelectionCount();
+ sal_uInt16 nEntryCount = (sal_uInt16)GetEntryCount();
SvLBoxEntry* pPrevEntry = pEntry ? Prev(pEntry) : 0;
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
if(nSelCount == 1 || !nEntryCount)
nRet |= ENABLE_INSERT_IDX|ENABLE_INSERT_FILE;
if(nSelCount == 1)
@@ -507,9 +507,9 @@ USHORT SwGlobalTree::GetEnableFlags() const
--------------------------------------------------*/
void SwGlobalTree::RequestHelp( const HelpEvent& rHEvt )
{
- BOOL bParent = TRUE;
- Update(TRUE);
- Display(TRUE);
+ sal_Bool bParent = sal_True;
+ Update(sal_True);
+ Display(sal_True);
if( rHEvt.GetMode() & HELPMODE_QUICK )
{
Point aPos( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ));
@@ -518,7 +518,7 @@ void SwGlobalTree::RequestHelp( const HelpEvent& rHEvt )
(const SwGlblDocContent*)pEntry->GetUserData() : 0;
if( pCont && GLBLDOC_SECTION == pCont->GetType())
{
- bParent = FALSE;
+ bParent = sal_False;
SvLBoxTab* pTab;
SvLBoxItem* pItem = GetItem( pEntry, aPos.X(), &pTab );
if(pItem && SV_ITEM_ID_LBOXSTRING == pItem->IsA())
@@ -558,11 +558,11 @@ void SwGlobalTree::RequestHelp( const HelpEvent& rHEvt )
void SwGlobalTree::SelectHdl()
{
- USHORT nSelCount = (USHORT)GetSelectionCount();
+ sal_uInt16 nSelCount = (sal_uInt16)GetSelectionCount();
SvLBoxEntry* pSel = FirstSelected();
- USHORT nAbsPos = pSel ? (USHORT)GetModel()->GetAbsPos(pSel) : 0;
+ sal_uInt16 nAbsPos = pSel ? (sal_uInt16)GetModel()->GetAbsPos(pSel) : 0;
SwNavigationPI* pNavi = GetParentWindow();
- BOOL bReadonly = !pActiveShell ||
+ sal_Bool bReadonly = !pActiveShell ||
pActiveShell->GetView().GetDocShell()->IsReadOnly();
pNavi->aGlobalToolBox.EnableItem(FN_GLOBAL_EDIT, nSelCount == 1 && !bReadonly);
pNavi->aGlobalToolBox.EnableItem(FN_GLOBAL_OPEN, nSelCount <= 1 && !bReadonly);
@@ -570,7 +570,7 @@ void SwGlobalTree::SelectHdl()
pNavi->aGlobalToolBox.EnableItem(FN_ITEM_UP,
nSelCount == 1 && nAbsPos && !bReadonly);
pNavi->aGlobalToolBox.EnableItem(FN_ITEM_DOWN,
- nSelCount == 1 && nAbsPos < ((USHORT)GetEntryCount()) - 1 && !bReadonly);
+ nSelCount == 1 && nAbsPos < ((sal_uInt16)GetEntryCount()) - 1 && !bReadonly);
}
/*-----------------16.06.97 16:15-------------------
@@ -587,7 +587,7 @@ void SwGlobalTree::DeselectHdl()
DragDropMode SwGlobalTree::NotifyStartDrag( TransferDataContainer& ,
SvLBoxEntry* pEntry )
{
- bIsInternalDrag = TRUE;
+ bIsInternalDrag = sal_True;
pDDSource = pEntry;
return SV_DRAGDROP_CTRL_MOVE;
}
@@ -603,37 +603,37 @@ long SwGlobalTree::GetTabPos( SvLBoxEntry*, SvLBoxTab* pTab)
/*-----------------12.06.97 09:38-------------------
--------------------------------------------------*/
-BOOL SwGlobalTree::NotifyMoving( SvLBoxEntry* pTarget,
+sal_Bool SwGlobalTree::NotifyMoving( SvLBoxEntry* pTarget,
SvLBoxEntry* pSource,
SvLBoxEntry*&,
- ULONG&
+ sal_uLong&
)
{
SvTreeList* _pModel = GetModel();
- USHORT nSource = (USHORT) _pModel->GetAbsPos(pSource);
- USHORT nDest = pTarget ? (USHORT) _pModel->GetAbsPos(pTarget) : pSwGlblDocContents->Count();
+ sal_uInt16 nSource = (sal_uInt16) _pModel->GetAbsPos(pSource);
+ sal_uInt16 nDest = pTarget ? (sal_uInt16) _pModel->GetAbsPos(pTarget) : pSwGlblDocContents->Count();
if( pActiveShell->MoveGlobalDocContent(
*pSwGlblDocContents, nSource, nSource + 1, nDest ) &&
- Update( FALSE ))
+ Update( sal_False ))
Display();
- return FALSE;
+ return sal_False;
}
/*-----------------12.06.97 09:39-------------------
--------------------------------------------------*/
-BOOL SwGlobalTree::NotifyCopying( SvLBoxEntry* /*pTarget*/,
+sal_Bool SwGlobalTree::NotifyCopying( SvLBoxEntry* /*pTarget*/,
SvLBoxEntry* /*pEntry*/,
SvLBoxEntry*& /*rpNewParent*/,
- ULONG& /*rNewChildPos*/
+ sal_uLong& /*rNewChildPos*/
)
{
- return FALSE;
+ return sal_False;
}
/*-----------------12.06.97 09:39-------------------
--------------------------------------------------*/
-BOOL SwGlobalTree::NotifyAcceptDrop( SvLBoxEntry* pEntry)
+sal_Bool SwGlobalTree::NotifyAcceptDrop( SvLBoxEntry* pEntry)
{
return pEntry != 0;
}
@@ -651,7 +651,7 @@ void SwGlobalTree::StartDrag( sal_Int8 nAction, const Point& rPt )
void SwGlobalTree::DragFinished( sal_Int8 nAction )
{
SvTreeListBox::DragFinished( nAction );
- bIsInternalDrag = FALSE;
+ bIsInternalDrag = sal_False;
}
/***************************************************************************
@@ -661,7 +661,7 @@ void SwGlobalTree::DragFinished( sal_Int8 nAction )
void SwGlobalTree::MouseButtonDown( const MouseEvent& rMEvt )
{
Point aPos( rMEvt.GetPosPixel());
- SvLBoxEntry* pEntry = GetEntry( aPos, TRUE );
+ SvLBoxEntry* pEntry = GetEntry( aPos, sal_True );
if( !pEntry && rMEvt.IsLeft() && rMEvt.IsMod1() && (rMEvt.GetClicks() % 2) == 0)
Control::MouseButtonDown( rMEvt );
else
@@ -673,7 +673,7 @@ void SwGlobalTree::MouseButtonDown( const MouseEvent& rMEvt )
--------------------------------------------------*/
void SwGlobalTree::GetFocus()
{
- if(Update( FALSE ))
+ if(Update( sal_False ))
Display();
SvTreeListBox::GetFocus();
}
@@ -709,19 +709,19 @@ void SwGlobalTree::Clear()
/*-----------------12.06.97 12:38-------------------
--------------------------------------------------*/
-void SwGlobalTree::Display(BOOL bOnlyUpdateUserData)
+void SwGlobalTree::Display(sal_Bool bOnlyUpdateUserData)
{
if(!bIsImageListInitialized)
{
- USHORT nResId = GetSettings().GetStyleSettings().GetHighContrastMode() ? IMG_NAVI_ENTRYBMPH : IMG_NAVI_ENTRYBMP;
+ sal_uInt16 nResId = GetSettings().GetStyleSettings().GetHighContrastMode() ? IMG_NAVI_ENTRYBMPH : IMG_NAVI_ENTRYBMP;
aEntryImages = ImageList(SW_RES(nResId));
- bIsImageListInitialized = TRUE;
+ bIsImageListInitialized = sal_True;
}
- USHORT nCount = pSwGlblDocContents->Count();
+ sal_uInt16 nCount = pSwGlblDocContents->Count();
if(bOnlyUpdateUserData && GetEntryCount() == pSwGlblDocContents->Count())
{
SvLBoxEntry* pEntry = First();
- for( USHORT i = 0; i < nCount; i++)
+ for( sal_uInt16 i = 0; i < nCount; i++)
{
SwGlblDocContentPtr pCont = pSwGlblDocContents->GetObject(i);
pEntry->SetUserData(pCont);
@@ -730,21 +730,21 @@ void SwGlobalTree::Display(BOOL bOnlyUpdateUserData)
}
else
{
- SetUpdateMode( FALSE );
+ SetUpdateMode( sal_False );
SvLBoxEntry* pOldSelEntry = FirstSelected();
String sEntryName; // Name des Eintrags
- USHORT nSelPos = USHRT_MAX;
+ sal_uInt16 nSelPos = USHRT_MAX;
if(pOldSelEntry)
{
sEntryName = GetEntryText(pOldSelEntry);
- nSelPos = (USHORT)GetModel()->GetAbsPos(pOldSelEntry);
+ nSelPos = (sal_uInt16)GetModel()->GetAbsPos(pOldSelEntry);
}
Clear();
if(!pSwGlblDocContents)
- Update( FALSE );
+ Update( sal_False );
SvLBoxEntry* pSelEntry = 0;
- for( USHORT i = 0; i < nCount; i++)
+ for( sal_uInt16 i = 0; i < nCount; i++)
{
SwGlblDocContentPtr pCont = pSwGlblDocContents->GetObject(i);
String sEntry;
@@ -773,7 +773,7 @@ void SwGlobalTree::Display(BOOL bOnlyUpdateUserData)
break;
}
SvLBoxEntry* pEntry = InsertEntry(sEntry, aImage, aImage,
- 0, FALSE, LIST_APPEND, pCont);
+ 0, sal_False, LIST_APPEND, pCont);
if(sEntry == sEntryName)
{
pSelEntry = pEntry;
@@ -791,7 +791,7 @@ void SwGlobalTree::Display(BOOL bOnlyUpdateUserData)
Select(First());
else
SelectHdl();
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
}
}
@@ -825,7 +825,7 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* pCont, const String* pF
--------------------------------------------------*/
void SwGlobalTree::EditContent(const SwGlblDocContent* pCont )
{
- USHORT nSlot = 0;
+ sal_uInt16 nSlot = 0;
switch( pCont->GetType() )
{
case GLBLDOC_UNKNOWN:
@@ -852,7 +852,7 @@ void SwGlobalTree::EditContent(const SwGlblDocContent* pCont )
if(nSlot)
{
pActiveShell->GetView().GetViewFrame()->GetDispatcher()->Execute(nSlot);
- if(Update( FALSE ))
+ if(Update( sal_False ))
Display();
}
}
@@ -863,15 +863,15 @@ void SwGlobalTree::EditContent(const SwGlblDocContent* pCont )
IMPL_LINK( SwGlobalTree, PopupHdl, Menu* , pMenu)
{
ExcecuteContextMenuAction( pMenu->GetCurItemId());
- return TRUE;
+ return sal_True;
}
/* -----------------26.08.2003 11:57-----------------
--------------------------------------------------*/
-void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
+void SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry )
//IMPL_LINK( SwGlobalTree, PopupHdl, Menu* , pMenu)
{
-// USHORT nId = pMenu->GetCurItemId();
+// sal_uInt16 nId = pMenu->GetCurItemId();
SvLBoxEntry* pEntry = FirstSelected();
SwGlblDocContent* pCont = pEntry ? (SwGlblDocContent*)pEntry->GetUserData() : 0;
// wird waehrend des Dialogs ein RequestHelp gerufen,
@@ -881,7 +881,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
if(pCont)
pContCopy = new SwGlblDocContent(pCont->GetDocPos());
SfxDispatcher& rDispatch = *pActiveShell->GetView().GetViewFrame()->GetDispatcher();
- USHORT nSlot = 0;
+ sal_uInt16 nSlot = 0;
bool bDeleteContentCopy = true;
switch( nSelectedPopupEntry )
{
@@ -920,7 +920,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
case CTX_UPDATE_LINK:
case CTX_UPDATE_ALL:
{
- pActiveShell->GetLinkManager().UpdateAllLinks(TRUE);
+ pActiveShell->GetLinkManager().UpdateAllLinks(sal_True);
if(CTX_UPDATE_ALL == nSelectedPopupEntry)
nSlot = FN_UPDATE_TOX;
pCont = 0;
@@ -952,7 +952,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
{
pActiveShell->DeleteGlobalDocContent(
pTempContents ? *pTempContents : *pSwGlblDocContents,
- (USHORT)GetModel()->GetAbsPos(pSelEntry));
+ (sal_uInt16)GetModel()->GetAbsPos(pSelEntry));
pSelEntry = PrevSelected(pSelEntry);
if(pSelEntry)
{
@@ -987,7 +987,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
*pActiveShell,
0,
USHRT_MAX,
- TRUE);
+ sal_True);
DBG_ASSERT(pDlg, "Dialogdiet fail!");
if(RET_OK == pDlg->Execute())
{
@@ -1016,7 +1016,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
SfxViewFrame* pGlobFrm = pActiveShell->GetView().GetViewFrame();
SwGlobalFrameListener_Impl aFrmListener(*pGlobFrm);
- ULONG nEntryPos = pEntry ? GetModel()->GetAbsPos(pEntry) : (ULONG)-1;
+ sal_uLong nEntryPos = pEntry ? GetModel()->GetAbsPos(pEntry) : (sal_uLong)-1;
// neues Dok anlegen
SfxStringItem aFactory(SID_NEWDOCDIRECT,
SwDocShell::Factory().GetFilterContainer()->GetName());
@@ -1043,9 +1043,9 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
{
pGlobFrm->ToTop();
// durch das Update sind die Eintraege invalid
- if(nEntryPos != (ULONG)-1)
+ if(nEntryPos != (sal_uLong)-1)
{
- Update( FALSE );
+ Update( sal_False );
Display();
Select(GetModel()->GetEntryAtAbsPos(nEntryPos));
pEntry = FirstSelected();
@@ -1080,7 +1080,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
else
{
pActiveShell->SplitNode(); // leeres Dokument
- pActiveShell->Up( FALSE, 1 );
+ pActiveShell->Up( sal_False, 1 );
}
pActiveShell->GetView().GetEditWin().GrabFocus();
}
@@ -1095,13 +1095,13 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
GotoContent(pCont);
if(nSlot)
rDispatch.Execute(nSlot);
- if(Update( FALSE ))
+ if(Update( sal_False ))
Display();
if ( bDeleteContentCopy )
delete pContCopy;
else
bDeleteContentCopy = true;
-// return TRUE;
+// return sal_True;
}
/*-----------------16.06.97 07:57-------------------
@@ -1109,7 +1109,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
--------------------------------------------------*/
IMPL_LINK( SwGlobalTree, Timeout, Timer*, EMPTYARG )
{
- if(!HasFocus() && Update( FALSE ))
+ if(!HasFocus() && Update( sal_False ))
Display();
return 0;
}
@@ -1157,7 +1157,7 @@ void SwGlobalTree::HideTree()
/*-----------------18.06.97 10:02-------------------
--------------------------------------------------*/
-void SwGlobalTree::ExecCommand(USHORT nCmd)
+void SwGlobalTree::ExecCommand(sal_uInt16 nCmd)
{
SvLBoxEntry* pEntry = FirstSelected();
DBG_ASSERT(pEntry, "gleich knallt's");
@@ -1171,14 +1171,14 @@ void SwGlobalTree::ExecCommand(USHORT nCmd)
{
if(GetSelectionCount() == 1)
{
- BOOL bMove = FALSE;
- USHORT nSource = (USHORT)GetModel()->GetAbsPos(pEntry);
- USHORT nDest = nSource;
+ sal_Bool bMove = sal_False;
+ sal_uInt16 nSource = (sal_uInt16)GetModel()->GetAbsPos(pEntry);
+ sal_uInt16 nDest = nSource;
switch(nCmd)
{
case FN_ITEM_DOWN:
{
- USHORT nEntryCount = (USHORT)GetEntryCount();
+ sal_uInt16 nEntryCount = (sal_uInt16)GetEntryCount();
bMove = nEntryCount > nSource + 1;
nDest+= 2;
}
@@ -1193,7 +1193,7 @@ void SwGlobalTree::ExecCommand(USHORT nCmd)
}
if( bMove && pActiveShell->MoveGlobalDocContent(
*pSwGlblDocContents, nSource, nSource + 1, nDest ) &&
- Update( FALSE ))
+ Update( sal_False ))
Display();
}
}
@@ -1202,10 +1202,10 @@ void SwGlobalTree::ExecCommand(USHORT nCmd)
/*-----------------16.06.97 07:43-------------------
--------------------------------------------------*/
-BOOL SwGlobalTree::Update(BOOL bHard)
+sal_Bool SwGlobalTree::Update(sal_Bool bHard)
{
SwView* pActView = GetParentWindow()->GetCreateView();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if(pActView && pActView->GetWrtShellPtr())
{
const SwWrtShell* pOldShell = pActiveShell;
@@ -1218,23 +1218,23 @@ BOOL SwGlobalTree::Update(BOOL bHard)
if(!pSwGlblDocContents)
{
pSwGlblDocContents = new SwGlblDocContents;
- bRet = TRUE;
+ bRet = sal_True;
pActiveShell->GetGlobalDocContent(*pSwGlblDocContents);
}
else
{
- BOOL bCopy = FALSE;
+ sal_Bool bCopy = sal_False;
SwGlblDocContents* pTempContents = new SwGlblDocContents;
pActiveShell->GetGlobalDocContent(*pTempContents);
if(pTempContents->Count() != pSwGlblDocContents->Count() ||
pTempContents->Count() != GetEntryCount())
{
- bRet = TRUE;
- bCopy = TRUE;
+ bRet = sal_True;
+ bCopy = sal_True;
}
else
{
- for(USHORT i = 0; i < pTempContents->Count() && !bCopy; i++)
+ for(sal_uInt16 i = 0; i < pTempContents->Count() && !bCopy; i++)
{
SwGlblDocContent* pLeft = pTempContents->GetObject(i);
SwGlblDocContent* pRight = pSwGlblDocContents->GetObject(i);
@@ -1253,13 +1253,13 @@ BOOL SwGlobalTree::Update(BOOL bHard)
)
)
{
- bCopy = bRet = TRUE;
+ bCopy = bRet = sal_True;
}
}
}
if(bCopy || bHard)
{
- USHORT i;
+ sal_uInt16 i;
pSwGlblDocContents->DeleteAndDestroy(0, pSwGlblDocContents->Count());
for( i = 0; i < pTempContents->Count(); i++)
@@ -1291,14 +1291,14 @@ void SwGlobalTree::OpenDoc(const SwGlblDocContent* pCont)
{
String sFileName(pCont->GetSection()->GetLinkFileName().GetToken(0,
sfx2::cTokenSeperator));
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
const SfxObjectShell* pCurr = SfxObjectShell::GetFirst();
while( !bFound && pCurr )
{
if(pCurr->GetMedium() &&
String(pCurr->GetMedium()->GetURLObject().GetMainURL(INetURLObject::DECODE_TO_IURI)) == sFileName)
{
- bFound = TRUE;
+ bFound = sal_True;
SwGlobalTree::SetShowShell(pCurr);
Application::PostUserEvent( STATIC_LINK(
this, SwGlobalTree, ShowFrameHdl ) );
@@ -1311,7 +1311,7 @@ void SwGlobalTree::OpenDoc(const SwGlblDocContent* pCont)
{
SfxStringItem aURL(SID_FILE_NAME,
sFileName);
- SfxBoolItem aReadOnly(SID_DOC_READONLY, FALSE);
+ SfxBoolItem aReadOnly(SID_DOC_READONLY, sal_False);
SfxStringItem aTargetFrameName( SID_TARGETNAME, String::CreateFromAscii("_blank") );
SfxStringItem aReferer(SID_REFERER, pActiveShell->GetView().GetDocShell()->GetTitle());
pActiveShell->GetView().GetViewFrame()->GetDispatcher()->
@@ -1354,7 +1354,7 @@ void SwGlobalTree::InitEntry(SvLBoxEntry* pEntry,
const XubString& rStr ,const Image& rImg1,const Image& rImg2,
SvLBoxButtonKind eButtonKind)
{
- USHORT nColToHilite = 1; //0==Bitmap;1=="Spalte1";2=="Spalte2"
+ sal_uInt16 nColToHilite = 1; //0==Bitmap;1=="Spalte1";2=="Spalte2"
SvTreeListBox::InitEntry( pEntry, rStr, rImg1, rImg2, eButtonKind );
SvLBoxString* pCol = (SvLBoxString*)pEntry->GetItem( nColToHilite );
SwLBoxString* pStr = new SwLBoxString( pEntry, 0, pCol->GetText() );
@@ -1364,7 +1364,7 @@ void SwGlobalTree::InitEntry(SvLBoxEntry* pEntry,
*
* --------------------------------------------------*/
-void SwLBoxString::Paint( const Point& rPos, SvLBox& rDev, USHORT nFlags,
+void SwLBoxString::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags,
SvLBoxEntry* pEntry )
{
SwGlblDocContent* pCont = (SwGlblDocContent*)pEntry->GetUserData();
@@ -1391,7 +1391,7 @@ void SwGlobalTree::DataChanged( const DataChangedEvent& rDCEvt )
if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE) )
{
- USHORT nResId = GetSettings().GetStyleSettings().GetHighContrastMode() ? IMG_NAVI_ENTRYBMPH : IMG_NAVI_ENTRYBMP;
+ sal_uInt16 nResId = GetSettings().GetStyleSettings().GetHighContrastMode() ? IMG_NAVI_ENTRYBMPH : IMG_NAVI_ENTRYBMP;
aEntryImages = ImageList(SW_RES(nResId));
Update(sal_True);
}
@@ -1403,24 +1403,24 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen
sal_Int32 nFiles = _rFiles.getLength();
if ( nFiles )
{
- BOOL bMove = FALSE;
+ sal_Bool bMove = sal_False;
if ( !_pContent )
{
SvLBoxEntry* pLast = (SvLBoxEntry*)LastVisible();
_pContent = (SwGlblDocContent*)pLast->GetUserData();
- bMove = TRUE;
+ bMove = sal_True;
}
String sFilePassword;
- USHORT nEntryCount = (USHORT)GetEntryCount();
+ sal_uInt16 nEntryCount = (sal_uInt16)GetEntryCount();
const OUString* pFileNames = _rFiles.getConstArray();
SwWrtShell& rSh = GetParentWindow()->GetCreateView()->GetWrtShell();
rSh.StartAction();
// after insertion of the first new content the 'pCont' parameter becomes invalid
// find the index of the 'anchor' content to always use a current anchor content
- USHORT nAnchorContent = pSwGlblDocContents->Count() - 1;
+ sal_uInt16 nAnchorContent = pSwGlblDocContents->Count() - 1;
if ( !bMove )
{
- for( USHORT nContent = 0; nContent < pSwGlblDocContents->Count(); ++nContent )
+ for( sal_uInt16 nContent = 0; nContent < pSwGlblDocContents->Count(); ++nContent )
{
if( *_pContent == *pSwGlblDocContents->GetObject( nContent ) )
{
@@ -1437,7 +1437,7 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen
SwGlblDocContent* pAnchorContent = 0;
DBG_ASSERT(aTempContents.Count() > (nAnchorContent + nFile), "invalid anchor content -> last insertion failed");
if ( aTempContents.Count() > (nAnchorContent + nFile) )
- pAnchorContent = aTempContents.GetObject(nAnchorContent + (USHORT)nFile);
+ pAnchorContent = aTempContents.GetObject(nAnchorContent + (sal_uInt16)nFile);
else
pAnchorContent = aTempContents.GetObject(aTempContents.Count() - 1);
String sFileName(pFileNames[nFile]);
@@ -1446,10 +1446,10 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen
String sSectionName(String(aFileUrl.GetLastName(
INetURLObject::DECODE_UNAMBIGUOUS)).GetToken(0,
sfx2::cTokenSeperator));
- USHORT nSectCount = rSh.GetSectionFmtCount();
+ sal_uInt16 nSectCount = rSh.GetSectionFmtCount();
String sTempSectionName(sSectionName);
- USHORT nAddNumber = 0;
- USHORT nCount = 0;
+ sal_uInt16 nAddNumber = 0;
+ sal_uInt16 nCount = 0;
// evtl : und Index anhaengen, wenn der Bereichsname schon vergeben ist
while ( nCount < nSectCount )
{
@@ -1482,12 +1482,12 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen
}
if ( bMove )
{
- Update( FALSE );
+ Update( sal_False );
rSh.MoveGlobalDocContent(
- *pSwGlblDocContents, nEntryCount, nEntryCount + (USHORT)nFiles, nEntryCount - (USHORT)nFiles );
+ *pSwGlblDocContents, nEntryCount, nEntryCount + (sal_uInt16)nFiles, nEntryCount - (sal_uInt16)nFiles );
}
rSh.EndAction();
- Update( FALSE );
+ Update( sal_False );
Display();
}
}
diff --git a/sw/source/ui/utlui/gloslst.cxx b/sw/source/ui/utlui/gloslst.cxx
index 5c3350346201..3d80e55e1ace 100644
--- a/sw/source/ui/utlui/gloslst.cxx
+++ b/sw/source/ui/utlui/gloslst.cxx
@@ -139,7 +139,7 @@ IMPL_LINK(SwGlossDecideDlg, SelectHdl, ListBox*, EMPTYARG)
SwGlossaryList::SwGlossaryList() :
- bFilled(FALSE)
+ bFilled(sal_False)
{
SvtPathOptions aPathOpt;
sPath = aPathOpt.GetAutoTextPath();
@@ -163,7 +163,7 @@ SwGlossaryList::~SwGlossaryList()
********************************************************************/
-BOOL SwGlossaryList::GetShortName(const String& rLongName,
+sal_Bool SwGlossaryList::GetShortName(const String& rLongName,
String& rShortName, String& rGroupName )
{
if(!bFilled)
@@ -171,13 +171,13 @@ BOOL SwGlossaryList::GetShortName(const String& rLongName,
TripleStrings aTripleStrings;
- USHORT nCount = aGroupArr.Count();
- USHORT nFound = 0;
- for(USHORT i = 0; i < nCount; i++ )
+ sal_uInt16 nCount = aGroupArr.Count();
+ sal_uInt16 nFound = 0;
+ for(sal_uInt16 i = 0; i < nCount; i++ )
{
AutoTextGroup* pGroup = aGroupArr.GetObject(i);
if(!rGroupName.Len() || rGroupName == pGroup->sName)
- for(USHORT j = 0; j < pGroup->nCount; j++)
+ for(sal_uInt16 j = 0; j < pGroup->nCount; j++)
{
String sLong = pGroup->sLongNames.GetToken(j, STRING_DELIM);
if((rLongName == sLong))
@@ -191,14 +191,14 @@ BOOL SwGlossaryList::GetShortName(const String& rLongName,
}
}
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
nCount = aTripleStrings.Count();
if(1 == nCount )
{
TripleString* pTriple = aTripleStrings[0];
rShortName = pTriple->sShort;
rGroupName = pTriple->sGroup;
- bRet = TRUE;
+ bRet = sal_True;
}
else if(1 < nCount)
{
@@ -209,7 +209,7 @@ BOOL SwGlossaryList::GetShortName(const String& rLongName,
aDlg.SetText(sTitle);
ListBox& rLB = aDlg.GetListBox();
- for(USHORT i = 0; i < nCount; i++ )
+ for(sal_uInt16 i = 0; i < nCount; i++ )
rLB.InsertEntry(aTripleStrings[i]->sGroup.GetToken(0, GLOS_DELIM));
rLB.SelectEntryPos(0);
@@ -219,10 +219,10 @@ BOOL SwGlossaryList::GetShortName(const String& rLongName,
TripleString* pTriple = aTripleStrings[rLB.GetSelectEntryPos()];
rShortName = pTriple->sShort;
rGroupName = pTriple->sGroup;
- bRet = TRUE;
+ bRet = sal_True;
}
else
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
}
@@ -232,7 +232,7 @@ BOOL SwGlossaryList::GetShortName(const String& rLongName,
********************************************************************/
-USHORT SwGlossaryList::GetGroupCount()
+sal_uInt16 SwGlossaryList::GetGroupCount()
{
if(!bFilled)
Update();
@@ -244,7 +244,7 @@ USHORT SwGlossaryList::GetGroupCount()
********************************************************************/
-String SwGlossaryList::GetGroupName(USHORT nPos, BOOL bNoPath, String* pTitle)
+String SwGlossaryList::GetGroupName(sal_uInt16 nPos, sal_Bool bNoPath, String* pTitle)
{
DBG_ASSERT(aGroupArr.Count() > nPos, "Gruppe nicht vorhanden");
String sRet(aEmptyStr);
@@ -266,7 +266,7 @@ String SwGlossaryList::GetGroupName(USHORT nPos, BOOL bNoPath, String* pTitle)
********************************************************************/
-USHORT SwGlossaryList::GetBlockCount(USHORT nGroup)
+sal_uInt16 SwGlossaryList::GetBlockCount(sal_uInt16 nGroup)
{
DBG_ASSERT(aGroupArr.Count() > nGroup, "Gruppe nicht vorhanden");
if(nGroup < aGroupArr.Count())
@@ -282,7 +282,7 @@ USHORT SwGlossaryList::GetBlockCount(USHORT nGroup)
********************************************************************/
-String SwGlossaryList::GetBlockName(USHORT nGroup, USHORT nBlock, String& rShortName)
+String SwGlossaryList::GetBlockName(sal_uInt16 nGroup, sal_uInt16 nBlock, String& rShortName)
{
DBG_ASSERT(aGroupArr.Count() > nGroup, "Gruppe nicht vorhanden");
if(nGroup < aGroupArr.Count())
@@ -309,7 +309,7 @@ void SwGlossaryList::Update()
if(sTemp != sPath)
{
sPath = sTemp;
- bFilled = FALSE;
+ bFilled = sal_False;
ClearGroups();
}
SwGlossaries* pGlossaries = ::GetGlossaries();
@@ -317,11 +317,11 @@ void SwGlossaryList::Update()
String sExt( SwGlossaries::GetExtension() );
if(!bFilled)
{
- USHORT nGroupCount = pGlossaries->GetGroupCnt();
- for(USHORT i = 0; i < nGroupCount; i++)
+ sal_uInt16 nGroupCount = pGlossaries->GetGroupCnt();
+ for(sal_uInt16 i = 0; i < nGroupCount; i++)
{
String sGrpName = pGlossaries->GetGroupName(i);
- USHORT nPath = (USHORT)sGrpName.GetToken(1, GLOS_DELIM).ToInt32();
+ sal_uInt16 nPath = (sal_uInt16)sGrpName.GetToken(1, GLOS_DELIM).ToInt32();
if(nPath < pPathArr->Count())
{
AutoTextGroup* pGroup = new AutoTextGroup;
@@ -340,11 +340,11 @@ void SwGlossaryList::Update()
aGroupArr.Insert( pGroup, i );
}
}
- bFilled = TRUE;
+ bFilled = sal_True;
}
else
{
- for(USHORT nPath = 0; nPath < pPathArr->Count(); nPath++)
+ for(sal_uInt16 nPath = 0; nPath < pPathArr->Count(); nPath++)
{
SvStringsDtor aFoundGroupNames;
SvStrings aFiles( 16, 16 );
@@ -352,7 +352,7 @@ void SwGlossaryList::Update()
SWUnoHelper::UCB_GetFileListOfFolder( *(*pPathArr)[nPath], aFiles,
&sExt, &aDateTimeArr );
- for( USHORT nFiles = 0, nFEnd = aFiles.Count();
+ for( sal_uInt16 nFiles = 0, nFEnd = aFiles.Count();
nFiles < nFEnd; ++nFiles )
{
String* pTitle = aFiles[ nFiles ];
@@ -385,20 +385,20 @@ void SwGlossaryList::Update()
delete pDT;
}
- USHORT nArrCount = aGroupArr.Count();
- for( USHORT i = nArrCount; i; --i)
+ sal_uInt16 nArrCount = aGroupArr.Count();
+ for( sal_uInt16 i = nArrCount; i; --i)
{
// evtl. geloeschte Gruppen entfernen
AutoTextGroup* pGroup = aGroupArr.GetObject(i - 1);
- USHORT nGroupPath = (USHORT)pGroup->sName.GetToken( 1,
+ sal_uInt16 nGroupPath = (sal_uInt16)pGroup->sName.GetToken( 1,
GLOS_DELIM).ToInt32();
// nur die Gruppen werden geprueft, die fuer den
// aktuellen Teilpfad registriert sind
if(nGroupPath == nPath)
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
String sCompareGroup = pGroup->sName.GetToken(0, GLOS_DELIM);
- for( USHORT j = 0; j < aFoundGroupNames.Count() && !bFound; ++j)
+ for( sal_uInt16 j = 0; j < aFoundGroupNames.Count() && !bFound; ++j)
{
bFound = sCompareGroup == *aFoundGroupNames[j];
}
@@ -432,7 +432,7 @@ void SwGlossaryList::Timeout()
AutoTextGroup* SwGlossaryList::FindGroup(const String& rGroupName)
{
- for(USHORT i = 0; i < aGroupArr.Count(); i++)
+ for(sal_uInt16 i = 0; i < aGroupArr.Count(); i++)
{
AutoTextGroup* pRet = aGroupArr.GetObject(i);
if(pRet->sName == rGroupName)
@@ -454,7 +454,7 @@ void SwGlossaryList::FillGroup(AutoTextGroup* pGroup, SwGlossaries* pGlossaries)
if(pBlock)
pGroup->sTitle = pBlock->GetName();
- for(USHORT j = 0; j < pGroup->nCount; j++)
+ for(sal_uInt16 j = 0; j < pGroup->nCount; j++)
{
pGroup->sLongNames += pBlock->GetLongName(j);
pGroup->sLongNames += STRING_DELIM;
@@ -469,19 +469,19 @@ void SwGlossaryList::FillGroup(AutoTextGroup* pGroup, SwGlossaries* pGlossaries)
passendem Anfang zurueckgeben
********************************************************************/
-BOOL SwGlossaryList::HasLongName(const String& rBegin, SvStringsISortDtor* pLongNames )
+sal_Bool SwGlossaryList::HasLongName(const String& rBegin, SvStringsISortDtor* pLongNames )
{
if(!bFilled)
Update();
- USHORT nFound = 0;
- USHORT nCount = aGroupArr.Count();
- USHORT nBeginLen = rBegin.Len();
+ sal_uInt16 nFound = 0;
+ sal_uInt16 nCount = aGroupArr.Count();
+ sal_uInt16 nBeginLen = rBegin.Len();
const ::utl::TransliterationWrapper& rSCmp = GetAppCmpStrIgnore();
- for(USHORT i = 0; i < nCount; i++ )
+ for(sal_uInt16 i = 0; i < nCount; i++ )
{
AutoTextGroup* pGroup = aGroupArr.GetObject(i);
- for(USHORT j = 0; j < pGroup->nCount; j++)
+ for(sal_uInt16 j = 0; j < pGroup->nCount; j++)
{
String sBlock = pGroup->sLongNames.GetToken(j, STRING_DELIM);
if( rSCmp.isEqual( sBlock.Copy(0, nBeginLen), rBegin ) &&
@@ -503,12 +503,12 @@ BOOL SwGlossaryList::HasLongName(const String& rBegin, SvStringsISortDtor* pLong
********************************************************************/
void SwGlossaryList::ClearGroups()
{
- USHORT nCount = aGroupArr.Count();
- for( USHORT i = 0; i < nCount; ++i )
+ sal_uInt16 nCount = aGroupArr.Count();
+ for( sal_uInt16 i = 0; i < nCount; ++i )
delete aGroupArr.GetObject( i );
aGroupArr.Remove( 0, nCount );
- bFilled = FALSE;
+ bFilled = sal_False;
}
diff --git a/sw/source/ui/utlui/initui.cxx b/sw/source/ui/utlui/initui.cxx
index 75e412a27eb6..565b32339792 100644
--- a/sw/source/ui/utlui/initui.cxx
+++ b/sw/source/ui/utlui/initui.cxx
@@ -181,7 +181,7 @@ ShellResource::ShellResource()
sPageDescFollowName( SW_RES(STR_PAGEDESC_FOLLOWNAME)),
sPageDescName( SW_RES(STR_PAGEDESC_NAME))
{
- const USHORT nCount = FLD_DOCINFO_END - FLD_DOCINFO_BEGIN;
+ const sal_uInt16 nCount = FLD_DOCINFO_END - FLD_DOCINFO_BEGIN;
KeyCode aCode( KEY_SPACE );
KeyCode aModifiedCode( KEY_SPACE, KEY_MOD1 );
@@ -190,7 +190,7 @@ ShellResource::ShellResource()
aModStr.SearchAndReplaceAllAscii( "+", String() );
aHyperlinkClick.SearchAndReplaceAllAscii( "%s", aModStr );
- for(USHORT i = 0; i < nCount; ++i)
+ for(sal_uInt16 i = 0; i < nCount; ++i)
{
String* pNew = new SW_RESSTR(FLD_DOCINFO_BEGIN + i);
aDocInfoLst.Insert(pNew, aDocInfoLst.Count());
@@ -205,7 +205,7 @@ ShellResource::~ShellResource()
delete pAutoFmtNameLst, pAutoFmtNameLst = 0;
}
-String ShellResource::GetPageDescName( USHORT nNo, BOOL bIsFirst, BOOL bFollow )
+String ShellResource::GetPageDescName( sal_uInt16 nNo, sal_Bool bIsFirst, sal_Bool bFollow )
{
String sRet( bIsFirst ? sPageDescFirstName
: bFollow ? sPageDescFollowName
@@ -222,7 +222,7 @@ SwGlossaries* GetGlossaries()
return (pGlossaries);
}
-BOOL HasGlossaryList()
+sal_Bool HasGlossaryList()
{
return pGlossaryList != 0;
}
@@ -250,7 +250,7 @@ void ShellResource::_GetAutoFmtNameLst() const
ImpAutoFmtNameListLoader::ImpAutoFmtNameListLoader( SvStringsDtor& rLst )
: Resource( ResId(RID_SHELLRES_AUTOFMTSTRS, *pSwResMgr) )
{
- for( USHORT n = 0; n < STR_AUTOFMTREDL_END; ++n )
+ for( sal_uInt16 n = 0; n < STR_AUTOFMTREDL_END; ++n )
{
String* p = new String( ResId( n + 1, *pSwResMgr) );
if(STR_AUTOFMTREDL_TYPO == n)
@@ -279,13 +279,13 @@ const String& SwAuthorityFieldType::GetAuthFieldName(ToxAuthorityField eType)
if(!pAuthFieldNameList)
{
pAuthFieldNameList = new SvStringsDtor(AUTH_FIELD_END, 1);
- for(USHORT i = 0; i < AUTH_FIELD_END; i++)
+ for(sal_uInt16 i = 0; i < AUTH_FIELD_END; i++)
{
String* pTmp = new String(SW_RES(STR_AUTH_FIELD_START + i));
pAuthFieldNameList->Insert(pTmp, pAuthFieldNameList->Count());
}
}
- return *pAuthFieldNameList->GetObject( static_cast< USHORT >(eType) );
+ return *pAuthFieldNameList->GetObject( static_cast< sal_uInt16 >(eType) );
}
/* -----------------16.09.99 12:29-------------------
@@ -295,12 +295,12 @@ const String& SwAuthorityFieldType::GetAuthTypeName(ToxAuthorityType eType)
if(!pAuthFieldTypeList)
{
pAuthFieldTypeList = new SvStringsDtor(AUTH_TYPE_END, 1);
- for(USHORT i = 0; i < AUTH_TYPE_END; i++)
+ for(sal_uInt16 i = 0; i < AUTH_TYPE_END; i++)
pAuthFieldTypeList->Insert(
new String(SW_RES(STR_AUTH_TYPE_START + i)),
pAuthFieldTypeList->Count());
}
- return *pAuthFieldTypeList->GetObject( static_cast< USHORT >(eType) );
+ return *pAuthFieldTypeList->GetObject( static_cast< sal_uInt16 >(eType) );
}
diff --git a/sw/source/ui/utlui/makefile.mk b/sw/source/ui/utlui/makefile.mk
deleted file mode 100644
index cded61eee357..000000000000
--- a/sw/source/ui/utlui/makefile.mk
+++ /dev/null
@@ -1,79 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=utlui
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-
-SRS1NAME=$(TARGET)
-SRC1FILES = \
- initui.src \
- gloslst.src \
- navipi.src \
- poolfmt.src \
- attrdesc.src \
- unotools.src \
- utlui.src
-
-EXCEPTIONSFILES= \
- $(SLO)$/bookctrl.obj \
- $(SLO)$/glbltree.obj \
- $(SLO)$/navipi.obj \
- $(SLO)$/unotools.obj \
- $(SLO)$/content.obj \
- $(SLO)$/swrenamexnameddlg.obj
-
-SLOFILES = $(EXCEPTIONSFILES) \
- $(SLO)$/condedit.obj \
- $(SLO)$/gloslst.obj \
- $(SLO)$/initui.obj \
- $(SLO)$/navicfg.obj \
- $(SLO)$/numfmtlb.obj \
- $(SLO)$/prcntfld.obj \
- $(SLO)$/textcontrolcombo.obj \
- $(SLO)$/tmplctrl.obj \
- $(SLO)$/uitool.obj \
- $(SLO)$/uiitems.obj \
- $(SLO)$/attrdesc.obj \
- $(SLO)$/shdwcrsr.obj \
- $(SLO)$/zoomctrl.obj \
- $(SLO)$/viewlayoutctrl.obj
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/ui/utlui/navicfg.cxx b/sw/source/ui/utlui/navicfg.cxx
index 435f5583cd30..2edc5e9d8f71 100644
--- a/sw/source/ui/utlui/navicfg.cxx
+++ b/sw/source/ui/utlui/navicfg.cxx
@@ -77,8 +77,8 @@ SwNavigationConfig::SwNavigationConfig() :
nOutlineLevel(MAXLEVEL),
nRegionMode(REGION_MODE_NONE),
nActiveBlock(0),
- bIsSmall(FALSE),
- bIsGlobalActive(TRUE)
+ bIsSmall(sal_False),
+ bIsGlobalActive(sal_True)
{
Sequence<OUString> aNames = GetPropertyNames();
Sequence<Any> aValues = GetProperties(aNames);
diff --git a/sw/source/ui/utlui/navipi.cxx b/sw/source/ui/utlui/navipi.cxx
index 25633a7b691f..3fc2f9c047c7 100644
--- a/sw/source/ui/utlui/navipi.cxx
+++ b/sw/source/ui/utlui/navipi.cxx
@@ -110,7 +110,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 )
@@ -121,8 +121,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();
@@ -134,9 +134,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)
{
@@ -208,7 +208,7 @@ void SwNavigationPI::FillBox()
if(pContentWrtShell)
{
aContentTree.SetHiddenShell( pContentWrtShell );
- aContentTree.Display( FALSE );
+ aContentTree.Display( sal_False );
}
else
{
@@ -223,7 +223,7 @@ void SwNavigationPI::FillBox()
aContentTree.SetActiveShell(pWrtShell);
}
else
- aContentTree.Display( TRUE );
+ aContentTree.Display( sal_True );
pActContView = pView;
}
}
@@ -239,8 +239,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);
@@ -256,7 +256,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;
@@ -265,9 +265,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:
@@ -296,14 +296,14 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox )
_ZoomIn();
}
}
- return TRUE;
+ return sal_True;
//break;
// 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())
@@ -311,13 +311,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())
@@ -325,13 +325,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)
{
@@ -350,7 +350,7 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox )
else if (rSh.GotoPrevFtnAnchor())
nFuncId = FN_PREV_FOOTNOTE;
}
- bFocusToDoc = TRUE;
+ bFocusToDoc = sal_True;
}
break;
@@ -377,7 +377,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 );
}
@@ -390,7 +390,7 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox )
}
if(bFocusToDoc)
pView->GetEditWin().GrabFocus();
- return TRUE;
+ return sal_True;
}
/*------------------------------------------------------------------------
Beschreibung: ClickHandler der Toolboxen
@@ -399,7 +399,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:
@@ -410,7 +410,7 @@ IMPL_LINK( SwNavigationPI, ToolBoxClickHdl, ToolBox *, pBox )
break;
}
- return TRUE;
+ return sal_True;
}
/*-----------------13.07.04 -------------------
@@ -418,12 +418,12 @@ IMPL_LINK( SwNavigationPI, ToolBoxClickHdl, ToolBox *, pBox )
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;
@@ -436,18 +436,18 @@ IMPL_LINK( SwNavigationPI, ToolBoxDropdownClickHdl, ToolBox*, pBox )
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, 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();
@@ -456,25 +456,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;
}
/*-----------------13.07.04 -------------------
@@ -491,7 +491,7 @@ 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);
@@ -499,7 +499,7 @@ void SwNavHelpToolBox::MouseButtonDown(const MouseEvent &rEvt)
/* -----------------------------12.03.2002 16:55------------------------------
---------------------------------------------------------------------------*/
-void SwNavigationPI::CreateNavigationTool(const Rectangle& rRect, BOOL bSetFocus)
+void SwNavigationPI::CreateNavigationTool(const Rectangle& rRect, sal_Bool bSetFocus)
{
// SfxBindings& rBind = GetCreateView()->GetViewFrame()->GetBindings();
// rBind.ENTERREGISTRATIONS();
@@ -527,7 +527,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)));
@@ -548,7 +548,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);
}
@@ -568,7 +568,7 @@ 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;
@@ -578,12 +578,12 @@ IMPL_LINK( SwNavigationPI, EditGetFocus, NumEditAction *, pEdit )
Beschreibung:
------------------------------------------------------------------------*/
-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;
}
/*------------------------------------------------------------------------
@@ -643,7 +643,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();
@@ -662,8 +662,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);
}
}
@@ -681,7 +681,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();
@@ -693,9 +693,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);
}
}
/*------------------------------------------------------------------------
@@ -787,10 +787,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();
@@ -809,15 +809,15 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
pEdit->SetGetFocusHdl(LINK(this, SwNavigationPI, EditGetFocus));
pEdit->SetModifyHdl(LINK(this, SwNavigationPI, PageEditModifyHdl));
- bPageCtrlsVisible = TRUE;
+ bPageCtrlsVisible = sal_True;
// Rectangle aFirstRect = aContentToolBox.GetItemRect(FN_SHOW_ROOT);
-// USHORT nWidth = 2 * (USHORT)aFirstRect.Left();
+// sal_uInt16 nWidth = 2 * (sal_uInt16)aFirstRect.Left();
//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);
@@ -827,7 +827,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);
@@ -875,9 +875,9 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
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 );
@@ -898,7 +898,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);
@@ -946,7 +946,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());
@@ -1022,7 +1022,7 @@ IMPL_LINK( SwNavigationPI, ClosePopupWindow, SfxPopupWindow *, pWindow )
Beschreibung:
------------------------------------------------------------------------*/
-void SwNavigationPI::StateChanged( USHORT nSID, SfxItemState /*eState*/,
+void SwNavigationPI::StateChanged( sal_uInt16 nSID, SfxItemState /*eState*/,
const SfxPoolItem* /*pState*/ )
{
if(nSID == SID_DOCFULLNAME)
@@ -1032,7 +1032,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()) )
@@ -1136,7 +1136,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
@@ -1155,13 +1155,13 @@ 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;
}
@@ -1173,14 +1173,14 @@ IMPL_LINK( SwNavigationPI, MenuSelectHdl, Menu *, pMenu )
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():
@@ -1222,12 +1222,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())
@@ -1238,7 +1238,7 @@ void SwNavigationPI::UpdateListBox()
aDocListBox.SelectEntryPos(nConstPos);
aDocListBox.Enable( !bDisable );
- aDocListBox.SetUpdateMode(TRUE);
+ aDocListBox.SetUpdateMode(sal_True);
}
/*-----------------16.06.97 15:05-------------------
@@ -1275,7 +1275,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;
@@ -1364,12 +1364,12 @@ sal_Int8 SwNavigationPI::ExecuteDrop( const ExecuteDropEvent& rEvt )
--------------------------------------------------*/
-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)
@@ -1387,13 +1387,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();
@@ -1401,8 +1401,8 @@ BOOL SwNavigationPI::ToggleTree()
aContentTree.HideTree();
aContentToolBox.Hide();
aDocListBox.Hide();
- SetGlobalMode(TRUE);
- SetUpdateMode(TRUE);
+ SetGlobalMode(sal_True);
+ SetUpdateMode(sal_True);
}
else
{
@@ -1414,8 +1414,8 @@ BOOL SwNavigationPI::ToggleTree()
aContentToolBox.Show();
aDocListBox.Show();
}
- bRet = FALSE;
- SetGlobalMode(FALSE);
+ bRet = sal_False;
+ SetGlobalMode(sal_False);
}
return bRet;
}
@@ -1423,9 +1423,9 @@ BOOL SwNavigationPI::ToggleTree()
/*-----------------13.06.97 09:42-------------------
--------------------------------------------------*/
-BOOL SwNavigationPI::IsGlobalDoc() const
+sal_Bool SwNavigationPI::IsGlobalDoc() const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwView *pView = GetCreateView();
if(pView)
{
@@ -1482,7 +1482,7 @@ SwView* SwNavigationPI::GetCreateView() const
------------------------------------------------------------------------*/
SwNavigationChild::SwNavigationChild( Window* pParent,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* _pBindings,
SfxChildWinInfo* pInfo )
: SfxChildWindowContext( nId )
@@ -1494,14 +1494,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())
{
@@ -1529,7 +1529,7 @@ void SwNavigationPI::DataChanged( const DataChangedEvent& rDCEvt )
---------------------------------------------------------------------------*/
void SwNavigationPI::InitImageList()
{
- USHORT k;
+ sal_uInt16 k;
ImageList& rImgLst = aContentToolBox.GetSettings().GetStyleSettings().GetHighContrastMode() ?
aContentImageListH : aContentImageList;
@@ -1541,7 +1541,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)
diff --git a/sw/source/ui/utlui/numfmtlb.cxx b/sw/source/ui/utlui/numfmtlb.cxx
index b059c12a4a50..03b3d58ec5a7 100644
--- a/sw/source/ui/utlui/numfmtlb.cxx
+++ b/sw/source/ui/utlui/numfmtlb.cxx
@@ -71,17 +71,17 @@ using namespace ::com::sun::star::lang;
--------------------------------------------------------------------*/
NumFormatListBox::NumFormatListBox( Window* pWin, const ResId& rResId,
- short nFormatType, ULONG nDefFmt,
- BOOL bUsrFmts ) :
+ short nFormatType, sal_uLong nDefFmt,
+ sal_Bool bUsrFmts ) :
ListBox ( pWin, rResId ),
nCurrFormatType (-1),
nStdEntry (0),
- bOneArea (FALSE),
+ bOneArea (sal_False),
nDefFormat (nDefFmt),
pVw (0),
pOwnFormatter (0),
- bShowLanguageControl(FALSE),
- bUseAutomaticLanguage(TRUE)
+ bShowLanguageControl(sal_False),
+ bUseAutomaticLanguage(sal_True)
{
Init(nFormatType, bUsrFmts);
}
@@ -92,16 +92,16 @@ NumFormatListBox::NumFormatListBox( Window* pWin, const ResId& rResId,
NumFormatListBox::NumFormatListBox( Window* pWin, SwView* pView,
const ResId& rResId, short nFormatType,
- ULONG nDefFmt, BOOL bUsrFmts ) :
+ sal_uLong nDefFmt, sal_Bool bUsrFmts ) :
ListBox ( pWin, rResId ),
nCurrFormatType (-1),
nStdEntry (0),
- bOneArea (FALSE),
+ bOneArea (sal_False),
nDefFormat (nDefFmt),
pVw (pView),
pOwnFormatter (0),
- bShowLanguageControl(FALSE),
- bUseAutomaticLanguage(TRUE)
+ bShowLanguageControl(sal_False),
+ bUseAutomaticLanguage(sal_True)
{
Init(nFormatType, bUsrFmts);
}
@@ -110,7 +110,7 @@ NumFormatListBox::NumFormatListBox( Window* pWin, SwView* pView,
*
* --------------------------------------------------*/
-void NumFormatListBox::Init(short nFormatType, BOOL bUsrFmts)
+void NumFormatListBox::Init(short nFormatType, sal_Bool bUsrFmts)
{
SwView *pView = GetView();
@@ -119,7 +119,7 @@ void NumFormatListBox::Init(short nFormatType, BOOL bUsrFmts)
else
eCurLanguage = SvxLocaleToLanguage( SvtSysLocale().GetLocaleData().getLocale() );
- if (bUsrFmts == FALSE)
+ if (bUsrFmts == sal_False)
{
Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
pOwnFormatter = new SvNumberFormatter(xMSF, eCurLanguage);
@@ -242,17 +242,17 @@ void NumFormatListBox::SetFormatType(const short nFormatType)
}
const SvNumberformat* pFmt;
- USHORT nPos, i = 0;
- ULONG nFormat;
+ sal_uInt16 nPos, i = 0;
+ sal_uLong nFormat;
Color* pCol;
double fVal = GetDefValue( nFormatType );
String sValue;
- ULONG nSysNumFmt = pFormatter->GetFormatIndex(
+ sal_uLong nSysNumFmt = pFormatter->GetFormatIndex(
NF_NUMBER_SYSTEM, eCurLanguage );
- ULONG nSysShortDateFmt = pFormatter->GetFormatIndex(
+ sal_uLong nSysShortDateFmt = pFormatter->GetFormatIndex(
NF_DATE_SYSTEM_SHORT, eCurLanguage );
- ULONG nSysLongDateFmt = pFormatter->GetFormatIndex(
+ sal_uLong nSysLongDateFmt = pFormatter->GetFormatIndex(
NF_DATE_SYSTEM_LONG, eCurLanguage );
for( long nIndex = eOffsetStart; nIndex <= eOffsetEnd; ++nIndex )
@@ -302,7 +302,7 @@ void NumFormatListBox::SetFormatType(const short nFormatType)
Beschreibung:
--------------------------------------------------------------------*/
-void NumFormatListBox::SetDefFormat(const ULONG nDefFmt)
+void NumFormatListBox::SetDefFormat(const sal_uLong nDefFmt)
{
if (nDefFmt == ULONG_MAX)
{
@@ -327,11 +327,11 @@ void NumFormatListBox::SetDefFormat(const ULONG nDefFmt)
SetFormatType(nType);
- ULONG nFormat = pFormatter->GetFormatForLanguageIfBuiltIn(nDefFmt, eCurLanguage);
+ sal_uLong nFormat = pFormatter->GetFormatForLanguageIfBuiltIn(nDefFmt, eCurLanguage);
- for (USHORT i = 0; i < GetEntryCount(); i++)
+ for (sal_uInt16 i = 0; i < GetEntryCount(); i++)
{
- if (nFormat == (ULONG)GetEntryData(i))
+ if (nFormat == (sal_uLong)GetEntryData(i))
{
SelectEntryPos(i);
nStdEntry = i;
@@ -353,20 +353,20 @@ void NumFormatListBox::SetDefFormat(const ULONG nDefFmt)
else
pFormatter->GetOutputString(fValue, nDefFmt, sValue, &pCol);
- USHORT nPos = 0;
- while ((ULONG)GetEntryData(nPos) == ULONG_MAX)
+ sal_uInt16 nPos = 0;
+ while ((sal_uLong)GetEntryData(nPos) == ULONG_MAX)
nPos++;
//
- ULONG nSysNumFmt = pFormatter->GetFormatIndex( NF_NUMBER_SYSTEM, eCurLanguage);
- ULONG nSysShortDateFmt = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_SHORT, eCurLanguage);
- ULONG nSysLongDateFmt = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_LONG, eCurLanguage);
- BOOL bSysLang = FALSE;
+ sal_uLong nSysNumFmt = pFormatter->GetFormatIndex( NF_NUMBER_SYSTEM, eCurLanguage);
+ sal_uLong nSysShortDateFmt = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_SHORT, eCurLanguage);
+ sal_uLong nSysLongDateFmt = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_LONG, eCurLanguage);
+ sal_Bool bSysLang = sal_False;
if( eCurLanguage == GetAppLanguage() )
- bSysLang = TRUE;
- ULONG nNumFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysNumFmt, LANGUAGE_SYSTEM );
- ULONG nShortDateFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysShortDateFmt, LANGUAGE_SYSTEM );
- ULONG nLongDateFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysLongDateFmt, LANGUAGE_SYSTEM );
+ bSysLang = sal_True;
+ sal_uLong nNumFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysNumFmt, LANGUAGE_SYSTEM );
+ sal_uLong nShortDateFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysShortDateFmt, LANGUAGE_SYSTEM );
+ sal_uLong nLongDateFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysLongDateFmt, LANGUAGE_SYSTEM );
if (
nDefFmt == nSysNumFmt ||
@@ -395,11 +395,11 @@ void NumFormatListBox::SetDefFormat(const ULONG nDefFmt)
Beschreibung:
--------------------------------------------------------------------*/
-ULONG NumFormatListBox::GetFormat() const
+sal_uLong NumFormatListBox::GetFormat() const
{
- USHORT nPos = GetSelectEntryPos();
+ sal_uInt16 nPos = GetSelectEntryPos();
- return (ULONG)GetEntryData(nPos);
+ return (sal_uLong)GetEntryData(nPos);
}
/*--------------------------------------------------------------------
@@ -408,7 +408,7 @@ ULONG NumFormatListBox::GetFormat() const
IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox )
{
- USHORT nPos = pBox->GetSelectEntryPos();
+ sal_uInt16 nPos = pBox->GetSelectEntryPos();
String sDefine(SW_RES( STR_DEFINE_NUMBERFORMAT ));
SwView *pView = GetView();
@@ -428,7 +428,7 @@ IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox )
double fValue = GetDefValue( nCurrFormatType);
- ULONG nFormat = pFormatter->GetStandardFormat( nCurrFormatType, eCurLanguage);
+ sal_uLong nFormat = pFormatter->GetStandardFormat( nCurrFormatType, eCurLanguage);
aCoreSet.Put( SfxUInt32Item( SID_ATTR_NUMBERFORMAT_VALUE, nFormat ));
aCoreSet.Put( SvxNumberInfoItem( pFormatter, fValue,
@@ -457,15 +457,15 @@ IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox )
{
const sal_uInt32* pDelArr = ((SvxNumberInfoItem*)pItem)->GetDelArray();
- for ( USHORT i = 0; i < ((SvxNumberInfoItem*)pItem)->GetDelCount(); i++ )
+ for ( sal_uInt16 i = 0; i < ((SvxNumberInfoItem*)pItem)->GetDelCount(); i++ )
pFormatter->DeleteEntry( pDelArr[i] );
}
const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
if( SFX_ITEM_SET == pOutSet->GetItemState(
- SID_ATTR_NUMBERFORMAT_VALUE, FALSE, &pItem ))
+ SID_ATTR_NUMBERFORMAT_VALUE, sal_False, &pItem ))
{
- UINT32 nNumberFormat = ((SfxUInt32Item*)pItem)->GetValue();
+ sal_uInt32 nNumberFormat = ((SfxUInt32Item*)pItem)->GetValue();
// oj #105473# change order of calls
const SvNumberformat* pFmt = pFormatter->GetEntry(nNumberFormat);
if( pFmt )
@@ -474,7 +474,7 @@ IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox )
SetDefFormat(nNumberFormat);
}
if( bShowLanguageControl && SFX_ITEM_SET == pOutSet->GetItemState(
- SID_ATTR_NUMBERFORMAT_ADD_AUTO, FALSE, &pItem ))
+ SID_ATTR_NUMBERFORMAT_ADD_AUTO, sal_False, &pItem ))
{
bUseAutomaticLanguage = ((const SfxBoolItem*)pItem)->GetValue();
}
@@ -507,7 +507,7 @@ double NumFormatListBox::GetDefValue(const short nFormatType) const
break;
/* {
String sValue("31.8.1997 16:57:34");
- ULONG nFormat = pFormatter->GetStandardFormat(nFormatType, LANGUAGE_GERMAN);
+ sal_uLong nFormat = pFormatter->GetStandardFormat(nFormatType, LANGUAGE_GERMAN);
pFormatter->IsNumberFormat( sValue, nFormat, fDefValue );
}
break;*/
diff --git a/sw/source/ui/utlui/prcntfld.cxx b/sw/source/ui/utlui/prcntfld.cxx
index 9ab9d9f47b34..f439c1fe1139 100644
--- a/sw/source/ui/utlui/prcntfld.cxx
+++ b/sw/source/ui/utlui/prcntfld.cxx
@@ -74,7 +74,7 @@ void PercentField::SetRefValue(sal_Int64 nValue)
Beschreibung:
--------------------------------------------------------------------*/
-void PercentField::ShowPercent(BOOL bPercent)
+void PercentField::ShowPercent(sal_Bool bPercent)
{
if ((bPercent && GetUnit() == FUNIT_CUSTOM) ||
(!bPercent && GetUnit() != FUNIT_CUSTOM))
@@ -293,10 +293,10 @@ sal_Int64 PercentField::DenormalizePercent(sal_Int64 nValue)
Beschreibung:
--------------------------------------------------------------------*/
-BOOL PercentField::IsValueModified()
+sal_Bool PercentField::IsValueModified()
{
if (GetUnit() == FUNIT_CUSTOM)
- return TRUE;
+ return sal_True;
else
return MetricField::IsValueModified();
}
@@ -305,9 +305,9 @@ BOOL PercentField::IsValueModified()
Beschreibung:
--------------------------------------------------------------------*/
-sal_Int64 PercentField::ImpPower10( USHORT n )
+sal_Int64 PercentField::ImpPower10( sal_uInt16 n )
{
- USHORT i;
+ sal_uInt16 i;
sal_Int64 nValue = 1;
for ( i=0; i < n; i++ )
diff --git a/sw/source/ui/utlui/shdwcrsr.cxx b/sw/source/ui/utlui/shdwcrsr.cxx
index a5c2e6dfe419..58acbd39d8ec 100644
--- a/sw/source/ui/utlui/shdwcrsr.cxx
+++ b/sw/source/ui/utlui/shdwcrsr.cxx
@@ -44,7 +44,7 @@ SwShadowCursor::~SwShadowCursor()
DrawCrsr( aOldPt, nOldHeight, nOldMode );
}
-void SwShadowCursor::SetPos( const Point& rPt, long nHeight, USHORT nMode )
+void SwShadowCursor::SetPos( const Point& rPt, long nHeight, sal_uInt16 nMode )
{
Point aPt( pWin->LogicToPixel( rPt ));
nHeight = pWin->LogicToPixel( Size( 0, nHeight )).Height();
@@ -60,7 +60,7 @@ void SwShadowCursor::SetPos( const Point& rPt, long nHeight, USHORT nMode )
}
}
-void SwShadowCursor::DrawTri( const Point& rPt, long nHeight, BOOL bLeft )
+void SwShadowCursor::DrawTri( const Point& rPt, long nHeight, sal_Bool bLeft )
{
long nLineDiff = ( nHeight / 2 );
long nLineDiffHalf = nLineDiff / 2;
@@ -79,7 +79,7 @@ void SwShadowCursor::DrawTri( const Point& rPt, long nHeight, BOOL bLeft )
}
}
-void SwShadowCursor::DrawCrsr( const Point& rPt, long nHeight, USHORT nMode )
+void SwShadowCursor::DrawCrsr( const Point& rPt, long nHeight, sal_uInt16 nMode )
{
nHeight = (((nHeight / 4)+1) * 4) + 1;
@@ -96,9 +96,9 @@ void SwShadowCursor::DrawCrsr( const Point& rPt, long nHeight, USHORT nMode )
// 2. das Dreieck
if( text::HoriOrientation::LEFT == nMode || text::HoriOrientation::CENTER == nMode ) // Pfeil nach rechts
- DrawTri( rPt, nHeight, FALSE );
+ DrawTri( rPt, nHeight, sal_False );
if( text::HoriOrientation::RIGHT == nMode || text::HoriOrientation::CENTER == nMode ) // Pfeil nach links
- DrawTri( rPt, nHeight, TRUE );
+ DrawTri( rPt, nHeight, sal_True );
pWin->Pop();
}
diff --git a/sw/source/ui/utlui/textcontrolcombo.cxx b/sw/source/ui/utlui/textcontrolcombo.cxx
index c5325b554548..629d527ca872 100644
--- a/sw/source/ui/utlui/textcontrolcombo.cxx
+++ b/sw/source/ui/utlui/textcontrolcombo.cxx
@@ -45,7 +45,7 @@ TextControlCombo::~TextControlCombo()
{
}
-void TextControlCombo::Arrange( FixedText& _rFTcomplete, BOOL /*bShow*/ )
+void TextControlCombo::Arrange( FixedText& _rFTcomplete, sal_Bool /*bShow*/ )
{
Point aBasePos( GetPosPixel() );
Size aMetricVals( GetSizePixel() );
@@ -96,14 +96,14 @@ void TextControlCombo::Arrange( FixedText& _rFTcomplete, BOOL /*bShow*/ )
Window::Hide();
}
-void TextControlCombo::Show( BOOL _bVisible, USHORT _nFlags )
+void TextControlCombo::Show( sal_Bool _bVisible, sal_uInt16 _nFlags )
{
mrCtrl.Show( _bVisible, _nFlags );
mrFTbefore.Show( _bVisible, _nFlags );
mrFTafter.Show( _bVisible, _nFlags );
}
-void TextControlCombo::Enable( BOOL _bEnable, BOOL _bChild )
+void TextControlCombo::Enable( sal_Bool _bEnable, sal_Bool _bChild )
{
mrCtrl.Enable( _bEnable, _bChild );
mrFTbefore.Enable( _bEnable, _bChild );
diff --git a/sw/source/ui/utlui/tmplctrl.cxx b/sw/source/ui/utlui/tmplctrl.cxx
index df78a355d8c8..bcae8fa9cd24 100644
--- a/sw/source/ui/utlui/tmplctrl.cxx
+++ b/sw/source/ui/utlui/tmplctrl.cxx
@@ -61,10 +61,10 @@ class TemplatePopup_Impl : public PopupMenu
public:
TemplatePopup_Impl();
- USHORT GetCurId() const { return nCurId; }
+ sal_uInt16 GetCurId() const { return nCurId; }
private:
- USHORT nCurId;
+ sal_uInt16 nCurId;
virtual void Select();
};
@@ -86,8 +86,8 @@ void TemplatePopup_Impl::Select()
// class SvxZoomStatusBarControl ------------------------------------------
-SwTemplateControl::SwTemplateControl( USHORT _nSlotId,
- USHORT _nId,
+SwTemplateControl::SwTemplateControl( sal_uInt16 _nSlotId,
+ sal_uInt16 _nId,
StatusBar& rStb ) :
SfxStatusBarControl( _nSlotId, _nId, rStb )
{
@@ -102,7 +102,7 @@ SwTemplateControl::~SwTemplateControl()
// -----------------------------------------------------------------------
void SwTemplateControl::StateChanged(
- USHORT /*nSID*/, SfxItemState eState, const SfxPoolItem* pState )
+ sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState )
{
if( eState != SFX_ITEM_AVAILABLE || pState->ISA( SfxVoidItem ) )
GetStatusBar().SetItemText( GetId(), String() );
@@ -142,7 +142,7 @@ void SwTemplateControl::Command( const CommandEvent& rCEvt )
pPool->SetSearchMask(SFX_STYLE_FAMILY_PAGE, SFXSTYLEBIT_ALL);
if( pPool->Count() > 1 )
{
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
SfxStyleSheetBase* pStyle = pPool->First();
while( pStyle )
{
@@ -152,7 +152,7 @@ void SwTemplateControl::Command( const CommandEvent& rCEvt )
}
aPop.Execute( &GetStatusBar(), rCEvt.GetMousePosPixel());
- USHORT nCurrId = aPop.GetCurId();
+ sal_uInt16 nCurrId = aPop.GetCurId();
if( nCurrId != USHRT_MAX)
{
// sieht etwas umstaendlich aus, anders geht's aber nicht
diff --git a/sw/source/ui/utlui/uiitems.cxx b/sw/source/ui/utlui/uiitems.cxx
index baaff628fe5b..b539adea4353 100644
--- a/sw/source/ui/utlui/uiitems.cxx
+++ b/sw/source/ui/utlui/uiitems.cxx
@@ -47,7 +47,7 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
// Breitenangaben der Fussnotenlinien, mit TabPage abstimmen
-static const USHORT __FAR_DATA nFtnLines[] = {
+static const sal_uInt16 __FAR_DATA nFtnLines[] = {
0,
10,
50,
@@ -59,7 +59,7 @@ static const USHORT __FAR_DATA nFtnLines[] = {
#define FTN_LINE_STYLE_COUNT 5
-SwPageFtnInfoItem::SwPageFtnInfoItem( const USHORT nId, SwPageFtnInfo& rInfo) :
+SwPageFtnInfoItem::SwPageFtnInfoItem( const sal_uInt16 nId, SwPageFtnInfo& rInfo) :
SfxPoolItem( nId ),
aFtnInfo(rInfo)
{
@@ -108,7 +108,7 @@ SfxItemPresentation SwPageFtnInfoItem::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nHght = (USHORT) GetPageFtnInfo().GetHeight();
+ sal_uInt16 nHght = (sal_uInt16) GetPageFtnInfo().GetHeight();
if ( nHght )
{
rText = SW_RESSTR( STR_MAX_FTN_HEIGHT );
@@ -125,7 +125,7 @@ SfxItemPresentation SwPageFtnInfoItem::GetPresentation
/* -----------------------------26.04.01 12:25--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwPageFtnInfoItem::QueryValue( Any& rVal, BYTE nMemberId ) const
+sal_Bool SwPageFtnInfoItem::QueryValue( Any& rVal, sal_uInt8 nMemberId ) const
{
sal_Bool bRet = sal_True;
switch(nMemberId & ~CONVERT_TWIPS)
@@ -151,7 +151,7 @@ BOOL SwPageFtnInfoItem::QueryValue( Any& rVal, BYTE nMemberId ) const
/* -----------------------------26.04.01 12:26--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwPageFtnInfoItem::PutValue(const Any& rVal, BYTE nMemberId)
+sal_Bool SwPageFtnInfoItem::PutValue(const Any& rVal, sal_uInt8 nMemberId)
{
sal_Int32 nSet32 = 0;
sal_Bool bRet = sal_True;
@@ -214,7 +214,7 @@ BOOL SwPageFtnInfoItem::PutValue(const Any& rVal, BYTE nMemberId)
return bRet;
}
-SwPtrItem::SwPtrItem( const USHORT nId, void* pPtr ) :
+SwPtrItem::SwPtrItem( const sal_uInt16 nId, void* pPtr ) :
SfxPoolItem( nId ),
pMisc(pPtr)
{
@@ -256,7 +256,7 @@ int SwPtrItem::operator==( const SfxPoolItem& rAttr ) const
/*-----------------12.11.97 12:55-------------------------------
SwUINumRuleItem fuer die NumTabPages der FormatNumRule/Stylisten
---------------------------------------------------------------*/
-SwUINumRuleItem::SwUINumRuleItem( const SwNumRule& rRul, const USHORT nId )
+SwUINumRuleItem::SwUINumRuleItem( const SwNumRule& rRul, const sal_uInt16 nId )
: SfxPoolItem( nId ), pRule( new SwNumRule( rRul ) )
{
}
@@ -284,13 +284,13 @@ int SwUINumRuleItem::operator==( const SfxPoolItem& rAttr ) const
return *pRule == *((SwUINumRuleItem&)rAttr).pRule;
}
-BOOL SwUINumRuleItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const
+sal_Bool SwUINumRuleItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
{
uno::Reference< container::XIndexReplace >xRules = new SwXNumberingRules(*pRule);
rVal.setValue(&xRules, ::getCppuType((uno::Reference< container::XIndexReplace>*)0));
- return TRUE;
+ return sal_True;
}
-BOOL SwUINumRuleItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ )
+sal_Bool SwUINumRuleItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
{
uno::Reference< container::XIndexReplace> xRulesRef;
if(rVal >>= xRulesRef)
@@ -303,12 +303,12 @@ BOOL SwUINumRuleItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ )
*pRule = *pSwXRules->GetNumRule();
}
}
- return TRUE;
+ return sal_True;
}
/* -----------------17.06.98 17:43-------------------
*
* --------------------------------------------------*/
-SwBackgroundDestinationItem::SwBackgroundDestinationItem(USHORT _nWhich, USHORT nValue) :
+SwBackgroundDestinationItem::SwBackgroundDestinationItem(sal_uInt16 _nWhich, sal_uInt16 nValue) :
SfxUInt16Item(_nWhich, nValue)
{
}
diff --git a/sw/source/ui/utlui/uitool.cxx b/sw/source/ui/utlui/uitool.cxx
index 32c355313d7f..9ccb68c3bef4 100644
--- a/sw/source/ui/utlui/uitool.cxx
+++ b/sw/source/ui/utlui/uitool.cxx
@@ -134,14 +134,14 @@ void PrepareBoxInfo(SfxItemSet& rSet, const SwWrtShell& rSh)
SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
const SfxPoolItem *pBoxInfo;
if ( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BORDER_INNER,
- TRUE, &pBoxInfo))
+ sal_True, &pBoxInfo))
aBoxInfo = *(SvxBoxInfoItem*)pBoxInfo;
// Tabellenvariante, wenn mehrere Tabellenzellen selektiert
rSh.GetCrsr(); //Damit GetCrsrCnt() auch das Richtige liefert
aBoxInfo.SetTable (rSh.IsTableMode() && rSh.GetCrsrCnt() > 1);
// Abstandsfeld immer anzeigen
- aBoxInfo.SetDist ((BOOL) TRUE);
+ aBoxInfo.SetDist ((sal_Bool) sal_True);
// Minimalgroesse in Tabellen und Absaetzen setzen
aBoxInfo.SetMinDist (rSh.IsTableMode() || rSh.GetSelectionType() & (nsSelectionType::SEL_TXT | nsSelectionType::SEL_TBL));
// Default-Abstand immer setzen
@@ -193,7 +193,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
{
const SvxPageItem& rPageItem = (const SvxPageItem&)rSet.Get(SID_ATTR_PAGE);
- USHORT nUse = (USHORT)rPageItem.GetPageUsage();
+ sal_uInt16 nUse = (sal_uInt16)rPageItem.GetPageUsage();
if(nUse & 0x04)
nUse |= 0x03;
if(nUse)
@@ -216,7 +216,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
//
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_PAGE_HEADERSET,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
{
const SfxItemSet& rHeaderSet = ((SvxSetItem*)pItem)->GetItemSet();
const SfxBoolItem& rHeaderOn = (const SfxBoolItem&)rHeaderSet.Get(SID_ATTR_PAGE_ON);
@@ -225,7 +225,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
{
// Werte uebernehmen
if(!rMaster.GetHeader().IsActive())
- rMaster.SetFmtAttr(SwFmtHeader(TRUE));
+ rMaster.SetFmtAttr(SwFmtHeader(sal_True));
// Das Headerformat rausholen und anpassen
//
@@ -243,8 +243,8 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
//
if(rMaster.GetHeader().IsActive())
{
- rMaster.SetFmtAttr(SwFmtHeader(BOOL(FALSE)));
- rPageDesc.ChgHeaderShare(FALSE);
+ rMaster.SetFmtAttr(SwFmtHeader(sal_Bool(sal_False)));
+ rPageDesc.ChgHeaderShare(sal_False);
}
}
}
@@ -252,7 +252,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
// Fusszeilen-Attribute auswerten
//
if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_PAGE_FOOTERSET,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
{
const SfxItemSet& rFooterSet = ((SvxSetItem*)pItem)->GetItemSet();
const SfxBoolItem& rFooterOn = (const SfxBoolItem&)rFooterSet.Get(SID_ATTR_PAGE_ON);
@@ -261,7 +261,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
{
// Werte uebernehmen
if(!rMaster.GetFooter().IsActive())
- rMaster.SetFmtAttr(SwFmtFooter(TRUE));
+ rMaster.SetFmtAttr(SwFmtFooter(sal_True));
// Das Footerformat rausholen und anpassen
//
@@ -279,8 +279,8 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
//
if(rMaster.GetFooter().IsActive())
{
- rMaster.SetFmtAttr(SwFmtFooter(BOOL(FALSE)));
- rPageDesc.ChgFooterShare(FALSE);
+ rMaster.SetFmtAttr(SwFmtFooter(sal_Bool(sal_False)));
+ rPageDesc.ChgFooterShare(sal_False);
}
}
}
@@ -288,7 +288,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
// Fussnoten
//
if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_FTN_INFO,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
rPageDesc.SetFtnInfo( ((SwPageFtnInfoItem*)pItem)->GetPageFtnInfo() );
@@ -299,20 +299,20 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
// Registerhaltigkeit
if(SFX_ITEM_SET == rSet.GetItemState(
- SID_SWREGISTER_MODE, FALSE, &pItem))
+ SID_SWREGISTER_MODE, sal_False, &pItem))
{
- BOOL bSet = ((const SfxBoolItem*)pItem)->GetValue();
+ sal_Bool bSet = ((const SfxBoolItem*)pItem)->GetValue();
if(!bSet)
rPageDesc.SetRegisterFmtColl(0);
else if(SFX_ITEM_SET == rSet.GetItemState(
- SID_SWREGISTER_COLLECTION, FALSE, &pItem))
+ SID_SWREGISTER_COLLECTION, sal_False, &pItem))
{
const String& rColl = ((const SfxStringItem*)pItem)->GetValue();
SwDoc& rDoc = *rMaster.GetDoc();
SwTxtFmtColl* pColl = rDoc.FindTxtFmtCollByName( rColl );
if( !pColl )
{
- USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName( rColl, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
+ sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( rColl, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
if( USHRT_MAX != nId )
pColl = rDoc.GetTxtCollFromPool( nId );
else
@@ -320,7 +320,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
(SwTxtFmtColl*)rDoc.GetDfltTxtFmtColl() );
}
if( pColl )
- pColl->SetFmtAttr( SwRegisterItem ( TRUE ));
+ pColl->SetFmtAttr( SwRegisterItem ( sal_True ));
rPageDesc.SetRegisterFmtColl( pColl );
}
}
@@ -359,14 +359,14 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet)
SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
const SfxPoolItem *pBoxInfo;
if ( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BORDER_INNER,
- TRUE, &pBoxInfo) )
+ sal_True, &pBoxInfo) )
aBoxInfo = *(SvxBoxInfoItem*)pBoxInfo;
- aBoxInfo.SetTable( FALSE );
+ aBoxInfo.SetTable( sal_False );
// Abstandsfeld immer anzeigen
- aBoxInfo.SetDist( TRUE);
+ aBoxInfo.SetDist( sal_True);
// Minimalgroesse in Tabellen und Absaetzen setzen
- aBoxInfo.SetMinDist( FALSE );
+ aBoxInfo.SetMinDist( sal_False );
// Default-Abstand immer setzen
aBoxInfo.SetDefDist( MIN_BORDER_DIST );
// Einzelne Linien koennen nur in Tabellen DontCare-Status haben
@@ -398,7 +398,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet)
// dynamische oder feste Hoehe
//
- SfxBoolItem aOn(SID_ATTR_PAGE_ON, TRUE);
+ SfxBoolItem aOn(SID_ATTR_PAGE_ON, sal_True);
aHeaderSet.Put(aOn);
const SwFmtFrmSize &rFrmSize = pHeaderFmt->GetFrmSize();
@@ -444,7 +444,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet)
// dynamische oder feste Hoehe
//
- SfxBoolItem aOn(SID_ATTR_PAGE_ON, TRUE);
+ SfxBoolItem aOn(SID_ATTR_PAGE_ON, sal_True);
aFooterSet.Put(aOn);
const SwFmtFrmSize &rFrmSize = pFooterFmt->GetFrmSize();
@@ -510,11 +510,11 @@ void MakeDefTabs(SwTwips nDefDist, SvxTabStopItem& rTabs)
--------------------------------------------------------------------*/
-USHORT GetTabDist(const SvxTabStopItem& rTabs)
+sal_uInt16 GetTabDist(const SvxTabStopItem& rTabs)
{
- USHORT nDefDist;
+ sal_uInt16 nDefDist;
if( rTabs.Count() )
- nDefDist = (USHORT)( rTabs[0].GetTabPos() );
+ nDefDist = (sal_uInt16)( rTabs[0].GetTabPos() );
else
nDefDist = 1134; // 2cm
return nDefDist;
@@ -527,14 +527,14 @@ void SfxToSwPageDescAttr( const SwWrtShell& rShell, SfxItemSet& rSet )
const SfxPoolItem* pItem;
SwFmtPageDesc aPgDesc;
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
// Seitennummer
- if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_PARA_PAGENUM, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_PARA_PAGENUM, sal_False, &pItem))
{
aPgDesc.SetNumOffset(((SfxUInt16Item*)pItem)->GetValue());
- bChanged = TRUE;
+ bChanged = sal_True;
}
- if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_PARA_MODEL, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_PARA_MODEL, sal_False, &pItem ))
{
const String& rDescName = ((SvxPageModelItem*)pItem)->GetValue();
if( rDescName.Len() ) // kein Name -> PageDesc ausschalten!
@@ -542,18 +542,18 @@ void SfxToSwPageDescAttr( const SwWrtShell& rShell, SfxItemSet& rSet )
// nur loeschen, wenn PageDesc eingschaltet wird!
rSet.ClearItem( RES_BREAK );
SwPageDesc* pDesc = ((SwWrtShell&)rShell).FindPageDescByName(
- rDescName, TRUE );
+ rDescName, sal_True );
if( pDesc )
pDesc->Add( &aPgDesc );
}
rSet.ClearItem( SID_ATTR_PARA_MODEL );
- bChanged = TRUE;
+ bChanged = sal_True;
}
else
{
SfxItemSet aCoreSet(rShell.GetView().GetPool(), RES_PAGEDESC, RES_PAGEDESC );
rShell.GetCurAttr( aCoreSet );
- if(SFX_ITEM_SET == aCoreSet.GetItemState( RES_PAGEDESC, TRUE, &pItem ) )
+ if(SFX_ITEM_SET == aCoreSet.GetItemState( RES_PAGEDESC, sal_True, &pItem ) )
{
if( ((SwFmtPageDesc*)pItem)->GetPageDesc() )
{
@@ -573,9 +573,9 @@ void SwToSfxPageDescAttr( SfxItemSet& rCoreSet )
{
const SfxPoolItem* pItem = 0;
String aName;
- USHORT nPageNum = 0;
- BOOL bPut = TRUE;
- switch( rCoreSet.GetItemState( RES_PAGEDESC, TRUE, &pItem ) )
+ sal_uInt16 nPageNum = 0;
+ sal_Bool bPut = sal_True;
+ switch( rCoreSet.GetItemState( RES_PAGEDESC, sal_True, &pItem ) )
{
case SFX_ITEM_SET:
{
@@ -593,13 +593,13 @@ void SwToSfxPageDescAttr( SfxItemSet& rCoreSet )
break;
default:
- bPut = FALSE;
+ bPut = sal_False;
}
SfxUInt16Item aPageNum( SID_ATTR_PARA_PAGENUM, nPageNum );
rCoreSet.Put( aPageNum );
if(bPut)
- rCoreSet.Put( SvxPageModelItem( aName, TRUE, SID_ATTR_PARA_MODEL ) );
+ rCoreSet.Put( SvxPageModelItem( aName, sal_True, SID_ATTR_PARA_MODEL ) );
}
/*--------------------------------------------------------------------
@@ -607,7 +607,7 @@ void SwToSfxPageDescAttr( SfxItemSet& rCoreSet )
--------------------------------------------------------------------*/
-FieldUnit GetDfltMetric(BOOL bWeb)
+FieldUnit GetDfltMetric(sal_Bool bWeb)
{
return SW_MOD()->GetUsrPref(bWeb)->GetMetric();
}
@@ -617,7 +617,7 @@ FieldUnit GetDfltMetric(BOOL bWeb)
--------------------------------------------------------------------*/
-void SetDfltMetric( FieldUnit eMetric, BOOL bWeb )
+void SetDfltMetric( FieldUnit eMetric, sal_Bool bWeb )
{
SW_MOD()->ApplyUserMetric(eMetric, bWeb);
}
@@ -625,9 +625,9 @@ void SetDfltMetric( FieldUnit eMetric, BOOL bWeb )
/*-----------------09.04.98 16:58-------------------
--------------------------------------------------*/
-USHORT InsertStringSorted(const String& rEntry, ListBox& rToFill, USHORT nOffset )
+sal_uInt16 InsertStringSorted(const String& rEntry, ListBox& rToFill, sal_uInt16 nOffset )
{
- USHORT i = nOffset;
+ sal_uInt16 i = nOffset;
CollatorWrapper& rCaseColl = ::GetAppCaseCollator();
for( ; i < rToFill.GetEntryCount(); i++ )
@@ -637,9 +637,9 @@ USHORT InsertStringSorted(const String& rEntry, ListBox& rToFill, USHORT nOffset
}
return rToFill.InsertEntry(rEntry, i);
}
-void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, BOOL bSorted, BOOL bWithDefault)
+void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, sal_Bool bSorted, sal_Bool bWithDefault)
{
- BOOL bHasOffset = rToFill.GetEntryCount() > 0;
+ sal_Bool bHasOffset = rToFill.GetEntryCount() > 0;
SfxStyleSheetBasePool* pPool = pDocSh->GetStyleSheetPool();
pPool->SetSearchMask(SFX_STYLE_FAMILY_CHAR, SFXSTYLEBIT_ALL);
SwDoc* pDoc = pDocSh->GetDoc();
@@ -650,7 +650,7 @@ void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, BOOL bSorted, BO
{
if(bWithDefault || pBase->GetName() != sStandard)
{
- USHORT nPos;
+ sal_uInt16 nPos;
if(bSorted)
nPos = InsertStringSorted(pBase->GetName(), rToFill, bHasOffset );
else
@@ -662,7 +662,7 @@ void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, BOOL bSorted, BO
}
// non-pool styles
const SwCharFmts* pFmts = pDoc->GetCharFmts();
- for(USHORT i = 0; i < pFmts->Count(); i++)
+ for(sal_uInt16 i = 0; i < pFmts->Count(); i++)
{
const SwCharFmt* pFmt = (*pFmts)[i];
if(pFmt->IsDefault())
@@ -670,7 +670,7 @@ void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, BOOL bSorted, BO
const String& rName = pFmt->GetName();
if(rToFill.GetEntryPos(rName) == LISTBOX_ENTRY_NOTFOUND)
{
- USHORT nPos;
+ sal_uInt16 nPos;
if(bSorted)
nPos = InsertStringSorted(rName, rToFill, bHasOffset );
else
@@ -684,7 +684,7 @@ void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, BOOL bSorted, BO
/* -----------------27.04.98 08:26-------------------
*
* --------------------------------------------------*/
-SwTwips GetTableWidth( SwFrmFmt* pFmt, SwTabCols& rCols, USHORT *pPercent,
+SwTwips GetTableWidth( SwFrmFmt* pFmt, SwTabCols& rCols, sal_uInt16 *pPercent,
SwWrtShell* pSh )
{
//Die Breite zu besorgen ist etwas komplizierter.
@@ -733,19 +733,19 @@ String GetAppLangDateTimeString( const DateTime& rDT )
const SvtSysLocale aSysLocale;
const LocaleDataWrapper& rAppLclData = aSysLocale.GetLocaleData();
String sRet( rAppLclData.getDate( rDT ));
- ( sRet += ' ' ) += rAppLclData.getTime( rDT, FALSE, FALSE );
+ ( sRet += ' ' ) += rAppLclData.getTime( rDT, sal_False, sal_False );
return sRet;
}
/*-- 26.01.2006 08:06:33---------------------------------------------------
-----------------------------------------------------------------------*/
-bool ExecuteMenuCommand( PopupMenu& rMenu, SfxViewFrame& rViewFrame, USHORT nId )
+bool ExecuteMenuCommand( PopupMenu& rMenu, SfxViewFrame& rViewFrame, sal_uInt16 nId )
{
bool bRet = false;
- USHORT nItemCount = rMenu.GetItemCount();
+ sal_uInt16 nItemCount = rMenu.GetItemCount();
String sCommand;
- for( USHORT nItem = 0; nItem < nItemCount; ++nItem)
+ for( sal_uInt16 nItem = 0; nItem < nItemCount; ++nItem)
{
PopupMenu* pPopup = rMenu.GetPopupMenu( rMenu.GetItemId( nItem ) );
if(pPopup)
diff --git a/sw/source/ui/utlui/unotools.cxx b/sw/source/ui/utlui/unotools.cxx
index e944c3b383cf..42df7d4a8dac 100644
--- a/sw/source/ui/utlui/unotools.cxx
+++ b/sw/source/ui/utlui/unotools.cxx
@@ -169,7 +169,7 @@ void SwOneExampleFrame::CreateControl()
uno::Sequence<beans::PropertyValue> aSeq(3);
beans::PropertyValue* pValues = aSeq.getArray();
pValues[0].Name = C2U("ReadOnly");
- BOOL bTrue = sal_True;
+ sal_Bool bTrue = sal_True;
pValues[0].Value.setValue(&bTrue, ::getBooleanCppuType());
pValues[1].Name = C2U("OpenFlags");
pValues[1].Value <<= C2U("-RB");
@@ -367,7 +367,7 @@ IMPL_LINK( SwOneExampleFrame, TimeoutHdl, Timer*, pTimer )
/* -----------------------------27.12.99 09:59--------------------------------
---------------------------------------------------------------------------*/
-void SwOneExampleFrame::ClearDocument( BOOL bStartUpdateTimer )
+void SwOneExampleFrame::ClearDocument( sal_Bool bStartUpdateTimer )
{
uno::Reference< lang::XUnoTunnel> xTunnel( _xCursor, uno::UNO_QUERY);
if( xTunnel.is() )
@@ -392,8 +392,8 @@ void SwOneExampleFrame::ClearDocument( BOOL bStartUpdateTimer )
}
else
{
- _xCursor->gotoStart(FALSE);
- _xCursor->gotoEnd(TRUE);
+ _xCursor->gotoStart(sal_False);
+ _xCursor->gotoEnd(sal_True);
_xCursor->setString(OUString());
}
}
diff --git a/sw/source/ui/utlui/viewlayoutctrl.cxx b/sw/source/ui/utlui/viewlayoutctrl.cxx
index dbee2286731a..1b755391c319 100644
--- a/sw/source/ui/utlui/viewlayoutctrl.cxx
+++ b/sw/source/ui/utlui/viewlayoutctrl.cxx
@@ -58,7 +58,7 @@ const long nImageHeight = 11;
struct SwViewLayoutControl::SwViewLayoutControl_Impl
{
- USHORT mnState; // 0 = single, 1 = auto, 2 = book, 3 = none
+ sal_uInt16 mnState; // 0 = single, 1 = auto, 2 = book, 3 = none
Image maImageSingleColumn;
Image maImageSingleColumn_Active;
Image maImageAutomatic;
@@ -69,7 +69,7 @@ struct SwViewLayoutControl::SwViewLayoutControl_Impl
// class SwViewLayoutControl ------------------------------------------
-SwViewLayoutControl::SwViewLayoutControl( USHORT _nSlotId, USHORT _nId, StatusBar& rStb ) :
+SwViewLayoutControl::SwViewLayoutControl( sal_uInt16 _nSlotId, sal_uInt16 _nId, StatusBar& rStb ) :
SfxStatusBarControl( _nSlotId, _nId, rStb ),
mpImpl( new SwViewLayoutControl_Impl )
{
@@ -93,14 +93,14 @@ SwViewLayoutControl::~SwViewLayoutControl()
// -----------------------------------------------------------------------
-void SwViewLayoutControl::StateChanged( USHORT /*nSID*/, SfxItemState eState, const SfxPoolItem* pState )
+void SwViewLayoutControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState )
{
if ( SFX_ITEM_AVAILABLE != eState || pState->ISA( SfxVoidItem ) )
GetStatusBar().SetItemText( GetId(), String() );
else
{
DBG_ASSERT( pState->ISA( SvxViewLayoutItem ), "invalid item type" );
- const USHORT nColumns = static_cast<const SvxViewLayoutItem*>( pState )->GetValue();
+ const sal_uInt16 nColumns = static_cast<const SvxViewLayoutItem*>( pState )->GetValue();
const bool bBookMode = static_cast<const SvxViewLayoutItem*>( pState )->IsBookMode();
// SingleColumn Mode
@@ -165,13 +165,13 @@ void SwViewLayoutControl::Paint( const UserDrawEvent& rUsrEvt )
//pDev->SetFillColor( aOldFillColor );
}
-BOOL SwViewLayoutControl::MouseButtonDown( const MouseEvent & rEvt )
+sal_Bool SwViewLayoutControl::MouseButtonDown( const MouseEvent & rEvt )
{
const Rectangle aRect = getControlRect();
const Point aPoint = rEvt.GetPosPixel();
const long nXDiff = aPoint.X() - aRect.Left();
- USHORT nColumns = 1;
+ sal_uInt16 nColumns = 1;
bool bBookMode = false;
const long nXOffset = (aRect.GetWidth() - nImageWidthSum)/2;
@@ -205,5 +205,5 @@ BOOL SwViewLayoutControl::MouseButtonDown( const MouseEvent & rEvt )
execute( aArgs );
- return TRUE;
+ return sal_True;
}
diff --git a/sw/source/ui/utlui/zoomctrl.cxx b/sw/source/ui/utlui/zoomctrl.cxx
index 48cf53b6263a..13cc237812d6 100644
--- a/sw/source/ui/utlui/zoomctrl.cxx
+++ b/sw/source/ui/utlui/zoomctrl.cxx
@@ -46,8 +46,8 @@
SFX_IMPL_STATUSBAR_CONTROL( SwZoomControl, SvxZoomItem );
-SwZoomControl::SwZoomControl( USHORT _nSlotId,
- USHORT _nId,
+SwZoomControl::SwZoomControl( sal_uInt16 _nSlotId,
+ sal_uInt16 _nId,
StatusBar& rStb ) :
SvxZoomStatusBarControl( _nSlotId, _nId, rStb )
{
@@ -61,7 +61,7 @@ SwZoomControl::~SwZoomControl()
// -----------------------------------------------------------------------
-void SwZoomControl::StateChanged( USHORT nSID, SfxItemState eState,
+void SwZoomControl::StateChanged( sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pState )
{
if(SFX_ITEM_AVAILABLE == eState && pState->ISA( SfxStringItem ))