summaryrefslogtreecommitdiff
path: root/desktop/source/pkgchk/unopkg/unopkg_app.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/source/pkgchk/unopkg/unopkg_app.cxx')
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_app.cxx80
1 files changed, 40 insertions, 40 deletions
diff --git a/desktop/source/pkgchk/unopkg/unopkg_app.cxx b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
index 743790f73cfd..de8c13bcf7c3 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_app.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
@@ -1,8 +1,8 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
- *
+ *
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -81,7 +81,7 @@ struct ExtensionName
const char s_usingText [] =
"\n"
"using: " APP_NAME " add <options> extension-path...\n"
-" " APP_NAME " validate <options> extension-identifier...\n"
+" " APP_NAME " validate <options> extension-identifier...\n"
" " APP_NAME " remove <options> extension-identifier...\n"
" " APP_NAME " list <options> extension-identifier...\n"
" " APP_NAME " reinstall <options>\n"
@@ -207,7 +207,7 @@ void disposeBridges(Reference<css::uno::XComponentContext> ctx)
{
const Sequence< Reference<css::bridge::XBridge> >seqBridges = bridgeFac->getExistingBridges();
for (sal_Int32 i = 0; i < seqBridges.getLength(); i++)
- {
+ {
Reference<css::lang::XComponent> comp(seqBridges[i], UNO_QUERY);
if (comp.is())
{
@@ -240,7 +240,7 @@ extern "C" int unopkg_main()
OUString repository;
OUString cmdArg;
::std::vector<OUString> cmdPackages;
-
+
OptionInfo const * info_shared = getOptionInfo(
s_option_infos, OUSTR("shared") );
OptionInfo const * info_force = getOptionInfo(
@@ -260,10 +260,10 @@ extern "C" int unopkg_main()
OptionInfo const * info_suppressLicense = getOptionInfo(
s_option_infos, OUSTR("suppress-license") );
-
+
Reference<XComponentContext> xComponentContext;
Reference<XComponentContext> xLocalComponentContext;
-
+
try {
sal_uInt32 nPos = 0;
sal_uInt32 nCount = osl_getCommandArgCount();
@@ -278,7 +278,7 @@ extern "C" int unopkg_main()
}
//consume all bootstrap variables which may occur before the subcommannd
while(isBootstrapVariable(&nPos));
-
+
if(nPos >= nCount)
return 0;
//get the sub command
@@ -289,7 +289,7 @@ extern "C" int unopkg_main()
RTL_CONSTASCII_STRINGPARAM("add") );
subcmd_gui = subCommand.equalsAsciiL(
RTL_CONSTASCII_STRINGPARAM("gui") );
-
+
// sun-command options and packages:
while (nPos < nCount)
{
@@ -317,7 +317,7 @@ extern "C" int unopkg_main()
OUSTR("\nERROR: unexpected option ") +
cmdArg +
OUSTR("!\n") +
- OUSTR(" Use " APP_NAME " ") +
+ OUSTR(" Use " APP_NAME " ") +
toString(info_help) +
OUSTR(" to print all options.\n"));
return 1;
@@ -334,14 +334,14 @@ extern "C" int unopkg_main()
}
}
}
-
- if (repository.getLength() == 0)
+
+ if (repository.getLength() == 0)
{
if (option_shared)
repository = OUSTR("shared");
else if (option_bundled)
- repository = OUSTR("bundled");
- else
+ repository = OUSTR("bundled");
+ else
repository = OUSTR("user");
}
else
@@ -399,20 +399,20 @@ extern "C" int unopkg_main()
//return otherwise we create the registration data again
return 0;
}
-
+
}
xComponentContext = getUNO(
disposeGuard, option_verbose, option_shared, subcmd_gui,
xLocalComponentContext );
-
+
Reference<deployment::XExtensionManager> xExtensionManager(
deployment::ExtensionManager::get( xComponentContext ) );
Reference< ::com::sun::star::ucb::XCommandEnvironment > xCmdEnv(
createCmdEnv( xComponentContext, logFile,
option_force, option_verbose, option_suppressLicense) );
-
+
//synchronize bundled/shared extensions
//Do not synchronize when command is "reinstall". This could add types and services to UNO and
//prevent the deletion of the registry data folder
@@ -454,7 +454,7 @@ extern "C" int unopkg_main()
throw;
else if (p.is())
xExtensionManager->removeExtension(
- ::dp_misc::getIdentifier(p), p->getName(),
+ ::dp_misc::getIdentifier(p), p->getName(),
repository,
Reference<task::XAbortChannel>(), xCmdEnv );
}
@@ -473,20 +473,20 @@ extern "C" int unopkg_main()
::comphelper::sequenceToContainer(vecExtUnaccepted,
xExtensionManager->getExtensionsWithUnacceptedLicenses(
repository, xCmdEnv));
-
+
//This vector tells what XPackage in allExtensions has an
//unaccepted license.
std::vector<bool> vecUnaccepted;
std::vector<Reference<deployment::XPackage> > allExtensions;
if (cmdPackages.empty())
{
- Sequence< Reference<deployment::XPackage> >
+ Sequence< Reference<deployment::XPackage> >
packages = xExtensionManager->getDeployedExtensions(
repository, Reference<task::XAbortChannel>(), xCmdEnv );
::std::vector<Reference<deployment::XPackage> > vec_packages;
::comphelper::sequenceToContainer(vec_packages, packages);
-
+
//First copy the extensions with the unaccepted license
//to vector allExtensions.
allExtensions.resize(vecExtUnaccepted.size() + vec_packages.size());
@@ -504,7 +504,7 @@ extern "C" int unopkg_main()
::std::fill_n(vecUnaccepted.begin(),
vecExtUnaccepted.size(), true);
::std::fill_n(i_unaccepted, vec_packages.size(), false);
-
+
dp_misc::writeConsole(
OUSTR("All deployed ") + repository + OUSTR(" extensions:\n\n"));
}
@@ -546,15 +546,15 @@ extern "C" int unopkg_main()
allExtensions.push_back(extension);
vecUnaccepted.push_back(bUnacceptedLic);
}
-
+
else
throw lang::IllegalArgumentException(
OUSTR("There is no such extension deployed: ") +
cmdPackages[pos],0,-1);
}
-
+
}
-
+
printf_packages(allExtensions, vecUnaccepted, xCmdEnv );
}
else if (subCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("validate") ))
@@ -599,7 +599,7 @@ extern "C" int unopkg_main()
{
Reference<ui::dialogs::XAsynchronousExecutableDialog> xDialog(
deployment::ui::PackageManagerDialog::createAndInstall(
- xComponentContext,
+ xComponentContext,
cmdPackages.size() > 0 ? cmdPackages[0] : OUString() ));
osl::Condition dialogEnded;
@@ -618,36 +618,36 @@ extern "C" int unopkg_main()
//This is just here so we do not get an error, because of an unknown
//sub-command. We do synching before
//the sub-commands are processed.
-
+
}
else
{
dp_misc::writeConsoleError(
- OUSTR("\nERROR: unknown sub-command ") +
+ OUSTR("\nERROR: unknown sub-command ") +
subCommand +
- OUSTR("!\n") +
- OUSTR(" Use " APP_NAME " ") +
+ OUSTR("!\n") +
+ OUSTR(" Use " APP_NAME " ") +
toString(info_help) +
OUSTR(" to print all options.\n"));
return 1;
}
-
+
if (option_verbose)
dp_misc::writeConsole(OUSTR("\n"APP_NAME" done.\n"));
//Force to release all bridges which connect us to the child processes
disposeBridges(xLocalComponentContext);
return 0;
}
- catch (ucb::CommandFailedException &e)
+ catch (ucb::CommandFailedException &e)
{
dp_misc::writeConsoleError(e.Message + OUSTR("\n"));
- bNoOtherErrorMsg = true;
+ bNoOtherErrorMsg = true;
}
- catch (ucb::CommandAbortedException &)
+ catch (ucb::CommandAbortedException &)
{
dp_misc::writeConsoleError("\n"APP_NAME" aborted!\n");
}
- catch (deployment::DeploymentException & exc)
+ catch (deployment::DeploymentException & exc)
{
OUString cause;
if (option_verbose)
@@ -658,7 +658,7 @@ extern "C" int unopkg_main()
{
css::uno::Exception e;
if (exc.Cause >>= e)
- cause = e.Message;
+ cause = e.Message;
}
dp_misc::writeConsoleError(
@@ -667,7 +667,7 @@ extern "C" int unopkg_main()
dp_misc::writeConsoleError(
OUSTR(" Cause: ") + cause + OUSTR("\n"));
}
- catch (LockFileException & e)
+ catch (LockFileException & e)
{
if (!subcmd_gui)
dp_misc::writeConsoleError(e.Message);
@@ -675,10 +675,10 @@ extern "C" int unopkg_main()
}
catch (::com::sun::star::uno::Exception & e ) {
Any exc( ::cppu::getCaughtException() );
-
+
dp_misc::writeConsoleError(
- OUSTR("\nERROR: ") +
- OUString(option_verbose ? e.Message + OUSTR("\nException details: \n") +
+ OUSTR("\nERROR: ") +
+ OUString(option_verbose ? e.Message + OUSTR("\nException details: \n") +
::comphelper::anyToString(exc) : e.Message) +
OUSTR("\n"));
}