RepositoryExternal.mk | 4 + config_host.mk.in | 1 configure.in | 50 +++++++++++----------- i18npool/Library_i18nisolang1.mk | 5 -- i18npool/source/languagetag/languagetag.cxx | 2 liblangtag/makefile.mk | 4 - scp2/InstallModule_ooo.mk | 1 scp2/source/ooo/directory_ooo.scp | 2 scp2/source/ooo/file_extra_ooo.scp | 2 scp2/source/ooo/file_library_ooo.scp | 4 - vcl/win/source/gdi/salnativewidgets-luna.cxx | 61 +++++++++++++++------------ 11 files changed, 76 insertions(+), 60 deletions(-)
New commits: commit 03dbe1a97c0050365ac3820575134bace0908e2b Author: Jan Holesovsky <ke...@suse.cz> Date: Fri Aug 10 16:16:21 2012 +0200 Windows toolbars: Use our own theming even for vertical or bottom toolbars. Change-Id: I4836d7f2055c4811f0e6ccdc87dc58895528b3f8 diff --git a/vcl/win/source/gdi/salnativewidgets-luna.cxx b/vcl/win/source/gdi/salnativewidgets-luna.cxx index 065e450..8c343fe 100644 --- a/vcl/win/source/gdi/salnativewidgets-luna.cxx +++ b/vcl/win/source/gdi/salnativewidgets-luna.cxx @@ -457,31 +457,41 @@ void ImplConvertSpinbuttonValues( int nControlPart, const ControlState& rState, pRect->bottom = rRect.Bottom()+1; } -void impl_drawAeroToolbar( HDC hDC, RECT rc ) +/// Draw an own toolbar style on Windows Vista or later, looks better there +void impl_drawAeroToolbar( HDC hDC, RECT rc, bool bHorizontal ) { - const long GRADIENT_HEIGHT = 32; + if ( rc.top == 0 && bHorizontal ) + { + const long GRADIENT_HEIGHT = 32; - long gradient_break = rc.top; - GRADIENT_RECT g_rect[1] = { { 0, 1 } }; + long gradient_break = rc.top; + GRADIENT_RECT g_rect[1] = { { 0, 1 } }; - // very slow gradient at the top (if we have space for that) - if ( rc.bottom - rc.top > GRADIENT_HEIGHT ) - { - gradient_break = rc.bottom - GRADIENT_HEIGHT; + // very slow gradient at the top (if we have space for that) + if ( rc.bottom - rc.top > GRADIENT_HEIGHT ) + { + gradient_break = rc.bottom - GRADIENT_HEIGHT; + + TRIVERTEX vert[2] = { + { rc.left, rc.top, 0xff00, 0xff00, 0xff00, 0xff00 }, + { rc.right, gradient_break, 0xfa00, 0xfa00, 0xfa00, 0xff00 }, + }; + GradientFill( hDC, vert, 2, g_rect, 1, GRADIENT_FILL_RECT_V ); + } + // gradient at the bottom TRIVERTEX vert[2] = { - { rc.left, rc.top, 0xff00, 0xff00, 0xff00, 0xff00 }, - { rc.right, gradient_break, 0xfa00, 0xfa00, 0xfa00, 0xff00 }, + { rc.left, gradient_break, 0xfa00, 0xfa00, 0xfa00, 0xff00 }, + { rc.right, rc.bottom, 0xf000, 0xf000, 0xf000, 0xff00 } }; GradientFill( hDC, vert, 2, g_rect, 1, GRADIENT_FILL_RECT_V ); } - - // gradient at the bottom - TRIVERTEX vert[2] = { - { rc.left, gradient_break, 0xfa00, 0xfa00, 0xfa00, 0xff00 }, - { rc.right, rc.bottom, 0xf000, 0xf000, 0xf000, 0xff00 } - }; - GradientFill( hDC, vert, 2, g_rect, 1, GRADIENT_FILL_RECT_V ); + else + { + HBRUSH hbrush = CreateSolidBrush( RGB( 0xf0, 0xf0, 0xf0 ) ); + FillRect( hDC, &rc, hbrush ); + DeleteObject( hbrush ); + } } sal_Bool ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc, @@ -909,17 +919,16 @@ sal_Bool ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc, { const ToolbarValue *pValue = static_cast<const ToolbarValue*>(&aValue); if( pValue->mbIsTopDockingArea ) - { rc.top = 0; // extend potential gradient to cover menu bar as well + } - // make it more compatible with Aero - if( ImplGetSVData()->maNWFData.mbDockingAreaAvoidTBFrames ) - { - impl_drawAeroToolbar( hDC, rc ); - return sal_True; - } - } + // make it more compatible with Aero + if( ImplGetSVData()->maNWFData.mbDockingAreaAvoidTBFrames ) + { + impl_drawAeroToolbar( hDC, rc, nPart == PART_DRAW_BACKGROUND_HORZ ); + return sal_True; } + return ImplDrawTheme( hTheme, hDC, iPart, iState, rc, aCaption); } } @@ -936,7 +945,7 @@ sal_Bool ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc, // make it more compatible with Aero if( ImplGetSVData()->maNWFData.mbDockingAreaAvoidTBFrames ) { - impl_drawAeroToolbar( hDC, rc ); + impl_drawAeroToolbar( hDC, rc, true ); return sal_True; } } commit 6a7b32b09e621364239bca6ec02c858b122e07b8 Author: Jan Holesovsky <ke...@suse.cz> Date: Fri Aug 10 10:27:54 2012 +0200 Implement --disable-liblangtag, to be able to build without that. Change-Id: Ic38d0282dba99efe2ecc45142a927ba3d8fa167d diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index 2fd6e5e..4216bf2 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -462,6 +462,8 @@ endef endif # SYSTEM_GLIB +ifeq ($(ENABLE_LIBLANGTAG),YES) + ifeq ($(SYSTEM_LIBLANGTAG),YES) define gb_LinkTarget__use_liblangtag @@ -495,6 +497,8 @@ endef endif # SYSTEM_LIBLANGTAG +endif # ENABLE_LIBLANGTAG + ifeq ($(SYSTEM_NEON),YES) diff --git a/config_host.mk.in b/config_host.mk.in index a3501f1..717383b 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -125,6 +125,7 @@ export ENABLE_TDE=@ENABLE_TDE@ export ENABLE_KAB=@ENABLE_KAB@ export ENABLE_KDE4=@ENABLE_KDE4@ export ENABLE_KDE=@ENABLE_KDE@ +export ENABLE_LIBLANGTAG=@ENABLE_LIBLANGTAG@ export ENABLE_LIBRSVG=@ENABLE_LIBRSVG@ export ENABLE_LOCKDOWN=@ENABLE_LOCKDOWN@ export ENABLE_LOMENUBAR=@ENABLE_LOMENUBAR@ diff --git a/configure.in b/configure.in index 7860aa2..e060457 100644 --- a/configure.in +++ b/configure.in @@ -1066,6 +1066,12 @@ AC_ARG_ENABLE(winegcc, needed for MinGW cross-compilation.]), ) +AC_ARG_ENABLE(liblangtag, + AS_HELP_STRING([--disable-liblangtag], + [Disable use of liblangtag, and insted use an own simple + implementation.]), +) + dnl =================================================================== dnl Optional Packages (--with/without-) dnl =================================================================== @@ -11084,37 +11090,33 @@ else fi AC_SUBST(SYSTEM_GLIB) -dnl Get system's glib flags and libs. -dnl The i18npool LanguageTag wrapper uses it for liblangtag. +dnl =================================================================== +dnl Test whether to use liblangtag +dnl =================================================================== +ENABLE_LIBLANGTAG= +SYSTEM_LIBLANGTAG= GLIB_CFLAGS='' GLIB_LIBS='' -if test "$SYSTEM_GLIB" = YES; then - PKG_CHECK_MODULES( GLIB, glib-2.0 ) -else - case "$_os" in - iOS|Android) - ;; - *) - BUILD_TYPE="$BUILD_TYPE GLIB" - ;; - esac -fi -AC_SUBST(GLIB_CFLAGS) -AC_SUBST(GLIB_LIBS) +if test "$enable_liblangtag" = "yes" -o \( "$enable_liblangtag" = "" -a "$CROSS_COMPILING" != "YES" \); then + ENABLE_LIBLANGTAG=YES + dnl Get system's glib flags and libs. + dnl The i18npool LanguageTag wrapper uses it for liblangtag. -dnl So far AFAIK no system has liblangtag, set this unconditionally for now. -dnl Except for Android and iOS where we don't want liblangtag. + if test "$SYSTEM_GLIB" = YES; then + PKG_CHECK_MODULES( GLIB, glib-2.0 ) + else + BUILD_TYPE="$BUILD_TYPE GLIB" + fi -SYSTEM_LIBLANGTAG=NO -case "$_os" in -iOS|Android) - ;; -*) + dnl So far AFAIK no system has liblangtag, set this unconditionally for now. + dnl TODO Allow system liblangtag BUILD_TYPE="$BUILD_TYPE LIBLANGTAG" - ;; -esac +fi +AC_SUBST(ENABLE_LIBLANGTAG) AC_SUBST(SYSTEM_LIBLANGTAG) +AC_SUBST(GLIB_CFLAGS) +AC_SUBST(GLIB_LIBS) dnl =================================================================== diff --git a/i18npool/Library_i18nisolang1.mk b/i18npool/Library_i18nisolang1.mk index e022680..d082503 100644 --- a/i18npool/Library_i18nisolang1.mk +++ b/i18npool/Library_i18nisolang1.mk @@ -54,12 +54,11 @@ $(eval $(call gb_Library_add_exception_objects,i18nisolang1,\ )) -ifneq ($(OS),ANDROID) -ifneq ($(OS),IOS) +ifeq ($(ENABLE_LIBLANGTAG),YES) +$(eval $(call gb_Library_add_defs,i18nisolang1,-DENABLE_LIBLANGTAG)) $(eval $(call gb_Library_use_external,i18nisolang1,glib)) $(eval $(call gb_Library_use_external,i18nisolang1,liblangtag)) endif -endif $(eval $(call gb_Library_use_external,i18nisolang1,libxml2)) diff --git a/i18npool/source/languagetag/languagetag.cxx b/i18npool/source/languagetag/languagetag.cxx index 8a60d19..4192374 100644 --- a/i18npool/source/languagetag/languagetag.cxx +++ b/i18npool/source/languagetag/languagetag.cxx @@ -15,7 +15,7 @@ //#define erDEBUG -#if !defined(ANDROID) && !defined(IOS) +#ifdef ENABLE_LIBLANGTAG #include <liblangtag/langtag.h> #else /* Replacement code for LGPL phobic and Android systems. diff --git a/liblangtag/makefile.mk b/liblangtag/makefile.mk index f244039..6acd160 100644 --- a/liblangtag/makefile.mk +++ b/liblangtag/makefile.mk @@ -26,9 +26,9 @@ LIBLANGTAG_MICRO=0 # --- Files -------------------------------------------------------- -.IF "$(SYSTEM_LIBLANGTAG)" == "YES" +.IF "$(ENABLE_LIBLANGTAG)" != "YES" || "$(SYSTEM_LIBLANGTAG)" == "YES" @all: - @echo "Using system liblangtag." + @echo "Not building liblangtag." .ENDIF TARFILE_NAME=liblangtag-$(LIBLANGTAG_MAJOR).$(LIBLANGTAG_MINOR) diff --git a/scp2/InstallModule_ooo.mk b/scp2/InstallModule_ooo.mk index 685b70e..4dff0df 100644 --- a/scp2/InstallModule_ooo.mk +++ b/scp2/InstallModule_ooo.mk @@ -42,6 +42,7 @@ $(eval $(call gb_InstallModule_define_if_set,scp2/ooo,\ ENABLE_KAB \ ENABLE_KDE \ ENABLE_KDE4 \ + ENABLE_LIBLANGTAG \ ENABLE_LOMENUBAR \ ENABLE_NSPLUGIN \ ENABLE_ONLINE_UPDATE \ diff --git a/scp2/source/ooo/directory_ooo.scp b/scp2/source/ooo/directory_ooo.scp index e001c38..063d1fe 100644 --- a/scp2/source/ooo/directory_ooo.scp +++ b/scp2/source/ooo/directory_ooo.scp @@ -671,7 +671,7 @@ Directory gid_Dir_Share_Autocorr Styles = (WORKSTATION, CREATE); End -#ifndef SYSTEM_LIBLANGTAG +#if defined( ENABLE_LIBLANGTAG ) && !defined( SYSTEM_LIBLANGTAG ) Directory gid_Dir_Share_Liblangtag ParentID = gid_Brand_Dir_Share; DosName = "liblangtag"; diff --git a/scp2/source/ooo/file_extra_ooo.scp b/scp2/source/ooo/file_extra_ooo.scp index 903d23f..843d43b 100644 --- a/scp2/source/ooo/file_extra_ooo.scp +++ b/scp2/source/ooo/file_extra_ooo.scp @@ -144,7 +144,7 @@ File gid_File_Extra_Glas_Red_Zip Name = "glas-red.zip"; End -#ifndef SYSTEM_LIBLANGTAG +#if defined( ENABLE_LIBLANGTAG ) && !defined( SYSTEM_LIBLANGTAG ) File gid_File_Extra_Liblangtag Dir = gid_Dir_Share_Liblangtag; USER_FILE_BODY; diff --git a/scp2/source/ooo/file_library_ooo.scp b/scp2/source/ooo/file_library_ooo.scp index eaeb58f..7197986 100644 --- a/scp2/source/ooo/file_library_ooo.scp +++ b/scp2/source/ooo/file_library_ooo.scp @@ -758,7 +758,7 @@ End #endif -#ifndef SYSTEM_LIBLANGTAG +#if defined( ENABLE_LIBLANGTAG ) && !defined( SYSTEM_LIBLANGTAG ) File gid_File_Lib_Langtag LIB_FILE_BODY; @@ -774,7 +774,7 @@ File gid_File_Lib_Langtag #endif End -#endif // SYSTEM_LIBLANGTAG +#endif // ENABLE_LIBLANGTAG #ifdef SOLAR_JAVA _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits