Commit 6e06584d authored by ElenaSubbotina's avatar ElenaSubbotina Committed by Alexander Trofimov

PptFormat - Тікбұрышты үшбұрыштарды.ppt - угол заливки градиента,...

PptFormat - Тікбұрышты үшбұрыштарды.ppt - угол заливки градиента, NotchedCircularArrow (кривой), подстройчные и надстрочные буквы, ...
parent d2abe171
#include "ShapeWriter.h" #include "ShapeWriter.h"
#include "StylesWriter.h" #include "StylesWriter.h"
#include "../../../ASCOfficeXlsFile2/source/XlsXlsxConverter/ShapeType.h" #include "../../../ASCOfficeXlsFile2/source/XlsXlsxConverter/ShapeType.h"
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
void CStylesWriter::ConvertStyleLevel(NSPresentationEditor::CTextStyleLevel& oLevel, NSPresentationEditor::CMetricInfo& oMetricInfo, void CStylesWriter::ConvertStyleLevel(NSPresentationEditor::CTextStyleLevel& oLevel, NSPresentationEditor::CMetricInfo& oMetricInfo,
NSPresentationEditor::CStringWriter& oWriter, const int& nLevel) NSPresentationEditor::CStringWriter& oWriter, const int& nLevel)
{// CTextPFRun CTextCFRun ShapeWriter - todooo - {//дублирование CTextPFRun и CTextCFRun с ShapeWriter - todooo - вынести отдельно
CString str1; CString str1;
if (nLevel == 9) if (nLevel == 9)
str1 = _T("<a:defPPr"); str1 = _T("<a:defPPr");
...@@ -306,16 +306,23 @@ CString NSPresentationEditor::CShapeWriter::ConvertBrush(CBrush & brush) ...@@ -306,16 +306,23 @@ CString NSPresentationEditor::CShapeWriter::ConvertBrush(CBrush & brush)
if (brush.Type == c_BrushTypeTexture) if (brush.Type == c_BrushTypeTexture)
{ {
CString strRid = m_pRels->WriteImage(brush.TexturePath); if (m_pImageElement)//фон для картинки с празрачностью
{
brush_writer.WriteString(std::wstring(L"<a:blipFill dpi=\"0\" rotWithShape=\"1\"><a:blip r:embed=\"") + string2std_string(strRid) + _T("\"/><a:srcRect/>")); brush_writer.WriteString(std::wstring(L"<a:noFill/>"));
}
if ( brush.TextureMode == c_BrushTextureModeTile)
brush_writer.WriteString(std::wstring(L"<a:tile/>"));
else else
brush_writer.WriteString(std::wstring(L"<a:stretch><a:fillRect/></a:stretch>")); {
CString strRid = m_pRels->WriteImage(brush.TexturePath);
brush_writer.WriteString(std::wstring(L"</a:blipFill>")); brush_writer.WriteString(std::wstring(L"<a:blipFill dpi=\"0\" rotWithShape=\"1\"><a:blip r:embed=\"") + string2std_string(strRid) + _T("\"/><a:srcRect/>"));
if ( brush.TextureMode == c_BrushTextureModeTile)
brush_writer.WriteString(std::wstring(L"<a:tile/>"));
else
brush_writer.WriteString(std::wstring(L"<a:stretch><a:fillRect/></a:stretch>"));
brush_writer.WriteString(std::wstring(L"</a:blipFill>"));
}
} }
else if ( brush.Type == c_BrushTypeNoFill) else if ( brush.Type == c_BrushTypeNoFill)
{ {
...@@ -350,11 +357,23 @@ CString NSPresentationEditor::CShapeWriter::ConvertBrush(CBrush & brush) ...@@ -350,11 +357,23 @@ CString NSPresentationEditor::CShapeWriter::ConvertBrush(CBrush & brush)
brush_writer.WriteString(std::wstring(L"</a:gs>")); brush_writer.WriteString(std::wstring(L"</a:gs>"));
} }
brush_writer.WriteString(std::wstring(L"</a:gsLst>")); brush_writer.WriteString(std::wstring(L"</a:gsLst>"));
brush_writer.WriteString(std::wstring(L"<a:lin ang=\"5400000\" scaled=\"1\"/>")); brush_writer.WriteString(std::wstring(L"<a:lin ang=\""));
{
if (brush.LinearAngle < -180) brush.LinearAngle += 180;
if (brush.LinearAngle > 180) brush.LinearAngle -= 180;
int val = (90 - brush.LinearAngle) ;
if (val < 0) val = 0;
if (val > 360) val -= 360;
CString str; str.Format(_T("%d"), val * 60000);
brush_writer.WriteString(str);
}
brush_writer.WriteString(std::wstring(L"\" scaled=\"1\"/>"));
brush_writer.WriteString(std::wstring(L"</a:gradFill>")); brush_writer.WriteString(std::wstring(L"</a:gradFill>"));
} }
else if(brush.Type == c_BrushTypePattern) else if(brush.Type == c_BrushTypePattern)
{// - - {//типов нету в ппт - вместо них шаблон-картинка
brush_writer.WriteString(std::wstring(L"<a:pattFill prst=\"pct80\">")); brush_writer.WriteString(std::wstring(L"<a:pattFill prst=\"pct80\">"));
brush_writer.WriteString(std::wstring(L"<a:fgClr>")); brush_writer.WriteString(std::wstring(L"<a:fgClr>"));
brush_writer.WriteString(ConvertColor(brush.Color1, brush.Alpha1)); brush_writer.WriteString(ConvertColor(brush.Color1, brush.Alpha1));
...@@ -545,7 +564,7 @@ void NSPresentationEditor::CShapeWriter::WriteImageInfo() ...@@ -545,7 +564,7 @@ void NSPresentationEditor::CShapeWriter::WriteImageInfo()
m_oWriter.WriteString(std::wstring(L"\"")); m_oWriter.WriteString(std::wstring(L"\""));
//if (!m_pImageElement->m_sDescription.empty()) //if (!m_pImageElement->m_sDescription.empty())
//{// //{//бывает всякая разная бяка сохранена
// m_oWriter.WriteString(std::wstring(L" descr=\"")); // m_oWriter.WriteString(std::wstring(L" descr=\""));
// m_oWriter.WriteStringXML(m_pImageElement->m_sDescription); // m_oWriter.WriteStringXML(m_pImageElement->m_sDescription);
// m_oWriter.WriteString(std::wstring(L"\"")); // m_oWriter.WriteString(std::wstring(L"\""));
...@@ -707,7 +726,7 @@ void NSPresentationEditor::CShapeWriter::WriteTextInfo() ...@@ -707,7 +726,7 @@ void NSPresentationEditor::CShapeWriter::WriteTextInfo()
std::wstring prstTxWarp = oox::Spt2WordArtShapeType((oox::MSOSPT)m_pShapeElement->m_lShapeType); std::wstring prstTxWarp = oox::Spt2WordArtShapeType((oox::MSOSPT)m_pShapeElement->m_lShapeType);
m_oWriter.WriteString(std::wstring(L"<a:prstTxWarp")); m_oWriter.WriteString(std::wstring(L"<a:prstTxWarp"));
m_oWriter.WriteString(std::wstring(L" prst=\"") + prstTxWarp + _T("\">")); m_oWriter.WriteString(std::wstring(L" prst=\"") + prstTxWarp + _T("\">"));
m_oWriter.WriteString(std::wstring(L"<a:avLst>"));// m_oWriter.WriteString(std::wstring(L"<a:avLst>"));//модификаторы
CPPTShape *pPPTShape = dynamic_cast<CPPTShape *>(m_pShapeElement->m_oShape.m_pShape); CPPTShape *pPPTShape = dynamic_cast<CPPTShape *>(m_pShapeElement->m_oShape.m_pShape);
CString strVal; CString strVal;
...@@ -718,7 +737,7 @@ void NSPresentationEditor::CShapeWriter::WriteTextInfo() ...@@ -718,7 +737,7 @@ void NSPresentationEditor::CShapeWriter::WriteTextInfo()
{ {
case oox::msosptTextFadeUp: case oox::msosptTextFadeUp:
{ {
double kf = 4.63; //"" double kf = 4.63; //"волшебный"
strVal.Format(L"%d", (int)(kf * pPPTShape->m_arAdjustments[i])); strVal.Format(L"%d", (int)(kf * pPPTShape->m_arAdjustments[i]));
m_oWriter.WriteString(std::wstring(L"<a:gd name=\"adj\" fmla=\"val ")); m_oWriter.WriteString(std::wstring(L"<a:gd name=\"adj\" fmla=\"val "));
m_oWriter.WriteString(strVal + _T("\"/>")); m_oWriter.WriteString(strVal + _T("\"/>"));
...@@ -806,7 +825,7 @@ void NSPresentationEditor::CShapeWriter::WriteTextInfo() ...@@ -806,7 +825,7 @@ void NSPresentationEditor::CShapeWriter::WriteTextInfo()
CString _str2 = _T(">"); CString _str2 = _T(">");
m_oWriter.WriteString(_str2); m_oWriter.WriteString(_str2);
double dKoef1 = 3.52777778; // :-) ... double dKoef1 = 3.52777778; // :-) чё это не понятно ...
if (pPF->lineSpacing.is_init()) if (pPF->lineSpacing.is_init())
{ {
LONG val = pPF->lineSpacing.get(); LONG val = pPF->lineSpacing.get();
...@@ -979,10 +998,14 @@ void NSPresentationEditor::CShapeWriter::WriteTextInfo() ...@@ -979,10 +998,14 @@ void NSPresentationEditor::CShapeWriter::WriteTextInfo()
if ((pCF->Size.is_init()) && (pCF->Size.get() > 0) && (pCF->Size.get() < 4001)) if ((pCF->Size.is_init()) && (pCF->Size.get() > 0) && (pCF->Size.get() < 4001))
{ {
CString strProp = _T(""); CString strProp; strProp.Format(_T(" sz=\"%d\""), (int)(100 * pCF->Size.get()));
strProp.Format(_T(" sz=\"%d\""), (int)(100 * pCF->Size.get()));
m_oWriter.WriteString(strProp); m_oWriter.WriteString(strProp);
} }
if (pCF->BaseLineOffset.is_init())
{
CString strProp; strProp.Format(_T(" baseline=\"%d\""), (int)(1000 * pCF->BaseLineOffset.get()));
m_oWriter.WriteString(strProp);
}
if (pCF->FontBold.is_init()) if (pCF->FontBold.is_init())
{ {
if (pCF->FontBold.get()) if (pCF->FontBold.get())
...@@ -1015,7 +1038,7 @@ void NSPresentationEditor::CShapeWriter::WriteTextInfo() ...@@ -1015,7 +1038,7 @@ void NSPresentationEditor::CShapeWriter::WriteTextInfo()
m_oWriter.WriteString(std::wstring(L">")); m_oWriter.WriteString(std::wstring(L">"));
if (m_bWordArt) if (m_bWordArt)
{// - , , !!! {//порядок важен - линия, заливка, тень !!!
if (m_pShapeElement->m_bLine) if (m_pShapeElement->m_bLine)
{ {
m_oWriter.WriteString(ConvertLine(m_pShapeElement->m_oPen)); m_oWriter.WriteString(ConvertLine(m_pShapeElement->m_oPen));
...@@ -1156,6 +1179,9 @@ CString NSPresentationEditor::CShapeWriter::ConvertShape() ...@@ -1156,6 +1179,9 @@ CString NSPresentationEditor::CShapeWriter::ConvertShape()
m_oWriter.WriteString(std::wstring(L"<a:xfrm")); m_oWriter.WriteString(std::wstring(L"<a:xfrm"));
if (0 != m_pShapeElement->m_dRotate) if (0 != m_pShapeElement->m_dRotate)
{ {
if (m_pShapeElement->m_bFlipH && m_pShapeElement->m_dRotate < 180)
m_pShapeElement->m_dRotate += 180; //Тікбұрышты үшбұрыштарды.ppt slide-7
str.Format(L" rot=\"%d\"", (int)(m_pShapeElement->m_dRotate * 60000)); str.Format(L" rot=\"%d\"", (int)(m_pShapeElement->m_dRotate * 60000));
m_oWriter.WriteString(str); m_oWriter.WriteString(str);
} }
...@@ -1182,12 +1208,12 @@ CString NSPresentationEditor::CShapeWriter::ConvertShape() ...@@ -1182,12 +1208,12 @@ CString NSPresentationEditor::CShapeWriter::ConvertShape()
m_oWriter.WriteString(std::wstring(L"</a:xfrm>")); m_oWriter.WriteString(std::wstring(L"</a:xfrm>"));
} }
if (m_pShapeElement->m_oShape.m_lDrawType & c_ShapeDrawType_Graphic) if (m_pShapeElement->m_oShape.m_lDrawType & c_ShapeDrawType_Graphic || m_pShapeElement->m_oShape.m_pShape->m_bCustomShape)
{ {
m_pShapeElement->m_oShape.ToRenderer(dynamic_cast<IRenderer*>(this), oInfo, m_oMetricInfo, 0.0, 1.0); m_pShapeElement->m_oShape.ToRenderer(dynamic_cast<IRenderer*>(this), oInfo, m_oMetricInfo, 0.0, 1.0);
} }
if ((prstGeom.empty() == false || m_pShapeElement->m_bShapePreset) && prstTxWarp.empty()) if ((prstGeom.empty() == false || m_pShapeElement->m_bShapePreset) && prstTxWarp.empty() && !m_pShapeElement->m_oShape.m_pShape->m_bCustomShape)
{ {
if (prstGeom.empty()) prstGeom = L"rect"; if (prstGeom.empty()) prstGeom = L"rect";
m_oWriter.WriteString(std::wstring(L"<a:prstGeom")); m_oWriter.WriteString(std::wstring(L"<a:prstGeom"));
...@@ -1235,7 +1261,7 @@ CString NSPresentationEditor::CShapeWriter::ConvertImage() ...@@ -1235,7 +1261,7 @@ CString NSPresentationEditor::CShapeWriter::ConvertImage()
if (m_pImageElement->m_bImagePresent == false) if (m_pImageElement->m_bImagePresent == false)
{ {
if (m_pImageElement->m_sName.empty()) return _T(""); if (m_pImageElement->m_sName.empty()) return _T("");
//ppt_presentation.ppt - //ppt_presentation.ppt - ссылка на файл на диске
m_pImageElement->m_strImageFileName.clear(); m_pImageElement->m_strImageFileName.clear();
m_pImageElement->m_bImagePresent = true; m_pImageElement->m_bImagePresent = true;
...@@ -1355,7 +1381,7 @@ HRESULT NSPresentationEditor::CShapeWriter::get_Type(LONG* lType) ...@@ -1355,7 +1381,7 @@ HRESULT NSPresentationEditor::CShapeWriter::get_Type(LONG* lType)
*lType = c_nSVGConverter; *lType = c_nSVGConverter;
return S_OK; return S_OK;
} }
//-------- -------------------------------------------------- //-------- Функции для работы со страницей --------------------------------------------------
HRESULT NSPresentationEditor::CShapeWriter::NewPage() HRESULT NSPresentationEditor::CShapeWriter::NewPage()
{ {
return S_OK; return S_OK;
...@@ -1840,7 +1866,7 @@ HRESULT NSPresentationEditor::CShapeWriter::put_EdgeDist(double val) ...@@ -1840,7 +1866,7 @@ HRESULT NSPresentationEditor::CShapeWriter::put_EdgeDist(double val)
m_oEdge.Dist = val; m_oEdge.Dist = val;
return S_OK; return S_OK;
} }
//-------- -------------------------------------------------------- //-------- Функции для вывода текста --------------------------------------------------------
HRESULT NSPresentationEditor::CShapeWriter::CommandDrawText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h) HRESULT NSPresentationEditor::CShapeWriter::CommandDrawText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h)
{ {
if (c_nHyperlinkType == m_lCurrentCommandType) if (c_nHyperlinkType == m_lCurrentCommandType)
...@@ -1909,7 +1935,7 @@ HRESULT NSPresentationEditor::CShapeWriter::CommandDrawTextEx(const std::wstring ...@@ -1909,7 +1935,7 @@ HRESULT NSPresentationEditor::CShapeWriter::CommandDrawTextEx(const std::wstring
} }
return S_OK; return S_OK;
} }
//-------- --------------------------------------------------------------- //-------- Маркеры для команд ---------------------------------------------------------------
HRESULT NSPresentationEditor::CShapeWriter::BeginCommand(const DWORD& lType) HRESULT NSPresentationEditor::CShapeWriter::BeginCommand(const DWORD& lType)
{ {
if (c_nPathType == lType) if (c_nPathType == lType)
...@@ -1926,7 +1952,7 @@ HRESULT NSPresentationEditor::CShapeWriter::EndCommand(const DWORD& lType) ...@@ -1926,7 +1952,7 @@ HRESULT NSPresentationEditor::CShapeWriter::EndCommand(const DWORD& lType)
m_lCurrentCommandType = -1; m_lCurrentCommandType = -1;
return S_OK; return S_OK;
} }
//-------- Graphics Path ----------------------------------------------- //-------- Функции для работы с Graphics Path -----------------------------------------------
HRESULT NSPresentationEditor::CShapeWriter::PathCommandMoveTo(const double& x, const double& y) HRESULT NSPresentationEditor::CShapeWriter::PathCommandMoveTo(const double& x, const double& y)
{ {
if (c_nSimpleGraphicType == m_lCurrentCommandType) if (c_nSimpleGraphicType == m_lCurrentCommandType)
...@@ -2080,7 +2106,7 @@ HRESULT NSPresentationEditor::CShapeWriter::PathCommandTextEx(const std::wstring ...@@ -2080,7 +2106,7 @@ HRESULT NSPresentationEditor::CShapeWriter::PathCommandTextEx(const std::wstring
m_oFont.StringGID = bGid; m_oFont.StringGID = bGid;
return S_OK; return S_OK;
} }
//-------- --------------------------------------------------- //-------- Функции для вывода изображений ---------------------------------------------------
HRESULT NSPresentationEditor::CShapeWriter::DrawImage(IGrObject* pImage, const double& x, const double& y, const double& w, const double& h) HRESULT NSPresentationEditor::CShapeWriter::DrawImage(IGrObject* pImage, const double& x, const double& y, const double& w, const double& h)
{ {
return S_OK; return S_OK;
......
#pragma once #pragma once
#include "Shape.h" #include "Shape.h"
#include "ShapeProperties.h" #include "ShapeProperties.h"
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#define EMU_MM 36000.0 #define EMU_MM 36000.0
#endif #endif
#define FIXED_POINT(val) (double)((short)(val >> 16) + ((short)(val) / 65536.0))
#define FIXED_POINT_unsigned(val) (double)((WORD)(val >> 16) + ((WORD)(val) / 65536.0)) #define FIXED_POINT_unsigned(val) (double)((WORD)(val >> 16) + ((WORD)(val) / 65536.0))
using namespace NSOfficeDrawing; using namespace NSOfficeDrawing;
...@@ -37,6 +36,13 @@ using namespace NSPresentationEditor; ...@@ -37,6 +36,13 @@ using namespace NSPresentationEditor;
class CPPTElement class CPPTElement
{ {
public: public:
double FixedPointToDouble(unsigned int op)
{
short Integral = op >> 16;
unsigned short Fractional = op - (Integral << 16);
return Integral + (Fractional / 65536.0);
}
bool ChangeBlack2ColorImage(std::wstring image_path, int rgbColor1, int rgbColor2) bool ChangeBlack2ColorImage(std::wstring image_path, int rgbColor1, int rgbColor2)
{ {
...@@ -111,7 +117,7 @@ public: ...@@ -111,7 +117,7 @@ public:
if (color.m_lSchemeIndex != -1) if (color.m_lSchemeIndex != -1)
{ {
// ( //вытащить цвет (
color = pTheme->m_arColorScheme[color.m_lSchemeIndex]; color = pTheme->m_arColorScheme[color.m_lSchemeIndex];
} }
...@@ -274,7 +280,7 @@ public: ...@@ -274,7 +280,7 @@ public:
}break; }break;
case rotation: case rotation:
{ {
pElement->m_dRotate = FIXED_POINT(pProperty->m_lValue); pElement->m_dRotate = FixedPointToDouble(pProperty->m_lValue);
}break; }break;
case fFlipH: case fFlipH:
{ {
...@@ -415,13 +421,15 @@ public: ...@@ -415,13 +421,15 @@ public:
case fillOpacity: case fillOpacity:
{ {
pElement->m_oBrush.Alpha1 = (BYTE)(std::min)(255, (int)CDirectory::NormFixedPoint(pProperty->m_lValue, 255)); pElement->m_oBrush.Alpha1 = (BYTE)(std::min)(255, (int)CDirectory::NormFixedPoint(pProperty->m_lValue, 255));
break; }break;
}
case fillBackOpacity: case fillBackOpacity:
{ {
pElement->m_oBrush.Alpha2 = (BYTE)(std::min)(255, (int)CDirectory::NormFixedPoint(pProperty->m_lValue, 255)); pElement->m_oBrush.Alpha2 = (BYTE)(std::min)(255, (int)CDirectory::NormFixedPoint(pProperty->m_lValue, 255));
break; }break;
} case fillAngle:
{
pElement->m_oBrush.LinearAngle = FixedPointToDouble(pProperty->m_lValue);
}break;
case fillRectLeft: case fillRectLeft:
{ {
pElement->m_oBrush.Rect.X = pProperty->m_lValue; pElement->m_oBrush.Rect.X = pProperty->m_lValue;
...@@ -455,9 +463,6 @@ public: ...@@ -455,9 +463,6 @@ public:
bool bShadeBand = GETBIT(pProperty->m_lValue, 28); bool bShadeBand = GETBIT(pProperty->m_lValue, 28);
bool bShadeOneColor = GETBIT(pProperty->m_lValue, 27); bool bShadeOneColor = GETBIT(pProperty->m_lValue, 27);
}break;
case fillAngle:
{
}break; }break;
case fillFocus://relative position of the last color in the shaded fill case fillFocus://relative position of the last color in the shaded fill
{ {
...@@ -529,7 +534,7 @@ public: ...@@ -529,7 +534,7 @@ public:
bool bUseShadowOk = (0x20 == (0x20 & flag3)); bool bUseShadowOk = (0x20 == (0x20 & flag3));
//if (bUseLineOk) //if (bUseLineOk)
// pElement->m_bLine = bLineOk;//?? todooo - ! 1 (82).ppt // pElement->m_bLine = bLineOk;//?? todooo проверить - не сраюатывает ! 1 (82).ppt
if (bUseFillOk) if (bUseFillOk)
bIsFilled = bFillOk; bIsFilled = bFillOk;
...@@ -716,11 +721,11 @@ public: ...@@ -716,11 +721,11 @@ public:
}break; }break;
case shadowOriginX://in emu, relative from center shape case shadowOriginX://in emu, relative from center shape
{ {
pElement->m_oShadow.OriginX = FIXED_POINT(pProperty->m_lValue); pElement->m_oShadow.OriginX = FixedPointToDouble(pProperty->m_lValue);
}break; }break;
case shadowOriginY: case shadowOriginY:
{ {
pElement->m_oShadow.OriginY = FIXED_POINT(pProperty->m_lValue); pElement->m_oShadow.OriginY = FixedPointToDouble(pProperty->m_lValue);
}break; }break;
case shadowColor: case shadowColor:
{ {
...@@ -742,7 +747,7 @@ public: ...@@ -742,7 +747,7 @@ public:
}break; }break;
case shadowHighlight: case shadowHighlight:
{ {
// //оттенок двойной тени
}break; }break;
case shadowOffsetX: case shadowOffsetX:
{ {
...@@ -754,19 +759,19 @@ public: ...@@ -754,19 +759,19 @@ public:
}break; }break;
case shadowScaleXToX: case shadowScaleXToX:
{ {
pElement->m_oShadow.ScaleXToX = FIXED_POINT(pProperty->m_lValue); pElement->m_oShadow.ScaleXToX = FixedPointToDouble(pProperty->m_lValue);
}break; }break;
case shadowScaleYToX: case shadowScaleYToX:
{ {
pElement->m_oShadow.ScaleYToX = FIXED_POINT(pProperty->m_lValue); pElement->m_oShadow.ScaleYToX = FixedPointToDouble(pProperty->m_lValue);
}break; }break;
case shadowScaleXToY: case shadowScaleXToY:
{ {
pElement->m_oShadow.ScaleXToY = FIXED_POINT(pProperty->m_lValue); pElement->m_oShadow.ScaleXToY = FixedPointToDouble(pProperty->m_lValue);
}break; }break;
case shadowScaleYToY: case shadowScaleYToY:
{ {
pElement->m_oShadow.ScaleYToY = FIXED_POINT(pProperty->m_lValue); pElement->m_oShadow.ScaleYToY = FixedPointToDouble(pProperty->m_lValue);
}break; }break;
case shadowPerspectiveX: case shadowPerspectiveX:
{ {
...@@ -788,7 +793,7 @@ public: ...@@ -788,7 +793,7 @@ public:
if (!fUsefShadow && fUsefshadowObscured) if (!fUsefShadow && fUsefshadowObscured)
{ {
// //контурная
pElement->m_oShadow.Visible = fshadowObscured; pElement->m_oShadow.Visible = fshadowObscured;
} }
}break; }break;
...@@ -871,7 +876,7 @@ public: ...@@ -871,7 +876,7 @@ public:
case pibName: case pibName:
{ {
pElement->m_sImageName = NSFile::CUtf8Converter::GetWStringFromUTF16((unsigned short*)pProperty->m_pOptions, pProperty->m_lValue /2-1); pElement->m_sImageName = NSFile::CUtf8Converter::GetWStringFromUTF16((unsigned short*)pProperty->m_pOptions, pProperty->m_lValue /2-1);
// TextMining05.ppt, 20 - ( - todooo // TextMining05.ppt, слайд 20 - некорректное имя ( - todooo потом подчистить его
}break; }break;
case cropFromTop: case cropFromTop:
{ {
...@@ -912,12 +917,12 @@ public: ...@@ -912,12 +917,12 @@ public:
switch (pProperty->m_ePID) switch (pProperty->m_ePID)
{ {
// ... // здесь просто применяем проперти...
// geometry ---------------------------------------------------- // geometry ----------------------------------------------------
// top, left, right, bottom logic // top, left, right, bottom logic
case NSOfficeDrawing::metroBlob: case NSOfficeDrawing::metroBlob:
{ {
// oox //альтернатива в формате oox
//NSFile::CFileBinary f; //NSFile::CFileBinary f;
//f.CreateFileW(L"d:\\test.zip"); //f.CreateFileW(L"d:\\test.zip");
//f.WriteFile(pProperty->m_pOptions, pProperty->m_lValue); //f.WriteFile(pProperty->m_pOptions, pProperty->m_lValue);
...@@ -937,6 +942,7 @@ public: ...@@ -937,6 +942,7 @@ public:
case NSOfficeDrawing::shapePath: case NSOfficeDrawing::shapePath:
{ {
pShape->m_oCustomVML.SetPath((RulesType)pProperty->m_lValue); pShape->m_oCustomVML.SetPath((RulesType)pProperty->m_lValue);
pShape->m_bCustomShape = true;
}break; }break;
// segmentsInfo // segmentsInfo
case NSOfficeDrawing::pSegmentInfo: case NSOfficeDrawing::pSegmentInfo:
...@@ -944,6 +950,7 @@ public: ...@@ -944,6 +950,7 @@ public:
if (pProperty->m_bComplex) if (pProperty->m_bComplex)
{ {
pShape->m_oCustomVML.LoadSegments(pProperty); pShape->m_oCustomVML.LoadSegments(pProperty);
pShape->m_bCustomShape = true;
} }
}break; }break;
// verticesInfo // verticesInfo
...@@ -952,12 +959,13 @@ public: ...@@ -952,12 +959,13 @@ public:
if (pProperty->m_bComplex) if (pProperty->m_bComplex)
{ {
pShape->m_oCustomVML.LoadVertices(pProperty); pShape->m_oCustomVML.LoadVertices(pProperty);
pShape->m_bCustomShape = true;
} }
}break; }break;
case NSOfficeDrawing::pGuides: case NSOfficeDrawing::pGuides:
{ {
if (pProperty->m_bComplex) if (pProperty->m_bComplex && pShape->m_eType != sptNotchedCircularArrow)
{ {//Тікбұрышты үшбұрыштарды.ppt - slide 25
pShape->m_oCustomVML.LoadGuides(pProperty); pShape->m_oCustomVML.LoadGuides(pProperty);
} }
}break; }break;
...@@ -1128,7 +1136,7 @@ public: ...@@ -1128,7 +1136,7 @@ public:
} }
case NSOfficeDrawing::gtextBoolean: case NSOfficeDrawing::gtextBoolean:
{ {
// - // вот здесь - нужно единицы перевести в пикселы
BYTE flag1 = (BYTE)(pProperty->m_lValue); BYTE flag1 = (BYTE)(pProperty->m_lValue);
BYTE flag2 = (BYTE)(pProperty->m_lValue >> 8); BYTE flag2 = (BYTE)(pProperty->m_lValue >> 8);
BYTE flag3 = (BYTE)(pProperty->m_lValue >> 16); BYTE flag3 = (BYTE)(pProperty->m_lValue >> 16);
...@@ -1320,7 +1328,7 @@ public: ...@@ -1320,7 +1328,7 @@ public:
{ {
if (pLayout->m_arElements[nIndex]->m_bPlaceholderSet == false) if (pLayout->m_arElements[nIndex]->m_bPlaceholderSet == false)
{ {
pElementLayout = pLayout->m_arElements[nIndex]; // pElementLayout = pLayout->m_arElements[nIndex]; //для переноса настроек
pElementLayout->m_lID = lMasterID; pElementLayout->m_lID = lMasterID;
if (placeholder_id >= 0 && pLayout->m_arElements[nIndex]->m_lPlaceholderID < 0 ) if (placeholder_id >= 0 && pLayout->m_arElements[nIndex]->m_lPlaceholderID < 0 )
...@@ -1345,8 +1353,8 @@ public: ...@@ -1345,8 +1353,8 @@ public:
} }
} }
} }
// - . // раньше искался шейп - и делался дубликат. Теперь думаю это не нужно
// placeholder (type & id) // нужно ориентироваться на placeholder (type & id)
IElement* pElem = *ppElement; IElement* pElem = *ppElement;
if (NULL == pElem) if (NULL == pElem)
...@@ -1363,7 +1371,7 @@ public: ...@@ -1363,7 +1371,7 @@ public:
CExFilesInfo oInfo; CExFilesInfo oInfo;
CExFilesInfo oInfoDefault; CExFilesInfo oInfoDefault;
// ( ) // по умолчанию картинка (или оле объект)
CExFilesInfo::ExFilesType exType = CExFilesInfo::eftNone; CExFilesInfo::ExFilesType exType = CExFilesInfo::eftNone;
CExFilesInfo* pInfo = pMapIDs->Lock(0xFFFFFFFF, exType); CExFilesInfo* pInfo = pMapIDs->Lock(0xFFFFFFFF, exType);
if (NULL != pInfo) if (NULL != pInfo)
...@@ -1443,7 +1451,7 @@ public: ...@@ -1443,7 +1451,7 @@ public:
pElem->m_lID = oArrayShape[0]->m_nID; pElem->m_lID = oArrayShape[0]->m_nID;
pElem->m_lLayoutID = lMasterID; pElem->m_lLayoutID = lMasterID;
//--------- //---------внешние ссылки
{ {
CExFilesInfo::ExFilesType exType = CExFilesInfo::eftNone; CExFilesInfo::ExFilesType exType = CExFilesInfo::eftNone;
CExFilesInfo * pTextureInfo = pMapIDs->Lock(0xFFFFFFFF, exType); CExFilesInfo * pTextureInfo = pMapIDs->Lock(0xFFFFFFFF, exType);
...@@ -1470,7 +1478,7 @@ public: ...@@ -1470,7 +1478,7 @@ public:
// placeholders // placeholders
if (0 < oArrayPlaceHolder.size()) if (0 < oArrayPlaceHolder.size())
{ {
pElem->m_bLine = false; // pElem->m_bLine = false; //по умолчанию у них нет линий
pElem->m_lPlaceholderID = oArrayPlaceHolder[0]->m_nPosition; pElem->m_lPlaceholderID = oArrayPlaceHolder[0]->m_nPosition;
pElem->m_lPlaceholderType = oArrayPlaceHolder[0]->m_nPlacementID; pElem->m_lPlaceholderType = oArrayPlaceHolder[0]->m_nPlacementID;
pElem->m_lPlaceholderSizePreset = oArrayPlaceHolder[0]->m_nSize; pElem->m_lPlaceholderSizePreset = oArrayPlaceHolder[0]->m_nSize;
...@@ -1522,7 +1530,7 @@ public: ...@@ -1522,7 +1530,7 @@ public:
if (format_data) if (format_data)
{ {
pElem->m_nFormatDate = 1; pElem->m_nFormatDate = 1;
//todooo //todooo сделать форматированый вывод
} }
else else
{ {
...@@ -1530,7 +1538,7 @@ public: ...@@ -1530,7 +1538,7 @@ public:
pElem->m_nFormatDate = 2; pElem->m_nFormatDate = 2;
} }
} }
//------------- --------------------------------------------------------------------------------- //------------- привязки ---------------------------------------------------------------------------------
std::vector<CRecordClientAnchor*> oArrayAnchor; std::vector<CRecordClientAnchor*> oArrayAnchor;
this->GetRecordsByType(&oArrayAnchor, true, true); this->GetRecordsByType(&oArrayAnchor, true, true);
...@@ -1567,7 +1575,7 @@ public: ...@@ -1567,7 +1575,7 @@ public:
{ {
if (oArrayShape[0]->m_bBackground) if (oArrayShape[0]->m_bBackground)
{ {
// background // здесь background
pElem->m_rcBoundsOriginal.left = 0; pElem->m_rcBoundsOriginal.left = 0;
pElem->m_rcBoundsOriginal.top = 0; pElem->m_rcBoundsOriginal.top = 0;
pElem->m_rcBoundsOriginal.right = lSlideWidth; pElem->m_rcBoundsOriginal.right = lSlideWidth;
...@@ -1575,7 +1583,7 @@ public: ...@@ -1575,7 +1583,7 @@ public:
} }
else else
{ {
// ... // не понятно...
pElem->m_rcBoundsOriginal.left = 0; pElem->m_rcBoundsOriginal.left = 0;
pElem->m_rcBoundsOriginal.top = 0; pElem->m_rcBoundsOriginal.top = 0;
pElem->m_rcBoundsOriginal.right = 0; pElem->m_rcBoundsOriginal.right = 0;
...@@ -1601,7 +1609,7 @@ public: ...@@ -1601,7 +1609,7 @@ public:
pElementLayout->m_bPlaceholderSet = true; pElementLayout->m_bPlaceholderSet = true;
pElementLayout->m_bBoundsEnabled = true; pElementLayout->m_bBoundsEnabled = true;
} }
//--------- -------------------------------------------------------------------------- //--------- наличие текста --------------------------------------------------------------------------
CShapeElement* pShapeElem = dynamic_cast<CShapeElement*>(pElem); CShapeElement* pShapeElem = dynamic_cast<CShapeElement*>(pElem);
if (NULL != pShapeElem) if (NULL != pShapeElem)
{ {
...@@ -1612,7 +1620,7 @@ public: ...@@ -1612,7 +1620,7 @@ public:
pShapeElem->m_oShape.m_dWidthLogic = ShapeSizeVML; pShapeElem->m_oShape.m_dWidthLogic = ShapeSizeVML;
pShapeElem->m_oShape.m_dHeightLogic = ShapeSizeVML; pShapeElem->m_oShape.m_dHeightLogic = ShapeSizeVML;
// textheader present // проверка на textheader present
std::vector<CRecordTextHeaderAtom*> oArrayTextHeader; std::vector<CRecordTextHeaderAtom*> oArrayTextHeader;
GetRecordsByType(&oArrayTextHeader, true, true); GetRecordsByType(&oArrayTextHeader, true, true);
...@@ -1629,7 +1637,7 @@ public: ...@@ -1629,7 +1637,7 @@ public:
oElementInfo.m_lMasterTextType = NSOfficePPT::NoPresent; oElementInfo.m_lMasterTextType = NSOfficePPT::NoPresent;
} }
// // проверка на ссылку в персист
std::vector<CRecordOutlineTextRefAtom*> oArrayTextRefs; std::vector<CRecordOutlineTextRefAtom*> oArrayTextRefs;
GetRecordsByType(&oArrayTextRefs, true, true); GetRecordsByType(&oArrayTextRefs, true, true);
...@@ -1638,7 +1646,7 @@ public: ...@@ -1638,7 +1646,7 @@ public:
oElementInfo.m_lPersistIndex = oArrayTextRefs[0]->m_nIndex; oElementInfo.m_lPersistIndex = oArrayTextRefs[0]->m_nIndex;
} }
// ... // сам текст...
std::vector<CRecordTextBytesAtom*> oArrayTextBytes; std::vector<CRecordTextBytesAtom*> oArrayTextBytes;
GetRecordsByType(&oArrayTextBytes, true, true); GetRecordsByType(&oArrayTextBytes, true, true);
if (0 < oArrayTextBytes.size() && strShapeText.empty()) if (0 < oArrayTextBytes.size() && strShapeText.empty())
...@@ -1788,7 +1796,7 @@ public: ...@@ -1788,7 +1796,7 @@ public:
return; return;
} }
// , // здесь переводим координаты, чтобы они не зависили от группы
long lWidthClient = m_pGroupClientAnchor->right - m_pGroupClientAnchor->left; long lWidthClient = m_pGroupClientAnchor->right - m_pGroupClientAnchor->left;
long lHeightClient = m_pGroupClientAnchor->bottom - m_pGroupClientAnchor->top; long lHeightClient = m_pGroupClientAnchor->bottom - m_pGroupClientAnchor->top;
...@@ -1865,17 +1873,17 @@ protected: ...@@ -1865,17 +1873,17 @@ protected:
} }
void SetUpTextStyle(std::wstring& strText, CTheme* pTheme, CLayout* pLayout, IElement* pElem, CSlideInfo* pThemeWrapper, CSlideInfo* pSlideWrapper, CSlide* pSlide, CRecordMasterTextPropAtom* master_levels) void SetUpTextStyle(std::wstring& strText, CTheme* pTheme, CLayout* pLayout, IElement* pElem, CSlideInfo* pThemeWrapper, CSlideInfo* pSlideWrapper, CSlide* pSlide, CRecordMasterTextPropAtom* master_levels)
{ {
// shape // сначала проверяем на shape
// - // затем применяем все настройки по-очереди
// 1) master + TextMasterStyles // 1) master + TextMasterStyles
// 2) persist + TextMasterStyles // 2) persist + TextMasterStyles
// 3) + TextMasterStyles // 3) свои настройки + TextMasterStyles
// " " - " " // причем "свои настройки" - это чисто "продвинутые настройки"
// ( ) - // потому что все общие ( через проперти ) - уже установлены
// . // тут важно выставить правильный порядок.
// - , // словом - важная очень функция для текста,
// , .cpp - // и, чтобы убрать всякие лишние .cpp файлы - здесь же будем учитывать
// (.. ) // настройки слайда (т.е. структуры не будут работать со слайдами)
if (NULL == pElem) if (NULL == pElem)
return; return;
...@@ -1889,10 +1897,10 @@ protected: ...@@ -1889,10 +1897,10 @@ protected:
CTextAttributesEx* pTextSettings = &(pShape->m_oShape.m_oText); CTextAttributesEx* pTextSettings = &(pShape->m_oShape.m_oText);
// masterstyle ( ) // сначала применим ссылки на masterstyle (для шаблонного элемента)
// - (.. ) // как узнать - просто есть ли массивы (т.к. они могли появиться пока только оттуда)
// - - .. - // - теперь этого делать не нужно - т.к. в мастере тоже вызывается эта функция -
// // и там все это должно уже примениться
bool bIsPersistPresentSettings = false; bool bIsPersistPresentSettings = false;
bool bIsOwnPresentSettings = false; bool bIsOwnPresentSettings = false;
...@@ -1902,7 +1910,7 @@ protected: ...@@ -1902,7 +1910,7 @@ protected:
CShapeElement* pElementLayoutPH = NULL; CShapeElement* pElementLayoutPH = NULL;
// // выставим тип мастера
if (NULL != pSlide) if (NULL != pSlide)
{ {
int ph_type = pShape->m_lPlaceholderType; int ph_type = pShape->m_lPlaceholderType;
...@@ -1962,7 +1970,7 @@ protected: ...@@ -1962,7 +1970,7 @@ protected:
if (NULL != oElemInfo.m_pStream && -1 != oElemInfo.m_lOffsetTextStyle) if (NULL != oElemInfo.m_pStream && -1 != oElemInfo.m_lOffsetTextStyle)
{ {
// . // теперь нужно загрузить стили текста из стрима.
LONG lPosition = 0; StreamUtils::StreamPosition(lPosition, oElemInfo.m_pStream); LONG lPosition = 0; StreamUtils::StreamPosition(lPosition, oElemInfo.m_pStream);
StreamUtils::StreamSeek(oElemInfo.m_lOffsetTextStyle - 8, oElemInfo.m_pStream); StreamUtils::StreamSeek(oElemInfo.m_lOffsetTextStyle - 8, oElemInfo.m_pStream);
...@@ -1988,7 +1996,7 @@ protected: ...@@ -1988,7 +1996,7 @@ protected:
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
// () // теперь выставляем все настройки текста (стили)
if (NULL == pSlide) if (NULL == pSlide)
{ {
int nTextMasterType = (int)eTypeMaster; int nTextMasterType = (int)eTypeMaster;
...@@ -2079,7 +2087,7 @@ protected: ...@@ -2079,7 +2087,7 @@ protected:
//} //}
} }
// (persist own) - m_oStyles // теперь смотрим все остальные стили (persist и own) - просто применяем их к m_oStyles
if (eTypePersist != NSOfficePPT::NoPresent && eTypePersist != eTypeMaster) if (eTypePersist != NSOfficePPT::NoPresent && eTypePersist != eTypeMaster)
{ {
int nIndexType = (int)eTypePersist; int nIndexType = (int)eTypePersist;
...@@ -2148,7 +2156,7 @@ protected: ...@@ -2148,7 +2156,7 @@ protected:
pTextSettings->m_lStyleThemeIndex = -1; pTextSettings->m_lStyleThemeIndex = -1;
} }
// (persist own) - m_oStyles // теперь смотрим все остальные стили (persist и own) - просто применяем их к m_oStyles
if (eTypePersist != NSOfficePPT::NoPresent && eTypePersist != eTypeMaster) if (eTypePersist != NSOfficePPT::NoPresent && eTypePersist != eTypeMaster)
{ {
int nIndexType = (int)eTypePersist; int nIndexType = (int)eTypePersist;
...@@ -2181,7 +2189,7 @@ protected: ...@@ -2181,7 +2189,7 @@ protected:
if ((_T("") != strText) && 0 == pTextSettings->m_arParagraphs.size()) if ((_T("") != strText) && 0 == pTextSettings->m_arParagraphs.size())
{ {
// . // значит никаких своих настроек нету. Значит просто пустые свои настройки
std::vector<CTextPFRun_ppt> oArrayPF; std::vector<CTextPFRun_ppt> oArrayPF;
CTextPFRun_ppt elm; CTextPFRun_ppt elm;
...@@ -2203,7 +2211,7 @@ protected: ...@@ -2203,7 +2211,7 @@ protected:
if (NULL != oElemInfo.m_pStream && -1 != oElemInfo.m_lOffsetTextProp) if (NULL != oElemInfo.m_pStream && -1 != oElemInfo.m_lOffsetTextProp)
{ {
// //языковые настройки текта
LONG lPosition = 0; StreamUtils::StreamPosition(lPosition, oElemInfo.m_pStream); LONG lPosition = 0; StreamUtils::StreamPosition(lPosition, oElemInfo.m_pStream);
StreamUtils::StreamSeek(oElemInfo.m_lOffsetTextProp - 8, oElemInfo.m_pStream); StreamUtils::StreamSeek(oElemInfo.m_lOffsetTextProp - 8, oElemInfo.m_pStream);
...@@ -2229,7 +2237,7 @@ protected: ...@@ -2229,7 +2237,7 @@ protected:
if (pShape->m_oActions.m_bPresent) if (pShape->m_oActions.m_bPresent)
{ {
//todooo - 1-(34).ppt //todooo разобраться нужно ли менять цвет на гиперлинк - 1-(34).ppt
NSPresentationEditor::CColor oColor; NSPresentationEditor::CColor oColor;
if ((NULL != pSlide) && !pSlide->m_bUseLayoutColorScheme) oColor = pSlide->GetColor(11); if ((NULL != pSlide) && !pSlide->m_bUseLayoutColorScheme) oColor = pSlide->GetColor(11);
else if ((NULL != pLayout) && (!pLayout->m_bUseThemeColorScheme)) oColor = pLayout->GetColor(11); else if ((NULL != pLayout) && (!pLayout->m_bUseThemeColorScheme)) oColor = pLayout->GetColor(11);
...@@ -2241,7 +2249,7 @@ protected: ...@@ -2241,7 +2249,7 @@ protected:
CPPTShape* pPPTShape = dynamic_cast<CPPTShape*>(pShape->m_oShape.m_pShape); CPPTShape* pPPTShape = dynamic_cast<CPPTShape*>(pShape->m_oShape.m_pShape);
if (NULL != pPPTShape) // wordart if (NULL != pPPTShape) // проверка на wordart
{ {
switch (pPPTShape->m_eType) switch (pPPTShape->m_eType)
{ {
......
...@@ -39,18 +39,18 @@ namespace NSPresentationEditor ...@@ -39,18 +39,18 @@ namespace NSPresentationEditor
class CBaseShape class CBaseShape
{ {
public: public:
std::vector<long> m_arAdjustments; std::vector<long> m_arAdjustments;
std::vector<double> Guides; std::vector<double> m_arGuides;
public: public:
LONG m_eJoin; LONG m_eJoin;
bool m_bConcentricFill; bool m_bConcentricFill;
bool m_bCustomShape;
std::vector<SimpleTypes::CPoint> m_arConnectors; std::vector<SimpleTypes::CPoint> m_arConnectors;
std::vector<LONG> m_arConnectorAngles; std::vector<LONG> m_arConnectorAngles;
std::vector<Aggplus::RECT> m_arTextRects; std::vector<Aggplus::RECT> m_arTextRects;
std::vector<CHandle_> m_arHandles; std::vector<CHandle_> m_arHandles;
CString m_strTransformXml; CString m_strTransformXml;
...@@ -61,9 +61,11 @@ namespace NSPresentationEditor ...@@ -61,9 +61,11 @@ namespace NSPresentationEditor
LONG m_lLimoY; LONG m_lLimoY;
CPath m_oPath; CPath m_oPath;
public: public:
CBaseShape() CBaseShape()
{ {
m_bCustomShape = false;
} }
virtual bool LoadFromXML(const CString& xml) = 0; virtual bool LoadFromXML(const CString& xml) = 0;
...@@ -112,9 +114,9 @@ namespace NSPresentationEditor ...@@ -112,9 +114,9 @@ namespace NSPresentationEditor
for(int i = 0; i < Shape->m_arAdjustments.size(); i++) for(int i = 0; i < Shape->m_arAdjustments.size(); i++)
m_arAdjustments.push_back(Shape->m_arAdjustments[i]); m_arAdjustments.push_back(Shape->m_arAdjustments[i]);
Guides.clear(); m_arGuides.clear();
for(int i = 0; i < Shape->Guides.size(); i++) for(int i = 0; i < Shape->m_arGuides.size(); i++)
Guides.push_back(Shape->Guides[i]); m_arGuides.push_back(Shape->m_arGuides[i]);
m_eJoin = Shape->m_eJoin; m_eJoin = Shape->m_eJoin;
m_bConcentricFill = Shape->m_bConcentricFill; m_bConcentricFill = Shape->m_bConcentricFill;
...@@ -154,9 +156,9 @@ namespace NSPresentationEditor ...@@ -154,9 +156,9 @@ namespace NSPresentationEditor
for(int i = 0; i < m_arAdjustments.size(); i++) for(int i = 0; i < m_arAdjustments.size(); i++)
Shape->m_arAdjustments.push_back(m_arAdjustments[i]); Shape->m_arAdjustments.push_back(m_arAdjustments[i]);
Shape->Guides.clear(); Shape->m_arGuides.clear();
for(int i = 0; i < Guides.size(); i++) for(int i = 0; i < m_arGuides.size(); i++)
Shape->Guides.push_back(Guides[i]); Shape->m_arGuides.push_back(m_arGuides[i]);
Shape->m_eJoin = m_eJoin; Shape->m_eJoin = m_eJoin;
Shape->m_bConcentricFill = m_bConcentricFill; Shape->m_bConcentricFill = m_bConcentricFill;
......
...@@ -19,8 +19,9 @@ CPPTShape* CPPTShape::CreateByType(PPTShapes::ShapeType type) ...@@ -19,8 +19,9 @@ CPPTShape* CPPTShape::CreateByType(PPTShapes::ShapeType type)
// msosptNotchedCircularArrow 0x00000064 A value that SHOULD NOT be used. // msosptNotchedCircularArrow 0x00000064 A value that SHOULD NOT be used.
// msosptHostControl 0x000000C9 A value that SHOULD NOT be used. // msosptHostControl 0x000000C9 A value that SHOULD NOT be used.
case sptNotchedCircularArrow: case sptNotchedCircularArrow:
case sptHostControl: case sptHostControl:
{ pShape = new CPPTShape(); pShape->m_eType = type; break; }
case 0: { pShape = new CRectangleType(); break; } case 0: { pShape = new CRectangleType(); break; }
//CREATE_BY_SPT(sptMin, CLineType) //CREATE_BY_SPT(sptMin, CLineType)
......
...@@ -2435,6 +2435,7 @@ namespace NSGuidesVML ...@@ -2435,6 +2435,7 @@ namespace NSGuidesVML
switch (eParamType) switch (eParamType)
{ {
case ptFormula: case ptFormula:
if (bExtShape || lParam < m_arIndexDst.size())
{ {
oWriter.m_oWriter.AddCharNoCheck((WCHAR)'g'); oWriter.m_oWriter.AddCharNoCheck((WCHAR)'g');
oWriter.m_oWriter.AddCharNoCheck((WCHAR)'d'); oWriter.m_oWriter.AddCharNoCheck((WCHAR)'d');
......
...@@ -250,7 +250,7 @@ public: ...@@ -250,7 +250,7 @@ public:
NSGuidesOOXML::CFormulaManager FManager; NSGuidesOOXML::CFormulaManager FManager;
public: public:
CPPTXShape() : CBaseShape(), FManager(m_arAdjustments, Guides) CPPTXShape() : CBaseShape(), FManager(m_arAdjustments, m_arGuides)
{ {
m_eType = OOXMLShapes::sptMin; m_eType = OOXMLShapes::sptMin;
} }
......
...@@ -13,7 +13,7 @@ namespace NSPresentationEditor ...@@ -13,7 +13,7 @@ namespace NSPresentationEditor
std::map<_UINT64, LONG> m_mapGeomToLayout;// std::map<_UINT64, LONG> m_mapGeomToLayout;//
std::map<DWORD, LONG> m_mapTitleLayout; // std::map<DWORD, LONG> m_mapTitleLayout; //
std::multimap<int,int> m_mapPlaceholders; std::multimap<int,int> m_mapPlaceholders;
std::vector<CColor> m_arColorScheme; std::vector<CColor> m_arColorScheme;
std::vector<CFont> m_arFonts; std::vector<CFont> m_arFonts;
......
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