diff options
author | Tor Lillqvist <tml@iki.fi> | 2013-03-23 17:17:20 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-03-26 18:44:31 +0200 |
commit | 83a486546f535b32a565d9215e7584c5572c2fb0 (patch) | |
tree | 240d34ae820bd0f7150056f6fdd3da7a94e7a485 /sc | |
parent | Initial hack attempt to get something rendered (diff) | |
download | core-83a486546f535b32a565d9215e7584c5572c2fb0.tar.gz core-83a486546f535b32a565d9215e7584c5572c2fb0.zip |
Shared documents make no sense for Android and iOS
(When I say documents, I mean spreadsheets. Only Calc has code for
this.)
Change-Id: I05fd19885633f9e250940678d33e2e4c82c31a9d
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/docshell/docsh.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh4.cxx | 9 | ||||
-rw-r--r-- | sc/source/ui/unoobj/confuno.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/viewfunc.cxx | 2 |
4 files changed, 19 insertions, 4 deletions
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 7a2aebae2a11..045eaa513456 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -635,6 +635,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) { case SFX_EVENT_LOADFINISHED: { +#if !defined(ANDROID) && !defined(IOS) // the readonly documents should not be opened in shared mode if ( HasSharedXMLFlagSet() && !SC_MOD()->IsInSharedDocLoading() && !IsReadOnly() ) { @@ -654,10 +655,12 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) SetReadOnlyUI( sal_True ); } } +#endif } break; case SFX_EVENT_VIEWCREATED: { +#if !defined(ANDROID) && !defined(IOS) if ( IsDocShared() && !SC_MOD()->IsInSharedDocLoading() ) { ScAppOptions aAppOptions = SC_MOD()->GetAppOptions(); @@ -675,7 +678,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) } } } - +#endif try { uno::Reference< uno::XComponentContext > xContext( @@ -717,6 +720,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) break; case SFX_EVENT_SAVEDOC: { +#if !defined(ANDROID) && !defined(IOS) if ( IsDocShared() && !SC_MOD()->IsInSharedDocSaving() ) { bool bSuccess = false; @@ -900,7 +904,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) if ( !bSuccess ) SetError( ERRCODE_IO_ABORT, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) ); // this error code will produce no error message, but will break the further saving process } - +#endif if (pSheetSaveData) pSheetSaveData->SetInSupportedSave(true); diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 93d1ca04f10e..42f7038f7b44 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -766,6 +766,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) aDocument.SetChangeViewSettings(aChangeViewSet); } } +#if !defined(ANDROID) && !defined(IOS) else if ( nSlot == SID_DOCUMENT_MERGE && IsDocShared() && pChangeTrack ) { sal_uLong nEnd = pChangeTrack->GetActionMax(); @@ -784,6 +785,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) PostPaintGridAll(); } } +#endif } pOtherDocSh->DoClose(); // delete passiert mit der Ref } @@ -895,6 +897,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) } break; +#if !defined(ANDROID) && !defined(IOS) case SID_SHARE_DOC: { ScViewData* pViewData = GetViewData(); @@ -1071,7 +1074,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) rReq.Done(); } break; - +#endif case SID_OPEN_CALC: { SfxStringItem aApp(SID_DOC_SERVICE, rtl::OUString("com.sun.star.sheet.SpreadsheetDocument")); @@ -2297,7 +2300,7 @@ IMPL_LINK( ScDocShell, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg ) return 0; } -//------------------------------------------------------------------ +#if !defined(ANDROID) && !defined(IOS) void ScDocShell::EnableSharedSettings( bool bEnable ) { @@ -2376,4 +2379,6 @@ uno::Reference< frame::XModel > ScDocShell::LoadSharedDocument() return xModel; } +#endif + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx index f26007d854f1..5dbac2ba432f 100644 --- a/sc/source/ui/unoobj/confuno.cxx +++ b/sc/source/ui/unoobj/confuno.cxx @@ -257,11 +257,13 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue( } else if ( aPropertyName.compareToAscii( SC_UNO_SHAREDOC ) == 0 ) { +#if !defined(ANDROID) && !defined(IOS) sal_Bool bDocShared = false; if ( aValue >>= bDocShared ) { pDocShell->SetSharedXMLFlag( bDocShared ); } +#endif } else if ( aPropertyName.compareToAscii( SC_UNO_MODIFYPASSWORDINFO ) == 0 ) { @@ -416,7 +418,9 @@ uno::Any SAL_CALL ScDocumentConfiguration::getPropertyValue( const rtl::OUString aRet <<= pDocShell->IsLoadReadonly(); else if ( aPropertyName.compareToAscii( SC_UNO_SHAREDOC ) == 0 ) { +#if !defined(ANDROID) && !defined(IOS) ScUnoHelpFunctions::SetBoolInAny( aRet, pDocShell->HasSharedXMLFlagSet() ); +#endif } else if ( aPropertyName.compareToAscii( SC_UNO_MODIFYPASSWORDINFO ) == 0 ) aRet <<= pDocShell->GetModifyPasswordInfo(); diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx index 14caaa54e0fc..52544d7c55cc 100644 --- a/sc/source/ui/view/viewfunc.cxx +++ b/sc/source/ui/view/viewfunc.cxx @@ -1533,6 +1533,7 @@ void ScViewFunc::DeleteCells( DelCellCmd eCmd, sal_Bool bRecord ) ScDocShell* pDocSh = GetViewData()->GetDocShell(); const ScMarkData& rMark = GetViewData()->GetMarkData(); +#if !defined(ANDROID) && !defined(IOS) // #i94841# [Collaboration] if deleting rows is rejected, the content is sometimes wrong if ( pDocSh->IsDocShared() && ( eCmd == DEL_DELROWS || eCmd == DEL_DELCOLS ) ) { @@ -1553,6 +1554,7 @@ void ScViewFunc::DeleteCells( DelCellCmd eCmd, sal_Bool bRecord ) } } else +#endif { pDocSh->GetDocFunc().DeleteCells( aRange, &rMark, eCmd, bRecord, false ); } |