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
87c18643
Kaydet (Commit)
87c18643
authored
Mar 16, 2015
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
try to prevent use-after-free
Change-Id: I7edc3d09d495749a44da29c0cbb30eb0d20fd779
üst
29b8f25f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
7 deletions
+27
-7
condformatuno.hxx
sc/source/ui/inc/condformatuno.hxx
+8
-3
cellsuno.cxx
sc/source/ui/unoobj/cellsuno.cxx
+1
-1
condformatuno.cxx
sc/source/ui/unoobj/condformatuno.cxx
+18
-3
No files found.
sc/source/ui/inc/condformatuno.hxx
Dosyayı görüntüle @
87c18643
...
...
@@ -22,8 +22,10 @@
#include <cppuhelper/implbase1.hxx>
#include <svl/itemprop.hxx>
#include <svl/lstner.hxx>
class
ScDocument
;
class
ScDocShell
;
class
ScConditionalFormatList
;
class
ScConditionalFormat
;
class
ScIconSetFormat
;
...
...
@@ -43,13 +45,16 @@ class XSheetCellRanges;
}
}
}
class
ScCondFormatsObj
:
public
cppu
::
WeakImplHelper1
<
com
::
sun
::
star
::
sheet
::
XConditionalFormats
>
class
ScCondFormatsObj
:
public
cppu
::
WeakImplHelper1
<
com
::
sun
::
star
::
sheet
::
XConditionalFormats
>
,
public
SfxListener
{
public
:
ScCondFormatsObj
(
ScDoc
ument
&
rDoc
,
SCTAB
nTab
);
ScCondFormatsObj
(
ScDoc
Shell
*
pDocShell
,
SCTAB
nTab
);
virtual
~
ScCondFormatsObj
();
virtual
void
Notify
(
SfxBroadcaster
&
rBC
,
const
SfxHint
&
rHint
)
SAL_OVERRIDE
;
static
ScCondFormatsObj
*
getImplementation
(
uno
::
Reference
<
com
::
sun
::
star
::
sheet
::
XConditionalFormats
>
xCondFormat
);
// XConditionalFormats
...
...
@@ -73,7 +78,7 @@ public:
private
:
ScConditionalFormatList
*
getCoreObject
();
SCTAB
mnTab
;
ScDoc
ument
&
mrDoc
;
ScDoc
Shell
*
mpDocShell
;
};
class
ScCondFormatObj
:
public
com
::
sun
::
star
::
sheet
::
XConditionalFormat
,
...
...
sc/source/ui/unoobj/cellsuno.cxx
Dosyayı görüntüle @
87c18643
...
...
@@ -8608,7 +8608,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
}
else if (pEntry->nWID == SC_WID_UNO_CONDFORMAT)
{
rAny <<= uno::Reference<sheet::XConditionalFormats>(new ScCondFormatsObj(pDocSh
->GetDocument()
, nTab));
rAny <<= uno::Reference<sheet::XConditionalFormats>(new ScCondFormatsObj(pDocSh, nTab));
}
else
ScCellRangeObj::GetOnePropertyValue(pEntry, rAny);
...
...
sc/source/ui/unoobj/condformatuno.cxx
Dosyayı görüntüle @
87c18643
...
...
@@ -186,14 +186,26 @@ const IconSetTypeApiMap aIconSetApiMap[] =
}
ScCondFormatsObj
::
ScCondFormatsObj
(
ScDoc
ument
&
rDoc
,
SCTAB
nTab
)
:
ScCondFormatsObj
::
ScCondFormatsObj
(
ScDoc
Shell
*
pDocShell
,
SCTAB
nTab
)
:
mnTab
(
nTab
),
m
rDoc
(
rDoc
)
m
pDocShell
(
pDocShell
)
{
pDocShell
->
GetDocument
().
AddUnoObject
(
*
this
);
}
ScCondFormatsObj
::~
ScCondFormatsObj
()
{
if
(
mpDocShell
)
mpDocShell
->
GetDocument
().
RemoveUnoObject
(
*
this
);
}
void
ScCondFormatsObj
::
Notify
(
SfxBroadcaster
&
/*rBC*/
,
const
SfxHint
&
rHint
)
{
if
(
dynamic_cast
<
const
SfxSimpleHint
*>
(
&
rHint
)
&&
static_cast
<
const
SfxSimpleHint
&>
(
rHint
).
GetId
()
==
SFX_HINT_DYING
)
{
mpDocShell
=
NULL
;
// ungueltig geworden
}
}
sal_Int32
ScCondFormatsObj
::
addByRange
(
const
uno
::
Reference
<
sheet
::
XConditionalFormat
>&
xCondFormat
,
...
...
@@ -236,7 +248,10 @@ sal_Int32 ScCondFormatsObj::getLength()
ScConditionalFormatList
*
ScCondFormatsObj
::
getCoreObject
()
{
ScConditionalFormatList
*
pList
=
mrDoc
.
GetCondFormList
(
mnTab
);
if
(
!
mpDocShell
)
throw
uno
::
RuntimeException
();
ScConditionalFormatList
*
pList
=
mpDocShell
->
GetDocument
().
GetCondFormList
(
mnTab
);
if
(
!
pList
)
throw
uno
::
RuntimeException
();
...
...
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