Examples of replaceElement()


Examples of net.sourceforge.rtf.document.RTFBookmark.replaceElement()

                RTFBookmark endIfBookmark = (RTFBookmark) bookmarkEndIfMap
                        .get(endIfBookmarkName);
                endIfBookmark.replaceElement(getMacroEndIf());
                RTFBookmark endIfBookmarkBKMEND = (RTFBookmark) bookmarkBkmIfMap
                        .get(endIfBookmarkName);
                endIfBookmarkBKMEND.replaceElement("");
            }
        }
        // Replace element ELSE Bookmark end by #else
        for (Iterator iter = bookmarkElseMap.keySet().iterator(); iter
                .hasNext();) {
View Full Code Here

Examples of net.sourceforge.rtf.document.RTFBookmark.replaceElement()

            RTFBookmark ifBookmark = (RTFBookmark) bookmarkIfMap
                    .get(ifBookmarkName);
            if (ifBookmark != null) {
                RTFBookmark elseBookmark = (RTFBookmark) bookmarkElseMap
                        .get(elseBookmarkName);
                elseBookmark.replaceElement(getMacroElse());
            }
        }
        return documentTransformed;

    }
View Full Code Here

Examples of net.sourceforge.rtf.document.RTFBookmark.replaceElement()

                            if (bookmarkSize > 0) {
                                // MergeField is found and Bookmark was started
                                // construct #foreach with name of field
                                RTFBookmark startBookmark = (RTFBookmark) startBookmarksList
                                        .elementAt(bookmarkSize - 1);
                                startBookmark.replaceElement(getForeach(
                                        fieldName, fieldNameWithListInfo));
                                startBookmark.setItemNameList(getItemListName(
                                        fieldName, fieldNameWithListInfo));
                                startBookmarksList.removeElement(startBookmark);
                                bookmarkStartMap.put(startBookmark.getName(),
View Full Code Here

Examples of net.sourceforge.rtf.document.RTFBookmark.replaceElement()

                                if (ifBookmark != null) {
                                    // Bookmark IF exists. Replace this RTF code
                                    // with the condition
                                    // comming from field
                                    condition = getMacroIf(condition);
                                    ifBookmark.replaceElement(condition);
                                    // Remove content of the field
                                    field.replaceElement("");
                                    // Replace BKMEND by ""
                                    RTFBookmark ifBookmarkBKMEND = (RTFBookmark) bookmarkBkmIfMap
                                            .get(fieldName);
View Full Code Here

Examples of net.sourceforge.rtf.document.RTFBookmark.replaceElement()

                                    // Remove content of the field
                                    field.replaceElement("");
                                    // Replace BKMEND by ""
                                    RTFBookmark ifBookmarkBKMEND = (RTFBookmark) bookmarkBkmIfMap
                                            .get(fieldName);
                                    ifBookmarkBKMEND.replaceElement("");                                   
                                }
                            }
                        }
                    }
                }
View Full Code Here

Examples of net.sourceforge.rtf.document.RTFField.replaceElement()

                            if (newFieldName.startsWith("$"))
                                newFieldName = newFieldName.substring(1);

                            fieldContent = StringUtils.sub(fieldContent,
                                    fieldName, newFieldName);
                            field.replaceElement(fieldContent);
                        }
                    } else {
                        if (fieldType == RTFField.FIELDTYPE_REF) {
                            String condition = field.getCondition();
                            if (condition != null) {
View Full Code Here

Examples of net.sourceforge.rtf.document.RTFField.replaceElement()

                                    // with the condition
                                    // comming from field
                                    condition = getMacroIf(condition);
                                    ifBookmark.replaceElement(condition);
                                    // Remove content of the field
                                    field.replaceElement("");
                                    // Replace BKMEND by ""
                                    RTFBookmark ifBookmarkBKMEND = (RTFBookmark) bookmarkBkmIfMap
                                            .get(fieldName);
                                    ifBookmarkBKMEND.replaceElement("");                                   
                                }
View Full Code Here

Examples of net.sourceforge.rtf.document.RTFPage.replaceElement()

                        content = " "
                                + getMacroPageBreak(startBookmark
                                        .getItemNameList(), page
                                        .getRTFFirstContentOfElement()) + " ";
                    }
                    page.replaceElement(content);
                } else {
                    if (groupByPerPageBreak > -1) {
                        if (lastEndLoopRTFBookmark != null
                                && lastEndLoopRTFBookmark.equals(endBookmark)) {
                            newContent = getMacroPageBreak(startBookmark
View Full Code Here

Examples of net.sourceforge.rtf.document.RTFUserProperty.replaceElement()

                        if (newUserPropertyValue.startsWith("$"))
                            newUserPropertyValue = newUserPropertyValue
                                    .substring(1);
                        userPropertyContent = userPropertyContent.replaceAll(
                                userPropertyValue, newUserPropertyValue);
                        userProperty.replaceElement(userPropertyContent);
                    }
                }
                String userPropertyContent = userProperty
                        .getRTFContentOfSimpleElement();
                userProperty.replaceElement(userPropertyContent);
View Full Code Here

Examples of net.sourceforge.rtf.document.RTFUserProperty.replaceElement()

                        userProperty.replaceElement(userPropertyContent);
                    }
                }
                String userPropertyContent = userProperty
                        .getRTFContentOfSimpleElement();
                userProperty.replaceElement(userPropertyContent);

                break;

            /*
             * case RTF_ELEMENT_ANNOTATION: // TODO : manage start/end loop and
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.