[Libreoffice-commits] .: l10ntools/source

Caolán McNamara caolan at kemper.freedesktop.org
Thu Jun 16 06:54:55 PDT 2011


 l10ntools/source/help/HelpCompiler.cxx |    4 ++--
 l10ntools/source/help/HelpCompiler.hxx |    5 +++++
 l10ntools/source/help/HelpLinker.cxx   |    8 ++++----
 3 files changed, 11 insertions(+), 6 deletions(-)

New commits:
commit 6b1382e81272b165352ce5cf8f7b11e32416b81f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jun 16 14:54:35 2011 +0100

    WaE: keep windows compiler cast happy

diff --git a/l10ntools/source/help/HelpCompiler.cxx b/l10ntools/source/help/HelpCompiler.cxx
index 9e25ee9..0c492b1 100644
--- a/l10ntools/source/help/HelpCompiler.cxx
+++ b/l10ntools/source/help/HelpCompiler.cxx
@@ -351,7 +351,7 @@ void myparser::traverse( xmlNodePtr parentNode )
                         embedded = std::string((const char*)embeddedxml);
                         xmlFree (embeddedxml);
                         std::transform (embedded.begin(), embedded.end(), 
-                            embedded.begin(), tolower);
+                            embedded.begin(), tocharlower);
                     }
 
                     bool isEmbedded = !embedded.empty() && embedded.compare("true") == 0;
@@ -437,7 +437,7 @@ bool HelpCompiler::compile( void ) throw( HelpProcessingException )
         if (modulename[0] == 'S')
         {
             modulename = modulename.substr(1);
-            std::transform(modulename.begin(), modulename.end(), modulename.begin(), tolower);
+            std::transform(modulename.begin(), modulename.end(), modulename.begin(), tocharlower);
         }
         if (modulename != "DEFAULT" && modulename != module)
             continue;
diff --git a/l10ntools/source/help/HelpCompiler.hxx b/l10ntools/source/help/HelpCompiler.hxx
index 05d7b8d..1fc08d2 100644
--- a/l10ntools/source/help/HelpCompiler.hxx
+++ b/l10ntools/source/help/HelpCompiler.hxx
@@ -322,6 +322,11 @@ private:
     bool bExtensionMode;
 };
 
+inline char tocharlower(char c)
+{
+    return static_cast<char>(tolower(c));
+}
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/l10ntools/source/help/HelpLinker.cxx b/l10ntools/source/help/HelpLinker.cxx
index 81a96ce..b1d7c1c 100644
--- a/l10ntools/source/help/HelpLinker.cxx
+++ b/l10ntools/source/help/HelpLinker.cxx
@@ -351,7 +351,7 @@ void HelpLinker::addBookmark( DB* dbBase, FILE* pFile_DBHelp, std::string thishi
     size_t i = 0;
     dataB[i++] = static_cast<unsigned char>(fileLen);
     for (size_t j = 0; j < fileB.length(); ++j)
-        dataB[i++] = fileB[j];
+        dataB[i++] = static_cast<unsigned char>(fileB[j]);
     if (!anchorB.empty())
     {
         dataB[i++] = '#';
@@ -386,7 +386,7 @@ void HelpLinker::initIndexerPreProcessor()
     if( m_pIndexerPreProcessor )
         delete m_pIndexerPreProcessor;
     std::string mod = module;
-    std::transform (mod.begin(), mod.end(), mod.begin(), tolower);
+    std::transform (mod.begin(), mod.end(), mod.begin(), tocharlower);
     m_pIndexerPreProcessor = new IndexerPreProcessor( mod, indexDirParentName,
          idxCaptionStylesheet, idxContentStylesheet );
 }
@@ -413,7 +413,7 @@ void HelpLinker::link() throw( HelpProcessingException )
 #endif
 
     std::string mod = module;
-    std::transform (mod.begin(), mod.end(), mod.begin(), tolower);
+    std::transform (mod.begin(), mod.end(), mod.begin(), tocharlower);
 
     // do the work here
     // continue with introduction of the overall process thing into the
@@ -666,7 +666,7 @@ void HelpLinker::link() throw( HelpProcessingException )
             if (document)
             {
                 std::string temp = module;
-                std::transform (temp.begin(), temp.end(), temp.begin(), tolower);
+                std::transform (temp.begin(), temp.end(), temp.begin(), tocharlower);
                 m_pIndexerPreProcessor->processDocument(document, URLEncoder::encode(documentPath) );
             }
         }


More information about the Libreoffice-commits mailing list