summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-11-18 12:10:46 +0100
committerStephan Bergmann <sbergman@redhat.com>2013-11-18 12:11:02 +0100
commitb150000278891a4bce875502de1265f507ed8958 (patch)
tree327f33fb7cb13433997b171bfa2c1aeb7c969afd /sfx2
parent78e2af8d7141015372995a3583242998c977e829 (diff)
SfxMedium::LockOrigFileOnDemand return value is never used
Change-Id: I2f64cc8fbe78354f9ded7a9a6bf03d9c597b3897
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/docfile.cxx17
1 files changed, 5 insertions, 12 deletions
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 0a96f895b388..1b808edfd398 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -979,23 +979,17 @@ namespace
#endif // HAVE_FEATURE_MULTIUSER_ENVIRONMENT
-// returns true if the document can be opened for editing ( even if it should be a copy )
-// otherwise the document should be opened readonly
+// sets SID_DOC_READONLY if the document cannot be opened for editing
// if user cancel the loading the ERROR_ABORT is set
-bool SfxMedium::LockOrigFileOnDemand( sal_Bool bLoading, sal_Bool bNoUI )
+void SfxMedium::LockOrigFileOnDemand( sal_Bool bLoading, sal_Bool bNoUI )
{
#if !HAVE_FEATURE_MULTIUSER_ENVIRONMENT
(void) bLoading;
(void) bNoUI;
- return true;
#else
- if (!IsLockingUsed())
- return true;
-
- if ( GetURLObject().HasError() )
- return false;
+ if (!IsLockingUsed() || GetURLObject().HasError())
+ return;
- bool bResult = false;
try
{
if ( pImp->m_bLocked && bLoading && ::utl::LocalFileHelper::IsLocalFile( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) ) )
@@ -1005,7 +999,7 @@ bool SfxMedium::LockOrigFileOnDemand( sal_Bool bLoading, sal_Bool bNoUI )
GetLockingStream_Impl();
}
- bResult = pImp->m_bLocked;
+ bool bResult = pImp->m_bLocked;
if ( !bResult )
{
@@ -1224,7 +1218,6 @@ bool SfxMedium::LockOrigFileOnDemand( sal_Bool bLoading, sal_Bool bNoUI )
{
SAL_WARN( "sfx.doc", "Locking exception: high probability, that the content has not been created" );
}
- return bResult;
#endif
}