sal/rtl/strtmpl.hxx | 5 ucb/qa/cppunit/webdav/webdav_local_neon.cxx | 62 +++--- ucb/qa/cppunit/webdav/webdav_options.cxx | 12 - ucb/qa/cppunit/webdav/webdav_propfindcache.cxx | 40 ++-- ucb/qa/cppunit/webdav/webdav_resource_access.cxx | 10 - ucb/source/cacher/cachedcontentresultset.cxx | 8 ucb/source/cacher/cachedcontentresultsetstub.cxx | 12 - ucb/source/cacher/cacheddynamicresultset.cxx | 8 ucb/source/cacher/cacheddynamicresultsetstub.cxx | 8 ucb/source/core/FileAccess.cxx | 28 +-- ucb/source/core/cmdenv.cxx | 4 ucb/source/core/provprox.cxx | 8 ucb/source/core/ucb.cxx | 14 - ucb/source/core/ucbcmds.cxx | 132 +++++++------- ucb/source/core/ucbprops.cxx | 184 ++++++++++---------- ucb/source/core/ucbstore.cxx | 42 ++-- ucb/source/sorter/sortdynres.cxx | 10 - ucb/source/sorter/sortresult.cxx | 6 ucb/source/ucp/cmis/auth_provider.cxx | 4 ucb/source/ucp/cmis/cmis_content.cxx | 108 +++++------ ucb/source/ucp/cmis/cmis_provider.cxx | 4 ucb/source/ucp/cmis/cmis_repo_content.cxx | 26 +- ucb/source/ucp/cmis/std_inputstream.cxx | 2 ucb/source/ucp/expand/ucpexpand.cxx | 12 - ucb/source/ucp/ext/ucpext_content.cxx | 38 ++-- ucb/source/ucp/ext/ucpext_datasupplier.cxx | 2 ucb/source/ucp/ext/ucpext_provider.cxx | 8 ucb/source/ucp/file/bc.cxx | 14 - ucb/source/ucp/file/filglob.cxx | 46 ++--- ucb/source/ucp/file/filinsreq.cxx | 4 ucb/source/ucp/file/filrset.cxx | 4 ucb/source/ucp/file/filstr.cxx | 4 ucb/source/ucp/file/filtask.cxx | 20 +- ucb/source/ucp/file/prov.cxx | 10 - ucb/source/ucp/gio/gio_content.cxx | 58 +++--- ucb/source/ucp/gio/gio_provider.cxx | 4 ucb/source/ucp/gio/gio_seekable.cxx | 4 ucb/source/ucp/hierarchy/hierarchycontent.cxx | 86 ++++----- ucb/source/ucp/hierarchy/hierarchycontentcaps.cxx | 126 ++++++------- ucb/source/ucp/hierarchy/hierarchydata.cxx | 22 +- ucb/source/ucp/hierarchy/hierarchydatasource.cxx | 10 - ucb/source/ucp/hierarchy/hierarchyprovider.cxx | 6 ucb/source/ucp/image/ucpimage.cxx | 4 ucb/source/ucp/package/pkgcontent.cxx | 122 ++++++------- ucb/source/ucp/package/pkgcontentcaps.cxx | 94 +++++----- ucb/source/ucp/package/pkgprovider.cxx | 6 ucb/source/ucp/tdoc/tdoc_content.cxx | 131 +++++++------- ucb/source/ucp/tdoc/tdoc_contentcaps.cxx | 114 ++++++------ ucb/source/ucp/tdoc/tdoc_docmgr.cxx | 4 ucb/source/ucp/tdoc/tdoc_documentcontentfactory.cxx | 8 ucb/source/ucp/tdoc/tdoc_provider.cxx | 12 - ucb/source/ucp/tdoc/tdoc_storage.cxx | 30 +-- ucb/source/ucp/webdav-curl/ContentProperties.cxx | 46 ++--- ucb/source/ucp/webdav-curl/CurlSession.cxx | 182 +++++++++---------- ucb/source/ucp/webdav-curl/CurlUri.cxx | 2 ucb/source/ucp/webdav-curl/webdavcontent.cxx | 124 ++++++------- ucb/source/ucp/webdav-curl/webdavcontentcaps.cxx | 69 +++---- ucb/source/ucp/webdav-curl/webdavdatasupplier.cxx | 4 ucb/source/ucp/webdav-curl/webdavprovider.cxx | 2 ucb/source/ucp/webdav-curl/webdavresponseparser.cxx | 58 +++--- 60 files changed, 1115 insertions(+), 1112 deletions(-)
New commits: commit 1ea85e8f2d815e6c0834215714ed3dad1101b971 Author: Eike Rathke <er...@redhat.com> AuthorDate: Tue May 14 22:59:28 2024 +0200 Commit: Eike Rathke <er...@redhat.com> CommitDate: Wed May 15 18:02:19 2024 +0200 Resolves: tdf#160985 Max integer representation for rtl_math_StringFormat_G Same as for rtl_math_StringFormat_Automatic we want to preserve the highest accuracy of integer values also with rtl_math_StringFormat_G if nDecPlaces is large enough, instead of possibly rounding into 15 digits. This occurred with FastSaxSerializer::write(double) but rtl::OString::number(double) and rtl::OUString::number(double) and rtl_math_doubleToString() and rtl::str::valueOfFP() and rtl_str_valueOfDouble() and all places calling with rtl_math_StringFormat_G are similar affected. Question might remain why those places use rtl_math_StringFormat_G with fixed nDecimalPlaces calculated from RTL_STR_MAX_VALUEOFDOUBLE - SAL_N_ELEMENTS("-x.E-xxx") + 1 instead of rtl_math_StringFormat_Automatic with rtl_math_DecimalPlaces_Max. Change-Id: Ib388b119faed441c9020dca803649a4089da5b07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167647 Tested-by: Jenkins Reviewed-by: Eike Rathke <er...@redhat.com> diff --git a/sal/rtl/strtmpl.hxx b/sal/rtl/strtmpl.hxx index 6414115d4174..8c63f1081f9c 100644 --- a/sal/rtl/strtmpl.hxx +++ b/sal/rtl/strtmpl.hxx @@ -1527,6 +1527,11 @@ void doubleToString(rtl_tString** pResult, sal_Int32* pResultCapacity, sal_Int32 } else { + if (nOrigDigits <= nDecPlaces && aParts.exponent >= 0 && fValue < 0x1p53) + { + // Use integer representation with highest accuracy. + nRoundDigits = nOrigDigits; // no rounding + } nDecPlaces = std::max<sal_Int32>(0, nDecPlaces - nExp - 1); eFormat = rtl_math_StringFormat_F; } commit 045a21f08abff10592fe303abf0f311a83777e81 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Tue May 14 09:41:57 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Wed May 15 18:02:14 2024 +0200 loplugin:ostr in ucb Change-Id: Ic2209e0fbc7035a909eebdbb085d77c9353988cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167655 Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Tested-by: Jenkins diff --git a/ucb/qa/cppunit/webdav/webdav_local_neon.cxx b/ucb/qa/cppunit/webdav/webdav_local_neon.cxx index a457bc6d2b28..e042fd5c783e 100644 --- a/ucb/qa/cppunit/webdav/webdav_local_neon.cxx +++ b/ucb/qa/cppunit/webdav/webdav_local_neon.cxx @@ -38,56 +38,56 @@ namespace { //try URL decomposition CurlUri aURI(u"http://user%40anothern...@server.biz:8040/aService/asegment/nextsegment/check.this?test=true&link=http://anotherserver.com/%3Fcheck=theapplication%26os=linuxintel%26lang=en-US%26version=5.2.0" ); - CPPUNIT_ASSERT_EQUAL( OUString( "http" ), aURI.GetScheme() ); - CPPUNIT_ASSERT_EQUAL( OUString( "server.biz" ), aURI.GetHost() ); - CPPUNIT_ASSERT_EQUAL( OUString( "user%40anothername" ), aURI.GetUser() ); + CPPUNIT_ASSERT_EQUAL( u"http"_ustr, aURI.GetScheme() ); + CPPUNIT_ASSERT_EQUAL( u"server.biz"_ustr, aURI.GetHost() ); + CPPUNIT_ASSERT_EQUAL( u"user%40anothername"_ustr, aURI.GetUser() ); CPPUNIT_ASSERT_EQUAL( sal_uInt16( 8040 ), aURI.GetPort() ); - CPPUNIT_ASSERT_EQUAL( OUString( "/aService/asegment/nextsegment/check.this?test=true&link=http://anotherserver.com/%3Fcheck=theapplication%26os=linuxintel%26lang=en-US%26version=5.2.0" ), aURI.GetRelativeReference() ); + CPPUNIT_ASSERT_EQUAL( u"/aService/asegment/nextsegment/check.this?test=true&link=http://anotherserver.com/%3Fcheck=theapplication%26os=linuxintel%26lang=en-US%26version=5.2.0"_ustr, aURI.GetRelativeReference() ); CurlUri uri2(aURI.CloneWithRelativeRefPathAbsolute(u"/foo/bar")); - CPPUNIT_ASSERT_EQUAL( OUString("http"), uri2.GetScheme() ); - CPPUNIT_ASSERT_EQUAL( OUString("server.biz"), uri2.GetHost() ); - CPPUNIT_ASSERT_EQUAL( OUString("user%40anothername"), uri2.GetUser() ); + CPPUNIT_ASSERT_EQUAL( u"http"_ustr, uri2.GetScheme() ); + CPPUNIT_ASSERT_EQUAL( u"server.biz"_ustr, uri2.GetHost() ); + CPPUNIT_ASSERT_EQUAL( u"user%40anothername"_ustr, uri2.GetUser() ); CPPUNIT_ASSERT_EQUAL( sal_uInt16(8040), uri2.GetPort() ); - CPPUNIT_ASSERT_EQUAL( OUString("/foo/bar"), uri2.GetRelativeReference() ); - CPPUNIT_ASSERT_EQUAL( OUString("http://user%40anothern...@server.biz:8040/foo/bar"), uri2.GetURI() ); + CPPUNIT_ASSERT_EQUAL( u"/foo/bar"_ustr, uri2.GetRelativeReference() ); + CPPUNIT_ASSERT_EQUAL( u"http://user%40anothern...@server.biz:8040/foo/bar"_ustr, uri2.GetURI() ); CurlUri uri3(aURI.CloneWithRelativeRefPathAbsolute(u"/?query#fragment")); - CPPUNIT_ASSERT_EQUAL( OUString("http"), uri3.GetScheme() ); - CPPUNIT_ASSERT_EQUAL( OUString("server.biz"), uri3.GetHost() ); - CPPUNIT_ASSERT_EQUAL( OUString("user%40anothername"), uri3.GetUser() ); + CPPUNIT_ASSERT_EQUAL( u"http"_ustr, uri3.GetScheme() ); + CPPUNIT_ASSERT_EQUAL( u"server.biz"_ustr, uri3.GetHost() ); + CPPUNIT_ASSERT_EQUAL( u"user%40anothername"_ustr, uri3.GetUser() ); CPPUNIT_ASSERT_EQUAL( sal_uInt16(8040), uri3.GetPort() ); - CPPUNIT_ASSERT_EQUAL( OUString("/?query#fragment"), uri3.GetRelativeReference() ); - CPPUNIT_ASSERT_EQUAL( OUString("http://user%40anothern...@server.biz:8040/?query#fragment"), uri3.GetURI() ); + CPPUNIT_ASSERT_EQUAL( u"/?query#fragment"_ustr, uri3.GetRelativeReference() ); + CPPUNIT_ASSERT_EQUAL( u"http://user%40anothern...@server.biz:8040/?query#fragment"_ustr, uri3.GetURI() ); } void webdav_local_test::WebdavUriTest2() { CurlUri aURI(u"https://foo:b...@server.biz:8040/aService#aaa" ); - CPPUNIT_ASSERT_EQUAL( OUString("https"), aURI.GetScheme() ); - CPPUNIT_ASSERT_EQUAL( OUString("server.biz"), aURI.GetHost() ); - CPPUNIT_ASSERT_EQUAL( OUString("foo"), aURI.GetUser() ); - CPPUNIT_ASSERT_EQUAL( OUString("bar"), aURI.GetPassword() ); + CPPUNIT_ASSERT_EQUAL( u"https"_ustr, aURI.GetScheme() ); + CPPUNIT_ASSERT_EQUAL( u"server.biz"_ustr, aURI.GetHost() ); + CPPUNIT_ASSERT_EQUAL( u"foo"_ustr, aURI.GetUser() ); + CPPUNIT_ASSERT_EQUAL( u"bar"_ustr, aURI.GetPassword() ); CPPUNIT_ASSERT_EQUAL( sal_uInt16( 8040 ), aURI.GetPort() ); - CPPUNIT_ASSERT_EQUAL( OUString( "/aService#aaa" ), aURI.GetRelativeReference() ); + CPPUNIT_ASSERT_EQUAL( u"/aService#aaa"_ustr, aURI.GetRelativeReference() ); CurlUri uri2(aURI.CloneWithRelativeRefPathAbsolute(u"/foo/bar")); - CPPUNIT_ASSERT_EQUAL( OUString("https"), uri2.GetScheme() ); - CPPUNIT_ASSERT_EQUAL( OUString("server.biz"), uri2.GetHost() ); - CPPUNIT_ASSERT_EQUAL( OUString("foo"), uri2.GetUser() ); - CPPUNIT_ASSERT_EQUAL( OUString("bar"), uri2.GetPassword() ); + CPPUNIT_ASSERT_EQUAL( u"https"_ustr, uri2.GetScheme() ); + CPPUNIT_ASSERT_EQUAL( u"server.biz"_ustr, uri2.GetHost() ); + CPPUNIT_ASSERT_EQUAL( u"foo"_ustr, uri2.GetUser() ); + CPPUNIT_ASSERT_EQUAL( u"bar"_ustr, uri2.GetPassword() ); CPPUNIT_ASSERT_EQUAL( sal_uInt16( 8040 ), uri2.GetPort() ); - CPPUNIT_ASSERT_EQUAL( OUString("/foo/bar"), uri2.GetRelativeReference() ); - CPPUNIT_ASSERT_EQUAL( OUString("https://foo:b...@server.biz:8040/foo/bar"), uri2.GetURI() ); + CPPUNIT_ASSERT_EQUAL( u"/foo/bar"_ustr, uri2.GetRelativeReference() ); + CPPUNIT_ASSERT_EQUAL( u"https://foo:b...@server.biz:8040/foo/bar"_ustr, uri2.GetURI() ); CurlUri uri3(aURI.CloneWithRelativeRefPathAbsolute(u"/?query")); - CPPUNIT_ASSERT_EQUAL( OUString("https"), uri3.GetScheme() ); - CPPUNIT_ASSERT_EQUAL( OUString("server.biz"), uri3.GetHost() ); - CPPUNIT_ASSERT_EQUAL( OUString("foo"), uri3.GetUser() ); - CPPUNIT_ASSERT_EQUAL( OUString("bar"), uri3.GetPassword() ); + CPPUNIT_ASSERT_EQUAL( u"https"_ustr, uri3.GetScheme() ); + CPPUNIT_ASSERT_EQUAL( u"server.biz"_ustr, uri3.GetHost() ); + CPPUNIT_ASSERT_EQUAL( u"foo"_ustr, uri3.GetUser() ); + CPPUNIT_ASSERT_EQUAL( u"bar"_ustr, uri3.GetPassword() ); CPPUNIT_ASSERT_EQUAL( sal_uInt16(8040), uri3.GetPort() ); - CPPUNIT_ASSERT_EQUAL( OUString("/?query"), uri3.GetRelativeReference() ); - CPPUNIT_ASSERT_EQUAL( OUString("https://foo:b...@server.biz:8040/?query"), uri3.GetURI() ); + CPPUNIT_ASSERT_EQUAL( u"/?query"_ustr, uri3.GetRelativeReference() ); + CPPUNIT_ASSERT_EQUAL( u"https://foo:b...@server.biz:8040/?query"_ustr, uri3.GetURI() ); } CPPUNIT_TEST_SUITE_REGISTRATION( webdav_local_test ); diff --git a/ucb/qa/cppunit/webdav/webdav_options.cxx b/ucb/qa/cppunit/webdav/webdav_options.cxx index d8e3d0946c77..e03c9466dfe0 100644 --- a/ucb/qa/cppunit/webdav/webdav_options.cxx +++ b/ucb/qa/cppunit/webdav/webdav_options.cxx @@ -137,7 +137,7 @@ namespace DAVTypesCheckInit( aDavOpt ); //example of allowed method for a Web resource - OUString aAllowedMethods = "POST,OPTIONS,GET,HEAD,TRACE"; + OUString aAllowedMethods = u"POST,OPTIONS,GET,HEAD,TRACE"_ustr; aDavOpt.setAllowedMethods( aAllowedMethods ); // now check... CPPUNIT_ASSERT_EQUAL( false, aDavOpt.isClass1() ); @@ -204,7 +204,7 @@ namespace aDavOpt.setRequestedTimeLife( 0 ); - OUString aHTTPResponseStatusText = "522 Origin Connection Time-out"; + OUString aHTTPResponseStatusText = u"522 Origin Connection Time-out"_ustr; aDavOpt.setHttpResponseStatusCode( 522 ); aDavOpt.setHttpResponseStatusText( aHTTPResponseStatusText ); CPPUNIT_ASSERT_EQUAL( false, aDavOpt.isClass1() ); @@ -223,7 +223,7 @@ namespace aHTTPResponseStatusText.clear(); aDavOpt.setHttpResponseStatusText( aHTTPResponseStatusText ); - OUString aURL = "http://my.server.org/a%20fake%20url/to%20test"; + OUString aURL = u"http://my.server.org/a%20fake%20url/to%20test"_ustr; aDavOpt.setURL( aURL ); CPPUNIT_ASSERT_EQUAL( false, aDavOpt.isClass1() ); CPPUNIT_ASSERT_EQUAL( false, aDavOpt.isClass2() ); @@ -347,14 +347,14 @@ namespace // the returned value to test DAVOptions aDavOptCached; // init the values - OUString aURL = "http://my.server.org/a%20fake%20url/to%20test/another-url"; + OUString aURL = u"http://my.server.org/a%20fake%20url/to%20test/another-url"_ustr; aDavOpt.setURL( aURL ); - aDavOpt.setRedirectedURL( "http://my.server.org/a%20fake%20url/to%20test/another-url/redirected" ); + aDavOpt.setRedirectedURL( u"http://my.server.org/a%20fake%20url/to%20test/another-url/redirected"_ustr ); aDavOpt.setClass1(); aDavOpt.setClass2(); aDavOpt.setClass3(); aDavOpt.setHeadAllowed( false ); - aDavOpt.setAllowedMethods( "OPTIONS,GET,HEAD,POST,DELETE,TRACE,PROPFIND,PROPPATCH,COPY,MOVE,PUT,LOCK,UNLOCK" ); + aDavOpt.setAllowedMethods( u"OPTIONS,GET,HEAD,POST,DELETE,TRACE,PROPFIND,PROPPATCH,COPY,MOVE,PUT,LOCK,UNLOCK"_ustr ); // add to cache aDAVOptsCache.addDAVOptions( aDavOpt, 30000 ); CPPUNIT_ASSERT_EQUAL( true ,aDAVOptsCache.getDAVOptions( aURL, aDavOptCached ) ); diff --git a/ucb/qa/cppunit/webdav/webdav_propfindcache.cxx b/ucb/qa/cppunit/webdav/webdav_propfindcache.cxx index da790442e744..7e5bd26ebff1 100644 --- a/ucb/qa/cppunit/webdav/webdav_propfindcache.cxx +++ b/ucb/qa/cppunit/webdav/webdav_propfindcache.cxx @@ -51,7 +51,7 @@ namespace void webdav_propcache_test::PropfindCacheElemTests( ) { - OUString aTheURL( "http:://server/path/filename.odt" ); + OUString aTheURL( u"http:://server/path/filename.odt"_ustr ); PropertyNames aPropsNames( aTheURL ); CPPUNIT_ASSERT_EQUAL( aTheURL, aPropsNames.getURL() ); @@ -63,15 +63,15 @@ namespace CPPUNIT_ASSERT_EQUAL( maxTime, aPropsNames.getStaleTime() ); std::vector < OUString > properties { - "DAV:lockdiscovery", - "DAV:supportedlock", - "DAV:resourcetype", - "DAV:displayname", - "DAV:getlastmodified", - "DAV:getcontentlength", - "DAV:creationdate", - "DAV:getetag", - "DAV:authticket", + u"DAV:lockdiscovery"_ustr, + u"DAV:supportedlock"_ustr, + u"DAV:resourcetype"_ustr, + u"DAV:displayname"_ustr, + u"DAV:getlastmodified"_ustr, + u"DAV:getcontentlength"_ustr, + u"DAV:creationdate"_ustr, + u"DAV:getetag"_ustr, + u"DAV:authticket"_ustr, }; DAVResourceInfo aSingleInfo { properties }; @@ -90,22 +90,22 @@ namespace void webdav_propcache_test::PropfindCacheTests( ) { PropertyNamesCache PropCache; - OUString aTheURL( "http:://server/path/filename.odt" ); + OUString aTheURL( u"http:://server/path/filename.odt"_ustr ); PropertyNames aPropsNames( aTheURL ); // check cache emptiness CPPUNIT_ASSERT_EQUAL( false, PropCache.getCachedPropertyNames( aTheURL, aPropsNames ) ); std::vector < OUString > properties { - "DAV:lockdiscovery", - "DAV:supportedlock", - "DAV:resourcetype", - "DAV:displayname", - "DAV:getlastmodified", - "DAV:getcontentlength", - "DAV:creationdate", - "DAV:getetag", - "DAV:authticket", + u"DAV:lockdiscovery"_ustr, + u"DAV:supportedlock"_ustr, + u"DAV:resourcetype"_ustr, + u"DAV:displayname"_ustr, + u"DAV:getlastmodified"_ustr, + u"DAV:getcontentlength"_ustr, + u"DAV:creationdate"_ustr, + u"DAV:getetag"_ustr, + u"DAV:authticket"_ustr, }; DAVResourceInfo aSingleInfo { properties }; diff --git a/ucb/qa/cppunit/webdav/webdav_resource_access.cxx b/ucb/qa/cppunit/webdav/webdav_resource_access.cxx index 2379139c04a3..5d161d9f1267 100644 --- a/ucb/qa/cppunit/webdav/webdav_resource_access.cxx +++ b/ucb/qa/cppunit/webdav/webdav_resource_access.cxx @@ -52,17 +52,17 @@ namespace void webdav_resource_access_test::DAVCheckRetries() { // instantiate a resource access class - DAVResourceAccess ResourceAccess(nullptr, nullptr, "http://url"); + DAVResourceAccess ResourceAccess(nullptr, nullptr, u"http://url"_ustr); // first check: all http errors from 100 to 399 should return true, to force a retry for (auto i = SC_CONTINUE; i < SC_BAD_REQUEST; i++) { - const DAVException aTheException(DAVException::DAV_HTTP_ERROR, "http error code", i ); + const DAVException aTheException(DAVException::DAV_HTTP_ERROR, u"http error code"_ustr, i ); CPPUNIT_ASSERT_EQUAL( true , ResourceAccess.handleException( aTheException, 1 ) ); } // http error code from 400 to 499 should NOT force a retry for (auto i = SC_BAD_REQUEST; i < SC_INTERNAL_SERVER_ERROR; i++) { - const DAVException aTheException(DAVException::DAV_HTTP_ERROR, "http error code", i ); + const DAVException aTheException(DAVException::DAV_HTTP_ERROR, u"http error code"_ustr, i ); CPPUNIT_ASSERT_EQUAL( false , ResourceAccess.handleException( aTheException, 1 ) ); } @@ -72,7 +72,7 @@ namespace // RFC poses no limit to the max value of response status code for (auto i = SC_INTERNAL_SERVER_ERROR; i < 2000; i++) { - const DAVException aTheException(DAVException::DAV_HTTP_ERROR, "http error code", i ); + const DAVException aTheException(DAVException::DAV_HTTP_ERROR, u"http error code"_ustr, i ); switch ( i ) { // the HTTP response status codes that can be retried @@ -90,7 +90,7 @@ namespace // check the retry request { - const DAVException aTheException(DAVException::DAV_HTTP_RETRY, "the-host-name", 8080 ); + const DAVException aTheException(DAVException::DAV_HTTP_RETRY, u"the-host-name"_ustr, 8080 ); CPPUNIT_ASSERT_EQUAL( true , ResourceAccess.handleException( aTheException, 1 ) ); } } diff --git a/ucb/source/cacher/cachedcontentresultset.cxx b/ucb/source/cacher/cachedcontentresultset.cxx index 89552ceca2a0..4ae55da582e8 100644 --- a/ucb/source/cacher/cachedcontentresultset.cxx +++ b/ucb/source/cacher/cachedcontentresultset.cxx @@ -912,7 +912,7 @@ XTYPEPROVIDER_IMPL_11( CachedContentResultSet OUString SAL_CALL CachedContentResultSet::getImplementationName() { - return "com.sun.star.comp.ucb.CachedContentResultSet"; + return u"com.sun.star.comp.ucb.CachedContentResultSet"_ustr; } sal_Bool SAL_CALL CachedContentResultSet::supportsService( const OUString& ServiceName ) @@ -922,7 +922,7 @@ sal_Bool SAL_CALL CachedContentResultSet::supportsService( const OUString& Servi css::uno::Sequence< OUString > SAL_CALL CachedContentResultSet::getSupportedServiceNames() { - return { "com.sun.star.ucb.CachedContentResultSet" }; + return { u"com.sun.star.ucb.CachedContentResultSet"_ustr }; } @@ -1998,7 +1998,7 @@ CachedContentResultSetFactory::~CachedContentResultSetFactory() OUString SAL_CALL CachedContentResultSetFactory::getImplementationName() { - return "com.sun.star.comp.ucb.CachedContentResultSetFactory"; + return u"com.sun.star.comp.ucb.CachedContentResultSetFactory"_ustr; } sal_Bool SAL_CALL CachedContentResultSetFactory::supportsService( const OUString& ServiceName ) { @@ -2006,7 +2006,7 @@ sal_Bool SAL_CALL CachedContentResultSetFactory::supportsService( const OUString } css::uno::Sequence< OUString > SAL_CALL CachedContentResultSetFactory::getSupportedServiceNames() { - return { "com.sun.star.ucb.CachedContentResultSetFactory" }; + return { u"com.sun.star.ucb.CachedContentResultSetFactory"_ustr }; } // Service factory implementation. diff --git a/ucb/source/cacher/cachedcontentresultsetstub.cxx b/ucb/source/cacher/cachedcontentresultsetstub.cxx index 5679d49bb622..6064e7f6ff21 100644 --- a/ucb/source/cacher/cachedcontentresultsetstub.cxx +++ b/ucb/source/cacher/cachedcontentresultsetstub.cxx @@ -42,8 +42,8 @@ CachedContentResultSetStub::CachedContentResultSetStub( Reference< XResultSet > , m_bFirstFetchSizePropagationDone( false ) , m_nLastFetchSize( 1 )//this value is not important at all , m_bLastFetchDirection( true )//this value is not important at all - , m_aPropertyNameForFetchSize( OUString("FetchSize") ) - , m_aPropertyNameForFetchDirection( OUString("FetchDirection") ) + , m_aPropertyNameForFetchSize( u"FetchSize"_ustr ) + , m_aPropertyNameForFetchDirection( u"FetchDirection"_ustr ) { impl_init(); } @@ -163,7 +163,7 @@ Sequence< Type > SAL_CALL CachedContentResultSetStub OUString SAL_CALL CachedContentResultSetStub::getImplementationName() { - return "com.sun.star.comp.ucb.CachedContentResultSetStub"; + return u"com.sun.star.comp.ucb.CachedContentResultSetStub"_ustr; } sal_Bool SAL_CALL CachedContentResultSetStub::supportsService( const OUString& ServiceName ) @@ -173,7 +173,7 @@ sal_Bool SAL_CALL CachedContentResultSetStub::supportsService( const OUString& S css::uno::Sequence< OUString > SAL_CALL CachedContentResultSetStub::getSupportedServiceNames() { - return { "com.sun.star.ucb.CachedContentResultSetStub" }; + return { u"com.sun.star.ucb.CachedContentResultSetStub"_ustr }; } @@ -506,7 +506,7 @@ CachedContentResultSetStubFactory::~CachedContentResultSetStubFactory() OUString SAL_CALL CachedContentResultSetStubFactory::getImplementationName() { - return "com.sun.star.comp.ucb.CachedContentResultSetStubFactory"; + return u"com.sun.star.comp.ucb.CachedContentResultSetStubFactory"_ustr; } sal_Bool SAL_CALL CachedContentResultSetStubFactory::supportsService( const OUString& ServiceName ) { @@ -514,7 +514,7 @@ sal_Bool SAL_CALL CachedContentResultSetStubFactory::supportsService( const OUSt } css::uno::Sequence< OUString > SAL_CALL CachedContentResultSetStubFactory::getSupportedServiceNames() { - return { "com.sun.star.ucb.CachedContentResultSetStubFactory" }; + return { u"com.sun.star.ucb.CachedContentResultSetStubFactory"_ustr }; } // Service factory implementation. diff --git a/ucb/source/cacher/cacheddynamicresultset.cxx b/ucb/source/cacher/cacheddynamicresultset.cxx index 1ec42873dd25..c9f8933b22f6 100644 --- a/ucb/source/cacher/cacheddynamicresultset.cxx +++ b/ucb/source/cacher/cacheddynamicresultset.cxx @@ -118,7 +118,7 @@ XTYPEPROVIDER_IMPL_4( CachedDynamicResultSet OUString SAL_CALL CachedDynamicResultSet::getImplementationName() { - return "com.sun.star.comp.ucb.CachedDynamicResultSet"; + return u"com.sun.star.comp.ucb.CachedDynamicResultSet"_ustr; } sal_Bool SAL_CALL CachedDynamicResultSet::supportsService( const OUString& ServiceName ) @@ -128,7 +128,7 @@ sal_Bool SAL_CALL CachedDynamicResultSet::supportsService( const OUString& Servi css::uno::Sequence< OUString > SAL_CALL CachedDynamicResultSet::getSupportedServiceNames() { - return { "com.sun.star.ucb.CachedDynamicResultSet" }; + return { u"com.sun.star.ucb.CachedDynamicResultSet"_ustr }; } @@ -160,7 +160,7 @@ CachedDynamicResultSetFactory::~CachedDynamicResultSetFactory() OUString SAL_CALL CachedDynamicResultSetFactory::getImplementationName() { - return "com.sun.star.comp.ucb.CachedDynamicResultSetFactory"; + return u"com.sun.star.comp.ucb.CachedDynamicResultSetFactory"_ustr; } sal_Bool SAL_CALL CachedDynamicResultSetFactory::supportsService( const OUString& ServiceName ) { @@ -168,7 +168,7 @@ sal_Bool SAL_CALL CachedDynamicResultSetFactory::supportsService( const OUString } css::uno::Sequence< OUString > SAL_CALL CachedDynamicResultSetFactory::getSupportedServiceNames() { - return { "com.sun.star.ucb.CachedDynamicResultSetFactory" }; + return { u"com.sun.star.ucb.CachedDynamicResultSetFactory"_ustr }; } // Service factory implementation. diff --git a/ucb/source/cacher/cacheddynamicresultsetstub.cxx b/ucb/source/cacher/cacheddynamicresultsetstub.cxx index e9f508014f1a..eac5d7db439d 100644 --- a/ucb/source/cacher/cacheddynamicresultsetstub.cxx +++ b/ucb/source/cacher/cacheddynamicresultsetstub.cxx @@ -120,7 +120,7 @@ XTYPEPROVIDER_IMPL_5( CachedDynamicResultSetStub OUString SAL_CALL CachedDynamicResultSetStub::getImplementationName() { - return "com.sun.star.comp.ucb.CachedDynamicResultSetStub"; + return u"com.sun.star.comp.ucb.CachedDynamicResultSetStub"_ustr; } sal_Bool SAL_CALL CachedDynamicResultSetStub::supportsService( const OUString& ServiceName ) @@ -130,7 +130,7 @@ sal_Bool SAL_CALL CachedDynamicResultSetStub::supportsService( const OUString& S css::uno::Sequence< OUString > SAL_CALL CachedDynamicResultSetStub::getSupportedServiceNames() { - return { "com.sun.star.ucb.CachedDynamicResultSetStub" }; + return { u"com.sun.star.ucb.CachedDynamicResultSetStub"_ustr }; } @@ -151,7 +151,7 @@ CachedDynamicResultSetStubFactory::~CachedDynamicResultSetStubFactory() OUString SAL_CALL CachedDynamicResultSetStubFactory::getImplementationName() { - return "com.sun.star.comp.ucb.CachedDynamicResultSetStubFactory"; + return u"com.sun.star.comp.ucb.CachedDynamicResultSetStubFactory"_ustr; } sal_Bool SAL_CALL CachedDynamicResultSetStubFactory::supportsService( const OUString& ServiceName ) { @@ -159,7 +159,7 @@ sal_Bool SAL_CALL CachedDynamicResultSetStubFactory::supportsService( const OUSt } css::uno::Sequence< OUString > SAL_CALL CachedDynamicResultSetStubFactory::getSupportedServiceNames() { - return { "com.sun.star.ucb.CachedDynamicResultSetStubFactory" }; + return { u"com.sun.star.ucb.CachedDynamicResultSetStubFactory"_ustr }; } // Service factory implementation. diff --git a/ucb/source/core/FileAccess.cxx b/ucb/source/core/FileAccess.cxx index 319af18a6c23..ca7752378a9d 100644 --- a/ucb/source/core/FileAccess.cxx +++ b/ucb/source/core/FileAccess.cxx @@ -113,7 +113,7 @@ public: virtual void SAL_CALL setHidden( const OUString& FileURL, sal_Bool bHidden ) override; OUString SAL_CALL getImplementationName() override - { return "com.sun.star.comp.ucb.SimpleFileAccess"; } + { return u"com.sun.star.comp.ucb.SimpleFileAccess"_ustr; } sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override { return cppu::supportsService(this, ServiceName); } @@ -237,7 +237,7 @@ void OFileAccess::transferImpl( const OUString& rSource, { css::uno::Any anyEx = cppu::getCaughtException(); throw css::lang::WrappedTargetRuntimeException( - "OFileAccess::transferrImpl - Unable to obtain destination folder URL!", + u"OFileAccess::transferrImpl - Unable to obtain destination folder URL!"_ustr, getXWeak(), anyEx ); } @@ -246,7 +246,7 @@ void OFileAccess::transferImpl( const OUString& rSource, } throw RuntimeException( - "OFileAccess::transferrImpl - Unable to obtain destination folder URL!", + u"OFileAccess::transferrImpl - Unable to obtain destination folder URL!"_ustr, getXWeak() ); } @@ -286,7 +286,7 @@ void OFileAccess::kill( const OUString& FileURL ) ucbhelper::Content aCnt( aDeleteObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment, comphelper::getProcessComponentContext() ); try { - aCnt.executeCommand( "delete", Any( true ) ); + aCnt.executeCommand( u"delete"_ustr, Any( true ) ); } catch ( css::ucb::CommandFailedException const & ) { @@ -311,7 +311,7 @@ sal_Bool OFileAccess::isReadOnly( const OUString& FileURL ) { INetURLObject aURLObj( FileURL, INetProtocol::File ); ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment, comphelper::getProcessComponentContext() ); - Any aRetAny = aCnt.getPropertyValue("IsReadOnly"); + Any aRetAny = aCnt.getPropertyValue(u"IsReadOnly"_ustr); bool bRet = false; aRetAny >>= bRet; return bRet; @@ -321,7 +321,7 @@ void OFileAccess::setReadOnly( const OUString& FileURL, sal_Bool bReadOnly ) { INetURLObject aURLObj( FileURL, INetProtocol::File ); ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment, comphelper::getProcessComponentContext() ); - aCnt.setPropertyValue("IsReadOnly", Any(bReadOnly) ); + aCnt.setPropertyValue(u"IsReadOnly"_ustr, Any(bReadOnly) ); } void OFileAccess::createFolder( const OUString& NewFolderURL ) @@ -365,7 +365,7 @@ void OFileAccess::createFolder( const OUString& NewFolderURL ) ucbhelper::Content aNew; try { - if ( !aCnt.insertNewContent( rCurr.Type, { "Title" }, { Any(aTitle) }, aNew ) ) + if ( !aCnt.insertNewContent( rCurr.Type, { u"Title"_ustr }, { Any(aTitle) }, aNew ) ) continue; // Success. We're done. @@ -387,7 +387,7 @@ sal_Int32 OFileAccess::getSize( const OUString& FileURL ) sal_Int64 nTemp = 0; INetURLObject aObj( FileURL, INetProtocol::File ); ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment, comphelper::getProcessComponentContext() ); - aCnt.getPropertyValue( "Size" ) >>= nTemp; + aCnt.getPropertyValue( u"Size"_ustr ) >>= nTemp; nSize = static_cast<sal_Int32>(nTemp); return nSize; } @@ -409,7 +409,7 @@ css::util::DateTime OFileAccess::getDateTimeModified( const OUString& FileURL ) Reference< XCommandEnvironment > aCmdEnv; ucbhelper::Content aYoung( aFileObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), aCmdEnv, comphelper::getProcessComponentContext() ); - aYoung.getPropertyValue("DateModified") >>= aDateTime; + aYoung.getPropertyValue(u"DateModified"_ustr) >>= aDateTime; return aDateTime; } @@ -524,7 +524,7 @@ Reference< XStream > OFileAccess::openFileReadWrite( const OUString& FileURL ) try { - aCnt.executeCommand( "open", aCmdArg ); + aCnt.executeCommand( u"open"_ustr, aCmdArg ); } catch ( InteractiveIOException const & e ) { @@ -541,7 +541,7 @@ Reference< XStream > OFileAccess::openFileReadWrite( const OUString& FileURL ) aInsertArg.ReplaceExisting = false; aCmdArg <<= aInsertArg; - aCnt.executeCommand( "insert", aCmdArg ); + aCnt.executeCommand( u"insert"_ustr, aCmdArg ); // Retry... return openFileReadWrite( FileURL ); @@ -594,7 +594,7 @@ bool OFileAccess::createNewFile( const OUString & rParentURL, { ucbhelper::Content aNew; if ( aParentCnt.insertNewContent( - rCurr.Type, { "Title" }, { Any(rTitle) }, data, aNew ) ) + rCurr.Type, { u"Title"_ustr }, { Any(rTitle) }, data, aNew ) ) return true; // success. else continue; @@ -665,7 +665,7 @@ sal_Bool OFileAccess::isHidden( const OUString& FileURL ) { INetURLObject aURLObj( FileURL, INetProtocol::File ); ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment, comphelper::getProcessComponentContext() ); - Any aRetAny = aCnt.getPropertyValue("IsHidden"); + Any aRetAny = aCnt.getPropertyValue(u"IsHidden"_ustr); bool bRet = false; aRetAny >>= bRet; return bRet; @@ -675,7 +675,7 @@ void OFileAccess::setHidden( const OUString& FileURL, sal_Bool bHidden ) { INetURLObject aURLObj( FileURL, INetProtocol::File ); ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment, comphelper::getProcessComponentContext() ); - aCnt.setPropertyValue("IsHidden", Any(bHidden) ); + aCnt.setPropertyValue(u"IsHidden"_ustr, Any(bHidden) ); } diff --git a/ucb/source/core/cmdenv.cxx b/ucb/source/core/cmdenv.cxx index 9189f0e0f0aa..7fb4ef776566 100644 --- a/ucb/source/core/cmdenv.cxx +++ b/ucb/source/core/cmdenv.cxx @@ -66,7 +66,7 @@ void SAL_CALL UcbCommandEnvironment::initialize( // virtual OUString SAL_CALL UcbCommandEnvironment::getImplementationName() { - return "com.sun.star.comp.ucb.CommandEnvironment"; + return u"com.sun.star.comp.ucb.CommandEnvironment"_ustr; } @@ -82,7 +82,7 @@ UcbCommandEnvironment::supportsService( const OUString& ServiceName ) uno::Sequence< OUString > SAL_CALL UcbCommandEnvironment::getSupportedServiceNames() { - return { "com.sun.star.ucb.CommandEnvironment" }; + return { u"com.sun.star.ucb.CommandEnvironment"_ustr }; } diff --git a/ucb/source/core/provprox.cxx b/ucb/source/core/provprox.cxx index 68b329e83708..54ba56b33165 100644 --- a/ucb/source/core/provprox.cxx +++ b/ucb/source/core/provprox.cxx @@ -52,7 +52,7 @@ UcbContentProviderProxyFactory::~UcbContentProviderProxyFactory() OUString SAL_CALL UcbContentProviderProxyFactory::getImplementationName() { - return "com.sun.star.comp.ucb.UcbContentProviderProxyFactory"; + return u"com.sun.star.comp.ucb.UcbContentProviderProxyFactory"_ustr; } sal_Bool SAL_CALL UcbContentProviderProxyFactory::supportsService( const OUString& ServiceName ) { @@ -60,7 +60,7 @@ sal_Bool SAL_CALL UcbContentProviderProxyFactory::supportsService( const OUStrin } css::uno::Sequence< OUString > SAL_CALL UcbContentProviderProxyFactory::getSupportedServiceNames() { - return { "com.sun.star.ucb.ContentProviderProxyFactory" }; + return { u"com.sun.star.ucb.ContentProviderProxyFactory"_ustr }; } // Service factory implementation. @@ -177,7 +177,7 @@ Sequence< Type > SAL_CALL UcbContentProviderProxy::getTypes() OUString SAL_CALL UcbContentProviderProxy::getImplementationName() { - return "com.sun.star.comp.ucb.UcbContentProviderProxy"; + return u"com.sun.star.comp.ucb.UcbContentProviderProxy"_ustr; } sal_Bool SAL_CALL UcbContentProviderProxy::supportsService( const OUString& ServiceName ) @@ -187,7 +187,7 @@ sal_Bool SAL_CALL UcbContentProviderProxy::supportsService( const OUString& Serv css::uno::Sequence< OUString > SAL_CALL UcbContentProviderProxy::getSupportedServiceNames() { - return { "com.sun.star.ucb.ContentProviderProxy" }; + return { u"com.sun.star.ucb.ContentProviderProxy"_ustr }; } diff --git a/ucb/source/core/ucb.cxx b/ucb/source/core/ucb.cxx index 56dd74bb4d8a..43e5ca0ab096 100644 --- a/ucb/source/core/ucb.cxx +++ b/ucb/source/core/ucb.cxx @@ -281,7 +281,7 @@ void SAL_CALL UniversalContentBroker::removeEventListener( OUString SAL_CALL UniversalContentBroker::getImplementationName() { - return "com.sun.star.comp.ucb.UniversalContentBroker"; + return u"com.sun.star.comp.ucb.UniversalContentBroker"_ustr; } sal_Bool SAL_CALL UniversalContentBroker::supportsService( const OUString& ServiceName ) { @@ -289,7 +289,7 @@ sal_Bool SAL_CALL UniversalContentBroker::supportsService( const OUString& Servi } css::uno::Sequence< OUString > SAL_CALL UniversalContentBroker::getSupportedServiceNames() { - return { "com.sun.star.ucb.UniversalContentBroker" }; + return { u"com.sun.star.ucb.UniversalContentBroker"_ustr }; } @@ -318,14 +318,14 @@ void SAL_CALL UniversalContentBroker::initialize( const css::uno::Sequence< Any && m_aArguments[1] == aArguments[1])) { throw IllegalArgumentException( - "UCB reinitialized with different arguments", + u"UCB reinitialized with different arguments"_ustr, getXWeak(), 0); } return; } if (!aArguments.hasElements()) { - m_aArguments = { Any(OUString("Local")), Any(OUString("Office")) }; + m_aArguments = { Any(u"Local"_ustr), Any(u"Office"_ustr) }; } else { @@ -580,7 +580,7 @@ Any SAL_CALL UniversalContentBroker::execute( { ucbhelper::cancelCommandExecution( Any( IllegalArgumentException( - "Wrong argument type!", + u"Wrong argument type!"_ustr, getXWeak(), -1 ) ), Environment ); @@ -604,7 +604,7 @@ Any SAL_CALL UniversalContentBroker::execute( { ucbhelper::cancelCommandExecution( Any( IllegalArgumentException( - "Wrong argument type!", + u"Wrong argument type!"_ustr, getXWeak(), -1 ) ), Environment ); @@ -794,7 +794,7 @@ bool UniversalContentBroker::getContentProviderData( uno::Reference< uno::XInterface > xInterface( xConfigProv->createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationAccess", + u"com.sun.star.configuration.ConfigurationAccess"_ustr, aArguments ) ); if ( !m_xNotifier.is() ) diff --git a/ucb/source/core/ucbcmds.cxx b/ucb/source/core/ucbcmds.cxx index 5bcfb1f99ff9..64a34df8d70d 100644 --- a/ucb/source/core/ucbcmds.cxx +++ b/ucb/source/core/ucbcmds.cxx @@ -426,13 +426,13 @@ bool setTitle( { try { - uno::Sequence< beans::PropertyValue > aPropValues{ { /* Name */ "Title", + uno::Sequence< beans::PropertyValue > aPropValues{ { /* Name */ u"Title"_ustr, /* Handle */ -1, /* Value */ uno::Any(rNewTitle), /* State */ {} } }; ucb::Command aSetPropsCommand( - "setPropertyValues", + u"setPropertyValues"_ustr, -1, uno::Any( aPropValues ) ); @@ -492,15 +492,15 @@ uno::Reference< ucb::XContent > createNew( ucb::IOErrorCode_CANT_CREATE, aArgs, rContext.xOrigEnv, - "Target is no XCommandProcessor!", + u"Target is no XCommandProcessor!"_ustr, rContext.xProcessor ); // Unreachable } - uno::Sequence< beans::Property > aPropsToObtain{ makeProperty("CreatableContentsInfo", -1) }; + uno::Sequence< beans::Property > aPropsToObtain{ makeProperty(u"CreatableContentsInfo"_ustr, -1) }; ucb::Command aGetPropsCommand( - "getPropertyValues", + u"getPropertyValues"_ustr, -1, uno::Any( aPropsToObtain ) ); @@ -539,7 +539,7 @@ uno::Reference< ucb::XContent > createNew( ucb::IOErrorCode_CANT_CREATE, aArgs, rContext.xOrigEnv, - "Target is no XContentCreator!", + u"Target is no XContentCreator!"_ustr, rContext.xProcessor ); // Unreachable } @@ -557,7 +557,7 @@ uno::Reference< ucb::XContent > createNew( ucb::IOErrorCode_CANT_CREATE, aArgs, rContext.xOrigEnv, - "No types creatable!", + u"No types creatable!"_ustr, rContext.xProcessor ); // Unreachable } @@ -594,7 +594,7 @@ uno::Reference< ucb::XContent > createNew( { ucbhelper::cancelCommandExecution( uno::Any( lang::IllegalArgumentException( - "Unknown transfer operation!", + u"Unknown transfer operation!"_ustr, rContext.xProcessor, -1 ) ), rContext.xOrigEnv ); @@ -613,7 +613,7 @@ uno::Reference< ucb::XContent > createNew( // First, try it using "CreatabeleContentsInfo" property and // "createNewContent" command -> the "new" way. ucb::Command aCreateNewCommand( - "createNewContent", + u"createNewContent"_ustr, -1, uno::Any( *pTypeInfo ) ); @@ -638,7 +638,7 @@ uno::Reference< ucb::XContent > createNew( ucb::IOErrorCode_CANT_CREATE, aArgs, rContext.xOrigEnv, - "createNewContent failed!", + u"createNewContent failed!"_ustr, rContext.xProcessor ); // Unreachable } @@ -654,7 +654,7 @@ void transferProperties( const uno::Reference< ucb::XCommandProcessor > & xCommandProcessorN ) { ucb::Command aGetPropertySetInfoCommand( - "getPropertySetInfo", + u"getPropertySetInfo"_ustr, -1, uno::Any() ); @@ -672,7 +672,7 @@ void transferProperties( ucb::IOErrorCode_CANT_READ, aArgs, rContext.xOrigEnv, - "Unable to get propertyset info from source object!", + u"Unable to get propertyset info from source object!"_ustr, rContext.xProcessor ); // Unreachable } @@ -680,7 +680,7 @@ void transferProperties( uno::Sequence< beans::Property > aAllProps = xInfo->getProperties(); ucb::Command aGetPropsCommand1( - "getPropertyValues", + u"getPropertyValues"_ustr, -1, uno::Any( aAllProps ) ); @@ -698,7 +698,7 @@ void transferProperties( ucb::IOErrorCode_CANT_READ, aArgs, rContext.xOrigEnv, - "Unable to get properties from source object!", + u"Unable to get properties from source object!"_ustr, rContext.xProcessor ); // Unreachable } @@ -792,7 +792,7 @@ void transferProperties( // Set properties at new object. ucb::Command aSetPropsCommand( - "setPropertyValues", + u"setPropertyValues"_ustr, -1, uno::Any( aPropValues ) ); @@ -824,7 +824,7 @@ uno::Reference< io::XInputStream > getInputStream( aArg.Properties = uno::Sequence< beans::Property >( 0 ); // unused ucb::Command aOpenCommand( - "open", + u"open"_ustr, -1, uno::Any( aArg ) ); @@ -858,7 +858,7 @@ uno::Reference< io::XInputStream > getInputStream( aArg.Properties = uno::Sequence< beans::Property >( 0 ); ucb::Command aOpenCommand( - "open", + u"open"_ustr, -1, uno::Any( aArg ) ); @@ -890,11 +890,11 @@ uno::Reference< sdbc::XResultSet > getResultSet( aArg.Mode = ucb::OpenMode::ALL; aArg.Priority = 0; // unused aArg.Sink = nullptr; - aArg.Properties = { makeProperty("IsFolder", -1 /* unknown */), - makeProperty("IsDocument", -1 /* unknown */), - makeProperty("TargetURL", -1 /* unknown */) }; + aArg.Properties = { makeProperty(u"IsFolder"_ustr, -1 /* unknown */), + makeProperty(u"IsDocument"_ustr, -1 /* unknown */), + makeProperty(u"TargetURL"_ustr, -1 /* unknown */) }; - ucb::Command aOpenCommand( "open", + ucb::Command aOpenCommand( u"open"_ustr, -1, uno::Any( aArg ) ); try @@ -930,10 +930,10 @@ void handleNameClashRename( sal_Int32 nTry = 0; // Obtain old title. - uno::Sequence< beans::Property > aProps{ makeProperty("Title", -1) }; + uno::Sequence< beans::Property > aProps{ makeProperty(u"Title"_ustr, -1) }; ucb::Command aGetPropsCommand( - "getPropertyValues", + u"getPropertyValues"_ustr, -1, uno::Any( aProps ) ); @@ -950,7 +950,7 @@ void handleNameClashRename( ucb::IOErrorCode_CANT_READ, aArgs, rContext.xOrigEnv, - "Unable to get properties from new object!", + u"Unable to get properties from new object!"_ustr, rContext.xProcessor ); // Unreachable } @@ -960,7 +960,7 @@ void handleNameClashRename( { ucbhelper::cancelCommandExecution( uno::Any( beans::UnknownPropertyException( - "Unable to get property 'Title' from new object!", + u"Unable to get property 'Title' from new object!"_ustr, rContext.xProcessor ) ), rContext.xOrigEnv ); // Unreachable @@ -1033,7 +1033,7 @@ void handleNameClashRename( ucb::IOErrorCode_CANT_READ, aArgs, rContext.xOrigEnv, - "Got no data stream from source!", + u"Got no data stream from source!"_ustr, rContext.xProcessor ); // Unreachable } @@ -1045,7 +1045,7 @@ void handleNameClashRename( aArg.ReplaceExisting = false; ucb::Command aInsertCommand( - "insert", + u"insert"_ustr, -1, uno::Any( aArg ) ); @@ -1069,7 +1069,7 @@ void handleNameClashRename( ucbhelper::cancelCommandExecution( uno::Any( ucb::UnsupportedNameClashException( - "Unable to resolve name clash!", + u"Unable to resolve name clash!"_ustr, rContext.xProcessor, ucb::NameClash::RENAME ) ), rContext.xOrigEnv ); @@ -1090,7 +1090,7 @@ void globalTransfer_( { ucbhelper::cancelCommandExecution( uno::Any( beans::UnknownPropertyException( - "Unable to get property 'IsFolder' from source object!", + u"Unable to get property 'IsFolder' from source object!"_ustr, rContext.xProcessor ) ), rContext.xOrigEnv ); // Unreachable @@ -1102,7 +1102,7 @@ void globalTransfer_( { ucbhelper::cancelCommandExecution( uno::Any( beans::UnknownPropertyException( - "Unable to get property 'IsDocument' from source object!", + u"Unable to get property 'IsDocument' from source object!"_ustr, rContext.xProcessor ) ), rContext.xOrigEnv ); // Unreachable @@ -1131,7 +1131,7 @@ void globalTransfer_( ucb::IOErrorCode_CANT_CREATE, aArgs, rContext.xOrigEnv, - "No matching content type at target!", + u"No matching content type at target!"_ustr, rContext.xProcessor ); // Unreachable } @@ -1145,7 +1145,7 @@ void globalTransfer_( if ( !xCommandProcessorN.is() ) { uno::Any aProps(beans::PropertyValue( - "Uri", + u"Uri"_ustr, -1, uno::Any( xNew->getIdentifier()-> @@ -1155,7 +1155,7 @@ void globalTransfer_( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), rContext.xOrigEnv, - "New content is not a XCommandProcessor!", + u"New content is not a XCommandProcessor!"_ustr, rContext.xProcessor ); // Unreachable } @@ -1174,7 +1174,7 @@ void globalTransfer_( ucb::IOErrorCode_CANT_READ, aArgs, rContext.xOrigEnv, - "Source content is not a XCommandProcessor!", + u"Source content is not a XCommandProcessor!"_ustr, rContext.xProcessor ); // Unreachable } @@ -1239,7 +1239,7 @@ void globalTransfer_( try { ucb::Command aInsertCommand( - "insert", + u"insert"_ustr, -1, uno::Any( aArg ) ); @@ -1257,8 +1257,8 @@ void globalTransfer_( // No chance to solve name clashes, because I'm not able to detect // whether there is one. throw ucb::UnsupportedNameClashException( - "Unable to resolve name clashes, no chance to detect " - "that there is one!", + u"Unable to resolve name clashes, no chance to detect " + "that there is one!"_ustr, rContext.xProcessor, rContext.aArg.NameClash ); } @@ -1284,8 +1284,8 @@ void globalTransfer_( ucbhelper::cancelCommandExecution( uno::Any( ucb::UnsupportedNameClashException( - "BUG: insert + replace == true MUST NOT " - "throw NameClashException.", + u"BUG: insert + replace == true MUST NOT " + "throw NameClashException."_ustr, rContext.xProcessor, rContext.aArg.NameClash ) ), rContext.xOrigEnv ); @@ -1331,8 +1331,8 @@ void globalTransfer_( case ABORT: throw ucb::CommandFailedException( - "abort requested via interaction " - "handler", + u"abort requested via interaction " + "handler"_ustr, uno::Reference< uno::XInterface >(), aExc ); // break; @@ -1362,7 +1362,7 @@ void globalTransfer_( { // error setting title. Abort. throw ucb::CommandFailedException( - "error setting Title property!", + u"error setting Title property!"_ustr, uno::Reference< uno::XInterface >(), aExc ); } @@ -1380,8 +1380,8 @@ void globalTransfer_( ucbhelper::cancelCommandExecution( uno::Any( ucb::UnsupportedNameClashException( - "default action, don't know how to " - "handle name clash", + u"default action, don't know how to " + "handle name clash"_ustr, rContext.xProcessor, rContext.aArg.NameClash ) ), rContext.xOrigEnv ); @@ -1409,7 +1409,7 @@ void globalTransfer_( { uno::Any aProps( beans::PropertyValue( - "Uri", + u"Uri"_ustr, -1, uno::Any(rContext.aArg.SourceURL), beans::PropertyState_DIRECT_VALUE)); @@ -1417,7 +1417,7 @@ void globalTransfer_( ucb::IOErrorCode_CANT_READ, uno::Sequence< uno::Any >(&aProps, 1), rContext.xOrigEnv, - "Unable to get properties from children of source!", + u"Unable to get properties from children of source!"_ustr, rContext.xProcessor ); // Unreachable } @@ -1435,7 +1435,7 @@ void globalTransfer_( ucb::IOErrorCode_CANT_READ, aArgs, rContext.xOrigEnv, - "Unable to get children of source!", + u"Unable to get children of source!"_ustr, rContext.xProcessor ); // Unreachable } @@ -1493,7 +1493,7 @@ void globalTransfer_( aAny = xcp->execute( ucb::Command( - "getCommandInfo", + u"getCommandInfo"_ustr, -1, uno::Any()), 0, @@ -1571,7 +1571,7 @@ void UniversalContentBroker::globalTransfer( ucb::IOErrorCode_CANT_READ, aArgs, xEnv, - "Can't instantiate target object!", + u"Can't instantiate target object!"_ustr, this ); // Unreachable } @@ -1591,7 +1591,7 @@ void UniversalContentBroker::globalTransfer( ucb::IOErrorCode_CANT_READ, aArgs, xEnv, - "Target content is not a XCommandProcessor!", + u"Target content is not a XCommandProcessor!"_ustr, this ); // Unreachable } @@ -1612,7 +1612,7 @@ void UniversalContentBroker::globalTransfer( try { ucb::Command aCommand( - "transfer", // Name + u"transfer"_ustr, // Name -1, // Handle uno::Any( aTransferArg ) ); // Argument @@ -1649,7 +1649,7 @@ void UniversalContentBroker::globalTransfer( aTransferArg.MimeType ); ucb::Command aCommand1( - "transfer", + u"transfer"_ustr, -1, uno::Any( aTransferArg1 ) ); @@ -1692,8 +1692,8 @@ void UniversalContentBroker::globalTransfer( case ABORT: throw ucb::CommandFailedException( - "abort requested via interaction " - "handler", + u"abort requested via interaction " + "handler"_ustr, uno::Reference< uno::XInterface >(), aExc ); // break; @@ -1749,7 +1749,7 @@ void UniversalContentBroker::globalTransfer( ucb::IOErrorCode_CANT_READ, aArgs, xEnv, - "Can't instantiate source object!", + u"Can't instantiate source object!"_ustr, this ); // Unreachable } @@ -1766,20 +1766,20 @@ void UniversalContentBroker::globalTransfer( ucb::IOErrorCode_CANT_READ, aArgs, xEnv, - "Source content is not a XCommandProcessor!", + u"Source content is not a XCommandProcessor!"_ustr, this ); // Unreachable } // Obtain interesting property values from source... - uno::Sequence< beans::Property > aProps{ makeProperty("IsFolder", -1 /* unknown */), - makeProperty("IsDocument", -1 /* unknown */), - makeProperty("TargetURL", -1 /* unknown */), - makeProperty("BaseURI", -1 /* unknown */) }; + uno::Sequence< beans::Property > aProps{ makeProperty(u"IsFolder"_ustr, -1 /* unknown */), + makeProperty(u"IsDocument"_ustr, -1 /* unknown */), + makeProperty(u"TargetURL"_ustr, -1 /* unknown */), + makeProperty(u"BaseURI"_ustr, -1 /* unknown */) }; ucb::Command aGetPropsCommand( - "getPropertyValues", + u"getPropertyValues"_ustr, -1, uno::Any( aProps ) ); @@ -1796,7 +1796,7 @@ void UniversalContentBroker::globalTransfer( ucb::IOErrorCode_CANT_READ, aArgs, xEnv, - "Unable to get properties from source object!", + u"Unable to get properties from source object!"_ustr, this ); // Unreachable } @@ -1828,7 +1828,7 @@ void UniversalContentBroker::globalTransfer( try { ucb::Command aCommand( - "delete", // Name + u"delete"_ustr, // Name -1, // Handle uno::Any( true ) ); // Argument @@ -1881,7 +1881,7 @@ uno::Any UniversalContentBroker::checkIn( const ucb::CheckinArgument& rArg, ucb::IOErrorCode_CANT_READ, aArgs, xEnv, - "Can't instantiate target object!", + u"Can't instantiate target object!"_ustr, this ); // Unreachable } @@ -1898,7 +1898,7 @@ uno::Any UniversalContentBroker::checkIn( const ucb::CheckinArgument& rArg, ucb::IOErrorCode_CANT_READ, aArgs, xEnv, - "Target content is not a XCommandProcessor!", + u"Target content is not a XCommandProcessor!"_ustr, this ); // Unreachable } @@ -1906,7 +1906,7 @@ uno::Any UniversalContentBroker::checkIn( const ucb::CheckinArgument& rArg, try { ucb::Command aCommand( - "checkin", -1, + u"checkin"_ustr, -1, uno::Any( rArg ) ); aRet = xCommandProcessor->execute( aCommand, 0, xLocalEnv ); diff --git a/ucb/source/core/ucbprops.cxx b/ucb/source/core/ucbprops.cxx index 808923adafd4..aa7bf73f7fbc 100644 --- a/ucb/source/core/ucbprops.cxx +++ b/ucb/source/core/ucbprops.cxx @@ -47,142 +47,142 @@ using namespace com::sun::star::uno; UcbPropertiesManager::UcbPropertiesManager() : m_pProps({ - { "Account", -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, - { "AutoUpdateInterval", -1, cppu::UnoType<sal_Int32>::get(), ATTR_DEFAULT }, - { "ConfirmEmpty", -1, cppu::UnoType<bool>::get(), ATTR_DEFAULT }, - { "ConnectionLimit", -1, cppu::UnoType<sal_Int16>::get(), ATTR_DEFAULT }, - { "ConnectionMode", -1, cppu::UnoType<sal_Int16>::get(), ATTR_DEFAULT }, - { "ContentCountLimit", -1, cppu::UnoType<sal_Int16>::get(), ATTR_DEFAULT }, - { "ContentType", -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, - { "Cookie", -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, - { "CrossReferences", -1, + { u"Account"_ustr, -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, + { u"AutoUpdateInterval"_ustr, -1, cppu::UnoType<sal_Int32>::get(), ATTR_DEFAULT }, + { u"ConfirmEmpty"_ustr, -1, cppu::UnoType<bool>::get(), ATTR_DEFAULT }, + { u"ConnectionLimit"_ustr, -1, cppu::UnoType<sal_Int16>::get(), ATTR_DEFAULT }, + { u"ConnectionMode"_ustr, -1, cppu::UnoType<sal_Int16>::get(), ATTR_DEFAULT }, + { u"ContentCountLimit"_ustr, -1, cppu::UnoType<sal_Int16>::get(), ATTR_DEFAULT }, + { u"ContentType"_ustr, -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, + { u"Cookie"_ustr, -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, + { u"CrossReferences"_ustr, -1, cppu::UnoType<css::uno::Sequence<css::ucb::CrossReference>>::get(), ATTR_DEFAULT }, - { "DateCreated", -1, cppu::UnoType<css::util::DateTime>::get(), + { u"DateCreated"_ustr, -1, cppu::UnoType<css::util::DateTime>::get(), ATTR_DEFAULT }, - { "DateModified", -1, cppu::UnoType<css::util::DateTime>::get(), + { u"DateModified"_ustr, -1, cppu::UnoType<css::util::DateTime>::get(), ATTR_DEFAULT }, - { "DeleteOnServer", -1, cppu::UnoType<bool>::get(), ATTR_DEFAULT }, - { "DocumentBody", -1, cppu::UnoType<css::uno::Sequence<sal_Int8>>::get(), + { u"DeleteOnServer"_ustr, -1, cppu::UnoType<bool>::get(), ATTR_DEFAULT }, + { u"DocumentBody"_ustr, -1, cppu::UnoType<css::uno::Sequence<sal_Int8>>::get(), ATTR_DEFAULT }, - { "DocumentCount", -1, cppu::UnoType<sal_Int32>::get(), + { u"DocumentCount"_ustr, -1, cppu::UnoType<sal_Int32>::get(), ATTR_DEFAULT | PropertyAttribute::READONLY }, - { "DocumentCountMarked", -1, cppu::UnoType<sal_Int32>::get(), + { u"DocumentCountMarked"_ustr, -1, cppu::UnoType<sal_Int32>::get(), ATTR_DEFAULT | PropertyAttribute::READONLY }, - { "DocumentHeader", -1, + { u"DocumentHeader"_ustr, -1, cppu::UnoType<css::uno::Sequence<css::ucb::DocumentHeaderField>>::get(), ATTR_DEFAULT }, - { "DocumentStoreMode", -1, + { u"DocumentStoreMode"_ustr, -1, cppu::UnoType<css::ucb::DocumentStoreMode>::get(), ATTR_DEFAULT }, - { "DocumentViewMode", -1, cppu::UnoType<sal_Int16>::get(), ATTR_DEFAULT }, - { "FTPAccount", -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, - { "Flags", -1, cppu::UnoType<sal_Int32>::get(), ATTR_DEFAULT }, - { "FolderCount", -1, cppu::UnoType<sal_Int32>::get(), + { u"DocumentViewMode"_ustr, -1, cppu::UnoType<sal_Int16>::get(), ATTR_DEFAULT }, + { u"FTPAccount"_ustr, -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, + { u"Flags"_ustr, -1, cppu::UnoType<sal_Int32>::get(), ATTR_DEFAULT }, + { u"FolderCount"_ustr, -1, cppu::UnoType<sal_Int32>::get(), ATTR_DEFAULT | PropertyAttribute::READONLY }, - { "FolderViewMode", -1, cppu::UnoType<sal_Int16>::get(), ATTR_DEFAULT }, - { "FreeSpace", -1, cppu::UnoType<sal_Int64>::get(), + { u"FolderViewMode"_ustr, -1, cppu::UnoType<sal_Int16>::get(), ATTR_DEFAULT }, + { u"FreeSpace"_ustr, -1, cppu::UnoType<sal_Int64>::get(), ATTR_DEFAULT | PropertyAttribute::READONLY }, - { "HasDocuments", -1, cppu::UnoType<bool>::get(), + { u"HasDocuments"_ustr, -1, cppu::UnoType<bool>::get(), ATTR_DEFAULT | PropertyAttribute::READONLY }, - { "HasFolders", -1, cppu::UnoType<bool>::get(), + { u"HasFolders"_ustr, -1, cppu::UnoType<bool>::get(), ATTR_DEFAULT | PropertyAttribute::READONLY }, - { "IsAutoDelete", -1, cppu::UnoType<bool>::get(), ATTR_DEFAULT }, - { "IsAutoUpdate", -1, cppu::UnoType<bool>::get(), ATTR_DEFAULT }, - { "IsDocument", -1, cppu::UnoType<bool>::get(), + { u"IsAutoDelete"_ustr, -1, cppu::UnoType<bool>::get(), ATTR_DEFAULT }, + { u"IsAutoUpdate"_ustr, -1, cppu::UnoType<bool>::get(), ATTR_DEFAULT }, + { u"IsDocument"_ustr, -1, cppu::UnoType<bool>::get(), ATTR_DEFAULT | PropertyAttribute::READONLY }, - { "IsFolder", -1, cppu::UnoType<bool>::get(), + { u"IsFolder"_ustr, -1, cppu::UnoType<bool>::get(), ATTR_DEFAULT | PropertyAttribute::READONLY }, - { "IsKeepExpired", -1, cppu::UnoType<bool>::get(), ATTR_DEFAULT }, - { "IsLimitedContentCount", -1, cppu::UnoType<bool>::get(), ATTR_DEFAULT }, - { "IsMarked", -1, cppu::UnoType<bool>::get(), ATTR_DEFAULT }, - { "IsRead", -1, cppu::UnoType<bool>::get(), ATTR_DEFAULT }, - { "IsReadOnly", -1, cppu::UnoType<bool>::get(), ATTR_DEFAULT }, - { "IsSubscribed", -1, cppu::UnoType<bool>::get(), ATTR_DEFAULT }, - { "IsTimeLimitedStore", -1, cppu::UnoType<bool>::get(), ATTR_DEFAULT }, - { "Keywords", -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, - { "LocalBase", -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, - { "MessageBCC", -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, - { "MessageBody", -1, cppu::UnoType<css::ucb::XDataContainer>::get(), + { u"IsKeepExpired"_ustr, -1, cppu::UnoType<bool>::get(), ATTR_DEFAULT }, + { u"IsLimitedContentCount"_ustr, -1, cppu::UnoType<bool>::get(), ATTR_DEFAULT }, + { u"IsMarked"_ustr, -1, cppu::UnoType<bool>::get(), ATTR_DEFAULT }, + { u"IsRead"_ustr, -1, cppu::UnoType<bool>::get(), ATTR_DEFAULT }, + { u"IsReadOnly"_ustr, -1, cppu::UnoType<bool>::get(), ATTR_DEFAULT }, + { u"IsSubscribed"_ustr, -1, cppu::UnoType<bool>::get(), ATTR_DEFAULT }, + { u"IsTimeLimitedStore"_ustr, -1, cppu::UnoType<bool>::get(), ATTR_DEFAULT }, + { u"Keywords"_ustr, -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, + { u"LocalBase"_ustr, -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, + { u"MessageBCC"_ustr, -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, + { u"MessageBody"_ustr, -1, cppu::UnoType<css::ucb::XDataContainer>::get(), ATTR_DEFAULT }, - { "MessageCC", -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, - { "MessageFrom", -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, - { "MessageId", -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, - { "MessageInReplyTo", -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, - { "MessageReplyTo", -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, - { "MessageTo", -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, - { "NewsGroups", -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, - { "NoCacheList", -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, - { "Origin", -1, cppu::UnoType<OUString>::get(), + { u"MessageCC"_ustr, -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, + { u"MessageFrom"_ustr, -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, + { u"MessageId"_ustr, -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, + { u"MessageInReplyTo"_ustr, -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, + { u"MessageReplyTo"_ustr, -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, + { u"MessageTo"_ustr, -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, + { u"NewsGroups"_ustr, -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, + { u"NoCacheList"_ustr, -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, + { u"Origin"_ustr, -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT | PropertyAttribute::READONLY }, - { "OutgoingMessageRecipients", -1, + { u"OutgoingMessageRecipients"_ustr, -1, cppu::UnoType<css::uno::Sequence<css::ucb::RecipientInfo>>::get(), ATTR_DEFAULT }, - { "OutgoingMessageState", -1, + { u"OutgoingMessageState"_ustr, -1, cppu::UnoType<css::ucb::OutgoingMessageState>::get(), ATTR_DEFAULT | PropertyAttribute::READONLY }, - { "OutgoingMessageViewMode", -1, cppu::UnoType<sal_Int16>::get(), + { u"OutgoingMessageViewMode"_ustr, -1, cppu::UnoType<sal_Int16>::get(), ATTR_DEFAULT }, - { "Password", -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, - { "Priority", -1, cppu::UnoType<css::ucb::Priority>::get(), ATTR_DEFAULT }, - { "References", -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, - { "Referer", -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, - { "Rules", -1, cppu::UnoType<css::ucb::RuleSet>::get(), ATTR_DEFAULT }, - { "SearchCriteria", -1, cppu::UnoType<css::ucb::RuleSet>::get(), + { u"Password"_ustr, -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, + { u"Priority"_ustr, -1, cppu::UnoType<css::ucb::Priority>::get(), ATTR_DEFAULT }, + { u"References"_ustr, -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, + { u"Referer"_ustr, -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, + { u"Rules"_ustr, -1, cppu::UnoType<css::ucb::RuleSet>::get(), ATTR_DEFAULT }, + { u"SearchCriteria"_ustr, -1, cppu::UnoType<css::ucb::RuleSet>::get(), ATTR_DEFAULT }, - { "SearchIndirections", -1, cppu::UnoType<bool>::get(), ATTR_DEFAULT }, - { "SearchLocations", -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, - { "SearchRecursive", -1, cppu::UnoType<bool>::get(), ATTR_DEFAULT }, - { "SeenCount", -1, cppu::UnoType<sal_Int32>::get(), + { u"SearchIndirections"_ustr, -1, cppu::UnoType<bool>::get(), ATTR_DEFAULT }, + { u"SearchLocations"_ustr, -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, + { u"SearchRecursive"_ustr, -1, cppu::UnoType<bool>::get(), ATTR_DEFAULT }, + { u"SeenCount"_ustr, -1, cppu::UnoType<sal_Int32>::get(), ATTR_DEFAULT | PropertyAttribute::READONLY }, - { "SendCopyTarget", -1, + { u"SendCopyTarget"_ustr, -1, cppu::UnoType<css::uno::Sequence<css::ucb::SendInfo>>::get(), ATTR_DEFAULT }, - { "SendFormats", -1, + { u"SendFormats"_ustr, -1, cppu::UnoType<css::uno::Sequence<css::ucb::SendMediaTypes>>::get(), ATTR_DEFAULT }, - { "SendFroms", -1, + { u"SendFroms"_ustr, -1, cppu::UnoType<css::uno::Sequence<css::ucb::SendInfo>>::get(), ATTR_DEFAULT }, - { "SendPasswords", -1, + { u"SendPasswords"_ustr, -1, cppu::UnoType<css::uno::Sequence<css::ucb::SendInfo>>::get(), ATTR_DEFAULT }, - { "SendProtocolPrivate", -1, cppu::UnoType<sal_Int16>::get(), + { u"SendProtocolPrivate"_ustr, -1, cppu::UnoType<sal_Int16>::get(), ATTR_DEFAULT }, - { "SendProtocolPublic", -1, cppu::UnoType<sal_Int16>::get(), ATTR_DEFAULT }, - { "SendReplyTos", -1, + { u"SendProtocolPublic"_ustr, -1, cppu::UnoType<sal_Int16>::get(), ATTR_DEFAULT }, + { u"SendReplyTos"_ustr, -1, cppu::UnoType<css::uno::Sequence<css::ucb::SendInfo>>::get(), ATTR_DEFAULT }, - { "SendServerNames", -1, + { u"SendServerNames"_ustr, -1, cppu::UnoType<css::uno::Sequence<css::ucb::SendInfo>>::get(), ATTR_DEFAULT }, - { "SendUserNames", -1, + { u"SendUserNames"_ustr, -1, cppu::UnoType<css::uno::Sequence<css::ucb::SendInfo>>::get(), ATTR_DEFAULT }, - { "SendVIMPostOfficePath", -1, cppu::UnoType<OUString>::get(), + { u"SendVIMPostOfficePath"_ustr, -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, - { "ServerBase", -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, - { "ServerName", -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, - { "ServerPort", -1, cppu::UnoType<sal_Int16>::get(), ATTR_DEFAULT }, - { "Size", -1, cppu::UnoType<sal_Int64>::get(), + { u"ServerBase"_ustr, -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, + { u"ServerName"_ustr, -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, + { u"ServerPort"_ustr, -1, cppu::UnoType<sal_Int16>::get(), ATTR_DEFAULT }, + { u"Size"_ustr, -1, cppu::UnoType<sal_Int64>::get(), ATTR_DEFAULT | PropertyAttribute::READONLY }, - { "SizeLimit", -1, cppu::UnoType<sal_Int64>::get(), ATTR_DEFAULT }, - { "SubscribedCount", -1, cppu::UnoType<sal_Int32>::get(), + { u"SizeLimit"_ustr, -1, cppu::UnoType<sal_Int64>::get(), ATTR_DEFAULT }, + { u"SubscribedCount"_ustr, -1, cppu::UnoType<sal_Int32>::get(), ATTR_DEFAULT | PropertyAttribute::READONLY }, - { "SynchronizePolicy", -1, + { u"SynchronizePolicy"_ustr, -1, cppu::UnoType<css::ucb::SynchronizePolicy>::get(), ATTR_DEFAULT }, - { "TargetFrames", -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, - { "TargetURL", -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, - { "TimeLimitStore", -1, cppu::UnoType<sal_Int16>::get(), ATTR_DEFAULT }, - { "Title", -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, - { "UpdateOnOpen", -1, cppu::UnoType<bool>::get(), ATTR_DEFAULT }, - { "UseOutBoxPrivateProtocolSettings", -1, cppu::UnoType<bool>::get(), + { u"TargetFrames"_ustr, -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, + { u"TargetURL"_ustr, -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, + { u"TimeLimitStore"_ustr, -1, cppu::UnoType<sal_Int16>::get(), ATTR_DEFAULT }, + { u"Title"_ustr, -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, + { u"UpdateOnOpen"_ustr, -1, cppu::UnoType<bool>::get(), ATTR_DEFAULT }, + { u"UseOutBoxPrivateProtocolSettings"_ustr, -1, cppu::UnoType<bool>::get(), ATTR_DEFAULT }, - { "UseOutBoxPublicProtocolSettings", -1, cppu::UnoType<bool>::get(), + { u"UseOutBoxPublicProtocolSettings"_ustr, -1, cppu::UnoType<bool>::get(), ATTR_DEFAULT }, - { "UserName", -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, - { "UserSortCriterium", -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, - { "VIMPostOfficePath", -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, - { "VerificationMode", -1, cppu::UnoType<css::ucb::VerificationMode>::get(), + { u"UserName"_ustr, -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, + { u"UserSortCriterium"_ustr, -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, + { u"VIMPostOfficePath"_ustr, -1, cppu::UnoType<OUString>::get(), ATTR_DEFAULT }, + { u"VerificationMode"_ustr, -1, cppu::UnoType<css::ucb::VerificationMode>::get(), ATTR_DEFAULT }}) { } @@ -197,7 +197,7 @@ UcbPropertiesManager::~UcbPropertiesManager() OUString SAL_CALL UcbPropertiesManager::getImplementationName() { - return "com.sun.star.comp.ucb.UcbPropertiesManager"; + return u"com.sun.star.comp.ucb.UcbPropertiesManager"_ustr; } sal_Bool SAL_CALL UcbPropertiesManager::supportsService( const OUString& ServiceName ) { @@ -205,7 +205,7 @@ sal_Bool SAL_CALL UcbPropertiesManager::supportsService( const OUString& Service } css::uno::Sequence< OUString > SAL_CALL UcbPropertiesManager::getSupportedServiceNames() { - return { "com.sun.star.ucb.PropertiesManager" }; + return { u"com.sun.star.ucb.PropertiesManager"_ustr }; } diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx index c57af43642da..7190906b8147 100644 --- a/ucb/source/core/ucbstore.cxx +++ b/ucb/source/core/ucbstore.cxx @@ -139,7 +139,7 @@ UcbStore::~UcbStore() OUString SAL_CALL UcbStore::getImplementationName() { - return "com.sun.star.comp.ucb.UcbStore"; + return u"com.sun.star.comp.ucb.UcbStore"_ustr; } sal_Bool SAL_CALL UcbStore::supportsService( const OUString& ServiceName ) { @@ -147,7 +147,7 @@ sal_Bool SAL_CALL UcbStore::supportsService( const OUString& ServiceName ) } css::uno::Sequence< OUString > SAL_CALL UcbStore::getSupportedServiceNames() { - return { "com.sun.star.ucb.Store" }; + return { u"com.sun.star.ucb.Store"_ustr }; } // Service factory implementation. @@ -218,7 +218,7 @@ PropertySetRegistry::~PropertySetRegistry() OUString SAL_CALL PropertySetRegistry::getImplementationName() { - return "com.sun.star.comp.ucb.PropertySetRegistry"; + return u"com.sun.star.comp.ucb.PropertySetRegistry"_ustr; } sal_Bool SAL_CALL PropertySetRegistry::supportsService( const OUString& ServiceName ) @@ -228,7 +228,7 @@ sal_Bool SAL_CALL PropertySetRegistry::supportsService( const OUString& ServiceN css::uno::Sequence< OUString > SAL_CALL PropertySetRegistry::getSupportedServiceNames() { - return { "com.sun.star.ucb.PropertySetRegistry" }; + return { u"com.sun.star.ucb.PropertySetRegistry"_ustr }; } @@ -704,28 +704,28 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey, Any aAny = xRootHierNameAccess->getByHierarchicalName( aNewKey1 ); - xNewPropNameReplace->replaceByName( "Handle", aAny ); + xNewPropNameReplace->replaceByName( u"Handle"_ustr, aAny ); // ... value aNewKey1 = aKey + "/Value"; aAny = xRootHierNameAccess->getByHierarchicalName( aNewKey1 ); - xNewPropNameReplace->replaceByName( "Value", aAny ); + xNewPropNameReplace->replaceByName( u"Value"_ustr, aAny ); // ... state aNewKey1 = aKey + "/State"; aAny = xRootHierNameAccess->getByHierarchicalName( aNewKey1 ); - xNewPropNameReplace->replaceByName( "State", aAny ); + xNewPropNameReplace->replaceByName( u"State"_ustr, aAny ); // ... attributes aNewKey1 = aKey + "/Attributes"; aAny = xRootHierNameAccess->getByHierarchicalName( aNewKey1 ); - xNewPropNameReplace->replaceByName( "Attributes", aAny ); + xNewPropNameReplace->replaceByName( u"Attributes"_ustr, aAny ); // Insert new item. xNewContainer->insertByName( @@ -885,7 +885,7 @@ Reference< XInterface > PropertySetRegistry::getRootConfigReadAccessImpl(std::un m_xRootReadAccess = m_xConfigProvider->createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationAccess", + u"com.sun.star.configuration.ConfigurationAccess"_ustr, aArguments ); if ( m_xRootReadAccess.is() ) @@ -946,7 +946,7 @@ Reference< XInterface > PropertySetRegistry::getConfigWriteAccessImpl(std::uniqu m_xRootWriteAccess = m_xConfigProvider->createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationUpdateAccess", + u"com.sun.star.configuration.ConfigurationUpdateAccess"_ustr, aArguments ); OSL_ENSURE( m_xRootWriteAccess.is(), @@ -1025,7 +1025,7 @@ PersistentPropertySet::~PersistentPropertySet() OUString SAL_CALL PersistentPropertySet::getImplementationName() { - return "com.sun.star.comp.ucb.PersistentPropertySet"; + return u"com.sun.star.comp.ucb.PersistentPropertySet"_ustr; } sal_Bool SAL_CALL PersistentPropertySet::supportsService( const OUString& ServiceName ) @@ -1035,7 +1035,7 @@ sal_Bool SAL_CALL PersistentPropertySet::supportsService( const OUString& Servic css::uno::Sequence< OUString > SAL_CALL PersistentPropertySet::getSupportedServiceNames() { - return { "com.sun.star.ucb.PersistentPropertySet" }; + return { u"com.sun.star.ucb.PersistentPropertySet"_ustr }; } @@ -1145,11 +1145,11 @@ void SAL_CALL PersistentPropertySet::setPropertyValue( const OUString& aProperty } // Write value - xNameReplace->replaceByName( "Value", aValue ); + xNameReplace->replaceByName( u"Value"_ustr, aValue ); // Write state ( Now it is a directly set value ) xNameReplace->replaceByName( - "State", + u"State"_ustr, Any( sal_Int32( PropertyState_DIRECT_VALUE ) ) ); @@ -1382,24 +1382,24 @@ void SAL_CALL PersistentPropertySet::addProperty( // Set handle xNameReplace->replaceByName( - "Handle", + u"Handle"_ustr, Any( sal_Int32( -1 ) ) ); // Set default value xNameReplace->replaceByName( - "Value", + u"Value"_ustr, DefaultValue ); // Set state ( always "default" ) xNameReplace->replaceByName( - "State", + u"State"_ustr, Any( sal_Int32( PropertyState_DEFAULT_VALUE ) ) ); // Set attributes xNameReplace->replaceByName( - "Attributes", + u"Attributes"_ustr, Any( sal_Int32( Attributes ) ) ); // Insert new item. @@ -1800,7 +1800,7 @@ void SAL_CALL PersistentPropertySet::setPropertyValues( { // Write handle xNameReplace->replaceByName( - "Handle", + u"Handle"_ustr, Any( rNewValue.Handle ) ); // Save old value @@ -1810,12 +1810,12 @@ void SAL_CALL PersistentPropertySet::setPropertyValues( aValueName ); // Write value xNameReplace->replaceByName( - "Value", + u"Value"_ustr, rNewValue.Value ); // Write state ( Now it is a directly set value ) xNameReplace->replaceByName( - "State", + u"State"_ustr, Any( sal_Int32( PropertyState_DIRECT_VALUE ) ) ); diff --git a/ucb/source/sorter/sortdynres.cxx b/ucb/source/sorter/sortdynres.cxx index a3bf493a2ba0..b4eefd920cf3 100644 --- a/ucb/source/sorter/sortdynres.cxx +++ b/ucb/source/sorter/sortdynres.cxx @@ -76,7 +76,7 @@ SortedDynamicResultSet::~SortedDynamicResultSet() OUString SAL_CALL SortedDynamicResultSet::getImplementationName() { - return "com.sun.star.comp.ucb.SortedDynamicResultSet"; + return u"com.sun.star.comp.ucb.SortedDynamicResultSet"_ustr; } sal_Bool SAL_CALL SortedDynamicResultSet::supportsService( const OUString& ServiceName ) @@ -86,7 +86,7 @@ sal_Bool SAL_CALL SortedDynamicResultSet::supportsService( const OUString& Servi css::uno::Sequence< OUString > SAL_CALL SortedDynamicResultSet::getSupportedServiceNames() { - return { "com.sun.star.ucb.SortedDynamicResultSet" }; + return { u"com.sun.star.ucb.SortedDynamicResultSet"_ustr }; } // XComponent methods. @@ -263,7 +263,7 @@ void SortedDynamicResultSet::impl_notify( const ListEvent& Changes ) Any aRet; try { - aRet = pCurSet->getPropertyValue("IsRowCountFinal"); + aRet = pCurSet->getPropertyValue(u"IsRowCountFinal"_ustr); } catch (const UnknownPropertyException&) {} catch (const WrappedTargetException&) {} @@ -406,7 +406,7 @@ SortedDynamicResultSetFactory::~SortedDynamicResultSetFactory() OUString SAL_CALL SortedDynamicResultSetFactory::getImplementationName() { - return "com.sun.star.comp.ucb.SortedDynamicResultSetFactory"; + return u"com.sun.star.comp.ucb.SortedDynamicResultSetFactory"_ustr; } sal_Bool SAL_CALL SortedDynamicResultSetFactory::supportsService( const OUString& ServiceName ) @@ -416,7 +416,7 @@ sal_Bool SAL_CALL SortedDynamicResultSetFactory::supportsService( const OUString css::uno::Sequence< OUString > SAL_CALL SortedDynamicResultSetFactory::getSupportedServiceNames() { - return { "com.sun.star.ucb.SortedDynamicResultSetFactory" }; + return { u"com.sun.star.ucb.SortedDynamicResultSetFactory"_ustr }; } diff --git a/ucb/source/sorter/sortresult.cxx b/ucb/source/sorter/sortresult.cxx index 38b3c7583ed0..70052f440a49 100644 --- a/ucb/source/sorter/sortresult.cxx +++ b/ucb/source/sorter/sortresult.cxx @@ -119,7 +119,7 @@ SortedResultSet::~SortedResultSet() OUString SAL_CALL SortedResultSet::getImplementationName() { - return "com.sun.star.comp.ucb.SortedResultSet"; + return u"com.sun.star.comp.ucb.SortedResultSet"_ustr; } sal_Bool SAL_CALL SortedResultSet::supportsService( const OUString& ServiceName ) @@ -763,7 +763,7 @@ Any SAL_CALL SortedResultSet::getPropertyValue( const OUString& PropertyName ) if ( bOrgFinal ) { aOrgRet = Reference< XPropertySet >::query(mxOriginal)-> - getPropertyValue("RowCount"); + getPropertyValue(u"RowCount"_ustr); sal_uInt32 nOrgCount = 0; aOrgRet >>= nOrgCount; if ( nOrgCount == maS2O.Count() ) @@ -1266,7 +1266,7 @@ void SortedResultSet::CheckProperties( sal_Int32 nOldCount, bool bWasFinal ) PropertyChanged( aEvt ); - OUString aName = "IsRowCountFinal"; + OUString aName = u"IsRowCountFinal"_ustr; Any aRet = getPropertyValue( aName ); if ( (aRet >>= bIsFinal) && bIsFinal != bWasFinal ) { diff --git a/ucb/source/ucp/cmis/auth_provider.cxx b/ucb/source/ucp/cmis/auth_provider.cxx index 2e81cfb23b5e..b2f1b199fb77 100644 --- a/ucb/source/ucp/cmis/auth_provider.cxx +++ b/ucb/source/ucp/cmis/auth_provider.cxx @@ -180,10 +180,10 @@ namespace cmis { rtl::Reference< ucbhelper::AuthenticationFallbackRequest > xRequest = new ucbhelper::AuthenticationFallbackRequest ( - "Open the following link in your browser and " + u"Open the following link in your browser and " "paste the code from the URL you have been redirected to in the " "box below. For example: " - "http://localhost/LibreOffice?code=YOUR_CODE", + "http://localhost/LibreOffice?code=YOUR_CODE"_ustr, url_oustr ); xIH->handle( xRequest ); diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx index d04816173e40..e4681e29ab04 100644 --- a/ucb/source/ucp/cmis/cmis_content.cxx +++ b/ucb/source/ucp/cmis/cmis_content.cxx @@ -241,17 +241,17 @@ namespace uno::Sequence< uno::Any > generateErrorArguments( const cmis::URL & rURL ) { uno::Sequence< uno::Any > aArguments{ uno::Any(beans::PropertyValue( - "Binding URL", + u"Binding URL"_ustr, - 1, uno::Any( rURL.getBindingUrl() ), beans::PropertyState_DIRECT_VALUE )), uno::Any(beans::PropertyValue( - "Username", + u"Username"_ustr, -1, uno::Any( rURL.getUsername() ), beans::PropertyState_DIRECT_VALUE )), uno::Any(beans::PropertyValue( - "Repository Id", + u"Repository Id"_ustr, -1, uno::Any( rURL.getRepositoryId() ), beans::PropertyState_DIRECT_VALUE )) }; @@ -410,7 +410,7 @@ namespace cmis ucb::IOErrorCode_INVALID_DEVICE, generateErrorArguments(m_aURL), xEnv, - "error accessing a repository"); + u"error accessing a repository"_ustr); } else { @@ -599,7 +599,7 @@ namespace cmis uno::Any Content::getBadArgExcept() { return uno::Any( lang::IllegalArgumentException( - "Wrong argument type!", + u"Wrong argument type!"_ustr, getXWeak(), -1) ); } @@ -826,7 +826,7 @@ namespace cmis } else if ( rProp.Name == "TargetURL" ) { - xRow->appendString( rProp, "" ); + xRow->appendString( rProp, u""_ustr ); } else if ( rProp.Name == "BaseURI" ) { @@ -1057,7 +1057,7 @@ namespace cmis ucb::IOErrorCode_GENERAL, uno::Sequence< uno::Any >( 0 ), xEnv, - "Checkin only supported by documents" ); + u"Checkin only supported by documents"_ustr ); } boost::shared_ptr< std::ostream > pOut( new std::ostringstream ( std::ios_base::binary | std::ios_base::in | std::ios_base::out ) ); @@ -1111,7 +1111,7 @@ namespace cmis ucb::IOErrorCode_GENERAL, uno::Sequence< uno::Any >( 0 ), xEnv, - "Checkout only supported by documents" ); + u"Checkout only supported by documents"_ustr ); } libcmis::DocumentPtr pPwc = pDoc->checkOut( ); @@ -1156,7 +1156,7 @@ namespace cmis ucb::IOErrorCode_GENERAL, uno::Sequence< uno::Any >( 0 ), xEnv, - "CancelCheckout only supported by documents" ); + u"CancelCheckout only supported by documents"_ustr ); } pPwc->cancelCheckout( ); @@ -1219,7 +1219,7 @@ namespace cmis ucb::IOErrorCode_GENERAL, uno::Sequence< uno::Any >( 0 ), xEnv, - "Can not get the document" ); + u"Can not get the document"_ustr ); } std::vector< libcmis::DocumentPtr > aCmisVersions = pDoc->getAllVersions( ); uno::Sequence< document::CmisVersion > aVersions( aCmisVersions.size( ) ); @@ -1261,7 +1261,7 @@ namespace cmis ucbhelper::cancelCommandExecution( uno::Any( ucb::InteractiveBadTransferURLException( - "Unsupported URL scheme!", + u"Unsupported URL scheme!"_ustr, getXWeak() ) ), xEnv ); } @@ -1306,7 +1306,7 @@ namespace cmis if ( it == m_pObjectProps.end( ) ) { ucbhelper::cancelCommandExecution( uno::Any - ( uno::RuntimeException( "Missing name property", + ( uno::RuntimeException( u"Missing name property"_ustr, getXWeak() ) ), xEnv ); } @@ -1334,7 +1334,7 @@ namespace cmis if ( object->getBaseType( ) != m_pObjectType->getBaseType( )->getId() ) { ucbhelper::cancelCommandExecution( uno::Any - ( uno::RuntimeException( "Can't change a folder into a document and vice-versa.", + ( uno::RuntimeException( u"Can't change a folder into a document and vice-versa."_ustr, getXWeak() ) ), xEnv ); } @@ -1353,7 +1353,7 @@ namespace cmis catch ( const libcmis::Exception& ) { ucbhelper::cancelCommandExecution( uno::Any - ( uno::RuntimeException( "Error when setting document content", + ( uno::RuntimeException( u"Error when setting document content"_ustr, getXWeak() ) ), xEnv ); } @@ -1375,7 +1375,7 @@ namespace cmis catch ( const libcmis::Exception& ) { ucbhelper::cancelCommandExecution( uno::Any - ( uno::RuntimeException( "Error when creating folder", + ( uno::RuntimeException( u"Error when creating folder"_ustr, getXWeak() ) ), xEnv ); } @@ -1393,7 +1393,7 @@ namespace cmis catch ( const libcmis::Exception& ) { ucbhelper::cancelCommandExecution( uno::Any - ( uno::RuntimeException( "Error when creating document", + ( uno::RuntimeException( u"Error when creating document"_ustr, getXWeak() ) ), xEnv ); } @@ -1468,7 +1468,7 @@ namespace cmis rValue.Name == "Size" || rValue.Name == "CreatableContentsInfo" ) { - lang::IllegalAccessException e ( "Property is read-only!", + lang::IllegalAccessException e ( u"Property is read-only!"_ustr, getXWeak() ); aRetRange[ n ] <<= e; } @@ -1478,7 +1478,7 @@ namespace cmis if (!( rValue.Value >>= aNewTitle )) { aRetRange[ n ] <<= beans::IllegalTypeException - ( "Property value has wrong type!", + ( u"Property value has wrong type!"_ustr, getXWeak() ); continue; } @@ -1486,7 +1486,7 @@ namespace cmis if ( aNewTitle.isEmpty() ) { aRetRange[ n ] <<= lang::IllegalArgumentException - ( "Empty title not allowed!", + ( u"Empty title not allowed!"_ustr, getXWeak(), -1 ); continue; @@ -1498,7 +1498,7 @@ namespace cmis else { SAL_INFO( "ucb.ucp.cmis", "Couldn't set property: " << rValue.Name ); - lang::IllegalAccessException e ( "Property is read-only!", + lang::IllegalAccessException e ( u"Property is read-only!"_ustr, getXWeak() ); aRetRange[ n ] <<= e; } @@ -1574,52 +1574,52 @@ namespace cmis { static const beans::Property aGenericProperties[] = { - beans::Property( "IsDocument", + beans::Property( u"IsDocument"_ustr, -1, cppu::UnoType<bool>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), - beans::Property( "IsFolder", + beans::Property( u"IsFolder"_ustr, -1, cppu::UnoType<bool>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), - beans::Property( "Title", + beans::Property( u"Title"_ustr, -1, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::BOUND ), - beans::Property( "ObjectId", + beans::Property( u"ObjectId"_ustr, -1, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::BOUND ), - beans::Property( "TitleOnServer", + beans::Property( u"TitleOnServer"_ustr, -1, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::BOUND ), - beans::Property( "IsReadOnly", + beans::Property( u"IsReadOnly"_ustr, -1, cppu::UnoType<bool>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), - beans::Property( "DateCreated", + beans::Property( u"DateCreated"_ustr, -1, cppu::UnoType<util::DateTime>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), - beans::Property( "DateModified", + beans::Property( u"DateModified"_ustr, -1, cppu::UnoType<util::DateTime>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), - beans::Property( "Size", + beans::Property( u"Size"_ustr, -1, cppu::UnoType<sal_Int64>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), - beans::Property( "CreatableContentsInfo", + beans::Property( u"CreatableContentsInfo"_ustr, -1, cppu::UnoType<uno::Sequence< ucb::ContentInfo >>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), - beans::Property( "MediaType", + beans::Property( u"MediaType"_ustr, -1, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::BOUND ), - beans::Property( "CmisProperties", + beans::Property( u"CmisProperties"_ustr, -1, cppu::UnoType<uno::Sequence< document::CmisProperty>>::get(), beans::PropertyAttribute::BOUND ), - beans::Property( "IsVersionable", + beans::Property( u"IsVersionable"_ustr, -1, cppu::UnoType<bool>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), - beans::Property( "CanCheckOut", + beans::Property( u"CanCheckOut"_ustr, -1, cppu::UnoType<bool>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), - beans::Property( "CanCancelCheckOut", + beans::Property( u"CanCancelCheckOut"_ustr, -1, cppu::UnoType<bool>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), - beans::Property( "CanCheckIn", + beans::Property( u"CanCheckIn"_ustr, -1, cppu::UnoType<bool>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), }; @@ -1635,46 +1635,46 @@ namespace cmis { // Required commands ucb::CommandInfo - ( "getCommandInfo", + ( u"getCommandInfo"_ustr, -1, cppu::UnoType<void>::get() ), ucb::CommandInfo - ( "getPropertySetInfo", + ( u"getPropertySetInfo"_ustr, -1, cppu::UnoType<void>::get() ), ucb::CommandInfo - ( "getPropertyValues", + ( u"getPropertyValues"_ustr, -1, cppu::UnoType<uno::Sequence< beans::Property >>::get() ), ucb::CommandInfo - ( "setPropertyValues", + ( u"setPropertyValues"_ustr, -1, cppu::UnoType<uno::Sequence< beans::PropertyValue >>::get() ), // Optional standard commands ucb::CommandInfo - ( "delete", + ( u"delete"_ustr, -1, cppu::UnoType<bool>::get() ), ucb::CommandInfo - ( "insert", + ( u"insert"_ustr, -1, cppu::UnoType<ucb::InsertCommandArgument2>::get() ), ucb::CommandInfo - ( "open", + ( u"open"_ustr, -1, cppu::UnoType<ucb::OpenCommandArgument2>::get() ), // Mandatory CMIS-only commands - ucb::CommandInfo ( "checkout", -1, cppu::UnoType<void>::get() ), - ucb::CommandInfo ( "cancelCheckout", -1, cppu::UnoType<void>::get() ), - ucb::CommandInfo ( "checkIn", -1, + ucb::CommandInfo ( u"checkout"_ustr, -1, cppu::UnoType<void>::get() ), + ucb::CommandInfo ( u"cancelCheckout"_ustr, -1, cppu::UnoType<void>::get() ), + ucb::CommandInfo ( u"checkIn"_ustr, -1, cppu::UnoType<ucb::TransferInfo>::get() ), - ucb::CommandInfo ( "updateProperties", -1, cppu::UnoType<void>::get() ), + ucb::CommandInfo ( u"updateProperties"_ustr, -1, cppu::UnoType<void>::get() ), ucb::CommandInfo - ( "getAllVersions", + ( u"getAllVersions"_ustr, -1, cppu::UnoType<uno::Sequence< document::CmisVersion >>::get() ), // Folder Only, omitted if not a folder ucb::CommandInfo - ( "transfer", + ( u"transfer"_ustr, -e ... etc. - the rest is truncated