Commit d066de4e authored by Oleg Korshul's avatar Oleg Korshul Committed by Alexander.Trofimov

не рисуем мега ректы на пдф контексте

parent 3b5a57b6
...@@ -2099,54 +2099,58 @@ Paragraph.prototype = ...@@ -2099,54 +2099,58 @@ Paragraph.prototype =
Element = aUnderline.Get_Next(); Element = aUnderline.Get_Next();
} }
// Рисуем красный рект вокруг измененных ранов if (pGraphics.RENDERER_PDF_FLAG !== true)
var arrRunReviewRectsLine = []; {
Element = aRunReview.Get_NextForward(); // Рисуем красный рект вокруг измененных ранов
while (null !== Element) var arrRunReviewRectsLine = [];
{ Element = aRunReview.Get_NextForward();
if (null === RunPrReview || true !== RunPrReview.Is_Equal(Element.Additional.RunPr)) while (null !== Element)
{ {
if (arrRunReviewRectsLine.length > 0 && arrRunReviewRects) if (null === RunPrReview || true !== RunPrReview.Is_Equal(Element.Additional.RunPr))
{ {
arrRunReviewRects.push(arrRunReviewRectsLine); if (arrRunReviewRectsLine.length > 0 && arrRunReviewRects)
arrRunReviewRectsLine = []; {
} arrRunReviewRects.push(arrRunReviewRectsLine);
RunPrReview = Element.Additional.RunPr; arrRunReviewRectsLine = [];
arrRunReviewRects = []; }
arrRunReviewAreas.push(arrRunReviewRects); RunPrReview = Element.Additional.RunPr;
arrRunReviewAreasColors.push(new CDocumentColor(Element.r, Element.g, Element.b)); arrRunReviewRects = [];
} arrRunReviewAreas.push(arrRunReviewRects);
arrRunReviewAreasColors.push(new CDocumentColor(Element.r, Element.g, Element.b));
arrRunReviewRectsLine.push({X : Element.x0, Y : Page.Y + Line.Y - Line.Metrics.TextAscent, W : Element.x1 - Element.x0, H : Line.Metrics.TextDescent + Line.Metrics.TextAscent + Line.Metrics.LineGap, Page : 0}); }
Element = aRunReview.Get_NextForward();
} arrRunReviewRectsLine.push({X : Element.x0, Y : Page.Y + Line.Y - Line.Metrics.TextAscent, W : Element.x1 - Element.x0, H : Line.Metrics.TextDescent + Line.Metrics.TextAscent + Line.Metrics.LineGap, Page : 0});
Element = aRunReview.Get_NextForward();
if (arrRunReviewRectsLine.length > 0) }
arrRunReviewRects.push(arrRunReviewRectsLine);
if (arrRunReviewRectsLine.length > 0)
if(this.bFromDocument) arrRunReviewRects.push(arrRunReviewRectsLine);
{
// Рисуем рект вокруг измененных ранов (измененных другим пользователем) if(this.bFromDocument)
Element = aCollChange.Get_Next(); {
while (null !== Element) // Рисуем рект вокруг измененных ранов (измененных другим пользователем)
{ Element = aCollChange.Get_Next();
pGraphics.p_color(Element.r, Element.g, Element.b, 255); while (null !== Element)
pGraphics.AddSmartRect(Element.x0, Page.Y + Line.Top, Element.x1 - Element.x0, Line.Bottom - Line.Top, 0); {
Element = aCollChange.Get_Next(); pGraphics.p_color(Element.r, Element.g, Element.b, 255);
} pGraphics.AddSmartRect(Element.x0, Page.Y + Line.Top, Element.x1 - Element.x0, Line.Bottom - Line.Top, 0);
// Рисуем подчеркивание орфографии Element = aCollChange.Get_Next();
if(this.LogicDocument && true === this.LogicDocument.Spelling.Use) }
{ // Рисуем подчеркивание орфографии
pGraphics.p_color( 255, 0, 0, 255 ); if(this.LogicDocument && true === this.LogicDocument.Spelling.Use)
var SpellingW = editor.WordControl.m_oDrawingDocument.GetMMPerDot(1); {
Element = aSpelling.Get_Next(); pGraphics.p_color( 255, 0, 0, 255 );
while ( null != Element ) var SpellingW = editor.WordControl.m_oDrawingDocument.GetMMPerDot(1);
{ Element = aSpelling.Get_Next();
pGraphics.DrawSpellingLine(Element.y0, Element.x0, Element.x1, SpellingW); while ( null != Element )
Element = aSpelling.Get_Next(); {
} pGraphics.DrawSpellingLine(Element.y0, Element.x0, Element.x1, SpellingW);
} Element = aSpelling.Get_Next();
} }
}
}
}
if(pGraphics.End_Command) if(pGraphics.End_Command)
{ {
pGraphics.End_Command() pGraphics.End_Command()
......
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