summaryrefslogtreecommitdiff
path: root/l10ntools/source/help/HelpLinker.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'l10ntools/source/help/HelpLinker.cxx')
-rw-r--r--l10ntools/source/help/HelpLinker.cxx68
1 files changed, 10 insertions, 58 deletions
diff --git a/l10ntools/source/help/HelpLinker.cxx b/l10ntools/source/help/HelpLinker.cxx
index a8eec6909914..32de3cc5efeb 100644
--- a/l10ntools/source/help/HelpLinker.cxx
+++ b/l10ntools/source/help/HelpLinker.cxx
@@ -51,17 +51,16 @@
#define DBHELP_ONLY
-
class IndexerPreProcessor
{
private:
- std::string m_aModuleName;
- fs::path m_fsIndexBaseDir;
- fs::path m_fsCaptionFilesDirName;
- fs::path m_fsContentFilesDirName;
+ std::string m_aModuleName;
+ fs::path m_fsIndexBaseDir;
+ fs::path m_fsCaptionFilesDirName;
+ fs::path m_fsContentFilesDirName;
- xsltStylesheetPtr m_xsltStylesheetPtrCaption;
- xsltStylesheetPtr m_xsltStylesheetPtrContent;
+ xsltStylesheetPtr m_xsltStylesheetPtrCaption;
+ xsltStylesheetPtr m_xsltStylesheetPtrContent;
public:
IndexerPreProcessor( const std::string& aModuleName, const fs::path& fsIndexBaseDir,
@@ -250,7 +249,6 @@ class HelpLinker
{
public:
void main(std::vector<std::string> &args,
-// std::string* pExtensionPath = NULL, const rtl::OUString* pOfficeHelpPath = NULL )
std::string* pExtensionPath = NULL,
std::string* pDestination = NULL,
const rtl::OUString* pOfficeHelpPath = NULL )
@@ -278,12 +276,10 @@ private:
std::string extdestination;
std::string module;
std::string lang;
- std::string hid;
std::string extensionPath;
std::string extensionDestination;
bool bExtensionMode;
fs::path indexDirName;
- Stringtable hidlistTranslation;
fs::path indexDirParentName;
bool init;
IndexerPreProcessor* m_pIndexerPreProcessor;
@@ -324,13 +320,6 @@ void HelpLinker::addBookmark( DB* dbBase, FILE* pFile_DBHelp, std::string thishi
HCDBG(std::cerr << "HelpLinker::addBookmark " << thishid << " " <<
fileB << " " << anchorB << " " << jarfileB << " " << titleB << std::endl);
- std::string temp = thishid;
- std::transform (temp.begin(), temp.end(), temp.begin(), toupper);
- std::replace(temp.begin(), temp.end(), ':', '_');
- const std::string& translatedHid = hidlistTranslation[temp];
- if (!translatedHid.empty())
- thishid = translatedHid;
-
thishid = URLEncoder::encode(thishid);
DBT key;
@@ -464,20 +453,6 @@ void HelpLinker::link() throw( HelpProcessingException )
try
{
- std::ifstream fileReader(hid.c_str());
- while (fileReader)
- {
- std::string key;
- fileReader >> key;
- std::transform (key.begin(), key.end(), key.begin(), toupper);
- std::replace(key.begin(), key.end(), ':', '_');
- std::string data;
- fileReader >> data;
- if (!key.empty() && !data.empty())
- hidlistTranslation[key] = data;
- }
- fileReader.close();
-
// lastly, initialize the indexBuilder
if ( (!bExtensionMode || bIndexForExtension) && !helpFiles.empty())
initIndexerPreProcessor();
@@ -636,13 +611,6 @@ void HelpLinker::link() throw( HelpProcessingException )
std::string helpTextId = helpTextIter->first;
const std::string& helpTextText = helpTextIter->second;
- std::string temp = helpTextId;
- std::transform (temp.begin(), temp.end(), temp.begin(), toupper);
- std::replace(temp.begin(), temp.end(), ':', '_');
-
- const std::string& tHid = hidlistTranslation[temp];
- if (!tHid.empty())
- helpTextId = tHid;
helpTextId = URLEncoder::encode(helpTextId);
DBT keyDbt;
@@ -682,8 +650,8 @@ void HelpLinker::link() throw( HelpProcessingException )
if( !bExtensionMode )
std::cout << std::endl;
- } // try
- catch( HelpProcessingException& )
+ } // try
+ catch( const HelpProcessingException& )
{
// catch HelpProcessingException to avoid locking data bases
#ifndef DBHELP_ONLY
@@ -887,14 +855,7 @@ void HelpLinker::main( std::vector<std::string> &args,
else if (args[i].compare("-hid") == 0)
{
++i;
- if (i >= args.size())
- {
- std::stringstream aStrStream;
- aStrStream << "hid list missing" << std::endl;
- throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
- }
-
- hid = args[i];
+ throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, "obsolete -hid argument used" );
}
else if (args[i].compare("-add") == 0)
{
@@ -1051,13 +1012,6 @@ void HelpLinker::main( std::vector<std::string> &args,
aStrStream << "language missing" << std::endl;
throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
}
- if (!bExtensionMode && hid.empty())
- {
- std::stringstream aStrStream;
- aStrStream << "hid list missing" << std::endl;
- throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
- }
-
link();
}
@@ -1120,7 +1074,7 @@ HelpProcessingErrorInfo& HelpProcessingErrorInfo::operator=( const struct HelpPr
// Returns true in case of success, false in case of error
HELPLINKER_DLLPUBLIC bool compileExtensionHelp
(
- const rtl::OUString& aOfficeHelpPath,
+ const rtl::OUString& aOfficeHelpPath,
const rtl::OUString& aExtensionName,
const rtl::OUString& aExtensionLanguageRoot,
sal_Int32 nXhpFileCount, const rtl::OUString* pXhpFiles,
@@ -1213,6 +1167,4 @@ HELPLINKER_DLLPUBLIC bool compileExtensionHelp
return bSuccess;
}
-// vnd.sun.star.help://swriter/52821?Language=en-US&System=UNIX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */