Commit 7d4e5c86 authored by Elen.Subbotina's avatar Elen.Subbotina Committed by Alexander Trofimov

..... забытое

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@59966 954022d7-b5bf-4e40-9824-e11837661b57
parent e7379f63
......@@ -3,18 +3,18 @@
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* File created by MIDL compiler version 7.00.0555 */
/* at Sun Oct 05 15:10:56 2014
/* File created by MIDL compiler version 7.00.0500 */
/* at Mon Dec 01 19:58:58 2014
*/
/* Compiler settings for .\ASCOfficeOdfFileW.idl:
Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 7.00.0555
Oicf, W1, Zp8, env=Win32 (32b run)
protocol : dce , ms_ext, c_ext
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
DECLSPEC_UUID(), MIDL_INTERFACE()
*/
/* @@MIDL_FILE_HEADING( ) */
//@@MIDL_FILE_HEADING( )
#pragma warning( disable: 4049 ) /* more than 64k source lines */
......
......@@ -10,6 +10,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Oox2OdfConverter", "source\
ProjectSection(ProjectDependencies) = postProject
{E5A67556-44DA-4481-8F87-0A3AEDBD20DD} = {E5A67556-44DA-4481-8F87-0A3AEDBD20DD}
{A100103A-353E-45E8-A9B8-90B87CC5C0B0} = {A100103A-353E-45E8-A9B8-90B87CC5C0B0}
{21663823-DE45-479B-91D0-B4FEF4916EF0} = {21663823-DE45-479B-91D0-B4FEF4916EF0}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ASCOfficeOdfFileWTest", "ASCOfficeOdfFileWTest\ASCOfficeOdfFileWTest.vcproj", "{FBA8446A-150F-4A10-B4DA-1022048D6473}"
......@@ -20,10 +21,15 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DocxFormat", "..\Common\Doc
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ASCOfficeOdfFileW", "ASCOfficeOdfFileW.vcproj", "{6258296E-ABCE-4BC6-9F4A-8522CD615603}"
ProjectSection(ProjectDependencies) = postProject
{A100103A-353E-45E8-A9B8-90B87CC5C0B0} = {A100103A-353E-45E8-A9B8-90B87CC5C0B0}
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6} = {3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}
{BEE01B53-244A-44E6-8947-ED9342D9247E} = {BEE01B53-244A-44E6-8947-ED9342D9247E}
{A100103A-353E-45E8-A9B8-90B87CC5C0B0} = {A100103A-353E-45E8-A9B8-90B87CC5C0B0}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libxml2", "..\..\..\branches\Docx2DoctConverter\ServerComponents\Common\DocxFormat\Source\XML\libxml2\win_build\libxml2.vcproj", "{21663823-DE45-479B-91D0-B4FEF4916EF0}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ASCOfficeUtilsLib", "..\..\..\branches\Docx2DoctConverter\ServerComponents\ASCOfficeUtils\ASCOfficeUtilsLib\Win\ASCOfficeUtilsLib.vcproj", "{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
......@@ -80,6 +86,22 @@ Global
{6258296E-ABCE-4BC6-9F4A-8522CD615603}.ReleaseASC|Win32.Build.0 = Release|Win32
{6258296E-ABCE-4BC6-9F4A-8522CD615603}.ReleaseOpenSource|Win32.ActiveCfg = Release|Win32
{6258296E-ABCE-4BC6-9F4A-8522CD615603}.ReleaseOpenSource|Win32.Build.0 = Release|Win32
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Debug|Win32.ActiveCfg = Debug|Win32
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Debug|Win32.Build.0 = Debug|Win32
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Release|Win32.ActiveCfg = Release|Win32
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Release|Win32.Build.0 = Release|Win32
{21663823-DE45-479B-91D0-B4FEF4916EF0}.ReleaseASC|Win32.ActiveCfg = Release|Win32
{21663823-DE45-479B-91D0-B4FEF4916EF0}.ReleaseASC|Win32.Build.0 = Release|Win32
{21663823-DE45-479B-91D0-B4FEF4916EF0}.ReleaseOpenSource|Win32.ActiveCfg = Release|Win32
{21663823-DE45-479B-91D0-B4FEF4916EF0}.ReleaseOpenSource|Win32.Build.0 = Release|Win32
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Debug|Win32.ActiveCfg = Debug|Win32
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Debug|Win32.Build.0 = Debug|Win32
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Release|Win32.ActiveCfg = Release|Win32
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Release|Win32.Build.0 = Release|Win32
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.ReleaseASC|Win32.ActiveCfg = Release|Win32
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.ReleaseASC|Win32.Build.0 = Release|Win32
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.ReleaseOpenSource|Win32.ActiveCfg = Release|Win32
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.ReleaseOpenSource|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......
......@@ -53,7 +53,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\ASCOfficeOdfFile\include"
PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_USRDLL;_ATL_ATTRIBUTES;STANDALONE_USE=1"
PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_USRDLL;_ATL_ATTRIBUTES;LIBXML_READER_ENABLED;_USE_XMLLITE_READER_;USE_XMLLITE_READER;_USE_LIBXML2_READER_;STANDALONE_USE=1"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
......@@ -149,7 +149,7 @@
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories="..\ASCOfficeOdfFile\include"
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL;_ATL_ATTRIBUTES;STANDALONE_USE=0"
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL;_ATL_ATTRIBUTES;LIBXML_READER_ENABLED;_USE_XMLLITE_READER_;USE_XMLLITE_READER;_USE_LIBXML2_READER_;STANDALONE_USE=0"
RuntimeLibrary="2"
UsePrecompiledHeader="2"
WarningLevel="3"
......
#include "..\oox_shape_defines.h"
namespace cpdoccore
{
class oox_shape_textPlain : public oox_shape
{
public:
oox_shape_textPlain()
{
odf_type_name =L"fontwork-plain-text";
modifiers = L"10800";
enhanced_path = L"M ?f3 0 L ?f5 0 N M ?f6 21600 L ?f7 21600 N";
text_areas = L"0 0 21600 21600";
view_box = L"0 0 21600 21600";
add(L"f0", L"$0 -10800");
add(L"f1", L"?f0 *2");
add(L"f2", L"abs(?f1 )");
add(L"f3", L"if(?f1 ,0,?f2 )");
add(L"f4", L"21600-?f2 ");
add(L"f5", L"if(?f1 ,?f4 ,21600)");
add(L"f6", L"if(?f1 ,?f2 ,0)");
add(L"f7", L"if(?f1 ,21600,?f4 )");
}
};
class oox_shape_textCirclePour : public oox_shape
{
public:
oox_shape_textCirclePour ()
{
odf_type_name =L"fontwork-circle-pour";
modifiers = L"-179 5400";
enhanced_path = L"W 0 0 21600 21600 ?f2 ?f3 ?f2 ?f4 N W ?f5 ?f5 ?f11 ?f11 ?f8 ?f9 ?f8 ?f10 N";
text_areas = L"0 0 21600 21600";
view_box = L"0 0 21600 21600";
add(L"f0", L"10800*cos($0 *(pi/180))");
add(L"f1", L"10800*sin($0 *(pi/180))");
add(L"f2", L"?f0 +10800");
add(L"f3", L"?f1 +10800");
add(L"f4", L"21600-?f3 ");
add(L"f5", L"10800-$1 ");
add(L"f6", L"?f5 *cos($0 *(pi/180))");
add(L"f7", L"?f5 *sin($0 *(pi/180))");
add(L"f8", L"?f6 +10800");
add(L"f9", L"?f7 +10800");
add(L"f10", L"21600-?f9 ");
add(L"f11", L"21600-?f5 ");
add(L"f12", L"21600");
//<draw:handle draw:handle-position="$1 $0" draw:handle-polar="10800 10800" draw:handle-radius-range-minimum="0" draw:handle-radius-range-maximum="10800");
}
};
class oox_shape_textSlantUp : public oox_shape
{
public:
oox_shape_textSlantUp()
{
odf_type_name =L"fontwork-slant-up";
modifiers = L"50000";
enhanced_path = L"M ?f20 ?f2 L ?f21 ?f2 N M ?f22 ?f3 L ?f23 ?f3 N";
text_areas = L"?f24 ?f26 ?f25 ?f27";
view_box = L"0 0 21600 21600";
add(L"f0", L"left");
add(L"f1", L"right");
add(L"f2", L"top");
add(L"f3", L"bottom");
add(L"f4", L"?f3 - ?f2");
add(L"f5", L"?f1 - ?f0");
add(L"f6", L"?f5 / 2");
add(L"f7", L"?f0 + ?f6");
add(L"f8", L"?f5 / 21600");
add(L"f9", L"?f4 / 21600");
add(L"f10", L"$0");
add(L"f11", L"?f10 * ?f5 / 100000");
add(L"f12", L"?f11 - ?f7");
add(L"f13", L"?f11 - ?f0");
add(L"f14", L"?f1 - ?f11");
add(L"f15", L"?f13 * 2");
add(L"f16", L"?f14 * 2");
add(L"f17", L"if(?f12, ?f16, ?f15)");
add(L"f18", L"?f0 + ?f17");
add(L"f19", L"?f1 - ?f17");
add(L"f20", L"if(?f12, ?f0, ?f19)");
add(L"f21", L"if(?f12, ?f18, ?f1)");
add(L"f22", L"if(?f12, ?f19, ?f0)");
add(L"f23", L"if(?f12, ?f1, ?f18)");
add(L"f24", L"0 / ?f8");
add(L"f25", L"21600 / ?f8");
add(L"f26", L"0 / ?f9");
add(L"f27", L"21600 / ?f9");
}
};
}
\ No newline at end of file
......@@ -40,8 +40,8 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\ASCOfficeOdfFile\src\odf\datatypes;.\OdfFormat;.\Oox2OdfConverter;..\..\Common\DocxFormat\Source;..\..\Common\DocxFormat\Source\XML;..\..\ASCOfficeOdfFile\include;..\..\ASCOfficeOdfFile\3dparty\utf8cpp\include;..\..\ASCOfficePPTXFile\PPTXFormat\"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;USE_LITE_READER;_USE_XMLLITE_READER_;_DOCWRAPPER_"
AdditionalIncludeDirectories="../../ASCOfficeOdfFile/src/odf/datatypes;./OdfFormat;./Oox2OdfConverter;../../Common/DocxFormat/Source;../../Common/DocxFormat/Source/XML;../../ASCOfficeOdfFile\include;../../ASCOfficeOdfFile/3dparty/utf8cpp/include;../../ASCOfficePPTXFile/PPTXFormat/;../Common/DocxFormat/Source/XML/libxml2/XML/include;../"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LIBXML_READER_ENABLED;_USE_XMLLITE_READER_;USE_XMLLITE_READER;_USE_LIBXML2_READER_;_DOCWRAPPER_"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
......@@ -103,8 +103,8 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\ASCOfficeOdfFile\src\odf\datatypes;.\OdfFormat;.\Oox2OdfConverter;..\..\Common\DocxFormat\Source;..\..\Common\DocxFormat\Source\XML;..\..\ASCOfficeOdfFile\include;..\..\ASCOfficeOdfFile\3dparty\utf8cpp\include;..\..\ASCOfficePPTXFile\PPTXFormat\"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_USE_XMLLITE_READER_;USE_LITE_READER"
AdditionalIncludeDirectories="../../ASCOfficeOdfFile/src/odf/datatypes;./OdfFormat;./Oox2OdfConverter;../../Common/DocxFormat/Source;../../Common/DocxFormat/Source/XML;../../ASCOfficeOdfFile\include;../../ASCOfficeOdfFile/3dparty/utf8cpp/include;../../ASCOfficePPTXFile/PPTXFormat/;../Common/DocxFormat/Source/XML/libxml2/XML/include;../"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LIBXML_READER_ENABLED;_USE_XMLLITE_READER_;USE_XMLLITE_READER;_USE_LIBXML2_READER_"
RuntimeLibrary="2"
UsePrecompiledHeader="2"
WarningLevel="3"
......@@ -168,6 +168,26 @@
RelativePath=".\Oox2OdfConverter\DocxConverter.cpp"
>
</File>
<File
RelativePath="..\..\Common\DocxFormat\Source\XML\libxml2\libxml2.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
</File>
<File
RelativePath=".\Oox2OdfConverter\stdafx.cpp"
>
......
#include "stdAfx.h"
#include "Converter.h"
#include "../utils.h"
#include <DocxFormat\Diagram\DiagramDrawing.h>
#include "odf_conversion_context.h"
#include "odf_text_context.h"
#include "odf_drawing_context.h"
namespace Oox2Odf
{
void OoxConverter::convert(OOX::Diagram::CShapeTree *oox_shape_tree)
{
if (oox_shape_tree == NULL) return;
odf_context()->drawing_context()->start_group();
cpdoccore::_CP_OPT(double) x, y , ch_x , ch_y ;
odf_context()->drawing_context()->set_group_position(x, y, ch_x, ch_y);
for (long i=0 ;i < oox_shape_tree->m_arrItems.size(); i++)
{
convert(oox_shape_tree->m_arrItems[i]);
}
odf_context()->drawing_context()->end_group();
}
void OoxConverter::convert(OOX::Diagram::CShape *oox_shape)
{
if (oox_shape == NULL) return;
if (!oox_shape->m_oSpPr.IsInit()) return;
odf_context()->drawing_context()->start_drawing();
int type = -1;
if (oox_shape->m_oSpPr->m_oPrstGeom.IsInit())
{
OOX::Drawing::CPresetGeometry2D * geometry = oox_shape->m_oSpPr->m_oPrstGeom.GetPointer();
type =(geometry->m_oPrst.GetValue());
}
if (type < 0 && oox_shape->m_oSpPr->m_oCustGeom.IsInit())
{
type = 1000;//6??? - poligon, path
}
//if (oox_shape->m_oNvSpPr.IsInit() && oox_shape->m_oNvSpPr->m_oCNvSpPr.IsInit() && ?????
// oox_shape->m_oNvSpPr->m_oCNvSpPr->m_otxBox.GetValue() == 1) type = 2000; //textBox
if (type == SimpleTypes::shapetypeRect && oox_shape->m_oTxBody.IsInit()) type = 2000;
if (type == 2000 && oox_shape->m_oTxBody->m_oBodyPr.IsInit() && oox_shape->m_oTxBody->m_oBodyPr->m_oFromWordArt.ToBool())
{
int wordart_type = convert(oox_shape->m_oTxBody->m_oBodyPr->m_oPrstTxWrap.GetPointer());
if (wordart_type >0)type = wordart_type;
}
if (type < 0)return;
/////////////////////////////////////////////////////////////////////////////////
odf_context()->drawing_context()->start_shape(type);
convert(oox_shape->m_oSpPr.GetPointer(), oox_shape->m_oShapeStyle.GetPointer());
//, , ...
//if (oox_shape->m_oNvSpPr.IsInit())
// convert(oox_shape->m_oNvSpPr->m_oCNvPr.GetPointer());
if ( oox_shape->m_oTxBody.IsInit() && oox_shape->m_oTxBody->m_arrItems.size() >0)
{
odf_context()->start_text_context();
for (long i=0 ; i < oox_shape->m_oTxBody->m_arrItems.size();i++)
{
convert(oox_shape->m_oTxBody->m_arrItems[i]);
}
odf_context()->drawing_context()->set_text( odf_context()->text_context());
//
convert(oox_shape->m_oTxBody->m_oBodyPr.GetPointer());
if (oox_shape->m_oShapeStyle.IsInit() && oox_shape->m_oShapeStyle->m_oFontRef.getType() == OOX::et_a_fontRef)
{
convert(&oox_shape->m_oShapeStyle->m_oFontRef);
}
odf_context()->end_text_context();
}
odf_context()->drawing_context()->end_shape();
odf_context()->drawing_context()->end_drawing();
}
}
#pragma once
#include <boost_filesystem_version.h>
#include <boost/lexical_cast.hpp>
#include <cpdoccore/CPOptional.h>
#include <atlcoll.h>
#include "..\..\..\Common\boost_filesystem_version.h"
#include "..\progressCallback.h"
......
This diff is collapsed.
......@@ -2,6 +2,6 @@
//1
//2
//0
//174
#define INTVER 1,2,0,174
#define STRVER "1,2,0,174\0"
//176
#define INTVER 1,2,0,176
#define STRVER "1,2,0,176\0"
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