Package com.sun.star.text

Examples of com.sun.star.text.XTextFramesSupplier


                    XTextTablesSupplier.class, xParent );

      oNA = oTTS.getTextTables();
    }
    if ( iDsc instanceof FrameDsc ) {
      XTextFramesSupplier oTTS = (XTextFramesSupplier)
          UnoRuntime.queryInterface(
                    XTextFramesSupplier.class, xParent );

      oNA = oTTS.getTextFrames();
    }
    if ( iDsc instanceof BookmarkDsc ) {
      XBookmarksSupplier oTTS = (XBookmarksSupplier)
          UnoRuntime.queryInterface(
                    XBookmarksSupplier.class, xParent );

      oNA = oTTS.getBookmarks();
    }

    if ( iDsc instanceof FootnoteDsc ) {
      XFootnotesSupplier oTTS = (XFootnotesSupplier)
          UnoRuntime.queryInterface(
                    XFootnotesSupplier.class, xParent );

      return( oTTS.getFootnotes() );
    }

    if ( iDsc instanceof TextSectionDsc ) {
      XTextSectionsSupplier oTSS = (XTextSectionsSupplier)
          UnoRuntime.queryInterface(
View Full Code Here


        XInterface oObj = null;
        XTextFrame oFrame1 = null;
        XText oText = null;
        XTextCursor oCursor = null;
        XMultiServiceFactory oDocMSF = null;
        XTextFramesSupplier oInterface = null;

        log.println( "creating a test environment" );
        try {
            oDocMSF = (XMultiServiceFactory)
                UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
            Object oInt = oDocMSF.createInstance("com.sun.star.text.TextFrame");
            oFrame1 = (XTextFrame)
                UnoRuntime.queryInterface( XTextFrame.class, oInt );
        } catch ( com.sun.star.uno.Exception e ) {
            e.printStackTrace(log);
            throw new StatusException
                ("Couldn't create instance of TextFrame", e);
        }

        oText = xTextDoc.getText();
        oCursor = oText.createTextCursor();

        try {
            oText.insertTextContent(oCursor, oFrame1, false);
        } catch ( com.sun.star.lang.IllegalArgumentException e ) {
            e.printStackTrace(log);
            throw new StatusException
                ("Error: can't insert text content to text document", e);
        }

        oInterface = (XTextFramesSupplier)
            UnoRuntime.queryInterface( XTextFramesSupplier.class, xTextDoc );

        oObj = oInterface.getTextFrames();

        log.println( "creating a new environment for Frame object" );
        TestEnvironment tEnv = new TestEnvironment( oObj );

        return tEnv;
View Full Code Here

                    XTextTablesSupplier.class, xParent );

      oNA = oTTS.getTextTables();
    }
    if ( iDsc instanceof FrameDsc ) {
      XTextFramesSupplier oTTS = (XTextFramesSupplier)
          UnoRuntime.queryInterface(
                    XTextFramesSupplier.class, xParent );

      oNA = oTTS.getTextFrames();
    }
    if ( iDsc instanceof BookmarkDsc ) {
      XBookmarksSupplier oTTS = (XBookmarksSupplier)
          UnoRuntime.queryInterface(
                    XBookmarksSupplier.class, xParent );

      oNA = oTTS.getBookmarks();
    }

    if ( iDsc instanceof FootnoteDsc ) {
      XFootnotesSupplier oTTS = (XFootnotesSupplier)
          UnoRuntime.queryInterface(
                    XFootnotesSupplier.class, xParent );

      return( oTTS.getFootnotes() );
    }

    if ( iDsc instanceof TextSectionDsc ) {
      XTextSectionsSupplier oTSS = (XTextSectionsSupplier)
          UnoRuntime.queryInterface(
View Full Code Here

public class TextFrameHandler
{

    public static XTextFrame getFrameByName(String sFrameName, XTextDocument xTD) throws NoSuchElementException, WrappedTargetException
    {
        XTextFramesSupplier xFrameSupplier = UnoRuntime.queryInterface(XTextFramesSupplier.class, xTD);
        if (xFrameSupplier.getTextFrames().hasByName(sFrameName))
        {
            Object oTextFrame = xFrameSupplier.getTextFrames().getByName(sFrameName);
            return UnoRuntime.queryInterface(XTextFrame.class, oTextFrame);
        }
        return null;
    }
View Full Code Here

                    XTextTablesSupplier.class, xParent );

      oNA = oTTS.getTextTables();
    }
    if ( iDsc instanceof FrameDsc ) {
      XTextFramesSupplier oTTS = (XTextFramesSupplier)
          UnoRuntime.queryInterface(
                    XTextFramesSupplier.class, xParent );

      oNA = oTTS.getTextFrames();
    }
    if ( iDsc instanceof BookmarkDsc ) {
      XBookmarksSupplier oTTS = (XBookmarksSupplier)
          UnoRuntime.queryInterface(
                    XBookmarksSupplier.class, xParent );

      oNA = oTTS.getBookmarks();
    }

    if ( iDsc instanceof FootnoteDsc ) {
      XFootnotesSupplier oTTS = (XFootnotesSupplier)
          UnoRuntime.queryInterface(
                    XFootnotesSupplier.class, xParent );

      return( oTTS.getFootnotes() );
    }

    if ( iDsc instanceof TextSectionDsc ) {
      XTextSectionsSupplier oTSS = (XTextSectionsSupplier)
          UnoRuntime.queryInterface(
View Full Code Here

        XInterface oObj = null;
        XTextFrame oFrame1 = null;
        XText oText = null;
        XTextCursor oCursor = null;
        XMultiServiceFactory oDocMSF = null;
        XTextFramesSupplier oInterface = null;

        log.println( "creating a test environment" );
        try {
            oDocMSF = (XMultiServiceFactory)
                UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
            Object oInt = oDocMSF.createInstance("com.sun.star.text.TextFrame");
            oFrame1 = (XTextFrame)
                UnoRuntime.queryInterface( XTextFrame.class, oInt );
        } catch ( com.sun.star.uno.Exception e ) {
            e.printStackTrace(log);
            throw new StatusException
                ("Couldn't create instance of TextFrame", e);
        }

        oText = xTextDoc.getText();
        oCursor = oText.createTextCursor();

        try {
            oText.insertTextContent(oCursor, oFrame1, false);
        } catch ( com.sun.star.lang.IllegalArgumentException e ) {
            e.printStackTrace(log);
            throw new StatusException
                ("Error: can't insert text content to text document", e);
        }

        oInterface = (XTextFramesSupplier)
            UnoRuntime.queryInterface( XTextFramesSupplier.class, xTextDoc );

        oObj = oInterface.getTextFrames();

        log.println( "creating a new environment for Frame object" );
        TestEnvironment tEnv = new TestEnvironment( oObj );

        return tEnv;
View Full Code Here

        XInterface oObj = null;
        XTextFrame oFrame1 = null;
        XText oText = null;
        XTextCursor oCursor = null;
        XMultiServiceFactory oDocMSF = null;
        XTextFramesSupplier oInterface = null;

        log.println( "creating a test environment" );
        try {
            oDocMSF = (XMultiServiceFactory)
                UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
            Object oInt = oDocMSF.createInstance("com.sun.star.text.TextFrame");
            oFrame1 = (XTextFrame)
                UnoRuntime.queryInterface( XTextFrame.class, oInt );
        } catch ( com.sun.star.uno.Exception e ) {
            e.printStackTrace(log);
            throw new StatusException
                ("Couldn't create instance of TextFrame", e);
        }

        oText = xTextDoc.getText();
        oCursor = oText.createTextCursor();

        try {
            oText.insertTextContent(oCursor, oFrame1, false);
        } catch ( com.sun.star.lang.IllegalArgumentException e ) {
            e.printStackTrace(log);
            throw new StatusException
                ("Error: can't insert text content to text document", e);
        }

        oInterface = (XTextFramesSupplier)
            UnoRuntime.queryInterface( XTextFramesSupplier.class, xTextDoc );

        oObj = oInterface.getTextFrames();

        log.println( "creating a new environment for Frame object" );
        TestEnvironment tEnv = new TestEnvironment( oObj );

        return tEnv;
View Full Code Here

public class TextFrameHandler
{

    public static XTextFrame getFrameByName(String sFrameName, XTextDocument xTD) throws NoSuchElementException, WrappedTargetException
    {
        XTextFramesSupplier xFrameSupplier = (XTextFramesSupplier) UnoRuntime.queryInterface(XTextFramesSupplier.class, xTD);
        if (xFrameSupplier.getTextFrames().hasByName(sFrameName))
        {
            Object oTextFrame = xFrameSupplier.getTextFrames().getByName(sFrameName);
            XTextFrame xTextFrame = (XTextFrame) UnoRuntime.queryInterface(XTextFrame.class, oTextFrame);
            return xTextFrame;
        }
        return null;
    }
View Full Code Here

    return id;
  }

  private int undoTextIntegration(ITextDocument textDocument,
      String integrationID, String undoString) {
    XTextFramesSupplier textFramesSupplier = (XTextFramesSupplier) UnoRuntime
    .queryInterface(XTextFramesSupplier.class, textDocument.getXTextDocument());
    XNameAccess textFrames = textFramesSupplier.getTextFrames();

    if (!textFrames.hasByName(integrationID))
      return 0;

    int steps = 0;
View Full Code Here

                    XTextTablesSupplier.class, xParent );

      oNA = oTTS.getTextTables();
    }
    if ( iDsc instanceof FrameDsc ) {
      XTextFramesSupplier oTTS = (XTextFramesSupplier)
          UnoRuntime.queryInterface(
                    XTextFramesSupplier.class, xParent );

      oNA = oTTS.getTextFrames();
    }
    if ( iDsc instanceof BookmarkDsc ) {
      XBookmarksSupplier oTTS = (XBookmarksSupplier)
          UnoRuntime.queryInterface(
                    XBookmarksSupplier.class, xParent );

      oNA = oTTS.getBookmarks();
    }

    if ( iDsc instanceof FootnoteDsc ) {
      XFootnotesSupplier oTTS = (XFootnotesSupplier)
          UnoRuntime.queryInterface(
                    XFootnotesSupplier.class, xParent );

      return( oTTS.getFootnotes() );
    }

    if ( iDsc instanceof TextSectionDsc ) {
      XTextSectionsSupplier oTSS = (XTextSectionsSupplier)
          UnoRuntime.queryInterface(
View Full Code Here

TOP

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

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.