|
|
|
@@ -3397,7 +3397,11 @@ namespace Volian.Controls.Library
|
|
|
|
|
// if the paste is below - put back the range for the source location
|
|
|
|
|
if ((crm.r2 > crm.r1) || (crm.c2 > crm.c1))
|
|
|
|
|
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);
|
|
|
|
|
PasteBorders(r + rowOffset, c, r, c);
|
|
|
|
|
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))
|
|
|
|
|
MergedRanges.Add(cr);
|
|
|
|
|
// 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);
|
|
|
|
|
PasteBorders(r, c + colOffset, r, c);
|
|
|
|
|
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++)
|
|
|
|
|
{
|
|
|
|
|
CellRange crm = MyCopyInfo.MyCopiedFlexGrid.GetMergedRange(r, c);
|
|
|
|
|
if (r == crm.r1 && c == crm.c1)
|
|
|
|
|
{
|
|
|
|
|
CellRange cr = GetCellRange(crm.r1 + rowOffset, crm.c1 + colOffset, crm.r2 + rowOffset, crm.c2 + colOffset);
|
|
|
|
|
if ((crm.r2 > crm.r1) || (crm.c2 > crm.c1))
|
|
|
|
|
MergedRanges.Add(cr);
|
|
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|
if (r == crm.r1 && c == crm.c1)
|
|
|
|
|
{
|
|
|
|
|
CellRange cr = GetCellRange(crm.r1 + rowOffset, crm.c1 + colOffset, crm.r2 + rowOffset, crm.c2 + colOffset);
|
|
|
|
|
if ((crm.r2 > crm.r1) || (crm.c2 > crm.c1))
|
|
|
|
|
MergedRanges.Add(cr);
|
|
|
|
|
// 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 + colOffset] = ItemInfo.ReplaceLinkWithNewID(MyCopyInfo.MyCopiedFlexGrid[r, c].ToString().Replace("\r\n", ""));
|
|
|
|
|
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();
|
|
|
|
|