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
499370e5
Kaydet (Commit)
499370e5
authored
Ock 25, 2017
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Remove unused macros
Change-Id: Ib3f8f6cde75b6a605052a3d941380ab27db0f326
üst
03c0a7fe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
131 deletions
+0
-131
xinterface.hxx
framework/inc/macros/xinterface.hxx
+0
-60
xtypeprovider.hxx
framework/inc/macros/xtypeprovider.hxx
+0
-71
No files found.
framework/inc/macros/xinterface.hxx
Dosyayı görüntüle @
499370e5
...
...
@@ -82,34 +82,6 @@ ________________________________________________________________________________
return aReturn; \
}
// private
// implementation of XInterface::queryInterface() with more than 12 other interfaces!
#define PRIVATE_DEFINE_XINTERFACE_LARGE( CLASS, BASECLASS, INTERFACES_FIRST, INTERFACES_SECOND ) \
PRIVATE_DEFINE_XINTERFACE_ACQUIRE_RELEASE( CLASS, BASECLASS ) \
css::uno::Any SAL_CALL CLASS::queryInterface( const css::uno::Type& aType ) throw( css::uno::RuntimeException, std::exception ) \
{ \
/* Attention: Don't use mutex or guard in this method!!! Is a method of XInterface. */
\
/* Ask for my own supported interfaces ... */
\
css::uno::Any aReturn ( ::cppu::queryInterface INTERFACES_FIRST \
); \
/* If searched interface not supported by first group ... */
\
if ( !aReturn.hasValue() ) \
{ \
/* ... search in second group. (cppuhelper support 12 items only!) */
\
aReturn = ::cppu::queryInterface INTERFACES_SECOND; \
/* If searched interface not supported by this class ... */
\
if ( !aReturn.hasValue() ) \
{ \
/* ... ask baseclass for interfaces! */
\
aReturn = BASECLASS::queryInterface( aType ); \
} \
} \
/* Return result of this search. */
\
return aReturn; \
}
// private
// help macros to replace INTERFACES in queryInterface() [see before]
...
...
@@ -196,38 +168,6 @@ ________________________________________________________________________________
) \
)
// implementation of XInterface with 22 additional interfaces for queryInterface()
#define DEFINE_XINTERFACE_22( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11, INTERFACE12, INTERFACE13, INTERFACE14, INTERFACE15, INTERFACE16, INTERFACE17, INTERFACE18, INTERFACE19, INTERFACE20, INTERFACE21, INTERFACE22 ) \
PRIVATE_DEFINE_XINTERFACE_LARGE ( CLASS, \
BASECLASS, \
( aType, PRIVATE_DEFINE_INTERFACE_11 ( INTERFACE1 , \
INTERFACE2 , \
INTERFACE3 , \
INTERFACE4 , \
INTERFACE5 , \
INTERFACE6 , \
INTERFACE7 , \
INTERFACE8 , \
INTERFACE9 , \
INTERFACE10 , \
INTERFACE11 \
) \
), \
( aType, PRIVATE_DEFINE_INTERFACE_11 ( INTERFACE12 , \
INTERFACE13 , \
INTERFACE14 , \
INTERFACE15 , \
INTERFACE16 , \
INTERFACE17 , \
INTERFACE18 , \
INTERFACE19 , \
INTERFACE20 , \
INTERFACE22 , \
INTERFACE21 \
) \
) \
)
}
// namespace framework
#endif // INCLUDED_FRAMEWORK_INC_MACROS_XINTERFACE_HXX
...
...
framework/inc/macros/xtypeprovider.hxx
Dosyayı görüntüle @
499370e5
...
...
@@ -108,59 +108,6 @@ ________________________________________________________________________________
return pTypeCollection->getTypes(); \
}
// private
// implementation of XTypeProvider::getTypes() with more than 12 interfaces!
#define PRIVATE_DEFINE_XTYPEPROVIDER_LARGE( CLASS, TYPES_FIRST, TYPES_SECOND ) \
PRIVATE_DEFINE_XTYPEPROVIDER_GETIMPLEMENTATIONID( CLASS ) \
css::uno::Sequence< css::uno::Type > SAL_CALL CLASS::getTypes() throw( css::uno::RuntimeException, std::exception ) \
{ \
/* Optimize this method ! */
\
/* We initialize a static variable only one time. */
\
/* And we don't must use a mutex at every call! */
\
/* For the first call; pTypeCollection is NULL - */
\
/* for the second call pTypeCollection is different from NULL! */
\
static css::uno::Sequence< css::uno::Type >* pTypeCollection = nullptr; \
if ( pTypeCollection == nullptr ) \
{ \
/* Ready for multithreading; get global mutex for first call of this method only! see before */
\
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); \
/* Control these pointer again ... it can be, that another instance will be faster then these! */
\
if ( pTypeCollection == nullptr ) \
{ \
/* Create two typecollections */
\
/* (cppuhelper support 12 items per collection only!) */
\
::cppu::OTypeCollection aTypeCollection1 TYPES_FIRST; \
::cppu::OTypeCollection aTypeCollection2 TYPES_SECOND; \
/* Copy all items from both sequences to one result list! */
\
css::uno::Sequence< css::uno::Type > seqTypes1 = aTypeCollection1.getTypes(); \
css::uno::Sequence< css::uno::Type > seqTypes2 = aTypeCollection2.getTypes(); \
sal_Int32 nCount1 = seqTypes1.getLength(); \
sal_Int32 nCount2 = seqTypes2.getLength(); \
static css::uno::Sequence< css::uno::Type > seqResult ( nCount1+nCount2 ); \
sal_Int32 nSource = 0; \
sal_Int32 nDestination= 0; \
while( nSource<nCount1 ) \
{ \
seqResult[nDestination] = seqTypes1[nSource]; \
++nSource; \
++nDestination; \
} \
nSource = 0; \
while( nSource<nCount2 ) \
{ \
seqResult[nDestination] = seqTypes2[nSource]; \
++nSource; \
++nDestination; \
} \
/* ... and set his address to static pointer! */
\
pTypeCollection = &seqResult; \
} \
} \
return *pTypeCollection; \
}
// public
// declaration of XTypeProvider
...
...
@@ -204,24 +151,6 @@ ________________________________________________________________________________
)) \
)
// implementation of XTypeProvider with 20 additional interfaces for getTypes()
#define DEFINE_XTYPEPROVIDER_21( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11, TYPE12, TYPE13, TYPE14, TYPE15, TYPE16, TYPE17, TYPE18, TYPE19, TYPE20, TYPE21 ) \
PRIVATE_DEFINE_XTYPEPROVIDER_LARGE ( CLASS, \
(PRIVATE_DEFINE_TYPE_11( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11 ), \
cppu::UnoType<TYPE12>::get()), \
(PRIVATE_DEFINE_TYPE_9 ( TYPE13 , \
TYPE14 , \
TYPE15 , \
TYPE16 , \
TYPE17 , \
TYPE18 , \
TYPE19 , \
TYPE20 , \
TYPE21 \
)) \
)
}
// namespace framework
#endif // INCLUDED_FRAMEWORK_INC_MACROS_XTYPEPROVIDER_HXX
...
...
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