diff options
author | Xisco Fauli <anistenis@gmail.com> | 2016-06-05 01:01:51 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-06-06 07:17:56 +0000 |
commit | 37c0fd253e7a73d08d35b60fecd7aa09816d9073 (patch) | |
tree | 24b70a728125dd363793f5709ad2f5823abf377c /sfx2/source/doc/objcont.cxx | |
parent | 6b51e9afe01171a46f19fb96b1c2a2074d5a92ca (diff) |
tdf#89329: use unique_ptr for pImpl in objsh
Change-Id: I572436af608821c3f6fad4deb66ebe2598a2df8a
Reviewed-on: https://gerrit.libreoffice.org/25912
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sfx2/source/doc/objcont.cxx')
-rw-r--r-- | sfx2/source/doc/objcont.cxx | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx index 7219e3fbefd8..e5681b887dbc 100644 --- a/sfx2/source/doc/objcont.cxx +++ b/sfx2/source/doc/objcont.cxx @@ -238,19 +238,19 @@ void SfxObjectShell::UpdateTime_Impl( // Safe impossible cases! // User has changed time to the past between last editing and now ... its not possible!!! - DBG_ASSERT( !(aNow.GetDate()<pImp->nTime.GetDate()), "Timestamp of last change is in the past ?!..." ); + DBG_ASSERT( !(aNow.GetDate()<pImpl->nTime.GetDate()), "Timestamp of last change is in the past ?!..." ); // Do the follow only, if user has NOT changed time to the past. // Else add a time of 0 to aOldTime ... !!! - if (aNow.GetDate()>=pImp->nTime.GetDate()) + if (aNow.GetDate()>=pImpl->nTime.GetDate()) { // Get count of days last editing. - nDays = aNow.GetSecFromDateTime(pImp->nTime.GetDate())/86400 ; + nDays = aNow.GetSecFromDateTime(pImpl->nTime.GetDate())/86400 ; if (nDays==0) { // If no day between now and last editing - calculate time directly. - nAddTime = (const tools::Time&)aNow - (const tools::Time&)pImp->nTime ; + nAddTime = (const tools::Time&)aNow - (const tools::Time&)pImpl->nTime ; } else if (nDays<=31) { @@ -261,14 +261,14 @@ void SfxObjectShell::UpdateTime_Impl( // nAddTime = (24h - nTime) + (nDays * 24h) + aNow --nDays; nAddTime = nDays*n24Time.GetTime() ; - nAddTime += n24Time-(const tools::Time&)pImp->nTime ; + nAddTime += n24Time-(const tools::Time&)pImpl->nTime ; nAddTime += aNow ; } lcl_add(editDuration, nAddTime); } - pImp->nTime = aNow; + pImpl->nTime = aNow; try { const sal_Int32 newSecs( (editDuration.Hours*3600) + (editDuration.Minutes*60) + editDuration.Seconds); @@ -545,77 +545,77 @@ void SfxObjectShell::ResetFromTemplate( const OUString& rTemplateName, const OUS bool SfxObjectShell::IsQueryLoadTemplate() const { - return pImp->bQueryLoadTemplate; + return pImpl->bQueryLoadTemplate; } bool SfxObjectShell::IsUseUserData() const { - return pImp->bUseUserData; + return pImpl->bUseUserData; } bool SfxObjectShell::IsUseThumbnailSave() const { - return pImp->bUseThumbnailSave; + return pImpl->bUseThumbnailSave; } void SfxObjectShell::SetQueryLoadTemplate( bool bNew ) { - if ( pImp->bQueryLoadTemplate != bNew ) + if ( pImpl->bQueryLoadTemplate != bNew ) SetModified(); - pImp->bQueryLoadTemplate = bNew; + pImpl->bQueryLoadTemplate = bNew; } void SfxObjectShell::SetUseUserData( bool bNew ) { - if ( pImp->bUseUserData != bNew ) + if ( pImpl->bUseUserData != bNew ) SetModified(); - pImp->bUseUserData = bNew; + pImpl->bUseUserData = bNew; } void SfxObjectShell::SetUseThumbnailSave( bool _bNew ) { - if ( pImp->bUseThumbnailSave != _bNew ) + if ( pImpl->bUseThumbnailSave != _bNew ) SetModified(); - pImp->bUseThumbnailSave = _bNew; + pImpl->bUseThumbnailSave = _bNew; } bool SfxObjectShell::IsLoadReadonly() const { - return pImp->bLoadReadonly; + return pImpl->bLoadReadonly; } bool SfxObjectShell::IsSaveVersionOnClose() const { - return pImp->bSaveVersionOnClose; + return pImpl->bSaveVersionOnClose; } void SfxObjectShell::SetLoadReadonly( bool bNew ) { - if ( pImp->bLoadReadonly != bNew ) + if ( pImpl->bLoadReadonly != bNew ) SetModified(); - pImp->bLoadReadonly = bNew; + pImpl->bLoadReadonly = bNew; } void SfxObjectShell::SetSaveVersionOnClose( bool bNew ) { - if ( pImp->bSaveVersionOnClose != bNew ) + if ( pImpl->bSaveVersionOnClose != bNew ) SetModified(); - pImp->bSaveVersionOnClose = bNew; + pImpl->bSaveVersionOnClose = bNew; } sal_uInt32 SfxObjectShell::GetModifyPasswordHash() const { - return pImp->m_nModifyPasswordHash; + return pImpl->m_nModifyPasswordHash; } bool SfxObjectShell::SetModifyPasswordHash( sal_uInt32 nHash ) { if ( ( !IsReadOnly() && !IsReadOnlyUI() ) - || !(pImp->nFlagsInProgress & SfxLoadedFlags::MAINDOCUMENT ) ) + || !(pImpl->nFlagsInProgress & SfxLoadedFlags::MAINDOCUMENT ) ) { // the hash can be changed only in editable documents, // or during loading of document - pImp->m_nModifyPasswordHash = nHash; + pImpl->m_nModifyPasswordHash = nHash; return true; } @@ -624,17 +624,17 @@ bool SfxObjectShell::SetModifyPasswordHash( sal_uInt32 nHash ) const uno::Sequence< beans::PropertyValue >& SfxObjectShell::GetModifyPasswordInfo() const { - return pImp->m_aModifyPasswordInfo; + return pImpl->m_aModifyPasswordInfo; } bool SfxObjectShell::SetModifyPasswordInfo( const uno::Sequence< beans::PropertyValue >& aInfo ) { if ( ( !IsReadOnly() && !IsReadOnlyUI() ) - || !(pImp->nFlagsInProgress & SfxLoadedFlags::MAINDOCUMENT ) ) + || !(pImpl->nFlagsInProgress & SfxLoadedFlags::MAINDOCUMENT ) ) { // the hash can be changed only in editable documents, // or during loading of document - pImp->m_aModifyPasswordInfo = aInfo; + pImpl->m_aModifyPasswordInfo = aInfo; return true; } @@ -643,12 +643,12 @@ bool SfxObjectShell::SetModifyPasswordInfo( const uno::Sequence< beans::Property void SfxObjectShell::SetModifyPasswordEntered( bool bEntered ) { - pImp->m_bModifyPasswordEntered = bEntered; + pImpl->m_bModifyPasswordEntered = bEntered; } bool SfxObjectShell::IsModifyPasswordEntered() { - return pImp->m_bModifyPasswordEntered; + return pImpl->m_bModifyPasswordEntered; } void SfxObjectShell::libreOfficeKitCallback(int /*nType*/, const char* /*pPayload*/) const |