ofz#46467 Timeout
Change-Id: Ib2a248a6f912a340d2f0b79a068b68036fa357c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132690 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
@@ -2750,7 +2750,7 @@ void HwpReader::make_text_p1(HWPPara * para,bool bParaStart)
|
|||||||
void HwpReader::make_text_p3(HWPPara * para,bool bParaStart)
|
void HwpReader::make_text_p3(HWPPara * para,bool bParaStart)
|
||||||
{
|
{
|
||||||
hchar_string str;
|
hchar_string str;
|
||||||
int n, res;
|
int res;
|
||||||
hchar dest[3];
|
hchar dest[3];
|
||||||
unsigned char firstspace = 0;
|
unsigned char firstspace = 0;
|
||||||
bool pstart = bParaStart;
|
bool pstart = bParaStart;
|
||||||
@@ -2804,10 +2804,15 @@ void HwpReader::make_text_p3(HWPPara * para,bool bParaStart)
|
|||||||
d->bInHeader = false;
|
d->bInHeader = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (n = 0; n < para->nch && para->hhstr[n]->hh;
|
int n = 0;
|
||||||
n += para->hhstr[n]->WSize())
|
while (n < para->nch)
|
||||||
{
|
{
|
||||||
if( para->hhstr[n]->hh == CH_END_PARA )
|
const auto& box = para->hhstr[n];
|
||||||
|
|
||||||
|
if (!box->hh)
|
||||||
|
break;
|
||||||
|
|
||||||
|
if (box->hh == CH_END_PARA)
|
||||||
{
|
{
|
||||||
if (!str.empty())
|
if (!str.empty())
|
||||||
{
|
{
|
||||||
@@ -2820,7 +2825,7 @@ void HwpReader::make_text_p3(HWPPara * para,bool bParaStart)
|
|||||||
if( pstart ){ ENDP(); }
|
if( pstart ){ ENDP(); }
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if( para->hhstr[n]->hh == CH_SPACE && !firstspace)
|
else if (box->hh == CH_SPACE && !firstspace)
|
||||||
{
|
{
|
||||||
if( !pstart ) {STARTP(); }
|
if( !pstart ) {STARTP(); }
|
||||||
if( !tstart ) {STARTT(n);}
|
if( !tstart ) {STARTT(n);}
|
||||||
@@ -2829,7 +2834,7 @@ void HwpReader::make_text_p3(HWPPara * para,bool bParaStart)
|
|||||||
mxList->clear();
|
mxList->clear();
|
||||||
endEl("text:s");
|
endEl("text:s");
|
||||||
}
|
}
|
||||||
else if ( para->hhstr[n]->hh >= CH_SPACE )
|
else if (box->hh >= CH_SPACE)
|
||||||
{
|
{
|
||||||
if( n > 0 )
|
if( n > 0 )
|
||||||
if( para->GetCharShape(n)->index != para->GetCharShape(n-1)->index && !infield )
|
if( para->GetCharShape(n)->index != para->GetCharShape(n-1)->index && !infield )
|
||||||
@@ -2839,19 +2844,19 @@ void HwpReader::make_text_p3(HWPPara * para,bool bParaStart)
|
|||||||
makeChars(str);
|
makeChars(str);
|
||||||
ENDT();
|
ENDT();
|
||||||
}
|
}
|
||||||
if( para->hhstr[n]->hh == CH_SPACE )
|
if (box->hh == CH_SPACE)
|
||||||
firstspace = 0;
|
firstspace = 0;
|
||||||
else
|
else
|
||||||
firstspace = 1;
|
firstspace = 1;
|
||||||
res = hcharconv(para->hhstr[n]->hh, dest, UNICODE);
|
res = hcharconv(box->hh, dest, UNICODE);
|
||||||
for( int j = 0 ; j < res; j++ )
|
for( int j = 0 ; j < res; j++ )
|
||||||
{
|
{
|
||||||
str.push_back(dest[j]);
|
str.push_back(dest[j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (para->hhstr[n]->hh == CH_FIELD)
|
else if (box->hh == CH_FIELD)
|
||||||
{
|
{
|
||||||
FieldCode *hbox = static_cast<FieldCode*>(para->hhstr[n].get());
|
FieldCode *hbox = static_cast<FieldCode*>(box.get());
|
||||||
if( hbox->location_info == 1)
|
if( hbox->location_info == 1)
|
||||||
{
|
{
|
||||||
if( !pstart ) {STARTP(); }
|
if( !pstart ) {STARTP(); }
|
||||||
@@ -2881,13 +2886,13 @@ void HwpReader::make_text_p3(HWPPara * para,bool bParaStart)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
switch (para->hhstr[n]->hh)
|
switch (box->hh)
|
||||||
{
|
{
|
||||||
case CH_BOOKMARK:
|
case CH_BOOKMARK:
|
||||||
if( !pstart ) {STARTP(); }
|
if( !pstart ) {STARTP(); }
|
||||||
if( !tstart ) {STARTT(n);}
|
if( !tstart ) {STARTT(n);}
|
||||||
makeChars(str);
|
makeChars(str);
|
||||||
makeBookmark(static_cast<Bookmark*>(para->hhstr[n].get()));
|
makeBookmark(static_cast<Bookmark*>(box.get()));
|
||||||
break;
|
break;
|
||||||
case CH_DATE_FORM: // 7
|
case CH_DATE_FORM: // 7
|
||||||
break;
|
break;
|
||||||
@@ -2895,7 +2900,7 @@ void HwpReader::make_text_p3(HWPPara * para,bool bParaStart)
|
|||||||
if( !pstart ) {STARTP(); }
|
if( !pstart ) {STARTP(); }
|
||||||
if( !tstart ) {STARTT(n);}
|
if( !tstart ) {STARTT(n);}
|
||||||
makeChars(str);
|
makeChars(str);
|
||||||
makeDateCode(static_cast<DateCode*>(para->hhstr[n].get()));
|
makeDateCode(static_cast<DateCode*>(box.get()));
|
||||||
break;
|
break;
|
||||||
case CH_TAB: // 9
|
case CH_TAB: // 9
|
||||||
if( !pstart ) {STARTP(); }
|
if( !pstart ) {STARTP(); }
|
||||||
@@ -2909,7 +2914,7 @@ void HwpReader::make_text_p3(HWPPara * para,bool bParaStart)
|
|||||||
case CH_TEXT_BOX: /* 10 - ordered by Table/text box/formula/button/hypertext */
|
case CH_TEXT_BOX: /* 10 - ordered by Table/text box/formula/button/hypertext */
|
||||||
{
|
{
|
||||||
/* produce tables first, and treat formula as being in text:p. */
|
/* produce tables first, and treat formula as being in text:p. */
|
||||||
TxtBox *hbox = static_cast<TxtBox*>(para->hhstr[n].get());
|
TxtBox *hbox = static_cast<TxtBox*>(box.get());
|
||||||
|
|
||||||
if( hbox->style.anchor_type == 0 )
|
if( hbox->style.anchor_type == 0 )
|
||||||
{
|
{
|
||||||
@@ -2943,7 +2948,7 @@ void HwpReader::make_text_p3(HWPPara * para,bool bParaStart)
|
|||||||
}
|
}
|
||||||
case CH_PICTURE: // 11
|
case CH_PICTURE: // 11
|
||||||
{
|
{
|
||||||
Picture *hbox = static_cast<Picture*>(para->hhstr[n].get());
|
Picture *hbox = static_cast<Picture*>(box.get());
|
||||||
if( hbox->style.anchor_type == 0 )
|
if( hbox->style.anchor_type == 0 )
|
||||||
{
|
{
|
||||||
if( !pstart ) {STARTP(); }
|
if( !pstart ) {STARTP(); }
|
||||||
@@ -2981,19 +2986,19 @@ void HwpReader::make_text_p3(HWPPara * para,bool bParaStart)
|
|||||||
if( !pstart ) {STARTP();}
|
if( !pstart ) {STARTP();}
|
||||||
if( !tstart ) {STARTT(n);}
|
if( !tstart ) {STARTT(n);}
|
||||||
makeChars(str);
|
makeChars(str);
|
||||||
makeHidden(static_cast<Hidden*>(para->hhstr[n].get()));
|
makeHidden(static_cast<Hidden*>(box.get()));
|
||||||
break;
|
break;
|
||||||
case CH_FOOTNOTE: // 17
|
case CH_FOOTNOTE: // 17
|
||||||
if( !pstart ) {STARTP();}
|
if( !pstart ) {STARTP();}
|
||||||
if( !tstart ) {STARTT(n);}
|
if( !tstart ) {STARTT(n);}
|
||||||
makeChars(str);
|
makeChars(str);
|
||||||
makeFootnote(static_cast<Footnote*>(para->hhstr[n].get()));
|
makeFootnote(static_cast<Footnote*>(box.get()));
|
||||||
break;
|
break;
|
||||||
case CH_AUTO_NUM: // 18
|
case CH_AUTO_NUM: // 18
|
||||||
if( !pstart ) {STARTP();}
|
if( !pstart ) {STARTP();}
|
||||||
if( !tstart ) {STARTT(n);}
|
if( !tstart ) {STARTT(n);}
|
||||||
makeChars(str);
|
makeChars(str);
|
||||||
makeAutoNum(static_cast<AutoNum*>(para->hhstr[n].get()));
|
makeAutoNum(static_cast<AutoNum*>(box.get()));
|
||||||
break;
|
break;
|
||||||
case CH_NEW_NUM: // 19 -skip
|
case CH_NEW_NUM: // 19 -skip
|
||||||
break;
|
break;
|
||||||
@@ -3003,7 +3008,7 @@ void HwpReader::make_text_p3(HWPPara * para,bool bParaStart)
|
|||||||
if( !pstart ) {STARTP();}
|
if( !pstart ) {STARTP();}
|
||||||
if( !tstart ) {STARTT(n);}
|
if( !tstart ) {STARTT(n);}
|
||||||
makeChars(str);
|
makeChars(str);
|
||||||
makeMailMerge(static_cast<MailMerge*>(para->hhstr[n].get()));
|
makeMailMerge(static_cast<MailMerge*>(box.get()));
|
||||||
break;
|
break;
|
||||||
case CH_COMPOSE: /* 23 - overlapping letters */
|
case CH_COMPOSE: /* 23 - overlapping letters */
|
||||||
break;
|
break;
|
||||||
@@ -3023,7 +3028,7 @@ void HwpReader::make_text_p3(HWPPara * para,bool bParaStart)
|
|||||||
if( !pstart ) {STARTP();}
|
if( !pstart ) {STARTP();}
|
||||||
if( !tstart ) {STARTT(n);}
|
if( !tstart ) {STARTT(n);}
|
||||||
makeChars(str);
|
makeChars(str);
|
||||||
makeOutline(static_cast<Outline *>(para->hhstr[n].get()));
|
makeOutline(static_cast<Outline *>(box.get()));
|
||||||
break;
|
break;
|
||||||
case CH_FIXED_SPACE:
|
case CH_FIXED_SPACE:
|
||||||
case CH_KEEP_SPACE:
|
case CH_KEEP_SPACE:
|
||||||
@@ -3031,6 +3036,7 @@ void HwpReader::make_text_p3(HWPPara * para,bool bParaStart)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
n += box->WSize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user