diff options
author | Noel Grandin <noel@peralex.com> | 2015-07-24 16:22:29 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-07-27 08:18:16 +0200 |
commit | 38ecca9b30e0fc5f7cc6264857f983e40dd58195 (patch) | |
tree | 3ad61e6d5cddcf161d27cfe4c6ca85fcf1cab8f6 /ucb | |
parent | efac5fa06e2d00bd67c582d8a6b1f1fc69c9b9f5 (diff) |
inline a bunch of use-once macros
no point in having a macro unless it's actually going to reduce the
number of lines of code
Change-Id: Ic8760d6506cf272d7bd088f7b3b4dcbf288099fc
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/core/ucb.cxx | 8 | ||||
-rw-r--r-- | ucb/source/ucp/ftp/ftpurl.cxx | 12 | ||||
-rw-r--r-- | ucb/source/ucp/hierarchy/hierarchycontent.cxx | 6 | ||||
-rw-r--r-- | ucb/source/ucp/hierarchy/hierarchycontent.hxx | 9 | ||||
-rw-r--r-- | ucb/source/ucp/hierarchy/hierarchydatasource.cxx | 8 | ||||
-rw-r--r-- | ucb/source/ucp/hierarchy/hierarchyprovider.cxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/hierarchy/hierarchyprovider.hxx | 3 | ||||
-rw-r--r-- | ucb/source/ucp/package/pkgprovider.cxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/package/pkgprovider.hxx | 5 | ||||
-rw-r--r-- | ucb/source/ucp/tdoc/tdoc_content.cxx | 8 | ||||
-rw-r--r-- | ucb/source/ucp/tdoc/tdoc_content.hxx | 12 |
11 files changed, 19 insertions, 56 deletions
diff --git a/ucb/source/core/ucb.cxx b/ucb/source/core/ucb.cxx index da620349accb..f2e88a522f00 100644 --- a/ucb/source/core/ucb.cxx +++ b/ucb/source/core/ucb.cxx @@ -53,10 +53,6 @@ using namespace com::sun::star; using namespace ucbhelper; -#define CONFIG_CONTENTPROVIDERS_KEY \ - "/org.openoffice.ucb.Configuration/ContentProviders" - - namespace { bool fillPlaceholders(OUString const & rInput, @@ -888,7 +884,9 @@ bool UniversalContentBroker::getContentProviderData( configuration::theDefaultProvider::get( m_xContext ); OUStringBuffer aFullPath; - aFullPath.appendAscii( CONFIG_CONTENTPROVIDERS_KEY "/['" ); + aFullPath.appendAscii( + "/org.openoffice.ucb.Configuration/ContentProviders" + "/['" ); makeAndAppendXMLName( aFullPath, rKey1 ); aFullPath.appendAscii( "']/SecondaryKeys/['" ); makeAndAppendXMLName( aFullPath, rKey2 ); diff --git a/ucb/source/ucp/ftp/ftpurl.cxx b/ucb/source/ucp/ftp/ftpurl.cxx index 645236fca963..eff2b4232633 100644 --- a/ucb/source/ucp/ftp/ftpurl.cxx +++ b/ucb/source/ucp/ftp/ftpurl.cxx @@ -378,12 +378,6 @@ namespace ftp { &control) -#define SET_DATA_CONTAINER \ - curl_easy_setopt(curl,CURLOPT_NOBODY,false); \ - MemoryContainer data; \ - curl_easy_setopt(curl,CURLOPT_WRITEFUNCTION,memory_write); \ - curl_easy_setopt(curl,CURLOPT_WRITEDATA,&data) - #define SET_URL(url) \ OString urlParAscii(url.getStr(), \ url.getLength(), \ @@ -439,7 +433,11 @@ std::vector<FTPDirentry> FTPURL::list( CURL *curl = m_pFCP->handle(); SET_CONTROL_CONTAINER; - SET_DATA_CONTAINER; + curl_easy_setopt(curl,CURLOPT_NOBODY,false); + MemoryContainer data; + curl_easy_setopt(curl,CURLOPT_WRITEFUNCTION,memory_write); + curl_easy_setopt(curl,CURLOPT_WRITEDATA,&data); + OUString url(ident(true,true)); SET_URL(url); curl_easy_setopt(curl,CURLOPT_POSTQUOTE,0); diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.cxx b/ucb/source/ucp/hierarchy/hierarchycontent.cxx index 44dffe67a7a1..5d5efeb013ec 100644 --- a/ucb/source/ucp/hierarchy/hierarchycontent.cxx +++ b/ucb/source/ucp/hierarchy/hierarchycontent.cxx @@ -300,11 +300,11 @@ HierarchyContent::getSupportedServiceNames() uno::Sequence< OUString > aSNS( 1 ); if ( m_eKind == LINK ) - aSNS.getArray()[ 0 ] = HIERARCHY_LINK_CONTENT_SERVICE_NAME; + aSNS.getArray()[ 0 ] = "com.sun.star.ucb.HierarchyLinkContent"; else if ( m_eKind == FOLDER ) - aSNS.getArray()[ 0 ] = HIERARCHY_FOLDER_CONTENT_SERVICE_NAME; + aSNS.getArray()[ 0 ] = "com.sun.star.ucb.HierarchyFolderContent"; else - aSNS.getArray()[ 0 ] = HIERARCHY_ROOT_FOLDER_CONTENT_SERVICE_NAME; + aSNS.getArray()[ 0 ] = "com.sun.star.ucb.HierarchyRootFolderContent"; return aSNS; } diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.hxx b/ucb/source/ucp/hierarchy/hierarchycontent.hxx index 876e9446561a..e00a507fefd7 100644 --- a/ucb/source/ucp/hierarchy/hierarchycontent.hxx +++ b/ucb/source/ucp/hierarchy/hierarchycontent.hxx @@ -45,15 +45,6 @@ namespace hierarchy_ucp -#define HIERARCHY_ROOT_FOLDER_CONTENT_SERVICE_NAME \ - "com.sun.star.ucb.HierarchyRootFolderContent" -#define HIERARCHY_FOLDER_CONTENT_SERVICE_NAME \ - "com.sun.star.ucb.HierarchyFolderContent" -#define HIERARCHY_LINK_CONTENT_SERVICE_NAME \ - "com.sun.star.ucb.HierarchyLinkContent" - - - class HierarchyContentProperties { public: diff --git a/ucb/source/ucp/hierarchy/hierarchydatasource.cxx b/ucb/source/ucp/hierarchy/hierarchydatasource.cxx index 36a714815b71..cd3f0d9092ec 100644 --- a/ucb/source/ucp/hierarchy/hierarchydatasource.cxx +++ b/ucb/source/ucp/hierarchy/hierarchydatasource.cxx @@ -52,10 +52,6 @@ using namespace hierarchy_ucp; #define READ_SERVICE_NAME "com.sun.star.ucb.HierarchyDataReadAccess" #define READWRITE_SERVICE_NAME "com.sun.star.ucb.HierarchyDataReadWriteAccess" -#define CONFIG_READ_SERVICE_NAME \ - "com.sun.star.configuration.ConfigurationAccess" -#define CONFIG_READWRITE_SERVICE_NAME \ - "com.sun.star.configuration.ConfigurationUpdateAccess" #define CONFIG_DATA_ROOT_KEY \ "/org.openoffice.ucb.Hierarchy/Root" @@ -500,7 +496,7 @@ HierarchyDataSource::createInstanceWithArguments( { // Create configuration read-only access object. xConfigAccess = xProv->createInstanceWithArguments( - OUString( CONFIG_READ_SERVICE_NAME ), + OUString( "com.sun.star.configuration.ConfigurationAccess" ), aNewArgs ); } else @@ -519,7 +515,7 @@ HierarchyDataSource::createInstanceWithArguments( // Create configuration read-write access object. xConfigAccess = xProv->createInstanceWithArguments( - OUString( CONFIG_READWRITE_SERVICE_NAME ), + OUString( "com.sun.star.configuration.ConfigurationUpdateAccess" ), aNewArgs ); } } diff --git a/ucb/source/ucp/hierarchy/hierarchyprovider.cxx b/ucb/source/ucp/hierarchy/hierarchyprovider.cxx index 7a107c1e7b29..ac68a59590e9 100644 --- a/ucb/source/ucp/hierarchy/hierarchyprovider.cxx +++ b/ucb/source/ucp/hierarchy/hierarchyprovider.cxx @@ -106,7 +106,7 @@ XTYPEPROVIDER_IMPL_4( HierarchyContentProvider, XSERVICEINFO_IMPL_1_CTX( HierarchyContentProvider, OUString( "com.sun.star.comp.ucb.HierarchyContentProvider" ), - HIERARCHY_CONTENT_PROVIDER_SERVICE_NAME ); + "com.sun.star.ucb.HierarchyContentProvider" ); diff --git a/ucb/source/ucp/hierarchy/hierarchyprovider.hxx b/ucb/source/ucp/hierarchy/hierarchyprovider.hxx index c33795e4457c..494e11a3b105 100644 --- a/ucb/source/ucp/hierarchy/hierarchyprovider.hxx +++ b/ucb/source/ucp/hierarchy/hierarchyprovider.hxx @@ -37,9 +37,6 @@ namespace hierarchy_ucp { -#define HIERARCHY_CONTENT_PROVIDER_SERVICE_NAME \ - "com.sun.star.ucb.HierarchyContentProvider" - #define HIERARCHY_URL_SCHEME \ "vnd.sun.star.hier" #define HIERARCHY_URL_SCHEME_LENGTH 17 diff --git a/ucb/source/ucp/package/pkgprovider.cxx b/ucb/source/ucp/package/pkgprovider.cxx index 48a607d4f411..d5d07add621e 100644 --- a/ucb/source/ucp/package/pkgprovider.cxx +++ b/ucb/source/ucp/package/pkgprovider.cxx @@ -158,7 +158,7 @@ XTYPEPROVIDER_IMPL_3( ContentProvider, XSERVICEINFO_IMPL_1_CTX( ContentProvider, OUString( "com.sun.star.comp.ucb.PackageContentProvider" ), - PACKAGE_CONTENT_PROVIDER_SERVICE_NAME ); + "com.sun.star.ucb.PackageContentProvider" ); diff --git a/ucb/source/ucp/package/pkgprovider.hxx b/ucb/source/ucp/package/pkgprovider.hxx index 1f92241ca839..540808ec60f0 100644 --- a/ucb/source/ucp/package/pkgprovider.hxx +++ b/ucb/source/ucp/package/pkgprovider.hxx @@ -31,11 +31,6 @@ namespace package_ucp { -// UNO service name for the provider. This name will be used by the UCB to -// create instances of the provider. -#define PACKAGE_CONTENT_PROVIDER_SERVICE_NAME \ - "com.sun.star.ucb.PackageContentProvider" - // UCB Content Type. #define PACKAGE_FOLDER_CONTENT_TYPE \ "application/" PACKAGE_URL_SCHEME "-folder" diff --git a/ucb/source/ucp/tdoc/tdoc_content.cxx b/ucb/source/ucp/tdoc/tdoc_content.cxx index c85c29080887..33d390934da4 100644 --- a/ucb/source/ucp/tdoc/tdoc_content.cxx +++ b/ucb/source/ucp/tdoc/tdoc_content.cxx @@ -314,13 +314,13 @@ uno::Sequence< OUString > SAL_CALL Content::getSupportedServiceNames() uno::Sequence< OUString > aSNS( 1 ); if ( m_aProps.getType() == STREAM ) - aSNS.getArray()[ 0 ] = TDOC_STREAM_CONTENT_SERVICE_NAME; + aSNS.getArray()[ 0 ] = "com.sun.star.ucb.TransientDocumentsStreamContent"; else if ( m_aProps.getType() == FOLDER ) - aSNS.getArray()[ 0 ] = TDOC_FOLDER_CONTENT_SERVICE_NAME; + aSNS.getArray()[ 0 ] = "com.sun.star.ucb.TransientDocumentsFolderContent"; else if ( m_aProps.getType() == DOCUMENT ) - aSNS.getArray()[ 0 ] = TDOC_DOCUMENT_CONTENT_SERVICE_NAME; + aSNS.getArray()[ 0 ] = "com.sun.star.ucb.TransientDocumentsDocumentContent"; else - aSNS.getArray()[ 0 ] = TDOC_ROOT_CONTENT_SERVICE_NAME; + aSNS.getArray()[ 0 ] = "com.sun.star.ucb.TransientDocumentsRootContent"; return aSNS; } diff --git a/ucb/source/ucp/tdoc/tdoc_content.hxx b/ucb/source/ucp/tdoc/tdoc_content.hxx index 108b0753f701..d69b4fb84413 100644 --- a/ucb/source/ucp/tdoc/tdoc_content.hxx +++ b/ucb/source/ucp/tdoc/tdoc_content.hxx @@ -40,18 +40,6 @@ namespace tdoc_ucp { - -#define TDOC_ROOT_CONTENT_SERVICE_NAME \ - "com.sun.star.ucb.TransientDocumentsRootContent" -#define TDOC_DOCUMENT_CONTENT_SERVICE_NAME \ - "com.sun.star.ucb.TransientDocumentsDocumentContent" -#define TDOC_FOLDER_CONTENT_SERVICE_NAME \ - "com.sun.star.ucb.TransientDocumentsFolderContent" -#define TDOC_STREAM_CONTENT_SERVICE_NAME \ - "com.sun.star.ucb.TransientDocumentsStreamContent" - - - enum ContentType { STREAM, FOLDER, DOCUMENT, ROOT }; class ContentProperties |