diff options
-rw-r--r-- | helpcompiler/inc/HelpCompiler.hxx | 25 | ||||
-rw-r--r-- | helpcompiler/source/HelpCompiler.cxx | 19 | ||||
-rw-r--r-- | helpcompiler/source/HelpIndexer.cxx | 5 | ||||
-rw-r--r-- | include/helpcompiler/HelpIndexer.hxx | 2 |
4 files changed, 27 insertions, 24 deletions
diff --git a/helpcompiler/inc/HelpCompiler.hxx b/helpcompiler/inc/HelpCompiler.hxx index 541f4bc078e5..c66e705ae222 100644 --- a/helpcompiler/inc/HelpCompiler.hxx +++ b/helpcompiler/inc/HelpCompiler.hxx @@ -26,6 +26,7 @@ #include <memory> #include <string> #include <unordered_map> +#include <utility> #include <vector> #include <libxml/parser.h> @@ -162,15 +163,15 @@ struct HelpProcessingException std::string m_aXMLParsingFile; int m_nXMLParsingLine; - HelpProcessingException( HelpProcessingErrorClass eErrorClass, const std::string& aErrorMsg ) + HelpProcessingException( HelpProcessingErrorClass eErrorClass, std::string aErrorMsg ) : m_eErrorClass( eErrorClass ) - , m_aErrorMsg( aErrorMsg ) + , m_aErrorMsg(std::move( aErrorMsg )) , m_nXMLParsingLine( 0 ) {} - HelpProcessingException( const std::string& aErrorMsg, const std::string& aXMLParsingFile, int nXMLParsingLine ) + HelpProcessingException( std::string aErrorMsg, std::string aXMLParsingFile, int nXMLParsingLine ) : m_eErrorClass( HelpProcessingErrorClass::XmlParsing ) - , m_aErrorMsg( aErrorMsg ) - , m_aXMLParsingFile( aXMLParsingFile ) + , m_aErrorMsg(std::move( aErrorMsg )) + , m_aXMLParsingFile(std::move( aXMLParsingFile )) , m_nXMLParsingLine( nXMLParsingLine ) {} }; @@ -179,13 +180,13 @@ class HelpCompiler { public: HelpCompiler(StreamTable &streamTable, - const fs::path &in_inputFile, - const fs::path &in_src, - const fs::path &in_zipdir, - const fs::path &in_resCompactStylesheet, - const fs::path &in_resEmbStylesheet, - const std::string &in_module, - const std::string &in_lang, + fs::path in_inputFile, + fs::path in_src, + fs::path in_zipdir, + fs::path in_resCompactStylesheet, + fs::path in_resEmbStylesheet, + std::string in_module, + std::string in_lang, bool in_bExtensionMode); /// @throws HelpProcessingException /// @throws BasicCodeTagger::TaggerException diff --git a/helpcompiler/source/HelpCompiler.cxx b/helpcompiler/source/HelpCompiler.cxx index ee4a27461afa..b2329c0678f7 100644 --- a/helpcompiler/source/HelpCompiler.cxx +++ b/helpcompiler/source/HelpCompiler.cxx @@ -29,14 +29,15 @@ #include <libxslt/transform.h> #include <rtl/character.hxx> #include <sal/log.hxx> +#include <utility> -HelpCompiler::HelpCompiler(StreamTable &in_streamTable, const fs::path &in_inputFile, - const fs::path &in_src, const fs::path &in_zipdir, const fs::path &in_resCompactStylesheet, - const fs::path &in_resEmbStylesheet, const std::string &in_module, const std::string &in_lang, +HelpCompiler::HelpCompiler(StreamTable &in_streamTable, fs::path in_inputFile, + fs::path in_src, fs::path in_zipdir, fs::path in_resCompactStylesheet, + fs::path in_resEmbStylesheet, std::string in_module, std::string in_lang, bool in_bExtensionMode) - : streamTable(in_streamTable), inputFile(in_inputFile), - src(in_src), zipdir(in_zipdir), module(in_module), lang(in_lang), resCompactStylesheet(in_resCompactStylesheet), - resEmbStylesheet(in_resEmbStylesheet), bExtensionMode( in_bExtensionMode ) + : streamTable(in_streamTable), inputFile(std::move(in_inputFile)), + src(std::move(in_src)), zipdir(std::move(in_zipdir)), module(std::move(in_module)), lang(std::move(in_lang)), resCompactStylesheet(std::move(in_resCompactStylesheet)), + resEmbStylesheet(std::move(in_resEmbStylesheet)), bExtensionMode( in_bExtensionMode ) { xmlKeepBlanksDefaultValue = 0; char* os = getenv("OS"); @@ -239,9 +240,9 @@ public: private: std::vector<std::string> extendedHelpText; public: - myparser(const std::string &indocumentId, const std::string &infileName, - const std::string &intitle) : documentId(indocumentId), fileName(infileName), - title(intitle) + myparser(std::string indocumentId, std::string infileName, + std::string intitle) : documentId(std::move(indocumentId)), fileName(std::move(infileName)), + title(std::move(intitle)) { hidlist.reset(new std::vector<std::string>); keywords.reset(new Hashtable); diff --git a/helpcompiler/source/HelpIndexer.cxx b/helpcompiler/source/HelpIndexer.cxx index 38ddd06472bd..fc6da05f1d56 100644 --- a/helpcompiler/source/HelpIndexer.cxx +++ b/helpcompiler/source/HelpIndexer.cxx @@ -16,6 +16,7 @@ #include <osl/thread.h> #include <o3tl/string_view.hxx> #include <memory> +#include <utility> #include "LuceneHelper.hxx" #include <CLucene.h> @@ -29,9 +30,9 @@ using namespace lucene::document; -HelpIndexer::HelpIndexer(OUString const &lang, OUString const &module, +HelpIndexer::HelpIndexer(OUString lang, OUString module, std::u16string_view srcDir, std::u16string_view outDir) - : d_lang(lang), d_module(module) + : d_lang(std::move(lang)), d_module(std::move(module)) { d_indexDir = outDir + OUStringChar('/') + module + ".idxl"; d_captionDir = OUString::Concat(srcDir) + "/caption"; diff --git a/include/helpcompiler/HelpIndexer.hxx b/include/helpcompiler/HelpIndexer.hxx index 2f8e7f32293a..d9e639f791e3 100644 --- a/include/helpcompiler/HelpIndexer.hxx +++ b/include/helpcompiler/HelpIndexer.hxx @@ -48,7 +48,7 @@ class L10N_DLLPUBLIC HelpIndexer { * @param srcDir The help directory to index * @param outDir The directory to write the "module".idxl directory to */ - HelpIndexer(OUString const &lang, OUString const &module, + HelpIndexer(OUString lang, OUString module, std::u16string_view srcDir, std::u16string_view outDir); /** |