Package com.sun.star.text

Examples of com.sun.star.text.XTextContent


     * @param oTextContent
     * @return
     */
    public boolean removeTextContent(Object oTextContent){
        try {
            XTextContent xTextContent = (XTextContent) UnoRuntime.queryInterface(XTextContent.class, oTextContent);
            xText.removeTextContent(xTextContent);
            return true;
        } catch (NoSuchElementException e) {
            e.printStackTrace(System.out);
            return false;
View Full Code Here


        String[] sTableNames = xNameAccessTextTables.getElementNames();
        for (int i = 0; i < sTableNames.length; i++){
            String sTableName = sTableNames[i];
            if (JavaTools.FieldInList(sLayoutTableNames, sTableName) > -1){
                if (!sTableName.equals(sLayoutTableNames[0])){
                    XTextContent xTextContent = (XTextContent) UnoRuntime.queryInterface(XTextContent.class, oTextTableHandler.getByName(sTableName));
                        boolean bleaveloop = false;
                        while (!bleaveloop){
                            try{
//                                xRelativeTextContentRemove.removeTextContentBefore(xTextContent);
                        xRelativeTextContentRemove.removeTextContentAfter(xTextContent);
View Full Code Here

    public void insertUserField(XTextCursor xTextCursor, String FieldName, String FieldTitle) {
        try {
            XInterface xField = (XInterface) xMSFDoc.createInstance("com.sun.star.text.TextField.User");
            XDependentTextField xDepField = (XDependentTextField) UnoRuntime.queryInterface(XDependentTextField.class, xField);
            XTextContent xFieldContent = (XTextContent) UnoRuntime.queryInterface(XTextContent.class, xField);
            if (xTextFieldsSupplier.getTextFieldMasters().hasByName("com.sun.star.text.FieldMaster.User." + FieldName)) {
                Object oMaster = xTextFieldsSupplier.getTextFieldMasters().getByName("com.sun.star.text.FieldMaster.User." + FieldName);
                XComponent xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, oMaster);
                xComponent.dispose();
            }
View Full Code Here

    public XNamed addLinkedTextSection(XTextCursor xTextCursor, String sLinkRegion, DBColumn CurDBColumn, Object CurGroupValue) {
    XNamed xNamedTextSection = null;
    try {
        XInterface xTextSection = (XInterface) CurReportDocument.xMSFDoc.createInstance("com.sun.star.text.TextSection");
        XTextContent xTextSectionContent = (XTextContent) UnoRuntime.queryInterface(XTextContent.class, xTextSection);
        xNamedTextSection = (XNamed) UnoRuntime.queryInterface(XNamed.class, xTextSection);
        xTextCursor.gotoEnd(false);
        xTextCursor.getText().insertTextContent(xTextCursor, xTextSectionContent, true);
        Helper.setUnoPropertyValue(xTextSection, "LinkRegion", sLinkRegion);
        if (CurDBColumn != null){
View Full Code Here

            Object oGObject = (XInterface) xMSF.createInstance(
                                      "com.sun.star.text.GraphicObject");

            XText the_text = aDoc.getText();
            XTextCursor the_cursor = the_text.createTextCursor();
            XTextContent the_content = (XTextContent) UnoRuntime.queryInterface(
                                               XTextContent.class, oGObject);
            the_text.insertTextContent(the_cursor, the_content, true);

            XPropertySet oProps = (XPropertySet) UnoRuntime.queryInterface(
                                          XPropertySet.class, oGObject);
View Full Code Here

            try {
                    ServiceObj = docMSF.createInstance( service );
            }
            catch( com.sun.star.uno.Exception cssuE ){
            }
            XTextContent BM = (XTextContent)UnoRuntime.queryInterface( ifcClass,
                                                                                                                            ServiceObj );
            return BM;
    }
View Full Code Here

    try {
      ServiceObj = docMSF.createInstance( service );
    }
    catch( com.sun.star.uno.Exception cssuE ){
    }
    XTextContent FN = (XTextContent)UnoRuntime.queryInterface( ifcClass,
                                ServiceObj );
    return FN;
  }
View Full Code Here

    try {
      ServiceObj = docMSF.createInstance( service );
    }
    catch( com.sun.star.uno.Exception cssuE ){
    }
    XTextContent PG = (XTextContent)UnoRuntime.queryInterface( ifcClass,
                                ServiceObj );
    return PG;
  }
View Full Code Here

    try {
      ServiceObj = docMSF.createInstance( service );
    }
    catch( com.sun.star.uno.Exception cssuE ){
    }
    XTextContent RM = (XTextContent)UnoRuntime.queryInterface( ifcClass,
                                ServiceObj );
    return RM;
  }
View Full Code Here

     * @see #_getAnchor()
     */
    public void _attach() {
        requiredMethod("getAnchor()");       
        try {
            XTextContent aContent = (XTextContent) tEnv.getObjRelation("CONTENT");           
            XTextRange aRange = (XTextRange) tEnv.getObjRelation("RANGE");

            if ( aContent !=null) {               
                aContent.attach(aRange);
            } else {               
                oObj.attach(aRange);
            }
            tRes.tested("attach()", true ) ;
        }
View Full Code Here

TOP

Related Classes of com.sun.star.text.XTextContent

Copyright © 2018 www.massapicom. 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.