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.cxx99
1 files changed, 11 insertions, 88 deletions
diff --git a/l10ntools/source/help/HelpLinker.cxx b/l10ntools/source/help/HelpLinker.cxx
index 0103f43f8674..8c0d510ddb32 100644
--- a/l10ntools/source/help/HelpLinker.cxx
+++ b/l10ntools/source/help/HelpLinker.cxx
@@ -26,11 +26,8 @@
*
************************************************************************/
-#ifdef AIX
-# undef _THREAD_SAFE
-#endif
-
#include "HelpCompiler.hxx"
+#include "l10ntools/HelpLinker.hxx"
#include <map>
@@ -38,7 +35,6 @@
#include <limits.h>
#include <libxslt/xslt.h>
-#include <libxslt/transform.h>
#include <libxslt/xsltutils.h>
#include <libxslt/functions.h>
#include <libxslt/extensions.h>
@@ -50,26 +46,17 @@
#include <expat.h>
-#define DBHELP_ONLY
-
-class IndexerPreProcessor
+namespace lucene
{
-private:
- std::string m_aModuleName;
- fs::path m_fsIndexBaseDir;
- fs::path m_fsCaptionFilesDirName;
- fs::path m_fsContentFilesDirName;
-
- xsltStylesheetPtr m_xsltStylesheetPtrCaption;
- xsltStylesheetPtr m_xsltStylesheetPtrContent;
-
-public:
- IndexerPreProcessor( const std::string& aModuleName, const fs::path& fsIndexBaseDir,
- const fs::path& idxCaptionStylesheet, const fs::path& idxContentStylesheet );
- ~IndexerPreProcessor();
-
- void processDocument( xmlDocPtr doc, const std::string& EncodedDocPath );
-};
+namespace document
+{
+class Document;
+}
+namespace util
+{
+class Reader;
+}
+}
IndexerPreProcessor::IndexerPreProcessor
( const std::string& aModuleName, const fs::path& fsIndexBaseDir,
@@ -97,7 +84,6 @@ IndexerPreProcessor::~IndexerPreProcessor()
xsltFreeStylesheet( m_xsltStylesheetPtrContent );
}
-
std::string getEncodedPath( const std::string& Path )
{
rtl::OString aOStr_Path( Path.c_str() );
@@ -260,51 +246,6 @@ public:
}
};
-class HelpLinker
-{
-public:
- void main(std::vector<std::string> &args,
- std::string* pExtensionPath = NULL,
- std::string* pDestination = NULL,
- const rtl::OUString* pOfficeHelpPath = NULL )
-
- throw( HelpProcessingException );
-
- HelpLinker()
- : init(true)
- , m_pIndexerPreProcessor(NULL)
- {}
- ~HelpLinker()
- { delete m_pIndexerPreProcessor; }
-
-private:
- int locCount, totCount;
- Stringtable additionalFiles;
- HashSet helpFiles;
- fs::path sourceRoot;
- fs::path embeddStylesheet;
- fs::path idxCaptionStylesheet;
- fs::path idxContentStylesheet;
- fs::path zipdir;
- fs::path outputFile;
- std::string extsource;
- std::string extdestination;
- std::string module;
- std::string lang;
- std::string extensionPath;
- std::string extensionDestination;
- bool bExtensionMode;
- fs::path indexDirName;
- fs::path indexDirParentName;
- bool init;
- IndexerPreProcessor* m_pIndexerPreProcessor;
- void initIndexerPreProcessor();
- void link() throw( HelpProcessingException );
- void addBookmark( DB* dbBase, FILE* pFile_DBHelp, std::string thishid,
- const std::string& fileB, const std::string& anchorB,
- const std::string& jarfileB, const std::string& titleB );
-};
-
namespace URLEncoder
{
static std::string encode(const std::string &rIn)
@@ -1024,24 +965,6 @@ void HelpLinker::main( std::vector<std::string> &args,
link();
}
-SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) {
- std::vector<std::string> args;
- for (int i = 1; i < argc; ++i)
- args.push_back(std::string(argv[i]));
- try
- {
- HelpLinker* pHelpLinker = new HelpLinker();
- pHelpLinker->main( args );
- delete pHelpLinker;
- }
- catch( const HelpProcessingException& e )
- {
- std::cerr << e.m_aErrorMsg;
- exit(1);
- }
- return 0;
-}
-
// Variable to set an exception in "C" StructuredXMLErrorFunction
static const HelpProcessingException* GpXMLParsingException = NULL;