[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
Michael Meeks
michael.meeks at suse.com
Fri Jul 26 06:59:53 PDT 2013
vcl/source/gdi/outdev3.cxx | 36 ++++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
New commits:
commit ea82c62a3968181507581724000045d33c216e0d
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
Signed-off-by: LuboÅ¡ LuÅák <l.lunak at suse.cz>
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index 8304746..6548d0c 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