rpms/openoffice.org/devel openoffice.org-1.9.129.ooo54603.fontconfig.part3.patch, NONE, 1.1 openoffice.org.spec, 1.856, 1.857

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Wed Aug 23 09:40:37 UTC 2006


Author: caolanm

Update of /cvs/dist/rpms/openoffice.org/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv23278

Modified Files:
	openoffice.org.spec 
Added Files:
	openoffice.org-1.9.129.ooo54603.fontconfig.part3.patch 
Log Message:
add openoffice.org-1.9.129.ooo54603.fontconfig.part3.patch

openoffice.org-1.9.129.ooo54603.fontconfig.part3.patch:
 inc/outdev.h             |    3 +--
 source/gdi/outdev3.cxx   |   42 +++++++++++++++++++++++-------------------
 source/gdi/sallayout.cxx |    4 +---
 3 files changed, 25 insertions(+), 24 deletions(-)

--- NEW FILE openoffice.org-1.9.129.ooo54603.fontconfig.part3.patch ---
diff -ru vcl.orig/inc/outdev.h vcl/inc/outdev.h
--- vcl.orig/inc/outdev.h	2006-08-23 10:05:16.000000000 +0100
+++ vcl/inc/outdev.h	2006-08-23 10:13:54.000000000 +0100
@@ -213,8 +213,7 @@
                              const Font& rFont, const Size& rSize, ImplFontSubstEntry* pDevSpecific );
     ImplFontEntry*      GetFallback( ImplDevFontList* pFontList,
                                      const Font& rFont, const Size& rSize,
-                                     int nFallbackLevel, sal_Unicode *pMissingUnicodes,
-                                     int nMissingUnicodes );
+                                     int nFallbackLevel, std::vector<sal_Unicode> &rMissingGlyphs );
     void                Release( ImplFontEntry* );
     void                Invalidate();
 };
diff -ru vcl.orig/source/gdi/outdev3.cxx vcl/source/gdi/outdev3.cxx
--- vcl.orig/source/gdi/outdev3.cxx	2006-08-23 10:05:02.000000000 +0100
+++ vcl/source/gdi/outdev3.cxx	2006-08-23 10:28:30.000000000 +0100
@@ -3128,7 +3128,7 @@
 
 ImplFontEntry* ImplFontCache::GetFallback( ImplDevFontList* pFontList,
      const Font& rOrigFont, const Size& rSize, int nFallbackLevel,
-     sal_Unicode *pMissingUnicodes, int nMissingUnicodes )
+     std::vector<sal_Unicode> &rMissingGlyphs )
 {
     ImplFontEntry*      pFallbackFont = NULL;
     bool                cached = false;
@@ -3165,14 +3165,12 @@
         cached = true;
     }
 
-    std::vector<sal_Unicode> aGlyphs;
-    for (int i=0; i < nMissingUnicodes; ++i)
-        aGlyphs.push_back(pMissingUnicodes[i]);
+    std::vector<sal_Unicode> aGlyphs(rMissingGlyphs);
 
     // Try cached fallbacks first
-    if ( !symbolFont && !aGlyphs.empty() )
+    if ( !symbolFont && !rMissingGlyphs.empty() )
     {
-        aSelData.maSearchName = pOrigFontEntry->GetFallbackForUnicode( aGlyphs[0] );
+        aSelData.maSearchName = pOrigFontEntry->GetFallbackForUnicode( rMissingGlyphs[0] );
         if ( aSelData.maSearchName.Len() )
             cached = true;
     }
@@ -3180,10 +3178,24 @@
     if ( !cached )
     {
         String aName(GetFcSubstitute( aSelData, aGlyphs ));
-      if (aName.Len())
-            aSelData.maSearchName = aName;
+		if (aName.Len())
+			aSelData.maSearchName = aName;
     }
 
+	if (!rMissingGlyphs.empty())
+	{
+        std::vector<sal_Unicode>::const_iterator aEnd = aGlyphs.end();
+        for (std::vector<sal_Unicode>::const_iterator aI = aGlyphs.begin(); aI != aEnd; ++aI)
+		{
+            rMissingGlyphs.erase(std::remove(rMissingGlyphs.begin(), rMissingGlyphs.end(), *aI));
+
+			//In this case only the first missing symbol has been taken into account, and is 
+			//known safe to replace
+			if (cached || symbolFont)
+				break;
+		}
+	}
+
     // Check our font instance cache first, if not found then
     // add this ImplFontSelectData to the cache along with its ImplFontEntry
     FontInstanceList::const_iterator it = maFontInstanceList.find( aSelData );
@@ -6257,14 +6269,9 @@
 #endif
     int nCharPos = -1;
     bool bRTL = false;
-    sal_Unicode *pMissingUnicodes = new sal_Unicode[8];
-    int nMissingUnicodes = 0;
-
+    std::vector<sal_Unicode> aGlyphs;
     for( int i=0; i<8 && rLayoutArgs.GetNextPos( &nCharPos, &bRTL); ++i )
-    {
-        pMissingUnicodes[i] = rLayoutArgs.mpStr[ nCharPos ];
-        nMissingUnicodes++;
-    }
+        aGlyphs.push_back(rLayoutArgs.mpStr[ nCharPos ]);
     rLayoutArgs.ResetPos();
 
     ImplFontSelectData aFontSelData = mpFontEntry->maFontSelData;
@@ -6282,8 +6289,7 @@
     {
         // find a font family suited for glyph fallback
         ImplFontEntry* pFallbackFont = mpFontCache->GetFallback( mpFontList,
-            maFont, aFontSize, nFallbackLevel-nDevSpecificFallback,
-            (nMissingUnicodes ? pMissingUnicodes : NULL), nMissingUnicodes );
+            maFont, aFontSize, nFallbackLevel-nDevSpecificFallback, aGlyphs);
         if( !pFallbackFont )
             break;
 
@@ -6335,8 +6341,6 @@
             break;
     }
 
-    delete[] pMissingUnicodes;
-
     if( pMultiSalLayout && pMultiSalLayout->LayoutText( rLayoutArgs ) )
         pSalLayout = pMultiSalLayout;
 
diff -ru vcl.orig/source/gdi/sallayout.cxx vcl/source/gdi/sallayout.cxx
--- vcl.orig/source/gdi/sallayout.cxx	2006-08-23 10:05:02.000000000 +0100
+++ vcl/source/gdi/sallayout.cxx	2006-08-23 10:06:12.000000000 +0100
@@ -1715,14 +1715,12 @@
         if( n > 0 )
         {
             // drop the NotDef glyphs in the base layout run if a fallback run exists
-            while( maFallbackRuns[ n-1 ].PosIsInRun( nCharPos[0] ) )
+            if ( maFallbackRuns[ n-1 ].PosIsInRun( nCharPos[0] ) )
             {
                 mpLayouts[0]->DropGlyph( nStartOld[0] );
                 nStartOld[0] = nStartNew[0];
                 nValid[0] = mpLayouts[0]->GetNextGlyphs( 1, &nDummy, aPos,
                     nStartNew[0], &nGlyphAdv[0], &nCharPos[0] );
-                if( !nValid[0] )
-                   break;
             }
         }
 


Index: openoffice.org.spec
===================================================================
RCS file: /cvs/dist/rpms/openoffice.org/devel/openoffice.org.spec,v
retrieving revision 1.856
retrieving revision 1.857
diff -u -r1.856 -r1.857
--- openoffice.org.spec	22 Aug 2006 11:22:13 -0000	1.856
+++ openoffice.org.spec	23 Aug 2006 09:40:33 -0000	1.857
@@ -124,6 +124,7 @@
 Patch56: openoffice.org-2.0.4.ooo68822.sw.recursiveim.patch
 Patch57: openoffice.org-2.0.4.ooo68851.framework.disablemenuifempty.patch
 Patch58: openoffice.org-2.0.4.oooXXXXX.vcl.x86_64.impressatk.patch
+Patch59: openoffice.org-1.9.129.ooo54603.fontconfig.part3.patch
 
 %define instdir %{_libdir}/openoffice.org2.0
 
@@ -982,6 +983,7 @@
 %patch56 -p1 -b .ooo68822.sw.recursiveim.patch
 %patch57 -p1 -b .ooo68851.framework.disablemenuifempty.patch
 %patch58 -p1 -b .oooXXXXX.vcl.x86_64.impressatk.patch
+%patch59 -p1 -b .ooo54603.fontconfig.part3.patch
 
 tar xzf %{SOURCE1}
 
@@ -2513,6 +2515,7 @@
 - drop openoffice.org-2.0.3.oooXXXXX.atkbroken.vcl.patch, fixed in gnome now
 - rh#203497# -> openoffice.org-2.0.4.ooo68851.framework.disablemenuifempty.patch
 - rh#203439# -> openoffice.org-2.0.4.oooXXXXX.vcl.x86_64.impressatk.patch
+- rh#203063# -> openoffice.org-1.9.129.ooo54603.fontconfig.part3.patch
 
 * Thu Aug 10 2006 Caolan McNamara <caolanm at redhat.com> - 1:2.0.4-1.1
 - rh#201447# -> openoffice.org-2.0.3.ooo68339.vcl.maskingtoomanybytes.patch




More information about the fedora-cvs-commits mailing list