/// <summary> /// Gets area for style application with merge on /// </summary> /// <param name="role">The role.</param> /// <param name="x">The x.</param> /// <param name="y">The y.</param> /// <returns></returns> public selectRangeArea getAreaOfRole(appendRole role, Int32 x, Int32 y, Boolean completeArea = false) { selectRangeArea output = new selectRangeArea(x, y, ST, ST); if (completeArea) { switch (role) { case appendRole.sectionHead: role = appendRole.mergedHead; break; case appendRole.sectionContent: role = appendRole.mergedContent; break; case appendRole.sectionFoot: role = appendRole.mergedFoot; break; case appendRole.tableColumnHead: output.reset(area.x, area.TopLeft.y + headZone, area.width, area.TopLeft.y + headZone + headZone); return(output); break; case appendRole.tableColumnFoot: output.reset(area.x, area.BottomRight.y - footZone - footZoneExtension, area.width, area.BottomRight.y - footZone); return(output); break; case appendRole.tableCellValue: case appendRole.tableCellAnnotation: case appendRole.tableCellNovalue: case appendRole.tableBetween: role = appendRole.mergedContent; break; } } switch (role) { case appendRole.none: break; case appendRole.i_container: return(area); break; case appendRole.mergedHead: output.reset(area.TopLeft.x, area.TopLeft.y, area.width, headZone); break; case appendRole.mergedContent: output.reset(area.TopLeft.x + leftZone, area.BottomRight.y + headZone, area.width - leftZone - rightZone, area.height - footZone - headZone - headZoneExtension - footZoneExtension); break; case appendRole.mergedFoot: output.reset(area.TopLeft.x, area.BottomRight.y - footZone, area.width, footZone); break; case appendRole.tableHead: output.reset(area.TopLeft.x, area.TopLeft.y, area.width, headZone); break; case appendRole.tableColumnHead: output.reset(x, area.TopLeft.y + headZone, ST, area.TopLeft.y + headZone + headZone); break; case appendRole.tableColumnFoot: output.reset(x, area.BottomRight.y - footZone - footZoneExtension, ST, area.BottomRight.y - footZone); break; case appendRole.tableCellValue: case appendRole.tableCellAnnotation: case appendRole.tableCellNovalue: case appendRole.tableBetween: output.reset(x, y, ST, ST); break; case appendRole.tableFoot: output.reset(area.TopLeft.x, area.BottomRight.y - footZone, area.width, footZone); break; case appendRole.sectionHead: output.reset(x, area.TopLeft.y, ST, headZone); break; case appendRole.sectionContent: output.reset(x, y, ST, ST); break; case appendRole.sectionFoot: output.reset(x, area.BottomRight.y, ST, footZone); break; default: output.reset(x, y, ST, ST); break; //throw new ArgumentOutOfRangeException(); } return(output); }