diff options
-rw-r--r-- | dbaccess/source/ui/browser/unodatbr.cxx | 2 | ||||
-rw-r--r-- | include/svx/galctrl.hxx | 4 | ||||
-rw-r--r-- | include/svx/gallery.hxx | 32 | ||||
-rw-r--r-- | include/svx/gallery1.hxx | 38 | ||||
-rw-r--r-- | include/svx/galmisc.hxx | 14 | ||||
-rw-r--r-- | include/svx/galtheme.hxx | 60 | ||||
-rw-r--r-- | include/svx/graphctl.hxx | 18 | ||||
-rw-r--r-- | include/svx/gridctrl.hxx | 108 | ||||
-rw-r--r-- | svx/source/dialog/_contdlg.cxx | 6 | ||||
-rw-r--r-- | svx/source/dialog/contwnd.cxx | 2 | ||||
-rw-r--r-- | svx/source/dialog/graphctl.cxx | 20 | ||||
-rw-r--r-- | svx/source/dialog/imapdlg.cxx | 4 | ||||
-rw-r--r-- | svx/source/fmcomp/fmgridcl.cxx | 18 | ||||
-rw-r--r-- | svx/source/fmcomp/fmgridif.cxx | 4 | ||||
-rw-r--r-- | svx/source/fmcomp/gridctrl.cxx | 206 | ||||
-rw-r--r-- | svx/source/gallery2/galbrws1.cxx | 2 | ||||
-rw-r--r-- | svx/source/gallery2/galbrws2.cxx | 2 | ||||
-rw-r--r-- | svx/source/gallery2/galctrl.cxx | 6 | ||||
-rw-r--r-- | svx/source/gallery2/galexpl.cxx | 54 | ||||
-rw-r--r-- | svx/source/gallery2/gallery1.cxx | 56 | ||||
-rw-r--r-- | svx/source/gallery2/galmisc.cxx | 40 | ||||
-rw-r--r-- | svx/source/gallery2/galtheme.cxx | 98 |
22 files changed, 398 insertions, 396 deletions
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index 2a332e24e450..c4a6c0ad38db 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -577,7 +577,7 @@ void SbaTableQueryBrowser::initializePreviewMode() { getBrowserView()->getVclControl()->AlwaysEnableInput( false ); getBrowserView()->getVclControl()->EnableInput( false ); - getBrowserView()->getVclControl()->ForceHideScrollbars( sal_True ); + getBrowserView()->getVclControl()->ForceHideScrollbars( true ); } Reference< XPropertySet > xDataSourceSet(getRowSet(), UNO_QUERY); if ( xDataSourceSet.is() ) diff --git a/include/svx/galctrl.hxx b/include/svx/galctrl.hxx index 36bd381a0d9a..686173137b6b 100644 --- a/include/svx/galctrl.hxx +++ b/include/svx/galctrl.hxx @@ -48,8 +48,8 @@ private: Rectangle aPreviewRect; GalleryTheme* mpTheme; - SVX_DLLPRIVATE sal_Bool ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangle& rResultRect ) const; - SVX_DLLPRIVATE void InitSettings(); + SVX_DLLPRIVATE bool ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangle& rResultRect ) const; + SVX_DLLPRIVATE void InitSettings(); // Window SVX_DLLPRIVATE virtual void Paint(const Rectangle& rRect); diff --git a/include/svx/gallery.hxx b/include/svx/gallery.hxx index 830d64c0f333..95d48d01ab5d 100644 --- a/include/svx/gallery.hxx +++ b/include/svx/gallery.hxx @@ -53,35 +53,35 @@ public: static bool FillThemeList( std::vector<OUString>& rThemeList ); // FillObjList is filling rObjList with Strings of the internal Gallery Object URL - static sal_Bool FillObjList( const OUString& rThemeName, std::vector<OUString> &rObjList ); + static bool FillObjList( const OUString& rThemeName, std::vector<OUString> &rObjList ); static bool FillObjList( const sal_uInt32 nThemeId, std::vector<OUString> &rObjList ); // FillObjTitleList is filling the rList with the title for each gallery object - static sal_Bool FillObjListTitle( const sal_uInt32 nThemeId, std::vector< OUString >& rList ); + static bool FillObjListTitle( const sal_uInt32 nThemeId, std::vector< OUString >& rList ); - static sal_Bool InsertURL( const OUString& rThemeName, const OUString& rURL ); - static sal_Bool InsertURL( sal_uIntPtr nThemeId, const OUString& rURL ); + static bool InsertURL( const OUString& rThemeName, const OUString& rURL ); + static bool InsertURL( sal_uIntPtr nThemeId, const OUString& rURL ); - static sal_Bool GetGraphicObj( const OUString& rThemeName, sal_uIntPtr nPos, + static bool GetGraphicObj( const OUString& rThemeName, sal_uIntPtr nPos, Graphic* pGraphic = NULL, BitmapEx* pThumb = NULL, - sal_Bool bProgess = sal_False ); - static sal_Bool GetGraphicObj( sal_uIntPtr nThemeId, sal_uIntPtr nPos, + bool bProgess = false ); + static bool GetGraphicObj( sal_uIntPtr nThemeId, sal_uIntPtr nPos, Graphic* pGraphic = NULL, BitmapEx* pThumb = NULL, - sal_Bool bProgess = sal_False ); + bool bProgess = false ); - static sal_uIntPtr GetSdrObjCount( const OUString& rThemeName ); - static sal_uIntPtr GetSdrObjCount( sal_uIntPtr nThemeId ); + static sal_uIntPtr GetSdrObjCount( const OUString& rThemeName ); + static sal_uIntPtr GetSdrObjCount( sal_uIntPtr nThemeId ); - static sal_Bool GetSdrObj( const OUString& rThemeName, sal_uIntPtr nSdrModelPos, + static bool GetSdrObj( const OUString& rThemeName, sal_uIntPtr nSdrModelPos, SdrModel* pModel = NULL, BitmapEx* pThumb = NULL ); - static sal_Bool GetSdrObj( sal_uIntPtr nThemeId, sal_uIntPtr nSdrModelPos, + static bool GetSdrObj( sal_uIntPtr nThemeId, sal_uIntPtr nSdrModelPos, SdrModel* pModel = NULL, BitmapEx* pThumb = NULL ); - static sal_Bool BeginLocking( const OUString& rThemeName ); - static sal_Bool BeginLocking( sal_uIntPtr nThemeId ); + static bool BeginLocking( const OUString& rThemeName ); + static bool BeginLocking( sal_uIntPtr nThemeId ); - static sal_Bool EndLocking( const OUString& rThemeName ); - static sal_Bool EndLocking( sal_uIntPtr nThemeId ); + static bool EndLocking( const OUString& rThemeName ); + static bool EndLocking( sal_uIntPtr nThemeId ); }; #endif // INCLUDED_SVX_GALLERY_HXX diff --git a/include/svx/gallery1.hxx b/include/svx/gallery1.hxx index 74ce015345e6..f60ee4089604 100644 --- a/include/svx/gallery1.hxx +++ b/include/svx/gallery1.hxx @@ -44,9 +44,9 @@ private: INetURLObject aSdvURL; INetURLObject aStrURL; sal_uInt32 nId; - sal_Bool bReadOnly; - sal_Bool bModified; - sal_Bool bThemeNameFromResource; + bool bReadOnly; + bool bModified; + bool bThemeNameFromResource; GalleryThemeEntry(); INetURLObject ImplGetURLIgnoreCase( const INetURLObject& rURL ) const; @@ -56,8 +56,8 @@ public: GalleryThemeEntry( bool bCreateUniqueURL, const INetURLObject& rBaseURL, const OUString& rName, - sal_Bool bReadOnly, sal_Bool bNewFile, - sal_uInt32 nId, sal_Bool bThemeNameFromResource ); + bool bReadOnly, bool bNewFile, + sal_uInt32 nId, bool bThemeNameFromResource ); ~GalleryThemeEntry() {}; const OUString& GetThemeName() const { return aName; } @@ -69,19 +69,19 @@ public: OUString ReadStrFromIni(const OUString &aKeyName ); - sal_Bool IsReadOnly() const { return bReadOnly; } - sal_Bool IsDefault() const; + bool IsReadOnly() const { return bReadOnly; } + bool IsDefault() const; - sal_Bool IsHidden() const { return aName.match("private://gallery/hidden/"); } + bool IsHidden() const { return aName.match("private://gallery/hidden/"); } - sal_Bool IsModified() const { return bModified; } - void SetModified( sal_Bool bSet ) { bModified = ( bSet && !IsReadOnly() ); } + bool IsModified() const { return bModified; } + void SetModified( bool bSet ) { bModified = ( bSet && !IsReadOnly() ); } void SetName( const OUString& rNewName ); - sal_Bool IsNameFromResource() const { return bThemeNameFromResource; } + bool IsNameFromResource() const { return bThemeNameFromResource; } sal_uInt32 GetId() const { return nId; } - void SetId( sal_uInt32 nNewId, sal_Bool bResetThemeName ); + void SetId( sal_uInt32 nNewId, bool bResetThemeName ); }; typedef ::std::vector< GalleryThemeEntry* > GalleryThemeList; @@ -109,10 +109,10 @@ private: INetURLObject aRelURL; INetURLObject aUserURL; rtl_TextEncoding nReadTextEncoding; - sal_Bool bMultiPath; + bool bMultiPath; void ImplLoad( const OUString& rMultiPath ); - void ImplLoadSubDirs( const INetURLObject& rBaseURL, sal_Bool& rbIsReadOnly ); + void ImplLoadSubDirs( const INetURLObject& rBaseURL, bool& rbIsReadOnly ); SVX_DLLPUBLIC GalleryThemeEntry* ImplGetThemeEntry( const OUString& rThemeName ); GalleryThemeEntry* ImplGetThemeEntry( sal_uIntPtr nThemeId ); @@ -132,12 +132,12 @@ public: { return nPos < aThemeList.size() ? aThemeList[ nPos ] : NULL; } const GalleryThemeEntry* GetThemeInfo( const OUString& rThemeName ) { return ImplGetThemeEntry( rThemeName ); } - SVX_DLLPUBLIC sal_Bool HasTheme( const OUString& rThemeName ); + SVX_DLLPUBLIC bool HasTheme( const OUString& rThemeName ); OUString GetThemeName( sal_uIntPtr nThemeId ) const; - SVX_DLLPUBLIC sal_Bool CreateTheme( const OUString& rThemeName ); - sal_Bool RenameTheme( const OUString& rOldName, const OUString& rNewName ); - SVX_DLLPUBLIC sal_Bool RemoveTheme( const OUString& rThemeName ); + SVX_DLLPUBLIC bool CreateTheme( const OUString& rThemeName ); + bool RenameTheme( const OUString& rOldName, const OUString& rNewName ); + SVX_DLLPUBLIC bool RemoveTheme( const OUString& rThemeName ); SVX_DLLPUBLIC GalleryTheme* AcquireTheme( const OUString& rThemeName, SfxListener& rListener ); SVX_DLLPUBLIC void ReleaseTheme( GalleryTheme* pTheme, SfxListener& rListener ); @@ -147,7 +147,7 @@ public: const INetURLObject& GetUserURL() const { return aUserURL; } const INetURLObject& GetRelativeURL() const { return aRelURL; } - sal_Bool IsMultiPath() const { return bMultiPath; } + bool IsMultiPath() const { return bMultiPath; } }; #endif // INCLUDED_SVX_GALLERY1_HXX diff --git a/include/svx/galmisc.hxx b/include/svx/galmisc.hxx index 5716f77a4e24..9526ecb94a9e 100644 --- a/include/svx/galmisc.hxx +++ b/include/svx/galmisc.hxx @@ -86,17 +86,17 @@ class Gallery; SVX_DLLPUBLIC ResMgr* GetGalleryResMgr(); -sal_uInt16 GalleryGraphicImport( const INetURLObject& rURL, Graphic& rGraphic, OUString& rFilterName, sal_Bool bShowProgress = sal_False ); -sal_Bool GallerySvDrawImport( SvStream& rIStm, SdrModel& rModel ); -sal_Bool CreateIMapGraphic( const FmFormModel& rModel, Graphic& rGraphic, ImageMap& rImageMap ); +sal_uInt16 GalleryGraphicImport( const INetURLObject& rURL, Graphic& rGraphic, OUString& rFilterName, bool bShowProgress = false ); +bool GallerySvDrawImport( SvStream& rIStm, SdrModel& rModel ); +bool CreateIMapGraphic( const FmFormModel& rModel, Graphic& rGraphic, ImageMap& rImageMap ); SVX_DLLPUBLIC OUString GetReducedString( const INetURLObject& rURL, sal_Int32 nMaxLen ); OUString GetSvDrawStreamNameFromURL( const INetURLObject& rSvDrawObjURL ); -sal_Bool FileExists( const INetURLObject& rURL ); -sal_Bool CreateDir( const INetURLObject& rURL ); -sal_Bool CopyFile( const INetURLObject& rSrcURL, const INetURLObject& rDstURL ); -sal_Bool KillFile( const INetURLObject& rURL ); +bool FileExists( const INetURLObject& rURL ); +bool CreateDir( const INetURLObject& rURL ); +bool CopyFile( const INetURLObject& rSrcURL, const INetURLObject& rDstURL ); +bool KillFile( const INetURLObject& rURL ); BitmapEx GalleryResGetBitmapEx( sal_uInt32 nId ); class SgaIMapInfo : public SdrObjUserData, public SfxListener diff --git a/include/svx/galtheme.hxx b/include/svx/galtheme.hxx index 9e40cb4f94f5..a842b79f2da3 100644 --- a/include/svx/galtheme.hxx +++ b/include/svx/galtheme.hxx @@ -101,15 +101,15 @@ private: SotStorageRef aSvDrawStorageRef; Gallery* pParent; GalleryThemeEntry* pThm; - sal_uIntPtr mnThemeLockCount; - sal_uIntPtr mnBroadcasterLockCount; - sal_uIntPtr nDragPos; - sal_Bool bDragging; - sal_Bool bAbortActualize; + sal_uIntPtr mnThemeLockCount; + sal_uIntPtr mnBroadcasterLockCount; + sal_uIntPtr nDragPos; + bool bDragging; + bool bAbortActualize; void ImplCreateSvDrawStorage(); SVX_DLLPUBLIC SgaObject* ImplReadSgaObject( GalleryObject* pEntry ); - sal_Bool ImplWriteSgaObject( const SgaObject& rObj, size_t nPos, GalleryObject* pExistentEntry ); + bool ImplWriteSgaObject( const SgaObject& rObj, size_t nPos, GalleryObject* pExistentEntry ); void ImplWrite(); const GalleryObject* ImplGetGalleryObject( size_t nPos ) const { return ( nPos < aObjectList.size() ) ? aObjectList[ nPos ] : NULL; } @@ -124,7 +124,7 @@ private: } INetURLObject ImplGetURL( const GalleryObject* pObject ) const; INetURLObject ImplCreateUniqueURL( SgaObjKind eObjKind, sal_uIntPtr nFormat = CVT_UNKNOWN ); - void ImplSetModified( sal_Bool bModified ); + void ImplSetModified( bool bModified ); void ImplBroadcast( sal_uIntPtr nUpdatePos ); GalleryTheme(); @@ -133,7 +133,7 @@ private: public: - static GalleryThemeEntry* CreateThemeEntry( const INetURLObject& rURL, sal_Bool bReadOnly ); + static GalleryThemeEntry* CreateThemeEntry( const INetURLObject& rURL, bool bReadOnly ); size_t GetObjectCount() const { return aObjectList.size(); } @@ -156,30 +156,30 @@ public: SVX_DLLPUBLIC const INetURLObject& GetSdgURL() const; const INetURLObject& GetSdvURL() const; - SVX_DLLPUBLIC sal_uInt32 GetId() const; - void SetId( sal_uInt32 nNewId, sal_Bool bResetThemeName ); + SVX_DLLPUBLIC sal_uInt32 GetId() const; + void SetId( sal_uInt32 nNewId, bool bResetThemeName ); - void SetDragging( sal_Bool bSet ) { bDragging = bSet; } - sal_Bool IsDragging() const { return bDragging; } + void SetDragging( bool bSet ) { bDragging = bSet; } + bool IsDragging() const { return bDragging; } void LockTheme() { ++mnThemeLockCount; } - sal_Bool UnlockTheme(); + bool UnlockTheme(); void LockBroadcaster() { mnBroadcasterLockCount++; } SVX_DLLPUBLIC void UnlockBroadcaster( sal_uIntPtr nUpdatePos = 0 ); - sal_Bool IsBroadcasterLocked() const { return mnBroadcasterLockCount > 0; } + bool IsBroadcasterLocked() const { return mnBroadcasterLockCount > 0; } void SetDragPos( sal_uIntPtr nPos ) { nDragPos = nPos; } sal_uIntPtr GetDragPos() const { return nDragPos; } - sal_Bool IsThemeNameFromResource() const; + bool IsThemeNameFromResource() const; - SVX_DLLPUBLIC sal_Bool IsReadOnly() const; - SVX_DLLPUBLIC sal_Bool IsDefault() const; - sal_Bool IsModified() const; + SVX_DLLPUBLIC bool IsReadOnly() const; + SVX_DLLPUBLIC bool IsDefault() const; + bool IsModified() const; SVX_DLLPUBLIC void Actualize( const Link& rActualizeLink, GalleryProgress* pProgress = NULL ); - void AbortActualize() { bAbortActualize = sal_True; } + void AbortActualize() { bAbortActualize = true; } Gallery* GetParent() const { return pParent; } SotStorageRef GetSvDrawStorage() const { return aSvDrawStorageRef; } @@ -199,22 +199,22 @@ public: return ImplGetGalleryObject( nPos )->aURL; } - sal_Bool GetThumb( sal_uIntPtr nPos, BitmapEx& rBmp, sal_Bool bProgress = sal_False ); + bool GetThumb( sal_uIntPtr nPos, BitmapEx& rBmp, bool bProgress = false ); - SVX_DLLPUBLIC sal_Bool GetGraphic( sal_uIntPtr nPos, Graphic& rGraphic, sal_Bool bProgress = sal_False ); - SVX_DLLPUBLIC sal_Bool InsertGraphic( const Graphic& rGraphic, sal_uIntPtr nInsertPos = CONTAINER_APPEND ); + SVX_DLLPUBLIC bool GetGraphic( sal_uIntPtr nPos, Graphic& rGraphic, bool bProgress = false ); + SVX_DLLPUBLIC bool InsertGraphic( const Graphic& rGraphic, sal_uIntPtr nInsertPos = CONTAINER_APPEND ); - SVX_DLLPUBLIC sal_Bool GetModel( sal_uIntPtr nPos, SdrModel& rModel, sal_Bool bProgress = sal_False ); - SVX_DLLPUBLIC sal_Bool InsertModel( const FmFormModel& rModel, sal_uIntPtr nInsertPos = CONTAINER_APPEND ); + SVX_DLLPUBLIC bool GetModel( sal_uIntPtr nPos, SdrModel& rModel, bool bProgress = false ); + SVX_DLLPUBLIC bool InsertModel( const FmFormModel& rModel, sal_uIntPtr nInsertPos = CONTAINER_APPEND ); - sal_Bool GetModelStream( sal_uIntPtr nPos, SotStorageStreamRef& rModelStreamRef, sal_Bool bProgress = sal_False ); - sal_Bool InsertModelStream( const SotStorageStreamRef& rModelStream, sal_uIntPtr nInsertPos = CONTAINER_APPEND ); + bool GetModelStream( sal_uIntPtr nPos, SotStorageStreamRef& rModelStreamRef, bool bProgress = false ); + bool InsertModelStream( const SotStorageStreamRef& rModelStream, sal_uIntPtr nInsertPos = CONTAINER_APPEND ); - sal_Bool GetURL( sal_uIntPtr nPos, INetURLObject& rURL, sal_Bool bProgress = sal_False ); - SVX_DLLPUBLIC sal_Bool InsertURL( const INetURLObject& rURL, sal_uIntPtr nInsertPos = CONTAINER_APPEND ); - sal_Bool InsertFileOrDirURL( const INetURLObject& rFileOrDirURL, sal_uIntPtr nInsertPos = CONTAINER_APPEND ); + bool GetURL( sal_uIntPtr nPos, INetURLObject& rURL, bool bProgress = false ); + SVX_DLLPUBLIC bool InsertURL( const INetURLObject& rURL, sal_uIntPtr nInsertPos = CONTAINER_APPEND ); + bool InsertFileOrDirURL( const INetURLObject& rFileOrDirURL, sal_uIntPtr nInsertPos = CONTAINER_APPEND ); - sal_Bool InsertTransferable( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rxTransferable, sal_uIntPtr nInsertPos ); + bool InsertTransferable( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rxTransferable, sal_uIntPtr nInsertPos ); void CopyToClipboard( Window* pWindow, sal_uIntPtr nPos ); void StartDrag( Window* pWindow, sal_uIntPtr nPos ); diff --git a/include/svx/graphctl.hxx b/include/svx/graphctl.hxx index ee183bbb8dd8..41d214e7f349 100644 --- a/include/svx/graphctl.hxx +++ b/include/svx/graphctl.hxx @@ -49,10 +49,10 @@ class SVX_DLLPUBLIC GraphCtrl : public Control GraphCtrlUserCall* pUserCall; WinBits nWinStyle; SdrObjKind eObjKind; - sal_uInt16 nPolyEdit; - sal_Bool bEditMode; - sal_Bool bSdrMode; - sal_Bool bAnim; + sal_uInt16 nPolyEdit; + bool bEditMode; + bool bSdrMode; + bool bAnim; DECL_LINK( UpdateHdl, Timer* ); @@ -87,17 +87,17 @@ public: void SetWinStyle( WinBits nWinBits ); WinBits GetWinStyle() const { return nWinStyle; } - void SetGraphic( const Graphic& rGraphic, sal_Bool bNewModel = sal_True ); + void SetGraphic( const Graphic& rGraphic, bool bNewModel = true ); const Graphic& GetGraphic() const { return aGraphic; } const Size& GetGraphicSize() const { return aGraphSize; } const Point& GetMousePos() const { return aMousePos; } - void SetEditMode( const sal_Bool bEditMode ); - sal_Bool IsEditMode() const { return bEditMode; } + void SetEditMode( const bool bEditMode ); + bool IsEditMode() const { return bEditMode; } void SetPolyEditMode( const sal_uInt16 nPolyEdit ); - sal_uInt16 GetPolyEditMode() const { return nPolyEdit; } + sal_uInt16 GetPolyEditMode() const { return nPolyEdit; } void SetObjKind( const SdrObjKind eObjKind ); SdrObjKind GetObjKind() const { return eObjKind; } @@ -105,7 +105,7 @@ public: SdrModel* GetSdrModel() const { return pModel; } SdrView* GetSdrView() const { return pView; } SdrObject* GetSelectedSdrObject() const; - sal_Bool IsChanged() const { return bSdrMode ? pModel->IsChanged() : sal_False; } + bool IsChanged() const { return bSdrMode ? pModel->IsChanged() : sal_False; } void SetMousePosLink( const Link& rLink ) { aMousePosLink = rLink; } const Link& GetMousePosLink() const { return aMousePosLink; } diff --git a/include/svx/gridctrl.hxx b/include/svx/gridctrl.hxx index d534eff00e0d..7fb5626f9698 100644 --- a/include/svx/gridctrl.hxx +++ b/include/svx/gridctrl.hxx @@ -41,7 +41,7 @@ class DbGridControl; class CursorWrapper; -sal_Bool CompareBookmark(const ::com::sun::star::uno::Any& aLeft, const ::com::sun::star::uno::Any& aRight); +bool CompareBookmark(const ::com::sun::star::uno::Any& aLeft, const ::com::sun::star::uno::Any& aRight); namespace svxform { @@ -66,28 +66,28 @@ class DbGridRow : public SvRefBase ::com::sun::star::uno::Any m_aBookmark; // ::com::sun::star::text::Bookmark of the row, can be set DbDataColumns m_aVariants; GridRowStatus m_eStatus; - sal_Bool m_bIsNew; + bool m_bIsNew; // row is no longer valid // is removed on the next positioning public: - DbGridRow():m_eStatus(GRS_CLEAN), m_bIsNew(sal_True) { } - DbGridRow(CursorWrapper* pCur, sal_Bool bPaintCursor); - void SetState(CursorWrapper* pCur, sal_Bool bPaintCursor); + DbGridRow():m_eStatus(GRS_CLEAN), m_bIsNew(true) { } + DbGridRow(CursorWrapper* pCur, bool bPaintCursor); + void SetState(CursorWrapper* pCur, bool bPaintCursor); ~DbGridRow(); - sal_Bool HasField(sal_uInt32 nPos) const { return nPos < m_aVariants.size(); } + bool HasField(sal_uInt32 nPos) const { return nPos < m_aVariants.size(); } const ::svxform::DataColumn& GetField(sal_uInt32 nPos) const { return *m_aVariants[ nPos ]; } void SetStatus(GridRowStatus _eStat) { m_eStatus = _eStat; } GridRowStatus GetStatus() const { return m_eStatus; } - void SetNew(sal_Bool _bNew) { m_bIsNew = _bNew; } - sal_Bool IsNew() const { return m_bIsNew; } + void SetNew(bool _bNew) { m_bIsNew = _bNew; } + bool IsNew() const { return m_bIsNew; } const ::com::sun::star::uno::Any& GetBookmark() const { return m_aBookmark; } - sal_Bool IsValid() const { return m_eStatus == GRS_CLEAN || m_eStatus == GRS_MODIFIED; } - sal_Bool IsModified() const { return m_eStatus == GRS_MODIFIED; } + bool IsValid() const { return m_eStatus == GRS_CLEAN || m_eStatus == GRS_MODIFIED; } + bool IsModified() const { return m_eStatus == GRS_MODIFIED; } }; SV_DECL_REF(DbGridRow) @@ -164,7 +164,7 @@ public: sal_uInt16 m_nDefaultWidth; sal_Int32 m_nCurrentPos; - sal_Bool m_bPositioning; // protect PositionDataSource against recursion + bool m_bPositioning; // protect PositionDataSource against recursion public: // StatusIds for Controls of the Bar @@ -185,10 +185,10 @@ public: NavigationBar(Window* pParent, WinBits nStyle = 0); // Status methods for Controls - void InvalidateAll(sal_Int32 nCurrentPos = -1, sal_Bool bAll = sal_False); + void InvalidateAll(sal_Int32 nCurrentPos = -1, bool bAll = false); void InvalidateState(sal_uInt16 nWhich) {SetState(nWhich);} void SetState(sal_uInt16 nWhich); - sal_Bool GetState(sal_uInt16 nWhich) const; + bool GetState(sal_uInt16 nWhich) const; sal_uInt16 GetDefaultWidth() const {return m_nDefaultWidth;} protected: @@ -278,25 +278,25 @@ private: sal_uInt16 m_nOptionMask; // the mask of options to be enabled in setDataSource // (with respect to the data source capabilities) // defaults to (insert | update | delete) - sal_uInt16 m_nLastColId; + sal_uInt16 m_nLastColId; long m_nLastRowId; - sal_Bool m_bDesignMode : 1; // default = sal_False - sal_Bool m_bRecordCountFinal : 1; - sal_Bool m_bMultiSelection : 1; - sal_Bool m_bNavigationBar : 1; + bool m_bDesignMode : 1; // default = sal_False + bool m_bRecordCountFinal : 1; + bool m_bMultiSelection : 1; + bool m_bNavigationBar : 1; - sal_Bool m_bSynchDisplay : 1; - sal_Bool m_bForceROController : 1; - sal_Bool m_bHandle : 1; - sal_Bool m_bFilterMode : 1; - sal_Bool m_bWantDestruction : 1; - sal_Bool m_bInAdjustDataSource : 1; - sal_Bool m_bPendingAdjustRows : 1; // if an async adjust is pending, is it for AdjustRows or AdjustDataSource ? - sal_Bool m_bHideScrollbars : 1; + bool m_bSynchDisplay : 1; + bool m_bForceROController : 1; + bool m_bHandle : 1; + bool m_bFilterMode : 1; + bool m_bWantDestruction : 1; + bool m_bInAdjustDataSource : 1; + bool m_bPendingAdjustRows : 1; // if an async adjust is pending, is it for AdjustRows or AdjustDataSource ? + bool m_bHideScrollbars : 1; protected: - sal_Bool m_bUpdating : 1; // are any updates being executed right now? + bool m_bUpdating : 1; // are any updates being executed right now? protected: virtual sal_Bool SeekRow(long nRow); @@ -385,7 +385,7 @@ public: */ virtual OUString GetCellText(long _nRow, sal_uInt16 _nColId) const; - void RemoveRows(sal_Bool bNewCursor); + void RemoveRows(bool bNewCursor); void InvalidateStatus(); @@ -400,8 +400,8 @@ public: CursorWrapper* getDataSource() const {return m_pDataCursor;} const DbGridColumns& GetColumns() const {return m_aColumns;} - void EnableHandle(sal_Bool bEnable); - sal_Bool HasHandle() const {return m_bHandle;} + void EnableHandle(bool bEnable); + bool HasHandle() const {return m_bHandle;} void InsertHandleColumn(); // which position does the column with the id in the ::com::sun::star::sdbcx::View have, the handle column doesn't count @@ -420,15 +420,15 @@ public: sal_uInt16 GetColumnIdFromModelPos( sal_uInt16 nPos ) const; virtual void SetDesignMode(bool bMode); - sal_Bool IsDesignMode() const {return m_bDesignMode;} - sal_Bool IsOpen() const {return m_pSeekCursor != NULL;} + bool IsDesignMode() const {return m_bDesignMode;} + bool IsOpen() const {return m_pSeekCursor != NULL;} - virtual void SetFilterMode(sal_Bool bMode); - sal_Bool IsFilterMode() const {return m_bFilterMode;} - sal_Bool IsFilterRow(long nRow) const {return m_bFilterMode && nRow == 0;} + virtual void SetFilterMode(bool bMode); + bool IsFilterMode() const {return m_bFilterMode;} + bool IsFilterRow(long nRow) const {return m_bFilterMode && nRow == 0;} - void EnableNavigationBar(sal_Bool bEnable); - sal_Bool HasNavigationBar() const {return m_bNavigationBar;} + void EnableNavigationBar(bool bEnable); + bool HasNavigationBar() const {return m_bNavigationBar;} sal_uInt16 GetOptions() const {return m_nOptions;} NavigationBar& GetNavigationBar() {return m_aBar;} @@ -451,23 +451,23 @@ public: // moved from the outside. // the flag indicates if an adjustment of the row count should be // done as well - void AdjustDataSource(sal_Bool bFull = sal_False); + void AdjustDataSource(bool bFull = false); void Undo(); virtual void BeginCursorAction(); virtual void EndCursorAction(); // is the current line being updated - sal_Bool IsUpdating() const {return m_bUpdating;} + bool IsUpdating() const {return m_bUpdating;} - virtual void RowRemoved( long nRow, long nNumRows = 1, sal_Bool bDoPaint = sal_True ); - virtual void RowInserted( long nRow, long nNumRows = 1, sal_Bool bDoPaint = sal_True, sal_Bool bKeepSelection = sal_False ); + virtual void RowRemoved( long nRow, long nNumRows = 1, bool bDoPaint = true ); + virtual void RowInserted( long nRow, long nNumRows = 1, bool bDoPaint = true, bool bKeepSelection = false ); virtual void RowModified( long nRow, sal_uInt16 nColId = USHRT_MAX ); void resetCurrentRow(); - sal_Bool getDisplaySynchron() const { return m_bSynchDisplay; } - void setDisplaySynchron(sal_Bool bSync); + bool getDisplaySynchron() const { return m_bSynchDisplay; } + void setDisplaySynchron(bool bSync); // when set to sal_False, the display is no longer in sync with the current cursor position // (means that in AdjustDataSource we are jumping to a row not belonging to CursorPosition) // when using this, you should know what you are doing, because for example entering data @@ -485,8 +485,8 @@ public: // analogous : if this link is set, all nav-bar slots will be routed through it when executed // if the handler returns nonzero, no further handling of the slot occurs - void EnablePermanentCursor(sal_Bool bEnable); - sal_Bool IsPermanentCursorEnabled() const; + void EnablePermanentCursor(bool bEnable); + bool IsPermanentCursorEnabled() const; /** forces both scrollbars to be hidden @@ -494,13 +494,13 @@ public: bar <b>always</b> implies a horizontal scroll bar @seealso EnableNavigationBar */ - void ForceHideScrollbars( sal_Bool _bForce ); + void ForceHideScrollbars( bool _bForce ); ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > getContext() const { return m_xContext; } /// returns <TRUE/> if the text of the given cell can be copied into the clipboard - sal_Bool canCopyCellText(sal_Int32 _nRow, sal_Int16 _nColId); + bool canCopyCellText(sal_Int32 _nRow, sal_Int16 _nColId); /// copies the text of the given cell into the clipboard void copyCellText(sal_Int32 _nRow, sal_Int16 _nColId); @@ -550,22 +550,22 @@ public: CreateAccessibleCell( sal_Int32 nRow, sal_uInt16 nColumnId ); protected: - void RecalcRows(long nNewTopRow, sal_uInt16 nLinesOnScreen, sal_Bool bUpdateCursor); - sal_Bool SeekCursor(long nRow, sal_Bool bAbsolute = sal_False); + void RecalcRows(long nNewTopRow, sal_uInt16 nLinesOnScreen, bool bUpdateCursor); + bool SeekCursor(long nRow, bool bAbsolute = false); void RemoveColumns(); // cleaning of own structures void AdjustRows(); sal_Int32 AlignSeekCursor(); - sal_Bool SetCurrent(long nNewRow); + bool SetCurrent(long nNewRow); OUString GetCurrentRowCellText(DbGridColumn* pCol,const DbGridRowRef& _rRow) const; virtual void DeleteSelectedRows(); - sal_Bool IsValid(const DbGridRowRef& _xRow) const {return _xRow && _xRow->IsValid();} + bool IsValid(const DbGridRowRef& _xRow) const {return _xRow && _xRow->IsValid();} // row which is currently being appended - sal_Bool IsCurrentAppending() const; + bool IsCurrentAppending() const; // empty row for insertion - sal_Bool IsInsertionRow(long nRow) const; + bool IsInsertionRow(long nRow) const; void SetSeekPos(sal_Int32 nPos) {m_nSeekPos = nPos;} sal_Int32 GetCurrentPos() const {return m_nCurrentPos;} @@ -581,7 +581,7 @@ protected: void ConnectToFields(); void DisconnectFromFields(); - void implAdjustInSolarThread(sal_Bool _bRows); + void implAdjustInSolarThread(bool _bRows); // calls AdjustRows or AdjustDataSource, synchron if the caller is running in the solar thread, else asynchron protected: diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx index 8a1fb17830bd..9095ce0c1a8f 100644 --- a/svx/source/dialog/_contdlg.cxx +++ b/svx/source/dialog/_contdlg.cxx @@ -454,7 +454,7 @@ IMPL_LINK( SvxSuperContourDlg, Tbx1ClickHdl, ToolBox*, pTbx ) case( TBI_SELECT ): { pTbx->CheckItem( nNewItemId, true ); - aContourWnd.SetEditMode( sal_True ); + aContourWnd.SetEditMode( true ); } break; @@ -509,7 +509,7 @@ IMPL_LINK( SvxSuperContourDlg, Tbx1ClickHdl, ToolBox*, pTbx ) aRedoGraphic = aGraphic; aGraphic = aUndoGraphic; aUndoGraphic = Graphic(); - aContourWnd.SetGraphic( aGraphic, sal_False ); + aContourWnd.SetGraphic( aGraphic, false ); } break; @@ -519,7 +519,7 @@ IMPL_LINK( SvxSuperContourDlg, Tbx1ClickHdl, ToolBox*, pTbx ) aUndoGraphic = aGraphic; aGraphic = aRedoGraphic; aRedoGraphic = Graphic(); - aContourWnd.SetGraphic( aGraphic, sal_False ); + aContourWnd.SetGraphic( aGraphic, false ); } break; diff --git a/svx/source/dialog/contwnd.cxx b/svx/source/dialog/contwnd.cxx index e562116030d5..ab9b980452e2 100644 --- a/svx/source/dialog/contwnd.cxx +++ b/svx/source/dialog/contwnd.cxx @@ -152,7 +152,7 @@ void ContourWindow::MouseButtonDown( const MouseEvent& rMEvt ) SetPolyPolygon( PolyPolygon() ); aWorkRect = Rectangle( aLogPt, aLogPt ); Paint( Rectangle( Point(), GetGraphicSize() ) ); - SetEditMode( sal_True ); + SetEditMode( true ); } if ( !bPipetteMode ) diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx index d4c61d63715a..d0a769ba58c9 100644 --- a/svx/source/dialog/graphctl.cxx +++ b/svx/source/dialog/graphctl.cxx @@ -61,9 +61,9 @@ GraphCtrl::GraphCtrl( Window* pParent, const ResId& rResId ) : nWinStyle ( 0 ), eObjKind ( OBJ_NONE ), nPolyEdit ( 0 ), - bEditMode ( sal_False ), - bSdrMode ( sal_False ), - bAnim ( sal_False ), + bEditMode ( false ), + bSdrMode ( false ), + bAnim ( false ), mpAccContext ( NULL ), pModel ( NULL ), pView ( NULL ) @@ -81,9 +81,9 @@ GraphCtrl::GraphCtrl( Window* pParent, WinBits nStyle ) : nWinStyle ( 0 ), eObjKind ( OBJ_NONE ), nPolyEdit ( 0 ), - bEditMode ( sal_False ), - bSdrMode ( sal_False ), - bAnim ( sal_False ), + bEditMode ( false ), + bSdrMode ( false ), + bAnim ( false ), mpAccContext ( NULL ), pModel ( NULL ), pView ( NULL ) @@ -179,7 +179,7 @@ void GraphCtrl::InitSdrModel() mpAccContext->setModelAndView (pModel, pView); } -void GraphCtrl::SetGraphic( const Graphic& rGraphic, sal_Bool bNewModel ) +void GraphCtrl::SetGraphic( const Graphic& rGraphic, bool bNewModel ) { // If possible we dither bitmaps for the display if ( !bAnim && ( rGraphic.GetType() == GRAPHIC_BITMAP ) ) @@ -718,7 +718,7 @@ SdrObject* GraphCtrl::GetSelectedSdrObject() const return pSdrObj; } -void GraphCtrl::SetEditMode( const sal_Bool _bEditMode ) +void GraphCtrl::SetEditMode( const bool _bEditMode ) { if ( bSdrMode ) { @@ -728,7 +728,7 @@ void GraphCtrl::SetEditMode( const sal_Bool _bEditMode ) pView->SetCurrentObj( sal::static_int_cast< sal_uInt16 >( eObjKind ) ); } else - bEditMode = sal_False; + bEditMode = false; } void GraphCtrl::SetPolyEditMode( const sal_uInt16 _nPolyEdit ) @@ -746,7 +746,7 @@ void GraphCtrl::SetObjKind( const SdrObjKind _eObjKind ) { if ( bSdrMode ) { - bEditMode = sal_False; + bEditMode = false; pView->SetEditMode( bEditMode ); eObjKind = _eObjKind; pView->SetCurrentObj( sal::static_int_cast< sal_uInt16 >( eObjKind ) ); diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx index 1f78f78116df..e0c8971f5d68 100644 --- a/svx/source/dialog/imapdlg.cxx +++ b/svx/source/dialog/imapdlg.cxx @@ -348,7 +348,7 @@ IMPL_LINK( SvxIMapDlg, TbxClickHdl, ToolBox*, pTbx ) case( TBI_SELECT ): { pTbx->CheckItem( nNewItemId, true ); - pIMapWnd->SetEditMode( sal_True ); + pIMapWnd->SetEditMode( true ); if( pTbx->IsKeyEvent() ) { if((pTbx->GetKeyModifier() & KEY_MOD1) != 0) @@ -737,7 +737,7 @@ IMPL_LINK_NOARG(SvxIMapDlg, UpdateHdl) // After changes => default selection aTbxIMapDlg1.CheckItem( TBI_SELECT, true ); - pIMapWnd->SetEditMode( sal_True ); + pIMapWnd->SetEditMode( true ); } // Delete the copied list again in the Update method diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx index 61cdb3be6a3a..b425b7b70b1a 100644 --- a/svx/source/fmcomp/fmgridcl.cxx +++ b/svx/source/fmcomp/fmgridcl.cxx @@ -1045,7 +1045,7 @@ void FmGridControl::propertyChange(const ::com::sun::star::beans::PropertyChange if (evt.PropertyName == FM_PROP_ROWCOUNT) { // if we're not in the main thread call AdjustRows asynchronously - implAdjustInSolarThread(sal_True); + implAdjustInSolarThread(true); return; } @@ -1169,7 +1169,7 @@ void FmGridControl::DeleteSelectedRows() OSL_FAIL("Exception caught while deleting rows!"); } // An den DatenCursor anpassen - AdjustDataSource(sal_True); + AdjustDataSource(true); EndCursorAction(); SetUpdateMode(sal_True); } @@ -1201,7 +1201,7 @@ void FmGridControl::DeleteSelectedRows() // there is a next row to position on if (SeekCursor(nIdx)) { - GetSeekRow()->SetState(m_pSeekCursor, sal_True); + GetSeekRow()->SetState(m_pSeekCursor, true); bNewPos = sal_True; // if it's not the row for inserting we keep the bookmark @@ -1215,7 +1215,7 @@ void FmGridControl::DeleteSelectedRows() nIdx = FirstSelectedRow() - 1; if (nIdx >= 0 && SeekCursor(nIdx)) { - GetSeekRow()->SetState(m_pSeekCursor, sal_True); + GetSeekRow()->SetState(m_pSeekCursor, true); bNewPos = sal_True; aBookmark = m_pSeekCursor->getBookmark(); @@ -1318,7 +1318,7 @@ void FmGridControl::DeleteSelectedRows() } // An den DatenCursor anpassen - AdjustDataSource(sal_True); + AdjustDataSource(true); // es konnten nicht alle Zeilen geloescht werden // da nie nicht geloeschten wieder selektieren @@ -1382,7 +1382,7 @@ void FmGridControl::positioned(const ::com::sun::star::lang::EventObject& /*rEve { SAL_INFO("svx.fmcmop", "FmGridControl::positioned"); // position on the data source (force it to be done in the main thread) - implAdjustInSolarThread(sal_False); + implAdjustInSolarThread(false); } sal_Bool FmGridControl::commit() @@ -1407,8 +1407,8 @@ void FmGridControl::inserted(const ::com::sun::star::lang::EventObject& /*rEvent return; // Zeile ist eingefuegt worden, dann den status und mode zuruecksetzen - xRow->SetState(m_pDataCursor, sal_False); - xRow->SetNew(sal_False); + xRow->SetState(m_pDataCursor, false); + xRow->SetNew(false); } @@ -1832,7 +1832,7 @@ Sequence< Any> FmGridControl::getSelectionBookmarks() // Zunaechst den DatenCursor auf den selektierten Satz pos. if (SeekCursor(nIdx)) { - GetSeekRow()->SetState(m_pSeekCursor, sal_True); + GetSeekRow()->SetState(m_pSeekCursor, true); pBookmarks[i] = m_pSeekCursor->getBookmark(); } diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx index 29c7a8a662a4..65ddd98f37f3 100644 --- a/svx/source/fmcomp/fmgridif.cxx +++ b/svx/source/fmcomp/fmgridif.cxx @@ -2418,10 +2418,10 @@ void FmXGridPeer::setMode(const OUString& Mode) throw( NoSupportException, Runti FmGridControl* pGrid = (FmGridControl*) GetWindow(); if ( Mode == "FilterMode" ) - pGrid->SetFilterMode(sal_True); + pGrid->SetFilterMode(true); else { - pGrid->SetFilterMode(sal_False); + pGrid->SetFilterMode(false); pGrid->setDataSource(m_xCursor); } } diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index 82ff2bcd7522..9fd0bde2350f 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -108,7 +108,7 @@ private: { pSeek->moveToBookmark(*pIter); // get the data - rSeekRow->SetState(pSeek, sal_True); + rSeekRow->SetState(pSeek, true); sal_Int32 nSeekPos = pSeek->getRow() - 1; m_pControl->SetSeekPos(nSeekPos,aAccess); m_pControl->RowModified(nSeekPos); @@ -239,7 +239,7 @@ static const sal_uInt16 ControlMap[] = 0 }; -sal_Bool CompareBookmark(const Any& aLeft, const Any& aRight) +bool CompareBookmark(const Any& aLeft, const Any& aRight) { return ::comphelper::compare(aLeft, aRight); } @@ -322,9 +322,9 @@ void DbGridControl::NavigationBar::PositionDataSource(sal_Int32 nRecord) return; // the MoveToPosition may cause a LoseFocus which would lead to a second MoveToPosition, // so protect against this recursion - m_bPositioning = sal_True; + m_bPositioning = true; ((DbGridControl*)GetParent())->MoveToPosition(nRecord - 1); - m_bPositioning = sal_False; + m_bPositioning = false; } DbGridControl::NavigationBar::NavigationBar(Window* pParent, WinBits nStyle) @@ -340,7 +340,7 @@ DbGridControl::NavigationBar::NavigationBar(Window* pParent, WinBits nStyle) ,m_aNewBtn(this, WB_RECTSTYLE|WB_NOPOINTERFOCUS) ,m_nDefaultWidth(0) ,m_nCurrentPos(-1) - ,m_bPositioning(sal_False) + ,m_bPositioning(false) { m_aFirstBtn.SetSymbol(SYMBOL_FIRST); m_aPrevBtn.SetSymbol(SYMBOL_PREV); @@ -511,7 +511,7 @@ IMPL_LINK(DbGridControl::NavigationBar, OnClick, Button *, pButton ) return 0; } -void DbGridControl::NavigationBar::InvalidateAll(sal_Int32 nCurrentPos, sal_Bool bAll) +void DbGridControl::NavigationBar::InvalidateAll(sal_Int32 nCurrentPos, bool bAll) { if (m_nCurrentPos != nCurrentPos || nCurrentPos < 0 || bAll) { @@ -541,13 +541,13 @@ void DbGridControl::NavigationBar::InvalidateAll(sal_Int32 nCurrentPos, sal_Bool } } -sal_Bool DbGridControl::NavigationBar::GetState(sal_uInt16 nWhich) const +bool DbGridControl::NavigationBar::GetState(sal_uInt16 nWhich) const { DbGridControl* pParent = (DbGridControl*)GetParent(); if (!pParent->IsOpen() || pParent->IsDesignMode() || !pParent->IsEnabled() || pParent->IsFilterMode() ) - return sal_False; + return false; else { // check if we have a master state provider @@ -558,7 +558,7 @@ sal_Bool DbGridControl::NavigationBar::GetState(sal_uInt16 nWhich) const return (nState>0); } - sal_Bool bAvailable = sal_True; + bool bAvailable = true; switch (nWhich) { @@ -755,8 +755,8 @@ void DbGridControl::NavigationBar::StateChanged( StateChangedType nType ) } } -DbGridRow::DbGridRow(CursorWrapper* pCur, sal_Bool bPaintCursor) - :m_bIsNew(sal_False) +DbGridRow::DbGridRow(CursorWrapper* pCur, bool bPaintCursor) + :m_bIsNew(false) { if (pCur && pCur->Is()) @@ -810,14 +810,14 @@ DbGridRow::~DbGridRow() m_aVariants.clear(); } -void DbGridRow::SetState(CursorWrapper* pCur, sal_Bool bPaintCursor) +void DbGridRow::SetState(CursorWrapper* pCur, bool bPaintCursor) { if (pCur && pCur->Is()) { if (pCur->rowDeleted()) { m_eStatus = GRS_DELETED; - m_bIsNew = sal_False; + m_bIsNew = false; } else { @@ -832,7 +832,7 @@ void DbGridRow::SetState(CursorWrapper* pCur, sal_Bool bPaintCursor) m_bIsNew = ::comphelper::getBOOL(xSet->getPropertyValue(FM_PROP_ISNEW)); } else - m_bIsNew = sal_False; + m_bIsNew = false; } try @@ -847,14 +847,14 @@ void DbGridRow::SetState(CursorWrapper* pCur, sal_Bool bPaintCursor) DBG_UNHANDLED_EXCEPTION(); m_aBookmark = Any(); m_eStatus = GRS_INVALID; - m_bIsNew = sal_False; + m_bIsNew = false; } } else { m_aBookmark = Any(); m_eStatus = GRS_INVALID; - m_bIsNew = sal_False; + m_bIsNew = false; } } @@ -883,19 +883,19 @@ DbGridControl::DbGridControl( ,m_nOptionMask(OPT_INSERT | OPT_UPDATE | OPT_DELETE) ,m_nLastColId((sal_uInt16)-1) ,m_nLastRowId(-1) - ,m_bDesignMode(sal_False) - ,m_bRecordCountFinal(sal_False) - ,m_bMultiSelection(sal_True) - ,m_bNavigationBar(sal_True) - ,m_bSynchDisplay(sal_True) - ,m_bForceROController(sal_False) - ,m_bHandle(sal_True) - ,m_bFilterMode(sal_False) - ,m_bWantDestruction(sal_False) - ,m_bInAdjustDataSource(sal_False) - ,m_bPendingAdjustRows(sal_False) - ,m_bHideScrollbars( sal_False ) - ,m_bUpdating(sal_False) + ,m_bDesignMode(false) + ,m_bRecordCountFinal(false) + ,m_bMultiSelection(true) + ,m_bNavigationBar(true) + ,m_bSynchDisplay(true) + ,m_bForceROController(false) + ,m_bHandle(true) + ,m_bFilterMode(false) + ,m_bWantDestruction(false) + ,m_bInAdjustDataSource(false) + ,m_bPendingAdjustRows(false) + ,m_bHideScrollbars( false ) + ,m_bUpdating(false) { OUString sName(SVX_RESSTR(RID_STR_NAVIGATIONBAR)); @@ -930,7 +930,7 @@ DbGridControl::~DbGridControl() RemoveColumns(); { - m_bWantDestruction = sal_True; + m_bWantDestruction = true; osl::MutexGuard aGuard(m_aDestructionSafety); if (m_pFieldListeners) DisconnectFromFields(); @@ -1065,7 +1065,7 @@ void DbGridControl::ImplInitWindow( const InitWindowFacet _eInitWhat ) } } -void DbGridControl::RemoveRows(sal_Bool bNewCursor) +void DbGridControl::RemoveRows(bool bNewCursor) { // Did the data cursor change? if (!bNewCursor) @@ -1075,7 +1075,7 @@ void DbGridControl::RemoveRows(sal_Bool bNewCursor) m_nCurrentPos = m_nSeekPos = -1; m_nOptions = OPT_READONLY; - RowRemoved(0, GetRowCount(), sal_False); + RowRemoved(0, GetRowCount(), false); m_nTotalCount = -1; } else @@ -1104,7 +1104,7 @@ void DbGridControl::RemoveRows() // reset number of sentences to zero in the browser DbGridControl_Base::RemoveRows(); - m_aBar.InvalidateAll(m_nCurrentPos, sal_True); + m_aBar.InvalidateAll(m_nCurrentPos, true); } void DbGridControl::ArrangeControls(sal_uInt16& nX, sal_uInt16 nY) @@ -1118,7 +1118,7 @@ void DbGridControl::ArrangeControls(sal_uInt16& nX, sal_uInt16 nY) } } -void DbGridControl::EnableHandle(sal_Bool bEnable) +void DbGridControl::EnableHandle(bool bEnable) { if (m_bHandle == bEnable) return; @@ -1163,7 +1163,7 @@ namespace } } -void DbGridControl::EnableNavigationBar(sal_Bool bEnable) +void DbGridControl::EnableNavigationBar(bool bEnable) { if (m_bNavigationBar == bEnable) return; @@ -1174,7 +1174,7 @@ void DbGridControl::EnableNavigationBar(sal_Bool bEnable) { m_aBar.Show(); m_aBar.Enable(); - m_aBar.InvalidateAll(m_nCurrentPos, sal_True); + m_aBar.InvalidateAll(m_nCurrentPos, true); if ( adjustModeForScrollbars( m_nMode, m_bNavigationBar, m_bHideScrollbars ) ) SetMode( m_nMode ); @@ -1259,14 +1259,14 @@ sal_uInt16 DbGridControl::SetOptions(sal_uInt16 nOpt) if (m_nOptions & OPT_INSERT) { // the insert option is to be set m_xEmptyRow = new DbGridRow(); - RowInserted(GetRowCount(), 1, sal_True); + RowInserted(GetRowCount(), 1, true); } else { // the insert option is to be reset m_xEmptyRow = NULL; if ((GetCurRow() == GetRowCount() - 1) && (GetCurRow() > 0)) GoToRowColumnId(GetCurRow() - 1, GetCurColumnId()); - RowRemoved(GetRowCount(), 1, sal_True); + RowRemoved(GetRowCount(), 1, true); } } @@ -1277,7 +1277,7 @@ sal_uInt16 DbGridControl::SetOptions(sal_uInt16 nOpt) return m_nOptions; } -void DbGridControl::ForceHideScrollbars( sal_Bool _bForce ) +void DbGridControl::ForceHideScrollbars( bool _bForce ) { if ( m_bHideScrollbars == _bForce ) return; @@ -1288,7 +1288,7 @@ void DbGridControl::ForceHideScrollbars( sal_Bool _bForce ) SetMode( m_nMode ); } -void DbGridControl::EnablePermanentCursor(sal_Bool bEnable) +void DbGridControl::EnablePermanentCursor(bool bEnable) { if (IsPermanentCursorEnabled() == bEnable) return; @@ -1315,7 +1315,7 @@ void DbGridControl::EnablePermanentCursor(sal_Bool bEnable) ActivateCell(); } -sal_Bool DbGridControl::IsPermanentCursorEnabled() const +bool DbGridControl::IsPermanentCursorEnabled() const { return ((m_nMode & BROWSER_CURSOR_WO_FOCUS) != 0) && ((m_nMode & BROWSER_HIDECURSOR) == 0); } @@ -1509,9 +1509,9 @@ void DbGridControl::setDataSource(const Reference< XRowSet >& _xCursor, sal_uInt } if (nRecordCount) { - m_xPaintRow = m_xSeekRow = new DbGridRow(m_pSeekCursor, sal_True); - m_xDataRow = new DbGridRow(m_pDataCursor, sal_False); - RowInserted(0, nRecordCount, sal_False); + m_xPaintRow = m_xSeekRow = new DbGridRow(m_pSeekCursor, true); + m_xDataRow = new DbGridRow(m_pDataCursor, false); + RowInserted(0, nRecordCount, false); if (m_xSeekRow->IsValid()) try @@ -1554,9 +1554,9 @@ void DbGridControl::setDataSource(const Reference< XRowSet >& _xCursor, sal_uInt // RecalcRows was already called while resizing if (!IsResizing() && GetRowCount()) - RecalcRows(GetTopRow(), GetVisibleRows(), sal_True); + RecalcRows(GetTopRow(), GetVisibleRows(), true); - m_aBar.InvalidateAll(m_nCurrentPos, sal_True); + m_aBar.InvalidateAll(m_nCurrentPos, true); SetUpdateMode(sal_True); // start listening on the seek cursor @@ -1754,7 +1754,7 @@ sal_Bool DbGridControl::SeekRow(long nRow) m_xPaintRow = m_xEmptyRow; else { - m_xSeekRow->SetState( m_pSeekCursor, sal_True ); + m_xSeekRow->SetState( m_pSeekCursor, true ); m_xPaintRow = m_xSeekRow; } } @@ -1767,10 +1767,10 @@ sal_Bool DbGridControl::SeekRow(long nRow) // Is called whenever the visible amount of data changes void DbGridControl::VisibleRowsChanged( long nNewTopRow, sal_uInt16 nLinesOnScreen ) { - RecalcRows(nNewTopRow, nLinesOnScreen , sal_False); + RecalcRows(nNewTopRow, nLinesOnScreen, false); } -void DbGridControl::RecalcRows(long nNewTopRow, sal_uInt16 nLinesOnScreen, sal_Bool bUpdateCursor) +void DbGridControl::RecalcRows(long nNewTopRow, sal_uInt16 nLinesOnScreen, bool bUpdateCursor) { // Wenn kein Cursor -> keine Rows im Browser. if (!m_pSeekCursor) @@ -1802,7 +1802,7 @@ void DbGridControl::RecalcRows(long nNewTopRow, sal_uInt16 nLinesOnScreen, sal_B aCacheSize <<= sal_Int32(nLinesOnScreen*2); xSet->setPropertyValue(FM_PROP_FETCHSIZE, aCacheSize); // here we need to update the cursor for sure - bUpdateCursor = sal_True; + bUpdateCursor = true; bCacheAligned = true; nLimit = nLinesOnScreen; } @@ -1814,11 +1814,11 @@ void DbGridControl::RecalcRows(long nNewTopRow, sal_uInt16 nLinesOnScreen, sal_B // the cache was updated and no rowcount yet if (nDelta < nLimit && (nDelta > 0 || (bCacheAligned && m_nTotalCount < 0)) ) - SeekCursor(nNewTopRow + nLinesOnScreen - 1, sal_False); + SeekCursor(nNewTopRow + nLinesOnScreen - 1, false); else if (nDelta < 0 && std::abs(nDelta) < nLimit) - SeekCursor(nNewTopRow, sal_False); + SeekCursor(nNewTopRow, false); else if (nDelta != 0 || bUpdateCursor) - SeekCursor(nNewTopRow, sal_True); + SeekCursor(nNewTopRow, true); AdjustRows(); @@ -1826,7 +1826,7 @@ void DbGridControl::RecalcRows(long nNewTopRow, sal_uInt16 nLinesOnScreen, sal_B EnablePaint(true); } -void DbGridControl::RowInserted(long nRow, long nNumRows, sal_Bool bDoPaint, sal_Bool bKeepSelection) +void DbGridControl::RowInserted(long nRow, long nNumRows, bool bDoPaint, bool bKeepSelection) { if (nNumRows) { @@ -1846,7 +1846,7 @@ void DbGridControl::RowInserted(long nRow, long nNumRows, sal_Bool bDoPaint, sal } } -void DbGridControl::RowRemoved(long nRow, long nNumRows, sal_Bool bDoPaint) +void DbGridControl::RowRemoved(long nRow, long nNumRows, bool bDoPaint) { if (nNumRows) { @@ -1898,7 +1898,7 @@ void DbGridControl::AdjustRows() long nDelta = GetRowCount() - (long)nRecordCount; if (nDelta > 0) // too many { - RowRemoved(GetRowCount() - nDelta, nDelta, sal_False); + RowRemoved(GetRowCount() - nDelta, nDelta, false); // some rows are gone, thus, repaint starting at the current position Invalidate(); @@ -1911,11 +1911,11 @@ void DbGridControl::AdjustRows() if (nRecordCount) GoToRowColumnId(nNewPos, GetColumnId(GetCurColumnId())); if (!IsResizing() && GetRowCount()) - RecalcRows(GetTopRow(), GetVisibleRows(), sal_True); - m_aBar.InvalidateAll(m_nCurrentPos, sal_True); + RecalcRows(GetTopRow(), GetVisibleRows(), true); + m_aBar.InvalidateAll(m_nCurrentPos, true); } else // too few - RowInserted(GetRowCount(), -nDelta, sal_True); + RowInserted(GetRowCount(), -nDelta, true); } if (m_bRecordCountFinal && m_nTotalCount < 0) @@ -1996,7 +1996,7 @@ sal_Bool DbGridControl::CursorMoving(long nNewRow, sal_uInt16 nNewCol) return sal_True; } -sal_Bool DbGridControl::SetCurrent(long nNewRow) +bool DbGridControl::SetCurrent(long nNewRow) { // Each movement of the datacursor must start with BeginCursorAction and end with // EndCursorAction to block all notifications during the movement @@ -2041,12 +2041,12 @@ sal_Bool DbGridControl::SetCurrent(long nNewRow) if (!m_pDataCursor->moveToBookmark(aBookmark)) { EndCursorAction(); - return sal_False; + return false; } } } } - m_xDataRow->SetState(m_pDataCursor, sal_False); + m_xDataRow->SetState(m_pDataCursor, false); m_xCurrentRow = m_xDataRow; long nPaintPos = -1; @@ -2067,18 +2067,18 @@ sal_Bool DbGridControl::SetCurrent(long nNewRow) { OSL_FAIL("DbGridControl::SetCurrent : SeekRow failed !"); EndCursorAction(); - return sal_False; + return false; } } catch ( const Exception& ) { DBG_UNHANDLED_EXCEPTION(); EndCursorAction(); - return sal_False; + return false; } EndCursorAction(); - return sal_True; + return true; } void DbGridControl::CursorMoved() @@ -2120,17 +2120,17 @@ void DbGridControl::onColumnChange() m_pGridListener->columnChanged(); } -void DbGridControl::setDisplaySynchron(sal_Bool bSync) +void DbGridControl::setDisplaySynchron(bool bSync) { if (bSync != m_bSynchDisplay) { m_bSynchDisplay = bSync; if (m_bSynchDisplay) - AdjustDataSource(sal_False); + AdjustDataSource(false); } } -void DbGridControl::AdjustDataSource(sal_Bool bFull) +void DbGridControl::AdjustDataSource(bool bFull) { SAL_INFO("svx.fmcomp", "DbGridControl::AdjustDataSource"); SolarMutexGuard aGuard; @@ -2177,7 +2177,7 @@ void DbGridControl::AdjustDataSource(sal_Bool bFull) if (nNewPos < 0)// could not find any position return; - m_bInAdjustDataSource = sal_True; + m_bInAdjustDataSource = true; if (nNewPos != m_nCurrentPos) { if (m_bSynchDisplay) @@ -2195,7 +2195,7 @@ void DbGridControl::AdjustDataSource(sal_Bool bFull) SetCurrent(nNewPos); RowModified(nNewPos); } - m_bInAdjustDataSource = sal_False; + m_bInAdjustDataSource = false; // if the data cursor was moved from outside, this section is voided SetNoSelection(); @@ -2253,7 +2253,7 @@ sal_Int32 DbGridControl::AlignSeekCursor() return m_nSeekPos; } -sal_Bool DbGridControl::SeekCursor(long nRow, sal_Bool bAbsolute) +bool DbGridControl::SeekCursor(long nRow, bool bAbsolute) { // position SeekCursor onto the data cursor, no data transmission @@ -2261,11 +2261,11 @@ sal_Bool DbGridControl::SeekCursor(long nRow, sal_Bool bAbsolute) if (IsFilterRow(nRow)) { m_nSeekPos = 0; - return sal_True; + return true; } if (!m_pSeekCursor) - return sal_False; + return false; // is this an insertion? if (IsValid(m_xCurrentRow) && m_xCurrentRow->IsNew() && @@ -2286,7 +2286,7 @@ sal_Bool DbGridControl::SeekCursor(long nRow, sal_Bool bAbsolute) m_nSeekPos = nRow; else { - sal_Bool bSuccess=sal_False; + bool bSuccess = false; long nSteps = 0; try { @@ -2295,7 +2295,7 @@ sal_Bool DbGridControl::SeekCursor(long nRow, sal_Bool bAbsolute) // somebody deleted the current row of the seek cursor. Move it away from this row. m_pSeekCursor->next(); if ( m_pSeekCursor->isAfterLast() || m_pSeekCursor->isBeforeFirst() ) - bAbsolute = sal_True; + bAbsolute = true; } if ( !bAbsolute ) @@ -2317,7 +2317,7 @@ sal_Bool DbGridControl::SeekCursor(long nRow, sal_Bool bAbsolute) if (nSteps > 0) // position onto the last needed data set { if (m_pSeekCursor->isAfterLast()) - bSuccess = sal_False; + bSuccess = false; else if (m_pSeekCursor->isBeforeFirst()) bSuccess = m_pSeekCursor->absolute(nSteps); else @@ -2326,7 +2326,7 @@ sal_Bool DbGridControl::SeekCursor(long nRow, sal_Bool bAbsolute) else if (nSteps < 0) { if (m_pSeekCursor->isBeforeFirst()) - bSuccess = sal_False; + bSuccess = false; else if (m_pSeekCursor->isAfterLast()) bSuccess = m_pSeekCursor->absolute(nSteps); else @@ -2335,7 +2335,7 @@ sal_Bool DbGridControl::SeekCursor(long nRow, sal_Bool bAbsolute) else { m_nSeekPos = nRow; - return sal_True; + return true; } } } @@ -2351,14 +2351,14 @@ sal_Bool DbGridControl::SeekCursor(long nRow, sal_Bool bAbsolute) if (bAbsolute || nSteps > 0) { if (m_pSeekCursor->isLast()) - bSuccess=sal_True; + bSuccess = true; else bSuccess = m_pSeekCursor->last(); } else { if (m_pSeekCursor->isFirst()) - bSuccess = sal_True; + bSuccess = true; else bSuccess = m_pSeekCursor->first(); } @@ -2547,11 +2547,11 @@ void DbGridControl::SetDesignMode(bool bMode) GetDataWindow().SetMouseTransparent(bMode); SetMouseTransparent(bMode); - m_aBar.InvalidateAll(m_nCurrentPos, sal_True); + m_aBar.InvalidateAll(m_nCurrentPos, true); } } -void DbGridControl::SetFilterMode(sal_Bool bMode) +void DbGridControl::SetFilterMode(bool bMode) { if (IsFilterMode() != bMode) { @@ -2564,7 +2564,7 @@ void DbGridControl::SetFilterMode(sal_Bool bMode) // there is no cursor anymore if (IsEditing()) DeactivateCell(); - RemoveRows(sal_False); + RemoveRows(false); m_xEmptyRow = new DbGridRow(); @@ -2577,7 +2577,7 @@ void DbGridControl::SetFilterMode(sal_Bool bMode) } // one row for filtering - RowInserted(0, 1, sal_True); + RowInserted(0, 1, true); SetUpdateMode(sal_True); } else @@ -2680,7 +2680,7 @@ void DbGridControl::DataSourcePropertyChanged(const PropertyChangeEvent& evt) th // -> we've to add a new grid row if ((nRecordCount == GetRowCount() - 1) && m_xCurrentRow->IsNew()) { - RowInserted(GetRowCount(), 1, sal_True); + RowInserted(GetRowCount(), 1, true); InvalidateStatusCell(m_nCurrentPos); m_aBar.InvalidateAll(m_nCurrentPos); } @@ -2692,7 +2692,7 @@ void DbGridControl::DataSourcePropertyChanged(const PropertyChangeEvent& evt) th // one is about to be cleaned, too, the second one is obsolet now. if (m_xCurrentRow->IsNew() && nRecordCount == (GetRowCount() - 2)) { - RowRemoved(GetRowCount() - 1, 1, sal_True); + RowRemoved(GetRowCount() - 1, 1, true); InvalidateStatusCell(m_nCurrentPos); m_aBar.InvalidateAll(m_nCurrentPos); } @@ -2728,7 +2728,7 @@ void DbGridControl::StartDrag( sal_Int8 /*nAction*/, const Point& rPosPixel ) } } -sal_Bool DbGridControl::canCopyCellText(sal_Int32 _nRow, sal_Int16 _nColId) +bool DbGridControl::canCopyCellText(sal_Int32 _nRow, sal_Int16 _nColId) { return (_nRow >= 0) && (_nRow < GetRowCount()) @@ -2908,14 +2908,14 @@ void DbGridControl::CellModified() if (m_nCurrentPos == GetRowCount() - 1) { // increment RowCount - RowInserted(GetRowCount(), 1, sal_True); + RowInserted(GetRowCount(), 1, true); InvalidateStatusCell(m_nCurrentPos); m_aBar.InvalidateAll(m_nCurrentPos); } } else if (m_xCurrentRow->GetStatus() != GRS_MODIFIED) { - m_xCurrentRow->SetState(m_pDataCursor, sal_False); + m_xCurrentRow->SetState(m_pDataCursor, false); SAL_INFO("svx.fmcomp", "current row is not new, after SetState, new state: " << ROWSTATUS(m_xCurrentRow)); m_xCurrentRow->SetStatus(GRS_MODIFIED); SAL_INFO("svx.fmcomp", "current row is not new, new state: MODIFIED"); @@ -2981,7 +2981,7 @@ void DbGridControl::Undo() EndCursorAction(); - m_xDataRow->SetState(m_pDataCursor, sal_False); + m_xDataRow->SetState(m_pDataCursor, false); if (&m_xPaintRow == &m_xCurrentRow) m_xPaintRow = m_xCurrentRow = m_xDataRow; else @@ -2992,7 +2992,7 @@ void DbGridControl::Undo() if (m_nCurrentPos == GetRowCount() - 2) { // maybe we already removed it (in resetCurrentRow, called if the above moveToInsertRow // caused our data source form to be reset - which should be the usual case ....) - RowRemoved(GetRowCount() - 1, 1, sal_True); + RowRemoved(GetRowCount() - 1, 1, true); m_aBar.InvalidateAll(m_nCurrentPos); } @@ -3019,14 +3019,14 @@ void DbGridControl::resetCurrentRow() { if (m_nCurrentPos == GetRowCount() - 2) { - RowRemoved(GetRowCount() - 1, 1, sal_True); + RowRemoved(GetRowCount() - 1, 1, true); m_aBar.InvalidateAll(m_nCurrentPos); } } } // update the rows - m_xDataRow->SetState(m_pDataCursor, sal_False); + m_xDataRow->SetState(m_pDataCursor, false); if (&m_xPaintRow == &m_xCurrentRow) m_xPaintRow = m_xCurrentRow = m_xDataRow; else @@ -3052,12 +3052,12 @@ sal_Bool DbGridControl::IsModified() const return !IsFilterMode() && IsValid(m_xCurrentRow) && (m_xCurrentRow->IsModified() || DbGridControl_Base::IsModified()); } -sal_Bool DbGridControl::IsCurrentAppending() const +bool DbGridControl::IsCurrentAppending() const { return m_xCurrentRow.Is() && m_xCurrentRow->IsNew(); } -sal_Bool DbGridControl::IsInsertionRow(long nRow) const +bool DbGridControl::IsInsertionRow(long nRow) const { return (m_nOptions & OPT_INSERT) && m_nTotalCount >= 0 && (nRow == GetRowCount() - 1); } @@ -3093,7 +3093,7 @@ sal_Bool DbGridControl::SaveModified() if ( IsValid(m_xCurrentRow) ) { - m_xCurrentRow->SetState(m_pDataCursor, sal_False); + m_xCurrentRow->SetState(m_pDataCursor, false); SAL_INFO("svx.fmcomp", "explicit SetState, new state: " << ROWSTATUS(m_xCurrentRow)); InvalidateStatusCell( m_nCurrentPos ); } @@ -3123,7 +3123,7 @@ sal_Bool DbGridControl::SaveRow() if (!SaveModified()) return sal_False; } - m_bUpdating = sal_True; + m_bUpdating = true; BeginCursorAction(); sal_Bool bAppending = m_xCurrentRow->IsNew(); @@ -3140,7 +3140,7 @@ sal_Bool DbGridControl::SaveRow() catch(SQLException&) { EndCursorAction(); - m_bUpdating = sal_False; + m_bUpdating = false; return sal_False; } @@ -3150,9 +3150,9 @@ sal_Bool DbGridControl::SaveRow() { // if we are appending we still sit on the insert row // we don't move just clear the flags not to move on the current row - m_xCurrentRow->SetState(m_pDataCursor, sal_False); + m_xCurrentRow->SetState(m_pDataCursor, false); SAL_INFO("svx.fmcomp", "explicit SetState after a successful update, new state: " << ROWSTATUS(m_xCurrentRow)); - m_xCurrentRow->SetNew(sal_False); + m_xCurrentRow->SetNew(false); // adjust the seekcursor if it is on the same position as the datacursor if (m_nSeekPos == m_nCurrentPos || bAppending) @@ -3162,7 +3162,7 @@ sal_Bool DbGridControl::SaveRow() Any aBookmark = bAppending ? m_pDataCursor->getBookmark() : m_pSeekCursor->getBookmark(); m_pSeekCursor->moveToBookmark(aBookmark); // get the data - m_xSeekRow->SetState(m_pSeekCursor, sal_True); + m_xSeekRow->SetState(m_pSeekCursor, true); m_nSeekPos = m_pSeekCursor->getRow() - 1; } } @@ -3173,7 +3173,7 @@ sal_Bool DbGridControl::SaveRow() { } - m_bUpdating = sal_False; + m_bUpdating = false; EndCursorAction(); // The old code returned (nRecords != 0) here. @@ -3399,7 +3399,7 @@ sal_uInt16 DbGridControl::GetModelColumnPos( sal_uInt16 nId ) const return GRID_COLUMN_NOT_FOUND; } -void DbGridControl::implAdjustInSolarThread(sal_Bool _bRows) +void DbGridControl::implAdjustInSolarThread(bool _bRows) { SAL_INFO("svx.fmcomp", "DbGridControl::implAdjustInSolarThread"); ::osl::MutexGuard aGuard(m_aAdjustSafety); 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 ) |