Commit 9b8ed15d authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

Запись стилей таблиц

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@58453 954022d7-b5bf-4e40-9824-e11837661b57
parent 39877d4d
...@@ -1050,15 +1050,15 @@ function BinaryPPTYLoader() ...@@ -1050,15 +1050,15 @@ function BinaryPPTYLoader()
s.Seek2(_end_rec); s.Seek2(_end_rec);
if(_style.TableWholeTable.TableCellPr.TableCellBorders.InsideH) if(_style.TableWholeTable.TablePr.TableBorders.InsideH)
{ {
_style.TablePr.TableBorders.InsideH = _style.TableWholeTable.TableCellPr.TableCellBorders.InsideH; _style.TablePr.TableBorders.InsideH = _style.TableWholeTable.TablePr.TableBorders.InsideH;
delete _style.TableWholeTable.TableCellPr.TableCellBorders.InsideH; delete _style.TableWholeTable.TablePr.TableBorders.InsideH;
} }
if(_style.TableWholeTable.TableCellPr.TableCellBorders.InsideV) if(_style.TableWholeTable.TablePr.TableBorders.InsideV)
{ {
_style.TablePr.TableBorders.InsideV = _style.TableWholeTable.TableCellPr.TableCellBorders.InsideV; _style.TablePr.TableBorders.InsideV = _style.TableWholeTable.TablePr.TableBorders.InsideV;
delete _style.TableWholeTable.TableCellPr.TableCellBorders.InsideV; delete _style.TableWholeTable.TablePr.TableBorders.InsideV;
} }
if(_style.TableWholeTable.TableCellPr.TableCellBorders.Top) if(_style.TableWholeTable.TableCellPr.TableCellBorders.Top)
{ {
......
...@@ -3575,6 +3575,14 @@ function CBinaryFileWriter() ...@@ -3575,6 +3575,14 @@ function CBinaryFileWriter()
{ {
oThis.StartRecord(0); oThis.StartRecord(0);
oThis.WriteUChar(g_nodeAttributeStart); oThis.WriteUChar(g_nodeAttributeStart);
if(isRealBool(_part.TextPr.Italic))
{
oThis._WriteLimit1(0, _part.TextPr.Italic === true ? 0 : 1);
}
if(isRealBool(_part.TextPr.Bold))
{
oThis._WriteLimit1(1, _part.TextPr.Bold === true ? 0 : 1);
}
oThis.WriteUChar(g_nodeAttributeEnd); oThis.WriteUChar(g_nodeAttributeEnd);
oThis.WriteRecord2(0, _part.TextPr.FontRef, oThis.WriteFontRef); oThis.WriteRecord2(0, _part.TextPr.FontRef, oThis.WriteFontRef);
...@@ -3673,19 +3681,19 @@ function CBinaryFileWriter() ...@@ -3673,19 +3681,19 @@ function CBinaryFileWriter()
oThis.WriteRecord3(3, tablePr.TableBorders.Bottom, oThis.WriteTableCellBorderLineStyle); oThis.WriteRecord3(3, tablePr.TableBorders.Bottom, oThis.WriteTableCellBorderLineStyle);
*/ */
bIsRet = oThis.WriteRecord3(0, _part.TableCellPr.TableCellBorders.Left, oThis.WriteTableCellBorderLineStyle); bIsRet = oThis.WriteRecord3(0, tablePr.TableBorders.Left, oThis.WriteTableCellBorderLineStyle);
if (!bIsRet) if (!bIsRet)
oThis.WriteTableCellBorderLineStyle2(0, tablePr.TableBorders.Left); oThis.WriteTableCellBorderLineStyle2(0, tablePr.TableBorders.Left);
bIsRet = oThis.WriteRecord3(1, _part.TableCellPr.TableCellBorders.Right, oThis.WriteTableCellBorderLineStyle); bIsRet = oThis.WriteRecord3(1, tablePr.TableBorders.Right, oThis.WriteTableCellBorderLineStyle);
if (!bIsRet) if (!bIsRet)
oThis.WriteTableCellBorderLineStyle2(1, tablePr.TableBorders.Right); oThis.WriteTableCellBorderLineStyle2(1, tablePr.TableBorders.Right);
bIsRet = oThis.WriteRecord3(2, _part.TableCellPr.TableCellBorders.Top, oThis.WriteTableCellBorderLineStyle); bIsRet = oThis.WriteRecord3(2, tablePr.TableBorders.Top, oThis.WriteTableCellBorderLineStyle);
if (!bIsRet) if (!bIsRet)
oThis.WriteTableCellBorderLineStyle2(2, tablePr.TableBorders.Top); oThis.WriteTableCellBorderLineStyle2(2, tablePr.TableBorders.Top);
bIsRet = oThis.WriteRecord3(3, _part.TableCellPr.TableCellBorders.Bottom, oThis.WriteTableCellBorderLineStyle); bIsRet = oThis.WriteRecord3(3, tablePr.TableBorders.Bottom, oThis.WriteTableCellBorderLineStyle);
if (!bIsRet) if (!bIsRet)
oThis.WriteTableCellBorderLineStyle2(3, tablePr.TableBorders.Bottom); oThis.WriteTableCellBorderLineStyle2(3, tablePr.TableBorders.Bottom);
...@@ -3693,8 +3701,14 @@ function CBinaryFileWriter() ...@@ -3693,8 +3701,14 @@ function CBinaryFileWriter()
oThis.WriteRecord3(4, _part.TablePr.TableBorders.InsideH, oThis.WriteTableCellBorderLineStyle); oThis.WriteRecord3(4, _part.TablePr.TableBorders.InsideH, oThis.WriteTableCellBorderLineStyle);
oThis.WriteRecord3(5, _part.TablePr.TableBorders.InsideV, oThis.WriteTableCellBorderLineStyle); oThis.WriteRecord3(5, _part.TablePr.TableBorders.InsideV, oThis.WriteTableCellBorderLineStyle);
*/ */
oThis.WriteTableCellBorderLineStyle2(4, _part.TablePr.TableBorders.InsideH); if(tablePr.TableBorders.InsideH)
oThis.WriteTableCellBorderLineStyle2(5, _part.TablePr.TableBorders.InsideV); {
oThis.WriteTableCellBorderLineStyle2(4, tablePr.TableBorders.InsideH);
}
if(tablePr.TableBorders.InsideV)
{
oThis.WriteTableCellBorderLineStyle2(5, tablePr.TableBorders.InsideV);
}
oThis.EndRecord(); oThis.EndRecord();
...@@ -3732,7 +3746,7 @@ function CBinaryFileWriter() ...@@ -3732,7 +3746,7 @@ function CBinaryFileWriter()
var bIsFill = false; var bIsFill = false;
var bIsSize = false; var bIsSize = false;
if ((_border.Unifill !== undefined && _border.Unifill != null) || _border.Color instanceof CDocumentColor) if ((_border.Unifill !== undefined && _border.Unifill != null))
{ {
bIsFill = true; bIsFill = true;
} }
...@@ -3752,18 +3766,18 @@ function CBinaryFileWriter() ...@@ -3752,18 +3766,18 @@ function CBinaryFileWriter()
oThis.WriteUChar(g_nodeAttributeEnd); oThis.WriteUChar(g_nodeAttributeEnd);
// TODO: потом переделать по-нормальному // TODO: потом переделать по-нормальному
if (!_border.Unifill && _border.Color instanceof CDocumentColor) //if (!_border.Unifill && _border.Color instanceof CDocumentColor)
{ //{
var _unifill = new CUniFill(); // var _unifill = new CUniFill();
_unifill.fill = new CSolidFill(); // _unifill.fill = new CSolidFill();
_unifill.fill.color.color = new CRGBColor(); // _unifill.fill.color.color = new CRGBColor();
//
_unifill.fill.color.color.RGBA.R = _border.Color.r; // _unifill.fill.color.color.RGBA.R = _border.Color.r;
_unifill.fill.color.color.RGBA.G = _border.Color.g; // _unifill.fill.color.color.RGBA.G = _border.Color.g;
_unifill.fill.color.color.RGBA.B = _border.Color.b; // _unifill.fill.color.color.RGBA.B = _border.Color.b;
//
oThis.WriteRecord2(0, _unifill, oThis.WriteUniFill); // oThis.WriteRecord2(0, _unifill, oThis.WriteUniFill);
} //}
oThis.WriteRecord2(0, _border.Unifill, oThis.WriteUniFill); oThis.WriteRecord2(0, _border.Unifill, oThis.WriteUniFill);
...@@ -3815,7 +3829,7 @@ function CBinaryFileWriter() ...@@ -3815,7 +3829,7 @@ function CBinaryFileWriter()
var bIsFill = false; var bIsFill = false;
var bIsSize = false; var bIsSize = false;
var bIsLnRef = false; var bIsLnRef = false;
if ((_border.Unifill !== undefined && _border.Unifill != null) || _border.Color instanceof CDocumentColor) if ((_border.Unifill !== undefined && _border.Unifill != null))
{ {
bIsFill = true; bIsFill = true;
} }
...@@ -3835,25 +3849,25 @@ function CBinaryFileWriter() ...@@ -3835,25 +3849,25 @@ function CBinaryFileWriter()
oThis.WriteUChar(g_nodeAttributeEnd); oThis.WriteUChar(g_nodeAttributeEnd);
// TODO: потом переделать по-нормальному // TODO: потом переделать по-нормальному
if (!_border.Unifill && _border.Color instanceof CDocumentColor) //if (!_border.Unifill && _border.Color instanceof CDocumentColor)
{ //{
var _unifill = new CUniFill(); // var _unifill = new CUniFill();
_unifill.fill = new CSolidFill(); // _unifill.fill = new CSolidFill();
_unifill.fill.color.color = new CRGBColor(); // _unifill.fill.color.color = new CRGBColor();
//
_unifill.fill.color.color.RGBA.R = _border.Color.r; // _unifill.fill.color.color.RGBA.R = _border.Color.r;
_unifill.fill.color.color.RGBA.G = _border.Color.g; // _unifill.fill.color.color.RGBA.G = _border.Color.g;
_unifill.fill.color.color.RGBA.B = _border.Color.b; // _unifill.fill.color.color.RGBA.B = _border.Color.b;
//
oThis.WriteRecord2(0, _unifill, oThis.WriteUniFill); // oThis.WriteRecord2(0, _unifill, oThis.WriteUniFill);
} //}
oThis.WriteRecord2(0, _border.Unifill, oThis.WriteUniFill); oThis.WriteRecord2(0, _border.Unifill, oThis.WriteUniFill);
oThis.EndRecord(); oThis.EndRecord();
} }
oThis.WriteRecord2(1, _border.LnRef, oThis.WriteStyleRef); oThis.WriteRecord2(1, _border.LineRef, oThis.WriteStyleRef);
} }
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
}; };
\ No newline at end of file
...@@ -207,6 +207,7 @@ ...@@ -207,6 +207,7 @@
<script src="../../../../OfficeWeb/Word/Editor/Run.js"></script> <script src="../../../../OfficeWeb/Word/Editor/Run.js"></script>
<script src="../../../../OfficeWeb/Word/Editor/Math.js"></script> <script src="../../../../OfficeWeb/Word/Editor/Math.js"></script>
<script src="../../../../OfficeWeb/Word/Editor/Paragraph.js"></script> <script src="../../../../OfficeWeb/Word/Editor/Paragraph.js"></script>
<script src="../../../../OfficeWeb/Word/Editor/Paragraph_Recalculate.js"></script>
<script src="../../../../OfficeWeb/Word/Editor/Sections.js"></script> <script src="../../../../OfficeWeb/Word/Editor/Sections.js"></script>
<script src="../../../../OfficeWeb/Word/Editor/Numbering.js"></script> <script src="../../../../OfficeWeb/Word/Editor/Numbering.js"></script>
<script src="../../../../OfficeWeb/Word/Editor/HeaderFooter.js"></script> <script src="../../../../OfficeWeb/Word/Editor/HeaderFooter.js"></script>
......
...@@ -3841,6 +3841,9 @@ asc_docs_api.prototype.OpenDocumentEndCallback = function() ...@@ -3841,6 +3841,9 @@ asc_docs_api.prototype.OpenDocumentEndCallback = function()
} }
} }
this.WordControl.m_oLogicDocument.Document_UpdateInterfaceState(); this.WordControl.m_oLogicDocument.Document_UpdateInterfaceState();
this.WordControl.m_oLogicDocument.Document_UpdateRulersState(); this.WordControl.m_oLogicDocument.Document_UpdateRulersState();
this.WordControl.m_oLogicDocument.Document_UpdateSelectionState(); this.WordControl.m_oLogicDocument.Document_UpdateSelectionState();
......
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