[Libreoffice-commits] .: 3 commits - sc/source
Caolán McNamara
caolan at kemper.freedesktop.org
Fri Jun 3 01:41:30 PDT 2011
sc/source/ui/Accessibility/AccessibleCell.cxx | 1
sc/source/ui/Accessibility/AccessibleCellBase.cxx | 17 --
sc/source/ui/Accessibility/AccessibleContextBase.cxx | 17 --
sc/source/ui/Accessibility/AccessibleCsvControl.cxx | 31 +---
sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx | 32 +---
sc/source/ui/Accessibility/AccessibleDocument.cxx | 16 --
sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx | 16 --
sc/source/ui/Accessibility/AccessibleEditObject.cxx | 17 --
sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx | 17 --
sc/source/ui/Accessibility/AccessiblePreviewCell.cxx | 17 --
sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx | 16 --
sc/source/ui/Accessibility/AccessiblePreviewTable.cxx | 14 -
sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx | 17 --
sc/source/ui/Accessibility/AccessibleTableBase.cxx | 17 --
sc/source/ui/app/drwtrans.cxx | 16 --
sc/source/ui/inc/AccessibleCsvControl.hxx | 3
sc/source/ui/unoobj/cellsuno.cxx | 80 +++++------
sc/source/ui/unoobj/cursuno.cxx | 15 --
sc/source/ui/unoobj/dapiuno.cxx | 27 +--
sc/source/ui/unoobj/datauno.cxx | 4
sc/source/ui/unoobj/docuno.cxx | 14 -
sc/source/ui/unoobj/fielduno.cxx | 28 +--
sc/source/ui/unoobj/fmtuno.cxx | 1
sc/source/ui/unoobj/shapeuno.cxx | 2
sc/source/ui/unoobj/styleuno.cxx | 1
sc/source/ui/unoobj/textuno.cxx | 1
sc/source/ui/unoobj/viewuno.cxx | 28 +--
sc/source/ui/vba/vbaworkbook.cxx | 19 --
sc/source/ui/vba/vbaworksheet.cxx | 19 --
29 files changed, 215 insertions(+), 288 deletions(-)
New commits:
commit 78d703a7772e0dfdd6408e4b336e2f7349e1a332
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jun 3 08:43:14 2011 +0100
WaE: even on 32bit an signed 32bit larger than size_t
diff --git a/sc/source/ui/Accessibility/AccessibleCell.cxx b/sc/source/ui/Accessibility/AccessibleCell.cxx
index ea8c6b3..1ef98f1 100644
--- a/sc/source/ui/Accessibility/AccessibleCell.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCell.cxx
@@ -50,7 +50,6 @@
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
#include <com/sun/star/accessibility/XAccessibleTable.hpp>
-#include <rtl/uuid.h>
#include <editeng/brshitem.hxx>
#include <comphelper/sequence.hxx>
#include <float.h>
diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx
index e1669a3..31e1346 100644
--- a/sc/source/ui/unoobj/datauno.cxx
+++ b/sc/source/ui/unoobj/datauno.cxx
@@ -33,7 +33,6 @@
#include <svl/smplhint.hxx>
#include <svl/zforlist.hxx>
-#include <rtl/uuid.h>
#include <vcl/svapp.hxx>
#include <com/sun/star/awt/XBitmap.hpp>
@@ -2294,8 +2293,7 @@ uno::Any SAL_CALL ScDatabaseRangesObj::getByIndex( sal_Int32 nIndex )
lang::WrappedTargetException, uno::RuntimeException)
{
SolarMutexGuard aGuard;
- sal_Int32 nUpper = ::std::numeric_limits<size_t>::max();
- if (nIndex < 0 || nIndex > nUpper)
+ if (nIndex < 0)
throw lang::IndexOutOfBoundsException();
uno::Reference<sheet::XDatabaseRange> xRange(GetObjectByIndex_Impl(static_cast<size_t>(nIndex)));
diff --git a/sc/source/ui/unoobj/fmtuno.cxx b/sc/source/ui/unoobj/fmtuno.cxx
index 7cc1b6c..2e9a08f 100644
--- a/sc/source/ui/unoobj/fmtuno.cxx
+++ b/sc/source/ui/unoobj/fmtuno.cxx
@@ -31,7 +31,6 @@
#include <boost/bind.hpp>
-#include <rtl/uuid.h>
#include <vcl/svapp.hxx>
#include <comphelper/servicehelper.hxx>
diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx
index 10645cb..d3abb27 100644
--- a/sc/source/ui/unoobj/styleuno.cxx
+++ b/sc/source/ui/unoobj/styleuno.cxx
@@ -49,7 +49,6 @@
#include <svl/itemset.hxx>
#include <svl/intitem.hxx>
#include <svl/zformat.hxx>
-#include <rtl/uuid.h>
#include <com/sun/star/table/BorderLine.hpp>
#include <com/sun/star/table/CellVertJustify2.hpp>
diff --git a/sc/source/ui/unoobj/textuno.cxx b/sc/source/ui/unoobj/textuno.cxx
index b7c3ecc..ffe1b7d 100644
--- a/sc/source/ui/unoobj/textuno.cxx
+++ b/sc/source/ui/unoobj/textuno.cxx
@@ -41,7 +41,6 @@
#include <svx/unomid.hxx>
#include <editeng/unoprnms.hxx>
#include <editeng/unofored.hxx>
-#include <rtl/uuid.h>
#include <vcl/virdev.hxx>
#include <vcl/svapp.hxx>
#include <com/sun/star/awt/FontSlant.hpp>
commit d39221a3db76ea30ebba0d4fd8975bf63c90a101
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jun 2 22:57:57 2011 +0100
use standard template for this throughout
diff --git a/sc/source/ui/Accessibility/AccessibleCellBase.cxx b/sc/source/ui/Accessibility/AccessibleCellBase.cxx
index fa5fc7c..58d0709 100644
--- a/sc/source/ui/Accessibility/AccessibleCellBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCellBase.cxx
@@ -46,8 +46,8 @@
#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
#include <com/sun/star/sheet/XSpreadsheet.hpp>
#include <editeng/brshitem.hxx>
-#include <rtl/uuid.h>
#include <comphelper/sequence.hxx>
+#include <comphelper/servicehelper.hxx>
#include <sfx2/objsh.hxx>
#include <vcl/svapp.hxx>
@@ -314,19 +314,16 @@ uno::Sequence< uno::Type > SAL_CALL ScAccessibleCellBase::getTypes()
return comphelper::concatSequences(ScAccessibleCellBaseImpl::getTypes(), ScAccessibleContextBase::getTypes());
}
+namespace
+{
+ class theScAccessibleCellBaseImplementationId : public rtl::Static< UnoTunnelIdInit, theScAccessibleCellBaseImplementationId > {};
+}
+
uno::Sequence<sal_Int8> SAL_CALL
ScAccessibleCellBase::getImplementationId(void)
throw (uno::RuntimeException)
{
- SolarMutexGuard aGuard;
- IsObjectValid();
- static uno::Sequence<sal_Int8> aId;
- if (aId.getLength() == 0)
- {
- aId.realloc (16);
- rtl_createUuid (reinterpret_cast<sal_uInt8 *>(aId.getArray()), 0, sal_True);
- }
- return aId;
+ return theScAccessibleCellBaseImplementationId::get().getSeq();
}
sal_Bool ScAccessibleCellBase::IsEditable(
diff --git a/sc/source/ui/Accessibility/AccessibleContextBase.cxx b/sc/source/ui/Accessibility/AccessibleContextBase.cxx
index 81f72dd..ae98971 100644
--- a/sc/source/ui/Accessibility/AccessibleContextBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleContextBase.cxx
@@ -35,13 +35,13 @@
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <com/sun/star/beans/PropertyChangeEvent.hpp>
-#include <rtl/uuid.h>
#include <tools/debug.hxx>
#include <tools/gen.hxx>
#include <unotools/accessiblestatesethelper.hxx>
#include <toolkit/helper/convert.hxx>
#include <svl/smplhint.hxx>
#include <comphelper/sequence.hxx>
+#include <comphelper/servicehelper.hxx>
#include <unotools/accessiblerelationsethelper.hxx>
#include <vcl/unohelp.hxx>
#include <tools/color.hxx>
@@ -523,19 +523,16 @@ uno::Sequence< uno::Type > SAL_CALL ScAccessibleContextBase::getTypes()
return comphelper::concatSequences(ScAccessibleContextBaseWeakImpl::getTypes(), ScAccessibleContextBaseImplEvent::getTypes());
}
+namespace
+{
+ class theScAccessibleContextBaseImplementationId : public rtl::Static< UnoTunnelIdInit, theScAccessibleContextBaseImplementationId > {};
+}
+
uno::Sequence<sal_Int8> SAL_CALL
ScAccessibleContextBase::getImplementationId(void)
throw (uno::RuntimeException)
{
- SolarMutexGuard aGuard;
- IsObjectValid();
- static uno::Sequence<sal_Int8> aId;
- if (aId.getLength() == 0)
- {
- aId.realloc (16);
- rtl_createUuid (reinterpret_cast<sal_uInt8 *>(aId.getArray()), 0, sal_True);
- }
- return aId;
+ return theScAccessibleContextBaseImplementationId::get().getSeq();
}
//===== internal ============================================================
diff --git a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
index 2006f78..a594ed2 100644
--- a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
@@ -39,11 +39,11 @@
#include <com/sun/star/accessibility/AccessibleTableModelChange.hpp>
#include <com/sun/star/accessibility/AccessibleTableModelChangeType.hpp>
#include <tools/debug.hxx>
-#include <rtl/uuid.h>
#include <toolkit/helper/convert.hxx>
#include <unotools/accessiblerelationsethelper.hxx>
#include <unotools/accessiblestatesethelper.hxx>
#include <comphelper/sequence.hxx>
+#include <comphelper/servicehelper.hxx>
#include "scitems.hxx"
#include <editeng/fontitem.hxx>
#include <editeng/fhgtitem.hxx>
@@ -212,17 +212,6 @@ Rectangle ScAccessibleCsvControl::GetBoundingBox() const throw( RuntimeException
return implGetControl().GetWindowExtentsRelative( implGetControl().GetAccessibleParentWindow() );
}
-void ScAccessibleCsvControl::getUuid( Sequence< sal_Int8 >& rSeq )
-{
- SolarMutexGuard aGuard;
- ensureAlive();
- if( !rSeq.hasElements() )
- {
- rSeq.realloc( 16 );
- rtl_createUuid( reinterpret_cast< sal_uInt8* >( rSeq.getArray() ), NULL, sal_True );
- }
-}
-
void ScAccessibleCsvControl::ensureAlive() const throw( DisposedException )
{
if( !implIsAlive() )
@@ -785,11 +774,14 @@ Sequence< ::com::sun::star::uno::Type > SAL_CALL ScAccessibleCsvRuler::getTypes(
return ::comphelper::concatSequences( ScAccessibleCsvControl::getTypes(), aSeq );
}
+namespace
+{
+ class theScAccessibleCsvRulerImplementationId : public rtl::Static< UnoTunnelIdInit, theScAccessibleCsvRulerImplementationId > {};
+}
+
Sequence< sal_Int8 > SAL_CALL ScAccessibleCsvRuler::getImplementationId() throw( RuntimeException )
{
- static Sequence< sal_Int8 > aSeq;
- getUuid( aSeq );
- return aSeq;
+ return theScAccessibleCsvRulerImplementationId::get().getSeq();
}
@@ -1293,11 +1285,14 @@ Sequence< ::com::sun::star::uno::Type > SAL_CALL ScAccessibleCsvGrid::getTypes()
return ::comphelper::concatSequences( ScAccessibleCsvControl::getTypes(), aSeq );
}
+namespace
+{
+ class theScAccessibleCsvGridImplementationId : public rtl::Static< UnoTunnelIdInit, theScAccessibleCsvGridImplementationId > {};
+}
+
Sequence< sal_Int8 > SAL_CALL ScAccessibleCsvGrid::getImplementationId() throw( RuntimeException )
{
- static Sequence< sal_Int8 > aSeq;
- getUuid( aSeq );
- return aSeq;
+ return theScAccessibleCsvGridImplementationId::get().getSeq();
}
diff --git a/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx b/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx
index 68448b9..59c946a 100644
--- a/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx
@@ -36,7 +36,7 @@
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
#include <unotools/accessiblestatesethelper.hxx>
-#include <rtl/uuid.h>
+#include <comphelper/servicehelper.hxx>
#include <tools/gen.hxx>
#include <toolkit/helper/convert.hxx>
#include <vcl/svapp.hxx>
@@ -464,18 +464,15 @@ uno::Reference<XAccessibleStateSet> SAL_CALL ScAccessibleDataPilotControl::getAc
///===== XTypeProvider ===================================================
+namespace
+{
+ class theScAccessibleDataPilotControlImplementationId : public rtl::Static< UnoTunnelIdInit, theScAccessibleDataPilotControlImplementationId > {};
+}
+
uno::Sequence<sal_Int8> SAL_CALL ScAccessibleDataPilotControl::getImplementationId(void)
throw (uno::RuntimeException)
{
- SolarMutexGuard aGuard;
- IsObjectValid();
- static uno::Sequence<sal_Int8> aId;
- if (aId.getLength() == 0)
- {
- aId.realloc (16);
- rtl_createUuid (reinterpret_cast<sal_uInt8 *>(aId.getArray()), 0, sal_True);
- }
- return aId;
+ return theScAccessibleDataPilotControlImplementationId::get().getSeq();
}
//===== internal ========================================================
@@ -678,18 +675,15 @@ uno::Reference<XAccessibleStateSet> SAL_CALL ScAccessibleDataPilotButton::getAcc
///===== XTypeProvider ===================================================
+namespace
+{
+ class theScAccessibleDataPilotButtonImplementationId : public rtl::Static< UnoTunnelIdInit, theScAccessibleDataPilotButtonImplementationId > {};
+}
+
uno::Sequence<sal_Int8> SAL_CALL ScAccessibleDataPilotButton::getImplementationId(void)
throw (::com::sun::star::uno::RuntimeException)
{
- SolarMutexGuard aGuard;
- IsObjectValid();
- static uno::Sequence<sal_Int8> aId;
- if (aId.getLength() == 0)
- {
- aId.realloc (16);
- rtl_createUuid (reinterpret_cast<sal_uInt8 *>(aId.getArray()), 0, sal_True);
- }
- return aId;
+ return theScAccessibleDataPilotButtonImplementationId::get().getSeq();
}
::rtl::OUString SAL_CALL ScAccessibleDataPilotButton::createAccessibleDescription(void)
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index 979e05b..8f9e166 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -60,6 +60,7 @@
#include <svx/AccessibleShapeTreeInfo.hxx>
#include <svx/AccessibleShapeInfo.hxx>
#include <comphelper/sequence.hxx>
+#include <comphelper/servicehelper.hxx>
#include <sfx2/viewfrm.hxx>
#include <svx/unoshcol.hxx>
#include <svx/unoshape.hxx>
@@ -1820,19 +1821,16 @@ uno::Sequence< uno::Type > SAL_CALL ScAccessibleDocument::getTypes()
return comphelper::concatSequences(ScAccessibleDocumentImpl::getTypes(), ScAccessibleContextBase::getTypes());
}
+namespace
+{
+ class theScAccessibleDocumentImplementationId : public rtl::Static< UnoTunnelIdInit, theScAccessibleDocumentImplementationId > {};
+}
+
uno::Sequence<sal_Int8> SAL_CALL
ScAccessibleDocument::getImplementationId(void)
throw (uno::RuntimeException)
{
- SolarMutexGuard aGuard;
- IsObjectValid();
- static uno::Sequence<sal_Int8> aId;
- if (aId.getLength() == 0)
- {
- aId.realloc (16);
- rtl_createUuid (reinterpret_cast<sal_uInt8 *>(aId.getArray()), 0, sal_True);
- }
- return aId;
+ return theScAccessibleDocumentImplementationId::get().getSeq();
}
///===== IAccessibleViewForwarder ========================================
diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
index ad3353d..51bd3f6 100644
--- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
@@ -62,6 +62,7 @@
#include <svx/unoshape.hxx>
#include <unotools/accessiblerelationsethelper.hxx>
#include <vcl/svapp.hxx>
+#include <comphelper/servicehelper.hxx>
#include <vector>
#include <list>
@@ -1620,19 +1621,16 @@ uno::Sequence< ::rtl::OUString> SAL_CALL ScAccessibleDocumentPagePreview::getSup
//===== XTypeProvider =======================================================
+namespace
+{
+ class theScAccessibleDocumentPagePreviewImplementationId : public rtl::Static< UnoTunnelIdInit, theScAccessibleDocumentPagePreviewImplementationId > {};
+}
+
uno::Sequence<sal_Int8> SAL_CALL
ScAccessibleDocumentPagePreview::getImplementationId(void)
throw (uno::RuntimeException)
{
- SolarMutexGuard aGuard;
- IsObjectValid();
- static uno::Sequence<sal_Int8> aId;
- if (aId.getLength() == 0)
- {
- aId.realloc (16);
- rtl_createUuid (reinterpret_cast<sal_uInt8 *>(aId.getArray()), 0, sal_True);
- }
- return aId;
+ return theScAccessibleDocumentPagePreviewImplementationId::get().getSeq();
}
//===== internal ========================================================
diff --git a/sc/source/ui/Accessibility/AccessibleEditObject.cxx b/sc/source/ui/Accessibility/AccessibleEditObject.cxx
index ad5ebbf..973dbcc 100644
--- a/sc/source/ui/Accessibility/AccessibleEditObject.cxx
+++ b/sc/source/ui/Accessibility/AccessibleEditObject.cxx
@@ -39,7 +39,7 @@
#include <unotools/accessiblestatesethelper.hxx>
#include <com/sun/star/accessibility/AccessibleRole.hpp>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
-#include <rtl/uuid.h>
+#include <comphelper/servicehelper.hxx>
#include <svx/AccessibleTextHelper.hxx>
#include <editeng/editview.hxx>
#include <editeng/editeng.hxx>
@@ -291,19 +291,16 @@ void SAL_CALL
//===== XTypeProvider =======================================================
+namespace
+{
+ class theScAccessibleEditObjectImplementationId : public rtl::Static< UnoTunnelIdInit, theScAccessibleEditObjectImplementationId > {};
+}
+
uno::Sequence<sal_Int8> SAL_CALL
ScAccessibleEditObject::getImplementationId(void)
throw (uno::RuntimeException)
{
- SolarMutexGuard aGuard;
- IsObjectValid();
- static uno::Sequence<sal_Int8> aId;
- if (aId.getLength() == 0)
- {
- aId.realloc (16);
- rtl_createUuid (reinterpret_cast<sal_uInt8 *>(aId.getArray()), 0, sal_True);
- }
- return aId;
+ return theScAccessibleEditObjectImplementationId::get().getSeq();
}
//==== internal =========================================================
diff --git a/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx b/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
index 9d919a2..d8512c7 100644
--- a/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
@@ -43,7 +43,7 @@
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
#include <editeng/editobj.hxx>
#include <svx/AccessibleTextHelper.hxx>
-#include <rtl/uuid.h>
+#include <comphelper/servicehelper.hxx>
#include <unotools/accessiblestatesethelper.hxx>
#include <rtl/ustrbuf.hxx>
#include <toolkit/helper/convert.hxx>
@@ -215,19 +215,16 @@ uno::Sequence< ::rtl::OUString> SAL_CALL
//===== XTypeProvider =======================================================
+namespace
+{
+ class theScAccessiblePageHeaderAreaImplementationId : public rtl::Static< UnoTunnelIdInit, theScAccessiblePageHeaderAreaImplementationId > {};
+}
+
uno::Sequence<sal_Int8> SAL_CALL
ScAccessiblePageHeaderArea::getImplementationId(void)
throw (uno::RuntimeException)
{
- SolarMutexGuard aGuard;
- IsObjectValid();
- static uno::Sequence<sal_Int8> aId;
- if (aId.getLength() == 0)
- {
- aId.realloc (16);
- rtl_createUuid (reinterpret_cast<sal_uInt8 *>(aId.getArray()), 0, sal_True);
- }
- return aId;
+ return theScAccessiblePageHeaderAreaImplementationId::get().getSeq();
}
//===== internal ==============================================================
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
index 0a0a88e..6a0d996 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
@@ -44,7 +44,7 @@
#include <vcl/window.hxx>
#include <vcl/svapp.hxx>
#include <toolkit/helper/convert.hxx>
-
+#include <comphelper/servicehelper.hxx>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
using namespace ::com::sun::star;
@@ -211,19 +211,16 @@ uno::Sequence<rtl::OUString> SAL_CALL ScAccessiblePreviewCell::getSupportedServi
//===== XTypeProvider =======================================================
+namespace
+{
+ class theScAccessiblePreviewCellImplementationId : public rtl::Static< UnoTunnelIdInit, theScAccessiblePreviewCellImplementationId > {};
+}
+
uno::Sequence<sal_Int8> SAL_CALL
ScAccessiblePreviewCell::getImplementationId(void)
throw (uno::RuntimeException)
{
- SolarMutexGuard aGuard;
- IsObjectValid();
- static uno::Sequence<sal_Int8> aId;
- if (aId.getLength() == 0)
- {
- aId.realloc (16);
- rtl_createUuid (reinterpret_cast<sal_uInt8 *>(aId.getArray()), 0, sal_True);
- }
- return aId;
+ return theScAccessiblePreviewCellImplementationId::get().getSeq();
}
//==== internal =========================================================
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
index 6f321d8..84ece91 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
@@ -50,6 +50,7 @@
#include <svl/smplhint.hxx>
#include <unotools/accessiblestatesethelper.hxx>
#include <comphelper/sequence.hxx>
+#include <comphelper/servicehelper.hxx>
#include <toolkit/helper/convert.hxx>
using namespace ::com::sun::star;
@@ -302,19 +303,16 @@ uno::Sequence< uno::Type > SAL_CALL ScAccessiblePreviewHeaderCell::getTypes()
return comphelper::concatSequences(ScAccessiblePreviewHeaderCellImpl::getTypes(), ScAccessibleContextBase::getTypes());
}
+namespace
+{
+ class theScAccessiblePreviewHeaderCellImplementationId : public rtl::Static< UnoTunnelIdInit, theScAccessiblePreviewHeaderCellImplementationId > {};
+}
+
uno::Sequence<sal_Int8> SAL_CALL
ScAccessiblePreviewHeaderCell::getImplementationId(void)
throw (uno::RuntimeException)
{
- SolarMutexGuard aGuard;
- IsObjectValid();
- static uno::Sequence<sal_Int8> aId;
- if (aId.getLength() == 0)
- {
- aId.realloc (16);
- rtl_createUuid (reinterpret_cast<sal_uInt8 *>(aId.getArray()), 0, sal_True);
- }
- return aId;
+ return theScAccessiblePreviewHeaderCellImplementationId::get().getSeq();
}
//==== internal =========================================================
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
index 24fd28b..45abfed 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
@@ -51,6 +51,7 @@
#include <svl/smplhint.hxx>
#include <unotools/accessiblestatesethelper.hxx>
#include <comphelper/sequence.hxx>
+#include <comphelper/servicehelper.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
@@ -602,16 +603,15 @@ uno::Sequence< uno::Type > SAL_CALL ScAccessiblePreviewTable::getTypes()
return comphelper::concatSequences(ScAccessiblePreviewTableImpl::getTypes(), ScAccessibleContextBase::getTypes());
}
+namespace
+{
+ class theScAccessiblePreviewTableImplementationId : public rtl::Static< UnoTunnelIdInit, theScAccessiblePreviewTableImplementationId > {};
+}
+
uno::Sequence<sal_Int8> SAL_CALL ScAccessiblePreviewTable::getImplementationId()
throw(uno::RuntimeException)
{
- static uno::Sequence< sal_Int8 > aId;
- if( aId.getLength() == 0 )
- {
- aId.realloc( 16 );
- rtl_createUuid (reinterpret_cast<sal_uInt8 *>(aId.getArray()), 0, sal_True);
- }
- return aId;
+ return theScAccessiblePreviewTableImplementationId::get().getSeq();
}
//==== internal =========================================================
diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
index 528ce56..94639be 100644
--- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
+++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
@@ -44,7 +44,7 @@
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
#include <com/sun/star/accessibility/AccessibleTableModelChangeType.hpp>
-#include <rtl/uuid.h>
+#include <comphelper/servicehelper.hxx>
#include <tools/gen.hxx>
#include <svtools/colorcfg.hxx>
#include <vcl/svapp.hxx>
@@ -827,19 +827,16 @@ uno::Sequence< ::rtl::OUString> SAL_CALL
//===== XTypeProvider =======================================================
+namespace
+{
+ class theScAccessibleSpreadsheetImplementationId : public rtl::Static< UnoTunnelIdInit, theScAccessibleSpreadsheetImplementationId > {};
+}
+
uno::Sequence<sal_Int8> SAL_CALL
ScAccessibleSpreadsheet::getImplementationId(void)
throw (uno::RuntimeException)
{
- SolarMutexGuard aGuard;
- IsObjectValid();
- static uno::Sequence<sal_Int8> aId;
- if (aId.getLength() == 0)
- {
- aId.realloc (16);
- rtl_createUuid (reinterpret_cast<sal_uInt8 *>(aId.getArray()), 0, sal_True);
- }
- return aId;
+ return theScAccessibleSpreadsheetImplementationId::get().getSeq();
}
///===== XAccessibleEventBroadcaster =====================================
diff --git a/sc/source/ui/Accessibility/AccessibleTableBase.cxx b/sc/source/ui/Accessibility/AccessibleTableBase.cxx
index d701996..1138a5e 100644
--- a/sc/source/ui/Accessibility/AccessibleTableBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleTableBase.cxx
@@ -39,8 +39,8 @@
#include <com/sun/star/accessibility/AccessibleRole.hpp>
#include <com/sun/star/accessibility/AccessibleTableModelChange.hpp>
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
-#include <rtl/uuid.h>
#include <comphelper/sequence.hxx>
+#include <comphelper/servicehelper.hxx>
#include <vcl/svapp.hxx>
@@ -453,19 +453,16 @@ uno::Sequence< uno::Type > SAL_CALL ScAccessibleTableBase::getTypes()
return comphelper::concatSequences(ScAccessibleTableBaseImpl::getTypes(), ScAccessibleContextBase::getTypes());
}
+namespace
+{
+ class theScAccessibleTableBaseImplementationId : public rtl::Static< UnoTunnelIdInit, theScAccessibleTableBaseImplementationId > {};
+}
+
uno::Sequence<sal_Int8> SAL_CALL
ScAccessibleTableBase::getImplementationId(void)
throw (uno::RuntimeException)
{
- SolarMutexGuard aGuard;
- IsObjectValid();
- static uno::Sequence<sal_Int8> aId;
- if (aId.getLength() == 0)
- {
- aId.realloc (16);
- rtl_createUuid (reinterpret_cast<sal_uInt8 *>(aId.getArray()), 0, sal_True);
- }
- return aId;
+ return theScAccessibleTableBaseImplementationId::get().getSeq();
}
void ScAccessibleTableBase::CommitTableModelChange(sal_Int32 nStartRow, sal_Int32 nStartCol, sal_Int32 nEndRow, sal_Int32 nEndCol, sal_uInt16 nId)
diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx
index 2447802..3169fb0 100644
--- a/sc/source/ui/app/drwtrans.cxx
+++ b/sc/source/ui/app/drwtrans.cxx
@@ -46,6 +46,7 @@
#include <unotools/tempfile.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <comphelper/storagehelper.hxx>
+#include <comphelper/servicehelper.hxx>
#include <svtools/embedtransfer.hxx>
#include <sot/storage.hxx>
@@ -783,17 +784,14 @@ void ScDrawTransferObj::InitDocShell()
}
}
+namespace
+{
+ class theScDrawTransferObjUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theScDrawTransferObjUnoTunnelId > {};
+}
+
const com::sun::star::uno::Sequence< sal_Int8 >& ScDrawTransferObj::getUnoTunnelId()
{
- static com::sun::star::uno::Sequence< sal_Int8 > aSeq;
- if( !aSeq.getLength() )
- {
- static osl::Mutex aCreateMutex;
- osl::Guard< osl::Mutex > aGuard( aCreateMutex );
- aSeq.realloc( 16 );
- rtl_createUuid( reinterpret_cast< sal_uInt8* >( aSeq.getArray() ), 0, sal_True );
- }
- return aSeq;
+ return theScDrawTransferObjUnoTunnelId::get().getSeq();
}
sal_Int64 SAL_CALL ScDrawTransferObj::getSomething( const com::sun::star::uno::Sequence< sal_Int8 >& rId ) throw( com::sun::star::uno::RuntimeException )
diff --git a/sc/source/ui/inc/AccessibleCsvControl.hxx b/sc/source/ui/inc/AccessibleCsvControl.hxx
index d5a08f9..e5aeb97 100644
--- a/sc/source/ui/inc/AccessibleCsvControl.hxx
+++ b/sc/source/ui/inc/AccessibleCsvControl.hxx
@@ -113,9 +113,6 @@ protected:
/** Returns this object's current bounding box relative to the parent object. */
virtual Rectangle GetBoundingBox() const throw( ::com::sun::star::uno::RuntimeException );
- /** Creates a new UUID in rSeq, if it is empty. Locks mutex internally. */
- void getUuid( ::com::sun::star::uno::Sequence< sal_Int8 >& rSeq );
-
/** Returns whether the object is alive. Must be called with locked mutex. */
inline bool implIsAlive() const { return !rBHelper.bDisposed && !rBHelper.bInDispose && mpControl; }
/** Throws an exception, if the object is disposed/disposing or any pointer
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index cb40ffa..2027960 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -50,7 +50,7 @@
#include <sfx2/bindings.hxx>
#include <svl/zforlist.hxx>
#include <svl/zformat.hxx>
-#include <rtl/uuid.h>
+#include <comphelper/servicehelper.hxx>
#include <float.h> // DBL_MIN
#include <com/sun/star/awt/XBitmap.hpp>
@@ -1722,16 +1722,15 @@ uno::Sequence<uno::Type> SAL_CALL ScCellRangesBase::getTypes() throw(uno::Runtim
return aTypes;
}
+namespace
+{
+ class theScCellRangesBaseImplementationId : public rtl::Static< UnoTunnelIdInit, theScCellRangesBaseImplementationId > {};
+}
+
uno::Sequence<sal_Int8> SAL_CALL ScCellRangesBase::getImplementationId()
throw(uno::RuntimeException)
{
- static uno::Sequence< sal_Int8 > aId;
- if( aId.getLength() == 0 )
- {
- aId.realloc( 16 );
- rtl_createUuid( (sal_uInt8 *)aId.getArray(), 0, sal_True );
- }
- return aId;
+ return theScCellRangesBaseImplementationId::get().getSeq();
}
// ---
@@ -4169,16 +4168,15 @@ uno::Sequence<uno::Type> SAL_CALL ScCellRangesObj::getTypes() throw(uno::Runtime
return aTypes;
}
+namespace
+{
+ class theScCellRangesObjImplementationId : public rtl::Static< UnoTunnelIdInit, theScCellRangesObjImplementationId > {};
+}
+
uno::Sequence<sal_Int8> SAL_CALL ScCellRangesObj::getImplementationId()
throw(uno::RuntimeException)
{
- static uno::Sequence< sal_Int8 > aId;
- if( aId.getLength() == 0 )
- {
- aId.realloc( 16 );
- rtl_createUuid( (sal_uInt8 *)aId.getArray(), 0, sal_True );
- }
- return aId;
+ return theScCellRangesObjImplementationId::get().getSeq();
}
// XCellRanges
@@ -4833,16 +4831,15 @@ uno::Sequence<uno::Type> SAL_CALL ScCellRangeObj::getTypes() throw(uno::RuntimeE
return aTypes;
}
+namespace
+{
+ class theScCellRangeObjImplementationId : public rtl::Static< UnoTunnelIdInit, theScCellRangeObjImplementationId > {};
+}
+
uno::Sequence<sal_Int8> SAL_CALL ScCellRangeObj::getImplementationId()
throw(uno::RuntimeException)
{
- static uno::Sequence< sal_Int8 > aId;
- if( aId.getLength() == 0 )
- {
- aId.realloc( 16 );
- rtl_createUuid( (sal_uInt8 *)aId.getArray(), 0, sal_True );
- }
- return aId;
+ return theScCellRangeObjImplementationId::get().getSeq();
}
// XCellRange
@@ -6141,15 +6138,14 @@ uno::Sequence<uno::Type> SAL_CALL ScCellObj::getTypes() throw(uno::RuntimeExcept
return aTypes;
}
+namespace
+{
+ class theScCellObjImplementationId : public rtl::Static< UnoTunnelIdInit, theScCellObjImplementationId > {};
+}
+
uno::Sequence<sal_Int8> SAL_CALL ScCellObj::getImplementationId() throw(uno::RuntimeException)
{
- static uno::Sequence< sal_Int8 > aId;
- if( aId.getLength() == 0 )
- {
- aId.realloc( 16 );
- rtl_createUuid( (sal_uInt8 *)aId.getArray(), 0, sal_True );
- }
- return aId;
+ return theScCellObjImplementationId::get().getSeq();
}
// Hilfsfunktionen
@@ -6934,15 +6930,14 @@ uno::Sequence<uno::Type> SAL_CALL ScTableSheetObj::getTypes() throw(uno::Runtime
return aTypes;
}
+namespace
+{
+ class theScTableSheetObjImplementationId : public rtl::Static< UnoTunnelIdInit, theScTableSheetObjImplementationId > {};
+}
+
uno::Sequence<sal_Int8> SAL_CALL ScTableSheetObj::getImplementationId() throw(uno::RuntimeException)
{
- static uno::Sequence< sal_Int8 > aId;
- if( aId.getLength() == 0 )
- {
- aId.realloc( 16 );
- rtl_createUuid( (sal_uInt8 *)aId.getArray(), 0, sal_True );
- }
- return aId;
+ return theScTableSheetObjImplementationId::get().getSeq();
}
// Hilfsfunktionen
@@ -8756,15 +8751,14 @@ uno::Sequence<uno::Type> SAL_CALL ScTableColumnObj::getTypes() throw(uno::Runtim
return aTypes;
}
+namespace
+{
+ class theScTableColumnObjImplementationId : public rtl::Static< UnoTunnelIdInit, theScTableColumnObjImplementationId > {};
+}
+
uno::Sequence<sal_Int8> SAL_CALL ScTableColumnObj::getImplementationId() throw(uno::RuntimeException)
{
- static uno::Sequence< sal_Int8 > aId;
- if( aId.getLength() == 0 )
- {
- aId.realloc( 16 );
- rtl_createUuid( (sal_uInt8 *)aId.getArray(), 0, sal_True );
- }
- return aId;
+ return theScTableColumnObjImplementationId::get().getSeq();
}
// XNamed
diff --git a/sc/source/ui/unoobj/cursuno.cxx b/sc/source/ui/unoobj/cursuno.cxx
index 2995606..84fe951 100644
--- a/sc/source/ui/unoobj/cursuno.cxx
+++ b/sc/source/ui/unoobj/cursuno.cxx
@@ -35,7 +35,7 @@
#include <svl/intitem.hxx>
#include <svl/zforlist.hxx>
#include <vcl/svapp.hxx>
-#include <rtl/uuid.h>
+#include <comphelper/servicehelper.hxx>
#include "cursuno.hxx"
#include "cellsuno.hxx"
@@ -103,15 +103,14 @@ uno::Sequence<uno::Type> SAL_CALL ScCellCursorObj::getTypes() throw(uno::Runtime
return aTypes;
}
+namespace
+{
+ class theScCellCursorObjImplementationId : public rtl::Static< UnoTunnelIdInit, theScCellCursorObjImplementationId > {};
+}
+
uno::Sequence<sal_Int8> SAL_CALL ScCellCursorObj::getImplementationId() throw(uno::RuntimeException)
{
- static uno::Sequence< sal_Int8 > aId;
- if( aId.getLength() == 0 )
- {
- aId.realloc( 16 );
- rtl_createUuid( (sal_uInt8 *)aId.getArray(), 0, sal_True );
- }
- return aId;
+ return theScCellCursorObjImplementationId::get().getSeq();
}
// XSheetCellCursor
diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx
index 1f51ac5..a8c6b03 100644
--- a/sc/source/ui/unoobj/dapiuno.cxx
+++ b/sc/source/ui/unoobj/dapiuno.cxx
@@ -32,7 +32,6 @@
#include <algorithm>
#include <svl/smplhint.hxx>
#include <vcl/svapp.hxx>
-#include <rtl/uuid.h>
#include "dapiuno.hxx"
#include "datauno.hxx"
@@ -671,16 +670,15 @@ Sequence< uno::Type > SAL_CALL ScDataPilotDescriptorBase::getTypes()
return aTypes;
}
+namespace
+{
+ class theScDataPilotDescriptorBaseImplementationId : public rtl::Static< UnoTunnelIdInit, theScDataPilotDescriptorBaseImplementationId > {};
+}
+
Sequence<sal_Int8> SAL_CALL ScDataPilotDescriptorBase::getImplementationId()
throw(RuntimeException)
{
- static Sequence< sal_Int8 > aId;
- if( aId.getLength() == 0 )
- {
- aId.realloc( 16 );
- rtl_createUuid( (sal_uInt8 *)aId.getArray(), 0, sal_True );
- }
- return aId;
+ return theScDataPilotDescriptorBaseImplementationId::get().getSeq();
}
void ScDataPilotDescriptorBase::Notify( SfxBroadcaster&, const SfxHint& rHint )
@@ -1169,16 +1167,15 @@ Sequence< uno::Type > SAL_CALL ScDataPilotTableObj::getTypes() throw(RuntimeExce
return aTypes;
}
+namespace
+{
+ class theScDataPilotTableObjImplementationId : public rtl::Static< UnoTunnelIdInit, theScDataPilotTableObjImplementationId > {};
+}
+
Sequence<sal_Int8> SAL_CALL ScDataPilotTableObj::getImplementationId()
throw(RuntimeException)
{
- static Sequence< sal_Int8 > aId;
- if( aId.getLength() == 0 )
- {
- aId.realloc( 16 );
- rtl_createUuid( (sal_uInt8 *)aId.getArray(), 0, sal_True );
- }
- return aId;
+ return theScDataPilotTableObjImplementationId::get().getSeq();
}
// ---
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 39f6404..0c15e65 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -66,6 +66,7 @@
#include <com/sun/star/script/vba/XVBAEventProcessor.hpp>
#include <com/sun/star/reflection/XIdlClassProvider.hpp>
#include <comphelper/processfactory.hxx>
+#include <comphelper/servicehelper.hxx>
#include "docuno.hxx"
#include "cellsuno.hxx"
@@ -544,16 +545,15 @@ uno::Sequence<uno::Type> SAL_CALL ScModelObj::getTypes() throw(uno::RuntimeExcep
return aTypes;
}
+namespace
+{
+ class theScModelObjImplementationId : public rtl::Static< UnoTunnelIdInit, theScModelObjImplementationId > {};
+}
+
uno::Sequence<sal_Int8> SAL_CALL ScModelObj::getImplementationId()
throw(uno::RuntimeException)
{
- static uno::Sequence< sal_Int8 > aId;
- if( aId.getLength() == 0 )
- {
- aId.realloc( 16 );
- rtl_createUuid( (sal_uInt8 *)aId.getArray(), 0, sal_True );
- }
- return aId;
+ return theScModelObjImplementationId::get().getSeq();
}
void ScModelObj::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx
index 78e5392..45f6614 100644
--- a/sc/source/ui/unoobj/fielduno.cxx
+++ b/sc/source/ui/unoobj/fielduno.cxx
@@ -37,7 +37,7 @@
#include <editeng/editeng.hxx>
#include <editeng/editobj.hxx>
#include <editeng/flditem.hxx>
-#include <rtl/uuid.h>
+#include <comphelper/servicehelper.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/text/TextContentAnchorType.hpp>
@@ -482,16 +482,15 @@ uno::Sequence<uno::Type> SAL_CALL ScCellFieldObj::getTypes() throw(uno::RuntimeE
return aTypes;
}
+namespace
+{
+ class theScCellFieldObjImplementationId : public rtl::Static< UnoTunnelIdInit, theScCellFieldObjImplementationId > {};
+}
+
uno::Sequence<sal_Int8> SAL_CALL ScCellFieldObj::getImplementationId()
throw(uno::RuntimeException)
{
- static uno::Sequence< sal_Int8 > aId;
- if( aId.getLength() == 0 )
- {
- aId.realloc( 16 );
- rtl_createUuid( (sal_uInt8 *)aId.getArray(), 0, sal_True );
- }
- return aId;
+ return theScCellFieldObjImplementationId::get().getSeq();
}
uno::Any SAL_CALL ScCellFieldObj::queryInterface( const uno::Type& rType )
@@ -1141,16 +1140,15 @@ uno::Sequence<uno::Type> SAL_CALL ScHeaderFieldObj::getTypes() throw(uno::Runtim
return aTypes;
}
+namespace
+{
+ class theScHeaderFieldObjImplementationId : public rtl::Static< UnoTunnelIdInit, theScHeaderFieldObjImplementationId > {};
+}
+
uno::Sequence<sal_Int8> SAL_CALL ScHeaderFieldObj::getImplementationId()
throw(uno::RuntimeException)
{
- static uno::Sequence< sal_Int8 > aId;
- if( aId.getLength() == 0 )
- {
- aId.realloc( 16 );
- rtl_createUuid( (sal_uInt8 *)aId.getArray(), 0, sal_True );
- }
- return aId;
+ return theScHeaderFieldObjImplementationId::get().getSeq();
}
uno::Any SAL_CALL ScHeaderFieldObj::queryInterface( const uno::Type& rType )
diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx
index d87eedb..57e39c0 100644
--- a/sc/source/ui/unoobj/viewuno.cxx
+++ b/sc/source/ui/unoobj/viewuno.cxx
@@ -50,7 +50,7 @@
#include <sfx2/printer.hxx>
#include <sfx2/request.hxx>
#include <sfx2/viewfrm.hxx>
-#include <rtl/uuid.h>
+#include <comphelper/servicehelper.hxx>
#include <toolkit/helper/convert.hxx>
#include <vcl/svapp.hxx>
@@ -187,16 +187,15 @@ uno::Sequence<uno::Type> SAL_CALL ScViewPaneBase::getTypes() throw(uno::RuntimeE
return aTypes;
}
+namespace
+{
+ class theScViewPaneBaseImplementationId : public rtl::Static< UnoTunnelIdInit, theScViewPaneBaseImplementationId > {};
+}
+
uno::Sequence<sal_Int8> SAL_CALL ScViewPaneBase::getImplementationId()
throw(uno::RuntimeException)
{
- static uno::Sequence< sal_Int8 > aId;
- if( aId.getLength() == 0 )
- {
- aId.realloc( 16 );
- rtl_createUuid( (sal_uInt8 *)aId.getArray(), 0, sal_True );
- }
- return aId;
+ return theScViewPaneBaseImplementationId::get().getSeq();
}
// XViewPane
@@ -746,16 +745,15 @@ uno::Sequence<uno::Type> SAL_CALL ScTabViewObj::getTypes() throw(uno::RuntimeExc
return aTypes;
}
+namespace
+{
+ class theScTabViewObjImplementationId : public rtl::Static< UnoTunnelIdInit, theScTabViewObjImplementationId > {};
+}
+
uno::Sequence<sal_Int8> SAL_CALL ScTabViewObj::getImplementationId()
throw(uno::RuntimeException)
{
- static uno::Sequence< sal_Int8 > aId;
- if( aId.getLength() == 0 )
- {
- aId.realloc( 16 );
- rtl_createUuid( (sal_uInt8 *)aId.getArray(), 0, sal_True );
- }
- return aId;
+ return theScTabViewObjImplementationId::get().getSeq();
}
// XDocumentView
diff --git a/sc/source/ui/vba/vbaworkbook.cxx b/sc/source/ui/vba/vbaworkbook.cxx
index 963c70e..9e0a474 100644
--- a/sc/source/ui/vba/vbaworkbook.cxx
+++ b/sc/source/ui/vba/vbaworkbook.cxx
@@ -28,6 +28,7 @@
#include <vbahelper/helperdecl.hxx>
#include <tools/urlobj.hxx>
#include <comphelper/unwrapargs.hxx>
+#include <comphelper/servicehelper.hxx>
#include <com/sun/star/util/XModifiable.hpp>
#include <com/sun/star/util/XProtectable.hpp>
@@ -233,21 +234,15 @@ ScVbaWorkbook::ScVbaWorkbook( uno::Sequence< uno::Any> const & args,
init();
}
+namespace
+{
+ class theScVbaWorkbookUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theScVbaWorkbookUnoTunnelId > {};
+}
+
const uno::Sequence<sal_Int8>&
ScVbaWorkbook::getUnoTunnelId()
{
- static uno::Sequence< sal_Int8 > aSeq;
-
- if( !aSeq.getLength() )
- {
- static osl::Mutex aCreateMutex;
- osl::Guard< osl::Mutex > aGuard( aCreateMutex );
-
- aSeq.realloc( 16 );
- rtl_createUuid( reinterpret_cast< sal_uInt8* >( aSeq.getArray() ), 0, sal_True );
- }
-
- return aSeq;
+ return theScVbaWorkbookUnoTunnelId::get().getSeq();
}
uno::Reference< excel::XWorksheet >
diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx
index 60029f7..35a1b7a 100644
--- a/sc/source/ui/vba/vbaworksheet.cxx
+++ b/sc/source/ui/vba/vbaworksheet.cxx
@@ -70,6 +70,7 @@
#include <ooo/vba/excel/XlSheetVisibility.hpp>
#include <comphelper/processfactory.hxx>
+#include <comphelper/servicehelper.hxx>
#include <vbahelper/vbashapes.hxx>
#include <com/sun/star/script/vba/VBAEventId.hpp>
@@ -222,20 +223,14 @@ ScVbaWorksheet::~ScVbaWorksheet()
{
}
-const uno::Sequence<sal_Int8>& ScVbaWorksheet::getUnoTunnelId()
+namespace
{
- static uno::Sequence< sal_Int8 > aSeq;
-
- if( !aSeq.getLength() )
- {
- static osl::Mutex aCreateMutex;
- osl::Guard< osl::Mutex > aGuard( aCreateMutex );
-
- aSeq.realloc( 16 );
- rtl_createUuid( reinterpret_cast< sal_uInt8* >( aSeq.getArray() ), 0, sal_True );
- }
+ class theScVbaWorksheetUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theScVbaWorksheetUnoTunnelId > {};
+}
- return aSeq;
+const uno::Sequence<sal_Int8>& ScVbaWorksheet::getUnoTunnelId()
+{
+ return theScVbaWorksheetUnoTunnelId::get().getSeq();
}
uno::Reference< ov::excel::XWorksheet >
commit bf72f920855a14129bbe128b87e3a1a307780986
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jun 2 22:57:38 2011 +0100
fix typo in comment
diff --git a/sc/source/ui/unoobj/shapeuno.cxx b/sc/source/ui/unoobj/shapeuno.cxx
index 55a2690..ad0fdbe 100644
--- a/sc/source/ui/unoobj/shapeuno.cxx
+++ b/sc/source/ui/unoobj/shapeuno.cxx
@@ -1328,7 +1328,7 @@ uno::Sequence<sal_Int8> SAL_CALL ScShapeObj::getImplementationId()
if( aIter == aImplementationIdMap.end() )
{
// we need to create a new implementation id for this
- // note: this memory is not free'd until application exists
+ // note: this memory is not free'd until application exits
// but since we have a fixed set of shapetypes and the
// memory will be reused this is ok.
pImplementationId = new uno::Sequence< sal_Int8 >( 16 );
More information about the Libreoffice-commits
mailing list