loplugin:indentation in helpcompiler..io
Change-Id: Ia3f05662cc9542feeac3096d29e9dec6d1858620 Reviewed-on: https://gerrit.libreoffice.org/67558 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -52,12 +52,11 @@ bool LibXmlTreeWalker::end() const
|
||||
BasicCodeTagger::BasicCodeTagger( xmlDocPtr rootDoc ):
|
||||
m_Highlighter(HighlighterLanguage::Basic)
|
||||
{
|
||||
if ( rootDoc == nullptr )
|
||||
throw NULL_DOCUMENT;
|
||||
m_pDocument = rootDoc;
|
||||
if ( rootDoc == nullptr )
|
||||
throw NULL_DOCUMENT;
|
||||
m_pDocument = rootDoc;
|
||||
m_pXmlTreeWalker = nullptr;
|
||||
m_bTaggingCompleted = false;
|
||||
|
||||
}
|
||||
|
||||
BasicCodeTagger::~BasicCodeTagger()
|
||||
@@ -69,7 +68,7 @@ BasicCodeTagger::~BasicCodeTagger()
|
||||
*/
|
||||
void BasicCodeTagger::getBasicCodeContainerNodes()
|
||||
{
|
||||
xmlNodePtr currentNode;
|
||||
xmlNodePtr currentNode;
|
||||
|
||||
m_BasicCodeContainerTags.clear();
|
||||
|
||||
@@ -163,7 +162,7 @@ void BasicCodeTagger::tagParagraph( xmlNodePtr paragraph )
|
||||
*/
|
||||
void BasicCodeTagger::tagBasicCodes()
|
||||
{
|
||||
if ( m_bTaggingCompleted )
|
||||
if ( m_bTaggingCompleted )
|
||||
return;
|
||||
//gather <bascode> nodes
|
||||
try
|
||||
|
||||
@@ -275,9 +275,9 @@ static bool LoadCommonHeader(HWPDrawingObject * hdo, unsigned short * link_info)
|
||||
return false;
|
||||
common_size += 278;
|
||||
}
|
||||
if( ( size >= common_size + 3 ) && ( hdo->property.flag & HWPDO_FLAG_WATERMARK ) )
|
||||
if( ( size >= common_size + 3 ) && ( hdo->property.flag & HWPDO_FLAG_WATERMARK ) )
|
||||
//if( ( size >= common_size ) && ( hdo->property.flag >> 20 & 0x01 ) )
|
||||
{
|
||||
{
|
||||
if (size - common_size >= 5)
|
||||
hmem->skipBlock(2);
|
||||
unsigned char tmp8;
|
||||
@@ -311,9 +311,9 @@ static bool LoadCommonHeader(HWPDrawingObject * hdo, unsigned short * link_info)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (size <= common_size)
|
||||
if (size <= common_size)
|
||||
return true;
|
||||
return hmem->skipBlock(size - common_size ) != 0;
|
||||
return hmem->skipBlock(size - common_size ) != 0;
|
||||
}
|
||||
|
||||
static std::unique_ptr<HWPDrawingObject> LoadDrawingObject(void)
|
||||
|
||||
@@ -149,9 +149,9 @@ int getRepFamilyName(const char* orig, char *buf, double &ratio)
|
||||
for( int i = 0 ; i < int(SAL_N_ELEMENTS(FontMapTab)); i++)
|
||||
{
|
||||
if( !strcmp(orig, FontMapTab[i].familyname) ){
|
||||
ratio = FontMapTab[i].ratio;
|
||||
ratio = FontMapTab[i].ratio;
|
||||
return strlen( strcpy(buf,RepFontTab[FontMapTab[i].key]) );
|
||||
}
|
||||
}
|
||||
}
|
||||
ratio = FontMapTab[0].ratio;
|
||||
return strlen( strcpy(buf, RepFontTab[0] ) );
|
||||
|
||||
@@ -88,24 +88,24 @@ void Formula::makeLines(Node *res)
|
||||
|
||||
void Formula::makeLine(Node *res)
|
||||
{
|
||||
if( !res ) return;
|
||||
if( !res ) return;
|
||||
#ifdef DEBUG
|
||||
inds; fprintf(stderr,"<math:mrow>\n");
|
||||
inds; fprintf(stderr,"<math:mrow>\n");
|
||||
#else
|
||||
rstartEl("math:mrow", mxList.get());
|
||||
rstartEl("math:mrow", mxList.get());
|
||||
#endif
|
||||
if( res->child )
|
||||
if( res->child )
|
||||
makeExprList( res->child );
|
||||
#ifdef DEBUG
|
||||
inde; fprintf(stderr,"</math:mrow>\n");
|
||||
inde; fprintf(stderr,"</math:mrow>\n");
|
||||
#else
|
||||
rendEl("math:mrow");
|
||||
rendEl("math:mrow");
|
||||
#endif
|
||||
}
|
||||
|
||||
void Formula::makeExprList(Node *res)
|
||||
{
|
||||
if( !res ) return;
|
||||
if( !res ) return;
|
||||
Node *tmp = res->child;
|
||||
if( !tmp ) return ;
|
||||
|
||||
@@ -121,7 +121,7 @@ void Formula::makeExprList(Node *res)
|
||||
|
||||
void Formula::makeExpr(Node *res)
|
||||
{
|
||||
if( !res ) return;
|
||||
if( !res ) return;
|
||||
Node *tmp = res->child;
|
||||
if( !tmp ) return;
|
||||
switch( tmp->id ) {
|
||||
@@ -184,10 +184,10 @@ void Formula::makeExpr(Node *res)
|
||||
|
||||
void Formula::makeIdentifier(Node *res)
|
||||
{
|
||||
Node *tmp = res;
|
||||
if( !tmp ) return;
|
||||
if( !tmp->value ) return;
|
||||
switch( tmp->id ){
|
||||
Node *tmp = res;
|
||||
if( !tmp ) return;
|
||||
if( !tmp->value ) return;
|
||||
switch( tmp->id ){
|
||||
case ID_CHARACTER :
|
||||
#ifdef DEBUG
|
||||
inds;
|
||||
|
||||
@@ -540,7 +540,7 @@ enum
|
||||
hchar_string Outline::GetUnicode() const
|
||||
{
|
||||
const hchar *p;
|
||||
hchar buffer[255];
|
||||
hchar buffer[255];
|
||||
|
||||
buffer[0] = 0;
|
||||
if (kind == OUTLINE_NUM)
|
||||
@@ -583,12 +583,12 @@ hchar_string Outline::GetUnicode() const
|
||||
p = GetOutlineStyleChars(shape);
|
||||
buffer[0] = p[level];
|
||||
buffer[1] = 0;
|
||||
return hstr2ucsstr(buffer);
|
||||
return hstr2ucsstr(buffer);
|
||||
}
|
||||
case OLSTY_USER:
|
||||
case OLSTY_BULUSER:
|
||||
{
|
||||
char dest[80];
|
||||
char dest[80];
|
||||
int l = 0;
|
||||
int i = level;
|
||||
if( deco[i][0] ){
|
||||
@@ -660,7 +660,7 @@ hchar_string Outline::GetUnicode() const
|
||||
}
|
||||
str2hstr(buf, buffer + l);
|
||||
l += strlen(buf);
|
||||
break;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
buffer[l++] = user_shape[i];
|
||||
|
||||
+27
-27
@@ -891,7 +891,7 @@ int hcharconv(hchar ch, hchar *dest, int codeType)
|
||||
unsigned char lo;
|
||||
//printf("hcharconv[%04x]\n",ch);
|
||||
if (ch < 128){
|
||||
dest[0] = ch;
|
||||
dest[0] = ch;
|
||||
return 1;
|
||||
}
|
||||
if (IsHangul(ch))
|
||||
@@ -921,10 +921,10 @@ int hcharconv(hchar ch, hchar *dest, int codeType)
|
||||
*/
|
||||
if ((index = ch - 0x4000) >= 4888)
|
||||
{
|
||||
if( codeType == UNICODE )
|
||||
dest[0]= 0x25A1;
|
||||
else
|
||||
dest[0]= 0xA1E0;
|
||||
if( codeType == UNICODE )
|
||||
dest[0]= 0x25A1;
|
||||
else
|
||||
dest[0]= 0xA1E0;
|
||||
return 1;
|
||||
}
|
||||
if (codeType == KS)
|
||||
@@ -951,12 +951,12 @@ int hcharconv(hchar ch, hchar *dest, int codeType)
|
||||
ch = (hi << 8) | lo;
|
||||
}
|
||||
//printf("hcharconv Hanja[%04x]\n",ch);
|
||||
dest[0] = ch;
|
||||
dest[0] = ch;
|
||||
return 1;
|
||||
}
|
||||
if (LineCharDir(ch))
|
||||
{
|
||||
dest[0] = lineCharConv(ch);
|
||||
dest[0] = lineCharConv(ch);
|
||||
return 1;
|
||||
}
|
||||
else if (0x2f00 <= ch && ch <= 0x2f6f && (ch & 0x0f) < 9)
|
||||
@@ -975,7 +975,7 @@ int hcharconv(hchar ch, hchar *dest, int codeType)
|
||||
else ch = 0xa2b9;
|
||||
|
||||
ch = (lo < 6) ? ch : ch + 1;
|
||||
if( codeType == UNICODE)
|
||||
if( codeType == UNICODE)
|
||||
ch = ksc5601_sym_to_ucs2(ch);
|
||||
}
|
||||
else
|
||||
@@ -990,7 +990,7 @@ int hcharconv(hchar ch, hchar *dest, int codeType)
|
||||
ch = (lo < 6) ? ch : ch + 1;
|
||||
}
|
||||
//printf("hcharconv Bullet[%04x]\n",ch);
|
||||
dest[0] = ch;
|
||||
dest[0] = ch;
|
||||
return 1 ;
|
||||
}
|
||||
/*
|
||||
@@ -1002,13 +1002,13 @@ int hcharconv(hchar ch, hchar *dest, int codeType)
|
||||
if( codeType != KSSM )
|
||||
{
|
||||
//printf("code[0x%04x]\n",ch);
|
||||
hchar ch2 = ch;
|
||||
hchar ch2 = ch;
|
||||
ch = s_hh2ks(ch);
|
||||
//printf("code ks[0x%04x]\n",ch);
|
||||
if( codeType == UNICODE ){
|
||||
if( codeType == UNICODE ){
|
||||
if (ch < 128){
|
||||
dest[0] = ch;
|
||||
return 1;
|
||||
dest[0] = ch;
|
||||
return 1;
|
||||
}
|
||||
/* Hangul and Computer: 0x37c0 ~ 0x37c5 */
|
||||
if( ch2 >= 0x37c0 && ch2 <= 0x37c5 ){
|
||||
@@ -1037,7 +1037,7 @@ int hcharconv(hchar ch, hchar *dest, int codeType)
|
||||
ch = ksc5601_sym_to_ucs2(ch);
|
||||
}
|
||||
//printf("code ucs2[0x%04x]\n",ch);
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
ch = s_hh2kssm(ch);
|
||||
@@ -1051,7 +1051,7 @@ int hcharconv(hchar ch, hchar *dest, int codeType)
|
||||
return 1;
|
||||
}
|
||||
//printf("hcharconv Special[%04x]\n",ch);
|
||||
dest[0] = ch;
|
||||
dest[0] = ch;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -1067,7 +1067,7 @@ int kssm_hangul_to_ucs2(hchar ch, hchar *dest)
|
||||
|
||||
//printf("kssm_hangul_to_ucs2 : [%d,%d,%d]\n", choseong,joongseong,jongseong);
|
||||
|
||||
if( joongseong < 2 ){ /* Not combined area, medial sound = 0,1 */
|
||||
if( joongseong < 2 ){ /* Not combined area, medial sound = 0,1 */
|
||||
if( joongseong == 0 && ch < 0xa414 ){ /* consonants and vowels includes old characters */
|
||||
int index = choseong * 32 + jongseong;
|
||||
dest[0] = jamo_to_unicode[index];
|
||||
@@ -1090,8 +1090,8 @@ int kssm_hangul_to_ucs2(hchar ch, hchar *dest)
|
||||
return 1;
|
||||
}
|
||||
else if ( joongseong == 2 && jongseong == 1 ){ /* Consonant */
|
||||
dest[0] = choseong_to_unicode[choseong];
|
||||
return 1;
|
||||
dest[0] = choseong_to_unicode[choseong];
|
||||
return 1;
|
||||
}
|
||||
else if( choseong > 20 || choseong == 0 ||
|
||||
joongseong == 17 || joongseong == 24 ||
|
||||
@@ -1130,7 +1130,7 @@ int kssm_hangul_to_ucs2(hchar ch, hchar *dest)
|
||||
joongseong *= NUM_JONGSEONG;
|
||||
jongseong -= jongseong > 0x12 ? 2 : 1;
|
||||
|
||||
dest[0] = UNI_HANGUL_FIRST + choseong + joongseong + jongseong;
|
||||
dest[0] = UNI_HANGUL_FIRST + choseong + joongseong + jongseong;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1179,11 +1179,11 @@ hchar_string hstr2ucsstr(hchar const* hstr)
|
||||
{
|
||||
::std::string ret;
|
||||
int j;
|
||||
hchar dest[3];
|
||||
hchar dest[3];
|
||||
for( ; *hstr ; )
|
||||
{
|
||||
int res = hcharconv(*hstr++, dest, KS);
|
||||
for( j = 0 ; j < res ; j++ ){
|
||||
for( j = 0 ; j < res ; j++ ){
|
||||
int c = dest[j];
|
||||
if( c < 32 )
|
||||
c = ' ';
|
||||
@@ -1196,7 +1196,7 @@ hchar_string hstr2ucsstr(hchar const* hstr)
|
||||
ret.push_back(sal::static_int_cast<char>((c >> 8 ) & 0xff));
|
||||
ret.push_back(sal::static_int_cast<char>(c & 0xff));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@@ -1334,16 +1334,16 @@ char *hcolor2str(uchar color, uchar shade, char *buf, bool bIsChar)
|
||||
ret.append("http://");
|
||||
}
|
||||
}
|
||||
}
|
||||
for (; i < strlen(src); i++)
|
||||
{
|
||||
}
|
||||
for (; i < strlen(src); i++)
|
||||
{
|
||||
if (src[i] == '\\') {
|
||||
ret.push_back('/');
|
||||
} else {
|
||||
ret.push_back(src[i]);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
@@ -170,7 +170,7 @@ bool HWPPara::Read(HWPFile & hwpf, unsigned char flag)
|
||||
return false;
|
||||
if (hhstr[ii]->hh == CH_END_PARA)
|
||||
break;
|
||||
if( hhstr[ii]->hh < CH_END_PARA )
|
||||
if( hhstr[ii]->hh < CH_END_PARA )
|
||||
pshape->reserved[0] = 0;
|
||||
ii += hhstr[ii]->WSize();
|
||||
}
|
||||
|
||||
@@ -250,11 +250,11 @@ void HWPFile::ReadParaList(std::vector< std::unique_ptr<HWPPara> > &aplist, unsi
|
||||
unsigned char prev_etcflag = 0;
|
||||
while (spNode->Read(*this, flag))
|
||||
{
|
||||
if( !(spNode->etcflag & 0x04) ){
|
||||
if( !(spNode->etcflag & 0x04) ){
|
||||
tmp_etcflag = spNode->etcflag;
|
||||
spNode->etcflag = prev_etcflag;
|
||||
prev_etcflag = tmp_etcflag;
|
||||
}
|
||||
}
|
||||
if (spNode->nch && spNode->reuse_shape)
|
||||
{
|
||||
if (!aplist.empty()){
|
||||
|
||||
@@ -100,7 +100,7 @@ bool FieldCode::Read(HWPFile & hwpf)
|
||||
|
||||
hwpf.SkipBlock(binlen);
|
||||
|
||||
if( type[0] == 3 && type[1] == 2 ){ /* It must create a format as created date. */
|
||||
if( type[0] == 3 && type[1] == 2 ){ /* It must create a format as created date. */
|
||||
DateCode *pDate = new DateCode;
|
||||
for (int i = 0 ; i < static_cast<int>(len3_); i++) {
|
||||
if(str3[i] == 0 ) break;
|
||||
@@ -109,7 +109,7 @@ bool FieldCode::Read(HWPFile & hwpf)
|
||||
}
|
||||
hwpf.AddDateFormat(pDate);
|
||||
m_pDate.reset( pDate );
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -225,7 +225,7 @@ bool TxtBox::Read(HWPFile & hwpf)
|
||||
hwpf.Read2b(&dummy2, 1);
|
||||
|
||||
style.boxnum = fboxnum++;
|
||||
zorder = zindex++;
|
||||
zorder = zindex++;
|
||||
hwpf.Read1b(style.anchor_type);
|
||||
hwpf.Read1b(style.txtflow);
|
||||
hwpf.Read2b(&style.xpos, 1);
|
||||
@@ -249,7 +249,7 @@ bool TxtBox::Read(HWPFile & hwpf)
|
||||
hwpf.Read2b(&pgx, 1);
|
||||
hwpf.Read2b(&pgy, 1);
|
||||
hwpf.Read2b(&pgno, 1);
|
||||
if( ( pgno +1 ) != hwpf.getCurrentPage() )
|
||||
if( ( pgno +1 ) != hwpf.getCurrentPage() )
|
||||
pgno = sal::static_int_cast<short>(hwpf.getCurrentPage() -1) ;
|
||||
|
||||
hwpf.Read2b(&showpg, 1);
|
||||
@@ -380,7 +380,7 @@ bool Picture::Read(HWPFile & hwpf)
|
||||
hwpf.Read2b(&dummy2, 1);
|
||||
|
||||
style.boxnum = fboxnum++;
|
||||
zorder = zindex++;
|
||||
zorder = zindex++;
|
||||
hwpf.Read1b(style.anchor_type); /* Reference position */
|
||||
hwpf.Read1b(style.txtflow); /* Avoid painting. 0-2 (seat occupied, transparency, harmony) */
|
||||
hwpf.Read2b(&style.xpos, 1); /* Horizontal position: 1=left, 2=right, 3=center, and others=any */
|
||||
@@ -515,7 +515,7 @@ bool Line::Read(HWPFile & hwpf)
|
||||
hwpf.AddBox(this);
|
||||
|
||||
style.boxnum = fboxnum++;
|
||||
zorder = zindex++;
|
||||
zorder = zindex++;
|
||||
style.boxtype = 'L';
|
||||
hwpf.ReadBlock(&reserved2, 8);
|
||||
hwpf.Read1b(style.anchor_type);
|
||||
@@ -603,9 +603,9 @@ bool HeaderFooter::Read(HWPFile & hwpf)
|
||||
lnnumber = 0;
|
||||
hwpf.ReadParaList(plist, CH_HEADER_FOOTER);
|
||||
linenumber = sal::static_int_cast<unsigned char>(lnnumber);
|
||||
m_nPageNumber = hwpf.getCurrentPage();
|
||||
hwpf.setMaxSettedPage();
|
||||
hwpf.AddHeaderFooter(this);
|
||||
m_nPageNumber = hwpf.getCurrentPage();
|
||||
hwpf.setMaxSettedPage();
|
||||
hwpf.AddHeaderFooter(this);
|
||||
|
||||
return !hwpf.State();
|
||||
}
|
||||
@@ -704,8 +704,8 @@ bool ShowPageNum::Read(HWPFile & hwpf)
|
||||
if (hh != dummy){
|
||||
return hwpf.SetState(HWP_InvalidFileFormat);
|
||||
}
|
||||
m_nPageNumber = hwpf.getCurrentPage();
|
||||
hwpf.setMaxSettedPage();
|
||||
m_nPageNumber = hwpf.getCurrentPage();
|
||||
hwpf.setMaxSettedPage();
|
||||
hwpf.AddPageNumber(this);
|
||||
return !hwpf.State();
|
||||
}
|
||||
|
||||
+132
-132
@@ -599,20 +599,20 @@ void HwpReader::makeDrawMiscStyle( HWPDrawingObject *hdo )
|
||||
padd( "draw:cx", sXML_CDATA,ascii(Int2Str(prop->center_x, "%d%%", buf)));
|
||||
padd( "draw:cy", sXML_CDATA,ascii(Int2Str(prop->center_y, "%d%%", buf)));
|
||||
|
||||
HWPInfo& hwpinfo = hwpfile.GetHWPInfo();
|
||||
int default_color = 0xffffff;
|
||||
if( hwpinfo.back_info.isset )
|
||||
{
|
||||
HWPInfo& hwpinfo = hwpfile.GetHWPInfo();
|
||||
int default_color = 0xffffff;
|
||||
if( hwpinfo.back_info.isset )
|
||||
{
|
||||
if( hwpinfo.back_info.color[0] > 0 || hwpinfo.back_info.color[1] > 0
|
||||
|| hwpinfo.back_info.color[2] > 0 )
|
||||
default_color = hwpinfo.back_info.color[0] << 16 |
|
||||
hwpinfo.back_info.color[1] << 8 | hwpinfo.back_info.color[2];
|
||||
}
|
||||
}
|
||||
|
||||
if( prop->fromcolor > 0xffffff )
|
||||
prop->fromcolor = default_color;
|
||||
if( prop->tocolor > 0xffffff )
|
||||
prop->tocolor = default_color;
|
||||
if( prop->fromcolor > 0xffffff )
|
||||
prop->fromcolor = default_color;
|
||||
if( prop->tocolor > 0xffffff )
|
||||
prop->tocolor = default_color;
|
||||
|
||||
if( prop->gstyle == 1)
|
||||
{
|
||||
@@ -1051,10 +1051,10 @@ void HwpReader::makeMasterStyles()
|
||||
|
||||
if( aSet[i].bIsSet ) /* If you've changed the current setting */
|
||||
{
|
||||
if( !aSet[i].pagenumber ){
|
||||
if( !aSet[i].pagenumber ){
|
||||
if( pPrevSet && pPrevSet->pagenumber )
|
||||
aSet[i].pagenumber = pPrevSet->pagenumber;
|
||||
}
|
||||
}
|
||||
if( aSet[i].pagenumber )
|
||||
{
|
||||
if( aSet[i].pagenumber->where == 7 && aSet[i].header )
|
||||
@@ -1490,8 +1490,8 @@ void HwpReader::makePStyle(ParaShape const * pshape)
|
||||
unsigned char tf = 0;
|
||||
rstartEl("style:tab-stops",mxList.get());
|
||||
|
||||
int tab_margin = pshape->left_margin + pshape->indent;
|
||||
if( tab_margin < 0 )
|
||||
int tab_margin = pshape->left_margin + pshape->indent;
|
||||
if( tab_margin < 0 )
|
||||
tab_margin = 0;
|
||||
for( int i = 0 ; i < MAXTABS -1 ; i++)
|
||||
{
|
||||
@@ -1806,11 +1806,11 @@ void HwpReader::makePageStyle()
|
||||
void HwpReader::makeColumns(ColumnDef const *coldef)
|
||||
{
|
||||
if( !coldef ) return;
|
||||
padd("fo:column-count", sXML_CDATA, ascii(Int2Str(coldef->ncols, "%d", buf)));
|
||||
rstartEl("style:columns",mxList.get());
|
||||
mxList->clear();
|
||||
if( coldef->separator != 0 )
|
||||
{
|
||||
padd("fo:column-count", sXML_CDATA, ascii(Int2Str(coldef->ncols, "%d", buf)));
|
||||
rstartEl("style:columns",mxList.get());
|
||||
mxList->clear();
|
||||
if( coldef->separator != 0 )
|
||||
{
|
||||
switch( coldef->separator )
|
||||
{
|
||||
case 1: /* thin line */
|
||||
@@ -1832,10 +1832,10 @@ void HwpReader::makeColumns(ColumnDef const *coldef)
|
||||
rstartEl("style:column-sep",mxList.get());
|
||||
mxList->clear();
|
||||
rendEl("style:column-sep");
|
||||
}
|
||||
double spacing = WTI(coldef->spacing)/ 2. ;
|
||||
for(int ii = 0 ; ii < coldef->ncols ; ii++)
|
||||
{
|
||||
}
|
||||
double spacing = WTI(coldef->spacing)/ 2. ;
|
||||
for(int ii = 0 ; ii < coldef->ncols ; ii++)
|
||||
{
|
||||
if( ii == 0 )
|
||||
padd("fo:margin-left", sXML_CDATA, "0mm");
|
||||
else
|
||||
@@ -1849,8 +1849,8 @@ void HwpReader::makeColumns(ColumnDef const *coldef)
|
||||
rstartEl("style:column",mxList.get());
|
||||
mxList->clear();
|
||||
rendEl("style:column");
|
||||
}
|
||||
rendEl("style:columns");
|
||||
}
|
||||
rendEl("style:columns");
|
||||
}
|
||||
|
||||
void HwpReader::makeTStyle(CharShape const * cshape)
|
||||
@@ -2079,19 +2079,19 @@ void HwpReader::makeDrawStyle( HWPDrawingObject * hdo, FBoxStyle * fstyle)
|
||||
{
|
||||
padd("draw:marker-start", sXML_CDATA,
|
||||
ascii(ArrowShape[hdo->property.line_tstyle].name) );
|
||||
if( hdo->property.line_width > 100 )
|
||||
if( hdo->property.line_width > 100 )
|
||||
padd("draw:marker-start-width", sXML_CDATA,
|
||||
Double2Str( WTMM(hdo->property.line_width * 3)) + "mm");
|
||||
else if( hdo->property.line_width > 80 )
|
||||
else if( hdo->property.line_width > 80 )
|
||||
padd("draw:marker-start-width", sXML_CDATA,
|
||||
Double2Str( WTMM(hdo->property.line_width * 4)) + "mm");
|
||||
else if( hdo->property.line_width > 60 )
|
||||
else if( hdo->property.line_width > 60 )
|
||||
padd("draw:marker-start-width", sXML_CDATA,
|
||||
Double2Str( WTMM(hdo->property.line_width * 5)) + "mm");
|
||||
else if( hdo->property.line_width > 40 )
|
||||
else if( hdo->property.line_width > 40 )
|
||||
padd("draw:marker-start-width", sXML_CDATA,
|
||||
Double2Str( WTMM(hdo->property.line_width * 6)) + "mm");
|
||||
else
|
||||
else
|
||||
padd("draw:marker-start-width", sXML_CDATA,
|
||||
Double2Str( WTMM(hdo->property.line_width * 7)) + "mm");
|
||||
}
|
||||
@@ -2100,19 +2100,19 @@ void HwpReader::makeDrawStyle( HWPDrawingObject * hdo, FBoxStyle * fstyle)
|
||||
{
|
||||
padd("draw:marker-end", sXML_CDATA,
|
||||
ascii(ArrowShape[hdo->property.line_hstyle].name) );
|
||||
if( hdo->property.line_width > 100 )
|
||||
if( hdo->property.line_width > 100 )
|
||||
padd("draw:marker-end-width", sXML_CDATA,
|
||||
Double2Str( WTMM(hdo->property.line_width * 3)) + "mm");
|
||||
else if( hdo->property.line_width > 80 )
|
||||
else if( hdo->property.line_width > 80 )
|
||||
padd("draw:marker-end-width", sXML_CDATA,
|
||||
Double2Str( WTMM(hdo->property.line_width * 4)) + "mm");
|
||||
else if( hdo->property.line_width > 60 )
|
||||
else if( hdo->property.line_width > 60 )
|
||||
padd("draw:marker-end-width", sXML_CDATA,
|
||||
Double2Str( WTMM(hdo->property.line_width * 5)) + "mm");
|
||||
else if( hdo->property.line_width > 40 )
|
||||
else if( hdo->property.line_width > 40 )
|
||||
padd("draw:marker-end-width", sXML_CDATA,
|
||||
Double2Str( WTMM(hdo->property.line_width * 6)) + "mm");
|
||||
else
|
||||
else
|
||||
padd("draw:marker-end-width", sXML_CDATA,
|
||||
Double2Str( WTMM(hdo->property.line_width * 7)) + "mm");
|
||||
}
|
||||
@@ -2623,11 +2623,11 @@ void HwpReader::makeFStyle(FBoxStyle * fstyle)
|
||||
}
|
||||
}
|
||||
|
||||
if( cell->linetype[0] == 0 && cell->linetype[1] == 0 &&
|
||||
if( cell->linetype[0] == 0 && cell->linetype[1] == 0 &&
|
||||
cell->linetype[2] == 0 && cell->linetype[3] == 0 ){
|
||||
padd("fo:padding", sXML_CDATA,"0mm");
|
||||
}
|
||||
else{
|
||||
}
|
||||
else{
|
||||
padd("fo:padding-left", sXML_CDATA,
|
||||
Double2Str(WTMM(fstyle->margin[1][0])) + "mm");
|
||||
padd("fo:padding-right", sXML_CDATA,
|
||||
@@ -2636,7 +2636,7 @@ void HwpReader::makeFStyle(FBoxStyle * fstyle)
|
||||
Double2Str(WTMM(fstyle->margin[1][2])) + "mm");
|
||||
padd("fo:padding-bottom", sXML_CDATA,
|
||||
Double2Str(WTMM(fstyle->margin[1][3])) + "mm");
|
||||
}
|
||||
}
|
||||
if(cell->shade != 0)
|
||||
padd("fo:background-color", sXML_CDATA,
|
||||
ascii(hcolor2str(
|
||||
@@ -2655,7 +2655,7 @@ void HwpReader::makeFStyle(FBoxStyle * fstyle)
|
||||
}
|
||||
else if( fstyle->boxtype == 'G' )
|
||||
{
|
||||
if( fstyle->margin[1][0] || fstyle->margin[1][1] || fstyle->margin[1][2] || fstyle->margin[1][3] ){
|
||||
if( fstyle->margin[1][0] || fstyle->margin[1][1] || fstyle->margin[1][2] || fstyle->margin[1][3] ){
|
||||
OUString clip = "rect(";
|
||||
clip += Double2Str(WTMM(-fstyle->margin[1][0]) ) + "mm ";
|
||||
clip += Double2Str(WTMM(-fstyle->margin[1][1]) ) + "mm ";
|
||||
@@ -2663,7 +2663,7 @@ void HwpReader::makeFStyle(FBoxStyle * fstyle)
|
||||
clip += Double2Str(WTMM(-fstyle->margin[1][3]) ) + "mm)";
|
||||
padd("style:mirror", sXML_CDATA, "none");
|
||||
padd("fo:clip", sXML_CDATA, clip);
|
||||
}
|
||||
}
|
||||
char *cell = static_cast<char *>(fstyle->cell);
|
||||
padd("draw:luminance", sXML_CDATA,
|
||||
ascii(Int2Str(cell[0], "%d%%", buf)));
|
||||
@@ -2711,7 +2711,7 @@ void HwpReader::make_text_p0(HWPPara * para, bool bParaStart)
|
||||
hchar_string str;
|
||||
int n;
|
||||
int res;
|
||||
hchar dest[3];
|
||||
hchar dest[3];
|
||||
unsigned char firstspace = 0;
|
||||
if( !bParaStart)
|
||||
{
|
||||
@@ -2848,7 +2848,7 @@ void HwpReader::make_text_p1(HWPPara * para,bool bParaStart)
|
||||
}
|
||||
else
|
||||
{
|
||||
if( para->hhstr[n]->hh < CH_SPACE )
|
||||
if( para->hhstr[n]->hh < CH_SPACE )
|
||||
continue;
|
||||
if (para->hhstr[n]->hh == CH_SPACE)
|
||||
firstspace = 0;
|
||||
@@ -2871,7 +2871,7 @@ void HwpReader::make_text_p3(HWPPara * para,bool bParaStart)
|
||||
{
|
||||
hchar_string str;
|
||||
int n, res;
|
||||
hchar dest[3];
|
||||
hchar dest[3];
|
||||
unsigned char firstspace = 0;
|
||||
bool pstart = bParaStart;
|
||||
bool tstart = false;
|
||||
@@ -2957,23 +2957,23 @@ void HwpReader::make_text_p3(HWPPara * para,bool bParaStart)
|
||||
if( !tstart ) {STARTT;}
|
||||
makeChars(str);
|
||||
firstspace = 1;
|
||||
if( hbox->type[0] == 4 && hbox->type[1] == 0 )
|
||||
{
|
||||
field = hbox->str3.get();
|
||||
}
|
||||
else{
|
||||
makeFieldCode(str, hbox);
|
||||
}
|
||||
if( hbox->type[0] == 4 && hbox->type[1] == 0 )
|
||||
{
|
||||
field = hbox->str3.get();
|
||||
}
|
||||
else{
|
||||
makeFieldCode(str, hbox);
|
||||
}
|
||||
infield = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
firstspace = 1;
|
||||
if( hbox->type[0] == 4 && hbox->type[1] == 0 )
|
||||
{
|
||||
makeFieldCode(str, hbox);
|
||||
field = nullptr;
|
||||
}
|
||||
if( hbox->type[0] == 4 && hbox->type[1] == 0 )
|
||||
{
|
||||
makeFieldCode(str, hbox);
|
||||
field = nullptr;
|
||||
}
|
||||
infield = false;
|
||||
str.clear();
|
||||
}
|
||||
@@ -3140,7 +3140,7 @@ void HwpReader::makeFieldCode(hchar_string const & rStr, FieldCode const *hbox)
|
||||
if( hbox->type[0] == 4 && hbox->type[1] == 0 )
|
||||
{
|
||||
padd("text:placeholder-type", sXML_CDATA, "text");
|
||||
if( field )
|
||||
if( field )
|
||||
padd("text:description", sXML_CDATA, reinterpret_cast<sal_Unicode const *>(hconv(field)));
|
||||
rstartEl( "text:placeholder", mxList.get());
|
||||
mxList->clear();
|
||||
@@ -3245,10 +3245,10 @@ void HwpReader::makeFieldCode(hchar_string const & rStr, FieldCode const *hbox)
|
||||
if( hbox->m_pDate )
|
||||
padd("style:data-style-name", sXML_CDATA,
|
||||
ascii(Int2Str(hbox->m_pDate->key, "N%d", buf)));
|
||||
rstartEl( "text:creation-date", mxList.get() );
|
||||
mxList->clear();
|
||||
rchars( reinterpret_cast<sal_Unicode const *>(hconv(hbox->str2.get())) );
|
||||
rendEl( "text:creation-date" );
|
||||
rstartEl( "text:creation-date", mxList.get() );
|
||||
mxList->clear();
|
||||
rchars( reinterpret_cast<sal_Unicode const *>(hconv(hbox->str2.get())) );
|
||||
rendEl( "text:creation-date" );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3525,7 +3525,7 @@ void HwpReader::makeTextBox(TxtBox * hbox)
|
||||
ascii(Int2Str(hbox->style.boxnum, "CapBox%d", buf)));
|
||||
padd("draw:name", sXML_CDATA,
|
||||
ascii(Int2Str(hbox->style.boxnum, "CaptionBox%d", buf)));
|
||||
padd("draw:z-index", sXML_CDATA,
|
||||
padd("draw:z-index", sXML_CDATA,
|
||||
ascii(Int2Str(hbox->zorder, "%d", buf)));
|
||||
switch (hbox->style.anchor_type)
|
||||
{
|
||||
@@ -3674,7 +3674,7 @@ void HwpReader::makeFormula(TxtBox * hbox)
|
||||
HWPPara* pPar;
|
||||
|
||||
int n, c, res;
|
||||
hchar dest[3];
|
||||
hchar dest[3];
|
||||
size_t l = 0;
|
||||
|
||||
pPar = hbox->plists[0].front().get();
|
||||
@@ -3720,7 +3720,7 @@ void HwpReader::makeFormula(TxtBox * hbox)
|
||||
void HwpReader::makeHyperText(TxtBox * hbox)
|
||||
{
|
||||
HyperText *hypert = hwpfile.GetHyperText();
|
||||
if( !hypert ) return;
|
||||
if( !hypert ) return;
|
||||
|
||||
if (hypert->filename[0] != '\0') {
|
||||
::std::string const tmp = hstr2ksstr(hypert->bookmark);
|
||||
@@ -3779,7 +3779,7 @@ void HwpReader::makePicture(Picture * hbox)
|
||||
ascii(Int2Str(hbox->style.boxnum, "CapBox%d", buf)));
|
||||
padd("draw:name", sXML_CDATA,
|
||||
ascii(Int2Str(hbox->style.boxnum, "CaptionBox%d", buf)));
|
||||
padd("draw:z-index", sXML_CDATA,
|
||||
padd("draw:z-index", sXML_CDATA,
|
||||
ascii(Int2Str(hbox->zorder, "%d", buf)));
|
||||
switch (hbox->style.anchor_type)
|
||||
{
|
||||
@@ -3845,7 +3845,7 @@ void HwpReader::makePicture(Picture * hbox)
|
||||
|
||||
if( hbox->style.cap_len <= 0 )
|
||||
{
|
||||
padd("draw:z-index", sXML_CDATA,
|
||||
padd("draw:z-index", sXML_CDATA,
|
||||
ascii(Int2Str(hbox->zorder, "%d", buf)));
|
||||
switch (hbox->style.anchor_type)
|
||||
{
|
||||
@@ -3895,24 +3895,24 @@ void HwpReader::makePicture(Picture * hbox)
|
||||
padd("xlink:actuate", sXML_CDATA, "onLoad");
|
||||
}
|
||||
|
||||
if( hbox->pictype == PICTYPE_OLE )
|
||||
if( hbox->pictype == PICTYPE_OLE )
|
||||
rstartEl("draw:object-ole", mxList.get());
|
||||
else
|
||||
else
|
||||
rstartEl("draw:image", mxList.get());
|
||||
mxList->clear();
|
||||
if (hbox->pictype == PICTYPE_EMBED || hbox->pictype == PICTYPE_OLE)
|
||||
{
|
||||
rstartEl("office:binary-data", mxList.get());
|
||||
mxList->clear();
|
||||
if( hbox->pictype == PICTYPE_EMBED ){
|
||||
if( hbox->pictype == PICTYPE_EMBED ){
|
||||
EmPicture *emp = hwpfile.GetEmPicture(hbox);
|
||||
if( emp )
|
||||
{
|
||||
std::shared_ptr<char> pStr(base64_encode_string( emp->data.get(), emp->size ), Free<char>());
|
||||
rchars(ascii(pStr.get()));
|
||||
}
|
||||
}
|
||||
else{
|
||||
}
|
||||
else{
|
||||
if( hwpfile.oledata ){
|
||||
#ifdef _WIN32
|
||||
LPSTORAGE srcsto;
|
||||
@@ -3942,12 +3942,12 @@ void HwpReader::makePicture(Picture * hbox)
|
||||
rchars("");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
rendEl("office:binary-data");
|
||||
}
|
||||
if( hbox->pictype == PICTYPE_OLE )
|
||||
if( hbox->pictype == PICTYPE_OLE )
|
||||
rendEl("draw:object-ole");
|
||||
else
|
||||
else
|
||||
rendEl("draw:image");
|
||||
if( hbox->ishyper )
|
||||
{
|
||||
@@ -4020,7 +4020,7 @@ void HwpReader::makePictureDRAW(HWPDrawingObject *drawobj, Picture * hbox)
|
||||
}
|
||||
else
|
||||
{
|
||||
bIsRotate = false;
|
||||
bIsRotate = false;
|
||||
if( (drawobj->property.flag & HWPDO_FLAG_ROTATION) &&
|
||||
(drawobj->property.parall.pt[0].y != drawobj->property.parall.pt[1].y) &&
|
||||
//(drawobj->type == HWPDO_RECT || drawobj->type == HWPDO_ADVANCED_ELLIPSE || drawobj->type == HWPDO_ADVANCED_ARC )
|
||||
@@ -4028,70 +4028,70 @@ void HwpReader::makePictureDRAW(HWPDrawingObject *drawobj, Picture * hbox)
|
||||
)
|
||||
{
|
||||
|
||||
int i;
|
||||
int i;
|
||||
ZZParall *pal = &drawobj->property.parall;
|
||||
|
||||
ZZPoint pt[3], r_pt[3];
|
||||
for(i = 0 ; i < 3 ; i++ ){
|
||||
ZZPoint pt[3], r_pt[3];
|
||||
for(i = 0 ; i < 3 ; i++ ){
|
||||
pt[i].x = pal->pt[i].x - drawobj->property.rot_originx;
|
||||
/* Convert to a physical coordinate */
|
||||
pt[i].y = -(pal->pt[i].y - drawobj->property.rot_originy);
|
||||
}
|
||||
}
|
||||
|
||||
double rotate, skewX ;
|
||||
|
||||
/* 2 - rotation angle calculation */
|
||||
if( pt[1].x == pt[0].x ){
|
||||
/* 2 - rotation angle calculation */
|
||||
if( pt[1].x == pt[0].x ){
|
||||
if( pt[1].y > pt[0].y )
|
||||
rotate = PI/2;
|
||||
else
|
||||
rotate = -(PI/2);
|
||||
}
|
||||
else
|
||||
rotate = atan(static_cast<double>( pt[1].y - pt[0].y )/(pt[1].x - pt[0].x ));
|
||||
if( pt[1].x < pt[0].x )
|
||||
rotate += PI;
|
||||
}
|
||||
else
|
||||
rotate = atan(static_cast<double>( pt[1].y - pt[0].y )/(pt[1].x - pt[0].x ));
|
||||
if( pt[1].x < pt[0].x )
|
||||
rotate += PI;
|
||||
|
||||
for( i = 0 ; i < 3 ; i++){
|
||||
for( i = 0 ; i < 3 ; i++){
|
||||
r_pt[i].x = static_cast<int>(pt[i].x * cos(-rotate) - pt[i].y * sin(-rotate));
|
||||
r_pt[i].y = static_cast<int>(pt[i].y * cos(-rotate) + pt[i].x * sin(-rotate));
|
||||
}
|
||||
}
|
||||
|
||||
/* 4 - Calculation of reflex angle */
|
||||
if( r_pt[2].y == r_pt[1].y )
|
||||
/* 4 - Calculation of reflex angle */
|
||||
if( r_pt[2].y == r_pt[1].y )
|
||||
skewX = 0;
|
||||
else
|
||||
else
|
||||
skewX = atan(static_cast<double>(r_pt[2].x - r_pt[1].x )/( r_pt[2].y - r_pt[1].y ));
|
||||
if( skewX >= PI/2 )
|
||||
if( skewX >= PI/2 )
|
||||
skewX -= PI;
|
||||
if( skewX <= -PI/2 )
|
||||
if( skewX <= -PI/2 )
|
||||
skewX += PI;
|
||||
|
||||
OUString trans;
|
||||
if( skewX != 0.0 && rotate != 0.0 ){
|
||||
trans = "skewX (" + Double2Str(skewX)
|
||||
+ ") rotate (" + Double2Str(rotate)
|
||||
+ ") translate (" + Double2Str(WTMM(x + a + drawobj->offset2.x + pal->pt[0].x)) + "mm "
|
||||
+ Double2Str(WTMM(y + b + drawobj->offset2.y + pal->pt[0].y)) + "mm)";
|
||||
bIsRotate = true;
|
||||
}
|
||||
else if( skewX != 0.0 ){
|
||||
trans = "skewX (" + Double2Str(skewX)
|
||||
+ ") translate (" + Double2Str(WTMM(x + a + drawobj->offset2.x + pal->pt[0].x)) + "mm "
|
||||
+ Double2Str(WTMM(y + b + drawobj->offset2.y + pal->pt[0].y)) + "mm)";
|
||||
bIsRotate = true;
|
||||
}
|
||||
else if( rotate != 0.0 ){
|
||||
trans = "rotate (" + Double2Str(rotate)
|
||||
+ ") translate (" + Double2Str(WTMM(x + a + drawobj->offset2.x + pal->pt[0].x)) + "mm "
|
||||
+ Double2Str(WTMM(y + b + drawobj->offset2.y + pal->pt[0].y)) + "mm)";
|
||||
bIsRotate = true;
|
||||
}
|
||||
if( bIsRotate ){
|
||||
drawobj->extent.w = static_cast<int>(sqrt(double(DBL(pt[1].x-pt[0].x)+DBL(pt[1].y-pt[0].y))));
|
||||
drawobj->extent.h = static_cast<int>(sqrt(double(DBL(pt[2].x-pt[1].x)+DBL(pt[2].y-pt[1].y))));
|
||||
padd("draw:transform", sXML_CDATA, trans);
|
||||
}
|
||||
OUString trans;
|
||||
if( skewX != 0.0 && rotate != 0.0 ){
|
||||
trans = "skewX (" + Double2Str(skewX)
|
||||
+ ") rotate (" + Double2Str(rotate)
|
||||
+ ") translate (" + Double2Str(WTMM(x + a + drawobj->offset2.x + pal->pt[0].x)) + "mm "
|
||||
+ Double2Str(WTMM(y + b + drawobj->offset2.y + pal->pt[0].y)) + "mm)";
|
||||
bIsRotate = true;
|
||||
}
|
||||
else if( skewX != 0.0 ){
|
||||
trans = "skewX (" + Double2Str(skewX)
|
||||
+ ") translate (" + Double2Str(WTMM(x + a + drawobj->offset2.x + pal->pt[0].x)) + "mm "
|
||||
+ Double2Str(WTMM(y + b + drawobj->offset2.y + pal->pt[0].y)) + "mm)";
|
||||
bIsRotate = true;
|
||||
}
|
||||
else if( rotate != 0.0 ){
|
||||
trans = "rotate (" + Double2Str(rotate)
|
||||
+ ") translate (" + Double2Str(WTMM(x + a + drawobj->offset2.x + pal->pt[0].x)) + "mm "
|
||||
+ Double2Str(WTMM(y + b + drawobj->offset2.y + pal->pt[0].y)) + "mm)";
|
||||
bIsRotate = true;
|
||||
}
|
||||
if( bIsRotate ){
|
||||
drawobj->extent.w = static_cast<int>(sqrt(double(DBL(pt[1].x-pt[0].x)+DBL(pt[1].y-pt[0].y))));
|
||||
drawobj->extent.h = static_cast<int>(sqrt(double(DBL(pt[2].x-pt[1].x)+DBL(pt[2].y-pt[1].y))));
|
||||
padd("draw:transform", sXML_CDATA, trans);
|
||||
}
|
||||
}
|
||||
switch (drawobj->type)
|
||||
{
|
||||
@@ -4182,11 +4182,11 @@ void HwpReader::makePictureDRAW(HWPDrawingObject *drawobj, Picture * hbox)
|
||||
Double2Str (WTMM( y + b + drawobj->offset2.y)) + "mm");
|
||||
}
|
||||
|
||||
padd("svg:width", sXML_CDATA,
|
||||
padd("svg:width", sXML_CDATA,
|
||||
Double2Str (WTMM( drawobj->extent.w )) + "mm");
|
||||
padd("svg:height", sXML_CDATA,
|
||||
padd("svg:height", sXML_CDATA,
|
||||
Double2Str (WTMM( drawobj->extent.h )) + "mm");
|
||||
if( drawobj->type == HWPDO_ADVANCED_ELLIPSE ){
|
||||
if( drawobj->type == HWPDO_ADVANCED_ELLIPSE ){
|
||||
if( drawobj->u.arc.radial[0].x != drawobj->u.arc.radial[1].x
|
||||
|| drawobj->u.arc.radial[0].y != drawobj->u.arc.radial[1].y ){
|
||||
int Cx,Cy;
|
||||
@@ -4203,7 +4203,7 @@ void HwpReader::makePictureDRAW(HWPDrawingObject *drawobj, Picture * hbox)
|
||||
padd("draw:start-angle", sXML_CDATA, Double2Str(start_angle ));
|
||||
padd("draw:end-angle", sXML_CDATA, Double2Str(end_angle));
|
||||
}
|
||||
}
|
||||
}
|
||||
rstartEl("draw:ellipse", mxList.get());
|
||||
mxList->clear();
|
||||
if( drawobj->property.flag >> 19 & 0x01 &&
|
||||
@@ -4225,7 +4225,7 @@ void HwpReader::makePictureDRAW(HWPDrawingObject *drawobj, Picture * hbox)
|
||||
case HWPDO_ADVANCED_ARC:
|
||||
{
|
||||
/* If it is the arc, LibreOffice assumes the size as the entire ellipse size */
|
||||
uint flip = drawobj->u.line_arc.flip;
|
||||
uint flip = drawobj->u.line_arc.flip;
|
||||
if( !bIsRotate )
|
||||
{
|
||||
if( ( flip == 0 || flip == 2 ) && drawobj->type == HWPDO_ARC)
|
||||
@@ -4242,17 +4242,17 @@ void HwpReader::makePictureDRAW(HWPDrawingObject *drawobj, Picture * hbox)
|
||||
Double2Str (WTMM( y + b + drawobj->offset2.y)) + "mm");
|
||||
}
|
||||
|
||||
padd("svg:width", sXML_CDATA,
|
||||
padd("svg:width", sXML_CDATA,
|
||||
Double2Str (WTMM( drawobj->extent.w * 2)) + "mm");
|
||||
padd("svg:height", sXML_CDATA,
|
||||
padd("svg:height", sXML_CDATA,
|
||||
Double2Str (WTMM( drawobj->extent.h * 2)) + "mm");
|
||||
if( drawobj->property.flag & HWPDO_FLAG_DRAW_PIE ||
|
||||
if( drawobj->property.flag & HWPDO_FLAG_DRAW_PIE ||
|
||||
drawobj->property.fill_color < 0xffffff )
|
||||
padd("draw:kind", sXML_CDATA, "section");
|
||||
else
|
||||
else
|
||||
padd("draw:kind", sXML_CDATA, "arc");
|
||||
|
||||
if( drawobj->type == HWPDO_ADVANCED_ARC ){
|
||||
if( drawobj->type == HWPDO_ADVANCED_ARC ){
|
||||
double start_angle, end_angle;
|
||||
ZZParall *pal = &drawobj->property.parall;
|
||||
|
||||
@@ -4288,8 +4288,8 @@ void HwpReader::makePictureDRAW(HWPDrawingObject *drawobj, Picture * hbox)
|
||||
start_angle = end_angle;
|
||||
end_angle = tmp_angle;
|
||||
}
|
||||
padd("draw:start-angle", sXML_CDATA, Double2Str(start_angle * 180. / PI));
|
||||
padd("draw:end-angle", sXML_CDATA, Double2Str(end_angle * 180. / PI));
|
||||
padd("draw:start-angle", sXML_CDATA, Double2Str(start_angle * 180. / PI));
|
||||
padd("draw:end-angle", sXML_CDATA, Double2Str(end_angle * 180. / PI));
|
||||
|
||||
}
|
||||
else{
|
||||
@@ -4438,9 +4438,9 @@ void HwpReader::makePictureDRAW(HWPDrawingObject *drawobj, Picture * hbox)
|
||||
{
|
||||
bool bIsPolygon = false;
|
||||
|
||||
padd("svg:x", sXML_CDATA,
|
||||
padd("svg:x", sXML_CDATA,
|
||||
Double2Str (WTMM( x + a + drawobj->offset2.x)) + "mm");
|
||||
padd("svg:y", sXML_CDATA,
|
||||
padd("svg:y", sXML_CDATA,
|
||||
Double2Str (WTMM( y + b + drawobj->offset2.y)) + "mm");
|
||||
|
||||
padd("svg:width", sXML_CDATA,
|
||||
@@ -4581,7 +4581,7 @@ void HwpReader::makeHidden(Hidden * hbox)
|
||||
{
|
||||
hchar_string str;
|
||||
int res;
|
||||
hchar dest[3];
|
||||
hchar dest[3];
|
||||
|
||||
padd("text:condition", sXML_CDATA, "");
|
||||
padd("text:string-value", sXML_CDATA, "");
|
||||
|
||||
@@ -622,13 +622,13 @@ DefaultNumberingProvider::makeNumberingString( const Sequence<beans::PropertyVal
|
||||
// start empty
|
||||
OUString result;
|
||||
|
||||
// append prefix
|
||||
if( !should_ignore(prefix) ) result += prefix;
|
||||
// append prefix
|
||||
if( !should_ignore(prefix) ) result += prefix;
|
||||
|
||||
// append formatted number
|
||||
using namespace style::NumberingType;
|
||||
switch( numType )
|
||||
{
|
||||
// append formatted number
|
||||
using namespace style::NumberingType;
|
||||
switch( numType )
|
||||
{
|
||||
case CHARS_UPPER_LETTER:
|
||||
lcl_formatChars( upperLetter, 26, number-1, result ); // 1=>A, 2=>B, ..., 26=>Z, 27=>AA, 28=>AB, ...
|
||||
break;
|
||||
@@ -905,23 +905,23 @@ DefaultNumberingProvider::makeNumberingString( const Sequence<beans::PropertyVal
|
||||
default:
|
||||
OSL_ASSERT(false);
|
||||
throw IllegalArgumentException();
|
||||
}
|
||||
}
|
||||
|
||||
if (natNum) {
|
||||
if (natNum) {
|
||||
rtl::Reference<NativeNumberSupplierService> xNatNum(new NativeNumberSupplierService);
|
||||
result += xNatNum->getNativeNumberStringParams(OUString::number(number), locale,
|
||||
natNum, sNatNumParams);
|
||||
} else if (tableSize) {
|
||||
} else if (tableSize) {
|
||||
if ( number > tableSize && !bRecycleSymbol)
|
||||
result += OUString::number( number);
|
||||
else
|
||||
result += OUString(&table[--number % tableSize], 1);
|
||||
}
|
||||
}
|
||||
|
||||
// append suffix
|
||||
if( !should_ignore(suffix) ) result += suffix;
|
||||
// append suffix
|
||||
if( !should_ignore(suffix) ) result += suffix;
|
||||
|
||||
return result;
|
||||
return result;
|
||||
}
|
||||
|
||||
#define LANG_ALL (1 << 0)
|
||||
|
||||
@@ -113,7 +113,7 @@ InputSequenceChecker_hi::checkInputSequence(const OUString& Text,
|
||||
sal_Int16 inputCheckMode)
|
||||
{
|
||||
sal_Unicode currentChar = Text[nStartPos];
|
||||
sal_uInt16 ch1 = getCharType(inputChar);
|
||||
sal_uInt16 ch1 = getCharType(inputChar);
|
||||
sal_uInt16 ch2 = getCharType(currentChar);
|
||||
|
||||
return (DEV_Composible[inputCheckMode][dev_cell_check[ch2][ch1]]);
|
||||
|
||||
@@ -109,10 +109,10 @@ LocaleNode* LocaleNode::createNode (const OUString& name, const Reference< XAttr
|
||||
return new LCSearchNode (name,attr);
|
||||
if ( name == "LC_MISC" )
|
||||
return new LCMiscNode (name,attr);
|
||||
if ( name == "LC_NumberingLevel" )
|
||||
return new LCNumberingLevelNode (name, attr);
|
||||
if ( name == "LC_OutLineNumberingLevel" )
|
||||
return new LCOutlineNumberingLevelNode (name, attr);
|
||||
if ( name == "LC_NumberingLevel" )
|
||||
return new LCNumberingLevelNode (name, attr);
|
||||
if ( name == "LC_OutLineNumberingLevel" )
|
||||
return new LCOutlineNumberingLevelNode (name, attr);
|
||||
|
||||
return new LocaleNode(name,attr);
|
||||
}
|
||||
|
||||
@@ -180,7 +180,7 @@ static TransliterationModules operator|(TransliterationModules lhs, Transliterat
|
||||
void SAL_CALL
|
||||
TransliterationImpl::loadModule( TransliterationModules modType, const Locale& rLocale )
|
||||
{
|
||||
clear();
|
||||
clear();
|
||||
if (bool(modType & TransliterationModules_IGNORE_MASK) &&
|
||||
bool(modType & TransliterationModules_NON_IGNORE_MASK))
|
||||
{
|
||||
|
||||
@@ -70,13 +70,13 @@ OUString widthfolding::decompose_ja_voiced_sound_marks (const OUString& inStr, s
|
||||
int i = int(c - 0x3040);
|
||||
sal_Unicode first = decomposition_table[i].decomposited_character_1;
|
||||
if (first != 0x0000) {
|
||||
*dst ++ = first;
|
||||
*dst ++ = decomposition_table[i].decomposited_character_2; // second
|
||||
*dst ++ = first;
|
||||
*dst ++ = decomposition_table[i].decomposited_character_2; // second
|
||||
if (useOffset) {
|
||||
*p ++ = position;
|
||||
*p ++ = position ++;
|
||||
}
|
||||
continue;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
*dst ++ = c;
|
||||
@@ -113,7 +113,7 @@ OUString widthfolding::compose_ja_voiced_sound_marks (const OUString& inStr, sal
|
||||
sal_Unicode* dst = newStr->buffer;
|
||||
|
||||
// This conversion algorithm requires at least one character.
|
||||
if (nCount > 0) {
|
||||
if (nCount > 0) {
|
||||
|
||||
// .. .. KA VOICE .. ..
|
||||
// ^ ^
|
||||
@@ -169,10 +169,10 @@ OUString widthfolding::compose_ja_voiced_sound_marks (const OUString& inStr, sal
|
||||
position ++;
|
||||
*p ++ = position ++;
|
||||
}
|
||||
*dst ++ = composition_table[i][j];
|
||||
previousChar = *src ++;
|
||||
nCount --;
|
||||
continue;
|
||||
*dst ++ = composition_table[i][j];
|
||||
previousChar = *src ++;
|
||||
nCount --;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (useOffset)
|
||||
|
||||
@@ -532,7 +532,7 @@ void SvMetaSlot::WriteSlot( const OString& rShellName, sal_uInt16 nCount,
|
||||
rOutStm.WriteCharPtr( "SfxSlotMode::NONE" );
|
||||
|
||||
rOutStm.WriteChar( ',' ) << endl;
|
||||
WriteTab( rOutStm, 4 );
|
||||
WriteTab( rOutStm, 4 );
|
||||
if ( GetDisableFlags().isEmpty() )
|
||||
rOutStm.WriteCharPtr( "SfxDisableFlags::NONE" );
|
||||
else
|
||||
|
||||
@@ -313,7 +313,7 @@ AstDeclaration* AstScope::lookupForAdd(AstDeclaration const * pDecl) const
|
||||
|
||||
AstDeclaration* pRetDecl = lookupByNameLocal(pDecl->getLocalName());
|
||||
|
||||
return pRetDecl;
|
||||
return pRetDecl;
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
||||
@@ -287,7 +287,8 @@ bool Options::initOptions(std::vector< std::string > & rArgs)
|
||||
{
|
||||
return badOption("invalid", option);
|
||||
}
|
||||
OString param("-D"); param += OString((*first).c_str(), (*first).size());
|
||||
OString param("-D");
|
||||
param += OString((*first).c_str(), (*first).size());
|
||||
if (m_options.count("-D") > 0)
|
||||
{
|
||||
OStringBuffer buffer(m_options["-D"]);
|
||||
|
||||
@@ -491,7 +491,7 @@ interface_decl :
|
||||
identifier
|
||||
{
|
||||
idlc()->setParseState(PS_InterfaceIDSeen);
|
||||
checkIdentifier($3);
|
||||
checkIdentifier($3);
|
||||
$$ = $3;
|
||||
}
|
||||
;
|
||||
@@ -823,7 +823,7 @@ opt_attrflag :
|
||||
}
|
||||
| error ']'
|
||||
{
|
||||
yyerror("unknown property|attribute flag");
|
||||
yyerror("unknown property|attribute flag");
|
||||
yyerrok;
|
||||
}
|
||||
;
|
||||
@@ -920,7 +920,7 @@ operation :
|
||||
identifier
|
||||
{
|
||||
idlc()->setParseState(PS_OpIDSeen);
|
||||
checkIdentifier($3);
|
||||
checkIdentifier($3);
|
||||
|
||||
AstInterface * pScope = static_cast< AstInterface * >(
|
||||
idlc()->scopes()->top());
|
||||
|
||||
@@ -99,7 +99,7 @@ namespace io_acceptor {
|
||||
template<class T>
|
||||
static void notifyListeners(SocketConnection * pCon, bool * notified, T t)
|
||||
{
|
||||
XStreamListener_hash_set listeners;
|
||||
XStreamListener_hash_set listeners;
|
||||
|
||||
{
|
||||
::osl::MutexGuard guard(pCon->_mutex);
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace stoc_connector {
|
||||
template<class T>
|
||||
static void notifyListeners(SocketConnection * pCon, bool * notified, T t)
|
||||
{
|
||||
XStreamListener_hash_set listeners;
|
||||
XStreamListener_hash_set listeners;
|
||||
|
||||
{
|
||||
::osl::MutexGuard guard(pCon->_mutex);
|
||||
|
||||
@@ -181,7 +181,7 @@ void OMarkableOutputStream::closeOutput()
|
||||
|
||||
m_mapMarks.clear();
|
||||
m_nCurrentPos = m_pBuffer->getSize();
|
||||
checkMarksAndFlush();
|
||||
checkMarksAndFlush();
|
||||
|
||||
m_output->closeOutput();
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ void MemRingBuffer::resizeBuffer( sal_Int32 nMinSize )
|
||||
}
|
||||
|
||||
if( nNewLen != m_nBufferLen ) {
|
||||
if (auto p = static_cast<sal_Int8*>(std::realloc(m_p, nNewLen)))
|
||||
if (auto p = static_cast<sal_Int8*>(std::realloc(m_p, nNewLen)))
|
||||
m_p = p;
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user