[Libreoffice-commits] core.git: 2 commits - offapi/type_reference unoidl/source
Stephan Bergmann
sbergman at redhat.com
Wed Sep 18 04:40:14 PDT 2013
offapi/type_reference/offapi.rdb |binary
unoidl/source/unoidl-read.cxx | 34 +++++++++++++++++++---------------
2 files changed, 19 insertions(+), 15 deletions(-)
New commits:
commit e3172bbaa08e6a097b0503860b2f4c60e5cc23be
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Sep 18 13:35:04 2013 +0200
Some fixes of the generated .idl output
Change-Id: I2d71e148f302ebfbf8d0fbfc74a7fb523b7bfcd4
diff --git a/unoidl/source/unoidl-read.cxx b/unoidl/source/unoidl-read.cxx
index f9c538b..2d3d00f 100644
--- a/unoidl/source/unoidl-read.cxx
+++ b/unoidl/source/unoidl-read.cxx
@@ -432,11 +432,14 @@ void indent(std::vector<OUString> const & modules, unsigned int extra = 0) {
}
}
-void closeModule(std::vector<OUString> & modules) {
- assert(!modules.empty());
- modules.pop_back();
- indent(modules);
- std::cout << "};\n";
+void closeModules(
+ std::vector<OUString> & modules, std::vector<OUString>::size_type n) {
+ for (std::vector<OUString>::size_type i = 0; i != n; ++i) {
+ assert(!modules.empty());
+ modules.pop_back();
+ indent(modules);
+ std::cout << "};\n";
+ }
}
OUString openModulesFor(std::vector<OUString> & modules, OUString const & name)
@@ -445,6 +448,10 @@ OUString openModulesFor(std::vector<OUString> & modules, OUString const & name)
for (sal_Int32 j = 0;;) {
OUString id(name.getToken(0, '.', j));
if (j == -1) {
+ closeModules(
+ modules,
+ static_cast< std::vector<OUString>::size_type >(
+ modules.end() - i));
indent(modules);
return id;
}
@@ -453,11 +460,10 @@ OUString openModulesFor(std::vector<OUString> & modules, OUString const & name)
++i;
continue;
}
- std::vector<OUString>::difference_type n = modules.end() - i;
- assert(n > 0);
- for (std::vector<OUString>::difference_type k = 0; k != n; ++k) {
- closeModule(modules);
- }
+ closeModules(
+ modules,
+ static_cast< std::vector<OUString>::size_type >(
+ modules.end() - i));
i = modules.end();
}
indent(modules);
@@ -785,7 +791,7 @@ void writeEntity(
writeAnnotationsPublished(ent);
std::cout << "typedef ";
writeType(ent2->getType());
- std::cout << id << ";\n";
+ std::cout << ' ' << id << ";\n";
break;
}
case unoidl::Entity::SORT_CONSTANT_GROUP:
@@ -839,7 +845,7 @@ void writeEntity(
std::cout << (j->value.booleanValue ? "TRUE" : "FALSE");
break;
case unoidl::ConstantValue::TYPE_BYTE:
- std::cout << j->value.byteValue;
+ std::cout << int(j->value.byteValue);
break;
case unoidl::ConstantValue::TYPE_SHORT:
std::cout << j->value.shortValue;
@@ -1093,9 +1099,7 @@ SAL_IMPLEMENT_MAIN() {
{
writeEntity(ents, mods, *i);
}
- while (!mods.empty()) {
- closeModule(mods);
- }
+ closeModules(mods, mods.size());
return EXIT_SUCCESS;
} catch (unoidl::FileFormatException & e1) {
std::cerr
commit 01a17e01d2f262a01cc87bb26fa2cd4a58e7cb07
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Sep 18 12:49:52 2013 +0200
Revert inadvertent changes of binary offapi/type_reference/offapi.rdb
...from 6ea6a422fbb6279c6fc589e86603a6864273229d
"s/wiki.services.openoffice.org/wiki.openoffice.org/g" which had caused that
offapi.rdb to be broken and effectively empty, silently reducing the
compatibility check against it to check nothing.
Change-Id: Id35d9a7c0b848faf3a9d4458b63e1d5240817c7c
diff --git a/offapi/type_reference/offapi.rdb b/offapi/type_reference/offapi.rdb
index b4c15e9..9c0eae1 100644
Binary files a/offapi/type_reference/offapi.rdb and b/offapi/type_reference/offapi.rdb differ
More information about the Libreoffice-commits
mailing list