Lines 1370-1379
Link Here
|
1370 |
aTmp <<= ImportColor(mnForeColor); |
1370 |
aTmp <<= ImportColor(mnForeColor); |
1371 |
rPropSet->setPropertyValue( WW8_ASCII2STR("TextColor"), aTmp); |
1371 |
rPropSet->setPropertyValue( WW8_ASCII2STR("TextColor"), aTmp); |
1372 |
|
1372 |
|
1373 |
// fake transparent push button by setting window background color |
1373 |
//fBackStyle is a flag. 1 means with background color. 0 means default. |
1374 |
if( !fBackStyle ) |
1374 |
if( fBackStyle ) |
1375 |
mnBackColor = 0x80000005; |
1375 |
aTmp <<= ImportColor(mnBackColor); |
1376 |
aTmp <<= ImportColor(mnBackColor); |
1376 |
else |
|
|
1377 |
aTmp = uno::Any(); |
1377 |
rPropSet->setPropertyValue( WW8_ASCII2STR("BackgroundColor"), aTmp); |
1378 |
rPropSet->setPropertyValue( WW8_ASCII2STR("BackgroundColor"), aTmp); |
1378 |
|
1379 |
|
1379 |
sal_Bool bTemp; |
1380 |
sal_Bool bTemp; |
Lines 1432-1449
Link Here
|
1432 |
aTmp >>= mnForeColor; |
1433 |
aTmp >>= mnForeColor; |
1433 |
*rContents << ExportColor(mnForeColor); |
1434 |
*rContents << ExportColor(mnForeColor); |
1434 |
|
1435 |
|
|
|
1436 |
//fBackStyle is a flag. 1 means with background color. 0 means default. |
1435 |
aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("BackgroundColor")); |
1437 |
aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("BackgroundColor")); |
1436 |
if (aTmp.hasValue()) |
1438 |
if (aTmp.hasValue()) |
1437 |
aTmp >>= mnBackColor; |
1439 |
aTmp >>= mnBackColor; |
|
|
1440 |
else |
1441 |
fBackStyle = 0; |
1438 |
*rContents << ExportColor(mnBackColor); |
1442 |
*rContents << ExportColor(mnBackColor); |
1439 |
|
1443 |
|
1440 |
aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("Enabled")); |
1444 |
aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("Enabled")); |
1441 |
fEnabled = any2bool(aTmp); |
1445 |
fEnabled = any2bool(aTmp); |
1442 |
sal_uInt8 nTemp=0;//fEnabled; |
1446 |
sal_uInt8 nTemp=0;//fEnabled; |
1443 |
if (fEnabled) |
1447 |
if (fEnabled) |
1444 |
nTemp |= 0x02; |
1448 |
nTemp |= 0x02;//has enabled prop |
1445 |
if (fBackStyle) |
1449 |
if (fBackStyle) |
1446 |
nTemp |= 0x08; |
1450 |
nTemp |= 0x08;//has background color |
1447 |
*rContents << nTemp; |
1451 |
*rContents << nTemp; |
1448 |
*rContents << sal_uInt8(0x00); |
1452 |
*rContents << sal_uInt8(0x00); |
1449 |
|
1453 |
|
Lines 1468-1474
Link Here
|
1468 |
mbTakeFocus = any2bool( rPropSet->getPropertyValue( WW8_ASCII2STR( "FocusOnClick" ) ) ); |
1472 |
mbTakeFocus = any2bool( rPropSet->getPropertyValue( WW8_ASCII2STR( "FocusOnClick" ) ) ); |
1469 |
|
1473 |
|
1470 |
nFixedAreaLen = static_cast<sal_uInt16>(rContents->Tell()-nOldPos-4); |
1474 |
nFixedAreaLen = static_cast<sal_uInt16>(rContents->Tell()-nOldPos-4); |
1471 |
|
1475 |
aFontData.nDefaultAlign = 1; |
1472 |
bRet = aFontData.Export(rContents,rPropSet); |
1476 |
bRet = aFontData.Export(rContents,rPropSet); |
1473 |
|
1477 |
|
1474 |
rContents->Seek(nOldPos); |
1478 |
rContents->Seek(nOldPos); |
Lines 5078-5090
Link Here
|
5078 |
if (bHasFont) |
5082 |
if (bHasFont) |
5079 |
{ |
5083 |
{ |
5080 |
aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("FontWeight")); |
5084 |
aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("FontWeight")); |
5081 |
float nBold = 0; |
5085 |
//Export font related props |
5082 |
aTmp >>= nBold; |
5086 |
if ( aTmp.hasValue() ) |
|
|
5087 |
{ |
5088 |
float nBold = 0.0; |
5089 |
aTmp >>= nBold; |
5090 |
if ( nBold >= 150 ) |
5091 |
fBold = 1; |
5092 |
} |
5083 |
|
5093 |
|
5084 |
if (nBold >= 150) |
5094 |
aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("FontSlant")); |
|
|
5095 |
if ( aTmp.hasValue() ) |
5085 |
{ |
5096 |
{ |
|
|
5097 |
short eItalic = 0 ; |
5098 |
aTmp >>= eItalic ; |
5099 |
if ( eItalic == awt::FontSlant_ITALIC ) |
5100 |
fItalic = 1; |
5101 |
} |
5102 |
|
5103 |
aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("FontUnderline")); |
5104 |
if ( aTmp.hasValue() ) |
5105 |
{ |
5106 |
short eUnderline = 0 ; |
5107 |
aTmp >>= eUnderline; |
5108 |
if ( eUnderline == awt::FontUnderline::SINGLE ) |
5109 |
fUnderline = 1; |
5110 |
} |
5111 |
|
5112 |
aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("FontStrikeout")); |
5113 |
if ( aTmp.hasValue() ) |
5114 |
{ |
5115 |
short eLtStrikeout = 0; |
5116 |
aTmp >>= eLtStrikeout; |
5117 |
if ( eLtStrikeout == awt::FontStrikeout::SINGLE ) |
5118 |
fStrike = 1; |
5119 |
} |
5120 |
|
5121 |
sal_uInt8 nTmp= 1 * fBold + 2* fItalic + 4* fUnderline + 8 * fStrike; |
5122 |
if ( nTmp > 0 ) |
5123 |
{ |
5086 |
nFlags |= 0x02; |
5124 |
nFlags |= 0x02; |
5087 |
sal_uInt8 nTmp=0x01; |
|
|
5088 |
*rContent << nTmp; |
5125 |
*rContent << nTmp; |
5089 |
nTmp=0x00; |
5126 |
nTmp=0x00; |
5090 |
*rContent << nTmp; |
5127 |
*rContent << nTmp; |
Lines 5114-5120
Link Here
|
5114 |
|
5151 |
|
5115 |
aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("Align")); |
5152 |
aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("Align")); |
5116 |
nFlags |= 0x40; |
5153 |
nFlags |= 0x40; |
5117 |
sal_Int16 nAlign(0); |
5154 |
sal_Int16 nAlign = nDefaultAlign; |
5118 |
if (aTmp.hasValue()) |
5155 |
if (aTmp.hasValue()) |
5119 |
aTmp >>= nAlign; |
5156 |
aTmp >>= nAlign; |
5120 |
nJustification = ExportAlign(nAlign); |
5157 |
nJustification = ExportAlign(nAlign); |
Lines 5588-5593
Link Here
|
5588 |
0x00, 0x00, 0x00, 0x45, 0x6D, 0x62, 0x65, 0x64, |
5625 |
0x00, 0x00, 0x00, 0x45, 0x6D, 0x62, 0x65, 0x64, |
5589 |
0x64, 0x65, 0x64, 0x20, 0x4F, 0x62, 0x6A, 0x65, |
5626 |
0x64, 0x65, 0x64, 0x20, 0x4F, 0x62, 0x6A, 0x65, |
5590 |
0x63, 0x74, 0x00, 0x13, 0x00, 0x00, 0x00, 0x46, |
5627 |
0x63, 0x74, 0x00, 0x13, 0x00, 0x00, 0x00, 0x46, |
|
|
5628 |
0x6F, 0x72, 0x6D, 0x73, 0x2E, 0x53, 0x70, 0x69,//Add those to avoid MS crash when open |
5591 |
0x6E, 0x42, 0x75, 0x74, 0x74, 0x6F, 0x6E, 0x2E, |
5629 |
0x6E, 0x42, 0x75, 0x74, 0x74, 0x6F, 0x6E, 0x2E, |
5592 |
0x31, 0x00, 0xF4, 0x39, 0xB2, 0x71, 0x00, 0x00, |
5630 |
0x31, 0x00, 0xF4, 0x39, 0xB2, 0x71, 0x00, 0x00, |
5593 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
5631 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |