[Libreoffice-commits] core.git: config_host/config_features.h.in configure.ac sfx2/source sw/inc

Tor Lillqvist tml at iki.fi
Thu May 2 10:19:55 PDT 2013


 config_host/config_features.h.in |   10 ++++++++++
 configure.ac                     |    9 +++++++++
 sfx2/source/appl/workwin.cxx     |    2 +-
 sfx2/source/view/viewfrm.cxx     |    2 +-
 sw/inc/viewopt.hxx               |   10 +++++-----
 5 files changed, 26 insertions(+), 7 deletions(-)

New commits:
commit 7de37ac7d633ba12cd90a38b2255130ef8e88b1a
Author: Tor Lillqvist <tml at iki.fi>
Date:   Thu May 2 20:17:20 2013 +0300

    Add --enable-desktop-gui-elements to show such even on non-DESKTOP platforms
    
    Not my idea.
    
    Change-Id: If4874d97a2035588cd65ded9f281de0c3598b7d7

diff --git a/config_host/config_features.h.in b/config_host/config_features.h.in
index 5d8e2d0..e288eef 100644
--- a/config_host/config_features.h.in
+++ b/config_host/config_features.h.in
@@ -25,6 +25,16 @@
 
 #define HAVE_FEATURE_DESKTOP 0
 
+/* DESKTOP_GUI_ELEMENTS
+ *
+ * In the non-DESKTOP case, whether to still display (and enable
+ * interactive use of) traditional desktop-style GUI elements like
+ * toolbars and scrollbars, drawn and handled using mostly the normal
+ * LO code.
+ */
+
+#define HAVE_FEATURE_DESKTOP_GUI_ELEMENTS 0
+
 /* EXTENSIONS - Whether we have any extension mechanism at all
  *
  * Primarily intended for non-desktop platforms where supporting
diff --git a/configure.ac b/configure.ac
index 25fc5cd..83b2d6a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1123,6 +1123,12 @@ AC_ARG_ENABLE(silent-msi,
         [Enable MSI with LIMITUI=1 (silent install).]),
 ,)
 
+AC_ARG_ENABLE(desktop-gui-elements,
+    AS_HELP_STRING([--enable-desktop-gui-elements],
+        [Enable display and use of desktop style GUI elements
+         even on a non-desktop platform.]),
+,)
+
 AC_ARG_ENABLE(macosx-code-signing,
     AS_HELP_STRING([--enable-macosx-code-signing<=identity>],
         [Sign executables, dylibs, frameworks and the app bundle. The
@@ -2141,7 +2147,10 @@ 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_DESKTOP_GUI_ELEMENTS)
     AC_DEFINE(HAVE_FEATURE_MULTIUSER_ENVIRONMENT)
+elif test "$enable_desktop_gui_elements" = yes; then
+    AC_DEFINE(HAVE_FEATURE_DESKTOP_GUI_ELEMENTS)
 fi
 
 DISABLE_EXPORT=''
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index 195278e..97d04dd 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -595,7 +595,7 @@ SfxWorkWindow::SfxWorkWindow( Window *pWin, SfxBindings& rB, SfxWorkWindow* pPar
     bDockingAllowed(sal_True),
     bInternalDockingAllowed(sal_True),
     bAllChildrenVisible(sal_True),
-#if HAVE_FEATURE_DESKTOP
+#if HAVE_FEATURE_DESKTOP_GUI_ELEMENTS
     bIsFullScreen( sal_False ),
     bShowStatusBar( sal_True ),
 #else
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 3de0b36..6386ceb 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -155,7 +155,7 @@ SFX_IMPL_INTERFACE(SfxViewFrame,SfxShell,SfxResId(0))
 {
     SFX_CHILDWINDOW_REGISTRATION( SID_BROWSER );
     SFX_CHILDWINDOW_REGISTRATION( SID_RECORDING_FLOATWINDOW );
-#if HAVE_FEATURE_DESKTOP
+#if HAVE_FEATURE_DESKTOP_GUI_ELEMENTS
     SFX_OBJECTBAR_REGISTRATION( SFX_OBJECTBAR_FULLSCREEN | SFX_VISIBILITY_FULLSCREEN, SfxResId(RID_FULLSCREENTOOLBOX) );
     SFX_OBJECTBAR_REGISTRATION( SFX_OBJECTBAR_APPLICATION | SFX_VISIBILITY_STANDARD, SfxResId(RID_ENVTOOLBOX) );
 #endif
diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx
index f5c16e4..a306bcf 100644
--- a/sw/inc/viewopt.hxx
+++ b/sw/inc/viewopt.hxx
@@ -446,7 +446,7 @@ public:
 
     sal_Bool    IsViewVScrollBar() const
         {
-#if HAVE_FEATURE_DESKTOP
+#if HAVE_FEATURE_DESKTOP_GUI_ELEMENTS
             return nUIOptions & VIEWOPT_2_VSCROLLBAR ? sal_True : sal_False;
 #else
             return sal_False;
@@ -454,7 +454,7 @@ public:
         }
     sal_Bool    IsViewHScrollBar() const
         {
-#if HAVE_FEATURE_DESKTOP
+#if HAVE_FEATURE_DESKTOP_GUI_ELEMENTS
             return nUIOptions & VIEWOPT_2_HSCROLLBAR ? sal_True : sal_False;
 #else
             return sal_False;
@@ -497,7 +497,7 @@ public:
 
     sal_Bool        IsViewAnyRuler() const
         {
-#if HAVE_FEATURE_DESKTOP
+#if HAVE_FEATURE_DESKTOP_GUI_ELEMENTS
             return 0 != (nUIOptions & VIEWOPT_2_ANY_RULER);
 #else
             return sal_False;
@@ -508,7 +508,7 @@ public:
 
     sal_Bool        IsViewHRuler(sal_Bool bDirect = sal_False)     const
                         {
-#if HAVE_FEATURE_DESKTOP
+#if HAVE_FEATURE_DESKTOP_GUI_ELEMENTS
                             sal_Bool bRet = sal::static_int_cast< sal_Bool >( bDirect  ?
                                     0 != (nUIOptions & VIEWOPT_2_H_RULER) :
                                     !bReadonly ?
@@ -525,7 +525,7 @@ public:
 
     sal_Bool            IsViewVRuler(sal_Bool bDirect = sal_False) const
                         {
-#if HAVE_FEATURE_DESKTOP
+#if HAVE_FEATURE_DESKTOP_GUI_ELEMENTS
                             sal_Bool bRet = sal::static_int_cast< sal_Bool >( bDirect  ?
                                     0 !=(nUIOptions & VIEWOPT_2_V_RULER) :
                                     !bReadonly ?


More information about the Libreoffice-commits mailing list