Merge pull request 'Development' (#156) from Development into master
Merging F2023-142 and B2022-046 in from development to master after successful testing.
This commit is contained in:
commit
db29107f47
Binary file not shown.
@ -1192,7 +1192,7 @@ namespace Volian.Controls.Library
|
|||||||
string linkstr = mro.Groups[2].Value;
|
string linkstr = mro.Groups[2].Value;
|
||||||
string[] roparts = linkstr.Split(" ".ToCharArray());
|
string[] roparts = linkstr.Split(" ".ToCharArray());
|
||||||
ContentRoUsage rousg = null;
|
ContentRoUsage rousg = null;
|
||||||
int oldid = -1;
|
int oldid = -1;
|
||||||
using (Item itm = MyItemInfo.Get())
|
using (Item itm = MyItemInfo.Get())
|
||||||
{
|
{
|
||||||
using (RODb rodb = RODb.GetJustRoDb(Convert.ToInt32(roparts[2])))
|
using (RODb rodb = RODb.GetJustRoDb(Convert.ToInt32(roparts[2])))
|
||||||
@ -1203,7 +1203,7 @@ namespace Volian.Controls.Library
|
|||||||
int newid = Rtf.IndexOf("<NewID>", indx);
|
int newid = Rtf.IndexOf("<NewID>", indx);
|
||||||
Rtf = Rtf.Remove(newid, 7);
|
Rtf = Rtf.Remove(newid, 7);
|
||||||
Rtf = Rtf.Insert(newid, string.Format("<CROUSGID={0}>", rousg.ROUsageID));
|
Rtf = Rtf.Insert(newid, string.Format("<CROUSGID={0}>", rousg.ROUsageID));
|
||||||
itm.Save();
|
itm.Save(); // this will generate a new ROUsageID that we grab and put in the RO link in the RTF
|
||||||
Rtf = Rtf.Replace(string.Format("<CROUSGID={0}>", oldid), rousg.ROUsageID.ToString());
|
Rtf = Rtf.Replace(string.Format("<CROUSGID={0}>", oldid), rousg.ROUsageID.ToString());
|
||||||
itm.Save();
|
itm.Save();
|
||||||
MyItemInfo.MyContent.RefreshContentRoUsages();
|
MyItemInfo.MyContent.RefreshContentRoUsages();
|
||||||
@ -1265,8 +1265,7 @@ namespace Volian.Controls.Library
|
|||||||
int newidt = Rtf.IndexOf("<NewID>", indx);
|
int newidt = Rtf.IndexOf("<NewID>", indx);
|
||||||
Rtf = Rtf.Remove(newidt, 7);
|
Rtf = Rtf.Remove(newidt, 7);
|
||||||
Rtf = Rtf.Insert(newidt, string.Format("<CTID={0}>", ct.TransitionID));
|
Rtf = Rtf.Insert(newidt, string.Format("<CTID={0}>", ct.TransitionID));
|
||||||
//Rtf = Rtf.Replace("<NewID>", string.Format("<CTID={0}>", ct.TransitionID));
|
itm.Save(); // this will generate a new TransitionID that we grab and put in the Transition link in the RTF
|
||||||
itm.Save();
|
|
||||||
Rtf = Rtf.Replace(string.Format("<CTID={0}>", oldidt), ct.TransitionID.ToString());
|
Rtf = Rtf.Replace(string.Format("<CTID={0}>", oldidt), ct.TransitionID.ToString());
|
||||||
itm.Save();
|
itm.Save();
|
||||||
MyItemInfo.MyContent.RefreshContentTransitions();
|
MyItemInfo.MyContent.RefreshContentTransitions();
|
||||||
@ -1277,6 +1276,9 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
MyFlexGrid[r, c] = Rtf;
|
MyFlexGrid[r, c] = Rtf;
|
||||||
|
// B2022-046 need to save context of each cell in the table after fixing RO and Transition links
|
||||||
|
// otherwise the RTF for that cell will revert back to previous data then the itm.Save() is called above
|
||||||
|
SaveContents();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
c = c + 1;
|
c = c + 1;
|
||||||
|
@ -3397,7 +3397,11 @@ namespace Volian.Controls.Library
|
|||||||
// if the paste is below - put back the range for the source location
|
// if the paste is below - put back the range for the source location
|
||||||
if ((crm.r2 > crm.r1) || (crm.c2 > crm.c1))
|
if ((crm.r2 > crm.r1) || (crm.c2 > crm.c1))
|
||||||
MergedRanges.Add(cr);
|
MergedRanges.Add(cr);
|
||||||
this[r + rowOffset, c] = MyCopyInfo.MyCopiedFlexGrid[r, c];
|
// B2022-046 if the cell contains an RO or Transition then replace the usage id with <NewID> to force a new usage id in the link
|
||||||
|
if (MyCopyInfo.MyCopiedFlexGrid[r, c] != null)
|
||||||
|
this[r + rowOffset, c] = ItemInfo.ReplaceLinkWithNewID(MyCopyInfo.MyCopiedFlexGrid[r, c].ToString().Replace("\r\n", ""));
|
||||||
|
else
|
||||||
|
this[r + rowOffset, c] = MyCopyInfo.MyCopiedFlexGrid[r, c];
|
||||||
MatchStyle(crm, cr);
|
MatchStyle(crm, cr);
|
||||||
PasteBorders(r + rowOffset, c, r, c);
|
PasteBorders(r + rowOffset, c, r, c);
|
||||||
PasteShading(r + rowOffset, c, r, c); // C2021-004 paste the shading information
|
PasteShading(r + rowOffset, c, r, c); // C2021-004 paste the shading information
|
||||||
@ -3506,7 +3510,11 @@ namespace Volian.Controls.Library
|
|||||||
if ((crm.r2 > crm.r1) || (crm.c2 > crm.c1))
|
if ((crm.r2 > crm.r1) || (crm.c2 > crm.c1))
|
||||||
MergedRanges.Add(cr);
|
MergedRanges.Add(cr);
|
||||||
// copy cell text to the destination, copy the style, copy the cell borders
|
// copy cell text to the destination, copy the style, copy the cell borders
|
||||||
this[r, c + colOffset] = MyCopyInfo.MyCopiedFlexGrid[r, c];
|
// B2022-046 if the cell contains an RO or Transition then replace the usage id with <NewID> to force a new usage id in the link
|
||||||
|
if (MyCopyInfo.MyCopiedFlexGrid[r, c] != null)
|
||||||
|
this[r, c + colOffset] = ItemInfo.ReplaceLinkWithNewID(MyCopyInfo.MyCopiedFlexGrid[r, c].ToString().Replace("\r\n", ""));
|
||||||
|
else
|
||||||
|
this[r, c + colOffset] = MyCopyInfo.MyCopiedFlexGrid[r, c];
|
||||||
MatchStyle(crm, cr);
|
MatchStyle(crm, cr);
|
||||||
PasteBorders(r, c + colOffset, r, c);
|
PasteBorders(r, c + colOffset, r, c);
|
||||||
PasteShading(r, c + colOffset, r, c); // C2021-004 paste the shading information
|
PasteShading(r, c + colOffset, r, c); // C2021-004 paste the shading information
|
||||||
@ -3581,16 +3589,20 @@ namespace Volian.Controls.Library
|
|||||||
for (int c = MyCopyInfo.MyCopiedCellRange.c1; c <= Math.Min(MyCopyInfo.MyCopiedCellRange.c2, Cols.Count - 1 - colOffset); c++)
|
for (int c = MyCopyInfo.MyCopiedCellRange.c1; c <= Math.Min(MyCopyInfo.MyCopiedCellRange.c2, Cols.Count - 1 - colOffset); c++)
|
||||||
{
|
{
|
||||||
CellRange crm = MyCopyInfo.MyCopiedFlexGrid.GetMergedRange(r, c);
|
CellRange crm = MyCopyInfo.MyCopiedFlexGrid.GetMergedRange(r, c);
|
||||||
if (r == crm.r1 && c == crm.c1)
|
if (r == crm.r1 && c == crm.c1)
|
||||||
{
|
{
|
||||||
CellRange cr = GetCellRange(crm.r1 + rowOffset, crm.c1 + colOffset, crm.r2 + rowOffset, crm.c2 + colOffset);
|
CellRange cr = GetCellRange(crm.r1 + rowOffset, crm.c1 + colOffset, crm.r2 + rowOffset, crm.c2 + colOffset);
|
||||||
if ((crm.r2 > crm.r1) || (crm.c2 > crm.c1))
|
if ((crm.r2 > crm.r1) || (crm.c2 > crm.c1))
|
||||||
MergedRanges.Add(cr);
|
MergedRanges.Add(cr);
|
||||||
this[r + rowOffset, c + colOffset] = MyCopyInfo.MyCopiedFlexGrid[r, c];
|
// B2022-046 if the cell contains an RO or Transition then replace the usage id with <NewID> to force a new usage id in the link
|
||||||
MatchStyle(crm, cr);
|
if (MyCopyInfo.MyCopiedFlexGrid[r, c] != null)
|
||||||
PasteBorders(r + rowOffset, c + colOffset, r, c);
|
this[r + rowOffset, c + colOffset] = ItemInfo.ReplaceLinkWithNewID(MyCopyInfo.MyCopiedFlexGrid[r, c].ToString().Replace("\r\n", ""));
|
||||||
PasteShading(r + rowOffset, c + colOffset, r, c); // C2021-004 paste the shading information
|
else
|
||||||
}
|
this[r + rowOffset, c + colOffset] = MyCopyInfo.MyCopiedFlexGrid[r, c];
|
||||||
|
MatchStyle(crm, cr);
|
||||||
|
PasteBorders(r + rowOffset, c + colOffset, r, c);
|
||||||
|
PasteShading(r + rowOffset, c + colOffset, r, c); // C2021-004 paste the shading information
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.AdjustGridControlSize();
|
this.AdjustGridControlSize();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user