mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
RtfFile win build
поправлены кодировки в списках (001.rtf, 21.haikufinal.rtf, 000195_65276158fedb94v8tebc20.rtf) поправлены размеры картинки если они меньше 1 pt git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@62398 954022d7-b5bf-4e40-9824-e11837661b57
This commit is contained in:
committed by
Alexander Trofimov
parent
0a3081157a
commit
9a8c021a92
@ -796,6 +796,10 @@
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath="..\source\ConvertationManager.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\source\ConvertationManager.h"
|
||||
>
|
||||
|
||||
@ -28,8 +28,10 @@ HRESULT RtfConvertationManager::ConvertRtfToOOX( std::wstring sSrcFileName, std:
|
||||
if (m_sTempFolder.length()< 1)
|
||||
m_sTempFolder = FileSystem::Directory::GetTempPath();
|
||||
|
||||
oReader.m_sTempFolder = FileSystem::Directory::CreateDirectoryWithUniqueName(m_sTempFolder);
|
||||
oWriter.m_sTempFolder = FileSystem::Directory::CreateDirectoryWithUniqueName(m_sTempFolder);
|
||||
CString sTempFolder = std_string2string(m_sTempFolder);
|
||||
|
||||
oReader.m_sTempFolder = FileSystem::Directory::CreateDirectoryWithUniqueName(sTempFolder);
|
||||
oWriter.m_sTempFolder = FileSystem::Directory::CreateDirectoryWithUniqueName(sTempFolder);
|
||||
|
||||
m_poRtfReader = &oReader;
|
||||
m_poOOXWriter = &oWriter;
|
||||
@ -69,8 +71,10 @@ HRESULT RtfConvertationManager::ConvertOOXToRtf( std::wstring sDstFileName, std:
|
||||
if (m_sTempFolder.length() < 1)
|
||||
m_sTempFolder = FileSystem::Directory::GetTempPath();
|
||||
|
||||
oReader.m_sTempFolder = FileSystem::Directory::CreateDirectoryWithUniqueName(m_sTempFolder);
|
||||
oWriter.m_sTempFolder = FileSystem::Directory::CreateDirectoryWithUniqueName(m_sTempFolder);
|
||||
CString sTempFolder = std_string2string(m_sTempFolder);
|
||||
|
||||
oReader.m_sTempFolder = FileSystem::Directory::CreateDirectoryWithUniqueName(sTempFolder);
|
||||
oWriter.m_sTempFolder = FileSystem::Directory::CreateDirectoryWithUniqueName(sTempFolder);
|
||||
|
||||
m_poOOXReader = &oReader;
|
||||
m_poRtfWriter = &oWriter;
|
||||
|
||||
@ -2620,6 +2620,7 @@ public:
|
||||
else if( _T("leveltext") == sCommand )
|
||||
{
|
||||
TextReader oLevelTextReader( m_oListLevelProp.m_sText );
|
||||
oLevelTextReader.m_bUseGlobalCodepage = true;
|
||||
return StartSubReader( oLevelTextReader, oDocument, oReader );
|
||||
}
|
||||
else if( _T("levelnumbers") == sCommand )
|
||||
|
||||
@ -808,7 +808,7 @@ CString RtfListLevelProperty::RenderToRtf(RenderParameter oRenderParameter)
|
||||
}
|
||||
CString RtfListLevelProperty::RenderToOOX(RenderParameter oRenderParameter)
|
||||
{
|
||||
return RenderToOOX2(oRenderParameter);
|
||||
return RenderToOOX2(oRenderParameter);
|
||||
}
|
||||
CString RtfListLevelProperty::RenderToOOX2(RenderParameter oRenderParameter, int nLvl)
|
||||
{
|
||||
|
||||
@ -1427,6 +1427,12 @@ public:
|
||||
if( nReplaceNumber >= 0 && nReplaceNumber < sResult.GetLength() )
|
||||
{
|
||||
int nLevel = sResult[ nReplaceNumber ];
|
||||
|
||||
if (nLevel > 11)
|
||||
{//001.rtf
|
||||
nReplaceNumber++;
|
||||
nLevel = sResult[ nReplaceNumber];
|
||||
}
|
||||
CString sExt;
|
||||
sExt.AppendFormat( _T("%%%d"), nLevel );
|
||||
sResult.Delete( nReplaceNumber );
|
||||
|
||||
@ -268,6 +268,8 @@ public:
|
||||
}
|
||||
}
|
||||
/*static */CString ExecuteTextInternalCodePage( std::string & sCharString, RtfDocument & oDocument, RtfReader & oReader);
|
||||
|
||||
bool m_bUseGlobalCodepage;
|
||||
|
||||
private:
|
||||
RtfToken m_oTok;
|
||||
@ -280,6 +282,5 @@ private:
|
||||
protected:
|
||||
int m_nCurGroups;
|
||||
|
||||
bool m_bUseGlobalCodepage;
|
||||
};
|
||||
|
||||
|
||||
@ -785,7 +785,7 @@ CString RtfShape::RenderToOOXBegin(RenderParameter oRenderParameter)
|
||||
if( PROP_DEF != m_oPicture->m_nCropB )
|
||||
nHeight -= m_oPicture->m_nCropB;
|
||||
|
||||
sStyle.AppendFormat(_T("width:%dpt;height:%dpt;"), (int)RtfUtility::Twip2pt(nWidth), (int)RtfUtility::Twip2pt(nHeight));
|
||||
sStyle.AppendFormat(_T("width:%.2fpt;height:%.2fpt;"), RtfUtility::Twip2pt(nWidth), RtfUtility::Twip2pt(nHeight));
|
||||
}
|
||||
|
||||
switch( m_nPositionH )
|
||||
|
||||
@ -608,6 +608,62 @@
|
||||
RelativePath=".\ASCOfficeRtfFile.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\Common\DocxFormat\Source\XML\libxml2\libxml2.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="ReleaseASC|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\ASCOfficeDocFile\pole\pole.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="ReleaseASC|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\RtfFile.cpp"
|
||||
>
|
||||
|
||||
Binary file not shown.
@ -2,6 +2,6 @@
|
||||
//1
|
||||
//0
|
||||
//1
|
||||
//54
|
||||
#define INTVER 1,0,1,54
|
||||
#define STRVER "1,0,1,54\0"
|
||||
//56
|
||||
#define INTVER 1,0,1,56
|
||||
#define STRVER "1,0,1,56\0"
|
||||
|
||||
Reference in New Issue
Block a user