summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2013-05-02 20:17:20 +0300
committerTor Lillqvist <tml@iki.fi>2013-05-02 20:19:15 +0300
commit7de37ac7d633ba12cd90a38b2255130ef8e88b1a (patch)
tree222bcdd1ffab75bdbc479d6143d9f894792ffec9
parente8177f99008ee24283e0506e296edb59a16ff8d6 (diff)
Add --enable-desktop-gui-elements to show such even on non-DESKTOP platforms
Not my idea. Change-Id: If4874d97a2035588cd65ded9f281de0c3598b7d7
-rw-r--r--config_host/config_features.h.in10
-rw-r--r--configure.ac9
-rw-r--r--sfx2/source/appl/workwin.cxx2
-rw-r--r--sfx2/source/view/viewfrm.cxx2
-rw-r--r--sw/inc/viewopt.hxx10
5 files changed, 26 insertions, 7 deletions
diff --git a/config_host/config_features.h.in b/config_host/config_features.h.in
index 5d8e2d09683d..e288eefa0324 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 25fc5cd086e5..83b2d6a531a5 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 195278ebdc8b..97d04dd6cde5 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 3de0b3655b6c..6386ceb54c82 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 f5c16e4de920..a306bcfd2f46 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 ?