Commit 3583945f authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander Trofimov

(2.0.1.325): ASCOfficeDocxFile2

после сохранения ole обьекты становились с абсолютными координатами и у них появлялись границы.

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@62716 954022d7-b5bf-4e40-9824-e11837661b57
parent e09f3a8a
......@@ -2,6 +2,6 @@
//2
//0
//1
//324
#define INTVER 2,0,1,324
#define STRVER "2,0,1,324\0"
//325
#define INTVER 2,0,1,325
#define STRVER "2,0,1,325\0"
......@@ -3634,7 +3634,6 @@ void CDrawingConverter::ConvertMainPropsToVML(const CString& bsMainProps, NSBinP
NSBinPptxRW::CXmlWriter oWriter;
oWriter.WriteAttributeCSS(_T("position"), _T("absolute"));
double dKoef = 72.0 / (36000 * 25.4);
if (_T("wp:inline") == oNode.GetName())
{
......@@ -3664,6 +3663,7 @@ void CDrawingConverter::ConvertMainPropsToVML(const CString& bsMainProps, NSBinP
}
else
{
oWriter.WriteAttributeCSS(_T("position"), _T("absolute"));
nullable_int margT; oNode.ReadAttributeBase(L"distT", margT);
nullable_int margB; oNode.ReadAttributeBase(L"distB", margB);
nullable_int margL; oNode.ReadAttributeBase(L"distL", margL);
......
......@@ -323,8 +323,15 @@ namespace NSBinPptxRW
else
strImage = DownloadImageExec(strUrl);
CImageManager2Info oImageManagerInfo;
if(!strImage.IsEmpty())
if (!strImage.IsEmpty())
{
oImageManagerInfo = GenerateImageExec(strImage, strExts, strOleImage, strOleImageProperty);
CDirectory::DeleteFileW(strImage);
}
if (!strOleImage.IsEmpty())
CDirectory::DeleteFileW(strOleImage);
if (!strOleImageProperty.IsEmpty())
CDirectory::DeleteFileW(strOleImageProperty);
m_mapImages[strUrl] = oImageManagerInfo;
return oImageManagerInfo;
......@@ -332,7 +339,7 @@ namespace NSBinPptxRW
CString CImageManager2::DownloadImageExec(const CString& strFile)
{
#ifndef DISABLE_FILE_DOWNLOADER
CFileDownloader oDownloader(strFile, true);
CFileDownloader oDownloader(strFile, false);
oDownloader.Start( 1 );
while ( oDownloader.IsRunned() )
{
......
......@@ -434,7 +434,7 @@ namespace PPTX
CString strFillNode = _T("");
CString strStrokeNode = _T("");
CalculateFill(spPr, style, oTheme, oClrMap, strFillAttr, strFillNode, bOle);
CalculateLine(spPr, style, oTheme, oClrMap, strStrokeAttr, strStrokeNode);
CalculateLine(spPr, style, oTheme, oClrMap, strStrokeAttr, strStrokeNode, bOle);
if (pWriter->m_strStyleMain != _T(""))
{
......
......@@ -82,6 +82,7 @@ namespace PPTX
if(bOle)
{
strAttr = _T(" filled=\"f\"");
strNode = _T("<v:imagedata r:id=\"") + strId + _T("\" o:title=\"\" />");
}
else
......@@ -148,7 +149,7 @@ namespace PPTX
*/
}
void CalculateLine(PPTX::Logic::SpPr& oSpPr, nullable<ShapeStyle>& pShapeStyle, NSCommon::smart_ptr<PPTX::WrapperFile>& _oTheme, NSCommon::smart_ptr<PPTX::WrapperWritingElement>& _oClrMap, CString& strAttr, CString& strNode)
void CalculateLine(PPTX::Logic::SpPr& oSpPr, nullable<ShapeStyle>& pShapeStyle, NSCommon::smart_ptr<PPTX::WrapperFile>& _oTheme, NSCommon::smart_ptr<PPTX::WrapperWritingElement>& _oClrMap, CString& strAttr, CString& strNode, bool bOle)
{
smart_ptr<PPTX::Theme> oTheme = _oTheme.smart_dynamic_cast<PPTX::Theme>();
smart_ptr<PPTX::Logic::ClrMap> oClrMap = _oClrMap.smart_dynamic_cast<PPTX::Logic::ClrMap>();
......@@ -169,6 +170,8 @@ namespace PPTX
ARGB = line.Fill.as<SolidFill>().Color.GetRGBColor(_oTheme, _oClrMap, ARGB);
strAttr = _T(" strokecolor=\"") + GetHexColor(ARGB) + _T("\"");
}
else if (bOle)
strAttr = _T(" stroked=\"f\"");
if (line.w.is_init())
{
......
......@@ -10,8 +10,8 @@ namespace PPTX
{
namespace Logic
{
void CalculateFill(PPTX::Logic::SpPr& oSpPr, nullable<ShapeStyle>& pShapeStyle, smart_ptr<PPTX::WrapperFile>& oTheme, smart_ptr<PPTX::WrapperWritingElement>& oClrMap, CString& strAttr, CString& strNode, bool bOle);
void CalculateLine(PPTX::Logic::SpPr& oSpPr, nullable<ShapeStyle>& pShapeStyle, smart_ptr<PPTX::WrapperFile>& oTheme, smart_ptr<PPTX::WrapperWritingElement>& oClrMap, CString& strAttr, CString& strNode);
void CalculateFill(PPTX::Logic::SpPr& oSpPr, nullable<ShapeStyle>& pShapeStyle, smart_ptr<PPTX::WrapperFile>& oTheme, smart_ptr<PPTX::WrapperWritingElement>& oClrMap, CString& strAttr, CString& strNode, bool bOle = false);
void CalculateLine(PPTX::Logic::SpPr& oSpPr, nullable<ShapeStyle>& pShapeStyle, smart_ptr<PPTX::WrapperFile>& oTheme, smart_ptr<PPTX::WrapperWritingElement>& oClrMap, CString& strAttr, CString& strNode, bool bOle = false);
class SpTreeElem : public WrapperWritingElement
{
......
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