summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@collabora.com>2014-02-24 16:51:31 +0100
committerMatúš Kukan <matus.kukan@collabora.com>2014-02-25 09:05:09 +0100
commitc47496fdf9f0ec396f15fb9ddde6bd8d244a1797 (patch)
tree739b259a6d79e53ddfc673c5c7d40ebc4c634387 /vcl
parent9d17966632a8e756c26b6569ff5e282a719a1ac1 (diff)
Add config_libraries.h definitions to get library names easily.
Works for libmerged too, so we can get rid of LIBO_MERGELIBS. And remove few more #defines in vcl. It's generated by gbuild, so probably abusing config_host directory. Open to improvements. Change-Id: I87ab109bf109e42751766011daf076e9cdf8f5ee
Diffstat (limited to 'vcl')
-rw-r--r--vcl/Library_vcl.mk8
-rw-r--r--vcl/source/app/svapp.cxx10
-rw-r--r--vcl/source/app/unohelp.cxx31
-rw-r--r--vcl/source/window/abstdlg.cxx3
-rw-r--r--vcl/source/window/builder.cxx2
-rw-r--r--vcl/unx/generic/plugadapt/salplug.cxx18
6 files changed, 13 insertions, 59 deletions
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index ff915330308f..3cdd784209df 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -45,8 +45,6 @@ $(eval $(call gb_Library_set_include,vcl,\
$(eval $(call gb_Library_add_defs,vcl,\
-DVCL_DLLIMPLEMENTATION \
- -DCUI_DLL_NAME=\"$(call gb_Library_get_runtime_filename,cui)\" \
- -DDLLPOSTFIX=$(gb_Library_DLLPOSTFIX) \
))
$(eval $(call gb_Library_use_sdk_api,vcl))
@@ -491,8 +489,6 @@ vcl_headless_freetype_code=\
ifeq ($(GUIBASE),unx)
$(eval $(call gb_Library_add_defs,vcl,\
- -DSAL_DLLPREFIX=\"$(gb_Library_SYSPRE)\" \
- -DSAL_DLLPOSTFIX=\"$(gb_Library_OOOEXT)\" \
-D_XSALSET_LIBNAME=\"$(call gb_Library_get_runtime_filename,spa)\" \
))
$(eval $(call gb_Library_add_exception_objects,vcl,\
@@ -518,8 +514,6 @@ endif
ifeq ($(ENABLE_HEADLESS),TRUE)
$(eval $(call gb_Library_add_defs,vcl,\
- -DSAL_DLLPREFIX=\"$(gb_Library_SYSPRE)\" \
- -DSAL_DLLPOSTFIX=\"$(gb_Library_OOOEXT)\" \
-D_XSALSET_LIBNAME=\"$(call gb_Library_get_runtime_filename,spa)\" \
))
$(eval $(call gb_Library_add_exception_objects,vcl,\
@@ -549,8 +543,6 @@ $(eval $(call gb_Library_add_libs,vcl,\
-llo-bootstrap \
))
$(eval $(call gb_Library_add_defs,vcl,\
- -DSAL_DLLPREFIX=\"$(gb_Library_SYSPRE)\" \
- -DSAL_DLLPOSTFIX=\"$(gb_Library_OOOEXT)\" \
-D_XSALSET_LIBNAME=\"$(call gb_Library_get_runtime_filename,spa)\" \
))
$(eval $(call gb_Library_add_exception_objects,vcl,\
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 3abd61839acb..123a0f505db3 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_libraries.h>
+
#include "comphelper/processfactory.hxx"
#include "osl/module.h"
@@ -1416,13 +1418,7 @@ UnoWrapperBase* Application::GetUnoWrapper( bool bCreateIfNotExist )
if ( !pSVData->mpUnoWrapper && bCreateIfNotExist && !bAlreadyTriedToCreate )
{
#ifndef DISABLE_DYNLOADING
- OUString aLibName = ::vcl::unohelper::CreateLibraryName(
-#ifdef LIBO_MERGELIBS
- "merged",
-#else
- "tk",
-#endif
- true );
+ OUString aLibName(LIBO_LIBRARY(tk));
oslModule hTkLib = osl_loadModuleRelative(
&thisModule, aLibName.pData, SAL_LOADMODULE_DEFAULT );
if ( hTkLib )
diff --git a/vcl/source/app/unohelp.cxx b/vcl/source/app/unohelp.cxx
index 24f40a2ddd92..356a4650d037 100644
--- a/vcl/source/app/unohelp.cxx
+++ b/vcl/source/app/unohelp.cxx
@@ -45,37 +45,6 @@ uno::Reference < i18n::XCharacterClassification > vcl::unohelper::CreateCharacte
return i18n::CharacterClassification::create( comphelper::getProcessComponentContext() );
}
-OUString vcl::unohelper::CreateLibraryName( const sal_Char* pModName, bool bSUPD )
-{
- // create variable library name suffixes
- OUString aDLLSuffix = OUString::createFromAscii( SAL_STRINGIFY( DLLPOSTFIX ) );
-
- OUString aLibName;
-
-#if defined( WNT)
- aLibName = OUString::createFromAscii( pModName );
- if ( bSUPD )
- {
- aLibName += aDLLSuffix;
- }
- aLibName += ".dll";
-#else
- aLibName = "lib";
- aLibName += OUString::createFromAscii( pModName );
- if ( bSUPD )
- {
- aLibName += aDLLSuffix;
- }
-#ifdef MACOSX
- aLibName += ".dylib";
-#else
- aLibName += ".so";
-#endif
-#endif
-
- return aLibName;
-}
-
void vcl::unohelper::NotifyAccessibleStateEventGlobally( const ::com::sun::star::accessibility::AccessibleEventObject& rEventObject )
{
::com::sun::star::uno::Reference< ::com::sun::star::awt::XExtendedToolkit > xExtToolkit( Application::GetVCLToolkit(), uno::UNO_QUERY );
diff --git a/vcl/source/window/abstdlg.cxx b/vcl/source/window/abstdlg.cxx
index 7cb7cdcd5cdc..5cdb7575579a 100644
--- a/vcl/source/window/abstdlg.cxx
+++ b/vcl/source/window/abstdlg.cxx
@@ -18,6 +18,7 @@
*/
#include <config_features.h>
+#include <config_libraries.h>
#include <rtl/ustring.hxx>
#include <osl/module.hxx>
@@ -37,7 +38,7 @@ VclAbstractDialogFactory* VclAbstractDialogFactory::Create()
#if HAVE_FEATURE_DESKTOP
#ifndef DISABLE_DYNLOADING
static ::osl::Module aDialogLibrary;
- if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, OUString( CUI_DLL_NAME ),
+ if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, LIBO_LIBRARY(cui),
SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_LAZY ) )
fp = ( VclAbstractDialogFactory* (SAL_CALL*)() )
aDialogLibrary.getFunctionSymbol( OUString("CreateDialogFactory") );
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index c845d8cf4d7e..79b84d5de454 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -1551,10 +1551,8 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri
sModuleBuf.append(SAL_DLLPREFIX);
#endif
sModuleBuf.append(OStringToOUString(name.copy(0, nDelim), RTL_TEXTENCODING_UTF8));
-#ifdef SAL_DLLEXTENSION
sModuleBuf.append(SAL_DLLEXTENSION);
#endif
-#endif
OUString sFunction(OStringToOUString(OString("make") + name.copy(nDelim+1), RTL_TEXTENCODING_UTF8));
#ifndef DISABLE_DYNLOADING
OUString sModule = sModuleBuf.makeStringAndClear();
diff --git a/vcl/unx/generic/plugadapt/salplug.cxx b/vcl/unx/generic/plugadapt/salplug.cxx
index 56d9fe525560..0fd81dc9ac18 100644
--- a/vcl/unx/generic/plugadapt/salplug.cxx
+++ b/vcl/unx/generic/plugadapt/salplug.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_libraries.h>
+
#include "osl/module.h"
#include "osl/process.h"
@@ -49,7 +51,11 @@ static SalInstance* tryInstance( const OUString& rModuleBase, bool bForce = fals
{
return NULL;
}
- OUString aModule(SAL_DLLPREFIX "vclplug_" + rModuleBase + SAL_DLLPOSTFIX);
+ OUString aModule(
+#ifdef SAL_DLLPREFIX
+ SAL_DLLPREFIX
+#endif
+ "vclplug_" + rModuleBase + "lo" SAL_DLLEXTENSION );
oslModule aMod = osl_loadModuleRelative(
reinterpret_cast< oslGenericFunction >( &tryInstance ), aModule.pData,
@@ -111,15 +117,7 @@ static SalInstance* tryInstance( const OUString& rModuleBase, bool bForce = fals
static DesktopType get_desktop_environment()
{
- OUString aModule(
- SAL_DLLPREFIX
-#if defined LIBO_MERGELIBS
- "merged"
-#else
- "desktop_detector"
-#endif
- SAL_DLLPOSTFIX);
-
+ OUString aModule(LIBO_LIBRARY(desktop_detector));
oslModule aMod = osl_loadModuleRelative(
reinterpret_cast< oslGenericFunction >( &tryInstance ), aModule.pData,
SAL_LOADMODULE_DEFAULT );