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 .
23 #include <helpcompiler/dllapi.h>
24 #include "HelpCompiler.hxx"
25 #include <libxslt/xsltInternals.h>
27 class L10N_DLLPUBLIC IndexerPreProcessor
30 fs::path m_fsCaptionFilesDirName
;
31 fs::path m_fsContentFilesDirName
;
33 xsltStylesheetPtr m_xsltStylesheetPtrCaption
;
34 xsltStylesheetPtr m_xsltStylesheetPtrContent
;
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
);
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 );
54 : bExtensionMode(false)
55 , m_bUseLangRoot(true)
56 , m_bCreateIndex(true)
60 Stringtable additionalFiles
;
61 std::vector
<std::string
> helpFiles
;
63 fs::path compactStylesheet
;
64 fs::path embeddStylesheet
;
65 fs::path idxCaptionStylesheet
;
66 fs::path idxContentStylesheet
;
69 std::string extsource
;
70 std::string extdestination
;
73 std::string extensionPath
;
74 std::string extensionDestination
;
76 fs::path indexDirParentName
;
77 std::unique_ptr
<IndexerPreProcessor
> m_pIndexerPreProcessor
;
80 void initIndexerPreProcessor();
81 /// @throws HelpProcessingException
82 /// @throws BasicCodeTagger::TaggerException
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: */