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
0e491a7a
Kaydet (Commit)
0e491a7a
authored
Mar 23, 2015
tarafından
Michael Meeks
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
vclptr: add isDisposed method - and assert for it here & there.
Change-Id: I2b154e0ed9eee0a45900ada7f805a1d444a31bc0
üst
c612c3b0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
2 deletions
+18
-2
outdev.hxx
include/vcl/outdev.hxx
+1
-0
DocumentDeviceManager.cxx
sw/source/core/doc/DocumentDeviceManager.cxx
+7
-0
SwXDocumentSettings.cxx
sw/source/uibase/uno/SwXDocumentSettings.cxx
+2
-1
README.lifecycle
vcl/README.lifecycle
+3
-1
font.cxx
vcl/source/outdev/font.cxx
+5
-0
No files found.
include/vcl/outdev.hxx
Dosyayı görüntüle @
0e491a7a
...
...
@@ -390,6 +390,7 @@ protected:
public
:
/// call the dispose() method if we have not already been disposed.
void
disposeOnce
();
bool
isDisposed
()
const
{
return
mbDisposed
;
}
public
:
...
...
sw/source/core/doc/DocumentDeviceManager.cxx
Dosyayı görüntüle @
0e491a7a
...
...
@@ -65,6 +65,7 @@ SfxPrinter* DocumentDeviceManager::getPrinter(/*[in]*/ bool bCreate ) const
void
DocumentDeviceManager
::
setPrinter
(
/*[in]*/
SfxPrinter
*
pP
,
/*[in]*/
bool
bDeleteOld
,
/*[in]*/
bool
bCallPrtDataChanged
)
{
assert
(
!
pP
->
isDisposed
()
);
if
(
pP
!=
mpPrt
)
{
if
(
bDeleteOld
)
...
...
@@ -100,11 +101,15 @@ VirtualDevice* DocumentDeviceManager::getVirtualDevice(/*[in]*/ bool bCreate ) c
else
pRet
=
&
CreateVirtualDevice_
();
assert
(
!
pRet
->
isDisposed
()
);
return
pRet
;
}
void
DocumentDeviceManager
::
setVirtualDevice
(
/*[in]*/
VirtualDevice
*
pVd
,
/*[in]*/
bool
bDeleteOld
,
/*[in]*/
bool
)
{
assert
(
!
pVd
->
isDisposed
()
);
if
(
mpVirDev
.
get
()
!=
pVd
)
{
if
(
bDeleteOld
)
...
...
@@ -133,6 +138,8 @@ OutputDevice* DocumentDeviceManager::getReferenceDevice(/*[in]*/ bool bCreate )
pRet
=
getVirtualDevice
(
bCreate
);
}
assert
(
!
pRet
->
isDisposed
()
);
return
pRet
;
}
...
...
sw/source/uibase/uno/SwXDocumentSettings.cxx
Dosyayı görüntüle @
0e491a7a
...
...
@@ -389,6 +389,7 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
if
(
OUString
(
pPrinter
->
GetName
())
!=
sPrinterName
)
{
VclPtr
<
SfxPrinter
>
pNewPrinter
=
new
SfxPrinter
(
pPrinter
->
GetOptions
().
Clone
(),
sPrinterName
);
assert
(
!
pNewPrinter
->
isDisposed
()
);
if
(
pNewPrinter
->
IsKnown
()
)
{
// set printer only once; in _postSetValues
...
...
@@ -426,7 +427,7 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
};
SfxItemSet
*
pItemSet
=
new
SfxItemSet
(
mpDoc
->
GetAttrPool
(),
nRange
);
VclPtr
<
SfxPrinter
>
pPrinter
=
SfxPrinter
::
Create
(
aStream
,
pItemSet
);
assert
(
!
pPrinter
->
isDisposed
()
);
// set printer only once; in _postSetValues
mpPrinter
.
disposeAndClear
();
mpPrinter
=
pPrinter
;
...
...
vcl/README.lifecycle
Dosyayı görüntüle @
0e491a7a
...
...
@@ -144,11 +144,13 @@ or:
their constructors.
* Pass 'const VclPtr<> &' instead of pointers everywhere
+ add 'explicit' keywords to VclPtr constructors to
accelerate compilation etc.
* Cleanup common existing methods such that they continue to
work post-dispose.
* Dispose functions shou
dl
be audited to:
* Dispose functions shou
ld
be audited to:
+ not leave dangling pointsr
+ shrink them - some work should incrementally
migrate back to destructors.
...
...
vcl/source/outdev/font.cxx
Dosyayı görüntüle @
0e491a7a
...
...
@@ -91,7 +91,12 @@ vcl::FontInfo OutputDevice::GetDevFont( int nDevFontIndex ) const
int
OutputDevice
::
GetDevFontCount
()
const
{
if
(
!
mpGetDevFontList
)
{
if
(
!
mpFontCollection
)
return
0
;
mpGetDevFontList
=
mpFontCollection
->
GetDevFontList
();
}
return
mpGetDevFontList
->
Count
();
}
...
...
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