summaryrefslogtreecommitdiff
path: root/sfx2/source/doc
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-03-17 11:21:56 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-03-17 11:02:18 +0000
commitdb93b92d78714ed193b3cbe52b18e3cfd9da99b8 (patch)
tree1442edf9552192ce29b3e271396291e2bbd269a0 /sfx2/source/doc
parent336d816176650726f6d14539464d9fd28ddd032d (diff)
loplugin:constantparam in sfx2
Change-Id: I53e690ab8d50fb3ce43ba633fc018e7b66e591cd Reviewed-on: https://gerrit.libreoffice.org/23321 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sfx2/source/doc')
-rw-r--r--sfx2/source/doc/new.cxx2
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx21
-rw-r--r--sfx2/source/doc/templatedlg.cxx2
3 files changed, 8 insertions, 17 deletions
diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx
index 603de57c5be5..3eb85f12760c 100644
--- a/sfx2/source/doc/new.cxx
+++ b/sfx2/source/doc/new.cxx
@@ -223,7 +223,7 @@ IMPL_LINK_NOARG_TYPED(SfxNewFileDialog_Impl, Update, Idle*, void)
SfxItemSet* pSet = new SfxAllItemSet(pSfxApp->GetPool());
pSet->Put(SfxBoolItem(SID_TEMPLATE, true));
pSet->Put(SfxBoolItem(SID_PREVIEW, true));
- lErr = pSfxApp->LoadTemplate(xDocShell, aFileName, true, pSet);
+ lErr = pSfxApp->LoadTemplate(xDocShell, aFileName, pSet);
if (lErr)
ErrorHandler::HandleError(lErr);
Application::SetDefDialogParent(pParent);
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 4bcfdc93cbf1..878f9d75717e 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -448,14 +448,12 @@ class SfxSaveGuard
public:
SfxSaveGuard(const Reference< frame::XModel >& xModel ,
- IMPL_SfxBaseModel_DataContainer* pData ,
- bool bRejectConcurrentSaveRequest);
+ IMPL_SfxBaseModel_DataContainer* pData);
~SfxSaveGuard();
};
SfxSaveGuard::SfxSaveGuard(const Reference< frame::XModel >& xModel ,
- IMPL_SfxBaseModel_DataContainer* pData ,
- bool bRejectConcurrentSaveRequest)
+ IMPL_SfxBaseModel_DataContainer* pData)
: m_xModel (xModel)
, m_pData (pData )
, m_pFramesLock(nullptr )
@@ -463,13 +461,6 @@ SfxSaveGuard::SfxSaveGuard(const Reference< frame::XModel >& xModel
if ( m_pData->m_bClosed )
throw lang::DisposedException("Object already disposed.");
- if (
- bRejectConcurrentSaveRequest &&
- m_pData->m_bSaving
- )
- throw io::IOException(
- "Concurrent save requests on the same document are not possible.");
-
m_pData->m_bSaving = true;
m_pFramesLock = new SfxOwnFramesLocker(m_pData->m_pObjectShell);
}
@@ -1522,7 +1513,7 @@ void SAL_CALL SfxBaseModel::storeSelf( const Sequence< beans::PropertyValue >
if ( m_pData->m_pObjectShell.Is() )
{
m_pData->m_pObjectShell->AddLog( OSL_LOG_PREFIX "storeSelf" );
- SfxSaveGuard aSaveGuard(this, m_pData, false);
+ SfxSaveGuard aSaveGuard(this, m_pData);
bool bCheckIn = false;
for ( sal_Int32 nInd = 0; nInd < aSeqArgs.getLength(); nInd++ )
@@ -1651,7 +1642,7 @@ void SAL_CALL SfxBaseModel::storeAsURL( const OUString& rURL
if ( m_pData->m_pObjectShell.Is() )
{
m_pData->m_pObjectShell->AddLog( OSL_LOG_PREFIX "storeAsURL" );
- SfxSaveGuard aSaveGuard(this, m_pData, false);
+ SfxSaveGuard aSaveGuard(this, m_pData);
impl_store( rURL, rArgs, false );
@@ -1692,7 +1683,7 @@ void SAL_CALL SfxBaseModel::storeToURL( const OUString& rURL
if ( m_pData->m_pObjectShell.Is() )
{
m_pData->m_pObjectShell->AddLog( OSL_LOG_PREFIX "storeToURL" );
- SfxSaveGuard aSaveGuard(this, m_pData, false);
+ SfxSaveGuard aSaveGuard(this, m_pData);
try {
impl_store(rURL, rArgs, true);
}
@@ -1717,7 +1708,7 @@ void SAL_CALL SfxBaseModel::storeToRecoveryFile( const OUString& i_TargetLocatio
SfxModelGuard aGuard( *this );
// delegate
- SfxSaveGuard aSaveGuard( this, m_pData, false );
+ SfxSaveGuard aSaveGuard( this, m_pData );
impl_store( i_TargetLocation, i_MediaDescriptor, true );
// no need for subsequent calls to storeToRecoveryFile, unless we're modified, again
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index bffbe89d07b1..5e05de675f6f 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -644,7 +644,7 @@ IMPL_LINK_TYPED(SfxTemplateManagerDlg, RepositoryMenuSelectHdl, Menu*, pMenu, bo
}
}
- if (mpRemoteView->loadRepository(pRepository,false))
+ if (mpRemoteView->loadRepository(pRepository))
switchMainView(false);
}