summaryrefslogtreecommitdiff
path: root/unodevtools
diff options
context:
space:
mode:
authorThorsten Behrens <tbehrens@suse.com>2012-11-29 21:26:09 +0100
committerThorsten Behrens <tbehrens@suse.com>2012-11-30 14:36:36 +0100
commit66a175834c39ccde9475eac3adb72a843110d01f (patch)
treeef925daaf84a85731525c2b14f0cd4a2ed84e2de /unodevtools
parent90eac3e69749a9227c4b6902b1f3cef1e338c6d1 (diff)
c++ API: use css alias in generated headers, adds global css decl
This changes all generated API headers (.hpp and .hdl) to use a namespace alias 'css' instead of the pointlessly long com::sun::star Makes the change in cppumaker & associated tools, adds a global namespace alias definition in sal/types.h, and removes a kiloton of local, now pointless-to-harmful versions of that alias from all over the code. Change-Id: Ice5a644a6b971a981f01dc0589d48f5add31cc0f
Diffstat (limited to 'unodevtools')
-rw-r--r--unodevtools/source/skeletonmaker/cppcompskeleton.cxx28
-rw-r--r--unodevtools/source/skeletonmaker/cpptypemaker.cxx8
2 files changed, 18 insertions, 18 deletions
diff --git a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
index 21dec5f8ec40..8f42cd4d575a 100644
--- a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
+++ b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
@@ -282,7 +282,7 @@ void generateXPropertyAccessBodies(std::ostream& o,
o << "css::uno::Sequence< css::beans::PropertyValue > SAL_CALL "
<< classname << "getPropertyValues( ) throw ("
- "::com::sun::star::uno::RuntimeException)\n{\n"
+ "css::uno::RuntimeException)\n{\n"
" return ::cppu::PropertySetMixin< "
<< propertyhelper << " >::getPropertyValues();\n}\n\n";
@@ -297,7 +297,7 @@ void generateXPropertyAccessBodies(std::ostream& o,
void generateXLocalizable(std::ostream& o, const OString & classname)
{
- o << "// ::com::sun::star::lang::XLocalizable:\n"
+ o << "// css::lang::XLocalizable:\n"
"void SAL_CALL " << classname << "setLocale(const css::lang::"
"Locale & eLocale) throw (css::uno::RuntimeException)\n{\n"
" m_locale = eLocale;\n}\n\n"
@@ -307,7 +307,7 @@ void generateXLocalizable(std::ostream& o, const OString & classname)
void generateXAddInBodies(std::ostream& o, const OString & classname)
{
- o << "// ::com::sun::star::sheet::XAddIn:\n";
+ o << "// css::sheet::XAddIn:\n";
o << "::rtl::OUString SAL_CALL " << classname << "getProgrammaticFuntionName("
"const ::rtl::OUString & aDisplayName) throw (css::uno::RuntimeException)"
@@ -362,7 +362,7 @@ void generateXAddInBodies(std::ostream& o, const OString & classname)
void generateXCompatibilityNamesBodies(std::ostream& o, const OString & classname)
{
- o << "// ::com::sun::star::sheet::XCompatibilityNames:\n"
+ o << "// css::sheet::XCompatibilityNames:\n"
"css::uno::Sequence< css::sheet::LocalizedName > SAL_CALL " << classname
<< "getCompatibilityNames(const ::rtl::OUString & aProgrammaticName) throw "
"(css::uno::RuntimeException)\n{\n css::uno::Sequence< "
@@ -401,7 +401,7 @@ void generateXCompatibilityNamesBodies(std::ostream& o, const OString & classnam
void generateXInitialization(std::ostream& o, const OString & classname)
{
- o << "// ::com::sun::star::lang::XInitialization:\n"
+ o << "// css::lang::XInitialization:\n"
"void SAL_CALL " << classname << "initialize( const css::uno::Sequence< "
"css::uno::Any >& aArguments ) "
"throw (css::uno::Exception, css::uno::RuntimeException)\n{\n"
@@ -416,7 +416,7 @@ void generateXDispatch(std::ostream& o,
{
// com.sun.star.frame.XDispatch
// dispatch
- o << "// ::com::sun::star::frame::XDispatch:\n"
+ o << "// css::frame::XDispatch:\n"
"void SAL_CALL " << classname << "dispatch( const css::util::URL& aURL, const "
"css::uno::Sequence< css::beans::PropertyValue >& aArguments ) throw"
"(css::uno::RuntimeException)\n{\n";
@@ -458,7 +458,7 @@ void generateXDispatchProvider(std::ostream& o,
// com.sun.star.frame.XDispatchProvider
// queryDispatch
- o << "// ::com::sun::star::frame::XDispatchProvider:\n"
+ o << "// css::frame::XDispatchProvider:\n"
"css::uno::Reference< css::frame::XDispatch > SAL_CALL " << classname
<< "queryDispatch( const css::util::URL& aURL,"
" const ::rtl::OUString& sTargetFrameName, sal_Int32 nSearchFlags ) "
@@ -645,7 +645,7 @@ OString generateClassDefinition(std::ostream& o,
interfaces.begin();
while (iter != interfaces.end())
{
- o << "\n " << scopedCppName(*iter, false, true);
+ o << "\n " << scopedCppName(*iter);
++iter;
if (iter != interfaces.end())
o << ",";
@@ -656,7 +656,7 @@ OString generateClassDefinition(std::ostream& o,
if (propertyhelper.getLength() > 1) {
o << ",\n public ::cppu::PropertySetMixin< "
- << scopedCppName(propertyhelper, false, true) << " >";
+ << scopedCppName(propertyhelper) << " >";
}
o << "\n{\npublic:\n"
@@ -674,7 +674,7 @@ OString generateClassDefinition(std::ostream& o,
// overload queryInterface
if (propertyhelper.getLength() > 1) {
- o << " // ::com::sun::star::uno::XInterface:\n"
+ o << " // css::uno::XInterface:\n"
" virtual css::uno::Any SAL_CALL queryInterface("
"css::uno::Type const & type) throw ("
"css::uno::RuntimeException);\n";
@@ -686,7 +686,7 @@ OString generateClassDefinition(std::ostream& o,
interfaces.begin();
while (iter != interfaces.end())
{
- buffer.append(scopedCppName(*iter, false, true));
+ buffer.append(scopedCppName(*iter));
++iter;
if (iter != interfaces.end())
buffer.append(", ");
@@ -797,7 +797,7 @@ OString generateClassDefinition(std::ostream& o,
boost::unordered_set< OString, OStringHash >::const_iterator iter =
interfaces.begin();
while (iter != interfaces.end()) {
- o << "\n " << scopedCppName(*iter, false, true);
+ o << "\n " << scopedCppName(*iter);
++iter;
if (iter != interfaces.end())
o << ",";
@@ -807,7 +807,7 @@ OString generateClassDefinition(std::ostream& o,
}
if (propertyhelper.getLength() > 1) {
o << " ::cppu::PropertySetMixin< "
- << scopedCppName(propertyhelper, false, true) << " >(\n"
+ << scopedCppName(propertyhelper) << " >(\n"
<< " context, static_cast< Implements >(\n ";
OStringBuffer buffer(128);
if (propinterfaces.find("com/sun/star/beans/XPropertySet")
@@ -928,7 +928,7 @@ void generateQueryInterface(std::ostream& o,
interfaces.begin();
while (iter != interfaces.end())
{
- o << "\n " << scopedCppName(*iter, false, true);
+ o << "\n " << scopedCppName(*iter);
++iter;
if (iter != interfaces.end())
o << ",";
diff --git a/unodevtools/source/skeletonmaker/cpptypemaker.cxx b/unodevtools/source/skeletonmaker/cpptypemaker.cxx
index b66a049c0342..7bac1f765a36 100644
--- a/unodevtools/source/skeletonmaker/cpptypemaker.cxx
+++ b/unodevtools/source/skeletonmaker/cpptypemaker.cxx
@@ -93,7 +93,7 @@ void printType(std::ostream & o,
o << scopedCppName(codemaker::cpp::translateUnoToCppType(
sort, typeClass, name, false),
- false, options.shortnames && referenceType > 0);
+ options.shortnames && referenceType > 0);
if (typeClass == RT_TYPE_INTERFACE && referenceType > 0)
o << " >";
@@ -391,17 +391,17 @@ void printMethods(std::ostream & o,
if ( type.equals("com/sun/star/beans/XPropertySet")) {
generated.add(type);
generateXPropertySetBodies(
- o, classname, scopedCppName(propertyhelper, false, true));
+ o, classname, scopedCppName(propertyhelper));
return;
} else if ( type.equals("com/sun/star/beans/XFastPropertySet")) {
generated.add(type);
generateXFastPropertySetBodies(
- o, classname, scopedCppName(propertyhelper, false, true));
+ o, classname, scopedCppName(propertyhelper));
return;
} else if ( type.equals("com/sun/star/beans/XPropertyAccess")) {
generated.add(type);
generateXPropertyAccessBodies(
- o, classname, scopedCppName(propertyhelper, false, true));
+ o, classname, scopedCppName(propertyhelper));
return;
}
}