diff options
-rw-r--r-- | desktop/source/app/cmdlineargs.cxx | 2 | ||||
-rw-r--r-- | framework/source/services/autorecovery.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 17 | ||||
-rw-r--r-- | svl/Library_svl.mk | 3 |
4 files changed, 24 insertions, 2 deletions
diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx index 83a251c623bf..6ebe54eef62d 100644 --- a/desktop/source/app/cmdlineargs.cxx +++ b/desktop/source/app/cmdlineargs.cxx @@ -442,12 +442,14 @@ bool CommandLineArgs::InterpretCommandLineParameter( const ::rtl::OUString& aArg { m_nologo = true; } +#if !defined(ANDROID) && !defined(IOS) else if ( oArg == "nolockcheck" ) { m_nolockcheck = true; // Workaround for automated testing ::svt::DocumentLockFile::AllowInteraction( false ); } +#endif else if ( oArg == "help" || aArg == "-h" || aArg == "-?" ) { m_help = true; diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx index 3e274743c231..11ff74d49b54 100644 --- a/framework/source/services/autorecovery.cxx +++ b/framework/source/services/autorecovery.cxx @@ -2020,6 +2020,9 @@ void AutoRecovery::implts_changeAllDocVisibility(sal_Bool bVisible) */ void lc_removeLockFile(AutoRecovery::TDocumentInfo& rInfo) { +#if defined(ANDROID) || defined(IOS) + (void) rInfo; +#else if ( rInfo.Document.is() ) { try @@ -2036,6 +2039,7 @@ void lc_removeLockFile(AutoRecovery::TDocumentInfo& rInfo) { } } +#endif } diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index fa8ef1845853..ca2afd3c6961 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -135,7 +135,8 @@ static const sal_Int8 LOCK_UI_NOLOCK = 0; static const sal_Int8 LOCK_UI_SUCCEEDED = 1; static const sal_Int8 LOCK_UI_TRY = 2; -//---------------------------------------------------------------- +#if !defined(ANDROID) && !defined(IOS) + bool IsSystemFileLockingUsed() { // check whether system file locking has been used, the default value is false @@ -194,6 +195,8 @@ bool IsLockingUsed() return officecfg::Office::Common::Misc::UseLocking::get(); } +#endif + } // anonymous namespace //========================================================== @@ -981,12 +984,14 @@ sal_Int8 SfxMedium::ShowLockedDocumentDialog( const uno::Sequence< ::rtl::OUStri namespace { +#if !defined(ANDROID) && !defined(IOS) bool isSuitableProtocolForLocking(const String & rLogicName) { INetURLObject aUrl( rLogicName ); INetProtocol eProt = aUrl.GetProtocol(); return eProt == INET_PROT_FILE || eProt == INET_PROT_SFTP; } +#endif } // returns true if the document can be opened for editing ( even if it should be a copy ) @@ -994,6 +999,11 @@ namespace // if user cancel the loading the ERROR_ABORT is set bool SfxMedium::LockOrigFileOnDemand( sal_Bool bLoading, sal_Bool bNoUI ) { +#if defined(ANDROID) || defined(IOS) + (void) bLoading; + (void) bNoUI; + return true; +#else if (!IsLockingUsed()) return true; @@ -1230,6 +1240,7 @@ bool SfxMedium::LockOrigFileOnDemand( sal_Bool bLoading, sal_Bool bNoUI ) OSL_FAIL( "Locking exception: high probability, that the content has not been created" ); } return bResult; +#endif } //------------------------------------------------------------------ @@ -2671,6 +2682,9 @@ void SfxMedium::CloseAndRelease() void SfxMedium::UnlockFile( sal_Bool bReleaseLockStream ) { +#if defined(ANDROID) || defined(IOS) + (void) bReleaseLockStream; +#else if ( pImp->m_xLockingStream.is() ) { if ( bReleaseLockStream ) @@ -2703,6 +2717,7 @@ void SfxMedium::UnlockFile( sal_Bool bReleaseLockStream ) catch( const uno::Exception& ) {} } +#endif } void SfxMedium::CloseAndReleaseStreams_Impl() diff --git a/svl/Library_svl.mk b/svl/Library_svl.mk index 30c402921eed..36a0175bf7ac 100644 --- a/svl/Library_svl.mk +++ b/svl/Library_svl.mk @@ -110,7 +110,8 @@ $(eval $(call gb_Library_add_exception_objects,svl,\ svl/source/items/whiter \ svl/source/misc/PasswordHelper \ svl/source/misc/adrparse \ - svl/source/misc/documentlockfile \ + $(if $(filter DESKTOP,$(BUILD_TYPE)),\ + svl/source/misc/documentlockfile) \ svl/source/misc/filenotation \ svl/source/misc/folderrestriction \ svl/source/misc/fstathelper \ |