Bugzilla – Attachment 55690 Details for
Bug 44719
extremely slow import of pptx ...
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
tweaked version of known-bad patch for testing ...
old-badness.diff (text/plain), 2.48 KB, created by
Michael Meeks
on 2012-01-17 10:14:29 UTC
(
hide
)
Description:
tweaked version of known-bad patch for testing ...
Filename:
MIME Type:
Creator:
Michael Meeks
Created:
2012-01-17 10:14:29 UTC
Size:
2.48 KB
patch
obsolete
>diff --git a/vcl/generic/fontmanager/fontsubst.cxx b/vcl/generic/fontmanager/fontsubst.cxx >index 4f3ec48..e4a87b3 100644 >--- a/vcl/generic/fontmanager/fontsubst.cxx >+++ b/vcl/generic/fontmanager/fontsubst.cxx >@@ -51,6 +51,11 @@ class FcPreMatchSubstititution > { > public: > bool FindFontSubstitute( FontSelectPattern& ) const; >+ // Known bad: >+private: >+ typedef ::boost::unordered_map< ::rtl::OUString, ::rtl::OUString, ::rtl::OUStringHash > >+ CachedFontMapType; >+ mutable CachedFontMapType maCachedFontMap; > }; > > class FcGlyphFallbackSubstititution >@@ -149,6 +154,15 @@ bool FcPreMatchSubstititution::FindFontSubstitute( FontSelectPattern &rFontSelDa > || 0 == rFontSelData.maSearchName.CompareIgnoreCaseToAscii( "opensymbol", 10) ) > return false; > >+ // Known bad: >+ CachedFontMapType::const_iterator itr = maCachedFontMap.find(rFontSelData.maTargetName); >+ if (itr != maCachedFontMap.end()) >+ { >+ // Cached substitution pair >+ rFontSelData.maSearchName = itr->second; >+ return true; >+ } >+ > //Note: see fdo#41556 if you feel compelled to cache the results here, > //remember that fontconfig can return e.g. an italic font for a non-italic > //input and/or different fonts depending on fontsize, bold, etc settings so >@@ -157,6 +171,10 @@ bool FcPreMatchSubstititution::FindFontSubstitute( FontSelectPattern &rFontSelDa > rtl::OUString aDummy; > const FontSelectPattern aOut = GetFcSubstitute( rFontSelData, aDummy ); > >+ // Known bad: >+ maCachedFontMap.insert( >+ CachedFontMapType::value_type(rFontSelData.maTargetName, aOut.maSearchName)); >+ > if( !aOut.maSearchName.Len() ) > return false; > >diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx >index bf2628c..7e4bdee 100755 >--- a/vcl/source/gdi/outdev3.cxx >+++ b/vcl/source/gdi/outdev3.cxx >@@ -3286,6 +3286,7 @@ ImplFontMetricData::ImplFontMetricData( const FontSelectPattern& rFontSelData ) > { > // initialize the members provided by the font request > mnWidth = rFontSelData.mnWidth; >+ mnSlant = rFontSelData.GetSlant(); > mnOrientation = sal::static_int_cast<short>(rFontSelData.mnOrientation); > > // intialize the used font name >@@ -3310,7 +3311,6 @@ ImplFontMetricData::ImplFontMetricData( const FontSelectPattern& rFontSelData ) > mnDescent = 0; > mnIntLeading = 0; > mnExtLeading = 0; >- mnSlant = 0; > mnMinKashida = 0; > > // reset metrics that are usually derived from the measurements
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 44719
: 55690