diff options
82 files changed, 779 insertions, 779 deletions
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index b96a0915921b..b1d359d33e64 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -1086,8 +1086,8 @@ IMPL_LINK_NOARG(TPGalleryThemeProperties, ClickTakeHdl) if( !m_pLbxFound->GetSelectEntryCount() || !bEntriesFound ) { SvxOpenGraphicDialog aDlg("Gallery"); - aDlg.EnableLink(sal_False); - aDlg.AsLink(sal_False); + aDlg.EnableLink(false); + aDlg.AsLink(false); if( !aDlg.Execute() ) pData->pTheme->InsertURL( INetURLObject( aDlg.GetPath() ) ); diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index 828529de524a..19f5a363e1e4 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -1523,7 +1523,7 @@ IMPL_LINK_NOARG(SvxBackgroundTabPage, BrowseHdl_Impl) OUString aStrBrowse(get<Window>("findgraphicsft")->GetText()); pImportDlg = new SvxOpenGraphicDialog( aStrBrowse ); if ( bHtml || bLinkOnly ) - pImportDlg->EnableLink(sal_False); + pImportDlg->EnableLink(false); pImportDlg->SetPath( aBgdGraphicPath, m_pBtnLink->IsChecked() ); pPageImpl->bIsImportDlgInExecute = sal_True; diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 8e34cf4935e4..f7716977298d 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -1893,8 +1893,8 @@ IMPL_LINK( SvxNumOptionsTabPage, GraphicHdl_Impl, MenuButton *, pButton ) } else { - aGrfDlg.EnableLink( sal_False ); - aGrfDlg.AsLink( sal_False ); + aGrfDlg.EnableLink( false ); + aGrfDlg.AsLink( false ); if ( !aGrfDlg.Execute() ) { // memorize selected filter diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx index 94761f559c64..17aadf2be2cc 100644 --- a/cui/source/tabpages/tpbitmap.cxx +++ b/cui/source/tabpages/tpbitmap.cxx @@ -579,7 +579,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickImportHdl_Impl) { ResMgr& rMgr = CUI_MGR(); SvxOpenGraphicDialog aDlg( OUString("Import") ); - aDlg.EnableLink(sal_False); + aDlg.EnableLink(false); if( !aDlg.Execute() ) { diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx index 10cd1f7e5780..a80abe39cb41 100644 --- a/include/sfx2/objsh.hxx +++ b/include/sfx2/objsh.hxx @@ -174,15 +174,15 @@ private: // storage that contains the object SfxStyleSheetBasePool* pStyleSheetPool; // StyleSheets SfxObjectCreateMode eCreateMode; // Purpose of the object - sal_Bool bHasName :1; // sal_True := existing object, + bool bHasName :1; // sal_True := existing object, // sal_False := new object - sal_Bool bIsInGenerateThumbnail; //optimize thumbnail generate and store procedure to improve odt saving performance, i120030 + bool bIsInGenerateThumbnail; //optimize thumbnail generate and store procedure to improve odt saving performance, i120030 private: SAL_DLLPRIVATE void UpdateTime_Impl(const ::com::sun::star::uno::Reference< ::com::sun::star::document::XDocumentProperties> & i_xDocProps); - SAL_DLLPRIVATE sal_Bool SaveTo_Impl(SfxMedium &rMedium, const SfxItemSet* pSet ); + SAL_DLLPRIVATE bool SaveTo_Impl(SfxMedium &rMedium, const SfxItemSet* pSet ); protected: SfxObjectShell(SfxObjectCreateMode); @@ -209,17 +209,17 @@ public: static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId(); /* Stampit disable/enable cancel button for print jobs default = true = enable! */ - void Stamp_SetPrintCancelState(sal_Bool bState); - sal_Bool Stamp_GetPrintCancelState() const; + void Stamp_SetPrintCancelState(bool bState); + bool Stamp_GetPrintCancelState() const; using SotObject::GetInterface; // Document-Shell Iterator static SfxObjectShell* GetFirst( const TypeId* pType = 0, - sal_Bool bOnlyVisible = sal_True ); + bool bOnlyVisible = true ); static SfxObjectShell* GetNext( const SfxObjectShell& rPrev, const TypeId* pType = 0, - sal_Bool bOnlyVisible = sal_True ); + bool bOnlyVisible = true ); static SfxObjectShell* Current(); static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > GetCurrentComponent(); @@ -237,38 +237,38 @@ public: ::com::sun::star::document::XDocumentProperties > getDocProperties(); void UpdateDocInfoForSave( ); void FlushDocInfo(); - sal_Bool HasName() const { return bHasName; } + bool HasName() const { return bHasName; } virtual OUString GetAPIName() const; void SetReadOnly(); - sal_Bool IsReadOnly() const; - sal_Bool IsReadOnlyMedium() const; + bool IsReadOnly() const; + bool IsReadOnlyMedium() const; bool IsOriginallyReadOnlyMedium() const; - void SetReadOnlyUI( sal_Bool bReadOnly = sal_True ); - sal_Bool IsReadOnlyUI() const; + void SetReadOnlyUI( bool bReadOnly = true ); + bool IsReadOnlyUI() const; void SetNoName(); - sal_Bool IsInModalMode() const; - sal_Bool IsInPrepareClose() const; - virtual sal_Bool AcceptStateUpdate() const; - sal_Bool IsHelpDocument() const; + bool IsInModalMode() const; + bool IsInPrepareClose() const; + virtual bool AcceptStateUpdate() const; + bool IsHelpDocument() const; #if HAVE_FEATURE_MULTIUSER_ENVIRONMENT - sal_Bool IsDocShared() const; - OUString GetSharedFileURL() const; - sal_Bool SwitchToShared( sal_Bool bShared, sal_Bool bSave ); + bool IsDocShared() const; + OUString GetSharedFileURL() const; + bool SwitchToShared( bool bShared, bool bSave ); SAL_DLLPRIVATE void FreeSharedFile(); SAL_DLLPRIVATE void FreeSharedFile( const OUString& aTempFileURL ); SAL_DLLPRIVATE void DoNotCleanShareControlFile(); - void SetSharedXMLFlag( sal_Bool bFlag ) const; - sal_Bool HasSharedXMLFlagSet() const; + void SetSharedXMLFlag( bool bFlag ) const; + bool HasSharedXMLFlagSet() const; #else - sal_Bool IsDocShared() const + bool IsDocShared() const { return sal_False; }; OUString GetSharedFileURL() const { return OUString(); }; #endif - SAL_DLLPRIVATE void SetModalMode_Impl(sal_Bool bModal=sal_True); - SAL_DLLPRIVATE void SetMacroMode_Impl(sal_Bool bModal=sal_True); + SAL_DLLPRIVATE void SetModalMode_Impl(bool bModal=true); + SAL_DLLPRIVATE void SetMacroMode_Impl(bool bModal=true); void ResetError(); sal_uInt32 GetError() const; @@ -284,27 +284,27 @@ public: * @return true if the initialization is successful, false otherwise. */ bool DoInitUnitTest(); - sal_Bool DoInitNew( SfxMedium* pMedium=0 ); - sal_Bool DoLoad( SfxMedium* pMedium ); + bool DoInitNew( SfxMedium* pMedium=0 ); + bool DoLoad( SfxMedium* pMedium ); bool DoLoadExternal( SfxMedium* pMed ); - sal_Bool DoSave(); - sal_Bool DoSaveAs( SfxMedium &rNewStor ); - sal_Bool DoSaveObjectAs( SfxMedium &rNewStor, sal_Bool bCommit ); + bool DoSave(); + bool DoSaveAs( SfxMedium &rNewStor ); + bool DoSaveObjectAs( SfxMedium &rNewStor, bool bCommit ); // TODO/LATER: currently only overloaded in Calc, should be made non-virtual - virtual sal_Bool DoSaveCompleted( SfxMedium* pNewStor=0 ); - - virtual sal_Bool LoadOwnFormat( SfxMedium& pMedium ); - virtual sal_Bool SaveAsOwnFormat( SfxMedium& pMedium ); - virtual sal_Bool ConvertFrom( SfxMedium &rMedium ); - virtual sal_Bool ConvertTo( SfxMedium &rMedium ); - virtual sal_Bool InitNew( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ); - virtual sal_Bool Load( SfxMedium &rMedium ); - virtual sal_Bool LoadFrom( SfxMedium& rMedium ); - virtual sal_Bool Save(); - virtual sal_Bool SaveAs( SfxMedium &rMedium ); - virtual sal_Bool SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ); - virtual sal_Bool SwitchPersistance( + virtual bool DoSaveCompleted( SfxMedium* pNewStor=0 ); + + virtual bool LoadOwnFormat( SfxMedium& pMedium ); + virtual bool SaveAsOwnFormat( SfxMedium& pMedium ); + virtual bool ConvertFrom( SfxMedium &rMedium ); + virtual bool ConvertTo( SfxMedium &rMedium ); + virtual bool InitNew( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ); + virtual bool Load( SfxMedium &rMedium ); + virtual bool LoadFrom( SfxMedium& rMedium ); + virtual bool Save(); + virtual bool SaveAs( SfxMedium &rMedium ); + virtual bool SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ); + virtual bool SwitchPersistance( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ); virtual void UpdateLinks(); virtual bool LoadExternal( SfxMedium& rMedium ); @@ -313,18 +313,18 @@ public: * handle potentially conflicting option settings. */ virtual void CheckConfigOptions(); - sal_Bool IsConfigOptionsChecked() const; - void SetConfigOptionsChecked( sal_Bool bChecked ); + bool IsConfigOptionsChecked() const; + void SetConfigOptionsChecked( bool bChecked ); // called for a few slots like SID_SAVE[AS]DOC, SID_PRINTDOC[DIRECT], derived classes may abort the action - virtual sal_Bool QuerySlotExecutable( sal_uInt16 nSlotId ); + virtual bool QuerySlotExecutable( sal_uInt16 nSlotId ); - sal_Bool SaveChildren(sal_Bool bObjectsOnly=sal_False); - sal_Bool SaveAsChildren( SfxMedium &rMedium ); - sal_Bool SwitchChildrenPersistance( + bool SaveChildren(bool bObjectsOnly=false); + bool SaveAsChildren( SfxMedium &rMedium ); + bool SwitchChildrenPersistance( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage, - sal_Bool bForceNonModified = sal_False ); - sal_Bool SaveCompletedChildren( sal_Bool bSuccess ); + bool bForceNonModified = false ); + bool SaveCompletedChildren( bool bSuccess ); /** a very special case to insert at a position in Writer from UNO, via OwnSubFilterService */ @@ -332,7 +332,7 @@ public: css::uno::Reference<css::text::XTextRange> const& xInsertPosition); virtual bool ImportFrom( SfxMedium &rMedium, css::uno::Reference<css::text::XTextRange> const& xInsertPosition); - sal_Bool ExportTo( SfxMedium &rMedium ); + bool ExportTo( SfxMedium &rMedium ); // xmlsec05, check with SFX team sal_uInt16 GetDocumentSignatureState(); @@ -379,71 +379,71 @@ public: void ClearHeaderAttributesForSourceViewHack(); void SetHeaderAttributesForSourceViewHack(); - sal_Bool IsTemplate() const; + bool IsTemplate() const; - sal_Bool IsQueryLoadTemplate() const; - sal_Bool IsUseUserData() const; - sal_Bool IsLoadReadonly() const; - sal_Bool IsSaveVersionOnClose() const; - void SetQueryLoadTemplate( sal_Bool b ); - void SetUseUserData( sal_Bool bNew ); - void SetLoadReadonly( sal_Bool _bReadonly ); - void SetSaveVersionOnClose( sal_Bool bSet ); + bool IsQueryLoadTemplate() const; + bool IsUseUserData() const; + bool IsLoadReadonly() const; + bool IsSaveVersionOnClose() const; + void SetQueryLoadTemplate( bool b ); + void SetUseUserData( bool bNew ); + void SetLoadReadonly( bool _bReadonly ); + void SetSaveVersionOnClose( bool bSet ); void ResetFromTemplate( const OUString& rTemplateName, const OUString& rFileName ); // TODO/LATER: the following two methods should be replaced by Get/SetModifPasswordInfo in future sal_uInt32 GetModifyPasswordHash() const; - sal_Bool SetModifyPasswordHash( sal_uInt32 nHash ); + bool SetModifyPasswordHash( sal_uInt32 nHash ); ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > GetModifyPasswordInfo() const; - sal_Bool SetModifyPasswordInfo( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aInfo ); + bool SetModifyPasswordInfo( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aInfo ); static sal_uInt32 HandleFilter( SfxMedium* pMedium, SfxObjectShell* pDoc ); virtual void ViewAssigned(); virtual bool PrepareClose( sal_Bool bUI = sal_True ); - virtual sal_Bool IsInformationLost(); + virtual bool IsInformationLost(); virtual sal_uInt16 GetHiddenInformationState( sal_uInt16 nStates ); sal_Int16 QueryHiddenInformation( HiddenWarningFact eFact, Window* pParent ); - virtual sal_Bool HasSecurityOptOpenReadOnly() const; - sal_Bool IsSecurityOptOpenReadOnly() const; - void SetSecurityOptOpenReadOnly( sal_Bool bOpenReadOnly = sal_True ); + virtual bool HasSecurityOptOpenReadOnly() const; + bool IsSecurityOptOpenReadOnly() const; + void SetSecurityOptOpenReadOnly( bool bOpenReadOnly = true ); virtual Size GetFirstPageSize(); - virtual sal_Bool DoClose(); + virtual bool DoClose(); virtual void PrepareReload(); - virtual ::boost::shared_ptr<GDIMetaFile> GetPreviewMetaFile( sal_Bool bFullContent = sal_False ) const; + virtual ::boost::shared_ptr<GDIMetaFile> GetPreviewMetaFile( bool bFullContent = false ) const; virtual void CancelTransfers(); - sal_Bool GenerateAndStoreThumbnail( - sal_Bool bEncrypted, - sal_Bool bIsTemplate, + bool GenerateAndStoreThumbnail( + bool bEncrypted, + bool bIsTemplate, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStor ); - sal_Bool WriteThumbnail( - sal_Bool bEncrypted, - sal_Bool bIsTemplate, + bool WriteThumbnail( + bool bEncrypted, + bool bIsTemplate, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xStream ); - sal_Bool IsInGenerateAndStoreThumbnail() const {return bIsInGenerateThumbnail;}//optimize thumbnail generate and store procedure to improve odt saving performance, i120030 + bool IsInGenerateAndStoreThumbnail() const {return bIsInGenerateThumbnail;}//optimize thumbnail generate and store procedure to improve odt saving performance, i120030 // Transfer IFace void AbortImport(); - sal_Bool IsAbortingImport() const; - sal_Bool IsReloading() const; + bool IsAbortingImport() const; + bool IsReloading() const; void FinishedLoading( sal_uInt16 nWhich = SFX_LOADED_ALL ); void TemplateDisconnectionAfterLoad(); - sal_Bool IsLoading() const; - sal_Bool IsLoadingFinished() const; - void SetAutoLoad( const INetURLObject&, sal_uInt32 nTime, sal_Bool bReload = sal_True ); - sal_Bool IsAutoLoadLocked() const; + bool IsLoading() const; + bool IsLoadingFinished() const; + void SetAutoLoad( const INetURLObject&, sal_uInt32 nTime, bool bReload = true ); + bool IsAutoLoadLocked() const; void NotifyReloadAvailable(); // Misc - sal_Bool IsPreview() const; + bool IsPreview() const; SfxObjectCreateMode GetCreateMode() const { return eCreateMode; } SfxProgress* GetProgress() const; - void SetWaitCursor( sal_Bool bSet ) const; + void SetWaitCursor( bool bSet ) const; // Naming Interface void SetTitle( const OUString& rTitle ); @@ -471,7 +471,7 @@ public: // Determine the position of the "Automatic" filter in the stylist void SetAutoStyleFilterIndex(sal_uInt16 nSet); sal_uInt16 GetAutoStyleFilterIndex(); - virtual sal_Bool HasBasic() const; + virtual bool HasBasic() const; BasicManager* GetBasicManager() const; com::sun::star::uno::Reference< com::sun::star::script::XLibraryContainer > GetBasicContainer(); @@ -512,20 +512,20 @@ public: CreateAndLoadComponent( const SfxItemSet& rSet, SfxFrame* pFrame = NULL ); static SfxObjectShell* GetShellFromComponent( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xComp ); static OUString GetServiceNameFromFactory( const OUString& rFact ); - sal_Bool IsInPlaceActive(); - sal_Bool IsUIActive(); - virtual void InPlaceActivate( sal_Bool ); - virtual void UIActivate( sal_Bool ); + bool IsInPlaceActive(); + bool IsUIActive(); + virtual void InPlaceActivate( bool ); + virtual void UIActivate( bool ); - static sal_Bool CopyStoragesOfUnknownMediaType( + static bool CopyStoragesOfUnknownMediaType( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xSource, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xTarget ); // The functions from SvPersist - void EnableSetModified( sal_Bool bEnable = sal_True ); - sal_Bool IsEnableSetModified() const; - virtual void SetModified( sal_Bool bModified = sal_True ); - sal_Bool IsModified(); + void EnableSetModified( bool bEnable = true ); + bool IsEnableSetModified() const; + virtual void SetModified( bool bModified = true ); + bool IsModified(); /** * @param bChart true if the file is a chart doc and FillClass should not be called @@ -594,16 +594,16 @@ public: virtual bool SetProtectionPassword( const OUString &rPassword ); virtual bool GetProtectionHash( /*out*/ ::com::sun::star::uno::Sequence< sal_Int8 > &rPasswordHash ); - SAL_DLLPRIVATE ::boost::shared_ptr<GDIMetaFile> CreatePreviewMetaFile_Impl( sal_Bool bFullContent ) const; + SAL_DLLPRIVATE ::boost::shared_ptr<GDIMetaFile> CreatePreviewMetaFile_Impl( bool bFullContent ) const; - SAL_DLLPRIVATE sal_Bool IsOwnStorageFormat_Impl(const SfxMedium &) const; + SAL_DLLPRIVATE bool IsOwnStorageFormat_Impl(const SfxMedium &) const; - SAL_DLLPRIVATE sal_Bool IsPackageStorageFormat_Impl(const SfxMedium &) const; + SAL_DLLPRIVATE bool IsPackageStorageFormat_Impl(const SfxMedium &) const; - SAL_DLLPRIVATE sal_Bool ConnectTmpStorage_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage, SfxMedium* pMedium ); - SAL_DLLPRIVATE sal_Bool DisconnectStorage_Impl( SfxMedium& rSrcMedium, SfxMedium& rTargetMedium ); + SAL_DLLPRIVATE bool ConnectTmpStorage_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage, SfxMedium* pMedium ); + SAL_DLLPRIVATE bool DisconnectStorage_Impl( SfxMedium& rSrcMedium, SfxMedium& rTargetMedium ); - SAL_DLLPRIVATE sal_Bool PutURLContentsToVersionStream_Impl( + SAL_DLLPRIVATE bool PutURLContentsToVersionStream_Impl( const OUString& aURL, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xDocStorage, const OUString& aStreamName ); @@ -612,19 +612,19 @@ public: const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ); SAL_DLLPRIVATE void InitOwnModel_Impl(); - SAL_DLLPRIVATE void BreakMacroSign_Impl( sal_Bool bBreakMacroSing ); + SAL_DLLPRIVATE void BreakMacroSign_Impl( bool bBreakMacroSing ); SAL_DLLPRIVATE void CheckSecurityOnLoading_Impl(); SAL_DLLPRIVATE void CheckForBrokenDocSignatures_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& xHandler ); SAL_DLLPRIVATE sal_uInt16 ImplCheckSignaturesInformation( const ::com::sun::star::uno::Sequence< ::com::sun::star::security::DocumentSignatureInformation >& aInfos ); SAL_DLLPRIVATE void CheckEncryption_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& xHandler ); - SAL_DLLPRIVATE void SetModifyPasswordEntered( sal_Bool bEntered = sal_True ); - SAL_DLLPRIVATE sal_Bool IsModifyPasswordEntered(); + SAL_DLLPRIVATE void SetModifyPasswordEntered( bool bEntered = true ); + SAL_DLLPRIVATE bool IsModifyPasswordEntered(); SAL_DLLPRIVATE void InitBasicManager_Impl(); SAL_DLLPRIVATE SfxObjectShell_Impl* Get_Impl() { return pImp; } - SAL_DLLPRIVATE static sal_Bool UseInteractionToHandleError( + SAL_DLLPRIVATE static bool UseInteractionToHandleError( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& xHandler, sal_uInt32 nError ); SAL_DLLPRIVATE const SfxObjectShell_Impl* Get_Impl() const { return pImp; } @@ -649,21 +649,21 @@ public: SAL_DLLPRIVATE void StateView_Impl(SfxItemSet &); // Load/Save public internals - SAL_DLLPRIVATE sal_Bool ImportFromGeneratedStream_Impl( + SAL_DLLPRIVATE bool ImportFromGeneratedStream_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xStream, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aMediaDescr ); SAL_DLLPRIVATE void PositionView_Impl(); SAL_DLLPRIVATE void UpdateFromTemplate_Impl(); - SAL_DLLPRIVATE sal_Bool CanReload_Impl(); + SAL_DLLPRIVATE bool CanReload_Impl(); SAL_DLLPRIVATE void SetNamedVisibility_Impl(); - SAL_DLLPRIVATE sal_Bool DoSave_Impl( const SfxItemSet* pSet=0 ); - SAL_DLLPRIVATE sal_Bool Save_Impl( const SfxItemSet* pSet=0 ); - SAL_DLLPRIVATE sal_Bool PreDoSaveAs_Impl(const OUString &rFileName, const OUString &rFiltName, SfxItemSet *); - SAL_DLLPRIVATE sal_Bool APISaveAs_Impl ( const OUString& aFileName, SfxItemSet* aParams ); - SAL_DLLPRIVATE sal_Bool CommonSaveAs_Impl ( const INetURLObject& aURL, const OUString& aFilterName, SfxItemSet* aParams ); - SAL_DLLPRIVATE sal_Bool GeneralInit_Impl( + SAL_DLLPRIVATE bool DoSave_Impl( const SfxItemSet* pSet=0 ); + SAL_DLLPRIVATE bool Save_Impl( const SfxItemSet* pSet=0 ); + SAL_DLLPRIVATE bool PreDoSaveAs_Impl(const OUString &rFileName, const OUString &rFiltName, SfxItemSet *); + SAL_DLLPRIVATE bool APISaveAs_Impl ( const OUString& aFileName, SfxItemSet* aParams ); + SAL_DLLPRIVATE bool CommonSaveAs_Impl ( const INetURLObject& aURL, const OUString& aFilterName, SfxItemSet* aParams ); + SAL_DLLPRIVATE bool GeneralInit_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage, - sal_Bool bTypeMustBeSetAlready ); + bool bTypeMustBeSetAlready ); SAL_DLLPRIVATE void PrepareSecondTryLoad_Impl(); SAL_DLLPRIVATE void SetInitialized_Impl( const bool i_fromInitNew ); @@ -676,16 +676,16 @@ public: // configuration items SAL_DLLPRIVATE SfxToolBoxConfig* GetToolBoxConfig_Impl(); - SAL_DLLPRIVATE sal_uInt16 ImplGetSignatureState( sal_Bool bScriptingContent = sal_False ); + SAL_DLLPRIVATE sal_uInt16 ImplGetSignatureState( bool bScriptingContent = false ); SAL_DLLPRIVATE ::com::sun::star::uno::Sequence< ::com::sun::star::security::DocumentSignatureInformation > ImplAnalyzeSignature( - sal_Bool bScriptingContent, + bool bScriptingContent, const ::com::sun::star::uno::Reference< ::com::sun::star::security::XDocumentDigitalSignatures >& xSigner = ::com::sun::star::uno::Reference< ::com::sun::star::security::XDocumentDigitalSignatures >() ); - SAL_DLLPRIVATE void ImplSign( sal_Bool bScriptingContent = sal_False ); - SAL_DLLPRIVATE sal_Bool QuerySaveSizeExceededModules_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& xHandler ); + SAL_DLLPRIVATE void ImplSign( bool bScriptingContent = false ); + SAL_DLLPRIVATE bool QuerySaveSizeExceededModules_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& xHandler ); SAL_DLLPRIVATE void CheckOut( ); SAL_DLLPRIVATE void CancelCheckOut( ); @@ -700,12 +700,12 @@ public: struct ModifyBlocker_Impl { SfxObjectShell* pPersist; - sal_Bool bWasEnabled; + bool bWasEnabled; ModifyBlocker_Impl( SfxObjectShell* pPersistP ) : pPersist( pPersistP ) { bWasEnabled = pPersistP->IsEnableSetModified(); if ( bWasEnabled ) - pPersistP->EnableSetModified( sal_False ); + pPersistP->EnableSetModified( false ); } ~ModifyBlocker_Impl() { diff --git a/include/sfx2/opengrf.hxx b/include/sfx2/opengrf.hxx index 0a7c12c01c3d..83cce38846be 100644 --- a/include/sfx2/opengrf.hxx +++ b/include/sfx2/opengrf.hxx @@ -34,14 +34,14 @@ public: short Execute(); void SetPath( const OUString& rPath ); - void SetPath( const OUString& rPath, sal_Bool bLinkState ); + void SetPath( const OUString& rPath, bool bLinkState ); OUString GetPath() const; int GetGraphic(Graphic&) const; - void EnableLink(sal_Bool); - void AsLink(sal_Bool); - sal_Bool IsAsLink() const; + void EnableLink(bool); + void AsLink(bool); + bool IsAsLink() const; OUString GetCurrentFilter() const; void SetCurrentFilter(const OUString&); diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx index 84cac05f5568..d79c1d8b4478 100644 --- a/sc/source/filter/excel/impop.cxx +++ b/sc/source/filter/excel/impop.cxx @@ -199,7 +199,7 @@ void ImportExcel::ReadFileSharing() if( SfxObjectShell* pShell = GetDocShell() ) { if( nRecommendReadOnly != 0 ) - pShell->SetLoadReadonly( sal_True ); + pShell->SetLoadReadonly( true ); if( nPasswordHash != 0 ) pShell->SetModifyPasswordHash( nPasswordHash ); } diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 031387d90677..ce0e0b8458af 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -560,7 +560,7 @@ bool ScDocShell::SaveCurrentChart( SfxMedium& rMedium ) return bRet; } -sal_Bool ScDocShell::Load( SfxMedium& rMedium ) +bool ScDocShell::Load( SfxMedium& rMedium ) { LoadMediumGuard aLoadGuard(&aDocument); ScRefreshTimerProtector aProt( aDocument.GetRefreshTimerControlAddress() ); @@ -571,7 +571,7 @@ sal_Bool ScDocShell::Load( SfxMedium& rMedium ) GetUndoManager()->Clear(); - sal_Bool bRet = SfxObjectShell::Load( rMedium ); + bool bRet = SfxObjectShell::Load( rMedium ); if( bRet ) { if (GetMedium()) @@ -672,7 +672,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) // the readonly documents should not be opened in shared mode if ( HasSharedXMLFlagSet() && !SC_MOD()->IsInSharedDocLoading() && !IsReadOnly() ) { - if ( SwitchToShared( sal_True, false ) ) + if ( SwitchToShared( true, false ) ) { ScViewData* pViewData = GetViewData(); ScTabView* pTabView = ( pViewData ? dynamic_cast< ScTabView* >( pViewData->GetView() ) : NULL ); @@ -685,7 +685,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) { // switching to shared mode has failed, the document should be opened readonly // TODO/LATER: And error message should be shown here probably - SetReadOnlyUI( sal_True ); + SetReadOnlyUI( true ); } } #endif @@ -983,14 +983,14 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) } // Load contents for organizer -sal_Bool ScDocShell::LoadFrom( SfxMedium& rMedium ) +bool ScDocShell::LoadFrom( SfxMedium& rMedium ) { LoadMediumGuard aLoadGuard(&aDocument); ScRefreshTimerProtector aProt( aDocument.GetRefreshTimerControlAddress() ); WaitObject aWait( GetActiveDialogParent() ); - sal_Bool bRet = false; + bool bRet = false; if (GetMedium()) { @@ -1038,11 +1038,11 @@ static void lcl_parseHtmlFilterOption(const OUString& rOption, LanguageType& rLa rDateConvert = static_cast<bool>(aTokens[1].toInt32()); } -sal_Bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) +bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) { LoadMediumGuard aLoadGuard(&aDocument); - sal_Bool bRet = false; // sal_False means user quit! + bool bRet = false; // sal_False means user quit! // On error: Set error at stream ScRefreshTimerProtector aProt( aDocument.GetRefreshTimerControlAddress() ); @@ -1050,12 +1050,12 @@ sal_Bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) GetUndoManager()->Clear(); // Set optimal col width after import? - sal_Bool bSetColWidths = false; - sal_Bool bSetSimpleTextColWidths = false; + bool bSetColWidths = false; + bool bSetSimpleTextColWidths = false; ScColWidthParam aColWidthParam[MAXCOLCOUNT]; ScRange aColWidthRange; // Set optimal row height after import? - sal_Bool bSetRowHeights = false; + bool bSetRowHeights = false; vector<ScDocRowHeightUpdater::TabRanges> aRecalcRowRangesArray; @@ -1090,7 +1090,7 @@ sal_Bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) SetError(eError, OUString( OSL_LOG_PREFIX )); } else - bRet = sal_True; + bRet = true; } } else if (aFltName.equalsAscii(pFilterLotus)) @@ -1119,12 +1119,12 @@ sal_Bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) SetError(eError, OUString( OSL_LOG_PREFIX )); if( ( eError & ERRCODE_WARNING_MASK ) == ERRCODE_WARNING_MASK ) - bRet = sal_True; + bRet = true; } else - bRet = sal_True; - bSetColWidths = sal_True; - bSetRowHeights = sal_True; + bRet = true; + bSetColWidths = true; + bSetRowHeights = true; } else if ( aFltName.equalsAscii(pFilterExcel4) || aFltName.equalsAscii(pFilterExcel5) || aFltName.equalsAscii(pFilterExcel95) || aFltName.equalsAscii(pFilterExcel97) || @@ -1154,7 +1154,7 @@ sal_Bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) { if (!GetError()) SetError(eError, OUString( OSL_LOG_PREFIX )); - bRet = sal_True; + bRet = true; } else if (eError != eERR_OK) { @@ -1230,8 +1230,8 @@ sal_Bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) SCWARN_IMPORT_CELL_OVERFLOW)); SetError( nWarn, OUString( OSL_LOG_PREFIX )); } - bSetColWidths = sal_True; - bSetSimpleTextColWidths = sal_True; + bSetColWidths = true; + bSetSimpleTextColWidths = true; } else if (aFltName.equalsAscii(pFilterDBase)) { @@ -1264,7 +1264,7 @@ sal_Bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) bRet = ( eError == SCWARN_IMPORT_RANGE_OVERFLOW ); } else - bRet = sal_True; + bRet = true; aColWidthRange.aStart.SetRow( 1 ); // Except for the column header bSetColWidths = true; @@ -1301,14 +1301,14 @@ sal_Bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) SetError(eError, OUString( OSL_LOG_PREFIX )); if( ( eError & ERRCODE_WARNING_MASK ) == ERRCODE_WARNING_MASK ) - bRet = sal_True; + bRet = true; } else - bRet = sal_True; + bRet = true; } - bSetColWidths = sal_True; - bSetSimpleTextColWidths = sal_True; - bSetRowHeights = sal_True; + bSetColWidths = true; + bSetSimpleTextColWidths = true; + bSetRowHeights = true; } else if (aFltName.equalsAscii(pFilterSylk)) { @@ -1335,9 +1335,9 @@ sal_Bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) if ( eError != eERR_OK && !GetError() ) SetError(eError, OUString( OSL_LOG_PREFIX )); - bSetColWidths = sal_True; - bSetSimpleTextColWidths = sal_True; - bSetRowHeights = sal_True; + bSetColWidths = true; + bSetSimpleTextColWidths = true; + bSetRowHeights = true; } else if (aFltName.equalsAscii(pFilterQPro6)) { @@ -1347,15 +1347,15 @@ sal_Bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) if (!GetError()) SetError( eError, OUString( OSL_LOG_PREFIX ) ); if( ( eError & ERRCODE_WARNING_MASK ) == ERRCODE_WARNING_MASK ) - bRet = sal_True; + bRet = true; } else - bRet = sal_True; + bRet = true; // TODO: Filter should set column widths. Not doing it here, it may // result in very narrow or wide columns, depending on content. // Setting row heights makes cells with font size attribution or // wrapping enabled look nicer.. - bSetRowHeights = sal_True; + bSetRowHeights = true; } else if (aFltName.equalsAscii(pFilterRtf)) { @@ -1374,15 +1374,15 @@ sal_Bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) SetError(eError, OUString( OSL_LOG_PREFIX )); if( ( eError & ERRCODE_WARNING_MASK ) == ERRCODE_WARNING_MASK ) - bRet = sal_True; + bRet = true; } else - bRet = sal_True; + bRet = true; aDocument.StartAllListeners(); sc::SetFormulaDirtyContext aCxt; aDocument.SetAllFormulasDirty(aCxt); - bSetColWidths = sal_True; - bSetRowHeights = sal_True; + bSetColWidths = true; + bSetRowHeights = true; } else { @@ -1426,10 +1426,10 @@ sal_Bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) SetError(eError, OUString( OSL_LOG_PREFIX )); if( ( eError & ERRCODE_WARNING_MASK ) == ERRCODE_WARNING_MASK ) - bRet = sal_True; + bRet = true; } else - bRet = sal_True; + bRet = true; aDocument.StartAllListeners(); sc::SetFormulaDirtyContext aCxt; @@ -1603,7 +1603,7 @@ ScDocShell::PrepareSaveGuard::~PrepareSaveGuard() } -sal_Bool ScDocShell::Save() +bool ScDocShell::Save() { ScRefreshTimerProtector aProt( aDocument.GetRefreshTimerControlAddress() ); @@ -1623,7 +1623,7 @@ sal_Bool ScDocShell::Save() } } // wait cursor is handled with progress bar - sal_Bool bRet = SfxObjectShell::Save(); + bool bRet = SfxObjectShell::Save(); if( bRet ) bRet = SaveXML( GetMedium(), NULL ); return bRet; @@ -1646,7 +1646,7 @@ void popFileName(OUString& rPath) } -sal_Bool ScDocShell::SaveAs( SfxMedium& rMedium ) +bool ScDocShell::SaveAs( SfxMedium& rMedium ) { OUString aCurPath; // empty for new document that hasn't been saved. const SfxMedium* pCurMedium = GetMedium(); @@ -1691,7 +1691,7 @@ sal_Bool ScDocShell::SaveAs( SfxMedium& rMedium ) bool bChartExport = aFltName.indexOf("chart8") != -1; // wait cursor is handled with progress bar - sal_Bool bRet = false; + bool bRet = false; if(!bChartExport) { bRet = SfxObjectShell::SaveAs( rMedium ); @@ -1706,7 +1706,7 @@ sal_Bool ScDocShell::SaveAs( SfxMedium& rMedium ) } -sal_Bool ScDocShell::IsInformationLost() +bool ScDocShell::IsInformationLost() { //FIXME: If we have time build a correct own way how to handle this return SfxObjectShell::IsInformationLost(); @@ -2197,7 +2197,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt rStream.SetNumberFormatInt( nOldNumberFormatInt ); } -sal_Bool ScDocShell::ConvertTo( SfxMedium &rMed ) +bool ScDocShell::ConvertTo( SfxMedium &rMed ) { ScRefreshTimerProtector aProt( aDocument.GetRefreshTimerControlAddress() ); @@ -2211,7 +2211,7 @@ sal_Bool ScDocShell::ConvertTo( SfxMedium &rMed ) OSL_ENSURE( rMed.GetFilter(), "Filter == 0" ); - sal_Bool bRet = false; + bool bRet = false; OUString aFltName = rMed.GetFilter()->GetFilterName(); if (aFltName.equalsAscii(pFilterXML)) @@ -2302,7 +2302,7 @@ sal_Bool ScDocShell::ConvertTo( SfxMedium &rMed ) WaitObject aWait( GetActiveDialogParent() ); ScImportOptions aOptions( sItStr ); AsciiSave( *pStream, aOptions ); - bRet = sal_True; + bRet = true; if (aDocument.GetTableCount() > 1) if (!rMed.GetError()) @@ -2353,7 +2353,7 @@ sal_Bool ScDocShell::ConvertTo( SfxMedium &rMed ) } else { - bRet = sal_True; + bRet = true; if ( bHasMemo ) { SfxStringItem* pNameItem = @@ -2398,7 +2398,7 @@ sal_Bool ScDocShell::ConvertTo( SfxMedium &rMed ) WaitObject aWait( GetActiveDialogParent() ); ScFormatFilter::Get().ScExportDif( *pStream, &aDocument, ScAddress(0,0,0), ScGlobal::GetCharsetValue(sItStr) ); - bRet = sal_True; + bRet = true; if (aDocument.GetTableCount() > 1) if (!rMed.GetError()) @@ -2447,15 +2447,15 @@ sal_Bool ScDocShell::ConvertTo( SfxMedium &rMed ) } -sal_Bool ScDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xStor ) +bool ScDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xStor ) { return SfxObjectShell::SaveCompleted( xStor ); } -sal_Bool ScDocShell::DoSaveCompleted( SfxMedium * pNewStor ) +bool ScDocShell::DoSaveCompleted( SfxMedium * pNewStor ) { - sal_Bool bRet = SfxObjectShell::DoSaveCompleted( pNewStor ); + bool bRet = SfxObjectShell::DoSaveCompleted( pNewStor ); // SC_HINT_DOC_SAVED for change ReadOnly -> Read/Write Broadcast( SfxSimpleHint( SC_HINT_DOC_SAVED ) ); @@ -2463,7 +2463,7 @@ sal_Bool ScDocShell::DoSaveCompleted( SfxMedium * pNewStor ) } -sal_Bool ScDocShell::QuerySlotExecutable( sal_uInt16 nSlotId ) +bool ScDocShell::QuerySlotExecutable( sal_uInt16 nSlotId ) { // #i112634# ask VBA event handlers whether to save or print the document @@ -2485,7 +2485,7 @@ sal_Bool ScDocShell::QuerySlotExecutable( sal_uInt16 nSlotId ) break; } - sal_Bool bSlotExecutable = sal_True; + bool bSlotExecutable = true; if( nVbaEventId != VBAEventId::NO_EVENT ) try { uno::Reference< XVBAEventProcessor > xEventProcessor( aDocument.GetVbaEventProcessor(), uno::UNO_QUERY_THROW ); @@ -2774,7 +2774,7 @@ ScDocShell::~ScDocShell() return aDocument.GetUndoManager(); } -void ScDocShell::SetModified( sal_Bool bModified ) +void ScDocShell::SetModified( bool bModified ) { if ( SfxObjectShell::IsEnableSetModified() ) { @@ -2846,7 +2846,7 @@ void ScDocShell::SetDocumentModified( bool bIsModified /* = true */ ) */ void ScDocShell::SetDrawModified( bool bIsModified /* = true */ ) { - sal_Bool bUpdate = ( (bIsModified ? 1 : 0) != IsModified() ); + bool bUpdate = bIsModified != IsModified(); SetModified( bIsModified ); diff --git a/sc/source/ui/docshell/docsh2.cxx b/sc/source/ui/docshell/docsh2.cxx index 6428c22ed57e..bbda71a56c23 100644 --- a/sc/source/ui/docshell/docsh2.cxx +++ b/sc/source/ui/docshell/docsh2.cxx @@ -34,9 +34,9 @@ using namespace com::sun::star; -sal_Bool ScDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) +bool ScDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) { - sal_Bool bRet = SfxObjectShell::InitNew( xStor ); + bool bRet = SfxObjectShell::InitNew( xStor ); aDocument.MakeTable(0); diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index c68d39486c1a..f182ab152422 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -946,7 +946,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) EnableSharedSettings( true ); SC_MOD()->SetInSharedDocSaving( true ); - if ( !SwitchToShared( sal_True, sal_True ) ) + if ( !SwitchToShared( true, true ) ) { // TODO/LATER: what should be done in case the switch has failed? // for example in case the user has cancelled the saveAs operation @@ -1037,7 +1037,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) { xCloseable->close( sal_True ); - if ( !SwitchToShared( false, sal_True ) ) + if ( !SwitchToShared( false, true ) ) { // TODO/LATER: what should be done in case the switch has failed? // for example in case the user has cancelled the saveAs operation diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx index 900ed6f499e9..8fd82092b8ff 100644 --- a/sc/source/ui/inc/docsh.hxx +++ b/sc/source/ui/inc/docsh.hxx @@ -201,22 +201,22 @@ public: sal_Int32 nFileFormat, bool bTemplate = false ) const; - virtual sal_Bool InitNew( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& ); - virtual sal_Bool Load( SfxMedium& rMedium ); - virtual sal_Bool LoadFrom( SfxMedium& rMedium ); - virtual sal_Bool ConvertFrom( SfxMedium &rMedium ); + virtual bool InitNew( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& ); + virtual bool Load( SfxMedium& rMedium ); + virtual bool LoadFrom( SfxMedium& rMedium ); + virtual bool ConvertFrom( SfxMedium &rMedium ); virtual bool LoadExternal( SfxMedium& rMedium ); - virtual sal_Bool Save(); - virtual sal_Bool SaveAs( SfxMedium& rMedium ); - virtual sal_Bool ConvertTo( SfxMedium &rMedium ); + virtual bool Save(); + virtual bool SaveAs( SfxMedium& rMedium ); + virtual bool ConvertTo( SfxMedium &rMedium ); virtual bool PrepareClose( sal_Bool bUI = sal_True ) SAL_OVERRIDE; virtual void PrepareReload(); - virtual sal_Bool IsInformationLost(); + virtual bool IsInformationLost(); virtual void LoadStyles( SfxObjectShell &rSource ); - virtual sal_Bool SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& ); // SfxInPlaceObject - virtual sal_Bool DoSaveCompleted( SfxMedium * pNewStor); // SfxObjectShell - virtual sal_Bool QuerySlotExecutable( sal_uInt16 nSlotId ); + virtual bool SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& ); // SfxInPlaceObject + virtual bool DoSaveCompleted( SfxMedium * pNewStor); // SfxObjectShell + virtual bool QuerySlotExecutable( sal_uInt16 nSlotId ); virtual void Draw( OutputDevice *, const JobSetup & rSetup, sal_uInt16 nAspect = ASPECT_CONTENT ); @@ -228,7 +228,7 @@ public: virtual Printer* GetDocumentPrinter(); - virtual void SetModified( sal_Bool = sal_True ); + virtual void SetModified( bool = true ); void SetVisAreaOrSize( const Rectangle& rVisArea, bool bModifyStart ); diff --git a/sc/source/ui/view/tabvwsh5.cxx b/sc/source/ui/view/tabvwsh5.cxx index dbd66ceff488..53ecb8bbe56d 100644 --- a/sc/source/ui/view/tabvwsh5.cxx +++ b/sc/source/ui/view/tabvwsh5.cxx @@ -109,7 +109,7 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) // dieser Hint kommt, den Design-Modus immer dann umschalten, wenn der // ReadOnly-Status sich wirklich geaendert hat: - if ( GetViewData()->GetSfxDocShell()->IsReadOnly() != (bReadOnly ? 1 : 0) ) + if ( GetViewData()->GetSfxDocShell()->IsReadOnly() != bReadOnly ) { bReadOnly = GetViewData()->GetSfxDocShell()->IsReadOnly(); diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx index d1211c4f6aea..63de29cdc04d 100644 --- a/sd/source/core/drawdoc2.cxx +++ b/sd/source/core/drawdoc2.cxx @@ -858,7 +858,7 @@ LanguageType SdDrawDocument::GetLanguage( const sal_uInt16 nId ) const IMPL_LINK_NOARG(SdDrawDocument, WorkStartupHdl) { if( mpDocSh ) - mpDocSh->SetWaitCursor( sal_True ); + mpDocSh->SetWaitCursor( true ); sal_Bool bChanged = IsChanged(); // remember this @@ -890,7 +890,7 @@ IMPL_LINK_NOARG(SdDrawDocument, WorkStartupHdl) SetChanged(bChanged); if( mpDocSh ) - mpDocSh->SetWaitCursor( sal_False ); + mpDocSh->SetWaitCursor( false ); return 0; } diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index f8654f0dbe15..b7c9d83f3df6 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -1393,7 +1393,7 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum, sal_Bool bCheckMasters) { if( mpDocSh ) - mpDocSh->SetWaitCursor( sal_True ); + mpDocSh->SetWaitCursor( true ); ::svl::IUndoManager* pUndoMgr = mpDocSh->GetUndoManager(); @@ -1467,7 +1467,7 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum, pUndoMgr->LeaveListAction(); if( mpDocSh ) - mpDocSh->SetWaitCursor( sal_False ); + mpDocSh->SetWaitCursor( false ); OSL_FAIL( "SdDrawDocument::SetMasterPage() failed!" ); @@ -1892,7 +1892,7 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum, pUndoMgr->LeaveListAction(); if( mpDocSh ) - mpDocSh->SetWaitCursor( sal_False ); + mpDocSh->SetWaitCursor( false ); } void SdDrawDocument::Merge(SdrModel& rSourceModel, diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx index f8429c582333..71a2dc210ee6 100644 --- a/sd/source/core/drawdoc4.cxx +++ b/sd/source/core/drawdoc4.cxx @@ -1353,13 +1353,13 @@ void ModifyGuard::init() mbIsDocumentChanged = mpDoc ? mpDoc->IsChanged() : false; if( mbIsEnableSetModified ) - mpDocShell->EnableSetModified( sal_False ); + mpDocShell->EnableSetModified( false ); } ModifyGuard::~ModifyGuard() { if( mbIsEnableSetModified ) - mpDocShell->EnableSetModified( sal_True ); + mpDocShell->EnableSetModified( true ); if( mpDoc && (mpDoc->IsChanged() != mbIsDocumentChanged) ) mpDoc->SetChanged(mbIsDocumentChanged); diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx index 38ff219d8124..16600d157e4c 100644 --- a/sd/source/filter/html/htmlex.cxx +++ b/sd/source/filter/html/htmlex.cxx @@ -801,7 +801,7 @@ void HtmlExport::ExportWebCast() mnPagesWritten = 0; InitProgress( mnSdPageCount + 9 ); - mpDocSh->SetWaitCursor( sal_True ); + mpDocSh->SetWaitCursor( true ); CreateFileNames(); diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx index 2e1c6fd5d246..5fa4be3d37db 100644 --- a/sd/source/ui/annotations/annotationwindow.cxx +++ b/sd/source/ui/annotations/annotationwindow.cxx @@ -648,7 +648,7 @@ void AnnotationWindow::Deactivate() if( mpDoc->IsUndoEnabled() ) mpDoc->EndUndo(); - DocView()->GetDocSh()->SetModified(sal_True); + DocView()->GetDocSh()->SetModified(true); } } diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx index d4cd23b18792..61f4030c8c50 100644 --- a/sd/source/ui/app/sdmod1.cxx +++ b/sd/source/ui/app/sdmod1.cxx @@ -707,7 +707,7 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq ) pDoc->SetChanged(!bIsDocEmpty); - pDocShell->SetUseUserData(sal_True); + pDocShell->SetUseUserData(true); // clear UNDO stack after autopilot pDocShell->ClearUndoBuffer(); diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx index 24ba06bb54a2..71f2251d745a 100644 --- a/sd/source/ui/app/sdxfer.cxx +++ b/sd/source/ui/app/sdxfer.cxx @@ -613,7 +613,7 @@ sal_Bool SdTransferable::WriteObject( SotStorageStreamRef& rxOStm, void* pObject pEmbObj->SetupStorage( xWorkStore, SOFFICE_FILEFORMAT_CURRENT, false ); // mba: no relative ULRs for clipboard! SfxMedium aMedium( xWorkStore, OUString() ); - bRet = pEmbObj->DoSaveObjectAs( aMedium, sal_False ); + bRet = pEmbObj->DoSaveObjectAs( aMedium, false ); pEmbObj->DoSaveCompleted(); uno::Reference< embed::XTransactedObject > xTransact( xWorkStore, uno::UNO_QUERY ); diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx index 3ccf8ab54a82..eb759625df3d 100644 --- a/sd/source/ui/dlg/navigatr.cxx +++ b/sd/source/ui/dlg/navigatr.cxx @@ -709,7 +709,7 @@ void SdNavigatorWin::RefreshDocumentLB( const OUString* pDocName ) ::sd::DrawDocShell* pCurrentDocShell = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current() ); - SfxObjectShell* pSfxDocShell = SfxObjectShell::GetFirst(0, sal_False); + SfxObjectShell* pSfxDocShell = SfxObjectShell::GetFirst(0, false); while( pSfxDocShell ) { ::sd::DrawDocShell* pDocShell = PTR_CAST(::sd::DrawDocShell, pSfxDocShell ); @@ -738,7 +738,7 @@ void SdNavigatorWin::RefreshDocumentLB( const OUString* pDocName ) maDocList.push_back( aInfo ); } - pSfxDocShell = SfxObjectShell::GetNext( *pSfxDocShell, 0 , sal_False ); + pSfxDocShell = SfxObjectShell::GetNext( *pSfxDocShell, 0, false ); } } maLbDocs.SelectEntryPos( nPos ); diff --git a/sd/source/ui/dlg/vectdlg.cxx b/sd/source/ui/dlg/vectdlg.cxx index 7ad6dc631ae2..6fdab807f8de 100644 --- a/sd/source/ui/dlg/vectdlg.cxx +++ b/sd/source/ui/dlg/vectdlg.cxx @@ -134,7 +134,7 @@ Bitmap SdVectorizeDlg::GetPreparedBitmap( Bitmap& rBmp, Fraction& rScale ) void SdVectorizeDlg::Calculate( Bitmap& rBmp, GDIMetaFile& rMtf ) { - mpDocSh->SetWaitCursor( sal_True ); + mpDocSh->SetWaitCursor( true ); m_pPrgs->SetValue( 0 ); Fraction aScale; @@ -202,7 +202,7 @@ void SdVectorizeDlg::Calculate( Bitmap& rBmp, GDIMetaFile& rMtf ) } m_pPrgs->SetValue( 0 ); - mpDocSh->SetWaitCursor( sal_False ); + mpDocSh->SetWaitCursor( false ); } void SdVectorizeDlg::AddTile( BitmapReadAccess* pRAcc, GDIMetaFile& rMtf, diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index 6027f7374e50..1a4296ad9d50 100644 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -242,9 +242,9 @@ void DrawDocShell::UpdateRefDevice() /** * Creates new document, opens streams */ -sal_Bool DrawDocShell::InitNew( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ) +bool DrawDocShell::InitNew( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ) { - sal_Bool bRet = SfxObjectShell::InitNew( xStorage ); + bool bRet = SfxObjectShell::InitNew( xStorage ); Rectangle aVisArea( Point(0, 0), Size(14100, 10000) ); SetVisArea(aVisArea); @@ -262,12 +262,12 @@ sal_Bool DrawDocShell::InitNew( const ::com::sun::star::uno::Reference< ::com::s /** * loads pools and document */ -sal_Bool DrawDocShell::Load( SfxMedium& rMedium ) +bool DrawDocShell::Load( SfxMedium& rMedium ) { mbNewDocument = sal_False; sal_Bool bRet = sal_False; - bool bStartPresentation = false; + bool bStartPresentation = false; ErrCode nError = ERRCODE_NONE; SfxItemSet* pSet = rMedium.GetItemSet(); @@ -314,7 +314,7 @@ sal_Bool DrawDocShell::Load( SfxMedium& rMedium ) FinishedLoading( SFX_LOADED_ALL ); const INetURLObject aUrl; - SfxObjectShell::SetAutoLoad( aUrl, 0, sal_False ); + SfxObjectShell::SetAutoLoad( aUrl, 0, false ); } else { @@ -341,7 +341,7 @@ sal_Bool DrawDocShell::Load( SfxMedium& rMedium ) /** * loads content for organizer */ -sal_Bool DrawDocShell::LoadFrom( SfxMedium& rMedium ) +bool DrawDocShell::LoadFrom( SfxMedium& rMedium ) { mbNewDocument = sal_False; @@ -355,7 +355,7 @@ sal_Bool DrawDocShell::LoadFrom( SfxMedium& rMedium ) // TODO/LATER: nobody is interested in the error code?! ErrCode nError = ERRCODE_NONE; - sal_Bool bRet = SdXMLFilter( rMedium, *this, sal_True, SDXMLMODE_Organizer, SotStorage::GetVersion( rMedium.GetStorage() ) ).Import( nError ); + bool bRet = SdXMLFilter( rMedium, *this, sal_True, SDXMLMODE_Organizer, SotStorage::GetVersion( rMedium.GetStorage() ) ).Import( nError ); // tell SFX to change viewshell when in preview mode @@ -404,15 +404,15 @@ bool DrawDocShell::ImportFrom(SfxMedium &rMedium, /** * load from a foreign format */ -sal_Bool DrawDocShell::ConvertFrom( SfxMedium& rMedium ) +bool DrawDocShell::ConvertFrom( SfxMedium& rMedium ) { mbNewDocument = sal_False; - const OUString aFilterName( rMedium.GetFilter()->GetFilterName() ); - sal_Bool bRet = sal_False; - bool bStartPresentation = false; + const OUString aFilterName( rMedium.GetFilter()->GetFilterName() ); + bool bRet = false; + bool bStartPresentation = false; - SetWaitCursor( sal_True ); + SetWaitCursor( true ); SfxItemSet* pSet = rMedium.GetItemSet(); if( pSet ) @@ -479,7 +479,7 @@ sal_Bool DrawDocShell::ConvertFrom( SfxMedium& rMedium ) if( pMediumSet ) pMediumSet->Put( SfxUInt16Item( SID_VIEW_ID, 5 ) ); } - SetWaitCursor( sal_False ); + SetWaitCursor( false ); // tell SFX to change viewshell when in preview mode if( IsPreview() || bStartPresentation ) @@ -495,7 +495,7 @@ sal_Bool DrawDocShell::ConvertFrom( SfxMedium& rMedium ) /** * Writes pools and document to the open streams */ -sal_Bool DrawDocShell::Save() +bool DrawDocShell::Save() { mpDoc->StopWorkStartupDelay(); @@ -503,7 +503,7 @@ sal_Bool DrawDocShell::Save() if( GetCreateMode() == SFX_CREATE_MODE_STANDARD ) SfxObjectShell::SetVisArea( Rectangle() ); - sal_Bool bRet = SfxObjectShell::Save(); + bool bRet = SfxObjectShell::Save(); if( bRet ) { @@ -519,7 +519,7 @@ sal_Bool DrawDocShell::Save() /** * Writes pools and document to the provided storage */ -sal_Bool DrawDocShell::SaveAs( SfxMedium& rMedium ) +bool DrawDocShell::SaveAs( SfxMedium& rMedium ) { mpDoc->setDocAccTitle(OUString()); SfxViewFrame* pFrame1 = SfxViewFrame::GetFirst( this ); @@ -542,7 +542,7 @@ sal_Bool DrawDocShell::SaveAs( SfxMedium& rMedium ) SfxObjectShell::SetVisArea( Rectangle() ); sal_uInt32 nVBWarning = ERRCODE_NONE; - sal_Bool bRet = SfxObjectShell::SaveAs( rMedium ); + bool bRet = SfxObjectShell::SaveAs( rMedium ); if( bRet ) { @@ -560,9 +560,9 @@ sal_Bool DrawDocShell::SaveAs( SfxMedium& rMedium ) /** * save to foreign format */ -sal_Bool DrawDocShell::ConvertTo( SfxMedium& rMedium ) +bool DrawDocShell::ConvertTo( SfxMedium& rMedium ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( mpDoc->GetPageCount() ) { @@ -621,9 +621,9 @@ sal_Bool DrawDocShell::ConvertTo( SfxMedium& rMedium ) * Reopen own streams to ensure that nobody else can prevent use from opening * them. */ -sal_Bool DrawDocShell::SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ) +bool DrawDocShell::SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( SfxObjectShell::SaveCompleted(xStorage) ) { @@ -646,7 +646,7 @@ sal_Bool DrawDocShell::SaveCompleted( const ::com::sun::star::uno::Reference< :: } } - bRet = sal_True; + bRet = true; SfxViewFrame* pFrame = ( mpViewShell && mpViewShell->GetViewFrame() ) ? mpViewShell->GetViewFrame() : @@ -1080,7 +1080,7 @@ sal_Bool DrawDocShell::GotoTreeBookmark(const OUString& rBookmark) /** * If it should become a document template. */ -sal_Bool DrawDocShell::SaveAsOwnFormat( SfxMedium& rMedium ) +bool DrawDocShell::SaveAsOwnFormat( SfxMedium& rMedium ) { const SfxFilter* pFilter = rMedium.GetFilter(); diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx index a838deaaac72..518eabf0712b 100644 --- a/sd/source/ui/docshell/docshell.cxx +++ b/sd/source/ui/docshell/docshell.cxx @@ -289,7 +289,7 @@ void DrawDocShell::GetState(SfxItemSet &rSet) } } -void DrawDocShell::InPlaceActivate( sal_Bool bActive ) +void DrawDocShell::InPlaceActivate( bool bActive ) { ViewShell* pViewSh = NULL; SfxViewShell* pSfxViewSh = NULL; @@ -407,7 +407,7 @@ void DrawDocShell::ApplySlotFilter() const } } -void DrawDocShell::SetModified( sal_Bool bSet /* = sal_True */ ) +void DrawDocShell::SetModified( bool bSet /* = true */ ) { SfxObjectShell::SetModified( bSet ); diff --git a/sd/source/ui/func/fucopy.cxx b/sd/source/ui/func/fucopy.cxx index a2b1b1de2e3a..d2453fcf022d 100644 --- a/sd/source/ui/func/fucopy.cxx +++ b/sd/source/ui/func/fucopy.cxx @@ -176,7 +176,7 @@ void FuCopy::DoExecute( SfxRequest& rReq ) aStr += " " + SD_RESSTR( STR_UNDO_COPYOBJECTS ); pProgress = new SfxProgress( mpDocSh, aStr, nNumber ); - mpDocSh->SetWaitCursor( sal_True ); + mpDocSh->SetWaitCursor( true ); bWaiting = sal_True; } @@ -281,7 +281,7 @@ void FuCopy::DoExecute( SfxRequest& rReq ) delete pProgress; if ( bWaiting ) - mpDocSh->SetWaitCursor( sal_False ); + mpDocSh->SetWaitCursor( false ); // show handles mpView->AdjustMarkHdl(); //HMH sal_True ); diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx index 95300a078bc3..b9de965cba98 100644 --- a/sd/source/ui/func/fuinsfil.cxx +++ b/sd/source/ui/func/fuinsfil.cxx @@ -247,7 +247,7 @@ void FuInsertFile::DoExecute( SfxRequest& rReq ) aFilterName = pFilterName->GetValue (); } - mpDocSh->SetWaitCursor( sal_True ); + mpDocSh->SetWaitCursor( true ); SfxMedium* pMedium = new SfxMedium( aFile, STREAM_READ | STREAM_NOCREATE ); const SfxFilter* pFilter = NULL; @@ -303,7 +303,7 @@ void FuInsertFile::DoExecute( SfxRequest& rReq ) } } - mpDocSh->SetWaitCursor( sal_False ); + mpDocSh->SetWaitCursor( false ); if( !bInserted ) { @@ -319,7 +319,7 @@ sal_Bool FuInsertFile::InsSDDinDrMode(SfxMedium* pMedium) { sal_Bool bOK = sal_False; - mpDocSh->SetWaitCursor( sal_False ); + mpDocSh->SetWaitCursor( false ); SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); AbstractSdInsertPagesObjsDlg* pDlg = pFact ? pFact->CreateSdInsertPagesObjsDlg( NULL, mpDoc, pMedium, aFile ) : 0; @@ -335,7 +335,7 @@ sal_Bool FuInsertFile::InsSDDinDrMode(SfxMedium* pMedium) GetpApp()->SetDefDialogParent(pDefParent); - mpDocSh->SetWaitCursor( sal_True ); + mpDocSh->SetWaitCursor( true ); if( nRet == RET_OK ) { @@ -418,10 +418,10 @@ void FuInsertFile::InsTextOrRTFinDrMode(SfxMedium* pMedium) if( !pDlg ) return; - mpDocSh->SetWaitCursor( sal_False ); + mpDocSh->SetWaitCursor( false ); sal_uInt16 nRet = pDlg->Execute(); - mpDocSh->SetWaitCursor( sal_True ); + mpDocSh->SetWaitCursor( true ); if( nRet == RET_OK ) { @@ -629,7 +629,7 @@ void FuInsertFile::InsTextOrRTFinOlMode(SfxMedium* pMedium) pPara = pOutliner->GetParagraph( ++nPos ); } - mpDocSh->SetWaitCursor( sal_False ); + mpDocSh->SetWaitCursor( false ); SfxProgress* pProgress = new SfxProgress( mpDocSh, SD_RESSTR(STR_CREATE_PAGES), nNewPages); if( pProgress ) @@ -678,7 +678,7 @@ void FuInsertFile::InsTextOrRTFinOlMode(SfxMedium* pMedium) if( pProgress ) delete pProgress; - mpDocSh->SetWaitCursor( sal_True ); + mpDocSh->SetWaitCursor( true ); } delete pOutliner; diff --git a/sd/source/ui/func/fuprlout.cxx b/sd/source/ui/func/fuprlout.cxx index d1786136c620..05f015109155 100644 --- a/sd/source/ui/func/fuprlout.cxx +++ b/sd/source/ui/func/fuprlout.cxx @@ -176,7 +176,7 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq ) if (!bError) { - mpDocSh->SetWaitCursor( sal_True ); + mpDocSh->SetWaitCursor( true ); /* Here, we only exchange masterpages, therefore the current page remains the current page. To prevent calling PageOrderChangedHint @@ -250,7 +250,7 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq ) pDrawViewSh->ChangeEditMode( eMode, bLayer ); } - mpDocSh->SetWaitCursor( sal_False ); + mpDocSh->SetWaitCursor( false ); } } diff --git a/sd/source/ui/inc/DrawDocShell.hxx b/sd/source/ui/inc/DrawDocShell.hxx index 055392ad8ec8..031ed17217f0 100644 --- a/sd/source/ui/inc/DrawDocShell.hxx +++ b/sd/source/ui/inc/DrawDocShell.hxx @@ -73,19 +73,19 @@ public: void UpdateRefDevice(); virtual void Activate( sal_Bool bMDI ); virtual void Deactivate( sal_Bool bMDI ); - virtual sal_Bool InitNew( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ); + virtual bool InitNew( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ); virtual bool ImportFrom(SfxMedium &rMedium, css::uno::Reference<css::text::XTextRange> const& xInsertPosition) SAL_OVERRIDE; - virtual sal_Bool ConvertFrom( SfxMedium &rMedium ); - virtual sal_Bool Save(); - virtual sal_Bool SaveAsOwnFormat( SfxMedium& rMedium ); - virtual sal_Bool ConvertTo( SfxMedium &rMedium ); - virtual sal_Bool SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ); + virtual bool ConvertFrom( SfxMedium &rMedium ); + virtual bool Save(); + virtual bool SaveAsOwnFormat( SfxMedium& rMedium ); + virtual bool ConvertTo( SfxMedium &rMedium ); + virtual bool SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ); - virtual sal_Bool Load( SfxMedium &rMedium ); - virtual sal_Bool LoadFrom( SfxMedium& rMedium ); - virtual sal_Bool SaveAs( SfxMedium &rMedium ); + virtual bool Load( SfxMedium &rMedium ); + virtual bool LoadFrom( SfxMedium& rMedium ); + virtual bool SaveAs( SfxMedium &rMedium ); virtual Rectangle GetVisArea(sal_uInt16 nAspect) const; virtual void Draw(OutputDevice*, const JobSetup& rSetup, sal_uInt16 nAspect = ASPECT_CONTENT); @@ -96,7 +96,7 @@ public: virtual SfxStyleSheetBasePool* GetStyleSheetPool(); virtual Size GetFirstPageSize(); virtual void FillClass(SvGlobalName* pClassName, sal_uInt32* pFormat, OUString* pAppName, OUString* pFullTypeName, OUString* pShortTypeName, sal_Int32 nFileFormat, bool bTemplate = false ) const; - virtual void SetModified( sal_Bool = sal_True ); + virtual void SetModified( bool = true ); virtual SfxDocumentInfoDialog* CreateDocumentInfoDialog( ::Window *pParent, const SfxItemSet &rSet ); @@ -221,7 +221,7 @@ protected: bool mbOwnDocument; // if true, we own mpDoc and will delete it in our d'tor void Construct(bool bClipboard); - virtual void InPlaceActivate( sal_Bool bActive ); + virtual void InPlaceActivate( bool bActive ); public: virtual void setDocAccTitle( const OUString& rTitle ); virtual const OUString getDocAccTitle() const; diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx index d3e65e9f8d19..802caaa90c21 100644 --- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx +++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx @@ -458,7 +458,7 @@ throw (UnknownPropertyException, PropertyVetoException, case HANDLE_APPLYUSERDATA: { - sal_Bool bApplyUserData = sal_False; + bool bApplyUserData = false; if( *pValues >>= bApplyUserData ) { bChanged = ( bApplyUserData != pDocSh->IsUseUserData() ); @@ -858,7 +858,7 @@ throw (UnknownPropertyException, PropertyVetoException, } case HANDLE_UPDATEFROMTEMPLATE: { - sal_Bool value = sal_False; + bool value = false; if( *pValues >>= value ) { bChanged = ( value != pDocSh->IsQueryLoadTemplate() ); @@ -888,7 +888,7 @@ throw (UnknownPropertyException, PropertyVetoException, // --> #i33095# case HANDLE_LOAD_READONLY: { - sal_Bool bNewValue = sal_False; + bool bNewValue = false; if ( *pValues >>= bNewValue ) { bChanged = ( pDocSh->IsLoadReadonly() != bNewValue ); @@ -900,7 +900,7 @@ throw (UnknownPropertyException, PropertyVetoException, case HANDLE_SAVE_VERSION: { - sal_Bool bNewValue = sal_False; + bool bNewValue = false; if ( *pValues >>= bNewValue ) { bChanged = ( pDocSh->IsSaveVersionOnClose() != bNewValue ); diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index 89b62d27fa01..c59b1600ff59 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -387,7 +387,7 @@ bool Outliner::SpellNextDocument (void) { if (mpView->ISA(OutlineView)) ((OutlineView*)mpView)->PrepareClose(sal_False); - mpDrawDocument->GetDocSh()->SetWaitCursor( sal_True ); + mpDrawDocument->GetDocSh()->SetWaitCursor( true ); Initialize (true); @@ -397,7 +397,7 @@ bool Outliner::SpellNextDocument (void) pOutlinerView->SetWindow(mpWindow); ProvideNextTextObject (); - mpDrawDocument->GetDocSh()->SetWaitCursor( sal_False ); + mpDrawDocument->GetDocSh()->SetWaitCursor( false ); ClearModifyFlag(); } @@ -460,7 +460,7 @@ bool Outliner::StartSearchAndReplace (const SvxSearchItem* pSearchItem) { sal_Bool bEndOfSearch = sal_True; - mpDrawDocument->GetDocSh()->SetWaitCursor( sal_True ); + mpDrawDocument->GetDocSh()->SetWaitCursor( true ); if (mbPrepareSpellingPending) PrepareSpelling(); ViewShellBase* pBase = PTR_CAST(ViewShellBase,SfxViewShell::Current()); @@ -530,7 +530,7 @@ bool Outliner::StartSearchAndReplace (const SvxSearchItem* pSearchItem) } } else - mpDrawDocument->GetDocSh()->SetWaitCursor( sal_False ); + mpDrawDocument->GetDocSh()->SetWaitCursor( false ); return bEndOfSearch; } @@ -713,7 +713,7 @@ bool Outliner::SearchAndReplaceOnce (void) "SearchAndReplace without valid view!" ); if ( ! GetEditEngine().HasView( &pOutlinerView->GetEditView() ) ) { - mpDrawDocument->GetDocSh()->SetWaitCursor( sal_False ); + mpDrawDocument->GetDocSh()->SetWaitCursor( false ); return true; } @@ -724,7 +724,7 @@ bool Outliner::SearchAndReplaceOnce (void) } else if (pViewShell->ISA(OutlineViewShell)) { - mpDrawDocument->GetDocSh()->SetWaitCursor (sal_False); + mpDrawDocument->GetDocSh()->SetWaitCursor(false); // The following loop is executed more then once only when a // wrap arround search is done. while (true) @@ -745,7 +745,7 @@ bool Outliner::SearchAndReplaceOnce (void) } } - mpDrawDocument->GetDocSh()->SetWaitCursor( sal_False ); + mpDrawDocument->GetDocSh()->SetWaitCursor( false ); return mbEndOfSearch; } @@ -1251,7 +1251,7 @@ void Outliner::PrepareSearchAndReplace (void) EnterEditMode (); - mpDrawDocument->GetDocSh()->SetWaitCursor( sal_False ); + mpDrawDocument->GetDocSh()->SetWaitCursor( false ); // Start seach at the right end of the current object's text // depending on the search direction. OutlinerView* pOutlinerView = mpImpl->GetOutlinerView(); @@ -1590,7 +1590,7 @@ void Outliner::PrepareConversion (void) EnterEditMode (); - mpDrawDocument->GetDocSh()->SetWaitCursor( sal_False ); + mpDrawDocument->GetDocSh()->SetWaitCursor( false ); // Start seach at the right end of the current object's text // depending on the search direction. } @@ -1649,7 +1649,7 @@ bool Outliner::ConvertNextDocument() if (pViewShell && pViewShell->ISA(OutlineViewShell) ) return false; - mpDrawDocument->GetDocSh()->SetWaitCursor( sal_True ); + mpDrawDocument->GetDocSh()->SetWaitCursor( true ); Initialize ( true ); @@ -1661,7 +1661,7 @@ bool Outliner::ConvertNextDocument() } ProvideNextTextObject (); - mpDrawDocument->GetDocSh()->SetWaitCursor( sal_False ); + mpDrawDocument->GetDocSh()->SetWaitCursor( false ); ClearModifyFlag(); // for text conversion we automaticly wrap around one diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx index 8d54b697e5f6..1fa6374a3ebd 100644 --- a/sd/source/ui/view/drawview.cxx +++ b/sd/source/ui/view/drawview.cxx @@ -177,7 +177,7 @@ sal_Bool DrawView::SetAttributes(const SfxItemSet& rSet, ::Outliner* pOutliner = pOV->GetOutliner(); pOutliner->SetUpdateMode(false); - mpDocSh->SetWaitCursor( sal_True ); + mpDocSh->SetWaitCursor( true ); // replace placeholder by template name OUString aComment(SD_RESSTR(STR_UNDO_CHANGE_PRES_OBJECT)); @@ -236,7 +236,7 @@ sal_Bool DrawView::SetAttributes(const SfxItemSet& rSet, pPara = pOutliner->GetParagraph( 0 ); // Put NumBulletItem in outline level 1 } - mpDocSh->SetWaitCursor( sal_False ); + mpDocSh->SetWaitCursor( false ); pOV->GetOutliner()->SetUpdateMode(true); mpDocSh->GetUndoManager()->LeaveListAction(); diff --git a/sd/source/ui/view/drviews9.cxx b/sd/source/ui/view/drviews9.cxx index ad9d93146d88..597a3dd22adf 100644 --- a/sd/source/ui/view/drviews9.cxx +++ b/sd/source/ui/view/drviews9.cxx @@ -75,7 +75,7 @@ void DrawViewShell::ExecGallery(SfxRequest& rReq) if ( !pGalleryItem ) return; - GetDocSh()->SetWaitCursor( sal_True ); + GetDocSh()->SetWaitCursor( true ); sal_Int8 nType( pGalleryItem->GetType() ); // insert graphic @@ -180,7 +180,7 @@ void DrawViewShell::ExecGallery(SfxRequest& rReq) GetViewFrame()->GetDispatcher()->Execute( SID_INSERT_AVMEDIA, SFX_CALLMODE_SYNCHRON, &aMediaURLItem, 0L ); } - GetDocSh()->SetWaitCursor( sal_False ); + GetDocSh()->SetWaitCursor( false ); } diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx index da812e4d30f5..d981d7a55a8c 100644 --- a/sd/source/ui/view/drviewsa.cxx +++ b/sd/source/ui/view/drviewsa.cxx @@ -796,7 +796,7 @@ void DrawViewShell::Notify (SfxBroadcaster&, const SfxHint& rHint) } // Turn on design mode when document is not read-only. - if (GetDocSh()->IsReadOnly() != mbReadOnly ) + if ((GetDocSh()->IsReadOnly() ? 1 : 0) != mbReadOnly ) { mbReadOnly = GetDocSh()->IsReadOnly(); diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx index 76abf4f257a0..692a70e76554 100644 --- a/sd/source/ui/view/outlview.cxx +++ b/sd/source/ui/view/outlview.cxx @@ -617,7 +617,7 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner *, pOutliner ) } else { - mpDocSh->SetWaitCursor( sal_True ); + mpDocSh->SetWaitCursor( true ); } } @@ -641,7 +641,7 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner *, pOutliner ) mpProgress = NULL; } else - mpDocSh->SetWaitCursor( sal_False ); + mpDocSh->SetWaitCursor( false ); mnPagesToProcess = 0; mnPagesProcessed = 0; diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx index 01626f7192e8..7c319ba9944c 100644 --- a/sd/source/ui/view/viewshe2.cxx +++ b/sd/source/ui/view/viewshe2.cxx @@ -736,7 +736,7 @@ sal_Bool ViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb) SfxErrorContext aEC(ERRCTX_SO_DOVERB, GetActiveWindow(), RID_SO_ERRCTX); sal_Bool bAbort = sal_False; - GetDocSh()->SetWaitCursor( sal_True ); + GetDocSh()->SetWaitCursor( true ); SfxViewShell* pViewShell = GetViewShell(); OSL_ASSERT (pViewShell!=NULL); bool bChangeDefaultsForChart = false; @@ -777,12 +777,12 @@ sal_Bool ViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb) aName = ""; // call dialog "insert OLE object" - GetDocSh()->SetWaitCursor( sal_False ); + GetDocSh()->SetWaitCursor( false ); pViewShell->GetViewFrame()->GetDispatcher()->Execute( SID_INSERT_OBJECT, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD); xObj = pObj->GetObjRef(); - GetDocSh()->SetWaitCursor( sal_True ); + GetDocSh()->SetWaitCursor( true ); if (!xObj.is()) { @@ -886,7 +886,7 @@ sal_Bool ViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb) SID_NAVIGATOR_STATE, true, false); } - GetDocSh()->SetWaitCursor( sal_False ); + GetDocSh()->SetWaitCursor( false ); if (aErrCode != 0 && !bAbort) { diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx index 095bd5e698bf..57f383d197ac 100644 --- a/sfx2/source/appl/appopen.cxx +++ b/sfx2/source/appl/appopen.cxx @@ -416,7 +416,7 @@ sal_uIntPtr SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const OUStri xDoc->SetNoName(); xDoc->InvalidateName(); - xDoc->SetModified(sal_False); + xDoc->SetModified(false); xDoc->ResetError(); ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > xModel ( xDoc->GetModel(), ::com::sun::star::uno::UNO_QUERY ); diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 91ebed71fd69..3e8a8939def8 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -287,7 +287,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) continue; if ( pObjSh->PrepareClose(2) ) - pObjSh->SetModified( sal_False ); + pObjSh->SetModified( false ); else return; } @@ -1078,7 +1078,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq ) { SfxObjectShell* pBasicIDE = SfxObjectShell::CreateObject( lcl_getBasicIDEServiceName() ); pBasicIDE->DoInitNew( 0 ); - pBasicIDE->SetModified( sal_False ); + pBasicIDE->SetModified( false ); try { // load the Basic IDE via direct access to the SFX frame loader. A generic loadComponentFromURL diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx index e389f7a2a549..39db16dee7d6 100644 --- a/sfx2/source/appl/fileobj.cxx +++ b/sfx2/source/appl/fileobj.cxx @@ -454,8 +454,8 @@ void SvFileObject::Edit( Window* pParent, sfx2::SvBaseLink* pLink, const Link& r nType = FILETYPE_GRF; // If not set already SvxOpenGraphicDialog aDlg(SfxResId(RID_SVXSTR_EDITGRFLINK).toString()); - aDlg.EnableLink(sal_False); - aDlg.SetPath( sFile, sal_True ); + aDlg.EnableLink(false); + aDlg.SetPath( sFile, true ); aDlg.SetCurrentFilter( sTmpFilter ); if( !aDlg.Execute() ) diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx index a0b44e72b6d5..47a13febaf07 100644 --- a/sfx2/source/appl/linkmgr2.cxx +++ b/sfx2/source/appl/linkmgr2.cxx @@ -588,7 +588,7 @@ bool SvxInternalLink::Connect( sfx2::SvBaseLink* pLink ) if ( !pShell ) { bFirst = sal_False; - pShell = SfxObjectShell::GetFirst( &aType, sal_False ); + pShell = SfxObjectShell::GetFirst( &aType, false ); } OUString sTmp; @@ -611,10 +611,10 @@ bool SvxInternalLink::Connect( sfx2::SvBaseLink* pLink ) if( bFirst ) { bFirst = sal_False; - pShell = SfxObjectShell::GetFirst( &aType, sal_False ); + pShell = SfxObjectShell::GetFirst( &aType, false ); } else - pShell = SfxObjectShell::GetNext( *pShell, &aType, sal_False ); + pShell = SfxObjectShell::GetNext( *pShell, &aType, false ); sTmp = ""; } diff --git a/sfx2/source/appl/macroloader.cxx b/sfx2/source/appl/macroloader.cxx index 4f9779c232b4..eb632af27331 100644 --- a/sfx2/source/appl/macroloader.cxx +++ b/sfx2/source/appl/macroloader.cxx @@ -280,7 +280,7 @@ ErrCode SfxMacroLoader::loadMacro( const OUString& rURL, com::sun::star::uno::An if ( bSetDocMacroMode ) { // mark document: it executes an own macro, so it's in a modal mode - pDoc->SetMacroMode_Impl( sal_True ); + pDoc->SetMacroMode_Impl( true ); } if ( bSetGlobalThisComponent ) @@ -313,7 +313,7 @@ ErrCode SfxMacroLoader::loadMacro( const OUString& rURL, com::sun::star::uno::An if ( bSetDocMacroMode ) { // remove flag for modal mode - pDoc->SetMacroMode_Impl( sal_False ); + pDoc->SetMacroMode_Impl( false ); } } else diff --git a/sfx2/source/appl/opengrf.cxx b/sfx2/source/appl/opengrf.cxx index d04f1aa636aa..8bdf43f5b7ce 100644 --- a/sfx2/source/appl/opengrf.cxx +++ b/sfx2/source/appl/opengrf.cxx @@ -186,14 +186,14 @@ void SvxOpenGraphicDialog::SetPath( const OUString& rPath ) mpImpl->aFileDlg.SetDisplayDirectory(rPath); } -void SvxOpenGraphicDialog::SetPath( const OUString& rPath, sal_Bool bLinkState ) +void SvxOpenGraphicDialog::SetPath( const OUString& rPath, bool bLinkState ) { SetPath(rPath); AsLink(bLinkState); } -void SvxOpenGraphicDialog::EnableLink( sal_Bool state ) +void SvxOpenGraphicDialog::EnableLink( bool state ) { if( mpImpl->xCtrlAcc.is() ) { @@ -211,7 +211,7 @@ void SvxOpenGraphicDialog::EnableLink( sal_Bool state ) } -void SvxOpenGraphicDialog::AsLink(sal_Bool bState) +void SvxOpenGraphicDialog::AsLink(bool bState) { if( mpImpl->xCtrlAcc.is() ) { @@ -230,7 +230,7 @@ void SvxOpenGraphicDialog::AsLink(sal_Bool bState) } -sal_Bool SvxOpenGraphicDialog::IsAsLink() const +bool SvxOpenGraphicDialog::IsAsLink() const { try { @@ -238,7 +238,7 @@ sal_Bool SvxOpenGraphicDialog::IsAsLink() const { Any aVal = mpImpl->xCtrlAcc->getValue( ExtendedFilePickerElementIds::CHECKBOX_LINK, 0 ); DBG_ASSERT(aVal.hasValue(), "Value CBX_INSERT_AS_LINK not found"); - return aVal.hasValue() ? *(sal_Bool*) aVal.getValue() : sal_False; + return aVal.hasValue() && ( *(sal_Bool*) aVal.getValue() ); } } catch(const IllegalArgumentException&) @@ -248,7 +248,7 @@ sal_Bool SvxOpenGraphicDialog::IsAsLink() const #endif } - return sal_False; + return false; } diff --git a/sfx2/source/appl/sfxpicklist.cxx b/sfx2/source/appl/sfxpicklist.cxx index aeb695914306..fcdcee199522 100644 --- a/sfx2/source/appl/sfxpicklist.cxx +++ b/sfx2/source/appl/sfxpicklist.cxx @@ -382,7 +382,7 @@ void SfxPickList::Notify( SfxBroadcaster&, const SfxHint& rHint ) { sal_Bool bAllowModif = pDocSh->IsEnableSetModified(); if ( bAllowModif ) - pDocSh->EnableSetModified( sal_False ); + pDocSh->EnableSetModified( false ); using namespace ::com::sun::star; uno::Reference<document::XDocumentProperties> xDocProps( diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx index 33ac0bda80ca..1b97be80d10c 100644 --- a/sfx2/source/dialog/securitypage.cxx +++ b/sfx2/source/dialog/securitypage.cxx @@ -225,7 +225,7 @@ sal_Bool SfxSecurityPage_Impl::FillItemSet_Impl( SfxItemSet & ) } // open read-only? - const sal_Bool bDoOpenReadonly = m_pOpenReadonlyCB->IsChecked(); + const bool bDoOpenReadonly = m_pOpenReadonlyCB->IsChecked(); if (pCurDocShell->HasSecurityOptOpenReadOnly() && bDoOpenReadonly != pCurDocShell->IsSecurityOptOpenReadOnly()) { diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx index 04f1f0a1aef5..60747b28b828 100644 --- a/sfx2/source/dialog/versdlg.cxx +++ b/sfx2/source/dialog/versdlg.cxx @@ -431,7 +431,7 @@ IMPL_LINK( SfxVersionDialog, ButtonHdl_Impl, Button*, pButton ) if ( nRet == RET_OK ) { SfxStringItem aComment( SID_DOCINFO_COMMENTS, aInfo.aComment ); - pObjShell->SetModified( sal_True ); + pObjShell->SetModified( true ); const SfxPoolItem* aItems[2]; aItems[0] = &aComment; aItems[1] = NULL; @@ -447,7 +447,7 @@ IMPL_LINK( SfxVersionDialog, ButtonHdl_Impl, Button*, pButton ) if (pButton == m_pDeleteButton && pEntry) { pObjShell->GetMedium()->RemoveVersion_Impl( ((SfxVersionInfo*) pEntry->GetUserData())->aName ); - pObjShell->SetModified( sal_True ); + pObjShell->SetModified( true ); m_pVersionBox->SetUpdateMode( sal_False ); m_pVersionBox->Clear(); Init_Impl(); diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx index 6bff9869616d..547b252bd9aa 100644 --- a/sfx2/source/doc/objcont.cxx +++ b/sfx2/source/doc/objcont.cxx @@ -108,13 +108,13 @@ bool operator> (const util::DateTime& i_rLeft, const util::DateTime& i_rRight) } ::boost::shared_ptr<GDIMetaFile> -SfxObjectShell::GetPreviewMetaFile( sal_Bool bFullContent ) const +SfxObjectShell::GetPreviewMetaFile( bool bFullContent ) const { return CreatePreviewMetaFile_Impl( bFullContent ); } ::boost::shared_ptr<GDIMetaFile> -SfxObjectShell::CreatePreviewMetaFile_Impl( sal_Bool bFullContent ) const +SfxObjectShell::CreatePreviewMetaFile_Impl( bool bFullContent ) const { // DoDraw can only be called when no printing is done, otherwise // the printer may be turned off @@ -427,7 +427,7 @@ void SfxObjectShell::UpdateFromTemplate_Impl( ) { // check existence of template storage aTemplURL = aFoundName; - sal_Bool bLoad = sal_False; + bool bLoad = false; // should the document checked against changes in the template ? if ( IsQueryLoadTemplate() ) @@ -460,21 +460,21 @@ void SfxObjectShell::UpdateFromTemplate_Impl( ) // ask user if( bCanUpdateFromTemplate == document::UpdateDocMode::QUIET_UPDATE || bCanUpdateFromTemplate == document::UpdateDocMode::FULL_UPDATE ) - bLoad = sal_True; + bLoad = true; else if ( bCanUpdateFromTemplate == document::UpdateDocMode::ACCORDING_TO_CONFIG ) { OUString sMessage( SfxResId(STR_QRYTEMPL_MESSAGE).toString() ); sMessage = sMessage.replaceAll( "$(ARG1)", aTemplName ); sfx2::QueryTemplateBox aBox( GetDialogParent(), sMessage ); if ( RET_YES == aBox.Execute() ) - bLoad = sal_True; + bLoad = true; } if( !bLoad ) { // user refuses, so don't ask again for this document - SetQueryLoadTemplate(sal_False); - SetModified( sal_True ); + SetQueryLoadTemplate(false); + SetModified( true ); } } } @@ -506,7 +506,7 @@ void SfxObjectShell::UpdateFromTemplate_Impl( ) } } -sal_Bool SfxObjectShell::IsHelpDocument() const +bool SfxObjectShell::IsHelpDocument() const { const SfxFilter* pFilter = GetMedium()->GetFilter(); return (pFilter && pFilter->GetFilterName() == "writer_web_HTML_help"); @@ -541,57 +541,57 @@ void SfxObjectShell::ResetFromTemplate( const OUString& rTemplateName, const OUS now.GetHour(), now.GetDay(), now.GetMonth(), now.GetYear(), false) ); - SetQueryLoadTemplate( sal_True ); + SetQueryLoadTemplate( true ); } } } } -sal_Bool SfxObjectShell::IsQueryLoadTemplate() const +bool SfxObjectShell::IsQueryLoadTemplate() const { return pImp->bQueryLoadTemplate; } -sal_Bool SfxObjectShell::IsUseUserData() const +bool SfxObjectShell::IsUseUserData() const { return pImp->bUseUserData; } -void SfxObjectShell::SetQueryLoadTemplate( sal_Bool bNew ) +void SfxObjectShell::SetQueryLoadTemplate( bool bNew ) { - if ( pImp->bQueryLoadTemplate != bNew ) - SetModified( sal_True ); + if ( pImp->bQueryLoadTemplate != (bNew ? 1 : 0) ) + SetModified( true ); pImp->bQueryLoadTemplate = bNew; } -void SfxObjectShell::SetUseUserData( sal_Bool bNew ) +void SfxObjectShell::SetUseUserData( bool bNew ) { - if ( pImp->bUseUserData != bNew ) - SetModified( sal_True ); + if ( pImp->bUseUserData != (bNew ? 1 : 0) ) + SetModified( true ); pImp->bUseUserData = bNew; } -sal_Bool SfxObjectShell::IsLoadReadonly() const +bool SfxObjectShell::IsLoadReadonly() const { return pImp->bLoadReadonly; } -sal_Bool SfxObjectShell::IsSaveVersionOnClose() const +bool SfxObjectShell::IsSaveVersionOnClose() const { return pImp->bSaveVersionOnClose; } -void SfxObjectShell::SetLoadReadonly( sal_Bool bNew ) +void SfxObjectShell::SetLoadReadonly( bool bNew ) { - if ( pImp->bLoadReadonly != bNew ) - SetModified( sal_True ); + if ( pImp->bLoadReadonly != (bNew ? 1 : 0) ) + SetModified( true ); pImp->bLoadReadonly = bNew; } -void SfxObjectShell::SetSaveVersionOnClose( sal_Bool bNew ) +void SfxObjectShell::SetSaveVersionOnClose( bool bNew ) { - if ( pImp->bSaveVersionOnClose != bNew ) - SetModified( sal_True ); + if ( pImp->bSaveVersionOnClose != (bNew ? 1 : 0) ) + SetModified( true ); pImp->bSaveVersionOnClose = bNew; } @@ -600,7 +600,7 @@ sal_uInt32 SfxObjectShell::GetModifyPasswordHash() const return pImp->m_nModifyPasswordHash; } -sal_Bool SfxObjectShell::SetModifyPasswordHash( sal_uInt32 nHash ) +bool SfxObjectShell::SetModifyPasswordHash( sal_uInt32 nHash ) { if ( ( !IsReadOnly() && !IsReadOnlyUI() ) || !(pImp->nFlagsInProgress & SFX_LOADED_MAINDOCUMENT ) ) @@ -608,10 +608,10 @@ sal_Bool SfxObjectShell::SetModifyPasswordHash( sal_uInt32 nHash ) // the hash can be changed only in editable documents, // or during loading of document pImp->m_nModifyPasswordHash = nHash; - return sal_True; + return true; } - return sal_False; + return false; } uno::Sequence< beans::PropertyValue > SfxObjectShell::GetModifyPasswordInfo() const @@ -619,7 +619,7 @@ uno::Sequence< beans::PropertyValue > SfxObjectShell::GetModifyPasswordInfo() co return pImp->m_aModifyPasswordInfo; } -sal_Bool SfxObjectShell::SetModifyPasswordInfo( const uno::Sequence< beans::PropertyValue >& aInfo ) +bool SfxObjectShell::SetModifyPasswordInfo( const uno::Sequence< beans::PropertyValue >& aInfo ) { if ( ( !IsReadOnly() && !IsReadOnlyUI() ) || !(pImp->nFlagsInProgress & SFX_LOADED_MAINDOCUMENT ) ) @@ -627,18 +627,18 @@ sal_Bool SfxObjectShell::SetModifyPasswordInfo( const uno::Sequence< beans::Prop // the hash can be changed only in editable documents, // or during loading of document pImp->m_aModifyPasswordInfo = aInfo; - return sal_True; + return true; } - return sal_False; + return false; } -void SfxObjectShell::SetModifyPasswordEntered( sal_Bool bEntered ) +void SfxObjectShell::SetModifyPasswordEntered( bool bEntered ) { pImp->m_bModifyPasswordEntered = bEntered; } -sal_Bool SfxObjectShell::IsModifyPasswordEntered() +bool SfxObjectShell::IsModifyPasswordEntered() { return pImp->m_bModifyPasswordEntered; } diff --git a/sfx2/source/doc/objembed.cxx b/sfx2/source/doc/objembed.cxx index 875eddcc2474..c42f7e5d3003 100644 --- a/sfx2/source/doc/objembed.cxx +++ b/sfx2/source/doc/objembed.cxx @@ -121,7 +121,7 @@ void SfxObjectShell::SetVisArea( const Rectangle & rVisArea ) if ( GetCreateMode() == SFX_CREATE_MODE_EMBEDDED ) { if ( IsEnableSetModified() ) - SetModified( sal_True ); + SetModified( true ); SFX_APP()->NotifyEvent(SfxEventHint( SFX_EVENT_VISAREACHANGED, GlobalEventConfig::GetEventName(STR_EVENT_VISAREACHANGED), this)); } diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index 025f13873937..2579cd8b5c45 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -140,19 +140,19 @@ class SfxHeaderAttributes_Impl : public SvKeyValueIterator private: SfxObjectShell* pDoc; SvKeyValueIteratorRef xIter; - sal_Bool bAlert; + bool bAlert; public: SfxHeaderAttributes_Impl( SfxObjectShell* pSh ) : SvKeyValueIterator(), pDoc( pSh ), xIter( pSh->GetMedium()->GetHeaderAttributes_Impl() ), - bAlert( sal_False ) {} + bAlert( false ) {} virtual sal_Bool GetFirst( SvKeyValue& rKV ) { return xIter->GetFirst( rKV ); } virtual sal_Bool GetNext( SvKeyValue& rKV ) { return xIter->GetNext( rKV ); } virtual void Append( const SvKeyValue& rKV ); - void ClearForSourceView() { xIter = new SvKeyValueIterator; bAlert = sal_False; } + void ClearForSourceView() { xIter = new SvKeyValueIterator; bAlert = false; } void SetAttributes(); void SetAttribute( const SvKeyValue& rKV ); }; @@ -176,7 +176,7 @@ void SfxObjectShell::AbortImport() -sal_Bool SfxObjectShell::IsAbortingImport() const +bool SfxObjectShell::IsAbortingImport() const { return pImp->bIsAbortingImport; } @@ -210,7 +210,7 @@ void SfxObjectShell::FlushDocInfo() if ( IsLoading() ) return; - SetModified(sal_True); + SetModified(true); uno::Reference<document::XDocumentProperties> xDocProps(getDocProperties()); DoFlushDocInfo(); // call template method OUString url(xDocProps->getAutoloadURL()); @@ -264,17 +264,17 @@ void SfxObjectShell::ResetError() -sal_Bool SfxObjectShell::IsTemplate() const +bool SfxObjectShell::IsTemplate() const { return pImp->bIsTemplate; } -void SfxObjectShell::EnableSetModified( sal_Bool bEnable ) +void SfxObjectShell::EnableSetModified( bool bEnable ) { #ifdef DBG_UTIL - if ( bEnable == pImp->m_bEnableSetModified ) + if ( (bEnable ? 1 : 0) == pImp->m_bEnableSetModified ) DBG_WARNING( "SFX_PERSIST: EnableSetModified 2x called with the same value" ); #endif pImp->m_bEnableSetModified = bEnable; @@ -282,24 +282,24 @@ void SfxObjectShell::EnableSetModified( sal_Bool bEnable ) -sal_Bool SfxObjectShell::IsEnableSetModified() const +bool SfxObjectShell::IsEnableSetModified() const { return pImp->m_bEnableSetModified && !IsReadOnly(); } -sal_Bool SfxObjectShell::IsModified() +bool SfxObjectShell::IsModified() { if ( pImp->m_bIsModified ) - return sal_True; + return true; if ( !pImp->m_xDocStorage.is() || IsReadOnly() ) { // if the document still has no storage and is not set to be modified explicitly it is not modified // a readonly document is also not modified - return sal_False; + return false; } uno::Sequence < OUString > aNames = GetEmbeddedObjectContainer().GetObjectNames(); @@ -316,7 +316,7 @@ sal_Bool SfxObjectShell::IsModified() { uno::Reference< util::XModifiable > xModifiable( xObj->getComponent(), uno::UNO_QUERY ); if ( xModifiable.is() && xModifiable->isModified() ) - return sal_True; + return true; } } catch( uno::Exception& ) @@ -324,12 +324,12 @@ sal_Bool SfxObjectShell::IsModified() } } - return sal_False; + return false; } -void SfxObjectShell::SetModified( sal_Bool bModifiedP ) +void SfxObjectShell::SetModified( bool bModifiedP ) { #ifdef DBG_UTIL if ( !bModifiedP && !IsEnableSetModified() ) @@ -339,7 +339,7 @@ void SfxObjectShell::SetModified( sal_Bool bModifiedP ) if( !IsEnableSetModified() ) return; - if( pImp->m_bIsModified != bModifiedP ) + if( pImp->m_bIsModified != (bModifiedP ? 1 : 0) ) { pImp->m_bIsModified = bModifiedP; ModifyChanged(); @@ -368,7 +368,7 @@ void SfxObjectShell::ModifyChanged() -sal_Bool SfxObjectShell::IsReadOnlyUI() const +bool SfxObjectShell::IsReadOnlyUI() const /* [Description] @@ -382,7 +382,7 @@ sal_Bool SfxObjectShell::IsReadOnlyUI() const -sal_Bool SfxObjectShell::IsReadOnlyMedium() const +bool SfxObjectShell::IsReadOnlyMedium() const /* [Description] @@ -391,7 +391,7 @@ sal_Bool SfxObjectShell::IsReadOnlyMedium() const { if ( !pMedium ) - return sal_True; + return true; return pMedium->IsReadOnly(); } @@ -402,7 +402,7 @@ bool SfxObjectShell::IsOriginallyReadOnlyMedium() const -void SfxObjectShell::SetReadOnlyUI( sal_Bool bReadOnly ) +void SfxObjectShell::SetReadOnlyUI( bool bReadOnly ) /* [Description] @@ -411,7 +411,7 @@ void SfxObjectShell::SetReadOnlyUI( sal_Bool bReadOnly ) */ { - if ( bReadOnly != pImp->bReadOnlyUI ) + if ( (bReadOnly ? 1 : 0) != pImp->bReadOnlyUI ) { pImp->bReadOnlyUI = bReadOnly; Broadcast( SfxSimpleHint(SFX_HINT_MODECHANGED) ); @@ -428,7 +428,7 @@ void SfxObjectShell::SetReadOnly() if ( pMedium && !IsReadOnlyMedium() ) { - sal_Bool bWasROUI = IsReadOnly(); + bool bWasROUI = IsReadOnly(); pMedium->UnlockFile( false ); @@ -446,26 +446,26 @@ void SfxObjectShell::SetReadOnly() } -sal_Bool SfxObjectShell::IsReadOnly() const +bool SfxObjectShell::IsReadOnly() const { return pImp->bReadOnlyUI || pMedium == 0; } -sal_Bool SfxObjectShell::IsInModalMode() const +bool SfxObjectShell::IsInModalMode() const { return pImp->bModalMode || pImp->bRunningMacro; } -sal_Bool SfxObjectShell::AcceptStateUpdate() const +bool SfxObjectShell::AcceptStateUpdate() const { return !IsInModalMode(); } -void SfxObjectShell::SetMacroMode_Impl( sal_Bool bModal ) +void SfxObjectShell::SetMacroMode_Impl( bool bModal ) { if ( !pImp->bRunningMacro != !bModal ) { @@ -476,7 +476,7 @@ void SfxObjectShell::SetMacroMode_Impl( sal_Bool bModal ) -void SfxObjectShell::SetModalMode_Impl( sal_Bool bModal ) +void SfxObjectShell::SetModalMode_Impl( bool bModal ) { // Broadcast only if modified, or otherwise it will possibly go into // an endless loop @@ -497,9 +497,9 @@ void SfxObjectShell::SetModalMode_Impl( sal_Bool bModal ) #if HAVE_FEATURE_MULTIUSER_ENVIRONMENT -sal_Bool SfxObjectShell::SwitchToShared( sal_Bool bShared, sal_Bool bSave ) +bool SfxObjectShell::SwitchToShared( bool bShared, bool bSave ) { - sal_Bool bResult = sal_True; + bool bResult = true; if ( bShared != IsDocShared() ) { @@ -524,21 +524,21 @@ sal_Bool SfxObjectShell::SwitchToShared( sal_Bool bShared, sal_Bool bSave ) } } - sal_Bool bOldValue = HasSharedXMLFlagSet(); + bool bOldValue = HasSharedXMLFlagSet(); SetSharedXMLFlag( bShared ); - sal_Bool bRemoveEntryOnError = sal_False; + bool bRemoveEntryOnError = false; if ( bResult && bShared ) { try { ::svt::ShareControlFile aControlFile( aOrigURL ); aControlFile.InsertOwnEntry(); - bRemoveEntryOnError = sal_True; + bRemoveEntryOnError = true; } catch( uno::Exception& ) { - bResult = sal_False; + bResult = false; } } @@ -549,7 +549,7 @@ sal_Bool SfxObjectShell::SwitchToShared( sal_Bool bShared, sal_Bool bSave ) if ( pViewFrame ) { // TODO/LATER: currently the application guards against the reentrance problem - SetModified( sal_True ); // the modified flag has to be set to let the document be stored with the shared flag + SetModified( true ); // the modified flag has to be set to let the document be stored with the shared flag const SfxPoolItem* pItem = pViewFrame->GetBindings().ExecuteSynchron( HasName() ? SID_SAVEDOC : SID_SAVEASDOC ); SfxBoolItem* pResult = PTR_CAST( SfxBoolItem, pItem ); bResult = ( pResult && pResult->GetValue() ); @@ -602,7 +602,7 @@ sal_Bool SfxObjectShell::SwitchToShared( sal_Bool bShared, sal_Bool bSave ) } } else - bResult = sal_False; // the second switch to the same mode + bResult = false; // the second switch to the same mode if ( bResult ) SetTitle( "" ); @@ -621,7 +621,7 @@ void SfxObjectShell::FreeSharedFile() void SfxObjectShell::FreeSharedFile( const OUString& aTempFileURL ) { - SetSharedXMLFlag( sal_False ); + SetSharedXMLFlag( false ); if ( IsDocShared() && !aTempFileURL.isEmpty() && !::utl::UCBContentHelper::EqualURLs( aTempFileURL, GetSharedFileURL() ) ) @@ -655,20 +655,20 @@ void SfxObjectShell::DoNotCleanShareControlFile() } -void SfxObjectShell::SetSharedXMLFlag( sal_Bool bFlag ) const +void SfxObjectShell::SetSharedXMLFlag( bool bFlag ) const { pImp->m_bSharedXMLFlag = bFlag; } -sal_Bool SfxObjectShell::HasSharedXMLFlagSet() const +bool SfxObjectShell::HasSharedXMLFlagSet() const { return pImp->m_bSharedXMLFlag; } -sal_Bool SfxObjectShell::IsDocShared() const +bool SfxObjectShell::IsDocShared() const { return ( !pImp->m_aSharedFileURL.isEmpty() ); } @@ -815,10 +815,10 @@ OUString SfxObjectShell::GetTitle // Create Title? if ( SFX_TITLE_DETECT == nMaxLength && pImp->aTitle.isEmpty() ) { - static sal_Bool bRecur = sal_False; + static bool bRecur = false; if ( bRecur ) return OUString("-not available-"); - bRecur = sal_True; + bRecur = true; OUString aTitle; SfxObjectShell *pThis = (SfxObjectShell*) this; @@ -835,7 +835,7 @@ OUString SfxObjectShell::GetTitle if ( IsTemplate() ) pThis->SetTitle( aTitle ); - bRecur = sal_False; + bRecur = false; return X(aTitle); } else if (SFX_TITLE_APINAME == nMaxLength ) @@ -976,7 +976,7 @@ void SfxObjectShell::SetNamedVisibility_Impl() void SfxObjectShell::SetNoName() { - bHasName = 0; + bHasName = false; GetModel()->attachResource( OUString(), GetModel()->getArgs() ); } @@ -1044,7 +1044,7 @@ void SfxObjectShell::PrepareReload( ) { } -sal_Bool SfxObjectShell::IsAutoLoadLocked() const +bool SfxObjectShell::IsAutoLoadLocked() const /* Returns whether an Autoload is allowed to be executed. Before the surrounding FrameSet of the AutoLoad is also taken into account as well. @@ -1055,7 +1055,7 @@ sal_Bool SfxObjectShell::IsAutoLoadLocked() const } -void SfxObjectShell::BreakMacroSign_Impl( sal_Bool bBreakMacroSign ) +void SfxObjectShell::BreakMacroSign_Impl( bool bBreakMacroSign ) { pImp->m_bMacroSignBroken = bBreakMacroSign; } @@ -1080,8 +1080,8 @@ void SfxObjectShell::CheckSecurityOnLoading_Impl() void SfxObjectShell::CheckEncryption_Impl( const uno::Reference< task::XInteractionHandler >& xHandler ) { OUString aVersion; - sal_Bool bIsEncrypted = sal_False; - sal_Bool bHasNonEncrypted = sal_False; + bool bIsEncrypted = false; + bool bHasNonEncrypted = false; try { @@ -1131,7 +1131,7 @@ void SfxObjectShell::CheckForBrokenDocSignatures_Impl( const uno::Reference< tas void SfxObjectShell::SetAutoLoad( - const INetURLObject& rUrl, sal_uInt32 nTime, sal_Bool bReload ) + const INetURLObject& rUrl, sal_uInt32 nTime, bool bReload ) { if ( pImp->pReloadTimer ) DELETEZ(pImp->pReloadTimer); @@ -1144,7 +1144,7 @@ void SfxObjectShell::SetAutoLoad( } } -sal_Bool SfxObjectShell::IsLoadingFinished() const +bool SfxObjectShell::IsLoadingFinished() const { return ( pImp->nLoadedFlags == SFX_LOADED_ALL ); } @@ -1188,7 +1188,7 @@ void SfxObjectShell::InitOwnModel_Impl() void SfxObjectShell::FinishedLoading( sal_uInt16 nFlags ) { - sal_Bool bSetModifiedTRUE = sal_False; + bool bSetModifiedTRUE = false; SFX_ITEMSET_ARG( pMedium->GetItemSet(), pSalvageItem, SfxStringItem, SID_DOC_SALVAGE, false ); if( ( nFlags & SFX_LOADED_MAINDOCUMENT ) && !(pImp->nLoadedFlags & SFX_LOADED_MAINDOCUMENT ) && !(pImp->nFlagsInProgress & SFX_LOADED_MAINDOCUMENT )) @@ -1204,17 +1204,17 @@ void SfxObjectShell::FinishedLoading( sal_uInt16 nFlags ) // Salvage if ( pSalvageItem ) - bSetModifiedTRUE = sal_True; + bSetModifiedTRUE = true; if ( !IsEnableSetModified() ) - EnableSetModified( sal_True ); + EnableSetModified( true ); if( !bSetModifiedTRUE && IsEnableSetModified() ) - SetModified( sal_False ); + SetModified( false ); CheckSecurityOnLoading_Impl(); - bHasName = sal_True; // the document is loaded, so the name should already available + bHasName = true; // the document is loaded, so the name should already available GetTitle( SFX_TITLE_DETECT ); InitOwnModel_Impl(); pImp->nFlagsInProgress &= ~SFX_LOADED_MAINDOCUMENT; @@ -1231,7 +1231,7 @@ void SfxObjectShell::FinishedLoading( sal_uInt16 nFlags ) SetAutoLoad( INetURLObject(url), delay * 1000, (delay > 0) || !url.isEmpty() ); if( !bSetModifiedTRUE && IsEnableSetModified() ) - SetModified( sal_False ); + SetModified( false ); Invalidate( SID_SAVEASDOC ); pImp->nFlagsInProgress &= ~SFX_LOADED_IMAGES; } @@ -1244,14 +1244,14 @@ void SfxObjectShell::FinishedLoading( sal_uInt16 nFlags ) // should do the notification, in result the notification is done when all the FinishedLoading() calls are finished if ( bSetModifiedTRUE ) - SetModified( sal_True ); + SetModified( true ); else - SetModified( sal_False ); + SetModified( false ); if ( (pImp->nLoadedFlags & SFX_LOADED_MAINDOCUMENT ) && (pImp->nLoadedFlags & SFX_LOADED_IMAGES ) ) { SFX_ITEMSET_ARG( pMedium->GetItemSet(), pTemplateItem, SfxBoolItem, SID_TEMPLATE, false); - sal_Bool bTemplate = pTemplateItem && pTemplateItem->GetValue(); + bool bTemplate = pTemplateItem && pTemplateItem->GetValue(); // closing the streams on loading should be under control of SFX! DBG_ASSERT( pMedium->IsOpen(), "Don't close the medium when loading documents!" ); @@ -1337,7 +1337,7 @@ void SfxObjectShell::TemplateDisconnectionAfterLoad() if( ok ) { SFX_ITEMSET_ARG( pMedium->GetItemSet(), pSalvageItem, SfxStringItem, SID_DOC_SALVAGE, false ); - sal_Bool bSalvage = pSalvageItem ? sal_True : sal_False; + bool bSalvage = pSalvageItem ? true : false; if ( !bSalvage ) { @@ -1368,7 +1368,7 @@ void SfxObjectShell::TemplateDisconnectionAfterLoad() Broadcast( SfxSimpleHint(SFX_HINT_MODECHANGED) ); // created untitled document can't be modified - SetModified( sal_False ); + SetModified( false ); } } @@ -1390,7 +1390,7 @@ void SfxObjectShell::PositionView_Impl() -sal_Bool SfxObjectShell::IsLoading() const +bool SfxObjectShell::IsLoading() const /* [Description] Has FinishedLoading been called? @@ -1603,7 +1603,7 @@ SfxObjectShellFlags SfxObjectShell::GetFlags() const void SfxHeaderAttributes_Impl::SetAttributes() { - bAlert = sal_True; + bAlert = true; SvKeyValue aPair; for( sal_Bool bCont = xIter->GetFirst( aPair ); bCont; bCont = xIter->GetNext( aPair ) ) @@ -1679,12 +1679,12 @@ void SfxObjectShell::SetHeaderAttributesForSourceViewHack() ->SetAttributes(); } -sal_Bool SfxObjectShell::IsPreview() const +bool SfxObjectShell::IsPreview() const { if ( !pMedium ) - return sal_False; + return false; - sal_Bool bPreview = sal_False; + bool bPreview = false; SFX_ITEMSET_ARG( pMedium->GetItemSet(), pFlags, SfxStringItem, SID_OPTIONS, false); if ( pFlags ) { @@ -1692,7 +1692,7 @@ sal_Bool SfxObjectShell::IsPreview() const OUString aFileFlags = pFlags->GetValue(); aFileFlags = aFileFlags.toAsciiUpperCase(); if ( -1 != aFileFlags.indexOf( 'B' ) ) - bPreview = sal_True; + bPreview = true; } if ( !bPreview ) @@ -1705,7 +1705,7 @@ sal_Bool SfxObjectShell::IsPreview() const return bPreview; } -void SfxObjectShell::SetWaitCursor( sal_Bool bSet ) const +void SfxObjectShell::SetWaitCursor( bool bSet ) const { for( SfxViewFrame* pFrame = SfxViewFrame::GetFirst( this ); pFrame; pFrame = SfxViewFrame::GetNext( *pFrame, this ) ) { @@ -1799,37 +1799,37 @@ void SfxObjectShell::SetCreateMode_Impl( SfxObjectCreateMode nMode ) eCreateMode = nMode; } -sal_Bool SfxObjectShell::IsInPlaceActive() +bool SfxObjectShell::IsInPlaceActive() { if ( eCreateMode != SFX_CREATE_MODE_EMBEDDED ) - return sal_False; + return false; SfxViewFrame* pFrame = SfxViewFrame::GetFirst( this ); return pFrame && pFrame->GetFrame().IsInPlace(); } -sal_Bool SfxObjectShell::IsUIActive() +bool SfxObjectShell::IsUIActive() { if ( eCreateMode != SFX_CREATE_MODE_EMBEDDED ) - return sal_False; + return false; SfxViewFrame* pFrame = SfxViewFrame::GetFirst( this ); return pFrame && pFrame->GetFrame().IsInPlace() && pFrame->GetFrame().GetWorkWindow_Impl()->IsVisible_Impl(); } -void SfxObjectShell::UIActivate( sal_Bool ) +void SfxObjectShell::UIActivate( bool ) { } -void SfxObjectShell::InPlaceActivate( sal_Bool ) +void SfxObjectShell::InPlaceActivate( bool ) { } -sal_Bool SfxObjectShell::UseInteractionToHandleError( +bool SfxObjectShell::UseInteractionToHandleError( const uno::Reference< task::XInteractionHandler >& xHandler, sal_uInt32 nError ) { - sal_Bool bResult = sal_False; + bool bResult = false; if ( xHandler.is() ) { @@ -1960,7 +1960,7 @@ bool SfxObjectShell_Impl::hasTrustedScriptingSignature( bool bAllowUIToAddAuthor || nScriptingSignatureState == SIGNATURESTATE_SIGNATURES_OK || nScriptingSignatureState == SIGNATURESTATE_SIGNATURES_NOTVALIDATED ) { - uno::Sequence< security::DocumentSignatureInformation > aInfo = rDocShell.ImplAnalyzeSignature( sal_True, xSigner ); + uno::Sequence< security::DocumentSignatureInformation > aInfo = rDocShell.ImplAnalyzeSignature( true, xSigner ); if ( aInfo.getLength() ) { diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index 99795f63dd91..d9b109dadda4 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -284,13 +284,13 @@ void SfxObjectShell::PrintState_Impl(SfxItemSet &rSet) -sal_Bool SfxObjectShell::APISaveAs_Impl +bool SfxObjectShell::APISaveAs_Impl ( const OUString& aFileName, SfxItemSet* aParams ) { - sal_Bool bOk = sal_False; + bool bOk = false; if ( GetMedium() ) @@ -851,7 +851,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) } } else - SetModified(sal_False); + SetModified(false); } // Cancelled by the user? @@ -862,7 +862,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) return; } - SetModified( sal_False ); + SetModified( false ); sal_uIntPtr lErr = GetErrorCode(); ErrorHandler::HandleError(lErr); @@ -1346,7 +1346,7 @@ sal_uInt16 SfxObjectShell::ImplCheckSignaturesInformation( const uno::Sequence< return nResult; } -uno::Sequence< security::DocumentSignatureInformation > SfxObjectShell::ImplAnalyzeSignature( sal_Bool bScriptingContent, const uno::Reference< security::XDocumentDigitalSignatures >& xSigner ) +uno::Sequence< security::DocumentSignatureInformation > SfxObjectShell::ImplAnalyzeSignature( bool bScriptingContent, const uno::Reference< security::XDocumentDigitalSignatures >& xSigner ) { uno::Sequence< security::DocumentSignatureInformation > aResult; uno::Reference< security::XDocumentDigitalSignatures > xLocSigner = xSigner; @@ -1386,7 +1386,7 @@ uno::Sequence< security::DocumentSignatureInformation > SfxObjectShell::ImplAnal return aResult; } -sal_uInt16 SfxObjectShell::ImplGetSignatureState( sal_Bool bScriptingContent ) +sal_uInt16 SfxObjectShell::ImplGetSignatureState( bool bScriptingContent ) { sal_Int16* pState = bScriptingContent ? &pImp->nScriptingSignatureState : &pImp->nDocumentSignatureState; @@ -1408,7 +1408,7 @@ sal_uInt16 SfxObjectShell::ImplGetSignatureState( sal_Bool bScriptingContent ) return (sal_uInt16)*pState; } -void SfxObjectShell::ImplSign( sal_Bool bScriptingContent ) +void SfxObjectShell::ImplSign( bool bScriptingContent ) { // Check if it is stored in OASIS format... if ( GetMedium() @@ -1425,8 +1425,8 @@ void SfxObjectShell::ImplSign( sal_Bool bScriptingContent ) } // check whether the document is signed - ImplGetSignatureState( sal_False ); // document signature - ImplGetSignatureState( sal_True ); // script signature + ImplGetSignatureState( false ); // document signature + ImplGetSignatureState( true ); // script signature sal_Bool bHasSign = ( pImp->nScriptingSignatureState != SIGNATURESTATE_NOSIGNATURES || pImp->nDocumentSignatureState != SIGNATURESTATE_NOSIGNATURES ); // the target ODF version on saving @@ -1462,7 +1462,7 @@ void SfxObjectShell::ImplSign( sal_Bool bScriptingContent ) nId = SID_SAVEASDOC; SfxRequest aSaveRequest( nId, 0, GetPool() ); //ToDo: Review. We needed to call SetModified, otherwise the document would not be saved. - SetModified(sal_True); + SetModified(true); ExecFile_Impl( aSaveRequest ); // Check if it is stored in OASIS format... @@ -1495,11 +1495,11 @@ void SfxObjectShell::ImplSign( sal_Bool bScriptingContent ) } // the document is not modified currently, so it can not become modified after signing - sal_Bool bAllowModifiedBack = sal_False; + bool bAllowModifiedBack = false; if ( IsEnableSetModified() ) { - EnableSetModified( sal_False ); - bAllowModifiedBack = sal_True; + EnableSetModified( false ); + bAllowModifiedBack = true; } // we have to store to the original document, the original medium should be closed for this time @@ -1541,27 +1541,27 @@ void SfxObjectShell::ImplSign( sal_Bool bScriptingContent ) } if ( bAllowModifiedBack ) - EnableSetModified( sal_True ); + EnableSetModified( true ); } sal_uInt16 SfxObjectShell::GetDocumentSignatureState() { - return ImplGetSignatureState( sal_False ); + return ImplGetSignatureState( false ); } void SfxObjectShell::SignDocumentContent() { - ImplSign( sal_False ); + ImplSign( false ); } sal_uInt16 SfxObjectShell::GetScriptingSignatureState() { - return ImplGetSignatureState( sal_True ); + return ImplGetSignatureState( true ); } void SfxObjectShell::SignScriptingContent() { - ImplSign( sal_True ); + ImplSign( true ); } namespace diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 6638b19d228c..520d168e0845 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -164,23 +164,23 @@ void impl_addToModelCollection(const css::uno::Reference< css::frame::XModel >& -sal_Bool SfxObjectShell::Save() +bool SfxObjectShell::Save() { return SaveChildren(); } -sal_Bool SfxObjectShell::SaveAs( SfxMedium& rMedium ) +bool SfxObjectShell::SaveAs( SfxMedium& rMedium ) { return SaveAsChildren( rMedium ); } -sal_Bool SfxObjectShell::QuerySlotExecutable( sal_uInt16 /*nSlotId*/ ) +bool SfxObjectShell::QuerySlotExecutable( sal_uInt16 /*nSlotId*/ ) { - return sal_True; + return true; } @@ -212,12 +212,12 @@ bool GetEncryptionData_Impl( const SfxItemSet* pSet, uno::Sequence< beans::Named } -sal_Bool SfxObjectShell::PutURLContentsToVersionStream_Impl( +bool SfxObjectShell::PutURLContentsToVersionStream_Impl( const OUString& aURL, const uno::Reference< embed::XStorage >& xDocStorage, const OUString& aStreamName ) { - sal_Bool bResult = sal_False; + bool bResult = false; try { uno::Reference< embed::XStorage > xVersion = xDocStorage->openStorageElement( @@ -257,7 +257,7 @@ sal_Bool SfxObjectShell::PutURLContentsToVersionStream_Impl( if ( xTransact.is() ) xTransact->commit(); - bResult = sal_True; + bResult = true; } catch( uno::Exception& ) { @@ -431,11 +431,11 @@ void SfxObjectShell::PrepareSecondTryLoad_Impl() } -sal_Bool SfxObjectShell::GeneralInit_Impl( const uno::Reference< embed::XStorage >& xStorage, - sal_Bool bTypeMustBeSetAlready ) +bool SfxObjectShell::GeneralInit_Impl( const uno::Reference< embed::XStorage >& xStorage, + bool bTypeMustBeSetAlready ) { if ( pImp->m_bIsInit ) - return sal_False; + return false; pImp->m_bIsInit = sal_True; if ( xStorage.is() ) @@ -452,7 +452,7 @@ sal_Bool SfxObjectShell::GeneralInit_Impl( const uno::Reference< embed::XStorage if ( bTypeMustBeSetAlready ) { SetError( ERRCODE_IO_BROKENPACKAGE, OUString( OSL_LOG_PREFIX ) ); - return sal_False; + return false; } SetupStorage( xStorage, SOFFICE_FILEFORMAT_CURRENT, false, false ); @@ -466,19 +466,19 @@ sal_Bool SfxObjectShell::GeneralInit_Impl( const uno::Reference< embed::XStorage else pImp->m_bCreateTempStor = sal_True; - return sal_True; + return true; } -sal_Bool SfxObjectShell::InitNew( const uno::Reference< embed::XStorage >& xStorage ) +bool SfxObjectShell::InitNew( const uno::Reference< embed::XStorage >& xStorage ) { - return GeneralInit_Impl( xStorage, sal_False ); + return GeneralInit_Impl( xStorage, false ); } -sal_Bool SfxObjectShell::Load( SfxMedium& rMedium ) +bool SfxObjectShell::Load( SfxMedium& rMedium ) { - return GeneralInit_Impl( rMedium.GetStorage(), sal_True ); + return GeneralInit_Impl( rMedium.GetStorage(), true ); } bool SfxObjectShell::DoInitUnitTest() @@ -487,7 +487,7 @@ bool SfxObjectShell::DoInitUnitTest() return true; // always a success! } -sal_Bool SfxObjectShell::DoInitNew( SfxMedium* pMed ) +bool SfxObjectShell::DoInitNew( SfxMedium* pMed ) /* [Description] This from SvPersist inherited virtual method is called to initialize @@ -504,8 +504,8 @@ sal_Bool SfxObjectShell::DoInitNew( SfxMedium* pMed ) The object is only initialized correctly after InitNew() or Load(). [Return value] - sal_True The object has been initialized. - sal_False The object could not be initialized + true The object has been initialized. + false The object could not be initialized */ { @@ -540,25 +540,25 @@ sal_Bool SfxObjectShell::DoInitNew( SfxMedium* pMed ) } SetInitialized_Impl( true ); - return sal_True; + return true; } - return sal_False; + return false; } -sal_Bool SfxObjectShell::ImportFromGeneratedStream_Impl( +bool SfxObjectShell::ImportFromGeneratedStream_Impl( const uno::Reference< io::XStream >& xStream, const uno::Sequence< beans::PropertyValue >& rMediaDescr ) { if ( !xStream.is() ) - return sal_False; + return false; if ( pMedium && pMedium->HasStorage_Impl() ) pMedium->CloseStorage(); - sal_Bool bResult = sal_False; + bool bResult = false; try { @@ -599,11 +599,11 @@ sal_Bool SfxObjectShell::ImportFromGeneratedStream_Impl( if ( LoadOwnFormat( *pMedium ) ) { - bHasName = sal_True; + bHasName = true; if ( !IsReadOnly() && IsLoadReadonly() ) SetReadOnlyUI(); - bResult = sal_True; + bResult = true; OSL_ENSURE( pImp->m_xDocStorage == xStorage, "Wrong storage is used!\n" ); } } @@ -621,14 +621,14 @@ sal_Bool SfxObjectShell::ImportFromGeneratedStream_Impl( -sal_Bool SfxObjectShell::DoLoad( SfxMedium *pMed ) +bool SfxObjectShell::DoLoad( SfxMedium *pMed ) { ModifyBlocker_Impl aBlock( this ); pMedium = pMed; pMedium->CanDisposeStorage_Impl( true ); - sal_Bool bOk = sal_False; + bool bOk = false; const SfxFilter* pFilter = pMed->GetFilter(); SfxItemSet* pSet = pMedium->GetItemSet(); if( !pImp->nEventId ) @@ -664,8 +664,8 @@ sal_Bool SfxObjectShell::DoLoad( SfxMedium *pMed ) pImp->bModelInitialized = sal_False; //TODO/LATER: make a clear strategy how to handle "UsesStorage" etc. - sal_Bool bOwnStorageFormat = IsOwnStorageFormat_Impl( *pMedium ); - sal_Bool bHasStorage = IsPackageStorageFormat_Impl( *pMedium ); + bool bOwnStorageFormat = IsOwnStorageFormat_Impl( *pMedium ); + bool bHasStorage = IsPackageStorageFormat_Impl( *pMedium ); if ( pMedium->GetFilter() ) { sal_uInt32 nError = HandleFilter( pMedium, this ); @@ -676,7 +676,7 @@ sal_Bool SfxObjectShell::DoLoad( SfxMedium *pMed ) pSet->Put( SfxBoolItem( SID_DOC_STARTPRESENTATION, true) ); } - EnableSetModified( sal_False ); + EnableSetModified( false ); pMedium->LockOrigFileOnDemand( true, false ); if ( GetError() == ERRCODE_NONE && bOwnStorageFormat && ( !pFilter || !( pFilter->GetFilterFlags() & SFX_FILTER_STARONEFILTER ) ) ) @@ -691,7 +691,7 @@ sal_Bool SfxObjectShell::DoLoad( SfxMedium *pMed ) try { - sal_Bool bWarnMediaTypeFallback = sal_False; + bool bWarnMediaTypeFallback = false; SFX_ITEMSET_ARG( pMedium->GetItemSet(), pRepairPackageItem, SfxBoolItem, SID_REPAIRPACKAGE, false); // treat the package as broken if the mediatype was retrieved as a fallback @@ -706,7 +706,7 @@ sal_Bool SfxObjectShell::DoLoad( SfxMedium *pMed ) // the mediatype was retrieved by using fallback solution but this is a repairing mode // so it is acceptable to open the document if there is no contents that required manifest.xml - bWarnMediaTypeFallback = sal_False; + bWarnMediaTypeFallback = false; } if ( bWarnMediaTypeFallback || !xStorage->getElementNames().getLength() ) @@ -729,7 +729,7 @@ sal_Bool SfxObjectShell::DoLoad( SfxMedium *pMed ) // the document loaded from template has no name SFX_ITEMSET_ARG( pMedium->GetItemSet(), pTemplateItem, SfxBoolItem, SID_TEMPLATE, false); if ( !pTemplateItem || !pTemplateItem->GetValue() ) - bHasName = sal_True; + bHasName = true; } else SetError( ERRCODE_ABORT, OUString( OSL_LOG_PREFIX ) ); @@ -741,7 +741,7 @@ sal_Bool SfxObjectShell::DoLoad( SfxMedium *pMed ) else if ( GetError() == ERRCODE_NONE && InitNew(0) ) { // Name vor ConvertFrom setzen, damit GetSbxObject() schon funktioniert - bHasName = sal_True; + bHasName = true; SetName( SfxResId(STR_NONAME).toString() ); if( !bHasStorage ) @@ -898,7 +898,7 @@ sal_uInt32 SfxObjectShell::HandleFilter( SfxMedium* pMedium, SfxObjectShell* pDo if( xFilterCFG.is() ) { - sal_Bool bAbort = sal_False; + bool bAbort = false; try { const SfxFilter* pFilter = pMedium->GetFilter(); Sequence < PropertyValue > aProps; @@ -958,7 +958,7 @@ sal_uInt32 SfxObjectShell::HandleFilter( SfxMedium* pMedium, SfxObjectShell* pDo pSet->Put( *pFilterData ); } else - bAbort = sal_True; + bAbort = true; } } @@ -989,7 +989,7 @@ sal_uInt32 SfxObjectShell::HandleFilter( SfxMedium* pMedium, SfxObjectShell* pDo -sal_Bool SfxObjectShell::IsOwnStorageFormat_Impl(const SfxMedium &rMedium) const +bool SfxObjectShell::IsOwnStorageFormat_Impl(const SfxMedium &rMedium) const { return !rMedium.GetFilter() || // Embedded ( rMedium.GetFilter()->IsOwnFormat() && @@ -999,7 +999,7 @@ sal_Bool SfxObjectShell::IsOwnStorageFormat_Impl(const SfxMedium &rMedium) const -sal_Bool SfxObjectShell::IsPackageStorageFormat_Impl(const SfxMedium &rMedium) const +bool SfxObjectShell::IsPackageStorageFormat_Impl(const SfxMedium &rMedium) const { return !rMedium.GetFilter() || // Embedded ( rMedium.GetFilter()->UsesStorage() && @@ -1008,12 +1008,12 @@ sal_Bool SfxObjectShell::IsPackageStorageFormat_Impl(const SfxMedium &rMedium) c -sal_Bool SfxObjectShell::DoSave() +bool SfxObjectShell::DoSave() // DoSave is only invoked for OLE. Save your own documents in the SFX through // DoSave_Impl order to allow for the creation of backups. // Save in your own format again. { - sal_Bool bOk = sal_False ; + bool bOk = false ; { ModifyBlocker_Impl aBlock( this ); @@ -1028,7 +1028,7 @@ sal_Bool SfxObjectShell::DoSave() { //TODO/MBA: GetOutputStorage?! Special mode, because it's "Save"?! ::comphelper::OStorageHelper::SetCommonStorageEncryptionData( GetMedium()->GetStorage(), aEncryptionData ); - bOk = sal_True; + bOk = true; } catch( uno::Exception& ) { @@ -1038,7 +1038,7 @@ sal_Bool SfxObjectShell::DoSave() DBG_ASSERT( bOk, "The root storage must allow to set common password!\n" ); } else - bOk = sal_True; + bOk = true; #ifndef DISABLE_SCRIPTING if ( HasBasic() ) { @@ -1073,7 +1073,7 @@ sal_Bool SfxObjectShell::DoSave() catch( uno::Exception& ) { SetError( ERRCODE_IO_GENERAL, OUString( OSL_LOG_PREFIX ) ); - bOk = sal_False; + bOk = false; } } #endif @@ -1088,7 +1088,7 @@ sal_Bool SfxObjectShell::DoSave() return bOk; } -void Lock_Impl( SfxObjectShell* pDoc, sal_Bool bLock ) +void Lock_Impl( SfxObjectShell* pDoc, bool bLock ) { SfxViewFrame *pFrame= SfxViewFrame::GetFirst( pDoc ); while ( pFrame ) @@ -1102,7 +1102,7 @@ void Lock_Impl( SfxObjectShell* pDoc, sal_Bool bLock ) -sal_Bool SfxObjectShell::SaveTo_Impl +bool SfxObjectShell::SaveTo_Impl ( SfxMedium &rMedium, // Medium, in which it will be stored const SfxItemSet* pSet @@ -1135,27 +1135,27 @@ sal_Bool SfxObjectShell::SaveTo_Impl rMedium.SetFilter(pFilter); } - sal_Bool bStorageBasedSource = IsPackageStorageFormat_Impl( *pMedium ); - sal_Bool bStorageBasedTarget = IsPackageStorageFormat_Impl( rMedium ); - sal_Bool bOwnSource = IsOwnStorageFormat_Impl( *pMedium ); - sal_Bool bOwnTarget = IsOwnStorageFormat_Impl( rMedium ); + bool bStorageBasedSource = IsPackageStorageFormat_Impl( *pMedium ); + bool bStorageBasedTarget = IsPackageStorageFormat_Impl( rMedium ); + bool bOwnSource = IsOwnStorageFormat_Impl( *pMedium ); + bool bOwnTarget = IsOwnStorageFormat_Impl( rMedium ); // Examine target format to determine whether to query if any password // protected libraries exceed the size we can handler if ( bOwnTarget && !QuerySaveSizeExceededModules_Impl( rMedium.GetInteractionHandler() ) ) { SetError( ERRCODE_IO_ABORT, OUString( OSL_LOG_PREFIX ) ); - return sal_False; + return false; } - sal_Bool bNeedsDisconnectionOnFail = sal_False; + bool bNeedsDisconnectionOnFail = false; - sal_Bool bStoreToSameLocation = sal_False; + bool bStoreToSameLocation = false; // the detection whether the script is changed should be done before saving - sal_Bool bTryToPreserveScriptSignature = sal_False; + bool bTryToPreserveScriptSignature = false; // no way to detect whether a filter is oasis format, have to wait for saving process - sal_Bool bNoPreserveForOasis = sal_False; + bool bNoPreserveForOasis = false; if ( bOwnSource && bOwnTarget && ( pImp->nScriptingSignatureState == SIGNATURESTATE_SIGNATURES_OK || pImp->nScriptingSignatureState == SIGNATURESTATE_SIGNATURES_NOTVALIDATED @@ -1166,7 +1166,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl // the checking of the library modified state iterates over the libraries, should be done only when required // currently the check is commented out since it is broken, we have to check the signature every time we save // TODO/LATER: let isAnyContainerModified() work! - bTryToPreserveScriptSignature = sal_True; // !pImp->pBasicManager->isAnyContainerModified(); + bTryToPreserveScriptSignature = true; // !pImp->pBasicManager->isAnyContainerModified(); if ( bTryToPreserveScriptSignature ) { // check that the storage format stays the same @@ -1192,7 +1192,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl } } - sal_Bool bCopyTo = sal_False; + bool bCopyTo = false; SfxItemSet *pMedSet = rMedium.GetItemSet(); if( pMedSet ) { @@ -1207,7 +1207,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl && !rMedium.GetName().equalsIgnoreAsciiCase("private:stream") && ::utl::UCBContentHelper::EqualURLs( pMedium->GetName(), rMedium.GetName() ) ) { - bStoreToSameLocation = sal_True; + bStoreToSameLocation = true; AddLog( OUString( OSL_LOG_PREFIX "Save" ) ); if ( pMedium->DocNeedsFileDateCheck() ) @@ -1222,7 +1222,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl { // before we overwrite the original file, we will make a backup if there is a demand for that // if the backup is not created here it will be created internally and will be removed in case of successful saving - const sal_Bool bDoBackup = SvtSaveOptions().IsBackup(); + const bool bDoBackup = SvtSaveOptions().IsBackup(); if ( bDoBackup ) { AddLog( OUString( OSL_LOG_PREFIX "DoBackup" ) ); @@ -1334,7 +1334,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl // TODO/LATER: error handling if( rMedium.GetErrorCode() || !pMedium || pMedium->GetErrorCode() || GetErrorCode() ) - return sal_False; + return false; AddLog( OUString( OSL_LOG_PREFIX "Locking" ) ); @@ -1343,7 +1343,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl if ( bStorageBasedTarget ) { if ( rMedium.GetErrorCode() ) - return sal_False; + return false; // If the filter is a "cross export" filter ( f.e. a filter for exporting an impress document from // a draw document ), the ClassId of the destination storage is different from the ClassId of this @@ -1377,15 +1377,15 @@ sal_Bool SfxObjectShell::SaveTo_Impl // TODO/LATER: error handling if( rMedium.GetErrorCode() || pMedium->GetErrorCode() || GetErrorCode() ) - return sal_False; + return false; - sal_Bool bOldStat = pImp->bForbidReload; + bool bOldStat = pImp->bForbidReload; pImp->bForbidReload = sal_True; // lock user interface while saving the document - Lock_Impl( this, sal_True ); + Lock_Impl( this, true ); - sal_Bool bOk = sal_False; + bool bOk = false; // TODO/LATER: get rid of bOk if( bOwnTarget && !( pFilter->GetFilterFlags() & SFX_FILTER_STARONEFILTER ) ) @@ -1395,21 +1395,21 @@ sal_Bool SfxObjectShell::SaveTo_Impl if ( !xMedStorage.is() ) { // no saving without storage, unlock UI and return - Lock_Impl( this, sal_False ); + Lock_Impl( this, false ); pImp->bForbidReload = bOldStat; AddLog( OUString( OSL_LOG_PREFIX "Storing failed, still no error set." ) ); - return sal_False; + return false; } // transfer password from the parameters to the storage uno::Sequence< beans::NamedValue > aEncryptionData; - sal_Bool bPasswdProvided = sal_False; + bool bPasswdProvided = false; if ( GetEncryptionData_Impl( rMedium.GetItemSet(), aEncryptionData ) ) { - bPasswdProvided = sal_True; + bPasswdProvided = true; try { ::comphelper::OStorageHelper::SetCommonStorageEncryptionData( xMedStorage, aEncryptionData ); - bOk = sal_True; + bOk = true; } catch( uno::Exception& ) { @@ -1418,7 +1418,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl } } else - bOk = sal_True; + bOk = true; pFilter = rMedium.GetFilter(); @@ -1428,7 +1428,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl if ( bOk ) { - bOk = sal_False; + bOk = false; // currently the case that the storage is the same should be impossible if ( xMedStorage == GetStorage() ) { @@ -1503,7 +1503,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl { AddLog( OUString( OSL_LOG_PREFIX "Preserve versions has failed." ) ); SAL_WARN( "sfx.doc", "Couldn't copy versions!" ); - bOk = sal_False; + bOk = false; // TODO/LATER: a specific error could be set } } @@ -1570,7 +1570,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl if( bOk && !bCopyTo ) // we also don't touch any graphical replacements here - bOk = SaveChildren( sal_True ); + bOk = SaveChildren( true ); } if ( bOk ) @@ -1702,7 +1702,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl if( !ConnectTmpStorage_Impl( pMedium->GetStorage(), pMedium ) ) { AddLog( OUString( OSL_LOG_PREFIX "Process after storing has failed." ) ); - bOk = sal_False; + bOk = false; } } } @@ -1718,7 +1718,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl } // unlock user interface - Lock_Impl( this, sal_False ); + Lock_Impl( this, false ); pImp->bForbidReload = bOldStat; if ( bOk ) @@ -1766,7 +1766,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl } -sal_Bool SfxObjectShell::DisconnectStorage_Impl( SfxMedium& rSrcMedium, SfxMedium& rTargetMedium ) +bool SfxObjectShell::DisconnectStorage_Impl( SfxMedium& rSrcMedium, SfxMedium& rTargetMedium ) { SAL_INFO( "sfx.doc", "SfxObjectShell::DisconnectStorage_Impl" ); @@ -1774,7 +1774,7 @@ sal_Bool SfxObjectShell::DisconnectStorage_Impl( SfxMedium& rSrcMedium, SfxMediu uno::Reference< embed::XStorage > xStorage = rSrcMedium.GetStorage(); - sal_Bool bResult = sal_False; + bool bResult = false; if ( xStorage == pImp->m_xDocStorage ) { try @@ -1802,7 +1802,7 @@ sal_Bool SfxObjectShell::DisconnectStorage_Impl( SfxMedium& rSrcMedium, SfxMediu // the storage is successfully attached to backup, thus it it owned by the document not by the medium rSrcMedium.CanDisposeStorage_Impl( false ); - bResult = sal_True; + bResult = true; } } catch ( uno::Exception& ) @@ -1814,7 +1814,7 @@ sal_Bool SfxObjectShell::DisconnectStorage_Impl( SfxMedium& rSrcMedium, SfxMediu -sal_Bool SfxObjectShell::ConnectTmpStorage_Impl( +bool SfxObjectShell::ConnectTmpStorage_Impl( const uno::Reference< embed::XStorage >& xStorage, SfxMedium* pMediumArg ) @@ -1828,7 +1828,7 @@ sal_Bool SfxObjectShell::ConnectTmpStorage_Impl( { SAL_INFO( "sfx.doc", "SfxObjectShell::ConnectTmpStorage_Impl" ); - sal_Bool bResult = sal_False; + bool bResult = false; if ( xStorage.is() ) { @@ -1842,7 +1842,7 @@ sal_Bool SfxObjectShell::ConnectTmpStorage_Impl( if ( pMediumArg ) pMediumArg->CanDisposeStorage_Impl( false ); - bResult = sal_True; + bResult = true; } catch( uno::Exception& ) { @@ -1898,19 +1898,19 @@ sal_Bool SfxObjectShell::ConnectTmpStorage_Impl( -sal_Bool SfxObjectShell::DoSaveObjectAs( SfxMedium& rMedium, sal_Bool bCommit ) +bool SfxObjectShell::DoSaveObjectAs( SfxMedium& rMedium, bool bCommit ) { - sal_Bool bOk = sal_False; + bool bOk = false; ModifyBlocker_Impl aBlock( this ); uno::Reference < embed::XStorage > xNewStor = rMedium.GetStorage(); if ( !xNewStor.is() ) - return sal_False; + return false; uno::Reference < beans::XPropertySet > xPropSet( xNewStor, uno::UNO_QUERY ); if ( !xPropSet.is() ) - return sal_False; + return false; Any a = xPropSet->getPropertyValue("MediaType"); OUString aMediaType; @@ -1940,19 +1940,19 @@ sal_Bool SfxObjectShell::DoSaveObjectAs( SfxMedium& rMedium, sal_Bool bCommit ) // TODO/LATER: may be the call must be removed completelly -sal_Bool SfxObjectShell::DoSaveAs( SfxMedium& rMedium ) +bool SfxObjectShell::DoSaveAs( SfxMedium& rMedium ) { // here only root storages are included, which are stored via temp file rMedium.CreateTempFileNoCopy(); SetError(rMedium.GetErrorCode(), OUString( OSL_LOG_PREFIX ) ); if ( GetError() ) - return sal_False; + return false; // copy version list from "old" medium to target medium, so it can be used on saving if ( pImp->bPreserveVersions ) rMedium.TransferVersionList_Impl( *pMedium ); - sal_Bool bRet = SaveTo_Impl( rMedium, NULL ); + bool bRet = SaveTo_Impl( rMedium, NULL ); if ( !bRet ) SetError(rMedium.GetErrorCode(), OUString( OSL_LOG_PREFIX ) ); return bRet; @@ -1960,12 +1960,12 @@ sal_Bool SfxObjectShell::DoSaveAs( SfxMedium& rMedium ) -sal_Bool SfxObjectShell::DoSaveCompleted( SfxMedium* pNewMed ) +bool SfxObjectShell::DoSaveCompleted( SfxMedium* pNewMed ) { SAL_INFO( "sfx.doc", "SfxObjectShell::DoSaveCompleted" ); - sal_Bool bOk = sal_True; - sal_Bool bMedChanged = pNewMed && pNewMed!=pMedium; + bool bOk = true; + bool bMedChanged = pNewMed && pNewMed!=pMedium; DBG_ASSERT( !pNewMed || pNewMed->GetError() == ERRCODE_NONE, "DoSaveCompleted: Medium has error!" ); @@ -1983,7 +1983,7 @@ sal_Bool SfxObjectShell::DoSaveCompleted( SfxMedium* pNewMed ) if( bMedChanged ) { if (!pNewMed->GetName().isEmpty()) - bHasName = sal_True; + bHasName = true; Broadcast( SfxSimpleHint(SFX_HINT_NAMECHANGED) ); getDocProperties()->setGenerator( ::utl::DocInfoHelper::GetGeneratorString() ); @@ -2047,7 +2047,7 @@ sal_Bool SfxObjectShell::DoSaveCompleted( SfxMedium* pNewMed ) if( pFilter && !IsPackageStorageFormat_Impl( *pMedium ) && (pMedium->GetOpenMode() & STREAM_WRITE )) { pMedium->ReOpen(); - bOk = SaveCompletedChildren( sal_False ); + bOk = SaveCompletedChildren( false ); } else bOk = SaveCompleted( NULL ); @@ -2089,7 +2089,7 @@ sal_Bool SfxObjectShell::DoSaveCompleted( SfxMedium* pNewMed ) // Set new title if (!pNewMed->GetName().isEmpty() && SFX_CREATE_MODE_EMBEDDED != eCreateMode) InvalidateName(); - SetModified(sal_False); // reset only by set medium + SetModified(false); // reset only by set medium Broadcast( SfxSimpleHint(SFX_HINT_MODECHANGED) ); // this is the end of the saving process, it is possible that @@ -2124,7 +2124,7 @@ void SfxObjectShell::AddToRecentlyUsedList() -sal_Bool SfxObjectShell::ConvertFrom +bool SfxObjectShell::ConvertFrom ( SfxMedium& /*rMedium*/ /* <SfxMedium>, which describes the source file (for example file name, <SfxFilter>, @@ -2145,16 +2145,16 @@ sal_Bool SfxObjectShell::ConvertFrom [Return value] - sal_Bool sal_True + bool true The document could be loaded. - sal_False + false The document could not be loaded, an error code received through <SvMedium::GetError()const> [Example] - sal_Bool DocSh::ConvertFrom( SfxMedium &rMedium ) + bool DocSh::ConvertFrom( SfxMedium &rMedium ) { SvStreamRef xStream = rMedium.GetInStream(); if( xStream.is() ) @@ -2166,7 +2166,7 @@ sal_Bool SfxObjectShell::ConvertFrom return SVSTREAM_OK == rMedium.GetError(); } - return sal_False; + return false; } [Cross-references] @@ -2175,7 +2175,7 @@ sal_Bool SfxObjectShell::ConvertFrom <SFX_FILTER_REGISTRATION> */ { - return sal_False; + return false; } bool SfxObjectShell::ImportFrom(SfxMedium& rMedium, @@ -2233,8 +2233,8 @@ bool SfxObjectShell::ImportFrom(SfxMedium& rMedium, const com::sun::star::beans::PropertyValue * pOldValue = lDescriptor.getConstArray(); const OUString sInputStream ( "InputStream" ); - sal_Bool bHasInputStream = sal_False; - sal_Bool bHasBaseURL = sal_False; + bool bHasInputStream = false; + bool bHasBaseURL = false; sal_Int32 i; sal_Int32 nEnd = lDescriptor.getLength(); @@ -2242,9 +2242,9 @@ bool SfxObjectShell::ImportFrom(SfxMedium& rMedium, { pNewValue[i] = pOldValue[i]; if ( pOldValue [i].Name == sInputStream ) - bHasInputStream = sal_True; + bHasInputStream = true; else if ( pOldValue[i].Name == "DocumentBaseURL" ) - bHasBaseURL = sal_True; + bHasBaseURL = true; } if ( !bHasInputStream ) @@ -2272,7 +2272,7 @@ bool SfxObjectShell::ImportFrom(SfxMedium& rMedium, // #i119492# During loading, some OLE objects like chart will be set // modified flag, so needs to reset the flag to false after loading - sal_Bool bRtn = xLoader->filter( aArgs ); + bool bRtn = xLoader->filter( aArgs ); uno::Sequence < OUString > aNames = GetEmbeddedObjectContainer().GetObjectNames(); for ( sal_Int32 n = 0; n < aNames.getLength(); ++n ) { @@ -2312,7 +2312,7 @@ bool SfxObjectShell::ImportFrom(SfxMedium& rMedium, return false; } -sal_Bool SfxObjectShell::ExportTo( SfxMedium& rMedium ) +bool SfxObjectShell::ExportTo( SfxMedium& rMedium ) { OUString aFilterName( rMedium.GetFilter()->GetFilterName() ); uno::Reference< document::XExporter > xExporter; @@ -2423,12 +2423,12 @@ sal_Bool SfxObjectShell::ExportTo( SfxMedium& rMedium ) {} } - return sal_False; + return false; } -sal_Bool SfxObjectShell::ConvertTo +bool SfxObjectShell::ConvertTo ( SfxMedium& /*rMedium*/ /* <SfxMedium>, which describes the target file (for example file name, <SfxFilter>, @@ -2449,17 +2449,17 @@ sal_Bool SfxObjectShell::ConvertTo [Return value] - sal_Bool sal_True + bool true The document could be saved. - sal_False + false The document could not be saved, an error code is received by <SvMedium::GetError()const> [Example] - sal_Bool DocSh::ConvertTo( SfxMedium &rMedium ) + bool DocSh::ConvertTo( SfxMedium &rMedium ) { SvStreamRef xStream = rMedium.GetOutStream(); if ( xStream.is() ) @@ -2470,7 +2470,7 @@ sal_Bool SfxObjectShell::ConvertTo rMedium.CloseOutStream(); // opens the InStream automatically return SVSTREAM_OK == rMedium.GetError(); } - return sal_False ; + return false ; } [Cross-references] @@ -2480,12 +2480,12 @@ sal_Bool SfxObjectShell::ConvertTo */ { - return sal_False; + return false; } -sal_Bool SfxObjectShell::DoSave_Impl( const SfxItemSet* pArgs ) +bool SfxObjectShell::DoSave_Impl( const SfxItemSet* pArgs ) { SfxMedium* pRetrMedium = GetMedium(); const SfxFilter* pFilter = pRetrMedium->GetFilter(); @@ -2518,7 +2518,7 @@ sal_Bool SfxObjectShell::DoSave_Impl( const SfxItemSet* pArgs ) { SetError( pMediumTmp->GetError(), OUString( OSL_LOG_PREFIX ) ); delete pMediumTmp; - return sal_False; + return false; } // copy version list from "old" medium to target medium, so it can be used on saving @@ -2531,10 +2531,10 @@ sal_Bool SfxObjectShell::DoSave_Impl( const SfxItemSet* pArgs ) if ( pxInteractionItem && ( pxInteractionItem->GetValue() >>= xInteract ) && xInteract.is() ) pMediumTmp->GetItemSet()->Put( SfxUnoAnyItem( SID_INTERACTIONHANDLER, makeAny( xInteract ) ) ); - sal_Bool bSaved = sal_False; + bool bSaved = false; if( !GetError() && SaveTo_Impl( *pMediumTmp, pArgs ) ) { - bSaved = sal_True; + bSaved = true; if( pMediumTmp->GetItemSet() ) { @@ -2544,7 +2544,7 @@ sal_Bool SfxObjectShell::DoSave_Impl( const SfxItemSet* pArgs ) SetError(pMediumTmp->GetErrorCode(), OUString( OSL_LOG_PREFIX ) ); - sal_Bool bOpen( sal_False ); + bool bOpen( false ); bOpen = DoSaveCompleted( pMediumTmp ); DBG_ASSERT(bOpen,"Error handling for DoSaveCompleted not implemented"); @@ -2573,17 +2573,17 @@ sal_Bool SfxObjectShell::DoSave_Impl( const SfxItemSet* pArgs ) -sal_Bool SfxObjectShell::Save_Impl( const SfxItemSet* pSet ) +bool SfxObjectShell::Save_Impl( const SfxItemSet* pSet ) { if ( IsReadOnly() ) { SetError( ERRCODE_SFX_DOCUMENTREADONLY, OUString( OSL_LOG_PREFIX ) ); - return sal_False; + return false; } pImp->bIsSaving = sal_True; - sal_Bool bSaved = sal_False; + bool bSaved = false; SFX_ITEMSET_ARG( GetMedium()->GetItemSet(), pSalvageItem, SfxStringItem, SID_DOC_SALVAGE, false); if ( pSalvageItem ) { @@ -2613,7 +2613,7 @@ sal_Bool SfxObjectShell::Save_Impl( const SfxItemSet* pSet ) -sal_Bool SfxObjectShell::CommonSaveAs_Impl +bool SfxObjectShell::CommonSaveAs_Impl ( const INetURLObject& aURL, const OUString& aFilterName, @@ -2623,7 +2623,7 @@ sal_Bool SfxObjectShell::CommonSaveAs_Impl if( aURL.HasError() ) { SetError( ERRCODE_IO_INVALIDPARAMETER, OUString( OSL_LOG_PREFIX ) ); - return sal_False; + return false; } if ( aURL != INetURLObject( OUString( "private:stream" ) ) ) @@ -2645,7 +2645,7 @@ sal_Bool SfxObjectShell::CommonSaveAs_Impl { // Then error message: "already opened" SetError(ERRCODE_SFX_ALREADYOPEN, OUString( OSL_LOG_PREFIX )); - return sal_False; + return false; } } @@ -2653,7 +2653,7 @@ sal_Bool SfxObjectShell::CommonSaveAs_Impl DBG_ASSERT( aParams->Count() != 0, "Incorrect Parameter"); SFX_ITEMSET_ARG( aParams, pSaveToItem, SfxBoolItem, SID_SAVETO, false ); - sal_Bool bSaveTo = pSaveToItem ? pSaveToItem->GetValue() : sal_False; + bool bSaveTo = pSaveToItem && pSaveToItem->GetValue(); const SfxFilter* pFilter = GetFactory().GetFilterContainer()->GetFilter4FilterName( aFilterName ); if ( !pFilter @@ -2661,14 +2661,14 @@ sal_Bool SfxObjectShell::CommonSaveAs_Impl || (!bSaveTo && !pFilter->CanImport()) ) { SetError( ERRCODE_IO_INVALIDPARAMETER, OUString( OSL_LOG_PREFIX ) ); - return sal_False; + return false; } SFX_ITEMSET_ARG( aParams, pCopyStreamItem, SfxBoolItem, SID_COPY_STREAM_IF_POSSIBLE, false ); if ( bSaveTo && pCopyStreamItem && pCopyStreamItem->GetValue() && !IsModified() ) { if ( pMedium->TryDirectTransfer( aURL.GetMainURL( INetURLObject::NO_DECODE ), *aParams ) ) - return sal_True; + return true; } aParams->ClearItem( SID_COPY_STREAM_IF_POSSIBLE ); @@ -2677,13 +2677,13 @@ sal_Bool SfxObjectShell::CommonSaveAs_Impl SfxMedium *pActMed = GetMedium(); const INetURLObject aActName(pActMed->GetName()); - sal_Bool bWasReadonly = IsReadOnly(); + bool bWasReadonly = IsReadOnly(); if ( aURL == aActName && aURL != INetURLObject( OUString("private:stream") ) && IsReadOnly() ) { SetError(ERRCODE_SFX_DOCUMENTREADONLY, OUString( OSL_LOG_PREFIX )); - return sal_False; + return false; } if( SFX_ITEM_SET != aParams->GetItemState(SID_UNPACK) && SvtSaveOptions().IsSaveUnpacked() ) @@ -2742,7 +2742,7 @@ sal_Bool SfxObjectShell::CommonSaveAs_Impl { // the target format is the own format // the target document must be shared - SwitchToShared( sal_True, sal_False ); + SwitchToShared( true, false ); } } #endif @@ -2751,15 +2751,15 @@ sal_Bool SfxObjectShell::CommonSaveAs_Impl if ( bWasReadonly && !bSaveTo ) Broadcast( SfxSimpleHint(SFX_HINT_MODECHANGED) ); - return sal_True; + return true; } else - return sal_False; + return false; } -sal_Bool SfxObjectShell::PreDoSaveAs_Impl +bool SfxObjectShell::PreDoSaveAs_Impl ( const OUString& rFileName, const OUString& aFilterName, @@ -2818,12 +2818,12 @@ sal_Bool SfxObjectShell::PreDoSaveAs_Impl // creating temporary file failed ( f.e. floppy disk not inserted! ) SetError( pNewFile->GetError(), OUString( OSL_LOG_PREFIX ) ); delete pNewFile; - return sal_False; + return false; } // check if a "SaveTo" is wanted, no "SaveAs" SFX_ITEMSET_ARG( pParams, pSaveToItem, SfxBoolItem, SID_SAVETO, false ); - sal_Bool bCopyTo = GetCreateMode() == SFX_CREATE_MODE_EMBEDDED || (pSaveToItem && pSaveToItem->GetValue()); + bool bCopyTo = GetCreateMode() == SFX_CREATE_MODE_EMBEDDED || (pSaveToItem && pSaveToItem->GetValue()); // distinguish between "Save" and "SaveAs" pImp->bIsSaving = sal_False; @@ -2833,10 +2833,10 @@ sal_Bool SfxObjectShell::PreDoSaveAs_Impl pNewFile->TransferVersionList_Impl( *pMedium ); // Save the document ( first as temporary file, then transfer to the target URL by committing the medium ) - sal_Bool bOk = sal_False; + bool bOk = false; if ( !pNewFile->GetErrorCode() && SaveTo_Impl( *pNewFile, NULL ) ) { - bOk = sal_True; + bOk = true; // transfer a possible error from the medium to the document SetError( pNewFile->GetErrorCode(), OUString( OSL_LOG_PREFIX ) ); @@ -2852,7 +2852,7 @@ sal_Bool SfxObjectShell::PreDoSaveAs_Impl if( bOk ) { if( !bCopyTo ) - SetModified( sal_False ); + SetModified( false ); } else { @@ -2865,7 +2865,7 @@ sal_Bool SfxObjectShell::PreDoSaveAs_Impl if ( !bCopyTo ) { // reconnect to the old medium - sal_Bool bRet( sal_False ); + bool bRet( false ); bRet = DoSaveCompleted( pMedium ); DBG_ASSERT( bRet, "Error in DoSaveCompleted, can't be handled!"); (void)bRet; @@ -2890,21 +2890,21 @@ sal_Bool SfxObjectShell::PreDoSaveAs_Impl if ( bCopyTo ) DELETEZ( pNewFile ); else if( !bOk ) - SetModified( sal_True ); + SetModified( true ); return bOk; } -sal_Bool SfxObjectShell::LoadFrom( SfxMedium& /*rMedium*/ ) +bool SfxObjectShell::LoadFrom( SfxMedium& /*rMedium*/ ) { SAL_WARN( "sfx.doc", "Base implementation, must not be called in general!" ); - return sal_True; + return true; } -sal_Bool SfxObjectShell::IsInformationLost() +bool SfxObjectShell::IsInformationLost() { Sequence< PropertyValue > aProps = GetModel()->getArgs(); OUString aFilterName; @@ -2926,11 +2926,11 @@ sal_Bool SfxObjectShell::IsInformationLost() return ( pFilt && pFilt->IsAlienFormat() ); } - return sal_False; + return false; } -sal_Bool SfxObjectShell::CanReload_Impl() +bool SfxObjectShell::CanReload_Impl() /* [Description] @@ -3032,22 +3032,22 @@ sal_Int16 SfxObjectShell::QueryHiddenInformation( HiddenWarningFact eFact, Windo return nRet; } -sal_Bool SfxObjectShell::HasSecurityOptOpenReadOnly() const +bool SfxObjectShell::HasSecurityOptOpenReadOnly() const { - return sal_True; + return true; } -sal_Bool SfxObjectShell::IsSecurityOptOpenReadOnly() const +bool SfxObjectShell::IsSecurityOptOpenReadOnly() const { return IsLoadReadonly(); } -void SfxObjectShell::SetSecurityOptOpenReadOnly( sal_Bool _b ) +void SfxObjectShell::SetSecurityOptOpenReadOnly( bool _b ) { SetLoadReadonly( _b ); } -sal_Bool SfxObjectShell::LoadOwnFormat( SfxMedium& rMedium ) +bool SfxObjectShell::LoadOwnFormat( SfxMedium& rMedium ) { SAL_INFO( "sfx.doc", "PERFORMANCE SfxObjectShell::LoadOwnFormat" ); SAL_INFO( "sfx.doc", "loading \" " << rMedium.GetName() << "\"" ); @@ -3076,13 +3076,13 @@ sal_Bool SfxObjectShell::LoadOwnFormat( SfxMedium& rMedium ) // load document return Load( rMedium ); } - return sal_False; + return false; } else - return sal_False; + return false; } -sal_Bool SfxObjectShell::SaveAsOwnFormat( SfxMedium& rMedium ) +bool SfxObjectShell::SaveAsOwnFormat( SfxMedium& rMedium ) { uno::Reference< embed::XStorage > xStorage = rMedium.GetStorage(); if( xStorage.is() ) @@ -3111,7 +3111,7 @@ sal_Bool SfxObjectShell::SaveAsOwnFormat( SfxMedium& rMedium ) #endif return SaveAs( rMedium ); } - else return sal_False; + else return false; } uno::Reference< embed::XStorage > SfxObjectShell::GetStorage() @@ -3140,34 +3140,34 @@ uno::Reference< embed::XStorage > SfxObjectShell::GetStorage() } -sal_Bool SfxObjectShell::SaveChildren( sal_Bool bObjectsOnly ) +bool SfxObjectShell::SaveChildren( bool bObjectsOnly ) { SAL_INFO( "sfx.doc", "SfxObjectShell::SaveChildren" ); - sal_Bool bResult = sal_True; + bool bResult = true; if ( pImp->mpObjectContainer ) { - sal_Bool bOasis = ( SotStorage::GetVersion( GetStorage() ) > SOFFICE_FILEFORMAT_60 ); + bool bOasis = ( SotStorage::GetVersion( GetStorage() ) > SOFFICE_FILEFORMAT_60 ); GetEmbeddedObjectContainer().StoreChildren(bOasis,bObjectsOnly); } return bResult; } -sal_Bool SfxObjectShell::SaveAsChildren( SfxMedium& rMedium ) +bool SfxObjectShell::SaveAsChildren( SfxMedium& rMedium ) { SAL_INFO( "sfx.doc", "SfxObjectShell::SaveAsChildren" ); - sal_Bool bResult = sal_True; + bool bResult = true; uno::Reference < embed::XStorage > xStorage = rMedium.GetStorage(); if ( !xStorage.is() ) - return sal_False; + return false; if ( xStorage == GetStorage() ) return SaveChildren(); - sal_Bool bOasis = sal_True; + bool bOasis = true; if ( pImp->mpObjectContainer ) { bOasis = ( SotStorage::GetVersion( xStorage ) > SOFFICE_FILEFORMAT_60 ); @@ -3180,11 +3180,11 @@ sal_Bool SfxObjectShell::SaveAsChildren( SfxMedium& rMedium ) return bResult; } -sal_Bool SfxObjectShell::SaveCompletedChildren( sal_Bool bSuccess ) +bool SfxObjectShell::SaveCompletedChildren( bool bSuccess ) { SAL_INFO( "sfx.doc", "SfxObjectShell::SaveCompletedChildren" ); - sal_Bool bResult = sal_True; + bool bResult = true; if ( pImp->mpObjectContainer ) { @@ -3205,7 +3205,7 @@ sal_Bool SfxObjectShell::SaveCompletedChildren( sal_Bool bSuccess ) catch( uno::Exception& ) { // TODO/LATER: error handling - bResult = sal_False; + bResult = false; break; } } @@ -3216,18 +3216,18 @@ sal_Bool SfxObjectShell::SaveCompletedChildren( sal_Bool bSuccess ) return bResult; } -sal_Bool SfxObjectShell::SwitchChildrenPersistance( const uno::Reference< embed::XStorage >& xStorage, - sal_Bool bForceNonModified ) +bool SfxObjectShell::SwitchChildrenPersistance( const uno::Reference< embed::XStorage >& xStorage, + bool bForceNonModified ) { SAL_INFO( "sfx.doc", "SfxObjectShell::SwitchChildrenPersistence" ); if ( !xStorage.is() ) { // TODO/LATER: error handling - return sal_False; + return false; } - sal_Bool bResult = sal_True; + bool bResult = true; if ( pImp->mpObjectContainer ) pImp->mpObjectContainer->SetPersistentEntries(xStorage,bForceNonModified); @@ -3236,12 +3236,12 @@ sal_Bool SfxObjectShell::SwitchChildrenPersistance( const uno::Reference< embed: } // Never call this method directly, always use the DoSaveCompleted call -sal_Bool SfxObjectShell::SaveCompleted( const uno::Reference< embed::XStorage >& xStorage ) +bool SfxObjectShell::SaveCompleted( const uno::Reference< embed::XStorage >& xStorage ) { SAL_INFO( "sfx.doc", "SfxObjectShell::SaveCompleted" ); - sal_Bool bResult = sal_False; - sal_Bool bSendNotification = sal_False; + bool bResult = false; + bool bSendNotification = false; uno::Reference< embed::XStorage > xOldStorageHolder; #ifdef DBG_UTIL @@ -3252,14 +3252,14 @@ sal_Bool SfxObjectShell::SaveCompleted( const uno::Reference< embed::XStorage >& if ( !xStorage.is() || xStorage == GetStorage() ) { // no persistence change - bResult = SaveCompletedChildren( sal_False ); + bResult = SaveCompletedChildren( false ); } else { if ( pImp->mpObjectContainer ) GetEmbeddedObjectContainer().SwitchPersistence( xStorage ); - bResult = SwitchChildrenPersistance( xStorage, sal_True ); + bResult = SwitchChildrenPersistance( xStorage, true ); } if ( bResult ) @@ -3271,10 +3271,10 @@ sal_Bool SfxObjectShell::SaveCompleted( const uno::Reference< embed::XStorage >& DBG_ASSERT( bHasContainer == (pImp->mpObjectContainer != 0), "Wrong storage in object container!" ); xOldStorageHolder = pImp->m_xDocStorage; pImp->m_xDocStorage = xStorage; - bSendNotification = sal_True; + bSendNotification = true; if ( IsEnableSetModified() ) - SetModified( sal_False ); + SetModified( false ); } } else @@ -3283,7 +3283,7 @@ sal_Bool SfxObjectShell::SaveCompleted( const uno::Reference< embed::XStorage >& GetEmbeddedObjectContainer().SwitchPersistence( pImp->m_xDocStorage ); // let already successfully connected objects be switched back - SwitchChildrenPersistance( pImp->m_xDocStorage, sal_True ); + SwitchChildrenPersistance( pImp->m_xDocStorage, true ); } if ( bSendNotification ) @@ -3295,12 +3295,12 @@ sal_Bool SfxObjectShell::SaveCompleted( const uno::Reference< embed::XStorage >& } #if OSL_DEBUG_LEVEL > 0 -sal_Bool StoragesOfUnknownMediaTypeAreCopied_Impl( const uno::Reference< embed::XStorage >& xSource, +bool StoragesOfUnknownMediaTypeAreCopied_Impl( const uno::Reference< embed::XStorage >& xSource, const uno::Reference< embed::XStorage >& xTarget ) { OSL_ENSURE( xSource.is() && xTarget.is(), "Source and/or target storages are not available!\n" ); if ( !xSource.is() || !xTarget.is() || xSource == xTarget ) - return sal_True; + return true; try { @@ -3311,7 +3311,7 @@ sal_Bool StoragesOfUnknownMediaTypeAreCopied_Impl( const uno::Reference< embed:: { OUString aMediaType; OUString aMediaTypePropName( "MediaType" ); - sal_Bool bGotMediaType = sal_False; + bool bGotMediaType = false; try { @@ -3372,7 +3372,7 @@ sal_Bool StoragesOfUnknownMediaTypeAreCopied_Impl( const uno::Reference< embed:: default: { if ( !xTarget->hasByName( aSubElements[nInd] ) ) - return sal_False; + return false; } } } @@ -3384,15 +3384,15 @@ sal_Bool StoragesOfUnknownMediaTypeAreCopied_Impl( const uno::Reference< embed:: SAL_WARN( "sfx.doc", "Cant check storage consistency!" ); } - return sal_True; + return true; } #endif -sal_Bool SfxObjectShell::SwitchPersistance( const uno::Reference< embed::XStorage >& xStorage ) +bool SfxObjectShell::SwitchPersistance( const uno::Reference< embed::XStorage >& xStorage ) { SAL_INFO( "sfx.doc", "SfxObjectShell::SwitchPersistance" ); - sal_Bool bResult = sal_False; + bool bResult = false; #ifdef DBG_UTIL // check for wrong creation of object container bool bHasContainer = ( pImp->mpObjectContainer != 0 ); @@ -3416,19 +3416,19 @@ sal_Bool SfxObjectShell::SwitchPersistance( const uno::Reference< embed::XStorag DoSaveCompleted( new SfxMedium( xStorage, GetMedium()->GetBaseURL() ) ); if ( IsEnableSetModified() ) - SetModified( sal_True ); // ??? + SetModified( true ); // ??? } return bResult; } -sal_Bool SfxObjectShell::CopyStoragesOfUnknownMediaType( const uno::Reference< embed::XStorage >& xSource, +bool SfxObjectShell::CopyStoragesOfUnknownMediaType( const uno::Reference< embed::XStorage >& xSource, const uno::Reference< embed::XStorage >& xTarget ) { SAL_INFO( "sfx.doc", "SfxObjectShell::CopyStoragesOfUnknownMediaType" ); // This method does not commit the target storage and should not do it - sal_Bool bResult = sal_True; + bool bResult = true; try { @@ -3450,7 +3450,7 @@ sal_Bool SfxObjectShell::CopyStoragesOfUnknownMediaType( const uno::Reference< e { OUString aMediaType; OUString aMediaTypePropName( "MediaType" ); - sal_Bool bGotMediaType = sal_False; + bool bGotMediaType = false; try { @@ -3528,22 +3528,22 @@ sal_Bool SfxObjectShell::CopyStoragesOfUnknownMediaType( const uno::Reference< e } catch( uno::Exception& ) { - bResult = sal_False; + bResult = false; // TODO/LATER: a specific error could be provided } return bResult; } -sal_Bool SfxObjectShell::GenerateAndStoreThumbnail( sal_Bool bEncrypted, - sal_Bool bIsTemplate, +bool SfxObjectShell::GenerateAndStoreThumbnail( bool bEncrypted, + bool bIsTemplate, const uno::Reference< embed::XStorage >& xStor ) { SAL_INFO( "sfx.doc", "SfxObjectShell::GenerateAndStoreThumbnail" ); - bIsInGenerateThumbnail = sal_True;//optimize thumbnail generate and store procedure to improve odt saving performance, i120030 + bIsInGenerateThumbnail = true;//optimize thumbnail generate and store procedure to improve odt saving performance, i120030 - sal_Bool bResult = sal_False; + bool bResult = false; try { uno::Reference< embed::XStorage > xThumbnailStor = @@ -3559,7 +3559,7 @@ sal_Bool SfxObjectShell::GenerateAndStoreThumbnail( sal_Bool bEncrypted, { uno::Reference< embed::XTransactedObject > xTransact( xThumbnailStor, uno::UNO_QUERY_THROW ); xTransact->commit(); - bResult = sal_True; + bResult = true; } } } @@ -3567,16 +3567,16 @@ sal_Bool SfxObjectShell::GenerateAndStoreThumbnail( sal_Bool bEncrypted, { } - bIsInGenerateThumbnail = sal_False;//optimize thumbnail generate and store procedure to improve odt saving performance, i120030 + bIsInGenerateThumbnail = false;//optimize thumbnail generate and store procedure to improve odt saving performance, i120030 return bResult; } -sal_Bool SfxObjectShell::WriteThumbnail( sal_Bool bEncrypted, - sal_Bool bIsTemplate, - const uno::Reference< io::XStream >& xStream ) +bool SfxObjectShell::WriteThumbnail( bool bEncrypted, + bool bIsTemplate, + const uno::Reference< io::XStream >& xStream ) { - sal_Bool bResult = sal_False; + bool bResult = false; if ( xStream.is() ) { @@ -3599,7 +3599,7 @@ sal_Bool SfxObjectShell::WriteThumbnail( sal_Bool bEncrypted, else { ::boost::shared_ptr<GDIMetaFile> pMetaFile = - GetPreviewMetaFile( sal_False ); + GetPreviewMetaFile( false ); if ( pMetaFile ) { bResult = GraphicHelper::getThumbnailFormatFromGDI_Impl( @@ -3639,23 +3639,23 @@ void SfxObjectShell::CheckConfigOptions() SetConfigOptionsChecked(true); } -sal_Bool SfxObjectShell::IsConfigOptionsChecked() const +bool SfxObjectShell::IsConfigOptionsChecked() const { return pImp->m_bConfigOptionsChecked; } -void SfxObjectShell::SetConfigOptionsChecked( sal_Bool bChecked ) +void SfxObjectShell::SetConfigOptionsChecked( bool bChecked ) { pImp->m_bConfigOptionsChecked = bChecked; } -sal_Bool SfxObjectShell::QuerySaveSizeExceededModules_Impl( const uno::Reference< task::XInteractionHandler >& xHandler ) +bool SfxObjectShell::QuerySaveSizeExceededModules_Impl( const uno::Reference< task::XInteractionHandler >& xHandler ) { #ifdef DISABLE_SCRIPTING (void) xHandler; #else if ( !HasBasic() ) - return sal_True; + return true; if ( !pImp->pBasicManager->isValid() ) GetBasicManager(); @@ -3672,7 +3672,7 @@ sal_Bool SfxObjectShell::QuerySaveSizeExceededModules_Impl( const uno::Reference } #endif // No interaction handler, default is to continue to save - return sal_True; + return true; } uno::Reference< task::XInteractionHandler > SfxObjectShell::getInteractionHandler() const diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx index ed1f93a47587..2d14e61ba26c 100644 --- a/sfx2/source/doc/objxtor.cxx +++ b/sfx2/source/doc/objxtor.cxx @@ -291,8 +291,8 @@ SfxObjectShell::SfxObjectShell( const sal_uInt64 i_nCreationFlags ) , pMedium(0) , pStyleSheetPool(0) , eCreateMode( ( i_nCreationFlags & SFXMODEL_EMBEDDED_OBJECT ) ? SFX_CREATE_MODE_EMBEDDED : SFX_CREATE_MODE_STANDARD ) - , bHasName( sal_False ) - , bIsInGenerateThumbnail ( sal_False ) + , bHasName( false ) + , bIsInGenerateThumbnail ( false ) { const bool bScriptSupport = ( i_nCreationFlags & SFXMODEL_DISABLE_EMBEDDED_SCRIPTS ) == 0; @@ -338,8 +338,8 @@ SfxObjectShell::SfxObjectShell pMedium(0), pStyleSheetPool(0), eCreateMode(eMode), - bHasName( sal_False ), - bIsInGenerateThumbnail ( sal_False ) + bHasName( false ), + bIsInGenerateThumbnail ( false ) { } @@ -351,7 +351,7 @@ SfxObjectShell::~SfxObjectShell() { if ( IsEnableSetModified() ) - EnableSetModified( sal_False ); + EnableSetModified( false ); // Never call GetInPlaceObject(), the access to the derivative branch // SfxInternObject is not allowed because of a compiler bug @@ -409,14 +409,14 @@ SfxObjectShell::~SfxObjectShell() -void SfxObjectShell::Stamp_SetPrintCancelState(sal_Bool bState) +void SfxObjectShell::Stamp_SetPrintCancelState(bool bState) { pImp->bIsPrintJobCancelable = bState; } -sal_Bool SfxObjectShell::Stamp_GetPrintCancelState() const +bool SfxObjectShell::Stamp_GetPrintCancelState() const { return pImp->bIsPrintJobCancelable; } @@ -482,7 +482,7 @@ bool SfxObjectShell::Close() SfxObjectShell* SfxObjectShell::GetFirst ( const TypeId* pType , - sal_Bool bOnlyVisible + bool bOnlyVisible ) { SfxObjectShellArr_Impl &rDocs = SFX_APP()->GetObjectShells_Impl(); @@ -509,7 +509,7 @@ SfxObjectShell* SfxObjectShell::GetNext ( const SfxObjectShell& rPrev, const TypeId* pType, - sal_Bool bOnlyVisible + bool bOnlyVisible ) { SfxObjectShellArr_Impl &rDocs = SFX_APP()->GetObjectShells_Impl(); @@ -544,7 +544,7 @@ SfxObjectShell* SfxObjectShell::Current() -sal_Bool SfxObjectShell::IsInPrepareClose() const +bool SfxObjectShell::IsInPrepareClose() const { return pImp->bInPrepareClose; } @@ -711,13 +711,13 @@ void SfxObjectShell::SetHasNoBasic() -sal_Bool SfxObjectShell::HasBasic() const +bool SfxObjectShell::HasBasic() const { #ifdef DISABLE_SCRIPTING - return sal_False; + return false; #else if ( pImp->m_bNoBasicCapabilities ) - return sal_False; + return false; if ( !pImp->bBasicInitialized ) const_cast< SfxObjectShell* >( this )->InitBasicManager_Impl(); @@ -851,7 +851,7 @@ void SfxObjectShell::InitBasicManager_Impl() -sal_Bool SfxObjectShell::DoClose() +bool SfxObjectShell::DoClose() { return Close(); } diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 94e6683d01d5..f22ba538eaeb 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -249,7 +249,7 @@ struct IMPL_SfxBaseModel_DataContainer : public ::sfx2::IModifiableDocument virtual void storageIsModified() { if ( m_pObjectShell.Is() && !m_pObjectShell->IsModified() ) - m_pObjectShell->SetModified( sal_True ); + m_pObjectShell->SetModified( true ); } void impl_setDocumentProperties( @@ -1289,7 +1289,7 @@ sal_Bool SAL_CALL SfxBaseModel::disableSetModified() throw (RuntimeException, st throw RuntimeException(); sal_Bool bResult = m_pData->m_pObjectShell->IsEnableSetModified(); - m_pData->m_pObjectShell->EnableSetModified( sal_False ); + m_pData->m_pObjectShell->EnableSetModified( false ); return bResult; } @@ -1302,7 +1302,7 @@ sal_Bool SAL_CALL SfxBaseModel::enableSetModified() throw (RuntimeException, std throw RuntimeException(); sal_Bool bResult = m_pData->m_pObjectShell->IsEnableSetModified(); - m_pData->m_pObjectShell->EnableSetModified( sal_True ); + m_pData->m_pObjectShell->EnableSetModified( true ); return bResult; } @@ -1915,7 +1915,7 @@ void SAL_CALL SfxBaseModel::load( const Sequence< beans::PropertyValue >& seqA SfxFilterMatcher& rMatcher = SFX_APP()->GetFilterMatcher(); const SfxFilter* pSetFilter = rMatcher.GetFilter4FilterName( pFilterItem->GetValue() ); pMedium->SetFilter( pSetFilter ); - m_pData->m_pObjectShell->SetModified(sal_True); + m_pData->m_pObjectShell->SetModified(true); } // TODO/LATER: may be the mode should be retrieved from outside and the preused filter should not be set @@ -2016,7 +2016,7 @@ Any SAL_CALL SfxBaseModel::getTransferData( const datatransfer::DataFlavor& aFla { ::boost::shared_ptr<GDIMetaFile> pMetaFile = - m_pData->m_pObjectShell->GetPreviewMetaFile( sal_True ); + m_pData->m_pObjectShell->GetPreviewMetaFile( true ); if ( pMetaFile ) { @@ -2036,7 +2036,7 @@ Any SAL_CALL SfxBaseModel::getTransferData( const datatransfer::DataFlavor& aFla if ( aFlavor.DataType == getCppuType( (const Sequence< sal_Int8 >*) 0 ) ) { ::boost::shared_ptr<GDIMetaFile> pMetaFile = - m_pData->m_pObjectShell->CreatePreviewMetaFile_Impl( sal_True ); + m_pData->m_pObjectShell->CreatePreviewMetaFile_Impl( true ); if ( pMetaFile ) { @@ -2056,7 +2056,7 @@ Any SAL_CALL SfxBaseModel::getTransferData( const datatransfer::DataFlavor& aFla if ( aFlavor.DataType == getCppuType( (const Sequence< sal_Int8 >*) 0 ) ) { ::boost::shared_ptr<GDIMetaFile> pMetaFile = - m_pData->m_pObjectShell->GetPreviewMetaFile( sal_True ); + m_pData->m_pObjectShell->GetPreviewMetaFile( true ); if ( pMetaFile ) { @@ -2075,7 +2075,7 @@ Any SAL_CALL SfxBaseModel::getTransferData( const datatransfer::DataFlavor& aFla && aFlavor.DataType == getCppuType( (const sal_uInt64*) 0 ) ) { ::boost::shared_ptr<GDIMetaFile> pMetaFile = - m_pData->m_pObjectShell->GetPreviewMetaFile( sal_True ); + m_pData->m_pObjectShell->GetPreviewMetaFile( true ); if ( pMetaFile ) { @@ -2091,7 +2091,7 @@ Any SAL_CALL SfxBaseModel::getTransferData( const datatransfer::DataFlavor& aFla if ( aFlavor.DataType == getCppuType( (const Sequence< sal_Int8 >*) 0 ) ) { ::boost::shared_ptr<GDIMetaFile> pMetaFile = - m_pData->m_pObjectShell->GetPreviewMetaFile( sal_True ); + m_pData->m_pObjectShell->GetPreviewMetaFile( true ); if ( pMetaFile ) { @@ -2113,7 +2113,7 @@ Any SAL_CALL SfxBaseModel::getTransferData( const datatransfer::DataFlavor& aFla // means HGLOBAL handler to memory storage containing METAFILEPICT structure ::boost::shared_ptr<GDIMetaFile> pMetaFile = - m_pData->m_pObjectShell->GetPreviewMetaFile( sal_True ); + m_pData->m_pObjectShell->GetPreviewMetaFile( true ); if ( pMetaFile ) { @@ -2131,7 +2131,7 @@ Any SAL_CALL SfxBaseModel::getTransferData( const datatransfer::DataFlavor& aFla if ( aFlavor.DataType == getCppuType( (const Sequence< sal_Int8 >*) 0 ) ) { ::boost::shared_ptr<GDIMetaFile> pMetaFile = - m_pData->m_pObjectShell->GetPreviewMetaFile( sal_True ); + m_pData->m_pObjectShell->GetPreviewMetaFile( true ); if ( pMetaFile ) { @@ -2155,7 +2155,7 @@ Any SAL_CALL SfxBaseModel::getTransferData( const datatransfer::DataFlavor& aFla if ( aFlavor.DataType == getCppuType( (const Sequence< sal_Int8 >*) 0 ) ) { ::boost::shared_ptr<GDIMetaFile> pMetaFile = - m_pData->m_pObjectShell->GetPreviewMetaFile( sal_True ); + m_pData->m_pObjectShell->GetPreviewMetaFile( true ); if ( pMetaFile ) { @@ -3459,7 +3459,7 @@ sal_Bool SfxBaseModel::hasValidSignatures() const { SolarMutexGuard aGuard; if ( m_pData->m_pObjectShell.Is() ) - return ( m_pData->m_pObjectShell->ImplGetSignatureState( sal_False ) == SIGNATURESTATE_SIGNATURES_OK ); + return ( m_pData->m_pObjectShell->ImplGetSignatureState( false ) == SIGNATURESTATE_SIGNATURES_OK ); return sal_False; } @@ -3811,7 +3811,7 @@ void SAL_CALL SfxBaseModel::storeToStorage( const Reference< embed::XStorage >& if ( aMedium.GetFilter() ) { // storing without a valid filter will often crash - bSuccess = m_pData->m_pObjectShell->DoSaveObjectAs( aMedium, sal_True ); + bSuccess = m_pData->m_pObjectShell->DoSaveObjectAs( aMedium, true ); m_pData->m_pObjectShell->DoSaveCompleted( NULL ); } } diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx index f205f6598da6..7dbf539cea8b 100644 --- a/sfx2/source/notify/eventsupplier.cxx +++ b/sfx2/source/notify/eventsupplier.cxx @@ -77,7 +77,7 @@ void SAL_CALL SfxEvents_Impl::replaceByName( const OUString & aName, const uno:: // create Configuration at first, creation might call this method also and that would overwrite everything // we might have stored before! if ( mpObjShell && !mpObjShell->IsLoading() ) - mpObjShell->SetModified( sal_True ); + mpObjShell->SetModified( true ); ::comphelper::NamedValueCollection aNormalizedDescriptor; NormalizeMacro( aEventDescriptor, aNormalizedDescriptor, mpObjShell ); diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx index 73263dcb955d..a73b754d6daf 100644 --- a/sfx2/source/view/frmload.cxx +++ b/sfx2/source/view/frmload.cxx @@ -405,7 +405,7 @@ void SfxFrameLoader_Impl::impl_determineFilter( ::comphelper::NamedValueCollecti SfxObjectShellRef SfxFrameLoader_Impl::impl_findObjectShell( const Reference< XModel2 >& i_rxDocument ) const { - for ( SfxObjectShell* pDoc = SfxObjectShell::GetFirst( NULL, sal_False ); pDoc; pDoc = SfxObjectShell::GetNext( *pDoc, NULL, sal_False ) ) + for ( SfxObjectShell* pDoc = SfxObjectShell::GetFirst( NULL, false ); pDoc; pDoc = SfxObjectShell::GetNext( *pDoc, NULL, false ) ) { if ( i_rxDocument == pDoc->GetModel() ) { diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx index 0b16d01a9fc7..3d51f9ab46d7 100644 --- a/sfx2/source/view/ipclient.cxx +++ b/sfx2/source/view/ipclient.cxx @@ -302,7 +302,7 @@ void SAL_CALL SfxInPlaceClient_Impl::saveObject() if ( !pDocShell ) throw uno::RuntimeException(); - pDocShell->SetModified( sal_True ); + pDocShell->SetModified( true ); //TODO/LATER: invalidation might be necessary when object was modified, but is not //saved through this method diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index be41c0f6e100..7a521a9c3972 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -430,11 +430,11 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) // open mode among other things, so call SetOpenMode before // SetReadOnlyUI: pMed->SetOpenMode( nOpenMode ); - pSh->SetReadOnlyUI( sal_False ); + pSh->SetReadOnlyUI( false ); return; } - pSh->SetReadOnlyUI( sal_False ); + pSh->SetReadOnlyUI( false ); } if ( rReq.IsAPI() ) @@ -716,7 +716,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) if (!pDocTemplateItem) pNewSet->Put( SfxUInt16Item(SID_UPDATEDOCMODE,::com::sun::star::document::UpdateDocMode::ACCORDING_TO_CONFIG) ); - xOldObj->SetModified( sal_False ); + xOldObj->SetModified( false ); // Do not chache the old Document! Is invalid when loading // another document. @@ -792,7 +792,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) { if ( xNewObj->GetModifyPasswordHash() && xNewObj->GetModifyPasswordHash() != xOldObj->GetModifyPasswordHash() ) { - xNewObj->SetModifyPasswordEntered( sal_False ); + xNewObj->SetModifyPasswordEntered( false ); xNewObj->SetReadOnly(); } else if ( rReq.GetSlot() == SID_EDITDOC ) diff --git a/sfx2/source/view/viewfrm2.cxx b/sfx2/source/view/viewfrm2.cxx index b48b76ed0026..b5a4ebb349c9 100644 --- a/sfx2/source/view/viewfrm2.cxx +++ b/sfx2/source/view/viewfrm2.cxx @@ -254,7 +254,7 @@ void SfxViewFrame::Exec_Impl(SfxRequest &rReq ) if ( ( bOther || pDocSh->PrepareClose( bUI ) ) ) { if ( !bOther ) - pDocSh->SetModified( sal_False ); + pDocSh->SetModified( false ); rReq.Done(); // Must call this before Close()! bClosed = sal_False; try diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx index 3e7e990876b7..f5eece378b2c 100644 --- a/sfx2/source/view/viewprn.cxx +++ b/sfx2/source/view/viewprn.cxx @@ -300,7 +300,7 @@ void SfxPrinterController::jobStarted() // check configuration: shall update of printing information in DocInfo set the document to "modified"? if ( m_bOrigStatus && !SvtPrintWarningOptions().IsModifyDocumentOnPrintingAllowed() ) { - mpObjectShell->EnableSetModified( sal_False ); + mpObjectShell->EnableSetModified( false ); m_bNeedsChange = sal_True; } diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx index 22cda9ccd64e..dcfa197319b6 100644 --- a/starmath/inc/document.hxx +++ b/starmath/inc/document.hxx @@ -133,13 +133,13 @@ class SmDocShell : public SfxObjectShell, public SfxListener virtual sal_Bool SetData( const OUString& rData ); virtual sal_uLong GetMiscStatus() const; virtual void OnDocumentPrinterChanged( Printer * ); - virtual sal_Bool InitNew( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ); - virtual sal_Bool Load( SfxMedium& rMedium ); + virtual bool InitNew( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ); + virtual bool Load( SfxMedium& rMedium ); void ImplSave( SvStorageStreamRef xStrm ); - virtual sal_Bool Save(); - virtual sal_Bool SaveAs( SfxMedium& rMedium ); - virtual sal_Bool ConvertTo( SfxMedium &rMedium ); - virtual sal_Bool SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ); + virtual bool Save(); + virtual bool SaveAs( SfxMedium& rMedium ); + virtual bool ConvertTo( SfxMedium &rMedium ); + virtual bool SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ); Printer *GetPrt(); OutputDevice* GetRefDev(); @@ -147,7 +147,7 @@ class SmDocShell : public SfxObjectShell, public SfxListener bool IsFormulaArranged() const { return bIsFormulaArranged; } void SetFormulaArranged(bool bVal) { bIsFormulaArranged = bVal; } - virtual sal_Bool ConvertFrom(SfxMedium &rMedium); + virtual bool ConvertFrom(SfxMedium &rMedium); /** Called whenever the formula is changed * Deletes the current cursor @@ -215,7 +215,7 @@ public: void GetState(SfxItemSet &); virtual void SetVisArea (const Rectangle & rVisArea); - virtual void SetModified(sal_Bool bModified); + virtual void SetModified(bool bModified); /** Get a cursor for modifying this document * @remarks Don't store this reference, a new cursor may be made... diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx index 6704c2a8c91a..d05a1b85b022 100644 --- a/starmath/source/cursor.cxx +++ b/starmath/source/cursor.cxx @@ -1415,7 +1415,7 @@ void SmCursor::BeginEdit(){ bIsEnabledSetModifiedSmDocShell = pDocShell->IsEnableSetModified(); if( bIsEnabledSetModifiedSmDocShell ) - pDocShell->EnableSetModified( sal_False ); + pDocShell->EnableSetModified( false ); } void SmCursor::EndEdit(){ @@ -1429,7 +1429,7 @@ void SmCursor::EndEdit(){ if ( bIsEnabledSetModifiedSmDocShell ) pDocShell->EnableSetModified( bIsEnabledSetModifiedSmDocShell ); //I think this notifies people around us that we've modified this document... - pDocShell->SetModified(sal_True); + pDocShell->SetModified(true); //I think SmDocShell uses this value when it sends an update graphics event //Anyway comments elsewhere suggests it need to be updated... pDocShell->nModifyCount++; diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx index 4ba13b05cebb..00452a62e9e1 100644 --- a/starmath/source/document.cxx +++ b/starmath/source/document.cxx @@ -740,7 +740,7 @@ sal_Bool SmDocShell::SetData( const OUString& rData ) } -sal_Bool SmDocShell::ConvertFrom(SfxMedium &rMedium) +bool SmDocShell::ConvertFrom(SfxMedium &rMedium) { SAL_INFO( "starmath", "SmDocShell::ConvertFrom" ); @@ -791,7 +791,7 @@ sal_Bool SmDocShell::ConvertFrom(SfxMedium &rMedium) } -sal_Bool SmDocShell::InitNew( const uno::Reference < embed::XStorage >& xStorage ) +bool SmDocShell::InitNew( const uno::Reference < embed::XStorage >& xStorage ) { SAL_INFO( "starmath", "SmDocShell::InitNew" ); @@ -805,7 +805,7 @@ sal_Bool SmDocShell::InitNew( const uno::Reference < embed::XStorage >& xStorage } -sal_Bool SmDocShell::Load( SfxMedium& rMedium ) +bool SmDocShell::Load( SfxMedium& rMedium ) { SAL_INFO( "starmath", "SmDocShell::Load" ); @@ -846,7 +846,7 @@ sal_Bool SmDocShell::Load( SfxMedium& rMedium ) -sal_Bool SmDocShell::Save() +bool SmDocShell::Save() { SAL_INFO( "starmath", "SmDocShell::Save" ); @@ -910,7 +910,7 @@ void SmDocShell::UpdateText() } -sal_Bool SmDocShell::SaveAs( SfxMedium& rMedium ) +bool SmDocShell::SaveAs( SfxMedium& rMedium ) { SAL_INFO( "starmath", "SmDocShell::SaveAs" ); @@ -934,7 +934,7 @@ sal_Bool SmDocShell::SaveAs( SfxMedium& rMedium ) return bRet; } -sal_Bool SmDocShell::ConvertTo( SfxMedium &rMedium ) +bool SmDocShell::ConvertTo( SfxMedium &rMedium ) { SAL_INFO( "starmath", "SmDocShell::ConvertTo" ); @@ -998,7 +998,7 @@ void SmDocShell::readFormulaOoxml( oox::formulaimport::XmlStream& stream ) SetText( aEquation.ConvertToStarMath()); } -sal_Bool SmDocShell::SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ) +bool SmDocShell::SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ) { SAL_INFO( "starmath", "SmDocShell::SaveCompleted" ); @@ -1419,7 +1419,7 @@ sal_uLong SmDocShell::GetMiscStatus() const | SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE; } -void SmDocShell::SetModified(sal_Bool bModified) +void SmDocShell::SetModified(bool bModified) { SAL_INFO( "starmath", "SmDocShell::SetModified" ); diff --git a/svx/source/dialog/grfflt.cxx b/svx/source/dialog/grfflt.cxx index 84a421b7345b..84971ba6ed99 100644 --- a/svx/source/dialog/grfflt.cxx +++ b/svx/source/dialog/grfflt.cxx @@ -50,7 +50,7 @@ sal_uIntPtr SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObj case( SID_GRFFILTER_INVERT ): { if( pShell ) - pShell->SetWaitCursor( sal_True ); + pShell->SetWaitCursor( true ); if( rGraphic.IsAnimated() ) { @@ -68,7 +68,7 @@ sal_uIntPtr SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObj } if( pShell ) - pShell->SetWaitCursor( sal_False ); + pShell->SetWaitCursor( false ); } break; @@ -89,7 +89,7 @@ sal_uIntPtr SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObj case( SID_GRFFILTER_SHARPEN ): { if( pShell ) - pShell->SetWaitCursor( sal_True ); + pShell->SetWaitCursor( true ); if( rGraphic.IsAnimated() ) { @@ -107,14 +107,14 @@ sal_uIntPtr SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObj } if( pShell ) - pShell->SetWaitCursor( sal_False ); + pShell->SetWaitCursor( false ); } break; case( SID_GRFFILTER_REMOVENOISE ): { if( pShell ) - pShell->SetWaitCursor( sal_True ); + pShell->SetWaitCursor( true ); if( rGraphic.IsAnimated() ) { @@ -132,14 +132,14 @@ sal_uIntPtr SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObj } if( pShell ) - pShell->SetWaitCursor( sal_False ); + pShell->SetWaitCursor( false ); } break; case( SID_GRFFILTER_SOBEL ): { if( pShell ) - pShell->SetWaitCursor( sal_True ); + pShell->SetWaitCursor( true ); if( rGraphic.IsAnimated() ) { @@ -157,7 +157,7 @@ sal_uIntPtr SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObj } if( pShell ) - pShell->SetWaitCursor( sal_False ); + pShell->SetWaitCursor( false ); } break; @@ -206,7 +206,7 @@ sal_uIntPtr SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObj case( SID_GRFFILTER_POPART ): { if( pShell ) - pShell->SetWaitCursor( sal_True ); + pShell->SetWaitCursor( true ); if( rGraphic.IsAnimated() ) { @@ -224,7 +224,7 @@ sal_uIntPtr SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObj } if( pShell ) - pShell->SetWaitCursor( sal_False ); + pShell->SetWaitCursor( false ); } break; diff --git a/svx/source/form/fmmodel.cxx b/svx/source/form/fmmodel.cxx index 7765c47e75de..8d60b3f567e9 100644 --- a/svx/source/form/fmmodel.cxx +++ b/svx/source/form/fmmodel.cxx @@ -232,7 +232,7 @@ void FmFormModel::implSetOpenInDesignMode( bool _bOpenDesignMode, bool _bForce ) m_bOpenInDesignMode = _bOpenDesignMode; if ( m_pObjShell ) - m_pObjShell->SetModified( sal_True ); + m_pObjShell->SetModified( true ); } // no matter if we really did it or not - from now on, it does not count as defaulted anymore m_pImpl->bOpenInDesignIsDefaulted = sal_False; @@ -269,7 +269,7 @@ void FmFormModel::SetAutoControlFocus( bool _bAutoControlFocus ) if( _bAutoControlFocus != m_bAutoControlFocus ) { m_bAutoControlFocus = _bAutoControlFocus; - m_pObjShell->SetModified( sal_True ); + m_pObjShell->SetModified( true ); } } diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx index 0e08e3d061d6..d54205bad4a2 100644 --- a/svx/source/form/fmundo.cxx +++ b/svx/source/form/fmundo.cxx @@ -749,7 +749,7 @@ void FmXUndoEnvironment::implSetModified() { if ( !IsLocked() && rModel.GetObjectShell() ) { - rModel.GetObjectShell()->SetModified( sal_True ); + rModel.GetObjectShell()->SetModified( true ); } } @@ -974,7 +974,7 @@ FmUndoPropertyAction::FmUndoPropertyAction(FmFormModel& rNewMod, const PropertyC ,aOldValue(evt.OldValue) { if (rNewMod.GetObjectShell()) - rNewMod.GetObjectShell()->SetModified(sal_True); + rNewMod.GetObjectShell()->SetModified(true); if(static_STR_UNDO_PROPERTY.isEmpty()) static_STR_UNDO_PROPERTY = SVX_RESSTR(RID_STR_UNDO_PROPERTY); } diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx index 30c2ecfbf42f..5f3271c8ffcd 100644 --- a/sw/inc/docsh.hxx +++ b/sw/inc/docsh.hxx @@ -82,13 +82,13 @@ class SW_DLLPUBLIC SwDocShell: public SfxObjectShell, public SfxListener SAL_DLLPRIVATE virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); /// FileIO - SAL_DLLPRIVATE virtual sal_Bool InitNew( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ); - SAL_DLLPRIVATE virtual sal_Bool Load( SfxMedium& rMedium ); - SAL_DLLPRIVATE virtual sal_Bool LoadFrom( SfxMedium& rMedium ); - SAL_DLLPRIVATE virtual sal_Bool ConvertFrom( SfxMedium &rMedium ); - SAL_DLLPRIVATE virtual sal_Bool ConvertTo( SfxMedium &rMedium ); - SAL_DLLPRIVATE virtual sal_Bool SaveAs( SfxMedium& rMedium ); - SAL_DLLPRIVATE virtual sal_Bool SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ); + SAL_DLLPRIVATE virtual bool InitNew( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ); + SAL_DLLPRIVATE virtual bool Load( SfxMedium& rMedium ); + SAL_DLLPRIVATE virtual bool LoadFrom( SfxMedium& rMedium ); + SAL_DLLPRIVATE virtual bool ConvertFrom( SfxMedium &rMedium ); + SAL_DLLPRIVATE virtual bool ConvertTo( SfxMedium &rMedium ); + SAL_DLLPRIVATE virtual bool SaveAs( SfxMedium& rMedium ); + SAL_DLLPRIVATE virtual bool SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ); SAL_DLLPRIVATE virtual bool PrepareClose( sal_Bool bUI = sal_True ) SAL_OVERRIDE; @@ -171,7 +171,7 @@ public: virtual sal_uLong GetMiscStatus() const; virtual void PrepareReload(); - virtual void SetModified( sal_Bool = sal_True ); + virtual void SetModified( bool = true ); /// Dispatcher void Execute(SfxRequest &); @@ -193,7 +193,7 @@ public: void UpdateChildWindows(); /// global IO. - virtual sal_Bool Save(); + virtual bool Save(); /// For Style PI. virtual SfxStyleSheetBasePool* GetStyleSheetPool(); diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 278e1b22b9e3..a9faaadb03f1 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -848,7 +848,7 @@ int SwCrsrShell::SetCrsr( const Point &rLPt, sal_Bool bOnlyText, bool bBlock ) m_bAllProtect = sal_True; if( GetDoc()->GetDocShell() ) { - GetDoc()->GetDocShell()->SetReadOnlyUI( sal_True ); + GetDoc()->GetDocShell()->SetReadOnlyUI( true ); CallChgLnk(); // notify UI } } @@ -1592,7 +1592,7 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, sal_Bool bIdleEnd ) m_bAllProtect = sal_True; if( GetDoc()->GetDocShell() ) { - GetDoc()->GetDocShell()->SetReadOnlyUI( sal_True ); + GetDoc()->GetDocShell()->SetReadOnlyUI( true ); CallChgLnk(); // notify UI! } return; @@ -1606,7 +1606,7 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, sal_Bool bIdleEnd ) if( bWasAllProtect && GetDoc()->GetDocShell() && GetDoc()->GetDocShell()->IsReadOnlyUI() ) { - GetDoc()->GetDocShell()->SetReadOnlyUI( sal_False ); + GetDoc()->GetDocShell()->SetReadOnlyUI( false ); CallChgLnk(); // notify UI! } } @@ -1695,7 +1695,7 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, sal_Bool bIdleEnd ) m_bAllProtect = sal_True; if( GetDoc()->GetDocShell() ) { - GetDoc()->GetDocShell()->SetReadOnlyUI( sal_True ); + GetDoc()->GetDocShell()->SetReadOnlyUI( true ); CallChgLnk(); // notify UI! } return; @@ -1709,7 +1709,7 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, sal_Bool bIdleEnd ) if( bWasAllProtect && GetDoc()->GetDocShell() && GetDoc()->GetDocShell()->IsReadOnlyUI() ) { - GetDoc()->GetDocShell()->SetReadOnlyUI( sal_False ); + GetDoc()->GetDocShell()->SetReadOnlyUI( false ); CallChgLnk(); // notify UI! } m_bAllProtect = sal_False; diff --git a/sw/source/core/swg/SwXMLTextBlocks.cxx b/sw/source/core/swg/SwXMLTextBlocks.cxx index 379fefe913fb..eea9eea900da 100644 --- a/sw/source/core/swg/SwXMLTextBlocks.cxx +++ b/sw/source/core/swg/SwXMLTextBlocks.cxx @@ -372,7 +372,7 @@ sal_uLong SwXMLTextBlocks::PutBlock( SwPaM& , const OUString& ) pTmpMedium = new SfxMedium( xTempStorage, GetBaseURL() ); sal_Bool bTmpOK = pDocSh->SaveAsChildren( *pTmpMedium ); if( bTmpOK ) - bTmpOK = pDocSh->SaveCompletedChildren( sal_False ); + bTmpOK = pDocSh->SaveCompletedChildren( false ); xTempStorage->copyToStorage( xRoot ); bOK = bTmpOK; diff --git a/sw/source/core/uibase/app/docsh.cxx b/sw/source/core/uibase/app/docsh.cxx index d5062ff42584..58f176942d77 100644 --- a/sw/source/core/uibase/app/docsh.cxx +++ b/sw/source/core/uibase/app/docsh.cxx @@ -229,12 +229,12 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr, } // Loading -sal_Bool SwDocShell::ConvertFrom( SfxMedium& rMedium ) +bool SwDocShell::ConvertFrom( SfxMedium& rMedium ) { SwReader* pRdr; SwRead pRead = StartConvertFrom(rMedium, &pRdr); if (!pRead) - return sal_False; // #129881# return if no reader is found + return false; // #129881# return if no reader is found SotStorageRef pStg=pRead->getSotStorageRef(); // #i45333# save sot storage ref in case of recursive calls pDoc->setDocAccTitle(OUString()); @@ -284,7 +284,7 @@ sal_Bool SwDocShell::ConvertFrom( SfxMedium& rMedium ) SW_MOD()->SetEmbeddedLoadSave( sal_False ); SetError( nErr, OUString( OSL_LOG_PREFIX ) ); - sal_Bool bOk = !IsError( nErr ); + bool bOk = !IsError( nErr ); if ( bOk && !pDoc->IsInLoadAsynchron() ) { @@ -297,7 +297,7 @@ sal_Bool SwDocShell::ConvertFrom( SfxMedium& rMedium ) } // Saving the Default-Format, Stg present -sal_Bool SwDocShell::Save() +bool SwDocShell::Save() { //#i3370# remove quick help to prevent saving of autocorrection suggestions if(pView) @@ -385,7 +385,7 @@ sal_Bool SwDocShell::Save() } // Save using the Defaultformat -sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium ) +bool SwDocShell::SaveAs( SfxMedium& rMedium ) { SwWait aWait( *this, true ); //#i3370# remove quick help to prevent saving of autocorrection suggestions @@ -519,11 +519,11 @@ static SwSrcView* lcl_GetSourceView( SwDocShell* pSh ) return PTR_CAST( SwSrcView, pViewShell); } -sal_Bool SwDocShell::ConvertTo( SfxMedium& rMedium ) +bool SwDocShell::ConvertTo( SfxMedium& rMedium ) { const SfxFilter* pFlt = rMedium.GetFilter(); if( !pFlt ) - return sal_False; + return false; WriterRef xWriter; SwReaderWriter::GetWriter( pFlt->GetUserData(), rMedium.GetBaseURL( true ), xWriter ); @@ -531,7 +531,7 @@ sal_Bool SwDocShell::ConvertTo( SfxMedium& rMedium ) { // Filter not available InfoBox( 0, SW_RESSTR(STR_DLLNOTFOUND) ).Execute(); - return sal_False; + return false; } //#i3370# remove quick help to prevent saving of autocorrection suggestions @@ -668,7 +668,7 @@ sal_Bool SwDocShell::ConvertTo( SfxMedium& rMedium ) } // Now normally save the Document - sal_Bool bRet = SaveAs( rMedium ); + bool bRet = SaveAs( rMedium ); if( nMyType != nSaveType ) { @@ -753,9 +753,9 @@ sal_Bool SwDocShell::ConvertTo( SfxMedium& rMedium ) // Hands off // do not yet activate, must deliver TRUE -sal_Bool SwDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xStor ) +bool SwDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xStor ) { - sal_Bool bRet = SfxObjectShell::SaveCompleted( xStor ); + bool bRet = SfxObjectShell::SaveCompleted( xStor ); if( bRet ) { // Do not decide until here, whether Saving was successful or not @@ -769,7 +769,7 @@ sal_Bool SwDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xS { sal_Bool bResetModified = IsEnableSetModified(); if( bResetModified ) - EnableSetModified( sal_False ); + EnableSetModified( false ); uno::Sequence < OUString > aNames = pOLEChildList->GetObjectNames(); for( sal_Int32 n = aNames.getLength(); n; n-- ) @@ -782,7 +782,7 @@ sal_Bool SwDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xS DELETEZ( pOLEChildList ); if( bResetModified ) - EnableSetModified( sal_True ); + EnableSetModified( true ); } return bRet; } @@ -794,7 +794,7 @@ void SwDocShell::Draw( OutputDevice* pDev, const JobSetup& rSetup, //fix #25341# Draw should not affect the Modified sal_Bool bResetModified; if ( sal_True == (bResetModified = IsEnableSetModified()) ) - EnableSetModified( sal_False ); + EnableSetModified( false ); // When there is a JobSetup connected to the Document, we copy it to // reconnect it after PrtOle2. We don't use an empty JobSetup because @@ -827,7 +827,7 @@ void SwDocShell::Draw( OutputDevice* pDev, const JobSetup& rSetup, delete pOrig; } if ( bResetModified ) - EnableSetModified( sal_True ); + EnableSetModified( true ); } void SwDocShell::SetVisArea( const Rectangle &rRect ) diff --git a/sw/source/core/uibase/app/docsh2.cxx b/sw/source/core/uibase/app/docsh2.cxx index f8ced7043098..0a339253c74c 100644 --- a/sw/source/core/uibase/app/docsh2.cxx +++ b/sw/source/core/uibase/app/docsh2.cxx @@ -280,7 +280,7 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) { const bool bResetModified = IsEnableSetModified(); if ( bResetModified ) - EnableSetModified( sal_False ); + EnableSetModified( false ); // #i41679# const bool bIsDocModified = pDoc->IsModified(); @@ -290,7 +290,7 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) if ( !bIsDocModified ) pDoc->ResetModified(); if ( bResetModified ) - EnableSetModified( sal_True ); + EnableSetModified( true ); } break; } @@ -757,7 +757,7 @@ void SwDocShell::Execute(SfxRequest& rReq) case FN_OUTLINE_TO_IMPRESS: { sal_Bool bEnable = IsEnableSetModified(); - EnableSetModified( sal_False ); + EnableSetModified( false ); WriterRef xWrt; // mba: looks as if relative URLs don't make sense here ::GetRTFWriter( OUString('O'), OUString(), xWrt ); @@ -1219,14 +1219,14 @@ void SwDocShell::FillClass( SvGlobalName * pClassName, *pUserName = SW_RESSTR(STR_HUMAN_SWDOC_NAME); } -void SwDocShell::SetModified( sal_Bool bSet ) +void SwDocShell::SetModified( bool bSet ) { SfxObjectShell::SetModified( bSet ); if( IsEnableSetModified()) { if (!pDoc->IsInCallModified() ) { - EnableSetModified( sal_False ); + EnableSetModified( false ); if( bSet ) { sal_Bool bOld = pDoc->IsModified(); @@ -1239,7 +1239,7 @@ void SwDocShell::SetModified( sal_Bool bSet ) else pDoc->ResetModified(); - EnableSetModified( sal_True ); + EnableSetModified( true ); } UpdateChildWindows(); diff --git a/sw/source/core/uibase/app/docshini.cxx b/sw/source/core/uibase/app/docshini.cxx index 968ec591f168..e6c30524588a 100644 --- a/sw/source/core/uibase/app/docshini.cxx +++ b/sw/source/core/uibase/app/docshini.cxx @@ -89,11 +89,11 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star; // Load Document -sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) +bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) { - sal_Bool bRet = SfxObjectShell::InitNew( xStor ); + bool bRet = SfxObjectShell::InitNew( xStor ); OSL_ENSURE( GetMapUnit() == MAP_TWIP, "map unit is not twip!" ); - sal_Bool bHTMLTemplSet = sal_False; + bool bHTMLTemplSet = false; if( bRet ) { AddLink(); // create pDoc / pIo if applicable @@ -464,9 +464,9 @@ void SwDocShell::ReactivateModel() } // Load, Default-Format -sal_Bool SwDocShell::Load( SfxMedium& rMedium ) +bool SwDocShell::Load( SfxMedium& rMedium ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( SfxObjectShell::Load( rMedium )) { SAL_INFO( "sw.ui", "after SfxInPlaceObject::Load" ); @@ -563,9 +563,9 @@ sal_Bool SwDocShell::Load( SfxMedium& rMedium ) return bRet; } -sal_Bool SwDocShell::LoadFrom( SfxMedium& rMedium ) +bool SwDocShell::LoadFrom( SfxMedium& rMedium ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( pDoc ) RemoveLink(); diff --git a/sw/source/core/uibase/dochdl/swdtflvr.cxx b/sw/source/core/uibase/dochdl/swdtflvr.cxx index f0819415a513..f5c4af05247e 100644 --- a/sw/source/core/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/core/uibase/dochdl/swdtflvr.cxx @@ -661,7 +661,7 @@ sal_Bool SwTransferable::WriteObject( SotStorageStreamRef& xStream, pEmbObj->SetupStorage( xWorkStore, SOFFICE_FILEFORMAT_CURRENT, false ); // mba: no BaseURL for clipboard SfxMedium aMedium( xWorkStore, OUString() ); - bRet = pEmbObj->DoSaveObjectAs( aMedium, sal_False ); + bRet = pEmbObj->DoSaveObjectAs( aMedium, false ); pEmbObj->DoSaveCompleted(); uno::Reference< embed::XTransactedObject > xTransact( xWorkStore, uno::UNO_QUERY ); diff --git a/sw/source/core/uibase/docvw/SidebarWin.cxx b/sw/source/core/uibase/docvw/SidebarWin.cxx index 14553ad2e564..4a37bf25bd07 100644 --- a/sw/source/core/uibase/docvw/SidebarWin.cxx +++ b/sw/source/core/uibase/docvw/SidebarWin.cxx @@ -1114,7 +1114,7 @@ IMPL_LINK(SwSidebarWin, ScrollHdl, ScrollBar*, pScroll) IMPL_LINK_NOARG(SwSidebarWin, ModifyHdl) { - mrView.GetDocShell()->SetModified(sal_True); + mrView.GetDocShell()->SetModified(true); return 0; } diff --git a/sw/source/core/uibase/inc/glshell.hxx b/sw/source/core/uibase/inc/glshell.hxx index 9e9513d22b77..13f84e159cbb 100644 --- a/sw/source/core/uibase/inc/glshell.hxx +++ b/sw/source/core/uibase/inc/glshell.hxx @@ -29,7 +29,7 @@ class SwGlosDocShell : public SwDocShell using SotObject::GetInterface; protected: - virtual sal_Bool Save(); + virtual bool Save(); public: @@ -59,7 +59,7 @@ class SwWebGlosDocShell : public SwWebDocShell using SotObject::GetInterface; protected: - virtual sal_Bool Save(); + virtual bool Save(); public: diff --git a/sw/source/core/uibase/misc/glshell.cxx b/sw/source/core/uibase/misc/glshell.cxx index c3776ceb852a..dc26db2958c4 100644 --- a/sw/source/core/uibase/misc/glshell.cxx +++ b/sw/source/core/uibase/misc/glshell.cxx @@ -146,7 +146,7 @@ void SwGlosDocShell::GetState( SfxItemSet& rSet ) ::lcl_GetState( *this, rSet ); } -sal_Bool SwGlosDocShell::Save() +bool SwGlosDocShell::Save() { // In case of an API object which holds this document, it is possible that the WrtShell is already // dead. For instance, if the doc is modified via this API object, and then, upon office shutdown, @@ -157,8 +157,8 @@ sal_Bool SwGlosDocShell::Save() return ::lcl_Save( *GetWrtShell(), aGroupName, aShortName, aLongName ); else { - SetModified( sal_False ); - return sal_False; + SetModified( false ); + return false; } } @@ -182,15 +182,15 @@ void SwWebGlosDocShell::GetState( SfxItemSet& rSet ) ::lcl_GetState( *this, rSet ); } -sal_Bool SwWebGlosDocShell::Save() +bool SwWebGlosDocShell::Save() { // same comment as in SwGlosDocShell::Save - see there if ( GetWrtShell() ) return ::lcl_Save( *GetWrtShell(), aGroupName, aShortName, aLongName ); else { - SetModified( sal_False ); - return sal_False; + SetModified( false ); + return false; } } diff --git a/sw/source/core/uibase/uiview/srcview.cxx b/sw/source/core/uibase/uiview/srcview.cxx index 87ac68ff2330..0427f928f047 100644 --- a/sw/source/core/uibase/uiview/srcview.cxx +++ b/sw/source/core/uibase/uiview/srcview.cxx @@ -863,7 +863,7 @@ void SwSrcView::Load(SwDocShell* pDocShell) if(bDocModified) pDocShell->SetModified();// The flag will be reset in between times. // Disable AutoLoad - pDocShell->SetAutoLoad(INetURLObject(), 0, sal_False); + pDocShell->SetAutoLoad(INetURLObject(), 0, false); OSL_ENSURE(PTR_CAST(SwWebDocShell, pDocShell), "Why no WebDocShell?"); sal_uInt16 nLine = ((SwWebDocShell*)pDocShell)->GetSourcePara(); aEditWin.SetStartLine(nLine); diff --git a/sw/source/core/uibase/uiview/view.cxx b/sw/source/core/uibase/uiview/view.cxx index 48eafa1603c5..c89c044bb2c3 100644 --- a/sw/source/core/uibase/uiview/view.cxx +++ b/sw/source/core/uibase/uiview/view.cxx @@ -753,7 +753,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) SwDocShell* pDocSh = PTR_CAST( SwDocShell, _pFrame->GetObjectShell() ); sal_Bool bOldModifyFlag = pDocSh->IsEnableSetModified(); if(bOldModifyFlag) - pDocSh->EnableSetModified( sal_False ); + pDocSh->EnableSetModified( false ); // HACK: SwDocShell has some cached font info, VCL informs about font updates, // but loading of docs with embedded fonts happens after SwDocShell is created // but before SwEditWin (which handles the VCL event) is created. So update @@ -1016,7 +1016,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) m_aTimer.SetTimeoutHdl(LINK(this, SwView, TimeoutHdl)); m_bAttrChgNotified = m_bAttrChgNotifiedWithRegistrations = sal_False; if(bOldModifyFlag) - pDocSh->EnableSetModified( sal_True ); + pDocSh->EnableSetModified( true ); InvalidateBorder(); if( !m_pHScrollbar->IsVisible( sal_True ) ) @@ -1617,7 +1617,7 @@ void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) /* no break here */ case SFX_HINT_TITLECHANGED: - if ( GetDocShell()->IsReadOnly() != GetWrtShell().GetViewOptions()->IsReadonly() ) + if ( (GetDocShell()->IsReadOnly() ? 1 : 0) != GetWrtShell().GetViewOptions()->IsReadonly() ) { SwWrtShell &rSh = GetWrtShell(); rSh.SetReadonlyOption( GetDocShell()->IsReadOnly() ); diff --git a/sw/source/core/uibase/uiview/viewling.cxx b/sw/source/core/uibase/uiview/viewling.cxx index 45b2f12d5fb9..e2c41be29048 100644 --- a/sw/source/core/uibase/uiview/viewling.cxx +++ b/sw/source/core/uibase/uiview/viewling.cxx @@ -865,7 +865,7 @@ IMPL_LINK( SwFieldDialog, MyListBoxHandler, ListBox *, pBox ) (*pFieldmark->GetParameters())[ sKey ] = makeAny(selection); pFieldmark->Invalidate(); SwView& rView = ( ( SwEditWin* )GetParent() )->GetView(); - rView.GetDocShell()->SetModified( sal_True ); + rView.GetDocShell()->SetModified( true ); } EndPopupMode(); diff --git a/sw/source/core/uibase/uno/unotxdoc.cxx b/sw/source/core/uibase/uno/unotxdoc.cxx index d5aabc5dad66..9a4a51dff7a5 100644 --- a/sw/source/core/uibase/uno/unotxdoc.cxx +++ b/sw/source/core/uibase/uno/unotxdoc.cxx @@ -2590,14 +2590,14 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount( bool bStateChanged = false; if ( bOrigStatus && !SvtPrintWarningOptions().IsModifyDocumentOnPrintingAllowed() ) { - pRenderDocShell->EnableSetModified( sal_False ); + pRenderDocShell->EnableSetModified( false ); bStateChanged = true; } // #122919# Force field update before PDF export pViewShell->SwViewShell::UpdateFlds(sal_True); if( bStateChanged ) - pRenderDocShell->EnableSetModified( sal_True ); + pRenderDocShell->EnableSetModified( true ); // there is some redundancy between those two function calls, but right now // there is no time to sort this out. diff --git a/sw/source/core/uibase/utlui/navipi.cxx b/sw/source/core/uibase/utlui/navipi.cxx index 9dbb33e41893..53e2c67c9d64 100644 --- a/sw/source/core/uibase/utlui/navipi.cxx +++ b/sw/source/core/uibase/utlui/navipi.cxx @@ -856,7 +856,7 @@ SwNavigationPI::~SwNavigationPI() SwView *pView = GetCreateView(); SwWrtShell &rSh = pView->GetWrtShell(); if( !rSh.IsAllProtect() ) - pView->GetDocShell()->SetReadOnlyUI(sal_False); + pView->GetDocShell()->SetReadOnlyUI(false); } EndListening(*SFX_APP()); diff --git a/sw/source/core/uibase/wrtsh/wrtsh1.cxx b/sw/source/core/uibase/wrtsh/wrtsh1.cxx index ad6648d9078e..417ddaeee73e 100644 --- a/sw/source/core/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/core/uibase/wrtsh/wrtsh1.cxx @@ -664,7 +664,7 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj, bool bResetEnableSetModified(false); if ( GetDoc()->GetDocShell()->IsEnableSetModified() ) { - GetDoc()->GetDocShell()->EnableSetModified( sal_False ); + GetDoc()->GetDocShell()->EnableSetModified( false ); bResetEnableSetModified = true; } @@ -677,7 +677,7 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj, if ( bResetEnableSetModified ) { - GetDoc()->GetDocShell()->EnableSetModified( sal_True ); + GetDoc()->GetDocShell()->EnableSetModified( true ); } } } diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 0f702fa87356..14cb6c4c4725 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -593,7 +593,7 @@ void SwHTMLParser::Continue( int nToken ) if( pDoc->GetDocShell() && (bSetModEnabled = pDoc->GetDocShell()->IsEnableSetModified()) ) { - pDoc->GetDocShell()->EnableSetModified( sal_False ); + pDoc->GetDocShell()->EnableSetModified( false ); } // waehrend des einlesens kein OLE-Modified rufen @@ -879,7 +879,7 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( false ).nNode.GetIndex() ) pDoc->ResetModified(); if( bSetModEnabled && pDoc->GetDocShell() ) { - pDoc->GetDocShell()->EnableSetModified( sal_True ); + pDoc->GetDocShell()->EnableSetModified( true ); bSetModEnabled = false; // this is unnecessary here } } diff --git a/sw/source/filter/ww1/fltshell.cxx b/sw/source/filter/ww1/fltshell.cxx index 2d23c90d2c27..096f409f1ae6 100644 --- a/sw/source/filter/ww1/fltshell.cxx +++ b/sw/source/filter/ww1/fltshell.cxx @@ -1096,7 +1096,7 @@ SwFltShell::~SwFltShell() if( !IsFlagSet(SwFltControlStack::DONT_HARD_PROTECT) ){ SwDocShell* pDocSh = rDoc.GetDocShell(); if( pDocSh ) - pDocSh->SetReadOnlyUI( sal_True ); + pDocSh->SetReadOnlyUI( true ); } } // Update document page descriptors (only this way also left diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index d08428207984..346127178bf1 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -3345,7 +3345,7 @@ void WW8Export::PrepareStorage() if ( SvtFilterOptions::Get().IsEnableWordPreview() ) { ::boost::shared_ptr<GDIMetaFile> pMetaFile = - pDocShell->GetPreviewMetaFile (sal_False); + pDocShell->GetPreviewMetaFile(false); uno::Sequence<sal_uInt8> metaFile( sfx2::convertMetaFile(pMetaFile.get())); sfx2::SaveOlePropertySet(xDocProps, &GetWriter().GetStorage(), &metaFile); diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 6f1a3442c066..9df2cfbc89d5 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -4836,7 +4836,7 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos) { SwDocShell * pDocShell = rDoc.GetDocShell(); if (pDocShell) - pDocShell->SetReadOnlyUI(sal_True); + pDocShell->SetReadOnlyUI(true); } pPaM = new SwPaM(rPos); |