tdf#56408 Writer always breaks lines at text direction change
[LibreOffice.git] / helpcompiler / inc / HelpLinker.hxx
blob9645f7c4c67ce6360f8ed5b57b8b3510a6eee4d4
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #pragma once
21 #include <memory>
22 #include <vector>
23 #include <helpcompiler/dllapi.h>
24 #include "HelpCompiler.hxx"
25 #include <libxslt/xsltInternals.h>
27 class L10N_DLLPUBLIC IndexerPreProcessor
29 private:
30 fs::path m_fsCaptionFilesDirName;
31 fs::path m_fsContentFilesDirName;
33 xsltStylesheetPtr m_xsltStylesheetPtrCaption;
34 xsltStylesheetPtr m_xsltStylesheetPtrContent;
36 public:
37 IndexerPreProcessor( const fs::path& fsIndexBaseDir,
38 const fs::path& idxCaptionStylesheet, const fs::path& idxContentStylesheet );
39 ~IndexerPreProcessor();
41 void processDocument( xmlDocPtr doc, const std::string& EncodedDocPath );
44 class HelpLinker
46 public:
47 /// @throws HelpProcessingException
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 );
53 HelpLinker()
54 : bExtensionMode(false)
55 , m_bUseLangRoot(true)
56 , m_bCreateIndex(true)
59 private:
60 Stringtable additionalFiles;
61 std::vector<std::string> helpFiles;
62 fs::path sourceRoot;
63 fs::path compactStylesheet;
64 fs::path embeddStylesheet;
65 fs::path idxCaptionStylesheet;
66 fs::path idxContentStylesheet;
67 fs::path zipdir;
68 fs::path outputFile;
69 std::string extsource;
70 std::string extdestination;
71 std::string module;
72 std::string lang;
73 std::string extensionPath;
74 std::string extensionDestination;
75 bool bExtensionMode;
76 fs::path indexDirParentName;
77 std::unique_ptr<IndexerPreProcessor> m_pIndexerPreProcessor;
78 bool m_bUseLangRoot;
79 bool m_bCreateIndex;
80 void initIndexerPreProcessor();
81 /// @throws HelpProcessingException
82 /// @throws BasicCodeTagger::TaggerException
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 );
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */