diff options
Diffstat (limited to 'svx/source/gallery2')
-rw-r--r-- | svx/source/gallery2/galbrws1.cxx | 16 | ||||
-rw-r--r-- | svx/source/gallery2/galbrws2.cxx | 22 | ||||
-rw-r--r-- | svx/source/gallery2/galctrl.cxx | 4 | ||||
-rw-r--r-- | svx/source/gallery2/gallery1.cxx | 16 | ||||
-rw-r--r-- | svx/source/gallery2/galmisc.cxx | 18 | ||||
-rw-r--r-- | svx/source/gallery2/galobj.cxx | 2 | ||||
-rw-r--r-- | svx/source/gallery2/galtheme.cxx | 22 |
7 files changed, 50 insertions, 50 deletions
diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index f8153ff6c762..440c5eaf8ea5 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -115,7 +115,7 @@ GalleryBrowser1::GalleryBrowser1( mpThemes ( VclPtr<GalleryThemeListBox>::Create( this, WB_TABSTOP | WB_3DLOOK | WB_BORDER | WB_HSCROLL | WB_VSCROLL | WB_AUTOHSCROLL | WB_SORT ) ), mpGallery ( pGallery ), mpExchangeData ( new ExchangeData ), - mpThemePropsDlgItemSet( NULL ), + mpThemePropsDlgItemSet( nullptr ), aImgNormal ( GalleryResGetBitmapEx( RID_SVXBMP_THEME_NORMAL ) ), aImgDefault ( GalleryResGetBitmapEx( RID_SVXBMP_THEME_DEFAULT ) ), aImgReadOnly ( GalleryResGetBitmapEx( RID_SVXBMP_THEME_READONLY ) ), @@ -154,14 +154,14 @@ void GalleryBrowser1::dispose() EndListening( *mpGallery ); mpThemes.disposeAndClear(); delete mpExchangeData; - mpExchangeData = NULL; + mpExchangeData = nullptr; maNewTheme.disposeAndClear(); Control::dispose(); } sal_uIntPtr GalleryBrowser1::ImplInsertThemeEntry( const GalleryThemeEntry* pEntry ) { - static const bool bShowHiddenThemes = ( getenv( "GALLERY_SHOW_HIDDEN_THEMES" ) != NULL ); + static const bool bShowHiddenThemes = ( getenv( "GALLERY_SHOW_HIDDEN_THEMES" ) != nullptr ); sal_uIntPtr nRet = LISTBOX_ENTRY_NOTFOUND; @@ -229,7 +229,7 @@ void GalleryBrowser1::ImplGetExecuteVector(::std::vector< sal_uInt16 >& o_aExec) if( pTheme ) { bool bUpdateAllowed, bRenameAllowed, bRemoveAllowed; - static const bool bIdDialog = ( getenv( "GALLERY_ENABLE_ID_DIALOG" ) != NULL ); + static const bool bIdDialog = ( getenv( "GALLERY_ENABLE_ID_DIALOG" ) != nullptr ); if( pTheme->IsReadOnly() ) bUpdateAllowed = bRenameAllowed = bRemoveAllowed = false; @@ -269,7 +269,7 @@ void GalleryBrowser1::ImplGalleryThemeProperties( const OUString & rThemeName, b SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); assert(pFact && "Got no AbstractDialogFactory!"); - VclAbstractDialog2* pThemeProps = pFact->CreateGalleryThemePropertiesDialog( NULL, mpExchangeData, mpThemePropsDlgItemSet ); + VclAbstractDialog2* pThemeProps = pFact->CreateGalleryThemePropertiesDialog( nullptr, mpExchangeData, mpThemePropsDlgItemSet ); assert(pThemeProps && "Got no GalleryThemePropertiesDialog!"); if ( bCreateNew ) @@ -342,7 +342,7 @@ IMPL_LINK_TYPED( GalleryBrowser1, DestroyThemePropertiesDlgHdl, void*, p, void ) VclAbstractDialog2* pDialog = static_cast<VclAbstractDialog2*>(p); delete pDialog; delete mpThemePropsDlgItemSet; - mpThemePropsDlgItemSet = 0; + mpThemePropsDlgItemSet = nullptr; } void GalleryBrowser1::ImplExecute( sal_uInt16 nId ) @@ -526,13 +526,13 @@ bool GalleryBrowser1::KeyInput( const KeyEvent& rKEvt, vcl::Window* pWindow ) switch( rKEvt.GetKeyCode().GetCode() ) { case( KEY_INSERT ): - ClickNewThemeHdl( NULL ); + ClickNewThemeHdl( nullptr ); break; case( KEY_I ): { if( bMod1 ) - ClickNewThemeHdl( NULL ); + ClickNewThemeHdl( nullptr ); } break; diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx index d2e69896dd88..cfbb7dcfe7fb 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -227,7 +227,7 @@ void GalleryThemePopup::Execute( pInfo->Dispatch = rCmdInfo.Dispatch; if ( !Application::PostUserEvent( - LINK( 0, GalleryBrowser2, AsyncDispatch_Impl), pInfo ) ) + LINK( nullptr, GalleryBrowser2, AsyncDispatch_Impl), pInfo ) ) delete pInfo; } } @@ -414,7 +414,7 @@ void GalleryToolBox::KeyInput( const KeyEvent& rKEvt ) GalleryBrowser2::GalleryBrowser2( vcl::Window* pParent, Gallery* pGallery ) : Control ( pParent, WB_TABSTOP ), mpGallery ( pGallery ), - mpCurTheme ( NULL ), + mpCurTheme ( nullptr ), mpIconView ( VclPtr<GalleryIconView>::Create( this, nullptr ) ), mpListView ( VclPtr<GalleryListView>::Create( this, nullptr ) ), mpPreview ( VclPtr<GalleryPreview>::Create(this) ), @@ -448,7 +448,7 @@ GalleryBrowser2::GalleryBrowser2( vcl::Window* pParent, Gallery* pGallery ) : maViewBox->SetHelpId( TBX_ID_LIST, HID_GALLERY_LISTVIEW ); maViewBox->SetQuickHelpText( TBX_ID_LIST, GAL_RESSTR(RID_SVXSTR_GALLERY_LISTVIEW) ); - MiscHdl( NULL ); + MiscHdl( nullptr ); maViewBox->SetSelectHdl( LINK( this, GalleryBrowser2, SelectTbxHdl ) ); maViewBox->Show(); @@ -659,10 +659,10 @@ void GalleryBrowser2::ShowContextMenu( vcl::Window*, const Point* pContextPoint bool GalleryBrowser2::KeyInput( const KeyEvent& rKEvt, vcl::Window* pWindow ) { Point aSelPos; - const sal_uIntPtr nItemId = ImplGetSelectedItemId( NULL, aSelPos ); + const sal_uIntPtr nItemId = ImplGetSelectedItemId( nullptr, aSelPos ); bool bRet = false; svx::sidebar::GalleryControl* pParentControl = dynamic_cast<svx::sidebar::GalleryControl*>(GetParent()); - if (pParentControl != NULL) + if (pParentControl != nullptr) bRet = pParentControl->GalleryKeyInput(rKEvt, pWindow); if( !bRet && !maViewBox->HasFocus() && nItemId && mpCurTheme ) @@ -825,7 +825,7 @@ void GalleryBrowser2::SetMode( GalleryBrowserMode eMode ) { Graphic aGraphic; Point aSelPos; - const sal_uIntPtr nItemId = ImplGetSelectedItemId( NULL, aSelPos ); + const sal_uIntPtr nItemId = ImplGetSelectedItemId( nullptr, aSelPos ); if( nItemId ) { @@ -879,7 +879,7 @@ void GalleryBrowser2::Travel( GalleryBrowserTravel eTravel ) if( mpCurTheme ) { Point aSelPos; - const sal_uIntPtr nItemId = ImplGetSelectedItemId( NULL, aSelPos ); + const sal_uIntPtr nItemId = ImplGetSelectedItemId( nullptr, aSelPos ); if( nItemId ) { @@ -1044,7 +1044,7 @@ void GalleryBrowser2::Dispatch( const css::util::URL &rURL ) { Point aSelPos; - const sal_uIntPtr nItemId = ImplGetSelectedItemId( NULL, aSelPos ); + const sal_uIntPtr nItemId = ImplGetSelectedItemId( nullptr, aSelPos ); if( !mpCurTheme || !nItemId ) return; @@ -1131,7 +1131,7 @@ void GalleryBrowser2::Dispatch( pInfo->Dispatch = xDispatch; if ( !Application::PostUserEvent( - LINK( 0, GalleryBrowser2, AsyncDispatch_Impl), pInfo ) ) + LINK( nullptr, GalleryBrowser2, AsyncDispatch_Impl), pInfo ) ) delete pInfo; } break; @@ -1144,7 +1144,7 @@ void GalleryBrowser2::Dispatch( void GalleryBrowser2::Execute( sal_uInt16 nId ) { Point aSelPos; - const sal_uIntPtr nItemId = ImplGetSelectedItemId( NULL, aSelPos ); + const sal_uIntPtr nItemId = ImplGetSelectedItemId( nullptr, aSelPos ); if( mpCurTheme && nItemId ) { @@ -1210,7 +1210,7 @@ void GalleryBrowser2::Execute( sal_uInt16 nId ) case( GALLERYBROWSERMODE_PREVIEW ): pWindow = static_cast<vcl::Window*>(mpPreview); break; default: - pWindow = NULL; + pWindow = nullptr; break; } diff --git a/svx/source/gallery2/galctrl.cxx b/svx/source/gallery2/galctrl.cxx index 0cf63b8d12a2..2de5c1083986 100644 --- a/svx/source/gallery2/galctrl.cxx +++ b/svx/source/gallery2/galctrl.cxx @@ -160,7 +160,7 @@ void GalleryPreview::Command(const CommandEvent& rCEvt) if (mpTheme && (rCEvt.GetCommand() == CommandEventId::ContextMenu)) { GalleryBrowser2* pGalleryBrowser = static_cast<GalleryBrowser2*>(GetParent()); - pGalleryBrowser->ShowContextMenu(this, (rCEvt.IsMouseEvent() ? &rCEvt.GetMousePosPixel() : NULL)); + pGalleryBrowser->ShowContextMenu(this, (rCEvt.IsMouseEvent() ? &rCEvt.GetMousePosPixel() : nullptr)); } } @@ -553,7 +553,7 @@ void GalleryListView::Command( const CommandEvent& rCEvt ) if( rCEvt.GetCommand() == CommandEventId::ContextMenu ) { - const Point* pPos = NULL; + const Point* pPos = nullptr; if( rCEvt.IsMouseEvent() && ( GetRowAtYPosPixel( rCEvt.GetMousePosPixel().Y() ) != BROWSER_ENDOFSELECTION ) ) pPos = &rCEvt.GetMousePosPixel(); diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx index 7a6bfd2498dc..4f5d371262b1 100644 --- a/svx/source/gallery2/gallery1.cxx +++ b/svx/source/gallery2/gallery1.cxx @@ -182,7 +182,7 @@ Gallery::~Gallery() Gallery* Gallery::GetGalleryInstance() { - static Gallery* pGallery = NULL; + static Gallery* pGallery = nullptr; if( !pGallery ) { @@ -427,7 +427,7 @@ void Gallery::ImplLoadSubDirs( const INetURLObject& rBaseURL, bool& rbDirIsReadO GalleryThemeEntry* Gallery::ImplGetThemeEntry( const OUString& rThemeName ) { - GalleryThemeEntry* pFound = NULL; + GalleryThemeEntry* pFound = nullptr; if( !rThemeName.isEmpty() ) { @@ -441,7 +441,7 @@ GalleryThemeEntry* Gallery::ImplGetThemeEntry( const OUString& rThemeName ) OUString Gallery::GetThemeName( sal_uIntPtr nThemeId ) const { - GalleryThemeEntry* pFound = NULL; + GalleryThemeEntry* pFound = nullptr; for ( size_t i = 0, n = aThemeList.size(); i < n && !pFound; ++i ) { @@ -502,7 +502,7 @@ OUString Gallery::GetThemeName( sal_uIntPtr nThemeId ) const bool Gallery::HasTheme( const OUString& rThemeName ) { - return( ImplGetThemeEntry( rThemeName ) != NULL ); + return( ImplGetThemeEntry( rThemeName ) != nullptr ); } bool Gallery::CreateTheme( const OUString& rThemeName ) @@ -599,7 +599,7 @@ bool Gallery::RemoveTheme( const OUString& rThemeName ) GalleryTheme* Gallery::ImplGetCachedTheme(const GalleryThemeEntry* pThemeEntry) { - GalleryTheme* pTheme = NULL; + GalleryTheme* pTheme = nullptr; if( pThemeEntry ) { @@ -631,7 +631,7 @@ GalleryTheme* Gallery::ImplGetCachedTheme(const GalleryThemeEntry* pThemeEntry) if( pIStm->GetError() ) { - delete pTheme, pTheme = NULL; + delete pTheme, pTheme = nullptr; } } catch (const css::ucb::ContentCreationException&) @@ -663,10 +663,10 @@ void Gallery::ImplDeleteCachedTheme( GalleryTheme* pTheme ) GalleryTheme* Gallery::AcquireTheme( const OUString& rThemeName, SfxListener& rListener ) { - GalleryTheme* pTheme = NULL; + GalleryTheme* pTheme = nullptr; GalleryThemeEntry* pThemeEntry = ImplGetThemeEntry( rThemeName ); - if( pThemeEntry && ( ( pTheme = ImplGetCachedTheme( pThemeEntry ) ) != NULL ) ) + if( pThemeEntry && ( ( pTheme = ImplGetCachedTheme( pThemeEntry ) ) != nullptr ) ) rListener.StartListening( *pTheme ); return pTheme; diff --git a/svx/source/gallery2/galmisc.cxx b/svx/source/gallery2/galmisc.cxx index 397814f330c1..29258839a2dd 100644 --- a/svx/source/gallery2/galmisc.cxx +++ b/svx/source/gallery2/galmisc.cxx @@ -55,7 +55,7 @@ using namespace ::com::sun::star; ResMgr* GetGalleryResMgr() { - static ResMgr* pGalleryResMgr = NULL; + static ResMgr* pGalleryResMgr = nullptr; if( !pGalleryResMgr ) { @@ -96,7 +96,7 @@ GalleryGraphicImportRet GalleryGraphicImport( const INetURLObject& rURL, Graphic if( pIStm ) { GraphicFilter& rGraphicFilter = GraphicFilter::GetGraphicFilter(); - std::unique_ptr<GalleryProgress> pProgress(bShowProgress ? new GalleryProgress( &rGraphicFilter ) : NULL); + std::unique_ptr<GalleryProgress> pProgress(bShowProgress ? new GalleryProgress( &rGraphicFilter ) : nullptr); sal_uInt16 nFormat; if( !rGraphicFilter.ImportGraphic( rGraphic, rURL.GetMainURL( INetURLObject::NO_DECODE ), *pIStm, GRFILTER_FORMAT_DONTKNOW, &nFormat ) ) @@ -402,9 +402,9 @@ GalleryTransferable::GalleryTransferable( GalleryTheme* pTheme, sal_uIntPtr nObj mpTheme( pTheme ), meObjectKind( mpTheme->GetObjectKind( nObjectPos ) ), mnObjectPos( nObjectPos ), - mpGraphicObject( NULL ), - mpImageMap( NULL ), - mpURL( NULL ) + mpGraphicObject( nullptr ), + mpImageMap( nullptr ), + mpURL( nullptr ) { InitData( bLazy ); @@ -454,7 +454,7 @@ void GalleryTransferable::InitData( bool bLazy ) mpURL = new INetURLObject; if( !mpTheme->GetURL( mnObjectPos, *mpURL ) ) - delete mpURL, mpURL = NULL; + delete mpURL, mpURL = nullptr; } if( ( SGA_OBJ_SOUND != meObjectKind ) && !mpGraphicObject ) @@ -570,9 +570,9 @@ void GalleryTransferable::DragFinished( sal_Int8 nDropAction ) void GalleryTransferable::ObjectReleased() { mxModelStream.Clear(); - delete mpGraphicObject, mpGraphicObject = NULL; - delete mpImageMap, mpImageMap = NULL; - delete mpURL, mpURL = NULL; + delete mpGraphicObject, mpGraphicObject = nullptr; + delete mpImageMap, mpImageMap = nullptr; + delete mpURL, mpURL = nullptr; } void GalleryTransferable::CopyToClipboard( vcl::Window* pWindow ) diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx index 696258f3fb79..87bf5ae779a2 100644 --- a/svx/source/gallery2/galobj.cxx +++ b/svx/source/gallery2/galobj.cxx @@ -417,7 +417,7 @@ SgaObjectSvDraw::SgaObjectSvDraw( const FmFormModel& rModel, const INetURLObject SvxGalleryDrawModel::SvxGalleryDrawModel() -: mpFormModel( 0 ) +: mpFormModel( nullptr ) { const OUString sFactoryURL("sdraw"); diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx index 6c8e980499e1..a2ca383c8993 100644 --- a/svx/source/gallery2/galtheme.cxx +++ b/svx/source/gallery2/galtheme.cxx @@ -149,7 +149,7 @@ bool GalleryTheme::ImplWriteSgaObject( const SgaObject& rObj, size_t nPos, Galle SgaObject* GalleryTheme::ImplReadSgaObject( GalleryObject* pEntry ) { - SgaObject* pSgaObj = NULL; + SgaObject* pSgaObj = nullptr; if( pEntry ) { @@ -226,7 +226,7 @@ const GalleryObject* GalleryTheme::ImplGetGalleryObject( const INetURLObject& rU for ( size_t i = 0, n = aObjectList.size(); i < n; ++i ) if ( aObjectList[ i ]->aURL == rURL ) return aObjectList[ i ]; - return NULL; + return nullptr; } INetURLObject GalleryTheme::ImplGetURL( const GalleryObject* pObject ) const @@ -245,7 +245,7 @@ INetURLObject GalleryTheme::ImplCreateUniqueURL( SgaObjKind eObjKind, ConvertDat INetURLObject aInfoFileURL( GetParent()->GetUserURL() ); INetURLObject aNewURL; sal_uInt32 nNextNumber = 1999; - sal_Char const* pExt = NULL; + sal_Char const* pExt = nullptr; bool bExists; aDir.Append( "dragdrop" ); @@ -370,7 +370,7 @@ bool GalleryTheme::InsertObject( const SgaObject& rObj, sal_uIntPtr nInsertPos ) if (!rObj.IsValid()) return false; - GalleryObject* pFoundEntry = NULL; + GalleryObject* pFoundEntry = nullptr; size_t iFoundPos = 0; for (size_t n = aObjectList.size(); iFoundPos < n; ++iFoundPos) { @@ -402,7 +402,7 @@ bool GalleryTheme::InsertObject( const SgaObject& rObj, sal_uIntPtr nInsertPos ) pFoundEntry->nOffset = aNewEntry.nOffset; } else - ImplWriteSgaObject(rObj, nInsertPos, NULL); + ImplWriteSgaObject(rObj, nInsertPos, nullptr); ImplSetModified(true); ImplBroadcast(pFoundEntry? iFoundPos: nInsertPos); @@ -417,7 +417,7 @@ SgaObject* GalleryTheme::AcquireObject( size_t nPos ) void GalleryTheme::GetPreviewBitmapExAndStrings(sal_uIntPtr nPos, BitmapEx& rBitmapEx, Size& rSize, OUString& rTitle, OUString& rPath) const { - const GalleryObject* pGalleryObject = nPos < aObjectList.size() ? aObjectList[ nPos ] : NULL; + const GalleryObject* pGalleryObject = nPos < aObjectList.size() ? aObjectList[ nPos ] : nullptr; if(pGalleryObject) { @@ -434,7 +434,7 @@ void GalleryTheme::GetPreviewBitmapExAndStrings(sal_uIntPtr nPos, BitmapEx& rBit void GalleryTheme::SetPreviewBitmapExAndStrings(sal_uIntPtr nPos, const BitmapEx& rBitmapEx, const Size& rSize, const OUString& rTitle, const OUString& rPath) { - GalleryObject* pGalleryObject = nPos < aObjectList.size() ? aObjectList[ nPos ] : NULL; + GalleryObject* pGalleryObject = nPos < aObjectList.size() ? aObjectList[ nPos ] : nullptr; if(pGalleryObject) { @@ -456,7 +456,7 @@ void GalleryTheme::ReleaseObject( SgaObject* pObject ) bool GalleryTheme::RemoveObject( size_t nPos ) { - GalleryObject* pEntry = NULL; + GalleryObject* pEntry = nullptr; if ( nPos < aObjectList.size() ) { GalleryObjectList::iterator it = aObjectList.begin(); @@ -476,13 +476,13 @@ bool GalleryTheme::RemoveObject( size_t nPos ) Broadcast( GalleryHint( GalleryHintType::CLOSE_OBJECT, GetName(), reinterpret_cast< sal_uIntPtr >( pEntry ) ) ); Broadcast( GalleryHint( GalleryHintType::OBJECT_REMOVED, GetName(), reinterpret_cast< sal_uIntPtr >( pEntry ) ) ); delete pEntry; - pEntry = NULL; + pEntry = nullptr; ImplSetModified( true ); ImplBroadcast( nPos ); } - return( pEntry != NULL ); + return( pEntry != nullptr ); } bool GalleryTheme::ChangeObjectPos( size_t nOldPos, size_t nNewPos ) @@ -692,7 +692,7 @@ GalleryThemeEntry* GalleryTheme::CreateThemeEntry( const INetURLObject& rURL, bo { DBG_ASSERT( rURL.GetProtocol() != INetProtocol::NotValid, "invalid URL" ); - GalleryThemeEntry* pRet = NULL; + GalleryThemeEntry* pRet = nullptr; if( FileExists( rURL ) ) { |