2010-10-14 08:30:41 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2011-03-31 10:05:04 +02:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
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
|
|
|
|
2012-12-09 10:08:10 -08:00
|
|
|
typedef SwAbstractDialogFactory* (SAL_CALL *SwFuncPtrCreateDialogFactory)();
|
2004-05-10 15:21:34 +00:00
|
|
|
|
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 ) )
|
2012-12-09 10:08:10 -08:00
|
|
|
fp = ( SwAbstractDialogFactory* (SAL_CALL*)() )
|
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: */
|