diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-09-29 22:39:55 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-09-29 23:17:59 +0200 |
commit | d3db7589f14ea1874095a66810e64577a6f004b0 (patch) | |
tree | bf38da395309e40c33e95fdcadd9851a61c633c5 /vcl/win | |
parent | 2434e019252cbc8b6a567eafe89ccfdf4749b838 (diff) |
vcl: fix some mysterious WNT font cache file
Apparently VCL maintains a mysterious fontnames.dat file in the user
config, but it's currently completely borked because the "styleName" is
written differently than it is read. Also increment the magic number to
ignore existing invalid files.
(presumably regression from 5c24789ca33d7b2b0c39626208cf0708fb470d95)
Change-Id: Id94eef1c56ab928d3d2e43ec13d9a5d91b37df90
Diffstat (limited to 'vcl/win')
-rw-r--r-- | vcl/win/gdi/salfont.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx index f7ad89a3e043..9741098ca3ee 100644 --- a/vcl/win/gdi/salfont.cxx +++ b/vcl/win/gdi/salfont.cxx @@ -87,7 +87,7 @@ private: protected: OUString OptimizeURL( const OUString& rURL ) const; - enum{ MAGIC = 0x12349876 }; // change if fontattrcache format changes + enum{ MAGIC = 0x12346789 }; // change if fontattrcache format changes public: ImplFontAttrCache(const OUString& rCacheFileName, @@ -139,8 +139,8 @@ ImplFontAttrCache::ImplFontAttrCache( const OUString& rFileNameURL, const OUStri aCacheFile.ReadInt16(n); aDFA.SetSymbolFlag(n != 0); - OUString styleName; - aCacheFile.ReadByteStringLine( styleName, RTL_TEXTENCODING_UTF8 ); + OUString const styleName = read_uInt16_lenPrefixed_uInt8s_ToOUString( + aCacheFile, RTL_TEXTENCODING_UTF8); aDFA.SetStyleName( styleName ); aFontAttributes[ aFontFileURL ] = aDFA; |