mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
Merge remote-tracking branch 'origin/release/v9.1.0' into feature/pdf-redact-fix
This commit is contained in:
@ -39,6 +39,8 @@ core_windows {
|
||||
core_win_arm64:VS_ARCH=a64
|
||||
vs2019:VS_VERSION=142
|
||||
|
||||
DEFINES += BOOST_USE_WINDOWS_H BOOST_WINAPI_NO_REDECLARATIONS
|
||||
|
||||
BOOST_POSTFIX = -vc$${VS_VERSION}-mt-$${VS_DEBUG}$${VS_ARCH}-1_72
|
||||
|
||||
core_boost_libs:LIBS += -L$$CORE_BOOST_LIBS -llibboost_system$$BOOST_POSTFIX -llibboost_filesystem$$BOOST_POSTFIX
|
||||
|
||||
@ -15,6 +15,10 @@
|
||||
#include "../../../UnicodeConverter/UnicodeConverter.h"
|
||||
#include "../../../HtmlFile2/src/StringFinder.h"
|
||||
|
||||
#if defined(CreateDirectory)
|
||||
#undef CreateDirectory
|
||||
#endif
|
||||
|
||||
static std::string nonbreaking_inline = "|a|abbr|acronym|b|bdo|big|cite|code|dfn|em|font|i|img|kbd|nobr|s|small|span|strike|strong|sub|sup|tt|";
|
||||
static std::string empty_tags = "|area|base|basefont|bgsound|br|command|col|embed|event-source|frame|hr|image|img|input|keygen|link|menuitem|meta|param|source|spacer|track|wbr|";
|
||||
static std::string preserve_whitespace = "|pre|textarea|script|style|";
|
||||
|
||||
@ -34,6 +34,8 @@
|
||||
#include "../../../../DesktopEditor/common/StringExt.h"
|
||||
|
||||
#include <wininet.h>
|
||||
#include <objbase.h>
|
||||
#include <urlmon.h>
|
||||
#pragma comment(lib, "Wininet")
|
||||
#pragma comment(lib, "Ole32.lib")
|
||||
|
||||
|
||||
@ -198,6 +198,8 @@ core_windows {
|
||||
DEFINES += WIN32 _WIN32
|
||||
DEFINES += NOMINMAX
|
||||
|
||||
#DEFINES += WIN32_LEAN_AND_MEAN
|
||||
|
||||
# use default _ITERATOR_DEBUG_LEVEL value
|
||||
#core_debug:DEFINES += "_ITERATOR_DEBUG_LEVEL=0"
|
||||
}
|
||||
@ -238,7 +240,11 @@ core_mac {
|
||||
QMAKE_LFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH
|
||||
|
||||
# xcode15 add new linker
|
||||
QMAKE_LFLAGS += -Wl,-ld_classic
|
||||
greaterThan(QMAKE_XCODE_VERSION, 1499) {
|
||||
QMAKE_LFLAGS += -Wl,-ld_classic
|
||||
} else {
|
||||
CONFIG += c++14
|
||||
}
|
||||
|
||||
QMAKE_CFLAGS += "-Wno-implicit-function-declaration"
|
||||
|
||||
|
||||
@ -38,7 +38,9 @@
|
||||
#include "../../Common/Utils/simple_xml_writer.h"
|
||||
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
#pragma comment(lib, "Ole32.lib")
|
||||
#include <Ole2.h>
|
||||
#include <ObjIdl.h>
|
||||
#pragma comment(lib, "Ole32.lib")
|
||||
#endif
|
||||
|
||||
namespace oox {
|
||||
|
||||
@ -32,6 +32,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
#if defined(GetTempPath)
|
||||
#undef GetTempPath
|
||||
#endif
|
||||
|
||||
#include <list>
|
||||
#include <sstream>
|
||||
|
||||
|
||||
@ -76,10 +76,10 @@ public:
|
||||
Xnum numFtr;
|
||||
_UINT32 iCopies = 1;
|
||||
|
||||
std::wstring szRelID; // biff12
|
||||
bool fLandscape; // biff12
|
||||
std::wstring szRelID = L""; // biff12
|
||||
bool fLandscape = false; // biff12
|
||||
|
||||
bool _isChart;
|
||||
bool _isChart = false;
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -7070,7 +7070,7 @@ int BinaryWorksheetsTableReader::ReadCell(BYTE type, long length, void* poResult
|
||||
{
|
||||
int nRow = m_oBufferedStream.GetLong();
|
||||
int nCol = m_oBufferedStream.GetLong();
|
||||
pCell->setRowCol(nRow - 1, nCol);
|
||||
pCell->setRowCol(nRow, nCol);
|
||||
}
|
||||
else if (c_oSerCellTypes::Style == type)
|
||||
{
|
||||
|
||||
@ -2222,7 +2222,6 @@ namespace SimpleTypes
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
template<>
|
||||
CDoubleOrAutomatic<typeAuto>::CDoubleOrAutomatic() : m_dValue(0){}
|
||||
|
||||
|
||||
@ -979,8 +979,8 @@ namespace SimpleTypes
|
||||
double m_dValue;
|
||||
CDoubleOrAutomatic() : m_dValue(0){}
|
||||
|
||||
CDoubleOrAutomatic(const double & val) { m_dValue = val; this->m_eValue = typeDouble; }
|
||||
CDoubleOrAutomatic(const EDoubleOrAutomatic & val) { this->m_eValue = val; m_dValue = 0; }
|
||||
CDoubleOrAutomatic(const double& val);
|
||||
CDoubleOrAutomatic(const EDoubleOrAutomatic& val);
|
||||
|
||||
virtual EDoubleOrAutomatic FromString(const std::wstring &sValue);
|
||||
double GetDoubleValue() const;
|
||||
|
||||
@ -113,7 +113,18 @@ void tabs_context::add(const odf_reader::office_element_ptr & element, double ma
|
||||
{
|
||||
tab_stop->margin_left = margin_left;
|
||||
|
||||
double pos = margin_left + tab_stop->style_position_.get_value_unit(odf_types::length::pt);
|
||||
auto type = tab_stop->style_type_ ? tab_stop->style_type_->get_type() : odf_types::style_type::Left;
|
||||
|
||||
double pos;
|
||||
|
||||
if( type == odf_types::style_type::Right )
|
||||
{
|
||||
pos = tab_stop->style_position_.get_value_unit(odf_types::length::pt);
|
||||
}
|
||||
else
|
||||
{
|
||||
pos = margin_left + tab_stop->style_position_.get_value_unit(odf_types::length::pt);
|
||||
}
|
||||
|
||||
std::map<int, odf_reader::office_element_ptr>::iterator pFind = clear_tabs.find((int)pos);
|
||||
|
||||
|
||||
@ -209,15 +209,15 @@ void calc_tab_stops(const style_instance * styleInstance, oox::tabs_context & co
|
||||
if (parProps[i]->content_.fo_margin_left_)
|
||||
margin_left = 20.0 * parProps[i]->content_.fo_margin_left_->get_length().get_value_unit(odf_types::length::pt);
|
||||
|
||||
if (parProps[i]->content_.style_tab_stops_)
|
||||
{
|
||||
style_tab_stops *tab_stops = dynamic_cast<style_tab_stops*>(parProps[i]->content_.style_tab_stops_.get());
|
||||
context.reset();
|
||||
for (size_t j = 0; j < tab_stops->content_.size(); j++)
|
||||
{
|
||||
context.add(tab_stops->content_[j], margin_left);
|
||||
}
|
||||
}
|
||||
if ( parProps[i]->content_.style_tab_stops_ )
|
||||
{
|
||||
style_tab_stops *tab_stops = dynamic_cast<style_tab_stops*>(parProps[i]->content_.style_tab_stops_.get());
|
||||
context.reset();
|
||||
for (size_t j = 0; j < tab_stops->content_.size(); j++)
|
||||
{
|
||||
context.add(tab_stops->content_[j], margin_left);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1471,10 +1471,8 @@ namespace PdfWriter
|
||||
std::string sValue = U_TO_UTF8(wsT);
|
||||
CDictObject* pOwner = GetObjOwnValue("T");
|
||||
if (!pOwner)
|
||||
{
|
||||
pOwner = this;
|
||||
pOwner->Add("T", new CStringObject(sValue.c_str(), true));
|
||||
}
|
||||
pOwner->Add("T", new CStringObject(sValue.c_str(), true));
|
||||
}
|
||||
void CWidgetAnnotation::SetBC(const std::vector<double>& arrBC)
|
||||
{
|
||||
|
||||
@ -745,6 +745,7 @@ namespace PdfWriter
|
||||
}
|
||||
void CDocument::AddAnnotation(const int& nID, CAnnotation* pAnnot)
|
||||
{
|
||||
pAnnot->SetXref(m_pXref);
|
||||
m_mAnnotations[nID] = pAnnot;
|
||||
}
|
||||
CImageDict* CDocument::CreateImage()
|
||||
|
||||
@ -1141,6 +1141,8 @@ bool RtfCharPropsCommand::ExecuteCommand(RtfDocument& oDocument, RtfReader& oRea
|
||||
#ifdef USE_STYLE_COLOR
|
||||
if (charProps->m_nForeColor == PROP_DEF)
|
||||
charProps->m_nForeColor = 0;
|
||||
charProps->m_eUnderStyle = RtfCharProperty::uls_none;
|
||||
charProps->m_bBold = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -1169,8 +1171,18 @@ bool RtfCharPropsCommand::ExecuteCommand(RtfDocument& oDocument, RtfReader& oRea
|
||||
else
|
||||
charProps->m_bRightToLeft = 1;
|
||||
}
|
||||
COMMAND_RTF_BOOL( "rtlch", charProps->m_bRightToLeft, sCommand, hasParameter, parameter)
|
||||
COMMAND_RTF_INT ( "lang", charProps->m_nLanguage, sCommand, hasParameter, parameter)
|
||||
else if ("rtlch" == sCommand)
|
||||
{
|
||||
if ( false == hasParameter || 0 != parameter )
|
||||
{
|
||||
charProps->m_bRightToLeft = 1;
|
||||
charProps->m_nComplexScript = 1;
|
||||
}
|
||||
else
|
||||
charProps->m_bRightToLeft = 0;
|
||||
}
|
||||
//COMMAND_RTF_BOOL( "rtlch", charProps->m_bRightToLeft, sCommand, hasParameter, parameter)
|
||||
COMMAND_RTF_INT ( "lang", charProps->m_nLanguage, sCommand, hasParameter, parameter)
|
||||
COMMAND_RTF_INT ( "langfe", charProps->m_nLanguageAsian,sCommand, hasParameter, parameter)
|
||||
|
||||
COMMAND_RTF_BOOL( "outl", charProps->m_bOutline, sCommand, hasParameter, parameter)
|
||||
|
||||
@ -476,7 +476,11 @@ std::wstring RtfField::RenderToOOX(RenderParameter oRenderParameter)
|
||||
}
|
||||
|
||||
//заканчиваем Field
|
||||
sResult += L"<w:r><w:fldChar w:fldCharType=\"end\"/></w:r>";
|
||||
sResult += L"<w:r>";
|
||||
if (!props.empty())
|
||||
sResult += props;
|
||||
sResult += L"<w:fldChar w:fldCharType=\"end\"/></w:r>";
|
||||
//sResult += L"<w:r><w:fldChar w:fldCharType=\"end\"/></w:r>";
|
||||
}
|
||||
if (bDelete) sResult += L"</w:del>";
|
||||
if (bInsert) sResult += L"</w:ins>";
|
||||
|
||||
@ -1791,7 +1791,11 @@ std::wstring RtfCharProperty::RenderToOOX(RenderParameter oRenderParameter)
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sResult += L"<w:u w:val=\"none\"/>";
|
||||
}
|
||||
|
||||
RENDER_OOX_INT( m_nUp, sResult, L"w:position" )
|
||||
|
||||
|
||||
Reference in New Issue
Block a user