From b406c51330ebea0459f38b0073f0783410b072f3 Mon Sep 17 00:00:00 2001 From: Takeshi Abe Date: Fri, 4 Mar 2011 01:41:18 +0900 Subject: removed dead code; fix a comment --- jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx | 1 - jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx | 2 +- jvmfwk/plugins/sunmajor/pluginlib/util.cxx | 5 ----- jvmfwk/plugins/sunmajor/pluginlib/vendorlist.hxx | 9 --------- jvmfwk/source/elements.cxx | 7 +------ jvmfwk/source/framework.cxx | 6 ------ jvmfwk/source/framework.hxx | 1 - jvmfwk/source/fwkutil.hxx | 4 ---- jvmfwk/source/libxmlutil.hxx | 18 ------------------ 9 files changed, 2 insertions(+), 51 deletions(-) (limited to 'jvmfwk') diff --git a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx index 395f386d1939..8e8bfb94ea32 100644 --- a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx +++ b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx @@ -47,7 +47,6 @@ using ::rtl::OString; static sal_Bool hasOption(char const * szOption, int argc, char** argv); static rtl::OString getLD_LIBRARY_PATH(const rtl::ByteSequence & vendorData); static bool findAndSelect(JavaInfo**); -//static sal_Bool printPaths(const OUString& sPathFile); #define HELP_TEXT \ "\njavaldx is necessary to make Java work on some UNIX platforms." \ diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx index 5bc76c26f421..bb3e1765a030 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx @@ -128,7 +128,7 @@ bool SunVersion::init(const char *szVersion) //check next character if (! ( (pCur < pEnd) - && ( (nPart < 3) && isdigit(*pCur)))) //(*pCur >= 48 && *pCur <=57)))) + && ( (nPart < 3) && isdigit(*pCur)))) return false; } else diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx index e208d43bb400..b34d486a4b2e 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx @@ -157,7 +157,6 @@ namespace { OUString const & operator()() { - // osl::Guard g(osl::GetGlobalMutex()); static OUString sIni; rtl::OUStringBuffer buf( 255); buf.append( getLibraryLocation()); @@ -456,8 +455,6 @@ bool getJavaProps(const OUString & exePath, rs = stdoutReader.readLine( & aLine); if (rs != FileHandleReader::RESULT_OK) break; -// JFW_TRACE2(OString("[Java framework] line:\" ") -// + aLine + OString(" \".\n")); OUString sLine; if (!decodeOutput(aLine, &sLine)) continue; @@ -515,7 +512,6 @@ bool decodeOutput(const rtl::OString& s, rtl::OUString* out) } while (nIndex >= 0); *out = buff.makeStringAndClear(); -// JFW_TRACE2(*out); return true; } @@ -559,7 +555,6 @@ bool getJavaInfoFromRegistry(const wchar_t* szRegKey, DWORD dwIndex = 0; const DWORD BUFFSIZE = 1024; wchar_t bufVersion[BUFFSIZE]; -// char bufVersion[BUFFSIZE]; DWORD nNameLen = BUFFSIZE; FILETIME fileTime; nNameLen = sizeof(bufVersion); diff --git a/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.hxx b/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.hxx index f1987ef42961..7edc5fa00735 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.hxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.hxx @@ -35,18 +35,9 @@ namespace jfw_plugin { -//extern VendorSupportMapEntry gVendorMap[]; - typedef char const * const * (* getJavaExePaths_func)(int*); typedef rtl::Reference (* createInstance_func) (); -// struct Blas -// { -// char const * sVendorName; -// getJavaExePaths_func getJavaFunc; -// createInstance_func createFunc; -// }; - struct VendorSupportMapEntry { char const * sVendorName; diff --git a/jvmfwk/source/elements.cxx b/jvmfwk/source/elements.cxx index 0a75d8e36fca..6557217f1463 100644 --- a/jvmfwk/source/elements.cxx +++ b/jvmfwk/source/elements.cxx @@ -44,8 +44,6 @@ #include "rtl/bootstrap.hxx" #include "boost/optional.hpp" #include -// #define NS_JAVA_FRAMEWORK "http://openoffice.org/2004/java/framework/1.0" -// #define NS_SCHEMA_INSTANCE "http://www.w3.org/2001/XMLSchema-instance" using namespace osl; @@ -154,13 +152,12 @@ void createSettingsStructure(xmlDoc * document, bool * bNeedsSave) nodeCrLf = xmlNewText((xmlChar*) "\n"); xmlAddChild(root, nodeCrLf); - // + // xmlNode * nodeJava = xmlNewTextChild( root,NULL, (xmlChar*) "javaInfo", (xmlChar*) ""); if (nodeJava == NULL) throw FrameworkException(JFW_E_ERROR, sExcMsg); xmlSetNsProp(nodeJava,nsXsi,(xmlChar*) "nil",(xmlChar*) "true"); -// xmlSetProp(nodeJava,(xmlChar*) "autoSelect",(xmlChar*) "true"); //add a new line nodeCrLf = xmlNewText((xmlChar*) "\n"); xmlAddChild(root, nodeCrLf); @@ -733,7 +730,6 @@ jfw::FileStatus NodeJava::checkSettingsFileStatus() const //that after removing the file and shortly later creating it again //did not change the creation time. That is the newly created file //had the creation time of the former file. -// ::TimeValue time = stat.getCreationTime(); ::TimeValue modTime = stat.getModifyTime(); ::TimeValue curTime = {0,0}; if (sal_True == ::osl_getSystemTime(& curTime)) @@ -746,7 +742,6 @@ jfw::FileStatus NodeJava::checkSettingsFileStatus() const fprintf(stderr, "[Java framework] Deleting settings file at \n%s\n", s.getStr()); #endif //delete file -// File::RC rc_rem = File::remove(sURL); File f(sURL); if (File::E_None == f.open(osl_File_OpenFlag_Write | osl_File_OpenFlag_Read) && File::E_None == f.setPos(0, 0) diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx index 77c76fb66d8e..59f1942f13af 100644 --- a/jvmfwk/source/framework.cxx +++ b/jvmfwk/source/framework.cxx @@ -162,8 +162,6 @@ javaFrameworkError SAL_CALL jfw_findAllJREs(JavaInfo ***pparInfo, sal_Int32 *pSi for (citLoc ii = vecJRELocations.begin(); ii != vecJRELocations.end(); ++ii) { -// rtl::OUString sLocation = -// rtl::OStringToOUString(*ii, RTL_TEXTENCODING_UTF8); jfw::CJavaInfo aInfo; plerr = (*jfw_plugin_getJavaInfoByPathFunc)( ii->pData, @@ -1256,10 +1254,6 @@ CJavaInfo::operator JavaInfo const * () const { return pInfo; } -// ::JavaInfo** CJavaInfo::operator & () -// { -// return & pInfo; -// } rtl::OUString CJavaInfo::getVendor() const { diff --git a/jvmfwk/source/framework.hxx b/jvmfwk/source/framework.hxx index 89859d4806ed..0ba8c6b29583 100644 --- a/jvmfwk/source/framework.hxx +++ b/jvmfwk/source/framework.hxx @@ -104,7 +104,6 @@ public: void attach(::JavaInfo* pInfo); ::JavaInfo * detach(); const ::JavaInfo* operator ->() const; -// ::JavaInfo** operator & (); operator ::JavaInfo* (); operator ::JavaInfo const * () const; ::JavaInfo* cloneJavaInfo() const; diff --git a/jvmfwk/source/fwkutil.hxx b/jvmfwk/source/fwkutil.hxx index 59df5c5dcf35..9e241cf92efe 100644 --- a/jvmfwk/source/fwkutil.hxx +++ b/jvmfwk/source/fwkutil.hxx @@ -69,15 +69,11 @@ struct Bootstrap : struct FwkMutex: public ::rtl::Static {}; -//osl::Mutex * getFwkMutex(); - rtl::ByteSequence encodeBase16(const rtl::ByteSequence& rawData); rtl::ByteSequence decodeBase16(const rtl::ByteSequence& data); rtl::OUString getPlatform(); -//const rtl::Bootstrap& getBootstrap(); - rtl::OUString getDirFromFile(const rtl::OUString& usFilePath); diff --git a/jvmfwk/source/libxmlutil.hxx b/jvmfwk/source/libxmlutil.hxx index 5ac245afc3c7..b8c4a6e2f388 100644 --- a/jvmfwk/source/libxmlutil.hxx +++ b/jvmfwk/source/libxmlutil.hxx @@ -87,24 +87,6 @@ public: operator xmlDoc* (); }; -//=========================================================== -// class CXmlNsPtr -// { -// xmlNs* _object; - -// CXmlNsPtr(const CXmlNsPtr&); -// CXmlNsPtr & operator = (const CXmlNsPtr&); -// public: -// CXmlNsPtr(); -// CXmlNsPtr(xmlNs* aDoc); -// /** Takes ownership of xmlDoc -// */ -// CXmlNsPtr & operator = (xmlNs* pObj); -// ~CXmlNsPtr(); -// xmlNs* operator -> (); -// operator xmlNs* (); -// }; - //=========================================================== class CXmlCharPtr { -- cgit