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.cxx45
1 files changed, 14 insertions, 31 deletions
diff --git a/l10ntools/source/help/HelpLinker.cxx b/l10ntools/source/help/HelpLinker.cxx
index 8e6976c0efd1..4e3a4cedbe6f 100644
--- a/l10ntools/source/help/HelpLinker.cxx
+++ b/l10ntools/source/help/HelpLinker.cxx
@@ -46,17 +46,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,
@@ -245,7 +244,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 )
@@ -667,8 +665,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
@@ -1039,7 +1037,6 @@ void HelpLinker::main( std::vector<std::string> &args,
aStrStream << "language missing" << std::endl;
throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
}
-
link();
}
@@ -1102,7 +1099,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,
@@ -1112,31 +1109,20 @@ HELPLINKER_DLLPUBLIC bool compileExtensionHelp
{
bool bSuccess = true;
- sal_Int32 argc = nXhpFileCount + 3;
- const char** argv = new const char*[argc];
- argv[0] = "";
- argv[1] = "-mod";
+ std::vector<std::string> args;
+ args.reserve(nXhpFileCount + 2);
+ args.push_back(std::string("-mod"));
rtl::OString aOExtensionName = rtl::OUStringToOString( aExtensionName, fs::getThreadTextEncoding() );
- argv[2] = aOExtensionName.getStr();
+ args.push_back(std::string(aOExtensionName.getStr()));
for( sal_Int32 iXhp = 0 ; iXhp < nXhpFileCount ; ++iXhp )
{
rtl::OUString aXhpFile = pXhpFiles[iXhp];
rtl::OString aOXhpFile = rtl::OUStringToOString( aXhpFile, fs::getThreadTextEncoding() );
- char* pArgStr = new char[aOXhpFile.getLength() + 1];
- strcpy( pArgStr, aOXhpFile.getStr() );
- argv[iXhp + 3] = pArgStr;
+ args.push_back(std::string(aOXhpFile.getStr()));
}
- std::vector<std::string> args;
- for( sal_Int32 i = 1; i < argc; ++i )
- args.push_back(std::string( argv[i]) );
-
- for( sal_Int32 iXhp = 0 ; iXhp < nXhpFileCount ; ++iXhp )
- delete[] argv[iXhp + 3];
- delete[] argv;
-
rtl::OString aOExtensionLanguageRoot = rtl::OUStringToOString( aExtensionLanguageRoot, fs::getThreadTextEncoding() );
const char* pExtensionPath = aOExtensionLanguageRoot.getStr();
std::string aStdStrExtensionPath = pExtensionPath;
@@ -1206,6 +1192,3 @@ HELPLINKER_DLLPUBLIC bool compileExtensionHelp
return bSuccess;
}
-// vnd.sun.star.help://swriter/52821?Language=en-US&System=UNIX
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
-