Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
6b127d40
Kaydet (Commit)
6b127d40
authored
Şub 05, 2014
tarafından
David Tardon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
rhbz#1057977 avoid use of invalidated pointers
Change-Id: Ib81f79da696b5e8002f5a2ddcf160903231dc3f1
üst
561c4817
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
6 deletions
+59
-6
outdev.hxx
include/vcl/outdev.hxx
+6
-0
outdev3.cxx
vcl/source/gdi/outdev3.cxx
+53
-6
No files found.
include/vcl/outdev.hxx
Dosyayı görüntüle @
6b127d40
...
@@ -537,9 +537,15 @@ protected:
...
@@ -537,9 +537,15 @@ protected:
OutputDevice
();
OutputDevice
();
private
:
private
:
typedef
void
(
OutputDevice
::*
FontUpdateHandler_t
)(
bool
);
SAL_DLLPRIVATE
OutputDevice
(
const
OutputDevice
&
rOutDev
);
SAL_DLLPRIVATE
OutputDevice
(
const
OutputDevice
&
rOutDev
);
SAL_DLLPRIVATE
OutputDevice
&
operator
=
(
const
OutputDevice
&
rOutDev
);
SAL_DLLPRIVATE
OutputDevice
&
operator
=
(
const
OutputDevice
&
rOutDev
);
SAL_DLLPRIVATE
void
ImplClearFontData
(
bool
bNewFontLists
);
SAL_DLLPRIVATE
void
ImplRefreshFontData
(
bool
bNewFontLists
);
SAL_DLLPRIVATE
static
void
ImplUpdateFontDataForAllFrames
(
FontUpdateHandler_t
pHdl
,
bool
bNewFontLists
);
public
:
public
:
virtual
~
OutputDevice
();
virtual
~
OutputDevice
();
...
...
vcl/source/gdi/outdev3.cxx
Dosyayı görüntüle @
6b127d40
...
@@ -154,7 +154,7 @@ static void ImplRotatePos( long nOriginX, long nOriginY, long& rX, long& rY,
...
@@ -154,7 +154,7 @@ static void ImplRotatePos( long nOriginX, long nOriginY, long& rX, long& rY,
}
}
}
}
void
OutputDevice
::
Impl
UpdateFontData
(
bool
bNewFontLists
)
void
OutputDevice
::
Impl
ClearFontData
(
const
bool
bNewFontLists
)
{
{
// the currently selected logical font is no longer needed
// the currently selected logical font is no longer needed
if
(
mpFontEntry
)
if
(
mpFontEntry
)
...
@@ -205,6 +205,38 @@ void OutputDevice::ImplUpdateFontData( bool bNewFontLists )
...
@@ -205,6 +205,38 @@ void OutputDevice::ImplUpdateFontData( bool bNewFontLists )
delete
mpFontList
;
delete
mpFontList
;
if
(
mpFontCache
&&
mpFontCache
!=
pSVData
->
maGDIData
.
mpScreenFontCache
)
if
(
mpFontCache
&&
mpFontCache
!=
pSVData
->
maGDIData
.
mpScreenFontCache
)
delete
mpFontCache
;
delete
mpFontCache
;
mpFontList
=
0
;
mpFontCache
=
0
;
}
}
}
}
// also update child windows if needed
if
(
GetOutDevType
()
==
OUTDEV_WINDOW
)
{
Window
*
pChild
=
((
Window
*
)
this
)
->
mpWindowImpl
->
mpFirstChild
;
while
(
pChild
)
{
pChild
->
ImplClearFontData
(
true
);
pChild
=
pChild
->
mpWindowImpl
->
mpNext
;
}
}
}
void
OutputDevice
::
ImplRefreshFontData
(
const
bool
bNewFontLists
)
{
// if ( GetOutDevType() == OUTDEV_PRINTER || mpPDFWriter )
{
ImplSVData
*
pSVData
=
ImplGetSVData
();
if
(
bNewFontLists
)
{
// we need a graphics
if
(
ImplGetGraphics
()
)
{
if
(
mpPDFWriter
)
{
mpFontList
=
pSVData
->
maGDIData
.
mpScreenFontList
->
Clone
(
true
,
true
);
mpFontList
=
pSVData
->
maGDIData
.
mpScreenFontList
->
Clone
(
true
,
true
);
mpFontCache
=
new
ImplFontCache
();
mpFontCache
=
new
ImplFontCache
();
}
}
...
@@ -222,16 +254,24 @@ void OutputDevice::ImplUpdateFontData( bool bNewFontLists )
...
@@ -222,16 +254,24 @@ void OutputDevice::ImplUpdateFontData( bool bNewFontLists )
Window
*
pChild
=
((
Window
*
)
this
)
->
mpWindowImpl
->
mpFirstChild
;
Window
*
pChild
=
((
Window
*
)
this
)
->
mpWindowImpl
->
mpFirstChild
;
while
(
pChild
)
while
(
pChild
)
{
{
pChild
->
Impl
Update
FontData
(
true
);
pChild
->
Impl
Refresh
FontData
(
true
);
pChild
=
pChild
->
mpWindowImpl
->
mpNext
;
pChild
=
pChild
->
mpWindowImpl
->
mpNext
;
}
}
}
}
}
}
void
OutputDevice
::
ImplUpdateFontData
(
bool
bNewFontLists
)
{
ImplClearFontData
(
bNewFontLists
);
ImplRefreshFontData
(
bNewFontLists
);
}
void
OutputDevice
::
ImplUpdateAllFontData
(
bool
bNewFontLists
)
void
OutputDevice
::
ImplUpdateAllFontData
(
bool
bNewFontLists
)
{
{
ImplSVData
*
pSVData
=
ImplGetSVData
();
ImplSVData
*
pSVData
=
ImplGetSVData
();
ImplUpdateFontDataForAllFrames
(
&
OutputDevice
::
ImplClearFontData
,
bNewFontLists
);
// clear global font lists to have them updated
// clear global font lists to have them updated
pSVData
->
maGDIData
.
mpScreenFontCache
->
Invalidate
();
pSVData
->
maGDIData
.
mpScreenFontCache
->
Invalidate
();
if
(
bNewFontLists
)
if
(
bNewFontLists
)
...
@@ -250,16 +290,23 @@ void OutputDevice::ImplUpdateAllFontData( bool bNewFontLists )
...
@@ -250,16 +290,23 @@ void OutputDevice::ImplUpdateAllFontData( bool bNewFontLists )
}
}
}
}
ImplUpdateFontDataForAllFrames
(
&
OutputDevice
::
ImplRefreshFontData
,
bNewFontLists
);
}
void
OutputDevice
::
ImplUpdateFontDataForAllFrames
(
const
FontUpdateHandler_t
pHdl
,
const
bool
bNewFontLists
)
{
ImplSVData
*
const
pSVData
=
ImplGetSVData
();
// update all windows
// update all windows
Window
*
pFrame
=
pSVData
->
maWinData
.
mpFirstFrame
;
Window
*
pFrame
=
pSVData
->
maWinData
.
mpFirstFrame
;
while
(
pFrame
)
while
(
pFrame
)
{
{
pFrame
->
ImplUpdateFontData
(
bNewFontLists
);
(
pFrame
->*
pHdl
)
(
bNewFontLists
);
Window
*
pSysWin
=
pFrame
->
mpWindowImpl
->
mpFrameData
->
mpFirstOverlap
;
Window
*
pSysWin
=
pFrame
->
mpWindowImpl
->
mpFrameData
->
mpFirstOverlap
;
while
(
pSysWin
)
while
(
pSysWin
)
{
{
pSysWin
->
ImplUpdateFontData
(
bNewFontLists
);
(
pSysWin
->*
pHdl
)
(
bNewFontLists
);
pSysWin
=
pSysWin
->
mpWindowImpl
->
mpNextOverlap
;
pSysWin
=
pSysWin
->
mpWindowImpl
->
mpNextOverlap
;
}
}
...
@@ -270,7 +317,7 @@ void OutputDevice::ImplUpdateAllFontData( bool bNewFontLists )
...
@@ -270,7 +317,7 @@ void OutputDevice::ImplUpdateAllFontData( bool bNewFontLists )
VirtualDevice
*
pVirDev
=
pSVData
->
maGDIData
.
mpFirstVirDev
;
VirtualDevice
*
pVirDev
=
pSVData
->
maGDIData
.
mpFirstVirDev
;
while
(
pVirDev
)
while
(
pVirDev
)
{
{
pVirDev
->
ImplUpdateFontData
(
bNewFontLists
);
(
pVirDev
->*
pHdl
)
(
bNewFontLists
);
pVirDev
=
pVirDev
->
mpNext
;
pVirDev
=
pVirDev
->
mpNext
;
}
}
...
@@ -278,7 +325,7 @@ void OutputDevice::ImplUpdateAllFontData( bool bNewFontLists )
...
@@ -278,7 +325,7 @@ void OutputDevice::ImplUpdateAllFontData( bool bNewFontLists )
Printer
*
pPrinter
=
pSVData
->
maGDIData
.
mpFirstPrinter
;
Printer
*
pPrinter
=
pSVData
->
maGDIData
.
mpFirstPrinter
;
while
(
pPrinter
)
while
(
pPrinter
)
{
{
pPrinter
->
ImplUpdateFontData
(
bNewFontLists
);
(
pPrinter
->*
pHdl
)
(
bNewFontLists
);
pPrinter
=
pPrinter
->
mpNext
;
pPrinter
=
pPrinter
->
mpNext
;
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment