summaryrefslogtreecommitdiff
path: root/unodevtools/source/skeletonmaker
diff options
context:
space:
mode:
Diffstat (limited to 'unodevtools/source/skeletonmaker')
-rw-r--r--unodevtools/source/skeletonmaker/cppcompskeleton.cxx184
-rw-r--r--unodevtools/source/skeletonmaker/cpptypemaker.cxx110
-rw-r--r--unodevtools/source/skeletonmaker/javacompskeleton.cxx94
-rw-r--r--unodevtools/source/skeletonmaker/javatypemaker.cxx78
-rw-r--r--unodevtools/source/skeletonmaker/skeletoncommon.cxx66
-rw-r--r--unodevtools/source/skeletonmaker/skeletoncommon.hxx10
-rw-r--r--unodevtools/source/skeletonmaker/skeletoncpp.hxx2
-rw-r--r--unodevtools/source/skeletonmaker/skeletonjava.hxx2
-rw-r--r--unodevtools/source/skeletonmaker/skeletonmaker.cxx34
9 files changed, 290 insertions, 290 deletions
diff --git a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
index d76af17fba09..f78325f334f4 100644
--- a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
+++ b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -56,13 +56,13 @@ void generateIncludes(std::ostream & o,
o << "#include \"cppuhelper/basemutex.hxx\"\n";
} else {
o << "#include \"cppuhelper/implbase" << interfaces.size() << ".hxx\"\n";
- }
+ }
if (propertyhelper.getLength() > 1) {
if (propertyhelper.equals("_"))
o << "#include \"cppuhelper/rpopshlp.hxx\"\n";
else
- o << "#include \"cppuhelper/propertysetmixin.hxx\"\n";
+ o << "#include \"cppuhelper/propertysetmixin.hxx\"\n";
}
std::hash_set< OString, OStringHash >::const_iterator iter = interfaces.begin();
@@ -72,7 +72,7 @@ void generateIncludes(std::ostream & o,
<< ((*iter).replace('.', '/').getStr())
<< ".hpp\"\n";
iter++;
- }
+ }
}
short generateNamespace(std::ostream & o,
@@ -127,7 +127,7 @@ OString generateCompHelperDeclaration(std::ostream & o,
short nbrackets = generateNamespace(o, implname, true, nm);
o << "namespace css = ::com::sun::star;\n\n";
-
+
// generate component/service helper functions
o << "// component and service helper functions:\n"
"::rtl::OUString SAL_CALL _getImplementationName();\n"
@@ -141,18 +141,18 @@ OString generateCompHelperDeclaration(std::ostream & o,
for (short i=0; i < nbrackets; i++)
o << "} ";
o << "// closing component helper namespace\n\n";
-
+
return nm;
}
void generateCompHelperDefinition(std::ostream & o,
const OString & implname,
- const OString & classname,
+ const OString & classname,
const std::hash_set< OString, OStringHash >& services)
{
OString nm;
short nbrackets = generateNamespace(o, implname, true, nm);
-
+
o << "::rtl::OUString SAL_CALL _getImplementationName() {\n"
<< " return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(\n"
<< " \"" << implname << "\"));\n}\n\n";
@@ -169,7 +169,7 @@ void generateCompHelperDefinition(std::ostream & o,
<< "RTL_CONSTASCII_USTRINGPARAM(\n \""
<< (*iter).replace('/','.') << "\"));\n";
iter++;
- }
+ }
o << " return s;\n}\n\n";
o << "css::uno::Reference< css::uno::XInterface > SAL_CALL _create("
@@ -182,7 +182,7 @@ void generateCompHelperDefinition(std::ostream & o,
for (short j=0; j < nbrackets; j++)
o << "} ";
o << "// closing component helper namespace\n\n";
-
+
}
void generateCompFunctions(std::ostream & o, const OString & nmspace)
@@ -214,7 +214,7 @@ void generateXPropertySetBodies(std::ostream& o,
const OString & propertyhelper)
{
o << "// com.sun.star.beans.XPropertySet:\n";
-
+
o << "css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL "
<< classname << "getPropertySetInfo() throw ("
"css::uno::RuntimeException)\n{\n return ::cppu::PropertySetMixin< "
@@ -265,7 +265,7 @@ void generateXPropertySetBodies(std::ostream& o,
"css::uno::RuntimeException, css::beans::UnknownPropertyException, "
"css::lang::WrappedTargetException)\n{\n ::cppu::PropertySetMixin< "
<< propertyhelper
- << " >::removeVetoableChangeListener(aPropertyName, xListener);\n}\n\n";
+ << " >::removeVetoableChangeListener(aPropertyName, xListener);\n}\n\n";
}
void generateXFastPropertySetBodies(std::ostream& o,
@@ -279,14 +279,14 @@ void generateXFastPropertySetBodies(std::ostream& o,
"css::beans::UnknownPropertyException, css::beans::PropertyVetoException, "
"css::lang::IllegalArgumentException, css::lang::WrappedTargetException, "
"css::uno::RuntimeException)\n{\n ::cppu::PropertySetMixin< "
- << propertyhelper << " >::setFastPropertyValue(nHandle, aValue);\n}\n\n";
-
+ << propertyhelper << " >::setFastPropertyValue(nHandle, aValue);\n}\n\n";
+
o << "css::uno::Any SAL_CALL " << classname << "getFastPropertyValue( "
"::sal_Int32 nHandle ) throw (css::beans::UnknownPropertyException, "
"css::lang::WrappedTargetException, css::uno::RuntimeException)\n{\n"
" return ::cppu::PropertySetMixin< "
- << propertyhelper << " >::getFastPropertyValue(nHandle);\n}\n\n";
+ << propertyhelper << " >::getFastPropertyValue(nHandle);\n}\n\n";
}
void generateXPropertyAccessBodies(std::ostream& o,
@@ -299,15 +299,15 @@ void generateXPropertyAccessBodies(std::ostream& o,
<< classname << "getPropertyValues( ) throw ("
"::com::sun::star::uno::RuntimeException)\n{\n"
" return ::cppu::PropertySetMixin< "
- << propertyhelper << " >::getPropertyValues();\n}\n\n";
-
+ << propertyhelper << " >::getPropertyValues();\n}\n\n";
+
o << "void SAL_CALL " << classname << "setPropertyValues( const "
"css::uno::Sequence< css::beans::PropertyValue >& aProps ) throw ("
"css::beans::UnknownPropertyException, css::beans::PropertyVetoException, "
"css::lang::IllegalArgumentException, css::lang::WrappedTargetException, "
"css::uno::RuntimeException)\n{\n"
" ::cppu::PropertySetMixin< "
- << propertyhelper << " >::setPropertyValues(aProps);\n}\n\n";
+ << propertyhelper << " >::setPropertyValues(aProps);\n}\n\n";
}
void generateXLocalizable(std::ostream& o, const OString & classname)
@@ -435,12 +435,12 @@ void generateXDispatch(std::ostream& o,
"void SAL_CALL " << classname << "dispatch( const css::util::URL& aURL, const "
"css::uno::Sequence< css::beans::PropertyValue >& aArguments ) throw"
"(css::uno::RuntimeException)\n{\n";
-
+
ProtocolCmdMap::const_iterator iter = protocolCmdMap.begin();
while (iter != protocolCmdMap.end()) {
o << " if ( aURL.Protocol.equalsAscii(\"" << (*iter).first
<< "\") == 0 )\n {\n";
-
+
for (std::vector< OString >::const_iterator i = (*iter).second.begin();
i != (*iter).second.end(); ++i) {
o << " if ( aURL.Path.equalsAscii(\"" << (*i) << "\") )\n"
@@ -452,13 +452,13 @@ void generateXDispatch(std::ostream& o,
iter++;
}
o << "}\n\n";
-
+
// addStatusListener
o << "void SAL_CALL " << classname << "addStatusListener( const css::uno::Reference< "
"css::frame::XStatusListener >& xControl, const css::util::URL& aURL ) "
"throw (css::uno::RuntimeException)\n{\n"
" // add your own code here\n}\n\n";
-
+
// removeStatusListener
o << "void SAL_CALL " << classname << "removeStatusListener( const css::uno::Reference"
"< css::frame::XStatusListener >& xControl, const css::util::URL& aURL ) "
@@ -485,7 +485,7 @@ void generateXDispatchProvider(std::ostream& o,
while (iter != protocolCmdMap.end()) {
o << " if ( aURL.Protocol.equalsAscii(\"" << (*iter).first
<< "\") == 0 )\n {\n";
-
+
for (std::vector< OString >::const_iterator i = (*iter).second.begin();
i != (*iter).second.end(); ++i) {
o << " if ( aURL.Path.equalsAscii(\"" << (*i) << "\") == 0 )\n"
@@ -511,7 +511,7 @@ void generateXDispatchProvider(std::ostream& o,
" seqDescripts[i].SearchFlags );\n"
" }\n\n return lDispatcher;\n}\n\n";
}
-
+
void generateAddinConstructorAndHelper(std::ostream& o,
ProgramOptions const & options,
TypeManager const & manager, const OString & classname,
@@ -525,17 +525,17 @@ void generateAddinConstructorAndHelper(std::ostream& o,
o << " try {\n";
generateFunctionParameterMap(o, options, manager, interfaces);
-
+
o << " css::uno::Reference< css::lang::XMultiServiceFactory > xProvider"
"(\n m_xContext->getServiceManager()->createInstanceWithContext"
"(\n ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(\n "
" \"com.sun.star.configuration.ConfigurationProvider\")),"
"\n m_xContext ), css::uno::UNO_QUERY );\n\n";
-
+
o << " ::rtl::OUString sReadOnlyView(\n"
" RTL_CONSTASCII_USTRINGPARAM(\n"
" \"com.sun.star.configuration.ConfigurationAccess\"));\n\n";
-
+
o << " ::rtl::OUStringBuffer sPath(::rtl::OUString::createFromAscii(\n"
" \"/org.openoffice.Office.CalcAddIns/AddInInfo/\"));\n"
" sPath.appendAscii(sADDIN_SERVICENAME);\n"
@@ -546,7 +546,7 @@ void generateAddinConstructorAndHelper(std::ostream& o,
" aArgument.Value <<= sPath.makeStringAndClear();\n\n"
" css::uno::Sequence< css::uno::Any > aArguments(1);\n"
" aArguments[0] <<= aArgument;\n\n";
-
+
o << " // create the default view using default UI locale\n"
" css::uno::Reference< css::uno::XInterface > xIface =\n"
" xProvider->createInstanceWithArguments(sReadOnlyView, "
@@ -554,7 +554,7 @@ void generateAddinConstructorAndHelper(std::ostream& o,
" m_xHAccess = css::uno::Reference<\n "
"css::container::XHierarchicalNameAccess >(xIface, css::uno::UNO_QUERY);"
"\n\n";
-
+
o << " // extend arguments to create a view for all locales to get "
"simple\n // access to the compatibilityname property\n"
" aArgument.Name = ::rtl::OUString::createFromAscii(\"locale\");\n"
@@ -566,9 +566,9 @@ void generateAddinConstructorAndHelper(std::ostream& o,
"aArguments);\n\n"
" m_xCompAccess = css::uno::Reference<\n "
"css::container::XHierarchicalNameAccess >(xIface, css::uno::UNO_QUERY);\n";
-
+
o << " }\n catch ( css::uno::Exception & ) {\n }\n}\n\n";
-
+
o << "// addin configuration property helper function:\n::rtl::OUString "
"SAL_CALL " << classname << "::getAddinProperty(const ::rtl::OUString &"
" funcName, const ::rtl::OUString & paramName, const char * propName) "
@@ -627,7 +627,7 @@ void generateMemberDeclaration(std::ostream& o,
o << " ";
printType(o, options, manager, i->second.first.replace('.','/'),
1, false);
- o << " m_" << i->first << ";\n";
+ o << " m_" << i->first << ";\n";
}
}
@@ -643,7 +643,7 @@ OString generateClassDefinition(std::ostream& o,
{
OStringBuffer parentname(64);
o << "class " << classname << ":\n";
-
+
if (!interfaces.empty()) {
if (supportxcomponent) {
parentname.append("::cppu::WeakComponentImplHelper");
@@ -656,7 +656,7 @@ OString generateClassDefinition(std::ostream& o,
parentname.append(static_cast<sal_Int32>(interfaces.size()));
o << " public ::cppu::WeakImplHelper" << interfaces.size() << "<";
}
-
+
std::hash_set< OString, OStringHash >::const_iterator iter =
interfaces.begin();
while (iter != interfaces.end())
@@ -669,12 +669,12 @@ OString generateClassDefinition(std::ostream& o,
o << ">";
}
}
-
+
if (propertyhelper.getLength() > 1) {
o << ",\n public ::cppu::PropertySetMixin< "
<< scopedCppName(propertyhelper, false, true) << " >";
}
-
+
o << "\n{\npublic:\n"
<< " explicit " << classname << "("
<< "css::uno::Reference< css::uno::XComponentContext > const & context);\n\n";
@@ -687,7 +687,7 @@ OString generateClassDefinition(std::ostream& o,
// << " static css::uno::Reference< css::uno::XInterface > SAL_CALL _create("
// << "\n css::uno::Reference< css::uno::XComponentContext > const & "
// << "context);\n\n";
-
+
// overload queryInterface
if (propertyhelper.getLength() > 1) {
o << " // ::com::sun::star::uno::XInterface:\n"
@@ -702,7 +702,7 @@ OString generateClassDefinition(std::ostream& o,
interfaces.begin();
while (iter != interfaces.end())
{
- buffer.append(scopedCppName(*iter, false, true));
+ buffer.append(scopedCppName(*iter, false, true));
iter++;
if (iter != interfaces.end())
buffer.append(", ");
@@ -715,7 +715,7 @@ OString generateClassDefinition(std::ostream& o,
o << " virtual void SAL_CALL release() throw ()\n { "
<< parent << "::release(); }\n\n";
}
-
+
std::hash_set< OString, OStringHash >::const_iterator it =
interfaces.begin();
codemaker::GeneratedTypeSet generated;
@@ -726,7 +726,7 @@ OString generateClassDefinition(std::ostream& o,
true, propertyhelper);
it++;
}
-
+
o << "private:\n " << classname << "(const " << classname << " &); // not defined\n"
<< " " << classname << "& operator=(const " << classname << " &); // not defined\n\n"
<< " // destructor is private and will be called indirectly by the release call"
@@ -739,8 +739,8 @@ OString generateClassDefinition(std::ostream& o,
"rtl::OUStringHash > FunctionMap;\n\n"
" ::rtl::OUString SAL_CALL getAddinProperty(const ::rtl::OUString & "
"funcName, const ::rtl::OUString & paramName, const char * propName) "
- "throw (css::uno::RuntimeException);\n\n";
- }
+ "throw (css::uno::RuntimeException);\n\n";
+ }
if (supportxcomponent) {
o << " // overload WeakComponentImplHelperBase::disposing()\n"
@@ -749,7 +749,7 @@ OString generateClassDefinition(std::ostream& o,
" // disposed, do it here.\n"
" virtual void SAL_CALL disposing();\n\n";
}
-
+
// members
o << " css::uno::Reference< css::uno::XComponentContext > m_xContext;\n";
if (!supportxcomponent && !attributes.empty())
@@ -773,7 +773,7 @@ OString generateClassDefinition(std::ostream& o,
generateMemberDeclaration(o, options, manager, properties);
generateMemberDeclaration(o, options, manager, attributes);
-
+
// if (!properties.empty())
// {
// AttributeInfo::const_iterator iter = properties.begin();
@@ -782,7 +782,7 @@ OString generateClassDefinition(std::ostream& o,
// o << " ";
// printType(o, options, manager, iter->second.first.replace('.','/'),
// 1, false);
-// o << " m_" << iter->first << ";\n";
+// o << " m_" << iter->first << ";\n";
// iter++;
// }
// }
@@ -794,18 +794,18 @@ OString generateClassDefinition(std::ostream& o,
// o << " ";
// printType(o, options, manager, iter->second.first.replace('.','/'),
// 1, false);
-// o << " m_" << iter->first << ";\n";
+// o << " m_" << iter->first << ";\n";
// iter++;
// }
// }
-
+
o << "};\n\n";
-
+
// generate constructor
if (options.componenttype == 2) {
generateAddinConstructorAndHelper(o, options, manager,
classname, interfaces);
- } else {
+ } else {
o << classname << "::" << classname
<< "(css::uno::Reference< css::uno::XComponentContext > const & context) :\n";
if (supportxcomponent) {
@@ -819,7 +819,7 @@ OString generateClassDefinition(std::ostream& o,
o << ",";
else
o << ">(m_aMutex),\n";
- }
+ }
}
if (propertyhelper.getLength() > 1) {
o << " ::cppu::PropertySetMixin< "
@@ -827,7 +827,7 @@ OString generateClassDefinition(std::ostream& o,
<< " context, static_cast< Implements >(\n ";
OStringBuffer buffer(128);
if (propinterfaces.find("com/sun/star/beans/XPropertySet")
- != propinterfaces.end()) {
+ != propinterfaces.end()) {
buffer.append("IMPLEMENTS_PROPERTY_SET");
}
if (propinterfaces.find("com/sun/star/beans/XFastPropertySet")
@@ -851,7 +851,7 @@ OString generateClassDefinition(std::ostream& o,
generateMemberInitialization(o, options, manager, properties);
generateMemberInitialization(o, options, manager, attributes);
-
+
o << "\n{}\n\n";
}
@@ -865,7 +865,7 @@ OString generateClassDefinition(std::ostream& o,
"// disposed, do it here.\n"
"void SAL_CALL " << classname << "::disposing()\n{\n\n}\n\n";
}
-
+
return parentname.makeStringAndClear();
}
@@ -882,7 +882,7 @@ void generateXServiceInfoBodies(std::ostream& o,
<< "supportsService(::rtl::OUString const & "
<< "serviceName) throw (css::uno::RuntimeException)\n{\n "
<< "css::uno::Sequence< ::rtl::OUString > serviceNames = "
- << comphelpernamespace << "::_getSupportedServiceNames();\n "
+ << comphelpernamespace << "::_getSupportedServiceNames();\n "
<< "for (::sal_Int32 i = 0; i < serviceNames.getLength(); ++i) {\n "
<< " if (serviceNames[i] == serviceName)\n return sal_True;\n"
<< " }\n return sal_False;\n}\n\n";
@@ -890,12 +890,12 @@ void generateXServiceInfoBodies(std::ostream& o,
o << "css::uno::Sequence< ::rtl::OUString > SAL_CALL " << classname
<< "getSupportedServiceNames() throw (css::uno::RuntimeException)\n{\n "
<< "return " << comphelpernamespace
- << "::_getSupportedServiceNames();\n}\n\n";
+ << "::_getSupportedServiceNames();\n}\n\n";
}
void generateMethodBodies(std::ostream& o,
- ProgramOptions const & options,
+ ProgramOptions const & options,
TypeManager const & manager,
std::hash_set< OString, OStringHash > const & interfaces,
OString const & classname,
@@ -920,7 +920,7 @@ void generateMethodBodies(std::ostream& o,
}
void generateQueryInterface(std::ostream& o,
- ProgramOptions const & options,
+ ProgramOptions const & options,
TypeManager const & manager,
const std::hash_set< OString, OStringHash >& interfaces,
OString const & parentname,
@@ -929,7 +929,7 @@ void generateQueryInterface(std::ostream& o,
{
if (propertyhelper.getLength() == 0)
return;
-
+
o << "css::uno::Any " << classname
<< "::queryInterface(css::uno::Type const & type) throw ("
"css::uno::RuntimeException)\n{\n ";
@@ -962,9 +962,9 @@ void generateQueryInterface(std::ostream& o,
} else {
o << "::cppu::PropertySetMixin<\n ";
printType(o, options, manager, propertyhelper.replace('.', '/'),
- 0, false);
+ 0, false);
o << " >::queryInterface(\n type));\n";
- }
+ }
}
o << "}\n\n";
}
@@ -979,7 +979,7 @@ void generateSkeleton(ProgramOptions const & options,
generateCalcAddin(options, manager, types);
return;
}
-
+
std::hash_set< OString, OStringHash > interfaces;
std::hash_set< OString, OStringHash > services;
AttributeInfo properties;
@@ -1002,23 +1002,23 @@ void generateSkeleton(ProgramOptions const & options,
checkType(manager, "com.sun.star.frame.ProtocolHandler",
interfaces, services, properties);
checkType(manager, "com.sun.star.frame.XDispatch",
- interfaces, services, properties);
+ interfaces, services, properties);
}
-
+
// check if service object or simple UNO object
if (!services.empty())
serviceobject = true;
-
+
OString propertyhelper = checkPropertyHelper(
options, manager, services, interfaces, attributes, propinterfaces);
checkDefaultInterfaces(interfaces, services, propertyhelper);
-
+
if (interfaces.size() > 12)
throw CannotDumpException(
"the skeletonmaker supports components with 12 interfaces "
"only (limitation of the UNO implementation helpers)!");
-
+
supportxcomponent = checkXComponentSupport(manager, interfaces);
@@ -1032,7 +1032,7 @@ void generateSkeleton(ProgramOptions const & options,
if (!standardout && options.license) {
printLicenseHeader(*pofs, compFileName);
}
-
+
generateIncludes(*pofs, interfaces, properties, propertyhelper,
serviceobject, supportxcomponent);
@@ -1054,7 +1054,7 @@ void generateSkeleton(ProgramOptions const & options,
nm = generateNamespace(*pofs, options.implname, false, nmspace);
*pofs << "namespace css = ::com::sun::star;\n\n";
}
-
+
sal_Int32 index = 0;
OString classname(options.implname);
if ((index = classname.lastIndexOf('.')) > 0)
@@ -1067,14 +1067,14 @@ void generateSkeleton(ProgramOptions const & options,
generateQueryInterface(*pofs, options, manager, interfaces, parentname,
classname, propertyhelper);
-
+
generateMethodBodies(*pofs, options, manager, interfaces, classname,
nmspace, propertyhelper);
if (serviceobject) {
// close namepsace
*pofs << "} // closing anonymous implementation namespace\n\n";
-
+
generateCompHelperDefinition(*pofs, options.implname,
classname, services);
generateCompFunctions(*pofs, nmspace);
@@ -1092,17 +1092,17 @@ void generateSkeleton(ProgramOptions const & options,
}
} catch(CannotDumpException& e) {
- std::cerr << "ERROR: " << e.m_message.getStr() << "\n";
+ std::cerr << "ERROR: " << e.m_message.getStr() << "\n";
if ( !standardout ) {
if (pofs && ((std::ofstream*)pofs)->is_open()) {
- ((std::ofstream*)pofs)->close();
+ ((std::ofstream*)pofs)->close();
delete pofs;
}
// remove existing type file if something goes wrong to ensure
// consistency
if (fileExists(compFileName))
removeTypeFile(compFileName);
-
+
// remove tmp file if something goes wrong
removeTypeFile(tmpFileName);
}
@@ -1121,28 +1121,28 @@ void generateCalcAddin(ProgramOptions const & options,
bool serviceobject = false;
bool supportxcomponent = false;
-
+
std::vector< OString >::const_iterator iter = types.begin();
while (iter != types.end()) {
checkType(manager, *iter, interfaces, services, properties);
iter++;
}
-
+
OString sAddinService;
if (services.size() != 1) {
throw CannotDumpException(
"for calc add-in components one and only one service type is necessary!"
" Please reference a valid type with the '-t' option.");
}
-
-
+
+
// get the one and only add-in service for later use
std::hash_set< OString, OStringHash >::const_iterator iter2 = services.begin();
sAddinService = (*iter2).replace('/', '.');
if (sAddinService.equals("com.sun.star.sheet.AddIn")) {
sAddinService = (*(++iter2)).replace('/', '.');
}
-
+
// if backwardcompatible==true the AddIn service needs to be added to the
// suported service list, the necessary intefaces are mapped to the add-in
// configuration. Since OO.org 2.0.4 this is obsolete and the add-in is
@@ -1158,17 +1158,17 @@ void generateCalcAddin(ProgramOptions const & options,
if (interfaces.find("com.sun.star.lang.XLocalizable") == interfaces.end()) {
interfaces.insert("com.sun.star.lang.XLocalizable");
}
- }
-
+ }
+
OString propertyhelper = checkPropertyHelper(
options, manager, services, interfaces, attributes, propinterfaces);
if (propertyhelper.getLength() > 0)
std::cerr << "WARNING: interfaces specifying calc add-in functions "
"shouldn't support attributes!\n";
-
+
checkDefaultInterfaces(interfaces, services, propertyhelper);
-
+
if (interfaces.size() > 12) {
throw CannotDumpException(
"the skeletonmaker supports components with 12 interfaces "
@@ -1189,12 +1189,12 @@ void generateCalcAddin(ProgramOptions const & options,
std::ostream* pofs = NULL;
bool standardout = getOutputStream(options, ".cxx",
&pofs, compFileName, tmpFileName);
-
+
try {
if (!standardout && options.license) {
printLicenseHeader(*pofs, compFileName);
}
-
+
generateIncludes(*pofs, interfaces, properties, propertyhelper,
serviceobject, supportxcomponent);
@@ -1206,7 +1206,7 @@ void generateCalcAddin(ProgramOptions const & options,
"#include \"rtl/ustrbuf.hxx\"\n\n"
"#include <hash_map>\n"
"#include <set>\n";
-
+
// namespace
OString nmspace(generateCompHelperDeclaration(*pofs, options.implname));
@@ -1229,7 +1229,7 @@ void generateCalcAddin(ProgramOptions const & options,
"static const char * sCATEGORYDISPLAYNAME = \"CategoryDisplayName\";"
"\n\n";
}
-
+
OString parentname(
generateClassDefinition(*pofs,
options, manager, classname, interfaces, properties,
@@ -1237,18 +1237,18 @@ void generateCalcAddin(ProgramOptions const & options,
generateQueryInterface(*pofs, options, manager, interfaces, parentname,
classname, propertyhelper);
-
+
generateMethodBodies(*pofs, options, manager, interfaces, classname,
nmspace, propertyhelper);
-
+
// close namepsace
*pofs << "} // closing anonymous implementation namespace\n\n";
generateCompHelperDefinition(*pofs, options.implname, classname,
services);
-
+
generateCompFunctions(*pofs, nmspace);
-
+
if ( !standardout && pofs && ((std::ofstream*)pofs)->is_open()) {
((std::ofstream*)pofs)->close();
delete pofs;
@@ -1259,14 +1259,14 @@ void generateCalcAddin(ProgramOptions const & options,
std::cerr << "ERROR: " << e.m_message.getStr() << "\n";
if ( !standardout ) {
if (pofs && ((std::ofstream*)pofs)->is_open()) {
- ((std::ofstream*)pofs)->close();
+ ((std::ofstream*)pofs)->close();
delete pofs;
}
// remove existing type file if something goes wrong to ensure
// consistency
if (fileExists(compFileName))
removeTypeFile(compFileName);
-
+
// remove tmp file if something goes wrong
removeTypeFile(tmpFileName);
}
diff --git a/unodevtools/source/skeletonmaker/cpptypemaker.cxx b/unodevtools/source/skeletonmaker/cpptypemaker.cxx
index 15ae7ae95988..9c6e3eafe108 100644
--- a/unodevtools/source/skeletonmaker/cpptypemaker.cxx
+++ b/unodevtools/source/skeletonmaker/cpptypemaker.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -87,7 +87,7 @@ void printType(std::ostream & o,
{
bReference = true;
}
-
+
if (bReference && referenceType == 4)
o << "const ";
@@ -103,7 +103,7 @@ void printType(std::ostream & o,
o << scopedCppName(codemaker::cpp::translateUnoToCppType(
sort, typeClass, name, false),
false, options.shortnames && referenceType > 0);
-
+
if (typeClass == RT_TYPE_INTERFACE && referenceType > 0)
o << " >";
@@ -114,12 +114,12 @@ void printType(std::ostream & o,
{
if (i != arguments.begin())
o << ", ";
-
+
printType(o, options, manager, *i, 1, false);
}
o << " >";
}
-
+
for (sal_Int32 i = 0; i < rank; ++i)
o << " >";
@@ -162,11 +162,11 @@ bool printConstructorParameters(std::ostream & o,
options, manager, superReader, outerReader, arguments);
}
for (sal_uInt16 i = 0; i < reader.getFieldCount(); ++i) {
- if (previous)
+ if (previous)
o << ", ";
else
previous = true;
-
+
if ((reader.getFieldFlags(i) & RT_ACCESS_PARAMETERIZED_TYPE) == 0) {
printType(o, options, manager,
codemaker::convertString(reader.getFieldTypeName(i)), 4);
@@ -234,7 +234,7 @@ void printMethodParameters(std::ostream & o,
referenceType);
o << ' ';
}
-
+
o << (codemaker::cpp::translateUnoToCppIdentifier(
codemaker::convertString(
reader.getMethodParameterName(method, i)),
@@ -270,7 +270,7 @@ void printSetPropertyMixinBody(std::ostream & o,
bool bound = (reader.getFieldFlags(field) & RT_ACCESS_BOUND ? true : false);
o << "\n{\n";
-
+
if (bound)
o << " BoundListeners l;\n";
@@ -301,22 +301,22 @@ void printSetPropertyMixinBody(std::ostream & o,
buffer2.insert(0, t);
buffer2.append(".Value");
}
- } else {
+ } else {
if (single) {
single=false;
- if (!optional)
+ if (!optional)
buffer1.append("the_value.Value");
-
+
buffer2.append("the_value.Value");
} else {
if (!optional) {
buffer1.insert(0, t);
- buffer1.append(".Value");
+ buffer1.append(".Value");
}
buffer2.insert(0, t);
- buffer2.append(".Value");
+ buffer2.append(".Value");
}
- }
+ }
} while( nPos <= index );
o << " css::uno::Any v;\n";
@@ -333,18 +333,18 @@ void printSetPropertyMixinBody(std::ostream & o,
o << " prepareSet(\n rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(\""
<< fieldname << "\")),\n css::uno::Any(), css::uno::Any(), ";
}
-
+
if (bound)
o << "&l);\n";
else
o << "0);\n";
-
+
o << " {\n osl::MutexGuard g(m_aMutex);\n m_"
<< fieldname << " = the_value;\n }\n";
if (bound)
o << " l.notify();\n";
-
+
o << "}\n\n";
}
@@ -385,8 +385,8 @@ void printMethods(std::ostream & o,
OString type(codemaker::convertString(reader.getTypeName()));
if (generated.contains(type) || type.equals("com/sun/star/uno/XInterface") ||
(defaultvalue &&
- ( type.equals("com/sun/star/lang/XComponent") ||
- type.equals("com/sun/star/lang/XTypeProvider") ||
+ ( type.equals("com/sun/star/lang/XComponent") ||
+ type.equals("com/sun/star/lang/XTypeProvider") ||
type.equals("com/sun/star/uno/XWeak")) ) )
{
return;
@@ -460,7 +460,7 @@ void printMethods(std::ostream & o,
return;
}
}
-
+
generated.add(type);
if (options.all || defaultvalue) {
for (sal_uInt16 i = 0; i < reader.getSuperTypeCount(); ++i) {
@@ -473,13 +473,13 @@ void printMethods(std::ostream & o,
"Bad type library entity "
+ codemaker::convertString(
reader.getSuperTypeName(i)));
- }
+ }
OString stype(codemaker::convertString(super.getTypeName()));
printMethods(o, options, manager, super, generated, delegate,
classname, indentation, defaultvalue, propertyhelper);
}
-
+
if (reader.getFieldCount() > 0 || reader.getMethodCount() > 0) {
o << indentation << "// ";
printType(o, options, manager, type, 0);
@@ -491,13 +491,13 @@ void printMethods(std::ostream & o,
o << indentation;
if (!body)
o << "virtual ";
-
+
printType(o, options, manager,
codemaker::convertString(reader.getFieldTypeName(i)), 1);
o << " SAL_CALL ";
if (classname.getLength() > 0)
o << classname;
-
+
o << "get"
<< codemaker::convertString(reader.getFieldName(i)).getStr()
<< "()";
@@ -506,7 +506,7 @@ void printMethods(std::ostream & o,
&& reader.getMethodName(method) == reader.getFieldName(i))
{
printExceptionSpecification(o, options, manager, reader, method++);
- } else {
+ } else {
o << ((options.shortnames) ? " throw (css::uno::RuntimeException)" :
" throw (::com::sun::star::uno::RuntimeException)");
}
@@ -539,16 +539,16 @@ void printMethods(std::ostream & o,
} else {
o << ";\n";
}
-
+
if ((reader.getFieldFlags(i) & RT_ACCESS_READONLY) == 0) {
o << indentation;
if (!body)
o << "virtual ";
-
+
o << "void SAL_CALL ";
if (classname.getLength() > 0)
o << classname;
-
+
o << "set"
<< (codemaker::convertString(reader.getFieldName(i)).getStr())
<< '(';
@@ -593,7 +593,7 @@ void printMethods(std::ostream & o,
o << indentation;
if (!body)
o << "virtual ";
-
+
printType(o, options, manager,
codemaker::convertString(
reader.getMethodReturnTypeName(method)), 1);
@@ -633,7 +633,7 @@ void printMethods(std::ostream & o,
o << "\n" << indentation << "{\n" << indentation << " ";
if (!reader.getMethodReturnTypeName(method).equals(s))
o << "return ";
-
+
o << delegate.getStr()
<< (codemaker::convertString(
reader.getMethodName(method)).getStr())
@@ -689,7 +689,7 @@ void printServiceMembers(std::ostream & o,
OString referenceType(
codemaker::convertString(
reader.getReferenceTypeName(i)).replace('/', '.'));
-
+
if ( reader.getReferenceSort(i) == RT_REF_SUPPORTS ) {
o << "\n// supported interface " << referenceType.getStr() << "\n";
generateDocumentation(o, options, manager, referenceType, delegate);
@@ -707,13 +707,13 @@ void printServiceMembers(std::ostream & o,
codemaker::convertString(reader.getFieldName(i)));
OString fieldType(
codemaker::convertString(reader.getFieldTypeName(i)));
-
+
o << "// private ";
printType(o, options, manager, fieldType, 1);
o << " "
<< codemaker::cpp::translateUnoToCppIdentifier(
fieldName, "property").getStr()
- << ";\n";
+ << ";\n";
}
}
}
@@ -727,7 +727,7 @@ void printMapsToCppType(std::ostream & o,
o << "maps to C++ ";
if (cppTypeSort != 0)
o << cppTypeSort << ' ';
-
+
o << "type \"";
if (rank == 0 && name == "com/sun/star/uno/XInterface") {
o << "Reference< com::sun::star::uno::XInterface >";
@@ -762,7 +762,7 @@ void generateDocumentation(std::ostream & o,
}
comment=false;
}
-
+
if (comment) {
o << "\n// UNO";
if (rank > 0) {
@@ -771,19 +771,19 @@ void generateDocumentation(std::ostream & o,
o << " simple type";
} else {
typereg::Reader reader(manager.getTypeReader(name));
- if (!reader.isValid())
+ if (!reader.isValid())
throw CannotDumpException("Bad type library entity " + name);
-
+
switch (typeClass)
{
case RT_TYPE_INTERFACE:
o << " interface type";
break;
-
+
case RT_TYPE_MODULE:
o << "IDL module";
break;
-
+
case RT_TYPE_STRUCT:
if (reader.getReferenceCount() == 0)
o << " simple struct type";
@@ -792,15 +792,15 @@ void generateDocumentation(std::ostream & o,
else
o << " instantiated polymorphic struct type";
break;
-
+
case RT_TYPE_ENUM:
o << " enum type";
break;
-
+
case RT_TYPE_EXCEPTION:
o << " exception type";
break;
-
+
case RT_TYPE_TYPEDEF:
o << "IDL typedef";
break;
@@ -811,7 +811,7 @@ void generateDocumentation(std::ostream & o,
else
o << "IDL accumulation-based service";
break;
-
+
case RT_TYPE_SINGLETON:
if ((manager.getTypeReader(
codemaker::convertString(
@@ -821,16 +821,16 @@ void generateDocumentation(std::ostream & o,
else
o << "IDL service-based singleton";
break;
-
+
case RT_TYPE_CONSTANTS:
o << "IDL constant group";
break;
-
+
default:
OSL_ASSERT(false);
break;
}
- }
+ }
o << " \"" << type.getStr() << "\" ";
}
sort = codemaker::decomposeAndResolve(
@@ -838,21 +838,21 @@ void generateDocumentation(std::ostream & o,
&arguments);
if (rank > 0) {
if (comment) {
- printMapsToCppType(o,
+ printMapsToCppType(o,
options, manager, sort, typeClass, name, rank, arguments, "array");
o << '\n';
}
} else if (sort != codemaker::UnoType::SORT_COMPLEX) {
if (comment) {
- printMapsToCppType(o,
+ printMapsToCppType(o,
options, manager, sort, typeClass, name, rank, arguments, 0);
o << '\n';
}
} else {
typereg::Reader reader(manager.getTypeReader(name));
- if (!reader.isValid())
+ if (!reader.isValid())
throw CannotDumpException("Bad type library entity " + name);
-
+
switch (typeClass)
{
case RT_TYPE_INTERFACE:
@@ -861,12 +861,12 @@ void generateDocumentation(std::ostream & o,
options, manager, sort, typeClass, name, rank, arguments,
"interface");
if (name == "com/sun/star/uno/XInterface") {
- if (comment)
+ if (comment)
o << '\n';
} else {
if (comment)
o << "; " << (options.all ? "all" : "direct") << " methods:\n";
-
+
codemaker::GeneratedTypeSet generated;
printMethods(o, options, manager, reader, generated,
delegate, options.implname, "");
@@ -874,7 +874,7 @@ void generateDocumentation(std::ostream & o,
break;
case RT_TYPE_MODULE:
- printMapsToCppType(o,
+ printMapsToCppType(o,
options, manager, sort, typeClass, name, rank, arguments,
"namespace");
o << '\n';
@@ -934,7 +934,7 @@ void generateDocumentation(std::ostream & o,
reader.getSuperTypeName(0)).replace('/', '.'));
generateDocumentation(o, options, manager, super, delegate);
} else {
- if (comment)
+ if (comment)
o << ("does not map to C++\n"
"// the service members are generated instead\n");
printServiceMembers(o, options, manager, reader, type, delegate);
diff --git a/unodevtools/source/skeletonmaker/javacompskeleton.cxx b/unodevtools/source/skeletonmaker/javacompskeleton.cxx
index 5659066b0d1c..898b7d6c4068 100644
--- a/unodevtools/source/skeletonmaker/javacompskeleton.cxx
+++ b/unodevtools/source/skeletonmaker/javacompskeleton.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -79,7 +79,7 @@ void generateImports(std::ostream & o, ProgramOptions const & options,
}
}
-
+
// std::hash_set< OString, OStringHash >::const_iterator iter =
// interfaces.begin();
// while (iter != interfaces.end())
@@ -104,7 +104,7 @@ void generateCompFunctions(std::ostream & o, const OString & classname)
" return Factory.writeRegistryServiceInfo(m_implementationName,\n"
" m_serviceNames,\n"
" xRegistryKey);\n"
- " }\n\n";
+ " }\n\n";
}
void generateXServiceInfoBodies(std::ostream& o)
@@ -214,7 +214,7 @@ bool checkAttribute(OStringBuffer& attributeValue, sal_uInt16 attribute)
/* com::sun::star::beans::PropertyValue::MAYBEAMBIGIOUS */ 32,
/* com::sun::star::beans::PropertyValue::MAYBEDEFAULT */ 64,
/* com::sun::star::beans::PropertyValue::REMOVEABLE */ 128,
- /* com::sun::star::beans::PropertyValue::OPTIONAL */ 256 };
+ /* com::sun::star::beans::PropertyValue::OPTIONAL */ 256 };
for (sal_uInt16 i = 0; i < 9; i++)
{
@@ -259,7 +259,7 @@ bool checkAttribute(OStringBuffer& attributeValue, sal_uInt16 attribute)
attributeValue.insert(0, '(');
attributeValue.append(')');
}
-
+
return cast;
}
@@ -280,7 +280,7 @@ void registerProperties(std::ostream& o,
cast = true;
attributeValue.append('0');
}
-
+
o << indentation << "registerProperty(\"" << i->first
<< "\", \"m_" << i->first << "\",\n"
<< indentation << " ";
@@ -289,7 +289,7 @@ void registerProperties(std::ostream& o,
o << attributeValue.makeStringAndClear() << ");\n";
}
- }
+ }
}
void generateXLocalizableBodies(std::ostream& o) {
@@ -357,7 +357,7 @@ void generateXAddInBodies(std::ostream& o, ProgramOptions const & options)
"get(\n new Integer(nArgument))"
", sDISPLAYNAME);\n }\n\n";
}
-
+
// getArgumentDescription
o << " public String getArgumentDescription(String "
"aProgrammaticFunctionName, int nArgument)\n {\n";
@@ -453,12 +453,12 @@ void generateXDispatchBodies(std::ostream& o, ProgramOptions const & options)
o << " // com.sun.star.frame.XDispatch:\n"
" public void dispatch( com.sun.star.util.URL aURL,\n"
" com.sun.star.beans.PropertyValue[] aArguments )\n {\n";
-
+
ProtocolCmdMap::const_iterator iter = options.protocolCmdMap.begin();
while (iter != options.protocolCmdMap.end()) {
o << " if ( aURL.Protocol.compareTo(\"" << (*iter).first
<< "\") == 0 )\n {\n";
-
+
for (std::vector< OString >::const_iterator i = (*iter).second.begin();
i != (*iter).second.end(); ++i) {
o << " if ( aURL.Path.compareTo(\"" << (*i) << "\") == 0 )\n"
@@ -470,12 +470,12 @@ void generateXDispatchBodies(std::ostream& o, ProgramOptions const & options)
iter++;
}
o << " }\n\n";
-
+
// addStatusListener
o << " public void addStatusListener( com.sun.star.frame.XStatusListener xControl,\n"
" com.sun.star.util.URL aURL )\n {\n"
" // add your own code here\n }\n\n";
-
+
// com.sun.star.frame.XDispatch
o << " public void removeStatusListener( com.sun.star.frame.XStatusListener xControl,\n"
" com.sun.star.util.URL aURL )\n {\n"
@@ -495,7 +495,7 @@ void generateXDispatchProviderBodies(std::ostream& o, ProgramOptions const & opt
while (iter != options.protocolCmdMap.end()) {
o << " if ( aURL.Protocol.compareTo(\"" << (*iter).first
<< "\") == 0 )\n {\n";
-
+
for (std::vector< OString >::const_iterator i = (*iter).second.begin();
i != (*iter).second.end(); ++i) {
o << " if ( aURL.Path.compareTo(\"" << (*i) << "\") == 0 )\n"
@@ -578,7 +578,7 @@ void generateMethodBodies(std::ostream& o,
generated.add(type);
continue;
}
- }
+ }
typereg::Reader reader(manager.getTypeReader(type.replace('.','/')));
printMethods(o, options, manager, reader, generated, "_",
indentation, true, usepropertymixin);
@@ -608,16 +608,16 @@ void generateAddinConstructorAndHelper(std::ostream& o,
" {\n m_xContext = context;\n }\n\n";
return;
}
-
+
// get the one and only add-in service for later use
std::hash_set< OString, OStringHash >::const_iterator iter = services.begin();
OString sAddinService = (*iter).replace('/', '.');
if (sAddinService.equals("com.sun.star.sheet.AddIn")) {
sAddinService = (*(++iter)).replace('/', '.');
- }
-
+ }
+
// add-in specific fields
o << "\n private static final String sADDIN_SERVICENAME = \""
<< sAddinService << "\";\n\n";
@@ -651,7 +651,7 @@ void generateAddinConstructorAndHelper(std::ostream& o,
} else {
o << " m_functionMap = new java.util.Hashtable();\n\n";
}
-
+
generateFunctionParameterMap(o, options, manager, interfaces);
o << " com.sun.star.lang.XMultiServiceFactory xProvider = \n"
@@ -676,7 +676,7 @@ void generateAddinConstructorAndHelper(std::ostream& o,
" aArgument.Name = \"nodepath\";\n"
" aArgument.Value = new com.sun.star.uno.Any(\n"
" com.sun.star.uno.Type.STRING, sPath.toString());\n\n";
-
+
o << " Object aArguments[] = new Object[1];\n"
" aArguments[0] = new com.sun.star.uno.Any("
" new com.sun.star.uno.Type(\n"
@@ -734,7 +734,7 @@ void generateAddinConstructorAndHelper(std::ostream& o,
" catch ( com.sun.star.uno.RuntimeException e ) {\n"
" throw e;\n }\n"
" catch ( com.sun.star.uno.Exception e ) {\n }\n"
- " return \"\";\n }\n\n";
+ " return \"\";\n }\n\n";
}
@@ -767,7 +767,7 @@ void generateClassDefinition(std::ostream& o,
iter++;
if (iter != interfaces.end())
o << ",\n ";
- }
+ }
}
o << "\n{\n";
@@ -777,11 +777,11 @@ void generateClassDefinition(std::ostream& o,
if (options.componenttype == 3) {
o << " private com.sun.star.frame.XFrame m_xFrame;\n";
}
-
+
// check property helper
if (propertyhelper.getLength() > 1)
o << " private final PropertySetMixin m_prophlp;\n";
-
+
o << " private static final String m_implementationName = "
<< classname << ".class.getName();\n";
@@ -796,7 +796,7 @@ void generateClassDefinition(std::ostream& o,
o << ",\n";
else
o << " };\n\n";
- }
+ }
}
// attribute/property members
@@ -808,13 +808,13 @@ void generateClassDefinition(std::ostream& o,
o << " protected ";
printType(o, options, manager, iter->second.first.replace('.','/'),
false, false);
- o << " m_" << iter->first << ";\n";
+ o << " m_" << iter->first << ";\n";
iter++;
}
} else if (!attributes.empty()) {
AttributeInfo::const_iterator iter =
attributes.begin();
- o << " // attributes\n";
+ o << " // attributes\n";
while (iter != attributes.end()) {
o << " private ";
printType(o, options, manager, iter->second.first.replace('.','/'),
@@ -822,11 +822,11 @@ void generateClassDefinition(std::ostream& o,
o << " m_" << iter->first << " = ";
printType(o, options, manager, iter->second.first.replace('.','/'),
false, true);
- o <<";\n";
+ o <<";\n";
iter++;
}
}
-
+
// special handling of calc add-ins
if (options.componenttype == 2)
{
@@ -846,15 +846,15 @@ void generateClassDefinition(std::ostream& o,
}
}
o << " };\n\n";
-
+
}
if (!services.empty())
generateCompFunctions(o, classname);
-
+
generateMethodBodies(o, options, manager, interfaces,
- " ", propertyhelper.getLength() > 1);
-
+ " ", propertyhelper.getLength() > 1);
+
// end of class definition
o << "}\n";
}
@@ -887,12 +887,12 @@ void generateSkeleton(ProgramOptions const & options,
interfaces, services, properties);
checkType(manager, "com.sun.star.frame.XDispatch",
interfaces, services, properties);
-
-
+
+
// ProtocolCmdMap::const_iterator iter2 = options.protocolCmdMap.begin();
// while (iter2 != options.protocolCmdMap.end()) {
// fprintf(stdout, "prt=%s\n", (*iter2).first.getStr());
-
+
// for (std::vector< OString >::const_iterator i = (*iter2).second.begin();
// i != (*iter2).second.end(); ++i) {
// fprintf(stdout, "cmd=%s\n", (*i).getStr());
@@ -901,7 +901,7 @@ void generateSkeleton(ProgramOptions const & options,
// }
// return;
}
-
+
if (options.componenttype == 2) {
if (services.size() != 1) {
throw CannotDumpException(
@@ -927,11 +927,11 @@ void generateSkeleton(ProgramOptions const & options,
}
}
-
+
// check if service object or simple UNO object
if (!services.empty())
- serviceobject = true;
-
+ serviceobject = true;
+
OString propertyhelper = checkPropertyHelper(
options, manager, services, interfaces, attributes, propinterfaces);
checkDefaultInterfaces(interfaces, services, propertyhelper);
@@ -941,7 +941,7 @@ void generateSkeleton(ProgramOptions const & options,
std::cerr << "WARNING: interfaces specifying calc add-in functions "
"shouldn't support attributes!\n";
}
-
+
supportxcomponent = checkXComponentSupport(manager, interfaces);
OString compFileName;
@@ -954,7 +954,7 @@ void generateSkeleton(ProgramOptions const & options,
if (!standardout && options.license) {
printLicenseHeader(*pofs, compFileName);
}
-
+
generatePackage(*pofs, options.implname);
generateImports(*pofs, options, interfaces, propertyhelper,
@@ -967,8 +967,8 @@ void generateSkeleton(ProgramOptions const & options,
generateClassDefinition(*pofs, options, manager, classname, services,
interfaces, properties, attributes, propertyhelper,
- supportxcomponent);
-
+ supportxcomponent);
+
if ( !standardout && pofs && ((std::ofstream*)pofs)->is_open()) {
((std::ofstream*)pofs)->close();
delete pofs;
@@ -976,21 +976,21 @@ void generateSkeleton(ProgramOptions const & options,
}
} catch(CannotDumpException& e) {
- std::cerr << "ERROR: " << e.m_message.getStr() << "\n";
+ std::cerr << "ERROR: " << e.m_message.getStr() << "\n";
if ( !standardout ) {
if (pofs && ((std::ofstream*)pofs)->is_open()) {
- ((std::ofstream*)pofs)->close();
+ ((std::ofstream*)pofs)->close();
delete pofs;
}
// remove existing type file if something goes wrong to ensure
// consistency
if (fileExists(compFileName))
removeTypeFile(compFileName);
-
+
// remove tmp file if something goes wrong
removeTypeFile(tmpFileName);
}
- }
+ }
}
} }
diff --git a/unodevtools/source/skeletonmaker/javatypemaker.cxx b/unodevtools/source/skeletonmaker/javatypemaker.cxx
index 9f49f66a8785..f69e474fa9ca 100644
--- a/unodevtools/source/skeletonmaker/javatypemaker.cxx
+++ b/unodevtools/source/skeletonmaker/javatypemaker.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -209,7 +209,7 @@ void printMethodParameters(std::ostream & o,
o << ", ";
else
previous = true;
-
+
if ( withtype ) {
printType(o, options, manager,
codemaker::convertString(
@@ -266,7 +266,7 @@ void printSetPropertyMixinBody(std::ostream & o,
bool bound = (reader.getFieldFlags(field) & RT_ACCESS_BOUND ? true : false);
o << "\n" << indentation << "{\n";
-
+
if ( bound ) {
o << indentation << " PropertySetMixin.BoundListeners l = "
"new PropertySetMixin.BoundListeners();\n\n";
@@ -289,7 +289,7 @@ void printSetPropertyMixinBody(std::ostream & o,
OStringBuffer buffer(16);
buffer.append("((");
buffer.append(s.copy(s.lastIndexOf('/')+1));
- buffer.append(')');
+ buffer.append(')');
OString t = buffer.makeStringAndClear();
if ( t.equals("((Optional)") ) {
@@ -304,22 +304,22 @@ void printSetPropertyMixinBody(std::ostream & o,
buffer2.insert(0, t);
buffer2.append(").Value");
}
- } else {
+ } else {
if ( single ) {
single=false;
if ( !optional ) {
- buffer1.append("the_value.Value");
+ buffer1.append("the_value.Value");
}
buffer2.append("the_value.Value");
} else {
if ( !optional ) {
buffer1.insert(0, t);
- buffer1.append(").Value");
+ buffer1.append(").Value");
}
buffer2.insert(0, t);
- buffer2.append(").Value");
+ buffer2.append(").Value");
}
- }
+ }
} while( nPos <= index );
o << "Any.VOID,\n" << indentation << " ";
@@ -330,15 +330,15 @@ void printSetPropertyMixinBody(std::ostream & o,
o << ") ? " << buffer2.makeStringAndClear() << " : Any.VOID,\n"
<< indentation << " ";
else
- o << ", ";
+ o << ", ";
}
-
+
if ( bound )
o << "l";
else
o << "null";
- o << ");\n";
-
+ o << ");\n";
+
o << indentation << " synchronized (this) {\n"
<< indentation << " m_" << fieldname
<< " = the_value;\n" << indentation << " }\n";
@@ -363,8 +363,8 @@ void printMethods(std::ostream & o,
OString type(codemaker::convertString(reader.getTypeName()));
if ( generated.contains(type) || type == "com/sun/star/uno/XInterface" ||
( defaultvalue &&
- ( type.equals("com/sun/star/lang/XComponent") ||
- type.equals("com/sun/star/lang/XTypeProvider") ||
+ ( type.equals("com/sun/star/lang/XComponent") ||
+ type.equals("com/sun/star/lang/XTypeProvider") ||
type.equals("com/sun/star/uno/XWeak") ) ) ) {
return;
}
@@ -384,11 +384,11 @@ void printMethods(std::ostream & o,
return;
}
}
-
+
static OString sd(RTL_CONSTASCII_STRINGPARAM("_"));
bool body = ((delegate.getLength() > 0) ? true : false);
bool defaultbody = ((delegate.equals(sd)) ? true : false);
-
+
generated.add(type);
if ( options.all || defaultvalue ) {
for (sal_uInt16 i = 0; i < reader.getSuperTypeCount(); ++i) {
@@ -422,7 +422,7 @@ void printMethods(std::ostream & o,
// attributes.insert(StringPairHashMap::value_type(fieldName,
// std::pair<OString, sal_Int16>(
// fieldType, reader.getFieldFlags(i))));
-
+
o << indentation << "public ";
printType(o,
options, manager,
@@ -475,7 +475,7 @@ void printMethods(std::ostream & o,
<< (codemaker::convertString(reader.getFieldName(i)).
getStr())
<< '(';
- printType(o,
+ printType(o,
options, manager,
codemaker::convertString(reader.getFieldTypeName(i)),
false);
@@ -510,14 +510,14 @@ void printMethods(std::ostream & o,
}
for ( ; method < reader.getMethodCount(); ++method ) {
o << indentation << "public ";
- printType(o,
+ printType(o,
options, manager,
codemaker::convertString(
reader.getMethodReturnTypeName(method)),
false);
-
+
const OString methodName(codemaker::convertString(reader.getMethodName(method)));
-
+
o << ' ' << methodName.getStr() << '(';
printMethodParameters(o, options, manager, reader, method, false, true);
o << ')';
@@ -537,7 +537,7 @@ void printMethods(std::ostream & o,
" in Java and C++\n" << indentation
<< " // polymorphic structs.\n" << indentation
<< " return ";
- printType(o,
+ printType(o,
options, manager,
codemaker::convertString(
reader.getMethodReturnTypeName(method)),
@@ -604,7 +604,7 @@ void printServiceMembers(std::ostream & o,
OString referenceType(
codemaker::convertString(
reader.getReferenceTypeName(i)).replace('/', '.'));
-
+
if ( reader.getReferenceSort(i) == RT_REF_SUPPORTS ) {
o << "\n// supported interface " << referenceType.getStr() << "\n";
generateDocumentation(o, options, manager, referenceType, delegate);
@@ -626,7 +626,7 @@ void printServiceMembers(std::ostream & o,
o << " "
<< codemaker::java::translateUnoToJavaIdentifier(
fieldName, "property").getStr()
- << ";\n";
+ << ";\n";
}
}
@@ -644,7 +644,7 @@ void printMapsToJavaType(std::ostream & o,
if ( rank == 0 && name == "com/sun/star/uno/XInterface" ) {
o << "com.sun.star.uno.XInterface";
} else {
- printType(o,
+ printType(o,
options, manager, sort, typeClass, name, rank, arguments, false);
}
o << '"';
@@ -673,7 +673,7 @@ void generateDocumentation(std::ostream & o,
comment=false;
}
-
+
if ( comment ) {
o << "\n// UNO";
if ( rank > 0 ) {
@@ -689,11 +689,11 @@ void generateDocumentation(std::ostream & o,
case RT_TYPE_INTERFACE:
o << " interface type";
break;
-
+
case RT_TYPE_MODULE:
o << "IDL module";
break;
-
+
case RT_TYPE_STRUCT:
if ( reader.getReferenceCount() == 0 ) {
o << " simple struct type";
@@ -703,19 +703,19 @@ void generateDocumentation(std::ostream & o,
o << " instantiated polymorphic struct type";
}
break;
-
+
case RT_TYPE_ENUM:
o << " enum type";
break;
-
+
case RT_TYPE_EXCEPTION:
o << " exception type";
break;
-
+
case RT_TYPE_TYPEDEF:
o << "IDL typedef";
break;
-
+
case RT_TYPE_SERVICE:
if ( reader.getSuperTypeCount() > 0 ) {
o << " single-inheritance--based service";
@@ -723,7 +723,7 @@ void generateDocumentation(std::ostream & o,
o << "IDL accumulation-based service";
}
break;
-
+
case RT_TYPE_SINGLETON:
if ( (manager.getTypeReader(
codemaker::convertString(
@@ -735,11 +735,11 @@ void generateDocumentation(std::ostream & o,
o << "IDL service-based singleton";
}
break;
-
+
case RT_TYPE_CONSTANTS:
o << "IDL constant group";
break;
-
+
default:
OSL_ASSERT(false);
break;
@@ -751,11 +751,11 @@ void generateDocumentation(std::ostream & o,
manager, binType, true, true, true, &typeClass, &name, &rank,
&arguments);
if ( rank > 0 ) {
- printMapsToJavaType(o,
+ printMapsToJavaType(o,
options, manager, sort, typeClass, name, rank, arguments, "array");
o << '\n';
} else if ( sort != codemaker::UnoType::SORT_COMPLEX ) {
- printMapsToJavaType(o,
+ printMapsToJavaType(o,
options, manager, sort, typeClass, name, rank, arguments, 0);
o << '\n';
} else {
@@ -781,7 +781,7 @@ void generateDocumentation(std::ostream & o,
break;
case RT_TYPE_MODULE:
- printMapsToJavaType(o,
+ printMapsToJavaType(o,
options, manager, sort, typeClass, name, rank, arguments,
"package");
o << '\n';
diff --git a/unodevtools/source/skeletonmaker/skeletoncommon.cxx b/unodevtools/source/skeletonmaker/skeletoncommon.cxx
index 188e0fa05101..218dc65bc52a 100644
--- a/unodevtools/source/skeletonmaker/skeletoncommon.cxx
+++ b/unodevtools/source/skeletonmaker/skeletoncommon.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -52,7 +52,7 @@ void printLicenseHeader(std::ostream& o, rtl::OString const & filename)
OString shortfilename(filename);
if ( index != -1 )
shortfilename = filename.copy(index+1);
-
+
o << "/*************************************************************************\n"
" *\n"
" * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.\n"
@@ -78,14 +78,14 @@ void printLicenseHeader(std::ostream& o, rtl::OString const & filename)
" * <http://www.openoffice.org/license.html>\n"
" * for a copy of the LGPLv3 License.\n"
" *\n"
- " ************************************************************************/\n\n";
+ " ************************************************************************/\n\n";
}
bool getOutputStream(ProgramOptions const & options,
OString const & extension,
std::ostream** ppOutputStream,
OString & targetSourceFileName,
- OString & tmpSourceFileName)
+ OString & tmpSourceFileName)
{
bool bStandardout = false;
if ( options.outputpath.equals("stdout") )
@@ -101,7 +101,7 @@ bool getOutputStream(ProgramOptions const & options,
OString tmpDir = getTempDir(targetSourceFileName);
FileStream file;
file.createTempFile(tmpDir);
-
+
if( !file.isValid() )
{
OString message("cannot open ");
@@ -164,8 +164,8 @@ void checkAttributes(TypeManager const & manager,
typeName.equals("com/sun/star/beans/XPropertyAccess") )
{
propinterfaces.insert(typeName);
- }
-
+ }
+
for ( sal_uInt16 i = 0; i < reader.getSuperTypeCount(); ++i ) {
typereg::Reader supertype(manager.getTypeReader(
codemaker::convertString(
@@ -200,7 +200,7 @@ void checkType(TypeManager const & manager,
std::hash_set< OString, OStringHash >& serviceTypes,
AttributeInfo& properties)
{
-
+
OString binType(type.replace('.', '/'));
typereg::Reader reader(manager.getTypeReader(binType));
if ( !reader.isValid() ) {
@@ -214,7 +214,7 @@ void checkType(TypeManager const & manager,
// com/sun/star/lang/XComponent should be also not in the list
// but it will be used for checking the impl helper and will be
// removed later if necessary.
- if ( binType.equals("com/sun/star/lang/XTypeProvider") ||
+ if ( binType.equals("com/sun/star/lang/XTypeProvider") ||
binType.equals("com/sun/star/uno/XWeak") )
return;
if (interfaceTypes.find(type) == interfaceTypes.end()) {
@@ -244,7 +244,7 @@ void checkType(TypeManager const & manager,
// check if constructors are specified, if yes automatically
// support of XInitialization. We will take care of the default
- // constructor because in this case XInitialization is not called.
+ // constructor because in this case XInitialization is not called.
if ( reader.getMethodCount() > 1 ||
( reader.getMethodCount() == 1 &&
reader.getMethodName(0).getLength() > 0 ) )
@@ -252,13 +252,13 @@ void checkType(TypeManager const & manager,
OString s("com.sun.star.lang.XInitialization");
if ( interfaceTypes.find(s) == interfaceTypes.end() )
interfaceTypes.insert(s);
- }
+ }
} else {
for ( sal_uInt16 i = 0; i < reader.getReferenceCount(); ++i ) {
OString referenceType(
codemaker::convertString(
reader.getReferenceTypeName(i)).replace('/', '.'));
-
+
if ( reader.getReferenceSort(i) == RT_REF_SUPPORTS ) {
checkType(manager, referenceType, interfaceTypes,
serviceTypes, properties);
@@ -267,7 +267,7 @@ void checkType(TypeManager const & manager,
serviceTypes, properties);
}
}
-
+
for ( sal_uInt16 i = 0; i < reader.getFieldCount(); ++i ) {
OString fieldName(
codemaker::convertString(reader.getFieldName(i)).
@@ -299,7 +299,7 @@ void checkDefaultInterfaces(
interfaces.erase("com.sun.star.lang.XServiceInfo");
} else {
if (interfaces.find("com.sun.star.lang.XServiceInfo") == interfaces.end())
- interfaces.insert("com.sun.star.lang.XServiceInfo");
+ interfaces.insert("com.sun.star.lang.XServiceInfo");
}
if ( propertyhelper.equals("_") ) {
@@ -318,9 +318,9 @@ void checkDefaultInterfaces(
bool checkServiceProperties(TypeManager const & manager,
const typereg::Reader & reader)
{
- if ( reader.getFieldCount() > 0 )
+ if ( reader.getFieldCount() > 0 )
return true;
-
+
if ( reader.getReferenceCount() > 0 ) {
for ( sal_uInt16 i = 0; i < reader.getReferenceCount(); ++i ) {
if ( reader.getReferenceSort(i) == RT_REF_EXPORTS ) {
@@ -331,7 +331,7 @@ bool checkServiceProperties(TypeManager const & manager,
if ( checkServiceProperties(manager, refreader) )
return true;
}
- }
+ }
}
return false;
}
@@ -353,7 +353,7 @@ OString checkPropertyHelper(
end = services.end();
} else {
iter = interfaces.begin();
- end = interfaces.end();
+ end = interfaces.end();
}
bool oldStyleWithProperties = false;
@@ -373,9 +373,9 @@ OString checkPropertyHelper(
+ codemaker::convertString(
reader.getSuperTypeName(0)));
}
-
+
checkAttributes(manager, supertype, attributes, propinterfaces);
-
+
if ( !(attributes.empty() || propinterfaces.empty()) ) {
return OUStringToOString(
supertype.getTypeName().replace('/', '.'),
@@ -394,7 +394,7 @@ OString checkPropertyHelper(
}
iter++;
}
-
+
return (oldStyleWithProperties ? "_" : "");
}
@@ -432,14 +432,14 @@ bool checkXComponentSupport(TypeManager const & manager,
{
if ( interfaces.empty() )
return false;
-
+
std::hash_set< OString, OStringHash >::const_iterator iter =
interfaces.begin();
while ( iter != interfaces.end() ) {
if ( (*iter).equals("com.sun.star.lang.XComponent") ) {
interfaces.erase("com.sun.star.lang.XComponent");
return true;
- }
+ }
typereg::Reader reader(manager.getTypeReader((*iter).replace('.', '/')));
if ( checkXComponentSupport(manager, reader) )
return true;
@@ -454,7 +454,7 @@ sal_uInt16 checkAdditionalPropertyFlags(typereg::Reader const & reader,
{
sal_uInt16 flags = 0;
bool getterSupportsUnknown = false;
-
+
OUString su(RTL_CONSTASCII_USTRINGPARAM(
"com/sun/star/beans/UnknownPropertyException"));
if ( method < reader.getMethodCount()
@@ -505,7 +505,7 @@ bool checkAddinType(TypeManager const & manager,
std::vector< OString > arguments;
codemaker::UnoType::Sort sort = codemaker::decomposeAndResolve(
manager, type, true, true, true, &typeClass, &name, &rank, &arguments);
-
+
if ( sort == codemaker::UnoType::SORT_LONG ||
sort == codemaker::UnoType::SORT_DOUBLE ||
sort == codemaker::UnoType::SORT_STRING )
@@ -514,14 +514,14 @@ bool checkAddinType(TypeManager const & manager,
return true;
}
if ( sort == codemaker::UnoType::SORT_ANY )
- {
+ {
if ( rank <= 2 ) {
if ( rank ==1 ) {
if ( bIsReturn )
return false;
bLastAny = true;
}
-
+
return true;
}
}
@@ -547,7 +547,7 @@ bool checkAddinType(TypeManager const & manager,
void checkAddInTypes(TypeManager const & manager,
typereg::Reader const & reader)
-{
+{
OString sType(codemaker::convertString(reader.getTypeName()).replace('/', '.'));
bool bLastAny = false;
bool bHasXPropertySet = false;
@@ -589,7 +589,7 @@ void checkAddInTypes(TypeManager const & manager,
if ( bHasXPropertySet )
msg.append(" The type 'XPropertySet' is allowed only once.");
- msg.append(" Please check your IDL definition.");
+ msg.append(" Please check your IDL definition.");
throw CannotDumpException(msg.makeStringAndClear());
}
}
@@ -617,7 +617,7 @@ void generateFunctionParamterMap(std::ostream& o,
// check if the specified add-in functions supports valid types
checkAddInTypes(manager, reader);
-
+
for ( sal_uInt16 i = 0; i < reader.getSuperTypeCount(); ++i ) {
typereg::Reader super(
manager.getTypeReader(
@@ -628,7 +628,7 @@ void generateFunctionParamterMap(std::ostream& o,
"Bad type library entity "
+ codemaker::convertString(
reader.getSuperTypeName(i)));
- }
+ }
generateFunctionParamterMap(o, options, manager, super, generated, bFirst);
}
@@ -665,7 +665,7 @@ void generateFunctionParamterMap(std::ostream& o,
else
o << " fpm = new java.util.Hashtable();\n";
}
-
+
for ( sal_uInt16 p = 0; p < reader.getMethodParameterCount(m); ++p ) {
if ( options.language == 2 ) {
o << " fpm[" << p
@@ -713,7 +713,7 @@ void generateFunctionParameterMap(std::ostream& o,
+ codemaker::convertString(
reader.getTypeName()));
}
-
+
generateFunctionParamterMap(o, options, manager, reader, generated, bFirst);
iter++;
}
diff --git a/unodevtools/source/skeletonmaker/skeletoncommon.hxx b/unodevtools/source/skeletonmaker/skeletoncommon.hxx
index 83b89bf15a21..557addb6b867 100644
--- a/unodevtools/source/skeletonmaker/skeletoncommon.hxx
+++ b/unodevtools/source/skeletonmaker/skeletoncommon.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -42,7 +42,7 @@ namespace skeletonmaker {
typedef ::std::map< ::rtl::OString, ::std::vector< ::rtl::OString >,
::std::less< ::rtl::OString > > ProtocolCmdMap;
-typedef ::std::vector< ::std::pair< rtl::OString,
+typedef ::std::vector< ::std::pair< rtl::OString,
::std::pair< rtl::OString, sal_Int16 > > > AttributeInfo;
@@ -85,7 +85,7 @@ void printLicenseHeader(std::ostream& o, rtl::OString const & filename);
create dependent on the output path, the implementation name and the
extension a new output file. If output path is equal "stdout" the tool
generates the output to standard out.
-
+
@param options the program options including the output path and the
implementation name
@param extension specifies the file extensions (e.g. .cxx or .java)
@@ -131,10 +131,10 @@ rtl::OString checkPropertyHelper(
checks whether the return and parameters types are valid and allowed
calc add-in type. The function throws a CannotDumpException with an
detailed error description which type is wrong
-
+
@param manager a type manager
@param reader a registry type reader of an interface defining
- calc add-in functions
+ calc add-in functions
*/
void checkAddInTypes(TypeManager const & manager,
typereg::Reader const & reader);
diff --git a/unodevtools/source/skeletonmaker/skeletoncpp.hxx b/unodevtools/source/skeletonmaker/skeletoncpp.hxx
index 803788cfb3c6..6213bc1dbb9b 100644
--- a/unodevtools/source/skeletonmaker/skeletoncpp.hxx
+++ b/unodevtools/source/skeletonmaker/skeletoncpp.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/unodevtools/source/skeletonmaker/skeletonjava.hxx b/unodevtools/source/skeletonmaker/skeletonjava.hxx
index e2c0c9e75539..36174d19f49a 100644
--- a/unodevtools/source/skeletonmaker/skeletonjava.hxx
+++ b/unodevtools/source/skeletonmaker/skeletonjava.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/unodevtools/source/skeletonmaker/skeletonmaker.cxx b/unodevtools/source/skeletonmaker/skeletonmaker.cxx
index 2467bf2334c6..dffb0c81712a 100644
--- a/unodevtools/source/skeletonmaker/skeletonmaker.cxx
+++ b/unodevtools/source/skeletonmaker/skeletonmaker.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -74,7 +74,7 @@ static const char usageText[] =
" -sn, --shortnames using namespace abbreviation 'css:': for\n"
" '::com::sun::star::', only valid for sub-command\n"
" 'dump' and target language 'cpp'. It is default for the\n"
-" sub-command 'component'.\n"
+" sub-command 'component'.\n"
" --propertysetmixin the generated skeleton implements the cppu::PropertySetMixin\n"
" helper if a referenced new style service specifies an\n"
" interface which provides attributes (directly or inherited).\n"
@@ -157,7 +157,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, /*argv*/)
OString delegate;
try {
-
+
sal_Int32 nPos = 0;
sal_Int32 nCount = (sal_Int32)rtl_getAppCommandArgCount();
OUString arg, sOption;
@@ -195,7 +195,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, /*argv*/)
printUsageAndExit(programname, version);
exit(EXIT_FAILURE);
}
-
+
// read up to arguments
while ( nPos < nCount )
{
@@ -220,26 +220,26 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, /*argv*/)
options.java5 = false;
options.language = 2;
continue;
- }
+ }
if ( readOption( &bOption, "sn", &nPos, arg) ||
readOption( &bOption, "shortnames", &nPos, arg) ) {
options.shortnames = true;
continue;
- }
+ }
if ( readOption( &bOption, "lh", &nPos, arg) ||
readOption( &bOption, "licenseheader", &nPos, arg) ) {
options.license = true;
continue;
- }
+ }
if ( readOption( &bOption, "bc", &nPos, arg) ||
readOption( &bOption, "backward-compatible", &nPos, arg) ) {
options.backwardcompatible = true;
continue;
- }
+ }
if ( readOption( &bOption, "propertysetmixin", &nPos, arg) ) {
options.supportpropertysetmixin = true;
continue;
- }
+ }
if ( readOption( &sOption, "d", &nPos, arg) ) {
delegate = OUStringToOString(sOption, RTL_TEXTENCODING_UTF8);
continue;
@@ -273,27 +273,27 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, /*argv*/)
vCmds.push_back(sCmd);
} while ( nIndex >= 0 );
- options.protocolCmdMap.insert(ProtocolCmdMap::value_type(sPrt, vCmds));
+ options.protocolCmdMap.insert(ProtocolCmdMap::value_type(sPrt, vCmds));
continue;
}
-
-
+
+
// else illegal argument
OUStringBuffer buf( 64 );
buf.appendAscii(RTL_CONSTASCII_STRINGPARAM("unexpected parameter \""));
buf.append(arg);
buf.appendAscii(RTL_CONSTASCII_STRINGPARAM("\"!"));
- throw RuntimeException(buf.makeStringAndClear(),
+ throw RuntimeException(buf.makeStringAndClear(),
Reference< XInterface >());
}
-
+
if ( types.empty() && options.componenttype != 3) {
std::cerr
<< ("\nError: no type is specified, use the -T option at least once\n");
- printUsageAndExit(programname, version);
+ printUsageAndExit(programname, version);
exit(EXIT_FAILURE);
}
-
+
UnoTypeManager manager;
if ( !manager.init(registries) ) {
std::cerr
@@ -337,7 +337,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, /*argv*/)
break;
}
}
-
+
} catch (CannotDumpException & e) {
std::cout.flush();
std::cerr << "\nError: " << e.m_message << std::endl;