diff options
author | Malte Timmermann [mt] <malte.timmermann@oracle.com> | 2011-02-15 17:14:59 +0100 |
---|---|---|
committer | Malte Timmermann [mt] <malte.timmermann@oracle.com> | 2011-02-15 17:14:59 +0100 |
commit | 6aa45bbe9dbaa96e1b365f22969e1ad3d7ce9553 (patch) | |
tree | 46f9ccd7d99842ee5ed4f3683686783d2e17590d /svx/source/gallery2 | |
parent | 72f6e25f3d79a789caaa3ba190a85dbf1b65a693 (diff) | |
parent | cd0d6a5a6775f197fdb7e78b54c8133074a7a236 (diff) |
accfixes: merged to m100
Diffstat (limited to 'svx/source/gallery2')
-rw-r--r-- | svx/source/gallery2/codec.cxx | 38 | ||||
-rw-r--r-- | svx/source/gallery2/codec.hxx | 2 | ||||
-rw-r--r-- | svx/source/gallery2/galbrws.cxx | 24 | ||||
-rw-r--r-- | svx/source/gallery2/galbrws1.cxx | 64 | ||||
-rw-r--r-- | svx/source/gallery2/galbrws1.hxx | 10 | ||||
-rw-r--r-- | svx/source/gallery2/galbrws2.cxx | 164 | ||||
-rw-r--r-- | svx/source/gallery2/galctrl.cxx | 26 | ||||
-rw-r--r-- | svx/source/gallery2/galexpl.cxx | 112 | ||||
-rw-r--r-- | svx/source/gallery2/gallery1.cxx | 96 | ||||
-rw-r--r-- | svx/source/gallery2/galmisc.cxx | 62 | ||||
-rw-r--r-- | svx/source/gallery2/galobj.cxx | 66 | ||||
-rw-r--r-- | svx/source/gallery2/galtheme.cxx | 196 | ||||
-rw-r--r-- | svx/source/gallery2/makefile.mk | 69 |
13 files changed, 430 insertions, 499 deletions
diff --git a/svx/source/gallery2/codec.cxx b/svx/source/gallery2/codec.cxx index 7249df9c121f..3306e7896c5d 100644 --- a/svx/source/gallery2/codec.cxx +++ b/svx/source/gallery2/codec.cxx @@ -49,23 +49,23 @@ GalleryCodec::~GalleryCodec() // ----------------------------------------------------------------------------- -BOOL GalleryCodec::IsCoded( SvStream& rStm, UINT32& rVersion ) +sal_Bool GalleryCodec::IsCoded( SvStream& rStm, sal_uInt32& rVersion ) { - const ULONG nPos = rStm.Tell(); - BOOL bRet; - BYTE cByte1, cByte2, cByte3, cByte4, cByte5, cByte6; + const sal_uIntPtr nPos = rStm.Tell(); + sal_Bool bRet; + sal_uInt8 cByte1, cByte2, cByte3, cByte4, cByte5, cByte6; rStm >> cByte1 >> cByte2 >> cByte3 >> cByte4 >> cByte5 >> cByte6; if ( cByte1 == 'S' && cByte2 == 'V' && cByte3 == 'R' && cByte4 == 'L' && cByte5 == 'E' && ( cByte6 == '1' || cByte6 == '2' ) ) { rVersion = ( ( cByte6 == '1' ) ? 1 : 2 ); - bRet = TRUE; + bRet = sal_True; } else { rVersion = 0; - bRet = FALSE; + bRet = sal_False; } rStm.Seek( nPos ); @@ -77,10 +77,10 @@ BOOL GalleryCodec::IsCoded( SvStream& rStm, UINT32& rVersion ) void GalleryCodec::Write( SvStream& rStmToWrite ) { - UINT32 nPos, nCompSize; + sal_uInt32 nPos, nCompSize; rStmToWrite.Seek( STREAM_SEEK_TO_END ); - const UINT32 nSize = rStmToWrite.Tell(); + const sal_uInt32 nSize = rStmToWrite.Tell(); rStmToWrite.Seek( 0UL ); rStm << 'S' << 'V' << 'R' << 'L' << 'E' << '2'; @@ -104,11 +104,11 @@ void GalleryCodec::Write( SvStream& rStmToWrite ) void GalleryCodec::Read( SvStream& rStmToRead ) { - UINT32 nVersion = 0; + sal_uInt32 nVersion = 0; if( IsCoded( rStm, nVersion ) ) { - UINT32 nCompressedSize, nUnCompressedSize; + sal_uInt32 nCompressedSize, nUnCompressedSize; rStm.SeekRel( 6 ); rStm >> nUnCompressedSize >> nCompressedSize; @@ -116,13 +116,13 @@ void GalleryCodec::Read( SvStream& rStmToRead ) // decompress if( 1 == nVersion ) { - BYTE* pCompressedBuffer = new BYTE[ nCompressedSize ]; rStm.Read( pCompressedBuffer, nCompressedSize ); - BYTE* pInBuf = pCompressedBuffer; - BYTE* pOutBuf = new BYTE[ nUnCompressedSize ]; - BYTE* pTmpBuf = pOutBuf; - BYTE* pLast = pOutBuf + nUnCompressedSize - 1; - ULONG nIndex = 0UL, nCountByte, nRunByte; - BOOL bEndDecoding = FALSE; + sal_uInt8* pCompressedBuffer = new sal_uInt8[ nCompressedSize ]; rStm.Read( pCompressedBuffer, nCompressedSize ); + sal_uInt8* pInBuf = pCompressedBuffer; + sal_uInt8* pOutBuf = new sal_uInt8[ nUnCompressedSize ]; + sal_uInt8* pTmpBuf = pOutBuf; + sal_uInt8* pLast = pOutBuf + nUnCompressedSize - 1; + sal_uIntPtr nIndex = 0UL, nCountByte, nRunByte; + sal_Bool bEndDecoding = sal_False; do { @@ -144,11 +144,11 @@ void GalleryCodec::Read( SvStream& rStmToRead ) pInBuf++; } else if ( nRunByte == 1 ) // Ende des Bildes - bEndDecoding = TRUE; + bEndDecoding = sal_True; } else { - const BYTE cVal = *pInBuf++; + const sal_uInt8 cVal = *pInBuf++; memset( &pTmpBuf[ nIndex ], cVal, nCountByte ); nIndex += nCountByte; diff --git a/svx/source/gallery2/codec.hxx b/svx/source/gallery2/codec.hxx index 7a13cad3fd46..ca7ee5d3adbf 100644 --- a/svx/source/gallery2/codec.hxx +++ b/svx/source/gallery2/codec.hxx @@ -47,5 +47,5 @@ public: void Write( SvStream& rStmToWrite ); void Read( SvStream& rStmToRead ); - static BOOL IsCoded( SvStream& rStm, UINT32& rVersion ); + static sal_Bool IsCoded( SvStream& rStm, sal_uInt32& rVersion ); }; diff --git a/svx/source/gallery2/galbrws.cxx b/svx/source/gallery2/galbrws.cxx index b972dccd9ab7..5d4e4297f0a4 100644 --- a/svx/source/gallery2/galbrws.cxx +++ b/svx/source/gallery2/galbrws.cxx @@ -81,7 +81,7 @@ void GallerySplitter::DataChanged( const DataChangedEvent& rDCEvt ) // - SvxGalleryChildWindow - // ------------------------- -GalleryChildWindow::GalleryChildWindow( Window* _pParent, USHORT nId, SfxBindings* pBindings, SfxChildWinInfo* pInfo ) : +GalleryChildWindow::GalleryChildWindow( Window* _pParent, sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* pInfo ) : SfxChildWindow( _pParent, nId ) { pWindow = new GalleryBrowser( pBindings, this, _pParent, GAL_RESID( RID_SVXDLG_GALLERYBROWSER ) ); @@ -116,11 +116,11 @@ GalleryBrowser::GalleryBrowser( SfxBindings* _pBindings, SfxChildWindow* pCW, SetMinOutputSizePixel( maLastSize = GetOutputSizePixel() ); mpBrowser1->SelectTheme( 0 ); - mpBrowser1->Show( TRUE ); - mpBrowser2->Show( TRUE ); + mpBrowser1->Show( sal_True ); + mpBrowser2->Show( sal_True ); mpSplitter->SetSplitHdl( LINK( this, GalleryBrowser, SplitHdl ) ); - mpSplitter->Show( TRUE ); + mpSplitter->Show( sal_True ); InitSettings(); } @@ -182,17 +182,17 @@ void GalleryBrowser::Resize() // ----------------------------------------------------------------------------- -BOOL GalleryBrowser::KeyInput( const KeyEvent& rKEvt, Window* ) +sal_Bool GalleryBrowser::KeyInput( const KeyEvent& rKEvt, Window* ) { - const USHORT nCode = rKEvt.GetKeyCode().GetCode(); - BOOL bRet = ( !rKEvt.GetKeyCode().IsMod1() && + const sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode(); + sal_Bool bRet = ( !rKEvt.GetKeyCode().IsMod1() && ( ( KEY_TAB == nCode ) || ( KEY_F6 == nCode && rKEvt.GetKeyCode().IsMod2() ) ) ); if( bRet ) { if( !rKEvt.GetKeyCode().IsShift() ) { - if( mpBrowser1->mpThemes->HasChildPathFocus( TRUE ) ) + if( mpBrowser1->mpThemes->HasChildPathFocus( sal_True ) ) mpBrowser2->GetViewWindow()->GrabFocus(); else if( mpBrowser2->GetViewWindow()->HasFocus() ) mpBrowser2->maViewBox.GrabFocus(); @@ -203,7 +203,7 @@ BOOL GalleryBrowser::KeyInput( const KeyEvent& rKEvt, Window* ) } else { - if( mpBrowser1->mpThemes->HasChildPathFocus( TRUE ) ) + if( mpBrowser1->mpThemes->HasChildPathFocus( sal_True ) ) mpBrowser1->maNewTheme.GrabFocus(); else if( mpBrowser1->maNewTheme.HasFocus() ) mpBrowser2->maViewBox.GrabFocus(); @@ -219,7 +219,7 @@ BOOL GalleryBrowser::KeyInput( const KeyEvent& rKEvt, Window* ) // ----------------------------------------------------------------------------- -BOOL GalleryBrowser::Close() +sal_Bool GalleryBrowser::Close() { return SfxDockingWindow::Close(); } @@ -262,14 +262,14 @@ Graphic GalleryBrowser::GetGraphic() const // ----------------------------------------------------------------------------- -BOOL GalleryBrowser::GetVCDrawModel( FmFormModel& rModel ) const +sal_Bool GalleryBrowser::GetVCDrawModel( FmFormModel& rModel ) const { return mpBrowser2->GetVCDrawModel( rModel ); } // ----------------------------------------------------------------------------- -BOOL GalleryBrowser::IsLinkage() const +sal_Bool GalleryBrowser::IsLinkage() const { return mpBrowser2->IsLinkage(); } diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index 80761cbdea1d..3704262833ed 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -166,12 +166,12 @@ GalleryBrowser1::GalleryBrowser1( GalleryBrowser* pParent, const ResId& rResId, mpThemes->SetSelectHdl( LINK( this, GalleryBrowser1, SelectThemeHdl ) ); mpThemes->SetAccessibleName(String(SVX_RES( RID_SVXSTR_GALLERYPROPS_GALTHEME ) ) ); - 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 ); } // ----------------------------------------------------------------------------- @@ -187,11 +187,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 ) ) { @@ -258,30 +258,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 ); @@ -344,7 +344,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 ) ) { @@ -403,7 +403,7 @@ IMPL_LINK( GalleryBrowser1, DestroyThemePropertiesDlgHdl, VclAbstractDialog2*, p // ----------------------------------------------------------------------------- -void GalleryBrowser1::ImplExecute( USHORT nId ) +void GalleryBrowser1::ImplExecute( sal_uInt16 nId ) { switch( nId ) { @@ -449,7 +449,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 ) ) { @@ -480,7 +480,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 } } @@ -528,8 +528,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() ) ); @@ -550,8 +550,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 ) { @@ -581,15 +581,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() ) { @@ -640,7 +640,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; } } @@ -651,7 +651,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() ) { @@ -699,7 +699,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 ) ) { diff --git a/svx/source/gallery2/galbrws1.hxx b/svx/source/gallery2/galbrws1.hxx index 2903dcabef59..d05187d4c856 100644 --- a/svx/source/gallery2/galbrws1.hxx +++ b/svx/source/gallery2/galbrws1.hxx @@ -99,10 +99,10 @@ private: Image aImgImported; void ImplAdjustControls(); - ULONG ImplInsertThemeEntry( const GalleryThemeEntry* pEntry ); + sal_uIntPtr ImplInsertThemeEntry( const GalleryThemeEntry* pEntry ); void ImplFillExchangeData( const GalleryTheme* pThm, ExchangeData& rData ); - ::std::vector< USHORT > ImplGetExecuteVector(); - void ImplExecute( USHORT nId ); + ::std::vector< sal_uInt16 > ImplGetExecuteVector(); + void ImplExecute( sal_uInt16 nId ); void ImplGalleryThemeProperties( const String & rThemeName, bool bCreateNew ); void ImplEndGalleryThemeProperties( VclAbstractDialog2* pDialog, bool bCreateNew ); @@ -127,9 +127,9 @@ public: ~GalleryBrowser1(); void SelectTheme( const String& rThemeName ) { mpThemes->SelectEntry( rThemeName ); SelectThemeHdl( NULL ); } - void SelectTheme( ULONG nThemePos ) { mpThemes->SelectEntryPos( (USHORT) nThemePos ); SelectThemeHdl( NULL ); } + void SelectTheme( sal_uIntPtr nThemePos ) { mpThemes->SelectEntryPos( (sal_uInt16) nThemePos ); SelectThemeHdl( NULL ); } String GetSelectedTheme() { return mpThemes->GetEntryCount() ? mpThemes->GetEntry( mpThemes->GetSelectEntryPos() ) : String(); } void ShowContextMenu(); - BOOL KeyInput( const KeyEvent& rKEvt, Window* pWindow ); + sal_Bool KeyInput( const KeyEvent& rKEvt, Window* pWindow ); }; diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx index 0d3f91b6253b..2fff76ba0c76 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -80,20 +80,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 ) @@ -110,7 +110,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 ) ) { @@ -124,8 +124,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() ); @@ -160,20 +160,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 ), @@ -187,7 +187,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 ); @@ -199,28 +199,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() ) { @@ -231,23 +231,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 ); } @@ -263,7 +263,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 ) ) { @@ -316,7 +316,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 ) ); @@ -449,7 +449,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; @@ -494,8 +494,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 ); @@ -513,7 +513,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 ); @@ -533,7 +533,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() ) ) { @@ -554,31 +554,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() ) @@ -590,7 +590,7 @@ BOOL GalleryBrowser2::KeyInput( const KeyEvent& rKEvt, Window* pWindow ) if( bPreview ) { TogglePreview( pWindow ); - bRet = TRUE; + bRet = sal_True; } } break; @@ -627,7 +627,7 @@ BOOL GalleryBrowser2::KeyInput( const KeyEvent& rKEvt, Window* pWindow ) if( nExecuteId ) { ImplExecute( nExecuteId ); - bRet = TRUE; + bRet = sal_True; } } @@ -666,9 +666,9 @@ 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); @@ -697,11 +697,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; @@ -715,11 +715,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; @@ -727,11 +727,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(); @@ -745,8 +745,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; @@ -785,11 +785,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 ) { @@ -814,7 +814,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 ); @@ -831,7 +831,7 @@ void GalleryBrowser2::Travel( GalleryBrowserTravel eTravel ) // ----------------------------------------------------------------------------- -void GalleryBrowser2::ImplUpdateViews( USHORT nSelectionId ) +void GalleryBrowser2::ImplUpdateViews( sal_uInt16 nSelectionId ) { mpIconView->Hide(); mpListView->Hide(); @@ -842,10 +842,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 ) ); @@ -873,11 +873,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(); @@ -899,10 +899,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() ) { @@ -923,7 +923,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 @@ -936,7 +936,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(); } } @@ -953,22 +953,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 ) { @@ -1094,7 +1094,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; @@ -1197,9 +1197,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 ); @@ -1209,7 +1209,7 @@ BOOL GalleryBrowser2::GetVCDrawModel( FmFormModel& rModel ) const // ----------------------------------------------------------------------------- -BOOL GalleryBrowser2::IsLinkage() const +sal_Bool GalleryBrowser2::IsLinkage() const { return mbCurActionIsLinkage; } diff --git a/svx/source/gallery2/galctrl.cxx b/svx/source/gallery2/galctrl.cxx index d6817134fefb..6dca7b050e01 100644 --- a/svx/source/gallery2/galctrl.cxx +++ b/svx/source/gallery2/galctrl.cxx @@ -126,11 +126,11 @@ void GalleryPreview::DataChanged( const DataChangedEvent& rDCEvt ) // ------------------------------------------------------------------------ -BOOL GalleryPreview::ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangle& rResultRect ) const +sal_Bool GalleryPreview::ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangle& rResultRect ) const { const Size aWinSize( GetOutputSizePixel() ); Size aNewSize( LogicToPixel( rGraphic.GetPrefSize(), rGraphic.GetPrefMapMode() ) ); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( aNewSize.Width() && aNewSize.Height() ) { @@ -153,7 +153,7 @@ BOOL GalleryPreview::ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangl ( aWinSize.Height() - aNewSize.Height() ) >> 1 ); rResultRect = Rectangle( aNewPos, aNewSize ); - bRet = TRUE; + bRet = sal_True; } return bRet; @@ -307,7 +307,7 @@ GalleryIconView::GalleryIconView( GalleryBrowser2* pParent, GalleryTheme* pTheme DragSourceHelper( this ), mpTheme ( pTheme ) { - EnableFullItemMode( FALSE ); + EnableFullItemMode( sal_False ); SetHelpId( HID_GALLERY_WINDOW ); InitSettings(); @@ -346,7 +346,7 @@ void GalleryIconView::DataChanged( const DataChangedEvent& rDCEvt ) void GalleryIconView::UserDraw( const UserDrawEvent& rUDEvt ) { - const USHORT nId = rUDEvt.GetItemId(); + const sal_uInt16 nId = rUDEvt.GetItemId(); if( nId && mpTheme ) { @@ -457,7 +457,7 @@ sal_Int8 GalleryIconView::ExecuteDrop( const ExecuteDropEvent& rEvt ) void GalleryIconView::StartDrag( sal_Int8, const Point& ) { - const CommandEvent aEvt( GetPointerPosPixel(), COMMAND_STARTDRAG, TRUE ); + const CommandEvent aEvt( GetPointerPosPixel(), COMMAND_STARTDRAG, sal_True ); Region aRegion; // call this to initiate dragging for ValueSet @@ -473,7 +473,7 @@ GalleryListView::GalleryListView( GalleryBrowser2* pParent, GalleryTheme* pTheme BrowseBox( pParent, WB_TABSTOP | WB_3DLOOK | WB_BORDER ), mpTheme( pTheme ), mnCurRow( 0 ), - mbInit( FALSE ) + mbInit( sal_False ) { SetHelpId( HID_GALLERY_WINDOW ); @@ -512,15 +512,15 @@ void GalleryListView::DataChanged( const DataChangedEvent& rDCEvt ) // ------------------------------------------------------------------------ -BOOL GalleryListView::SeekRow( long nRow ) +sal_Bool GalleryListView::SeekRow( long nRow ) { mnCurRow = nRow; - return TRUE; + return sal_True; } // ----------------------------------------------------------------------------- -String GalleryListView::GetCellText(long _nRow, USHORT nColumnId) const +String GalleryListView::GetCellText(long _nRow, sal_uInt16 nColumnId) const { String sRet; if( mpTheme && ( _nRow < static_cast< long >( mpTheme->GetObjectCount() ) ) ) @@ -548,7 +548,7 @@ Rectangle GalleryListView::GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nC if ( SeekRow(_nRow) ) { SvxFont aFont( GetFont() ); - AccessibleStringWrap aStringWrap( *this, aFont, GetCellText(_nRow, sal::static_int_cast<USHORT>( GetColumnId( sal::static_int_cast<USHORT>(_nColumnPos) ) ) ) ); + AccessibleStringWrap aStringWrap( *this, aFont, GetCellText(_nRow, sal::static_int_cast<sal_uInt16>( GetColumnId( sal::static_int_cast<sal_uInt16>(_nColumnPos) ) ) ) ); // get the bounds inside the string aStringWrap.GetCharacterBounds(nIndex, aRect); @@ -567,7 +567,7 @@ sal_Int32 GalleryListView::GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColu if ( SeekRow(_nRow) ) { SvxFont aFont( GetFont() ); - AccessibleStringWrap aStringWrap( *this, aFont, GetCellText(_nRow, sal::static_int_cast<USHORT>(GetColumnId(sal::static_int_cast<USHORT>(_nColumnPos)))) ); + AccessibleStringWrap aStringWrap( *this, aFont, GetCellText(_nRow, sal::static_int_cast<sal_uInt16>(GetColumnId(sal::static_int_cast<sal_uInt16>(_nColumnPos)))) ); nRet = aStringWrap.GetIndexAtPoint(_rPoint); } return nRet; @@ -575,7 +575,7 @@ sal_Int32 GalleryListView::GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColu // ------------------------------------------------------------------------ -void GalleryListView::PaintField( OutputDevice& rDev, const Rectangle& rRect, USHORT nColumnId ) const +void GalleryListView::PaintField( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColumnId ) const { rDev.Push( PUSH_CLIPREGION ); rDev.IntersectClipRegion( rRect ); diff --git a/svx/source/gallery2/galexpl.cxx b/svx/source/gallery2/galexpl.cxx index cad6780f11f7..84f62fc795e7 100644 --- a/svx/source/gallery2/galexpl.cxx +++ b/svx/source/gallery2/galexpl.cxx @@ -94,27 +94,27 @@ Graphic GalleryExplorer::GetGraphic() const // ------------------------------------------------------------------------ -BOOL GalleryExplorer::GetVCDrawModel( FmFormModel& rModel ) const +sal_Bool GalleryExplorer::GetVCDrawModel( FmFormModel& rModel ) const { return GALLERYBROWSER()->GetVCDrawModel( rModel ); } // ------------------------------------------------------------------------ -BOOL GalleryExplorer::IsLinkage() const +sal_Bool GalleryExplorer::IsLinkage() const { return GALLERYBROWSER()->IsLinkage(); } // ------------------------------------------------------------------------ -BOOL GalleryExplorer::FillThemeList( List& rThemeList ) +sal_Bool GalleryExplorer::FillThemeList( List& rThemeList ) { Gallery* pGal = ImplGetGallery(); if( pGal ) { - for( ULONG i = 0, nCount = pGal->GetThemeCount(); i < nCount; i++ ) + for( sal_uIntPtr i = 0, nCount = pGal->GetThemeCount(); i < nCount; i++ ) { const GalleryThemeEntry* pEntry = pGal->GetThemeInfo( i ); @@ -128,7 +128,7 @@ BOOL GalleryExplorer::FillThemeList( List& rThemeList ) // ------------------------------------------------------------------------ -BOOL GalleryExplorer::FillObjList( const String& rThemeName, List& rObjList ) +sal_Bool GalleryExplorer::FillObjList( const String& rThemeName, List& rObjList ) { Gallery* pGal = ImplGetGallery(); @@ -139,7 +139,7 @@ BOOL GalleryExplorer::FillObjList( const String& rThemeName, List& rObjList ) if( pTheme ) { - for( ULONG i = 0, nCount = pTheme->GetObjectCount(); i < nCount; i++ ) + for( sal_uIntPtr i = 0, nCount = pTheme->GetObjectCount(); i < nCount; i++ ) rObjList.Insert( new String( pTheme->GetObjectURL( i ).GetMainURL( INetURLObject::NO_DECODE ) ), LIST_APPEND ); pGal->ReleaseTheme( pTheme, aListener ); @@ -151,10 +151,10 @@ BOOL GalleryExplorer::FillObjList( const String& rThemeName, List& rObjList ) // ------------------------------------------------------------------------ -BOOL GalleryExplorer::FillObjList( ULONG nThemeId, List& rObjList ) +sal_Bool GalleryExplorer::FillObjList( sal_uIntPtr nThemeId, List& rObjList ) { Gallery* pGal = ImplGetGallery(); - return( pGal ? FillObjList( pGal->GetThemeName( nThemeId ), rObjList ) : FALSE ); + return( pGal ? FillObjList( pGal->GetThemeName( nThemeId ), rObjList ) : sal_False ); } // ------------------------------------------------------------------------ @@ -169,7 +169,7 @@ sal_Bool GalleryExplorer::FillObjListTitle( const sal_uInt32 nThemeId, std::vect if( pTheme ) { - for( ULONG i = 0, nCount = pTheme->GetObjectCount(); i < nCount; i++ ) + for( sal_uIntPtr i = 0, nCount = pTheme->GetObjectCount(); i < nCount; i++ ) { SgaObject* pObj = pTheme->AcquireObject( i ); if ( pObj ) @@ -187,24 +187,24 @@ sal_Bool GalleryExplorer::FillObjListTitle( const sal_uInt32 nThemeId, std::vect // ------------------------------------------------------------------------ -BOOL GalleryExplorer::InsertURL( const String& rThemeName, const String& rURL ) +sal_Bool GalleryExplorer::InsertURL( const String& rThemeName, const String& rURL ) { return InsertURL( rThemeName, rURL, SGA_FORMAT_ALL ); } // ------------------------------------------------------------------------ -BOOL GalleryExplorer::InsertURL( ULONG nThemeId, const String& rURL ) +sal_Bool GalleryExplorer::InsertURL( sal_uIntPtr nThemeId, const String& rURL ) { return InsertURL( nThemeId, rURL, SGA_FORMAT_ALL ); } // ------------------------------------------------------------------------ -BOOL GalleryExplorer::InsertURL( const String& rThemeName, const String& rURL, const ULONG ) +sal_Bool GalleryExplorer::InsertURL( const String& rThemeName, const String& rURL, const sal_uIntPtr ) { Gallery* pGal = ImplGetGallery(); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( pGal ) { @@ -225,18 +225,18 @@ BOOL GalleryExplorer::InsertURL( const String& rThemeName, const String& rURL, c // ------------------------------------------------------------------------ -BOOL GalleryExplorer::InsertURL( ULONG nThemeId, const String& rURL, const ULONG nSgaFormat ) +sal_Bool GalleryExplorer::InsertURL( sal_uIntPtr nThemeId, const String& rURL, const sal_uIntPtr nSgaFormat ) { Gallery* pGal = ImplGetGallery(); - return( pGal ? InsertURL( pGal->GetThemeName( nThemeId ), rURL, nSgaFormat ) : FALSE ); + return( pGal ? InsertURL( pGal->GetThemeName( nThemeId ), rURL, nSgaFormat ) : sal_False ); } // ------------------------------------------------------------------------ -ULONG GalleryExplorer::GetObjCount( const String& rThemeName ) +sal_uIntPtr GalleryExplorer::GetObjCount( const String& rThemeName ) { Gallery* pGal = ImplGetGallery(); - ULONG nRet = 0; + sal_uIntPtr nRet = 0; if( pGal ) { @@ -255,20 +255,20 @@ ULONG GalleryExplorer::GetObjCount( const String& rThemeName ) // ------------------------------------------------------------------------ -ULONG GalleryExplorer::GetObjCount( ULONG nThemeId ) +sal_uIntPtr GalleryExplorer::GetObjCount( sal_uIntPtr nThemeId ) { Gallery* pGal = ImplGetGallery(); - return( pGal ? GetObjCount( pGal->GetThemeName( nThemeId ) ) : FALSE ); + return( pGal ? GetObjCount( pGal->GetThemeName( nThemeId ) ) : sal_False ); } // ------------------------------------------------------------------------ -BOOL GalleryExplorer::GetGraphicObj( const String& rThemeName, ULONG nPos, +sal_Bool GalleryExplorer::GetGraphicObj( const String& rThemeName, sal_uIntPtr nPos, Graphic* pGraphic, Bitmap* pThumb, - BOOL bProgress ) + sal_Bool bProgress ) { Gallery* pGal = ImplGetGallery(); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( pGal ) { @@ -292,20 +292,20 @@ BOOL GalleryExplorer::GetGraphicObj( const String& rThemeName, ULONG nPos, // ------------------------------------------------------------------------ -BOOL GalleryExplorer::GetGraphicObj( ULONG nThemeId, ULONG nPos, +sal_Bool GalleryExplorer::GetGraphicObj( sal_uIntPtr nThemeId, sal_uIntPtr nPos, Graphic* pGraphic, Bitmap* pThumb, - BOOL bProgress ) + sal_Bool bProgress ) { Gallery* pGal = ImplGetGallery(); - return( pGal ? GetGraphicObj( pGal->GetThemeName( nThemeId ), nPos, pGraphic, pThumb, bProgress ) : FALSE ); + return( pGal ? GetGraphicObj( pGal->GetThemeName( nThemeId ), nPos, pGraphic, pThumb, bProgress ) : sal_False ); } // ------------------------------------------------------------------------ -BOOL GalleryExplorer::InsertGraphicObj( const String& rThemeName, const Graphic& rGraphic ) +sal_Bool GalleryExplorer::InsertGraphicObj( const String& rThemeName, const Graphic& rGraphic ) { Gallery* pGal = ImplGetGallery(); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( pGal ) { @@ -324,18 +324,18 @@ BOOL GalleryExplorer::InsertGraphicObj( const String& rThemeName, const Graphic& // ------------------------------------------------------------------------ -BOOL GalleryExplorer::InsertGraphicObj( ULONG nThemeId, const Graphic& rGraphic ) +sal_Bool GalleryExplorer::InsertGraphicObj( sal_uIntPtr nThemeId, const Graphic& rGraphic ) { Gallery* pGal = ImplGetGallery(); - return( pGal ? InsertGraphicObj( pGal->GetThemeName( nThemeId ), rGraphic ) : FALSE ); + return( pGal ? InsertGraphicObj( pGal->GetThemeName( nThemeId ), rGraphic ) : sal_False ); } // ------------------------------------------------------------------------ -ULONG GalleryExplorer::GetSdrObjCount( const String& rThemeName ) +sal_uIntPtr GalleryExplorer::GetSdrObjCount( const String& rThemeName ) { Gallery* pGal = ImplGetGallery(); - ULONG nRet = 0; + sal_uIntPtr nRet = 0; if( pGal ) { @@ -344,7 +344,7 @@ ULONG GalleryExplorer::GetSdrObjCount( const String& rThemeName ) if( pTheme ) { - for( ULONG i = 0, nCount = pTheme->GetObjectCount(); i < nCount; i++ ) + for( sal_uIntPtr i = 0, nCount = pTheme->GetObjectCount(); i < nCount; i++ ) if( SGA_OBJ_SVDRAW == pTheme->GetObjectKind( i ) ) nRet++; @@ -357,19 +357,19 @@ ULONG GalleryExplorer::GetSdrObjCount( const String& rThemeName ) // ------------------------------------------------------------------------ -ULONG GalleryExplorer::GetSdrObjCount( ULONG nThemeId ) +sal_uIntPtr GalleryExplorer::GetSdrObjCount( sal_uIntPtr nThemeId ) { Gallery* pGal = ImplGetGallery(); - return( pGal ? GetSdrObjCount( pGal->GetThemeName( nThemeId ) ) : FALSE ); + return( pGal ? GetSdrObjCount( pGal->GetThemeName( nThemeId ) ) : sal_False ); } // ------------------------------------------------------------------------ -BOOL GalleryExplorer::GetSdrObj( const String& rThemeName, ULONG nSdrModelPos, +sal_Bool GalleryExplorer::GetSdrObj( const String& rThemeName, sal_uIntPtr nSdrModelPos, SdrModel* pModel, Bitmap* pThumb ) { Gallery* pGal = ImplGetGallery(); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( pGal ) { @@ -378,14 +378,14 @@ BOOL GalleryExplorer::GetSdrObj( const String& rThemeName, ULONG nSdrModelPos, if( pTheme ) { - for( ULONG i = 0, nCount = pTheme->GetObjectCount(), nActPos = 0; ( i < nCount ) && !bRet; i++ ) + for( sal_uIntPtr i = 0, nCount = pTheme->GetObjectCount(), nActPos = 0; ( i < nCount ) && !bRet; i++ ) { if( SGA_OBJ_SVDRAW == pTheme->GetObjectKind( i ) ) { if( nActPos++ == nSdrModelPos ) { if( pModel ) - bRet = bRet || pTheme->GetModel( i, *pModel, FALSE ); + bRet = bRet || pTheme->GetModel( i, *pModel, sal_False ); if( pThumb ) bRet = bRet || pTheme->GetThumb( i, *pThumb ); @@ -402,19 +402,19 @@ BOOL GalleryExplorer::GetSdrObj( const String& rThemeName, ULONG nSdrModelPos, // ------------------------------------------------------------------------ -BOOL GalleryExplorer::GetSdrObj( ULONG nThemeId, ULONG nSdrModelPos, +sal_Bool GalleryExplorer::GetSdrObj( sal_uIntPtr nThemeId, sal_uIntPtr nSdrModelPos, SdrModel* pModel, Bitmap* pThumb ) { Gallery* pGal = ImplGetGallery(); - return( pGal ? GetSdrObj( pGal->GetThemeName( nThemeId ), nSdrModelPos, pModel, pThumb ) : FALSE ); + return( pGal ? GetSdrObj( pGal->GetThemeName( nThemeId ), nSdrModelPos, pModel, pThumb ) : sal_False ); } // ------------------------------------------------------------------------ -BOOL GalleryExplorer::InsertSdrObj( const String& rThemeName, FmFormModel& rModel ) +sal_Bool GalleryExplorer::InsertSdrObj( const String& rThemeName, FmFormModel& rModel ) { Gallery* pGal = ImplGetGallery(); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( pGal ) { @@ -433,18 +433,18 @@ BOOL GalleryExplorer::InsertSdrObj( const String& rThemeName, FmFormModel& rMode // ------------------------------------------------------------------------ -BOOL GalleryExplorer::InsertSdrObj( ULONG nThemeId, FmFormModel& rModel ) +sal_Bool GalleryExplorer::InsertSdrObj( sal_uIntPtr nThemeId, FmFormModel& rModel ) { Gallery* pGal = ImplGetGallery(); - return( pGal ? InsertSdrObj( pGal->GetThemeName( nThemeId ), rModel ) : FALSE ); + return( pGal ? InsertSdrObj( pGal->GetThemeName( nThemeId ), rModel ) : sal_False ); } // ----------------------------------------------------------------------------- -BOOL GalleryExplorer::BeginLocking( const String& rThemeName ) +sal_Bool GalleryExplorer::BeginLocking( const String& rThemeName ) { Gallery* pGal = ImplGetGallery(); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( pGal ) { @@ -453,7 +453,7 @@ BOOL GalleryExplorer::BeginLocking( const String& rThemeName ) if( pTheme ) { pTheme->LockTheme(); - bRet = TRUE; + bRet = sal_True; } } @@ -462,18 +462,18 @@ BOOL GalleryExplorer::BeginLocking( const String& rThemeName ) // ----------------------------------------------------------------------------- -BOOL GalleryExplorer::BeginLocking( ULONG nThemeId ) +sal_Bool GalleryExplorer::BeginLocking( sal_uIntPtr nThemeId ) { Gallery* pGal = ImplGetGallery(); - return( pGal ? BeginLocking( pGal->GetThemeName( nThemeId ) ) : FALSE ); + return( pGal ? BeginLocking( pGal->GetThemeName( nThemeId ) ) : sal_False ); } // ----------------------------------------------------------------------------- -BOOL GalleryExplorer::EndLocking( const String& rThemeName ) +sal_Bool GalleryExplorer::EndLocking( const String& rThemeName ) { Gallery* pGal = ImplGetGallery(); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( pGal ) { @@ -482,7 +482,7 @@ BOOL GalleryExplorer::EndLocking( const String& rThemeName ) if( pTheme ) { - const BOOL bReleaseLockedTheme = pTheme->UnlockTheme(); + const sal_Bool bReleaseLockedTheme = pTheme->UnlockTheme(); // release acquired theme pGal->ReleaseTheme( pTheme, aListener ); @@ -491,7 +491,7 @@ BOOL GalleryExplorer::EndLocking( const String& rThemeName ) { // release locked theme pGal->ReleaseTheme( pTheme, aLockListener ); - bRet = TRUE; + bRet = sal_True; } } } @@ -501,15 +501,15 @@ BOOL GalleryExplorer::EndLocking( const String& rThemeName ) // ----------------------------------------------------------------------------- -BOOL GalleryExplorer::EndLocking( ULONG nThemeId ) +sal_Bool GalleryExplorer::EndLocking( sal_uIntPtr nThemeId ) { Gallery* pGal = ImplGetGallery(); - return( pGal ? EndLocking( pGal->GetThemeName( nThemeId ) ) : FALSE ); + return( pGal ? EndLocking( pGal->GetThemeName( nThemeId ) ) : sal_False ); } // ----------------------------------------------------------------------------- -BOOL GalleryExplorer::DrawCentered( OutputDevice* pOut, const FmFormModel& rModel ) +sal_Bool GalleryExplorer::DrawCentered( OutputDevice* pOut, const FmFormModel& rModel ) { return SgaObjectSvDraw::DrawCentered( pOut, rModel ); } diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx index 32ad01aca4a2..eee9f46953c4 100644 --- a/svx/source/gallery2/gallery1.cxx +++ b/svx/source/gallery2/gallery1.cxx @@ -57,8 +57,8 @@ using namespace ::com::sun::star; // --------------------- GalleryThemeEntry::GalleryThemeEntry( const INetURLObject& rBaseURL, const String& rName, - UINT32 _nFileNumber, BOOL _bReadOnly, BOOL _bImported, - BOOL _bNewFile, UINT32 _nId, BOOL _bThemeNameFromResource ) : + sal_uInt32 _nFileNumber, sal_Bool _bReadOnly, sal_Bool _bImported, + sal_Bool _bNewFile, sal_uInt32 _nId, sal_Bool _bThemeNameFromResource ) : nFileNumber ( _nFileNumber ), nId ( _nId ), bReadOnly ( _bReadOnly || _bImported ), @@ -81,7 +81,7 @@ GalleryThemeEntry::GalleryThemeEntry( const INetURLObject& rBaseURL, const Strin SetModified( _bNewFile ); if( nId && bThemeNameFromResource ) - aName = String( GAL_RESID( RID_GALLERYSTR_THEME_START + (USHORT) nId ) ); + aName = String( GAL_RESID( RID_GALLERYSTR_THEME_START + (sal_uInt16) nId ) ); if( !aName.Len() ) aName = rName; @@ -93,25 +93,25 @@ INetURLObject GalleryThemeEntry::ImplGetURLIgnoreCase( const INetURLObject& rURL { INetURLObject aURL( rURL ); String aFileName; - BOOL bExists = FALSE; + sal_Bool bExists = sal_False; // check original file name if( FileExists( aURL ) ) - bExists = TRUE; + bExists = sal_True; else { // check upper case file name aURL.setName( aURL.getName().toAsciiUpperCase() ); if( FileExists( aURL ) ) - bExists = TRUE; + bExists = sal_True; else { // check lower case file name aURL.setName( aURL.getName().toAsciiLowerCase() ); if( FileExists( aURL ) ) - bExists = TRUE; + bExists = sal_True; } } @@ -125,17 +125,17 @@ void GalleryThemeEntry::SetName( const String& rNewName ) if( aName != rNewName ) { aName = rNewName; - SetModified( TRUE ); - bThemeNameFromResource = FALSE; + SetModified( sal_True ); + bThemeNameFromResource = sal_False; } } // ----------------------------------------------------------------------------- -void GalleryThemeEntry::SetId( UINT32 nNewId, BOOL bResetThemeName ) +void GalleryThemeEntry::SetId( sal_uInt32 nNewId, sal_Bool bResetThemeName ) { nId = nNewId; - SetModified( TRUE ); + SetModified( sal_True ); bThemeNameFromResource = ( nId && bResetThemeName ); } @@ -199,7 +199,7 @@ public: Gallery::Gallery( const String& rMultiPath ) : nReadTextEncoding ( gsl_getSystemTextEncoding() ) , nLastFileNumber ( 0 ) -, bMultiPath ( FALSE ) +, bMultiPath ( sal_False ) { ImplLoad( rMultiPath ); } @@ -239,7 +239,7 @@ Gallery* Gallery::GetGalleryInstance() void Gallery::ImplLoad( const String& rMultiPath ) { - const USHORT nTokenCount = rMultiPath.GetTokenCount( ';' ); + const sal_uInt16 nTokenCount = rMultiPath.GetTokenCount( ';' ); sal_Bool bIsReadOnlyDir; bMultiPath = ( nTokenCount > 0 ); @@ -254,7 +254,7 @@ void Gallery::ImplLoad( const String& rMultiPath ) { aRelURL = INetURLObject( rMultiPath.GetToken( 0, ';' ) ); - for( USHORT i = 0UL; i < nTokenCount; i++ ) + for( sal_uInt16 i = 0UL; i < nTokenCount; i++ ) { aCurURL = INetURLObject(rMultiPath.GetToken( i, ';' )); @@ -430,7 +430,7 @@ void Gallery::ImplLoadSubDirs( const INetURLObject& rBaseURL, sal_Bool& rbDirIsR if( pEntry ) { - const ULONG nFileNumber = (ULONG) String(aThmURL.GetBase()).Erase( 0, 2 ).Erase( 6 ).ToInt32(); + const sal_uIntPtr nFileNumber = (sal_uIntPtr) String(aThmURL.GetBase()).Erase( 0, 2 ).Erase( 6 ).ToInt32(); aThemeList.Insert( pEntry, LIST_APPEND ); @@ -481,11 +481,11 @@ void Gallery::ImplLoadImports() GalleryThemeEntry* pThemeEntry; GalleryImportThemeEntry* pImportEntry; INetURLObject aFile; - UINT32 nInventor; - UINT32 nCount; - UINT16 nId; - UINT16 i; - UINT16 nTempCharSet; + sal_uInt32 nInventor; + sal_uInt32 nCount; + sal_uInt16 nId; + sal_uInt16 i; + sal_uInt16 nTempCharSet; for( pImportEntry = aImportList.First(); pImportEntry; pImportEntry = aImportList.Next() ) delete pImportEntry; @@ -507,7 +507,7 @@ void Gallery::ImplLoadImports() pThemeEntry = new GalleryThemeEntry( aFile, pImportEntry->aUIName, String(aFile.GetBase()).Erase( 0, 2 ).Erase( 6 ).ToInt32(), - TRUE, TRUE, FALSE, 0, FALSE ); + sal_True, sal_True, sal_False, 0, sal_False ); aThemeList.Insert( pThemeEntry, LIST_APPEND ); } @@ -528,10 +528,10 @@ void Gallery::ImplWriteImportList() if( pOStm ) { - const UINT32 nInventor = (UINT32) COMPAT_FORMAT( 'S', 'G', 'A', '3' ); - const UINT16 nId = 0x0004; + const sal_uInt32 nInventor = (sal_uInt32) COMPAT_FORMAT( 'S', 'G', 'A', '3' ); + const sal_uInt16 nId = 0x0004; - *pOStm << nInventor << nId << (UINT32) aImportList.Count() << (UINT16) gsl_getSystemTextEncoding(); + *pOStm << nInventor << nId << (sal_uInt32) aImportList.Count() << (sal_uInt16) gsl_getSystemTextEncoding(); for( GalleryImportThemeEntry* pImportEntry = aImportList.First(); pImportEntry; pImportEntry = aImportList.Next() ) *pOStm << *pImportEntry; @@ -572,11 +572,11 @@ GalleryImportThemeEntry* Gallery::ImplGetImportThemeEntry( const String& rImport // ------------------------------------------------------------------------ -String Gallery::GetThemeName( ULONG nThemeId ) const +String Gallery::GetThemeName( sal_uIntPtr nThemeId ) const { GalleryThemeEntry* pFound = NULL; - for( ULONG n = 0, nCount = aThemeList.Count(); n < nCount; n++ ) + for( sal_uIntPtr n = 0, nCount = aThemeList.Count(); n < nCount; n++ ) { GalleryThemeEntry* pEntry = aThemeList.GetObject( n ); @@ -613,28 +613,28 @@ String Gallery::GetThemeName( ULONG nThemeId ) const // ------------------------------------------------------------------------ -BOOL Gallery::HasTheme( const String& rThemeName ) +sal_Bool Gallery::HasTheme( const String& rThemeName ) { return( ImplGetThemeEntry( rThemeName ) != NULL ); } // ------------------------------------------------------------------------ -BOOL Gallery::CreateTheme( const String& rThemeName, UINT32 nNumFrom ) +sal_Bool Gallery::CreateTheme( const String& rThemeName, sal_uInt32 nNumFrom ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( !HasTheme( rThemeName ) && ( GetUserURL().GetProtocol() != INET_PROT_NOT_VALID ) ) { - nLastFileNumber=nNumFrom > nLastFileNumber ? nNumFrom : ++nLastFileNumber; + nLastFileNumber = nNumFrom > nLastFileNumber ? nNumFrom : nLastFileNumber + 1; GalleryThemeEntry* pNewEntry = new GalleryThemeEntry( GetUserURL(), rThemeName, nLastFileNumber, - FALSE, FALSE, TRUE, 0, FALSE ); + sal_False, sal_False, sal_True, 0, sal_False ); aThemeList.Insert( pNewEntry, LIST_APPEND ); delete( new GalleryTheme( this, pNewEntry ) ); Broadcast( GalleryHint( GALLERY_HINT_THEME_CREATED, rThemeName ) ); - bRet = TRUE; + bRet = sal_True; } return bRet; @@ -642,10 +642,10 @@ BOOL Gallery::CreateTheme( const String& rThemeName, UINT32 nNumFrom ) // ------------------------------------------------------------------------ -BOOL Gallery::CreateImportTheme( const INetURLObject& rURL, const String& rImportName ) +sal_Bool Gallery::CreateImportTheme( const INetURLObject& rURL, const String& rImportName ) { INetURLObject aURL( rURL ); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; DBG_ASSERT( aURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" ); @@ -655,8 +655,8 @@ BOOL Gallery::CreateImportTheme( const INetURLObject& rURL, const String& rImpor if( pIStm ) { - ULONG nStmErr; - UINT16 nId; + sal_uIntPtr nStmErr; + sal_uInt16 nId; *pIStm >> nId; @@ -668,7 +668,7 @@ BOOL Gallery::CreateImportTheme( const INetURLObject& rURL, const String& rImpor String aThemeName; *pIStm >> aTmpStr; aThemeName = String( aTmpStr, RTL_TEXTENCODING_UTF8 ); GalleryThemeEntry* pThemeEntry = new GalleryThemeEntry( aURL, rImportName, String(aURL.GetBase()).Erase( 0, 2 ).Erase( 6 ).ToInt32(), - TRUE, TRUE, TRUE, 0, FALSE ); + sal_True, sal_True, sal_True, 0, sal_False ); GalleryTheme* pImportTheme = new GalleryTheme( this, pThemeEntry ); pIStm->Seek( STREAM_SEEK_TO_BEGIN ); @@ -684,7 +684,7 @@ BOOL Gallery::CreateImportTheme( const INetURLObject& rURL, const String& rImpor { String aName( rImportName ); String aNewName( aName ); - ULONG nCount = 0; + sal_uIntPtr nCount = 0; aName += ' '; @@ -704,7 +704,7 @@ BOOL Gallery::CreateImportTheme( const INetURLObject& rURL, const String& rImpor pImportEntry->aImportName = rImportName; aImportList.Insert( pImportEntry, LIST_APPEND ); ImplWriteImportList(); - bRet = TRUE; + bRet = sal_True; } delete pImportTheme; @@ -719,10 +719,10 @@ BOOL Gallery::CreateImportTheme( const INetURLObject& rURL, const String& rImpor // ------------------------------------------------------------------------ -BOOL Gallery::RenameTheme( const String& rOldName, const String& rNewName ) +sal_Bool Gallery::RenameTheme( const String& rOldName, const String& rNewName ) { GalleryThemeEntry* pThemeEntry = ImplGetThemeEntry( rOldName ); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; // Ueberpruefen, ob neuer Themenname schon vorhanden ist if( pThemeEntry && !HasTheme( rNewName ) && ( !pThemeEntry->IsReadOnly() || pThemeEntry->IsImported() ) ) @@ -752,7 +752,7 @@ BOOL Gallery::RenameTheme( const String& rOldName, const String& rNewName ) Broadcast( GalleryHint( GALLERY_HINT_THEME_RENAMED, aOldName, pThm->GetName() ) ); ReleaseTheme( pThm, aListener ); - bRet = TRUE; + bRet = sal_True; } } @@ -761,10 +761,10 @@ BOOL Gallery::RenameTheme( const String& rOldName, const String& rNewName ) // ------------------------------------------------------------------------ -BOOL Gallery::RemoveTheme( const String& rThemeName ) +sal_Bool Gallery::RemoveTheme( const String& rThemeName ) { GalleryThemeEntry* pThemeEntry = ImplGetThemeEntry( rThemeName ); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( pThemeEntry && ( !pThemeEntry->IsReadOnly() || pThemeEntry->IsImported() ) ) { @@ -802,7 +802,7 @@ BOOL Gallery::RemoveTheme( const String& rThemeName ) delete aThemeList.Remove( pThemeEntry ); Broadcast( GalleryHint( GALLERY_HINT_THEME_REMOVED, rThemeName ) ); - bRet = TRUE; + bRet = sal_True; } return bRet; @@ -880,14 +880,14 @@ GalleryTheme* Gallery::ImplGetCachedTheme( const GalleryThemeEntry* pThemeEntry void Gallery::ImplDeleteCachedTheme( GalleryTheme* pTheme ) { GalleryThemeCacheEntry* pEntry; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; for( pEntry = (GalleryThemeCacheEntry*) aThemeCache.First(); pEntry && !bDone; pEntry = (GalleryThemeCacheEntry*) aThemeCache.Next() ) { if( pTheme == pEntry->GetTheme() ) { delete (GalleryThemeCacheEntry*) aThemeCache.Remove( pEntry ); - bDone = TRUE; + bDone = sal_True; } } } @@ -918,6 +918,6 @@ void Gallery::ReleaseTheme( GalleryTheme* pTheme, SfxListener& rListener ) } } -BOOL GalleryThemeEntry::IsDefault() const +sal_Bool GalleryThemeEntry::IsDefault() const { return( ( nId > 0 ) && ( nId != ( RID_GALLERYSTR_THEME_MYTHEME - RID_GALLERYSTR_THEME_START ) ) ); } diff --git a/svx/source/gallery2/galmisc.cxx b/svx/source/gallery2/galmisc.cxx index 835c7dc3e731..da5375423b56 100644 --- a/svx/source/gallery2/galmisc.cxx +++ b/svx/source/gallery2/galmisc.cxx @@ -113,11 +113,11 @@ IMPL_LINK( SgaUserDataFactory, MakeUserData, SdrObjFactory*, pObjFactory ) // - GalleryGraphicImport - // ------------------------ -USHORT GalleryGraphicImport( const INetURLObject& rURL, Graphic& rGraphic, - String& rFilterName, BOOL bShowProgress ) +sal_uInt16 GalleryGraphicImport( const INetURLObject& rURL, Graphic& rGraphic, + String& rFilterName, sal_Bool bShowProgress ) { - USHORT nRet = SGA_IMPORT_NONE; - SfxMedium aMedium( rURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ, TRUE ); + sal_uInt16 nRet = SGA_IMPORT_NONE; + SfxMedium aMedium( rURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ, sal_True ); String aFilterName; aMedium.DownLoad(); @@ -128,7 +128,7 @@ USHORT GalleryGraphicImport( const INetURLObject& rURL, Graphic& rGraphic, { GraphicFilter* pGraphicFilter = GraphicFilter::GetGraphicFilter(); GalleryProgress* pProgress = bShowProgress ? new GalleryProgress( pGraphicFilter ) : NULL; - USHORT nFormat; + sal_uInt16 nFormat; if( !pGraphicFilter->ImportGraphic( rGraphic, rURL.GetMainURL( INetURLObject::NO_DECODE ), *pIStm, GRFILTER_FORMAT_DONTKNOW, &nFormat ) ) { @@ -146,10 +146,10 @@ USHORT GalleryGraphicImport( const INetURLObject& rURL, Graphic& rGraphic, // - GallerySvDrawImport - // ----------------------- -BOOL GallerySvDrawImport( SvStream& rIStm, SdrModel& rModel ) +sal_Bool GallerySvDrawImport( SvStream& rIStm, SdrModel& rModel ) { - UINT32 nVersion; - BOOL bRet = FALSE; + sal_uInt32 nVersion; + sal_Bool bRet = sal_False; if( GalleryCodec::IsCoded( rIStm, nVersion ) ) { @@ -194,9 +194,9 @@ BOOL GallerySvDrawImport( SvStream& rIStm, SdrModel& rModel ) // - CreateIMapGraphic - // --------------------- -BOOL CreateIMapGraphic( const FmFormModel& rModel, Graphic& rGraphic, ImageMap& rImageMap ) +sal_Bool CreateIMapGraphic( const FmFormModel& rModel, Graphic& rGraphic, ImageMap& rImageMap ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if ( rModel.GetPageCount() ) { @@ -205,10 +205,10 @@ BOOL CreateIMapGraphic( const FmFormModel& rModel, Graphic& rGraphic, ImageMap& if ( pPage->GetObjCount() == 1 && pObj->ISA( SdrGrafObj ) ) { - const USHORT nCount = pObj->GetUserDataCount(); + const sal_uInt16 nCount = pObj->GetUserDataCount(); // gibt es in den User-Daten eine IMap-Information? - for ( USHORT i = 0; i < nCount; i++ ) + for ( sal_uInt16 i = 0; i < nCount; i++ ) { const SdrObjUserData* pUserData = pObj->GetUserData( i ); @@ -216,7 +216,7 @@ BOOL CreateIMapGraphic( const FmFormModel& rModel, Graphic& rGraphic, ImageMap& { rGraphic = ( (SdrGrafObj*) pObj )->GetGraphic(); rImageMap = ( (SgaIMapInfo*) pUserData )->GetImageMap(); - bRet = TRUE; + bRet = sal_True; break; } } @@ -230,7 +230,7 @@ BOOL CreateIMapGraphic( const FmFormModel& rModel, Graphic& rGraphic, ImageMap& // - GetReducedString - // -------------------- -String GetReducedString( const INetURLObject& rURL, ULONG nMaxLen ) +String GetReducedString( const INetURLObject& rURL, sal_uIntPtr nMaxLen ) { String aReduced( rURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ) ); @@ -244,7 +244,7 @@ String GetReducedString( const INetURLObject& rURL, ULONG nMaxLen ) if( aPath.Len() > nMaxLen ) { - aReduced = aPath.Copy( 0, (USHORT)( nMaxLen - aName.Len() - 4 ) ); + aReduced = aPath.Copy( 0, (sal_uInt16)( nMaxLen - aName.Len() - 4 ) ); aReduced += String( RTL_CONSTASCII_USTRINGPARAM( "..." ) ); aReduced += aDelimiter; aReduced += aName; @@ -273,9 +273,9 @@ String GetSvDrawStreamNameFromURL( const INetURLObject& rSvDrawObjURL ) // ----------------------------------------------------------------------------- -BOOL FileExists( const INetURLObject& rURL ) +sal_Bool FileExists( const INetURLObject& rURL ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( rURL.GetProtocol() != INET_PROT_NOT_VALID ) { @@ -303,9 +303,9 @@ BOOL FileExists( const INetURLObject& rURL ) // ----------------------------------------------------------------------------- -BOOL CreateDir( const INetURLObject& rURL ) +sal_Bool CreateDir( const INetURLObject& rURL ) { - BOOL bRet = FileExists( rURL ); + sal_Bool bRet = FileExists( rURL ); if( !bRet ) { @@ -340,9 +340,9 @@ BOOL CreateDir( const INetURLObject& rURL ) // ----------------------------------------------------------------------------- -BOOL CopyFile( const INetURLObject& rSrcURL, const INetURLObject& rDstURL ) +sal_Bool CopyFile( const INetURLObject& rSrcURL, const INetURLObject& rDstURL ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; try { @@ -351,7 +351,7 @@ BOOL CopyFile( const INetURLObject& rSrcURL, const INetURLObject& rDstURL ) aDestPath.executeCommand( OUString::createFromAscii( "transfer" ), uno::makeAny( ucb::TransferInfo( sal_False, rSrcURL.GetMainURL( INetURLObject::NO_DECODE ), rDstURL.GetName(), ucb::NameClash::OVERWRITE ) ) ); - bRet = TRUE; + bRet = sal_True; } catch( const ucb::ContentCreationException& ) { @@ -368,9 +368,9 @@ BOOL CopyFile( const INetURLObject& rSrcURL, const INetURLObject& rDstURL ) // ----------------------------------------------------------------------------- -BOOL KillFile( const INetURLObject& rURL ) +sal_Bool KillFile( const INetURLObject& rURL ) { - BOOL bRet = FileExists( rURL ); + sal_Bool bRet = FileExists( rURL ); if( bRet ) { @@ -381,15 +381,15 @@ BOOL KillFile( const INetURLObject& rURL ) } catch( const ucb::ContentCreationException& ) { - bRet = FALSE; + bRet = sal_False; } catch( const uno::RuntimeException& ) { - bRet = FALSE; + bRet = sal_False; } catch( const uno::Exception& ) { - bRet = FALSE; + bRet = sal_False; } } @@ -446,17 +446,17 @@ GalleryProgress::~GalleryProgress() // ------------------------------------------------------------------------ -void GalleryProgress::Update( ULONG nVal, ULONG nMaxVal ) +void GalleryProgress::Update( sal_uIntPtr nVal, sal_uIntPtr nMaxVal ) { if( mxProgressBar.is() && nMaxVal ) - mxProgressBar->setValue( Min( (ULONG)( (double) nVal / nMaxVal * GALLERY_PROGRESS_RANGE ), (ULONG) GALLERY_PROGRESS_RANGE ) ); + mxProgressBar->setValue( Min( (sal_uIntPtr)( (double) nVal / nMaxVal * GALLERY_PROGRESS_RANGE ), (sal_uIntPtr) GALLERY_PROGRESS_RANGE ) ); } // ----------------------- // - GalleryTransferable - // ----------------------- -GalleryTransferable::GalleryTransferable( GalleryTheme* pTheme, ULONG nObjectPos, bool bLazy ) : +GalleryTransferable::GalleryTransferable( GalleryTheme* pTheme, sal_uIntPtr nObjectPos, bool bLazy ) : mpTheme( pTheme ), meObjectKind( mpTheme->GetObjectKind( nObjectPos ) ), mnObjectPos( nObjectPos ), @@ -626,7 +626,7 @@ sal_Bool GalleryTransferable::WriteObject( SotStorageStreamRef& rxOStm, void* pU void GalleryTransferable::DragFinished( sal_Int8 nDropAction ) { - mpTheme->SetDragging( FALSE ); + mpTheme->SetDragging( sal_False ); mpTheme->SetDragPos( 0 ); if ( nDropAction ) { diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx index 39aceac564ad..9ba9cff068a3 100644 --- a/svx/source/gallery2/galobj.cxx +++ b/svx/source/gallery2/galobj.cxx @@ -59,16 +59,16 @@ using namespace ::com::sun::star; // ------------- SgaObject::SgaObject() : - bIsValid ( FALSE ), - bIsThumbBmp ( TRUE ) + bIsValid ( sal_False ), + bIsThumbBmp ( sal_True ) { } // ------------------------------------------------------------------------ -BOOL SgaObject::CreateThumb( const Graphic& rGraphic ) +sal_Bool SgaObject::CreateThumb( const Graphic& rGraphic ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( rGraphic.GetType() == GRAPHIC_BITMAP ) { @@ -104,7 +104,7 @@ BOOL SgaObject::CreateThumb( const Graphic& rGraphic ) if( ( aBmpSize.Width() <= S_THUMB ) && ( aBmpSize.Height() <= S_THUMB ) ) { aThumbBmp.Convert( BMP_CONVERSION_8BIT_COLORS ); - bRet = TRUE; + bRet = sal_True; } else { @@ -116,7 +116,7 @@ BOOL SgaObject::CreateThumb( const Graphic& rGraphic ) (double) aNewSize.Height() / aBmpSize.Height(), BMP_SCALE_INTERPOLATE ) ) { aThumbBmp.Convert( BMP_CONVERSION_8BIT_COLORS ); - bRet = TRUE; + bRet = sal_True; } } } @@ -137,7 +137,7 @@ BOOL SgaObject::CreateThumb( const Graphic& rGraphic ) if( !aThumbBmp.IsEmpty() ) { aThumbBmp.Convert( BMP_CONVERSION_8BIT_COLORS ); - bRet = TRUE; + bRet = sal_True; } } @@ -148,15 +148,15 @@ BOOL SgaObject::CreateThumb( const Graphic& rGraphic ) void SgaObject::WriteData( SvStream& rOut, const String& rDestDir ) const { - static const UINT32 nInventor = COMPAT_FORMAT( 'S', 'G', 'A', '3' ); + static const sal_uInt32 nInventor = COMPAT_FORMAT( 'S', 'G', 'A', '3' ); - rOut << nInventor << (UINT16) 0x0004 << GetVersion() << (UINT16) GetObjKind(); + rOut << nInventor << (sal_uInt16) 0x0004 << GetVersion() << (sal_uInt16) GetObjKind(); rOut << bIsThumbBmp; if( bIsThumbBmp ) { - const USHORT nOldCompressMode = rOut.GetCompressMode(); - const ULONG nOldVersion = rOut.GetVersion(); + const sal_uInt16 nOldCompressMode = rOut.GetCompressMode(); + const sal_uIntPtr nOldVersion = rOut.GetVersion(); rOut.SetCompressMode( COMPRESSMODE_ZBITMAP ); rOut.SetVersion( SOFFICE_FILEFORMAT_50 ); @@ -176,11 +176,11 @@ void SgaObject::WriteData( SvStream& rOut, const String& rDestDir ) const // ------------------------------------------------------------------------ -void SgaObject::ReadData(SvStream& rIn, UINT16& rReadVersion ) +void SgaObject::ReadData(SvStream& rIn, sal_uInt16& rReadVersion ) { ByteString aTmpStr; - UINT32 nTmp32; - UINT16 nTmp16; + sal_uInt32 nTmp32; + sal_uInt16 nTmp16; rIn >> nTmp32 >> nTmp16 >> rReadVersion >> nTmp16 >> bIsThumbBmp; @@ -245,7 +245,7 @@ SvStream& operator<<( SvStream& rOut, const SgaObject& rObj ) SvStream& operator>>( SvStream& rIn, SgaObject& rObj ) { - UINT16 nReadVersion; + sal_uInt16 nReadVersion; rObj.ReadData( rIn, nReadVersion ); rObj.bIsValid = ( rIn.GetError() == ERRCODE_NONE ); @@ -303,7 +303,7 @@ void SgaObjectBmp::WriteData( SvStream& rOut, const String& rDestDir ) const // ------------------------------------------------------------------------ -void SgaObjectBmp::ReadData( SvStream& rIn, UINT16& rReadVersion ) +void SgaObjectBmp::ReadData( SvStream& rIn, sal_uInt16& rReadVersion ) { ByteString aTmpStr; @@ -335,10 +335,10 @@ SgaObjectSound::SgaObjectSound( const INetURLObject& rURL ) : { aURL = rURL; aThumbBmp = Bitmap( Size( 1, 1 ), 1 ); - bIsValid = TRUE; + bIsValid = sal_True; } else - bIsValid = FALSE; + bIsValid = sal_False; } // ------------------------------------------------------------------------ @@ -351,7 +351,7 @@ SgaObjectSound::~SgaObjectSound() Bitmap SgaObjectSound::GetThumbBmp() const { - USHORT nId; + sal_uInt16 nId; switch( eSoundType ) { @@ -380,19 +380,19 @@ Bitmap SgaObjectSound::GetThumbBmp() const void SgaObjectSound::WriteData( SvStream& rOut, const String& rDestDir ) const { SgaObject::WriteData( rOut, rDestDir ); - rOut << (UINT16) eSoundType << ByteString( aTitle, RTL_TEXTENCODING_UTF8 ); + rOut << (sal_uInt16) eSoundType << ByteString( aTitle, RTL_TEXTENCODING_UTF8 ); } // ------------------------------------------------------------------------ -void SgaObjectSound::ReadData( SvStream& rIn, UINT16& rReadVersion ) +void SgaObjectSound::ReadData( SvStream& rIn, sal_uInt16& rReadVersion ) { SgaObject::ReadData( rIn, rReadVersion ); if( rReadVersion >= 5 ) { ByteString aTmpStr; - UINT16 nTmp16; + sal_uInt16 nTmp16; rIn >> nTmp16; eSoundType = (GalSoundType) nTmp16; @@ -504,11 +504,11 @@ SgaObjectSvDraw::SgaObjectSvDraw( SvStream& rIStm, const INetURLObject& rURL ) // ------------------------------------------------------------------------ -BOOL SgaObjectSvDraw::CreateThumb( const FmFormModel& rModel ) +sal_Bool SgaObjectSvDraw::CreateThumb( const FmFormModel& rModel ) { Graphic aGraphic; ImageMap aImageMap; - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if ( CreateIMapGraphic( rModel, aGraphic, aImageMap ) ) bRet = SgaObject::CreateThumb( aGraphic ); @@ -537,10 +537,10 @@ BOOL SgaObjectSvDraw::CreateThumb( const FmFormModel& rModel ) // ------------------------------------------------------------------------ -BOOL SgaObjectSvDraw::DrawCentered( OutputDevice* pOut, const FmFormModel& rModel ) +sal_Bool SgaObjectSvDraw::DrawCentered( OutputDevice* pOut, const FmFormModel& rModel ) { const FmFormPage* pPage = static_cast< const FmFormPage* >( rModel.GetPage( 0 ) ); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( pOut && pPage ) { @@ -566,11 +566,11 @@ BOOL SgaObjectSvDraw::DrawCentered( OutputDevice* pOut, const FmFormModel& rMode aOrigin.Y() += ( ( aDrawSize.Height() - aObjRect.GetHeight() ) >> 1 ) - aObjRect.Top(); aMap.SetOrigin( aOrigin ); - aView.SetPageVisible( FALSE ); - aView.SetBordVisible( FALSE ); - aView.SetGridVisible( FALSE ); - aView.SetHlplVisible( FALSE ); - aView.SetGlueVisible( FALSE ); + aView.SetPageVisible( sal_False ); + aView.SetBordVisible( sal_False ); + aView.SetGridVisible( sal_False ); + aView.SetHlplVisible( sal_False ); + aView.SetGlueVisible( sal_False ); pOut->Push(); pOut->SetMapMode( aMap ); @@ -578,7 +578,7 @@ BOOL SgaObjectSvDraw::DrawCentered( OutputDevice* pOut, const FmFormModel& rMode aView.CompleteRedraw( pOut, Rectangle( pOut->PixelToLogic( Point() ), pOut->GetOutputSize() ) ); pOut->Pop(); - bRet = TRUE; + bRet = sal_True; } } @@ -595,7 +595,7 @@ void SgaObjectSvDraw::WriteData( SvStream& rOut, const String& rDestDir ) const // ------------------------------------------------------------------------ -void SgaObjectSvDraw::ReadData( SvStream& rIn, UINT16& rReadVersion ) +void SgaObjectSvDraw::ReadData( SvStream& rIn, sal_uInt16& rReadVersion ) { SgaObject::ReadData( rIn, rReadVersion ); diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx index 730c1179a07e..bd1ae10cd746 100644 --- a/svx/source/gallery2/galtheme.cxx +++ b/svx/source/gallery2/galtheme.cxx @@ -79,7 +79,7 @@ GalleryTheme::GalleryTheme( Gallery* pGallery, GalleryThemeEntry* pThemeEntry ) mnThemeLockCount ( 0 ), mnBroadcasterLockCount( 0 ), nDragPos ( 0 ), - bDragging ( FALSE ) + bDragging ( sal_False ) { ImplCreateSvDrawStorage(); @@ -95,9 +95,9 @@ GalleryTheme::~GalleryTheme() for( GalleryObject* pEntry = aObjectList.First(); pEntry; pEntry = aObjectList.Next() ) { - Broadcast( GalleryHint( GALLERY_HINT_CLOSE_OBJECT, GetName(), reinterpret_cast< ULONG >( pEntry ) ) ); + Broadcast( GalleryHint( GALLERY_HINT_CLOSE_OBJECT, GetName(), reinterpret_cast< sal_uIntPtr >( pEntry ) ) ); delete pEntry; - Broadcast( GalleryHint( GALLERY_HINT_OBJECT_REMOVED, GetName(), reinterpret_cast< ULONG >( pEntry ) ) ); + Broadcast( GalleryHint( GALLERY_HINT_OBJECT_REMOVED, GetName(), reinterpret_cast< sal_uIntPtr >( pEntry ) ) ); } } @@ -107,10 +107,10 @@ void GalleryTheme::ImplCreateSvDrawStorage() { if( !pThm->IsImported() ) { - aSvDrawStorageRef = new SvStorage( FALSE, GetSdvURL().GetMainURL( INetURLObject::NO_DECODE ), pThm->IsReadOnly() ? STREAM_READ : STREAM_STD_READWRITE ); + aSvDrawStorageRef = new SvStorage( sal_False, GetSdvURL().GetMainURL( INetURLObject::NO_DECODE ), pThm->IsReadOnly() ? STREAM_READ : STREAM_STD_READWRITE ); // #i50423# ReadOnly may not been set though the file can't be written (because of security reasons) if ( ( aSvDrawStorageRef->GetError() != ERRCODE_NONE ) && !pThm->IsReadOnly() ) - aSvDrawStorageRef = new SvStorage( FALSE, GetSdvURL().GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ ); + aSvDrawStorageRef = new SvStorage( sal_False, GetSdvURL().GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ ); } else aSvDrawStorageRef.Clear(); @@ -118,10 +118,10 @@ void GalleryTheme::ImplCreateSvDrawStorage() // ------------------------------------------------------------------------ -BOOL GalleryTheme::ImplWriteSgaObject( const SgaObject& rObj, ULONG nPos, GalleryObject* pExistentEntry ) +sal_Bool GalleryTheme::ImplWriteSgaObject( const SgaObject& rObj, sal_uIntPtr nPos, GalleryObject* pExistentEntry ) { SvStream* pOStm = ::utl::UcbStreamHelper::CreateStream( GetSdgURL().GetMainURL( INetURLObject::NO_DECODE ), STREAM_WRITE ); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( pOStm ) { @@ -144,7 +144,7 @@ BOOL GalleryTheme::ImplWriteSgaObject( const SgaObject& rObj, ULONG nPos, Galler pEntry->aURL = rObj.GetURL(); pEntry->nOffset = nOffset; pEntry->eObjKind = rObj.GetObjKind(); - bRet = TRUE; + bRet = sal_True; } delete pOStm; @@ -241,7 +241,7 @@ void GalleryTheme::ImplWrite() delete pOStm; } - ImplSetModified( FALSE ); + ImplSetModified( sal_False ); } } } @@ -286,14 +286,14 @@ INetURLObject GalleryTheme::ImplGetURL( const GalleryObject* pObject ) const // ------------------------------------------------------------------------ -INetURLObject GalleryTheme::ImplCreateUniqueURL( SgaObjKind eObjKind, ULONG nFormat ) +INetURLObject GalleryTheme::ImplCreateUniqueURL( SgaObjKind eObjKind, sal_uIntPtr nFormat ) { INetURLObject aDir( GetParent()->GetUserURL() ); INetURLObject aInfoFileURL( GetParent()->GetUserURL() ); INetURLObject aNewURL; sal_uInt32 nNextNumber = 1999; sal_Char const* pExt = NULL; - BOOL bExists; + sal_Bool bExists; aDir.Append( String( RTL_CONSTASCII_USTRINGPARAM( "dragdrop" ) ) ); CreateDir( aDir ); @@ -342,11 +342,11 @@ INetURLObject GalleryTheme::ImplCreateUniqueURL( SgaObjKind eObjKind, ULONG nFor String aFileName( RTL_CONSTASCII_USTRINGPARAM( "gallery/svdraw/dd" ) ); aNewURL = INetURLObject( aFileName += String::CreateFromInt32( ++nNextNumber % 99999999 ), INET_PROT_PRIV_SOFFICE ); - bExists = FALSE; + bExists = sal_False; for( GalleryObject* pEntry = aObjectList.First(); pEntry && !bExists; pEntry = aObjectList.Next() ) if( pEntry->aURL == aNewURL ) - bExists = TRUE; + bExists = sal_True; } else { @@ -377,7 +377,7 @@ INetURLObject GalleryTheme::ImplCreateUniqueURL( SgaObjKind eObjKind, ULONG nFor // ------------------------------------------------------------------------ -void GalleryTheme::ImplBroadcast( ULONG nUpdatePos ) +void GalleryTheme::ImplBroadcast( sal_uIntPtr nUpdatePos ) { if( !IsBroadcasterLocked() ) { @@ -390,16 +390,16 @@ void GalleryTheme::ImplBroadcast( ULONG nUpdatePos ) // ------------------------------------------------------------------------ -BOOL GalleryTheme::UnlockTheme() +sal_Bool GalleryTheme::UnlockTheme() { DBG_ASSERT( mnThemeLockCount, "Theme is not locked" ); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( mnThemeLockCount ) { --mnThemeLockCount; - bRet = TRUE; + bRet = sal_True; } return bRet; @@ -407,7 +407,7 @@ BOOL GalleryTheme::UnlockTheme() // ------------------------------------------------------------------------ -void GalleryTheme::UnlockBroadcaster( ULONG nUpdatePos ) +void GalleryTheme::UnlockBroadcaster( sal_uIntPtr nUpdatePos ) { DBG_ASSERT( mnBroadcasterLockCount, "Broadcaster is not locked" ); @@ -417,9 +417,9 @@ void GalleryTheme::UnlockBroadcaster( ULONG nUpdatePos ) // ------------------------------------------------------------------------ -BOOL GalleryTheme::InsertObject( const SgaObject& rObj, ULONG nInsertPos ) +sal_Bool GalleryTheme::InsertObject( const SgaObject& rObj, sal_uIntPtr nInsertPos ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( rObj.IsValid() ) { @@ -454,7 +454,7 @@ BOOL GalleryTheme::InsertObject( const SgaObject& rObj, ULONG nInsertPos ) else ImplWriteSgaObject( rObj, nInsertPos, NULL ); - ImplSetModified( bRet = TRUE ); + ImplSetModified( bRet = sal_True ); ImplBroadcast( pFoundEntry ? aObjectList.GetPos( pFoundEntry ) : nInsertPos ); } @@ -463,7 +463,7 @@ BOOL GalleryTheme::InsertObject( const SgaObject& rObj, ULONG nInsertPos ) // ------------------------------------------------------------------------ -SgaObject* GalleryTheme::AcquireObject( ULONG nPos ) +SgaObject* GalleryTheme::AcquireObject( sal_uIntPtr nPos ) { return ImplReadSgaObject( aObjectList.GetObject( nPos ) ); } @@ -477,7 +477,7 @@ void GalleryTheme::ReleaseObject( SgaObject* pObject ) // ------------------------------------------------------------------------ -BOOL GalleryTheme::RemoveObject( ULONG nPos ) +sal_Bool GalleryTheme::RemoveObject( sal_uIntPtr nPos ) { GalleryObject* pEntry = aObjectList.Remove( nPos ); @@ -489,11 +489,11 @@ BOOL GalleryTheme::RemoveObject( ULONG nPos ) if( SGA_OBJ_SVDRAW == pEntry->eObjKind ) aSvDrawStorageRef->Remove( pEntry->aURL.GetMainURL( INetURLObject::NO_DECODE ) ); - Broadcast( GalleryHint( GALLERY_HINT_CLOSE_OBJECT, GetName(), reinterpret_cast< ULONG >( pEntry ) ) ); + Broadcast( GalleryHint( GALLERY_HINT_CLOSE_OBJECT, GetName(), reinterpret_cast< sal_uIntPtr >( pEntry ) ) ); delete pEntry; - Broadcast( GalleryHint( GALLERY_HINT_OBJECT_REMOVED, GetName(), reinterpret_cast< ULONG >( pEntry ) ) ); + Broadcast( GalleryHint( GALLERY_HINT_OBJECT_REMOVED, GetName(), reinterpret_cast< sal_uIntPtr >( pEntry ) ) ); - ImplSetModified( TRUE ); + ImplSetModified( sal_True ); ImplBroadcast( nPos ); } @@ -502,9 +502,9 @@ BOOL GalleryTheme::RemoveObject( ULONG nPos ) // ------------------------------------------------------------------------ -BOOL GalleryTheme::ChangeObjectPos( ULONG nOldPos, ULONG nNewPos ) +sal_Bool GalleryTheme::ChangeObjectPos( sal_uIntPtr nOldPos, sal_uIntPtr nNewPos ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( nOldPos != nNewPos ) { @@ -518,7 +518,7 @@ BOOL GalleryTheme::ChangeObjectPos( ULONG nOldPos, ULONG nNewPos ) nOldPos++; aObjectList.Remove( nOldPos ); - ImplSetModified( bRet = TRUE ); + ImplSetModified( bRet = sal_True ); ImplBroadcast( ( nNewPos < nOldPos ) ? nNewPos : ( nNewPos - 1 ) ); } } @@ -535,15 +535,15 @@ void GalleryTheme::Actualize( const Link& rActualizeLink, GalleryProgress* pProg Graphic aGraphic; String aFormat; GalleryObject* pEntry; - const ULONG nCount = aObjectList.Count(); - ULONG i; + const sal_uIntPtr nCount = aObjectList.Count(); + sal_uIntPtr i; LockBroadcaster(); - bAbortActualize = FALSE; + bAbortActualize = sal_False; // LoeschFlag zuruecksetzen for ( i = 0; i < nCount; i++ ) - aObjectList.GetObject( i )->bDummy = FALSE; + aObjectList.GetObject( i )->bDummy = sal_False; for( i = 0; ( i < nCount ) && !bAbortActualize; i++ ) { @@ -566,7 +566,7 @@ void GalleryTheme::Actualize( const Link& rActualizeLink, GalleryProgress* pProg { SgaObjectSound aObjSound( aURL ); if( !InsertObject( aObjSound ) ) - pEntry->bDummy = TRUE; + pEntry->bDummy = sal_True; } else { @@ -584,12 +584,12 @@ void GalleryTheme::Actualize( const Link& rActualizeLink, GalleryProgress* pProg pNewObj = (SgaObject*) new SgaObjectBmp( aGraphic, aURL, aFormat ); if( !InsertObject( *pNewObj ) ) - pEntry->bDummy = TRUE; + pEntry->bDummy = sal_True; delete pNewObj; } else - pEntry->bDummy = TRUE; // Loesch-Flag setzen + pEntry->bDummy = sal_True; // Loesch-Flag setzen } } else @@ -606,7 +606,7 @@ void GalleryTheme::Actualize( const Link& rActualizeLink, GalleryProgress* pProg SgaObjectSvDraw aNewObj( *pIStm, pEntry->aURL ); if( !InsertObject( aNewObj ) ) - pEntry->bDummy = TRUE; + pEntry->bDummy = sal_True; pIStm->SetBufferSize( 0L ); } @@ -620,9 +620,9 @@ void GalleryTheme::Actualize( const Link& rActualizeLink, GalleryProgress* pProg { if( pEntry->bDummy ) { - Broadcast( GalleryHint( GALLERY_HINT_CLOSE_OBJECT, GetName(), reinterpret_cast< ULONG >( pEntry ) ) ); + Broadcast( GalleryHint( GALLERY_HINT_CLOSE_OBJECT, GetName(), reinterpret_cast< sal_uIntPtr >( pEntry ) ) ); delete aObjectList.Remove( pEntry ); - Broadcast( GalleryHint( GALLERY_HINT_OBJECT_REMOVED, GetName(), reinterpret_cast< ULONG >( pEntry ) ) ); + Broadcast( GalleryHint( GALLERY_HINT_OBJECT_REMOVED, GetName(), reinterpret_cast< sal_uIntPtr >( pEntry ) ) ); pEntry = aObjectList.GetCurObject(); } @@ -685,10 +685,10 @@ void GalleryTheme::Actualize( const Link& rActualizeLink, GalleryProgress* pProg CopyFile( aTmpURL, aInURL ); KillFile( aTmpURL ); - ULONG nStorErr = 0; + sal_uIntPtr nStorErr = 0; { - SvStorageRef aTempStorageRef( new SvStorage( FALSE, aTmpURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_STD_READWRITE ) ); + SvStorageRef aTempStorageRef( new SvStorage( sal_False, aTmpURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_STD_READWRITE ) ); aSvDrawStorageRef->CopyTo( aTempStorageRef ); nStorErr = aSvDrawStorageRef->GetError(); } @@ -701,7 +701,7 @@ void GalleryTheme::Actualize( const Link& rActualizeLink, GalleryProgress* pProg } KillFile( aTmpURL ); - ImplSetModified( TRUE ); + ImplSetModified( sal_True ); ImplWrite(); UnlockBroadcaster(); } @@ -709,7 +709,7 @@ void GalleryTheme::Actualize( const Link& rActualizeLink, GalleryProgress* pProg // ------------------------------------------------------------------------ -GalleryThemeEntry* GalleryTheme::CreateThemeEntry( const INetURLObject& rURL, BOOL bReadOnly ) +GalleryThemeEntry* GalleryTheme::CreateThemeEntry( const INetURLObject& rURL, sal_Bool bReadOnly ) { DBG_ASSERT( rURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" ); @@ -724,7 +724,7 @@ GalleryThemeEntry* GalleryTheme::CreateThemeEntry( const INetURLObject& rURL, BO String aThemeName; sal_uInt32 nThemeId = 0; sal_uInt16 nVersion; - BOOL bThemeNameFromResource = FALSE; + sal_Bool bThemeNameFromResource = sal_False; *pIStm >> nVersion; @@ -776,7 +776,7 @@ GalleryThemeEntry* GalleryTheme::CreateThemeEntry( const INetURLObject& rURL, BO aPathURL.removeFinalSlash(); pRet = new GalleryThemeEntry( aPathURL, aThemeName, String(rURL.GetBase()).Copy( 2, 6 ).ToInt32(), - bReadOnly, FALSE, FALSE, nThemeId, + bReadOnly, sal_False, sal_False, nThemeId, bThemeNameFromResource ); } @@ -789,16 +789,16 @@ GalleryThemeEntry* GalleryTheme::CreateThemeEntry( const INetURLObject& rURL, BO // ----------------------------------------------------------------------------- -BOOL GalleryTheme::GetThumb( ULONG nPos, Bitmap& rBmp, BOOL ) +sal_Bool GalleryTheme::GetThumb( sal_uIntPtr nPos, Bitmap& rBmp, sal_Bool ) { SgaObject* pObj = AcquireObject( nPos ); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( pObj ) { rBmp = pObj->GetThumbBmp(); ReleaseObject( pObj ); - bRet = TRUE; + bRet = sal_True; } return bRet; @@ -806,10 +806,10 @@ BOOL GalleryTheme::GetThumb( ULONG nPos, Bitmap& rBmp, BOOL ) // ----------------------------------------------------------------------------- -BOOL GalleryTheme::GetGraphic( ULONG nPos, Graphic& rGraphic, BOOL bProgress ) +sal_Bool GalleryTheme::GetGraphic( sal_uIntPtr nPos, Graphic& rGraphic, sal_Bool bProgress ) { const GalleryObject* pObject = ImplGetGalleryObject( nPos ); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( pObject ) { @@ -837,7 +837,7 @@ BOOL GalleryTheme::GetGraphic( ULONG nPos, Graphic& rGraphic, BOOL bProgress ) ImageMap aIMap; if( CreateIMapGraphic( *aModel.GetModel(), rGraphic, aIMap ) ) - bRet = TRUE; + bRet = sal_True; else { VirtualDevice aVDev; @@ -848,7 +848,7 @@ BOOL GalleryTheme::GetGraphic( ULONG nPos, Graphic& rGraphic, BOOL bProgress ) aView.ShowSdrPage(aView.GetModel()->GetPage(0)); aView.MarkAll(); rGraphic = aView.GetAllMarkedGraphic(); - bRet = TRUE; + bRet = sal_True; } } } @@ -865,7 +865,7 @@ BOOL GalleryTheme::GetGraphic( ULONG nPos, Graphic& rGraphic, BOOL bProgress ) aBmp.Replace( COL_LIGHTMAGENTA, COL_WHITE ); rGraphic = aBmp; ReleaseObject( pObj ); - bRet = TRUE; + bRet = sal_True; } } break; @@ -880,13 +880,13 @@ BOOL GalleryTheme::GetGraphic( ULONG nPos, Graphic& rGraphic, BOOL bProgress ) // ----------------------------------------------------------------------------- -BOOL GalleryTheme::InsertGraphic( const Graphic& rGraphic, ULONG nInsertPos ) +sal_Bool GalleryTheme::InsertGraphic( const Graphic& rGraphic, sal_uIntPtr nInsertPos ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( rGraphic.GetType() != GRAPHIC_NONE ) { - ULONG nExportFormat = CVT_UNKNOWN; + sal_uIntPtr nExportFormat = CVT_UNKNOWN; const GfxLink aGfxLink( ( (Graphic&) rGraphic ).GetLink() ); if( aGfxLink.GetDataSize() ) @@ -958,10 +958,10 @@ BOOL GalleryTheme::InsertGraphic( const Graphic& rGraphic, ULONG nInsertPos ) // ----------------------------------------------------------------------------- -BOOL GalleryTheme::GetModel( ULONG nPos, SdrModel& rModel, BOOL ) +sal_Bool GalleryTheme::GetModel( sal_uIntPtr nPos, SdrModel& rModel, sal_Bool ) { const GalleryObject* pObject = ImplGetGalleryObject( nPos ); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( pObject && ( SGA_OBJ_SVDRAW == pObject->eObjKind ) ) { @@ -987,11 +987,11 @@ BOOL GalleryTheme::GetModel( ULONG nPos, SdrModel& rModel, BOOL ) // ----------------------------------------------------------------------------- -BOOL GalleryTheme::InsertModel( const FmFormModel& rModel, ULONG nInsertPos ) +sal_Bool GalleryTheme::InsertModel( const FmFormModel& rModel, sal_uIntPtr nInsertPos ) { INetURLObject aURL( ImplCreateUniqueURL( SGA_OBJ_SVDRAW ) ); SvStorageRef xStor( GetSvDrawStorage() ); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( xStor.Is() ) { @@ -1034,10 +1034,10 @@ BOOL GalleryTheme::InsertModel( const FmFormModel& rModel, ULONG nInsertPos ) // ----------------------------------------------------------------------------- -BOOL GalleryTheme::GetModelStream( ULONG nPos, SotStorageStreamRef& rxModelStream, BOOL ) +sal_Bool GalleryTheme::GetModelStream( sal_uIntPtr nPos, SotStorageStreamRef& rxModelStream, sal_Bool ) { const GalleryObject* pObject = ImplGetGalleryObject( nPos ); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( pObject && ( SGA_OBJ_SVDRAW == pObject->eObjKind ) ) { @@ -1051,7 +1051,7 @@ BOOL GalleryTheme::GetModelStream( ULONG nPos, SotStorageStreamRef& rxModelStrea if( xIStm.Is() && !xIStm->GetError() ) { - UINT32 nVersion = 0; + sal_uInt32 nVersion = 0; xIStm->SetBufferSize( 16348 ); @@ -1087,11 +1087,11 @@ BOOL GalleryTheme::GetModelStream( ULONG nPos, SotStorageStreamRef& rxModelStrea // ----------------------------------------------------------------------------- -BOOL GalleryTheme::InsertModelStream( const SotStorageStreamRef& rxModelStream, ULONG nInsertPos ) +sal_Bool GalleryTheme::InsertModelStream( const SotStorageStreamRef& rxModelStream, sal_uIntPtr nInsertPos ) { INetURLObject aURL( ImplCreateUniqueURL( SGA_OBJ_SVDRAW ) ); SvStorageRef xStor( GetSvDrawStorage() ); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( xStor.Is() ) { @@ -1123,15 +1123,15 @@ BOOL GalleryTheme::InsertModelStream( const SotStorageStreamRef& rxModelStream, // ----------------------------------------------------------------------------- -BOOL GalleryTheme::GetURL( ULONG nPos, INetURLObject& rURL, BOOL ) +sal_Bool GalleryTheme::GetURL( sal_uIntPtr nPos, INetURLObject& rURL, sal_Bool ) { const GalleryObject* pObject = ImplGetGalleryObject( nPos ); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( pObject ) { rURL = INetURLObject( ImplGetURL( pObject ) ); - bRet = TRUE; + bRet = sal_True; } return bRet; @@ -1139,13 +1139,13 @@ BOOL GalleryTheme::GetURL( ULONG nPos, INetURLObject& rURL, BOOL ) // ----------------------------------------------------------------------------- -BOOL GalleryTheme::InsertURL( const INetURLObject& rURL, ULONG nInsertPos ) +sal_Bool GalleryTheme::InsertURL( const INetURLObject& rURL, sal_uIntPtr nInsertPos ) { Graphic aGraphic; String aFormat; SgaObject* pNewObj = NULL; - const USHORT nImportRet = GalleryGraphicImport( rURL, aGraphic, aFormat ); - BOOL bRet = FALSE; + const sal_uInt16 nImportRet = GalleryGraphicImport( rURL, aGraphic, aFormat ); + sal_Bool bRet = sal_False; if( nImportRet != SGA_IMPORT_NONE ) { @@ -1160,7 +1160,7 @@ BOOL GalleryTheme::InsertURL( const INetURLObject& rURL, ULONG nInsertPos ) pNewObj = (SgaObject*) new SgaObjectSound( rURL ); if( pNewObj && InsertObject( *pNewObj, nInsertPos ) ) - bRet = TRUE; + bRet = sal_True; delete pNewObj; @@ -1169,11 +1169,11 @@ BOOL GalleryTheme::InsertURL( const INetURLObject& rURL, ULONG nInsertPos ) // ----------------------------------------------------------------------------- -BOOL GalleryTheme::InsertFileOrDirURL( const INetURLObject& rFileOrDirURL, ULONG nInsertPos ) +sal_Bool GalleryTheme::InsertFileOrDirURL( const INetURLObject& rFileOrDirURL, sal_uIntPtr nInsertPos ) { INetURLObject aURL; ::std::vector< INetURLObject > aURLVector; - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; try { @@ -1225,9 +1225,9 @@ BOOL GalleryTheme::InsertFileOrDirURL( const INetURLObject& rFileOrDirURL, ULONG // ----------------------------------------------------------------------------- -BOOL GalleryTheme::InsertTransferable( const uno::Reference< datatransfer::XTransferable >& rxTransferable, ULONG nInsertPos ) +sal_Bool GalleryTheme::InsertTransferable( const uno::Reference< datatransfer::XTransferable >& rxTransferable, sal_uIntPtr nInsertPos ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( rxTransferable.is() ) { @@ -1278,7 +1278,7 @@ BOOL GalleryTheme::InsertTransferable( const uno::Reference< datatransfer::XTran else { Graphic aGraphic; - ULONG nFormat = 0; + sal_uIntPtr nFormat = 0; if( aDataHelper.HasFormat( SOT_FORMATSTR_ID_SVXB ) ) nFormat = SOT_FORMATSTR_ID_SVXB; @@ -1293,7 +1293,7 @@ BOOL GalleryTheme::InsertTransferable( const uno::Reference< datatransfer::XTran if( pGraphic ) { - bRet = FALSE; + bRet = sal_False; if( aDataHelper.HasFormat( SOT_FORMATSTR_ID_SVIM ) ) { @@ -1331,7 +1331,7 @@ BOOL GalleryTheme::InsertTransferable( const uno::Reference< datatransfer::XTran // ----------------------------------------------------------------------------- -void GalleryTheme::CopyToClipboard( Window* pWindow, ULONG nPos ) +void GalleryTheme::CopyToClipboard( Window* pWindow, sal_uIntPtr nPos ) { GalleryTransferable* pTransferable = new GalleryTransferable( this, nPos, false ); pTransferable->CopyToClipboard( pWindow ); @@ -1339,7 +1339,7 @@ void GalleryTheme::CopyToClipboard( Window* pWindow, ULONG nPos ) // ----------------------------------------------------------------------------- -void GalleryTheme::StartDrag( Window* pWindow, ULONG nPos ) +void GalleryTheme::StartDrag( Window* pWindow, sal_uIntPtr nPos ) { GalleryTransferable* pTransferable = new GalleryTransferable( this, nPos, true ); pTransferable->StartDrag( pWindow, DND_ACTION_COPY | DND_ACTION_LINK ); @@ -1353,7 +1353,7 @@ SvStream& GalleryTheme::WriteData( SvStream& rOStm ) const const INetURLObject aRelURL2( GetParent()->GetUserURL() ); INetURLObject aNewURL, aTempURL; sal_uInt32 nCount = GetObjectCount(); - BOOL bRel; + sal_Bool bRel; rOStm << (sal_uInt16) 0x0004; rOStm << ByteString( GetRealName(), RTL_TEXTENCODING_UTF8 ); @@ -1367,7 +1367,7 @@ SvStream& GalleryTheme::WriteData( SvStream& rOStm ) const if( SGA_OBJ_SVDRAW == pObj->eObjKind ) { aPath = GetSvDrawStreamNameFromURL( pObj->aURL ); - bRel = FALSE; + bRel = sal_False; } else { @@ -1399,7 +1399,7 @@ SvStream& GalleryTheme::WriteData( SvStream& rOStm ) const } // neuerdings wird ein 512-Byte-Reservepuffer gechrieben; - // um diesen zu erkennen werden zwei ULONG-Ids geschrieben + // um diesen zu erkennen werden zwei sal_uIntPtr-Ids geschrieben rOStm << COMPAT_FORMAT( 'G', 'A', 'L', 'R' ) << COMPAT_FORMAT( 'E', 'S', 'R', 'V' ); const long nReservePos = rOStm.Tell(); @@ -1438,7 +1438,7 @@ SvStream& GalleryTheme::ReadData( SvStream& rIStm ) if( nVersion >= 0x0004 ) { - UINT16 nTmp16; + sal_uInt16 nTmp16; rIStm >> nTmp16; nTextEncoding = (rtl_TextEncoding) nTmp16; } @@ -1453,13 +1453,13 @@ SvStream& GalleryTheme::ReadData( SvStream& rIStm ) INetURLObject aRelURL1( GetParent()->GetRelativeURL() ); INetURLObject aRelURL2( GetParent()->GetUserURL() ); sal_uInt32 nId1, nId2; - BOOL bRel; + sal_Bool bRel; for( pObj = aObjectList.First(); pObj; pObj = aObjectList.Next() ) { - Broadcast( GalleryHint( GALLERY_HINT_CLOSE_OBJECT, GetName(), reinterpret_cast< ULONG >( pObj ) ) ); + Broadcast( GalleryHint( GALLERY_HINT_CLOSE_OBJECT, GetName(), reinterpret_cast< sal_uIntPtr >( pObj ) ) ); delete pObj; - Broadcast( GalleryHint( GALLERY_HINT_OBJECT_REMOVED, GetName(), reinterpret_cast< ULONG >( pObj ) ) ); + Broadcast( GalleryHint( GALLERY_HINT_OBJECT_REMOVED, GetName(), reinterpret_cast< sal_uIntPtr >( pObj ) ) ); } aObjectList.Clear(); @@ -1540,7 +1540,7 @@ SvStream& GalleryTheme::ReadData( SvStream& rIStm ) { VersionCompat* pCompat = new VersionCompat( rIStm, STREAM_READ ); sal_uInt32 nTemp32; - BOOL bThemeNameFromResource = FALSE; + sal_Bool bThemeNameFromResource = sal_False; rIStm >> nTemp32; @@ -1556,7 +1556,7 @@ SvStream& GalleryTheme::ReadData( SvStream& rIStm ) else rIStm.SetError( SVSTREAM_READ_ERROR ); - ImplSetModified( FALSE ); + ImplSetModified( sal_False ); return rIStm; } @@ -1575,25 +1575,25 @@ SvStream& operator>>( SvStream& rIn, GalleryTheme& rTheme ) return rTheme.ReadData( rIn ); } -void GalleryTheme::ImplSetModified( BOOL bModified ) +void GalleryTheme::ImplSetModified( sal_Bool bModified ) { pThm->SetModified( bModified ); } const String& GalleryTheme::GetRealName() const { return pThm->GetThemeName(); } const INetURLObject& GalleryTheme::GetThmURL() const { return pThm->GetThmURL(); } const INetURLObject& GalleryTheme::GetSdgURL() const { return pThm->GetSdgURL(); } const INetURLObject& GalleryTheme::GetSdvURL() const { return pThm->GetSdvURL(); } -UINT32 GalleryTheme::GetId() const { return pThm->GetId(); } -void GalleryTheme::SetId( UINT32 nNewId, BOOL bResetThemeName ) { pThm->SetId( nNewId, bResetThemeName ); } -BOOL GalleryTheme::IsThemeNameFromResource() const { return pThm->IsNameFromResource(); } -BOOL GalleryTheme::IsImported() const { return pThm->IsImported(); } -BOOL GalleryTheme::IsReadOnly() const { return pThm->IsReadOnly(); } -BOOL GalleryTheme::IsDefault() const { return pThm->IsDefault(); } -BOOL GalleryTheme::IsModified() const { return pThm->IsModified(); } +sal_uInt32 GalleryTheme::GetId() const { return pThm->GetId(); } +void GalleryTheme::SetId( sal_uInt32 nNewId, sal_Bool bResetThemeName ) { pThm->SetId( nNewId, bResetThemeName ); } +sal_Bool GalleryTheme::IsThemeNameFromResource() const { return pThm->IsNameFromResource(); } +sal_Bool GalleryTheme::IsImported() const { return pThm->IsImported(); } +sal_Bool GalleryTheme::IsReadOnly() const { return pThm->IsReadOnly(); } +sal_Bool GalleryTheme::IsDefault() const { return pThm->IsDefault(); } +sal_Bool GalleryTheme::IsModified() const { return pThm->IsModified(); } const String& GalleryTheme::GetName() const { return IsImported() ? aImportName : pThm->GetThemeName(); } void GalleryTheme::InsertAllThemes( ListBox& rListBox ) { - for( USHORT i = RID_GALLERYSTR_THEME_FIRST; i <= RID_GALLERYSTR_THEME_LAST; i++ ) + for( sal_uInt16 i = RID_GALLERYSTR_THEME_FIRST; i <= RID_GALLERYSTR_THEME_LAST; i++ ) rListBox.InsertEntry( String( GAL_RESID( i ) ) ); } diff --git a/svx/source/gallery2/makefile.mk b/svx/source/gallery2/makefile.mk deleted file mode 100644 index 4d73a4af2ad2..000000000000 --- a/svx/source/gallery2/makefile.mk +++ /dev/null @@ -1,69 +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=svx -TARGET=gal - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - gallery.src \ - galtheme.src - -SLOFILES = \ - $(SLO)$/galexpl.obj \ - $(SLO)$/galctrl.obj \ - $(SLO)$/gallery1.obj \ - $(SLO)$/galtheme.obj \ - $(SLO)$/galmisc.obj \ - $(SLO)$/galobj.obj \ - $(SLO)$/codec.obj \ - $(SLO)$/galbrws.obj \ - $(SLO)$/galbrws1.obj \ - $(SLO)$/galbrws2.obj - -EXCEPTIONSFILES = \ - $(SLO)$/gallery1.obj \ - $(SLO)$/galtheme.obj \ - $(SLO)$/galmisc.obj \ - $(SLO)$/galbrws1.obj \ - $(SLO)$/galexpl.obj - -RESLIB1NAME = $(TARGET) -RESLIB1IMAGES = $(PRJ)$/res -RESLIB1SRSFILES = $(SRS)$/$(TARGET).srs - -# --- Targets -------------------------------------------------------------- - -.INCLUDE : target.mk |