mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-20 03:08:28 +08:00
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@52920 954022d7-b5bf-4e40-9824-e11837661b57
39 lines
1.3 KiB
C++
39 lines
1.3 KiB
C++
#pragma once
|
|
|
|
#include "WordDocument.h"
|
|
#include "StyleSheet.h"
|
|
#include "AbstractOpenXmlMapping.h"
|
|
#include "ParagraphPropertiesMapping.h"
|
|
#include "CharacterPropertiesMapping.h"
|
|
#include "TablePropertiesMapping.h"
|
|
#include "ContentTypes.h"
|
|
#include "ConversionContext.h"
|
|
#include "IMapping.h"
|
|
|
|
namespace DocFileFormat
|
|
{
|
|
class StyleSheetMapping: public AbstractOpenXmlMapping, public IMapping
|
|
{
|
|
private:
|
|
ConversionContext* _ctx;
|
|
WordDocument* m_document;
|
|
|
|
public:
|
|
StyleSheetMapping( ConversionContext* ctx );
|
|
void Apply( IVisitable* visited );
|
|
/// Generates a style id for custom style names or returns the build-in identifier for build-in styles.
|
|
static wstring MakeStyleId( StyleSheetDescription* std );
|
|
static map<std::wstring, std::wstring> m_mapStyleId;
|
|
static ASCOfficeCriticalSection m_mapStyleIdLock;
|
|
virtual ~StyleSheetMapping();
|
|
|
|
private:
|
|
void writeRunDefaults( StyleSheet* sheet );
|
|
void writeParagraphDefaults( StyleSheet* sheet );
|
|
/// Chooses the correct style name.
|
|
/// Word 2007 needs the identifier instead of the stylename for translating it into the UI language.
|
|
wstring getStyleName( StyleSheetDescription* std );
|
|
/// Writes the "NormalTable" default style
|
|
void writeNormalTableStyle();
|
|
};
|
|
} |