summaryrefslogtreecommitdiff
path: root/cui/source/dialogs/linkdlg.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'cui/source/dialogs/linkdlg.cxx')
-rw-r--r--cui/source/dialogs/linkdlg.cxx96
1 files changed, 48 insertions, 48 deletions
diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx
index 965aefe35..7d0a20c6b 100644
--- a/cui/source/dialogs/linkdlg.cxx
+++ b/cui/source/dialogs/linkdlg.cxx
@@ -74,7 +74,7 @@ static long nTabs[] =
};
-SvBaseLinksDlg::SvBaseLinksDlg( Window * pParent, LinkManager* pMgr, BOOL bHtml )
+SvBaseLinksDlg::SvBaseLinksDlg( Window * pParent, LinkManager* pMgr, sal_Bool bHtml )
: ModalDialog( pParent, CUI_RES( MD_UPDATE_BASELINKS ) ),
aFtFiles( this, CUI_RES( FT_FILES ) ),
aFtLinks( this, CUI_RES( FT_LINKS ) ),
@@ -148,8 +148,8 @@ SvBaseLinksDlg::~SvBaseLinksDlg()
*************************************************************************/
IMPL_LINK( SvBaseLinksDlg, LinksSelectHdl, SvTabListBox *, pSvTabListBox )
{
- USHORT nSelectionCount = pSvTabListBox ?
- (USHORT)pSvTabListBox->GetSelectionCount() : 0;
+ sal_uInt16 nSelectionCount = pSvTabListBox ?
+ (sal_uInt16)pSvTabListBox->GetSelectionCount() : 0;
if(nSelectionCount > 1)
{
//bei Mehrfachselektion ggf. alte Eintraege deselektieren
@@ -157,16 +157,16 @@ IMPL_LINK( SvBaseLinksDlg, LinksSelectHdl, SvTabListBox *, pSvTabListBox )
SvBaseLink* pLink = 0;
pEntry = pSvTabListBox->GetHdlEntry();
pLink = (SvBaseLink*)pEntry->GetUserData();
- USHORT nObjectType = pLink->GetObjType();
+ sal_uInt16 nObjectType = pLink->GetObjType();
if((OBJECT_CLIENT_FILE & nObjectType) != OBJECT_CLIENT_FILE)
{
- pSvTabListBox->SelectAll(FALSE);
+ pSvTabListBox->SelectAll(sal_False);
pSvTabListBox->Select(pEntry);
nSelectionCount = 1;
}
else
{
- for( USHORT i = 0; i < nSelectionCount; i++)
+ for( sal_uInt16 i = 0; i < nSelectionCount; i++)
{
pEntry = i == 0 ? pSvTabListBox->FirstSelected() :
pSvTabListBox->NextSelected(pEntry);
@@ -174,7 +174,7 @@ IMPL_LINK( SvBaseLinksDlg, LinksSelectHdl, SvTabListBox *, pSvTabListBox )
pLink = (SvBaseLink*)pEntry->GetUserData();
DBG_ASSERT(pLink, "Wo ist der Link?");
if( (OBJECT_CLIENT_FILE & pLink->GetObjType()) != OBJECT_CLIENT_FILE )
- pSvTabListBox->Select( pEntry, FALSE );
+ pSvTabListBox->Select( pEntry, sal_False );
}
}
@@ -187,7 +187,7 @@ IMPL_LINK( SvBaseLinksDlg, LinksSelectHdl, SvTabListBox *, pSvTabListBox )
}
else
{
- USHORT nPos;
+ sal_uInt16 nPos;
SvBaseLink* pLink = GetSelEntry( &nPos );
if( !pLink )
return 0;
@@ -239,7 +239,7 @@ IMPL_LINK_INLINE_START( SvBaseLinksDlg, AutomaticClickHdl, RadioButton *, pRadio
{
(void)pRadioButton;
- USHORT nPos;
+ sal_uInt16 nPos;
SvBaseLink* pLink = GetSelEntry( &nPos );
if( pLink && !( FILEOBJECT & pLink->GetObjType() ) &&
LINKUPDATE_ALWAYS != pLink->GetUpdateMode() )
@@ -252,7 +252,7 @@ IMPL_LINK_INLINE_START( SvBaseLinksDlg, ManualClickHdl, RadioButton *, pRadioBut
{
(void)pRadioButton;
- USHORT nPos;
+ sal_uInt16 nPos;
SvBaseLink* pLink = GetSelEntry( &nPos );
if( pLink && !( FILEOBJECT & pLink->GetObjType() ) &&
LINKUPDATE_ONCALL != pLink->GetUpdateMode())
@@ -264,17 +264,17 @@ IMPL_LINK_INLINE_END( SvBaseLinksDlg, ManualClickHdl, RadioButton *, pRadioButto
IMPL_LINK( SvBaseLinksDlg, UpdateNowClickHdl, PushButton *, EMPTYARG )
{
SvTabListBox& rListBox = Links();
- USHORT nSelCnt = (USHORT)rListBox.GetSelectionCount();
+ sal_uInt16 nSelCnt = (sal_uInt16)rListBox.GetSelectionCount();
if( 255 < nSelCnt )
nSelCnt = 255;
std::vector< SvBaseLink* > aLnkArr;
- std::vector< USHORT > aPosArr;
+ std::vector< sal_uInt16 > aPosArr;
SvLBoxEntry* pE = rListBox.FirstSelected();
while( pE )
{
- USHORT nFndPos = (USHORT)rListBox.GetModel()->GetAbsPos( pE );
+ sal_uInt16 nFndPos = (sal_uInt16)rListBox.GetModel()->GetAbsPos( pE );
if( LISTBOX_ENTRY_NOTFOUND != nFndPos )
{
aLnkArr.push_back( static_cast< SvBaseLink* >( pE->GetUserData() ) );
@@ -285,17 +285,17 @@ IMPL_LINK( SvBaseLinksDlg, UpdateNowClickHdl, PushButton *, EMPTYARG )
if( !aLnkArr.empty() )
{
- for( USHORT n = 0; n < aLnkArr.size(); ++n )
+ for( sal_uInt16 n = 0; n < aLnkArr.size(); ++n )
{
SvBaseLinkRef xLink = aLnkArr[ n ];
// suche erstmal im Array nach dem Eintrag
- for( USHORT i = 0; i < pLinkMgr->GetLinks().Count(); ++i )
+ for( sal_uInt16 i = 0; i < pLinkMgr->GetLinks().Count(); ++i )
if( &xLink == *pLinkMgr->GetLinks()[ i ] )
{
- xLink->SetUseCache( FALSE );
+ xLink->SetUseCache( sal_False );
SetType( *xLink, aPosArr[ n ], xLink->GetUpdateMode() );
- xLink->SetUseCache( TRUE );
+ xLink->SetUseCache( sal_True );
break;
}
}
@@ -326,7 +326,7 @@ IMPL_LINK( SvBaseLinksDlg, UpdateNowClickHdl, PushButton *, EMPTYARG )
{
SvLBoxEntry* pSelEntry = rListBox.FirstSelected();
if( pE != pSelEntry )
- rListBox.Select( pSelEntry, FALSE );
+ rListBox.Select( pSelEntry, sal_False );
rListBox.Select( pE );
rListBox.MakeVisible( pE );
}
@@ -347,7 +347,7 @@ IMPL_LINK( SvBaseLinksDlg, ChangeSourceClickHdl, PushButton *, pPushButton )
{
(void)pPushButton;
- USHORT nSelectionCount = (USHORT)Links().GetSelectionCount();
+ sal_uInt16 nSelectionCount = (sal_uInt16)Links().GetSelectionCount();
if(nSelectionCount > 1)
{
PathDialog aPathDlg( this );
@@ -368,7 +368,7 @@ IMPL_LINK( SvBaseLinksDlg, ChangeSourceClickHdl, PushButton *, pPushButton )
{
String aPath = aPathDlg.GetPath();
- for( USHORT i = 0; i < nSelectionCount; i++)
+ for( sal_uInt16 i = 0; i < nSelectionCount; i++)
{
pEntry = i==0 ?
Links().FirstSelected() :
@@ -395,7 +395,7 @@ IMPL_LINK( SvBaseLinksDlg, ChangeSourceClickHdl, PushButton *, pPushButton )
}
else
{
- USHORT nPos;
+ sal_uInt16 nPos;
SvBaseLink* pLink = GetSelEntry( &nPos );
if ( pLink && (pLink->GetLinkSourceName().Len() != 0) )
pLink->Edit( this, LINK( this, SvBaseLinksDlg, EndEditHdl ) );
@@ -407,10 +407,10 @@ IMPL_LINK( SvBaseLinksDlg, BreakLinkClickHdl, PushButton *, pPushButton )
{
(void)pPushButton;
- BOOL bModified = FALSE;
+ sal_Bool bModified = sal_False;
if(Links().GetSelectionCount() <= 1)
{
- USHORT nPos;
+ sal_uInt16 nPos;
SvBaseLinkRef xLink = GetSelEntry( &nPos );
if( !xLink.Is() )
return 0;
@@ -422,7 +422,7 @@ IMPL_LINK( SvBaseLinksDlg, BreakLinkClickHdl, PushButton *, pPushButton )
Links().GetModel()->Remove( Links().GetEntry( nPos ) );
// falls Object noch vorhanden, dann das schliessen
- BOOL bNewLnkMgr = OBJECT_CLIENT_FILE == xLink->GetObjType();
+ sal_Bool bNewLnkMgr = OBJECT_CLIENT_FILE == xLink->GetObjType();
// dem Link sagen, das er aufgeloest wird!
xLink->Closed();
@@ -441,7 +441,7 @@ IMPL_LINK( SvBaseLinksDlg, BreakLinkClickHdl, PushButton *, pPushButton )
if( pEntry )
Links().SetCurEntry( pEntry );
}
- bModified = TRUE;
+ bModified = sal_True;
}
}
else
@@ -461,7 +461,7 @@ IMPL_LINK( SvBaseLinksDlg, BreakLinkClickHdl, PushButton *, pPushButton )
pEntry = Links().NextSelected(pEntry);
}
Links().RemoveSelection();
- for( ULONG i = 0; i < aLinkList.Count(); i++ )
+ for( sal_uLong i = 0; i < aLinkList.Count(); i++ )
{
SvBaseLinkRef xLink = aLinkList.GetObject( i );
// dem Link sagen, das er aufgeloest wird!
@@ -469,7 +469,7 @@ IMPL_LINK( SvBaseLinksDlg, BreakLinkClickHdl, PushButton *, pPushButton )
// falls einer vergessen hat sich auszutragen
pLinkMgr->Remove( &xLink );
- bModified = TRUE;
+ bModified = sal_True;
}
//Danach alle selektierten Eintraege entfernen
}
@@ -502,8 +502,8 @@ IMPL_LINK( SvBaseLinksDlg, UpdateWaitingHdl, Timer*, pTimer )
// for( SvLBoxEntry* pBox = Links().First(); pBox;
// pBox = Links().Next( pBox ))
- Links().SetUpdateMode(FALSE);
- for( ULONG nPos = Links().GetEntryCount(); nPos; )
+ Links().SetUpdateMode(sal_False);
+ for( sal_uLong nPos = Links().GetEntryCount(); nPos; )
{
SvLBoxEntry* pBox = Links().GetEntry( --nPos );
SvBaseLinkRef xLink( (SvBaseLink*)pBox->GetUserData() );
@@ -515,13 +515,13 @@ IMPL_LINK( SvBaseLinksDlg, UpdateWaitingHdl, Timer*, pTimer )
Links().SetEntryText( sCur, pBox, 3 );
}
}
- Links().SetUpdateMode(TRUE);
+ Links().SetUpdateMode(sal_True);
return 0;
}
IMPL_LINK( SvBaseLinksDlg, EndEditHdl, sfx2::SvBaseLink*, _pLink )
{
- USHORT nPos;
+ sal_uInt16 nPos;
GetSelEntry( &nPos );
if( _pLink && _pLink->WasLastEditOK() )
@@ -531,23 +531,23 @@ IMPL_LINK( SvBaseLinksDlg, EndEditHdl, sfx2::SvBaseLink*, _pLink )
// also suche den Link im Manager, wenn der nicht mehr existiert,
// dann setze fuelle die Liste komplett neu. Ansonsten braucht
// nur der editierte Linkt aktualisiert werden.
- BOOL bLinkFnd = FALSE;
- for( USHORT n = pLinkMgr->GetLinks().Count(); n; )
+ sal_Bool bLinkFnd = sal_False;
+ for( sal_uInt16 n = pLinkMgr->GetLinks().Count(); n; )
if( _pLink == &(*pLinkMgr->GetLinks()[ --n ]) )
{
- bLinkFnd = TRUE;
+ bLinkFnd = sal_True;
break;
}
if( bLinkFnd )
{
- Links().SetUpdateMode(FALSE);
+ Links().SetUpdateMode(sal_False);
Links().GetModel()->Remove( Links().GetEntry( nPos ) );
SvLBoxEntry* pToUnselect = Links().FirstSelected();
InsertEntry( *_pLink, nPos, sal_True );
if(pToUnselect)
- Links().Select(pToUnselect, FALSE);
- Links().SetUpdateMode(TRUE);
+ Links().Select(pToUnselect, sal_False);
+ Links().SetUpdateMode(sal_True);
}
else
{
@@ -586,7 +586,7 @@ void SvBaseLinksDlg::SetManager( LinkManager* pNewMgr )
if( pNewMgr )
// Update muss vor Clear gestoppt werden
- Links().SetUpdateMode( FALSE );
+ Links().SetUpdateMode( sal_False );
Links().Clear();
pLinkMgr = pNewMgr;
@@ -594,7 +594,7 @@ void SvBaseLinksDlg::SetManager( LinkManager* pNewMgr )
if( pLinkMgr )
{
SvBaseLinks& rLnks = (SvBaseLinks&)pLinkMgr->GetLinks();
- for( USHORT n = 0; n < rLnks.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rLnks.Count(); ++n )
{
SvBaseLinkRef* pLinkRef = rLnks[ n ];
if( !pLinkRef->Is() )
@@ -614,13 +614,13 @@ void SvBaseLinksDlg::SetManager( LinkManager* pNewMgr )
Links().Select( pEntry );
LinksSelectHdl( 0 );
}
- Links().SetUpdateMode( TRUE );
+ Links().SetUpdateMode( sal_True );
Links().Invalidate();
}
}
-void SvBaseLinksDlg::InsertEntry( const SvBaseLink& rLink, USHORT nPos, sal_Bool bSelect )
+void SvBaseLinksDlg::InsertEntry( const SvBaseLink& rLink, sal_uInt16 nPos, sal_Bool bSelect )
{
String aEntry, sFileNm, sLinkNm, sTypeNm, sFilter;
@@ -658,12 +658,12 @@ void SvBaseLinksDlg::InsertEntry( const SvBaseLink& rLink, USHORT nPos, sal_Bool
Links().Select(pE);
}
-SvBaseLink* SvBaseLinksDlg::GetSelEntry( USHORT* pPos )
+SvBaseLink* SvBaseLinksDlg::GetSelEntry( sal_uInt16* pPos )
{
SvLBoxEntry* pE = Links().FirstSelected();
- USHORT nPos;
+ sal_uInt16 nPos;
if( pE && LISTBOX_ENTRY_NOTFOUND !=
- ( nPos = (USHORT)Links().GetModel()->GetAbsPos( pE ) ) )
+ ( nPos = (sal_uInt16)Links().GetModel()->GetAbsPos( pE ) ) )
{
DBG_ASSERT( pE, "wo kommt der leere Eintrag her?" );
@@ -675,8 +675,8 @@ SvBaseLink* SvBaseLinksDlg::GetSelEntry( USHORT* pPos )
}
void SvBaseLinksDlg::SetType( SvBaseLink& rLink,
- USHORT nSelPos,
- USHORT nType )
+ sal_uInt16 nSelPos,
+ sal_uInt16 nType )
{
rLink.SetUpdateMode( nType );
rLink.Update();
@@ -691,8 +691,8 @@ void SvBaseLinksDlg::SetActLink( SvBaseLink * pLink )
if( pLinkMgr )
{
const SvBaseLinks& rLnks = pLinkMgr->GetLinks();
- USHORT nSelect = 0;
- for( USHORT n = 0; n < rLnks.Count(); ++n )
+ sal_uInt16 nSelect = 0;
+ for( sal_uInt16 n = 0; n < rLnks.Count(); ++n )
{
SvBaseLinkRef* pLinkRef = rLnks[ n ];
// #109573# only visible links have been inserted into the TreeListBox,