loplugin:flatten in helpcompiler
Change-Id: I5d6b83b6976c115426f186958b749e48c60ba8f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91847 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -104,22 +104,22 @@ void IndexerPreProcessor::processDocument
|
|||||||
xmlFreeDoc(resCaption);
|
xmlFreeDoc(resCaption);
|
||||||
}
|
}
|
||||||
|
|
||||||
if( m_xsltStylesheetPtrContent )
|
if( !m_xsltStylesheetPtrContent )
|
||||||
|
return;
|
||||||
|
|
||||||
|
xmlDocPtr resContent = xsltApplyStylesheet( m_xsltStylesheetPtrContent, doc, nullptr );
|
||||||
|
xmlNodePtr pResNodeContent = resContent->xmlChildrenNode;
|
||||||
|
if( pResNodeContent )
|
||||||
{
|
{
|
||||||
xmlDocPtr resContent = xsltApplyStylesheet( m_xsltStylesheetPtrContent, doc, nullptr );
|
fs::path fsContentPureTextFile_docURL = m_fsContentFilesDirName / aStdStr_EncodedDocPathURL;
|
||||||
xmlNodePtr pResNodeContent = resContent->xmlChildrenNode;
|
FILE* pFile_docURL = fopen_impl( fsContentPureTextFile_docURL, "w" );
|
||||||
if( pResNodeContent )
|
if( pFile_docURL )
|
||||||
{
|
{
|
||||||
fs::path fsContentPureTextFile_docURL = m_fsContentFilesDirName / aStdStr_EncodedDocPathURL;
|
fprintf( pFile_docURL, "%s\n", pResNodeContent->content );
|
||||||
FILE* pFile_docURL = fopen_impl( fsContentPureTextFile_docURL, "w" );
|
fclose( pFile_docURL );
|
||||||
if( pFile_docURL )
|
|
||||||
{
|
|
||||||
fprintf( pFile_docURL, "%s\n", pResNodeContent->content );
|
|
||||||
fclose( pFile_docURL );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
xmlFreeDoc(resContent);
|
|
||||||
}
|
}
|
||||||
|
xmlFreeDoc(resContent);
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
@@ -462,25 +462,25 @@ void HelpLinker::link()
|
|||||||
|
|
||||||
helpKeyword.dump_DBHelp( keyWordFileName_DBHelp);
|
helpKeyword.dump_DBHelp( keyWordFileName_DBHelp);
|
||||||
|
|
||||||
if( !bExtensionMode )
|
if( bExtensionMode )
|
||||||
|
return;
|
||||||
|
|
||||||
|
// New index
|
||||||
|
for (auto const& additionalFile : additionalFiles)
|
||||||
{
|
{
|
||||||
// New index
|
const std::string &additionalFileName = additionalFile.second;
|
||||||
for (auto const& additionalFile : additionalFiles)
|
const std::string &additionalFileKey = additionalFile.first;
|
||||||
{
|
|
||||||
const std::string &additionalFileName = additionalFile.second;
|
|
||||||
const std::string &additionalFileKey = additionalFile.first;
|
|
||||||
|
|
||||||
fs::path fsAdditionalFileName( additionalFileName, fs::native );
|
fs::path fsAdditionalFileName( additionalFileName, fs::native );
|
||||||
HCDBG({
|
HCDBG({
|
||||||
std::string aNativeStr = fsAdditionalFileName.native_file_string();
|
std::string aNativeStr = fsAdditionalFileName.native_file_string();
|
||||||
const char* pStr = aNativeStr.c_str();
|
const char* pStr = aNativeStr.c_str();
|
||||||
std::cerr << pStr << std::endl;
|
std::cerr << pStr << std::endl;
|
||||||
});
|
});
|
||||||
|
|
||||||
fs::path fsTargetName( indexDirParentName / additionalFileKey );
|
fs::path fsTargetName( indexDirParentName / additionalFileKey );
|
||||||
|
|
||||||
fs::copy( fsAdditionalFileName, fsTargetName );
|
fs::copy( fsAdditionalFileName, fsTargetName );
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user