Commit 0cb286e9 authored by Elen.Subbotina's avatar Elen.Subbotina Committed by Alexander Trofimov

OdfFileReader. Испрвлены гиперлинки в комментариях.

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@62993 954022d7-b5bf-4e40-9824-e11837661b57
parent 44585638
......@@ -42,7 +42,8 @@ docx_conversion_context::docx_conversion_context(package::docx_document * Output
rtl_(false),
delayed_converting_(false),
process_headers_footers_(false),
process_note_(noNote)
process_note_(noNote),
process_comment_(false)
{
applicationFonts_ = new CApplicationFonts();
}
......@@ -167,7 +168,8 @@ std::wstring docx_conversion_context::add_hyperlink(const std::wstring & href, b
{
hyperlinks::_type_place type = hyperlinks::document_place;
if (process_note_ == footNote || process_note_ == footNoteRefSet) type = hyperlinks::footnote_place;
if (process_comment_ == true) type = hyperlinks::comment_place;
else if (process_note_ == footNote || process_note_ == footNoteRefSet) type = hyperlinks::footnote_place;
else if (process_note_ == endNote || process_note_ == endNoteRefSet ) type = hyperlinks::endnote_place;
return hyperlinks_.add(href, type, draw);
......
......@@ -498,8 +498,9 @@ public:
void start_chart(std::wstring const & name);
void end_chart();
void start_comment(std::wstring const & content,std::wstring const & author, std::wstring const & date);
void end_comment();
void start_comment() {process_comment_ = true;}
void end_comment() {process_comment_ = false;}
bool process_comment_;
void set_process_headers_footers(bool Val) { process_headers_footers_ = Val; }
headers_footers & get_headers_footers() { return headers_footers_; }
......
......@@ -15,7 +15,8 @@ public:
{
document_place,
endnote_place,
footnote_place
footnote_place,
comment_place
};
......
......@@ -97,6 +97,8 @@ void office_annotation::docx_convert(oox::docx_conversion_context & Context)
author = xml::utils::replace_text_to_xml(dynamic_cast<dc_creator * >(dc_creator_.get())->content_);
}
////////////////////////////////////////
Context.start_comment();
oox::docx_conversion_context::StreamsManPtr prev = Context.get_stream_man();
std::wstringstream temp_stream(Context.get_drawing_context().get_text_stream_frame());
......@@ -118,9 +120,11 @@ void office_annotation::docx_convert(oox::docx_conversion_context & Context)
Context.get_comments_context().start_comment(temp_stream.str(), author,date);//content, date, author
Context.dump_hyperlinks(Context.get_comments_context().get_rels(), oox::hyperlinks::document_place);
Context.dump_hyperlinks(Context.get_comments_context().get_rels(), oox::hyperlinks::comment_place);
Context.set_stream_man(prev);
Context.end_comment();
}
void office_annotation::xlsx_convert(oox::xlsx_conversion_context & Context)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment