[Libreoffice-commits] core.git: vcl/source
Michael Meeks
michael.meeks at suse.com
Wed Jul 24 12:40:25 PDT 2013
vcl/source/gdi/outdev3.cxx | 36 ++++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
New commits:
commit dda3686acde4911f70f07724247e822f8b3dbd90
Author: Michael Meeks <michael.meeks at suse.com>
Date: Wed Jul 24 19:48:43 2013 +0100
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
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index e023c81..f5ef5ad 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
More information about the Libreoffice-commits
mailing list