mirror of
https://github.com/ONLYOFFICE/sdkjs.git
synced 2026-04-07 14:09:12 +08:00
[ve] Dont use quickStyleVariation for default themeval values; Fix bug 76044
This commit is contained in:
@ -153,6 +153,12 @@ AscDFH.historyitem_type_VisioWindow = 328;
|
||||
*/
|
||||
this.ImageMap = null;
|
||||
|
||||
/**
|
||||
* true if there were no themes in file
|
||||
* @type {boolean}
|
||||
*/
|
||||
this.isNoThemes = false;
|
||||
|
||||
// unfinished
|
||||
// this.EmbeddedData = null;
|
||||
|
||||
@ -358,6 +364,7 @@ AscDFH.historyitem_type_VisioWindow = 328;
|
||||
CVisioDocument.prototype.AfterOpenDocument = function(zip, context) {
|
||||
if (!this.themes.length) {
|
||||
AscCommon.consoleLog("No themes found by filenames. Creating default theme");
|
||||
this.isNoThemes = true;
|
||||
this.themes.push(AscFormat.GenerateDefaultTheme(null, null));
|
||||
}
|
||||
};
|
||||
|
||||
@ -312,7 +312,11 @@
|
||||
}
|
||||
|
||||
// calculate variation before pattern bcs pattern can make NoFillUniFill object without color
|
||||
handleQuickStyleVariation(lineUniFillNoGradient, uniFillForegndNoGradient, this, themeValWasUsedFor);
|
||||
// use quickStyleVariation only if themes exist in file.
|
||||
// Default theme which come to visioDocument.themes[0] should not be considered.
|
||||
if (!visioDocument.isNoThemes) {
|
||||
handleQuickStyleVariation(lineUniFillNoGradient, uniFillForegndNoGradient, this, themeValWasUsedFor);
|
||||
}
|
||||
|
||||
let lineGradientEnabled;
|
||||
let lineGradientEnabledCell = this.getCell("LineGradientEnabled");
|
||||
@ -1045,7 +1049,7 @@
|
||||
* @param {CUniFill} oStrokeUniFill
|
||||
* @param {CUniFill} uniFill
|
||||
* @param {Shape_Type} shape
|
||||
* @param {{lineUniFillNoGradient: boolean, uniFillForegnd: boolean}} themeValWasUsedFor
|
||||
* @param {{lineUniFill: boolean, uniFillForegnd: boolean}} themeValWasUsedFor
|
||||
*/
|
||||
function handleQuickStyleVariation(oStrokeUniFill, uniFill, shape, themeValWasUsedFor) {
|
||||
// https://learn.microsoft.com/en-us/openspecs/sharepoint_protocols/ms-vsdx/68bb0221-d8a1-476e-a132-8c60a49cea63?redirectedfrom=MSDN
|
||||
|
||||
Reference in New Issue
Block a user