ooo-build r14358 - in trunk: . patches/dev300
- From: freuter svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r14358 - in trunk: . patches/dev300
- Date: Mon, 20 Oct 2008 12:54:46 +0000 (UTC)
Author: freuter
Date: Mon Oct 20 12:54:46 2008
New Revision: 14358
URL: http://svn.gnome.org/viewvc/ooo-build?rev=14358&view=rev
Log:
n#436441. Added patch from Caolan
Added:
trunk/patches/dev300/psprint.defconfig_changes.diff
Modified:
trunk/ChangeLog
trunk/patches/dev300/apply
Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply (original)
+++ trunk/patches/dev300/apply Mon Oct 20 12:54:46 2008
@@ -2764,3 +2764,5 @@
# Drop the lame and misleading tooltips for the icon on the desktop
# and in the Start Menu on Windows
win32-tooltips.diff, tml
+
+psprint.defconfig_changes.diff, #n436441, flr
\ No newline at end of file
Added: trunk/patches/dev300/psprint.defconfig_changes.diff
==============================================================================
--- (empty file)
+++ trunk/patches/dev300/psprint.defconfig_changes.diff Mon Oct 20 12:54:46 2008
@@ -0,0 +1,81 @@
+diff --git a/psprint/source/fontmanager/fontconfig.cxx b/psprint/source/fontmanager/fontconfig.cxx
+index 6753795..6e727ac 100644
+--- psprint/source/fontmanager/fontconfig.cxx
++++ psprint/source/fontmanager/fontconfig.cxx
+@@ -91,7 +91,6 @@ using namespace rtl;
+ class FontCfgWrapper
+ {
+ oslModule m_pLib;
+- FcConfig* m_pDefConfig;
+ FcFontSet* m_pOutlineSet;
+
+ FcBool (*m_pFcInit)();
+@@ -141,7 +140,6 @@ public:
+ bool isValid() const
+ { return m_pLib != NULL;}
+
+- FcConfig* getDefConfig() { return m_pDefConfig; }
+ FcFontSet* getFontSet();
+
+ FcBool FcInit()
+@@ -255,7 +253,6 @@ oslGenericFunction FontCfgWrapper::loadSymbol( const char* pSymbol )
+
+ FontCfgWrapper::FontCfgWrapper()
+ : m_pLib( NULL ),
+- m_pDefConfig( NULL ),
+ m_pOutlineSet( NULL )
+ {
+ OUString aLib( RTL_CONSTASCII_USTRINGPARAM( "libfontconfig.so.1" ) );
+@@ -385,8 +382,7 @@ FontCfgWrapper::FontCfgWrapper()
+
+
+ FcInit();
+- m_pDefConfig = FcConfigGetCurrent();
+- if( ! m_pDefConfig )
++ if( ! FcConfigGetCurrent() )
+ {
+ osl_unloadModule( (oslModule)m_pLib );
+ m_pLib = NULL;
+@@ -400,7 +396,7 @@ void FontCfgWrapper::addFontSet( FcSetName eSetName )
+ add only acceptable outlined fonts to our config,
+ for future fontconfig use
+ */
+- FcFontSet* pOrig = FcConfigGetFonts( getDefConfig(), eSetName );
++ FcFontSet* pOrig = FcConfigGetFonts( FcConfigGetCurrent(), eSetName );
+ if( !pOrig )
+ return;
+
+@@ -789,7 +785,7 @@ bool PrintFontManager::addFontconfigDir( const rtl::OString& rDirName )
+ if( nVersion <= 20400 )
+ return false;
+ const char* pDirName = (const char*)rDirName.getStr();
+- bool bRet = (rWrapper.FcConfigAppFontAddDir( rWrapper.getDefConfig(), (FcChar8*)pDirName ) == FcTrue);
++ bool bRet = (rWrapper.FcConfigAppFontAddDir( rWrapper.FcConfigGetCurrent(), (FcChar8*)pDirName ) == FcTrue);
+
+ #if OSL_DEBUG_LEVEL > 1
+ fprintf( stderr, "FcConfigAppFontAddDir( \"%s\") => %d\n", pDirName, bRet );
+@@ -909,13 +905,13 @@ rtl::OUString PrintFontManager::Substitute(const rtl::OUString& rFontName,
+ addtopattern(rWrapper, pPattern, eItalic, eWeight, eWidth, ePitch);
+
+ // query fontconfig for a substitute
+- rWrapper.FcConfigSubstitute( rWrapper.getDefConfig(), pPattern, FcMatchPattern );
++ rWrapper.FcConfigSubstitute( rWrapper.FcConfigGetCurrent(), pPattern, FcMatchPattern );
+ rWrapper.FcDefaultSubstitute( pPattern );
+
+ // process the result of the fontconfig query
+ FcResult eResult = FcResultNoMatch;
+ FcFontSet* pFontSet = rWrapper.getFontSet();
+- FcPattern* pResult = rWrapper.FcFontSetMatch( rWrapper.getDefConfig(), &pFontSet, 1, pPattern, &eResult );
++ FcPattern* pResult = rWrapper.FcFontSetMatch( rWrapper.FcConfigGetCurrent(), &pFontSet, 1, pPattern, &eResult );
+ rWrapper.FcPatternDestroy( pPattern );
+
+ FcFontSet* pSet = NULL;
+@@ -1049,7 +1045,7 @@ bool PrintFontManager::matchFont( FastPrintFontInfo& rInfo, const com::sun::star
+ if( ! rWrapper.isValid() )
+ return false;
+
+- FcConfig* pConfig = rWrapper.getDefConfig();
++ FcConfig* pConfig = rWrapper.FcConfigGetCurrent();
+ FcPattern* pPattern = rWrapper.FcPatternCreate();
+
+ OString aLangAttrib;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]