1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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
25 #include <helpcompiler/dllapi.h>
26 #include "HelpCompiler.hxx"
27 #include <libxslt/xsltInternals.h>
33 class L10N_DLLPUBLIC IndexerPreProcessor
36 fs::path m_fsCaptionFilesDirName
;
37 fs::path m_fsContentFilesDirName
;
39 xsltStylesheetPtr m_xsltStylesheetPtrCaption
;
40 xsltStylesheetPtr m_xsltStylesheetPtrContent
;
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 L10N_DLLPUBLIC HelpLinker
53 /// @throws HelpProcessingException
54 void main(std::vector
<std::string
> &args
,
55 std::string
const * pExtensionPath
= nullptr,
56 std::string
const * pDestination
= nullptr,
57 const OUString
* pOfficeHelpPath
= nullptr );
60 : bExtensionMode(false)
61 , m_bUseLangRoot(true)
62 , m_bCreateIndex(true)
66 Stringtable additionalFiles
;
67 std::vector
<std::string
> helpFiles
;
69 fs::path compactStylesheet
;
70 fs::path embeddStylesheet
;
71 fs::path idxCaptionStylesheet
;
72 fs::path idxContentStylesheet
;
75 std::string extsource
;
76 std::string extdestination
;
79 std::string extensionPath
;
80 std::string extensionDestination
;
82 fs::path indexDirParentName
;
83 std::unique_ptr
<IndexerPreProcessor
> m_pIndexerPreProcessor
;
86 void initIndexerPreProcessor();
87 /// @throws HelpProcessingException
88 /// @throws BasicCodeTagger::TaggerException
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
);
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */