LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/desktop/source/app - cmdlineargs.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 192 427 45.0 %
Date: 2013-07-09 Functions: 44 69 63.8 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #include <config_features.h>
      21             : 
      22             : #include <cmdlineargs.hxx>
      23             : #include <vcl/svapp.hxx>
      24             : #include <rtl/uri.hxx>
      25             : #include <rtl/ustring.hxx>
      26             : #include "rtl/process.h"
      27             : #include <comphelper/processfactory.hxx>
      28             : #include <com/sun/star/uri/ExternalUriReferenceTranslator.hpp>
      29             : #include "tools/getprocessworkingdir.hxx"
      30             : 
      31             : #include <svl/documentlockfile.hxx>
      32             : 
      33             : #include <cstdio>
      34             : 
      35             : using namespace com::sun::star::lang;
      36             : using namespace com::sun::star::uri;
      37             : using namespace com::sun::star::uno;
      38             : 
      39             : 
      40             : namespace desktop
      41             : {
      42             : 
      43             : namespace {
      44             : 
      45          51 : OUString translateExternalUris(OUString const & input) {
      46             :     OUString t(
      47             :         com::sun::star::uri::ExternalUriReferenceTranslator::create(
      48         153 :             comphelper::getProcessComponentContext())->
      49         102 :         translateToInternal(input));
      50          51 :     return t.isEmpty() ? input : t;
      51             : }
      52             : 
      53         408 : std::vector< OUString > translateExternalUris(
      54             :     std::vector< OUString > const & input)
      55             : {
      56         408 :     std::vector< OUString > t;
      57        1224 :     for (std::vector< OUString >::const_iterator i(input.begin());
      58         816 :          i != input.end(); ++i)
      59             :     {
      60           0 :         t.push_back(translateExternalUris(*i));
      61             :     }
      62         408 :     return t;
      63             : }
      64             : 
      65             : class ExtCommandLineSupplier: public CommandLineArgs::Supplier {
      66             : public:
      67          83 :     explicit ExtCommandLineSupplier():
      68          83 :         m_count(rtl_getAppCommandArgCount()),
      69         166 :         m_index(0)
      70             :     {
      71          83 :         OUString url;
      72          83 :         if (tools::getProcessWorkingDir(url)) {
      73          83 :             m_cwdUrl.reset(url);
      74          83 :         }
      75          83 :     }
      76             : 
      77          83 :     virtual ~ExtCommandLineSupplier() {}
      78             : 
      79          83 :     virtual boost::optional< OUString > getCwdUrl() { return m_cwdUrl; }
      80             : 
      81         581 :     virtual bool next(OUString * argument) {
      82             :         OSL_ASSERT(argument != NULL);
      83         581 :         if (m_index < m_count) {
      84         498 :             rtl_getAppCommandArg(m_index++, &argument->pData);
      85         498 :             return true;
      86             :         } else {
      87          83 :             return false;
      88             :         }
      89             :     }
      90             : 
      91             : private:
      92             :     boost::optional< OUString > m_cwdUrl;
      93             :     sal_uInt32 m_count;
      94             :     sal_uInt32 m_index;
      95             : };
      96             : 
      97             : }
      98             : 
      99           0 : CommandLineArgs::Supplier::Exception::Exception() {}
     100             : 
     101           0 : CommandLineArgs::Supplier::Exception::Exception(Exception const &) {}
     102             : 
     103           0 : CommandLineArgs::Supplier::Exception::~Exception() {}
     104             : 
     105             : CommandLineArgs::Supplier::Exception &
     106           0 : CommandLineArgs::Supplier::Exception::operator =(Exception const &)
     107           0 : { return *this; }
     108             : 
     109          83 : CommandLineArgs::Supplier::~Supplier() {}
     110             : 
     111             : // intialize class with command line parameters from process environment
     112          83 : CommandLineArgs::CommandLineArgs()
     113             : {
     114          83 :     InitParamValues();
     115          83 :     ExtCommandLineSupplier s;
     116          83 :     ParseCommandLine_Impl( s );
     117          83 : }
     118             : 
     119           0 : CommandLineArgs::CommandLineArgs( Supplier& supplier )
     120             : {
     121           0 :     InitParamValues();
     122           0 :     ParseCommandLine_Impl( supplier );
     123           0 : }
     124             : 
     125             : // ----------------------------------------------------------------------------
     126             : 
     127          83 : void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
     128             : {
     129          83 :     m_cwdUrl = supplier.getCwdUrl();
     130             : 
     131             :     // parse command line arguments
     132          83 :     bool bOpenEvent(true);
     133          83 :     bool bPrintEvent(false);
     134          83 :     bool bViewEvent(false);
     135          83 :     bool bStartEvent(false);
     136          83 :     bool bPrintToEvent(false);
     137          83 :     bool bPrinterName(false);
     138          83 :     bool bForceOpenEvent(false);
     139          83 :     bool bForceNewEvent(false);
     140          83 :     bool bDisplaySpec(false);
     141          83 :     bool bOpenDoc(false);
     142          83 :     bool bConversionEvent(false);
     143          83 :     bool bConversionParamsEvent(false);
     144          83 :     bool bBatchPrintEvent(false);
     145          83 :     bool bBatchPrinterNameEvent(false);
     146          83 :     bool bConversionOutEvent(false);
     147             : 
     148             :     for (;;)
     149             :     {
     150         581 :         OUString aArg;
     151         581 :         if ( !supplier.next( &aArg ) )
     152             :         {
     153          83 :             break;
     154             :         }
     155             : 
     156         498 :         if ( !aArg.isEmpty() )
     157             :         {
     158         498 :             m_bEmpty = false;
     159         498 :             OUString oArg;
     160         498 :             if ( !InterpretCommandLineParameter( aArg, oArg ))
     161             :             {
     162           0 :                 if ( aArg.toChar() == '-' )
     163             :                 {
     164             :                     // handle this argument as an option
     165           0 :                     if ( aArg.equalsIgnoreAsciiCase("-n"))
     166             :                     {
     167             :                         // force new documents based on the following documents
     168           0 :                         bForceNewEvent  = true;
     169           0 :                         bOpenEvent      = false;
     170           0 :                         bForceOpenEvent = false;
     171           0 :                         bPrintToEvent   = false;
     172           0 :                         bPrintEvent     = false;
     173           0 :                         bViewEvent      = false;
     174           0 :                         bStartEvent     = false;
     175           0 :                         bDisplaySpec    = false;
     176             :                     }
     177           0 :                     else if ( aArg.equalsIgnoreAsciiCase("-o"))
     178             :                     {
     179             :                         // force open documents regardless if they are templates or not
     180           0 :                         bForceOpenEvent = true;
     181           0 :                         bOpenEvent      = false;
     182           0 :                         bForceNewEvent  = false;
     183           0 :                         bPrintToEvent   = false;
     184           0 :                         bPrintEvent     = false;
     185           0 :                         bViewEvent      = false;
     186           0 :                         bStartEvent     = false;
     187           0 :                         bDisplaySpec    = false;
     188             :                     }
     189           0 :                     else if ( aArg.equalsIgnoreAsciiCase("-pt"))
     190             :                     {
     191             :                         // Print to special printer
     192           0 :                         bPrintToEvent   = true;
     193           0 :                         bPrinterName    = true;
     194           0 :                         bPrintEvent     = false;
     195           0 :                         bOpenEvent      = false;
     196           0 :                         bForceNewEvent  = false;
     197           0 :                         bViewEvent      = false;
     198           0 :                         bStartEvent     = false;
     199           0 :                         bDisplaySpec    = false;
     200           0 :                         bForceOpenEvent = false;
     201             :                    }
     202           0 :                    else if ( aArg.equalsIgnoreAsciiCase("-p"))
     203             :                    {
     204             :                         // Print to default printer
     205           0 :                         bPrintEvent     = true;
     206           0 :                         bPrintToEvent   = false;
     207           0 :                         bOpenEvent      = false;
     208           0 :                         bForceNewEvent  = false;
     209           0 :                         bForceOpenEvent = false;
     210           0 :                         bViewEvent      = false;
     211           0 :                         bStartEvent     = false;
     212           0 :                         bDisplaySpec    = false;
     213             :                    }
     214           0 :                    else if ( oArg.equalsIgnoreAsciiCase("view"))
     215             :                    {
     216             :                         // open in viewmode
     217           0 :                         bOpenEvent      = false;
     218           0 :                         bPrintEvent     = false;
     219           0 :                         bPrintToEvent   = false;
     220           0 :                         bForceNewEvent  = false;
     221           0 :                         bForceOpenEvent = false;
     222           0 :                         bViewEvent      = true;
     223           0 :                         bStartEvent     = false;
     224           0 :                         bDisplaySpec    = false;
     225             :                    }
     226           0 :                    else if ( oArg.equalsIgnoreAsciiCase("show"))
     227             :                    {
     228             :                         // open in viewmode
     229           0 :                         bOpenEvent      = false;
     230           0 :                         bViewEvent      = false;
     231           0 :                         bStartEvent     = true;
     232           0 :                         bPrintEvent     = false;
     233           0 :                         bPrintToEvent   = false;
     234           0 :                         bForceNewEvent  = false;
     235           0 :                         bForceOpenEvent = false;
     236           0 :                         bDisplaySpec    = false;
     237             :                     }
     238           0 :                     else if ( oArg.equalsIgnoreAsciiCase("display"))
     239             :                     {
     240             :                         // set display
     241           0 :                         bOpenEvent      = false;
     242           0 :                         bPrintEvent     = false;
     243           0 :                         bForceOpenEvent = false;
     244           0 :                         bPrintToEvent   = false;
     245           0 :                         bForceNewEvent  = false;
     246           0 :                         bViewEvent      = false;
     247           0 :                         bStartEvent     = false;
     248           0 :                         bDisplaySpec    = true;
     249             :                     }
     250           0 :                     else if ( oArg.equalsIgnoreAsciiCase("language"))
     251             :                     {
     252           0 :                         bOpenEvent      = false;
     253           0 :                         bPrintEvent     = false;
     254           0 :                         bForceOpenEvent = false;
     255           0 :                         bPrintToEvent   = false;
     256           0 :                         bForceNewEvent  = false;
     257           0 :                         bViewEvent      = false;
     258           0 :                         bStartEvent     = false;
     259           0 :                         bDisplaySpec    = false;
     260             :                     }
     261           0 :                     else if ( oArg.equalsIgnoreAsciiCase("convert-to"))
     262             :                     {
     263           0 :                         bOpenEvent = false;
     264           0 :                         bConversionEvent = true;
     265           0 :                         bConversionParamsEvent = true;
     266             :                     }
     267           0 :                     else if ( oArg.equalsIgnoreAsciiCase("print-to-file"))
     268             :                     {
     269           0 :                         bOpenEvent = false;
     270           0 :                         bBatchPrintEvent = true;
     271             :                     }
     272           0 :                     else if ( oArg.equalsIgnoreAsciiCase("printer-name") &&
     273             :                               bBatchPrintEvent )
     274             :                     {
     275           0 :                         bBatchPrinterNameEvent = true;
     276             :                     }
     277           0 :                     else if ( oArg.equalsIgnoreAsciiCase("outdir") &&
     278           0 :                               (bConversionEvent || bBatchPrintEvent) )
     279             :                     {
     280           0 :                         bConversionOutEvent = true;
     281             :                     }
     282             :                     else
     283             :                     // because it's impossible to filter these options that
     284             :                     // are handled in the soffice shell script with the
     285             :                     // primitive tools that /bin/sh offers, ignore them here
     286           0 :                     if (
     287             : #if defined UNX
     288           0 :                         !oArg.equalsIgnoreAsciiCase("backtrace") &&
     289           0 :                         !oArg.equalsIgnoreAsciiCase("strace") &&
     290           0 :                         !oArg.equalsIgnoreAsciiCase("valgrind") &&
     291             :                     // for X Session Management, handled in
     292             :                     // vcl/unx/generic/app/sm.cxx:
     293           0 :                         !oArg.match("session=") &&
     294             : #endif
     295             :                     //ignore additional legacy options that don't do anything anymore
     296           0 :                         !oArg.equalsIgnoreAsciiCase("nocrashreport") &&
     297           0 :                         m_unknown.isEmpty())
     298             :                     {
     299           0 :                         m_unknown = aArg;
     300             :                     }
     301             :                 }
     302             :                 else
     303             :                 {
     304           0 :                     if ( bPrinterName && bPrintToEvent )
     305             :                     {
     306             :                         // first argument after "-pt" this must be the printer name
     307           0 :                         m_printername = aArg;
     308           0 :                         bPrinterName = false;
     309             :                     }
     310           0 :                     else if ( bConversionParamsEvent && bConversionEvent )
     311             :                     {
     312             :                         // first argument must be the params
     313           0 :                         m_conversionparams = aArg;
     314           0 :                         bConversionParamsEvent = false;
     315             :                     }
     316           0 :                     else if ( bBatchPrinterNameEvent && bBatchPrintEvent )
     317             :                     {
     318             :                         // first argument is the printer name
     319           0 :                         m_printername = aArg;
     320           0 :                         bBatchPrinterNameEvent = false;
     321             :                     }
     322           0 :                     else if ( (bConversionEvent || bBatchPrintEvent) && bConversionOutEvent )
     323             :                     {
     324           0 :                         m_conversionout = aArg;
     325           0 :                         bConversionOutEvent = false;
     326             :                     }
     327             :                     else
     328             :                     {
     329             :                         // handle this argument as a filename
     330           0 :                         if ( bOpenEvent )
     331             :                         {
     332           0 :                             m_openlist.push_back(aArg);
     333           0 :                             bOpenDoc = true;
     334             :                         }
     335           0 :                         else if ( bViewEvent )
     336             :                         {
     337           0 :                             m_viewlist.push_back(aArg);
     338           0 :                             bOpenDoc = true;
     339             :                         }
     340           0 :                         else if ( bStartEvent )
     341             :                         {
     342           0 :                             m_startlist.push_back(aArg);
     343           0 :                             bOpenDoc = true;
     344             :                         }
     345           0 :                         else if ( bPrintEvent )
     346             :                         {
     347           0 :                             m_printlist.push_back(aArg);
     348           0 :                             bOpenDoc = true;
     349             :                         }
     350           0 :                         else if ( bPrintToEvent )
     351             :                         {
     352           0 :                             m_printtolist.push_back(aArg);
     353           0 :                             bOpenDoc = true;
     354             :                         }
     355           0 :                         else if ( bForceNewEvent )
     356             :                         {
     357           0 :                             m_forcenewlist.push_back(aArg);
     358           0 :                             bOpenDoc = true;
     359             :                         }
     360           0 :                         else if ( bForceOpenEvent )
     361             :                         {
     362           0 :                             m_forceopenlist.push_back(aArg);
     363           0 :                             bOpenDoc = true;
     364             :                         }
     365           0 :                         else if ( bDisplaySpec )
     366             :                         {
     367           0 :                             bDisplaySpec = false; // only one display, not a lsit
     368           0 :                             bOpenEvent = true;    // set back to standard
     369             :                         }
     370           0 :                         else if ( bConversionEvent || bBatchPrintEvent )
     371           0 :                             m_conversionlist.push_back(aArg);
     372             :                     }
     373             :                 }
     374         498 :             }
     375             :         }
     376         498 :     }
     377             : 
     378          83 :     if ( bOpenDoc )
     379           0 :         m_bDocumentArgs = true;
     380          83 : }
     381             : 
     382         498 : bool CommandLineArgs::InterpretCommandLineParameter( const OUString& aArg, OUString& oArg )
     383             : {
     384         498 :     bool bDeprecated = false;
     385         498 :     if (aArg.matchIgnoreAsciiCase("--"))
     386             :     {
     387         498 :         oArg = OUString(aArg.getStr()+2, aArg.getLength()-2);
     388             :     }
     389           0 :     else if (aArg.toChar() == '-')
     390             :     {
     391           0 :         if ( aArg.getLength() > 2 ) // -h, -o, -n, -? are still valid
     392           0 :             bDeprecated = true;
     393           0 :         oArg = OUString(aArg.getStr()+1, aArg.getLength()-1);
     394             :     }
     395             :     else
     396             :     {
     397           0 :         return false;
     398             :     }
     399             : 
     400         498 :     if ( oArg == "minimized" )
     401             :     {
     402           0 :         m_minimized = true;
     403             :     }
     404         498 :     else if ( oArg == "invisible" )
     405             :     {
     406           0 :         m_invisible = true;
     407             :     }
     408         498 :     else if ( oArg == "norestore" )
     409             :     {
     410          83 :         m_norestore = true;
     411             :     }
     412         415 :     else if ( oArg == "nodefault" )
     413             :     {
     414           0 :         m_nodefault = true;
     415             :     }
     416         415 :     else if ( oArg == "headless" )
     417             :     {
     418             :         // Headless means also invisibile, so set this parameter to true!
     419          83 :         m_headless = true;
     420          83 :         m_invisible = true;
     421             :     }
     422         332 :     else if ( oArg == "quickstart" )
     423             :     {
     424             : #if defined(ENABLE_QUICKSTART_APPLET)
     425           0 :         m_quickstart = true;
     426             : #endif
     427           0 :         m_noquickstart = false;
     428             :     }
     429         332 :     else if ( oArg == "quickstart=no" )
     430             :     {
     431          83 :         m_noquickstart = true;
     432          83 :         m_quickstart = false;
     433             :     }
     434         249 :     else if ( oArg == "terminate_after_init" )
     435             :     {
     436           0 :         m_terminateafterinit = true;
     437             :     }
     438         249 :     else if ( oArg == "nofirststartwizard" )
     439             :     {
     440          83 :         m_nofirststartwizard = true;
     441             :     }
     442         166 :     else if ( oArg == "nologo" )
     443             :     {
     444          83 :         m_nologo = true;
     445             :     }
     446             : #if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
     447          83 :     else if ( oArg == "nolockcheck" )
     448             :     {
     449           0 :         m_nolockcheck = true;
     450             :         // Workaround for automated testing
     451           0 :         ::svt::DocumentLockFile::AllowInteraction( false );
     452             :     }
     453             : #endif
     454          83 :     else if ( oArg == "help" || aArg == "-h" || aArg == "-?" )
     455             :     {
     456           0 :         m_help = true;
     457             :     }
     458          83 :     else if ( oArg == "helpwriter" )
     459             :     {
     460           0 :         m_helpwriter = true;
     461             :     }
     462          83 :     else if ( oArg == "helpcalc" )
     463             :     {
     464           0 :         m_helpcalc = true;
     465             :     }
     466          83 :     else if ( oArg == "helpdraw" )
     467             :     {
     468           0 :         m_helpdraw = true;
     469             :     }
     470          83 :     else if ( oArg == "helpimpress" )
     471             :     {
     472           0 :         m_helpimpress = true;
     473             :     }
     474          83 :     else if ( oArg == "helpbase" )
     475             :     {
     476           0 :         m_helpbase = true;
     477             :     }
     478          83 :     else if ( oArg == "helpbasic" )
     479             :     {
     480           0 :         m_helpbasic = true;
     481             :     }
     482          83 :     else if ( oArg == "helpmath" )
     483             :     {
     484           0 :         m_helpmath = true;
     485             :     }
     486          83 :     else if ( oArg == "version" )
     487             :     {
     488           0 :         m_version = true;
     489             :     }
     490          83 :     else if ( oArg.matchIgnoreAsciiCase("splash-pipe=") )
     491             :     {
     492           0 :         m_splashpipe = true;
     493             :     }
     494             : #ifdef MACOSX
     495             :     /* #i84053# ignore -psn on Mac
     496             :        Platform dependent #ifdef here is ugly, however this is currently
     497             :        the only platform dependent parameter. Should more appear
     498             :        we should find a better solution
     499             :     */
     500             :     else if ( aArg.match("-psn") )
     501             :     {
     502             :         m_psn = true;
     503             :         return true;
     504             :     }
     505             : #endif
     506             : #ifdef WIN32
     507             :     /* fdo#57203 ignore -Embedding on Windows
     508             :        when LibreOffice is launched by COM+
     509             :      */
     510             :     else if ( oArg == "Embedding" )
     511             :     {
     512             :         return true;
     513             :     }
     514             : #endif
     515          83 :     else if ( oArg.matchIgnoreAsciiCase("infilter="))
     516             :     {
     517           0 :         m_infilter.push_back(oArg.copy(RTL_CONSTASCII_LENGTH("infilter=")));
     518             :     }
     519          83 :     else if ( oArg.matchIgnoreAsciiCase("accept="))
     520             :     {
     521          83 :         m_accept.push_back(oArg.copy(RTL_CONSTASCII_LENGTH("accept=")));
     522             :     }
     523           0 :     else if ( oArg.matchIgnoreAsciiCase("unaccept="))
     524             :     {
     525           0 :         m_unaccept.push_back(oArg.copy(RTL_CONSTASCII_LENGTH("unaccept=")));
     526             :     }
     527           0 :     else if ( oArg.matchIgnoreAsciiCase("language="))
     528             :     {
     529           0 :         m_language = oArg.copy(RTL_CONSTASCII_LENGTH("language="));
     530             :     }
     531           0 :     else if ( oArg.matchIgnoreAsciiCase("pidfile="))
     532             :     {
     533           0 :         m_pidfile = oArg.copy(RTL_CONSTASCII_LENGTH("pidfile="));
     534             :     }
     535           0 :     else if ( oArg == "writer" )
     536             :     {
     537           0 :         m_writer = true;
     538           0 :         m_bDocumentArgs = true;
     539             :     }
     540           0 :     else if ( oArg == "calc" )
     541             :     {
     542           0 :         m_calc = true;
     543           0 :         m_bDocumentArgs = true;
     544             :     }
     545           0 :     else if ( oArg == "draw" )
     546             :     {
     547           0 :         m_draw = true;
     548           0 :         m_bDocumentArgs = true;
     549             :     }
     550           0 :     else if ( oArg == "impress" )
     551             :     {
     552           0 :         m_impress = true;
     553           0 :         m_bDocumentArgs = true;
     554             :     }
     555           0 :     else if ( oArg == "base" )
     556             :     {
     557           0 :         m_base = true;
     558           0 :         m_bDocumentArgs = true;
     559             :     }
     560           0 :     else if ( oArg == "global" )
     561             :     {
     562           0 :         m_global = true;
     563           0 :         m_bDocumentArgs = true;
     564             :     }
     565           0 :     else if ( oArg == "math" )
     566             :     {
     567           0 :         m_math = true;
     568           0 :         m_bDocumentArgs = true;
     569             :     }
     570           0 :     else if ( oArg == "web" )
     571             :     {
     572           0 :         m_web = true;
     573           0 :         m_bDocumentArgs = true;
     574             :     }
     575             :     else
     576           0 :         return false;
     577             : 
     578         498 :     if (bDeprecated)
     579             :     {
     580           0 :         OString sArg(OUStringToOString(aArg, osl_getThreadTextEncoding()));
     581           0 :         fprintf(stderr, "Warning: %s is deprecated.  Use -%s instead.\n", sArg.getStr(), sArg.getStr());
     582             :     }
     583         498 :     return true;
     584             : }
     585             : 
     586          83 : void CommandLineArgs::InitParamValues()
     587             : {
     588          83 :     m_minimized = false;
     589          83 :     m_norestore = false;
     590             : #ifdef LIBO_HEADLESS
     591             :     m_invisible = true;
     592             :     m_headless = true;
     593             : #else
     594          83 :     m_invisible = false;
     595          83 :     m_headless = false;
     596             : #endif
     597          83 :     m_quickstart = false;
     598          83 :     m_noquickstart = false;
     599          83 :     m_terminateafterinit = false;
     600          83 :     m_nofirststartwizard = false;
     601          83 :     m_nologo = false;
     602          83 :     m_nolockcheck = false;
     603          83 :     m_nodefault = false;
     604          83 :     m_help = false;
     605          83 :     m_writer = false;
     606          83 :     m_calc = false;
     607          83 :     m_draw = false;
     608          83 :     m_impress = false;
     609          83 :     m_global = false;
     610          83 :     m_math = false;
     611          83 :     m_web = false;
     612          83 :     m_base = false;
     613          83 :     m_helpwriter = false;
     614          83 :     m_helpcalc = false;
     615          83 :     m_helpdraw = false;
     616          83 :     m_helpbasic = false;
     617          83 :     m_helpmath = false;
     618          83 :     m_helpimpress = false;
     619          83 :     m_helpbase = false;
     620          83 :     m_psn = false;
     621          83 :     m_version = false;
     622          83 :     m_splashpipe = false;
     623          83 :     m_bEmpty = true;
     624          83 :     m_bDocumentArgs  = false;
     625          83 : }
     626             : 
     627           0 : bool CommandLineArgs::IsMinimized() const
     628             : {
     629           0 :     return m_minimized;
     630             : }
     631             : 
     632         370 : bool CommandLineArgs::IsInvisible() const
     633             : {
     634         370 :     return m_invisible;
     635             : }
     636             : 
     637          51 : bool CommandLineArgs::IsNoRestore() const
     638             : {
     639          51 :     return m_norestore;
     640             : }
     641             : 
     642           0 : bool CommandLineArgs::IsNoDefault() const
     643             : {
     644           0 :     return m_nodefault;
     645             : }
     646             : 
     647         332 : bool CommandLineArgs::IsHeadless() const
     648             : {
     649         332 :     return m_headless;
     650             : }
     651             : 
     652         102 : bool CommandLineArgs::IsQuickstart() const
     653             : {
     654         102 :     return m_quickstart;
     655             : }
     656             : 
     657           0 : bool CommandLineArgs::IsNoQuickstart() const
     658             : {
     659           0 :     return m_noquickstart;
     660             : }
     661             : 
     662          83 : bool CommandLineArgs::IsTerminateAfterInit() const
     663             : {
     664          83 :     return m_terminateafterinit;
     665             : }
     666             : 
     667           0 : bool CommandLineArgs::IsNoLogo() const
     668             : {
     669           0 :     return m_nologo;
     670             : }
     671             : 
     672           0 : bool CommandLineArgs::IsNoLockcheck() const
     673             : {
     674           0 :     return m_nolockcheck;
     675             : }
     676             : 
     677         249 : bool CommandLineArgs::IsHelp() const
     678             : {
     679         249 :     return m_help;
     680             : }
     681          51 : bool CommandLineArgs::IsHelpWriter() const
     682             : {
     683          51 :     return m_helpwriter;
     684             : }
     685             : 
     686          51 : bool CommandLineArgs::IsHelpCalc() const
     687             : {
     688          51 :     return m_helpcalc;
     689             : }
     690             : 
     691          51 : bool CommandLineArgs::IsHelpDraw() const
     692             : {
     693          51 :     return m_helpdraw;
     694             : }
     695             : 
     696          51 : bool CommandLineArgs::IsHelpImpress() const
     697             : {
     698          51 :     return m_helpimpress;
     699             : }
     700             : 
     701          51 : bool CommandLineArgs::IsHelpBase() const
     702             : {
     703          51 :     return m_helpbase;
     704             : }
     705          51 : bool CommandLineArgs::IsHelpMath() const
     706             : {
     707          51 :     return m_helpmath;
     708             : }
     709          51 : bool CommandLineArgs::IsHelpBasic() const
     710             : {
     711          51 :     return m_helpbasic;
     712             : }
     713             : 
     714           0 : bool CommandLineArgs::IsWriter() const
     715             : {
     716           0 :     return m_writer;
     717             : }
     718             : 
     719           0 : bool CommandLineArgs::IsCalc() const
     720             : {
     721           0 :     return m_calc;
     722             : }
     723             : 
     724           0 : bool CommandLineArgs::IsDraw() const
     725             : {
     726           0 :     return m_draw;
     727             : }
     728             : 
     729           0 : bool CommandLineArgs::IsImpress() const
     730             : {
     731           0 :     return m_impress;
     732             : }
     733             : 
     734           0 : bool CommandLineArgs::IsBase() const
     735             : {
     736           0 :     return m_base;
     737             : }
     738             : 
     739           0 : bool CommandLineArgs::IsGlobal() const
     740             : {
     741           0 :     return m_global;
     742             : }
     743             : 
     744           0 : bool CommandLineArgs::IsMath() const
     745             : {
     746           0 :     return m_math;
     747             : }
     748             : 
     749           0 : bool CommandLineArgs::IsWeb() const
     750             : {
     751           0 :     return m_web;
     752             : }
     753             : 
     754         249 : bool CommandLineArgs::IsVersion() const
     755             : {
     756         249 :     return m_version;
     757             : }
     758             : 
     759         249 : OUString CommandLineArgs::GetUnknown() const
     760             : {
     761         249 :     return m_unknown;
     762             : }
     763             : 
     764           0 : bool CommandLineArgs::HasModuleParam() const
     765             : {
     766           0 :     return m_writer || m_calc || m_draw || m_impress || m_global || m_math
     767           0 :         || m_web || m_base;
     768             : }
     769             : 
     770           0 : bool CommandLineArgs::HasSplashPipe() const
     771             : {
     772           0 :     return m_splashpipe;
     773             : }
     774             : 
     775          83 : std::vector< OUString > const & CommandLineArgs::GetAccept() const
     776             : {
     777          83 :     return m_accept;
     778             : }
     779             : 
     780           0 : std::vector< OUString > const & CommandLineArgs::GetUnaccept() const
     781             : {
     782           0 :     return m_unaccept;
     783             : }
     784             : 
     785          51 : std::vector< OUString > CommandLineArgs::GetOpenList() const
     786             : {
     787          51 :     return translateExternalUris(m_openlist);
     788             : }
     789             : 
     790          51 : std::vector< OUString > CommandLineArgs::GetViewList() const
     791             : {
     792          51 :     return translateExternalUris(m_viewlist);
     793             : }
     794             : 
     795          51 : std::vector< OUString > CommandLineArgs::GetStartList() const
     796             : {
     797          51 :     return translateExternalUris(m_startlist);
     798             : }
     799             : 
     800          51 : std::vector< OUString > CommandLineArgs::GetForceOpenList() const
     801             : {
     802          51 :     return translateExternalUris(m_forceopenlist);
     803             : }
     804             : 
     805          51 : std::vector< OUString > CommandLineArgs::GetForceNewList() const
     806             : {
     807          51 :     return translateExternalUris(m_forcenewlist);
     808             : }
     809             : 
     810          51 : std::vector< OUString > CommandLineArgs::GetPrintList() const
     811             : {
     812          51 :     return translateExternalUris(m_printlist);
     813             : }
     814             : 
     815          51 : std::vector< OUString > CommandLineArgs::GetPrintToList() const
     816             : {
     817          51 :     return translateExternalUris(m_printtolist);
     818             : }
     819             : 
     820          51 : OUString CommandLineArgs::GetPrinterName() const
     821             : {
     822          51 :     return m_printername;
     823             : }
     824             : 
     825          83 : OUString CommandLineArgs::GetLanguage() const
     826             : {
     827          83 :     return m_language;
     828             : }
     829             : 
     830          51 : std::vector< OUString > const & CommandLineArgs::GetInFilter() const
     831             : {
     832          51 :     return m_infilter;
     833             : }
     834             : 
     835          51 : std::vector< OUString > CommandLineArgs::GetConversionList() const
     836             : {
     837          51 :     return translateExternalUris(m_conversionlist);
     838             : }
     839             : 
     840          51 : OUString CommandLineArgs::GetConversionParams() const
     841             : {
     842          51 :     return m_conversionparams;
     843             : }
     844          51 : OUString CommandLineArgs::GetConversionOut() const
     845             : {
     846          51 :     return translateExternalUris(m_conversionout);
     847             : }
     848             : 
     849           0 : bool CommandLineArgs::IsEmpty() const
     850             : {
     851           0 :     return m_bEmpty;
     852             : }
     853             : 
     854          51 : bool CommandLineArgs::WantsToLoadDocument() const
     855             : {
     856          51 :     return m_bDocumentArgs;
     857             : }
     858             : 
     859         166 : OUString CommandLineArgs::GetPidfileName() const
     860             : {
     861         166 :     return m_pidfile;
     862             : }
     863             : 
     864         249 : } // namespace desktop
     865             : 
     866             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10