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
edc264d1
Kaydet (Commit)
edc264d1
authored
Kas 17, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
use unique_ptr for pImpl in unotools/
Change-Id: I4128ca0d4ff18f6e0c3c9f8ecad13b69c38c3157
üst
85d7a76a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
28 deletions
+24
-28
eventlisteneradapter.hxx
include/unotools/eventlisteneradapter.hxx
+4
-2
misccfg.hxx
include/unotools/misccfg.hxx
+0
-4
searchopt.hxx
include/unotools/searchopt.hxx
+2
-1
misccfg.cxx
unotools/source/config/misccfg.cxx
+17
-17
searchopt.cxx
unotools/source/config/searchopt.cxx
+1
-2
eventlisteneradapter.cxx
unotools/source/misc/eventlisteneradapter.cxx
+0
-2
No files found.
include/unotools/eventlisteneradapter.hxx
Dosyayı görüntüle @
edc264d1
...
...
@@ -16,11 +16,13 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <unotools/unotoolsdllapi.h>
#ifndef INCLUDED_UNOTOOLS_EVENTLISTENERADAPTER_HXX
#define INCLUDED_UNOTOOLS_EVENTLISTENERADAPTER_HXX
#include <unotools/unotoolsdllapi.h>
#include <com/sun/star/lang/XComponent.hpp>
#include <memory>
namespace
utl
{
...
...
@@ -40,7 +42,7 @@ namespace utl
const
OEventListenerAdapter
&
operator
=
(
const
OEventListenerAdapter
&
_rSource
)
=
delete
;
protected
:
OEventListenerAdapterImpl
*
m_pImpl
;
std
::
unique_ptr
<
OEventListenerAdapterImpl
>
m_pImpl
;
protected
:
OEventListenerAdapter
();
...
...
include/unotools/misccfg.hxx
Dosyayı görüntüle @
edc264d1
...
...
@@ -24,12 +24,8 @@
namespace
utl
{
class
SfxMiscCfg
;
class
UNOTOOLS_DLLPUBLIC
MiscCfg
:
public
detail
::
Options
{
SfxMiscCfg
*
pImpl
;
public
:
MiscCfg
(
);
virtual
~
MiscCfg
(
);
...
...
include/unotools/searchopt.hxx
Dosyayı görüntüle @
edc264d1
...
...
@@ -21,12 +21,13 @@
#define INCLUDED_UNOTOOLS_SEARCHOPT_HXX
#include <unotools/unotoolsdllapi.h>
#include <memory>
class
SvtSearchOptions_Impl
;
class
UNOTOOLS_DLLPUBLIC
SvtSearchOptions
{
SvtSearchOptions_Impl
*
pImpl
;
std
::
unique_ptr
<
SvtSearchOptions_Impl
>
pImpl
;
SvtSearchOptions
(
const
SvtSearchOptions
&
)
=
delete
;
SvtSearchOptions
&
operator
=
(
const
SvtSearchOptions
&
)
=
delete
;
...
...
unotools/source/config/misccfg.cxx
Dosyayı görüntüle @
edc264d1
...
...
@@ -32,8 +32,9 @@ using namespace com::sun::star::uno;
namespace
utl
{
class
SfxMiscCfg
;
static
SfxMiscCfg
*
pOptions
=
nullptr
;
static
SfxMiscCfg
*
g_
pOptions
=
nullptr
;
static
sal_Int32
nRefCount
=
0
;
class
SfxMiscCfg
:
public
utl
::
ConfigItem
...
...
@@ -186,69 +187,68 @@ MiscCfg::MiscCfg( )
{
// Global access, must be guarded (multithreading)
::
osl
::
MutexGuard
aGuard
(
LocalSingleton
::
get
()
);
if
(
!
pOptions
)
if
(
!
g_
pOptions
)
{
pOptions
=
new
SfxMiscCfg
;
g_
pOptions
=
new
SfxMiscCfg
;
ItemHolder1
::
holdConfigItem
(
E_MISCCFG
);
}
++
nRefCount
;
pImpl
=
pOptions
;
pImpl
->
AddListener
(
this
);
g_pOptions
->
AddListener
(
this
);
}
MiscCfg
::~
MiscCfg
(
)
{
// Global access, must be guarded (multithreading)
::
osl
::
MutexGuard
aGuard
(
LocalSingleton
::
get
()
);
pImpl
->
RemoveListener
(
this
);
g_pOptions
->
RemoveListener
(
this
);
if
(
!--
nRefCount
)
{
if
(
pOptions
->
IsModified
()
)
pOptions
->
Commit
();
DELETEZ
(
pOptions
);
if
(
g_
pOptions
->
IsModified
()
)
g_
pOptions
->
Commit
();
DELETEZ
(
g_
pOptions
);
}
}
bool
MiscCfg
::
IsNotFoundWarning
()
const
{
return
pImpl
->
IsNotFoundWarning
();
return
g_pOptions
->
IsNotFoundWarning
();
}
void
MiscCfg
::
SetNotFoundWarning
(
bool
bSet
)
{
pImpl
->
SetNotFoundWarning
(
bSet
);
g_pOptions
->
SetNotFoundWarning
(
bSet
);
}
bool
MiscCfg
::
IsPaperSizeWarning
()
const
{
return
pImpl
->
IsPaperSizeWarning
();
return
g_pOptions
->
IsPaperSizeWarning
();
}
void
MiscCfg
::
SetPaperSizeWarning
(
bool
bSet
)
{
pImpl
->
SetPaperSizeWarning
(
bSet
);
g_pOptions
->
SetPaperSizeWarning
(
bSet
);
}
bool
MiscCfg
::
IsPaperOrientationWarning
()
const
{
return
pImpl
->
IsPaperOrientationWarning
();
return
g_pOptions
->
IsPaperOrientationWarning
();
}
void
MiscCfg
::
SetPaperOrientationWarning
(
bool
bSet
)
{
pImpl
->
SetPaperOrientationWarning
(
bSet
);
g_pOptions
->
SetPaperOrientationWarning
(
bSet
);
}
sal_Int32
MiscCfg
::
GetYear2000
()
const
{
return
pImpl
->
GetYear2000
();
return
g_pOptions
->
GetYear2000
();
}
void
MiscCfg
::
SetYear2000
(
sal_Int32
nSet
)
{
pImpl
->
SetYear2000
(
nSet
);
g_pOptions
->
SetYear2000
(
nSet
);
}
}
...
...
unotools/source/config/searchopt.cxx
Dosyayı görüntüle @
edc264d1
...
...
@@ -240,13 +240,12 @@ bool SvtSearchOptions_Impl::Save()
}
SvtSearchOptions
::
SvtSearchOptions
()
:
pImpl
(
new
SvtSearchOptions_Impl
)
{
pImpl
=
new
SvtSearchOptions_Impl
;
}
SvtSearchOptions
::~
SvtSearchOptions
()
{
delete
pImpl
;
}
void
SvtSearchOptions
::
Commit
()
...
...
unotools/source/misc/eventlisteneradapter.cxx
Dosyayı görüntüle @
edc264d1
...
...
@@ -105,8 +105,6 @@ namespace utl
OEventListenerAdapter
::~
OEventListenerAdapter
()
{
stopAllComponentListening
(
);
delete
m_pImpl
;
m_pImpl
=
nullptr
;
}
void
OEventListenerAdapter
::
stopComponentListening
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XComponent
>&
_rxComp
)
...
...
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