Kaydet (Commit) 50de43d6 authored tarafından Norbert Thiebaud's avatar Norbert Thiebaud

de-macroize ucb sortresult

Change-Id: Ib522fde5e453560b23c0189a29b50f5dfddb4482
üst edb2dcff
...@@ -20,11 +20,13 @@ ...@@ -20,11 +20,13 @@
#include <vector> #include <vector>
#include <sortdynres.hxx> #include <sortdynres.hxx>
#include <cppuhelper/interfacecontainer.hxx> #include <cppuhelper/interfacecontainer.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/ucb/ContentResultSetCapability.hpp> #include <com/sun/star/ucb/ContentResultSetCapability.hpp>
#include <com/sun/star/ucb/ListActionType.hpp> #include <com/sun/star/ucb/ListActionType.hpp>
#include <com/sun/star/ucb/WelcomeDynamicResultSetStruct.hpp> #include <com/sun/star/ucb/WelcomeDynamicResultSetStruct.hpp>
#include <com/sun/star/ucb/CachedDynamicResultSetStubFactory.hpp> #include <com/sun/star/ucb/CachedDynamicResultSetStubFactory.hpp>
#include <com/sun/star/ucb/XSourceInitialization.hpp> #include <com/sun/star/ucb/XSourceInitialization.hpp>
#include <ucbhelper/getcomponentcontext.hxx>
using namespace com::sun::star::beans; using namespace com::sun::star::beans;
using namespace com::sun::star::lang; using namespace com::sun::star::lang;
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <com/sun/star/ucb/XDynamicResultSetListener.hpp> #include <com/sun/star/ucb/XDynamicResultSetListener.hpp>
#include <com/sun/star/ucb/ListenerAlreadySetException.hpp> #include <com/sun/star/ucb/ListenerAlreadySetException.hpp>
#include <com/sun/star/ucb/XSortedDynamicResultSetFactory.hpp> #include <com/sun/star/ucb/XSortedDynamicResultSetFactory.hpp>
#include <cppuhelper/factory.hxx>
#include <cppuhelper/implbase1.hxx> #include <cppuhelper/implbase1.hxx>
#include <cppuhelper/implbase2.hxx> #include <cppuhelper/implbase2.hxx>
#include "sortresult.hxx" #include "sortresult.hxx"
......
...@@ -20,16 +20,17 @@ ...@@ -20,16 +20,17 @@
#include <vector> #include <vector>
#include <sortresult.hxx> #include <sortresult.hxx>
#include <cppuhelper/interfacecontainer.hxx>
#include <com/sun/star/sdbc/DataType.hpp> #include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/XResultSetMetaData.hpp> #include <com/sun/star/sdbc/XResultSetMetaData.hpp>
#include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp> #include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
#include <com/sun/star/ucb/ListActionType.hpp> #include <com/sun/star/ucb/ListActionType.hpp>
#include <com/sun/star/ucb/XAnyCompare.hpp> #include <com/sun/star/ucb/XAnyCompare.hpp>
#include <com/sun/star/ucb/XAnyCompareFactory.hpp> #include <com/sun/star/ucb/XAnyCompareFactory.hpp>
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/interfacecontainer.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <osl/diagnose.h> #include <osl/diagnose.h>
using namespace com::sun::star::beans; using namespace com::sun::star::beans;
using namespace com::sun::star::container; using namespace com::sun::star::container;
using namespace com::sun::star::io; using namespace com::sun::star::io;
...@@ -90,10 +91,8 @@ struct SortListData ...@@ -90,10 +91,8 @@ struct SortListData
class SRSPropertySetInfo : class SRSPropertySetInfo : public cppu::WeakImplHelper1 <
public OWeakObject, XPropertySetInfo >
public XTypeProvider,
public XPropertySetInfo
{ {
Property maProps[2]; Property maProps[2];
...@@ -103,17 +102,6 @@ public: ...@@ -103,17 +102,6 @@ public:
SRSPropertySetInfo(); SRSPropertySetInfo();
virtual ~SRSPropertySetInfo(); virtual ~SRSPropertySetInfo();
// 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 );
...@@ -208,58 +196,37 @@ SortedResultSet::~SortedResultSet() ...@@ -208,58 +196,37 @@ SortedResultSet::~SortedResultSet()
} }
// XInterface methods. // XServiceInfo methods.
void SAL_CALL SortedResultSet::acquire() OUString SAL_CALL SortedResultSet::getImplementationName()
throw() throw( css::uno::RuntimeException, std::exception )
{ {
OWeakObject::acquire(); return getImplementationName_Static();
} }
void SAL_CALL SortedResultSet::release() OUString SortedResultSet::getImplementationName_Static()
throw()
{ {
OWeakObject::release(); return OUString( "com.sun.star.comp.ucb.SortedResultSet" );
} }
css::uno::Any SAL_CALL SortedResultSet::queryInterface( const css::uno::Type & rType ) sal_Bool SAL_CALL SortedResultSet::supportsService( const OUString& ServiceName )
throw( css::uno::RuntimeException, std::exception ) throw( css::uno::RuntimeException, std::exception )
{ {
css::uno::Any aRet = cppu::queryInterface( rType, return cppu::supportsService( this, ServiceName );
(static_cast< XTypeProvider* >(this)),
(static_cast< XServiceInfo* >(this)),
(static_cast< XComponent* >(this)),
(static_cast< XContentAccess* >(this)),
(static_cast< XResultSet* >(this)),
(static_cast< XRow* >(this)),
(static_cast< XCloseable* >(this)),
(static_cast< XResultSetMetaDataSupplier* >(this)),
(static_cast< XPropertySet* >(this))
);
return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
} }
// XTypeProvider methods. css::uno::Sequence< OUString > SAL_CALL SortedResultSet::getSupportedServiceNames()
throw( css::uno::RuntimeException, std::exception )
{
XTYPEPROVIDER_IMPL_9( SortedResultSet, return getSupportedServiceNames_Static();
XTypeProvider, }
XServiceInfo,
XComponent,
XContentAccess,
XResultSet,
XRow,
XCloseable,
XResultSetMetaDataSupplier,
XPropertySet );
// XServiceInfo methods.
XSERVICEINFO_NOFACTORY_IMPL_1( SortedResultSet, css::uno::Sequence< OUString >SortedResultSet::getSupportedServiceNames_Static()
OUString( "com.sun.star.comp.ucb.SortedResultSet" ), {
OUString( RESULTSET_SERVICE_NAME ) ); css::uno::Sequence< OUString > aSNS( 1 );
aSNS.getArray()[ 0 ] = OUString( RESULTSET_SERVICE_NAME );
return aSNS;
}
// XComponent methods. // XComponent methods.
...@@ -2034,39 +2001,6 @@ SRSPropertySetInfo::SRSPropertySetInfo() ...@@ -2034,39 +2001,6 @@ SRSPropertySetInfo::SRSPropertySetInfo()
SRSPropertySetInfo::~SRSPropertySetInfo() SRSPropertySetInfo::~SRSPropertySetInfo()
{} {}
// XInterface methods.
void SAL_CALL SRSPropertySetInfo::acquire()
throw()
{
OWeakObject::acquire();
}
void SAL_CALL SRSPropertySetInfo::release()
throw()
{
OWeakObject::release();
}
css::uno::Any SAL_CALL SRSPropertySetInfo::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( SRSPropertySetInfo,
XTypeProvider,
XPropertySetInfo );
// XPropertySetInfo methods. // XPropertySetInfo methods.
Sequence< Property > SAL_CALL Sequence< Property > SAL_CALL
......
...@@ -21,10 +21,10 @@ ...@@ -21,10 +21,10 @@
#define _SORTRESULT_HXX #define _SORTRESULT_HXX
#include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/sdbc/XCloseable.hpp> #include <com/sun/star/sdbc/XCloseable.hpp>
#include <com/sun/star/sdbc/XResultSet.hpp> #include <com/sun/star/sdbc/XResultSet.hpp>
#include <com/sun/star/sdbc/XResultSetMetaData.hpp> #include <com/sun/star/sdbc/XResultSetMetaData.hpp>
...@@ -34,11 +34,8 @@ ...@@ -34,11 +34,8 @@
#include <com/sun/star/ucb/NumberedSortingInfo.hpp> #include <com/sun/star/ucb/NumberedSortingInfo.hpp>
#include <com/sun/star/ucb/XAnyCompareFactory.hpp> #include <com/sun/star/ucb/XAnyCompareFactory.hpp>
#include <com/sun/star/ucb/ListAction.hpp> #include <com/sun/star/ucb/ListAction.hpp>
#include <cppuhelper/weak.hxx> #include <cppuhelper/implbase8.hxx>
#include <osl/mutex.hxx>
#include <deque> #include <deque>
#include <ucbhelper/macros.hxx>
namespace cppu { namespace cppu {
class OInterfaceContainerHelper; class OInterfaceContainerHelper;
...@@ -116,17 +113,15 @@ public: ...@@ -116,17 +113,15 @@ public:
class SortedResultSet: class SortedResultSet: public cppu::WeakImplHelper8 <
public cppu::OWeakObject, css::lang::XServiceInfo,
public css::lang::XTypeProvider, css::lang::XComponent,
public css::lang::XServiceInfo, css::ucb::XContentAccess,
public css::lang::XComponent, css::sdbc::XResultSet,
public css::ucb::XContentAccess, css::sdbc::XRow,
public css::sdbc::XResultSet, css::sdbc::XCloseable,
public css::sdbc::XRow, css::sdbc::XResultSetMetaDataSupplier,
public css::sdbc::XCloseable, css::beans::XPropertySet >
public css::sdbc::XResultSetMetaDataSupplier,
public css::beans::XPropertySet
{ {
cppu::OInterfaceContainerHelper *mpDisposeEventListeners; cppu::OInterfaceContainerHelper *mpDisposeEventListeners;
PropertyChangeListeners_Impl *mpPropChangeListeners; PropertyChangeListeners_Impl *mpPropChangeListeners;
...@@ -191,19 +186,19 @@ public: ...@@ -191,19 +186,19 @@ public:
void ResortModified( EventList* pList ); void ResortModified( EventList* pList );
void ResortNew( EventList* pList ); void ResortNew( EventList* pList );
// 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() virtual OUString SAL_CALL getImplementationName()
throw( css::uno::RuntimeException,
std::exception );
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
throw( css::uno::RuntimeException,
std::exception );
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
throw( css::uno::RuntimeException,
std::exception );
static OUString getImplementationName_Static();
static css::uno::Sequence< OUString > getSupportedServiceNames_Static();
// XComponent // XComponent
virtual void SAL_CALL virtual void SAL_CALL
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment