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
c04a0895
Kaydet (Commit)
c04a0895
authored
Tem 16, 2014
tarafından
Fahad Al-Saidi
Kaydeden (comit)
Michael Meeks
Tem 16, 2014
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#80907 Implemented OOXMLFactory using boost::intrusive_ptr.
Change-Id: I350bca3544680ab8227d3bb1c093cba981cba5fc
üst
c5b37ef1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
OOXMLFactory.hxx
writerfilter/source/ooxml/OOXMLFactory.hxx
+20
-2
No files found.
writerfilter/source/ooxml/OOXMLFactory.hxx
Dosyayı görüntüle @
c04a0895
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#include <ooxml/OOXMLFastTokens.hxx>
#include <ooxml/OOXMLFastTokens.hxx>
#include "OOXMLFastContextHandler.hxx"
#include "OOXMLFastContextHandler.hxx"
#include <boost/intrusive_ptr.hpp>
namespace
writerfilter
{
namespace
writerfilter
{
namespace
ooxml
{
namespace
ooxml
{
...
@@ -127,7 +128,7 @@ protected:
...
@@ -127,7 +128,7 @@ protected:
class
OOXMLFactory
class
OOXMLFactory
{
{
public
:
public
:
typedef
boost
::
shared_ptr
<
OOXMLFactory
>
Pointer_t
;
typedef
boost
::
intrusive_ptr
<
OOXMLFactory
>
Pointer_t
;
static
Pointer_t
getInstance
();
static
Pointer_t
getInstance
();
...
@@ -147,7 +148,16 @@ public:
...
@@ -147,7 +148,16 @@ public:
void
endAction
(
OOXMLFastContextHandler
*
pHandler
,
Token_t
nToken
);
void
endAction
(
OOXMLFastContextHandler
*
pHandler
,
Token_t
nToken
);
virtual
~
OOXMLFactory
();
virtual
~
OOXMLFactory
();
inline
void
IncRef
()
const
{
osl_atomic_increment
(
&
mnRefCnt
);}
inline
void
DecRef
()
const
{
if
(
!
osl_atomic_decrement
(
&
mnRefCnt
))
const_cast
<
OOXMLFactory
*>
(
this
)
->
Delete
();
}
inline
void
Delete
()
{
delete
this
;}
inline
oslInterlockedCount
GetRef
()
const
{
return
mnRefCnt
;
}
protected
:
mutable
oslInterlockedCount
mnRefCnt
;
// reference count
private
:
private
:
static
Pointer_t
m_Instance
;
static
Pointer_t
m_Instance
;
...
@@ -160,6 +170,14 @@ private:
...
@@ -160,6 +170,14 @@ private:
Token_t
Element
);
Token_t
Element
);
};
};
inline
void
intrusive_ptr_add_ref
(
const
OOXMLFactory
*
p
)
{
p
->
IncRef
();
}
inline
void
intrusive_ptr_release
(
const
OOXMLFactory
*
p
)
{
p
->
DecRef
();
}
}
}
}
}
...
...
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