Kaydet (Commit) 94934248 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Make this thread safe too.

Change-Id: Ic8508f693f8a6e9bae513d6b5b6eaaaae618194b
üst fd50b465
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include "editeng/editobj.hxx" #include "editeng/editobj.hxx"
#include "calcmacros.hxx" #include "calcmacros.hxx"
#include "postit.hxx" #include "postit.hxx"
#include "osl/mutex.hxx"
#if DEBUG_COLUMN_STORAGE #if DEBUG_COLUMN_STORAGE
#ifdef NDEBUG #ifdef NDEBUG
...@@ -138,6 +139,7 @@ class ColumnBlockPositionSet ...@@ -138,6 +139,7 @@ class ColumnBlockPositionSet
ScDocument& mrDoc; ScDocument& mrDoc;
TablesType maTables; TablesType maTables;
osl::Mutex maMtxTables;
public: public:
ColumnBlockPositionSet(ScDocument& rDoc); ColumnBlockPositionSet(ScDocument& rDoc);
......
...@@ -30,6 +30,8 @@ ColumnBlockPositionSet::ColumnBlockPositionSet(ScDocument& rDoc) : mrDoc(rDoc) { ...@@ -30,6 +30,8 @@ ColumnBlockPositionSet::ColumnBlockPositionSet(ScDocument& rDoc) : mrDoc(rDoc) {
ColumnBlockPosition* ColumnBlockPositionSet::getBlockPosition(SCTAB nTab, SCCOL nCol) ColumnBlockPosition* ColumnBlockPositionSet::getBlockPosition(SCTAB nTab, SCCOL nCol)
{ {
osl::MutexGuard aGuard(&maMtxTables);
TablesType::iterator itTab = maTables.find(nTab); TablesType::iterator itTab = maTables.find(nTab);
if (itTab == maTables.end()) if (itTab == maTables.end())
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment