icu/makefile.mk                                     |    2 
 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 
 sd/source/ui/animations/motionpathtag.cxx           |    2 
 sd/source/ui/unoidl/unoobj.cxx                      |   10 ++--
 sd/source/ui/unoidl/unoobj.hxx                      |    4 -
 sdext/source/presenter/PresenterBitmapContainer.cxx |   42 +++++------------
 sdext/source/presenter/PresenterComponent.cxx       |   11 ++--
 sfx2/source/appl/workwin.cxx                        |   46 +++++++++++--------
 stoc/source/security/access_controller.cxx          |    9 +--
 svl/inc/svl/zforlist.hxx                            |   13 -----
 svl/source/numbers/zforlist.cxx                     |   19 +++++++-
 svtools/source/edit/syntaxhighlight.cxx             |   47 ++++++++------------
 vcl/generic/fontmanager/fontmanager.cxx             |    8 ---
 vcl/inc/vcl/fontmanager.hxx                         |    4 -
 vcl/source/gdi/bmpfast.cxx                          |   10 ----
 xmlhelp/source/cxxhelp/provider/databases.cxx       |    5 +-
 20 files changed, 109 insertions(+), 140 deletions(-)

New commits:
commit 2e1724da5c319161059074f61019f38719682b0b
Author: Caolán McNamara <caol...@redhat.com>
Date:   Wed May 16 11:22:41 2012 +0100

    WaE: unsafe mix of bool and sal_Bool
    
    Change-Id: I2caca314d87264261ccc4400b6f93bed960e8c6a

diff --git a/sd/source/ui/animations/motionpathtag.cxx 
b/sd/source/ui/animations/motionpathtag.cxx
index 56cd83c..dcb28ca 100644
--- a/sd/source/ui/animations/motionpathtag.cxx
+++ b/sd/source/ui/animations/motionpathtag.cxx
@@ -526,7 +526,7 @@ bool MotionPathTag::MouseButtonDown( const MouseEvent& 
rMEvt, SmartHdl& rHdl )
                 if(bNewObj)
                     aPt = mrView.GetSnapPos(aPt,mrView.GetSdrPageView());
 
-                sal_Bool bClosed0(mpPathObj->IsClosedObj());
+                bool bClosed0(mpPathObj->IsClosedObj());
 
                 sal_uInt32 nInsPointNum = mpPathObj->NbcInsPointOld(aPt, 
bNewObj, sal_True);
 
diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx
index a414aa3..c0f468c 100644
--- a/sd/source/ui/unoidl/unoobj.cxx
+++ b/sd/source/ui/unoidl/unoobj.cxx
@@ -914,7 +914,7 @@ sal_Bool SdXShape::IsPresObj() const throw()
 
 /** checks if this presentation object is empty
  */
-sal_Bool SdXShape::IsEmptyPresObj() const throw()
+bool SdXShape::IsEmptyPresObj() const throw()
 {
     SdrObject* pObj = mpShape->GetSdrObject();
     if( (pObj != NULL) && pObj->IsEmptyPresObj() )
@@ -922,7 +922,7 @@ sal_Bool SdXShape::IsEmptyPresObj() const throw()
         // check if the object is in edit, than its temporarely not empty
         SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >( pObj );
         if( pTextObj == 0 )
-            return sal_True;
+            return true;
 
         OutlinerParaObject* pParaObj = pTextObj->GetEditOutlinerParaObject();
         if( pParaObj )
@@ -931,11 +931,11 @@ sal_Bool SdXShape::IsEmptyPresObj() const throw()
         }
         else
         {
-            return sal_True;
+            return true;
         }
     }
 
-    return sal_False;
+    return false;
 }
 
 OUString SdXShape::GetPlaceholderText() const
@@ -958,7 +958,7 @@ OUString SdXShape::GetPlaceholderText() const
 
 /** sets/reset the empty status of a presentation object
 */
-void SdXShape::SetEmptyPresObj( sal_Bool bEmpty ) throw()
+void SdXShape::SetEmptyPresObj( bool bEmpty ) throw()
 {
     // only possible if this actually *is* a presentation object
     if( !IsPresObj() )
diff --git a/sd/source/ui/unoidl/unoobj.hxx b/sd/source/ui/unoidl/unoobj.hxx
index 08c376f..972f723 100644
--- a/sd/source/ui/unoidl/unoobj.hxx
+++ b/sd/source/ui/unoidl/unoobj.hxx
@@ -64,8 +64,8 @@ private:
     sal_Bool IsPresObj() const throw();
     void SetPresObj( sal_Bool bPresObj ) throw();
 
-    sal_Bool IsEmptyPresObj() const throw();
-    void SetEmptyPresObj( sal_Bool bEmpty ) throw();
+    bool IsEmptyPresObj() const throw();
+    void SetEmptyPresObj( bool bEmpty ) throw();
 
     sal_Bool IsMasterDepend() const throw();
     void SetMasterDepend( sal_Bool bDepend ) throw();
commit 8512e5c2b3617a2c8d77381788c3864db594ce46
Author: Caolán McNamara <caol...@redhat.com>
Date:   Wed May 16 11:19:17 2012 +0100

    reduce static_initialization_and_destruction chain
    
    Change-Id: I962aeac0c7feeabb7963016d5afcfeca5a48ccfe

diff --git a/l10ntools/source/help/HelpCompiler.cxx 
b/l10ntools/source/help/HelpCompiler.cxx
index d3e5760..fb92e5b 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 5e0ec8d..cd83575 100644
--- a/l10ntools/source/help/HelpCompiler.hxx
+++ b/l10ntools/source/help/HelpCompiler.hxx
@@ -34,7 +34,6 @@
 #include <vector>
 #include <list>
 #include <fstream>
-#include <iostream>
 #include <sstream>
 #include <algorithm>
 #include <ctype.h>
@@ -61,9 +60,10 @@
 #include <compilehelp.hxx>
 
 #if OSL_DEBUG_LEVEL > 2
+    #include <iostream>
     #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 8c0d510..7656d0b 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 fae24bc..54ce891 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 <iostream>
 #include <sal/main.h>
 
 SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) {
diff --git a/l10ntools/source/help/HelpSearch.cxx 
b/l10ntools/source/help/HelpSearch.cxx
index 10b57db..64c0ed1 100644
--- a/l10ntools/source/help/HelpSearch.cxx
+++ b/l10ntools/source/help/HelpSearch.cxx
@@ -31,8 +31,6 @@
 #include <osl/file.hxx>
 #include <osl/thread.hxx>
 
-#include <iostream>
-
 #include "LuceneHelper.hxx"
 
 HelpSearch::HelpSearch(rtl::OUString const &lang, rtl::OUString const 
&indexDir)
diff --git a/sdext/source/presenter/PresenterBitmapContainer.cxx 
b/sdext/source/presenter/PresenterBitmapContainer.cxx
index e4267c3..8b3ff5c 100644
--- a/sdext/source/presenter/PresenterBitmapContainer.cxx
+++ b/sdext/source/presenter/PresenterBitmapContainer.cxx
@@ -47,22 +47,6 @@ using ::rtl::OUString;
 
 namespace sdext { namespace presenter {
 
-namespace {
-static OUString gsNameProperty (A2S("Name"));
-static OUString gsNormalFileNameProperty (A2S("NormalFileName"));
-static OUString gsMouseOverFileNameProperty (A2S("MouseOverFileName"));
-static OUString gsButtonDownFileNameProperty (A2S("ButtonDownFileName"));
-static OUString gsDisabledFileNameProperty (A2S("DisabledFileName"));
-static OUString gsMaskFileNameProperty (A2S("MaskFileName"));
-static OUString gsXOffsetProperty (A2S("XOffset"));
-static OUString gsYOffsetProperty (A2S("YOffset"));
-static OUString gsXHotSpotProperty (A2S("XHotSpot"));
-static OUString gsYHotSpotProperty (A2S("YHotSpot"));
-static OUString gsReplacementColorProperty (A2S("ReplacementColor"));
-static OUString gsHorizontalTexturingModeProperty 
(A2S("HorizontalTexturingMode"));
-static OUString gsVerticalTexturingModeProperty (A2S("VerticalTexturingMode"));
-}
-
 //===== PresenterBitmapContainer ==============================================
 
 PresenterBitmapContainer::PresenterBitmapContainer (
@@ -210,7 +194,7 @@ void PresenterBitmapContainer::ProcessBitmap (
     const Reference<beans::XPropertySet>& rxProperties)
 {
     OUString sName;
-    if ( ! (PresenterConfigurationAccess::GetProperty(rxProperties, 
gsNameProperty) >>= sName))
+    if ( ! (PresenterConfigurationAccess::GetProperty(rxProperties, 
A2S("Name")) >>= sName))
         sName = rsKey;
 
     maIconContainer[sName] = LoadBitmap(
@@ -239,7 +223,7 @@ SharedBitmapDescriptor PresenterBitmapContainer::LoadBitmap 
(
     OUString sFileName;
 
     // Load bitmaps.
-    if (PresenterConfigurationAccess::GetProperty(rxProperties, 
gsNormalFileNameProperty) >>= sFileName)
+    if (PresenterConfigurationAccess::GetProperty(rxProperties, 
A2S("NormalFileName")) >>= sFileName)
         try
         {
             pBitmap->SetBitmap(
@@ -248,7 +232,7 @@ SharedBitmapDescriptor PresenterBitmapContainer::LoadBitmap 
(
         }
         catch (Exception&)
         {}
-    if (PresenterConfigurationAccess::GetProperty(rxProperties, 
gsMouseOverFileNameProperty) >>= sFileName)
+    if (PresenterConfigurationAccess::GetProperty(rxProperties, 
A2S("MouseOverFileName")) >>= sFileName)
         try
         {
             pBitmap->SetBitmap(
@@ -257,7 +241,7 @@ SharedBitmapDescriptor PresenterBitmapContainer::LoadBitmap 
(
         }
         catch (Exception&)
         {}
-    if (PresenterConfigurationAccess::GetProperty(rxProperties, 
gsButtonDownFileNameProperty) >>= sFileName)
+    if (PresenterConfigurationAccess::GetProperty(rxProperties, 
A2S("ButtonDownFileName")) >>= sFileName)
         try
         {
             pBitmap->SetBitmap(
@@ -266,7 +250,7 @@ SharedBitmapDescriptor PresenterBitmapContainer::LoadBitmap 
(
         }
         catch (Exception&)
         {}
-    if (PresenterConfigurationAccess::GetProperty(rxProperties, 
gsDisabledFileNameProperty) >>= sFileName)
+    if (PresenterConfigurationAccess::GetProperty(rxProperties, 
A2S("DisabledFileName")) >>= sFileName)
         try
         {
             pBitmap->SetBitmap(
@@ -275,7 +259,7 @@ SharedBitmapDescriptor PresenterBitmapContainer::LoadBitmap 
(
         }
         catch (Exception&)
         {}
-    if (PresenterConfigurationAccess::GetProperty(rxProperties, 
gsMaskFileNameProperty) >>= sFileName)
+    if (PresenterConfigurationAccess::GetProperty(rxProperties, 
A2S("MaskFileName")) >>= sFileName)
         try
         {
             pBitmap->SetBitmap(
@@ -285,18 +269,18 @@ SharedBitmapDescriptor 
PresenterBitmapContainer::LoadBitmap (
         catch (Exception&)
         {}
 
-    PresenterConfigurationAccess::GetProperty(rxProperties, gsXOffsetProperty) 
>>= pBitmap->mnXOffset;
-    PresenterConfigurationAccess::GetProperty(rxProperties, gsYOffsetProperty) 
>>= pBitmap->mnYOffset;
+    PresenterConfigurationAccess::GetProperty(rxProperties, A2S("XOffset")) 
>>= pBitmap->mnXOffset;
+    PresenterConfigurationAccess::GetProperty(rxProperties, A2S("YOffset")) 
>>= pBitmap->mnYOffset;
 
-    PresenterConfigurationAccess::GetProperty(rxProperties, 
gsXHotSpotProperty) >>= pBitmap->mnXHotSpot;
-    PresenterConfigurationAccess::GetProperty(rxProperties, 
gsYHotSpotProperty) >>= pBitmap->mnYHotSpot;
+    PresenterConfigurationAccess::GetProperty(rxProperties, A2S("XHotSpot")) 
>>= pBitmap->mnXHotSpot;
+    PresenterConfigurationAccess::GetProperty(rxProperties, A2S("YHotSpot")) 
>>= pBitmap->mnYHotSpot;
 
-    PresenterConfigurationAccess::GetProperty(rxProperties, 
gsReplacementColorProperty) >>= pBitmap->maReplacementColor;
+    PresenterConfigurationAccess::GetProperty(rxProperties, 
A2S("ReplacementColor")) >>= pBitmap->maReplacementColor;
 
     OUString sTexturingMode;
-    if (PresenterConfigurationAccess::GetProperty(rxProperties, 
gsHorizontalTexturingModeProperty) >>= sTexturingMode)
+    if (PresenterConfigurationAccess::GetProperty(rxProperties, 
A2S("HorizontalTexturingMode")) >>= sTexturingMode)
         pBitmap->meHorizontalTexturingMode = 
StringToTexturingMode(sTexturingMode);
-    if (PresenterConfigurationAccess::GetProperty(rxProperties, 
gsVerticalTexturingModeProperty) >>= sTexturingMode)
+    if (PresenterConfigurationAccess::GetProperty(rxProperties, 
A2S("VerticalTexturingMode")) >>= sTexturingMode)
         pBitmap->meVerticalTexturingMode = 
StringToTexturingMode(sTexturingMode);
 
     return pBitmap;
diff --git a/sdext/source/presenter/PresenterComponent.cxx 
b/sdext/source/presenter/PresenterComponent.cxx
index 581427c..8032fb0 100644
--- a/sdext/source/presenter/PresenterComponent.cxx
+++ b/sdext/source/presenter/PresenterComponent.cxx
@@ -44,8 +44,6 @@ using ::rtl::OUString;
 
 namespace sdext { namespace presenter {
 
-static OUString gsBasePath;
-
 ::rtl::OUString PresenterComponent::GetBasePath (
     const Reference<XComponentContext>& rxComponentContext)
 {
@@ -56,7 +54,8 @@ static OUString gsBasePath;
     const Reference<XComponentContext>& rxComponentContext,
     const OUString& rsExtensionIdentifier)
 {
-    if (gsBasePath.isEmpty())
+    static ::rtl::OUString sBasePath;
+    if (sBasePath.isEmpty())
     {
         // Determine the base path of the bitmaps.
         Reference<deployment::XPackageInformationProvider> 
xInformationProvider (
@@ -68,16 +67,16 @@ static OUString gsBasePath;
         {
             try
             {
-                gsBasePath = 
xInformationProvider->getPackageLocation(rsExtensionIdentifier)
+                sBasePath = 
xInformationProvider->getPackageLocation(rsExtensionIdentifier)
                     + OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
             }
-            catch(deployment::DeploymentException&)
+            catch (const deployment::DeploymentException&)
             {
             }
         }
     }
 
-    return gsBasePath;
+    return sBasePath;
 }
 
 rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT;
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index 12f858e..5f6d001 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -319,37 +319,45 @@ throw (css::uno::RuntimeException)
     }
 }
 
-//====================================================================
-
-typedef boost::unordered_map< sal_Int32, rtl::OUString > 
ToolBarResIdToResourceURLMap;
-
-static sal_Bool bMapInitialized = sal_False;
-static ToolBarResIdToResourceURLMap aResIdToResourceURLMap;
-
-static rtl::OUString GetResourceURLFromResId( sal_uInt16 nResId )
+namespace
 {
-    if ( !bMapInitialized )
+    class FilledToolBarResIdToResourceURLMap
     {
-        osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ;
-        if ( !bMapInitialized )
+    private:
+        typedef boost::unordered_map< sal_Int32, rtl::OUString > 
ToolBarResIdToResourceURLMap;
+        ToolBarResIdToResourceURLMap m_aResIdToResourceURLMap;
+    public:
+        FilledToolBarResIdToResourceURLMap()
         {
             sal_Int32 nIndex( 0 );
             while ( pToolBarResToName[nIndex].nId != 0 )
             {
                 rtl::OUString aResourceURL( rtl::OUString::createFromAscii( 
pToolBarResToName[nIndex].pName ));
-                aResIdToResourceURLMap.insert( 
ToolBarResIdToResourceURLMap::value_type(
+                m_aResIdToResourceURLMap.insert( 
ToolBarResIdToResourceURLMap::value_type(
                                                     sal_Int32( 
pToolBarResToName[nIndex].nId ), aResourceURL ));
                 ++nIndex;
             }
-            bMapInitialized = sal_True;
         }
-    }
 
-    ToolBarResIdToResourceURLMap::const_iterator pIter = 
aResIdToResourceURLMap.find( nResId );
-    if ( pIter != aResIdToResourceURLMap.end() )
-        return pIter->second;
-    else
-        return rtl::OUString();
+        rtl::OUString findURL(sal_uInt16 nResId) const
+        {
+            ToolBarResIdToResourceURLMap::const_iterator aIter = 
m_aResIdToResourceURLMap.find( nResId );
+            if ( aIter != m_aResIdToResourceURLMap.end() )
+                return aIter->second;
+            return rtl::OUString();
+        }
+    };
+
+    class theFilledToolBarResIdToResourceURLMap
+        : public rtl::Static<FilledToolBarResIdToResourceURLMap,
+                             theFilledToolBarResIdToResourceURLMap>
+    {
+    };
+}
+
+static rtl::OUString GetResourceURLFromResId( sal_uInt16 nResId )
+{
+    return theFilledToolBarResIdToResourceURLMap::get().findURL(nResId);
 }
 
 sal_Bool IsAppWorkWinToolbox_Impl( sal_uInt16 nPos )
diff --git a/stoc/source/security/access_controller.cxx 
b/stoc/source/security/access_controller.cxx
index 15e58ab..c128b4a 100644
--- a/stoc/source/security/access_controller.cxx
+++ b/stoc/source/security/access_controller.cxx
@@ -80,7 +80,7 @@ namespace stoc_sec
 {
 // static stuff initialized when loading lib
 static OUString s_envType = OUSTR(CPPU_CURRENT_LANGUAGE_BINDING_NAME);
-static OUString s_acRestriction = OUSTR("access-control.restriction");
+const char s_acRestriction[] = "access-control.restriction";
 
 
//##################################################################################################
 
@@ -325,7 +325,7 @@ void acc_CurrentContext::release()
 Any acc_CurrentContext::getValueByName( OUString const & name )
     throw (RuntimeException)
 {
-    if (name.equals( s_acRestriction ))
+    if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(s_acRestriction)))
     {
         return m_restriction;
     }
@@ -358,7 +358,7 @@ static inline Reference< security::XAccessControlContext > 
getDynamicRestriction
 {
     if (xContext.is())
     {
-        Any acc( xContext->getValueByName( s_acRestriction ) );
+        Any acc(xContext->getValueByName(rtl::OUString(s_acRestriction)));
         if (typelib_TypeClass_INTERFACE == acc.pType->eTypeClass)
         {
             // avoid ref-counting
@@ -1047,8 +1047,7 @@ Sequence< OUString > ac_getSupportedServiceNames() 
SAL_THROW(())
 
//--------------------------------------------------------------------------------------------------
 OUString ac_getImplementationName() SAL_THROW(())
 {
-    static OUString s_implName = OUSTR(IMPL_NAME);
-    return s_implName;
+    return OUSTR(IMPL_NAME);
 }
 
//--------------------------------------------------------------------------------------------------
 Reference< XInterface > SAL_CALL filepolicy_create(
diff --git a/svl/inc/svl/zforlist.hxx b/svl/inc/svl/zforlist.hxx
index 96a8955..7012164 100644
--- a/svl/inc/svl/zforlist.hxx
+++ b/svl/inc/svl/zforlist.hxx
@@ -339,9 +339,6 @@ public:
      */
     static const sal_uInt16 INPUTSTRING_PRECISION;
 
-    /** THE set of installed locales. */
-    static NfInstalledLocales theInstalledLocales;
-
     /// Preferred ctor with service manager and language/country enum
     SvNumberFormatter(
         const ::com::sun::star::uno::Reference< 
::com::sun::star::lang::XMultiServiceFactory >& xSMgr,
@@ -809,15 +806,7 @@ public:
     String GetStandardName( LanguageType eLnge );
 
     /** Check if a specific locale has supported locale data. */
-    static bool IsLocaleInstalled( LanguageType eLang )
-    {
-        // The set is initialized as a side effect of the currency table
-        // created, make sure that exists, which usually is the case unless a
-        // SvNumberFormatter was never instanciated.
-        GetTheCurrencyTable();
-        return theInstalledLocales.find( eLang) != theInstalledLocales.end();
-    }
-
+    static bool IsLocaleInstalled( LanguageType eLang );
 
 private:
     ::com::sun::star::uno::Reference< 
::com::sun::star::lang::XMultiServiceFactory > xServiceManager;
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index c09d14e..7c8a49c 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -178,6 +178,11 @@ namespace
 
     struct theLegacyOnlyCurrencyTable :
         public rtl::Static< NfCurrencyTable, theLegacyOnlyCurrencyTable > {};
+
+    /** THE set of installed locales. */
+    struct theInstalledLocales :
+        public rtl::Static< NfInstalledLocales, theInstalledLocales> {};
+
 }
 sal_uInt16 SvNumberFormatter::nSystemCurrencyPosition = 0;
 SV_IMPL_PTRARR( NfCurrencyTable, NfCurrencyEntry* );
@@ -192,7 +197,6 @@ SV_IMPL_PTRARR( NfWSStringsDtor, String* );
 
 const sal_uInt16 SvNumberFormatter::UNLIMITED_PRECISION   = 
::std::numeric_limits<sal_uInt16>::max();
 const sal_uInt16 SvNumberFormatter::INPUTSTRING_PRECISION = 
::std::numeric_limits<sal_uInt16>::max()-1;
-NfInstalledLocales SvNumberFormatter::theInstalledLocales;
 
 SvNumberFormatter::SvNumberFormatter(
             const Reference< XMultiServiceFactory >& xSMgr,
@@ -3514,6 +3518,16 @@ void lcl_CheckCurrencySymbolPosition( const 
NfCurrencyEntry& rCurr )
     }
 }
 
+// static
+bool SvNumberFormatter::IsLocaleInstalled( LanguageType eLang )
+{
+    // The set is initialized as a side effect of the currency table
+    // created, make sure that exists, which usually is the case unless a
+    // SvNumberFormatter was never instanciated.
+    GetTheCurrencyTable();
+    const NfInstalledLocales &rInstalledLocales = theInstalledLocales::get();
+    return rInstalledLocales.find( eLang) != rInstalledLocales.end();
+}
 
 // static
 void SvNumberFormatter::ImpInitCurrencyTable()
@@ -3554,12 +3568,13 @@ void SvNumberFormatter::ImpInitCurrencyTable()
     Locale const * const pLocales = xLoc.getConstArray();
     NfCurrencyTable &rCurrencyTable = theCurrencyTable::get();
     NfCurrencyTable &rLegacyOnlyCurrencyTable = 
theLegacyOnlyCurrencyTable::get();
+    NfInstalledLocales &rInstalledLocales = theInstalledLocales::get();
     sal_uInt16 nLegacyOnlyCurrencyPos = 0;
     for ( sal_Int32 nLocale = 0; nLocale < nLocaleCount; nLocale++ )
     {
         LanguageType eLang = MsLangId::convertLocaleToLanguage(
                 pLocales[nLocale]);
-        theInstalledLocales.insert( eLang);
+        rInstalledLocales.insert( eLang);
         pLocaleData->setLocale( pLocales[nLocale] );
         Sequence< Currency2 > aCurrSeq = pLocaleData->getAllCurrencies();
         sal_Int32 nCurrencyCount = aCurrSeq.getLength();
diff --git a/svtools/source/edit/syntaxhighlight.cxx 
b/svtools/source/edit/syntaxhighlight.cxx
index d4caa88..2bf3d02 100644
--- a/svtools/source/edit/syntaxhighlight.cxx
+++ b/svtools/source/edit/syntaxhighlight.cxx
@@ -234,39 +234,32 @@ extern "C" int CDECL compare_strings( const void *arg1, 
const void *arg2 )
 }
 
 
-namespace {
-
-class LetterTable
+namespace
 {
-    bool        IsLetterTab[256];
-
-public:
-    LetterTable( void );
 
-    inline bool isLetter( sal_Unicode c )
+    class LetterTable
     {
-        bool bRet = (c < 256) ? IsLetterTab[c] : isLetterUnicode( c );
-        return bRet;
-    }
-    bool isLetterUnicode( sal_Unicode c );
-};
+        bool        IsLetterTab[256];
 
-}
+    public:
+        LetterTable( void );
 
-class BasicSimpleCharClass
-{
-    static LetterTable aLetterTable;
+        inline bool isLetter( sal_Unicode c )
+        {
+            bool bRet = (c < 256) ? IsLetterTab[c] : isLetterUnicode( c );
+            return bRet;
+        }
+        bool isLetterUnicode( sal_Unicode c );
+    };
 
-public:
-    static sal_Bool isAlpha( sal_Unicode c )
+    static bool isAlpha(sal_Unicode c)
     {
-        sal_Bool bRet = comphelper::string::isalphaAscii(c) ||
-            aLetterTable.isLetter(c);
-        return bRet;
+        if (comphelper::string::isalphaAscii(c))
+            return true;
+        static LetterTable aLetterTable;
+        return aLetterTable.isLetter(c);
     }
-};
-
-LetterTable BasicSimpleCharClass::aLetterTable;
+}
 
 LetterTable::LetterTable( void )
 {
@@ -358,7 +351,7 @@ sal_Bool SimpleTokenizer_Impl::testCharFlags( sal_Unicode 
c, sal_uInt16 nTestFla
     else if( c > 255 )
     {
         bRet = (( CHAR_START_IDENTIFIER | CHAR_IN_IDENTIFIER ) & nTestFlags) 
!= 0
-            ? BasicSimpleCharClass::isAlpha(c) : false;
+            ? isAlpha(c) : false;
     }
     return bRet;
 }
@@ -469,7 +462,7 @@ sal_Bool SimpleTokenizer_Impl::getNextToken( 
/*out*/TokenTypes& reType,
                 {
                     // Naechstes Zeichen holen
                     c = peekChar();
-                    bIdentifierChar =  BasicSimpleCharClass::isAlpha(c);
+                    bIdentifierChar = isAlpha(c);
                     if( bIdentifierChar )
                         getChar();
                 }
diff --git a/vcl/generic/fontmanager/fontmanager.cxx 
b/vcl/generic/fontmanager/fontmanager.cxx
index 06bfb7b..ddb2fdb 100644
--- a/vcl/generic/fontmanager/fontmanager.cxx
+++ b/vcl/generic/fontmanager/fontmanager.cxx
@@ -994,10 +994,6 @@ bool PrintFontManager::PrintFont::readAfmMetrics( const 
OString& rFileName, Mult
     return true;
 }
 
-// -------------------------------------------------------------------------
-
-OString PrintFontManager::s_aEmptyOString;
-
 /*
  *  one instance only
  */
@@ -1051,10 +1047,10 @@ PrintFontManager::~PrintFontManager()
 
 // -------------------------------------------------------------------------
 
-const OString& PrintFontManager::getDirectory( int nAtom ) const
+OString PrintFontManager::getDirectory( int nAtom ) const
 {
     ::boost::unordered_map< int, OString >::const_iterator it( 
m_aAtomToDir.find( nAtom ) );
-    return it != m_aAtomToDir.end() ? it->second : s_aEmptyOString;
+    return it != m_aAtomToDir.end() ? it->second : OString();
 }
 
 // -------------------------------------------------------------------------
diff --git a/vcl/inc/vcl/fontmanager.hxx b/vcl/inc/vcl/fontmanager.hxx
index 0760e30..2cb07ae 100644
--- a/vcl/inc/vcl/fontmanager.hxx
+++ b/vcl/inc/vcl/fontmanager.hxx
@@ -267,8 +267,6 @@ class VCL_PLUGIN_PUBLIC PrintFontManager
         virtual bool queryMetricPage( int nPage, utl::MultiAtomProvider* 
pProvider );
     };
 
-    static rtl::OString s_aEmptyOString;
-
     fontID                                      m_nNextFontID;
     boost::unordered_map< fontID, PrintFont* >       m_aFonts;
     boost::unordered_map< int, FontFamily >        m_aFamilyTypes;
@@ -328,7 +326,7 @@ class VCL_PLUGIN_PUBLIC PrintFontManager
     void fillPrintFontInfo( PrintFont* pFont, FastPrintFontInfo& rInfo ) const;
     void fillPrintFontInfo( PrintFont* pFont, PrintFontInfo& rInfo ) const;
 
-    const rtl::OString& getDirectory( int nAtom ) const;
+    rtl::OString getDirectory( int nAtom ) const;
     int getDirectoryAtom( const rtl::OString& rDirectory, bool bCreate = false 
);
 
     /* try to initialize fonts from libfontconfig
diff --git a/vcl/source/gdi/bmpfast.cxx b/vcl/source/gdi/bmpfast.cxx
index 131686f..3d0a48d 100644
--- a/vcl/source/gdi/bmpfast.cxx
+++ b/vcl/source/gdi/bmpfast.cxx
@@ -37,7 +37,6 @@
 #define FAST_ARGB_BGRA
 
 #include <stdlib.h>
-static bool bDisableFastBitops = (getenv( "SAL_DISABLE_BITMAPS_OPTS" ) != 
NULL);
 
 typedef unsigned char PIXBYTE;
 
@@ -502,9 +501,6 @@ inline bool ImplConvertFromBitmap( BitmapBuffer& rDst, 
const BitmapBuffer& rSrc
 bool ImplFastBitmapConversion( BitmapBuffer& rDst, const BitmapBuffer& rSrc,
     const SalTwoRect& rTR )
 {
-    if( bDisableFastBitops )
-        return false;
-
     // horizontal mirroring not implemented yet
     if( rTR.mnDestWidth < 0 )
         return false;
@@ -760,9 +756,6 @@ bool ImplFastBitmapBlending( BitmapWriteAccess& rDstWA,
     const BitmapReadAccess& rSrcRA, const BitmapReadAccess& rMskRA,
     const SalTwoRect& rTR )
 {
-    if( bDisableFastBitops )
-        return false;
-
     // accelerated blending of paletted bitmaps not implemented yet
     if( rSrcRA.HasPalette() )
         return false;
@@ -884,9 +877,6 @@ bool ImplFastBitmapBlending( BitmapWriteAccess& rDstWA,
 
 bool ImplFastEraseBitmap( BitmapBuffer& rDst, const BitmapColor& rColor )
 {
-    if( bDisableFastBitops )
-        return false;
-
     const sal_uLong nDstFormat = rDst.mnFormat & ~BMP_FORMAT_TOP_DOWN;
 
     // erasing a bitmap is often just a byte-wise memory fill
diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx 
b/xmlhelp/source/cxxhelp/provider/databases.cxx
index 22c873e..0af076b 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.cxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.cxx
@@ -83,7 +83,6 @@ using namespace com::sun::star::beans;
 
 
 static rtl::OUString aSlash(RTL_CONSTASCII_USTRINGPARAM("/"));
-static rtl::OUString aHelpFilesBaseName(RTL_CONSTASCII_USTRINGPARAM("help"));
 
 rtl::OUString Databases::expandURL( const rtl::OUString& aURL )
 {
@@ -1629,7 +1628,7 @@ rtl::OUString 
ExtensionIteratorBase::implGetFileFromPackage(
         if( !bLangFolderOnly )
         {
             aStrBuf.append( aSlash );
-            aStrBuf.append( aHelpFilesBaseName );
+            aStrBuf.append( "help" );
             aStrBuf.append( rFileExtension );
         }
 
@@ -1774,6 +1773,8 @@ Db* DataBaseIterator::implGetDbFromPackage( Reference< 
deployment::XPackage > xP
         rtl::OUString aRegDataUrl(optRegData.Value);
         aRegDataUrl += aSlash;
 
+        rtl::OUString aHelpFilesBaseName("help");
+
         rtl::OUString aUsedLanguage = m_aLanguage;
         pRetDb = m_rDatabases.getBerkeley(
             aHelpFilesBaseName, aUsedLanguage, m_bHelpText, &aRegDataUrl);
commit c7f60050da130eaeab11a53142a65b61c92c34a1
Author: Caolán McNamara <caol...@redhat.com>
Date:   Tue May 15 18:09:44 2012 +0100

    restore this, problem was ever-growing PATH for incremental builds
    
    which is hopefully fixed by b0b92d1e5f2097652b12252a32cea40a5868e20c
    
    Change-Id: I237381609b132666083fd0ff159625770e0db243

diff --git a/icu/makefile.mk b/icu/makefile.mk
index c4cecdb..38bbcdd 100644
--- a/icu/makefile.mk
+++ b/icu/makefile.mk
@@ -280,7 +280,7 @@ OUT2BIN= \
 
 #make sure that when we deliver the headers of a new icu that the timestamps
 #are newer than the last icu to ensure dependencies are correctly rebuilt
-#INSTALL_ACTION=find . -name "*.h" -print0 | xargs -0 touch
+INSTALL_ACTION=find . -name "*.h" -print0 | xargs -0 touch
 
 # --- Targets ------------------------------------------------------
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to