summaryrefslogtreecommitdiff
path: root/svx/source/gallery2
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/gallery2')
-rw-r--r--svx/source/gallery2/galbrws1.cxx2
-rw-r--r--svx/source/gallery2/galbrws2.cxx2
-rw-r--r--svx/source/gallery2/galctrl.cxx6
-rw-r--r--svx/source/gallery2/galexpl.cxx54
-rw-r--r--svx/source/gallery2/gallery1.cxx56
-rw-r--r--svx/source/gallery2/galmisc.cxx40
-rw-r--r--svx/source/gallery2/galtheme.cxx98
7 files changed, 130 insertions, 128 deletions
diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx
index d10332a8ef3a..81632b074947 100644
--- a/svx/source/gallery2/galbrws1.cxx
+++ b/svx/source/gallery2/galbrws1.cxx
@@ -427,7 +427,7 @@ void GalleryBrowser1::ImplExecute( sal_uInt16 nId )
DBG_ASSERT(aDlg, "Dialogdiet fail!");
if( aDlg->Execute() == RET_OK )
- pTheme->SetId( aDlg->GetId(), sal_True );
+ pTheme->SetId( aDlg->GetId(), true );
delete aDlg;
}
}
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx
index 90e735c1acf6..3a148984d4f5 100644
--- a/svx/source/gallery2/galbrws2.cxx
+++ b/svx/source/gallery2/galbrws2.cxx
@@ -603,7 +603,7 @@ sal_Int8 GalleryBrowser2::ExecuteDrop( DropTargetHelper&, const ExecuteDropEvent
if( mpCurTheme->IsDragging() )
mpCurTheme->ChangeObjectPos( mpCurTheme->GetDragPos(), nInsertPos );
else
- nRet = mpCurTheme->InsertTransferable( rEvt.maDropEvent.Transferable, nInsertPos );
+ nRet = mpCurTheme->InsertTransferable( rEvt.maDropEvent.Transferable, nInsertPos ) ? 1 : 0;
}
return nRet;
diff --git a/svx/source/gallery2/galctrl.cxx b/svx/source/gallery2/galctrl.cxx
index 9259f0fe37f6..4c7d32ac961f 100644
--- a/svx/source/gallery2/galctrl.cxx
+++ b/svx/source/gallery2/galctrl.cxx
@@ -102,11 +102,11 @@ void GalleryPreview::DataChanged( const DataChangedEvent& rDCEvt )
Window::DataChanged( rDCEvt );
}
-sal_Bool GalleryPreview::ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangle& rResultRect ) const
+bool GalleryPreview::ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangle& rResultRect ) const
{
const Size aWinSize( GetOutputSizePixel() );
Size aNewSize( LogicToPixel( rGraphic.GetPrefSize(), rGraphic.GetPrefMapMode() ) );
- sal_Bool bRet = sal_False;
+ bool bRet = false;
if( aNewSize.Width() && aNewSize.Height() )
{
@@ -129,7 +129,7 @@ sal_Bool GalleryPreview::ImplGetGraphicCenterRect( const Graphic& rGraphic, Rect
( aWinSize.Height() - aNewSize.Height() ) >> 1 );
rResultRect = Rectangle( aNewPos, aNewSize );
- bRet = sal_True;
+ bRet = true;
}
return bRet;
diff --git a/svx/source/gallery2/galexpl.cxx b/svx/source/gallery2/galexpl.cxx
index a6c0b434d10b..3a3c53be7cfb 100644
--- a/svx/source/gallery2/galexpl.cxx
+++ b/svx/source/gallery2/galexpl.cxx
@@ -52,7 +52,7 @@ bool GalleryExplorer::FillThemeList( std::vector<OUString>& rThemeList )
return !rThemeList.empty();
}
-sal_Bool GalleryExplorer::FillObjList( const OUString& rThemeName, std::vector<OUString> &rObjList )
+bool GalleryExplorer::FillObjList( const OUString& rThemeName, std::vector<OUString> &rObjList )
{
Gallery* pGal = ::Gallery::GetGalleryInstance();
@@ -83,7 +83,7 @@ bool GalleryExplorer::FillObjList( const sal_uInt32 nThemeId, std::vector<OUStri
return FillObjList( pGal->GetThemeName( nThemeId ), rObjList );
}
-sal_Bool GalleryExplorer::FillObjListTitle( const sal_uInt32 nThemeId, std::vector< OUString >& rList )
+bool GalleryExplorer::FillObjListTitle( const sal_uInt32 nThemeId, std::vector< OUString >& rList )
{
Gallery* pGal = ::Gallery::GetGalleryInstance();
if( pGal )
@@ -109,10 +109,10 @@ sal_Bool GalleryExplorer::FillObjListTitle( const sal_uInt32 nThemeId, std::vect
return !rList.empty();
}
-sal_Bool GalleryExplorer::InsertURL( const OUString& rThemeName, const OUString& rURL )
+bool GalleryExplorer::InsertURL( const OUString& rThemeName, const OUString& rURL )
{
Gallery* pGal = ::Gallery::GetGalleryInstance();
- sal_Bool bRet = sal_False;
+ bool bRet = false;
if( pGal )
{
@@ -131,18 +131,18 @@ sal_Bool GalleryExplorer::InsertURL( const OUString& rThemeName, const OUString&
return bRet;
}
-sal_Bool GalleryExplorer::InsertURL( sal_uIntPtr nThemeId, const OUString& rURL )
+bool GalleryExplorer::InsertURL( sal_uIntPtr nThemeId, const OUString& rURL )
{
Gallery* pGal = ::Gallery::GetGalleryInstance();
- return( pGal ? InsertURL( pGal->GetThemeName( nThemeId ), rURL ) : sal_False );
+ return pGal && InsertURL( pGal->GetThemeName( nThemeId ), rURL );
}
-sal_Bool GalleryExplorer::GetGraphicObj( const OUString& rThemeName, sal_uIntPtr nPos,
+bool GalleryExplorer::GetGraphicObj( const OUString& rThemeName, sal_uIntPtr nPos,
Graphic* pGraphic, BitmapEx* pThumb,
- sal_Bool bProgress )
+ bool bProgress )
{
Gallery* pGal = ::Gallery::GetGalleryInstance();
- sal_Bool bRet = sal_False;
+ bool bRet = false;
if( pGal )
{
@@ -164,12 +164,12 @@ sal_Bool GalleryExplorer::GetGraphicObj( const OUString& rThemeName, sal_uIntPtr
return bRet;
}
-sal_Bool GalleryExplorer::GetGraphicObj( sal_uIntPtr nThemeId, sal_uIntPtr nPos,
+bool GalleryExplorer::GetGraphicObj( sal_uIntPtr nThemeId, sal_uIntPtr nPos,
Graphic* pGraphic, BitmapEx* pThumb,
- sal_Bool bProgress )
+ bool bProgress )
{
Gallery* pGal = ::Gallery::GetGalleryInstance();
- return( pGal ? GetGraphicObj( pGal->GetThemeName( nThemeId ), nPos, pGraphic, pThumb, bProgress ) : sal_False );
+ return pGal && GetGraphicObj( pGal->GetThemeName( nThemeId ), nPos, pGraphic, pThumb, bProgress );
}
sal_uIntPtr GalleryExplorer::GetSdrObjCount( const OUString& rThemeName )
@@ -201,11 +201,11 @@ sal_uIntPtr GalleryExplorer::GetSdrObjCount( sal_uIntPtr nThemeId )
return( pGal ? GetSdrObjCount( pGal->GetThemeName( nThemeId ) ) : sal_False );
}
-sal_Bool GalleryExplorer::GetSdrObj( const OUString& rThemeName, sal_uIntPtr nSdrModelPos,
+bool GalleryExplorer::GetSdrObj( const OUString& rThemeName, sal_uIntPtr nSdrModelPos,
SdrModel* pModel, BitmapEx* pThumb )
{
Gallery* pGal = ::Gallery::GetGalleryInstance();
- sal_Bool bRet = sal_False;
+ bool bRet = false;
if( pGal )
{
@@ -221,7 +221,7 @@ sal_Bool GalleryExplorer::GetSdrObj( const OUString& rThemeName, sal_uIntPtr nSd
if( nActPos++ == nSdrModelPos )
{
if( pModel )
- bRet = bRet || pTheme->GetModel( i, *pModel, sal_False );
+ bRet = bRet || pTheme->GetModel( i, *pModel, false );
if( pThumb )
bRet = bRet || pTheme->GetThumb( i, *pThumb );
@@ -236,17 +236,17 @@ sal_Bool GalleryExplorer::GetSdrObj( const OUString& rThemeName, sal_uIntPtr nSd
return bRet;
}
-sal_Bool GalleryExplorer::GetSdrObj( sal_uIntPtr nThemeId, sal_uIntPtr nSdrModelPos,
+bool GalleryExplorer::GetSdrObj( sal_uIntPtr nThemeId, sal_uIntPtr nSdrModelPos,
SdrModel* pModel, BitmapEx* pThumb )
{
Gallery* pGal = ::Gallery::GetGalleryInstance();
- return( pGal ? GetSdrObj( pGal->GetThemeName( nThemeId ), nSdrModelPos, pModel, pThumb ) : sal_False );
+ return pGal && GetSdrObj( pGal->GetThemeName( nThemeId ), nSdrModelPos, pModel, pThumb );
}
-sal_Bool GalleryExplorer::BeginLocking( const OUString& rThemeName )
+bool GalleryExplorer::BeginLocking( const OUString& rThemeName )
{
Gallery* pGal = ::Gallery::GetGalleryInstance();
- sal_Bool bRet = sal_False;
+ bool bRet = false;
if( pGal )
{
@@ -255,23 +255,23 @@ sal_Bool GalleryExplorer::BeginLocking( const OUString& rThemeName )
if( pTheme )
{
pTheme->LockTheme();
- bRet = sal_True;
+ bRet = true;
}
}
return bRet;
}
-sal_Bool GalleryExplorer::BeginLocking( sal_uIntPtr nThemeId )
+bool GalleryExplorer::BeginLocking( sal_uIntPtr nThemeId )
{
Gallery* pGal = ::Gallery::GetGalleryInstance();
- return( pGal ? BeginLocking( pGal->GetThemeName( nThemeId ) ) : sal_False );
+ return pGal && BeginLocking( pGal->GetThemeName( nThemeId ) );
}
-sal_Bool GalleryExplorer::EndLocking( const OUString& rThemeName )
+bool GalleryExplorer::EndLocking( const OUString& rThemeName )
{
Gallery* pGal = ::Gallery::GetGalleryInstance();
- sal_Bool bRet = sal_False;
+ bool bRet = false;
if( pGal )
{
@@ -289,7 +289,7 @@ sal_Bool GalleryExplorer::EndLocking( const OUString& rThemeName )
{
// release locked theme
pGal->ReleaseTheme( pTheme, theLockListener::get() );
- bRet = sal_True;
+ bRet = true;
}
}
}
@@ -297,10 +297,10 @@ sal_Bool GalleryExplorer::EndLocking( const OUString& rThemeName )
return bRet;
}
-sal_Bool GalleryExplorer::EndLocking( sal_uIntPtr nThemeId )
+bool GalleryExplorer::EndLocking( sal_uIntPtr nThemeId )
{
Gallery* pGal = ::Gallery::GetGalleryInstance();
- return( pGal ? EndLocking( pGal->GetThemeName( nThemeId ) ) : sal_False );
+ return pGal && EndLocking( pGal->GetThemeName( nThemeId ) );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx
index d250c6fa0d59..b28a02653403 100644
--- a/svx/source/gallery2/gallery1.cxx
+++ b/svx/source/gallery2/gallery1.cxx
@@ -51,10 +51,10 @@ static bool FileExists( const INetURLObject &rURL, const rtl::OUString &rExt )
GalleryThemeEntry::GalleryThemeEntry( bool bCreateUniqueURL,
const INetURLObject& rBaseURL, const OUString& rName,
- sal_Bool _bReadOnly, sal_Bool _bNewFile,
- sal_uInt32 _nId, sal_Bool _bThemeNameFromResource ) :
- nId ( _nId ),
- bReadOnly ( _bReadOnly ),
+ bool _bReadOnly, bool _bNewFile,
+ sal_uInt32 _nId, bool _bThemeNameFromResource ) :
+ nId ( _nId ),
+ bReadOnly ( _bReadOnly ),
bThemeNameFromResource ( _bThemeNameFromResource )
{
INetURLObject aURL( rBaseURL );
@@ -123,15 +123,15 @@ void GalleryThemeEntry::SetName( const OUString& rNewName )
if( aName != rNewName )
{
aName = rNewName;
- SetModified( sal_True );
- bThemeNameFromResource = sal_False;
+ SetModified( true );
+ bThemeNameFromResource = false;
}
}
-void GalleryThemeEntry::SetId( sal_uInt32 nNewId, sal_Bool bResetThemeName )
+void GalleryThemeEntry::SetId( sal_uInt32 nNewId, bool bResetThemeName )
{
nId = nNewId;
- SetModified( sal_True );
+ SetModified( true );
bThemeNameFromResource = ( nId && bResetThemeName );
}
@@ -158,7 +158,7 @@ public:
Gallery::Gallery( const OUString& rMultiPath )
: nReadTextEncoding ( osl_getThreadTextEncoding() )
-, bMultiPath ( sal_False )
+, bMultiPath ( false )
{
ImplLoad( rMultiPath );
}
@@ -190,7 +190,7 @@ Gallery* Gallery::GetGalleryInstance()
void Gallery::ImplLoad( const OUString& rMultiPath )
{
const sal_Int32 nTokenCount = comphelper::string::getTokenCount(rMultiPath, ';');
- sal_Bool bIsReadOnlyDir;
+ bool bIsReadOnlyDir;
bMultiPath = ( nTokenCount > 0 );
@@ -221,9 +221,9 @@ void Gallery::ImplLoad( const OUString& rMultiPath )
DBG_ASSERT( aRelURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
}
-void Gallery::ImplLoadSubDirs( const INetURLObject& rBaseURL, sal_Bool& rbDirIsReadOnly )
+void Gallery::ImplLoadSubDirs( const INetURLObject& rBaseURL, bool& rbDirIsReadOnly )
{
- rbDirIsReadOnly = sal_False;
+ rbDirIsReadOnly = false;
try
{
@@ -249,13 +249,13 @@ void Gallery::ImplLoadSubDirs( const INetURLObject& rBaseURL, sal_Bool& rbDirIsR
pTestStm->WriteInt32( sal_Int32(1) );
if( pTestStm->GetError() )
- rbDirIsReadOnly = sal_True;
+ rbDirIsReadOnly = true;
delete pTestStm;
KillFile( aTestURL );
}
else
- rbDirIsReadOnly = sal_True;
+ rbDirIsReadOnly = true;
}
catch( const ucb::ContentCreationException& )
{
@@ -499,14 +499,14 @@ OUString Gallery::GetThemeName( sal_uIntPtr nThemeId ) const
return( pFound ? pFound->GetThemeName() : OUString() );
}
-sal_Bool Gallery::HasTheme( const OUString& rThemeName )
+bool Gallery::HasTheme( const OUString& rThemeName )
{
return( ImplGetThemeEntry( rThemeName ) != NULL );
}
-sal_Bool Gallery::CreateTheme( const OUString& rThemeName )
+bool Gallery::CreateTheme( const OUString& rThemeName )
{
- sal_Bool bRet = sal_False;
+ bool bRet = false;
if( !HasTheme( rThemeName ) && ( GetUserURL().GetProtocol() != INET_PROT_NOT_VALID ) )
{
@@ -514,21 +514,21 @@ sal_Bool Gallery::CreateTheme( const OUString& rThemeName )
aURL.Append( rThemeName );
GalleryThemeEntry* pNewEntry = new GalleryThemeEntry(
true, aURL, rThemeName,
- sal_False, sal_True, 0, sal_False );
+ false, true, 0, false );
aThemeList.push_back( pNewEntry );
delete( new GalleryTheme( this, pNewEntry ) );
Broadcast( GalleryHint( GALLERY_HINT_THEME_CREATED, rThemeName ) );
- bRet = sal_True;
+ bRet = true;
}
return bRet;
}
-sal_Bool Gallery::RenameTheme( const OUString& rOldName, const OUString& rNewName )
+bool Gallery::RenameTheme( const OUString& rOldName, const OUString& rNewName )
{
GalleryThemeEntry* pThemeEntry = ImplGetThemeEntry( rOldName );
- sal_Bool bRet = sal_False;
+ bool bRet = false;
// check if the new theme name is already present
if( pThemeEntry && !HasTheme( rNewName ) && !pThemeEntry->IsReadOnly() )
@@ -545,17 +545,17 @@ sal_Bool Gallery::RenameTheme( const OUString& rOldName, const OUString& rNewNam
Broadcast( GalleryHint( GALLERY_HINT_THEME_RENAMED, aOldName, pThm->GetName() ) );
ReleaseTheme( pThm, aListener );
- bRet = sal_True;
+ bRet = true;
}
}
return bRet;
}
-sal_Bool Gallery::RemoveTheme( const OUString& rThemeName )
+bool Gallery::RemoveTheme( const OUString& rThemeName )
{
GalleryThemeEntry* pThemeEntry = ImplGetThemeEntry( rThemeName );
- sal_Bool bRet = sal_False;
+ bool bRet = false;
if( pThemeEntry && !pThemeEntry->IsReadOnly() )
{
@@ -590,7 +590,7 @@ sal_Bool Gallery::RemoveTheme( const OUString& rThemeName )
Broadcast( GalleryHint( GALLERY_HINT_THEME_REMOVED, rThemeName ) );
- bRet = sal_True;
+ bRet = true;
}
return bRet;
@@ -678,7 +678,9 @@ void Gallery::ReleaseTheme( GalleryTheme* pTheme, SfxListener& rListener )
}
}
-sal_Bool GalleryThemeEntry::IsDefault() const
-{ return( ( nId > 0 ) && ( nId != ( RID_GALLERYSTR_THEME_MYTHEME - RID_GALLERYSTR_THEME_START ) ) ); }
+bool GalleryThemeEntry::IsDefault() const
+{
+ return ( nId > 0 ) && ( nId != ( RID_GALLERYSTR_THEME_MYTHEME - RID_GALLERYSTR_THEME_START ) );
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/gallery2/galmisc.cxx b/svx/source/gallery2/galmisc.cxx
index 13fa614a7136..0721035749ec 100644
--- a/svx/source/gallery2/galmisc.cxx
+++ b/svx/source/gallery2/galmisc.cxx
@@ -83,7 +83,7 @@ IMPL_LINK( SgaUserDataFactory, MakeUserData, SdrObjFactory*, pObjFactory )
}
sal_uInt16 GalleryGraphicImport( const INetURLObject& rURL, Graphic& rGraphic,
- OUString& rFilterName, sal_Bool bShowProgress )
+ OUString& rFilterName, bool bShowProgress )
{
sal_uInt16 nRet = SGA_IMPORT_NONE;
SfxMedium aMedium( rURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ );
@@ -110,10 +110,10 @@ sal_uInt16 GalleryGraphicImport( const INetURLObject& rURL, Graphic& rGraphic,
return nRet;
}
-sal_Bool GallerySvDrawImport( SvStream& rIStm, SdrModel& rModel )
+bool GallerySvDrawImport( SvStream& rIStm, SdrModel& rModel )
{
sal_uInt32 nVersion;
- sal_Bool bRet = sal_False;
+ bool bRet = false;
if( GalleryCodec::IsCoded( rIStm, nVersion ) )
{
@@ -154,9 +154,9 @@ sal_Bool GallerySvDrawImport( SvStream& rIStm, SdrModel& rModel )
return bRet;
}
-sal_Bool CreateIMapGraphic( const FmFormModel& rModel, Graphic& rGraphic, ImageMap& rImageMap )
+bool CreateIMapGraphic( const FmFormModel& rModel, Graphic& rGraphic, ImageMap& rImageMap )
{
- sal_Bool bRet = sal_False;
+ bool bRet = false;
if ( rModel.GetPageCount() )
{
@@ -176,7 +176,7 @@ sal_Bool CreateIMapGraphic( const FmFormModel& rModel, Graphic& rGraphic, ImageM
{
rGraphic = ( (SdrGrafObj*) pObj )->GetGraphic();
rImageMap = ( (SgaIMapInfo*) pUserData )->GetImageMap();
- bRet = sal_True;
+ bRet = true;
break;
}
}
@@ -237,9 +237,9 @@ OUString GetSvDrawStreamNameFromURL( const INetURLObject& rSvDrawObjURL )
return aRet;
}
-sal_Bool FileExists( const INetURLObject& rURL )
+bool FileExists( const INetURLObject& rURL )
{
- sal_Bool bRet = sal_False;
+ bool bRet = false;
if( rURL.GetProtocol() != INET_PROT_NOT_VALID )
{
@@ -265,9 +265,9 @@ sal_Bool FileExists( const INetURLObject& rURL )
return bRet;
}
-sal_Bool CreateDir( const INetURLObject& rURL )
+bool CreateDir( const INetURLObject& rURL )
{
- sal_Bool bRet = FileExists( rURL );
+ bool bRet = FileExists( rURL );
if( !bRet )
{
@@ -300,9 +300,9 @@ sal_Bool CreateDir( const INetURLObject& rURL )
return bRet;
}
-sal_Bool CopyFile( const INetURLObject& rSrcURL, const INetURLObject& rDstURL )
+bool CopyFile( const INetURLObject& rSrcURL, const INetURLObject& rDstURL )
{
- sal_Bool bRet = sal_False;
+ bool bRet = false;
try
{
@@ -311,7 +311,7 @@ sal_Bool CopyFile( const INetURLObject& rSrcURL, const INetURLObject& rDstURL )
aDestPath.executeCommand( OUString("transfer"),
uno::makeAny( ucb::TransferInfo( sal_False, rSrcURL.GetMainURL( INetURLObject::NO_DECODE ),
rDstURL.GetName(), ucb::NameClash::OVERWRITE ) ) );
- bRet = sal_True;
+ bRet = true;
}
catch( const ucb::ContentCreationException& )
{
@@ -326,9 +326,9 @@ sal_Bool CopyFile( const INetURLObject& rSrcURL, const INetURLObject& rDstURL )
return bRet;
}
-sal_Bool KillFile( const INetURLObject& rURL )
+bool KillFile( const INetURLObject& rURL )
{
- sal_Bool bRet = FileExists( rURL );
+ bool bRet = FileExists( rURL );
if( bRet )
{
@@ -339,15 +339,15 @@ sal_Bool KillFile( const INetURLObject& rURL )
}
catch( const ucb::ContentCreationException& )
{
- bRet = sal_False;
+ bRet = false;
}
catch( const uno::RuntimeException& )
{
- bRet = sal_False;
+ bRet = false;
}
catch( const uno::Exception& )
{
- bRet = sal_False;
+ bRet = false;
}
}
@@ -559,7 +559,7 @@ sal_Bool GalleryTransferable::WriteObject( SotStorageStreamRef& rxOStm, void* pU
void GalleryTransferable::DragFinished( sal_Int8 nDropAction )
{
- mpTheme->SetDragging( sal_False );
+ mpTheme->SetDragging( false );
mpTheme->SetDragPos( 0 );
if ( nDropAction )
{
@@ -589,7 +589,7 @@ void GalleryTransferable::StartDrag( Window* pWindow, sal_Int8 nDragSourceAction
if( mpTheme->GetURL( mnObjectPos, aURL ) && ( aURL.GetProtocol() != INET_PROT_NOT_VALID ) )
{
- mpTheme->SetDragging( sal_True );
+ mpTheme->SetDragging( true );
mpTheme->SetDragPos( mnObjectPos );
TransferableHelper::StartDrag( pWindow, nDragSourceActions, nDragPointer, nDragImage );
}
diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx
index 68f6decd282f..900f935daeae 100644
--- a/svx/source/gallery2/galtheme.cxx
+++ b/svx/source/gallery2/galtheme.cxx
@@ -66,7 +66,7 @@ GalleryTheme::GalleryTheme( Gallery* pGallery, GalleryThemeEntry* pThemeEntry )
mnThemeLockCount ( 0 ),
mnBroadcasterLockCount( 0 ),
nDragPos ( 0 ),
- bDragging ( sal_False )
+ bDragging ( false )
{
ImplCreateSvDrawStorage();
@@ -95,10 +95,10 @@ void GalleryTheme::ImplCreateSvDrawStorage()
aSvDrawStorageRef = new SvStorage( false, GetSdvURL().GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ );
}
-sal_Bool GalleryTheme::ImplWriteSgaObject( const SgaObject& rObj, size_t nPos, GalleryObject* pExistentEntry )
+bool GalleryTheme::ImplWriteSgaObject( const SgaObject& rObj, size_t nPos, GalleryObject* pExistentEntry )
{
SvStream* pOStm = ::utl::UcbStreamHelper::CreateStream( GetSdgURL().GetMainURL( INetURLObject::NO_DECODE ), STREAM_WRITE );
- sal_Bool bRet = sal_False;
+ bool bRet = false;
if( pOStm )
{
@@ -128,7 +128,7 @@ sal_Bool GalleryTheme::ImplWriteSgaObject( const SgaObject& rObj, size_t nPos, G
pEntry->aURL = rObj.GetURL();
pEntry->nOffset = nOffset;
pEntry->eObjKind = rObj.GetObjKind();
- bRet = sal_True;
+ bRet = true;
}
delete pOStm;
@@ -208,7 +208,7 @@ void GalleryTheme::ImplWrite()
delete pOStm;
}
- ImplSetModified( sal_False );
+ ImplSetModified( false );
}
}
}
@@ -334,16 +334,16 @@ void GalleryTheme::ImplBroadcast( sal_uIntPtr nUpdatePos )
}
}
-sal_Bool GalleryTheme::UnlockTheme()
+bool GalleryTheme::UnlockTheme()
{
DBG_ASSERT( mnThemeLockCount, "Theme is not locked" );
- sal_Bool bRet = sal_False;
+ bool bRet = false;
if( mnThemeLockCount )
{
--mnThemeLockCount;
- bRet = sal_True;
+ bRet = true;
}
return bRet;
@@ -472,7 +472,7 @@ bool GalleryTheme::RemoveObject( size_t nPos )
Broadcast( GalleryHint( GALLERY_HINT_OBJECT_REMOVED, GetName(), reinterpret_cast< sal_uIntPtr >( pEntry ) ) );
delete pEntry;
- ImplSetModified( sal_True );
+ ImplSetModified( true );
ImplBroadcast( nPos );
}
@@ -516,7 +516,7 @@ void GalleryTheme::Actualize( const Link& rActualizeLink, GalleryProgress* pProg
const size_t nCount = aObjectList.size();
LockBroadcaster();
- bAbortActualize = sal_False;
+ bAbortActualize = false;
// reset delete flag
for (size_t i = 0; i < nCount; i++)
@@ -675,13 +675,13 @@ void GalleryTheme::Actualize( const Link& rActualizeLink, GalleryProgress* pProg
}
KillFile( aTmpURL );
- ImplSetModified( sal_True );
+ ImplSetModified( true );
ImplWrite();
UnlockBroadcaster();
}
}
-GalleryThemeEntry* GalleryTheme::CreateThemeEntry( const INetURLObject& rURL, sal_Bool bReadOnly )
+GalleryThemeEntry* GalleryTheme::CreateThemeEntry( const INetURLObject& rURL, bool bReadOnly )
{
DBG_ASSERT( rURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
@@ -744,7 +744,7 @@ GalleryThemeEntry* GalleryTheme::CreateThemeEntry( const INetURLObject& rURL, sa
INetURLObject aPathURL( rURL );
pRet = new GalleryThemeEntry( false, aPathURL, aThemeName,
- bReadOnly, sal_False, nThemeId,
+ bReadOnly, false, nThemeId,
bThemeNameFromResource );
}
@@ -755,25 +755,25 @@ GalleryThemeEntry* GalleryTheme::CreateThemeEntry( const INetURLObject& rURL, sa
return pRet;
}
-sal_Bool GalleryTheme::GetThumb( sal_uIntPtr nPos, BitmapEx& rBmp, sal_Bool )
+bool GalleryTheme::GetThumb( sal_uIntPtr nPos, BitmapEx& rBmp, bool )
{
SgaObject* pObj = AcquireObject( nPos );
- sal_Bool bRet = sal_False;
+ bool bRet = false;
if( pObj )
{
rBmp = pObj->GetThumbBmp();
ReleaseObject( pObj );
- bRet = sal_True;
+ bRet = true;
}
return bRet;
}
-sal_Bool GalleryTheme::GetGraphic( sal_uIntPtr nPos, Graphic& rGraphic, sal_Bool bProgress )
+bool GalleryTheme::GetGraphic( sal_uIntPtr nPos, Graphic& rGraphic, bool bProgress )
{
const GalleryObject* pObject = ImplGetGalleryObject( nPos );
- sal_Bool bRet = sal_False;
+ bool bRet = false;
if( pObject )
{
@@ -801,7 +801,7 @@ sal_Bool GalleryTheme::GetGraphic( sal_uIntPtr nPos, Graphic& rGraphic, sal_Bool
ImageMap aIMap;
if( CreateIMapGraphic( *aModel.GetModel(), rGraphic, aIMap ) )
- bRet = sal_True;
+ bRet = true;
else
{
VirtualDevice aVDev;
@@ -812,7 +812,7 @@ sal_Bool GalleryTheme::GetGraphic( sal_uIntPtr nPos, Graphic& rGraphic, sal_Bool
aView.ShowSdrPage(aView.GetModel()->GetPage(0));
aView.MarkAll();
rGraphic = aView.GetAllMarkedGraphic();
- bRet = sal_True;
+ bRet = true;
}
}
}
@@ -830,7 +830,7 @@ sal_Bool GalleryTheme::GetGraphic( sal_uIntPtr nPos, Graphic& rGraphic, sal_Bool
//aBmp.Replace( COL_LIGHTMAGENTA, COL_WHITE );
//rGraphic = aBmp;
ReleaseObject( pObj );
- bRet = sal_True;
+ bRet = true;
}
}
break;
@@ -843,9 +843,9 @@ sal_Bool GalleryTheme::GetGraphic( sal_uIntPtr nPos, Graphic& rGraphic, sal_Bool
return bRet;
}
-sal_Bool GalleryTheme::InsertGraphic( const Graphic& rGraphic, sal_uIntPtr nInsertPos )
+bool GalleryTheme::InsertGraphic( const Graphic& rGraphic, sal_uIntPtr nInsertPos )
{
- sal_Bool bRet = sal_False;
+ bool bRet = false;
if( rGraphic.GetType() != GRAPHIC_NONE )
{
@@ -925,10 +925,10 @@ sal_Bool GalleryTheme::InsertGraphic( const Graphic& rGraphic, sal_uIntPtr nInse
return bRet;
}
-sal_Bool GalleryTheme::GetModel( sal_uIntPtr nPos, SdrModel& rModel, sal_Bool )
+bool GalleryTheme::GetModel( sal_uIntPtr nPos, SdrModel& rModel, bool )
{
const GalleryObject* pObject = ImplGetGalleryObject( nPos );
- sal_Bool bRet = sal_False;
+ bool bRet = false;
if( pObject && ( SGA_OBJ_SVDRAW == pObject->eObjKind ) )
{
@@ -952,11 +952,11 @@ sal_Bool GalleryTheme::GetModel( sal_uIntPtr nPos, SdrModel& rModel, sal_Bool )
return bRet;
}
-sal_Bool GalleryTheme::InsertModel( const FmFormModel& rModel, sal_uIntPtr nInsertPos )
+bool GalleryTheme::InsertModel( const FmFormModel& rModel, sal_uIntPtr nInsertPos )
{
INetURLObject aURL( ImplCreateUniqueURL( SGA_OBJ_SVDRAW ) );
SvStorageRef xStor( GetSvDrawStorage() );
- sal_Bool bRet = sal_False;
+ bool bRet = false;
if( xStor.Is() )
{
@@ -997,10 +997,10 @@ sal_Bool GalleryTheme::InsertModel( const FmFormModel& rModel, sal_uIntPtr nInse
return bRet;
}
-sal_Bool GalleryTheme::GetModelStream( sal_uIntPtr nPos, SotStorageStreamRef& rxModelStream, sal_Bool )
+bool GalleryTheme::GetModelStream( sal_uIntPtr nPos, SotStorageStreamRef& rxModelStream, bool )
{
const GalleryObject* pObject = ImplGetGalleryObject( nPos );
- sal_Bool bRet = sal_False;
+ bool bRet = false;
if( pObject && ( SGA_OBJ_SVDRAW == pObject->eObjKind ) )
{
@@ -1048,11 +1048,11 @@ sal_Bool GalleryTheme::GetModelStream( sal_uIntPtr nPos, SotStorageStreamRef& rx
return bRet;
}
-sal_Bool GalleryTheme::InsertModelStream( const SotStorageStreamRef& rxModelStream, sal_uIntPtr nInsertPos )
+bool GalleryTheme::InsertModelStream( const SotStorageStreamRef& rxModelStream, sal_uIntPtr nInsertPos )
{
INetURLObject aURL( ImplCreateUniqueURL( SGA_OBJ_SVDRAW ) );
SvStorageRef xStor( GetSvDrawStorage() );
- sal_Bool bRet = sal_False;
+ bool bRet = false;
if( xStor.Is() )
{
@@ -1082,27 +1082,27 @@ sal_Bool GalleryTheme::InsertModelStream( const SotStorageStreamRef& rxModelStre
return bRet;
}
-sal_Bool GalleryTheme::GetURL( sal_uIntPtr nPos, INetURLObject& rURL, sal_Bool )
+bool GalleryTheme::GetURL( sal_uIntPtr nPos, INetURLObject& rURL, bool )
{
const GalleryObject* pObject = ImplGetGalleryObject( nPos );
- sal_Bool bRet = sal_False;
+ bool bRet = false;
if( pObject )
{
rURL = INetURLObject( ImplGetURL( pObject ) );
- bRet = sal_True;
+ bRet = true;
}
return bRet;
}
-sal_Bool GalleryTheme::InsertURL( const INetURLObject& rURL, sal_uIntPtr nInsertPos )
+bool GalleryTheme::InsertURL( const INetURLObject& rURL, sal_uIntPtr nInsertPos )
{
Graphic aGraphic;
OUString aFormat;
SgaObject* pNewObj = NULL;
const sal_uInt16 nImportRet = GalleryGraphicImport( rURL, aGraphic, aFormat );
- sal_Bool bRet = sal_False;
+ bool bRet = false;
if( nImportRet != SGA_IMPORT_NONE )
{
@@ -1117,18 +1117,18 @@ sal_Bool GalleryTheme::InsertURL( const INetURLObject& rURL, sal_uIntPtr nInsert
pNewObj = (SgaObject*) new SgaObjectSound( rURL );
if( pNewObj && InsertObject( *pNewObj, nInsertPos ) )
- bRet = sal_True;
+ bRet = true;
delete pNewObj;
return bRet;
}
-sal_Bool GalleryTheme::InsertFileOrDirURL( const INetURLObject& rFileOrDirURL, sal_uIntPtr nInsertPos )
+bool GalleryTheme::InsertFileOrDirURL( const INetURLObject& rFileOrDirURL, sal_uIntPtr nInsertPos )
{
INetURLObject aURL;
::std::vector< INetURLObject > aURLVector;
- sal_Bool bRet = sal_False;
+ bool bRet = false;
try
{
@@ -1173,9 +1173,9 @@ sal_Bool GalleryTheme::InsertFileOrDirURL( const INetURLObject& rFileOrDirURL, s
return bRet;
}
-sal_Bool GalleryTheme::InsertTransferable( const uno::Reference< datatransfer::XTransferable >& rxTransferable, sal_uIntPtr nInsertPos )
+bool GalleryTheme::InsertTransferable( const uno::Reference< datatransfer::XTransferable >& rxTransferable, sal_uIntPtr nInsertPos )
{
- sal_Bool bRet = sal_False;
+ bool bRet = false;
if( rxTransferable.is() )
{
@@ -1241,7 +1241,7 @@ sal_Bool GalleryTheme::InsertTransferable( const uno::Reference< datatransfer::X
if( pGraphic )
{
- bRet = sal_False;
+ bRet = false;
if( aDataHelper.HasFormat( SOT_FORMATSTR_ID_SVIM ) )
{
@@ -1509,7 +1509,7 @@ SvStream& GalleryTheme::ReadData( SvStream& rIStm )
else
rIStm.SetError( SVSTREAM_READ_ERROR );
- ImplSetModified( sal_False );
+ ImplSetModified( false );
return rIStm;
}
@@ -1524,7 +1524,7 @@ SvStream& ReadGalleryTheme( SvStream& rIn, GalleryTheme& rTheme )
return rTheme.ReadData( rIn );
}
-void GalleryTheme::ImplSetModified( sal_Bool bModified )
+void GalleryTheme::ImplSetModified( bool bModified )
{ pThm->SetModified( bModified ); }
const OUString& GalleryTheme::GetRealName() const { return pThm->GetThemeName(); }
@@ -1532,11 +1532,11 @@ const INetURLObject& GalleryTheme::GetThmURL() const { return pThm->GetThmURL();
const INetURLObject& GalleryTheme::GetSdgURL() const { return pThm->GetSdgURL(); }
const INetURLObject& GalleryTheme::GetSdvURL() const { return pThm->GetSdvURL(); }
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::IsReadOnly() const { return pThm->IsReadOnly(); }
-sal_Bool GalleryTheme::IsDefault() const { return pThm->IsDefault(); }
-sal_Bool GalleryTheme::IsModified() const { return pThm->IsModified(); }
+void GalleryTheme::SetId( sal_uInt32 nNewId, bool bResetThemeName ) { pThm->SetId( nNewId, bResetThemeName ); }
+bool GalleryTheme::IsThemeNameFromResource() const { return pThm->IsNameFromResource(); }
+bool GalleryTheme::IsReadOnly() const { return pThm->IsReadOnly(); }
+bool GalleryTheme::IsDefault() const { return pThm->IsDefault(); }
+bool GalleryTheme::IsModified() const { return pThm->IsModified(); }
const OUString& GalleryTheme::GetName() const { return pThm->GetThemeName(); }
void GalleryTheme::InsertAllThemes( ListBox& rListBox )