LibreOffice Module desktop (master) 1
cmdlineargs.cxx
Go to the documentation of this file.
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 <osl/thread.hxx>
30#include <tools/stream.hxx>
31#include <tools/urlobj.hxx>
32#include <rtl/ustring.hxx>
33#include <rtl/process.h>
34#include <comphelper/lok.hxx>
36#include <com/sun/star/uri/ExternalUriReferenceTranslator.hpp>
38
39#include <rtl/strbuf.hxx>
40#include <osl/file.hxx>
41#include <sal/log.hxx>
42
43#include <mutex>
44
45using namespace com::sun::star::lang;
46using namespace com::sun::star::uri;
47using namespace com::sun::star::uno;
48
49namespace desktop
50{
51
52namespace {
53
54OUString translateExternalUris(OUString const & input) {
55 OUString t(
58 translateToInternal(input));
59 return t.isEmpty() ? input : t;
60}
61
62std::vector< OUString > translateExternalUris(
63 std::vector< OUString > const & input)
64{
65 std::vector< OUString > t;
66 t.reserve(input.size());
67 for (auto const& elem : input)
68 {
69 t.push_back(translateExternalUris(elem));
70 }
71 return t;
72}
73
74class ExtCommandLineSupplier: public CommandLineArgs::Supplier {
75public:
76 explicit ExtCommandLineSupplier():
77 m_count(
78 comphelper::LibreOfficeKit::isActive()
79 ? 0 : rtl_getAppCommandArgCount()),
80 m_index(0)
81 {
82 OUString url;
84 m_cwdUrl = url;
85 }
86 }
87
88 virtual std::optional< OUString > getCwdUrl() override { return m_cwdUrl; }
89
90 virtual bool next(OUString * argument) override {
91 OSL_ASSERT(argument != nullptr);
92 if (m_index < m_count) {
93 rtl_getAppCommandArg(m_index++, &argument->pData);
94 return true;
95 } else {
96 return false;
97 }
98 }
99
100private:
101 std::optional< OUString > m_cwdUrl;
102 sal_uInt32 m_count;
103 sal_uInt32 m_index;
104};
105
106enum class CommandLineEvent {
107 Open, Print, View, Start, PrintTo,
108 ForceOpen, ForceNew, Conversion, BatchPrint
109};
110
111// Office URI Schemes: see https://msdn.microsoft.com/en-us/library/dn906146
112// This functions checks if the arg is an Office URI.
113// If applicable, it updates arg to inner URI.
114// If no event argument is explicitly set in command line,
115// then it returns updated command line event,
116// according to Office URI command.
117CommandLineEvent CheckOfficeURI(/* in,out */ OUString& arg, CommandLineEvent curEvt)
118{
119 // 1. Strip the scheme name
120 OUString rest1;
121 bool isOfficeURI = ( arg.startsWithIgnoreAsciiCase("vnd.libreoffice.command:", &rest1) // Proposed extended schema
122 || arg.startsWithIgnoreAsciiCase("ms-word:", &rest1)
123 || arg.startsWithIgnoreAsciiCase("ms-powerpoint:", &rest1)
124 || arg.startsWithIgnoreAsciiCase("ms-excel:", &rest1)
125 || arg.startsWithIgnoreAsciiCase("ms-visio:", &rest1)
126 || arg.startsWithIgnoreAsciiCase("ms-access:", &rest1));
127 if (!isOfficeURI)
128 return curEvt;
129
130 OUString rest2;
131 tools::Long nURIlen = -1;
132
133 // URL might be encoded
134 OUString decoded_rest = rest1.replaceAll("%7C", "|").replaceAll("%7c", "|");
135
136 // 2. Discriminate by command name (incl. 1st command argument descriptor)
137 // Extract URI: everything up to possible next argument
138 if (decoded_rest.startsWith("ofv|u|", &rest2))
139 {
140 // Open for view - override only in default mode
141 if (curEvt == CommandLineEvent::Open)
142 curEvt = CommandLineEvent::View;
143 nURIlen = rest2.indexOf("|");
144 }
145 else if (decoded_rest.startsWith("ofe|u|", &rest2))
146 {
147 // Open for editing - override only in default mode
148 if (curEvt == CommandLineEvent::Open)
149 curEvt = CommandLineEvent::ForceOpen;
150 nURIlen = rest2.indexOf("|");
151 }
152 else if (decoded_rest.startsWith("nft|u|", &rest2))
153 {
154 // New from template - override only in default mode
155 if (curEvt == CommandLineEvent::Open)
156 curEvt = CommandLineEvent::ForceNew;
157 nURIlen = rest2.indexOf("|");
158 // TODO: process optional second argument (default save-to location)
159 // For now, we just ignore it
160 }
161 else
162 {
163 // Abbreviated scheme: <scheme-name>:URI
164 // "ofv|u|" implied
165 // override only in default mode
166 if (curEvt == CommandLineEvent::Open)
167 curEvt = CommandLineEvent::View;
168 rest2 = rest1;
169 }
170 if (nURIlen < 0)
171 nURIlen = rest2.getLength();
172 auto const uri = rest2.subView(0, nURIlen);
173 if (INetURLObject(uri).GetProtocol() == INetProtocol::Macro) {
174 // Let the "Open" machinery process the full command URI (leading to failure, by intention,
175 // as the "Open" machinery does not know about those command URI schemes):
176 curEvt = CommandLineEvent::Open;
177 } else {
178 arg = uri;
179 }
180 return curEvt;
181}
182
183// Skip single newline (be it *NIX LF, MacOS CR, of Win CRLF)
184// Changes the offset, and returns true if moved
185bool SkipNewline(const char* & pStr)
186{
187 if ((*pStr != '\r') && (*pStr != '\n'))
188 return false;
189 if (*pStr == '\r')
190 ++pStr;
191 if (*pStr == '\n')
192 ++pStr;
193 return true;
194}
195
196// Web query: http://support.microsoft.com/kb/157482
197CommandLineEvent CheckWebQuery(/* in,out */ OUString& arg, CommandLineEvent curEvt)
198{
199 // Only handle files with extension .iqy
200 if (!arg.endsWithIgnoreAsciiCase(".iqy"))
201 return curEvt;
202
203 static std::mutex aMutex;
204 std::lock_guard aGuard(aMutex);
205
206 try
207 {
208 OUString sFileURL;
209 // Cannot use translateExternalUris yet, because process service factory is not yet available
210 if (osl::FileBase::getFileURLFromSystemPath(arg, sFileURL) != osl::FileBase::RC::E_None)
211 return curEvt;
212 SvFileStream stream(sFileURL, StreamMode::READ);
213
214 const sal_Int32 nBufLen = 32000;
215 char sBuffer[nBufLen];
216 size_t nRead = stream.ReadBytes(sBuffer, nBufLen);
217 if (nRead < 8) // WEB\n1\n...
218 return curEvt;
219
220 const char* pPos = sBuffer;
221 if (strncmp(pPos, "WEB", 3) != 0)
222 return curEvt;
223 pPos += 3;
224 if (!SkipNewline(pPos))
225 return curEvt;
226 if (*pPos != '1')
227 return curEvt;
228 ++pPos;
229 if (!SkipNewline(pPos))
230 return curEvt;
231
232 OStringBuffer aResult(nRead);
233 do
234 {
235 const char* pPos1 = pPos;
236 const char* pEnd = sBuffer + nRead;
237 while ((pPos1 < pEnd) && (*pPos1 != '\r') && (*pPos1 != '\n'))
238 ++pPos1;
239 aResult.append(pPos, pPos1 - pPos);
240 if (pPos1 < pEnd) // newline
241 break;
242 pPos = sBuffer;
243 } while ((nRead = stream.ReadBytes(sBuffer, nBufLen)) > 0);
244
245 stream.Close();
246
247 arg = OStringToOUString(aResult, osl_getThreadTextEncoding());
248 return CommandLineEvent::ForceNew;
249 }
250 catch (...)
251 {
252 SAL_WARN("desktop.app", "An error processing Web Query file: " << arg);
253 }
254
255 return curEvt;
256}
257
258} // namespace
259
261
263
266{ return *this; }
267
269
270// initialize class with command line parameters from process environment
272{
274 ExtCommandLineSupplier s;
276}
277
279{
281 ParseCommandLine_Impl( supplier );
282}
283
285{
286 m_cwdUrl = supplier.getCwdUrl();
287 CommandLineEvent eCurrentEvent = CommandLineEvent::Open;
288
289 for (;;)
290 {
291 OUString aArg;
292 if ( !supplier.next( &aArg ) )
293 {
294 break;
295 }
296
297 if ( !aArg.isEmpty() )
298 {
299 m_bEmpty = false;
300 OUString oArg;
301 OUString oDeprecatedArg;
302 if (!aArg.startsWith("--", &oArg) && aArg.startsWith("-", &oArg)
303 && aArg.getLength() > 2) // -h, -?, -n, -o, -p are still valid
304 {
305 oDeprecatedArg = aArg; // save here, since aArg can change later
306 }
307
308 OUString rest;
309 if ( oArg == "minimized" )
310 {
311 m_minimized = true;
312 }
313 else if ( oArg == "invisible" )
314 {
315 m_invisible = true;
316 }
317 else if ( oArg == "norestore" )
318 {
319 m_norestore = true;
320 }
321 else if ( oArg == "nodefault" )
322 {
323 m_nodefault = true;
324 }
325 else if ( oArg == "headless" )
326 {
327 setHeadless();
328 }
329 else if ( oArg == "eventtesting" )
330 {
331 m_eventtesting = true;
332 }
333 else if ( oArg == "safe-mode" )
334 {
335 m_safemode = true;
336 }
337 else if ( oArg == "cat" )
338 {
339 m_textcat = true;
340 m_conversionparams = "txt:Text";
341 eCurrentEvent = CommandLineEvent::Conversion;
342 setHeadless();
343 }
344 else if ( oArg == "script-cat" )
345 {
346 m_scriptcat = true;
347 eCurrentEvent = CommandLineEvent::Conversion;
348 setHeadless();
349 }
350 else if ( oArg == "quickstart" )
351 {
352#if defined(ENABLE_QUICKSTART_APPLET)
353 m_quickstart = true;
354#endif
355 m_noquickstart = false;
356 }
357 else if ( oArg == "quickstart=no" )
358 {
359 m_noquickstart = true;
360 m_quickstart = false;
361 }
362 else if ( oArg == "terminate_after_init" )
363 {
365 }
366 else if ( oArg == "nofirststartwizard" )
367 {
368 // Do nothing, accept only for backward compatibility
369 }
370 else if ( oArg == "nologo" )
371 {
372 m_nologo = true;
373 }
374#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
375 else if ( oArg == "nolockcheck" )
376 {
377 m_nolockcheck = true;
378 }
379#endif
380 else if ( oArg == "help" || aArg == "-h" || aArg == "-?" )
381 {
382 m_help = true;
383 }
384 else if ( oArg == "helpwriter" )
385 {
386 m_helpwriter = true;
387 }
388 else if ( oArg == "helpcalc" )
389 {
390 m_helpcalc = true;
391 }
392 else if ( oArg == "helpdraw" )
393 {
394 m_helpdraw = true;
395 }
396 else if ( oArg == "helpimpress" )
397 {
398 m_helpimpress = true;
399 }
400 else if ( oArg == "helpbase" )
401 {
402 m_helpbase = true;
403 }
404 else if ( oArg == "helpbasic" )
405 {
406 m_helpbasic = true;
407 }
408 else if ( oArg == "helpmath" )
409 {
410 m_helpmath = true;
411 }
412 else if ( oArg == "protector" )
413 {
414 // Not relevant for us here, but can be used in unit tests.
415 // Usually unit tests would not end up here, but e.g. the
416 // LOK Tiled Rendering tests end up running a full soffice
417 // process, and we can't bail on the use of --protector.
418
419 // We specifically need to consume the following 2 arguments
420 // for --protector
421 if ((!supplier.next(&aArg) || !supplier.next(&aArg)) && m_unknown.isEmpty())
422 m_unknown = "--protector must be followed by two arguments";
423 }
424 else if ( oArg == "version" )
425 {
426 m_version = true;
427 }
428 else if ( oArg.startsWith("splash-pipe=") )
429 {
430 m_splashpipe = true;
431 }
432#ifdef MACOSX
433 /* #i84053# ignore -psn on Mac
434 Platform dependent #ifdef here is ugly, however this is currently
435 the only platform dependent parameter. Should more appear
436 we should find a better solution
437 */
438 else if ( aArg.startsWith("-psn") )
439 {
440 oDeprecatedArg.clear();
441 }
442#endif
443#if HAVE_FEATURE_MACOSX_SANDBOX
444 else if ( oArg == "nstemporarydirectory" )
445 {
446 printf("%s\n", [NSTemporaryDirectory() UTF8String]);
447 exit(0);
448 }
449#endif
450#ifdef _WIN32
451 /* fdo#57203 ignore -Embedding on Windows
452 when LibreOffice is launched by COM+
453 */
454 else if ( oArg == "Embedding" )
455 {
456 oDeprecatedArg.clear();
457 }
458#endif
459 else if ( oArg.startsWith("infilter=", &rest))
460 {
461 m_infilter.push_back(rest);
462 }
463 else if ( oArg.startsWith("accept=", &rest))
464 {
465 m_accept.push_back(rest);
466 }
467 else if ( oArg.startsWith("unaccept=", &rest))
468 {
469 m_unaccept.push_back(rest);
470 }
471 else if ( oArg.startsWith("language=", &rest))
472 {
473 m_language = rest;
474 }
475 else if ( oArg.startsWith("pidfile=", &rest))
476 {
477 m_pidfile = rest;
478 }
479 else if ( oArg == "writer" )
480 {
481 m_writer = true;
482 m_bDocumentArgs = true;
483 }
484 else if ( oArg == "calc" )
485 {
486 m_calc = true;
487 m_bDocumentArgs = true;
488 }
489 else if ( oArg == "draw" )
490 {
491 m_draw = true;
492 m_bDocumentArgs = true;
493 }
494 else if ( oArg == "impress" )
495 {
496 m_impress = true;
497 m_bDocumentArgs = true;
498 }
499 else if ( oArg == "base" )
500 {
501 m_base = true;
502 m_bDocumentArgs = true;
503 }
504 else if ( oArg == "global" )
505 {
506 m_global = true;
507 m_bDocumentArgs = true;
508 }
509 else if ( oArg == "math" )
510 {
511 m_math = true;
512 m_bDocumentArgs = true;
513 }
514 else if ( oArg == "web" )
515 {
516 m_web = true;
517 m_bDocumentArgs = true;
518 }
519 else if ( aArg == "-n" )
520 {
521 // force new documents based on the following documents
522 eCurrentEvent = CommandLineEvent::ForceNew;
523 }
524 else if ( aArg == "-o" )
525 {
526 // force open documents regardless if they are templates or not
527 eCurrentEvent = CommandLineEvent::ForceOpen;
528 }
529 else if ( oArg == "pt" )
530 {
531 // Print to special printer
532 eCurrentEvent = CommandLineEvent::PrintTo;
533 // first argument after "-pt" must be the printer name
534 if (supplier.next(&aArg))
535 m_printername = aArg;
536 else if (m_unknown.isEmpty())
537 m_unknown = "--pt must be followed by printername";
538 }
539 else if ( aArg == "-p" )
540 {
541 // Print to default printer
542 eCurrentEvent = CommandLineEvent::Print;
543 }
544 else if ( oArg == "view")
545 {
546 // open in viewmode
547 eCurrentEvent = CommandLineEvent::View;
548 }
549 else if ( oArg == "show" )
550 {
551 // open in viewmode
552 eCurrentEvent = CommandLineEvent::Start;
553 }
554 else if ( oArg == "display" )
555 {
556 // The command line argument following --display should
557 // always be treated as the argument of --display.
558 // --display and its argument are handled "out of line"
559 // in Unix-only desktop/unx/source/splashx.c and vcl/unx/*,
560 // and just ignored here
561 (void)supplier.next(&aArg);
562 }
563 else if ( oArg == "convert-to" )
564 {
565 eCurrentEvent = CommandLineEvent::Conversion;
566 // first argument must be the params
567 if (supplier.next(&aArg))
568 {
569 m_conversionparams = aArg;
570 // It doesn't make sense to use convert-to without headless.
571 setHeadless();
572 }
573 else if (m_unknown.isEmpty())
574 m_unknown = "--convert-to must be followed by output_file_extension[:output_filter_name]";
575 }
576 else if ( oArg == "print-to-file" )
577 {
578 eCurrentEvent = CommandLineEvent::BatchPrint;
579 }
580 else if ( oArg == "printer-name" )
581 {
582 if (eCurrentEvent == CommandLineEvent::BatchPrint)
583 {
584 // first argument is the printer name
585 if (supplier.next(&aArg))
586 m_printername = aArg;
587 else if (m_unknown.isEmpty())
588 m_unknown = "--printer-name must be followed by printername";
589 }
590 else if (m_unknown.isEmpty())
591 {
592 m_unknown = "--printer-name must directly follow --print-to-file";
593 }
594 }
595 else if ( oArg == "outdir" )
596 {
597 if (eCurrentEvent == CommandLineEvent::Conversion ||
598 eCurrentEvent == CommandLineEvent::BatchPrint)
599 {
600 if (supplier.next(&aArg))
601 m_conversionout = aArg;
602 else if (m_unknown.isEmpty())
603 m_unknown = "--outdir must be followed by output directory path";
604 }
605 else if (m_unknown.isEmpty())
606 {
607 m_unknown = "--outdir must directly follow either output filter specification of --convert-to, or --print-to-file or its printer specification";
608 }
609 }
610 else if ( eCurrentEvent == CommandLineEvent::Conversion
611 && oArg == "convert-images-to" )
612 {
613 if (supplier.next(&aArg))
614 m_convertimages = aArg;
615 else if (m_unknown.isEmpty())
616 m_unknown = "--convert-images-to must be followed by an image type";
617 }
618 else if ( aArg.startsWith("-") )
619 {
620 // because it's impossible to filter these options that
621 // are handled in the soffice shell script with the
622 // primitive tools that /bin/sh offers, ignore them here
623 if (
624#if defined UNX
625 oArg != "record" &&
626 oArg != "backtrace" &&
627 oArg != "strace" &&
628 oArg != "valgrind" &&
629 // for X Session Management, handled in
630 // vcl/unx/generic/app/sm.cxx:
631 oArg != "session=" &&
632#endif
633 //ignore additional legacy options that don't do anything anymore
634 oArg != "nocrashreport" &&
635 m_unknown.isEmpty())
636 {
637 m_unknown = aArg;
638 }
639 oDeprecatedArg.clear();
640 }
641 else
642 {
643 // handle this argument as a filename
644
645 // First check if this is an Office URI
646 // This will possibly adjust event for this argument
647 // and put real URI to aArg
648 CommandLineEvent eThisEvent = CheckOfficeURI(aArg, eCurrentEvent);
649
650 // Now check if this is a Web Query file
651 eThisEvent = CheckWebQuery(aArg, eThisEvent);
652
653 switch (eThisEvent)
654 {
655 case CommandLineEvent::Open:
656 m_openlist.push_back(aArg);
657 m_bDocumentArgs = true;
658 break;
659 case CommandLineEvent::View:
660 m_viewlist.push_back(aArg);
661 m_bDocumentArgs = true;
662 break;
663 case CommandLineEvent::Start:
664 m_startlist.push_back(aArg);
665 m_bDocumentArgs = true;
666 break;
667 case CommandLineEvent::Print:
668 m_printlist.push_back(aArg);
669 m_bDocumentArgs = true;
670 break;
671 case CommandLineEvent::PrintTo:
672 m_printtolist.push_back(aArg);
673 m_bDocumentArgs = true;
674 break;
675 case CommandLineEvent::ForceNew:
676 m_forcenewlist.push_back(aArg);
677 m_bDocumentArgs = true;
678 break;
679 case CommandLineEvent::ForceOpen:
680 m_forceopenlist.push_back(aArg);
681 m_bDocumentArgs = true;
682 break;
683 case CommandLineEvent::Conversion:
684 case CommandLineEvent::BatchPrint:
685 m_conversionlist.push_back(aArg);
686 break;
687 }
688 }
689
690 if (!oDeprecatedArg.isEmpty())
691 {
692 OString sArg(OUStringToOString(oDeprecatedArg, osl_getThreadTextEncoding()));
693 fprintf(stderr, "Warning: %s is deprecated. Use -%s instead.\n", sArg.getStr(), sArg.getStr());
694 }
695 }
696 }
697}
698
700{
701 m_minimized = false;
702 m_norestore = false;
703#if HAVE_FEATURE_UI
704 m_invisible = false;
705 m_headless = false;
706#else
707 m_invisible = true;
708 m_headless = true;
709#endif
710 m_eventtesting = false;
711 m_quickstart = false;
712 m_noquickstart = false;
713 m_terminateafterinit = false;
714 m_nologo = false;
715 m_nolockcheck = false;
716 m_nodefault = false;
717 m_help = false;
718 m_writer = false;
719 m_calc = false;
720 m_draw = false;
721 m_impress = false;
722 m_global = false;
723 m_math = false;
724 m_web = false;
725 m_base = false;
726 m_helpwriter = false;
727 m_helpcalc = false;
728 m_helpdraw = false;
729 m_helpbasic = false;
730 m_helpmath = false;
731 m_helpimpress = false;
732 m_helpbase = false;
733 m_version = false;
734 m_splashpipe = false;
735 m_bEmpty = true;
736 m_bDocumentArgs = false;
737 m_textcat = false;
738 m_scriptcat = false;
739 m_safemode = false;
740}
741
743{
744 return m_writer || m_calc || m_draw || m_impress || m_global || m_math
745 || m_web || m_base;
746}
747
748std::vector< OUString > CommandLineArgs::GetOpenList() const
749{
750 return translateExternalUris(m_openlist);
751}
752
753std::vector< OUString > CommandLineArgs::GetViewList() const
754{
755 return translateExternalUris(m_viewlist);
756}
757
758std::vector< OUString > CommandLineArgs::GetStartList() const
759{
760 return translateExternalUris(m_startlist);
761}
762
763std::vector< OUString > CommandLineArgs::GetForceOpenList() const
764{
765 return translateExternalUris(m_forceopenlist);
766}
767
768std::vector< OUString > CommandLineArgs::GetForceNewList() const
769{
770 return translateExternalUris(m_forcenewlist);
771}
772
773std::vector< OUString > CommandLineArgs::GetPrintList() const
774{
775 return translateExternalUris(m_printlist);
776}
777
778std::vector< OUString > CommandLineArgs::GetPrintToList() const
779{
780 return translateExternalUris(m_printtolist);
781}
782
783std::vector< OUString > CommandLineArgs::GetConversionList() const
784{
785 return translateExternalUris(m_conversionlist);
786}
787
789{
790 return translateExternalUris(m_conversionout);
791}
792
793} // namespace desktop
794
795/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
::boost::spirit::classic::rule< ScannerT > argument
XPropertyListType t
INetProtocol GetProtocol() const
Exception & operator=(Exception const &)
std::vector< OUString > GetForceNewList() const
std::vector< OUString > m_unaccept
std::vector< OUString > m_openlist
std::vector< OUString > m_infilter
std::vector< OUString > GetConversionList() const
std::vector< OUString > m_printtolist
std::vector< OUString > m_forceopenlist
std::vector< OUString > m_accept
OUString GetConversionOut() const
std::vector< OUString > GetViewList() const
std::vector< OUString > GetStartList() const
std::vector< OUString > GetPrintList() const
std::vector< OUString > m_conversionlist
std::vector< OUString > m_startlist
std::vector< OUString > GetForceOpenList() const
std::vector< OUString > m_printlist
std::vector< OUString > m_viewlist
std::vector< OUString > GetPrintToList() const
std::vector< OUString > GetOpenList() const
std::optional< OUString > m_cwdUrl
void ParseCommandLine_Impl(Supplier &supplier)
std::vector< OUString > m_forcenewlist
static bool getProcessWorkingDir(OUString &rUrl)
sal_uInt32 m_index
std::optional< OUString > m_cwdUrl
sal_uInt32 m_count
Reference< XOutputStream > stream
Mutex aMutex
#define SAL_WARN(area, stream)
def Print(s)
bool isActive()
Reference< XComponentContext > getProcessComponentContext()
Definition: app.cxx:165
css::uno::Reference< css::deployment::XPackageRegistry > create(css::uno::Reference< css::deployment::XPackageRegistry > const &xRootRegistry, OUString const &context, OUString const &cachePath, css::uno::Reference< css::uno::XComponentContext > const &xComponentContext)
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
long Long
virtual bool next(OUString *argument)=0
virtual std::optional< OUString > getCwdUrl()=0