[Libreoffice-commits] core.git: codemaker/source
Stephan Bergmann
sbergman at redhat.com
Fri Sep 23 13:26:15 UTC 2016
codemaker/source/cppumaker/cpputype.cxx | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
New commits:
commit 18cd08ae42b0fbd1e8ded8c046a5c801b30b968c
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Sep 23 15:17:30 2016 +0200
cid#1371162 etc.: Move semantics for cppumaker-generated UNO exception classes
For UNO ABI reasons, these classes need to be CPPU_GCC_DLLPUBLIC_EXPORT (so
their RTTI symbols get exported), so they are careful to explicitly declare any
special member functions that would otherwise be declared implicitly, to mark
them CPPU_GCC_DLLPRIVATE. But for LIBO_INTERNAL_ONLY, we always use
-fvisibility-inlines-hidden (except for MSVC, where it doesn't matter, as
CPPU_GCC_DLLPRIVATE expands to nothing there, either), so can leave those
functions implicitly declared, so not to prevent move ctor and move assign op
from being implicitly declared.
This covers cid#s 1371143, 1371162, 1371185, 1371189, 1371290, and 1371308.
Change-Id: I468088750a02f85a4790d956c37f4c30de03f00c
diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx
index 7eac4f0..e87fed0 100644
--- a/codemaker/source/cppumaker/cpputype.cxx
+++ b/codemaker/source/cppumaker/cpputype.cxx
@@ -2851,8 +2851,8 @@ void ExceptionType::dumpHppFile(
}
out << "}\n\n";
}
- out << indent() << id_ << "::" << id_ << "(" << id_
- << " const & the_other)";
+ out << "#if !defined LIBO_INTERNAL_ONLY\n" << indent() << id_ << "::" << id_
+ << "(" << id_ << " const & the_other)";
bFirst = true;
if (!base.isEmpty()) {
out << ": " << codemaker::cpp::scopedCppName(u2b(base))
@@ -2882,7 +2882,7 @@ void ExceptionType::dumpHppFile(
}
out << indent() << "return *this;\n";
dec();
- out << indent() << "}\n\n";
+ out << indent() << "}\n#endif\n\n";
if (codemaker::cppumaker::dumpNamespaceClose(out, name_, false)) {
out << "\n";
}
@@ -3066,10 +3066,11 @@ void ExceptionType::dumpDeclaration(FileStream & out) {
}
out << ");\n\n";
}
- out << indent() << "inline CPPU_GCC_DLLPRIVATE " << id_ << "(" << id_
+ out << "#if !defined LIBO_INTERNAL_ONLY\n" << indent()
+ << "inline CPPU_GCC_DLLPRIVATE " << id_ << "(" << id_
<< " const &);\n\n" << indent() << "inline CPPU_GCC_DLLPRIVATE ~"
<< id_ << "();\n\n" << indent() << "inline CPPU_GCC_DLLPRIVATE " << id_
- << " & operator =(" << id_ << " const &);\n\n";
+ << " & operator =(" << id_ << " const &);\n#endif\n\n";
for (std::vector< unoidl::ExceptionTypeEntity::Member >::const_iterator i(
entity_->getDirectMembers().begin());
i != entity_->getDirectMembers().end(); ++i)
More information about the Libreoffice-commits
mailing list