Kaydet (Commit) 392eeb61 authored tarafından Jürgen Schmidt's avatar Jürgen Schmidt

#120683# add new cmd line arg -conversionmode to enavle further optimization

Patch By: jsc
Review By: hdu

-This line, and those below, will be ignored--

M    main/desktop/source/app/cmdlinehelp.cxx
M    main/desktop/source/app/cmdlineargs.cxx
M    main/desktop/source/app/cmdlineargs.hxx
M    main/desktop/source/app/appinit.cxx
M    main/vcl/source/app/svapp.cxx
M    main/vcl/inc/vcl/svapp.hxx
M    main/vcl/inc/svdata.hxx
üst bbadc49c
......@@ -263,6 +263,10 @@ void Desktop::RegisterServices( Reference< XMultiServiceFactory >& xSMgr )
if ( bHeadlessMode )
Application::EnableHeadlessMode();
// ConversionMode
if ( pCmdLine->IsConversionMode() )
Application::EnableConversionMode();
if ( conDcp.getLength() > 0 )
{
// accept incoming connections (scripting and one rvp)
......
......@@ -416,6 +416,14 @@ sal_Bool CommandLineArgs::InterpretCommandLineParameter( const ::rtl::OUString&
SetBoolParam_Impl( CMD_BOOLPARAM_INVISIBLE, sal_True );
return sal_True;
}
else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-conversionmode" )) == sal_True )
{
// ConversionMode means also headless and invisibile, so set these parameters to true!
SetBoolParam_Impl( CMD_BOOLPARAM_HEADLESS, sal_True );
SetBoolParam_Impl( CMD_BOOLPARAM_INVISIBLE, sal_True );
SetBoolParam_Impl( CMD_BOOLPARAM_CONVERSIONMODE, sal_True );
return sal_True;
}
else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-quickstart" )) == sal_True )
{
#if defined(ENABLE_QUICKSTART_APPLET)
......@@ -690,6 +698,12 @@ sal_Bool CommandLineArgs::IsHeadless() const
return m_aBoolParams[ CMD_BOOLPARAM_HEADLESS ];
}
sal_Bool CommandLineArgs::IsConversionMode() const
{
osl::MutexGuard aMutexGuard( m_aMutex );
return m_aBoolParams[ CMD_BOOLPARAM_CONVERSIONMODE ];
}
sal_Bool CommandLineArgs::IsQuickstart() const
{
osl::MutexGuard aMutexGuard( m_aMutex );
......
......@@ -43,6 +43,7 @@ class CommandLineArgs
CMD_BOOLPARAM_PLUGIN,
CMD_BOOLPARAM_SERVER,
CMD_BOOLPARAM_HEADLESS,
CMD_BOOLPARAM_CONVERSIONMODE,
CMD_BOOLPARAM_QUICKSTART,
CMD_BOOLPARAM_NOQUICKSTART,
CMD_BOOLPARAM_TERMINATEAFTERINIT,
......@@ -129,6 +130,7 @@ class CommandLineArgs
sal_Bool IsBean() const;
sal_Bool IsServer() const;
sal_Bool IsHeadless() const;
sal_Bool IsConversionMode() const;
sal_Bool IsQuickstart() const;
sal_Bool IsNoQuickstart() const;
sal_Bool IsTerminateAfterInit() const;
......
......@@ -64,6 +64,7 @@ namespace desktop
"-nolockcheck \n"\
"-nodefault \n"\
"-headless \n"\
"-conversionmode \n"\
"-help/-h/-? \n"\
"-writer \n"\
"-calc \n"\
......@@ -84,6 +85,7 @@ namespace desktop
"don't check for remote instances using the installation\n"\
"don't start with an empty document\n"\
"like invisible but no userinteraction at all.\n"\
"enable further optimization for document conversion, includes enabled headless mode.\n"\
"show this message and exit.\n"\
"create new text document.\n"\
"create new spreadsheet document.\n"\
......
......@@ -173,6 +173,8 @@ struct ImplSVAppData
long mnDefaultLayoutBorder; // default value in pixel for layout distances used
// in window arrangers
bool mbConversionMode; // true allows further optimizations during document conversion in different code areas.
/** Controls whether showing any IME status window is toggled on or off.
Only meaningful if showing IME status windows can be toggled on and off
......
......@@ -442,6 +442,10 @@ public:
static void EnableHeadlessMode( sal_Bool bEnable = sal_True );
static sal_Bool IsHeadlessModeEnabled();
static void EnableConversionMode( bool bEnableConv = true );
static bool IsConversionModeEnabled();
static void ShowNativeErrorBox(const String& sTitle ,
const String& sMessage);
......
......@@ -1974,6 +1974,19 @@ sal_Bool Application::IsHeadlessModeEnabled()
return IsDialogCancelEnabled();
}
void Application::EnableConversionMode( bool bEnableConv )
{
ImplGetSVData()->maAppData.mbConversionMode = bEnableConv;
}
// -----------------------------------------------------------------------
bool Application::IsConversionModeEnabled()
{
return ImplGetSVData()->maAppData.mbConversionMode;
}
// -----------------------------------------------------------------------
void Application::ShowNativeErrorBox(const String& sTitle ,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment