diff options
author | Michael Meeks <michael.meeks@suse.com> | 2013-07-24 19:48:43 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2013-07-24 20:38:56 +0100 |
commit | dda3686acde4911f70f07724247e822f8b3dbd90 (patch) | |
tree | 57fe287a7b59ff421920d6ad36d3fdf316693d4b /vcl | |
parent | 8b12405341bb5aea9822bb9fb517f930aa75f704 (diff) |
fdo#67086 - clear device font list before re-fetching it.
Seemingly if this is done in the other order, then ImplUpdateFontData
reads the old font list into mpGraphics leaving pointers around that
are then freed by ClearDevFontCache -> GlyphCache::ClearFontCache
Change-Id: I06fdc428c782820dd9f98cf77dc0eef486a096ee
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/outdev3.cxx | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index e023c8160ea3..f5ef5adc4422 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -237,6 +237,24 @@ void OutputDevice::ImplUpdateAllFontData( bool bNewFontLists ) { ImplSVData* pSVData = ImplGetSVData(); + // clear global font lists to have them updated + pSVData->maGDIData.mpScreenFontCache->Invalidate(); + if ( bNewFontLists ) + { + pSVData->maGDIData.mpScreenFontList->Clear(); + Window * pFrame = pSVData->maWinData.mpFirstFrame; + if ( pFrame ) + { + if ( pFrame->ImplGetGraphics() ) + { + // Stupid typecast here and somewhere ((OutputDevice*)&aVDev)->, because bug in .NET2002 compiler + OutputDevice *pDevice = (OutputDevice*)pFrame; + pDevice->mpGraphics->ClearDevFontCache(); + pDevice->mpGraphics->GetDevFontList(pFrame->mpWindowImpl->mpFrameData->mpFontList); + } + } + } + // update all windows Window* pFrame = pSVData->maWinData.mpFirstFrame; while ( pFrame ) @@ -268,24 +286,6 @@ void OutputDevice::ImplUpdateAllFontData( bool bNewFontLists ) pPrinter->ImplUpdateFontData( bNewFontLists ); pPrinter = pPrinter->mpNext; } - - // clear global font lists to have them updated - pSVData->maGDIData.mpScreenFontCache->Invalidate(); - if ( bNewFontLists ) - { - pSVData->maGDIData.mpScreenFontList->Clear(); - pFrame = pSVData->maWinData.mpFirstFrame; - if ( pFrame ) - { - if ( pFrame->ImplGetGraphics() ) - { - // Stupid typecast here and somewhere ((OutputDevice*)&aVDev)->, because bug in .NET2002 compiler - OutputDevice *pDevice = (OutputDevice*)pFrame; - pDevice->mpGraphics->ClearDevFontCache(); - pDevice->mpGraphics->GetDevFontList(pFrame->mpWindowImpl->mpFrameData->mpFontList); - } - } - } } // TODO: remove this method when the CWS-gfbfcfg dust has settled |