summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-04-07 14:16:06 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-04-09 06:44:49 +0000
commit4cca0169aad7297763beaaabf9e356a40725312d (patch)
treee550df8cc02acbbb208fbecac3167f62dc1520af /ucb
parentcfab2fd725276e99fb6fa8b619ca5b2ac3bd025a (diff)
loplugin:staticmethods
Change-Id: I2177e424d54dc2b5e26b7bbfe073b524e9cc5bab Reviewed-on: https://gerrit.libreoffice.org/15187 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/core/ucb.hxx2
-rw-r--r--ucb/source/ucp/cmis/cmis_content.hxx2
-rw-r--r--ucb/source/ucp/file/bc.cxx10
-rw-r--r--ucb/source/ucp/file/filid.cxx6
-rw-r--r--ucb/source/ucp/file/filid.hxx4
-rw-r--r--ucb/source/ucp/file/filnot.cxx4
-rw-r--r--ucb/source/ucp/file/filrset.cxx3
-rw-r--r--ucb/source/ucp/file/prov.cxx8
-rw-r--r--ucb/source/ucp/file/shell.hxx18
-rw-r--r--ucb/source/ucp/hierarchy/hierarchydata.hxx2
-rw-r--r--ucb/source/ucp/hierarchy/hierarchydatasource.hxx81
-rw-r--r--ucb/source/ucp/tdoc/tdoc_docmgr.hxx15
-rw-r--r--ucb/source/ucp/tdoc/tdoc_provider.cxx2
13 files changed, 63 insertions, 94 deletions
diff --git a/ucb/source/core/ucb.hxx b/ucb/source/core/ucb.hxx
index fb3d1d07f21f..fe3dec59a5be 100644
--- a/ucb/source/core/ucb.hxx
+++ b/ucb/source/core/ucb.hxx
@@ -192,7 +192,7 @@ private:
queryContentProvider( const OUString& Identifier,
bool bResolved );
- com::sun::star::uno::Reference< com::sun::star::ucb::XCommandInfo >
+ static com::sun::star::uno::Reference< com::sun::star::ucb::XCommandInfo >
getCommandInfo();
void
diff --git a/ucb/source/ucp/cmis/cmis_content.hxx b/ucb/source/ucp/cmis/cmis_content.hxx
index d143984e4532..160ae1e7bb78 100644
--- a/ucb/source/ucp/cmis/cmis_content.hxx
+++ b/ucb/source/ucp/cmis/cmis_content.hxx
@@ -111,7 +111,7 @@ private:
void destroy( ) throw( com::sun::star::uno::Exception );
- void copyData( com::sun::star::uno::Reference< com::sun::star::io::XInputStream > xIn,
+ static void copyData( com::sun::star::uno::Reference< com::sun::star::io::XInputStream > xIn,
com::sun::star::uno::Reference< com::sun::star::io::XOutputStream > xOut );
com::sun::star::uno::Sequence< com::sun::star::uno::Any >
diff --git a/ucb/source/ucp/file/bc.cxx b/ucb/source/ucp/file/bc.cxx
index b3102eac2737..9d48cfd08726 100644
--- a/ucb/source/ucp/file/bc.cxx
+++ b/ucb/source/ucp/file/bc.cxx
@@ -719,11 +719,11 @@ BaseContent::getParent(
OUString ParentUrl;
- bool err = m_pMyShell->getUrlFromUnq( ParentUnq, ParentUrl );
+ bool err = fileaccess::shell::getUrlFromUnq( ParentUnq, ParentUrl );
if( err )
return Reference< XInterface >( 0 );
- FileContentIdentifier* p = new FileContentIdentifier( m_pMyShell,ParentUnq );
+ FileContentIdentifier* p = new FileContentIdentifier( ParentUnq );
Reference< XContentIdentifier > Identifier( p );
try
@@ -1077,7 +1077,7 @@ BaseContent::transfer( sal_Int32 nMyCommandIdentifier,
}
OUString srcUnc;
- if( m_pMyShell->getUnqFromUrl( aTransferInfo.SourceURL,srcUnc ) )
+ if( fileaccess::shell::getUnqFromUrl( aTransferInfo.SourceURL,srcUnc ) )
{
m_pMyShell->installError( nMyCommandIdentifier,
TASKHANDLING_TRANSFER_INVALIDURL );
@@ -1244,7 +1244,7 @@ void SAL_CALL BaseContent::insert( sal_Int32 nMyCommandIdentifier,
if ( ! success )
return;
- FileContentIdentifier* p = new FileContentIdentifier( m_pMyShell,m_aUncPath );
+ FileContentIdentifier* p = new FileContentIdentifier( m_aUncPath );
m_xContentIdentifier = Reference< XContentIdentifier >( p );
m_pMyShell->registerNotifier( m_aUncPath,this );
@@ -1291,7 +1291,7 @@ BaseContent::cEXC( const OUString& aNewName )
Reference< XContentIdentifier > xOldRef = m_xContentIdentifier;
m_aUncPath = aNewName;
- FileContentIdentifier* pp = new FileContentIdentifier( m_pMyShell,aNewName );
+ FileContentIdentifier* pp = new FileContentIdentifier( aNewName );
m_xContentIdentifier = Reference< XContentIdentifier >( pp );
ContentEventNotifier* p = 0;
diff --git a/ucb/source/ucp/file/filid.cxx b/ucb/source/ucp/file/filid.cxx
index 1d9d1465fad1..f2d45bb55292 100644
--- a/ucb/source/ucp/file/filid.cxx
+++ b/ucb/source/ucp/file/filid.cxx
@@ -28,20 +28,18 @@ using namespace com::sun::star::ucb;
FileContentIdentifier::FileContentIdentifier(
- shell* pMyShell,
const OUString& aUnqPath,
bool IsNormalized )
- : m_pMyShell( pMyShell )
{
if( IsNormalized )
{
- m_pMyShell->getUrlFromUnq( aUnqPath,m_aContentId );
+ fileaccess::shell::getUrlFromUnq( aUnqPath,m_aContentId );
m_aNormalizedId = aUnqPath;
shell::getScheme( m_aProviderScheme );
}
else
{
- m_pMyShell->getUnqFromUrl( aUnqPath,m_aNormalizedId );
+ fileaccess::shell::getUnqFromUrl( aUnqPath,m_aNormalizedId );
m_aContentId = aUnqPath;
shell::getScheme( m_aProviderScheme );
}
diff --git a/ucb/source/ucp/file/filid.hxx b/ucb/source/ucp/file/filid.hxx
index 8c2ba156450a..54c25408479e 100644
--- a/ucb/source/ucp/file/filid.hxx
+++ b/ucb/source/ucp/file/filid.hxx
@@ -36,8 +36,7 @@ namespace fileaccess {
// This implementation has to be reworked
public:
- FileContentIdentifier( shell* pMyShell,
- const OUString& aUnqPath,
+ FileContentIdentifier( const OUString& aUnqPath,
bool IsNormalized = true );
virtual ~FileContentIdentifier();
@@ -81,7 +80,6 @@ namespace fileaccess {
throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
private:
- shell* m_pMyShell;
OUString m_aContentId; // The URL string
OUString m_aNormalizedId; // The somehow normalized string
OUString m_aProviderScheme;
diff --git a/ucb/source/ucp/file/filnot.cxx b/ucb/source/ucp/file/filnot.cxx
index 393d85cde6e8..a66b17ac74d5 100644
--- a/ucb/source/ucp/file/filnot.cxx
+++ b/ucb/source/ucp/file/filnot.cxx
@@ -61,7 +61,7 @@ ContentEventNotifier::ContentEventNotifier( shell* pMyShell,
void ContentEventNotifier::notifyChildInserted( const OUString& aChildName )
{
- FileContentIdentifier* p = new FileContentIdentifier( m_pMyShell,aChildName );
+ FileContentIdentifier* p = new FileContentIdentifier( aChildName );
uno::Reference< XContentIdentifier > xChildId( p );
uno::Reference< XContent > xChildContent = m_pMyShell->m_pProvider->queryContent( xChildId );
@@ -100,7 +100,7 @@ void ContentEventNotifier::notifyDeleted( void )
void ContentEventNotifier::notifyRemoved( const OUString& aChildName )
{
- FileContentIdentifier* p = new FileContentIdentifier( m_pMyShell,aChildName );
+ FileContentIdentifier* p = new FileContentIdentifier( aChildName );
uno::Reference< XContentIdentifier > xChildId( p );
BaseContent* pp = new BaseContent( m_pMyShell,xChildId,aChildName );
diff --git a/ucb/source/ucp/file/filrset.cxx b/ucb/source/ucp/file/filrset.cxx
index 5413b0832471..e4d8159c0dc5 100644
--- a/ucb/source/ucp/file/filrset.cxx
+++ b/ucb/source/ucp/file/filrset.cxx
@@ -561,8 +561,7 @@ XResultSet_impl::queryContentIdentifier(
if( ! m_aIdents[m_nRow].is() )
{
FileContentIdentifier* p
- = new FileContentIdentifier( m_pMyShell,
- m_aUnqPath[ m_nRow ] );
+ = new FileContentIdentifier( m_aUnqPath[ m_nRow ] );
m_aIdents[m_nRow] = uno::Reference< ucb::XContentIdentifier >(p);
}
return m_aIdents[m_nRow];
diff --git a/ucb/source/ucp/file/prov.cxx b/ucb/source/ucp/file/prov.cxx
index 5dc799cf6208..1a7e6a1c3abf 100644
--- a/ucb/source/ucp/file/prov.cxx
+++ b/ucb/source/ucp/file/prov.cxx
@@ -201,7 +201,7 @@ FileProvider::queryContent(
{
init();
OUString aUnc;
- bool err = m_pMyShell->getUnqFromUrl( xIdentifier->getContentIdentifier(),
+ bool err = fileaccess::shell::getUnqFromUrl( xIdentifier->getContentIdentifier(),
aUnc );
if( err )
@@ -228,8 +228,8 @@ FileProvider::compareContentIds(
{
OUString aPath1, aPath2;
- m_pMyShell->getUnqFromUrl( aUrl1, aPath1 );
- m_pMyShell->getUnqFromUrl( aUrl2, aPath2 );
+ fileaccess::shell::getUnqFromUrl( aUrl1, aPath1 );
+ fileaccess::shell::getUnqFromUrl( aUrl2, aPath2 );
osl::FileBase::RC error;
osl::DirectoryItem aItem1, aItem2;
@@ -277,7 +277,7 @@ FileProvider::createContentIdentifier(
throw( RuntimeException, std::exception )
{
init();
- FileContentIdentifier* p = new FileContentIdentifier( m_pMyShell,ContentId,false );
+ FileContentIdentifier* p = new FileContentIdentifier( ContentId,false );
return Reference< XContentIdentifier >( p );
}
diff --git a/ucb/source/ucp/file/shell.hxx b/ucb/source/ucp/file/shell.hxx
index a8bae857822d..0985ed66aa6c 100644
--- a/ucb/source/ucp/file/shell.hxx
+++ b/ucb/source/ucp/file/shell.hxx
@@ -391,9 +391,9 @@ namespace fileaccess {
/* */
/******************************************************************************/
- bool SAL_CALL getUnqFromUrl( const OUString& Url, OUString& Unq );
+ static bool SAL_CALL getUnqFromUrl( const OUString& Url, OUString& Unq );
- bool SAL_CALL getUrlFromUnq( const OUString& Unq, OUString& Url );
+ static bool SAL_CALL getUrlFromUnq( const OUString& Unq, OUString& Url );
bool m_bWithConfig;
@@ -429,28 +429,28 @@ namespace fileaccess {
/* notify eventListeners */
/********************************************************************************/
- void SAL_CALL notifyPropertyChanges(
+ static void SAL_CALL notifyPropertyChanges(
std::list< PropertyChangeNotifier* >* listeners,
const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyChangeEvent >& seqChanged );
- void SAL_CALL notifyContentExchanged(
+ static void SAL_CALL notifyContentExchanged(
std::vector< std::list< ContentEventNotifier* >* >* listeners_vec );
- void SAL_CALL notifyInsert(
+ static void SAL_CALL notifyInsert(
std::list< ContentEventNotifier* >* listeners,const OUString& aChildName );
- void SAL_CALL notifyContentDeleted(
+ static void SAL_CALL notifyContentDeleted(
std::list< ContentEventNotifier* >* listeners );
- void SAL_CALL notifyContentRemoved(
+ static void SAL_CALL notifyContentRemoved(
std::list< ContentEventNotifier* >* listeners,
const OUString& aChildName );
- void SAL_CALL notifyPropertyAdded(
+ static void SAL_CALL notifyPropertyAdded(
std::list< PropertySetInfoChangeNotifier* >* listeners,
const OUString& aPropertyName );
- void SAL_CALL notifyPropertyRemoved(
+ static void SAL_CALL notifyPropertyRemoved(
std::list< PropertySetInfoChangeNotifier* >* listeners,
const OUString& aPropertyName );
diff --git a/ucb/source/ucp/hierarchy/hierarchydata.hxx b/ucb/source/ucp/hierarchy/hierarchydata.hxx
index ff95aaa05e40..f6e00e42a867 100644
--- a/ucb/source/ucp/hierarchy/hierarchydata.hxx
+++ b/ucb/source/ucp/hierarchy/hierarchydata.hxx
@@ -94,7 +94,7 @@ class HierarchyEntry
bool m_bTriedToGetRootReadAccess; // #82494#
private:
- OUString createPathFromHierarchyURL( const HierarchyUri & rURI );
+ static OUString createPathFromHierarchyURL( const HierarchyUri & rURI );
::com::sun::star::uno::Reference<
::com::sun::star::container::XHierarchicalNameAccess >
getRootReadAccess();
diff --git a/ucb/source/ucp/hierarchy/hierarchydatasource.hxx b/ucb/source/ucp/hierarchy/hierarchydatasource.hxx
index 35901df4e021..4a695a709913 100644
--- a/ucb/source/ucp/hierarchy/hierarchydatasource.hxx
+++ b/ucb/source/ucp/hierarchy/hierarchydatasource.hxx
@@ -36,22 +36,18 @@ namespace hierarchy_ucp {
class HierarchyDataSource : public cppu::OWeakObject,
- public com::sun::star::lang::XServiceInfo,
- public com::sun::star::lang::XTypeProvider,
- public com::sun::star::lang::XComponent,
- public com::sun::star::lang::XMultiServiceFactory
+ public css::lang::XServiceInfo,
+ public css::lang::XTypeProvider,
+ public css::lang::XComponent,
+ public css::lang::XMultiServiceFactory
{
osl::Mutex m_aMutex;
- com::sun::star::uno::Reference<
- com::sun::star::uno::XComponentContext > m_xContext;
- com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory > m_xConfigProvider;
+ css::uno::Reference< css::uno::XComponentContext > m_xContext;
+ css::uno::Reference< css::lang::XMultiServiceFactory > m_xConfigProvider;
cppu::OInterfaceContainerHelper * m_pDisposeEventListeners;
public:
- HierarchyDataSource( const com::sun::star::uno::Reference<
- com::sun::star::uno::XComponentContext > &
- rxContext );
+ HierarchyDataSource( const css::uno::Reference< css::uno::XComponentContext > & rxContext );
virtual ~HierarchyDataSource();
// XInterface
@@ -73,8 +69,7 @@ public:
static OUString getImplementationName_Static();
static css::uno::Sequence< OUString > getSupportedServiceNames_Static();
- static css::uno::Reference< css::lang::XSingleServiceFactory >
- createServiceFactory( const css::uno::Reference<
+ static css::uno::Reference< css::lang::XSingleServiceFactory > createServiceFactory( const css::uno::Reference<
css::lang::XMultiServiceFactory >& rxServiceMgr );
// XTypeProvider
@@ -84,53 +79,37 @@ public:
throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
// XComponent
- virtual void SAL_CALL
- dispose()
- throw ( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
- virtual void SAL_CALL
- addEventListener( const com::sun::star::uno::Reference<
- com::sun::star::lang::XEventListener > & xListener )
- throw ( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
- virtual void SAL_CALL
- removeEventListener( const com::sun::star::uno::Reference<
- com::sun::star::lang::XEventListener > & aListener )
- throw ( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
+ virtual void SAL_CALL dispose()
+ throw ( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
+ virtual void SAL_CALL addEventListener( const css::uno::Reference< css::lang::XEventListener > & xListener )
+ throw ( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
+ virtual void SAL_CALL removeEventListener( const css::uno::Reference< css::lang::XEventListener > & aListener )
+ throw ( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
// XMultiServiceFactory
- virtual com::sun::star::uno::Reference<
- com::sun::star::uno::XInterface > SAL_CALL
- createInstance( const OUString & aServiceSpecifier )
- throw ( com::sun::star::uno::Exception,
- com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
- virtual com::sun::star::uno::Reference<
- com::sun::star::uno::XInterface > SAL_CALL
- createInstanceWithArguments( const OUString & ServiceSpecifier,
- const com::sun::star::uno::Sequence<
- com::sun::star::uno::Any > & Arguments )
- throw ( com::sun::star::uno::Exception,
- com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
- virtual com::sun::star::uno::Sequence< OUString > SAL_CALL
- getAvailableServiceNames()
- throw ( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
+ virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance( const OUString & aServiceSpecifier )
+ throw ( css::uno::Exception,
+ css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
+ virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstanceWithArguments( const OUString & ServiceSpecifier,
+ const css::uno::Sequence<
+ css::uno::Any > & Arguments )
+ throw ( css::uno::Exception,
+ css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
+ virtual css::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames()
+ throw ( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
// Non-Interface methods
private:
- com::sun::star::uno::Reference<
- com::sun::star::uno::XInterface > SAL_CALL
- createInstanceWithArguments( const OUString & ServiceSpecifier,
- const com::sun::star::uno::Sequence<
- com::sun::star::uno::Any > & Arguments,
+ css::uno::Reference< css::uno::XInterface > SAL_CALL createInstanceWithArguments( const OUString & ServiceSpecifier,
+ const css::uno::Sequence<
+ css::uno::Any > & Arguments,
bool bCheckArgs )
- throw ( com::sun::star::uno::Exception,
- com::sun::star::uno::RuntimeException );
+ throw ( css::uno::Exception, css::uno::RuntimeException );
- com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory >
- getConfigProvider();
+ css::uno::Reference< css::lang::XMultiServiceFactory > getConfigProvider();
- bool
- createConfigPath( const OUString & rInPath, OUString & rOutPath );
+ static bool createConfigPath( const OUString & rInPath, OUString & rOutPath );
};
} // namespace hierarchy_ucp
diff --git a/ucb/source/ucp/tdoc/tdoc_docmgr.hxx b/ucb/source/ucp/tdoc/tdoc_docmgr.hxx
index f71f0c78086e..9d445ec12c55 100644
--- a/ucb/source/ucp/tdoc/tdoc_docmgr.hxx
+++ b/ucb/source/ucp/tdoc/tdoc_docmgr.hxx
@@ -138,8 +138,7 @@ namespace tdoc_ucp {
com::sun::star::uno::Reference< com::sun::star::embed::XStorage >
queryStorage( const OUString & rDocId );
- OUString
- queryDocumentId(
+ static OUString queryDocumentId(
const com::sun::star::uno::Reference<
com::sun::star::frame::XModel > & xModel );
@@ -155,18 +154,15 @@ namespace tdoc_ucp {
private:
void buildDocumentsList();
- bool
- isOfficeDocument(
+ bool isOfficeDocument(
const com::sun::star::uno::Reference<
com::sun::star::uno::XInterface > & xDoc );
- bool
- isDocumentPreview(
+ static bool isDocumentPreview(
const com::sun::star::uno::Reference<
com::sun::star::frame::XModel > & xModel );
- bool
- isWithoutOrInTopLevelFrame(
+ static bool isWithoutOrInTopLevelFrame(
const com::sun::star::uno::Reference<
com::sun::star::frame::XModel > & xModel );
@@ -175,8 +171,7 @@ namespace tdoc_ucp {
const com::sun::star::uno::Reference<
com::sun::star::frame::XModel > & xModel );
- bool
- isHelpDocument(
+ static bool isHelpDocument(
const com::sun::star::uno::Reference<
com::sun::star::frame::XModel > & xModel );
diff --git a/ucb/source/ucp/tdoc/tdoc_provider.cxx b/ucb/source/ucp/tdoc/tdoc_provider.cxx
index cce79c3e7ad0..f0ed1286602b 100644
--- a/ucb/source/ucp/tdoc/tdoc_provider.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_provider.cxx
@@ -175,7 +175,7 @@ ContentProvider::createDocumentContent(
// model -> id -> content identifier -> queryContent
if ( m_xDocsMgr.is() )
{
- OUString aDocId = m_xDocsMgr->queryDocumentId( Model );
+ OUString aDocId = tdoc_ucp::OfficeDocumentsManager::queryDocumentId( Model );
if ( !aDocId.isEmpty() )
{
OUStringBuffer aBuffer;