summaryrefslogtreecommitdiff
path: root/cui/source/dialogs/linkdlg.cxx
diff options
context:
space:
mode:
authorMalte Timmermann [mt] <malte.timmermann@oracle.com>2011-02-15 17:14:59 +0100
committerMalte Timmermann [mt] <malte.timmermann@oracle.com>2011-02-15 17:14:59 +0100
commitf42f3b496a1d956f72fad8aaf37da790e89ed803 (patch)
treeb6f9cea18fda9b1c8a0af9642958a9671de6f713 /cui/source/dialogs/linkdlg.cxx
parentde539c71865e6eec7b1db38031f661d7d8ad0714 (diff)
parent16680c16eb84b5315dbbeeb61b3693c4d567640a (diff)
accfixes: merged to m100
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 cf92f4185b0d..a991974bd914 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 ) ),
@@ -154,8 +154,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
@@ -163,16 +163,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);
@@ -180,7 +180,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 );
}
}
@@ -193,7 +193,7 @@ IMPL_LINK( SvBaseLinksDlg, LinksSelectHdl, SvTabListBox *, pSvTabListBox )
}
else
{
- USHORT nPos;
+ sal_uInt16 nPos;
SvBaseLink* pLink = GetSelEntry( &nPos );
if( !pLink )
return 0;
@@ -245,7 +245,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() )
@@ -258,7 +258,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())
@@ -270,17 +270,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() ) );
@@ -291,17 +291,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;
}
}
@@ -332,7 +332,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 );
}
@@ -353,7 +353,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 );
@@ -374,7 +374,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() :
@@ -401,7 +401,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 ) );
@@ -413,10 +413,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;
@@ -428,7 +428,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();
@@ -447,7 +447,7 @@ IMPL_LINK( SvBaseLinksDlg, BreakLinkClickHdl, PushButton *, pPushButton )
if( pEntry )
Links().SetCurEntry( pEntry );
}
- bModified = TRUE;
+ bModified = sal_True;
}
}
else
@@ -467,7 +467,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!
@@ -475,7 +475,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
}
@@ -508,8 +508,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() );
@@ -521,13 +521,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() )
@@ -537,23 +537,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
{
@@ -592,7 +592,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;
@@ -600,7 +600,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() )
@@ -620,13 +620,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;
@@ -664,12 +664,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?" );
@@ -681,8 +681,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();
@@ -697,8 +697,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,