loplugin:unusedfields in ucb/

Change-Id: Ic9ca044aa2465a197397bec6632e1a5aa5fe7110
This commit is contained in:
Noel Grandin
2015-11-24 08:09:58 +02:00
parent acc4acb9ca
commit 00bb8141be
20 changed files with 23 additions and 91 deletions

View File

@@ -230,7 +230,6 @@ UniversalContentBroker::UniversalContentBroker(
const Reference< css::uno::XComponentContext >& xContext ) const Reference< css::uno::XComponentContext >& xContext )
: m_xContext( xContext ), : m_xContext( xContext ),
m_pDisposeEventListeners( nullptr ), m_pDisposeEventListeners( nullptr ),
m_nInitCount( 0 ), //@@@ see initialize() method
m_nCommandId( 0 ) m_nCommandId( 0 )
{ {
OSL_ENSURE( m_xContext.is(), OSL_ENSURE( m_xContext.is(),

View File

@@ -210,7 +210,6 @@ private:
ProviderMap_Impl m_aProviders; ProviderMap_Impl m_aProviders;
osl::Mutex m_aMutex; osl::Mutex m_aMutex;
cppu::OInterfaceContainerHelper* m_pDisposeEventListeners; cppu::OInterfaceContainerHelper* m_pDisposeEventListeners;
oslInterlockedCount m_nInitCount; //@@@ see initialize() method
sal_Int32 m_nCommandId; sal_Int32 m_nCommandId;
}; };

View File

@@ -86,13 +86,10 @@ namespace ucb { namespace ucp { namespace ext
ResultList m_aResults; ResultList m_aResults;
::rtl::Reference< Content > m_xContent; ::rtl::Reference< Content > m_xContent;
Reference< XComponentContext > m_xContext; Reference< XComponentContext > m_xContext;
sal_Int32 m_nOpenMode;
DataSupplier_Impl( const Reference< XComponentContext >& rxContext, const ::rtl::Reference< Content >& i_rContent, DataSupplier_Impl( const Reference< XComponentContext >& rxContext, const ::rtl::Reference< Content >& i_rContent )
const sal_Int32 i_nOpenMode )
:m_xContent( i_rContent ) :m_xContent( i_rContent )
,m_xContext( rxContext ) ,m_xContext( rxContext )
,m_nOpenMode( i_nOpenMode )
{ {
} }
~DataSupplier_Impl(); ~DataSupplier_Impl();
@@ -126,9 +123,8 @@ namespace ucb { namespace ucp { namespace ext
DataSupplier::DataSupplier( const Reference< XComponentContext >& rxContext, DataSupplier::DataSupplier( const Reference< XComponentContext >& rxContext,
const ::rtl::Reference< Content >& i_rContent, const ::rtl::Reference< Content >& i_rContent )
const sal_Int32 i_nOpenMode ) :m_pImpl( new DataSupplier_Impl( rxContext, i_rContent ) )
:m_pImpl( new DataSupplier_Impl( rxContext, i_rContent, i_nOpenMode ) )
{ {
} }

View File

@@ -42,8 +42,7 @@ namespace ucb { namespace ucp { namespace ext
public: public:
DataSupplier( DataSupplier(
const css::uno::Reference< css::uno::XComponentContext >& rxContext, const css::uno::Reference< css::uno::XComponentContext >& rxContext,
const rtl::Reference< Content >& rContent, const rtl::Reference< Content >& rContent
const sal_Int32 nOpenMode
); );
void fetchData(); void fetchData();

View File

@@ -63,8 +63,7 @@ namespace ucb { namespace ucp { namespace ext
{ {
::rtl::Reference< DataSupplier > pDataSupplier( new DataSupplier( ::rtl::Reference< DataSupplier > pDataSupplier( new DataSupplier(
m_xContext, m_xContext,
m_xContent, m_xContent
m_aCommand.Mode
) ); ) );
m_xResultSet1 = new ::ucbhelper::ResultSet( m_xResultSet1 = new ::ucbhelper::ResultSet(
m_xContext, m_xContext,

View File

@@ -238,13 +238,11 @@ public:
ResultSetFactoryI(const Reference<XComponentContext >& rxContext, ResultSetFactoryI(const Reference<XComponentContext >& rxContext,
const Reference<XContentProvider >& xProvider, const Reference<XContentProvider >& xProvider,
sal_Int32 nOpenMode,
const Sequence<Property>& seq, const Sequence<Property>& seq,
const Sequence<NumberedSortingInfo>& seqSort, const Sequence<NumberedSortingInfo>& seqSort,
const std::vector<FTPDirentry>& dirvec) const std::vector<FTPDirentry>& dirvec)
: m_xContext(rxContext), : m_xContext(rxContext),
m_xProvider(xProvider), m_xProvider(xProvider),
m_nOpenMode(nOpenMode),
m_seq(seq), m_seq(seq),
m_seqSort(seqSort), m_seqSort(seqSort),
m_dirvec(dirvec) m_dirvec(dirvec)
@@ -255,7 +253,6 @@ public:
{ {
return new ResultSetI(m_xContext, return new ResultSetI(m_xContext,
m_xProvider, m_xProvider,
m_nOpenMode,
m_seq, m_seq,
m_seqSort, m_seqSort,
m_dirvec); m_dirvec);
@@ -265,7 +262,6 @@ public:
Reference< XComponentContext > m_xContext; Reference< XComponentContext > m_xContext;
Reference< XContentProvider > m_xProvider; Reference< XContentProvider > m_xProvider;
sal_Int32 m_nOpenMode;
Sequence< Property > m_seq; Sequence< Property > m_seq;
Sequence< NumberedSortingInfo > m_seqSort; Sequence< NumberedSortingInfo > m_seqSort;
std::vector<FTPDirentry> m_dirvec; std::vector<FTPDirentry> m_dirvec;
@@ -564,7 +560,6 @@ Any SAL_CALL FTPContent::execute( const Command& aCommand,
Environment, Environment,
new ResultSetFactoryI(m_xContext, new ResultSetFactoryI(m_xContext,
m_xProvider.get(), m_xProvider.get(),
aOpenCommand.Mode,
aOpenCommand.Properties, aOpenCommand.Properties,
aOpenCommand.SortingInfo, aOpenCommand.SortingInfo,
resvec)); resvec));

View File

@@ -40,11 +40,10 @@ using namespace com::sun::star::sdbc;
ResultSetI::ResultSetI(const Reference<XComponentContext>& rxContext, ResultSetI::ResultSetI(const Reference<XComponentContext>& rxContext,
const Reference<XContentProvider>& xProvider, const Reference<XContentProvider>& xProvider,
sal_Int32 nOpenMode,
const Sequence<Property>& seqProp, const Sequence<Property>& seqProp,
const Sequence< NumberedSortingInfo >& seqSort, const Sequence< NumberedSortingInfo >& seqSort,
const std::vector<FTPDirentry>& dirvec) const std::vector<FTPDirentry>& dirvec)
: ResultSetBase(rxContext,xProvider,nOpenMode,seqProp,seqSort) : ResultSetBase(rxContext,xProvider,seqProp,seqSort)
{ {
for( size_t i = 0; i < dirvec.size(); ++i) for( size_t i = 0; i < dirvec.size(); ++i)
m_aPath.push_back(dirvec[i].m_aURL); m_aPath.push_back(dirvec[i].m_aURL);

View File

@@ -37,7 +37,6 @@ namespace ftp {
ResultSetI( ResultSetI(
const css::uno::Reference< css::uno::XComponentContext>& rxContext, const css::uno::Reference< css::uno::XComponentContext>& rxContext,
const css::uno::Reference< css::ucb::XContentProvider>& xProvider, const css::uno::Reference< css::ucb::XContentProvider>& xProvider,
sal_Int32 nOpenMode,
const css::uno::Sequence< css::beans::Property >& seq, const css::uno::Sequence< css::beans::Property >& seq,
const css::uno::Sequence< css::ucb::NumberedSortingInfo >& seqSort, const css::uno::Sequence< css::ucb::NumberedSortingInfo >& seqSort,
const std::vector<FTPDirentry>& dirvec); const std::vector<FTPDirentry>& dirvec);

View File

@@ -33,14 +33,12 @@ using namespace com::sun::star;
ResultSetBase::ResultSetBase( ResultSetBase::ResultSetBase(
const uno::Reference< uno::XComponentContext >& rxContext, const uno::Reference< uno::XComponentContext >& rxContext,
const uno::Reference< ucb::XContentProvider >& xProvider, const uno::Reference< ucb::XContentProvider >& xProvider,
sal_Int32 nOpenMode,
const uno::Sequence< beans::Property >& seq, const uno::Sequence< beans::Property >& seq,
const uno::Sequence< ucb::NumberedSortingInfo >& seqSort ) const uno::Sequence< ucb::NumberedSortingInfo >& seqSort )
: m_xContext( rxContext ), : m_xContext( rxContext ),
m_xProvider( xProvider ), m_xProvider( xProvider ),
m_nRow( -1 ), m_nRow( -1 ),
m_nWasNull( true ), m_nWasNull( true ),
m_nOpenMode( nOpenMode ),
m_bRowCountFinal( true ), m_bRowCountFinal( true ),
m_sProperty( seq ), m_sProperty( seq ),
m_sSortingInfo( seqSort ), m_sSortingInfo( seqSort ),

View File

@@ -52,7 +52,6 @@ namespace ftp {
ResultSetBase(const css::uno::Reference< css::uno::XComponentContext >& rxContext, ResultSetBase(const css::uno::Reference< css::uno::XComponentContext >& rxContext,
const css::uno::Reference< css::ucb::XContentProvider >& xProvider, const css::uno::Reference< css::ucb::XContentProvider >& xProvider,
sal_Int32 nOpenMode,
const css::uno::Sequence< css::beans::Property >& seq, const css::uno::Sequence< css::beans::Property >& seq,
const css::uno::Sequence< css::ucb::NumberedSortingInfo >& seqSort); const css::uno::Sequence< css::ucb::NumberedSortingInfo >& seqSort);
@@ -523,7 +522,6 @@ namespace ftp {
css::ucb::XContentProvider > m_xProvider; css::ucb::XContentProvider > m_xProvider;
sal_Int32 m_nRow; sal_Int32 m_nRow;
bool m_nWasNull; bool m_nWasNull;
sal_Int32 m_nOpenMode;
bool m_bRowCountFinal; bool m_bRowCountFinal;
typedef std::vector< css::uno::Reference< typedef std::vector< css::uno::Reference<

View File

@@ -57,9 +57,6 @@ namespace ftp {
virtual ~FTPInputStreamContainer() {} virtual ~FTPInputStreamContainer() {}
css::uno::Reference< css::io::XInputStream> operator()(); css::uno::Reference< css::io::XInputStream> operator()();
private:
FTPInputStream* m_out;
}; };
} }

View File

@@ -79,16 +79,14 @@ struct DataSupplier_Impl
rtl::Reference< Content > m_xContent; rtl::Reference< Content > m_xContent;
uno::Reference< uno::XComponentContext > m_xContext; uno::Reference< uno::XComponentContext > m_xContext;
uno::Reference< container::XEnumeration > m_xFolderEnum; uno::Reference< container::XEnumeration > m_xFolderEnum;
sal_Int32 m_nOpenMode;
bool m_bCountFinal; bool m_bCountFinal;
bool m_bThrowException; bool m_bThrowException;
DataSupplier_Impl( DataSupplier_Impl(
const uno::Reference< uno::XComponentContext >& rxContext, const uno::Reference< uno::XComponentContext >& rxContext,
const rtl::Reference< Content >& rContent, const rtl::Reference< Content >& rContent )
sal_Int32 nOpenMode )
: m_xContent( rContent ), m_xContext( rxContext ), : m_xContent( rContent ), m_xContext( rxContext ),
m_xFolderEnum( rContent->getIterator() ), m_nOpenMode( nOpenMode ), m_xFolderEnum( rContent->getIterator() ),
m_bCountFinal( !m_xFolderEnum.is() ), m_bThrowException( m_bCountFinal ) m_bCountFinal( !m_xFolderEnum.is() ), m_bThrowException( m_bCountFinal )
{} {}
~DataSupplier_Impl(); ~DataSupplier_Impl();
@@ -119,9 +117,8 @@ DataSupplier_Impl::~DataSupplier_Impl()
DataSupplier::DataSupplier( DataSupplier::DataSupplier(
const uno::Reference< uno::XComponentContext >& rxContext, const uno::Reference< uno::XComponentContext >& rxContext,
const rtl::Reference< Content >& rContent, const rtl::Reference< Content >& rContent )
sal_Int32 nOpenMode ) : m_pImpl( new DataSupplier_Impl( rxContext, rContent ) )
: m_pImpl( new DataSupplier_Impl( rxContext, rContent, nOpenMode ) )
{ {
} }

View File

@@ -35,8 +35,7 @@ class DataSupplier : public ::ucbhelper::ResultSetDataSupplier
public: public:
DataSupplier( const css::uno::Reference< css::uno::XComponentContext >& rxContext, DataSupplier( const css::uno::Reference< css::uno::XComponentContext >& rxContext,
const rtl::Reference< Content >& rContent, const rtl::Reference< Content >& rContent );
sal_Int32 nOpenMode );
virtual ~DataSupplier(); virtual ~DataSupplier();
virtual OUString queryContentIdentifierString( sal_uInt32 nIndex ) override; virtual OUString queryContentIdentifierString( sal_uInt32 nIndex ) override;

View File

@@ -65,8 +65,7 @@ void DynamicResultSet::initStatic()
= new ::ucbhelper::ResultSet( m_xContext, = new ::ucbhelper::ResultSet( m_xContext,
m_aCommand.Properties, m_aCommand.Properties,
new DataSupplier( m_xContext, new DataSupplier( m_xContext,
m_xContent, m_xContent ),
m_aCommand.Mode ),
m_xEnv ); m_xEnv );
} }
@@ -77,8 +76,7 @@ void DynamicResultSet::initDynamic()
= new ::ucbhelper::ResultSet( m_xContext, = new ::ucbhelper::ResultSet( m_xContext,
m_aCommand.Properties, m_aCommand.Properties,
new DataSupplier( m_xContext, new DataSupplier( m_xContext,
m_xContent, m_xContent ),
m_aCommand.Mode ),
m_xEnv ); m_xEnv );
m_xResultSet2 = m_xResultSet1; m_xResultSet2 = m_xResultSet1;
} }

View File

@@ -74,17 +74,15 @@ struct DataSupplier_Impl
ResultList m_aResults; ResultList m_aResults;
rtl::Reference< Content > m_xContent; rtl::Reference< Content > m_xContent;
uno::Reference< uno::XComponentContext > m_xContext; uno::Reference< uno::XComponentContext > m_xContext;
uno::Sequence< OUString > * m_pNamesOfChildren; uno::Sequence< OUString > * m_pNamesOfChildren;
sal_Int32 m_nOpenMode;
bool m_bCountFinal; bool m_bCountFinal;
bool m_bThrowException; bool m_bThrowException;
DataSupplier_Impl( DataSupplier_Impl(
const uno::Reference< uno::XComponentContext >& rxContext, const uno::Reference< uno::XComponentContext >& rxContext,
const rtl::Reference< Content >& rContent, const rtl::Reference< Content >& rContent )
sal_Int32 nOpenMode )
: m_xContent( rContent ), m_xContext( rxContext ), : m_xContent( rContent ), m_xContext( rxContext ),
m_pNamesOfChildren( nullptr ), m_nOpenMode( nOpenMode ), m_pNamesOfChildren( nullptr ),
m_bCountFinal( false ), m_bThrowException( false ) m_bCountFinal( false ), m_bThrowException( false )
{} {}
~DataSupplier_Impl(); ~DataSupplier_Impl();
@@ -110,9 +108,8 @@ DataSupplier_Impl::~DataSupplier_Impl()
// DataSupplier Implementation. // DataSupplier Implementation.
ResultSetDataSupplier::ResultSetDataSupplier( ResultSetDataSupplier::ResultSetDataSupplier(
const uno::Reference< uno::XComponentContext >& rxContext, const uno::Reference< uno::XComponentContext >& rxContext,
const rtl::Reference< Content >& rContent, const rtl::Reference< Content >& rContent )
sal_Int32 nOpenMode ) : m_pImpl( new DataSupplier_Impl( rxContext, rContent ) )
: m_pImpl( new DataSupplier_Impl( rxContext, rContent, nOpenMode ) )
{ {
} }

View File

@@ -41,8 +41,7 @@ private:
public: public:
ResultSetDataSupplier( ResultSetDataSupplier(
const css::uno::Reference< css::uno::XComponentContext >& rxContext, const css::uno::Reference< css::uno::XComponentContext >& rxContext,
const rtl::Reference< Content >& rContent, const rtl::Reference< Content >& rContent );
sal_Int32 nOpenMode = css::ucb::OpenMode::ALL );
virtual ~ResultSetDataSupplier(); virtual ~ResultSetDataSupplier();
virtual OUString queryContentIdentifierString( sal_uInt32 nIndex ) override; virtual OUString queryContentIdentifierString( sal_uInt32 nIndex ) override;

View File

@@ -67,8 +67,7 @@ void DynamicResultSet::initStatic()
m_xContext, m_xContext,
m_aCommand.Properties, m_aCommand.Properties,
new ResultSetDataSupplier( m_xContext, new ResultSetDataSupplier( m_xContext,
m_xContent, m_xContent ) );
m_aCommand.Mode ) );
} }
@@ -79,8 +78,7 @@ void DynamicResultSet::initDynamic()
m_xContext, m_xContext,
m_aCommand.Properties, m_aCommand.Properties,
new ResultSetDataSupplier( m_xContext, new ResultSetDataSupplier( m_xContext,
m_xContent, m_xContent ) );
m_aCommand.Mode ) );
m_xResultSet2 = m_xResultSet1; m_xResultSet2 = m_xResultSet1;
} }

View File

@@ -58,10 +58,7 @@ struct DAVResource
struct DAVResourceInfo struct DAVResourceInfo
{ {
OUString uri;
std::vector < OUString > properties; std::vector < OUString > properties;
explicit DAVResourceInfo( const OUString & inUri ) : uri( inUri ) {}
}; };
} // namespace webdav_ucp } // namespace webdav_ucp

View File

@@ -35,36 +35,6 @@
namespace webdav_ucp namespace webdav_ucp
{ {
/* RFC 2518
15.1 Class 1
A class 1 compliant resource MUST meet all "MUST" requirements in all
sections of this document.
Class 1 compliant resources MUST return, at minimum, the value "1" in
the DAV header on all responses to the OPTIONS method.
15.2 Class 2
A class 2 compliant resource MUST meet all class 1 requirements and
support the LOCK method, the supportedlock property, the
lockdiscovery property, the Time-Out response header and the Lock-
Token request header. A class "2" compliant resource SHOULD also
support the Time-Out request header and the owner XML element.
Class 2 compliant resources MUST return, at minimum, the values "1"
and "2" in the DAV header on all responses to the OPTIONS method.
*/
struct DAVCapabilities
{
bool class1;
bool class2;
bool executable; // supports "executable" property (introduced by mod_dav)
DAVCapabilities() : class1( false ), class2( false ), executable( false ) {}
};
enum Depth { DAVZERO = 0, DAVONE = 1, DAVINFINITY = -1 }; enum Depth { DAVZERO = 0, DAVONE = 1, DAVINFINITY = -1 };

View File

@@ -220,13 +220,12 @@ extern "C" int NPFR_propnames_iter( void* userdata,
} }
extern "C" void NPFR_propnames_results( void* userdata, extern "C" void NPFR_propnames_results( void* userdata,
const ne_uri* uri, const ne_uri* /*uri*/,
const NeonPropFindResultSet* results ) const NeonPropFindResultSet* results )
{ {
// @@@ href is not the uri! DAVResourceInfo ctor wants uri! // @@@ href is not the uri! DAVResourceInfo ctor wants uri!
// Create entry for the resource. // Create entry for the resource.
DAVResourceInfo theResource( DAVResourceInfo theResource;
OStringToOUString( uri->path, RTL_TEXTENCODING_UTF8 ) );
// Fill entry. // Fill entry.
ne_propset_iterate( results, NPFR_propnames_iter, &theResource ); ne_propset_iterate( results, NPFR_propnames_iter, &theResource );