20#include <config_version.h>
21#include <osl/endian.h>
23#include <osl/file.hxx>
24#include <osl/process.h>
25#include <rtl/byteseq.hxx>
26#include <rtl/process.h>
27#include <rtl/string.h>
28#include <rtl/string.hxx>
29#include <rtl/textenc.h>
30#include <rtl/textcvt.h>
31#include <rtl/ustring.hxx>
40 <<
"Usage:" << std::endl << std::endl
41 <<
" unoidl-write [<registries>] [@<entities file>] <unoidl file>"
42 << std::endl << std::endl
43 << (
"where each <registry> is either a new- or legacy-format .rdb file,"
46 << (
"file, or a root directory of an .idl file tree; and the UTF-8"
49 << (
"file> contains zero or more space-separated names of (non-module)"
52 << (
"include in the output, and, if omitted, defaults to the complete"
54 << std::endl <<
"last <registry>, if any." << std::endl;
55 std::exit(EXIT_FAILURE);
58OUString getArgumentUri(sal_uInt32 argument,
bool * entities) {
60 rtl_getAppCommandArg(argument, &arg.pData);
61 if (arg.startsWith(
"@", &arg)) {
62 if (entities ==
nullptr) {
66 }
else if (entities !=
nullptr) {
70 osl::FileBase::RC e1 = osl::FileBase::getFileURLFromSystemPath(arg, url);
71 if (e1 != osl::FileBase::E_None) {
73 <<
"Cannot convert \"" << arg <<
"\" to file URL, error code "
75 std::exit(EXIT_FAILURE);
78 oslProcessError e2 = osl_getProcessWorkingDir(&cwd.pData);
79 if (e2 != osl_Process_E_None) {
81 <<
"Cannot obtain working directory, error code " << +e2
83 std::exit(EXIT_FAILURE);
86 e1 = osl::FileBase::getAbsoluteFileURL(cwd, url, abs);
87 if (e1 != osl::FileBase::E_None) {
89 <<
"Cannot make \"" << url
90 <<
"\" into an absolute file URL, error code " << +e1 << std::endl;
91 std::exit(EXIT_FAILURE);
96sal_uInt64 getOffset(osl::File & file) {
98 osl::FileBase::RC e = file.getPos(off);
99 if (e != osl::FileBase::E_None) {
101 <<
"Cannot determine current position in <" << file.getURL()
102 <<
">, error code " << +e << std::endl;
103 std::exit(EXIT_FAILURE);
108void write(osl::File & file,
void const * buffer, sal_uInt64 size) {
110 osl::FileBase::RC e = file.write(buffer, size, n);
111 if (e != osl::FileBase::E_None) {
113 <<
"Cannot write to <" << file.getURL() <<
">, error code " << +e
115 std::exit(EXIT_FAILURE);
119 <<
"Bad write of " <<
n <<
" instead of " <<
size <<
" bytes to <"
120 << file.getURL() <<
'>' << std::endl;
121 std::exit(EXIT_FAILURE);
125void write8(osl::File & file, sal_uInt64 value) {
128 <<
"Cannot write value >= 2^8; input is too large" << std::endl;
129 std::exit(EXIT_FAILURE);
131 unsigned char buf[1];
132 buf[0] =
value & 0xFF;
133 write(file, buf, std::size(buf));
136void write16(osl::File & file, sal_uInt64 value) {
137 if (value > 0xFFFF) {
139 <<
"Cannot write value >= 2^16; input is too large" << std::endl;
140 std::exit(EXIT_FAILURE);
142 unsigned char buf[2];
143 buf[0] =
value & 0xFF;
144 buf[1] = (
value >> 8) & 0xFF;
145 write(file, buf, std::size(buf));
148void write32(osl::File & file, sal_uInt64 value) {
149 if (value > 0xFFFFFFFF) {
151 <<
"Cannot write value >= 2^32; input is too large" << std::endl;
152 std::exit(EXIT_FAILURE);
154 unsigned char buf[4];
155 buf[0] =
value & 0xFF;
156 buf[1] = (
value >> 8) & 0xFF;
157 buf[2] = (
value >> 16) & 0xFF;
158 buf[3] = (
value >> 24) & 0xFF;
159 write(file, buf, std::size(buf));
162void write64(osl::File & file, sal_uInt64 value) {
163 unsigned char buf[8];
164 buf[0] =
value & 0xFF;
165 buf[1] = (
value >> 8) & 0xFF;
166 buf[2] = (
value >> 16) & 0xFF;
167 buf[3] = (
value >> 24) & 0xFF;
168 buf[4] = (
value >> 32) & 0xFF;
169 buf[5] = (
value >> 40) & 0xFF;
170 buf[6] = (
value >> 48) & 0xFF;
171 buf[7] = (
value >> 56) & 0xFF;
172 write(file, buf, std::size(buf));
175void writeIso60599Binary32(osl::File & file,
float value) {
177 unsigned char buf[4];
181#if defined OSL_BIGENDIAN
182 std::swap(sa.buf[0], sa.buf[3]);
183 std::swap(sa.buf[1], sa.buf[2]);
185 write(file, sa.buf, std::size(sa.buf));
188void writeIso60599Binary64(osl::File & file,
double value) {
190 unsigned char buf[8];
194#if defined OSL_BIGENDIAN
195 std::swap(sa.buf[0], sa.buf[7]);
196 std::swap(sa.buf[1], sa.buf[6]);
197 std::swap(sa.buf[2], sa.buf[5]);
198 std::swap(sa.buf[3], sa.buf[4]);
200 write(file, sa.buf, std::size(sa.buf));
203OString toAscii(OUString
const & name) {
205 if (!
name.convertToString(
206 &ascii, RTL_TEXTENCODING_ASCII_US,
207 (RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR
208 | RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR)))
211 <<
"Cannot convert \"" <<
name <<
"\" to US ASCII" << std::endl;
212 std::exit(EXIT_FAILURE);
217OString toUtf8(OUString
const &
string) {
219 if (!
string.convertToString(
220 &ascii, RTL_TEXTENCODING_UTF8,
221 (RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR
222 | RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR)))
225 <<
"Cannot convert \"" <<
string <<
"\" to UTF-8" << std::endl;
226 std::exit(EXIT_FAILURE);
231sal_uInt64 writeNulName(osl::File & file, OUString
const & name) {
232 OString ascii(toAscii(name));
233 if (ascii.indexOf(
'\0') != -1) {
235 <<
"Name \"" << ascii <<
"\" contains NUL characters" << std::endl;
236 std::exit(EXIT_FAILURE);
238 sal_uInt64 off = getOffset(file);
239 write(file, ascii.getStr(), ascii.getLength() + 1);
243void writeIdxString(osl::File & file, OString
const &
string) {
244 static std::map< OString, sal_uInt64 > reuse;
245 std::map< OString, sal_uInt64 >::iterator
i(reuse.find(
string));
246 if (i == reuse.end()) {
247 reuse.insert(std::make_pair(
string, getOffset(file)));
249 (
static_cast< sal_uInt64
>(
string.
getLength()) & 0x80000000) == 0);
250 write32(file,
static_cast< sal_uInt64
>(
string.
getLength()));
251 write(file,
string.getStr(),
string.
getLength());
253 if ((
i->second & 0x80000000) != 0) {
255 <<
"Cannot write index 0x" << std::hex <<
i->second << std::dec
256 <<
" of \"" <<
string <<
"\"; input is too large" << std::endl;
257 std::exit(EXIT_FAILURE);
259 write32(file,
i->second | 0x80000000);
263void writeIdxName(osl::File & file, OUString
const & name) {
264 writeIdxString(file, toAscii(name));
267void writeAnnotations(
268 osl::File & file,
bool annotate,
269 std::vector< OUString >
const & annotations)
271 assert(annotate || annotations.empty());
273 write32(file, annotations.size());
275 for (
auto & i: annotations) {
276 writeIdxString(file, toUtf8(i));
284 bool annotated,
bool flag =
false)
287 sal_uInt64
v = entity->getSort();
288 if (entity->isPublished()) {
302 entity(
std::move(theEntity)), nameOffset(0), dataOffset(0)
306 std::map< OUString, Item >
module;
307 sal_uInt64 nameOffset;
308 sal_uInt64 dataOffset;
314 std::vector< OUString >&& theAnnotations):
315 constant(theConstant), annotations(
std::move(theAnnotations)), nameOffset(0),
320 std::vector< OUString > annotations;
321 sal_uInt64 nameOffset;
322 sal_uInt64 dataOffset;
327 std::map< OUString, Item > &
map)
331 osl::FileBase::RC e = f.open(osl_File_OpenFlag_Read);
332 if (e != osl::FileBase::E_None) {
334 <<
"Cannot open <" << f.getURL() <<
"> for reading, error code "
336 std::exit(EXIT_FAILURE);
340 e = f.isEndOfFile(&eof);
341 if (e != osl::FileBase::E_None) {
343 <<
"Cannot check <" << f.getURL() <<
"> for EOF, error code "
345 std::exit(EXIT_FAILURE);
350 rtl::ByteSequence s1;
352 if (e != osl::FileBase::E_None) {
354 <<
"Cannot read from <" << f.getURL() <<
">, error code "
356 std::exit(EXIT_FAILURE);
359 if (!rtl_convertStringToUString(
360 &s2.pData,
reinterpret_cast< char const *
>(s1.getConstArray()),
361 s1.getLength(), RTL_TEXTENCODING_UTF8,
362 (RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_ERROR
363 | RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_ERROR
364 | RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR)))
367 <<
"Cannot interpret line read from <" << f.getURL()
368 <<
"> as UTF-8" << std::endl;
369 std::exit(EXIT_FAILURE);
371 for (sal_Int32 i = 0;
i != -1;) {
372 OUString
t(s2.getToken(0,
' ', i));
377 <<
"Unknown entity \"" <<
t <<
"\" read from <"
378 << f.getURL() <<
">" << std::endl;
379 std::exit(EXIT_FAILURE);
383 <<
"Module entity \"" <<
t <<
"\" read from <"
384 << f.getURL() <<
">" << std::endl;
385 std::exit(EXIT_FAILURE);
387 std::map< OUString, Item > * map2 = &
map;
388 for (sal_Int32 j = 0;;) {
389 OUString id(
t.getToken(0,
'.', j));
391 map2->insert(std::make_pair(
id, Item(ent)));
394 std::map< OUString, Item >::iterator k(map2->find(
id));
395 if (k == map2->end()) {
397 manager->findEntity(
t.copy(0, j - 1)));
399 k = map2->insert(std::make_pair(
id, Item(ent2))).first;
402 k->second.entity->getSort()
404 map2 = &k->second.module;
410 if (e != osl::FileBase::E_None) {
412 <<
"Cannot close <" << f.getURL() <<
"> after reading, error code "
414 std::exit(EXIT_FAILURE);
420 std::map< OUString, Item > &
map)
431 std::pair< std::map< OUString, Item >::iterator,
bool >
i(
432 map.insert(std::make_pair(name, Item(ent))));
434 std::cout <<
"Duplicate name \"" <<
name <<
'"' << std::endl;
435 std::exit(EXIT_FAILURE);
437 if (
i.first->second.entity->getSort()
443 i.first->second.entity.get()))->createCursor(),
444 i.first->second.module);
450bool hasNotEmptyAnnotations(
const std::vector<T>& v)
452 return std::any_of(
v.begin(),
v.end(), [](
const T& rItem) { return !rItem.annotations.empty(); });
456 osl::File & file, std::map< OUString, Item > &
map, std::size_t * rootSize)
458 for (
auto & i:
map) {
459 switch (
i.second.entity->getSort()) {
461 i.second.dataOffset = writeMap(file,
i.second.module,
nullptr);
467 i.second.entity.get()));
468 bool ann = !ent2->getAnnotations().empty() ||
469 hasNotEmptyAnnotations(ent2->getMembers());
470 i.second.dataOffset = getOffset(file);
471 writeKind(file, ent2, ann);
472 write32(file, ent2->getMembers().size());
473 for (
auto & j: ent2->getMembers()) {
474 writeIdxName(file, j.name);
475 write32(file,
static_cast< sal_uInt32
>(j.value));
476 writeAnnotations(file, ann, j.annotations);
478 writeAnnotations(file, ann, ent2->getAnnotations());
485 i.second.entity.get()));
486 bool ann = !ent2->getAnnotations().empty() ||
487 hasNotEmptyAnnotations(ent2->getDirectMembers());
488 i.second.dataOffset = getOffset(file);
490 file, ent2, ann, !ent2->getDirectBase().isEmpty());
491 if (!ent2->getDirectBase().isEmpty()) {
492 writeIdxName(file, ent2->getDirectBase());
494 write32(file, ent2->getDirectMembers().size());
495 for (
auto & j: ent2->getDirectMembers()) {
496 writeIdxName(file, j.name);
497 writeIdxName(file, j.type);
498 writeAnnotations(file, ann, j.annotations);
500 writeAnnotations(file, ann, ent2->getAnnotations());
509 i.second.entity.get()));
510 bool ann = !ent2->getAnnotations().empty() ||
511 hasNotEmptyAnnotations(ent2->getMembers());
512 i.second.dataOffset = getOffset(file);
513 writeKind(file, ent2, ann);
514 write32(file, ent2->getTypeParameters().size());
515 for (
auto & j: ent2->getTypeParameters()) {
516 writeIdxName(file, j);
518 write32(file, ent2->getMembers().size());
519 for (
auto & j: ent2->getMembers()) {
521 if (j.parameterized) {
525 writeIdxName(file, j.name);
526 writeIdxName(file, j.type);
527 writeAnnotations(file, ann, j.annotations);
529 writeAnnotations(file, ann, ent2->getAnnotations());
536 i.second.entity.get()));
537 bool ann = !ent2->getAnnotations().empty() ||
538 hasNotEmptyAnnotations(ent2->getDirectMembers());
539 i.second.dataOffset = getOffset(file);
541 file, ent2, ann, !ent2->getDirectBase().isEmpty());
542 if (!ent2->getDirectBase().isEmpty()) {
543 writeIdxName(file, ent2->getDirectBase());
545 write32(file, ent2->getDirectMembers().size());
546 for (
auto & j: ent2->getDirectMembers()) {
547 writeIdxName(file, j.name);
548 writeIdxName(file, j.type);
549 writeAnnotations(file, ann, j.annotations);
551 writeAnnotations(file, ann, ent2->getAnnotations());
558 i.second.entity.get()));
559 bool ann = !ent2->getAnnotations().empty() ||
560 hasNotEmptyAnnotations(ent2->getDirectMandatoryBases()) ||
561 hasNotEmptyAnnotations(ent2->getDirectOptionalBases()) ||
562 hasNotEmptyAnnotations(ent2->getDirectAttributes()) ||
563 hasNotEmptyAnnotations(ent2->getDirectMethods());
564 i.second.dataOffset = getOffset(file);
565 writeKind(file, ent2, ann);
566 write32(file, ent2->getDirectMandatoryBases().size());
567 for (
auto & j: ent2->getDirectMandatoryBases()) {
568 writeIdxName(file, j.name);
569 writeAnnotations(file, ann, j.annotations);
571 write32(file, ent2->getDirectOptionalBases().size());
572 for (
auto & j: ent2->getDirectOptionalBases()) {
573 writeIdxName(file, j.name);
574 writeAnnotations(file, ann, j.annotations);
576 write32(file, ent2->getDirectAttributes().size());
577 for (
auto & j: ent2->getDirectAttributes()) {
586 writeIdxName(file, j.name);
587 writeIdxName(file, j.type);
588 write32(file, j.getExceptions.size());
589 for (
auto & k: j.getExceptions) {
590 writeIdxName(file, k);
593 write32(file, j.setExceptions.size());
594 for (
auto & k: j.setExceptions) {
595 writeIdxName(file, k);
598 writeAnnotations(file, ann, j.annotations);
600 write32(file, ent2->getDirectMethods().size());
601 for (
auto & j: ent2->getDirectMethods()) {
602 writeIdxName(file, j.name);
603 writeIdxName(file, j.returnType);
604 write32(file, j.parameters.size());
605 for (
auto & k: j.parameters) {
606 write8(file, k.direction);
607 writeIdxName(file, k.name);
608 writeIdxName(file, k.type);
610 write32(file, j.exceptions.size());
611 for (
auto & k: j.exceptions) {
612 writeIdxName(file, k);
614 writeAnnotations(file, ann, j.annotations);
616 writeAnnotations(file, ann, ent2->getAnnotations());
623 i.second.entity.get()));
624 bool ann = !ent2->getAnnotations().empty();
625 i.second.dataOffset = getOffset(file);
626 writeKind(file, ent2, ann);
627 writeIdxName(file, ent2->getType());
628 writeAnnotations(file, ann, ent2->getAnnotations());
635 i.second.entity.get()));
636 std::map< OUString, ConstItem > cmap;
637 for (
auto & j: ent2->getMembers()) {
640 j.name, ConstItem(j.value, std::vector(j.annotations)))).
644 <<
"Duplicate constant group member name \""
645 << j.name <<
'"' << std::endl;
646 std::exit(EXIT_FAILURE);
649 for (
auto & j: cmap) {
650 j.second.dataOffset = getOffset(file);
651 sal_uInt64
v = j.second.constant.type;
652 if (!j.second.annotations.empty()) {
656 switch (j.second.constant.type) {
658 write8(file, j.second.constant.booleanValue ? 1 : 0);
664 j.second.constant.byteValue));
669 static_cast< sal_uInt16
>(
670 j.second.constant.shortValue));
673 write16(file, j.second.constant.unsignedShortValue);
678 static_cast< sal_uInt32
>(
679 j.second.constant.longValue));
682 write32(file, j.second.constant.unsignedLongValue);
687 static_cast< sal_uInt64
>(
688 j.second.constant.hyperValue));
691 write64(file, j.second.constant.unsignedHyperValue);
694 writeIso60599Binary32(
695 file, j.second.constant.floatValue);
698 writeIso60599Binary64(
699 file, j.second.constant.doubleValue);
702 for (;;) { std::abort(); }
705 file, !j.second.annotations.empty(),
706 j.second.annotations);
708 for (
auto & j: cmap) {
709 j.second.nameOffset = writeNulName(file, j.first);
711 bool ann = !ent2->getAnnotations().empty();
712 i.second.dataOffset = getOffset(file);
713 writeKind(file, ent2, ann);
714 write32(file, cmap.size());
717 for (
const auto & j: cmap) {
718 write32(file, j.second.nameOffset);
719 write32(file, j.second.dataOffset);
721 writeAnnotations(file, ann, ent2->getAnnotations());
730 i.second.entity.get()));
731 bool dfltCtor = ent2->getConstructors().size() == 1
732 && ent2->getConstructors()[0].defaultConstructor;
733 bool ann = !ent2->getAnnotations().empty();
734 if (!dfltCtor && !ann)
735 ann = hasNotEmptyAnnotations(ent2->getConstructors());
736 i.second.dataOffset = getOffset(file);
737 writeKind(file, ent2, ann, dfltCtor);
738 writeIdxName(file, ent2->getBase());
740 write32(file, ent2->getConstructors().size());
741 for (
auto & j: ent2->getConstructors()) {
742 if (j.defaultConstructor) {
744 <<
"Unexpected default constructor \""
745 << j.name <<
'"' << std::endl;
746 std::exit(EXIT_FAILURE);
748 writeIdxName(file, j.name);
749 write32(file, j.parameters.size());
750 for (
auto & k: j.parameters) {
756 writeIdxName(file, k.name);
757 writeIdxName(file, k.type);
759 write32(file, j.exceptions.size());
760 for (
auto & k: j.exceptions) {
761 writeIdxName(file, k);
763 writeAnnotations(file, ann, j.annotations);
766 writeAnnotations(file, ann, ent2->getAnnotations());
773 i.second.entity.get()));
774 bool ann = !ent2->getAnnotations().empty() ||
775 hasNotEmptyAnnotations(ent2->getDirectMandatoryBaseServices()) ||
776 hasNotEmptyAnnotations(ent2->getDirectOptionalBaseServices()) ||
777 hasNotEmptyAnnotations(ent2->getDirectMandatoryBaseInterfaces()) ||
778 hasNotEmptyAnnotations(ent2->getDirectOptionalBaseInterfaces()) ||
779 hasNotEmptyAnnotations(ent2->getDirectProperties());
780 i.second.dataOffset = getOffset(file);
781 writeKind(file, ent2, ann);
782 write32(file, ent2->getDirectMandatoryBaseServices().size());
783 for (
auto & j: ent2->getDirectMandatoryBaseServices()) {
784 writeIdxName(file, j.name);
785 writeAnnotations(file, ann, j.annotations);
787 write32(file, ent2->getDirectOptionalBaseServices().size());
788 for (
auto & j: ent2->getDirectOptionalBaseServices()) {
789 writeIdxName(file, j.name);
790 writeAnnotations(file, ann, j.annotations);
792 write32(file, ent2->getDirectMandatoryBaseInterfaces().size());
793 for (
auto & j: ent2->getDirectMandatoryBaseInterfaces()) {
794 writeIdxName(file, j.name);
795 writeAnnotations(file, ann, j.annotations);
797 write32(file, ent2->getDirectOptionalBaseInterfaces().size());
798 for (
auto & j: ent2->getDirectOptionalBaseInterfaces()) {
799 writeIdxName(file, j.name);
800 writeAnnotations(file, ann, j.annotations);
802 write32(file, ent2->getDirectProperties().size());
803 for (
auto & j: ent2->getDirectProperties()) {
804 write16(file,
static_cast< sal_uInt16
>(j.attributes));
805 writeIdxName(file, j.name);
806 writeIdxName(file, j.type);
807 writeAnnotations(file, ann, j.annotations);
809 writeAnnotations(file, ann, ent2->getAnnotations());
816 i.second.entity.get()));
817 bool ann = !ent2->getAnnotations().empty();
818 i.second.dataOffset = getOffset(file);
819 writeKind(file, ent2, ann);
820 writeIdxName(file, ent2->getBase());
821 writeAnnotations(file, ann, ent2->getAnnotations());
828 i.second.entity.get()));
829 bool ann = !ent2->getAnnotations().empty();
830 i.second.dataOffset = getOffset(file);
831 writeKind(file, ent2, ann);
832 writeIdxName(file, ent2->getBase());
833 writeAnnotations(file, ann, ent2->getAnnotations());
838 for (
auto & i:
map) {
839 i.second.nameOffset = writeNulName(file,
i.first);
841 sal_uInt64 off = getOffset(file);
842 if (rootSize ==
nullptr) {
844 write32(file,
map.size());
847 *rootSize =
map.size();
850 for (
const auto & i:
map) {
851 write32(file,
i.second.nameOffset);
852 write32(file,
i.second.dataOffset);
861 sal_uInt32
args = rtl_getAppCommandArgCount();
866 bool entities =
false;
868 std::map< OUString, Item >
map;
869 for (sal_uInt32
i = 0;
i !=
args - 1; ++
i) {
871 OUString uri(getArgumentUri(
i,
i ==
args - 2 ? &entities :
nullptr));
873 mapEntities(mgr, uri,
map);
876 prov = mgr->addProvider(uri);
879 <<
"Input <" << uri <<
"> does not exist" << std::endl;
880 std::exit(EXIT_FAILURE);
887 ? prov->createRootCursor()
891 osl::File f(getArgumentUri(
args - 1,
nullptr));
892 osl::FileBase::RC e = f.open(osl_File_OpenFlag_Write);
893 if (e == osl::FileBase::E_NOENT) {
894 e = f.open(osl_File_OpenFlag_Write | osl_File_OpenFlag_Create);
896 if (e != osl::FileBase::E_None) {
898 <<
"Cannot open <" << f.getURL() <<
"> for writing, error code "
900 std::exit(EXIT_FAILURE);
902 write(f,
"UNOIDL\xFF\0", 8);
907 RTL_CONSTASCII_STRINGPARAM(
908 "\0** Created by LibreOffice " LIBO_VERSION_DOTTED
909 " unoidl-write **\0"));
911 sal_uInt64 off = writeMap(f,
map, &
size);
912 e = f.setSize(getOffset(f));
913 if (e != osl::FileBase::E_None) {
915 <<
"Cannot set size of <" << f.getURL() <<
">, error code "
917 std::exit(EXIT_FAILURE);
919 e = f.setPos(osl_Pos_Absolut, 8);
920 if (e != osl::FileBase::E_None) {
922 <<
"Cannot rewind current position in <" << f.getURL()
923 <<
">, error code " << +e << std::endl;
924 std::exit(EXIT_FAILURE);
930 if (e != osl::FileBase::E_None) {
932 <<
"Cannot close <" << f.getURL()
933 <<
"> after writing, error code " << +e << std::endl;
934 std::exit(EXIT_FAILURE);
941 std::exit(EXIT_FAILURE);
942 }
catch (std::exception & e1) {
944 <<
"Failure: " << e1.what()
946 std::exit(EXIT_FAILURE);
@ SORT_ACCUMULATION_BASED_SERVICE
@ SORT_SINGLE_INTERFACE_BASED_SERVICE
@ SORT_POLYMORPHIC_STRUCT_TYPE_TEMPLATE
@ SORT_INTERFACE_BASED_SINGLETON
@ SORT_SERVICE_BASED_SINGLETON
rtl::Reference< ParseManager > manager
double getLength(const B2DPolygon &rCandidate)
SwNodeOffset abs(const SwNodeOffset &a)
std::map< OUString, rtl::Reference< Entity > > map