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