Bug fix B2014-106 – tables will now save if the text alignment of a cell was changed
This commit is contained in:
parent
912c11a65b
commit
765930867a
@ -137,7 +137,11 @@ namespace Volian.Controls.Library
|
|||||||
//check for cell format changes 4th
|
//check for cell format changes 4th
|
||||||
if (checkFormat && GetCellFormatString(XdNew) != GetCellFormatString(XdOld))
|
if (checkFormat && GetCellFormatString(XdNew) != GetCellFormatString(XdOld))
|
||||||
return true;
|
return true;
|
||||||
//check for merged cells 5th
|
//check for text alignment changes 5th
|
||||||
|
// put check in for bug fix B2014-106
|
||||||
|
if (checkFormat && GetCellTextAlignString(XdNew) != GetCellTextAlignString(XdOld))
|
||||||
|
return true;
|
||||||
|
//check for merged cells 6th
|
||||||
if (GetCellMergeString(XdNew) != GetCellMergeString(XdOld))
|
if (GetCellMergeString(XdNew) != GetCellMergeString(XdOld))
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
@ -262,6 +266,25 @@ namespace Volian.Controls.Library
|
|||||||
return string.Empty;
|
return string.Empty;
|
||||||
return xd.SelectSingleNode("C1FlexGrid/MergedRanges").InnerXml;
|
return xd.SelectSingleNode("C1FlexGrid/MergedRanges").InnerXml;
|
||||||
}
|
}
|
||||||
|
private string GetCellTextAlignString(XmlDocument xd)
|
||||||
|
{
|
||||||
|
// Note that I could not save (and later compare) the entire Definition string
|
||||||
|
// because the xml for the old and new table was always different.
|
||||||
|
// The old xml table data would have, for example "white" for the background color, while
|
||||||
|
// the new xml table data would have "255,255,255" for the background color.
|
||||||
|
// Therefore this check is specific for only the TextAlign setting - jsj 9-30-2014
|
||||||
|
XmlNodeList nl = xd.SelectNodes("C1FlexGrid/Styles/Style/Definition");
|
||||||
|
string data = string.Empty;
|
||||||
|
foreach (XmlNode xn in nl)
|
||||||
|
{
|
||||||
|
string str = xn.InnerText;
|
||||||
|
string[] splStr = str.Split(';');
|
||||||
|
foreach (string s in splStr)
|
||||||
|
if (s.StartsWith("TextAlign:"))
|
||||||
|
data += "|" + s; // only save the TextAlign setting
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
private static GridCopyInfo _MyCopyInfo;
|
private static GridCopyInfo _MyCopyInfo;
|
||||||
public static GridCopyInfo MyCopyInfo
|
public static GridCopyInfo MyCopyInfo
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user