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
623d89d1
Commit
623d89d1
authored
Nov 22, 2016
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RtfFormatReader - two and more levels in fields (contents, ...)
parent
fb9d2cbf
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
79 additions
and
31 deletions
+79
-31
ASCOfficeRtfFile/RtfFormatLib/source/DestinationCommand.cpp
ASCOfficeRtfFile/RtfFormatLib/source/DestinationCommand.cpp
+16
-0
ASCOfficeRtfFile/RtfFormatLib/source/RtfChar.cpp
ASCOfficeRtfFile/RtfFormatLib/source/RtfChar.cpp
+6
-6
ASCOfficeRtfFile/RtfFormatLib/source/RtfField.cpp
ASCOfficeRtfFile/RtfFormatLib/source/RtfField.cpp
+35
-11
ASCOfficeRtfFile/RtfFormatLib/source/RtfGlobalTables.h
ASCOfficeRtfFile/RtfFormatLib/source/RtfGlobalTables.h
+8
-0
ASCOfficeRtfFile/RtfFormatLib/source/RtfOle.cpp
ASCOfficeRtfFile/RtfFormatLib/source/RtfOle.cpp
+2
-2
ASCOfficeRtfFile/RtfFormatLib/source/RtfProperty.cpp
ASCOfficeRtfFile/RtfFormatLib/source/RtfProperty.cpp
+9
-9
ASCOfficeRtfFile/RtfFormatLib/source/RtfSection.cpp
ASCOfficeRtfFile/RtfFormatLib/source/RtfSection.cpp
+1
-1
ASCOfficeRtfFile/RtfFormatLib/source/RtfShape.cpp
ASCOfficeRtfFile/RtfFormatLib/source/RtfShape.cpp
+2
-2
No files found.
ASCOfficeRtfFile/RtfFormatLib/source/DestinationCommand.cpp
View file @
623d89d1
...
@@ -2380,6 +2380,14 @@ bool RtfParagraphPropDestination::ExecuteCommand(RtfDocument& oDocument, RtfRead
...
@@ -2380,6 +2380,14 @@ bool RtfParagraphPropDestination::ExecuteCommand(RtfDocument& oDocument, RtfRead
{
{
m_oCurTab
.
m_eKind
=
RtfTab
::
tk_tqbar
;
m_oCurTab
.
m_eKind
=
RtfTab
::
tk_tqbar
;
m_oCurTab
.
m_nTab
=
parameter
;
m_oCurTab
.
m_nTab
=
parameter
;
if
(
!
oReader
.
m_oState
->
m_oParagraphProp
.
m_oTabs
.
m_aTabs
.
empty
())
{
if
(
oReader
.
m_oState
->
m_oParagraphProp
.
m_oTabs
.
m_aTabs
.
back
().
m_nTab
>
m_oCurTab
.
m_nTab
)
{
oReader
.
m_oState
->
m_oParagraphProp
.
m_oTabs
.
m_aTabs
.
clear
();
}
}
oReader
.
m_oState
->
m_oParagraphProp
.
m_oTabs
.
m_aTabs
.
push_back
(
m_oCurTab
);
oReader
.
m_oState
->
m_oParagraphProp
.
m_oTabs
.
m_aTabs
.
push_back
(
m_oCurTab
);
m_oCurTab
.
SetDefault
();
m_oCurTab
.
SetDefault
();
}
}
...
@@ -2389,6 +2397,14 @@ bool RtfParagraphPropDestination::ExecuteCommand(RtfDocument& oDocument, RtfRead
...
@@ -2389,6 +2397,14 @@ bool RtfParagraphPropDestination::ExecuteCommand(RtfDocument& oDocument, RtfRead
if
(
hasParameter
)
if
(
hasParameter
)
{
{
m_oCurTab
.
m_nTab
=
parameter
;
m_oCurTab
.
m_nTab
=
parameter
;
if
(
!
oReader
.
m_oState
->
m_oParagraphProp
.
m_oTabs
.
m_aTabs
.
empty
())
{
if
(
oReader
.
m_oState
->
m_oParagraphProp
.
m_oTabs
.
m_aTabs
.
back
().
m_nTab
>
m_oCurTab
.
m_nTab
)
{
oReader
.
m_oState
->
m_oParagraphProp
.
m_oTabs
.
m_aTabs
.
clear
();
}
}
oReader
.
m_oState
->
m_oParagraphProp
.
m_oTabs
.
m_aTabs
.
push_back
(
m_oCurTab
);
oReader
.
m_oState
->
m_oParagraphProp
.
m_oTabs
.
m_aTabs
.
push_back
(
m_oCurTab
);
m_oCurTab
.
SetDefault
();
m_oCurTab
.
SetDefault
();
}
}
...
...
ASCOfficeRtfFile/RtfFormatLib/source/RtfChar.cpp
View file @
623d89d1
...
@@ -49,7 +49,7 @@ CString RtfChar::RenderToOOX(RenderParameter oRenderParameter)
...
@@ -49,7 +49,7 @@ CString RtfChar::RenderToOOX(RenderParameter oRenderParameter)
{
{
bInsert
=
true
;
bInsert
=
true
;
CString
sAuthor
=
m_oProperty
.
m_nRevauth
!=
PROP_DEF
?
poRtfDocument
->
m_oRevisionTable
[
m_oProperty
.
m_nRevauth
]
:
L""
;
CString
sAuthor
=
poRtfDocument
->
m_oRevisionTable
.
GetAuthor
(
m_oProperty
.
m_nRevauth
)
;
CString
sDate
(
RtfUtility
::
convertDateTime
(
m_oProperty
.
m_nRevdttm
).
c_str
());
CString
sDate
(
RtfUtility
::
convertDateTime
(
m_oProperty
.
m_nRevdttm
).
c_str
());
sResult
+=
L"<w:ins w:date=
\"
"
+
sDate
+
L"
\"
w:author=
\"
"
+
sAuthor
+
L"
\"
w:id=
\"
"
+
std
::
to_wstring
(
poOOXWriter
->
m_nCurTrackChangesId
++
).
c_str
()
+
L"
\"
>"
;
sResult
+=
L"<w:ins w:date=
\"
"
+
sDate
+
L"
\"
w:author=
\"
"
+
sAuthor
+
L"
\"
w:id=
\"
"
+
std
::
to_wstring
(
poOOXWriter
->
m_nCurTrackChangesId
++
).
c_str
()
+
L"
\"
>"
;
...
@@ -59,7 +59,7 @@ CString RtfChar::RenderToOOX(RenderParameter oRenderParameter)
...
@@ -59,7 +59,7 @@ CString RtfChar::RenderToOOX(RenderParameter oRenderParameter)
{
{
bDelete
=
true
;
bDelete
=
true
;
CString
sAuthor
=
m_oProperty
.
m_nRevauthDel
!=
PROP_DEF
?
poRtfDocument
->
m_oRevisionTable
[
m_oProperty
.
m_nRevauthDel
]
:
L""
;
CString
sAuthor
=
poRtfDocument
->
m_oRevisionTable
.
GetAuthor
(
m_oProperty
.
m_nRevauthDel
)
;
CString
sDate
(
RtfUtility
::
convertDateTime
(
m_oProperty
.
m_nRevdttmDel
).
c_str
());
CString
sDate
(
RtfUtility
::
convertDateTime
(
m_oProperty
.
m_nRevdttmDel
).
c_str
());
sResult
+=
L"<w:del w:date=
\"
"
+
sDate
+
L"
\"
w:author=
\"
"
+
sAuthor
+
L"
\"
w:id=
\"
"
+
std
::
to_wstring
(
poOOXWriter
->
m_nCurTrackChangesId
++
).
c_str
()
+
L"
\"
>"
;
sResult
+=
L"<w:del w:date=
\"
"
+
sDate
+
L"
\"
w:author=
\"
"
+
sAuthor
+
L"
\"
w:id=
\"
"
+
std
::
to_wstring
(
poOOXWriter
->
m_nCurTrackChangesId
++
).
c_str
()
+
L"
\"
>"
;
...
@@ -89,7 +89,7 @@ CString RtfChar::RenderToOOX(RenderParameter oRenderParameter)
...
@@ -89,7 +89,7 @@ CString RtfChar::RenderToOOX(RenderParameter oRenderParameter)
{
{
bInsert
=
true
;
bInsert
=
true
;
CString
sAuthor
=
m_oProperty
.
m_nRevauth
!=
PROP_DEF
?
poRtfDocument
->
m_oRevisionTable
[
m_oProperty
.
m_nRevauth
]
:
L""
;
CString
sAuthor
=
poRtfDocument
->
m_oRevisionTable
.
GetAuthor
(
m_oProperty
.
m_nRevauth
)
;
CString
sDate
(
RtfUtility
::
convertDateTime
(
m_oProperty
.
m_nRevdttm
).
c_str
());
CString
sDate
(
RtfUtility
::
convertDateTime
(
m_oProperty
.
m_nRevdttm
).
c_str
());
sResult
+=
L"<w:ins w:date=
\"
"
+
sDate
+
L"
\"
w:author=
\"
"
+
sAuthor
+
L"
\"
w:id=
\"
"
+
std
::
to_wstring
(
poOOXWriter
->
m_nCurTrackChangesId
++
).
c_str
()
+
L"
\"
>"
;
sResult
+=
L"<w:ins w:date=
\"
"
+
sDate
+
L"
\"
w:author=
\"
"
+
sAuthor
+
L"
\"
w:id=
\"
"
+
std
::
to_wstring
(
poOOXWriter
->
m_nCurTrackChangesId
++
).
c_str
()
+
L"
\"
>"
;
...
@@ -99,7 +99,7 @@ CString RtfChar::RenderToOOX(RenderParameter oRenderParameter)
...
@@ -99,7 +99,7 @@ CString RtfChar::RenderToOOX(RenderParameter oRenderParameter)
{
{
bDelete
=
true
;
bDelete
=
true
;
CString
sAuthor
=
m_oProperty
.
m_nRevauthDel
!=
PROP_DEF
?
poRtfDocument
->
m_oRevisionTable
[
m_oProperty
.
m_nRevauthDel
]
:
L""
;
CString
sAuthor
=
poRtfDocument
->
m_oRevisionTable
.
GetAuthor
(
m_oProperty
.
m_nRevauthDel
)
;
CString
sDate
(
RtfUtility
::
convertDateTime
(
m_oProperty
.
m_nRevdttmDel
).
c_str
());
CString
sDate
(
RtfUtility
::
convertDateTime
(
m_oProperty
.
m_nRevdttmDel
).
c_str
());
sResult
+=
L"<w:del w:date=
\"
"
+
sDate
+
L"
\"
w:author=
\"
"
+
sAuthor
+
L"
\"
w:id=
\"
"
+
std
::
to_wstring
(
poOOXWriter
->
m_nCurTrackChangesId
++
).
c_str
()
+
L"
\"
>"
;
sResult
+=
L"<w:del w:date=
\"
"
+
sDate
+
L"
\"
w:author=
\"
"
+
sAuthor
+
L"
\"
w:id=
\"
"
+
std
::
to_wstring
(
poOOXWriter
->
m_nCurTrackChangesId
++
).
c_str
()
+
L"
\"
>"
;
...
@@ -356,7 +356,7 @@ CString RtfCharSpecial::RenderToOOX(RenderParameter oRenderParameter)
...
@@ -356,7 +356,7 @@ CString RtfCharSpecial::RenderToOOX(RenderParameter oRenderParameter)
{
{
bInsert
=
true
;
bInsert
=
true
;
CString
sAuthor
=
m_oProperty
.
m_nRevauth
!=
PROP_DEF
?
poRtfDocument
->
m_oRevisionTable
[
m_oProperty
.
m_nRevauth
]
:
L""
;
CString
sAuthor
=
poRtfDocument
->
m_oRevisionTable
.
GetAuthor
(
m_oProperty
.
m_nRevauth
)
;
CString
sDate
(
RtfUtility
::
convertDateTime
(
m_oProperty
.
m_nRevdttm
).
c_str
());
CString
sDate
(
RtfUtility
::
convertDateTime
(
m_oProperty
.
m_nRevdttm
).
c_str
());
sResult
+=
L"<w:ins w:date=
\"
"
+
sDate
+
L"
\"
w:author=
\"
"
+
sAuthor
+
L"
\"
w:id=
\"
"
+
std
::
to_wstring
(
poOOXWriter
->
m_nCurTrackChangesId
++
).
c_str
()
+
L"
\"
>"
;
sResult
+=
L"<w:ins w:date=
\"
"
+
sDate
+
L"
\"
w:author=
\"
"
+
sAuthor
+
L"
\"
w:id=
\"
"
+
std
::
to_wstring
(
poOOXWriter
->
m_nCurTrackChangesId
++
).
c_str
()
+
L"
\"
>"
;
...
@@ -366,7 +366,7 @@ CString RtfCharSpecial::RenderToOOX(RenderParameter oRenderParameter)
...
@@ -366,7 +366,7 @@ CString RtfCharSpecial::RenderToOOX(RenderParameter oRenderParameter)
{
{
bDelete
=
true
;
bDelete
=
true
;
CString
sAuthor
=
m_oProperty
.
m_nRevauthDel
!=
PROP_DEF
?
poRtfDocument
->
m_oRevisionTable
[
m_oProperty
.
m_nRevauthDel
]
:
L""
;
CString
sAuthor
=
poRtfDocument
->
m_oRevisionTable
.
GetAuthor
(
m_oProperty
.
m_nRevauthDel
)
;
CString
sDate
(
RtfUtility
::
convertDateTime
(
m_oProperty
.
m_nRevdttmDel
).
c_str
());
CString
sDate
(
RtfUtility
::
convertDateTime
(
m_oProperty
.
m_nRevdttmDel
).
c_str
());
sResult
+=
L"<w:del w:date=
\"
"
+
sDate
+
L"
\"
w:author=
\"
"
+
sAuthor
+
L"
\"
w:id=
\"
"
+
std
::
to_wstring
(
poOOXWriter
->
m_nCurTrackChangesId
++
).
c_str
()
+
L"
\"
>"
;
sResult
+=
L"<w:del w:date=
\"
"
+
sDate
+
L"
\"
w:author=
\"
"
+
sAuthor
+
L"
\"
w:id=
\"
"
+
std
::
to_wstring
(
poOOXWriter
->
m_nCurTrackChangesId
++
).
c_str
()
+
L"
\"
>"
;
...
...
ASCOfficeRtfFile/RtfFormatLib/source/RtfField.cpp
View file @
623d89d1
...
@@ -164,7 +164,7 @@ CString RtfField::RenderToOOX(RenderParameter oRenderParameter)
...
@@ -164,7 +164,7 @@ CString RtfField::RenderToOOX(RenderParameter oRenderParameter)
{
{
bInsert
=
true
;
bInsert
=
true
;
sAuthor
=
m_pInsert
->
m_oCharProperty
.
m_nRevauth
!=
PROP_DEF
?
poRtfDocument
->
m_oRevisionTable
[
m_pInsert
->
m_oCharProperty
.
m_nRevauth
]
:
L""
;
sAuthor
=
poRtfDocument
->
m_oRevisionTable
.
GetAuthor
(
m_pInsert
->
m_oCharProperty
.
m_nRevauth
)
;
sDate
=
CString
(
RtfUtility
::
convertDateTime
(
m_pInsert
->
m_oCharProperty
.
m_nRevdttm
).
c_str
());
sDate
=
CString
(
RtfUtility
::
convertDateTime
(
m_pInsert
->
m_oCharProperty
.
m_nRevdttm
).
c_str
());
sResult
+=
L"<w:ins w:date=
\"
"
+
sDate
+
L"
\"
w:author=
\"
"
+
sAuthor
+
L"
\"
w:id=
\"
"
+
std
::
to_wstring
(
poOOXWriter
->
m_nCurTrackChangesId
++
).
c_str
()
+
L"
\"
>"
;
sResult
+=
L"<w:ins w:date=
\"
"
+
sDate
+
L"
\"
w:author=
\"
"
+
sAuthor
+
L"
\"
w:id=
\"
"
+
std
::
to_wstring
(
poOOXWriter
->
m_nCurTrackChangesId
++
).
c_str
()
+
L"
\"
>"
;
...
@@ -174,7 +174,7 @@ CString RtfField::RenderToOOX(RenderParameter oRenderParameter)
...
@@ -174,7 +174,7 @@ CString RtfField::RenderToOOX(RenderParameter oRenderParameter)
{
{
bDelete
=
true
;
bDelete
=
true
;
sAuthor
=
m_pInsert
->
m_oCharProperty
.
m_nRevauthDel
!=
PROP_DEF
?
poRtfDocument
->
m_oRevisionTable
[
m_pInsert
->
m_oCharProperty
.
m_nRevauthDel
]
:
L""
;
sAuthor
=
poRtfDocument
->
m_oRevisionTable
.
GetAuthor
(
m_pInsert
->
m_oCharProperty
.
m_nRevauthDel
)
;
sDate
=
CString
(
RtfUtility
::
convertDateTime
(
m_pInsert
->
m_oCharProperty
.
m_nRevdttmDel
).
c_str
());
sDate
=
CString
(
RtfUtility
::
convertDateTime
(
m_pInsert
->
m_oCharProperty
.
m_nRevdttmDel
).
c_str
());
sResult
+=
L"<w:del w:date=
\"
"
+
sDate
+
L"
\"
w:author=
\"
"
+
sAuthor
+
L"
\"
w:id=
\"
"
+
std
::
to_wstring
(
poOOXWriter
->
m_nCurTrackChangesId
++
).
c_str
()
+
L"
\"
>"
;
sResult
+=
L"<w:del w:date=
\"
"
+
sDate
+
L"
\"
w:author=
\"
"
+
sAuthor
+
L"
\"
w:id=
\"
"
+
std
::
to_wstring
(
poOOXWriter
->
m_nCurTrackChangesId
++
).
c_str
()
+
L"
\"
>"
;
...
@@ -229,13 +229,15 @@ CString RtfField::RenderToOOX(RenderParameter oRenderParameter)
...
@@ -229,13 +229,15 @@ CString RtfField::RenderToOOX(RenderParameter oRenderParameter)
sResult
+=
props
;
sResult
+=
props
;
sResult
+=
L"<w:fldChar w:fldCharType=
\"
begin
\"
/>"
;
sResult
+=
L"<w:fldChar w:fldCharType=
\"
begin
\"
/>"
;
sResult
+=
L"</w:r>"
;
sResult
+=
L"</w:r>"
;
//-----------
CString
str
=
Utils
::
PrepareToXML
(
m_pInsert
->
m_pTextItems
->
RenderToOOX
(
oNewParametr
)
);
sResult
+=
L"<w:r>"
;
sResult
+=
L"<w:r>"
;
sResult
+=
L"<w:instrText xml:space=
\"
preserve
\"
>"
;
sResult
+=
L"<w:instrText xml:space=
\"
preserve
\"
>"
;
sResult
+=
str
;
if
(
m_pInsert
->
m_pTextItems
)
{
sResult
+=
Utils
::
PrepareToXML
(
m_pInsert
->
m_pTextItems
->
RenderToOOX
(
oNewParametr
)
);
}
sResult
+=
L"</w:instrText></w:r>"
;
sResult
+=
L"</w:instrText></w:r>"
;
// разделитель
// разделитель
...
@@ -243,11 +245,33 @@ CString RtfField::RenderToOOX(RenderParameter oRenderParameter)
...
@@ -243,11 +245,33 @@ CString RtfField::RenderToOOX(RenderParameter oRenderParameter)
sResult
+=
L"<w:fldChar w:fldCharType=
\"
separate
\"
/></w:r>"
;
sResult
+=
L"<w:fldChar w:fldCharType=
\"
separate
\"
/></w:r>"
;
//пишем содержание-кэш
//пишем содержание-кэш
if
((
m_pResult
->
m_pTextItems
)
&&
(
m_pResult
->
m_pTextItems
->
GetCount
()
>
0
))
{
oNewParametr
.
nType
=
RENDER_TO_OOX_PARAM_RUN
;
sResult
+=
m_pResult
->
m_pTextItems
->
m_aArray
[
0
]
->
RenderToOOX
(
oNewParametr
);
for
(
int
i
=
1
;
i
<
m_pResult
->
m_pTextItems
->
GetCount
();
i
++
)
{
RtfParagraph
*
paragraph
=
dynamic_cast
<
RtfParagraph
*>
(
m_pResult
->
m_pTextItems
->
m_aArray
[
i
].
get
());
if
(
paragraph
)
{
sResult
+=
L"</w:p>"
;
sResult
+=
L"<w:p>"
;
sResult
+=
L"<w:pPr>"
;
sResult
+=
paragraph
->
m_oProperty
.
RenderToOOX
(
oRenderParameter
);
sResult
+=
L"</w:pPr>"
;
}
sResult
+=
m_pResult
->
m_pTextItems
->
m_aArray
[
i
]
->
RenderToOOX
(
oNewParametr
);
}
}
else
{
sResult
+=
L"<w:r>"
;
sResult
+=
L"<w:r>"
;
if
(
!
props
.
IsEmpty
())
if
(
!
props
.
IsEmpty
())
sResult
+=
props
;
sResult
+=
props
;
sResult
+=
m_pResult
->
m_pTextItems
->
RenderToOOX
(
oNewParametr
);
sResult
+=
L"</w:r>"
;
sResult
+=
L"</w:r>"
;
}
//заканчиваем Field
//заканчиваем Field
sResult
+=
L"<w:r><w:fldChar w:fldCharType=
\"
end
\"
/></w:r>"
;
sResult
+=
L"<w:r><w:fldChar w:fldCharType=
\"
end
\"
/></w:r>"
;
...
...
ASCOfficeRtfFile/RtfFormatLib/source/RtfGlobalTables.h
View file @
623d89d1
...
@@ -466,6 +466,14 @@ public:
...
@@ -466,6 +466,14 @@ public:
i
=
AddItem
(
author
);
i
=
AddItem
(
author
);
return
i
;
return
i
;
}
}
CString
GetAuthor
(
int
ind
)
{
if
(
ind
==
PROP_DEF
||
ind
>
m_aArray
.
size
())
return
L""
;
return
m_aArray
[
ind
];
}
};
};
//class RtfRSIDTable : public IDocumentElement, public ItemContainer<rsidString>
//class RtfRSIDTable : public IDocumentElement, public ItemContainer<rsidString>
...
...
ASCOfficeRtfFile/RtfFormatLib/source/RtfOle.cpp
View file @
623d89d1
...
@@ -60,7 +60,7 @@ CString RtfOle::RenderToOOX(RenderParameter oRenderParameter)
...
@@ -60,7 +60,7 @@ CString RtfOle::RenderToOOX(RenderParameter oRenderParameter)
{
{
bInsert
=
true
;
bInsert
=
true
;
CString
sAuthor
=
p
CharProps
->
m_nRevauth
!=
PROP_DEF
?
poRtfDocument
->
m_oRevisionTable
[
pCharProps
->
m_nRevauth
]
:
L""
;
CString
sAuthor
=
p
oRtfDocument
->
m_oRevisionTable
.
GetAuthor
(
pCharProps
->
m_nRevauth
)
;
CString
sDate
(
RtfUtility
::
convertDateTime
(
pCharProps
->
m_nRevdttm
).
c_str
());
CString
sDate
(
RtfUtility
::
convertDateTime
(
pCharProps
->
m_nRevdttm
).
c_str
());
sResult
+=
L"<w:ins w:date=
\"
"
+
sDate
+
L"
\"
w:author=
\"
"
+
sAuthor
+
L"
\"
w:id=
\"
"
+
std
::
to_wstring
(
poOOXWriter
->
m_nCurTrackChangesId
++
).
c_str
()
+
L"
\"
>"
;
sResult
+=
L"<w:ins w:date=
\"
"
+
sDate
+
L"
\"
w:author=
\"
"
+
sAuthor
+
L"
\"
w:id=
\"
"
+
std
::
to_wstring
(
poOOXWriter
->
m_nCurTrackChangesId
++
).
c_str
()
+
L"
\"
>"
;
...
@@ -70,7 +70,7 @@ CString RtfOle::RenderToOOX(RenderParameter oRenderParameter)
...
@@ -70,7 +70,7 @@ CString RtfOle::RenderToOOX(RenderParameter oRenderParameter)
{
{
bDelete
=
true
;
bDelete
=
true
;
CString
sAuthor
=
p
CharProps
->
m_nRevauthDel
!=
PROP_DEF
?
poRtfDocument
->
m_oRevisionTable
[
pCharProps
->
m_nRevauthDel
]
:
L""
;
CString
sAuthor
=
p
oRtfDocument
->
m_oRevisionTable
.
GetAuthor
(
pCharProps
->
m_nRevauthDel
)
;
CString
sDate
(
RtfUtility
::
convertDateTime
(
pCharProps
->
m_nRevdttmDel
).
c_str
());
CString
sDate
(
RtfUtility
::
convertDateTime
(
pCharProps
->
m_nRevdttmDel
).
c_str
());
sResult
+=
L"<w:del w:date=
\"
"
+
sDate
+
L"
\"
w:author=
\"
"
+
sAuthor
+
L"
\"
w:id=
\"
"
+
std
::
to_wstring
(
poOOXWriter
->
m_nCurTrackChangesId
++
).
c_str
()
+
L"
\"
>"
;
sResult
+=
L"<w:del w:date=
\"
"
+
sDate
+
L"
\"
w:author=
\"
"
+
sAuthor
+
L"
\"
w:id=
\"
"
+
std
::
to_wstring
(
poOOXWriter
->
m_nCurTrackChangesId
++
).
c_str
()
+
L"
\"
>"
;
...
...
ASCOfficeRtfFile/RtfFormatLib/source/RtfProperty.cpp
View file @
623d89d1
...
@@ -747,7 +747,7 @@ CString RtfCharProperty::RenderToOOX(RenderParameter oRenderParameter)
...
@@ -747,7 +747,7 @@ CString RtfCharProperty::RenderToOOX(RenderParameter oRenderParameter)
{
{
bInsert
=
true
;
bInsert
=
true
;
CString
sAuthor
=
m_nRevauth
!=
PROP_DEF
?
poRtfDocument
->
m_oRevisionTable
[
m_nRevauth
]
:
L""
;
CString
sAuthor
=
poRtfDocument
->
m_oRevisionTable
.
GetAuthor
(
m_nRevauth
)
;
CString
sDate
(
RtfUtility
::
convertDateTime
(
m_nRevdttm
).
c_str
());
CString
sDate
(
RtfUtility
::
convertDateTime
(
m_nRevdttm
).
c_str
());
sResult
+=
L"<w:ins w:date=
\"
"
+
sDate
+
L"
\"
w:author=
\"
"
+
sAuthor
+
L"
\"
w:id=
\"
"
+
std
::
to_wstring
(
poOOXWriter
->
m_nCurTrackChangesId
++
).
c_str
()
+
L"
\"
>"
;
sResult
+=
L"<w:ins w:date=
\"
"
+
sDate
+
L"
\"
w:author=
\"
"
+
sAuthor
+
L"
\"
w:id=
\"
"
+
std
::
to_wstring
(
poOOXWriter
->
m_nCurTrackChangesId
++
).
c_str
()
+
L"
\"
>"
;
...
@@ -757,7 +757,7 @@ CString RtfCharProperty::RenderToOOX(RenderParameter oRenderParameter)
...
@@ -757,7 +757,7 @@ CString RtfCharProperty::RenderToOOX(RenderParameter oRenderParameter)
{
{
bDelete
=
true
;
bDelete
=
true
;
CString
sAuthor
=
m_nRevauthDel
!=
PROP_DEF
?
poRtfDocument
->
m_oRevisionTable
[
m_nRevauthDel
]
:
L""
;
CString
sAuthor
=
poRtfDocument
->
m_oRevisionTable
.
GetAuthor
(
m_nRevauthDel
)
;
CString
sDate
(
RtfUtility
::
convertDateTime
(
m_nRevdttmDel
).
c_str
());
CString
sDate
(
RtfUtility
::
convertDateTime
(
m_nRevdttmDel
).
c_str
());
sResult
+=
L"<w:del w:date=
\"
"
+
sDate
+
L"
\"
w:author=
\"
"
+
sAuthor
+
L"
\"
w:id=
\"
"
+
std
::
to_wstring
(
poOOXWriter
->
m_nCurTrackChangesId
++
).
c_str
()
+
L"
\"
>"
;
sResult
+=
L"<w:del w:date=
\"
"
+
sDate
+
L"
\"
w:author=
\"
"
+
sAuthor
+
L"
\"
w:id=
\"
"
+
std
::
to_wstring
(
poOOXWriter
->
m_nCurTrackChangesId
++
).
c_str
()
+
L"
\"
>"
;
...
@@ -768,14 +768,14 @@ CString RtfCharProperty::RenderToOOX(RenderParameter oRenderParameter)
...
@@ -768,14 +768,14 @@ CString RtfCharProperty::RenderToOOX(RenderParameter oRenderParameter)
if
(
PROP_DEF
!=
m_nDeleted
)
//для rPr в pPr
if
(
PROP_DEF
!=
m_nDeleted
)
//для rPr в pPr
{
{
CString
sAuthor
=
m_nRevauthDel
!=
PROP_DEF
?
poRtfDocument
->
m_oRevisionTable
[
m_nRevauthDel
]
:
L""
;
CString
sAuthor
=
poRtfDocument
->
m_oRevisionTable
.
GetAuthor
(
m_nRevauthDel
)
;
CString
sDate
(
RtfUtility
::
convertDateTime
(
m_nRevdttmDel
).
c_str
());
CString
sDate
(
RtfUtility
::
convertDateTime
(
m_nRevdttmDel
).
c_str
());
sResult
+=
L"<w:del w:date=
\"
"
+
sDate
+
L"
\"
w:author=
\"
"
+
sAuthor
+
L"
\"
w:id=
\"
"
+
std
::
to_wstring
(
poOOXWriter
->
m_nCurTrackChangesId
++
).
c_str
()
+
L"
\"
/>"
;
sResult
+=
L"<w:del w:date=
\"
"
+
sDate
+
L"
\"
w:author=
\"
"
+
sAuthor
+
L"
\"
w:id=
\"
"
+
std
::
to_wstring
(
poOOXWriter
->
m_nCurTrackChangesId
++
).
c_str
()
+
L"
\"
/>"
;
}
}
if
(
PROP_DEF
!=
m_nRevised
)
if
(
PROP_DEF
!=
m_nRevised
)
{
{
CString
sAuthor
=
m_nRevauth
!=
PROP_DEF
?
poRtfDocument
->
m_oRevisionTable
[
m_nRevauth
]
:
L""
;
CString
sAuthor
=
poRtfDocument
->
m_oRevisionTable
.
GetAuthor
(
m_nRevauth
)
;
CString
sDate
(
RtfUtility
::
convertDateTime
(
m_nRevdttm
).
c_str
());
CString
sDate
(
RtfUtility
::
convertDateTime
(
m_nRevdttm
).
c_str
());
sResult
+=
L"<w:ins w:date=
\"
"
+
sDate
+
L"
\"
w:author=
\"
"
+
sAuthor
+
L"
\"
w:id=
\"
"
+
std
::
to_wstring
(
poOOXWriter
->
m_nCurTrackChangesId
++
).
c_str
()
+
L"
\"
/>"
;
sResult
+=
L"<w:ins w:date=
\"
"
+
sDate
+
L"
\"
w:author=
\"
"
+
sAuthor
+
L"
\"
w:id=
\"
"
+
std
::
to_wstring
(
poOOXWriter
->
m_nCurTrackChangesId
++
).
c_str
()
+
L"
\"
/>"
;
...
@@ -962,7 +962,7 @@ CString RtfCharProperty::RenderToOOX(RenderParameter oRenderParameter)
...
@@ -962,7 +962,7 @@ CString RtfCharProperty::RenderToOOX(RenderParameter oRenderParameter)
if
(
m_pOldCharProp
)
if
(
m_pOldCharProp
)
{
{
CString
sAuthor
=
m_nCrAuth
!=
PROP_DEF
?
poRtfDocument
->
m_oRevisionTable
[
m_nCrAuth
]
:
L""
;
CString
sAuthor
=
poRtfDocument
->
m_oRevisionTable
.
GetAuthor
(
m_nCrAuth
)
;
CString
sDate
(
RtfUtility
::
convertDateTime
(
m_nCrDate
).
c_str
());
CString
sDate
(
RtfUtility
::
convertDateTime
(
m_nCrDate
).
c_str
());
RenderParameter
oRenderParameterNew
=
oRenderParameter
;
RenderParameter
oRenderParameterNew
=
oRenderParameter
;
...
@@ -2168,7 +2168,7 @@ CString RtfParagraphProperty::RenderToOOX(RenderParameter oRenderParameter)
...
@@ -2168,7 +2168,7 @@ CString RtfParagraphProperty::RenderToOOX(RenderParameter oRenderParameter)
}
}
if
(
m_pOldParagraphProp
)
if
(
m_pOldParagraphProp
)
{
{
CString
sAuthor
=
m_nPrAuth
!=
PROP_DEF
?
poRtfDocument
->
m_oRevisionTable
[
m_nPrAuth
]
:
L""
;
CString
sAuthor
=
poRtfDocument
->
m_oRevisionTable
.
GetAuthor
(
m_nPrAuth
)
;
CString
sDate
(
RtfUtility
::
convertDateTime
(
m_nPrDate
).
c_str
());
CString
sDate
(
RtfUtility
::
convertDateTime
(
m_nPrDate
).
c_str
());
RenderParameter
oRenderParameterNew
=
oRenderParameter
;
RenderParameter
oRenderParameterNew
=
oRenderParameter
;
...
@@ -2859,19 +2859,19 @@ CString RtfRowProperty::RenderToOOX(RenderParameter oRenderParameter)
...
@@ -2859,19 +2859,19 @@ CString RtfRowProperty::RenderToOOX(RenderParameter oRenderParameter)
m_pOldRowProperty
;
m_pOldRowProperty
;
//if ( PROP_DEF != oReader.m_oState->m_oCharProp.m_nDeleted )
//if ( PROP_DEF != oReader.m_oState->m_oCharProp.m_nDeleted )
//{
//{
// CString sAuthor =
oReader.m_oState->m_oCharProp.m_nRevauthDel != PROP_DEF ? poRtfDocument->m_oRevisionTable[ oReader.m_oState->m_oCharProp.m_nRevauthDel] : L""
;
// CString sAuthor =
poRtfDocument->m_oRevisionTable.GetAuthor(oReader.m_oState->m_oCharProp.m_nRevauthDel)
;
// CString sDate(RtfUtility::convertDateTime(oReader.m_oState->m_oCharProp.m_nRevdttmDel).c_str());
// CString sDate(RtfUtility::convertDateTime(oReader.m_oState->m_oCharProp.m_nRevdttmDel).c_str());
// sResult += L"<w:del w:date=\"" + sDate + L"\" w:author=\"" + sAuthor + L"\" w:id=\"" + std::to_wstring(poOOXWriter->m_nCurTrackChangesId++).c_str() + L"\"/>";
// sResult += L"<w:del w:date=\"" + sDate + L"\" w:author=\"" + sAuthor + L"\" w:id=\"" + std::to_wstring(poOOXWriter->m_nCurTrackChangesId++).c_str() + L"\"/>";
//}
//}
//if ( PROP_DEF != oReader.m_oState->m_oCharProp.m_nRevised )
//if ( PROP_DEF != oReader.m_oState->m_oCharProp.m_nRevised )
//{
//{
// CString sAuthor =
m_nRevauth != PROP_DEF ? poRtfDocument->m_oRevisionTable[ oReader.m_oState->m_oCharProp.m_nRevauth] : L""
;
// CString sAuthor =
poRtfDocument->m_oRevisionTable.GetAuthor(oReader.m_oState->m_oCharProp.m_nRevauth)
;
// CString sDate(RtfUtility::convertDateTime(oReader.m_oState->m_oCharProp.m_nRevdttm).c_str());
// CString sDate(RtfUtility::convertDateTime(oReader.m_oState->m_oCharProp.m_nRevdttm).c_str());
//
//
// sResult += L"<w:ins w:date=\"" + sDate + L"\" w:author=\"" + sAuthor + L"\" w:id=\"" + std::to_wstring(poOOXWriter->m_nCurTrackChangesId++).c_str() + L"\"/>";
// sResult += L"<w:ins w:date=\"" + sDate + L"\" w:author=\"" + sAuthor + L"\" w:id=\"" + std::to_wstring(poOOXWriter->m_nCurTrackChangesId++).c_str() + L"\"/>";
//}
//}
CString
sAuthor
=
m_nTrAuth
!=
PROP_DEF
?
poRtfDocument
->
m_oRevisionTable
[
m_nTrAuth
]
:
L""
;
CString
sAuthor
=
poRtfDocument
->
m_oRevisionTable
.
GetAuthor
(
m_nTrAuth
)
;
CString
sDate
(
RtfUtility
::
convertDateTime
(
m_nTrDate
).
c_str
());
CString
sDate
(
RtfUtility
::
convertDateTime
(
m_nTrDate
).
c_str
());
RenderParameter
oRenderParameterNew
=
oRenderParameter
;
RenderParameter
oRenderParameterNew
=
oRenderParameter
;
...
...
ASCOfficeRtfFile/RtfFormatLib/source/RtfSection.cpp
View file @
623d89d1
...
@@ -823,7 +823,7 @@ CString RtfSectionProperty::RenderToOOX(RenderParameter oRenderParameter)
...
@@ -823,7 +823,7 @@ CString RtfSectionProperty::RenderToOOX(RenderParameter oRenderParameter)
}
}
if
(
m_pOldSectionProp
)
if
(
m_pOldSectionProp
)
{
{
CString
sAuthor
=
m_nSrAuth
!=
PROP_DEF
?
poRtfDocument
->
m_oRevisionTable
[
m_nSrAuth
]
:
L""
;
CString
sAuthor
=
poRtfDocument
->
m_oRevisionTable
.
GetAuthor
(
m_nSrAuth
)
;
CString
sDate
(
RtfUtility
::
convertDateTime
(
m_nSrDate
).
c_str
());
CString
sDate
(
RtfUtility
::
convertDateTime
(
m_nSrDate
).
c_str
());
RenderParameter
oRenderParameterNew
=
oRenderParameter
;
RenderParameter
oRenderParameterNew
=
oRenderParameter
;
...
...
ASCOfficeRtfFile/RtfFormatLib/source/RtfShape.cpp
View file @
623d89d1
...
@@ -753,7 +753,7 @@ CString RtfShape::RenderToOOXBegin(RenderParameter oRenderParameter)
...
@@ -753,7 +753,7 @@ CString RtfShape::RenderToOOXBegin(RenderParameter oRenderParameter)
{
{
m_bInsert
=
true
;
m_bInsert
=
true
;
CString
sAuthor
=
m_oCharProperty
.
m_nRevauth
!=
PROP_DEF
?
poRtfDocument
->
m_oRevisionTable
[
m_oCharProperty
.
m_nRevauth
]
:
L""
;
CString
sAuthor
=
poRtfDocument
->
m_oRevisionTable
.
GetAuthor
(
m_oCharProperty
.
m_nRevauth
)
;
CString
sDate
(
RtfUtility
::
convertDateTime
(
m_oCharProperty
.
m_nRevdttm
).
c_str
());
CString
sDate
(
RtfUtility
::
convertDateTime
(
m_oCharProperty
.
m_nRevdttm
).
c_str
());
sResult
+=
L"<w:ins w:date=
\"
"
+
sDate
+
L"
\"
w:author=
\"
"
+
sAuthor
+
L"
\"
w:id=
\"
"
+
std
::
to_wstring
(
poOOXWriter
->
m_nCurTrackChangesId
++
).
c_str
()
+
L"
\"
>"
;
sResult
+=
L"<w:ins w:date=
\"
"
+
sDate
+
L"
\"
w:author=
\"
"
+
sAuthor
+
L"
\"
w:id=
\"
"
+
std
::
to_wstring
(
poOOXWriter
->
m_nCurTrackChangesId
++
).
c_str
()
+
L"
\"
>"
;
...
@@ -763,7 +763,7 @@ CString RtfShape::RenderToOOXBegin(RenderParameter oRenderParameter)
...
@@ -763,7 +763,7 @@ CString RtfShape::RenderToOOXBegin(RenderParameter oRenderParameter)
{
{
m_bDelete
=
true
;
m_bDelete
=
true
;
CString
sAuthor
=
m_oCharProperty
.
m_nRevauthDel
!=
PROP_DEF
?
poRtfDocument
->
m_oRevisionTable
[
m_oCharProperty
.
m_nRevauthDel
]
:
L""
;
CString
sAuthor
=
poRtfDocument
->
m_oRevisionTable
.
GetAuthor
(
m_oCharProperty
.
m_nRevauthDel
)
;
CString
sDate
(
RtfUtility
::
convertDateTime
(
m_oCharProperty
.
m_nRevdttmDel
).
c_str
());
CString
sDate
(
RtfUtility
::
convertDateTime
(
m_oCharProperty
.
m_nRevdttmDel
).
c_str
());
sResult
+=
L"<w:del w:date=
\"
"
+
sDate
+
L"
\"
w:author=
\"
"
+
sAuthor
+
L"
\"
w:id=
\"
"
+
std
::
to_wstring
(
poOOXWriter
->
m_nCurTrackChangesId
++
).
c_str
()
+
L"
\"
>"
;
sResult
+=
L"<w:del w:date=
\"
"
+
sDate
+
L"
\"
w:author=
\"
"
+
sAuthor
+
L"
\"
w:id=
\"
"
+
std
::
to_wstring
(
poOOXWriter
->
m_nCurTrackChangesId
++
).
c_str
()
+
L"
\"
>"
;
...
...
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