[Libreoffice-commits] core.git: 2 commits - desktop/source framework/source sc/source sfx2/inc sfx2/source solenv/gbuild svl/Library_svl.mk sw/source vcl/source
Tor Lillqvist
tml at iki.fi
Tue Mar 26 09:45:19 PDT 2013
desktop/source/app/app.cxx | 8 ++--
desktop/source/app/cmdlineargs.cxx | 2 +
desktop/source/app/officeipcthread.cxx | 10 ++---
desktop/source/app/userinstall.cxx | 2 -
desktop/source/deployment/manager/dp_activepackages.cxx | 17 ++++------
desktop/source/deployment/manager/dp_activepackages.hxx | 4 +-
desktop/source/deployment/registry/configuration/dp_configuration.cxx | 13 ++++---
desktop/source/deployment/registry/help/dp_help.cxx | 4 +-
framework/source/services/autorecovery.cxx | 4 ++
sc/source/ui/docshell/docsh.cxx | 6 +--
sc/source/ui/docshell/docsh4.cxx | 6 +--
sc/source/ui/unoobj/confuno.cxx | 4 +-
sc/source/ui/view/viewfunc.cxx | 2 -
sfx2/inc/sfx2/objsh.hxx | 2 -
sfx2/source/doc/docfile.cxx | 17 +++++++++-
sfx2/source/doc/objmisc.cxx | 2 -
sfx2/source/doc/objstor.cxx | 2 -
sfx2/source/doc/objxtor.cxx | 2 -
sfx2/source/doc/sfxbasemodel.cxx | 2 -
sfx2/source/view/viewfrm.cxx | 4 +-
solenv/gbuild/Helper.mk | 4 ++
solenv/gbuild/gbuild.mk | 3 +
svl/Library_svl.mk | 3 +
sw/source/ui/uiview/viewport.cxx | 4 +-
vcl/source/app/dbggui.cxx | 2 -
vcl/source/window/window.cxx | 2 -
26 files changed, 82 insertions(+), 49 deletions(-)
New commits:
commit 5a5c8e253abbef5626dab70f8978275ac3c742f8
Author: Tor Lillqvist <tml at iki.fi>
Date: Sat Mar 23 19:06:58 2013 +0200
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
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index d3e7b26..6a3e3de 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1386,7 +1386,8 @@ int Desktop::Main()
new DesktopContext( com::sun::star::uno::getCurrentContext() ) );
CommandLineArgs& rCmdLineArgs = GetCommandLineArgs();
-#if !defined(ANDROID) && !defined(IOS)
+
+#ifdef LIBO_FEATURE_DESKTOP
OUString aUnknown( rCmdLineArgs.GetUnknown() );
if ( !aUnknown.isEmpty() )
{
@@ -1450,7 +1451,8 @@ int Desktop::Main()
// there is no other instance using our data files from a remote host
RTL_LOGFILE_CONTEXT_TRACE( aLog, "desktop (lo119109) Desktop::Main -> Lockfile" );
m_xLockfile.reset(new Lockfile);
-#if !defined(ANDROID) && !defined(IOS)
+
+#ifdef LIBO_FEATURE_DESKTOP
if ( !rCmdLineArgs.IsHeadless() && !rCmdLineArgs.IsInvisible() &&
!rCmdLineArgs.IsNoLockcheck() && !m_xLockfile->check( Lockfile_execWarning ))
{
@@ -1537,7 +1539,7 @@ int Desktop::Main()
*/
Application::GetDefaultDevice();
-#if !defined(ANDROID) && !defined(IOS)
+#ifdef LIBO_FEATURE_DESKTOP
// Check if bundled or shared extensions were added /removed
// and process those extensions (has to be done before checking
// the extension dependencies!
diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx
index 6ebe54e..b8cf153 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -442,7 +442,7 @@ bool CommandLineArgs::InterpretCommandLineParameter( const ::rtl::OUString& aArg
{
m_nologo = true;
}
-#if !defined(ANDROID) && !defined(IOS)
+#ifdef LIBO_FEATURE_DESKTOP
else if ( oArg == "nolockcheck" )
{
m_nolockcheck = true;
diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx
index af44990..071e2bb 100644
--- a/desktop/source/app/officeipcthread.cxx
+++ b/desktop/source/app/officeipcthread.cxx
@@ -59,7 +59,7 @@ namespace {
static char const ARGUMENT_PREFIX[] = "InternalIPC::Arguments";
-#if !defined(ANDROID) && !defined(IOS)
+#ifdef LIBO_FEATURE_DESKTOP
static char const SEND_ARGUMENTS[] = "InternalIPC::SendArguments";
static char const PROCESSING_DONE[] = "InternalIPC::ProcessingDone";
@@ -105,7 +105,7 @@ namespace desktop
namespace {
-#if !defined(ANDROID) && !defined(IOS)
+#ifdef LIBO_FEATURE_DESKTOP
class Parser: public CommandLineArgs::Supplier {
public:
@@ -451,7 +451,7 @@ void OfficeIPCThread::RequestsCompleted( int nCount )
OfficeIPCThread::Status OfficeIPCThread::EnableOfficeIPCThread()
{
-#if !defined(ANDROID) && !defined(IOS)
+#ifdef LIBO_FEATURE_DESKTOP
::osl::MutexGuard aGuard( GetMutex() );
if( pGlobalOfficeIPCThread.is() )
@@ -613,7 +613,7 @@ OfficeIPCThread::Status OfficeIPCThread::EnableOfficeIPCThread()
void OfficeIPCThread::DisableOfficeIPCThread(bool join)
{
-#if !defined(ANDROID) && !defined(IOS)
+#ifdef LIBO_FEATURE_DESKTOP
osl::ClearableMutexGuard aMutex( GetMutex() );
if( pGlobalOfficeIPCThread.is() )
@@ -673,7 +673,7 @@ void OfficeIPCThread::SetReady(
void OfficeIPCThread::execute()
{
-#if !defined(ANDROID) && !defined(IOS)
+#ifdef LIBO_FEATURE_DESKTOP
do
{
osl::StreamPipe aStreamPipe;
diff --git a/desktop/source/app/userinstall.cxx b/desktop/source/app/userinstall.cxx
index 1ae05ce..ec5c5ca 100644
--- a/desktop/source/app/userinstall.cxx
+++ b/desktop/source/app/userinstall.cxx
@@ -116,7 +116,7 @@ namespace desktop {
}
}
-#if !defined(ANDROID) && !defined(IOS)
+#ifdef LIBO_FEATURE_DESKTOP
static osl::FileBase::RC copy_recursive( const rtl::OUString& srcUnqPath, const rtl::OUString& dstUnqPath)
{
FileBase::RC err;
diff --git a/desktop/source/deployment/manager/dp_activepackages.cxx b/desktop/source/deployment/manager/dp_activepackages.cxx
index 619aed1..1a4081f 100644
--- a/desktop/source/deployment/manager/dp_activepackages.cxx
+++ b/desktop/source/deployment/manager/dp_activepackages.cxx
@@ -43,7 +43,7 @@
// key: 0xFF UTF8(identifier)
// value: UTF8(tempname) 0xFF UTF8(filename) 0xFF UTF8(mediatype)
-#if !defined(ANDROID) && !defined(IOS)
+#ifndef DISABLE_EXTENSIONS
namespace {
@@ -117,13 +117,12 @@ namespace dp_manager {
ActivePackages::ActivePackages() {}
ActivePackages::ActivePackages(::rtl::OUString const & url, bool readOnly)
-#if !defined(ANDROID) && !defined(IOS)
+#ifndef DISABLE_EXTENSIONS
: m_map(url, readOnly)
#endif
{
-#if defined(ANDROID) || defined(IOS)
- (void)url; (void)readOnly;
-#endif
+ (void) url;
+ (void) readOnly;
}
ActivePackages::~ActivePackages() {}
@@ -138,7 +137,7 @@ bool ActivePackages::get(
Data * data, ::rtl::OUString const & id, ::rtl::OUString const & fileName)
const
{
-#if !defined(ANDROID) && !defined(IOS)
+#ifndef DISABLE_EXTENSIONS
::rtl::OString v;
if (m_map.get(&v, newKey(id))) {
if (data != NULL) {
@@ -163,7 +162,7 @@ bool ActivePackages::get(
ActivePackages::Entries ActivePackages::getEntries() const {
Entries es;
-#if !defined(ANDROID) && !defined(IOS)
+#ifndef DISABLE_EXTENSIONS
::dp_misc::t_string2string_map m(m_map.getEntries());
for (::dp_misc::t_string2string_map::const_iterator i(m.begin());
i != m.end(); ++i)
@@ -189,7 +188,7 @@ ActivePackages::Entries ActivePackages::getEntries() const {
}
void ActivePackages::put(::rtl::OUString const & id, Data const & data) {
-#if !defined(ANDROID) && !defined(IOS)
+#ifndef DISABLE_EXTENSIONS
::rtl::OStringBuffer b;
b.append(
::rtl::OUStringToOString(data.temporaryName, RTL_TEXTENCODING_UTF8));
@@ -211,7 +210,7 @@ void ActivePackages::put(::rtl::OUString const & id, Data const & data) {
void ActivePackages::erase(
::rtl::OUString const & id, ::rtl::OUString const & fileName)
{
-#if !defined(ANDROID) && !defined(IOS)
+#ifndef DISABLE_EXTENSIONS
m_map.erase(newKey(id), true) || m_map.erase(oldKey(fileName), true);
#else
(void) id;
diff --git a/desktop/source/deployment/manager/dp_activepackages.hxx b/desktop/source/deployment/manager/dp_activepackages.hxx
index 254d09a..fa2d909 100644
--- a/desktop/source/deployment/manager/dp_activepackages.hxx
+++ b/desktop/source/deployment/manager/dp_activepackages.hxx
@@ -25,7 +25,7 @@
#include <utility>
#include <vector>
-#if !defined(ANDROID) && !defined(IOS)
+#ifndef DISABLE_EXTENSIONS
#include "dp_persmap.h"
#endif
@@ -84,7 +84,7 @@ public:
private:
ActivePackages(ActivePackages &); // not defined
void operator =(ActivePackages &); // not defined
-#if !defined(ANDROID) && !defined(IOS)
+#ifndef DISABLE_EXTENSIONS
::dp_misc::PersistentMap m_map;
#endif
};
diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
index 74fd398..7c5b5d0 100644
--- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx
+++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
@@ -23,7 +23,7 @@
#include "dp_configuration.hrc"
#include "dp_backend.h"
-#if !defined(ANDROID) && !defined(IOS)
+#ifndef DISABLE_EXTENSIONS
#include "dp_persmap.h"
#endif
#include "dp_ucb.h"
@@ -110,10 +110,12 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend
OUString const & url, OUString const & mediaType, sal_Bool bRemoved,
OUString const & identifier,
Reference<XCommandEnvironment> const & xCmdEnv );
-#if !defined(ANDROID) && !defined(IOS)
+
+#ifndef DISABLE_EXTENSIONS
// for backwards compatibility - nil if no (compatible) back-compat db present
::std::auto_ptr<PersistentMap> m_registeredPackages;
#endif
+
virtual void SAL_CALL disposing();
const Reference<deployment::XPackageTypeInfo> m_xConfDataTypeInfo;
@@ -215,7 +217,7 @@ BackendImpl::BackendImpl(
configmgrini_verify_init( xCmdEnv );
-#if !defined(ANDROID) && !defined(IOS)
+#ifndef DISABLE_EXTENSIONS
SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr<PersistentMap> pMap;
SAL_WNODEPRECATED_DECLARATIONS_POP
@@ -551,7 +553,8 @@ BackendImpl::PackageImpl::isRegistered_(
bool bReg = false;
if (that->hasActiveEntry(getURL()))
bReg = true;
-#if !defined(ANDROID) && !defined(IOS)
+
+#ifndef DISABLE_EXTENSIONS
if (!bReg && that->m_registeredPackages.get())
{
// fallback for user extension registered in berkeley DB
@@ -740,7 +743,7 @@ void BackendImpl::PackageImpl::processPackage_(
}
else // revoke
{
-#if !defined(ANDROID) && !defined(IOS)
+#ifndef DISABLE_EXTENSIONS
if (!that->removeFromConfigmgrIni(m_isSchema, url, xCmdEnv) &&
that->m_registeredPackages.get()) {
// Obsolete package database handling - should be removed for LibreOffice 4.0
diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx
index 67598b9..5c660fb 100644
--- a/desktop/source/deployment/registry/help/dp_help.cxx
+++ b/desktop/source/deployment/registry/help/dp_help.cxx
@@ -31,7 +31,7 @@
#include "uno/current_context.hxx"
#include "unotools/pathoptions.hxx"
-#if !defined(ANDROID) && !defined(IOS)
+#ifdef LIBO_FEATURE_HELP
#include <helpcompiler/compilehelp.hxx>
#include <helpcompiler/HelpIndexer.hxx>
#endif
@@ -386,7 +386,7 @@ void BackendImpl::implProcessHelp(
data.dataUrl = xPackage->getURL();
if (!package->extensionContainsCompiledHelp())
{
-#if !defined(ANDROID) && !defined(IOS)
+#ifdef LIBO_FEATURE_HELP
const OUString sHelpFolder = createFolder(OUString(), xCmdEnv);
data.dataUrl = sHelpFolder;
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index 11ff74d..ff3c844 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -2020,7 +2020,7 @@ void AutoRecovery::implts_changeAllDocVisibility(sal_Bool bVisible)
*/
void lc_removeLockFile(AutoRecovery::TDocumentInfo& rInfo)
{
-#if defined(ANDROID) || defined(IOS)
+#ifndef LIBO_FEATURE_DESKTOP
(void) rInfo;
#else
if ( rInfo.Document.is() )
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 045eaa5..cf4bcac 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 42f7038..81756c9 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 5dbac2b..4b4e293 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 52544d7..b3a26f4 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 ) )
{
diff --git a/sfx2/inc/sfx2/objsh.hxx b/sfx2/inc/sfx2/objsh.hxx
index 866f238..caaf4e3 100644
--- a/sfx2/inc/sfx2/objsh.hxx
+++ b/sfx2/inc/sfx2/objsh.hxx
@@ -271,7 +271,7 @@ public:
virtual sal_Bool AcceptStateUpdate() const;
sal_Bool IsHelpDocument() const;
-#if !defined(ANDROID) && !defined(IOS)
+#ifdef LIBO_FEATURE_DESKTOP
sal_Bool IsDocShared() const;
::rtl::OUString GetSharedFileURL() const;
sal_Bool SwitchToShared( sal_Bool bShared, sal_Bool bSave );
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index ca2afd3..18b1d3d 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -135,7 +135,7 @@ 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)
+#ifdef LIBO_FEATURE_DESKTOP
bool IsSystemFileLockingUsed()
{
@@ -984,7 +984,7 @@ sal_Int8 SfxMedium::ShowLockedDocumentDialog( const uno::Sequence< ::rtl::OUStri
namespace
{
-#if !defined(ANDROID) && !defined(IOS)
+#ifdef LIBO_FEATURE_DESKTOP
bool isSuitableProtocolForLocking(const String & rLogicName)
{
INetURLObject aUrl( rLogicName );
@@ -999,7 +999,7 @@ 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)
+#ifndef LIBO_FEATURE_DESKTOP
(void) bLoading;
(void) bNoUI;
return true;
@@ -2682,7 +2682,7 @@ void SfxMedium::CloseAndRelease()
void SfxMedium::UnlockFile( sal_Bool bReleaseLockStream )
{
-#if defined(ANDROID) || defined(IOS)
+#ifndef LIBO_FEATURE_DESKTOP
(void) bReleaseLockStream;
#else
if ( pImp->m_xLockingStream.is() )
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index ea8590a..2ac11f0 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -495,7 +495,7 @@ void SfxObjectShell::SetModalMode_Impl( sal_Bool bModal )
}
}
-#if !defined(ANDROID) && !defined(IOS)
+#ifdef LIBO_FEATURE_DESKTOP
sal_Bool SfxObjectShell::SwitchToShared( sal_Bool bShared, sal_Bool bSave )
{
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index dbe660f..e06de13 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -2687,7 +2687,7 @@ sal_Bool SfxObjectShell::CommonSaveAs_Impl
if ( pFilterOptItem )
pSet->Put( *pFilterOptItem );
-#if !defined(ANDROID) && !defined(IOS)
+#ifdef LIBO_FEATURE_DESKTOP
if ( IsDocShared() && !aTempFileURL.isEmpty() )
{
// this is a shared document that has to be disconnected from the old location
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index 3830a29..44d4ae3 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -390,7 +390,7 @@ SfxObjectShell::~SfxObjectShell()
{
pMedium->CloseAndReleaseStreams_Impl();
-#if !defined(ANDROID) && !defined(IOS)
+#ifdef LIBO_FEATURE_DESKTOP
if ( IsDocShared() )
FreeSharedFile();
#endif
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 8390069..170ae60 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -2952,7 +2952,7 @@ void SfxBaseModel::impl_store( const ::rtl::OUString& sURL
}
catch( const lang::IllegalArgumentException& )
{
-#if !defined(ANDROID) && !defined(IOS)
+#ifdef LIBO_FEATURE_DESKTOP
// some additional arguments do not allow to use saving, SaveAs should be done
// but only for normal documents, the shared documents would be overwritten in this case
// that would mean an information loss
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 7ab428e..bac1cd4 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -673,7 +673,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
pNewSet->ClearItem( SID_DOC_SALVAGE );
}
-#if !defined(ANDROID) && !defined(IOS)
+#ifdef LIBO_FEATURE_DESKTOP
// TODO/LATER: Temporary solution, the SfxMedium must know the original URL as aLogicName
// SfxMedium::Transfer_Impl() will be forbidden then.
if ( xOldObj->IsDocShared() )
@@ -790,7 +790,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
xNewObj->SetReadOnlyUI( !bForEdit );
}
-#if !defined(ANDROID) && !defined(IOS)
+#ifdef LIBO_FEATURE_DESKTOP
if ( xNewObj->IsDocShared() )
{
// the file is shared but the closing can change the sharing control file
diff --git a/solenv/gbuild/Helper.mk b/solenv/gbuild/Helper.mk
index 0a732c2..0b32fc7 100644
--- a/solenv/gbuild/Helper.mk
+++ b/solenv/gbuild/Helper.mk
@@ -218,6 +218,10 @@ define gb_Helper_define_if_set
$(foreach def,$(1),$(if $(filter TRUE YES,$($(def))),-D$(def)))
endef
+define gb_Helper_define_if_in
+$(foreach def,$(1),$(if $(filter $(def),$(2)),-DLIBO_FEATURE_$(def)))
+endef
+
define gb_Helper_execute
$(call gb_Executable_get_command,$(firstword $(1))) $(wordlist 2,$(words $(1)),$(1))
endef
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index 5a4161e..d026cd9 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -277,6 +277,9 @@ gb_GLOBALDEFS += \
ENABLE_READONLY_INSTALLSET \
)
+gb_GLOBALDEFS += \
+ $(call gb_Helper_define_if_in,DESKTOP HELP,$(BUILD_TYPE))
+
gb_GLOBALDEFS := $(sort $(gb_GLOBALDEFS))
include $(GBUILDDIR)/Deliver.mk
diff --git a/sw/source/ui/uiview/viewport.cxx b/sw/source/ui/uiview/viewport.cxx
index 0a8ea0d..f488c65 100644
--- a/sw/source/ui/uiview/viewport.cxx
+++ b/sw/source/ui/uiview/viewport.cxx
@@ -1056,7 +1056,7 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize )
return;
m_bInOuterResizePixel = sal_True;
-#if !defined(ANDROID) && !defined(IOS)
+#ifdef LIBO_FEATURE_DESKTOP
// feststellen, ob Scrollbars angezeigt werden duerfen
sal_Bool bShowH = sal_True,
bShowV = sal_True,
@@ -1203,7 +1203,7 @@ void SwView::SetZoomFactor( const Fraction &rX, const Fraction &rY )
sal_Bool SwView::UpdateScrollbars()
{
-#if defined(ANDROID) || defined(IOS)
+#ifndef LIBO_FEATURE_DESKTOP
return sal_True;
#else
sal_Bool bRet = sal_False;
diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx
index 0161df6..8296e58 100644
--- a/vcl/source/app/dbggui.cxx
+++ b/vcl/source/app/dbggui.cxx
@@ -1661,7 +1661,7 @@ void DbgPrintMsgBox( const char* pLine )
}
strcpy( aDbgOutBuf, pLine );
-#if defined UNX && !(defined ANDROID || defined IOS)
+#if defined UNX && defined LIBO_FEATURE_DESKTOP
strcat( aDbgOutBuf, "\nAbort ? (Yes=abort / No=ignore / Cancel=core dump)" );
#elif defined _WIN32
strcat( aDbgOutBuf, "\nAbort ? (Yes=abort / No=ignore / Cancel=try to invoke debugger)" );
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 1a478e6..459b917 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -8325,7 +8325,7 @@ uno::Reference< XDragSource > Window::GetDragSource()
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
-#if !defined(ANDROID) && !defined(IOS)
+#ifdef LIBO_FEATURE_DESKTOP
if( mpWindowImpl->mpFrameData )
{
commit 3ee3e7946c4a772fd13eada4b235479581190dce
Author: Tor Lillqvist <tml at iki.fi>
Date: Sat Mar 23 19:05:59 2013 +0200
Lock files make no sense on Android or iOS
Change-Id: Ie8d05b8596fb7d17e057bc32c7a4204a9ff54021
diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx
index 83a251c..6ebe54e 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 3e27474..11ff74d 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 fa8ef18..ca2afd3 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 30c4029..36a0175 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 \
More information about the Libreoffice-commits
mailing list