diff options
Diffstat (limited to 'desktop/source/pkgchk')
-rw-r--r-- | desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx | 7 | ||||
-rw-r--r-- | desktop/source/pkgchk/unopkg/unopkg_misc.cxx | 18 |
2 files changed, 14 insertions, 11 deletions
diff --git a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx index 1d4907b9a263..2180695d85b7 100644 --- a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx +++ b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx @@ -17,6 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <sal/config.h> + +#include <string_view> #include <strings.hrc> #include <dp_misc.h> @@ -64,7 +67,7 @@ class CommandEnvironmentImpl /// @throws RuntimeException void update_( Any const & Status ); - void printLicense(std::u16string_view sName,const OUString& sLicense, + void printLicense(std::u16string_view sName,std::u16string_view sLicense, bool & accept, bool & decline); public: @@ -125,7 +128,7 @@ CommandEnvironmentImpl::~CommandEnvironmentImpl() //May throw exceptions void CommandEnvironmentImpl::printLicense( - std::u16string_view sName, const OUString& sLicense, bool & accept, bool &decline) + std::u16string_view sName, std::u16string_view sLicense, bool & accept, bool &decline) { OUString s1tmp(DpResId(RID_STR_UNOPKG_ACCEPT_LIC_1)); OUString s1(s1tmp.replaceAll("$NAME", sName)); diff --git a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx index 3b16dc59855e..6861f6459cc0 100644 --- a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx +++ b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx @@ -232,10 +232,10 @@ void printf_space( sal_Int32 space ) void printf_line( - OUString const & name, OUString const & value, sal_Int32 level ) + std::u16string_view name, std::u16string_view value, sal_Int32 level ) { printf_space( level ); - dp_misc::writeConsole(OUString(name + ": " + value + "\n")); + dp_misc::writeConsole(OUString(OUString::Concat(name) + ": " + value + "\n")); } @@ -249,11 +249,11 @@ void printf_package( true, dp_misc::getIdentifier( xPackage ) ) : xPackage->getIdentifier() ); if (id.IsPresent) - printf_line( "Identifier", id.Value, level ); + printf_line( u"Identifier", id.Value, level ); OUString version(xPackage->getVersion()); if (!version.isEmpty()) - printf_line( "Version", version, level + 1 ); - printf_line( "URL", xPackage->getURL(), level + 1 ); + printf_line( u"Version", version, level + 1 ); + printf_line( u"URL", xPackage->getURL(), level + 1 ); beans::Optional< beans::Ambiguous<sal_Bool> > option( xPackage->isRegistered( Reference<task::XAbortChannel>(), xCmdEnv ) ); @@ -267,15 +267,15 @@ void printf_package( } else value = "n/a"; - printf_line( "is registered", value, level + 1 ); + printf_line( u"is registered", value, level + 1 ); const Reference<deployment::XPackageTypeInfo> xPackageType( xPackage->getPackageType() ); OSL_ASSERT( xPackageType.is() ); if (xPackageType.is()) { - printf_line( "Media-Type", xPackageType->getMediaType(), level + 1 ); + printf_line( u"Media-Type", xPackageType->getMediaType(), level + 1 ); } - printf_line( "Description", xPackage->getDescription(), level + 1 ); + printf_line( u"Description", xPackage->getDescription(), level + 1 ); if (!xPackage->isBundle()) return; @@ -298,7 +298,7 @@ static void printf_unaccepted_licenses( { OUString id( dp_misc::getIdentifier(ext) ); - printf_line( "Identifier", id, 0 ); + printf_line( u"Identifier", id, 0 ); printf_space(1); dp_misc::writeConsole(u"License not accepted\n\n"); } |