26#include <unordered_map>
30#include <libxml/parser.h>
32#include <rtl/ustring.hxx>
33#include <rtl/character.hxx>
34#include <osl/process.h>
35#include <osl/file.hxx>
36#include <osl/thread.h>
41#if OSL_DEBUG_LEVEL > 2
43 #define HCDBG(foo) do { if (true) foo; } while(false)
45 #define HCDBG(foo) do { } while(false)
60 osl_getProcessWorkingDir(&sWorkingDir.pData);
61 OUString ustrSystemPath(OStringToOUString(
in,
FileNameEnc()));
62 osl::File::getFileURLFromSystemPath(ustrSystemPath,
data);
63 (void)osl::File::getAbsoluteFileURL(sWorkingDir,
data,
data);
65 path(
const std::string &FileURL)
71 OUString ustrSystemPath;
72 osl::File::getSystemPathFromFileURL(
data, ustrSystemPath);
74 HCDBG(std::cerr <<
"native_file_string is " << tmp.getStr() << std::endl);
75 return std::string(tmp);
78 std::wstring native_file_string_w()
const
80 OUString ustrSystemPath;
81 osl::File::getSystemPathFromFileURL(
data, ustrSystemPath);
82 return std::wstring(o3tl::toW(ustrSystemPath.getStr()));
88 return std::string(tmp);
94 HCDBG(std::cerr <<
"orig was " <<
96 OUString ustrSystemPath(OStringToOUString(
in,
FileNameEnc()));
97 ret.
data +=
"/" + ustrSystemPath;
98 HCDBG(std::cerr <<
"final is " <<
104 OUString ustrSystemPath(OStringToOUString(
in,
FileNameEnc()));
105 data += ustrSystemPath;
112 static constexpr rtl_TextEncoding
FileNameEnc() {
return RTL_TEXTENCODING_UTF8; }
114 static rtl_TextEncoding
FileNameEnc() {
return osl_getThreadTextEncoding(); }
127typedef std::unordered_map<std::string, LinkedList>
Hashtable;
186 std::string in_module,
188 bool in_bExtensionMode);
197 xmlNodePtr
clone(xmlNodePtr node,
const std::string& appl);
209 return static_cast<char>(
210 rtl::toAsciiLowerCase(
static_cast<unsigned char>(c)));
std::unordered_map< std::string, LinkedList > Hashtable
std::unordered_map< std::string, std::string > Stringtable
std::deque< std::string > LinkedList
const fs::path resEmbStylesheet
xmlNodePtr clone(xmlNodePtr node, const std::string &appl)
xmlDocPtr compactXhpForJar(xmlDocPtr doc)
void saveXhpForJar(xmlDocPtr doc, const fs::path &filePath)
static void tagBasicCodeExamples(xmlDocPtr doc)
xmlDocPtr getSourceDocument(const fs::path &filePath)
const fs::path resCompactStylesheet
HelpCompiler(StreamTable &streamTable, fs::path in_inputFile, fs::path in_src, fs::path in_zipdir, fs::path in_resCompactStylesheet, fs::path in_resEmbStylesheet, std::string in_module, std::string in_lang, bool in_bExtensionMode)
StreamTable & streamTable
std::string document_module
std::unique_ptr< Hashtable > appl_keywords
std::string document_path
std::unique_ptr< Stringtable > appl_helptexts
std::unique_ptr< std::vector< std::string > > appl_hidlist
std::string document_title
static rtl_TextEncoding FileNameEnc()
void append(const char *in)
path operator/(const std::string &in) const
std::string native_file_string() const
std::string toUTF8() const
path(const std::string &FileURL)
void append(const std::string &in)
path(const std::string &in, convert)
void copy(const fs::path &src, const fs::path &dest)
void create_directory(const fs::path &indexDirName)
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
std::string m_aXMLParsingFile
HelpProcessingException(HelpProcessingErrorClass eErrorClass, std::string aErrorMsg)
HelpProcessingException(std::string aErrorMsg, std::string aXMLParsingFile, int nXMLParsingLine)
HelpProcessingErrorClass m_eErrorClass