[Libreoffice-commits] core.git: 4 commits - config_host/config_features.h.in config_host/README configure.ac desktop/source framework/source sc/source sfx2/inc sfx2/source solenv/gbuild sw/source vcl/source
Tor Lillqvist
tml at iki.fi
Wed Mar 27 03:02:38 PDT 2013
config_host/README | 1
config_host/config_features.h.in | 47 ++++++++++++++++++++
configure.ac | 4 +
desktop/source/app/app.cxx | 8 ++-
desktop/source/app/cmdlineargs.cxx | 4 +
desktop/source/app/officeipcthread.cxx | 11 ++--
desktop/source/app/userinstall.cxx | 4 +
desktop/source/deployment/registry/help/dp_help.cxx | 5 +-
framework/source/services/autorecovery.cxx | 3 -
sc/source/ui/docshell/docsh.cxx | 8 ++-
sc/source/ui/docshell/docsh4.cxx | 10 ++--
sc/source/ui/unoobj/confuno.cxx | 6 +-
sc/source/ui/view/viewfunc.cxx | 4 +
sfx2/inc/sfx2/objsh.hxx | 4 +
sfx2/source/doc/docfile.cxx | 10 ++--
sfx2/source/doc/objmisc.cxx | 3 -
sfx2/source/doc/objstor.cxx | 4 +
sfx2/source/doc/objxtor.cxx | 3 -
sfx2/source/doc/sfxbasemodel.cxx | 4 +
sfx2/source/view/viewfrm.cxx | 5 +-
solenv/gbuild/Helper.mk | 4 -
solenv/gbuild/gbuild.mk | 3 -
sw/source/ui/uiview/viewport.cxx | 5 +-
vcl/source/app/dbggui.cxx | 3 -
vcl/source/filter/graphicfilter.cxx | 2
vcl/source/gdi/pdfwriter_impl.cxx | 2
vcl/source/window/window.cxx | 4 +
27 files changed, 125 insertions(+), 46 deletions(-)
New commits:
commit 79863bd45491bc258131019050e15a209a0352f8
Author: Tor Lillqvist <tml at iki.fi>
Date: Wed Mar 27 11:55:58 2013 +0200
WaE: macro is not used
Change-Id: I1a063d7ffa1ab051fe4c3d57f4c8c33d4cd3fe87
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index dddc3a5..2070b76 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -64,8 +64,10 @@
#define PMGCHUNG_msOG 0x6d734f47 // Microsoft Office Animated GIF
+#ifndef DISABLE_DYNLOADING
#define IMPORT_FUNCTION_NAME "GraphicImport"
#define EXPORT_FUNCTION_NAME "GraphicExport"
+#endif
using namespace ::rtl;
using namespace ::com::sun::star;
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index d49f5fa..1307193 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -99,7 +99,9 @@ using ::rtl::OUStringBuffer;
#define DEBUG_DISABLE_PDFCOMPRESSION // also do not compress streams
#endif
+#if !defined(ANDROID) && !defined(IOS)
#define MAX_SIGNATURE_CONTENT_LENGTH 0x4000
+#endif
#ifdef DO_TEST_PDF
class PDFTestOutputStream : public PDFOutputStream
commit a8c3c673eaec987e9fe47123f60e5f9d34a4e93f
Author: Tor Lillqvist <tml at iki.fi>
Date: Wed Mar 27 11:35:40 2013 +0200
Use <config_features.h> instead of -DLIBO_FEATURE_*
Change-Id: Idc198beb6d759dbe3bad6ea58d896c1555b4cc0f
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 6a3e3de..1f57c2e 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include "sal/config.h"
#include <iostream>
@@ -1387,7 +1389,7 @@ int Desktop::Main()
CommandLineArgs& rCmdLineArgs = GetCommandLineArgs();
-#ifdef LIBO_FEATURE_DESKTOP
+#if HAVE_FEATURE_DESKTOP
OUString aUnknown( rCmdLineArgs.GetUnknown() );
if ( !aUnknown.isEmpty() )
{
@@ -1452,7 +1454,7 @@ int Desktop::Main()
RTL_LOGFILE_CONTEXT_TRACE( aLog, "desktop (lo119109) Desktop::Main -> Lockfile" );
m_xLockfile.reset(new Lockfile);
-#ifdef LIBO_FEATURE_DESKTOP
+#if HAVE_FEATURE_DESKTOP
if ( !rCmdLineArgs.IsHeadless() && !rCmdLineArgs.IsInvisible() &&
!rCmdLineArgs.IsNoLockcheck() && !m_xLockfile->check( Lockfile_execWarning ))
{
@@ -1539,7 +1541,7 @@ int Desktop::Main()
*/
Application::GetDefaultDevice();
-#ifdef LIBO_FEATURE_DESKTOP
+#ifndef DISABLE_EXTENSIONS
// 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 b8cf153..aded249 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <cmdlineargs.hxx>
#include <vcl/svapp.hxx>
#include <rtl/uri.hxx>
@@ -442,7 +444,7 @@ bool CommandLineArgs::InterpretCommandLineParameter( const ::rtl::OUString& aArg
{
m_nologo = true;
}
-#ifdef LIBO_FEATURE_DESKTOP
+#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
else if ( oArg == "nolockcheck" )
{
m_nolockcheck = true;
diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx
index 071e2bb..bcade31 100644
--- a/desktop/source/app/officeipcthread.cxx
+++ b/desktop/source/app/officeipcthread.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
#include "app.hxx"
#include "officeipcthread.hxx"
@@ -59,7 +60,7 @@ namespace {
static char const ARGUMENT_PREFIX[] = "InternalIPC::Arguments";
-#ifdef LIBO_FEATURE_DESKTOP
+#if HAVE_FEATURE_DESKTOP
static char const SEND_ARGUMENTS[] = "InternalIPC::SendArguments";
static char const PROCESSING_DONE[] = "InternalIPC::ProcessingDone";
@@ -105,7 +106,7 @@ namespace desktop
namespace {
-#ifdef LIBO_FEATURE_DESKTOP
+#if HAVE_FEATURE_DESKTOP
class Parser: public CommandLineArgs::Supplier {
public:
@@ -451,7 +452,7 @@ void OfficeIPCThread::RequestsCompleted( int nCount )
OfficeIPCThread::Status OfficeIPCThread::EnableOfficeIPCThread()
{
-#ifdef LIBO_FEATURE_DESKTOP
+#if HAVE_FEATURE_DESKTOP
::osl::MutexGuard aGuard( GetMutex() );
if( pGlobalOfficeIPCThread.is() )
@@ -613,7 +614,7 @@ OfficeIPCThread::Status OfficeIPCThread::EnableOfficeIPCThread()
void OfficeIPCThread::DisableOfficeIPCThread(bool join)
{
-#ifdef LIBO_FEATURE_DESKTOP
+#if HAVE_FEATURE_DESKTOP
osl::ClearableMutexGuard aMutex( GetMutex() );
if( pGlobalOfficeIPCThread.is() )
@@ -673,7 +674,7 @@ void OfficeIPCThread::SetReady(
void OfficeIPCThread::execute()
{
-#ifdef LIBO_FEATURE_DESKTOP
+#if HAVE_FEATURE_DESKTOP
do
{
osl::StreamPipe aStreamPipe;
diff --git a/desktop/source/app/userinstall.cxx b/desktop/source/app/userinstall.cxx
index ec5c5ca..2a0aba9 100644
--- a/desktop/source/app/userinstall.cxx
+++ b/desktop/source/app/userinstall.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include "sal/config.h"
#include "userinstall.hxx"
@@ -116,7 +118,7 @@ namespace desktop {
}
}
-#ifdef LIBO_FEATURE_DESKTOP
+#if HAVE_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/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx
index 5c660fb..35c798e 100644
--- a/desktop/source/deployment/registry/help/dp_help.cxx
+++ b/desktop/source/deployment/registry/help/dp_help.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
#include "dp_help.hrc"
#include "dp_backend.h"
@@ -31,7 +32,7 @@
#include "uno/current_context.hxx"
#include "unotools/pathoptions.hxx"
-#ifdef LIBO_FEATURE_HELP
+#if HAVE_FEATURE_HELP
#include <helpcompiler/compilehelp.hxx>
#include <helpcompiler/HelpIndexer.hxx>
#endif
@@ -386,7 +387,7 @@ void BackendImpl::implProcessHelp(
data.dataUrl = xPackage->getURL();
if (!package->extensionContainsCompiledHelp())
{
-#ifdef LIBO_FEATURE_HELP
+#if HAVE_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 ff3c844..00c3e07 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
#include "services/autorecovery.hxx"
#include <loadenv/loadenv.hxx>
@@ -2020,7 +2021,7 @@ void AutoRecovery::implts_changeAllDocVisibility(sal_Bool bVisible)
*/
void lc_removeLockFile(AutoRecovery::TDocumentInfo& rInfo)
{
-#ifndef LIBO_FEATURE_DESKTOP
+#if !HAVE_FEATURE_MULTIUSER_ENVIRONMENT
(void) rInfo;
#else
if ( rInfo.Document.is() )
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index b87bb7b..792c1b7 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include "docsh.hxx"
#include "scitems.hxx"
@@ -635,7 +637,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
case SFX_EVENT_LOADFINISHED:
{
-#ifdef LIBO_FEATURE_DESKTOP
+#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
// the readonly documents should not be opened in shared mode
if ( HasSharedXMLFlagSet() && !SC_MOD()->IsInSharedDocLoading() && !IsReadOnly() )
{
@@ -660,7 +662,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
break;
case SFX_EVENT_VIEWCREATED:
{
-#ifdef LIBO_FEATURE_DESKTOP
+#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
if ( IsDocShared() && !SC_MOD()->IsInSharedDocLoading() )
{
ScAppOptions aAppOptions = SC_MOD()->GetAppOptions();
@@ -720,7 +722,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
break;
case SFX_EVENT_SAVEDOC:
{
-#ifdef LIBO_FEATURE_DESKTOP
+#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
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 f9c09de..70c911d 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <com/sun/star/embed/XEmbeddedObject.hpp>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
@@ -727,7 +729,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
if ( !pOtherDocSh->GetError() ) // nur Errors
{
sal_Bool bHadTrack = ( aDocument.GetChangeTrack() != NULL );
-#ifdef LIBO_FEATURE_DESKTOP
+#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
sal_uLong nStart = 0;
if ( nSlot == SID_DOCUMENT_MERGE && pChangeTrack )
{
@@ -767,7 +769,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
aDocument.SetChangeViewSettings(aChangeViewSet);
}
}
-#ifdef LIBO_FEATURE_DESKTOP
+#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
else if ( nSlot == SID_DOCUMENT_MERGE && IsDocShared() && pChangeTrack )
{
sal_uLong nEnd = pChangeTrack->GetActionMax();
@@ -898,7 +900,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
}
break;
-#ifdef LIBO_FEATURE_DESKTOP
+#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
case SID_SHARE_DOC:
{
ScViewData* pViewData = GetViewData();
@@ -2301,7 +2303,7 @@ IMPL_LINK( ScDocShell, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg )
return 0;
}
-#ifdef LIBO_FEATURE_DESKTOP
+#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
void ScDocShell::EnableSharedSettings( bool bEnable )
{
diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx
index 4b4e293..4c42538 100644
--- a/sc/source/ui/unoobj/confuno.cxx
+++ b/sc/source/ui/unoobj/confuno.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include "confuno.hxx"
#include "unonames.hxx"
#include "scdll.hxx"
@@ -257,7 +259,7 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
}
else if ( aPropertyName.compareToAscii( SC_UNO_SHAREDOC ) == 0 )
{
-#ifdef LIBO_FEATURE_DESKTOP
+#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
sal_Bool bDocShared = false;
if ( aValue >>= bDocShared )
{
@@ -418,7 +420,7 @@ uno::Any SAL_CALL ScDocumentConfiguration::getPropertyValue( const rtl::OUString
aRet <<= pDocShell->IsLoadReadonly();
else if ( aPropertyName.compareToAscii( SC_UNO_SHAREDOC ) == 0 )
{
-#ifdef LIBO_FEATURE_DESKTOP
+#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
ScUnoHelpFunctions::SetBoolInAny( aRet, pDocShell->HasSharedXMLFlagSet() );
#endif
}
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 80e9c2f..e46a6bd 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include "scitems.hxx"
#include <editeng/eeitem.hxx>
@@ -1531,7 +1533,7 @@ void ScViewFunc::DeleteCells( DelCellCmd eCmd, sal_Bool bRecord )
ScDocShell* pDocSh = GetViewData()->GetDocShell();
const ScMarkData& rMark = GetViewData()->GetMarkData();
-#ifdef LIBO_FEATURE_DESKTOP
+#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
// #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 caaf4e3..2070f6b 100644
--- a/sfx2/inc/sfx2/objsh.hxx
+++ b/sfx2/inc/sfx2/objsh.hxx
@@ -19,6 +19,8 @@
#ifndef _SFX_OBJSH_HXX
#define _SFX_OBJSH_HXX
+#include <config_features.h>
+
#include "sal/config.h"
#include "tools/solar.h"
@@ -271,7 +273,7 @@ public:
virtual sal_Bool AcceptStateUpdate() const;
sal_Bool IsHelpDocument() const;
-#ifdef LIBO_FEATURE_DESKTOP
+#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
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 18b1d3d..5afe39c 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <sfx2/docfile.hxx>
#include "sfx2/signaturestate.hxx"
@@ -135,7 +137,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;
-#ifdef LIBO_FEATURE_DESKTOP
+#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
bool IsSystemFileLockingUsed()
{
@@ -984,7 +986,7 @@ sal_Int8 SfxMedium::ShowLockedDocumentDialog( const uno::Sequence< ::rtl::OUStri
namespace
{
-#ifdef LIBO_FEATURE_DESKTOP
+#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
bool isSuitableProtocolForLocking(const String & rLogicName)
{
INetURLObject aUrl( rLogicName );
@@ -999,7 +1001,7 @@ namespace
// if user cancel the loading the ERROR_ABORT is set
bool SfxMedium::LockOrigFileOnDemand( sal_Bool bLoading, sal_Bool bNoUI )
{
-#ifndef LIBO_FEATURE_DESKTOP
+#if !HAVE_FEATURE_MULTIUSER_ENVIRONMENT
(void) bLoading;
(void) bNoUI;
return true;
@@ -2682,7 +2684,7 @@ void SfxMedium::CloseAndRelease()
void SfxMedium::UnlockFile( sal_Bool bReleaseLockStream )
{
-#ifndef LIBO_FEATURE_DESKTOP
+#if !HAVE_FEATURE_MULTIUSER_ENVIRONMENT
(void) bReleaseLockStream;
#else
if ( pImp->m_xLockingStream.is() )
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 2ac11f0..853eddb 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
#include <svl/inetmsg.hxx>
#include <tools/diagnose_ex.h>
@@ -495,7 +496,7 @@ void SfxObjectShell::SetModalMode_Impl( sal_Bool bModal )
}
}
-#ifdef LIBO_FEATURE_DESKTOP
+#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
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 e06de13..250a640 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include "sal/config.h"
#include <cassert>
@@ -2687,7 +2689,7 @@ sal_Bool SfxObjectShell::CommonSaveAs_Impl
if ( pFilterOptItem )
pSet->Put( *pFilterOptItem );
-#ifdef LIBO_FEATURE_DESKTOP
+#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
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 44d4ae3..b0a0213 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
#include "arrdecl.hxx"
#include <map>
@@ -390,7 +391,7 @@ SfxObjectShell::~SfxObjectShell()
{
pMedium->CloseAndReleaseStreams_Impl();
-#ifdef LIBO_FEATURE_DESKTOP
+#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
if ( IsDocShared() )
FreeSharedFile();
#endif
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 170ae60..232e04f 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <sfx2/sfxbasemodel.hxx>
#include <com/sun/star/task/XInteractionHandler.hpp>
@@ -2952,7 +2954,7 @@ void SfxBaseModel::impl_store( const ::rtl::OUString& sURL
}
catch( const lang::IllegalArgumentException& )
{
-#ifdef LIBO_FEATURE_DESKTOP
+#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
// 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 bac1cd4..c4cfce5 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
#include <stdio.h>
@@ -673,7 +674,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
pNewSet->ClearItem( SID_DOC_SALVAGE );
}
-#ifdef LIBO_FEATURE_DESKTOP
+#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
// 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 +791,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
xNewObj->SetReadOnlyUI( !bForEdit );
}
-#ifdef LIBO_FEATURE_DESKTOP
+#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
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 0b32fc7..0a732c2 100644
--- a/solenv/gbuild/Helper.mk
+++ b/solenv/gbuild/Helper.mk
@@ -218,10 +218,6 @@ 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 d026cd9..5a4161e 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -277,9 +277,6 @@ 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 1550da7..586016e 100644
--- a/sw/source/ui/uiview/viewport.cxx
+++ b/sw/source/ui/uiview/viewport.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
#include "hintids.hxx"
#include <vcl/help.hxx>
@@ -1056,7 +1057,7 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize )
return;
m_bInOuterResizePixel = sal_True;
-#ifdef LIBO_FEATURE_DESKTOP
+#if HAVE_FEATURE_DESKTOP
// feststellen, ob Scrollbars angezeigt werden duerfen
sal_Bool bShowH = sal_True,
bShowV = sal_True,
@@ -1203,7 +1204,7 @@ void SwView::SetZoomFactor( const Fraction &rX, const Fraction &rY )
sal_Bool SwView::UpdateScrollbars()
{
-#ifndef LIBO_FEATURE_DESKTOP
+#if !HAVE_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 8296e58..2729ae9 100644
--- a/vcl/source/app/dbggui.cxx
+++ b/vcl/source/app/dbggui.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
#include <sal/config.h>
@@ -1661,7 +1662,7 @@ void DbgPrintMsgBox( const char* pLine )
}
strcpy( aDbgOutBuf, pLine );
-#if defined UNX && defined LIBO_FEATURE_DESKTOP
+#if defined UNX && HAVE_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 81b002f..f2acdef 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <i18npool/mslangid.hxx>
#include "tools/time.hxx"
@@ -8325,7 +8327,7 @@ uno::Reference< XDragSource > Window::GetDragSource()
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
-#ifdef LIBO_FEATURE_DESKTOP
+#if HAVE_FEATURE_DESKTOP
if( mpWindowImpl->mpFrameData )
{
commit 556fe2c6128a32233b411a85c54177e1d5be1e0d
Author: Tor Lillqvist <tml at iki.fi>
Date: Wed Mar 27 09:22:38 2013 +0200
Add config_features.h platform or configurable high-level features
Defines HAVE_FEATURE_{DESKTOP,HELP,MULTIUSER_ENVIRONMENT} for
now. Using <config_features.h> will supersede checking the
LIBO_FEATURE_DESKTOP and LIBO_FEATURE_HELP passed on the compilation
command-line.
Change-Id: I9866e2fd142f5c1a64c8f5c74452a20de23c66e3
diff --git a/config_host/config_features.h.in b/config_host/config_features.h.in
new file mode 100644
index 0000000..48ac1dc
--- /dev/null
+++ b/config_host/config_features.h.in
@@ -0,0 +1,47 @@
+/* Configuration of high-level features that either 1) depend on the
+ * platform (but are common to several platforms so just checking for
+ * the feature is simpler than checking for several platforms), or 2)
+ * are build-time configurable.
+ */
+
+#ifndef CONFIG_FEATURES_H
+#define CONFIG_FEATURES_H
+
+/* DESKTOP - Whether we have a "normal" desktop UI or not.
+ *
+ * Non-DESKTOP in practice means touch-based mobile devices, Android
+ * or iOS for now. Support for those is work in pogress.
+ *
+ * Non-DESKTOP implies that the OS makes sure that only one instance
+ * of each LibreOffice-based "app" at a time can be running, and thus
+ * the LibreOffice code does not need to handle such things itself.
+ *
+ * Non-DESKTOP implies no traditional inter-app drag and drop concept.
+ */
+
+#define HAVE_FEATURE_DESKTOP 0
+
+/* HELP - Whether we have the "normal" desktop-style help mechanism
+ *
+ * Can be turned on/off also for desktop environments with
+ * --with-help, so thus a separate feature.
+ */
+
+#define HAVE_FEATURE_HELP 0
+
+/* MULTIUSER_ENVIRONMENT - Wheter running on a "normal" multi-user
+ * desktop (or server) OS
+ *
+ * Non-MULTIUSER implies that the OS makes sure that only one
+ * LibreOffice-based process at a time can be running that could
+ * access the same local documents, and that thus no locking of local
+ * documents is needed, and that no "shared documents" in Calc
+ * is meaningful.
+ *
+ * Non-MULTIUSER in practice means Android or iOS for now, so thus is
+ * work in progress.
+ */
+
+#define HAVE_FEATURE_MULTIUSER_ENVIRONMENT 0
+
+#endif
diff --git a/configure.ac b/configure.ac
index 4899b2b..6647b05 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2106,6 +2106,8 @@ dnl cross-compiling would imply a non-desktop OS.
if test $_os != iOS -a $_os != Android; then
BUILD_TYPE="$BUILD_TYPE DESKTOP"
+ AC_DEFINE(HAVE_FEATURE_DESKTOP)
+ AC_DEFINE(HAVE_FEATURE_MULTIUSER_ENVIRONMENT)
fi
DISABLE_EXPORT=''
@@ -4388,6 +4390,7 @@ AC_MSG_CHECKING([whether to build help])
if test "$with_help" = "yes" -a $_os != iOS -a $_os != Android; then
AC_MSG_RESULT([yes])
BUILD_TYPE="$BUILD_TYPE HELP"
+ AC_DEFINE(HAVE_FEATURE_HELP)
SCPDEFS="$SCPDEFS -DWITH_HELP"
GIT_NEEDED_SUBMODULES="helpcontent2 $GIT_NEEDED_SUBMODULES"
else
@@ -11863,6 +11866,7 @@ fi
AC_CONFIG_FILES([config_host.mk Makefile lo.xcent instsetoo_native/util/openoffice.lst])
AC_CONFIG_HEADERS([config_host/config_clang.h])
+AC_CONFIG_HEADERS([config_host/config_features.h])
AC_CONFIG_HEADERS([config_host/config_global.h])
AC_CONFIG_HEADERS([config_host/config_graphite.h])
AC_CONFIG_HEADERS([config_host/config_kde4.h])
commit f174c972ac3ef93804a28f9566559382697832f9
Author: Tor Lillqvist <tml at iki.fi>
Date: Wed Mar 27 09:12:31 2013 +0200
.gitignore already ignores config_*.h
Change-Id: I97e9fa6e8ad45a0cd07926d1f6d33652d9dd332c
diff --git a/config_host/README b/config_host/README
index 0e09752..5dd2d52 100644
--- a/config_host/README
+++ b/config_host/README
@@ -19,7 +19,6 @@ Adding a new setting:
- add config_host/config_XXX.h.in here, with just #ifndef include guard
- add AC_CONFIG_HEADERS([config_host/config_XXX.h]) next to the others
in configure.ac
- - add config_XXX.h to config_host/.gitignore
- add #define HAVE_FOO 0 to the config_host/config_XXX.h , possibly with a comment
(do not use #undef HAVE_FOO, unless the setting has more values than on/off)
- add #include <config_XXX.h> before any #if HAVE_FOO in a source file
More information about the Libreoffice-commits
mailing list