Example usage for org.apache.poi.ss.usermodel Cell setCellValue

List of usage examples for org.apache.poi.ss.usermodel Cell setCellValue

Introduction

In this page you can find the example usage for org.apache.poi.ss.usermodel Cell setCellValue.

Prototype

void setCellValue(boolean value);

Source Link

Document

Set a boolean value for the cell

Usage

From source file:com.globalsight.everest.webapp.pagehandler.administration.reports.generator.PostReviewQAReportGenerator.java

License:Apache License

/**
 * Add hidden info "TER_taskID" for offline uploading. When upload, system
 * can know the report type and current task ID report generated from.
 * /*  w w w. j a  v a 2 s.  c  o  m*/
 * @param p_workbook
 * @param p_sheet
 * @param p_job
 * @param p_targetLocale
 * @throws Exception
 */
private void addHidenInfoForUpload(Workbook p_workbook, Sheet p_sheet, Job p_job,
        GlobalSightLocale p_targetLocale) throws Exception {
    String reportInfo = "";
    for (Workflow wf : p_job.getWorkflows()) {
        if (p_targetLocale.getId() == wf.getTargetLocale().getId()) {
            Collection tasks = ServerProxy.getTaskManager().getCurrentTasks(wf.getId());
            if (tasks != null) {
                for (Iterator it = tasks.iterator(); it.hasNext();) {
                    Task task = (Task) it.next();
                    reportInfo = ReportConstants.POST_REVIEW_REPORT_ABBREVIATION + "_" + task.getId();
                }
            }
        }
    }

    Row titleRow = getRow(p_sheet, 0);
    Cell taskIdCell = getCell(titleRow, 26);
    taskIdCell.setCellValue(reportInfo);
    taskIdCell.setCellStyle(contentStyle);

    p_sheet.setColumnHidden(26, true);
}

From source file:com.globalsight.everest.webapp.pagehandler.administration.reports.generator.PostReviewQAReportGenerator.java

License:Apache License

/**
 * Add language header to the sheet/*from  w  w w .  j  av  a  2  s  .  c  o  m*/
 * 
 * @param p_workBook
 * @param p_sheet
 *            the sheet
 * @throws Exception
 */
private void addLanguageHeader(Workbook p_workBook, Sheet p_sheet) throws Exception {
    int col = 0;
    int row = LANGUAGE_HEADER_ROW;

    Row langRow = getRow(p_sheet, row);
    Cell srcLangCell = getCell(langRow, col);
    srcLangCell.setCellValue(m_bundle.getString("lb_source_language"));
    srcLangCell.setCellStyle(getHeaderStyle(p_workBook));
    col++;

    Cell trgLangCell = getCell(langRow, col);
    trgLangCell.setCellValue(m_bundle.getString("lb_target_language"));
    trgLangCell.setCellStyle(getHeaderStyle(p_workBook));
}

From source file:com.globalsight.everest.webapp.pagehandler.administration.reports.generator.PostReviewQAReportGenerator.java

License:Apache License

private void addQuaAssessment(Workbook p_workBook, Sheet p_sheet) throws Exception {
    int col = 0;//from w w  w.  java  2  s . c om
    int row = 6;

    Row langRow = getRow(p_sheet, row);
    Cell quaAssessmentCell = getCell(langRow, col);
    quaAssessmentCell.setCellValue(m_bundle.getString("lb_quality_assessment"));
    quaAssessmentCell.setCellStyle(getHeaderStyle(p_workBook));
}

From source file:com.globalsight.everest.webapp.pagehandler.administration.reports.generator.PostReviewQAReportGenerator.java

License:Apache License

private void addSuitMarket(Workbook p_workBook, Sheet p_sheet) throws Exception {
    int col = 0;// w ww.ja  v a 2 s . co  m
    int row = 7;

    Row langRow = getRow(p_sheet, row);
    Cell marSuitCell = getCell(langRow, col);
    marSuitCell.setCellValue(m_bundle.getString("lb_market_suitability"));
    marSuitCell.setCellStyle(getHeaderStyle(p_workBook));
}

From source file:com.globalsight.everest.webapp.pagehandler.administration.reports.generator.PostReviewQAReportGenerator.java

License:Apache License

private void addReviwerCommet(Workbook p_workBook, Sheet p_sheet) throws Exception {
    int col = 0;/*ww w.  j  a va2  s  .  c om*/
    int row = 8;

    Row langRow = getRow(p_sheet, row);
    Cell commentCell = getCell(langRow, col);
    commentCell.setCellValue(m_bundle.getString("lb_reviewer_comment"));
    commentCell.setCellStyle(getHeaderStyle(p_workBook));
}

From source file:com.globalsight.everest.webapp.pagehandler.administration.reports.generator.PostReviewQAReportGenerator.java

License:Apache License

/**
 * Add segment header to the sheet/*  www  .  j a  va  2s. c  o m*/
 * 
 * @param p_workBook
 * @param p_sheet
 *            the sheet
 * @throws Exception
 */
private void addSegmentHeader(Workbook p_workBook, Sheet p_sheet) throws Exception {
    int col = 0;
    int row = SEGMENT_HEADER_ROW;
    Row segHeaderRow = getRow(p_sheet, row);

    Cell cell_A = getCell(segHeaderRow, col);
    cell_A.setCellValue(m_bundle.getString("lb_source_segment"));
    cell_A.setCellStyle(getHeaderStyle(p_workBook));
    p_sheet.setColumnWidth(col, 40 * 256);
    col++;

    Cell cell_B = getCell(segHeaderRow, col);
    cell_B.setCellValue(m_bundle.getString("lb_original_target_segment"));
    cell_B.setCellStyle(getHeaderStyle(p_workBook));
    p_sheet.setColumnWidth(col, 40 * 256);
    col++;

    Cell cell_C = getCell(segHeaderRow, col);
    cell_C.setCellValue(m_bundle.getString("lb_updated_target_segment"));
    cell_C.setCellStyle(getHeaderStyle(p_workBook));
    p_sheet.setColumnWidth(col, 40 * 256);
    col++;

    Cell cell_D = getCell(segHeaderRow, col);
    cell_D.setCellValue(m_bundle.getString("lb_comments_history"));
    cell_D.setCellStyle(getHeaderStyle(p_workBook));
    p_sheet.setColumnWidth(col, 40 * 256);
    col++;

    Cell cell_E = getCell(segHeaderRow, col);
    cell_E.setCellValue(m_bundle.getString("lb_category_failure"));
    cell_E.setCellStyle(getHeaderStyle(p_workBook));
    p_sheet.setColumnWidth(col, 40 * 256);
    col++;

    Cell cell_F = getCell(segHeaderRow, col);
    cell_F.setCellValue(m_bundle.getString("lb_comment_status"));
    cell_F.setCellStyle(getHeaderStyle(p_workBook));
    p_sheet.setColumnWidth(col, 15 * 256);
    col++;

    Cell cell_G = getCell(segHeaderRow, col);
    cell_G.setCellValue(m_bundle.getString("lb_priority"));
    cell_G.setCellStyle(getHeaderStyle(p_workBook));
    p_sheet.setColumnWidth(col, 15 * 256);
    col++;

    Cell cell_H = getCell(segHeaderRow, col);
    cell_H.setCellValue(m_bundle.getString("lb_tm_match_original"));
    cell_H.setCellStyle(getHeaderStyle(p_workBook));
    p_sheet.setColumnWidth(col, 20 * 256);
    col++;

    Cell cell_I = getCell(segHeaderRow, col);
    cell_I.setCellValue(m_bundle.getString("lb_glossary_source"));
    cell_I.setCellStyle(getHeaderStyle(p_workBook));
    p_sheet.setColumnWidth(col, 25 * 256);
    col++;

    Cell cell_J = getCell(segHeaderRow, col);
    cell_J.setCellValue(m_bundle.getString("lb_glossary_target"));
    cell_J.setCellStyle(getHeaderStyle(p_workBook));
    p_sheet.setColumnWidth(col, 25 * 256);
    col++;

    Cell cell_K = getCell(segHeaderRow, col);
    cell_K.setCellValue(m_bundle.getString("lb_job_id_report"));
    cell_K.setCellStyle(getHeaderStyle(p_workBook));
    p_sheet.setColumnWidth(col, 15 * 256);
    col++;

    Cell cell_L = getCell(segHeaderRow, col);
    cell_L.setCellValue(m_bundle.getString("lb_segment_id"));
    cell_L.setCellStyle(getHeaderStyle(p_workBook));
    p_sheet.setColumnWidth(col, 15 * 256);
    col++;

    Cell cell_M = getCell(segHeaderRow, col);
    cell_M.setCellValue(m_bundle.getString("lb_page_name"));
    cell_M.setCellStyle(getHeaderStyle(p_workBook));
    p_sheet.setColumnWidth(col, 25 * 256);
    col++;

    Cell cell_N = getCell(segHeaderRow, col);
    cell_N.setCellValue(m_bundle.getString("lb_sid"));
    cell_N.setCellStyle(getHeaderStyle(p_workBook));
    p_sheet.setColumnWidth(col, 15 * 256);
    col++;
}

From source file:com.globalsight.everest.webapp.pagehandler.administration.reports.generator.PostReviewQAReportGenerator.java

License:Apache License

private void writeQualityAssessmentInfo(Workbook p_workbook, Sheet p_sheet, Job p_job,
        GlobalSightLocale p_targetLocale) throws Exception {
    String qualityAssessment = null;
    int col = 1;//ww w . ja v a2  s  .  c  om
    int row = 6;
    CellStyle contentStyle = p_workbook.createCellStyle();
    contentStyle.cloneStyleFrom(getContentStyle(p_workbook));
    contentStyle.setBorderTop(CellStyle.BORDER_THIN);
    contentStyle.setBorderRight(CellStyle.BORDER_THIN);
    contentStyle.setBorderBottom(CellStyle.BORDER_THIN);
    contentStyle.setBorderLeft(CellStyle.BORDER_THIN);
    contentStyle.setLocked(false);
    Row langInfoRow = getRow(p_sheet, row);
    Cell qualityCell = getCell(langInfoRow, col++);
    for (Workflow wf : p_job.getWorkflows()) {
        if (p_targetLocale.getId() == wf.getTargetLocale().getId()) {
            Collection tasks = ServerProxy.getTaskManager().getCurrentTasks(wf.getId());
            if (tasks != null) {
                for (Iterator it = tasks.iterator(); it.hasNext();) {
                    Task task = (Task) it.next();
                    qualityAssessment = task.getQualityAssessment();
                }
            }
        }
    }
    if (qualityAssessment != null && !"".endsWith(qualityAssessment)) {
        qualityCell.setCellValue(qualityAssessment);
    } else {
        qualityCell.setCellValue("");
    }

    qualityCell.setCellStyle(contentStyle);

}

From source file:com.globalsight.everest.webapp.pagehandler.administration.reports.generator.PostReviewQAReportGenerator.java

License:Apache License

private void writeMarketSuitabilityInfo(Workbook p_workbook, Sheet p_sheet, Job p_job,
        GlobalSightLocale p_targetLocale) throws Exception {
    String marketSuitabilty = null;
    int col = 1;//  w  ww  .j  a va  2s. c  o  m
    int row = 7;
    CellStyle contentStyle = p_workbook.createCellStyle();
    contentStyle.cloneStyleFrom(getContentStyle(p_workbook));
    contentStyle.setBorderTop(CellStyle.BORDER_THIN);
    contentStyle.setBorderRight(CellStyle.BORDER_THIN);
    contentStyle.setBorderBottom(CellStyle.BORDER_THIN);
    contentStyle.setBorderLeft(CellStyle.BORDER_THIN);
    contentStyle.setLocked(false);
    Row langInfoRow = getRow(p_sheet, row);
    Cell marketCell = getCell(langInfoRow, col++);
    for (Workflow wf : p_job.getWorkflows()) {
        if (p_targetLocale.getId() == wf.getTargetLocale().getId()) {
            Collection tasks = ServerProxy.getTaskManager().getCurrentTasks(wf.getId());
            if (tasks != null) {
                for (Iterator it = tasks.iterator(); it.hasNext();) {
                    Task task = (Task) it.next();
                    marketSuitabilty = task.getMarketSuitability();
                }
            }
        }
    }
    if (marketSuitabilty != null && !"".endsWith(marketSuitabilty)) {
        marketCell.setCellValue(marketSuitabilty);
    } else {
        marketCell.setCellValue("");
    }
    marketCell.setCellStyle(contentStyle);

}

From source file:com.globalsight.everest.webapp.pagehandler.administration.reports.generator.PostReviewQAReportGenerator.java

License:Apache License

private void writeReviewerComment(Workbook p_workbook, Sheet p_sheet) throws Exception {
    int col = 1;//from   ww  w .  j  a v a2  s.c o m
    int row = 8;
    CellStyle contentStyle = p_workbook.createCellStyle();
    contentStyle.cloneStyleFrom(getContentStyle(p_workbook));
    contentStyle.setBorderTop(CellStyle.BORDER_THIN);
    contentStyle.setBorderRight(CellStyle.BORDER_THIN);
    contentStyle.setBorderBottom(CellStyle.BORDER_THIN);
    contentStyle.setBorderLeft(CellStyle.BORDER_THIN);
    contentStyle.setLocked(false);
    Row langInfoRow = getRow(p_sheet, row);

    Cell commentCell = getCell(langInfoRow, col++);
    commentCell.setCellValue("");
    commentCell.setCellStyle(contentStyle);

}

From source file:com.globalsight.everest.webapp.pagehandler.administration.reports.generator.PostReviewQAReportGenerator.java

License:Apache License

/**
 * For Post-Review QA Report, Write segment information into each row of the
 * sheet.//from w w w .j  a v a2 s. co m
 * 
 * @param p_sheet
 *            the sheet
 * @param p_jobId
 *            the job id
 * @param p_targetLang
 *            the target locale String
 * @param p_srcPageId
 *            the source page id
 * @param p_dateFormat
 *            the data format
 * @param p_row
 *            the segment row in sheet
 */
@SuppressWarnings({ "rawtypes", "unchecked" })
private int writeSegmentInfo(Workbook p_workBook, Sheet p_sheet, Job p_job, GlobalSightLocale p_targetLocale,
        String p_srcPageId, String p_dateFormat, int p_row) throws Exception {
    boolean review_only = false;
    Vector<TargetPage> targetPages = new Vector<TargetPage>();

    TranslationMemoryProfile tmp = null;
    Vector<String> excludItems = null;
    for (Workflow workflow : p_job.getWorkflows()) {
        if (cancel)
            return 0;

        if (Workflow.PENDING.equals(workflow.getState()) || Workflow.CANCELLED.equals(workflow.getState())
        // || Workflow.EXPORT_FAILED.equals(workflow.getState())
                || Workflow.IMPORT_FAILED.equals(workflow.getState())) {
            continue;
        }
        if (p_targetLocale.getId() == workflow.getTargetLocale().getId()) {
            targetPages = workflow.getTargetPages();
            tmp = workflow.getJob().getL10nProfile().getTranslationMemoryProfile();
            if (tmp != null) {
                excludItems = tmp.getJobExcludeTuTypes();
            }
            Collection tasks = ServerProxy.getTaskManager().getCurrentTasks(workflow.getId());
            if (tasks != null) {
                for (Iterator it = tasks.iterator(); it.hasNext();) {
                    Task task = (Task) it.next();
                    review_only = task.isType(Task.TYPE_REVIEW);

                }
            }
        }
    }

    if (targetPages.isEmpty()) {
        // If no corresponding target page exists, set the cell blank
        writeBlank(p_sheet, p_row, 11);
    } else {
        LeverageMatchLingManager lmLingManager = LingServerProxy.getLeverageMatchLingManager();
        TermLeverageManager termLeverageManager = ServerProxy.getTermLeverageManager();

        Locale sourcePageLocale = p_job.getSourceLocale().getLocale();
        Locale targetPageLocale = p_targetLocale.getLocale();
        TermLeverageOptions termLeverageOptions = getTermLeverageOptions(sourcePageLocale, targetPageLocale,
                p_job.getL10nProfile().getProject().getTermbaseName(), String.valueOf(p_job.getCompanyId()));
        Map<Long, Set<TermLeverageMatch>> termLeverageMatchResultMap = null;
        if (termLeverageOptions != null) {
            termLeverageMatchResultMap = termLeverageManager.getTermMatchesForPages(p_job.getSourcePages(),
                    p_targetLocale);
        }

        String category = null;
        PseudoData pData = new PseudoData();
        pData.setMode(PseudoConstants.PSEUDO_COMPACT);
        String sid = null;
        Set<Integer> rowsWithCommentSet = new HashSet<Integer>();
        for (int i = 0; i < targetPages.size(); i++) {
            if (cancel)
                return 0;

            TargetPage targetPage = (TargetPage) targetPages.get(i);
            SourcePage sourcePage = targetPage.getSourcePage();

            if (!"".equals(p_srcPageId) && !p_srcPageId.equals(String.valueOf(sourcePage.getId()))) {
                // ignore the source pages not equal to the one
                // if the request comes from pop up editor
                continue;
            }

            SegmentTuUtil.getTusBySourcePageId(sourcePage.getId());
            List sourceTuvs = SegmentTuvUtil.getSourceTuvs(sourcePage);
            List targetTuvs = SegmentTuvUtil.getTargetTuvs(targetPage);

            MatchTypeStatistics tuvMatchTypes = lmLingManager.getMatchTypesForStatistics(
                    sourcePage.getIdAsLong(), targetPage.getLocaleId(), p_job.getLeverageMatchThreshold());
            Map<Long, Set<LeverageMatch>> fuzzyLeverageMatchMap = lmLingManager
                    .getFuzzyMatches(sourcePage.getIdAsLong(), new Long(targetPage.getLocaleId()));
            Map<Long, Tuv> allTuvMap = this.getAllTuvsMap(targetPage);

            sourcePageLocale = sourcePage.getGlobalSightLocale().getLocale();
            targetPageLocale = targetPage.getGlobalSightLocale().getLocale();

            boolean m_rtlSourceLocale = EditUtil.isRTLLocale(sourcePageLocale.toString());
            boolean m_rtlTargetLocale = EditUtil.isRTLLocale(targetPageLocale.toString());

            // Find segment all comments belong to this target page
            Map<Long, IssueImpl> issuesMap = CommentHelper.getIssuesMap(targetPage.getId());

            for (int j = 0; j < targetTuvs.size(); j++) {
                if (cancel)
                    return 0;

                int col = 0;
                Tuv targetTuv = (Tuv) targetTuvs.get(j);
                Tuv sourceTuv = (Tuv) sourceTuvs.get(j);

                category = sourceTuv.getTu(p_job.getId()).getTuType();
                if (excludItems != null && excludItems.contains(category)) {
                    continue;
                }

                // Comment
                List<IssueHistory> issueHistories = null;
                String commentHistory = "";
                String failure = "";
                String commentStatus = "";
                String lastComment = "";
                String priority = "";
                Issue issue = issuesMap.get(targetTuv.getId());
                if (issue != null) {
                    issueHistories = issue.getHistory();
                    failure = issue.getCategory();
                    commentStatus = issue.getStatus();
                    priority = issue.getPriority();
                }
                if (issueHistories != null && issueHistories.size() > 0) {
                    for (IssueHistory issueHistory : issueHistories) {
                        commentHistory += issueHistory.getComment() + "\r";
                    }
                    lastComment = issueHistories.get(0).getComment();
                }

                sid = sourceTuv.getSid();

                StringBuilder matches = getMatches(fuzzyLeverageMatchMap, tuvMatchTypes, excludItems,
                        sourceTuvs, targetTuvs, sourceTuv, targetTuv, p_job.getId());

                // Get Terminology/Glossary Source and Target.
                String sourceTerms = "";
                String targetTerms = "";
                if (termLeverageMatchResultMap != null && termLeverageMatchResultMap.size() > 0) {
                    Set<TermLeverageMatch> termLeverageMatchSet = termLeverageMatchResultMap
                            .get(sourceTuv.getId());
                    if (termLeverageMatchSet != null && termLeverageMatchSet.size() > 0) {
                        TermLeverageMatch tlm = termLeverageMatchSet.iterator().next();
                        sourceTerms = tlm.getMatchedSourceTerm();
                        targetTerms = tlm.getMatchedTargetTerm();
                    }
                }

                Row currentRow = getRow(p_sheet, p_row);

                // Source segment with compact tags
                CellStyle srcStyle = m_rtlSourceLocale ? getRtlContentStyle(p_workBook)
                        : getContentStyle(p_workBook);
                Cell cell_A = getCell(currentRow, col);
                cell_A.setCellValue(getSegment(pData, sourceTuv, m_rtlSourceLocale, p_job.getId()));
                cell_A.setCellStyle(srcStyle);
                col++;

                // Target segment with compact tags
                CellStyle trgStyle = m_rtlTargetLocale ? getRtlContentStyle(p_workBook)
                        : getContentStyle(p_workBook);
                String previousSegments = getPreviousSegments(allTuvMap, targetTuv.getId(), targetTuv,
                        p_job.getId(), pData);
                Cell cell_B = getCell(currentRow, col);
                cell_B.setCellValue(previousSegments);
                cell_B.setCellStyle(trgStyle);
                col++;

                // Modify the translation
                CellStyle modifyTranslationStyle = m_rtlTargetLocale ? getUnlockedRightStyle(p_workBook)
                        : getUnlockedStyle(p_workBook);
                modifyTranslationStyle.setLocked(false);
                Cell cell_C = getCell(currentRow, col);
                cell_C.setCellValue(getSegment(pData, targetTuv, m_rtlTargetLocale, p_job.getId()));
                if (review_only) {
                    modifyTranslationStyle.setLocked(true);
                }
                cell_C.setCellStyle(modifyTranslationStyle);
                col++;

                // Reviewers Comments
                Cell cell_D = getCell(currentRow, col);
                cell_D.setCellValue(commentHistory);
                cell_D.setCellStyle(getContentStyle(p_workBook));
                col++;

                // Category failure
                Cell cell_E = getCell(currentRow, col);
                cell_E.setCellValue(failure);
                cell_E.setCellStyle(getContentStyle(p_workBook));
                col++;

                // Comment Status
                Cell cell_F = getCell(currentRow, col);
                cell_F.setCellValue(commentStatus);
                CellStyle commentCS = p_workBook.createCellStyle();
                commentCS.cloneStyleFrom(getContentStyle(p_workBook));
                //                    commentCS.setLocked(false);
                cell_F.setCellStyle(commentCS);
                // add comment status drop down list for current row.
                String[] statusArray = getCommentStatusList(lastComment);
                if (statusArray.length > 1) {
                    rowsWithCommentSet.add(p_row);
                }
                col++;

                // Priority
                Cell cell_G = getCell(currentRow, col);
                cell_G.setCellValue(priority);
                cell_G.setCellStyle(getContentStyle(p_workBook));
                col++;

                // TM match
                Cell cell_H = getCell(currentRow, col);
                cell_H.setCellValue(matches.toString());
                cell_H.setCellStyle(getContentStyle(p_workBook));
                col++;

                // Glossary source
                Cell cell_I = getCell(currentRow, col);
                cell_I.setCellValue(sourceTerms);
                cell_I.setCellStyle(getContentStyle(p_workBook));
                col++;

                // Glossary target
                Cell cell_J = getCell(currentRow, col);
                cell_J.setCellValue(targetTerms);
                cell_J.setCellStyle(getContentStyle(p_workBook));
                col++;

                // Job Id
                Cell cell_K = getCell(currentRow, col);
                cell_K.setCellValue(p_job.getId());
                cell_K.setCellStyle(getContentStyle(p_workBook));
                col++;

                // Segment id
                Cell cell_L = getCell(currentRow, col);
                cell_L.setCellValue(sourceTuv.getTu(p_job.getId()).getId());
                cell_L.setCellStyle(getContentStyle(p_workBook));
                col++;

                // Fix for GBS-1484
                String externalPageId = sourcePage.getExternalPageId();
                String[] pathNames = externalPageId.split("\\\\");
                String name = pathNames[pathNames.length - 1];
                boolean temp = pathNames[0].contains(")");
                if (temp) {
                    String[] firstNames = pathNames[0].split("\\)");
                    String detailName = firstNames[0];
                    name = name + detailName + ")";
                }
                // Page Name
                Cell cell_M = getCell(currentRow, col);
                cell_M.setCellValue(name);
                cell_M.setCellStyle(getContentStyle(p_workBook));
                col++;

                // SID
                Cell cell_N = getCell(currentRow, col);
                cell_N.setCellValue(sid);
                cell_N.setCellStyle(getContentStyle(p_workBook));
                col++;

                p_row++;
            }
        }
        // Add comment status
        addCommentStatus(p_sheet, rowsWithCommentSet, p_row);
        // Add category failure drop down list here.
        addCategoryFailureValidation(p_sheet, SEGMENT_START_ROW, p_row - 1, CATEGORY_FAILURE_COLUMN,
                CATEGORY_FAILURE_COLUMN);
        addPriority(p_sheet, SEGMENT_START_ROW, p_row - 1, PRIORITY_COLUMN, PRIORITY_COLUMN);
    }

    return p_row;
}