Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
onlyoffice_core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
onlyoffice_core
Commits
a57f423c
Commit
a57f423c
authored
Apr 18, 2016
by
ElenaSubbotina
Committed by
Alexander Trofimov
May 21, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RtfFormatReader - конвертация embedd объектов - Test_Объекты.rtf
parent
d3f5dd3d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
4 deletions
+12
-4
ASCOfficeRtfFile/RtfFormatLib/source/DestinationCommand.cpp
ASCOfficeRtfFile/RtfFormatLib/source/DestinationCommand.cpp
+9
-3
ASCOfficeRtfFile/RtfFormatLib/source/Reader/OOXParagraphElementReaders.cpp
...RtfFormatLib/source/Reader/OOXParagraphElementReaders.cpp
+2
-0
ASCOfficeRtfFile/RtfFormatLib/source/Reader/OOXPictureInlineReader.h
...fFile/RtfFormatLib/source/Reader/OOXPictureInlineReader.h
+1
-1
No files found.
ASCOfficeRtfFile/RtfFormatLib/source/DestinationCommand.cpp
View file @
a57f423c
...
@@ -228,6 +228,7 @@ bool OleReader::ExecuteCommand(RtfDocument& oDocument, RtfReader& oReader,CStrin
...
@@ -228,6 +228,7 @@ bool OleReader::ExecuteCommand(RtfDocument& oDocument, RtfReader& oReader,CStrin
{
{
if
(
_T
(
"object"
)
==
sCommand
)
if
(
_T
(
"object"
)
==
sCommand
)
return
true
;
return
true
;
COMMAND_RTF_INT
(
_T
(
"objw"
),
m_oOle
.
m_nWidth
,
sCommand
,
hasParameter
,
parameter
)
COMMAND_RTF_INT
(
_T
(
"objw"
),
m_oOle
.
m_nWidth
,
sCommand
,
hasParameter
,
parameter
)
COMMAND_RTF_INT
(
_T
(
"objh"
),
m_oOle
.
m_nHeight
,
sCommand
,
hasParameter
,
parameter
)
COMMAND_RTF_INT
(
_T
(
"objh"
),
m_oOle
.
m_nHeight
,
sCommand
,
hasParameter
,
parameter
)
COMMAND_RTF_INT
(
_T
(
"objemb"
),
m_oOle
.
m_eOleType
,
sCommand
,
true
,
RtfOle
::
ot_emb
)
COMMAND_RTF_INT
(
_T
(
"objemb"
),
m_oOle
.
m_eOleType
,
sCommand
,
true
,
RtfOle
::
ot_emb
)
...
@@ -260,14 +261,19 @@ bool OleReader::ExecuteCommand(RtfDocument& oDocument, RtfReader& oReader,CStrin
...
@@ -260,14 +261,19 @@ bool OleReader::ExecuteCommand(RtfDocument& oDocument, RtfReader& oReader,CStrin
//oStream.nCurPos = 0;
//oStream.nCurPos = 0;
CString
sOleStorageName
=
Utils
::
CreateTempFile
(
oReader
.
m_sTempFolder
);
CString
sOleStorageName
=
Utils
::
CreateTempFile
(
oReader
.
m_sTempFolder
);
NSFile
::
CFileBinary
file
;
file
.
CreateFileW
(
sOleStorageName
.
GetBuffer
());
file
.
WriteFile
(
pData
,
nSize
);
file
.
CloseFile
();
POLE
::
Storage
*
piRootStorage
=
new
POLE
::
Storage
(
string2std_string
(
sOleStorageName
).
c_str
());
POLE
::
Storage
*
piRootStorage
=
new
POLE
::
Storage
(
string2std_string
(
sOleStorageName
).
c_str
());
if
(
piRootStorage
)
if
(
piRootStorage
)
{
{
//hRes = OleConvertOLESTREAMToIStorage( &oStream, piRootStorage, NULL );
//hRes = OleConvertOLESTREAMToIStorage( &oStream, piRootStorage, NULL );
//
m_oOle.SetFilename( sOleStorageName );
m_oOle
.
SetFilename
(
sOleStorageName
);
//
m_oOle.SetOle( piRootStorage );
m_oOle
.
SetOle
(
piRootStorage
);
RELEASEOBJECT
(
piRootStorage
);
//
RELEASEOBJECT( piRootStorage );
hRes
=
S_OK
;
hRes
=
S_OK
;
}
}
...
...
ASCOfficeRtfFile/RtfFormatLib/source/Reader/OOXParagraphElementReaders.cpp
View file @
a57f423c
...
@@ -351,7 +351,9 @@ bool OOXRunReader::Parse( ReaderParameter oParam , RtfParagraph& oOutputParagrap
...
@@ -351,7 +351,9 @@ bool OOXRunReader::Parse( ReaderParameter oParam , RtfParagraph& oOutputParagrap
{
{
CString
sValue
;
CString
sValue
;
if
((
ooxText
->
m_oSpace
.
IsInit
())
&&
(
ooxText
->
m_oSpace
->
GetValue
()
==
SimpleTypes
::
xmlspacePreserve
))
if
((
ooxText
->
m_oSpace
.
IsInit
())
&&
(
ooxText
->
m_oSpace
->
GetValue
()
==
SimpleTypes
::
xmlspacePreserve
))
{
sValue
=
RtfUtility
::
Preserve
(
ooxText
->
m_sText
);
sValue
=
RtfUtility
::
Preserve
(
ooxText
->
m_sText
);
}
else
else
sValue
=
ooxText
->
m_sText
;
sValue
=
ooxText
->
m_sText
;
...
...
ASCOfficeRtfFile/RtfFormatLib/source/Reader/OOXPictureInlineReader.h
View file @
a57f423c
...
@@ -57,7 +57,7 @@ public:
...
@@ -57,7 +57,7 @@ public:
//изменяем scale в соответсявии с выходным размером
//изменяем scale в соответсявии с выходным размером
if
(
PROP_DEF
!=
nWidth
&&
PROP_DEF
!=
oOutput
.
m_oPicture
->
m_nWidthGoal
)
if
(
PROP_DEF
!=
nWidth
&&
PROP_DEF
!=
oOutput
.
m_oPicture
->
m_nWidthGoal
)
{
{
double
dNewScale
=
100
*
(
1.0
*
nWidth
/
oOutput
.
m_oPicture
->
m_nWidthGoal
);
double
dNewScale
=
100
*
(
1.0
*
nWidth
/
oOutput
.
m_oPicture
->
m_nWidthGoal
)
;
oOutput
.
m_oPicture
->
m_dScaleX
=
dNewScale
;
oOutput
.
m_oPicture
->
m_dScaleX
=
dNewScale
;
}
}
if
(
PROP_DEF
!=
nHeight
&&
PROP_DEF
!=
oOutput
.
m_oPicture
->
m_nHeightGoal
)
if
(
PROP_DEF
!=
nHeight
&&
PROP_DEF
!=
oOutput
.
m_oPicture
->
m_nHeightGoal
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment