[Libreoffice-commits] core.git: include/sfx2 sfx2/source
Xisco Fauli
anistenis at gmail.com
Mon Jun 6 07:18:17 UTC 2016
include/sfx2/objsh.hxx | 6 -
sfx2/source/doc/objcont.cxx | 58 +++++-----
sfx2/source/doc/objembed.cxx | 22 ++--
sfx2/source/doc/objmisc.cxx | 228 +++++++++++++++++++++----------------------
sfx2/source/doc/objserv.cxx | 38 +++----
sfx2/source/doc/objstor.cxx | 172 ++++++++++++++++----------------
sfx2/source/doc/objxtor.cxx | 114 ++++++++++-----------
7 files changed, 318 insertions(+), 320 deletions(-)
New commits:
commit 37c0fd253e7a73d08d35b60fecd7aa09816d9073
Author: Xisco Fauli <anistenis at gmail.com>
Date: Sun Jun 5 01:01:51 2016 +0200
tdf#89329: use unique_ptr for pImpl in objsh
Change-Id: I572436af608821c3f6fad4deb66ebe2598a2df8a
Reviewed-on: https://gerrit.libreoffice.org/25912
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index 24b1d82..ee86c34 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -205,7 +205,7 @@ friend struct ModifyBlocker_Impl;
friend class SfxObjectShellLock;
private:
- struct SfxObjectShell_Impl* pImp; // internal data
+ std::unique_ptr<struct SfxObjectShell_Impl> pImpl; // internal data
SfxMedium * pMedium; // Description of the file for example
// storage that contains the object
@@ -654,12 +654,12 @@ public:
SAL_DLLPRIVATE bool IsModifyPasswordEntered();
SAL_DLLPRIVATE void InitBasicManager_Impl();
- SAL_DLLPRIVATE SfxObjectShell_Impl* Get_Impl() { return pImp; }
+ SAL_DLLPRIVATE SfxObjectShell_Impl* Get_Impl() { return pImpl.get(); }
SAL_DLLPRIVATE static bool UseInteractionToHandleError(
const css::uno::Reference< css::task::XInteractionHandler >& xHandler,
sal_uInt32 nError );
- SAL_DLLPRIVATE const SfxObjectShell_Impl* Get_Impl() const { return pImp; }
+ SAL_DLLPRIVATE const SfxObjectShell_Impl* Get_Impl() const { return pImpl.get(); }
SAL_DLLPRIVATE void SetCreateMode_Impl( SfxObjectCreateMode nMode );
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index 7219e3f..e5681b8 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
diff --git a/sfx2/source/doc/objembed.cxx b/sfx2/source/doc/objembed.cxx
index 49d0518..2bf85bd 100644
--- a/sfx2/source/doc/objembed.cxx
+++ b/sfx2/source/doc/objembed.cxx
@@ -95,7 +95,7 @@ void SfxObjectShell::OnDocumentPrinterChanged( Printer* /*pNewPrinter*/ )
Rectangle SfxObjectShell::GetVisArea( sal_uInt16 nAspect ) const
{
if( nAspect == ASPECT_CONTENT )
- return pImp->m_aVisArea;
+ return pImpl->m_aVisArea;
else if( nAspect == ASPECT_THUMBNAIL )
{
Rectangle aRect;
@@ -109,16 +109,16 @@ Rectangle SfxObjectShell::GetVisArea( sal_uInt16 nAspect ) const
const Rectangle& SfxObjectShell::GetVisArea() const
{
- pImp->m_aVisArea = GetVisArea( ASPECT_CONTENT );
- return pImp->m_aVisArea;
+ pImpl->m_aVisArea = GetVisArea( ASPECT_CONTENT );
+ return pImpl->m_aVisArea;
}
void SfxObjectShell::SetVisArea( const Rectangle & rVisArea )
{
- if( pImp->m_aVisArea != rVisArea )
+ if( pImpl->m_aVisArea != rVisArea )
{
- pImp->m_aVisArea = rVisArea;
+ pImpl->m_aVisArea = rVisArea;
if ( GetCreateMode() == SfxObjectCreateMode::EMBEDDED )
{
if ( IsEnableSetModified() )
@@ -144,13 +144,13 @@ sal_uIntPtr SfxObjectShell::GetMiscStatus() const
MapUnit SfxObjectShell::GetMapUnit() const
{
- return pImp->m_nMapUnit;
+ return pImpl->m_nMapUnit;
}
void SfxObjectShell::SetMapUnit( MapUnit nMapUnit )
{
- pImp->m_nMapUnit = nMapUnit;
+ pImpl->m_nMapUnit = nMapUnit;
}
@@ -246,15 +246,15 @@ void SfxObjectShell::DoDraw_Impl( OutputDevice* pDev,
comphelper::EmbeddedObjectContainer& SfxObjectShell::GetEmbeddedObjectContainer() const
{
- if ( !pImp->mpObjectContainer )
- pImp->mpObjectContainer = new comphelper::EmbeddedObjectContainer( const_cast<SfxObjectShell*>(this)->GetStorage(), GetModel() );
- return *pImp->mpObjectContainer;
+ if ( !pImpl->mpObjectContainer )
+ pImpl->mpObjectContainer = new comphelper::EmbeddedObjectContainer( const_cast<SfxObjectShell*>(this)->GetStorage(), GetModel() );
+ return *pImpl->mpObjectContainer;
}
void SfxObjectShell::ClearEmbeddedObjects()
{
// frees alle space taken by embedded objects
- DELETEZ( pImp->mpObjectContainer );
+ DELETEZ( pImpl->mpObjectContainer );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 902e96c..67e3eff 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -172,13 +172,13 @@ sal_uInt16 const aTitleMap_Impl[3][2] =
void SfxObjectShell::AbortImport()
{
- pImp->bIsAbortingImport = true;
+ pImpl->bIsAbortingImport = true;
}
bool SfxObjectShell::IsAbortingImport() const
{
- return pImp->bIsAbortingImport;
+ return pImpl->bIsAbortingImport;
}
@@ -219,9 +219,9 @@ void SfxObjectShell::FlushDocInfo()
void SfxObjectShell::SetError( sal_uInt32 lErr, const OUString& aLogMessage )
{
- if(pImp->lErr==ERRCODE_NONE)
+ if(pImpl->lErr==ERRCODE_NONE)
{
- pImp->lErr=lErr;
+ pImpl->lErr=lErr;
if( lErr != ERRCODE_NONE && !aLogMessage.isEmpty() )
AddLog( aLogMessage );
@@ -237,7 +237,7 @@ sal_uInt32 SfxObjectShell::GetError() const
sal_uInt32 SfxObjectShell::GetErrorCode() const
{
- sal_uInt32 lError=pImp->lErr;
+ sal_uInt32 lError=pImpl->lErr;
if(!lError && GetMedium())
lError=GetMedium()->GetErrorCode();
return lError;
@@ -246,10 +246,10 @@ sal_uInt32 SfxObjectShell::GetErrorCode() const
void SfxObjectShell::ResetError()
{
- if( pImp->lErr != ERRCODE_NONE )
+ if( pImpl->lErr != ERRCODE_NONE )
AddLog( OSL_LOG_PREFIX "Resetting Error." );
- pImp->lErr=0;
+ pImpl->lErr=0;
SfxMedium * pMed = GetMedium();
if( pMed )
pMed->ResetError();
@@ -258,32 +258,32 @@ void SfxObjectShell::ResetError()
bool SfxObjectShell::IsTemplate() const
{
- return pImp->bIsTemplate;
+ return pImpl->bIsTemplate;
}
void SfxObjectShell::EnableSetModified( bool bEnable )
{
#ifdef DBG_UTIL
- if ( bEnable == pImp->m_bEnableSetModified )
+ if ( bEnable == pImpl->m_bEnableSetModified )
SAL_INFO( "sfx", "SFX_PERSIST: EnableSetModified 2x called with the same value" );
#endif
- pImp->m_bEnableSetModified = bEnable;
+ pImpl->m_bEnableSetModified = bEnable;
}
bool SfxObjectShell::IsEnableSetModified() const
{
- return pImp->m_bEnableSetModified && !IsReadOnly();
+ return pImpl->m_bEnableSetModified && !IsReadOnly();
}
bool SfxObjectShell::IsModified()
{
- if ( pImp->m_bIsModified )
+ if ( pImpl->m_bIsModified )
return true;
- if ( !pImp->m_xDocStorage.is() || IsReadOnly() )
+ if ( !pImpl->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
@@ -291,7 +291,7 @@ bool SfxObjectShell::IsModified()
return false;
}
- if (pImp->mpObjectContainer)
+ if (pImpl->mpObjectContainer)
{
uno::Sequence < OUString > aNames = GetEmbeddedObjectContainer().GetObjectNames();
for ( sal_Int32 n=0; n<aNames.getLength(); n++ )
@@ -330,9 +330,9 @@ void SfxObjectShell::SetModified( bool bModifiedP )
if( !IsEnableSetModified() )
return;
- if( pImp->m_bIsModified != bModifiedP )
+ if( pImpl->m_bIsModified != bModifiedP )
{
- pImp->m_bIsModified = bModifiedP;
+ pImpl->m_bIsModified = bModifiedP;
ModifyChanged();
}
}
@@ -340,7 +340,7 @@ void SfxObjectShell::SetModified( bool bModifiedP )
void SfxObjectShell::ModifyChanged()
{
- if ( pImp->bClosing )
+ if ( pImpl->bClosing )
// SetModified dispose of the models!
return;
@@ -366,7 +366,7 @@ bool SfxObjectShell::IsReadOnlyUI() const
*/
{
- return pImp->bReadOnlyUI;
+ return pImpl->bReadOnlyUI;
}
@@ -398,9 +398,9 @@ void SfxObjectShell::SetReadOnlyUI( bool bReadOnly )
*/
{
- if ( bReadOnly != pImp->bReadOnlyUI )
+ if ( bReadOnly != pImpl->bReadOnlyUI )
{
- pImp->bReadOnlyUI = bReadOnly;
+ pImpl->bReadOnlyUI = bReadOnly;
Broadcast( SfxSimpleHint(SFX_HINT_MODECHANGED) );
}
}
@@ -434,13 +434,13 @@ void SfxObjectShell::SetReadOnly()
bool SfxObjectShell::IsReadOnly() const
{
- return pImp->bReadOnlyUI || pMedium == nullptr;
+ return pImpl->bReadOnlyUI || pMedium == nullptr;
}
bool SfxObjectShell::IsInModalMode() const
{
- return pImp->bModalMode || pImp->bRunningMacro;
+ return pImpl->bModalMode || pImpl->bRunningMacro;
}
bool SfxObjectShell::AcceptStateUpdate() const
@@ -451,9 +451,9 @@ bool SfxObjectShell::AcceptStateUpdate() const
void SfxObjectShell::SetMacroMode_Impl( bool bModal )
{
- if ( !pImp->bRunningMacro != !bModal )
+ if ( !pImpl->bRunningMacro != !bModal )
{
- pImp->bRunningMacro = bModal;
+ pImpl->bRunningMacro = bModal;
Broadcast( SfxSimpleHint( SFX_HINT_MODECHANGED ) );
}
}
@@ -463,7 +463,7 @@ void SfxObjectShell::SetModalMode_Impl( bool bModal )
{
// Broadcast only if modified, or otherwise it will possibly go into
// an endless loop
- if ( !pImp->bModalMode != !bModal )
+ if ( !pImpl->bModalMode != !bModal )
{
// Central count
sal_uInt16 &rDocModalCount = SfxGetpApp()->Get_Impl()->nDocModalMode;
@@ -473,7 +473,7 @@ void SfxObjectShell::SetModalMode_Impl( bool bModal )
--rDocModalCount;
// Switch
- pImp->bModalMode = bModal;
+ pImpl->bModalMode = bModal;
Broadcast( SfxSimpleHint( SFX_HINT_MODECHANGED ) );
}
}
@@ -544,14 +544,14 @@ bool SfxObjectShell::SwitchToShared( bool bShared, bool bSave )
// TODO/LATER: Is it possible that the following calls fail?
if ( bShared )
{
- pImp->m_aSharedFileURL = aOrigURL;
+ pImpl->m_aSharedFileURL = aOrigURL;
GetMedium()->SwitchDocumentToTempFile();
}
else
{
OUString aTempFileURL = pMedium->GetURLObject().GetMainURL( INetURLObject::NO_DECODE );
GetMedium()->SwitchDocumentToFile( GetSharedFileURL() );
- (pImp->m_aSharedFileURL).clear();
+ (pImpl->m_aSharedFileURL).clear();
// now remove the temporary file the document was based on
::utl::UCBContentHelper::Kill( aTempFileURL );
@@ -608,7 +608,7 @@ void SfxObjectShell::FreeSharedFile( const OUString& aTempFileURL )
if ( IsDocShared() && !aTempFileURL.isEmpty()
&& !::utl::UCBContentHelper::EqualURLs( aTempFileURL, GetSharedFileURL() ) )
{
- if ( pImp->m_bAllowShareControlFileClean )
+ if ( pImpl->m_bAllowShareControlFileClean )
{
try
{
@@ -621,31 +621,31 @@ void SfxObjectShell::FreeSharedFile( const OUString& aTempFileURL )
}
// the cleaning is forbidden only once
- pImp->m_bAllowShareControlFileClean = true;
+ pImpl->m_bAllowShareControlFileClean = true;
// now remove the temporary file the document is based currently on
::utl::UCBContentHelper::Kill( aTempFileURL );
- (pImp->m_aSharedFileURL).clear();
+ (pImpl->m_aSharedFileURL).clear();
}
}
void SfxObjectShell::DoNotCleanShareControlFile()
{
- pImp->m_bAllowShareControlFileClean = false;
+ pImpl->m_bAllowShareControlFileClean = false;
}
void SfxObjectShell::SetSharedXMLFlag( bool bFlag ) const
{
- pImp->m_bSharedXMLFlag = bFlag;
+ pImpl->m_bSharedXMLFlag = bFlag;
}
bool SfxObjectShell::HasSharedXMLFlagSet() const
{
- return pImp->m_bSharedXMLFlag;
+ return pImpl->m_bSharedXMLFlag;
}
#endif
@@ -653,7 +653,7 @@ bool SfxObjectShell::HasSharedXMLFlagSet() const
bool SfxObjectShell::IsDocShared() const
{
#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
- return ( !pImp->m_aSharedFileURL.isEmpty() );
+ return ( !pImpl->m_aSharedFileURL.isEmpty() );
#else
return false;
#endif
@@ -663,7 +663,7 @@ bool SfxObjectShell::IsDocShared() const
OUString SfxObjectShell::GetSharedFileURL() const
{
#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
- return pImp->m_aSharedFileURL;
+ return pImpl->m_aSharedFileURL;
#else
return OUString();
#endif
@@ -677,7 +677,7 @@ Size SfxObjectShell::GetFirstPageSize()
IndexBitSet& SfxObjectShell::GetNoSet_Impl()
{
- return pImp->aBitSet;
+ return pImpl->aBitSet;
}
@@ -699,7 +699,7 @@ void SfxObjectShell::SetTitle
{
// Nothing to do?
- if ( ( ( HasName() && pImp->aTitle == rTitle )
+ if ( ( ( HasName() && pImpl->aTitle == rTitle )
|| ( !HasName() && GetTitle() == rTitle ) )
&& !IsDocShared() )
return;
@@ -707,14 +707,14 @@ void SfxObjectShell::SetTitle
SfxApplication *pSfxApp = SfxGetpApp();
// If possible relase the unnamed number.
- if ( pImp->bIsNamedVisible && USHRT_MAX != pImp->nVisualDocumentNumber )
+ if ( pImpl->bIsNamedVisible && USHRT_MAX != pImpl->nVisualDocumentNumber )
{
- pSfxApp->ReleaseIndex(pImp->nVisualDocumentNumber);
- pImp->bIsNamedVisible = false;
+ pSfxApp->ReleaseIndex(pImpl->nVisualDocumentNumber);
+ pImpl->bIsNamedVisible = false;
}
// Set Title
- pImp->aTitle = rTitle;
+ pImpl->aTitle = rTitle;
// Notification
if ( GetMedium() )
@@ -784,7 +784,7 @@ OUString SfxObjectShell::GetTitle
return OUString();
// Create Title?
- if ( SFX_TITLE_DETECT == nMaxLength && pImp->aTitle.isEmpty() )
+ if ( SFX_TITLE_DETECT == nMaxLength && pImpl->aTitle.isEmpty() )
{
static bool bRecur = false;
if ( bRecur )
@@ -813,9 +813,9 @@ OUString SfxObjectShell::GetTitle
return GetAPIName();
// Special case templates:
- if( IsTemplate() && !pImp->aTitle.isEmpty() &&
+ if( IsTemplate() && !pImpl->aTitle.isEmpty() &&
( nMaxLength == SFX_TITLE_CAPTION || nMaxLength == SFX_TITLE_PICKLIST ) )
- return pImp->aTitle;
+ return pImpl->aTitle;
// Picklist/Caption is mapped
if ( pMed && ( nMaxLength == SFX_TITLE_CAPTION || nMaxLength == SFX_TITLE_PICKLIST ) )
@@ -833,15 +833,15 @@ OUString SfxObjectShell::GetTitle
if ( !HasName() || !pMed )
{
// Title already set?
- if ( !pImp->aTitle.isEmpty() )
- return pImp->aTitle;
+ if ( !pImpl->aTitle.isEmpty() )
+ return pImpl->aTitle;
// must it be numbered?
OUString aNoName(SFX2_RESSTR(STR_NONAME));
- if (pImp->bIsNamedVisible)
+ if (pImpl->bIsNamedVisible)
{
// Append number
- aNoName += OUString::number(pImp->nVisualDocumentNumber);
+ aNoName += OUString::number(pImpl->nVisualDocumentNumber);
}
// Document called "noname" for the time being
@@ -867,8 +867,8 @@ OUString SfxObjectShell::GetTitle
return aName;
else if ( nMaxLength == SFX_TITLE_FILENAME )
return aURL.getName(INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET);
- else if ( pImp->aTitle.isEmpty() )
- pImp->aTitle = aURL.getBase( INetURLObject::LAST_SEGMENT,
+ else if ( pImpl->aTitle.isEmpty() )
+ pImpl->aTitle = aURL.getBase( INetURLObject::LAST_SEGMENT,
true, INetURLObject::DECODE_WITH_CHARSET );
}
else
@@ -897,16 +897,16 @@ OUString SfxObjectShell::GetTitle
return aURL.GetMainURL( INetURLObject::DECODE_TO_IURI );
// Generate Title from file name if possible
- if ( pImp->aTitle.isEmpty() )
- pImp->aTitle = aURL.GetBase();
+ if ( pImpl->aTitle.isEmpty() )
+ pImpl->aTitle = aURL.GetBase();
// workaround for the case when the name can not be retrieved from URL by INetURLObject
- if ( pImp->aTitle.isEmpty() )
- pImp->aTitle = aURL.GetMainURL( INetURLObject::DECODE_WITH_CHARSET );
+ if ( pImpl->aTitle.isEmpty() )
+ pImpl->aTitle = aURL.GetMainURL( INetURLObject::DECODE_WITH_CHARSET );
}
// Complete Title
- return pImp->aTitle;
+ return pImpl->aTitle;
}
@@ -919,7 +919,7 @@ void SfxObjectShell::InvalidateName()
*/
{
- pImp->aTitle.clear();
+ pImpl->aTitle.clear();
SetName( GetTitle( SFX_TITLE_APINAME ) );
Broadcast( SfxSimpleHint(SFX_HINT_TITLECHANGED) );
@@ -928,12 +928,12 @@ void SfxObjectShell::InvalidateName()
void SfxObjectShell::SetNamedVisibility_Impl()
{
- if ( !pImp->bIsNamedVisible )
+ if ( !pImpl->bIsNamedVisible )
{
- pImp->bIsNamedVisible = true;
- if ( !HasName() && USHRT_MAX == pImp->nVisualDocumentNumber && pImp->aTitle.isEmpty() )
+ pImpl->bIsNamedVisible = true;
+ if ( !HasName() && USHRT_MAX == pImpl->nVisualDocumentNumber && pImpl->aTitle.isEmpty() )
{
- pImp->nVisualDocumentNumber = SfxGetpApp()->GetFreeIndex();
+ pImpl->nVisualDocumentNumber = SfxGetpApp()->GetFreeIndex();
Broadcast( SfxSimpleHint(SFX_HINT_TITLECHANGED) );
}
}
@@ -950,7 +950,7 @@ void SfxObjectShell::SetNoName()
SfxProgress* SfxObjectShell::GetProgress() const
{
- return pImp->pProgress;
+ return pImpl->pProgress;
}
@@ -967,10 +967,10 @@ void SfxObjectShell::SetProgress_Impl
*/
{
- DBG_ASSERT( ( !pImp->pProgress && pProgress ) ||
- ( pImp->pProgress && !pProgress ),
+ DBG_ASSERT( ( !pImpl->pProgress && pProgress ) ||
+ ( pImpl->pProgress && !pProgress ),
"Progress activation/deactivation mismatch" );
- pImp->pProgress = pProgress;
+ pImpl->pProgress = pProgress;
}
@@ -982,8 +982,8 @@ void SfxObjectShell::PostActivateEvent_Impl( SfxViewFrame* pFrame )
const SfxBoolItem* pHiddenItem = SfxItemSet::GetItem<SfxBoolItem>(pMedium->GetItemSet(), SID_HIDDEN, false);
if ( !pHiddenItem || !pHiddenItem->GetValue() )
{
- sal_uInt16 nId = pImp->nEventId;
- pImp->nEventId = 0;
+ sal_uInt16 nId = pImpl->nEventId;
+ pImpl->nEventId = 0;
if ( nId == SFX_EVENT_OPENDOC )
pSfxApp->NotifyEvent(SfxViewEventHint( nId, GlobalEventConfig::GetEventName(GlobalEventId::OPENDOC), this, pFrame->GetFrame().GetController() ), false);
else if (nId == SFX_EVENT_CREATEDOC )
@@ -996,7 +996,7 @@ void SfxObjectShell::PostActivateEvent_Impl( SfxViewFrame* pFrame )
void SfxObjectShell::SetActivateEvent_Impl(sal_uInt16 nId )
{
if ( GetFactory().GetFlags() & SfxObjectShellFlags::HASOPENDOC )
- pImp->nEventId = nId;
+ pImpl->nEventId = nId;
}
void SfxObjectShell::PrepareReload( )
@@ -1014,13 +1014,13 @@ bool SfxObjectShell::IsAutoLoadLocked() const
*/
{
- return !IsReadOnly() || pImp->nAutoLoadLocks > 0;
+ return !IsReadOnly() || pImpl->nAutoLoadLocks > 0;
}
void SfxObjectShell::BreakMacroSign_Impl( bool bBreakMacroSign )
{
- pImp->m_bMacroSignBroken = bBreakMacroSign;
+ pImpl->m_bMacroSignBroken = bBreakMacroSign;
}
@@ -1036,7 +1036,7 @@ void SfxObjectShell::CheckSecurityOnLoading_Impl()
CheckEncryption_Impl( xInteraction );
// check macro security
- pImp->aMacroMode.checkMacrosOnLoading( xInteraction );
+ pImpl->aMacroMode.checkMacrosOnLoading( xInteraction );
}
@@ -1062,18 +1062,18 @@ void SfxObjectShell::CheckEncryption_Impl( const uno::Reference< task::XInteract
// this is ODF1.2 or later
if ( bIsEncrypted && bHasNonEncrypted )
{
- if ( !pImp->m_bIncomplEncrWarnShown )
+ if ( !pImpl->m_bIncomplEncrWarnShown )
{
// this is an encrypted document with nonencrypted streams inside, show the warning
css::task::ErrorCodeRequest aErrorCode;
aErrorCode.ErrCode = ERRCODE_SFX_INCOMPLETE_ENCRYPTION;
SfxMedium::CallApproveHandler( xHandler, uno::makeAny( aErrorCode ), false );
- pImp->m_bIncomplEncrWarnShown = true;
+ pImpl->m_bIncomplEncrWarnShown = true;
}
// broken signatures imply no macro execution at all
- pImp->aMacroMode.disallowMacroExecution();
+ pImpl->aMacroMode.disallowMacroExecution();
}
}
}
@@ -1086,40 +1086,40 @@ void SfxObjectShell::CheckForBrokenDocSignatures_Impl( const uno::Reference< tas
if ( !bSignatureBroken )
return;
- pImp->showBrokenSignatureWarning( xHandler );
+ pImpl->showBrokenSignatureWarning( xHandler );
// broken signatures imply no macro execution at all
- pImp->aMacroMode.disallowMacroExecution();
+ pImpl->aMacroMode.disallowMacroExecution();
}
void SfxObjectShell::SetAutoLoad(
const INetURLObject& rUrl, sal_uInt32 nTime, bool bReload )
{
- if ( pImp->pReloadTimer )
- DELETEZ(pImp->pReloadTimer);
+ if ( pImpl->pReloadTimer )
+ DELETEZ(pImpl->pReloadTimer);
if ( bReload )
{
- pImp->pReloadTimer = new AutoReloadTimer_Impl(
+ pImpl->pReloadTimer = new AutoReloadTimer_Impl(
rUrl.GetMainURL( INetURLObject::DECODE_TO_IURI ),
nTime, this );
- pImp->pReloadTimer->Start();
+ pImpl->pReloadTimer->Start();
}
}
bool SfxObjectShell::IsLoadingFinished() const
{
- return ( pImp->nLoadedFlags == SfxLoadedFlags::ALL );
+ return ( pImpl->nLoadedFlags == SfxLoadedFlags::ALL );
}
void SfxObjectShell::InitOwnModel_Impl()
{
- if ( !pImp->bModelInitialized )
+ if ( !pImpl->bModelInitialized )
{
const SfxStringItem* pSalvageItem = SfxItemSet::GetItem<SfxStringItem>(pMedium->GetItemSet(), SID_DOC_SALVAGE, false);
if ( pSalvageItem )
{
- pImp->aTempName = pMedium->GetPhysicalName();
+ pImpl->aTempName = pMedium->GetPhysicalName();
pMedium->GetItemSet()->ClearItem( SID_DOC_SALVAGE );
pMedium->GetItemSet()->ClearItem( SID_FILE_NAME );
pMedium->GetItemSet()->Put( SfxStringItem( SID_FILE_NAME, pMedium->GetOrigURL() ) );
@@ -1144,7 +1144,7 @@ void SfxObjectShell::InitOwnModel_Impl()
impl_addToModelCollection(xModel);
}
- pImp->bModelInitialized = true;
+ pImpl->bModelInitialized = true;
}
}
@@ -1152,12 +1152,12 @@ void SfxObjectShell::FinishedLoading( SfxLoadedFlags nFlags )
{
bool bSetModifiedTRUE = false;
const SfxStringItem* pSalvageItem = SfxItemSet::GetItem<SfxStringItem>(pMedium->GetItemSet(), SID_DOC_SALVAGE, false);
- if( ( nFlags & SfxLoadedFlags::MAINDOCUMENT ) && !(pImp->nLoadedFlags & SfxLoadedFlags::MAINDOCUMENT )
- && !(pImp->nFlagsInProgress & SfxLoadedFlags::MAINDOCUMENT ))
+ if( ( nFlags & SfxLoadedFlags::MAINDOCUMENT ) && !(pImpl->nLoadedFlags & SfxLoadedFlags::MAINDOCUMENT )
+ && !(pImpl->nFlagsInProgress & SfxLoadedFlags::MAINDOCUMENT ))
{
- pImp->nFlagsInProgress |= SfxLoadedFlags::MAINDOCUMENT;
+ pImpl->nFlagsInProgress |= SfxLoadedFlags::MAINDOCUMENT;
static_cast<SfxHeaderAttributes_Impl*>(GetHeaderAttributes())->SetAttributes();
- pImp->bImportDone = true;
+ pImpl->bImportDone = true;
if( !IsAbortingImport() )
PositionView_Impl();
@@ -1179,13 +1179,13 @@ void SfxObjectShell::FinishedLoading( SfxLoadedFlags nFlags )
bHasName = true; // the document is loaded, so the name should already available
GetTitle( SFX_TITLE_DETECT );
InitOwnModel_Impl();
- pImp->nFlagsInProgress &= ~SfxLoadedFlags::MAINDOCUMENT;
+ pImpl->nFlagsInProgress &= ~SfxLoadedFlags::MAINDOCUMENT;
}
- if( ( nFlags & SfxLoadedFlags::IMAGES ) && !(pImp->nLoadedFlags & SfxLoadedFlags::IMAGES )
- && !(pImp->nFlagsInProgress & SfxLoadedFlags::IMAGES ))
+ if( ( nFlags & SfxLoadedFlags::IMAGES ) && !(pImpl->nLoadedFlags & SfxLoadedFlags::IMAGES )
+ && !(pImpl->nFlagsInProgress & SfxLoadedFlags::IMAGES ))
{
- pImp->nFlagsInProgress |= SfxLoadedFlags::IMAGES;
+ pImpl->nFlagsInProgress |= SfxLoadedFlags::IMAGES;
uno::Reference<document::XDocumentProperties> xDocProps(
getDocProperties());
OUString url(xDocProps->getAutoloadURL());
@@ -1195,12 +1195,12 @@ void SfxObjectShell::FinishedLoading( SfxLoadedFlags nFlags )
if( !bSetModifiedTRUE && IsEnableSetModified() )
SetModified( false );
Invalidate( SID_SAVEASDOC );
- pImp->nFlagsInProgress &= ~SfxLoadedFlags::IMAGES;
+ pImpl->nFlagsInProgress &= ~SfxLoadedFlags::IMAGES;
}
- pImp->nLoadedFlags |= nFlags;
+ pImpl->nLoadedFlags |= nFlags;
- if ( pImp->nFlagsInProgress == SfxLoadedFlags::NONE )
+ if ( pImpl->nFlagsInProgress == SfxLoadedFlags::NONE )
{
// in case of reentrance calls the first called FinishedLoading() call on the stack
// should do the notification, in result the notification is done when all the FinishedLoading() calls are finished
@@ -1210,7 +1210,7 @@ void SfxObjectShell::FinishedLoading( SfxLoadedFlags nFlags )
else
SetModified( false );
- if ( (pImp->nLoadedFlags & SfxLoadedFlags::MAINDOCUMENT ) && (pImp->nLoadedFlags & SfxLoadedFlags::IMAGES ) )
+ if ( (pImpl->nLoadedFlags & SfxLoadedFlags::MAINDOCUMENT ) && (pImpl->nLoadedFlags & SfxLoadedFlags::IMAGES ) )
{
const SfxBoolItem* pTemplateItem = SfxItemSet::GetItem<SfxBoolItem>(pMedium->GetItemSet(), SID_TEMPLATE, false);
bool bTemplate = pTemplateItem && pTemplateItem->GetValue();
@@ -1235,7 +1235,7 @@ void SfxObjectShell::FinishedLoading( SfxLoadedFlags nFlags )
// Title is not available until loading has finished
Broadcast( SfxSimpleHint( SFX_HINT_TITLECHANGED ) );
- if ( pImp->nEventId )
+ if ( pImpl->nEventId )
PostActivateEvent_Impl(SfxViewFrame::GetFirst(this));
}
}
@@ -1354,7 +1354,7 @@ bool SfxObjectShell::IsLoading() const
Has FinishedLoading been called?
*/
{
- return !( pImp->nLoadedFlags & SfxLoadedFlags::MAINDOCUMENT );
+ return !( pImpl->nLoadedFlags & SfxLoadedFlags::MAINDOCUMENT );
}
@@ -1365,7 +1365,7 @@ void SfxObjectShell::CancelTransfers()
by RegisterTransfer.
*/
{
- if( ( pImp->nLoadedFlags & SfxLoadedFlags::ALL ) != SfxLoadedFlags::ALL )
+ if( ( pImpl->nLoadedFlags & SfxLoadedFlags::ALL ) != SfxLoadedFlags::ALL )
{
AbortImport();
if( IsLoading() )
@@ -1545,9 +1545,9 @@ ErrCode SfxObjectShell::CallXScript( const OUString& rScriptURL,
SfxObjectShellFlags SfxObjectShell::GetFlags() const
{
- if( pImp->eFlags == SfxObjectShellFlags::UNDEFINED )
- pImp->eFlags = GetFactory().GetFlags();
- return pImp->eFlags;
+ if( pImpl->eFlags == SfxObjectShellFlags::UNDEFINED )
+ pImpl->eFlags = GetFactory().GetFlags();
+ return pImpl->eFlags;
}
void SfxHeaderAttributes_Impl::SetAttributes()
@@ -1607,12 +1607,12 @@ void SfxHeaderAttributes_Impl::Append( const SvKeyValue& rKV )
SvKeyValueIterator* SfxObjectShell::GetHeaderAttributes()
{
- if( !pImp->xHeaderAttributes.Is() )
+ if( !pImpl->xHeaderAttributes.Is() )
{
DBG_ASSERT( pMedium, "No Medium" );
- pImp->xHeaderAttributes = new SfxHeaderAttributes_Impl( this );
+ pImpl->xHeaderAttributes = new SfxHeaderAttributes_Impl( this );
}
- return static_cast<SvKeyValueIterator*>( &pImp->xHeaderAttributes );
+ return static_cast<SvKeyValueIterator*>( &pImpl->xHeaderAttributes );
}
void SfxObjectShell::ClearHeaderAttributesForSourceViewHack()
@@ -1692,7 +1692,7 @@ bool SfxObjectShell::AdjustMacroMode()
CheckEncryption_Impl( xInteraction );
- return pImp->aMacroMode.adjustMacroMode( xInteraction );
+ return pImpl->aMacroMode.adjustMacroMode( xInteraction );
}
vcl::Window* SfxObjectShell::GetDialogParent( SfxMedium* pLoadingMedium )
@@ -1941,19 +1941,19 @@ void SfxObjectShell_Impl::showBrokenSignatureWarning( const uno::Reference< task
void SfxObjectShell::AddLog( const OUString& aMessage )
{
- if ( !pImp->m_xLogRing.is() )
+ if ( !pImpl->m_xLogRing.is() )
{
try
{
Reference<XComponentContext> xContext( ::comphelper::getProcessComponentContext() );
- pImp->m_xLogRing.set( logging::DocumentIOLogRing::get(xContext) );
+ pImpl->m_xLogRing.set( logging::DocumentIOLogRing::get(xContext) );
}
catch( uno::Exception& )
{}
}
- if ( pImp->m_xLogRing.is() )
- pImp->m_xLogRing->logString( aMessage );
+ if ( pImpl->m_xLogRing.is() )
+ pImpl->m_xLogRing->logString( aMessage );
}
namespace {
@@ -1976,18 +1976,18 @@ void WriteStringInStream( const uno::Reference< io::XOutputStream >& xOutStream,
void SfxObjectShell::StoreLog()
{
- if ( !pImp->m_xLogRing.is() )
+ if ( !pImpl->m_xLogRing.is() )
{
try
{
Reference<XComponentContext> xContext( ::comphelper::getProcessComponentContext() );
- pImp->m_xLogRing.set( logging::DocumentIOLogRing::get(xContext) );
+ pImpl->m_xLogRing.set( logging::DocumentIOLogRing::get(xContext) );
}
catch( uno::Exception& )
{}
}
- if ( pImp->m_xLogRing.is() )
+ if ( pImpl->m_xLogRing.is() )
{
OUString aFileURL = ( "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}" );
@@ -2012,7 +2012,7 @@ void SfxObjectShell::StoreLog()
if ( !aBuildID.isEmpty() )
WriteStringInStream( xOutStream, aBuildID );
- uno::Sequence< OUString > aLogSeq = pImp->m_xLogRing->getCollectedLog();
+ uno::Sequence< OUString > aLogSeq = pImpl->m_xLogRing->getCollectedLog();
for ( sal_Int32 nInd = 0; nInd < aLogSeq.getLength(); nInd++ )
WriteStringInStream( xOutStream, aLogSeq[nInd] );
}
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 0dd4cbd..836b6ff 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -548,7 +548,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
// by default versions should be preserved always except in case of an explicit
// SaveAs via GUI, so the flag must be set accordingly
- pImp->bPreserveVersions = (nId == SID_SAVEDOC);
+ pImpl->bPreserveVersions = (nId == SID_SAVEDOC);
try
{
SfxErrorContext aEc( ERRCTX_SFX_SAVEASDOC, GetTitle() ); // ???
@@ -688,7 +688,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
// by default versions should be preserved always except in case of an explicit
// SaveAs via GUI, so the flag must be reset to guarantee this
- pImp->bPreserveVersions = true;
+ pImpl->bPreserveVersions = true;
sal_uIntPtr lErr=GetErrorCode();
if ( !lErr && nErrorCode )
@@ -1008,7 +1008,7 @@ void SfxObjectShell::GetState_Impl(SfxItemSet &rSet)
break;
case SID_DOCINFO:
- if ( pImp->eFlags & SfxObjectShellFlags::NODOCINFO )
+ if ( pImpl->eFlags & SfxObjectShellFlags::NODOCINFO )
rSet.DisableItem( nWhich );
break;
@@ -1034,7 +1034,7 @@ void SfxObjectShell::GetState_Impl(SfxItemSet &rSet)
case SID_SAVEASDOC:
{
- if( !( pImp->nLoadedFlags & SfxLoadedFlags::MAINDOCUMENT ) )
+ if( !( pImpl->nLoadedFlags & SfxLoadedFlags::MAINDOCUMENT ) )
{
rSet.DisableItem( nWhich );
break;
@@ -1048,7 +1048,7 @@ void SfxObjectShell::GetState_Impl(SfxItemSet &rSet)
case SID_SAVEACOPY:
{
- if( !( pImp->nLoadedFlags & SfxLoadedFlags::MAINDOCUMENT ) )
+ if( !( pImpl->nLoadedFlags & SfxLoadedFlags::MAINDOCUMENT ) )
{
rSet.DisableItem( nWhich );
break;
@@ -1099,7 +1099,7 @@ void SfxObjectShell::GetState_Impl(SfxItemSet &rSet)
case SID_MACRO_SIGNATURE:
{
// the slot makes sense only if there is a macro in the document
- if ( pImp->documentStorageHasMacros() || pImp->aMacroMode.hasMacroLibrary() )
+ if ( pImpl->documentStorageHasMacros() || pImpl->aMacroMode.hasMacroLibrary() )
rSet.Put( SfxUInt16Item( SID_MACRO_SIGNATURE, static_cast<sal_uInt16>(GetScriptingSignatureState()) ) );
else
rSet.DisableItem( nWhich );
@@ -1216,11 +1216,11 @@ void SfxObjectShell::StateProps_Impl(SfxItemSet &rSet)
}
case SID_DOC_LOADING:
- rSet.Put( SfxBoolItem( nSID, ! ( pImp->nLoadedFlags & SfxLoadedFlags::MAINDOCUMENT ) ) );
+ rSet.Put( SfxBoolItem( nSID, ! ( pImpl->nLoadedFlags & SfxLoadedFlags::MAINDOCUMENT ) ) );
break;
case SID_IMG_LOADING:
- rSet.Put( SfxBoolItem( nSID, ! ( pImp->nLoadedFlags & SfxLoadedFlags::IMAGES ) ) );
+ rSet.Put( SfxBoolItem( nSID, ! ( pImpl->nLoadedFlags & SfxLoadedFlags::IMAGES ) ) );
break;
}
}
@@ -1328,7 +1328,7 @@ uno::Sequence< security::DocumentSignatureInformation > SfxObjectShell::ImplAnal
SignatureState SfxObjectShell::ImplGetSignatureState( bool bScriptingContent )
{
- SignatureState* pState = bScriptingContent ? &pImp->nScriptingSignatureState : &pImp->nDocumentSignatureState;
+ SignatureState* pState = bScriptingContent ? &pImpl->nScriptingSignatureState : &pImpl->nDocumentSignatureState;
if ( *pState == SignatureState::UNKNOWN )
{
@@ -1367,7 +1367,7 @@ void SfxObjectShell::ImplSign( bool bScriptingContent )
// check whether the document is signed
ImplGetSignatureState(); // document signature
ImplGetSignatureState( true ); // script signature
- bool bHasSign = ( pImp->nScriptingSignatureState != SignatureState::NOSIGNATURES || pImp->nDocumentSignatureState != SignatureState::NOSIGNATURES );
+ bool bHasSign = ( pImpl->nScriptingSignatureState != SignatureState::NOSIGNATURES || pImpl->nDocumentSignatureState != SignatureState::NOSIGNATURES );
// the target ODF version on saving
SvtSaveOptions aSaveOpt;
@@ -1454,27 +1454,27 @@ void SfxObjectShell::ImplSign( bool bScriptingContent )
bool bSigned = GetMedium()->SignContents_Impl(
bScriptingContent,
aODFVersion,
- pImp->nDocumentSignatureState == SignatureState::OK
- || pImp->nDocumentSignatureState == SignatureState::NOTVALIDATED
- || pImp->nDocumentSignatureState == SignatureState::PARTIAL_OK);
+ pImpl->nDocumentSignatureState == SignatureState::OK
+ || pImpl->nDocumentSignatureState == SignatureState::NOTVALIDATED
+ || pImpl->nDocumentSignatureState == SignatureState::PARTIAL_OK);
- pImp->m_bSavingForSigning = true;
+ pImpl->m_bSavingForSigning = true;
DoSaveCompleted( GetMedium() );
- pImp->m_bSavingForSigning = false;
+ pImpl->m_bSavingForSigning = false;
if ( bSigned )
{
if ( bScriptingContent )
{
- pImp->nScriptingSignatureState = SignatureState::UNKNOWN;// Re-Check
+ pImpl->nScriptingSignatureState = SignatureState::UNKNOWN;// Re-Check
// adding of scripting signature removes existing document signature
- pImp->nDocumentSignatureState = SignatureState::UNKNOWN;// Re-Check
+ pImpl->nDocumentSignatureState = SignatureState::UNKNOWN;// Re-Check
}
else
- pImp->nDocumentSignatureState = SignatureState::UNKNOWN;// Re-Check
+ pImpl->nDocumentSignatureState = SignatureState::UNKNOWN;// Re-Check
- pImp->bSignatureErrorIsShown = false;
+ pImpl->bSignatureErrorIsShown = false;
Invalidate( SID_SIGNATURE );
Invalidate( SID_MACRO_SIGNATURE );
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index ab7319a..f19d863 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -427,8 +427,8 @@ void SfxObjectShell::SetupStorage( const uno::Reference< embed::XStorage >& xSto
void SfxObjectShell::PrepareSecondTryLoad_Impl()
{
// only for internal use
- pImp->m_xDocStorage.clear();
- pImp->m_bIsInit = false;
+ pImpl->m_xDocStorage.clear();
+ pImpl->m_bIsInit = false;
ResetError();
}
@@ -436,14 +436,14 @@ void SfxObjectShell::PrepareSecondTryLoad_Impl()
bool SfxObjectShell::GeneralInit_Impl( const uno::Reference< embed::XStorage >& xStorage,
bool bTypeMustBeSetAlready )
{
- if ( pImp->m_bIsInit )
+ if ( pImpl->m_bIsInit )
return false;
- pImp->m_bIsInit = true;
+ pImpl->m_bIsInit = true;
if ( xStorage.is() )
{
// no notification is required the storage is set the first time
- pImp->m_xDocStorage = xStorage;
+ pImpl->m_xDocStorage = xStorage;
try {
uno::Reference < beans::XPropertySet > xPropSet( xStorage, uno::UNO_QUERY_THROW );
@@ -466,7 +466,7 @@ bool SfxObjectShell::GeneralInit_Impl( const uno::Reference< embed::XStorage >&
}
}
else
- pImp->m_bCreateTempStor = true;
+ pImpl->m_bCreateTempStor = true;
return true;
}
@@ -522,7 +522,7 @@ bool SfxObjectShell::DoInitNew( SfxMedium* pMed )
if ( InitNew( pMed ? pMed->GetStorage() : uno::Reference < embed::XStorage >() ) )
{
// empty documents always get their macros from the user, so there is no reason to restrict access
- pImp->aMacroMode.allowMacroExecution();
+ pImpl->aMacroMode.allowMacroExecution();
if ( SfxObjectCreateMode::EMBEDDED == eCreateMode )
SetTitle(SfxResId(STR_NONAME).toString());
@@ -594,8 +594,8 @@ bool SfxObjectShell::ImportFromGeneratedStream_Impl(
{
// allow the subfilter to reinit the model
- if ( pImp->m_bIsInit )
- pImp->m_bIsInit = false;
+ if ( pImpl->m_bIsInit )
+ pImpl->m_bIsInit = false;
if ( LoadOwnFormat( *pMedium ) )
{
@@ -604,7 +604,7 @@ bool SfxObjectShell::ImportFromGeneratedStream_Impl(
SetReadOnlyUI();
bResult = true;
- OSL_ENSURE( pImp->m_xDocStorage == xStorage, "Wrong storage is used!\n" );
+ OSL_ENSURE( pImpl->m_xDocStorage == xStorage, "Wrong storage is used!\n" );
}
}
@@ -630,7 +630,7 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed )
bool bOk = false;
std::shared_ptr<const SfxFilter> pFilter = pMed->GetFilter();
SfxItemSet* pSet = pMedium->GetItemSet();
- if( !pImp->nEventId )
+ if( !pImpl->nEventId )
{
const SfxBoolItem* pTemplateItem = SfxItemSet::GetItem<SfxBoolItem>(pSet, SID_TEMPLATE, false);
SetActivateEvent_Impl(
@@ -655,8 +655,8 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed )
}
pMed->GetItemSet()->Put( SfxStringItem( SID_DOC_BASEURL, aBaseURL ) );
- pImp->nLoadedFlags = SfxLoadedFlags::NONE;
- pImp->bModelInitialized = false;
+ pImpl->nLoadedFlags = SfxLoadedFlags::NONE;
+ pImpl->bModelInitialized = false;
//TODO/LATER: make a clear strategy how to handle "UsesStorage" etc.
bool bOwnStorageFormat = IsOwnStorageFormat_Impl( *pMedium );
@@ -716,8 +716,8 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed )
// Load
if ( !GetError() )
{
- pImp->nLoadedFlags = SfxLoadedFlags::NONE;
- pImp->bModelInitialized = false;
+ pImpl->nLoadedFlags = SfxLoadedFlags::NONE;
+ pImpl->bModelInitialized = false;
bOk = xStorage.is() && LoadOwnFormat( *pMed );
if ( bOk )
{
@@ -746,8 +746,8 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed )
if ( GetError() == ERRCODE_NONE )
{
- pImp->nLoadedFlags = SfxLoadedFlags::NONE;
- pImp->bModelInitialized = false;
+ pImpl->nLoadedFlags = SfxLoadedFlags::NONE;
+ pImpl->bModelInitialized = false;
if ( pMedium->GetFilter() && ( pMedium->GetFilter()->GetFilterFlags() & SfxFilterFlags::STARONEFILTER ) )
{
uno::Reference < beans::XPropertySet > xSet( GetModel(), uno::UNO_QUERY );
@@ -830,7 +830,7 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed )
}
// If not loaded asynchronously call FinishedLoading
- if ( !( pImp->nLoadedFlags & SfxLoadedFlags::MAINDOCUMENT ) &&
+ if ( !( pImpl->nLoadedFlags & SfxLoadedFlags::MAINDOCUMENT ) &&
( !pMedium->GetFilter() || pMedium->GetFilter()->UsesStorage() )
)
FinishedLoading( SfxLoadedFlags::MAINDOCUMENT );
@@ -998,7 +998,7 @@ bool SfxObjectShell::DoSave()
{
ModifyBlocker_Impl aBlock( this );
- pImp->bIsSaving = true;
+ pImpl->bIsSaving = true;
uno::Sequence< beans::NamedValue > aEncryptionData;
if ( IsPackageStorageFormat_Impl( *GetMedium() ) )
@@ -1043,13 +1043,13 @@ bool SfxObjectShell::DoSave()
GetBasicManager();
// disconnect from the current storage
- pImp->aBasicManager.setStorage( xTmpStorage );
+ pImpl->aBasicManager.setStorage( xTmpStorage );
// store to the current storage
- pImp->aBasicManager.storeLibrariesToStorage( GetMedium()->GetStorage() );
+ pImpl->aBasicManager.storeLibrariesToStorage( GetMedium()->GetStorage() );
// connect to the current storage back
- pImp->aBasicManager.setStorage( GetMedium()->GetStorage() );
+ pImpl->aBasicManager.setStorage( GetMedium()->GetStorage() );
}
catch( uno::Exception& )
{
@@ -1139,16 +1139,16 @@ bool SfxObjectShell::SaveTo_Impl
// no way to detect whether a filter is oasis format, have to wait for saving process
bool bNoPreserveForOasis = false;
if ( bOwnSource && bOwnTarget
- && ( pImp->nScriptingSignatureState == SignatureState::OK
- || pImp->nScriptingSignatureState == SignatureState::NOTVALIDATED
- || pImp->nScriptingSignatureState == SignatureState::INVALID ) )
+ && ( pImpl->nScriptingSignatureState == SignatureState::OK
+ || pImpl->nScriptingSignatureState == SignatureState::NOTVALIDATED
+ || pImpl->nScriptingSignatureState == SignatureState::INVALID ) )
{
AddLog( OSL_LOG_PREFIX "MacroSignaturePreserving" );
// 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 = true; // !pImp->pBasicManager->isAnyContainerModified();
+ bTryToPreserveScriptSignature = true; // !pImpl->pBasicManager->isAnyContainerModified();
if ( bTryToPreserveScriptSignature )
{
// check that the storage format stays the same
@@ -1363,8 +1363,8 @@ bool SfxObjectShell::SaveTo_Impl
if( rMedium.GetErrorCode() || pMedium->GetErrorCode() || GetErrorCode() )
return false;
- bool bOldStat = pImp->bForbidReload;
- pImp->bForbidReload = true;
+ bool bOldStat = pImpl->bForbidReload;
+ pImpl->bForbidReload = true;
// lock user interface while saving the document
Lock_Impl( this, true );
@@ -1379,7 +1379,7 @@ bool SfxObjectShell::SaveTo_Impl
{
// no saving without storage, unlock UI and return
Lock_Impl( this, false );
- pImp->bForbidReload = bOldStat;
+ pImpl->bForbidReload = bOldStat;
AddLog( OSL_LOG_PREFIX "Storing failed, still no error set." );
return false;
}
@@ -1451,7 +1451,7 @@ bool SfxObjectShell::SaveTo_Impl
if ( bOk )
{
- if ( pImp->bIsSaving || pImp->bPreserveVersions )
+ if ( pImpl->bIsSaving || pImpl->bPreserveVersions )
{
AddLog( OSL_LOG_PREFIX "Preserve versions." );
try
@@ -1523,7 +1523,7 @@ bool SfxObjectShell::SaveTo_Impl
bOk = PutURLContentsToVersionStream_Impl( aTmpVersionURL, xMedStorage, aInfo.Identifier );
}
}
- else if ( bOk && ( pImp->bIsSaving || pImp->bPreserveVersions ) )
+ else if ( bOk && ( pImpl->bIsSaving || pImpl->bPreserveVersions ) )
{
rMedium.SaveVersionList_Impl();
}
@@ -1670,7 +1670,7 @@ bool SfxObjectShell::SaveTo_Impl
// if the old medium already disconnected from document storage, the storage still must
// be switched if backup file is used
if ( bNeedsDisconnectionOnFail )
- ConnectTmpStorage_Impl( pImp->m_xDocStorage, nullptr );
+ ConnectTmpStorage_Impl( pImpl->m_xDocStorage, nullptr );
}
else if (!pMedium->GetName().isEmpty()
|| ( pMedium->HasStorage_Impl() && pMedium->WillDisposeStorageOnClose_Impl() ) )
@@ -1691,13 +1691,13 @@ bool SfxObjectShell::SaveTo_Impl
// in case the document storage was connected to backup temporarely it must be disconnected now
if ( bNeedsDisconnectionOnFail )
- ConnectTmpStorage_Impl( pImp->m_xDocStorage, nullptr );
+ ConnectTmpStorage_Impl( pImpl->m_xDocStorage, nullptr );
}
}
// unlock user interface
Lock_Impl( this, false );
- pImp->bForbidReload = bOldStat;
+ pImpl->bForbidReload = bOldStat;
if ( bOk )
{
@@ -1752,7 +1752,7 @@ bool SfxObjectShell::DisconnectStorage_Impl( SfxMedium& rSrcMedium, SfxMedium& r
uno::Reference< embed::XStorage > xStorage = rSrcMedium.GetStorage();
bool bResult = false;
- if ( xStorage == pImp->m_xDocStorage )
+ if ( xStorage == pImpl->m_xDocStorage )
{
try
{
@@ -1843,19 +1843,19 @@ bool SfxObjectShell::ConnectTmpStorage_Impl(
if ( bResult )
{
- pImp->aBasicManager.setStorage( xTmpStorage );
+ pImpl->aBasicManager.setStorage( xTmpStorage );
// Get rid of this workaround after issue i113914 is fixed
try
{
- uno::Reference< script::XStorageBasedLibraryContainer > xBasicLibraries( pImp->xBasicLibraries, uno::UNO_QUERY_THROW );
+ uno::Reference< script::XStorageBasedLibraryContainer > xBasicLibraries( pImpl->xBasicLibraries, uno::UNO_QUERY_THROW );
xBasicLibraries->setRootStorage( xTmpStorage );
}
catch( uno::Exception& )
{}
try
{
- uno::Reference< script::XStorageBasedLibraryContainer > xDialogLibraries( pImp->xDialogLibraries, uno::UNO_QUERY_THROW );
+ uno::Reference< script::XStorageBasedLibraryContainer > xDialogLibraries( pImpl->xDialogLibraries, uno::UNO_QUERY_THROW );
xDialogLibraries->setRootStorage( xTmpStorage );
}
catch( uno::Exception& )
@@ -1898,7 +1898,7 @@ bool SfxObjectShell::DoSaveObjectAs( SfxMedium& rMedium, bool bCommit )
SetupStorage( xNewStor, SOFFICE_FILEFORMAT_CURRENT, false );
}
- pImp->bIsSaving = false;
+ pImpl->bIsSaving = false;
bOk = SaveAsOwnFormat( rMedium );
if ( bCommit )
@@ -1927,7 +1927,7 @@ bool SfxObjectShell::DoSaveAs( SfxMedium& rMedium )
return false;
// copy version list from "old" medium to target medium, so it can be used on saving
- if ( pImp->bPreserveVersions )
+ if ( pImpl->bPreserveVersions )
rMedium.TransferVersionList_Impl( *pMedium );
bool bRet = SaveTo_Impl( rMedium, nullptr );
@@ -1992,8 +1992,8 @@ bool SfxObjectShell::DoSaveCompleted( SfxMedium* pNewMed, bool bRegisterRecent )
}
else
{
- if (pImp->m_bSavingForSigning && pFilter && pFilter->GetSupportsSigning())
- // So that pMedium->pImp->xStream becomes a non-empty
+ if (pImpl->m_bSavingForSigning && pFilter && pFilter->GetSupportsSigning())
+ // So that pMedium->pImpl->xStream becomes a non-empty
// reference, and at the end we attempt locking again in
// SfxMedium::LockOrigFileOnDemand().
pMedium->GetMedium_Impl();
@@ -2005,19 +2005,19 @@ bool SfxObjectShell::DoSaveCompleted( SfxMedium* pNewMed, bool bRegisterRecent )
// TODO/LATER: may be this code will be replaced, but not sure
// Set storage in document library containers
- pImp->aBasicManager.setStorage( xStorage );
+ pImpl->aBasicManager.setStorage( xStorage );
// Get rid of this workaround after issue i113914 is fixed
try
{
- uno::Reference< script::XStorageBasedLibraryContainer > xBasicLibraries( pImp->xBasicLibraries, uno::UNO_QUERY_THROW );
+ uno::Reference< script::XStorageBasedLibraryContainer > xBasicLibraries( pImpl->xBasicLibraries, uno::UNO_QUERY_THROW );
xBasicLibraries->setRootStorage( xStorage );
}
catch( uno::Exception& )
{}
try
{
- uno::Reference< script::XStorageBasedLibraryContainer > xDialogLibraries( pImp->xDialogLibraries, uno::UNO_QUERY_THROW );
+ uno::Reference< script::XStorageBasedLibraryContainer > xDialogLibraries( pImpl->xDialogLibraries, uno::UNO_QUERY_THROW );
xDialogLibraries->setRootStorage( xStorage );
}
catch( uno::Exception& )
@@ -2061,10 +2061,10 @@ bool SfxObjectShell::DoSaveCompleted( SfxMedium* pNewMed, bool bRegisterRecent )
}
// before the title regenerated the document must lose the signatures
- pImp->nDocumentSignatureState = SignatureState::NOSIGNATURES;
- pImp->nScriptingSignatureState = pNewMed->GetCachedSignatureState_Impl();
- OSL_ENSURE( pImp->nScriptingSignatureState != SignatureState::BROKEN, "The signature must not be broken at this place" );
- pImp->bSignatureErrorIsShown = false;
+ pImpl->nDocumentSignatureState = SignatureState::NOSIGNATURES;
+ pImpl->nScriptingSignatureState = pNewMed->GetCachedSignatureState_Impl();
+ OSL_ENSURE( pImpl->nScriptingSignatureState != SignatureState::BROKEN, "The signature must not be broken at this place" );
+ pImpl->bSignatureErrorIsShown = false;
// TODO/LATER: in future the medium must control own signature state, not the document
pNewMed->SetCachedSignatureState_Impl( SignatureState::NOSIGNATURES ); // set the default value back
@@ -2574,7 +2574,7 @@ bool SfxObjectShell::Save_Impl( const SfxItemSet* pSet )
}
- pImp->bIsSaving = true;
+ pImpl->bIsSaving = true;
bool bSaved = false;
const SfxStringItem* pSalvageItem = SfxItemSet::GetItem<SfxStringItem>(GetMedium()->GetItemSet(), SID_DOC_SALVAGE, false);
if ( pSalvageItem )
@@ -2657,7 +2657,7 @@ bool SfxObjectShell::CommonSaveAs_Impl(const INetURLObject& aURL, const OUString
}
rItemSet.ClearItem( SID_COPY_STREAM_IF_POSSIBLE );
- pImp->bPasswd = SfxItemState::SET == rItemSet.GetItemState(SID_PASSWORD);
+ pImpl->bPasswd = SfxItemState::SET == rItemSet.GetItemState(SID_PASSWORD);
SfxMedium *pActMed = GetMedium();
const INetURLObject aActName(pActMed->GetName());
@@ -2800,10 +2800,10 @@ bool SfxObjectShell::PreDoSaveAs_Impl(const OUString& rFileName, const OUString&
bool bCopyTo = GetCreateMode() == SfxObjectCreateMode::EMBEDDED || (pSaveToItem && pSaveToItem->GetValue());
// distinguish between "Save" and "SaveAs"
- pImp->bIsSaving = false;
+ pImpl->bIsSaving = false;
// copy version list from "old" medium to target medium, so it can be used on saving
- if ( pImp->bPreserveVersions )
+ if ( pImpl->bPreserveVersions )
pNewFile->TransferVersionList_Impl( *pMedium );
// Save the document ( first as temporary file, then transfer to the target URL by committing the medium )
@@ -2910,7 +2910,7 @@ bool SfxObjectShell::CanReload_Impl()
*/
{
- return pMedium && HasName() && !IsInModalMode() && !pImp->bForbidReload;
+ return pMedium && HasName() && !IsInModalMode() && !pImpl->bForbidReload;
}
@@ -3070,7 +3070,7 @@ bool SfxObjectShell::SaveAsOwnFormat( SfxMedium& rMedium )
GetBasicManager();
// Save dialog/script container
- pImp->aBasicManager.storeLibrariesToStorage( xStorage );
+ pImpl->aBasicManager.storeLibrariesToStorage( xStorage );
}
#endif
return SaveAs( rMedium );
@@ -3080,16 +3080,16 @@ bool SfxObjectShell::SaveAsOwnFormat( SfxMedium& rMedium )
uno::Reference< embed::XStorage > SfxObjectShell::GetStorage()
{
- if ( !pImp->m_xDocStorage.is() )
+ if ( !pImpl->m_xDocStorage.is() )
{
- OSL_ENSURE( pImp->m_bCreateTempStor, "The storage must exist already!\n" );
+ OSL_ENSURE( pImpl->m_bCreateTempStor, "The storage must exist already!\n" );
try {
// no notification is required the storage is set the first time
- pImp->m_xDocStorage = ::comphelper::OStorageHelper::GetTemporaryStorage();
- OSL_ENSURE( pImp->m_xDocStorage.is(), "The method must either return storage or throw an exception!" );
+ pImpl->m_xDocStorage = ::comphelper::OStorageHelper::GetTemporaryStorage();
+ OSL_ENSURE( pImpl->m_xDocStorage.is(), "The method must either return storage or throw an exception!" );
- SetupStorage( pImp->m_xDocStorage, SOFFICE_FILEFORMAT_CURRENT, false );
- pImp->m_bCreateTempStor = false;
+ SetupStorage( pImpl->m_xDocStorage, SOFFICE_FILEFORMAT_CURRENT, false );
+ pImpl->m_bCreateTempStor = false;
if (!utl::ConfigManager::IsAvoidConfig())
SfxGetpApp()->NotifyEvent( SfxEventHint( SFX_EVENT_STORAGECHANGED, GlobalEventConfig::GetEventName(GlobalEventId::STORAGECHANGED), this ) );
}
@@ -3100,15 +3100,15 @@ uno::Reference< embed::XStorage > SfxObjectShell::GetStorage()
}
}
- OSL_ENSURE( pImp->m_xDocStorage.is(), "The document storage must be created!" );
- return pImp->m_xDocStorage;
+ OSL_ENSURE( pImpl->m_xDocStorage.is(), "The document storage must be created!" );
+ return pImpl->m_xDocStorage;
}
bool SfxObjectShell::SaveChildren( bool bObjectsOnly )
{
bool bResult = true;
- if ( pImp->mpObjectContainer )
+ if ( pImpl->mpObjectContainer )
{
bool bOasis = ( SotStorage::GetVersion( GetStorage() ) > SOFFICE_FILEFORMAT_60 );
GetEmbeddedObjectContainer().StoreChildren(bOasis,bObjectsOnly);
@@ -3128,7 +3128,7 @@ bool SfxObjectShell::SaveAsChildren( SfxMedium& rMedium )
if ( xStorage == GetStorage() )
return SaveChildren();
- if ( pImp->mpObjectContainer )
+ if ( pImpl->mpObjectContainer )
{
bool bOasis = ( SotStorage::GetVersion( xStorage ) > SOFFICE_FILEFORMAT_60 );
GetEmbeddedObjectContainer().StoreAsChildren(bOasis,SfxObjectCreateMode::EMBEDDED == eCreateMode,xStorage);
@@ -3144,7 +3144,7 @@ bool SfxObjectShell::SaveCompletedChildren()
{
bool bResult = true;
- if ( pImp->mpObjectContainer )
+ if ( pImpl->mpObjectContainer )
{
uno::Sequence < OUString > aNames = GetEmbeddedObjectContainer().GetObjectNames();
for ( sal_Int32 n=0; n<aNames.getLength(); n++ )
@@ -3185,8 +3185,8 @@ bool SfxObjectShell::SwitchChildrenPersistance( const uno::Reference< embed::XSt
bool bResult = true;
- if ( pImp->mpObjectContainer )
- pImp->mpObjectContainer->SetPersistentEntries(xStorage,bForceNonModified);
+ if ( pImpl->mpObjectContainer )
+ pImpl->mpObjectContainer->SetPersistentEntries(xStorage,bForceNonModified);
return bResult;
}
@@ -3199,7 +3199,7 @@ bool SfxObjectShell::SaveCompleted( const uno::Reference< embed::XStorage >& xSt
uno::Reference< embed::XStorage > xOldStorageHolder;
// check for wrong creation of object container
- bool bHasContainer = ( pImp->mpObjectContainer != nullptr );
+ bool bHasContainer = ( pImpl->mpObjectContainer != nullptr );
if ( !xStorage.is() || xStorage == GetStorage() )
{
@@ -3208,7 +3208,7 @@ bool SfxObjectShell::SaveCompleted( const uno::Reference< embed::XStorage >& xSt
}
else
{
- if ( pImp->mpObjectContainer )
+ if ( pImpl->mpObjectContainer )
GetEmbeddedObjectContainer().SwitchPersistence( xStorage );
bResult = SwitchChildrenPersistance( xStorage, true );
@@ -3216,13 +3216,13 @@ bool SfxObjectShell::SaveCompleted( const uno::Reference< embed::XStorage >& xSt
if ( bResult )
{
- if ( xStorage.is() && pImp->m_xDocStorage != xStorage )
+ if ( xStorage.is() && pImpl->m_xDocStorage != xStorage )
{
// make sure that until the storage is assigned the object
// container is not created by accident!
- DBG_ASSERT( bHasContainer == (pImp->mpObjectContainer != nullptr), "Wrong storage in object container!" );
- xOldStorageHolder = pImp->m_xDocStorage;
- pImp->m_xDocStorage = xStorage;
+ DBG_ASSERT( bHasContainer == (pImpl->mpObjectContainer != nullptr), "Wrong storage in object container!" );
+ xOldStorageHolder = pImpl->m_xDocStorage;
+ pImpl->m_xDocStorage = xStorage;
bSendNotification = true;
if ( IsEnableSetModified() )
@@ -3231,11 +3231,11 @@ bool SfxObjectShell::SaveCompleted( const uno::Reference< embed::XStorage >& xSt
}
else
{
- if ( pImp->mpObjectContainer )
- GetEmbeddedObjectContainer().SwitchPersistence( pImp->m_xDocStorage );
+ if ( pImpl->mpObjectContainer )
+ GetEmbeddedObjectContainer().SwitchPersistence( pImpl->m_xDocStorage );
// let already successfully connected objects be switched back
- SwitchChildrenPersistance( pImp->m_xDocStorage, true );
+ SwitchChildrenPersistance( pImpl->m_xDocStorage, true );
}
if ( bSendNotification )
@@ -3342,23 +3342,23 @@ bool SfxObjectShell::SwitchPersistance( const uno::Reference< embed::XStorage >&
{
bool bResult = false;
// check for wrong creation of object container
- bool bHasContainer = ( pImp->mpObjectContainer != nullptr );
+ bool bHasContainer = ( pImpl->mpObjectContainer != nullptr );
if ( xStorage.is() )
{
- if ( pImp->mpObjectContainer )
+ if ( pImpl->mpObjectContainer )
GetEmbeddedObjectContainer().SwitchPersistence( xStorage );
bResult = SwitchChildrenPersistance( xStorage );
// TODO/LATER: substorages that have unknown mimetypes probably should be copied to the target storage here
- OSL_ENSURE( StoragesOfUnknownMediaTypeAreCopied_Impl( pImp->m_xDocStorage, xStorage ),
+ OSL_ENSURE( StoragesOfUnknownMediaTypeAreCopied_Impl( pImpl->m_xDocStorage, xStorage ),
"Some of substorages with unknown mimetypes is lost!" );
}
if ( bResult )
{
// make sure that until the storage is assigned the object container is not created by accident!
- DBG_ASSERT( bHasContainer == (pImp->mpObjectContainer != nullptr), "Wrong storage in object container!" );
- if ( pImp->m_xDocStorage != xStorage )
+ DBG_ASSERT( bHasContainer == (pImpl->mpObjectContainer != nullptr), "Wrong storage in object container!" );
+ if ( pImpl->m_xDocStorage != xStorage )
DoSaveCompleted( new SfxMedium( xStorage, GetMedium()->GetBaseURL() ) );
if ( IsEnableSetModified() )
@@ -3576,12 +3576,12 @@ void SfxObjectShell::CheckConfigOptions()
bool SfxObjectShell::IsConfigOptionsChecked() const
{
- return pImp->m_bConfigOptionsChecked;
+ return pImpl->m_bConfigOptionsChecked;
}
void SfxObjectShell::SetConfigOptionsChecked( bool bChecked )
{
- pImp->m_bConfigOptionsChecked = bChecked;
+ pImpl->m_bConfigOptionsChecked = bChecked;
}
bool SfxObjectShell::QuerySaveSizeExceededModules_Impl( const uno::Reference< task::XInteractionHandler >& xHandler )
@@ -3592,12 +3592,12 @@ bool SfxObjectShell::QuerySaveSizeExceededModules_Impl( const uno::Reference< ta
if ( !HasBasic() )
return true;
- if ( !pImp->aBasicManager.isValid() )
+ if ( !pImpl->aBasicManager.isValid() )
GetBasicManager();
std::vector< OUString > sModules;
if ( xHandler.is() )
{
- if( pImp->aBasicManager.LegacyPsswdBinaryLimitExceeded( sModules ) )
+ if( pImpl->aBasicManager.LegacyPsswdBinaryLimitExceeded( sModules ) )
{
ModuleSizeExceeded* pReq = new ModuleSizeExceeded( sModules );
uno::Reference< task::XInteractionRequest > xReq( pReq );
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index 0d4fb14..1a76d62 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -277,7 +277,7 @@ SfxObjectShell_Impl::~SfxObjectShell_Impl()
SfxObjectShell::SfxObjectShell( const SfxModelFlags i_nCreationFlags )
- : pImp(new SfxObjectShell_Impl(*this))
+ : pImpl(new SfxObjectShell_Impl(*this))
, pMedium(nullptr)
, eCreateMode(SfxObjectCreateMode::STANDARD)
, bHasName(false)
@@ -295,7 +295,7 @@ SfxObjectShell::SfxObjectShell( const SfxModelFlags i_nCreationFlags )
const bool bDocRecovery = ( i_nCreationFlags & SfxModelFlags::DISABLE_DOCUMENT_RECOVERY ) == SfxModelFlags::NONE;
if ( !bDocRecovery )
- pImp->m_bDocRecoverySupport = false;
+ pImpl->m_bDocRecoverySupport = false;
}
/** Constructor of the class SfxObjectShell.
@@ -307,7 +307,7 @@ SfxObjectShell::SfxObjectShell( const SfxModelFlags i_nCreationFlags )
SfxObjectCreateMode::ORGANIZER to be displayed in the Organizer, here nothing of the contents is used
*/
SfxObjectShell::SfxObjectShell(SfxObjectCreateMode eMode)
- : pImp(new SfxObjectShell_Impl(*this))
+ : pImpl(new SfxObjectShell_Impl(*this))
, pMedium(nullptr)
, eCreateMode(eMode)
, bHasName(false)
@@ -325,34 +325,34 @@ SfxObjectShell::~SfxObjectShell()
// Never call GetInPlaceObject(), the access to the derivative branch
// SfxInternObject is not allowed because of a compiler bug
SfxObjectShell::CloseInternal();
- pImp->pBaseModel.set( nullptr );
+ pImpl->pBaseModel.set( nullptr );
- DELETEX(AutoReloadTimer_Impl, pImp->pReloadTimer );
+ DELETEX(AutoReloadTimer_Impl, pImpl->pReloadTimer );
SfxApplication *pSfxApp = SfxGetpApp();
- if ( USHRT_MAX != pImp->nVisualDocumentNumber )
- pSfxApp->ReleaseIndex(pImp->nVisualDocumentNumber);
+ if ( USHRT_MAX != pImpl->nVisualDocumentNumber )
+ pSfxApp->ReleaseIndex(pImpl->nVisualDocumentNumber);
// Destroy Basic-Manager
- pImp->aBasicManager.reset( nullptr );
+ pImpl->aBasicManager.reset( nullptr );
if ( pSfxApp->GetDdeService() )
pSfxApp->RemoveDdeTopic( this );
- pImp->pBaseModel.set( nullptr );
+ pImpl->pBaseModel.set( nullptr );
// don't call GetStorage() here, in case of Load Failure it's possible that a storage was never assigned!
- if ( pMedium && pMedium->HasStorage_Impl() && pMedium->GetStorage( false ) == pImp->m_xDocStorage )
+ if ( pMedium && pMedium->HasStorage_Impl() && pMedium->GetStorage( false ) == pImpl->m_xDocStorage )
pMedium->CanDisposeStorage_Impl( false );
- if ( pImp->mpObjectContainer )
+ if ( pImpl->mpObjectContainer )
{
- pImp->mpObjectContainer->CloseEmbeddedObjects();
- delete pImp->mpObjectContainer;
+ pImpl->mpObjectContainer->CloseEmbeddedObjects();
+ delete pImpl->mpObjectContainer;
}
- if ( pImp->bOwnsStorage && pImp->m_xDocStorage.is() )
- pImp->m_xDocStorage->dispose();
+ if ( pImpl->bOwnsStorage && pImpl->m_xDocStorage.is() )
+ pImpl->m_xDocStorage->dispose();
if ( pMedium )
{
@@ -366,26 +366,24 @@ SfxObjectShell::~SfxObjectShell()
}
// The removing of the temporary file must be done as the latest step in the document destruction
- if ( !pImp->aTempName.isEmpty() )
+ if ( !pImpl->aTempName.isEmpty() )
{
OUString aTmp;
- osl::FileBase::getFileURLFromSystemPath( pImp->aTempName, aTmp );
+ osl::FileBase::getFileURLFromSystemPath( pImpl->aTempName, aTmp );
::utl::UCBContentHelper::Kill( aTmp );
}
-
- delete pImp;
}
void SfxObjectShell::Stamp_SetPrintCancelState(bool bState)
{
- pImp->bIsPrintJobCancelable = bState;
+ pImpl->bIsPrintJobCancelable = bState;
}
bool SfxObjectShell::Stamp_GetPrintCancelState() const
{
- return pImp->bIsPrintJobCancelable;
+ return pImpl->bIsPrintJobCancelable;
}
@@ -400,13 +398,13 @@ bool SfxObjectShell::Close()
// variant that does not take a reference to itself, so we can call it during object destruction
bool SfxObjectShell::CloseInternal()
{
- if ( !pImp->bClosing )
+ if ( !pImpl->bClosing )
{
// Do not close if a progress is still running
- if ( !pImp->bDisposing && GetProgress() )
+ if ( !pImpl->bDisposing && GetProgress() )
return false;
- pImp->bClosing = true;
+ pImpl->bClosing = true;
Reference< util::XCloseable > xCloseable( GetBaseModel(), UNO_QUERY );
if ( xCloseable.is() )
@@ -417,11 +415,11 @@ bool SfxObjectShell::CloseInternal()
}
catch (const Exception&)
{
- pImp->bClosing = false;
+ pImpl->bClosing = false;
}
}
- if ( pImp->bClosing )
+ if ( pImpl->bClosing )
{
// remove from Document list
// If there is no App, there is no document to remove
@@ -433,7 +431,7 @@ bool SfxObjectShell::CloseInternal()
SfxObjectShellArr_Impl::iterator it = std::find( rDocs.begin(), rDocs.end(), this );
if ( it != rDocs.end() )
rDocs.erase( it );
- pImp->bInList = false;
+ pImpl->bInList = false;
}
}
}
@@ -526,16 +524,16 @@ SfxObjectShell* SfxObjectShell::Current()
bool SfxObjectShell::IsInPrepareClose() const
{
- return pImp->bInPrepareClose;
+ return pImpl->bInPrepareClose;
}
struct BoolEnv_Impl
{
- SfxObjectShell_Impl* pImp;
- explicit BoolEnv_Impl( SfxObjectShell_Impl* pImpP) : pImp( pImpP )
- { pImpP->bInPrepareClose = true; }
- ~BoolEnv_Impl() { pImp->bInPrepareClose = false; }
+ SfxObjectShell_Impl* pImpl;
+ explicit BoolEnv_Impl( SfxObjectShell_Impl* pImplP) : pImpl( pImplP )
+ { pImplP->bInPrepareClose = true; }
+ ~BoolEnv_Impl() { pImpl->bInPrepareClose = false; }
};
@@ -545,9 +543,9 @@ bool SfxObjectShell::PrepareClose
// false: silent-mode
)
{
- if( pImp->bInPrepareClose || pImp->bPreparedForClose )
+ if( pImpl->bInPrepareClose || pImpl->bPreparedForClose )
return true;
- BoolEnv_Impl aBoolEnv( pImp );
+ BoolEnv_Impl aBoolEnv( pImpl.get() );
// DocModalDialog?
if ( IsInModalMode() )
@@ -575,7 +573,7 @@ bool SfxObjectShell::PrepareClose
if( GetCreateMode() == SfxObjectCreateMode::EMBEDDED )
{
- pImp->bPreparedForClose = true;
+ pImpl->bPreparedForClose = true;
return true;
}
@@ -594,7 +592,7 @@ bool SfxObjectShell::PrepareClose
// Ask if to save
short nRet = RET_YES;
{
- const Reference< XTitle > xTitle( *pImp->pBaseModel.get(), UNO_QUERY_THROW );
+ const Reference< XTitle > xTitle( *pImpl->pBaseModel.get(), UNO_QUERY_THROW );
const OUString sTitle = xTitle->getTitle ();
nRet = ExecuteQuerySaveDocument(&pFrame->GetWindow(),sTitle);
}
@@ -626,7 +624,7 @@ bool SfxObjectShell::PrepareClose
return false;
}
- pImp->bPreparedForClose = true;
+ pImpl->bPreparedForClose = true;
return true;
}
@@ -687,7 +685,7 @@ BasicManager* SfxObjectShell::GetBasicManager() const
void SfxObjectShell::SetHasNoBasic()
{
- pImp->m_bNoBasicCapabilities = true;
+ pImpl->m_bNoBasicCapabilities = true;
}
bool SfxObjectShell::HasBasic() const
@@ -695,13 +693,13 @@ bool SfxObjectShell::HasBasic() const
#if !HAVE_FEATURE_SCRIPTING
return false;
#else
- if ( pImp->m_bNoBasicCapabilities )
+ if ( pImpl->m_bNoBasicCapabilities )
return false;
- if ( !pImp->bBasicInitialized )
+ if ( !pImpl->bBasicInitialized )
const_cast< SfxObjectShell* >( this )->InitBasicManager_Impl();
- return pImp->aBasicManager.isValid();
+ return pImpl->aBasicManager.isValid();
#endif
}
@@ -742,8 +740,8 @@ Reference< XLibraryContainer > SfxObjectShell::GetDialogContainer()
#if HAVE_FEATURE_SCRIPTING
try
{
- if ( !pImp->m_bNoBasicCapabilities )
- return lcl_getOrCreateLibraryContainer( false, pImp->xDialogLibraries, GetModel() );
+ if ( !pImpl->m_bNoBasicCapabilities )
+ return lcl_getOrCreateLibraryContainer( false, pImpl->xDialogLibraries, GetModel() );
BasicManager* pBasMgr = lcl_getBasicManagerForDocument( *this );
if ( pBasMgr )
@@ -766,8 +764,8 @@ Reference< XLibraryContainer > SfxObjectShell::GetBasicContainer()
{
try
{
- if ( !pImp->m_bNoBasicCapabilities )
- return lcl_getOrCreateLibraryContainer( true, pImp->xBasicLibraries, GetModel() );
+ if ( !pImpl->m_bNoBasicCapabilities )
+ return lcl_getOrCreateLibraryContainer( true, pImpl->xBasicLibraries, GetModel() );
BasicManager* pBasMgr = lcl_getBasicManagerForDocument( *this );
if ( pBasMgr )
@@ -822,7 +820,7 @@ void SfxObjectShell::InitBasicManager_Impl()
changed to return the Basic manager currently under construction, when
called repeatedly.
- The variable pImp->bBasicInitialized will be set to sal_True after
+ The variable pImpl->bBasicInitialized will be set to sal_True after
construction now, to ensure that the recursive call of the function
lcl_getBasicManagerForDocument() will be routed into this function too.
@@ -831,17 +829,17 @@ void SfxObjectShell::InitBasicManager_Impl()
Basic managers is the global BasicManagerRepository instance.
*/
#if HAVE_FEATURE_SCRIPTING
- DBG_ASSERT( !pImp->bBasicInitialized && !pImp->aBasicManager.isValid(), "Lokaler BasicManager bereits vorhanden");
+ DBG_ASSERT( !pImpl->bBasicInitialized && !pImpl->aBasicManager.isValid(), "Lokaler BasicManager bereits vorhanden");
try
{
- pImp->aBasicManager.reset( BasicManagerRepository::getDocumentBasicManager( GetModel() ) );
+ pImpl->aBasicManager.reset( BasicManagerRepository::getDocumentBasicManager( GetModel() ) );
}
catch (const css::ucb::ContentCreationException& e)
{
SAL_WARN("sfx.doc", "caught exception " << e.Message);
}
- DBG_ASSERT( pImp->aBasicManager.isValid(), "SfxObjectShell::InitBasicManager_Impl: did not get a BasicManager!" );
- pImp->bBasicInitialized = true;
+ DBG_ASSERT( pImpl->aBasicManager.isValid(), "SfxObjectShell::InitBasicManager_Impl: did not get a BasicManager!" );
+ pImpl->bBasicInitialized = true;
#endif
}
@@ -883,28 +881,28 @@ css::uno::Reference< css::frame::XModel > SfxObjectShell::GetModel() const
void SfxObjectShell::SetBaseModel( SfxBaseModel* pModel )
{
- OSL_ENSURE( !pImp->pBaseModel.is() || pModel == nullptr, "Model already set!" );
- pImp->pBaseModel.set( pModel );
- if ( pImp->pBaseModel.is() )
+ OSL_ENSURE( !pImpl->pBaseModel.is() || pModel == nullptr, "Model already set!" );
+ pImpl->pBaseModel.set( pModel );
+ if ( pImpl->pBaseModel.is() )
{
- pImp->pBaseModel->addCloseListener( new SfxModelListener_Impl(this) );
+ pImpl->pBaseModel->addCloseListener( new SfxModelListener_Impl(this) );
}
}
css::uno::Reference< css::frame::XModel > SfxObjectShell::GetBaseModel() const
{
- return pImp->pBaseModel.get();
+ return pImpl->pBaseModel.get();
}
void SfxObjectShell::SetAutoStyleFilterIndex(sal_uInt16 nSet)
{
- pImp->nStyleFilter = nSet;
+ pImpl->nStyleFilter = nSet;
}
sal_uInt16 SfxObjectShell::GetAutoStyleFilterIndex()
{
- return pImp->nStyleFilter;
+ return pImpl->nStyleFilter;
}
@@ -1108,7 +1106,7 @@ SfxObjectShell* SfxObjectShell::GetShellFromComponent( const Reference<lang::XCo
void SfxObjectShell::SetInitialized_Impl( const bool i_fromInitNew )
{
- pImp->bInitialized = true;
+ pImpl->bInitialized = true;
if (utl::ConfigManager::IsAvoidConfig())
return;
if ( i_fromInitNew )
More information about the Libreoffice-commits
mailing list