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

Generated by: LCOV version 1.10