summaryrefslogtreecommitdiff
path: root/unodevtools
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2008-07-11 13:52:04 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2008-07-11 13:52:04 +0000
commitb150632a4010c8dafb18df010c773317497cf6ca (patch)
tree70be2e2f97313c68b29da50cb405844c961edc68 /unodevtools
parenta96733513a8d04c46d36218bc2b22ee0f7cb2a74 (diff)
INTEGRATION: CWS jsc21 (1.9.28); FILE MERGED
2008/04/23 09:54:14 jsc 1.9.28.3: RESYNC: (1.9-1.10); FILE MERGED 2008/03/10 09:57:49 jsc 1.9.28.2: #i86053# fix unused imports for components as well 2008/02/13 07:44:55 jsc 1.9.28.1: #86053# remove unused import
Diffstat (limited to 'unodevtools')
-rw-r--r--unodevtools/source/skeletonmaker/javacompskeleton.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/unodevtools/source/skeletonmaker/javacompskeleton.cxx b/unodevtools/source/skeletonmaker/javacompskeleton.cxx
index 4fc21fe0818f..d7a5ca151cd8 100644
--- a/unodevtools/source/skeletonmaker/javacompskeleton.cxx
+++ b/unodevtools/source/skeletonmaker/javacompskeleton.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: javacompskeleton.cxx,v $
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
* This file is part of OpenOffice.org.
*
@@ -47,12 +47,13 @@ void generatePackage(std::ostream & o, const OString & implname)
o << "package " << implname.copy(0, index) << ";\n\n";
}
-void generateImports(std::ostream & o,
+void generateImports(std::ostream & o, ProgramOptions const & options,
const std::hash_set< OString, OStringHash >& /*interfaces*/,
const OString & propertyhelper,
bool serviceobject, bool supportxcomponent)
{
- o << "import com.sun.star.uno.UnoRuntime;\n";
+ if (options.componenttype == 3)
+ o << "import com.sun.star.uno.UnoRuntime;\n";
o << "import com.sun.star.uno.XComponentContext;\n";
if (serviceobject) {
o << "import com.sun.star.lib.uno.helper.Factory;\n";
@@ -958,7 +959,7 @@ void generateSkeleton(ProgramOptions const & options,
generatePackage(*pofs, options.implname);
- generateImports(*pofs, interfaces, propertyhelper,
+ generateImports(*pofs, options, interfaces, propertyhelper,
serviceobject, supportxcomponent);
OString classname(options.implname);