diff options
author | Philipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM> | 2011-02-14 16:17:22 +0100 |
---|---|---|
committer | Philipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM> | 2011-02-14 16:17:22 +0100 |
commit | 1fb042333fe6287756ff1fac11d18cd7c150730d (patch) | |
tree | 595de5d187177832ce656d7832af9dce9dce2d99 /svx/source/gallery2/galbrws1.cxx | |
parent | 5b3e910e926c7dd1e8dcfe8e0a5c6cb5bd17480a (diff) | |
parent | cd0d6a5a6775f197fdb7e78b54c8133074a7a236 (diff) |
rebase to DEV300_m100
Diffstat (limited to 'svx/source/gallery2/galbrws1.cxx')
-rw-r--r-- | svx/source/gallery2/galbrws1.cxx | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index 04f402804b0c..dfa4eaad4a9d 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -163,12 +163,12 @@ GalleryBrowser1::GalleryBrowser1( GalleryBrowser* pParent, const ResId& rResId, mpThemes->SetHelpId( HID_GALLERY_THEMELIST ); mpThemes->SetSelectHdl( LINK( this, GalleryBrowser1, SelectThemeHdl ) ); - for( ULONG i = 0, nCount = mpGallery->GetThemeCount(); i < nCount; i++ ) + for( sal_uIntPtr i = 0, nCount = mpGallery->GetThemeCount(); i < nCount; i++ ) ImplInsertThemeEntry( mpGallery->GetThemeInfo( i ) ); ImplAdjustControls(); - maNewTheme.Show( TRUE ); - mpThemes->Show( TRUE ); + maNewTheme.Show( sal_True ); + mpThemes->Show( sal_True ); } // ----------------------------------------------------------------------------- @@ -184,11 +184,11 @@ GalleryBrowser1::~GalleryBrowser1() // ----------------------------------------------------------------------------- -ULONG GalleryBrowser1::ImplInsertThemeEntry( const GalleryThemeEntry* pEntry ) +sal_uIntPtr GalleryBrowser1::ImplInsertThemeEntry( const GalleryThemeEntry* pEntry ) { - static const BOOL bShowHiddenThemes = ( getenv( "GALLERY_SHOW_HIDDEN_THEMES" ) != NULL ); + static const sal_Bool bShowHiddenThemes = ( getenv( "GALLERY_SHOW_HIDDEN_THEMES" ) != NULL ); - ULONG nRet = LISTBOX_ENTRY_NOTFOUND; + sal_uIntPtr nRet = LISTBOX_ENTRY_NOTFOUND; if( pEntry && ( !pEntry->IsHidden() || bShowHiddenThemes ) ) { @@ -255,30 +255,30 @@ void GalleryBrowser1::ImplFillExchangeData( const GalleryTheme* pThm, ExchangeDa // ----------------------------------------------------------------------------- -::std::vector< USHORT > GalleryBrowser1::ImplGetExecuteVector() +::std::vector< sal_uInt16 > GalleryBrowser1::ImplGetExecuteVector() { - ::std::vector< USHORT > aExecVector; + ::std::vector< sal_uInt16 > aExecVector; GalleryTheme* pTheme = mpGallery->AcquireTheme( GetSelectedTheme(), *this ); if( pTheme ) { - BOOL bUpdateAllowed, bRenameAllowed, bRemoveAllowed; - static const BOOL bIdDialog = ( getenv( "GALLERY_ENABLE_ID_DIALOG" ) != NULL ); + sal_Bool bUpdateAllowed, bRenameAllowed, bRemoveAllowed; + static const sal_Bool bIdDialog = ( getenv( "GALLERY_ENABLE_ID_DIALOG" ) != NULL ); if( pTheme->IsReadOnly() ) - bUpdateAllowed = bRenameAllowed = bRemoveAllowed = FALSE; + bUpdateAllowed = bRenameAllowed = bRemoveAllowed = sal_False; else if( pTheme->IsImported() ) { - bUpdateAllowed = FALSE; - bRenameAllowed = bRemoveAllowed = TRUE; + bUpdateAllowed = sal_False; + bRenameAllowed = bRemoveAllowed = sal_True; } else if( pTheme->IsDefault() ) { - bUpdateAllowed = bRenameAllowed = TRUE; - bRemoveAllowed = FALSE; + bUpdateAllowed = bRenameAllowed = sal_True; + bRemoveAllowed = sal_False; } else - bUpdateAllowed = bRenameAllowed = bRemoveAllowed = TRUE; + bUpdateAllowed = bRenameAllowed = bRemoveAllowed = sal_True; if( bUpdateAllowed && pTheme->GetObjectCount() ) aExecVector.push_back( MN_ACTUALIZE ); @@ -341,7 +341,7 @@ void GalleryBrowser1::ImplEndGalleryThemeProperties( VclAbstractDialog2* pDialog { const String aOldName( aName ); String aTitle( mpExchangeData->aEditedTitle ); - USHORT nCount = 0; + sal_uInt16 nCount = 0; while( mpGallery->HasTheme( aTitle ) && ( nCount++ < 16000 ) ) { @@ -400,7 +400,7 @@ IMPL_LINK( GalleryBrowser1, DestroyThemePropertiesDlgHdl, VclAbstractDialog2*, p // ----------------------------------------------------------------------------- -void GalleryBrowser1::ImplExecute( USHORT nId ) +void GalleryBrowser1::ImplExecute( sal_uInt16 nId ) { switch( nId ) { @@ -446,7 +446,7 @@ void GalleryBrowser1::ImplExecute( USHORT nId ) if( aNewName.Len() && ( aNewName != aOldName ) ) { String aName( aNewName ); - USHORT nCount = 0; + sal_uInt16 nCount = 0; while( mpGallery->HasTheme( aName ) && ( nCount++ < 16000 ) ) { @@ -477,7 +477,7 @@ void GalleryBrowser1::ImplExecute( USHORT nId ) DBG_ASSERT(aDlg, "Dialogdiet fail!");//CHINA001 if( aDlg->Execute() == RET_OK ) //CHINA001 if( aDlg.Execute() == RET_OK ) - pTheme->SetId( aDlg->GetId(), TRUE ); //CHINA001 pTheme->SetId( aDlg.GetId(), TRUE ); + pTheme->SetId( aDlg->GetId(), sal_True ); //CHINA001 pTheme->SetId( aDlg.GetId(), sal_True ); delete aDlg; //add CHINA001 } } @@ -525,8 +525,8 @@ void GalleryBrowser1::Notify( SfxBroadcaster&, const SfxHint& rHint ) case( GALLERY_HINT_THEME_RENAMED ): { - const USHORT nCurSelectPos = mpThemes->GetSelectEntryPos(); - const USHORT nRenameEntryPos = mpThemes->GetEntryPos( rGalleryHint.GetThemeName() ); + const sal_uInt16 nCurSelectPos = mpThemes->GetSelectEntryPos(); + const sal_uInt16 nRenameEntryPos = mpThemes->GetEntryPos( rGalleryHint.GetThemeName() ); mpThemes->RemoveEntry( rGalleryHint.GetThemeName() ); ImplInsertThemeEntry( mpGallery->GetThemeInfo( rGalleryHint.GetStringData() ) ); @@ -547,8 +547,8 @@ void GalleryBrowser1::Notify( SfxBroadcaster&, const SfxHint& rHint ) case( GALLERY_HINT_CLOSE_THEME ): { - const USHORT nCurSelectPos = mpThemes->GetSelectEntryPos(); - const USHORT nCloseEntryPos = mpThemes->GetEntryPos( rGalleryHint.GetThemeName() ); + const sal_uInt16 nCurSelectPos = mpThemes->GetSelectEntryPos(); + const sal_uInt16 nCloseEntryPos = mpThemes->GetEntryPos( rGalleryHint.GetThemeName() ); if( nCurSelectPos == nCloseEntryPos ) { @@ -578,15 +578,15 @@ void GalleryBrowser1::ShowContextMenu() // ----------------------------------------------------------------------------- -BOOL GalleryBrowser1::KeyInput( const KeyEvent& rKEvt, Window* pWindow ) +sal_Bool GalleryBrowser1::KeyInput( const KeyEvent& rKEvt, Window* pWindow ) { - BOOL bRet = static_cast< GalleryBrowser* >( GetParent() )->KeyInput( rKEvt, pWindow ); + sal_Bool bRet = static_cast< GalleryBrowser* >( GetParent() )->KeyInput( rKEvt, pWindow ); if( !bRet ) { - ::std::vector< USHORT > aExecVector( ImplGetExecuteVector() ); - USHORT nExecuteId = 0; - BOOL bMod1 = rKEvt.GetKeyCode().IsMod1(); + ::std::vector< sal_uInt16 > aExecVector( ImplGetExecuteVector() ); + sal_uInt16 nExecuteId = 0; + sal_Bool bMod1 = rKEvt.GetKeyCode().IsMod1(); switch( rKEvt.GetKeyCode().GetCode() ) { @@ -637,7 +637,7 @@ BOOL GalleryBrowser1::KeyInput( const KeyEvent& rKEvt, Window* pWindow ) if( nExecuteId && ( ::std::find( aExecVector.begin(), aExecVector.end(), nExecuteId ) != aExecVector.end() ) ) { ImplExecute( nExecuteId ); - bRet = TRUE; + bRet = sal_True; } } @@ -648,7 +648,7 @@ BOOL GalleryBrowser1::KeyInput( const KeyEvent& rKEvt, Window* pWindow ) IMPL_LINK( GalleryBrowser1, ShowContextMenuHdl, void*, EMPTYARG ) { - ::std::vector< USHORT > aExecVector( ImplGetExecuteVector() ); + ::std::vector< sal_uInt16 > aExecVector( ImplGetExecuteVector() ); if( aExecVector.size() ) { @@ -696,7 +696,7 @@ IMPL_LINK( GalleryBrowser1, ClickNewThemeHdl, void*, EMPTYARG ) { String aNewTheme( GAL_RESID( RID_SVXSTR_GALLERY_NEWTHEME ) ); String aName( aNewTheme ); - ULONG nCount = 0; + sal_uIntPtr nCount = 0; while( mpGallery->HasTheme( aName ) && ( nCount++ < 16000 ) ) { |