Compare commits

..

7 Commits

Author SHA1 Message Date
2b8efdd9b1 v5.2.4 2018-12-11 16:07:08 +03:00
98a568177d . 2018-11-27 15:26:08 +03:00
f9af786d5a . 2018-11-23 12:19:38 +03:00
394d1e7b38 Remove preload libcef library 2018-11-22 11:24:18 +03:00
45ba99b9bf Up cef version on linux 2018-11-21 16:20:33 +03:00
af7640e736 DocFormat - fix after testing 2018-11-16 18:28:34 +03:00
292781e6fb DocFormat - fix after testing
x2t version up - 2.4.556
2018-11-16 15:50:05 +03:00
11 changed files with 79 additions and 61 deletions

View File

@ -1071,7 +1071,9 @@ namespace DocFileFormat
int cpPic = searchNextTextMark(m_document->Text, cpFieldStart, TextMark::Picture);
int cpFieldEnd = searchNextTextMark( m_document->Text, cpFieldStart, TextMark::FieldEndMark );
if (cpFieldStart < cpPic && cpPic < cpFieldEnd)
bool bStartField = _fieldLevels.empty() ? false : (_fieldLevels.back().bBegin && !_fieldLevels.back().bSeparate);
if (cpFieldStart < cpPic && cpPic < cpFieldEnd && !bStartField)
{
writeField(text, cpFieldStart, cpFieldEnd);
text.clear();

View File

@ -31,6 +31,7 @@
*/
#include "MainDocumentMapping.h"
#include "OfficeDrawing/FillStyleBooleanProperties.h"
namespace DocFileFormat
{
@ -83,16 +84,27 @@ namespace DocFileFormat
if ((m_document->GetOfficeArt()) && (m_document->GetOfficeArt()->GetShapeBackgound()))
{
bool bFilled = true;
m_document->DocProperties->bDisplayBackgroundShape = true;
ShapeContainer* pShape = m_document->GetOfficeArt()->GetShapeBackgound();
m_pXmlWriter->WriteNodeBegin ( L"w:background", TRUE);
m_pXmlWriter->WriteAttribute ( L"w:color", L"FFFFFF");
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
VMLShapeMapping oVmlWriter (m_context, m_pXmlWriter, NULL, NULL, _caller);
pShape->Convert(&oVmlWriter);
m_pXmlWriter->WriteNodeEnd (L"w:background");
OptionEntryPtr boolFill = pShape->ExtractOption(fillStyleBooleanProperties);
FillStyleBooleanProperties booleans(boolFill ? boolFill->op : 0);
if (booleans.fUsefFilled && !booleans.fFilled)
{
bFilled = false;
}
if (bFilled)
{
m_pXmlWriter->WriteNodeBegin ( L"w:background", TRUE);
m_pXmlWriter->WriteAttribute ( L"w:color", L"FFFFFF");
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
VMLShapeMapping oVmlWriter (m_context, m_pXmlWriter, NULL, NULL, _caller);
pShape->Convert(&oVmlWriter);
m_pXmlWriter->WriteNodeEnd (L"w:background");
}
}
m_pXmlWriter->WriteNodeBegin( L"w:body", FALSE );

View File

@ -101,6 +101,24 @@ namespace DocFileFormat
return new ShapeContainer( _reader, bodySize, typeCode, version, instance );
}
OptionEntryPtr ExtractOption(const PropertyId & prop) const
{
OptionEntryPtr ret;
for ( size_t i = 0; i < this->Children.size(); ++i )
{
ShapeOptions* opt = dynamic_cast<ShapeOptions*>( this->Children[i] );
if ( opt == NULL ) continue;
std::map<PropertyId, OptionEntryPtr>::iterator pFind = opt->OptionsByID.find(prop);
if (pFind != opt->OptionsByID.end())
{
ret = pFind->second;
}
}
return ret;
}
std::vector<OptionEntryPtr> ExtractOptions() const
{
std::vector<OptionEntryPtr> ret;

View File

@ -235,7 +235,7 @@ namespace formulasconvert {
{
convert_with_TableName = withTableName;
boost::wregex complexRef(L"\\[(?:\$)?([^\\.]+?){0,1}\\.(\\${0,1}[\\w^0-9]*\\${0,1}\\d*)(?::(\\${0,1}[^\\.]+?){0,1}\\.(\\${0,1}[\\w^0-9]*\\${0,1}\\d*)){0,1}\\]");
boost::wregex complexRef(L"\\[(?:\\$)?([^\\.]+?){0,1}\\.(\\${0,1}[\\w^0-9]*\\${0,1}\\d*)(?::(\\${0,1}[^\\.]+?){0,1}\\.(\\${0,1}[\\w^0-9]*\\${0,1}\\d*)){0,1}\\]");
/*
[ $ Sheet2 . A1 : ( $ Sheet2)? . B5 ]
*/
@ -494,7 +494,7 @@ namespace formulasconvert {
bool isFormula = check_formula(workstr);
boost::regex_replace(
workstr = boost::regex_replace(
workstr,
boost::wregex(L"('.*?')|(\".*?\")"),
&convert_scobci, boost::match_default | boost::format_all);

View File

@ -218,13 +218,6 @@ void xlsx_xml_worksheet::write_to(std::wostream & strm)
CP_XML_ATTR(L"r:id",impl_->vml_drawingId_);
}
}
if (!impl_->tableParts_.str().empty())
{
CP_XML_NODE(L"tableParts")
{
CP_XML_STREAM() << impl_->tableParts_.str();
}
}
if (!impl_->ole_objects_.str().empty())
{
CP_XML_NODE(L"oleObjects")
@ -239,6 +232,13 @@ void xlsx_xml_worksheet::write_to(std::wostream & strm)
CP_XML_STREAM() << impl_->controls_.str();
}
}
if (!impl_->tableParts_.str().empty())
{
CP_XML_NODE(L"tableParts")
{
CP_XML_STREAM() << impl_->tableParts_.str();
}
}
CP_XML_STREAM() << impl_->picture_background_.str();
//CP_XML_NODE(L"headerFooter){}

View File

@ -4769,6 +4769,14 @@ HRESULT CDrawingConverter::SaveObject(LONG lStart, LONG lLength, const std::wstr
if(oPic.oleObject.IsInit())
{
bOle = oPic.oleObject->isValid();
if (oPic.oleObject->m_oDxaOrig.IsInit() == false)
{
oPic.oleObject->m_oDxaOrig = 0;
}
if (oPic.oleObject->m_oDyaOrig.IsInit() == false)
{
oPic.oleObject->m_oDyaOrig = 0;
}
}
}
bool bSignatureLine = false;

View File

@ -323,7 +323,8 @@ namespace PPTX
{
m_OleObjectFile = new OOX::OleObject(NULL, true, pReader->m_nDocumentType == XMLWRITER_DOC_TYPE_DOCX);
std::wstring strOlePath = pReader->GetString(_embed_data_size);
BYTE type = pReader->GetUChar();
std::wstring strOlePath = pReader->GetString2();
m_OleObjectFile->set_filename(strOlePath, false); //temp !!! for ImageManager original file name
}
else if (embedded_type == 4)

View File

@ -37,7 +37,14 @@ mkdir "build"
fi
cef_binary=cef_binary
cef_arch=$cef_binary.7z
cef_url=http://d2ettrnqo7v976.cloudfront.net/cef/3163/$platform$arch/$cef_arch
cef_version="3163"
if [[ "$platform" == *"linux"* ]]
then
cef_version="3202"
fi
cef_url=http://d2ettrnqo7v976.cloudfront.net/cef/$cef_version/$platform$arch/$cef_arch
if [[ "$platform" == *"linux"* ]]
then

View File

@ -1 +1 @@
2.4.555.0
2.4.556.0

View File

@ -398,9 +398,9 @@ int CHtmlFile::Convert(const std::vector<std::wstring>& arFiles, const std::wstr
const char* nenv[4];
nenv[0] = sLibraryDir.c_str();
nenv[1] = "LD_PRELOAD=./libcef.so";
nenv[2] = "DISPLAY=:0";
nenv[3] = NULL;
nenv[1] = "DISPLAY=:0";
nenv[2] = NULL;
nenv[3] = NULL;
execve(sProgramm.c_str(),
(char * const *)nargs,
@ -419,9 +419,8 @@ int CHtmlFile::Convert(const std::vector<std::wstring>& arFiles, const std::wstr
const char* nenv[4];
nenv[0] = sLibraryDir.c_str();
nenv[1] = "LD_PRELOAD=./libcef.so";
nenv[2] = NULL;//"DISPLAY=:99";
nenv[3] = NULL;
nenv[1] = NULL;//"DISPLAY=:99";
nenv[2] = NULL;
execve("/usr/bin/xvfb-run", (char * const *)nargs, (char * const *)nenv);
exit(EXIT_SUCCESS);

View File

@ -16,6 +16,11 @@ CONFIG -= debug_and_release debug_and_release_target
DEFINES += HTMLFILE_USE_DYNAMIC_LIBRARY
DEFINES += UNICODECONVERTER_USE_DYNAMIC_LIBRARY
CORE_ROOT_DIR = $$PWD/../..
PWD_ROOT_DIR = $$PWD
include($$CORE_ROOT_DIR/Common/base.pri)
include($$CORE_ROOT_DIR/Common/3dParty/icu/icu.pri)
CONFIG(debug, debug|release) {
DESTDIR = $$PWD/Debug
} else {
@ -25,41 +30,10 @@ CONFIG(debug, debug|release) {
CONFIG += c++11
TEMPLATE = app
############### destination path ###############
DESTINATION_SDK_PATH = $$PWD/../../build/lib
# WINDOWS
win32:contains(QMAKE_TARGET.arch, x86_64):{
CONFIG(debug, debug|release) {
DESTINATION_SDK_PATH = $$DESTINATION_SDK_PATH/win_64/DEBUG
} else {
DESTINATION_SDK_PATH = $$DESTINATION_SDK_PATH/win_64
}
}
win32:!contains(QMAKE_TARGET.arch, x86_64):{
CONFIG(debug, debug|release) {
DESTINATION_SDK_PATH = $$DESTINATION_SDK_PATH/win_32/DEBUG
} else {
DESTINATION_SDK_PATH = $$DESTINATION_SDK_PATH/win_32
}
}
linux-g++:contains(QMAKE_HOST.arch, x86_64):{
DESTINATION_SDK_PATH = $$DESTINATION_SDK_PATH/linux_64
}
linux-g++:!contains(QMAKE_HOST.arch, x86_64):{
DESTINATION_SDK_PATH = $$DESTINATION_SDK_PATH/linux_32
}
LIBS += -L$$DESTINATION_SDK_PATH -lHtmlFile
LIBS += -L$$DESTINATION_SDK_PATH -lUnicodeConverter
LIBS += -L$$DESTINATION_SDK_PATH -lgraphics
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lUnicodeConverter -lkernel -lgraphics -lHtmlFile
linux-g++ | linux-g++-64 | linux-g++-32 {
QMAKE_LFLAGS += -Wl,--rpath=./
LIBS += $$PWD/../../build/bin/icu/linux_64/libicuuc.so.55
LIBS += $$PWD/../../build/bin/icu/linux_64/libicudata.so.55
message(linux)
}
@ -67,9 +41,6 @@ win32 {
LIBS += -ladvapi32 \
-luser32 \
-lshell32
LIBS += -L$$PWD/../../build/bin/icu/win_64/ -licudt
LIBS += -L$$PWD/../../build/bin/icu/win_64/ -licuuc
}
SOURCES += main.cpp