diff options
Diffstat (limited to 'svx/source/gallery2/galbrws2.cxx')
-rwxr-xr-x[-rw-r--r--] | svx/source/gallery2/galbrws2.cxx | 191 |
1 files changed, 106 insertions, 85 deletions
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx index 3dbe5ed98111..aed662aae2d1 100644..100755 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -45,17 +45,19 @@ #include "svtools/filter.hxx" #include <editeng/brshitem.hxx> #include "helpid.hrc" -#include "gallery.hxx" +#include "svx/gallery.hxx" #include "galobj.hxx" #include "svx/gallery1.hxx" -#include "galtheme.hxx" -#include "galctrl.hxx" +#include "svx/galtheme.hxx" +#include "svx/galctrl.hxx" #include "svx/galmisc.hxx" #include "galbrws2.hxx" #include "gallery.hrc" #include <vcl/svapp.hxx> #include <svx/fmmodel.hxx> +#include <svx/dialmgr.hxx> #include <svx/svxdlg.hxx> +#include <svx/dialogs.hrc> // ----------- // - Defines - @@ -79,20 +81,20 @@ GalleryBrowserMode GalleryBrowser2::meInitMode = GALLERYBROWSERMODE_ICON; class GalleryBackgroundPopup : public PopupMenu, public SfxControllerItem { const GalleryTheme* mpTheme; - ULONG mnObjectPos; + sal_uIntPtr mnObjectPos; virtual void Select(); - virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ); + virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ); public: - GalleryBackgroundPopup( const GalleryTheme* pTheme, ULONG nObjectPos ); + GalleryBackgroundPopup( const GalleryTheme* pTheme, sal_uIntPtr nObjectPos ); ~GalleryBackgroundPopup(); }; // ------------------------------------------------------------------------ -GalleryBackgroundPopup::GalleryBackgroundPopup( const GalleryTheme* pTheme, ULONG nObjectPos ) : +GalleryBackgroundPopup::GalleryBackgroundPopup( const GalleryTheme* pTheme, sal_uIntPtr nObjectPos ) : SfxControllerItem ( SID_GALLERY_BG_BRUSH, SfxViewFrame::Current()->GetBindings() ), mpTheme ( pTheme ), mnObjectPos ( nObjectPos ) @@ -109,7 +111,7 @@ GalleryBackgroundPopup::~GalleryBackgroundPopup() // ------------------------------------------------------------------------ -void GalleryBackgroundPopup::StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pItem ) +void GalleryBackgroundPopup::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pItem ) { if ( ( nSID == SID_GALLERY_BG_BRUSH ) && pItem && ( eState != SFX_ITEM_DISABLED ) ) { @@ -123,8 +125,8 @@ void GalleryBackgroundPopup::StateChanged( USHORT nSID, SfxItemState eState, con List* pList = pStrLstItem->GetList(); if( pList ) - for ( ULONG i = 0, nCount = pList->Count(); i < nCount; i++ ) - InsertItem( (USHORT) i + 1, *(String*) pList->GetObject( i ) ); + for ( sal_uIntPtr i = 0, nCount = pList->Count(); i < nCount; i++ ) + InsertItem( (sal_uInt16) i + 1, *(String*) pList->GetObject( i ) ); } else if( ( pStrItem = PTR_CAST( SfxStringItem, pItem ) ) != NULL ) InsertItem( 1, pStrItem->GetValue() ); @@ -159,20 +161,20 @@ class GalleryThemePopup : public PopupMenu, public SfxControllerItem { GalleryBackgroundPopup maBackgroundPopup; const GalleryTheme* mpTheme; - ULONG mnObjectPos; - BOOL mbPreview; + sal_uIntPtr mnObjectPos; + sal_Bool mbPreview; - virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ); + virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ); public: - GalleryThemePopup( const GalleryTheme* pTheme, ULONG nObjectPos, BOOL bPreview ); + GalleryThemePopup( const GalleryTheme* pTheme, sal_uIntPtr nObjectPos, sal_Bool bPreview ); ~GalleryThemePopup(); }; // ------------------------------------------------------------------------ -GalleryThemePopup::GalleryThemePopup( const GalleryTheme* pTheme, ULONG nObjectPos, BOOL bPreview ) : +GalleryThemePopup::GalleryThemePopup( const GalleryTheme* pTheme, sal_uIntPtr nObjectPos, sal_Bool bPreview ) : PopupMenu ( GAL_RESID( RID_SVXMN_GALLERY2 ) ), SfxControllerItem ( SID_GALLERY_ENABLE_ADDCOPY, SfxViewFrame::Current()->GetBindings() ), maBackgroundPopup ( pTheme, nObjectPos ), @@ -186,7 +188,7 @@ GalleryThemePopup::GalleryThemePopup( const GalleryTheme* pTheme, ULONG nObjectP INetURLObject aURL; const_cast< GalleryTheme* >( mpTheme )->GetURL( mnObjectPos, aURL ); - const BOOL bValidURL = ( aURL.GetProtocol() != INET_PROT_NOT_VALID ); + const sal_Bool bValidURL = ( aURL.GetProtocol() != INET_PROT_NOT_VALID ); pAddMenu->EnableItem( MN_ADD, bValidURL && SGA_OBJ_SOUND != eObjKind ); pAddMenu->EnableItem( MN_ADD_LINK, bValidURL && SGA_OBJ_SVDRAW != eObjKind ); @@ -198,28 +200,28 @@ GalleryThemePopup::GalleryThemePopup( const GalleryTheme* pTheme, ULONG nObjectP if( mpTheme->IsReadOnly() || !mpTheme->GetObjectCount() ) { - EnableItem( MN_DELETE, FALSE ); - EnableItem( MN_TITLE, FALSE ); + EnableItem( MN_DELETE, sal_False ); + EnableItem( MN_TITLE, sal_False ); if( mpTheme->IsReadOnly() ) - EnableItem( MN_PASTECLIPBOARD, FALSE ); + EnableItem( MN_PASTECLIPBOARD, sal_False ); if( !mpTheme->GetObjectCount() ) - EnableItem( MN_COPYCLIPBOARD, FALSE ); + EnableItem( MN_COPYCLIPBOARD, sal_False ); } else { EnableItem( MN_DELETE, !bPreview ); - EnableItem( MN_TITLE, TRUE ); - EnableItem( MN_COPYCLIPBOARD, TRUE ); - EnableItem( MN_PASTECLIPBOARD, TRUE ); + EnableItem( MN_TITLE, sal_True ); + EnableItem( MN_COPYCLIPBOARD, sal_True ); + EnableItem( MN_PASTECLIPBOARD, sal_True ); } #ifdef GALLERY_USE_CLIPBOARD if( IsItemEnabled( MN_PASTECLIPBOARD ) ) { TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( this ) ); - BOOL bEnable = FALSE; + sal_Bool bEnable = sal_False; if( aDataHelper.GetFormatCount() ) { @@ -230,23 +232,23 @@ GalleryThemePopup::GalleryThemePopup( const GalleryTheme* pTheme, ULONG nObjectP aDataHelper.HasFormat( FORMAT_GDIMETAFILE ) || aDataHelper.HasFormat( FORMAT_BITMAP ) ) { - bEnable = TRUE; + bEnable = sal_True; } } if( !bEnable ) - EnableItem( MN_PASTECLIPBOARD, FALSE ); + EnableItem( MN_PASTECLIPBOARD, sal_False ); } #else - EnableItem( MN_COPYCLIPBOARD, FALSE ); - EnableItem( MN_PASTECLIPBOARD, FALSE ); + EnableItem( MN_COPYCLIPBOARD, sal_False ); + EnableItem( MN_PASTECLIPBOARD, sal_False ); #endif if( !maBackgroundPopup.GetItemCount() || ( eObjKind == SGA_OBJ_SVDRAW ) || ( eObjKind == SGA_OBJ_SOUND ) ) - pAddMenu->EnableItem( MN_BACKGROUND, FALSE ); + pAddMenu->EnableItem( MN_BACKGROUND, sal_False ); else { - pAddMenu->EnableItem( MN_BACKGROUND, TRUE ); + pAddMenu->EnableItem( MN_BACKGROUND, sal_True ); pAddMenu->SetPopupMenu( MN_BACKGROUND, &maBackgroundPopup ); } @@ -262,7 +264,7 @@ GalleryThemePopup::~GalleryThemePopup() // ------------------------------------------------------------------------ -void GalleryThemePopup::StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pItem ) +void GalleryThemePopup::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pItem ) { if( ( nSID == SID_GALLERY_ENABLE_ADDCOPY ) && pItem && ( eState != SFX_ITEM_DISABLED ) ) { @@ -315,7 +317,7 @@ GalleryBrowser2::GalleryBrowser2( GalleryBrowser* pParent, const ResId& rResId, mnCurActionPos ( 0xffffffff ), meMode ( GALLERYBROWSERMODE_NONE ), meLastMode ( GALLERYBROWSERMODE_NONE ), - mbCurActionIsLinkage( FALSE ) + mbCurActionIsLinkage( sal_False ) { Image aDummyImage; const Link aSelectHdl( LINK( this, GalleryBrowser2, SelectObjectHdl ) ); @@ -338,6 +340,9 @@ GalleryBrowser2::GalleryBrowser2( GalleryBrowser* pParent, const ResId& rResId, maViewBox.SetSelectHdl( LINK( this, GalleryBrowser2, SelectTbxHdl ) ); maViewBox.Show(); + mpIconView->SetAccessibleName(String( SVX_RES( RID_SVXSTR_GALLERY_THEMEITEMS ) )); + mpListView->SetAccessibleName(String( SVX_RES( RID_SVXSTR_GALLERY_THEMEITEMS ) )); + maInfoBar.Show(); maSeparator.Show(); @@ -347,6 +352,12 @@ GalleryBrowser2::GalleryBrowser2( GalleryBrowser* pParent, const ResId& rResId, InitSettings(); SetMode( ( GALLERYBROWSERMODE_PREVIEW != GalleryBrowser2::meInitMode ) ? GalleryBrowser2::meInitMode : GALLERYBROWSERMODE_ICON ); + + if(maInfoBar.GetText().Len() == 0) + mpIconView->SetAccessibleRelationLabeledBy(mpIconView); + else + mpIconView->SetAccessibleRelationLabeledBy(&maInfoBar); + mpIconView->SetAccessibleRelationMemberOf(mpIconView); } // ----------------------------------------------------------------------------- @@ -439,7 +450,7 @@ void GalleryBrowser2::Notify( SfxBroadcaster&, const SfxHint& rHint ) if( GALLERYBROWSERMODE_PREVIEW == GetMode() ) SetMode( meLastMode ); - ImplUpdateViews( (USHORT) rGalleryHint.GetData1() + 1 ); + ImplUpdateViews( (sal_uInt16) rGalleryHint.GetData1() + 1 ); } break; @@ -484,8 +495,8 @@ sal_Int8 GalleryBrowser2::ExecuteDrop( DropTargetHelper&, const ExecuteDropEvent if( mpCurTheme ) { Point aSelPos; - const ULONG nItemId = ImplGetSelectedItemId( &rEvt.maPosPixel, aSelPos ); - const ULONG nInsertPos = ( nItemId ? ( nItemId - 1 ) : LIST_APPEND ); + const sal_uIntPtr nItemId = ImplGetSelectedItemId( &rEvt.maPosPixel, aSelPos ); + const sal_uIntPtr nInsertPos = ( nItemId ? ( nItemId - 1 ) : LIST_APPEND ); if( mpCurTheme->IsDragging() ) mpCurTheme->ChangeObjectPos( mpCurTheme->GetDragPos(), nInsertPos ); @@ -503,7 +514,7 @@ void GalleryBrowser2::StartDrag( Window*, const Point* pDragPoint ) if( mpCurTheme ) { Point aSelPos; - const ULONG nItemId = ImplGetSelectedItemId( pDragPoint, aSelPos ); + const sal_uIntPtr nItemId = ImplGetSelectedItemId( pDragPoint, aSelPos ); if( nItemId ) mpCurTheme->StartDrag( this, nItemId - 1 ); @@ -523,7 +534,7 @@ void GalleryBrowser2::TogglePreview( Window*, const Point* ) void GalleryBrowser2::ShowContextMenu( Window*, const Point* pContextPoint ) { Point aSelPos; - const ULONG nItemId = ImplGetSelectedItemId( pContextPoint, aSelPos ); + const sal_uIntPtr nItemId = ImplGetSelectedItemId( pContextPoint, aSelPos ); if( mpCurTheme && nItemId && ( nItemId <= mpCurTheme->GetObjectCount() ) ) { @@ -544,31 +555,31 @@ void GalleryBrowser2::ShowContextMenu( Window*, const Point* pContextPoint ) // ----------------------------------------------------------------------------- -BOOL GalleryBrowser2::KeyInput( const KeyEvent& rKEvt, Window* pWindow ) +sal_Bool GalleryBrowser2::KeyInput( const KeyEvent& rKEvt, Window* pWindow ) { Point aSelPos; - const ULONG nItemId = ImplGetSelectedItemId( NULL, aSelPos ); - BOOL bRet = static_cast< GalleryBrowser* >( GetParent() )->KeyInput( rKEvt, pWindow ); + const sal_uIntPtr nItemId = ImplGetSelectedItemId( NULL, aSelPos ); + sal_Bool bRet = static_cast< GalleryBrowser* >( GetParent() )->KeyInput( rKEvt, pWindow ); if( !bRet && !maViewBox.HasFocus() && nItemId && mpCurTheme ) { - USHORT nExecuteId = 0; + sal_uInt16 nExecuteId = 0; const SgaObjKind eObjKind = mpCurTheme->GetObjectKind( nItemId - 1 ); INetURLObject aURL; const_cast< GalleryTheme* >( mpCurTheme )->GetURL( nItemId - 1, aURL ); - const BOOL bValidURL = ( aURL.GetProtocol() != INET_PROT_NOT_VALID ); - BOOL bPreview = bValidURL; - BOOL bAdd = bValidURL; - BOOL bAddLink = ( bValidURL && SGA_OBJ_SVDRAW != eObjKind ); - BOOL bDelete = FALSE; - BOOL bTitle = FALSE; + const sal_Bool bValidURL = ( aURL.GetProtocol() != INET_PROT_NOT_VALID ); + sal_Bool bPreview = bValidURL; + sal_Bool bAdd = bValidURL; + sal_Bool bAddLink = ( bValidURL && SGA_OBJ_SVDRAW != eObjKind ); + sal_Bool bDelete = sal_False; + sal_Bool bTitle = sal_False; if( !mpCurTheme->IsReadOnly() && mpCurTheme->GetObjectCount() ) { bDelete = ( GALLERYBROWSERMODE_PREVIEW != GetMode() ); - bTitle = TRUE; + bTitle = sal_True; } switch( rKEvt.GetKeyCode().GetCode() ) @@ -580,7 +591,7 @@ BOOL GalleryBrowser2::KeyInput( const KeyEvent& rKEvt, Window* pWindow ) if( bPreview ) { TogglePreview( pWindow ); - bRet = TRUE; + bRet = sal_True; } } break; @@ -617,7 +628,7 @@ BOOL GalleryBrowser2::KeyInput( const KeyEvent& rKEvt, Window* pWindow ) if( nExecuteId ) { ImplExecute( nExecuteId ); - bRet = TRUE; + bRet = sal_True; } } @@ -641,6 +652,10 @@ void GalleryBrowser2::SelectTheme( const String& rThemeName ) mpListView = new GalleryListView( this, mpCurTheme ); mpPreview = new GalleryPreview( this, mpCurTheme ); + mpIconView->SetAccessibleName(String( SVX_RES( RID_SVXSTR_GALLERY_THEMEITEMS ) )); + mpListView->SetAccessibleName(String( SVX_RES( RID_SVXSTR_GALLERY_THEMEITEMS ) )); + mpPreview->SetAccessibleName(String( SVX_RES( RID_SVXSTR_GALLERY_PREVIEW ) )); + const Link aSelectHdl( LINK( this, GalleryBrowser2, SelectObjectHdl ) ); mpIconView->SetSelectHdl( aSelectHdl ); @@ -652,9 +667,15 @@ void GalleryBrowser2::SelectTheme( const String& rThemeName ) Resize(); ImplUpdateViews( 1 ); - maViewBox.EnableItem( TBX_ID_ICON, TRUE ); - maViewBox.EnableItem( TBX_ID_LIST, TRUE ); - maViewBox.CheckItem( ( GALLERYBROWSERMODE_ICON == GetMode() ) ? TBX_ID_ICON : TBX_ID_LIST, TRUE ); + maViewBox.EnableItem( TBX_ID_ICON, sal_True ); + maViewBox.EnableItem( TBX_ID_LIST, sal_True ); + maViewBox.CheckItem( ( GALLERYBROWSERMODE_ICON == GetMode() ) ? TBX_ID_ICON : TBX_ID_LIST, sal_True ); + + if(maInfoBar.GetText().Len() == 0) + mpIconView->SetAccessibleRelationLabeledBy(mpIconView); + else + mpIconView->SetAccessibleRelationLabeledBy(&maInfoBar); + mpIconView->SetAccessibleRelationMemberOf(mpIconView); } // ----------------------------------------------------------------------------- @@ -677,11 +698,11 @@ void GalleryBrowser2::SetMode( GalleryBrowserMode eMode ) mpIconView->Show(); - maViewBox.EnableItem( TBX_ID_ICON, TRUE ); - maViewBox.EnableItem( TBX_ID_LIST, TRUE ); + maViewBox.EnableItem( TBX_ID_ICON, sal_True ); + maViewBox.EnableItem( TBX_ID_LIST, sal_True ); - maViewBox.CheckItem( TBX_ID_ICON, TRUE ); - maViewBox.CheckItem( TBX_ID_LIST, FALSE ); + maViewBox.CheckItem( TBX_ID_ICON, sal_True ); + maViewBox.CheckItem( TBX_ID_LIST, sal_False ); } break; @@ -695,11 +716,11 @@ void GalleryBrowser2::SetMode( GalleryBrowserMode eMode ) mpListView->Show(); - maViewBox.EnableItem( TBX_ID_ICON, TRUE ); - maViewBox.EnableItem( TBX_ID_LIST, TRUE ); + maViewBox.EnableItem( TBX_ID_ICON, sal_True ); + maViewBox.EnableItem( TBX_ID_LIST, sal_True ); - maViewBox.CheckItem( TBX_ID_ICON, FALSE ); - maViewBox.CheckItem( TBX_ID_LIST, TRUE ); + maViewBox.CheckItem( TBX_ID_ICON, sal_False ); + maViewBox.CheckItem( TBX_ID_LIST, sal_True ); } break; @@ -707,11 +728,11 @@ void GalleryBrowser2::SetMode( GalleryBrowserMode eMode ) { Graphic aGraphic; Point aSelPos; - const ULONG nItemId = ImplGetSelectedItemId( NULL, aSelPos ); + const sal_uIntPtr nItemId = ImplGetSelectedItemId( NULL, aSelPos ); if( nItemId ) { - const ULONG nPos = nItemId - 1; + const sal_uIntPtr nPos = nItemId - 1; mpIconView->Hide(); mpListView->Hide(); @@ -725,8 +746,8 @@ void GalleryBrowser2::SetMode( GalleryBrowserMode eMode ) if( mpCurTheme && mpCurTheme->GetObjectKind( nPos ) == SGA_OBJ_SOUND ) mpPreview->PreviewMedia( mpCurTheme->GetObjectURL( nPos ) ); - maViewBox.EnableItem( TBX_ID_ICON, FALSE ); - maViewBox.EnableItem( TBX_ID_LIST, FALSE ); + maViewBox.EnableItem( TBX_ID_ICON, sal_False ); + maViewBox.EnableItem( TBX_ID_LIST, sal_False ); } } break; @@ -765,11 +786,11 @@ void GalleryBrowser2::Travel( GalleryBrowserTravel eTravel ) if( mpCurTheme ) { Point aSelPos; - const ULONG nItemId = ImplGetSelectedItemId( NULL, aSelPos ); + const sal_uIntPtr nItemId = ImplGetSelectedItemId( NULL, aSelPos ); if( nItemId ) { - ULONG nNewItemId = nItemId; + sal_uIntPtr nNewItemId = nItemId; switch( eTravel ) { @@ -794,7 +815,7 @@ void GalleryBrowser2::Travel( GalleryBrowserTravel eTravel ) if( GALLERYBROWSERMODE_PREVIEW == GetMode() ) { Graphic aGraphic; - const ULONG nPos = nNewItemId - 1; + const sal_uIntPtr nPos = nNewItemId - 1; mpCurTheme->GetGraphic( nPos, aGraphic ); mpPreview->SetGraphic( aGraphic ); @@ -811,7 +832,7 @@ void GalleryBrowser2::Travel( GalleryBrowserTravel eTravel ) // ----------------------------------------------------------------------------- -void GalleryBrowser2::ImplUpdateViews( USHORT nSelectionId ) +void GalleryBrowser2::ImplUpdateViews( sal_uInt16 nSelectionId ) { mpIconView->Hide(); mpListView->Hide(); @@ -822,10 +843,10 @@ void GalleryBrowser2::ImplUpdateViews( USHORT nSelectionId ) if( mpCurTheme ) { - for( ULONG i = 0, nCount = mpCurTheme->GetObjectCount(); i < nCount; ) + for( sal_uIntPtr i = 0, nCount = mpCurTheme->GetObjectCount(); i < nCount; ) { mpListView->RowInserted( i++ ); - mpIconView->InsertItem( (USHORT) i ); + mpIconView->InsertItem( (sal_uInt16) i ); } ImplSelectItemId( ( ( nSelectionId > mpCurTheme->GetObjectCount() ) ? mpCurTheme->GetObjectCount() : nSelectionId ) ); @@ -853,11 +874,11 @@ void GalleryBrowser2::ImplUpdateInfoBar() if( mpCurTheme ) { Point aSelPos; - const ULONG nItemId = ImplGetSelectedItemId( NULL, aSelPos ); + const sal_uIntPtr nItemId = ImplGetSelectedItemId( NULL, aSelPos ); if( nItemId ) { - const ULONG nPos = nItemId - 1; + const sal_uIntPtr nPos = nItemId - 1; aInfoText = mpCurTheme->GetName(); @@ -879,10 +900,10 @@ void GalleryBrowser2::ImplUpdateInfoBar() // ----------------------------------------------------------------------------- -ULONG GalleryBrowser2::ImplGetSelectedItemId( const Point* pSelPos, Point& rSelPos ) +sal_uIntPtr GalleryBrowser2::ImplGetSelectedItemId( const Point* pSelPos, Point& rSelPos ) { const Size aOutputSizePixel( GetOutputSizePixel() ); - ULONG nRet = 0; + sal_uIntPtr nRet = 0; if( GALLERYBROWSERMODE_PREVIEW == GetMode() ) { @@ -903,7 +924,7 @@ ULONG GalleryBrowser2::ImplGetSelectedItemId( const Point* pSelPos, Point& rSelP else { nRet = mpIconView->GetSelectItemId(); - rSelPos = mpIconView->GetItemRect( (USHORT) nRet ).Center(); + rSelPos = mpIconView->GetItemRect( (sal_uInt16) nRet ).Center(); } } else @@ -916,7 +937,7 @@ ULONG GalleryBrowser2::ImplGetSelectedItemId( const Point* pSelPos, Point& rSelP else { nRet = mpListView->FirstSelectedRow() + 1; - rSelPos = mpListView->GetFieldRectPixel( (USHORT) nRet, 1 ).Center(); + rSelPos = mpListView->GetFieldRectPixel( (sal_uInt16) nRet, 1 ).Center(); } } @@ -933,22 +954,22 @@ ULONG GalleryBrowser2::ImplGetSelectedItemId( const Point* pSelPos, Point& rSelP // ----------------------------------------------------------------------------- -void GalleryBrowser2::ImplSelectItemId( ULONG nItemId ) +void GalleryBrowser2::ImplSelectItemId( sal_uIntPtr nItemId ) { if( nItemId ) { - mpIconView->SelectItem( (USHORT) nItemId ); + mpIconView->SelectItem( (sal_uInt16) nItemId ); mpListView->SelectRow( nItemId - 1 ); } } // ----------------------------------------------------------------------------- -void GalleryBrowser2::ImplExecute( USHORT nId ) +void GalleryBrowser2::ImplExecute( sal_uInt16 nId ) { Point aSelPos; - const ULONG nItemId = ImplGetSelectedItemId( NULL, aSelPos ); + const sal_uIntPtr nItemId = ImplGetSelectedItemId( NULL, aSelPos ); if( mpCurTheme && nItemId ) { @@ -1074,7 +1095,7 @@ void GalleryBrowser2::ImplExecute( USHORT nId ) // ----------------------------------------------------------------------------- -String GalleryBrowser2::GetItemText( const GalleryTheme& rTheme, const SgaObject& rObj, ULONG nItemTextFlags ) +String GalleryBrowser2::GetItemText( const GalleryTheme& rTheme, const SgaObject& rObj, sal_uIntPtr nItemTextFlags ) { INetURLObject aURL; String aRet; @@ -1177,9 +1198,9 @@ Graphic GalleryBrowser2::GetGraphic() const // ----------------------------------------------------------------------------- -BOOL GalleryBrowser2::GetVCDrawModel( FmFormModel& rModel ) const +sal_Bool GalleryBrowser2::GetVCDrawModel( FmFormModel& rModel ) const { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( mpCurTheme && mnCurActionPos != 0xffffffff ) bRet = mpCurTheme->GetModel( mnCurActionPos, rModel ); @@ -1189,7 +1210,7 @@ BOOL GalleryBrowser2::GetVCDrawModel( FmFormModel& rModel ) const // ----------------------------------------------------------------------------- -BOOL GalleryBrowser2::IsLinkage() const +sal_Bool GalleryBrowser2::IsLinkage() const { return mbCurActionIsLinkage; } |