summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2013-03-23 19:06:58 +0200
committerTor Lillqvist <tml@iki.fi>2013-03-26 18:45:04 +0200
commit5a5c8e253abbef5626dab70f8978275ac3c742f8 (patch)
tree86c65cdfbff8ea0140937dee1311f65619f9aaf7 /sc
parent3ee3e7946c4a772fd13eada4b235479581190dce (diff)
Check feature test macros instead of ANDROID and/or IOS
Pass -DLIBO_FEATURE_FOO to compiler for some elements in BUILD_TYPE. BUILD_TYPE has at least two kinds of elements: Those that indicate building a bundled copy of some 3rd-party library, and those that indicate some specific feature of the LibreOffice platform or build-time configuration choice. This is for the latter kind. Change many of the checks for Android and/or iOS in the source code to check LIBO_FEATURE_DESKTOP, LIBO_FEATURE_HELP or DISABLE_EXTENSIONS instead, in cases where that is what is meant, not Android or iOS specifically. Change-Id: I2cd3f3bb99e953c7754dcea76a426f8f9d61e4db
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/docshell/docsh.cxx6
-rw-r--r--sc/source/ui/docshell/docsh4.cxx6
-rw-r--r--sc/source/ui/unoobj/confuno.cxx4
-rw-r--r--sc/source/ui/view/viewfunc.cxx2
4 files changed, 9 insertions, 9 deletions
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 045eaa513456..cf4bcacdb551 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -635,7 +635,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
case SFX_EVENT_LOADFINISHED:
{
-#if !defined(ANDROID) && !defined(IOS)
+#ifdef LIBO_FEATURE_DESKTOP
// the readonly documents should not be opened in shared mode
if ( HasSharedXMLFlagSet() && !SC_MOD()->IsInSharedDocLoading() && !IsReadOnly() )
{
@@ -660,7 +660,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
break;
case SFX_EVENT_VIEWCREATED:
{
-#if !defined(ANDROID) && !defined(IOS)
+#ifdef LIBO_FEATURE_DESKTOP
if ( IsDocShared() && !SC_MOD()->IsInSharedDocLoading() )
{
ScAppOptions aAppOptions = SC_MOD()->GetAppOptions();
@@ -720,7 +720,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
break;
case SFX_EVENT_SAVEDOC:
{
-#if !defined(ANDROID) && !defined(IOS)
+#ifdef LIBO_FEATURE_DESKTOP
if ( IsDocShared() && !SC_MOD()->IsInSharedDocSaving() )
{
bool bSuccess = false;
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 42f7038f7b44..81756c93bd6b 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -766,7 +766,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
aDocument.SetChangeViewSettings(aChangeViewSet);
}
}
-#if !defined(ANDROID) && !defined(IOS)
+#ifdef LIBO_FEATURE_DESKTOP
else if ( nSlot == SID_DOCUMENT_MERGE && IsDocShared() && pChangeTrack )
{
sal_uLong nEnd = pChangeTrack->GetActionMax();
@@ -897,7 +897,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
}
break;
-#if !defined(ANDROID) && !defined(IOS)
+#ifdef LIBO_FEATURE_DESKTOP
case SID_SHARE_DOC:
{
ScViewData* pViewData = GetViewData();
@@ -2300,7 +2300,7 @@ IMPL_LINK( ScDocShell, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg )
return 0;
}
-#if !defined(ANDROID) && !defined(IOS)
+#ifdef LIBO_FEATURE_DESKTOP
void ScDocShell::EnableSharedSettings( bool bEnable )
{
diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx
index 5dbac2ba432f..4b4e293b85c1 100644
--- a/sc/source/ui/unoobj/confuno.cxx
+++ b/sc/source/ui/unoobj/confuno.cxx
@@ -257,7 +257,7 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
}
else if ( aPropertyName.compareToAscii( SC_UNO_SHAREDOC ) == 0 )
{
-#if !defined(ANDROID) && !defined(IOS)
+#ifdef LIBO_FEATURE_DESKTOP
sal_Bool bDocShared = false;
if ( aValue >>= bDocShared )
{
@@ -418,7 +418,7 @@ 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)
+#ifdef LIBO_FEATURE_DESKTOP
ScUnoHelpFunctions::SetBoolInAny( aRet, pDocShell->HasSharedXMLFlagSet() );
#endif
}
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 52544d7c55cc..b3a26f4ba745 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -1533,7 +1533,7 @@ void ScViewFunc::DeleteCells( DelCellCmd eCmd, sal_Bool bRecord )
ScDocShell* pDocSh = GetViewData()->GetDocShell();
const ScMarkData& rMark = GetViewData()->GetMarkData();
-#if !defined(ANDROID) && !defined(IOS)
+#ifdef LIBO_FEATURE_DESKTOP
// #i94841# [Collaboration] if deleting rows is rejected, the content is sometimes wrong
if ( pDocSh->IsDocShared() && ( eCmd == DEL_DELROWS || eCmd == DEL_DELCOLS ) )
{