Skip to content

Commit

Permalink
[se] Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
GoshaZotov committed May 18, 2023
1 parent 055eb57 commit 6c911c7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
8 changes: 8 additions & 0 deletions cell/view/WorkbookView.js
Original file line number Diff line number Diff line change
Expand Up @@ -6180,6 +6180,14 @@
return this.Count > 0;
};

CDocumentSearchExcel.prototype.getSpecificRange = function () {
return this.props && this.props.specificRange && AscCommonExcel.g_oRangeCache.getAscRange(this.props.specificRange);
};

CDocumentSearchExcel.prototype.isSpecificRange = function () {
return this.props && this.props.specificRange;
};

//------------------------------------------------------------export---------------------------------------------------
window['AscCommonExcel'] = window['AscCommonExcel'] || {};
window["AscCommonExcel"].WorkbookView = WorkbookView;
Expand Down
10 changes: 9 additions & 1 deletion cell/view/WorksheetView.js
Original file line number Diff line number Diff line change
Expand Up @@ -6089,6 +6089,13 @@
}
}

//TODO COLOR!!!
let searchSpecificRange = this.handlers.trigger('selectSearchingResults') && this.workbook.SearchEngine && this.workbook.SearchEngine.getSpecificRange();
if (searchSpecificRange) {
this._drawElements(this._drawSelectionElement, searchSpecificRange,
AscCommonExcel.selectionLineType.DashThick, new CColor(12, 15, 17));
}

// restore canvas' original clipping range
ctx.restore();

Expand Down Expand Up @@ -6383,7 +6390,8 @@

//TODO пересмотреть! возможно стоит очищать частями в зависимости от print_area
//print lines view
if(this.viewPrintLines || this.copyCutRange || (this.isPageBreakPreview(true) && this.pagesModeData)) {
let searchSpecificRange = this.handlers.trigger('selectSearchingResults') && this.workbook.SearchEngine && this.workbook.SearchEngine.isSpecificRange();
if(this.viewPrintLines || this.copyCutRange || (this.isPageBreakPreview(true) && this.pagesModeData) || searchSpecificRange) {
this.overlayCtx.clear();
}

Expand Down

0 comments on commit 6c911c7

Please sign in to comment.