Reduce space needed for string literals

...as had been done in 68ba6ddef5 "codemaker:
Allow compiler to share these generated strings" and
2188a7ac2e "Reduce the amount of strings in the
release builds," and then undone in 759eb79d88
"give useful details in non-debug mode too"

Change-Id: Ic888d6c47449da3b3a084f863a7e0526f201a967
This commit is contained in:
Stephan Bergmann
2015-12-01 09:29:18 +01:00
parent be6a428c08
commit 03b9d1e720

View File

@@ -3442,13 +3442,11 @@ private:
rtl::Reference< unoidl::SingleInterfaceBasedServiceEntity > entity_; rtl::Reference< unoidl::SingleInterfaceBasedServiceEntity > entity_;
}; };
static OUString failsToSupply(const OUString& name_, const OString& baseName) static void failsToSupply(
FileStream & o, OUString const & service, OString const & type)
{ {
return OUString( o << "::rtl::OUString(\"component context fails to supply service \") + \""
"\n" << service << "\" + \" of type \" + \"" << type << "\"";
"\n"
" ::rtl::OUString(\"component context fails to supply service '" + name_ + "' of type '" + OStringToOUString(baseName, RTL_TEXTENCODING_UTF8) + "'\")\n"
"\n");
} }
void ServiceType::dumpHxxFile( void ServiceType::dumpHxxFile(
@@ -3586,18 +3584,16 @@ void ServiceType::dumpHxxFile(
o << indent() o << indent()
<< ("} catch (const ::css::uno::Exception & the_exception) {\n"); << ("} catch (const ::css::uno::Exception & the_exception) {\n");
inc(); inc();
o << indent() o << indent() << "throw ::css::uno::DeploymentException(";
<< "throw ::css::uno::DeploymentException(" failsToSupply(o, name_, baseName);
<< failsToSupply(name_, baseName) o << " + \": \" + the_exception.Message, the_context);\n";
<< " + \": \" + the_exception.Message, the_context);\n";
dec(); dec();
o << indent() << "}\n" << indent() o << indent() << "}\n" << indent()
<< "if (!the_instance.is()) {\n"; << "if (!the_instance.is()) {\n";
inc(); inc();
o << indent() o << indent() << "throw ::css::uno::DeploymentException(";
<< "throw ::css::uno::DeploymentException(" failsToSupply(o, name_, baseName);
<< failsToSupply(name_, baseName) o << ", the_context);\n";
<< ", the_context);\n";
dec(); dec();
o << indent() << "}\n" << indent() << "return the_instance;\n"; o << indent() << "}\n" << indent() << "return the_instance;\n";
dec(); dec();
@@ -3747,19 +3743,17 @@ void ServiceType::dumpHxxFile(
<< ("} catch (const ::css::uno::Exception &" << ("} catch (const ::css::uno::Exception &"
" the_exception) {\n"); " the_exception) {\n");
inc(); inc();
o << indent() o << indent() << "throw ::css::uno::DeploymentException(";
<< "throw ::css::uno::DeploymentException(" failsToSupply(o, name_, baseName);
<< failsToSupply(name_, baseName) o << " + \": \" + the_exception.Message, the_context);\n";
<< " + \": \" + the_exception.Message, the_context);\n";
dec(); dec();
o << indent() << "}\n"; o << indent() << "}\n";
} }
o << indent() << "if (!the_instance.is()) {\n"; o << indent() << "if (!the_instance.is()) {\n";
inc(); inc();
o << indent() o << indent() << "throw ::css::uno::DeploymentException(";
<< "throw ::css::uno::DeploymentException(" failsToSupply(o, name_, baseName);
<< failsToSupply(name_, baseName) o << ", the_context);\n";
<< ", the_context);\n";
dec(); dec();
o << indent() << "}\n" << indent() << "return the_instance;\n"; o << indent() << "}\n" << indent() << "return the_instance;\n";
dec(); dec();