From 8512e5c2b3617a2c8d77381788c3864db594ce46 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 16 May 2012 11:19:17 +0100 Subject: reduce static_initialization_and_destruction chain Change-Id: I962aeac0c7feeabb7963016d5afcfeca5a48ccfe --- l10ntools/source/help/HelpCompiler.cxx | 1 - l10ntools/source/help/HelpCompiler.hxx | 4 ++-- l10ntools/source/help/HelpLinker.cxx | 8 ++++---- l10ntools/source/help/HelpLinker_main.cxx | 2 +- l10ntools/source/help/HelpSearch.cxx | 2 -- 5 files changed, 7 insertions(+), 10 deletions(-) (limited to 'l10ntools/source') diff --git a/l10ntools/source/help/HelpCompiler.cxx b/l10ntools/source/help/HelpCompiler.cxx index d3e5760a1fdd..fb92e5b7341a 100644 --- a/l10ntools/source/help/HelpCompiler.cxx +++ b/l10ntools/source/help/HelpCompiler.cxx @@ -266,7 +266,6 @@ std::string myparser::dump(xmlNodePtr node) xmlChar *pContent = xmlNodeGetContent(node); app += std::string((const char*)pContent); xmlFree(pContent); - // std::cout << app << std::endl; } return app; } diff --git a/l10ntools/source/help/HelpCompiler.hxx b/l10ntools/source/help/HelpCompiler.hxx index 5e0ec8d032cb..cd8357518ded 100644 --- a/l10ntools/source/help/HelpCompiler.hxx +++ b/l10ntools/source/help/HelpCompiler.hxx @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include @@ -61,9 +60,10 @@ #include #if OSL_DEBUG_LEVEL > 2 + #include #define HCDBG(foo) do { if (1) foo; } while(0) #else - #define HCDBG(foo) do { if (0) foo; } while(0) + #define HCDBG(foo) do { } while(0) #endif namespace fs diff --git a/l10ntools/source/help/HelpLinker.cxx b/l10ntools/source/help/HelpLinker.cxx index 8c0d510ddb32..7656d0bcc061 100644 --- a/l10ntools/source/help/HelpLinker.cxx +++ b/l10ntools/source/help/HelpLinker.cxx @@ -437,11 +437,12 @@ void HelpLinker::link() throw( HelpProcessingException ) if (!bExtensionMode && xhpFileName.rfind(".xhp") != xhpFileName.length()-4) { // only work on .xhp - files - std::cerr << + SAL_WARN("l10ntools", "ERROR: input list entry '" << xhpFileName << "' has the wrong extension (only files with extension .xhp " - << "are accepted)"; + << "are accepted)"); + continue; } @@ -642,8 +643,7 @@ void HelpLinker::link() throw( HelpProcessingException ) fs::path fsAdditionalFileName( additionalFileName, fs::native ); std::string aNativeStr = fsAdditionalFileName.native_file_string(); - const char* pStr = aNativeStr.c_str(); - HCDBG(std::cerr << pStr << std::endl); + HCDBG(const char* pStr = aNativeStr.c_str(); std::cerr << pStr << std::endl); fs::path fsTargetName( indexDirParentName / additionalFileKey ); diff --git a/l10ntools/source/help/HelpLinker_main.cxx b/l10ntools/source/help/HelpLinker_main.cxx index fae24bcebf0b..54ce8916d1b9 100644 --- a/l10ntools/source/help/HelpLinker_main.cxx +++ b/l10ntools/source/help/HelpLinker_main.cxx @@ -28,7 +28,7 @@ #include "HelpCompiler.hxx" #include "l10ntools/HelpLinker.hxx" - +#include #include SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) { diff --git a/l10ntools/source/help/HelpSearch.cxx b/l10ntools/source/help/HelpSearch.cxx index 10b57dbce741..64c0ed16aca7 100644 --- a/l10ntools/source/help/HelpSearch.cxx +++ b/l10ntools/source/help/HelpSearch.cxx @@ -31,8 +31,6 @@ #include #include -#include - #include "LuceneHelper.hxx" HelpSearch::HelpSearch(rtl::OUString const &lang, rtl::OUString const &indexDir) -- cgit