Commit 4c06d217 authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander Trofimov

XlsFormatLib перименованы .cpp из-за которых возникали конфликты .obj файлов...

XlsFormatLib перименованы .cpp из-за которых возникали конфликты .obj файлов при сборке(MsVs делает переименование в настройках проекта, qt - нет);x2t убрана зависимость от qtcore; в функцию fromSpreadsheet добавлена конвертация xls; ASCSVGWriter изменил местоположение; WMFToImageConverter правка для конвертации wmf(могут приходить размеры < 1)

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@64194 954022d7-b5bf-4e40-9824-e11837661b57
parent 93cd2489
#-------------------------------------------------
#
# Project created by QtCreator 2014-10-10T14:24:04
#
#-------------------------------------------------
QT -= core gui
TARGET = ASCHTMLRendererLib
TEMPLATE = lib
CONFIG += staticlib
win32 {
QMAKE_CXXFLAGS_RELEASE -= -Zc:strictStrings
} else {
QMAKE_CXXFLAGS += -std=c++11 -Wall -Wno-ignored-qualifiers
}
############### destination path ###############
DESTINATION_SDK_PATH = $$PWD/../../SDK/lib
# WINDOWS
win32:contains(QMAKE_TARGET.arch, x86_64):{
CONFIG(debug, debug|release) {
DESTDIR = $$DESTINATION_SDK_PATH/win_64/DEBUG
} else {
DESTDIR = $$DESTINATION_SDK_PATH/win_64
}
}
win32:!contains(QMAKE_TARGET.arch, x86_64):{
CONFIG(debug, debug|release) {
DESTDIR = $$DESTINATION_SDK_PATH/win_32/DEBUG
} else {
DESTDIR = $$DESTINATION_SDK_PATH/win_32
}
}
linux-g++:contains(QMAKE_HOST.arch, x86_64):{
DESTDIR = $$DESTINATION_SDK_PATH/linux_64
}
linux-g++:!contains(QMAKE_HOST.arch, x86_64):{
DESTDIR = $$DESTINATION_SDK_PATH/linux_32
}
############### destination path ###############
DEFINES += UNICODE \
_UNICODE \
NODOCX \
DESKTOP_EDITOR_GRAPHICS
#################### LINUX ########################
linux-g++ | linux-g++-64 | linux-g++-32 {
DEFINES += \
LINUX \
_LINUX \
_LINUX_QT
}
#################### LINUX ########################
INCLUDEPATH += \
../../DesktopEditor/freetype-2.5.2/include \
../../DesktopEditor/agg-2.4/include
SOURCES += ../ASCSVGWriter.cpp \
../CASCSVGRenderer.cpp \
../CMetafile.cpp \
../CASCImage.cpp
HEADERS += ../ASCSVGWriter.h \
../CASCImage.h \
../CASCSVGRenderer.h \
../CMetafile.h \
../Writer/Common.h \
../Writer/Const.h \
../IBaseMatrixUpdater.h \
../Writer/TextItem.h \
../Writer/StringWriter.h \
../Writer/SVGWriter.h \
../Writer/VectorGraphicsWriter2.h \
../Writer/VMLWriter.h
unix {
target.path = /usr/lib
INSTALLS += target
}
#-------------------------------------------------
#
# Project created by QtCreator 2014-10-10T14:24:04
#
#-------------------------------------------------
QT -= core gui
TARGET = ASCHTMLRendererLib
TEMPLATE = lib
CONFIG += staticlib
win32 {
QMAKE_CXXFLAGS_RELEASE -= -Zc:strictStrings
} else {
QMAKE_CXXFLAGS += -std=c++11 -Wall -Wno-ignored-qualifiers
}
############### destination path ###############
DESTINATION_SDK_PATH = $$PWD/../../SDK/lib
# WINDOWS
win32:contains(QMAKE_TARGET.arch, x86_64):{
CONFIG(debug, debug|release) {
DESTDIR = $$DESTINATION_SDK_PATH/win_64/DEBUG
} else {
DESTDIR = $$DESTINATION_SDK_PATH/win_64
}
}
win32:!contains(QMAKE_TARGET.arch, x86_64):{
CONFIG(debug, debug|release) {
DESTDIR = $$DESTINATION_SDK_PATH/win_32/DEBUG
} else {
DESTDIR = $$DESTINATION_SDK_PATH/win_32
}
}
linux-g++:contains(QMAKE_HOST.arch, x86_64):{
DESTDIR = $$DESTINATION_SDK_PATH/linux_64
}
linux-g++:!contains(QMAKE_HOST.arch, x86_64):{
DESTDIR = $$DESTINATION_SDK_PATH/linux_32
}
############### destination path ###############
DEFINES += UNICODE \
_UNICODE \
NODOCX \
DESKTOP_EDITOR_GRAPHICS
#################### LINUX ########################
linux-g++ | linux-g++-64 | linux-g++-32 {
DEFINES += \
LINUX \
_LINUX \
_LINUX_QT
}
#################### LINUX ########################
INCLUDEPATH += \
../../DesktopEditor/freetype-2.5.2/include \
../../DesktopEditor/agg-2.4/include
SOURCES += \
../CASCSVGRenderer.cpp \
../CMetafile.cpp \
../CASCImage.cpp \
../../HtmlRenderer/src/ASCSVGWriter.cpp
HEADERS += \
../CASCImage.h \
../CASCSVGRenderer.h \
../CMetafile.h \
../Writer/Common.h \
../Writer/Const.h \
../IBaseMatrixUpdater.h \
../Writer/TextItem.h \
../Writer/StringWriter.h \
../Writer/SVGWriter.h \
../Writer/VectorGraphicsWriter2.h \
../Writer/VMLWriter.h \
../../HtmlRenderer/include/ASCSVGWriter.h
unix {
target.path = /usr/lib
INSTALLS += target
}
#pragma once
#pragma once
#if defined(_WIN32) || defined (_WIN64)
#include <atlwin.h>
......@@ -6,7 +6,7 @@
#include <atlcoll.h>
#endif
#include "../../DesktopEditor/graphics/IRenderer.h"
#include "../../ASCHTMLRenderer/ASCSVGWriter.h"
#include "../../HtmlRenderer/include/ASCSVGWriter.h"
#include "../../ASCHTMLRenderer/CASCImage.h"
#include "../../Common/DocxFormat/Source/SystemUtility/File.h"
......@@ -109,7 +109,7 @@ namespace NSWMFToImageConverter
if (NULL == pRenderer)
return;
// Brush, Font, Pen, Shadow ..
// Запоминаем все настройки Brush, Font, Pen, Shadow и т.д.
LONG brush_Alpha1 = 0;
LONG brush_Alpha2 = 0;
LONG brush_Color1 = 0;
......@@ -160,6 +160,10 @@ namespace NSWMFToImageConverter
LONG _lh = 0;
oASCImage.get_Width(&_lw);
oASCImage.get_Height(&_lh);
if(_lw <= 0)
_lw = 1;
if(_lh <= 0)
_lh = 1;
LONG lMax = (std::max) (_lw, _lh);
double dKoef = 1000.0 / lMax;
......@@ -173,7 +177,7 @@ namespace NSWMFToImageConverter
oASCImage.DrawOnRenderer( pRenderer, 0, 0, dW, dH );
//
// Восстанавливаем параметры
pRenderer->put_BrushAlpha1( brush_Alpha1 );
pRenderer->put_BrushAlpha2( brush_Alpha2 );
pRenderer->put_BrushColor1( brush_Color1 );
......@@ -194,7 +198,7 @@ namespace NSWMFToImageConverter
pRenderer->put_PenAlpha( pen_Alpha );
pRenderer->put_PenColor( pen_Color );
// path
// на всякий случай скидываем path
pRenderer->PathCommandEnd();
}
public:
......
......@@ -177,7 +177,7 @@ namespace STR
const std::string int2str(const int val, const int radix)
{
static char num_buf[10]={};
#if defined(_WIN64) || defined(_WIN64)
#if defined(_WIN32) || defined(_WIN64)
_itoa_s(val, num_buf, 9, radix);
#else
sprintf( num_buf, "%d", val);
......@@ -188,7 +188,7 @@ const std::string int2str(const int val, const int radix)
const std::wstring int2wstr(const int val, const int radix)
{
#if defined(_WIN64) || defined(_WIN64)
#if defined(_WIN32) || defined(_WIN64)
static wchar_t num_buf[10]={};
_itow_s(val, num_buf, 9, radix);
return std::wstring(num_buf);
......@@ -226,7 +226,7 @@ const std::string bin2str(const char* buf, const size_t nbuf)
const std::wstring guid2bstr(const _GUID_ guid)
{
std::wstring guid_ret;
#if defined(_WIN64) || defined(_WIN64)
#if defined(_WIN32) || defined(_WIN64)
LPOLESTR guid_str;
GUID guid1={};
memcpy(&guid1, &guid, sizeof(GUID));
......@@ -254,7 +254,7 @@ const std::string guid2str(const _GUID_ guid)
const bool bstr2guid(const std::wstring & guid_str, _GUID_& guid)
{
#if defined(_WIN64) || defined(_WIN64)
#if defined(_WIN32) || defined(_WIN64)
GUID guid1={};
HRESULT res = IIDFromString((LPWSTR)(guid_str.c_str()), &guid1);
......@@ -283,7 +283,7 @@ const std::wstring int2hex_wstr(const int val, const size_t size_of)
if(size_of > 4) return L"";
#if defined(_WIN64) || defined(_WIN64)
#if defined(_WIN32) || defined(_WIN64)
static wchar_t num_buf[10]={};
std::wstring wstr = STR::int2wstr(size_of << 1, 10);
swprintf_s(num_buf, 9, (L"%0" + wstr + L"X").c_str(), val);
......
......@@ -15,7 +15,7 @@ void DXFNum::setIsUserDefined(const bool is_user_defined)
const bool DXFNum::getIsUserDefined() const
{
return is_user_defined_;
return true == is_user_defined_;
}
......
......@@ -655,62 +655,62 @@ SOURCES += \
../XlsFormat/Logic/Biff_structures/ODRAW/OfficeArtTertiaryFOPT.cpp \
../XlsFormat/Logic/Biff_structures/ODRAW/SimpleOfficeArtContainers.cpp \
../XlsFormat/Logic/Biff_unions/AI.cpp \
../XlsFormat/Logic/Biff_unions/ATTACHEDLABEL.cpp \
../XlsFormat/Logic/Biff_unions/AUTOFILTER.cpp \
../XlsFormat/Logic/Biff_unions/ATTACHEDLABEL_bu.cpp \
../XlsFormat/Logic/Biff_unions/AUTOFILTER_bu.cpp \
../XlsFormat/Logic/Biff_unions/AXES.cpp \
../XlsFormat/Logic/Biff_unions/AXISPARENT.cpp \
../XlsFormat/Logic/Biff_unions/AXISPARENT_bu.cpp \
../XlsFormat/Logic/Biff_unions/AXM.cpp \
../XlsFormat/Logic/Biff_unions/AXS.cpp \
../XlsFormat/Logic/Biff_unions/BACKGROUND.cpp \
../XlsFormat/Logic/Biff_unions/BIGNAME.cpp \
../XlsFormat/Logic/Biff_unions/BIGNAME_bu.cpp \
../XlsFormat/Logic/Biff_unions/BUNDLESHEET.cpp \
../XlsFormat/Logic/Biff_unions/CELL.cpp \
../XlsFormat/Logic/Biff_unions/CELL_bu.cpp \
../XlsFormat/Logic/Biff_unions/CELLTABLE.cpp \
../XlsFormat/Logic/Biff_unions/CHART.cpp \
../XlsFormat/Logic/Biff_unions/CHART_bu.cpp \
../XlsFormat/Logic/Biff_unions/CHARTFOMATS.cpp \
../XlsFormat/Logic/Biff_unions/COLUMNS.cpp \
../XlsFormat/Logic/Biff_unions/CONDFMT.cpp \
../XlsFormat/Logic/Biff_unions/CONDFMT12.cpp \
../XlsFormat/Logic/Biff_unions/CONDFMT_bu.cpp \
../XlsFormat/Logic/Biff_unions/CONDFMT12_bu.cpp \
../XlsFormat/Logic/Biff_unions/CONDFMTS.cpp \
../XlsFormat/Logic/Biff_unions/CRT.cpp \
../XlsFormat/Logic/Biff_unions/CRTMLFRT.cpp \
../XlsFormat/Logic/Biff_unions/CRTMLFRT_bu.cpp \
../XlsFormat/Logic/Biff_unions/CUSTOMVIEW.cpp \
../XlsFormat/Logic/Biff_unions/DAT.cpp \
../XlsFormat/Logic/Biff_unions/DAT_bu.cpp \
../XlsFormat/Logic/Biff_unions/DBQUERY.cpp \
../XlsFormat/Logic/Biff_unions/DBQUERYEXT.cpp \
../XlsFormat/Logic/Biff_unions/DCON.cpp \
../XlsFormat/Logic/Biff_unions/DBQUERYEXT_bu.cpp \
../XlsFormat/Logic/Biff_unions/DCON_bu.cpp \
../XlsFormat/Logic/Biff_unions/DFTTEXT.cpp \
../XlsFormat/Logic/Biff_unions/DOCROUTE.cpp \
../XlsFormat/Logic/Biff_unions/DOCROUTE_bu.cpp \
../XlsFormat/Logic/Biff_unions/DREF.cpp \
../XlsFormat/Logic/Biff_unions/DROPBAR.cpp \
../XlsFormat/Logic/Biff_unions/DVAL.cpp \
../XlsFormat/Logic/Biff_unions/DROPBAR_bu.cpp \
../XlsFormat/Logic/Biff_unions/DVAL_bu.cpp \
../XlsFormat/Logic/Biff_unions/DVAXIS.cpp \
../XlsFormat/Logic/Biff_unions/FEAT.cpp \
../XlsFormat/Logic/Biff_unions/FEAT_bu.cpp \
../XlsFormat/Logic/Biff_unions/FEAT11.cpp \
../XlsFormat/Logic/Biff_unions/FNGROUPS.cpp \
../XlsFormat/Logic/Biff_unions/FONTLIST.cpp \
../XlsFormat/Logic/Biff_unions/FORMATTING.cpp \
../XlsFormat/Logic/Biff_unions/FORMULA.cpp \
../XlsFormat/Logic/Biff_unions/FRAME.cpp \
../XlsFormat/Logic/Biff_unions/GELFRAME.cpp \
../XlsFormat/Logic/Biff_unions/FORMULA_bu.cpp \
../XlsFormat/Logic/Biff_unions/FRAME_bu.cpp \
../XlsFormat/Logic/Biff_unions/GELFRAME_bu.cpp \
../XlsFormat/Logic/Biff_unions/GLOBALS.cpp \
../XlsFormat/Logic/Biff_unions/HLINK.cpp \
../XlsFormat/Logic/Biff_unions/HLINK_bu.cpp \
../XlsFormat/Logic/Biff_unions/INTERFACE.cpp \
../XlsFormat/Logic/Biff_unions/IVAXIS.cpp \
../XlsFormat/Logic/Biff_unions/LBL.cpp \
../XlsFormat/Logic/Biff_unions/LBL_bu.cpp \
../XlsFormat/Logic/Biff_unions/LD.cpp \
../XlsFormat/Logic/Biff_unions/MACROSORTANDFILTER.cpp \
../XlsFormat/Logic/Biff_unions/MDBLOCK.cpp \
../XlsFormat/Logic/Biff_unions/MDTINFO.cpp \
../XlsFormat/Logic/Biff_unions/MDXSTR.cpp \
../XlsFormat/Logic/Biff_unions/MDTINFO_bu.cpp \
../XlsFormat/Logic/Biff_unions/MDXSTR_bu.cpp \
../XlsFormat/Logic/Biff_unions/MDXTUPLESET.cpp \
../XlsFormat/Logic/Biff_unions/METADATA.cpp \
../XlsFormat/Logic/Biff_unions/MSODRAWINGGROUP.cpp \
../XlsFormat/Logic/Biff_unions/OBJ.cpp \
../XlsFormat/Logic/Biff_unions/MSODRAWINGGROUP_bu.cpp \
../XlsFormat/Logic/Biff_unions/OBJ_bu.cpp \
../XlsFormat/Logic/Biff_unions/OBJECTS.cpp \
../XlsFormat/Logic/Biff_unions/PAGESETUP.cpp \
../XlsFormat/Logic/Biff_unions/PHONETICINFO.cpp \
../XlsFormat/Logic/Biff_unions/PICF.cpp \
../XlsFormat/Logic/Biff_unions/PHONETICINFO_bu.cpp \
../XlsFormat/Logic/Biff_unions/PICF_bu.cpp \
../XlsFormat/Logic/Biff_unions/PIVOTADDL.cpp \
../XlsFormat/Logic/Biff_unions/PIVOTCACHEDEFINITION.cpp \
../XlsFormat/Logic/Biff_unions/PIVOTCORE.cpp \
......@@ -731,7 +731,7 @@ SOURCES += \
../XlsFormat/Logic/Biff_unions/PRFILTER.cpp \
../XlsFormat/Logic/Biff_unions/PROTECTION.cpp \
../XlsFormat/Logic/Biff_unions/PROTECTION_COMMON.cpp \
../XlsFormat/Logic/Biff_unions/QSIR.cpp \
../XlsFormat/Logic/Biff_unions/QSIR_bu.cpp \
../XlsFormat/Logic/Biff_unions/QUERYTABLE.cpp \
../XlsFormat/Logic/Biff_unions/RECORD12.cpp \
../XlsFormat/Logic/Biff_unions/RTD.cpp \
......@@ -742,13 +742,13 @@ SOURCES += \
../XlsFormat/Logic/Biff_unions/SHAPEPROPS.cpp \
../XlsFormat/Logic/Biff_unions/SHAREDSTRINGS.cpp \
../XlsFormat/Logic/Biff_unions/SHFMLA_SET.cpp \
../XlsFormat/Logic/Biff_unions/SORT.cpp \
../XlsFormat/Logic/Biff_unions/SORT_bu.cpp \
../XlsFormat/Logic/Biff_unions/SORTANDFILTER.cpp \
../XlsFormat/Logic/Biff_unions/SORTDATA12.cpp \
../XlsFormat/Logic/Biff_unions/SS.cpp \
../XlsFormat/Logic/Biff_unions/STYLES.cpp \
../XlsFormat/Logic/Biff_unions/SUB.cpp \
../XlsFormat/Logic/Biff_unions/SUPBOOK.cpp \
../XlsFormat/Logic/Biff_unions/SUPBOOK_bu.cpp \
../XlsFormat/Logic/Biff_unions/SXADDLAUTOSORT.cpp \
../XlsFormat/Logic/Biff_unions/SXADDLCACHE.cpp \
../XlsFormat/Logic/Biff_unions/SXADDLCACHE12.cpp \
......@@ -772,15 +772,15 @@ SOURCES += \
../XlsFormat/Logic/Biff_unions/SXADDLSXMGS.cpp \
../XlsFormat/Logic/Biff_unions/SXADDLSXRULE.cpp \
../XlsFormat/Logic/Biff_unions/SXSRC.cpp \
../XlsFormat/Logic/Biff_unions/SXTBL.cpp \
../XlsFormat/Logic/Biff_unions/TABLESTYLES.cpp \
../XlsFormat/Logic/Biff_unions/SXTBL_bu.cpp \
../XlsFormat/Logic/Biff_unions/TABLESTYLES_bu.cpp \
../XlsFormat/Logic/Biff_unions/TEXTOBJECT.cpp \
../XlsFormat/Logic/Biff_unions/TEXTPROPS.cpp \
../XlsFormat/Logic/Biff_unions/THEME.cpp \
../XlsFormat/Logic/Biff_unions/THEME_bu.cpp \
../XlsFormat/Logic/Biff_unions/UNKNOWNFRT.cpp \
../XlsFormat/Logic/Biff_unions/WINDOW.cpp \
../XlsFormat/Logic/Biff_unions/XFS.cpp \
../XlsFormat/Logic/SummaryInformationStream/Structures/Property.cpp \
../XlsFormat/Logic/SummaryInformationStream/Structures/Property_Structures.cpp \
../XlsFormat/Logic/SummaryInformationStream/Structures/PropertyFactory.cpp \
../XlsFormat/Logic/SummaryInformationStream/Structures/PropertySet.cpp \
../XlsFormat/Logic/SummaryInformationStream/Structures/PropertySetStream.cpp \
......
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