2010-10-14 08:30:41 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2004-05-10 15:21:34 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 17:53:10 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2004-05-10 15:21:34 +00:00
|
|
|
*
|
2010-02-12 15:01:35 +01:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2004-05-10 15:21:34 +00:00
|
|
|
*
|
2008-04-10 17:53:10 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2004-05-10 15:21:34 +00:00
|
|
|
*
|
2008-04-10 17:53:10 +00:00
|
|
|
* This file is part of OpenOffice.org.
|
2004-05-10 15:21:34 +00:00
|
|
|
*
|
2008-04-10 17:53:10 +00:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2004-05-10 15:21:34 +00:00
|
|
|
*
|
2008-04-10 17:53:10 +00:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2004-05-10 15:21:34 +00:00
|
|
|
*
|
2008-04-10 17:53:10 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2004-05-10 15:21:34 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
2006-09-16 21:49:50 +00:00
|
|
|
|
2004-05-10 15:21:34 +00:00
|
|
|
#include "swabstdlg.hxx"
|
|
|
|
|
|
|
|
#include <osl/module.hxx>
|
|
|
|
#include <tools/string.hxx>
|
2010-06-03 17:58:18 +02:00
|
|
|
#include <vcl/unohelp.hxx>
|
2004-05-10 15:21:34 +00:00
|
|
|
|
|
|
|
typedef SwAbstractDialogFactory* (__LOADONCALLAPI *SwFuncPtrCreateDialogFactory)();
|
|
|
|
|
2012-10-07 07:52:26 +03:00
|
|
|
#ifndef DISABLE_DYNLOADING
|
|
|
|
|
2007-10-15 11:15:35 +00:00
|
|
|
extern "C" { static void SAL_CALL thisModule() {} }
|
|
|
|
|
2012-10-07 07:52:26 +03:00
|
|
|
#else
|
|
|
|
|
|
|
|
extern "C" SwAbstractDialogFactory* SwCreateDialogFactory();
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2004-05-10 15:21:34 +00:00
|
|
|
SwAbstractDialogFactory* SwAbstractDialogFactory::Create()
|
|
|
|
{
|
2012-10-07 07:52:26 +03:00
|
|
|
#ifndef DISABLE_DYNLOADING
|
2004-05-10 15:21:34 +00:00
|
|
|
SwFuncPtrCreateDialogFactory fp = 0;
|
|
|
|
static ::osl::Module aDialogLibrary;
|
2011-01-17 15:06:54 +01:00
|
|
|
static const ::rtl::OUString sLibName(::vcl::unohelper::CreateLibraryName("swui", sal_True));
|
2011-04-29 14:07:24 +02:00
|
|
|
if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, String( sLibName ),
|
|
|
|
SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_LAZY ) )
|
2004-05-10 15:21:34 +00:00
|
|
|
fp = ( SwAbstractDialogFactory* (__LOADONCALLAPI*)() )
|
2010-10-27 11:38:46 +01:00
|
|
|
aDialogLibrary.getFunctionSymbol( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CreateDialogFactory")));
|
2004-05-10 15:21:34 +00:00
|
|
|
if ( fp )
|
|
|
|
return fp();
|
|
|
|
return 0;
|
2012-10-07 07:52:26 +03:00
|
|
|
#else
|
|
|
|
return SwCreateDialogFactory();
|
|
|
|
#endif
|
2004-05-10 15:21:34 +00:00
|
|
|
}
|
2010-10-14 08:30:41 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|