This commit is contained in:
ElenaSubbotina
2017-01-24 11:10:53 +03:00
parent a044b262e4
commit 46ddcff040
6 changed files with 9 additions and 9 deletions

View File

@ -35,7 +35,7 @@
namespace DocFileFormat
{
std::map<unsigned char, std::wstring> PropertiesMapping::brcTypeMap;
ASCOfficeCriticalSection PropertiesMapping::brcTypeMapLock;
OfficeCriticalSection PropertiesMapping::brcTypeMapLock;
void PropertiesMapping::init()
{

View File

@ -76,6 +76,6 @@ namespace DocFileFormat
XMLTools::CStringXmlWriter* m_pXmlWriter;
static std::map<unsigned char, std::wstring> brcTypeMap;
static ASCOfficeCriticalSection brcTypeMapLock;
static OfficeCriticalSection brcTypeMapLock;
};
}

View File

@ -36,7 +36,7 @@
namespace DocFileFormat
{
std::map<std::wstring, std::wstring> StyleSheetMapping::m_mapStyleId;
ASCOfficeCriticalSection StyleSheetMapping::m_mapStyleIdLock;
OfficeCriticalSection StyleSheetMapping::m_mapStyleIdLock;
StyleSheetMapping::StyleSheetMapping( ConversionContext* ctx ) : AbstractOpenXmlMapping( new XMLTools::CStringXmlWriter() )
{

View File

@ -55,7 +55,7 @@ namespace DocFileFormat
/// Generates a style id for custom style names or returns the build-in identifier for build-in styles.
static std::wstring MakeStyleId( StyleSheetDescription* std );
static std::map<std::wstring, std::wstring> m_mapStyleId;
static ASCOfficeCriticalSection m_mapStyleIdLock;
static OfficeCriticalSection m_mapStyleIdLock;
virtual ~StyleSheetMapping();
private:

View File

@ -31,18 +31,18 @@
*/
#pragma once
#include "../../DesktopEditor/graphics/TemporaryCS.h"
class AVSOfficeCriticalSection
class OfficeCriticalSection
{
private:
NSCriticalSection::CRITICAL_SECTION CriticalSection;
public:
AVSOfficeCriticalSection()
OfficeCriticalSection()
{
CriticalSection.InitializeCriticalSection();
}
~AVSOfficeCriticalSection()
~OfficeCriticalSection()
{
CriticalSection.DeleteCriticalSection();
}

View File

@ -37,7 +37,7 @@
class CSLocker
{
public:
CSLocker(AVSOfficeCriticalSection &critical_section) : cs(critical_section)
CSLocker(OfficeCriticalSection &critical_section) : cs(critical_section)
{
cs.Enter();
}
@ -48,5 +48,5 @@ public:
}
private:
AVSOfficeCriticalSection &cs;
OfficeCriticalSection &cs;
};