diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-06-03 12:32:02 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-06-03 13:42:38 +0100 |
commit | e8ec8ac46394a433e494370769a22b73b383bdc9 (patch) | |
tree | 99f0a9ce1db881c3a07a9b19d5bdfff8bf35fe9d /chart2/source/view/main | |
parent | 8f4174419d7eba92c2bb46da6d4621029e234023 (diff) |
use standard template for this
Diffstat (limited to 'chart2/source/view/main')
-rw-r--r-- | chart2/source/view/main/ChartView.cxx | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index 016001cd76b9..779c57498f90 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -61,6 +61,7 @@ #include "DateHelper.hxx" #include <comphelper/scopeguard.hxx> +#include <comphelper/servicehelper.hxx> #include <boost/bind.hpp> #include <unotools/streamwrap.hxx> // header for class LocaleDataWrapper @@ -119,20 +120,14 @@ using ::com::sun::star::uno::Sequence; using ::com::sun::star::uno::Any; using rtl::OUString; +namespace +{ + class theExplicitValueProviderUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theExplicitValueProviderUnoTunnelId > {}; +} + const uno::Sequence<sal_Int8>& ExplicitValueProvider::getUnoTunnelId() { - static uno::Sequence<sal_Int8> * pSeq = 0; - if( !pSeq ) - { - osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() ); - if( !pSeq ) - { - static uno::Sequence< sal_Int8 > aSeq( 16 ); - rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0, sal_True ); - pSeq = &aSeq; - } - } - return *pSeq; + return theExplicitValueProviderUnoTunnelId::get().getSeq(); } ExplicitValueProvider* ExplicitValueProvider::getExplicitValueProvider( |