tdf#153972 Fix color filter when cells have no content
[LibreOffice.git] / helpcompiler / inc / HelpLinker.hxx
blob24bcb9ebd0411f1547db97f945964d298fffcb22
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 .
20 #ifndef INCLUDED_HELPCOMPILER_INC_HELPLINKER_HXX
21 #define INCLUDED_HELPCOMPILER_INC_HELPLINKER_HXX
23 #include <memory>
24 #include <vector>
25 #include <helpcompiler/dllapi.h>
26 #include "HelpCompiler.hxx"
27 #include <libxslt/xsltInternals.h>
29 #ifdef AIX
30 # undef _THREAD_SAFE
31 #endif
33 class L10N_DLLPUBLIC IndexerPreProcessor
35 private:
36 fs::path m_fsCaptionFilesDirName;
37 fs::path m_fsContentFilesDirName;
39 xsltStylesheetPtr m_xsltStylesheetPtrCaption;
40 xsltStylesheetPtr m_xsltStylesheetPtrContent;
42 public:
43 IndexerPreProcessor( const fs::path& fsIndexBaseDir,
44 const fs::path& idxCaptionStylesheet, const fs::path& idxContentStylesheet );
45 ~IndexerPreProcessor();
47 void processDocument( xmlDocPtr doc, const std::string& EncodedDocPath );
50 class HelpLinker
52 public:
53 /// @throws HelpProcessingException
54 L10N_DLLPUBLIC void main(std::vector<std::string> &args,
55 std::string const * pExtensionPath = nullptr,
56 std::string const * pDestination = nullptr,
57 const OUString* pOfficeHelpPath = nullptr );
59 HelpLinker()
60 : bExtensionMode(false)
61 , m_bUseLangRoot(true)
62 , m_bCreateIndex(true)
65 private:
66 Stringtable additionalFiles;
67 std::vector<std::string> helpFiles;
68 fs::path sourceRoot;
69 fs::path compactStylesheet;
70 fs::path embeddStylesheet;
71 fs::path idxCaptionStylesheet;
72 fs::path idxContentStylesheet;
73 fs::path zipdir;
74 fs::path outputFile;
75 std::string extsource;
76 std::string extdestination;
77 std::string module;
78 std::string lang;
79 std::string extensionPath;
80 std::string extensionDestination;
81 bool bExtensionMode;
82 fs::path indexDirParentName;
83 std::unique_ptr<IndexerPreProcessor> m_pIndexerPreProcessor;
84 bool m_bUseLangRoot;
85 bool m_bCreateIndex;
86 void initIndexerPreProcessor();
87 /// @throws HelpProcessingException
88 /// @throws BasicCodeTagger::TaggerException
89 void link();
90 static void addBookmark( FILE* pFile_DBHelp, std::string thishid,
91 const std::string& fileB, const std::string& anchorB,
92 const std::string& jarfileB, const std::string& titleB );
95 #endif
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */