Lines Matching refs:o
36 void generatePackage(std::ostream & o, const OString & implname) in generatePackage() argument
40 o << "package " << implname.copy(0, index) << ";\n\n"; in generatePackage()
43 void generateImports(std::ostream & o, ProgramOptions const & options, in generateImports() argument
49 o << "import com.sun.star.uno.UnoRuntime;\n"; in generateImports()
50 o << "import com.sun.star.uno.XComponentContext;\n"; in generateImports()
52 o << "import com.sun.star.lib.uno.helper.Factory;\n"; in generateImports()
53 o << "import com.sun.star.lang.XSingleComponentFactory;\n"; in generateImports()
54 o << "import com.sun.star.registry.XRegistryKey;\n"; in generateImports()
59 o << "import com.sun.star.lib.uno.helper.ComponentBase;\n"; in generateImports()
61 o << "import com.sun.star.lib.uno.helper.WeakBase;\n"; in generateImports()
65 o << "import com.sun.star.lib.uno.helper.PropertySet;\n"; in generateImports()
66 o << "import com.sun.star.beans.PropertyAttribute;\n"; in generateImports()
68 o << "import com.sun.star.uno.Type;\n"; in generateImports()
69 o << "import com.sun.star.uno.Any;\n"; in generateImports()
70 o << "import com.sun.star.beans.Ambiguous;\n"; in generateImports()
71 o << "import com.sun.star.beans.Defaulted;\n"; in generateImports()
72 o << "import com.sun.star.beans.Optional;\n"; in generateImports()
73 o << "import com.sun.star.lib.uno.helper.PropertySetMixin;\n"; in generateImports()
87 void generateCompFunctions(std::ostream & o, const OString & classname) in generateCompFunctions() argument
89 o << " public static XSingleComponentFactory __getComponentFactory(" in generateCompFunctions()
97 o << " public static boolean __writeRegistryServiceInfo(" in generateCompFunctions()
105 void generateXServiceInfoBodies(std::ostream& o) in generateXServiceInfoBodies() argument
107 o << " // com.sun.star.lang.XServiceInfo:\n"; in generateXServiceInfoBodies()
108 o << " public String getImplementationName() {\n" in generateXServiceInfoBodies()
111 o << " public boolean supportsService( String sService ) {\n" in generateXServiceInfoBodies()
118 o << " public String[] getSupportedServiceNames() {\n" in generateXServiceInfoBodies()
122 void generateXPropertySetBodies(std::ostream& o) in generateXPropertySetBodies() argument
124 o << " // com.sun.star.beans.XPropertySet:\n"; in generateXPropertySetBodies()
125 o << " public com.sun.star.beans.XPropertySetInfo getPropertySetInfo()\n" in generateXPropertySetBodies()
128 o << " public void setPropertyValue(String aPropertyName, " in generateXPropertySetBodies()
136 o << " public Object getPropertyValue(String " in generateXPropertySetBodies()
141 o << " public void addPropertyChangeListener(String aPropertyName" in generateXPropertySetBodies()
147 o << " public void removePropertyChangeListener(String " in generateXPropertySetBodies()
154 o << " public void addVetoableChangeListener(String aPropertyName" in generateXPropertySetBodies()
160 o << " public void removeVetoableChangeListener(String " in generateXPropertySetBodies()
167 void generateXFastPropertySetBodies(std::ostream& o) in generateXFastPropertySetBodies() argument
169 o << " // com.sun.star.beans.XFastPropertySet:\n"; in generateXFastPropertySetBodies()
171 o << " public void setFastPropertyValue(int nHandle, Object " in generateXFastPropertySetBodies()
178 o << " public Object getFastPropertyValue(int nHandle) throws " in generateXFastPropertySetBodies()
184 void generateXPropertyAccessBodies(std::ostream& o) in generateXPropertyAccessBodies() argument
186 o << " // com.sun.star.beans.XPropertyAccess:\n"; in generateXPropertyAccessBodies()
188 o << " public com.sun.star.beans.PropertyValue[] getPropertyValues()\n" in generateXPropertyAccessBodies()
191 o << " public void setPropertyValues(com.sun.star.beans.PropertyValue[] " in generateXPropertyAccessBodies()
261 void registerProperties(std::ostream& o, in registerProperties() argument
279 o << indentation << "registerProperty(\"" << i->first in registerProperties()
283 o << "(short)"; in registerProperties()
285 o << attributeValue.makeStringAndClear() << ");\n"; in registerProperties()
290 void generateXLocalizableBodies(std::ostream& o) { in generateXLocalizableBodies() argument
293 o << " // com.sun.star.lang.XLocalizable:\n" in generateXLocalizableBodies()
298 o << " public com.sun.star.lang.Locale getLocale()\n {\n" in generateXLocalizableBodies()
302 void generateXAddInBodies(std::ostream& o, ProgramOptions const & options) in generateXAddInBodies() argument
306 o << " // com.sun.star.sheet.XAddIn:\n" in generateXAddInBodies()
328 o << " public String getDisplayFunctionName(String " in generateXAddInBodies()
334 o << " public String getFunctionDescription(String " in generateXAddInBodies()
340 o << " public String getDisplayArgumentName(String " in generateXAddInBodies()
343 o << " return getAddinProperty(aProgrammaticFunctionName,\n" in generateXAddInBodies()
349 o << " return getAddinProperty(aProgrammaticFunctionName, (String)\n" in generateXAddInBodies()
357 o << " public String getArgumentDescription(String " in generateXAddInBodies()
360 o << " return getAddinProperty(aProgrammaticFunctionName,\n" in generateXAddInBodies()
366 o << " return getAddinProperty(aProgrammaticFunctionName, (String)\n" in generateXAddInBodies()
373 o << " public String getProgrammaticCategoryName(String " in generateXAddInBodies()
379 o << " public String getDisplayCategoryName(String " in generateXAddInBodies()
385 void generateXCompatibilityNamesBodies(std::ostream& o) in generateXCompatibilityNamesBodies() argument
387 o << " // com.sun.star.sheet.XCompatibilityNames:\n" in generateXCompatibilityNamesBodies()
393 o << " StringBuffer path = new StringBuffer(aProgrammaticName);\n" in generateXCompatibilityNamesBodies()
397 o << " if ( m_xCompAccess.hasByHierarchicalName(hname) ) {\n" in generateXCompatibilityNamesBodies()
408 o << " for (int i=0; i < len; ++i) {\n" in generateXCompatibilityNamesBodies()
434 void generateXInitializationBodies(std::ostream& o) in generateXInitializationBodies() argument
436 o << " // com.sun.star.lang.XInitialization:\n" in generateXInitializationBodies()
444 void generateXDispatchBodies(std::ostream& o, ProgramOptions const & options) in generateXDispatchBodies() argument
448 o << " // com.sun.star.frame.XDispatch:\n" in generateXDispatchBodies()
454 o << " if ( aURL.Protocol.compareTo(\"" << (*iter).first in generateXDispatchBodies()
459 o << " if ( aURL.Path.compareTo(\"" << (*i) << "\") == 0 )\n" in generateXDispatchBodies()
464 o << " }\n"; in generateXDispatchBodies()
467 o << " }\n\n"; in generateXDispatchBodies()
470 o << " public void addStatusListener( com.sun.star.frame.XStatusListener xControl,\n" in generateXDispatchBodies()
475 o << " public void removeStatusListener( com.sun.star.frame.XStatusListener xControl,\n" in generateXDispatchBodies()
480 void generateXDispatchProviderBodies(std::ostream& o, ProgramOptions const & options) in generateXDispatchProviderBodies() argument
484 o << " // com.sun.star.frame.XDispatchProvider:\n" in generateXDispatchProviderBodies()
491 o << " if ( aURL.Protocol.compareTo(\"" << (*iter).first in generateXDispatchProviderBodies()
496 o << " if ( aURL.Path.compareTo(\"" << (*i) << "\") == 0 )\n" in generateXDispatchProviderBodies()
500 o << " }\n"; in generateXDispatchProviderBodies()
503 o << " return null;\n }\n\n"; in generateXDispatchProviderBodies()
506 o << " // com.sun.star.frame.XDispatchProvider:\n" in generateXDispatchProviderBodies()
519 void generateMethodBodies(std::ostream& o, in generateMethodBodies() argument
532 generateXServiceInfoBodies(o); in generateMethodBodies()
537 o << " // com.sun.star.lang.XServiceName:\n" in generateMethodBodies()
543 generateXAddInBodies(o, options); in generateMethodBodies()
548 generateXLocalizableBodies(o); in generateMethodBodies()
553 generateXLocalizableBodies(o); in generateMethodBodies()
557 generateXCompatibilityNamesBodies(o); in generateMethodBodies()
564 generateXInitializationBodies(o); in generateMethodBodies()
568 generateXDispatchBodies(o, options); in generateMethodBodies()
572 generateXDispatchProviderBodies(o, options); in generateMethodBodies()
578 printMethods(o, options, manager, reader, generated, "_", in generateMethodBodies()
591 void generateAddinConstructorAndHelper(std::ostream& o, in generateAddinConstructorAndHelper() argument
597 o << " private com.sun.star.lang.Locale m_locale = " in generateAddinConstructorAndHelper()
602 o << "\n public " << classname << "( XComponentContext context )\n" in generateAddinConstructorAndHelper()
617 o << "\n private static final String sADDIN_SERVICENAME = \"" in generateAddinConstructorAndHelper()
619 o << " private static final String sDISPLAYNAME = " in generateAddinConstructorAndHelper()
627 o << " private com.sun.star.container.XHierarchicalNameAccess " in generateAddinConstructorAndHelper()
632 o << " private java.util.Hashtable<\n String, " in generateAddinConstructorAndHelper()
635 o << " private java.util.Hashtable m_functionMap = null;\n\n"; in generateAddinConstructorAndHelper()
638 o << "\n public " << classname << "( XComponentContext context )\n {\n" in generateAddinConstructorAndHelper()
643 o << " m_functionMap = new java.util.Hashtable<\n" in generateAddinConstructorAndHelper()
647 o << " m_functionMap = new java.util.Hashtable();\n\n"; in generateAddinConstructorAndHelper()
650 generateFunctionParameterMap(o, options, manager, interfaces); in generateAddinConstructorAndHelper()
652 o << " com.sun.star.lang.XMultiServiceFactory xProvider = \n" in generateAddinConstructorAndHelper()
660 o << " String sReadOnlyView = " in generateAddinConstructorAndHelper()
663 o << " StringBuffer sPath = new StringBuffer(\n" in generateAddinConstructorAndHelper()
668 o << " // create arguments: nodepath\n" in generateAddinConstructorAndHelper()
675 o << " Object aArguments[] = new Object[1];\n" in generateAddinConstructorAndHelper()
680 o << " // create the default view using default UI locale\n" in generateAddinConstructorAndHelper()
685 o << " m_xHAccess = (com.sun.star.container.XHierarchicalNameAccess)\n" in generateAddinConstructorAndHelper()
690 o << " // extends arguments to create a view for all locales to get " in generateAddinConstructorAndHelper()
703 o << " // create view for all locales\n" in generateAddinConstructorAndHelper()
713 o << " // addin configuration property helper function:\n" in generateAddinConstructorAndHelper()
722 o << " com.sun.star.beans.XPropertySet xPropSet =\n" in generateAddinConstructorAndHelper()
736 void generateClassDefinition(std::ostream& o, in generateClassDefinition() argument
746 o << "\n\npublic final class " << classname << " extends "; in generateClassDefinition()
750 o << "PropertySet\n"; in generateClassDefinition()
753 o << "ComponentBase\n"; in generateClassDefinition()
755 o << "WeakBase\n"; in generateClassDefinition()
757 o << " implements "; in generateClassDefinition()
761 o << (*iter); in generateClassDefinition()
764 o << ",\n "; in generateClassDefinition()
767 o << "\n{\n"; in generateClassDefinition()
769 o << " private final XComponentContext m_xContext;\n"; in generateClassDefinition()
773 o << " private com.sun.star.frame.XFrame m_xFrame;\n"; in generateClassDefinition()
778 o << " private final PropertySetMixin m_prophlp;\n"; in generateClassDefinition()
780 o << " private static final String m_implementationName = " in generateClassDefinition()
784 o << " private static final String[] m_serviceNames = {\n"; in generateClassDefinition()
788 o << " \"" << (*iter).replace('/','.') << "\""; in generateClassDefinition()
791 o << ",\n"; in generateClassDefinition()
793 o << " };\n\n"; in generateClassDefinition()
801 o << " // properties\n"; in generateClassDefinition()
803 o << " protected "; in generateClassDefinition()
804 printType(o, options, manager, iter->second.first.replace('.','/'), in generateClassDefinition()
806 o << " m_" << iter->first << ";\n"; in generateClassDefinition()
812 o << " // attributes\n"; in generateClassDefinition()
814 o << " private "; in generateClassDefinition()
815 printType(o, options, manager, iter->second.first.replace('.','/'), in generateClassDefinition()
817 o << " m_" << iter->first << " = "; in generateClassDefinition()
818 printType(o, options, manager, iter->second.first.replace('.','/'), in generateClassDefinition()
820 o <<";\n"; in generateClassDefinition()
828 generateAddinConstructorAndHelper(o, options, manager, classname, in generateClassDefinition()
831 o << "\n public " << classname << "( XComponentContext context )\n" in generateClassDefinition()
834 registerProperties(o, manager, properties, " "); in generateClassDefinition()
837 o << propcomment in generateClassDefinition()
843 o << " };\n\n"; in generateClassDefinition()
848 generateCompFunctions(o, classname); in generateClassDefinition()
850 generateMethodBodies(o, options, manager, interfaces, in generateClassDefinition()
854 o << "}\n"; in generateClassDefinition()