incubator-ooo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jürgen Schmidt <>
Subject Re: [DISCUSS]: I would like to propose a new conversion mode parameter
Date Wed, 12 Sep 2012 07:51:03 GMT
On 8/21/12 10:48 AM, Jürgen Schmidt wrote:
> On 8/21/12 3:46 AM, Rob Weir wrote:
>> On Mon, Aug 20, 2012 at 10:54 AM, Jürgen Schmidt <> wrote:
>>> Hi,
>>> OpenOffice is not only used as desktop application but also as hidden
>>> part of other software and often as a conversion engine in the backend.
>>> OpenOffice has very good filters for many file formats and the usage as
>>> a conversion engine is straight forward. And the conversion from one
>>> format into another can be improved and optimized by some special
>>> handling of parts of the document.
>>> For example external linked parts can be ignored and don't have to be
>>> loaded during conversion, embedded images can be simply copied etc.
>>> I would like to improve AOO for this kind of usage by introducing a new
>>> parameter "-conversionmode". It's not comparable with the command line
>>> parameter "-headless" or the "hidden" property for loadComponentFromUrl().
>>> The intention of this new global option is to have it available
>>> everywhere in the underlying code to optimize the performance of the
>>> conversion.
>> It is an interesting idea.  Perhaps in the future it could be combined
>> with a #define and its own makefile so we could compile the project
>> for this purpose specifically, perhaps having a smaller memory
>> footprint.  Or do you think you can get most of the benefit with
>> run-time flags alone?
> probably not and it can be a combination of both. I think mechanisms to
> exclude specific code at compile time will provide further
> opportunities. This can evolve over time and we can make use of this on
> demand.
> Juergen

for now I propose the following where I have a patch in the queue already.

1. new cmd line option "-conversionmode". This option enables
automatically "headless" mode and can be seen as an extension to that.
"headless" is already an extension to "invisible". We can see if this
fits together or if we have to distinguish the modes. Let it evolve and
adapt it on demand.

2. cmd line help

### 3.5  350m1(Build:9610)

Usage: soffice [options] [documents...]


-minimized      keep startup bitmap minimized.
-invisible      no startup screen, no default document and no UI.
-norestore      suppress restart/restore after fatal errors.
-quickstart     starts the quickstart service (only available on windows
and OS/2 platform)
-nologo         don't show startup screen.
-nolockcheck    don't check for remote instances using the installation
-nodefault      don't start with an empty document
-headless       like invisible but no userinteraction at all.
*-conversionmode enable further optimization for document conversion,*
includes enabled headless mode.
-help/-h/-?     show this message and exit.
-writer         create new text document.

3. usage in the code

Similar to handling the headless mode. The Application class in vcl gets
2 new member functions.

static void Application::EnableConversionMode(bool bEnableConv = true);
static bool Application::IsConversionModeEnabled();

And the desktop::CommandLineArgs class get also a new member

sal_Bool desktop::CommandLineArgs::IsConversionMode() const;

With this change it is possible to make use of the conversion mode in
the code and further optimization can be triggered.

I will also check all other parameters to get an even better overview
what we already have, what is documented and what not etc.


View raw message