[Libreoffice-commits] .: 3 commits - starmath/inc starmath/prj starmath/source
Caolán McNamara
caolan at kemper.freedesktop.org
Wed Jun 1 07:42:39 PDT 2011
starmath/inc/parse.hxx | 3 +++
starmath/prj/build.lst | 2 +-
starmath/source/parse.cxx | 6 ++----
starmath/source/unomodel.cxx | 17 +++++++----------
4 files changed, 13 insertions(+), 15 deletions(-)
New commits:
commit be70acb0a420acdb427b184cea8f6247a36cdcd9
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue May 31 22:08:51 2011 +0100
use UnoTunnelIdInit pattern
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index fee7558..6da429c 100644
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -49,6 +49,7 @@
#include <xmloff/xmluconv.hxx>
#include <rtl/ustrbuf.hxx>
#include <comphelper/propertysetinfo.hxx>
+#include <comphelper/servicehelper.hxx>
#include <unotools/moduleoptions.hxx>
#include <unomodel.hxx>
@@ -369,18 +370,14 @@ uno::Sequence< uno::Type > SAL_CALL SmModel::getTypes( ) throw(uno::RuntimeExce
return aTypes;
}
-const uno::Sequence< sal_Int8 > & SmModel::getUnoTunnelId()
+namespace
{
- static osl::Mutex aCreateMutex;
- osl::Guard<osl::Mutex> aGuard( aCreateMutex );
+ class theSmModelUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theSmModelUnoTunnelId> {};
+}
- static uno::Sequence< sal_Int8 > aSeq;
- if(!aSeq.getLength())
- {
- aSeq.realloc( 16 );
- rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0, sal_True );
- }
- return aSeq;
+const uno::Sequence< sal_Int8 > & SmModel::getUnoTunnelId()
+{
+ return theSmModelUnoTunnelId::get().getSeq();
}
sal_Int64 SAL_CALL SmModel::getSomething( const uno::Sequence< sal_Int8 >& rId )
commit f5ede2bf4387f62648dd7994816008f3f29aa95b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue May 31 21:50:51 2011 +0100
make this per-class instead of a local static
diff --git a/starmath/inc/parse.hxx b/starmath/inc/parse.hxx
index 228d3e9..8f6c612 100644
--- a/starmath/inc/parse.hxx
+++ b/starmath/inc/parse.hxx
@@ -209,6 +209,9 @@ class SmParser
// map of used symbols (used to reduce file size by exporting only actually used symbols)
std::set< rtl::OUString > m_aUsedSymbols;
+ //! locale where '.' is decimal seperator!
+ ::com::sun::star::lang::Locale m_aDotLoc;
+
// declare copy-constructor and assignment-operator private
SmParser(const SmParser &);
SmParser & operator = (const SmParser &);
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index 5d7fc2b..f2a86b9 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -430,12 +430,9 @@ void SmParser::NextToken()
// (note that #i11752# remains fixed)
if ((aRes.TokenType & KParseType::IDENTNAME) && IsDigit( cFirstChar ))
{
- //! locale where '.' is decimal seperator!
- static lang::Locale aDotLoc( SvxCreateLocale( LANGUAGE_ENGLISH_US ) );
-
ParseResult aTmpRes;
lang::Locale aOldLoc( aCC.getLocale() );
- aCC.setLocale( aDotLoc );
+ aCC.setLocale( m_aDotLoc );
aTmpRes = aCC.parsePredefinedToken(
KParseType::ASC_NUMBER,
m_aBufferString, m_nBufferIndex,
@@ -2396,6 +2393,7 @@ void SmParser::Error(SmParseError eError)
SmParser::SmParser()
+ : m_aDotLoc( SvxCreateLocale( LANGUAGE_ENGLISH_US ) )
{
m_eConversion = CONVERT_NONE;
bImportSymNames = m_bExportSymNames = false;
commit 57fcf9a0a6037b4136a095e93e1b1cdf73561c21
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue May 31 14:48:48 2011 +0100
add depends for cppunit test
diff --git a/starmath/prj/build.lst b/starmath/prj/build.lst
index da2383e..6b60a03 100644
--- a/starmath/prj/build.lst
+++ b/starmath/prj/build.lst
@@ -1,2 +1,2 @@
-sm starmath : LIBXSLT:libxslt TRANSLATIONS:translations svx ure NULL
+sm starmath : LIBXSLT:libxslt TRANSLATIONS:translations svx configmgr dtrans ure NULL
sm starmath\prj nmake - all sm_prj NULL
More information about the Libreoffice-commits
mailing list