[Libreoffice-commits] core.git: sc/Module_sc.mk sc/source sd/Module_sd.mk sd/source sw/Module_sw.mk sw/source

Matúš Kukan matus.kukan at collabora.com
Wed Feb 19 12:27:42 CET 2014


 sc/Module_sc.mk                    |    2 +-
 sc/source/ui/attrdlg/scabstdlg.cxx |   11 +++++++----
 sd/Module_sd.mk                    |    2 +-
 sd/source/ui/dlg/sdabstdlg.cxx     |   11 +++++++----
 sw/Module_sw.mk                    |    5 ++---
 sw/source/ui/dialog/swabstdlg.cxx  |   11 +++++++----
 6 files changed, 25 insertions(+), 17 deletions(-)

New commits:
commit 9ad3fc29dd98167c35fcb599da0b4e764ddf04dd
Author: Matúš Kukan <matus.kukan at collabora.com>
Date:   Wed Feb 19 12:21:12 2014 +0100

    Avoid app specific CreateDialogFactory code for non-DESKTOP.
    
    As happened in 7e9ac5952711400ad856b3328c5cc00c05cec6f2 for cui library.
    
    Change-Id: If51201eb452d4b84729b37949fb9b949020b47b8

diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk
index 094290a..fae40f5 100644
--- a/sc/Module_sc.mk
+++ b/sc/Module_sc.mk
@@ -14,7 +14,7 @@ $(eval $(call gb_Module_add_targets,sc,\
 	Library_sc \
 	Library_scd \
 	Library_scfilt \
-	Library_scui \
+	$(call gb_Helper_optional,DESKTOP,Library_scui) \
 ))
 
 $(eval $(call gb_Module_add_l10n_targets,sc,\
diff --git a/sc/source/ui/attrdlg/scabstdlg.cxx b/sc/source/ui/attrdlg/scabstdlg.cxx
index 10be258..88768ed 100644
--- a/sc/source/ui/attrdlg/scabstdlg.cxx
+++ b/sc/source/ui/attrdlg/scabstdlg.cxx
@@ -17,6 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <config_features.h>
 
 #include "scabstdlg.hxx"
 
@@ -38,8 +39,9 @@ extern "C" ScAbstractDialogFactory* ScCreateDialogFactory();
 
 ScAbstractDialogFactory* ScAbstractDialogFactory::Create()
 {
-#ifndef DISABLE_DYNLOADING
     ScFuncPtrCreateDialogFactory fp = 0;
+#if HAVE_FEATURE_DESKTOP
+#ifndef DISABLE_DYNLOADING
     static ::osl::Module aDialogLibrary;
 
     OUStringBuffer aStrBuf;
@@ -49,12 +51,13 @@ ScAbstractDialogFactory* ScAbstractDialogFactory::Create()
                                                              SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_LAZY ) )
         fp = ( ScAbstractDialogFactory* (SAL_CALL*)() )
             aDialogLibrary.getFunctionSymbol( OUString("CreateDialogFactory") );
+#else
+    fp = ScCreateDialogFactory();
+#endif
+#endif
     if ( fp )
         return fp();
     return 0;
-#else
-    return ScCreateDialogFactory();
-#endif
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/Module_sd.mk b/sd/Module_sd.mk
index 3321279..63a345e 100644
--- a/sd/Module_sd.mk
+++ b/sd/Module_sd.mk
@@ -13,7 +13,7 @@ $(eval $(call gb_Module_add_targets,sd,\
     Library_sd \
     Library_sdd \
     Library_sdfilt \
-    Library_sdui \
+    $(call gb_Helper_optional,DESKTOP,Library_sdui) \
     Package_opengl \
     Package_web \
     Package_xml \
diff --git a/sd/source/ui/dlg/sdabstdlg.cxx b/sd/source/ui/dlg/sdabstdlg.cxx
index b62eea7..34b737a 100644
--- a/sd/source/ui/dlg/sdabstdlg.cxx
+++ b/sd/source/ui/dlg/sdabstdlg.cxx
@@ -17,6 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <config_features.h>
 
 #include "sdabstdlg.hxx"
 
@@ -38,19 +39,21 @@ extern "C" SdAbstractDialogFactory* SdCreateDialogFactory();
 
 SdAbstractDialogFactory* SdAbstractDialogFactory::Create()
 {
-#ifndef DISABLE_DYNLOADING
     SdFuncPtrCreateDialogFactory fp = 0;
+#if HAVE_FEATURE_DESKTOP
+#ifndef DISABLE_DYNLOADING
     static ::osl::Module aDialogLibrary;
     static const OUString sLibName(::vcl::unohelper::CreateLibraryName("sdui", sal_True));
     if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, sLibName ) )
         fp = ( SdAbstractDialogFactory* (SAL_CALL*)() )
             aDialogLibrary.getFunctionSymbol( "CreateDialogFactory" );
+#else
+    fp = SdCreateDialogFactory();
+#endif
+#endif
     if ( fp )
         return fp();
     return 0;
-#else
-    return SdCreateDialogFactory();
-#endif
 }
 
 
diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk
index d5d3f44..804cea2 100644
--- a/sw/Module_sw.mk
+++ b/sw/Module_sw.mk
@@ -20,12 +20,11 @@
 $(eval $(call gb_Module_Module,sw))
 
 $(eval $(call gb_Module_add_targets,sw,\
-	$(if $(filter DESKTOP,$(BUILD_TYPE)), \
-		Executable_tiledrendering) \
+	$(call gb_Helper_optional,DESKTOP,Executable_tiledrendering) \
 	Library_msword \
 	Library_sw \
 	Library_swd \
-	Library_swui \
+	$(call gb_Helper_optional,DESKTOP,Library_swui) \
 ))
 
 $(eval $(call gb_Module_add_l10n_targets,sw,\
diff --git a/sw/source/ui/dialog/swabstdlg.cxx b/sw/source/ui/dialog/swabstdlg.cxx
index 64da0e3..db26ac1 100644
--- a/sw/source/ui/dialog/swabstdlg.cxx
+++ b/sw/source/ui/dialog/swabstdlg.cxx
@@ -17,6 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <config_features.h>
 
 #include "swabstdlg.hxx"
 
@@ -37,20 +38,22 @@ extern "C" SwAbstractDialogFactory* SwCreateDialogFactory();
 
 SwAbstractDialogFactory* SwAbstractDialogFactory::Create()
 {
-#ifndef DISABLE_DYNLOADING
     SwFuncPtrCreateDialogFactory fp = 0;
+#if HAVE_FEATURE_DESKTOP
+#ifndef DISABLE_DYNLOADING
     static ::osl::Module aDialogLibrary;
     static const OUString sLibName(::vcl::unohelper::CreateLibraryName("swui", sal_True));
     if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, sLibName,
                                                              SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_LAZY ) )
         fp = ( SwAbstractDialogFactory* (SAL_CALL*)() )
             aDialogLibrary.getFunctionSymbol( OUString("CreateDialogFactory"));
+#else
+    fp = SwCreateDialogFactory();
+#endif
+#endif
     if ( fp )
         return fp();
     return 0;
-#else
-    return SwCreateDialogFactory();
-#endif
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list