1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_DESKTOP_SOURCE_APP_CMDLINEARGS_HXX
21 #define INCLUDED_DESKTOP_SOURCE_APP_CMDLINEARGS_HXX
23 #include "sal/config.h"
27 #include <rtl/ustring.hxx>
28 #include "boost/noncopyable.hpp"
29 #include "boost/optional.hpp"
34 class CommandLineArgs
: private boost::noncopyable
39 // Thrown from constructors and next:
43 Exception(Exception
const &);
45 Exception
& operator =(Exception
const &);
49 virtual boost::optional
< OUString
> getCwdUrl() = 0;
50 virtual bool next(OUString
* argument
) = 0;
54 CommandLineArgs( Supplier
& supplier
);
56 boost::optional
< OUString
> getCwdUrl() const { return m_cwdUrl
; }
58 // Access to bool parameters
59 bool IsMinimized() const;
60 bool IsInvisible() const;
61 bool IsNoRestore() const;
62 bool IsNoDefault() const;
63 bool IsHeadless() const;
64 bool IsQuickstart() const;
65 bool IsNoQuickstart() const;
66 bool IsTerminateAfterInit() const;
67 bool IsNoLogo() const;
68 bool IsNoLockcheck() const;
70 bool IsHelpWriter() const;
71 bool IsHelpCalc() const;
72 bool IsHelpDraw() const;
73 bool IsHelpImpress() const;
74 bool IsHelpBase() const;
75 bool IsHelpMath() const;
76 bool IsHelpBasic() const;
77 bool IsWriter() const;
80 bool IsImpress() const;
82 bool IsGlobal() const;
85 bool IsVersion() const;
86 bool HasModuleParam() const;
87 bool WantsToLoadDocument() const;
89 OUString
GetUnknown() const;
91 // Access to string parameters
92 bool HasSplashPipe() const;
93 std::vector
< OUString
> const & GetAccept() const;
94 std::vector
< OUString
> const & GetUnaccept() const;
95 std::vector
< OUString
> GetOpenList() const;
96 std::vector
< OUString
> GetViewList() const;
97 std::vector
< OUString
> GetStartList() const;
98 std::vector
< OUString
> GetForceOpenList() const;
99 std::vector
< OUString
> GetForceNewList() const;
100 std::vector
< OUString
> GetPrintList() const;
101 std::vector
< OUString
> GetPrintToList() const;
102 OUString
GetPrinterName() const;
103 OUString
GetLanguage() const;
104 std::vector
< OUString
> const & GetInFilter() const;
105 std::vector
< OUString
> GetConversionList() const;
106 OUString
GetConversionParams() const;
107 OUString
GetConversionOut() const;
108 OUString
GetPidfileName() const;
110 // Special analyzed states (does not match directly to a command line parameter!)
111 bool IsEmpty() const;
114 void ParseCommandLine_Impl( Supplier
& supplier
);
115 void InitParamValues();
117 boost::optional
< OUString
> m_cwdUrl
;
125 bool m_terminateafterinit
;
126 bool m_nofirststartwizard
;
151 bool m_bEmpty
; // No Args at all
152 bool m_bDocumentArgs
; // A document creation/open/load arg is used
153 std::vector
< OUString
> m_accept
;
154 std::vector
< OUString
> m_unaccept
;
155 std::vector
< OUString
> m_openlist
; // contains external URIs
156 std::vector
< OUString
> m_viewlist
; // contains external URIs
157 std::vector
< OUString
> m_startlist
; // contains external URIs
158 std::vector
< OUString
> m_forceopenlist
; // contains external URIs
159 std::vector
< OUString
> m_forcenewlist
; // contains external URIs
160 std::vector
< OUString
> m_printlist
; // contains external URIs
161 std::vector
< OUString
> m_printtolist
; // contains external URIs
162 OUString m_printername
;
163 std::vector
< OUString
> m_conversionlist
; // contains external URIs
164 OUString m_conversionparams
;
165 OUString m_conversionout
; // contains external URIs
166 std::vector
< OUString
> m_infilter
;
175 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */