summaryrefslogtreecommitdiff
path: root/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx')
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx21
1 files changed, 16 insertions, 5 deletions
diff --git a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
index 09e28ba9a2cd..09ad55cac8e4 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
@@ -86,6 +86,7 @@ class CommandEnvironmentImpl
sal_Int32 m_logLevel;
bool m_option_force_overwrite;
bool m_option_verbose;
+ bool m_option_suppress_license;
Reference< XComponentContext > m_xComponentContext;
Reference< XProgressHandler > m_xLogFile;
@@ -99,7 +100,8 @@ public:
Reference<XComponentContext> const & xComponentContext,
OUString const & log_file,
bool option_force_overwrite,
- bool option_verbose);
+ bool option_verbose,
+ bool option_suppress_license);
// XCommandEnvironment
virtual Reference< task::XInteractionHandler > SAL_CALL
@@ -124,10 +126,12 @@ CommandEnvironmentImpl::CommandEnvironmentImpl(
Reference<XComponentContext> const & xComponentContext,
OUString const & log_file,
bool option_force_overwrite,
- bool option_verbose)
+ bool option_verbose,
+ bool option_suppressLicense)
: m_logLevel(0),
m_option_force_overwrite( option_force_overwrite ),
m_option_verbose( option_verbose ),
+ m_option_suppress_license( option_suppressLicense ),
m_xComponentContext(xComponentContext)
{
if (log_file.getLength() > 0) {
@@ -280,7 +284,13 @@ void CommandEnvironmentImpl::handle(
}
else if (request >>= licExc)
{
- printLicense(licExc.ExtensionName, licExc.Text, approve, abort);
+ if ( !m_option_suppress_license )
+ printLicense(licExc.ExtensionName, licExc.Text, approve, abort);
+ else
+ {
+ approve = true;
+ abort = false;
+ }
}
else if (request >>= instExc)
{
@@ -425,10 +435,11 @@ Reference< XCommandEnvironment > createCmdEnv(
Reference< XComponentContext > const & xContext,
OUString const & logFile,
bool option_force_overwrite,
- bool option_verbose)
+ bool option_verbose,
+ bool option_suppress_license)
{
return new CommandEnvironmentImpl(
- xContext, logFile, option_force_overwrite, option_verbose);
+ xContext, logFile, option_force_overwrite, option_verbose, option_suppress_license);
}
} // unopkg