Files
core/ASCOfficePPTFile/trunk/Records/TextFullSettings.h
Oleg.Korshul 077623f9fa (1.0.0.66) ASC version full
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@52662 954022d7-b5bf-4e40-9824-e11837661b57
2016-05-20 22:31:18 +03:00

70 lines
1.7 KiB
C++

#pragma once
#include "TextHeaderAtom.h"
#include "TextCharsAtom.h"
#include "TextBytesAtom.h"
#include "StyleTextPropAtom.h"
#include "TextSpecInfoAtom.h"
#include "TextRulerAtom.h"
#include "TextInteractiveInfoAtom.h"
#include "../../../ASCPresentationEditor/OfficeDrawing/Interactive.h"
class CTextFullSettings
{
public:
CRecordStyleTextPropAtom* m_pTextStyleProp;
CRecordTextSpecInfoAtom* m_pTextSpecInfo;
CRecordTextRulerAtom* m_pTextRuler;
CAtlArray<NSPresentationEditor::CTextRange> m_arRanges;
CStringW m_strText;
DWORD m_nTextType;
public:
CTextFullSettings() : m_arRanges()
{
m_pTextStyleProp = NULL;
m_pTextSpecInfo = NULL;
m_pTextRuler = NULL;
m_nTextType = 0xFFFFFFFF;
m_strText.Empty();
}
CTextFullSettings(const CTextFullSettings& oSrc)
{
*this = oSrc;
}
CTextFullSettings& operator =(const CTextFullSettings& oSrc)
{
m_pTextStyleProp = oSrc.m_pTextStyleProp;
m_pTextSpecInfo = oSrc.m_pTextSpecInfo;
m_pTextRuler = oSrc.m_pTextRuler;
m_nTextType = oSrc.m_nTextType;
m_strText = oSrc.m_strText;
m_arRanges.Copy(oSrc.m_arRanges);
return (*this);
}
~CTextFullSettings()
{
m_pTextStyleProp = NULL;
m_pTextSpecInfo = NULL;
m_pTextRuler = NULL;
}
CString CTextFullSettings::ApplyProperties(CTextAttributesEx* pTextAttributes)
{
if (NULL == pTextAttributes)
return m_strText;
pTextAttributes->m_lTextType = m_nTextType;
if (NULL != m_pTextStyleProp)
NSPresentationEditor::ConvertPPTTextToEditorStructure(m_pTextStyleProp->m_arrPFs, m_pTextStyleProp->m_arrCFs, m_strText, *pTextAttributes);
if (NULL != m_pTextRuler)
pTextAttributes->m_oRuler = m_pTextRuler->m_oTextRuler;
return m_strText;
}
};