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
7ef43f1e
Kaydet (Commit)
7ef43f1e
authored
Mar 06, 2014
tarafından
Norbert Thiebaud
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
use WeakImplHelper on udbstore's classes
Change-Id: I1b38d9708e9298ad3f164d6d8838c88e08d0efeb
üst
71ed01e2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
239 deletions
+26
-239
ucbstore.cxx
ucb/source/core/ucbstore.cxx
+7
-182
ucbstore.hxx
ucb/source/core/ucbstore.hxx
+19
-57
No files found.
ucb/source/core/ucbstore.cxx
Dosyayı görüntüle @
7ef43f1e
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
#include <com/sun/star/container/XNameReplace.hpp>
#include <com/sun/star/container/XNameReplace.hpp>
#include <com/sun/star/util/XChangesBatch.hpp>
#include <com/sun/star/util/XChangesBatch.hpp>
#include <comphelper/processfactory.hxx>
#include <comphelper/processfactory.hxx>
#include <cppuhelper/implbase1.hxx>
#include "ucbstore.hxx"
#include "ucbstore.hxx"
using
namespace
com
::
sun
::
star
::
beans
;
using
namespace
com
::
sun
::
star
::
beans
;
...
@@ -120,8 +121,7 @@ PropertySetMap_Impl;
...
@@ -120,8 +121,7 @@ PropertySetMap_Impl;
class
PropertySetInfo_Impl
:
class
PropertySetInfo_Impl
:
public
cppu
::
WeakImplHelper1
<
XPropertySetInfo
>
public
OWeakObject
,
public
XTypeProvider
,
public
XPropertySetInfo
{
{
Reference
<
XComponentContext
>
m_xContext
;
Reference
<
XComponentContext
>
m_xContext
;
Sequence
<
Property
>*
m_pProps
;
Sequence
<
Property
>*
m_pProps
;
...
@@ -132,17 +132,6 @@ public:
...
@@ -132,17 +132,6 @@ public:
PersistentPropertySet
*
pOwner
);
PersistentPropertySet
*
pOwner
);
virtual
~
PropertySetInfo_Impl
();
virtual
~
PropertySetInfo_Impl
();
// XInterface
virtual
css
::
uno
::
Any
SAL_CALL
queryInterface
(
const
css
::
uno
::
Type
&
rType
)
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
);
virtual
void
SAL_CALL
acquire
()
throw
();
virtual
void
SAL_CALL
release
()
throw
();
// XTypeProvider
XTYPEPROVIDER_DECL
()
// XPropertySetInfo
// XPropertySetInfo
virtual
Sequence
<
Property
>
SAL_CALL
getProperties
()
virtual
Sequence
<
Property
>
SAL_CALL
getProperties
()
throw
(
RuntimeException
,
std
::
exception
);
throw
(
RuntimeException
,
std
::
exception
);
...
@@ -192,48 +181,6 @@ UcbStore::~UcbStore()
...
@@ -192,48 +181,6 @@ UcbStore::~UcbStore()
}
}
// XInterface methods.
void
SAL_CALL
UcbStore
::
acquire
()
throw
()
{
OWeakObject
::
acquire
();
}
void
SAL_CALL
UcbStore
::
release
()
throw
()
{
OWeakObject
::
release
();
}
css
::
uno
::
Any
SAL_CALL
UcbStore
::
queryInterface
(
const
css
::
uno
::
Type
&
rType
)
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
css
::
uno
::
Any
aRet
=
cppu
::
queryInterface
(
rType
,
(
static_cast
<
XTypeProvider
*
>
(
this
)),
(
static_cast
<
XServiceInfo
*
>
(
this
)),
(
static_cast
<
XPropertySetRegistryFactory
*
>
(
this
)),
(
static_cast
<
XInitialization
*
>
(
this
))
);
return
aRet
.
hasValue
()
?
aRet
:
OWeakObject
::
queryInterface
(
rType
);
}
// XTypeProvider methods.
XTYPEPROVIDER_IMPL_4
(
UcbStore
,
XTypeProvider
,
XServiceInfo
,
XPropertySetRegistryFactory
,
XInitialization
);
// XServiceInfo methods.
XSERVICEINFO_IMPL_1_CTX
(
UcbStore
,
XSERVICEINFO_IMPL_1_CTX
(
UcbStore
,
OUString
(
"com.sun.star.comp.ucb.UcbStore"
),
OUString
(
"com.sun.star.comp.ucb.UcbStore"
),
OUString
(
STORE_SERVICE_NAME
)
);
OUString
(
STORE_SERVICE_NAME
)
);
...
@@ -342,44 +289,6 @@ PropertySetRegistry::~PropertySetRegistry()
...
@@ -342,44 +289,6 @@ PropertySetRegistry::~PropertySetRegistry()
// XInterface methods.
void
SAL_CALL
PropertySetRegistry
::
acquire
()
throw
()
{
OWeakObject
::
acquire
();
}
void
SAL_CALL
PropertySetRegistry
::
release
()
throw
()
{
OWeakObject
::
release
();
}
css
::
uno
::
Any
SAL_CALL
PropertySetRegistry
::
queryInterface
(
const
css
::
uno
::
Type
&
rType
)
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
css
::
uno
::
Any
aRet
=
cppu
::
queryInterface
(
rType
,
(
static_cast
<
XTypeProvider
*
>
(
this
)),
(
static_cast
<
XServiceInfo
*
>
(
this
)),
(
static_cast
<
XPropertySetRegistry
*
>
(
this
)),
(
static_cast
<
XElementAccess
*
>
(
this
)),
(
static_cast
<
XNameAccess
*
>
(
this
))
);
return
aRet
.
hasValue
()
?
aRet
:
OWeakObject
::
queryInterface
(
rType
);
}
// XTypeProvider methods.
XTYPEPROVIDER_IMPL_4
(
PropertySetRegistry
,
XTypeProvider
,
XServiceInfo
,
XPropertySetRegistry
,
XNameAccess
);
// XServiceInfo methods.
// XServiceInfo methods.
...
@@ -1292,54 +1201,6 @@ PersistentPropertySet::~PersistentPropertySet()
...
@@ -1292,54 +1201,6 @@ PersistentPropertySet::~PersistentPropertySet()
delete
m_pImpl
;
delete
m_pImpl
;
}
}
// XInterface methods.
void
SAL_CALL
PersistentPropertySet
::
acquire
()
throw
()
{
OWeakObject
::
acquire
();
}
void
SAL_CALL
PersistentPropertySet
::
release
()
throw
()
{
OWeakObject
::
release
();
}
css
::
uno
::
Any
SAL_CALL
PersistentPropertySet
::
queryInterface
(
const
css
::
uno
::
Type
&
rType
)
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
css
::
uno
::
Any
aRet
=
cppu
::
queryInterface
(
rType
,
(
static_cast
<
XTypeProvider
*
>
(
this
)),
(
static_cast
<
XServiceInfo
*
>
(
this
)),
(
static_cast
<
XComponent
*
>
(
this
)),
(
static_cast
<
XPropertySet
*
>
(
this
)),
(
static_cast
<
XNamed
*
>
(
this
)),
(
static_cast
<
XPersistentPropertySet
*
>
(
this
)),
(
static_cast
<
XPropertyContainer
*
>
(
this
)),
(
static_cast
<
XPropertySetInfoChangeNotifier
*
>
(
this
)),
(
static_cast
<
XPropertyAccess
*
>
(
this
))
);
return
aRet
.
hasValue
()
?
aRet
:
OWeakObject
::
queryInterface
(
rType
);
}
// XTypeProvider methods.
XTYPEPROVIDER_IMPL_8
(
PersistentPropertySet
,
XTypeProvider
,
XServiceInfo
,
XComponent
,
XPersistentPropertySet
,
XNamed
,
XPropertyContainer
,
XPropertySetInfoChangeNotifier
,
XPropertyAccess
);
// XServiceInfo methods.
// XServiceInfo methods.
...
@@ -1414,8 +1275,7 @@ void SAL_CALL PersistentPropertySet::removeEventListener(
...
@@ -1414,8 +1275,7 @@ void SAL_CALL PersistentPropertySet::removeEventListener(
// virtual
// virtual
Reference
<
XPropertySetInfo
>
SAL_CALL
Reference
<
XPropertySetInfo
>
SAL_CALL
PersistentPropertySet
::
getPropertySetInfo
()
PersistentPropertySet
::
getPropertySetInfo
()
throw
(
RuntimeException
,
std
::
exception
)
throw
(
RuntimeException
,
std
::
exception
)
{
{
osl
::
Guard
<
osl
::
Mutex
>
aGuard
(
m_pImpl
->
m_aMutex
);
osl
::
Guard
<
osl
::
Mutex
>
aGuard
(
m_pImpl
->
m_aMutex
);
...
@@ -1431,13 +1291,14 @@ Reference< XPropertySetInfo > SAL_CALL
...
@@ -1431,13 +1291,14 @@ Reference< XPropertySetInfo > SAL_CALL
// virtual
// virtual
void
SAL_CALL
PersistentPropertySet
::
setPropertyValue
(
void
SAL_CALL
PersistentPropertySet
::
setPropertyValue
(
const
OUString
&
aPropertyName
,
const
OUString
&
aPropertyName
,
const
Any
&
aValue
)
const
Any
&
aValue
)
throw
(
UnknownPropertyException
,
throw
(
UnknownPropertyException
,
PropertyVetoException
,
PropertyVetoException
,
IllegalArgumentException
,
IllegalArgumentException
,
WrappedTargetException
,
WrappedTargetException
,
RuntimeException
,
std
::
exception
)
RuntimeException
,
std
::
exception
)
{
{
if
(
aPropertyName
.
isEmpty
()
)
if
(
aPropertyName
.
isEmpty
()
)
throw
UnknownPropertyException
();
throw
UnknownPropertyException
();
...
@@ -2400,42 +2261,6 @@ PropertySetInfo_Impl::~PropertySetInfo_Impl()
...
@@ -2400,42 +2261,6 @@ PropertySetInfo_Impl::~PropertySetInfo_Impl()
// !!! Do not delete m_pOwner !!!
// !!! Do not delete m_pOwner !!!
}
}
// XInterface methods.
void
SAL_CALL
PropertySetInfo_Impl
::
acquire
()
throw
()
{
OWeakObject
::
acquire
();
}
void
SAL_CALL
PropertySetInfo_Impl
::
release
()
throw
()
{
OWeakObject
::
release
();
}
css
::
uno
::
Any
SAL_CALL
PropertySetInfo_Impl
::
queryInterface
(
const
css
::
uno
::
Type
&
rType
)
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
css
::
uno
::
Any
aRet
=
cppu
::
queryInterface
(
rType
,
(
static_cast
<
XTypeProvider
*
>
(
this
)),
(
static_cast
<
XPropertySetInfo
*
>
(
this
))
);
return
aRet
.
hasValue
()
?
aRet
:
OWeakObject
::
queryInterface
(
rType
);
}
// XTypeProvider methods.
XTYPEPROVIDER_IMPL_2
(
PropertySetInfo_Impl
,
XTypeProvider
,
XPropertySetInfo
);
// XPropertySetInfo methods.
// XPropertySetInfo methods.
...
...
ucb/source/core/ucbstore.hxx
Dosyayı görüntüle @
7ef43f1e
...
@@ -35,7 +35,8 @@
...
@@ -35,7 +35,8 @@
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <cppuhelper/weak.hxx>
#include <cppuhelper/weak.hxx>
#include <ucbhelper/macros.hxx>
#include <ucbhelper/macros.hxx>
#include <cppuhelper/implbase3.hxx>
#include <cppuhelper/implbase7.hxx>
#define STORE_SERVICE_NAME "com.sun.star.ucb.Store"
#define STORE_SERVICE_NAME "com.sun.star.ucb.Store"
...
@@ -46,12 +47,10 @@
...
@@ -46,12 +47,10 @@
struct
UcbStore_Impl
;
struct
UcbStore_Impl
;
class
UcbStore
:
class
UcbStore
:
public
cppu
::
WeakImplHelper3
<
public
cppu
::
OWeakObject
,
css
::
lang
::
XServiceInfo
,
public
com
::
sun
::
star
::
lang
::
XTypeProvider
,
css
::
ucb
::
XPropertySetRegistryFactory
,
public
com
::
sun
::
star
::
lang
::
XServiceInfo
,
css
::
lang
::
XInitialization
>
public
com
::
sun
::
star
::
ucb
::
XPropertySetRegistryFactory
,
public
com
::
sun
::
star
::
lang
::
XInitialization
{
{
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
uno
::
XComponentContext
>
m_xContext
;
com
::
sun
::
star
::
uno
::
XComponentContext
>
m_xContext
;
...
@@ -63,17 +62,6 @@ public:
...
@@ -63,17 +62,6 @@ public:
com
::
sun
::
star
::
uno
::
XComponentContext
>&
xContext
);
com
::
sun
::
star
::
uno
::
XComponentContext
>&
xContext
);
virtual
~
UcbStore
();
virtual
~
UcbStore
();
// XInterface
virtual
css
::
uno
::
Any
SAL_CALL
queryInterface
(
const
css
::
uno
::
Type
&
rType
)
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
);
virtual
void
SAL_CALL
acquire
()
throw
();
virtual
void
SAL_CALL
release
()
throw
();
// XTypeProvider
XTYPEPROVIDER_DECL
()
// XServiceInfo
// XServiceInfo
XSERVICEINFO_DECL
()
XSERVICEINFO_DECL
()
...
@@ -99,12 +87,10 @@ public:
...
@@ -99,12 +87,10 @@ public:
struct
PropertySetRegistry_Impl
;
struct
PropertySetRegistry_Impl
;
class
PersistentPropertySet
;
class
PersistentPropertySet
;
class
PropertySetRegistry
:
class
PropertySetRegistry
:
public
cppu
::
WeakImplHelper3
<
public
cppu
::
OWeakObject
,
css
::
lang
::
XServiceInfo
,
public
com
::
sun
::
star
::
lang
::
XTypeProvider
,
css
::
ucb
::
XPropertySetRegistry
,
public
com
::
sun
::
star
::
lang
::
XServiceInfo
,
css
::
container
::
XNameAccess
>
public
com
::
sun
::
star
::
ucb
::
XPropertySetRegistry
,
public
com
::
sun
::
star
::
container
::
XNameAccess
{
{
friend
class
PersistentPropertySet
;
friend
class
PersistentPropertySet
;
...
@@ -130,16 +116,6 @@ public:
...
@@ -130,16 +116,6 @@ public:
::
com
::
sun
::
star
::
uno
::
Any
>&
rInitArgs
);
::
com
::
sun
::
star
::
uno
::
Any
>&
rInitArgs
);
virtual
~
PropertySetRegistry
();
virtual
~
PropertySetRegistry
();
// XInterface
virtual
css
::
uno
::
Any
SAL_CALL
queryInterface
(
const
css
::
uno
::
Type
&
rType
)
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
);
virtual
void
SAL_CALL
acquire
()
throw
();
virtual
void
SAL_CALL
release
()
throw
();
// XTypeProvider
XTYPEPROVIDER_DECL
()
// XServiceInfo
// XServiceInfo
XSERVICEINFO_NOFACTORY_DECL
()
XSERVICEINFO_NOFACTORY_DECL
()
...
@@ -185,19 +161,16 @@ public:
...
@@ -185,19 +161,16 @@ public:
struct
PersistentPropertySet_Impl
;
struct
PersistentPropertySet_Impl
;
class
PersistentPropertySet
:
class
PersistentPropertySet
:
public
cppu
::
WeakImplHelper7
<
public
cppu
::
OWeakObject
,
css
::
lang
::
XServiceInfo
,
public
com
::
sun
::
star
::
lang
::
XTypeProvider
,
css
::
lang
::
XComponent
,
public
com
::
sun
::
star
::
lang
::
XServiceInfo
,
css
::
ucb
::
XPersistentPropertySet
,
public
com
::
sun
::
star
::
lang
::
XComponent
,
css
::
container
::
XNamed
,
public
com
::
sun
::
star
::
ucb
::
XPersistentPropertySet
,
css
::
beans
::
XPropertyContainer
,
public
com
::
sun
::
star
::
container
::
XNamed
,
css
::
beans
::
XPropertySetInfoChangeNotifier
,
public
com
::
sun
::
star
::
beans
::
XPropertyContainer
,
css
::
beans
::
XPropertyAccess
>
public
com
::
sun
::
star
::
beans
::
XPropertySetInfoChangeNotifier
,
public
com
::
sun
::
star
::
beans
::
XPropertyAccess
{
{
com
::
sun
::
star
::
uno
::
Reference
<
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>
m_xContext
;
com
::
sun
::
star
::
uno
::
XComponentContext
>
m_xContext
;
PersistentPropertySet_Impl
*
m_pImpl
;
PersistentPropertySet_Impl
*
m_pImpl
;
private
:
private
:
...
@@ -214,17 +187,6 @@ public:
...
@@ -214,17 +187,6 @@ public:
const
OUString
&
rKey
);
const
OUString
&
rKey
);
virtual
~
PersistentPropertySet
();
virtual
~
PersistentPropertySet
();
// XInterface
virtual
css
::
uno
::
Any
SAL_CALL
queryInterface
(
const
css
::
uno
::
Type
&
rType
)
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
);
virtual
void
SAL_CALL
acquire
()
throw
();
virtual
void
SAL_CALL
release
()
throw
();
// XTypeProvider
XTYPEPROVIDER_DECL
()
// XServiceInfo
// XServiceInfo
XSERVICEINFO_NOFACTORY_DECL
()
XSERVICEINFO_NOFACTORY_DECL
()
...
...
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