[Libreoffice-commits] .: Branch 'libreoffice-3-4' - vcl/unx
vcl/unx/source/fontmanager/fontconfig.cxx | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) New commits: commit 29a7cd20ac892003e3bbc622657a6028adc83759 Author: Caolán McNamara caol...@redhat.com Date: Wed Jan 11 20:47:54 2012 + Resolves:fdo#44078 fix unfortunate name alias mixups with DejaVu fonts Cherry-picked from http://cgit.freedesktop.org/libreoffice/core/commit/?h=libreoffice-3-5id=25b90909a7a22f6900abbe9df12570a24e528c9a. Signed-off-by: Stephan Bergmann sberg...@redhat.com diff --git a/vcl/unx/source/fontmanager/fontconfig.cxx b/vcl/unx/source/fontmanager/fontconfig.cxx index a60da2a..ab2ff6b 100644 --- a/vcl/unx/source/fontmanager/fontconfig.cxx +++ b/vcl/unx/source/fontmanager/fontconfig.cxx @@ -297,7 +297,7 @@ public: boost::unordered_map rtl::OString, rtl::OString, rtl::OStringHash m_aFontNameToLocalized; boost::unordered_map rtl::OString, rtl::OString, rtl::OStringHash m_aLocalizedToCanonical; private: -void cacheLocalizedFontNames(FcChar8 *origfontname, FcChar8 *bestfontname, const std::vector lang_and_element lang_and_elements); +void cacheLocalizedFontNames(const FcChar8 *origfontname, const FcChar8 *bestfontname, const std::vector lang_and_element lang_and_elements); }; oslGenericFunction FontCfgWrapper::loadSymbol( const char* pSymbol ) @@ -659,6 +659,7 @@ namespace std::vectorlang_and_element::const_iterator aEnd = elements.end(); bool alreadyclosematch = false; +bool found_fallback_englishname = false; for( std::vectorlang_and_element::const_iterator aIter = elements.begin(); aIter != aEnd; ++aIter ) { const char *pLang = (const char*)aIter-first; @@ -670,7 +671,8 @@ namespace } else if( alreadyclosematch ) { -// override candidate only if there is a perfect match +// current candidate matches lang of lang-TERRITORY +// override candidate only if there is a full match continue; } else if( rtl_str_compare( pLang, sLangMatch.getStr()) == 0) @@ -679,10 +681,18 @@ namespace candidate = aIter-second; alreadyclosematch = true; } +else if( found_fallback_englishname ) +{ +// already found an english fallback, don't override candidate +// unless there is a better language match +continue; +} else if( rtl_str_compare( pLang, en) == 0) { -// fallback to the english element name +// select a fallback candidate of the first english element +// name candidate = aIter-second; +found_fallback_englishname = true; } } return candidate; @@ -690,7 +700,8 @@ namespace } //Set up maps to quickly map between a fonts best UI name and all the rest of its names, and vice versa -void FontCfgWrapper::cacheLocalizedFontNames(FcChar8 *origfontname, FcChar8 *bestfontname, const std::vector lang_and_element lang_and_elements) +void FontCfgWrapper::cacheLocalizedFontNames(const FcChar8 *origfontname, const FcChar8 *bestfontname, +const std::vector lang_and_element lang_and_elements) { std::vectorlang_and_element::const_iterator aEnd = lang_and_elements.end(); for (std::vectorlang_and_element::const_iterator aIter = lang_and_elements.begin(); aIter != aEnd; ++aIter) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-4' - vcl/unx
vcl/unx/kde4/main.cxx | 11 +++ 1 file changed, 11 insertions(+) New commits: commit 4c2b93d96689f62c24ebdb2d4e87ac08d51ed53a Author: LuboÅ¡ LuÅák l.lu...@suse.cz Date: Thu Oct 20 14:41:50 2011 + let Qt call XInitThreads(), so that it knows it's been called (fdo#40298) Otherwise QPixmap complains when used outside of the main Qt thread and resets itself to null pixmap, eventually leading to crashes. Signed-off-by: Tomáš Chvátal tchva...@suse.cz diff --git a/vcl/unx/kde4/main.cxx b/vcl/unx/kde4/main.cxx index 32561d9..4365ad6 100644 --- a/vcl/unx/kde4/main.cxx +++ b/vcl/unx/kde4/main.cxx @@ -54,7 +54,18 @@ extern C { established, so protect X against itself */ if( ! ( pNoXInitThreads *pNoXInitThreads ) ) +{ +#if QT_VERSION = 0x040800 +// let Qt call XInitThreads(), so that also Qt knows it's been used +// (otherwise QPixmap may warn about threads not being initialized) +QApplication::setAttribute( Qt::AA_X11InitThreads ); +#else XInitThreads(); +// just in case somebody builds with old version and then upgrades Qt, +// otherwise this is a no-op +QApplication::setAttribute( static_cast Qt::ApplicationAttribute ( 10 )); +#endif +} #if QT_VERSION 0x05 // Qt 4.x support needs = 4.1.0 ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-4' - vcl/unx
vcl/unx/gtk/a11y/atkutil.cxx |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) New commits: commit 18744f661be29d5f41421c5b71b2434097e8ef4c Author: Caolán McNamara caol...@redhat.com Date: Thu Sep 29 21:59:28 2011 +0100 help gcc 4.6.1 out with ambiguity diff --git a/vcl/unx/gtk/a11y/atkutil.cxx b/vcl/unx/gtk/a11y/atkutil.cxx index 68bb949..e662f6e 100644 --- a/vcl/unx/gtk/a11y/atkutil.cxx +++ b/vcl/unx/gtk/a11y/atkutil.cxx @@ -312,8 +312,12 @@ void DocumentFocusListener::attachRecursive( uno::Reference accessibility::XAccessibleEventBroadcaster xBroadcaster = uno::Reference accessibility::XAccessibleEventBroadcaster (xContext, uno::UNO_QUERY); +if (!xBroadcaster.is()) +return; + // If not already done, add the broadcaster to the list and attach as listener. -if( xBroadcaster.is() m_aRefList.insert(xBroadcaster).second ) +uno::Reference uno::XInterface xInterface = xBroadcaster; +if( m_aRefList.insert(xInterface).second ) { xBroadcaster-addEventListener(static_cast accessibility::XAccessibleEventListener *(this)); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-4' - vcl/unx
vcl/unx/inc/plugins/gtk/gtkdata.hxx |1 - 1 file changed, 1 deletion(-) New commits: commit b3d61e7991192986dcd7103d3c86ee50f8425504 Author: Radek Doulik r...@novell.com Date: Tue Jun 21 13:25:16 2011 +0200 fix crash when changing screen resolution - m_aXineramaScreenIndexMap in GtkSalDisplay was shadowing the same field in SalDisplay, which led to crash in saldisp.cxx code in SalDisplay::addXineramaScreenUnique Signed-off-by: Bjoern Michaelsen bjoern.michael...@canonical.com Signed-off-by: Michael Meeks michael.me...@novell.com diff --git a/vcl/unx/inc/plugins/gtk/gtkdata.hxx b/vcl/unx/inc/plugins/gtk/gtkdata.hxx index 93443f9..db7ebcf 100644 --- a/vcl/unx/inc/plugins/gtk/gtkdata.hxx +++ b/vcl/unx/inc/plugins/gtk/gtkdata.hxx @@ -60,7 +60,6 @@ class GtkSalDisplay : public SalDisplay GdkDisplay*m_pGdkDisplay; GdkCursor *m_aCursors[ POINTER_COUNT ]; boolm_bStartupCompleted; -std::vector int m_aXineramaScreenIndexMap; GdkCursor* getFromXPM( const unsigned char *pBitmap, const unsigned char *pMask, int nWidth, int nHeight, int nXHot, int nYHot ); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits