Package com.sun.star.text

Examples of com.sun.star.text.XTextCursor.gotoStart()


        int iCount = getDoc().DBColumnsVector.size();
        for (int i = 0; i < iCount; i++)
        {
            CurDBColumn = (DBColumn) getDoc().DBColumnsVector.elementAt(i);
            xNameCellCursor = ReportTextDocument.createTextCursor(CurDBColumn.xNameCell);
            xNameCellCursor.gotoStart(false);
            FieldContent = getDoc().oTextFieldHandler.getUserFieldContent(xNameCellCursor);
            if (!FieldContent.equals(""))
            {
                xNameCellCursor.goRight((short) 1, true);
                xNameCellCursor.setString(FieldContent);
View Full Code Here


    }

    public void insertUserFieldToTableCell(TextFieldHandler oTextFieldHandler)
    {
        XTextCursor xTextCursor = TextDocument.createTextCursor(xNameCell);
        xTextCursor.gotoStart(false);
        xTextCursor.gotoEnd(true);
        xTextCursor.setString("");
        oTextFieldHandler.insertUserField(xTextCursor, CurDBField.getFieldName(), CurDBField.getFieldTitle());
    }
View Full Code Here

    }

    public void insertUserFieldToTableCell(TextFieldHandler oTextFieldHandler, XCell xCell)
    {
        XTextCursor xTextCursor = TextDocument.createTextCursor(xCell);
        xTextCursor.gotoStart(false);
        xTextCursor.gotoEnd(true);
        xTextCursor.setString("");
        oTextFieldHandler.insertUserField(xTextCursor, CurDBField.getFieldName(), CurDBField.getFieldTitle());
    }
View Full Code Here

                    UnoRuntime.queryInterface(XTextContent.class, oTS);
            oText.insertTextContent(oCursor, oTSC, false);
            XWordCursor oWordC = (XWordCursor)
                UnoRuntime.queryInterface(XWordCursor.class, oCursor);
            oCursor.setString("End of TextSection");
            oCursor.gotoStart(false);
            oCursor.setString("Start of TextSection ");
            oWordC.gotoEndOfWord(false);
            XInterface oTS2 = (XInterface) oDocMSF.createInstance
                ("com.sun.star.text.TextSection");
            oTSC = (XTextContent)UnoRuntime.queryInterface(XTextContent.class, oTS2);
View Full Code Here

   
    public void addTextSectionCopies()
        {
            m_aDoc.setLayoutSectionsVisible(false);
            XTextCursor xTextCursor = ReportTextDocument.createTextCursor(m_aDoc.xTextDocument.getText());
            xTextCursor.gotoStart(false);
            for (int i = 0; i < getRecordParser().GroupFieldNames.length; i++)
            {
                XNamed xNamedTextSection = addLinkedTextSection(xTextCursor, ReportTextDocument.GROUPSECTION + Integer.toString(i + 1), null, null);
                xNamedTextSection.setName(ReportTextDocument.COPYOFGROUPSECTION + (i+1));
                renameTableofLastSection(ReportTextDocument.COPYOFTBLGROUPSECTION + (i+1));
View Full Code Here

            oText.insertTextContent(oCursor, oTSC, false);

            XWordCursor oWordC = (XWordCursor) UnoRuntime.queryInterface(
                                         XWordCursor.class, oCursor);
            oCursor.setString("End of TextSection");
            oCursor.gotoStart(false);
            oCursor.setString("Start of TextSection ");
            oWordC.gotoEndOfWord(false);

            XInterface oTS2 = (XInterface) oDocMSF.createInstance(
                                      "com.sun.star.text.TextSection");
View Full Code Here

  String FieldContent;
  int iCount = CurReportDocument.GroupFormatVector.size();
  for (int i = 0; i < iCount; i++){
      CurDBColumn = (ReportDocument.DBColumn) CurReportDocument.GroupFormatVector.elementAt(i);
      xNameCellCursor = CurReportDocument.createTextCursor(CurDBColumn.xNameCell);
      xNameCellCursor.gotoStart(false);
      FieldContent = CurReportDocument.getUserFieldContent(xNameCellCursor);
      xNameCellCursor.goRight((short)1, true);
      xNameCellCursor.setString(FieldContent);
  }
    }
View Full Code Here

    public int getCharWidth(String ScaleString){
    int iScale = 200;
  xTextDocument.lockControllers();
  int iScaleLen = ScaleString.length();
  XTextCursor xTextCursor = createTextCursor(xTextDocument.getText());
  xTextCursor.gotoStart(false);
  Tools.setUNOPropertyValue(xTextCursor, "PageDescName", "First Page");
  xTextCursor.setString(ScaleString);
  XTextViewCursorSupplier xViewCursor = (XTextViewCursorSupplier) UnoRuntime.queryInterface(XTextViewCursorSupplier.class, xTextDocument.getCurrentController());
  XTextViewCursor xTextViewCursor = xViewCursor.getViewCursor();
  xTextViewCursor.gotoStart(false);
View Full Code Here

  xTextViewCursor.gotoStart(false);
  int iFirstPos = xTextViewCursor.getPosition().X;
  xTextViewCursor.gotoEnd(false);
  int iLastPos = xTextViewCursor.getPosition().X;
  iScale = (iLastPos-iFirstPos)/iScaleLen;
  xTextCursor.gotoStart(false);
  xTextCursor.gotoEnd(true);
  xTextCursor.setString("");
  xTextDocument.unlockControllers();
  return iScale;
    }   
View Full Code Here

        XText xDocText = m_xDoc.getText();
        XTextCursor xDocTextCursor = xDocText.createTextCursor();
        xDocTextCursor.goRight((short)7, false);
        xDocTextCursor.goRight((short)2, true);
        xDocText.insertTextContent(xDocTextCursor, xMeta, true);
        xDocTextCursor.gotoStart(true);

        XMetadatable xMetadatable = (XMetadatable)
            UnoRuntime.queryInterface(XMetadatable.class, xMeta);
        xMetadatable.setMetadataReference(met1.getXmlId());
        XText xText = (XText) UnoRuntime.queryInterface(XText.class, xMeta);
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.