LibreOffice Module helpcompiler (master) 1
HelpLinker.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19#pragma once
20
21#include <memory>
22#include <vector>
23#include <helpcompiler/dllapi.h>
24#include "HelpCompiler.hxx"
25#include <libxslt/xsltInternals.h>
26
28{
29private:
32
33 xsltStylesheetPtr m_xsltStylesheetPtrCaption;
34 xsltStylesheetPtr m_xsltStylesheetPtrContent;
35
36public:
37 IndexerPreProcessor( const fs::path& fsIndexBaseDir,
38 const fs::path& idxCaptionStylesheet, const fs::path& idxContentStylesheet );
40
41 void processDocument( xmlDocPtr doc, const std::string& EncodedDocPath );
42};
43
45{
46public:
48 L10N_DLLPUBLIC void main(std::vector<std::string> &args,
49 std::string const * pExtensionPath = nullptr,
50 std::string const * pDestination = nullptr,
51 const OUString* pOfficeHelpPath = nullptr );
52
54 : bExtensionMode(false)
55 , m_bUseLangRoot(true)
56 , m_bCreateIndex(true)
57 {}
58
59private:
61 std::vector<std::string> helpFiles;
69 std::string extsource;
70 std::string extdestination;
71 std::string module;
72 std::string lang;
73 std::string extensionPath;
77 std::unique_ptr<IndexerPreProcessor> m_pIndexerPreProcessor;
83 void link();
84 static void addBookmark( FILE* pFile_DBHelp, std::string thishid,
85 const std::string& fileB, const std::string& anchorB,
86 const std::string& jarfileB, const std::string& titleB );
87};
88
89/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unordered_map< std::string, std::string > Stringtable
std::string lang
Definition: HelpLinker.hxx:72
std::unique_ptr< IndexerPreProcessor > m_pIndexerPreProcessor
Definition: HelpLinker.hxx:77
fs::path zipdir
Definition: HelpLinker.hxx:67
fs::path embeddStylesheet
Definition: HelpLinker.hxx:64
fs::path sourceRoot
Definition: HelpLinker.hxx:62
Stringtable additionalFiles
Definition: HelpLinker.hxx:60
std::string extensionDestination
Definition: HelpLinker.hxx:74
fs::path compactStylesheet
Definition: HelpLinker.hxx:63
std::string module
Definition: HelpLinker.hxx:71
bool m_bUseLangRoot
Definition: HelpLinker.hxx:78
void initIndexerPreProcessor()
Definition: HelpLinker.cxx:265
bool bExtensionMode
Definition: HelpLinker.hxx:75
fs::path indexDirParentName
Definition: HelpLinker.hxx:76
fs::path idxContentStylesheet
Definition: HelpLinker.hxx:66
fs::path outputFile
Definition: HelpLinker.hxx:68
std::string extensionPath
Definition: HelpLinker.hxx:73
void link()
Definition: HelpLinker.cxx:271
std::string extdestination
Definition: HelpLinker.hxx:70
bool m_bCreateIndex
Definition: HelpLinker.hxx:79
std::vector< std::string > helpFiles
Definition: HelpLinker.hxx:61
L10N_DLLPUBLIC void main(std::vector< std::string > &args, std::string const *pExtensionPath=nullptr, std::string const *pDestination=nullptr, const OUString *pOfficeHelpPath=nullptr)
Definition: HelpLinker.cxx:488
std::string extsource
Definition: HelpLinker.hxx:69
static void addBookmark(FILE *pFile_DBHelp, std::string thishid, const std::string &fileB, const std::string &anchorB, const std::string &jarfileB, const std::string &titleB)
Definition: HelpLinker.cxx:225
fs::path idxCaptionStylesheet
Definition: HelpLinker.hxx:65
xsltStylesheetPtr m_xsltStylesheetPtrCaption
Definition: HelpLinker.hxx:33
fs::path m_fsContentFilesDirName
Definition: HelpLinker.hxx:31
xsltStylesheetPtr m_xsltStylesheetPtrContent
Definition: HelpLinker.hxx:34
fs::path m_fsCaptionFilesDirName
Definition: HelpLinker.hxx:30
#define L10N_DLLPUBLIC
Definition: dllapi.h:29
args