Compare commits

...

7 Commits

12 changed files with 42 additions and 25 deletions

View File

@ -594,7 +594,8 @@ void a::docx_convert(oox::docx_conversion_context & Context)
}
style_instance * styleInst = NULL;
style_text_properties_ptr tempStyleTextProp;
if (!text_style_name_.empty())
styleInst = Context.root()->odf_context().styleContainer().style_by_name(text_style_name_, style_family::Text, Context.process_headers_footers_);
else if (false == Context.is_table_content())
@ -616,8 +617,6 @@ void a::docx_convert(oox::docx_conversion_context & Context)
}
else
{
style_text_properties_ptr tempStyleTextProp;
const std::wstring id = Context.styles_map_.get( styleInst->name(), styleInst->type() );
tempStyleTextProp = style_text_properties_ptr( new style_text_properties(id) );
Context.push_text_properties( tempStyleTextProp.get() );

View File

@ -345,13 +345,13 @@ void text_list_level_style_number::docx_convert(oox::docx_conversion_context & C
{
switch(text_list_level_style_number_attr_.common_num_format_attlist_.style_num_format_->get_type())
{
case odf_types::style_numformat::romanUc: num_format= L"romanUc"; break;
case odf_types::style_numformat::romanLc: num_format= L"romanLc"; break;
case odf_types::style_numformat::alphaUc: num_format= L"alphaUc"; break;
case odf_types::style_numformat::alphaLc: num_format= L"alphaLc"; break;
case odf_types::style_numformat::romanUc: num_format= L"upperRoman"; break;
case odf_types::style_numformat::romanLc: num_format= L"lowerRoman"; break;
case odf_types::style_numformat::alphaUc: num_format= L"upperLetter"; break;
case odf_types::style_numformat::alphaLc: num_format= L"lowerLetter"; break;
case odf_types::style_numformat::arabic:
default:
num_format= L"arabic"; break;
num_format= L"decimal"; break;
}
}
CP_XML_ATTR(L"w:val", num_format);

View File

@ -99,6 +99,7 @@ namespace
case XmlUtils::XmlNodeType_DocumentType:
return typeDocumentType;
case XmlUtils::XmlNodeType_Whitespace:
case XmlUtils::XmlNodeType_SIGNIFICANT_WHITESPACE:
return typeWhitespace;
case XmlUtils::XmlNodeType_EndElement:
return typeEndElement;

View File

@ -30,8 +30,8 @@ fi
echo "$platform$arch"
if [ ! -f Makefile ]; then
perl ./Configure $platform$arch
./config
#perl ./Configure $platform$arch
./config no-shared no-asm
fi
make

View File

@ -1,12 +1,8 @@
core_linux {
#DEFINES += XMLSEC_OPENSSL_110
#INCLUDEPATH += $$CORE_ROOT_DIR/Common/3dParty/openssl/openssl/include
#LIBS += -L$$CORE_ROOT_DIR/Common/3dParty/openssl/openssl -lssl
#LIBS += -L$$CORE_ROOT_DIR/Common/3dParty/openssl/openssl -lcrypto
INCLUDEPATH += $$PWD/openssl/include
#INCLUDEPATH += /usr/include/openssl
LIBS += -lssl
LIBS += -lcrypto
LIBS += -L$$PWD/openssl/libssl.a
LIBS += -L$$PWD/openssl/libcrypto.a
}

View File

@ -1,6 +1,10 @@
VERSION = 2.4.537.0
VERSION = $$cat(version.txt)
DEFINES += INTVER=$$VERSION
QMAKE_TARGET_COMPANY = Ascensio System SIA
QMAKE_TARGET_COPYRIGHT = Ascensio System SIA Copyright (c) 2018
# CONFIGURATION
CONFIG(debug, debug|release) {
CONFIG += core_debug

1
Common/version.txt Normal file
View File

@ -0,0 +1 @@
2.4.537.0

View File

@ -211,7 +211,8 @@ namespace XmlUtils
if ((XmlNodeType_Element == eNodeType && nCurDepth == nDepth + 1)
|| ((XmlNodeType_Text == eNodeType ||
XmlNodeType_Whitespace == eNodeType) && nCurDepth == nDepth + 1))
XmlNodeType_Whitespace == eNodeType ||
XmlNodeType_SIGNIFICANT_WHITESPACE == eNodeType ) && nCurDepth == nDepth + 1))
return true;
else if (XmlNodeType_EndElement == eNodeType && nCurDepth == nDepth)
return false;

View File

@ -358,7 +358,7 @@ namespace XPS
ReadAttribute(oReader, L"Source", wsSource);
if (!wsSource.empty())
{
std::wstring wsPath = m_wsRootPath + wsSource.c_str();
std::wstring wsPath = m_wsRootPath + wsSource.c_stdstr();
pState->PushResource(m_pDocument->GetStaticResource(wsPath.c_str()), false);
}
else
@ -687,7 +687,14 @@ namespace XPS
if (oEntry.bGid)
pRenderer->CommandDrawTextExCHAR(oEntry.nUnicode, oEntry.nGid, xpsUnitToMM(dXorigin), xpsUnitToMM(dYorigin), 0, 0);
else
pRenderer->CommandDrawTextCHAR(oEntry.nUnicode, xpsUnitToMM(dXorigin), xpsUnitToMM(dYorigin), 0, 0);
{
LONG nRenType = 0;
pRenderer->get_Type(&nRenType);
if (c_nGrRenderer == nRenType)
pRenderer->put_FontStringGID(FALSE);
pRenderer->CommandDrawTextCHAR(oEntry.nUnicode, xpsUnitToMM(dXorigin), xpsUnitToMM(dYorigin), 0, 0);
}
if (bNeedBold)
{

View File

@ -152,13 +152,13 @@ namespace XPS
}
bool CImageBrush::SetToRenderer(IRenderer* pRenderer)
{
std::wstring wsPath = m_wsRoot.c_str();
wsPath += m_wsPath.c_str();
std::wstring wsPath = m_wsRoot.c_stdstr();
wsPath += m_wsPath.c_stdstr();
if (!NSFile::CFileBinary::Exists(wsPath))
{
wsPath = m_wsPage.c_str();
wsPath += m_wsPath.c_str();
wsPath = m_wsPage.c_stdstr();
wsPath += m_wsPath.c_stdstr();
if (!NSFile::CFileBinary::Exists(wsPath))
return false;
}

View File

@ -186,6 +186,13 @@ namespace XPS
return (const wchar_t*)m_pBuffer;
}
const std::wstring CWString::c_stdstr() const
{
const wchar_t* pData = c_str();
if (NULL == pData)
return L"";
return std::wstring(pData);
}
bool CWString::operator<(const CWString& wsString) const
{
const wchar_t* wsLeft = this->c_str();

View File

@ -59,6 +59,7 @@ namespace XPS
bool empty() const;
wchar_t operator[](const unsigned int& unIndex) const;
const wchar_t* c_str() const;
const std::wstring c_stdstr() const;
void clear();
int tointeger() const;