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

(1.2.0.122): ASCOfficeOdfFileW


git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@57678 954022d7-b5bf-4e40-9824-e11837661b57
parent f311550e
...@@ -714,7 +714,8 @@ void odf_drawing_context::start_frame() ...@@ -714,7 +714,8 @@ void odf_drawing_context::start_frame()
if (impl_->current_graphic_properties) if (impl_->current_graphic_properties)
{ {
impl_->anchor_settings_.run_through_ = run_through(run_through::Background); impl_->anchor_settings_.run_through_ = run_through(run_through::Background);
impl_->anchor_settings_.style_wrap_ = style_wrap(style_wrap::RunThrough); if (!impl_->anchor_settings_.style_wrap_)
impl_->anchor_settings_.style_wrap_ = style_wrap(style_wrap::RunThrough);
impl_->current_graphic_properties->content().common_background_color_attlist_.fo_background_color_ = odf::background_color(odf::background_color::Transparent); impl_->current_graphic_properties->content().common_background_color_attlist_.fo_background_color_ = odf::background_color(odf::background_color::Transparent);
} }
} }
......
...@@ -162,6 +162,8 @@ void DocxConverter::convert_document() ...@@ -162,6 +162,8 @@ void DocxConverter::convert_document()
const OOX::CDocument* document = docx_document->GetDocument(); const OOX::CDocument* document = docx_document->GetDocument();
if (!document)return; if (!document)return;
m_bKeepNextParagraph = false; //
for ( int nIndex = 0; nIndex < document->m_arrItems.GetSize(); nIndex++ ) for ( int nIndex = 0; nIndex < document->m_arrItems.GetSize(); nIndex++ )
{ {
convert(document->m_arrItems[nIndex]); convert(document->m_arrItems[nIndex]);
...@@ -643,7 +645,7 @@ void DocxConverter::convert(OOX::Logic::CParagraphProperty *oox_paragraph_pr, cp ...@@ -643,7 +645,7 @@ void DocxConverter::convert(OOX::Logic::CParagraphProperty *oox_paragraph_pr, cp
m_bKeepNextParagraph = true; m_bKeepNextParagraph = true;
} }
convert(oox_paragraph_pr->m_oFramePr.GetPointer(), paragraph_properties); // convert(oox_paragraph_pr->m_oFramePr.GetPointer(), paragraph_properties); //
convert(oox_paragraph_pr->m_oSectPr.GetPointer()); convert(oox_paragraph_pr->m_oSectPr.GetPointer());
} }
...@@ -919,25 +921,56 @@ void DocxConverter::convert(ComplexTypes::Word::CFramePr *oox_frame_pr, odf::sty ...@@ -919,25 +921,56 @@ void DocxConverter::convert(ComplexTypes::Word::CFramePr *oox_frame_pr, odf::sty
if (oox_frame_pr == NULL) return; if (oox_frame_pr == NULL) return;
if (paragraph_properties == NULL) return; if (paragraph_properties == NULL) return;
odt_context->start_drop_cap(paragraph_properties); if (oox_frame_pr->m_oDropCap.IsInit() || oox_frame_pr->m_oLines.IsInit())
{
if (oox_frame_pr->m_oDropCap.IsInit() && oox_frame_pr->m_oDropCap->GetValue() == SimpleTypes::dropcapMargin) //
odt_context->set_drop_cap_margin(true); odt_context->start_drop_cap(paragraph_properties);
if (oox_frame_pr->m_oLines.IsInit())
odt_context->set_drop_cap_lines(oox_frame_pr->m_oLines->GetValue()); if (oox_frame_pr->m_oDropCap.IsInit() && oox_frame_pr->m_oDropCap->GetValue() == SimpleTypes::dropcapMargin)
//nullable<SimpleTypes::COnOff<> > m_oAnchorLock; odt_context->set_drop_cap_margin(true);
//nullable<SimpleTypes::CTwipsMeasure > m_oH; if (oox_frame_pr->m_oLines.IsInit())
//nullable<SimpleTypes::CHAnchor<> > m_oHAnchor; odt_context->set_drop_cap_lines(oox_frame_pr->m_oLines->GetValue());
//nullable<SimpleTypes::CHeightRule<> > m_oHRule; //??
//nullable<SimpleTypes::CTwipsMeasure > m_oHSpace; //nullable<SimpleTypes::CTwipsMeasure > m_oHSpace;
//nullable<SimpleTypes::CVAnchor<> > m_oVAnchor; //nullable<SimpleTypes::CTwipsMeasure > m_oVSpace;
//nullable<SimpleTypes::CTwipsMeasure > m_oVSpace; }
//nullable<SimpleTypes::CTwipsMeasure > m_oW; else
//nullable<SimpleTypes::CWrap<> > m_oWrap; {
//nullable<SimpleTypes::CSignedTwipsMeasure > m_oX; // .. .. todoo ??
//nullable<SimpleTypes::CXAlign<> > m_oXAlign; if (oox_frame_pr->m_oXAlign.IsInit())
//nullable<SimpleTypes::CSignedTwipsMeasure > m_oY; {
//nullable<SimpleTypes::CYAlign<> > m_oYAlign; switch(oox_frame_pr->m_oXAlign->GetValue())
{
case SimpleTypes::xalignCenter : paragraph_properties->content().fo_text_align_ = odf::text_align(odf::text_align::Center); break;
case SimpleTypes::xalignInside : paragraph_properties->content().fo_text_align_ = odf::text_align(odf::text_align::Start ); break;
case SimpleTypes::xalignLeft : paragraph_properties->content().fo_text_align_ = odf::text_align(odf::text_align::Left ); break;
case SimpleTypes::xalignOutside : paragraph_properties->content().fo_text_align_ = odf::text_align(odf::text_align::End ); break;
case SimpleTypes::xalignRight : paragraph_properties->content().fo_text_align_ = odf::text_align(odf::text_align::Right); break;
}
}
if (oox_frame_pr->m_oYAlign.IsInit())
{
switch(oox_frame_pr->m_oYAlign->GetValue())
{
case SimpleTypes::yalignBottom : paragraph_properties->content().style_vertical_align_ = odf::vertical_align(odf::vertical_align::Bottom); break;
case SimpleTypes::yalignCenter : paragraph_properties->content().style_vertical_align_ = odf::vertical_align(odf::vertical_align::Middle ); break;
case SimpleTypes::yalignInline : paragraph_properties->content().style_vertical_align_ = odf::vertical_align(odf::vertical_align::Baseline ); break;
case SimpleTypes::yalignInside : paragraph_properties->content().style_vertical_align_ = odf::vertical_align(odf::vertical_align::Auto ); break;
case SimpleTypes::yalignOutside : paragraph_properties->content().style_vertical_align_ = odf::vertical_align(odf::vertical_align::Auto); break;
case SimpleTypes::yalignTop : paragraph_properties->content().style_vertical_align_ = odf::vertical_align(odf::vertical_align::Top); break;
}
}
}
//nullable<SimpleTypes::CHeightRule<> > m_oHRule;
// drawing
//nullable<SimpleTypes::CTwipsMeasure > m_oW;
//nullable<SimpleTypes::CWrap<> > m_oWrap;
//nullable<SimpleTypes::CTwipsMeasure > m_oH;
//nullable<SimpleTypes::CHAnchor<> > m_oHAnchor;
//nullable<SimpleTypes::CVAnchor<> > m_oVAnchor;
//nullable<SimpleTypes::CSignedTwipsMeasure > m_oX;
//nullable<SimpleTypes::CSignedTwipsMeasure > m_oY;
} }
void DocxConverter::convert(OOX::Logic::CTblBorders *oox_border, odf::style_table_cell_properties *table_cell_properties) void DocxConverter::convert(OOX::Logic::CTblBorders *oox_border, odf::style_table_cell_properties *table_cell_properties)
{ {
...@@ -1324,8 +1357,10 @@ void DocxConverter::convert(OOX::Logic::CRunProperty *oox_run_pr, odf::style_tex ...@@ -1324,8 +1357,10 @@ void DocxConverter::convert(OOX::Logic::CRunProperty *oox_run_pr, odf::style_tex
{ {
text_properties->content().style_text_scale_ = odf::percent(oox_run_pr->m_oW->m_oVal->GetValue()); text_properties->content().style_text_scale_ = odf::percent(oox_run_pr->m_oW->m_oVal->GetValue());
} }
if (oox_run_pr->m_oStrike.IsInit()) if (oox_run_pr->m_oStrike.IsInit() && oox_run_pr->m_oStrike->m_oVal.ToBool())
{
text_properties->content().style_text_line_through_type_ = odf::line_type(odf::line_type::Single); text_properties->content().style_text_line_through_type_ = odf::line_type(odf::line_type::Single);
}
if (oox_run_pr->m_oBdr.IsInit()) if (oox_run_pr->m_oBdr.IsInit())
{ {
......
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
//1 //1
//2 //2
//0 //0
//120 //122
#define INTVER 1,2,0,120 #define INTVER 1,2,0,122
#define STRVER "1,2,0,120\0" #define STRVER "1,2,0,122\0"
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