Package com.sun.star.container

Examples of com.sun.star.container.XNameAccess


        }

    public void removeLayoutTextTables()
        {
            String[] sLayoutTableNames = getLayoutTextTableNames();
            XNameAccess xNameAccessTextTables = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, oTextTableHandler.xTextTablesSupplier.getTextTables());
            XRelativeTextContentRemove xRelativeTextContentRemove = (XRelativeTextContentRemove) UnoRuntime.queryInterface(XRelativeTextContentRemove.class, xText);
            String[] sTableNames = xNameAccessTextTables.getElementNames();
            for (int i = 0; i < sTableNames.length; i++)
            {
                String sTableName = sTableNames[i];
                if (JavaTools.FieldInList(sLayoutTableNames, sTableName) > -1)
                {
View Full Code Here


    public void setLayoutSectionsVisible(boolean _IsVisible)
        {
            try
            {
                XNameAccess xTextSections = oTextSectionHandler.xTextSectionsSupplier.getTextSections();
                Object oTextSection;
                int GroupFieldCount = CurDBMetaData.GroupFieldNames.length;
                for (int i = 0; i < GroupFieldCount; i++)
                {
                    oTextSection = xTextSections.getByName(GROUPSECTION + String.valueOf(i + 1));
                    Helper.setUnoPropertyValue(oTextSection, "IsVisible", new Boolean(_IsVisible));
                }
                if (xTextSections.hasByName(RECORDSECTION))
                {
                    oTextSection = xTextSections.getByName(RECORDSECTION);
                    Helper.setUnoPropertyValue(oTextSection, "IsVisible", new Boolean(_IsVisible));
                }
            }
            catch (Exception exception)
            {
View Full Code Here

            XMultiServiceFactory oDocMSF =  (XMultiServiceFactory) Param.getMSF();

            XInterface FDs = (XInterface)oDocMSF.
                    createInstance("com.sun.star.sheet.FunctionDescriptions");
            XNameAccess NA = (XNameAccess)UnoRuntime.queryInterface
                (XNameAccess.class, FDs);

            String names[] = NA.getElementNames();
            Random rnd = new Random();
            int idx = rnd.nextInt(names.length);

            oObj = (XInterface)NA.getByName(names[idx]);

            log.println("Creating object - " +
                                        ((oObj == null) ? "FAILED" : "OK"));

        } catch (Exception e) {
View Full Code Here

        log.println("Creating a test environment");

        XSpreadsheets oSpreadsheets = ((XSpreadsheetDocument) UnoRuntime.queryInterface(
                                               XSpreadsheetDocument.class,
                                               xSheetDoc)).getSheets();
        XNameAccess oNames = (XNameAccess) UnoRuntime.queryInterface(
                                     XNameAccess.class, oSpreadsheets);

        XSpreadsheet oSheet = null;

        try {
            oSheet = (XSpreadsheet) AnyConverter.toObject(
                             new Type(XSpreadsheet.class),
                             oNames.getByName(oNames.getElementNames()[0]));

            oObj = oSheet.getCellRangeByPosition(0, 0, 3, 4);
            testRange = (XCellRange) UnoRuntime.queryInterface(
                                XCellRange.class, oObj);
        } catch (com.sun.star.lang.WrappedTargetException e) {
View Full Code Here

                boolean bgetConnection;
                String sQueryName = "";
                if (oDBForm != null)
                {
                    String sMsg = sMsgHiddenControlMissing + (char) 13 + sMsgEndAutopilot;
                    XNameAccess xNamedForm = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, oDBForm);
                    getRecordParser().Command = getDoc().oFormHandler.getValueofHiddenControl(xNamedForm, "Command", sMsg);
                    String sCommandType = getDoc().oFormHandler.getValueofHiddenControl(xNamedForm, "CommandType", sMsg);
                    String sGroupFieldNames = getDoc().oFormHandler.getValueofHiddenControl(xNamedForm, "GroupFieldNames", sMsg);
                    String sFieldNames = getDoc().oFormHandler.getValueofHiddenControl(xNamedForm, "FieldNames", sMsg);
                    String sRecordFieldNames = getDoc().oFormHandler.getValueofHiddenControl(xNamedForm, "RecordFieldNames", sMsg);
                    if (xNamedForm.hasByName("QueryName"))
                    {
                        sQueryName = getDoc().oFormHandler.getValueofHiddenControl(xNamedForm, "QueryName", sMsg);
                    }
                    String[] sFieldNameList =  JavaTools.ArrayoutofString(sFieldNames, ";");
                    String[] sNewList = JavaTools.ArrayoutofString(sRecordFieldNames, ";");
View Full Code Here

        // first we write what we are intend to do to log file
        log.println("creating a test environment");

        XSpreadsheet xSpreadsheet = null;
        XSpreadsheets xSpreadsheets = (XSpreadsheets)xSheetDoc.getSheets();
        XNameAccess oNames = (XNameAccess)
            UnoRuntime.queryInterface( XNameAccess.class, xSpreadsheets );
        try {
            xSpreadsheet = (XSpreadsheet) AnyConverter.toObject(
                new Type(XSpreadsheet.class),
                    oNames.getByName(oNames.getElementNames()[0]));

            XColumnRowRange oColumnRowRange = (XColumnRowRange)
                UnoRuntime.queryInterface(XColumnRowRange.class, xSpreadsheet);
            XTableRows oRows = (XTableRows) oColumnRowRange.getRows();
            XIndexAccess oIndexAccess = (XIndexAccess)
View Full Code Here

    public void test(){
        mThreadTimeOut = 10000000;
        XDataSource ds = null;
        System.gc();
        try {
            XNameAccess xNameAccess = (XNameAccess)UnoRuntime.queryInterface(XNameAccess.class,((XMultiServiceFactory)param.getMSF()).createInstance("com.sun.star.sdb.DatabaseContext"));
            ds = (XDataSource)UnoRuntime.queryInterface(XDataSource.class,xNameAccess.getByName("file:///g:/test.odb"));
        } catch(Exception ex) {
                throw new RuntimeException("factory: unable to construct data source" );
        }
       
        try{
View Full Code Here

        tRes.tested("getTextFields()", xEnum != null);
    }
   
    public void _getTextFieldMasters() {
        if (mbCreateFieldMaster) {
            XNameAccess xName = oObj.getTextFieldMasters();
            util.dbg.printInterfaces(xName);
            tRes.tested("getTextFieldMasters()", xName != null);
        }
        else {
            log.println("Could not test 'getTextFieldMasters' because no field masters can be created on this object.");
View Full Code Here

     * Has <b>OK</b> status if the object exists.
     */
    public void _getGraphicObjects() {
        boolean res = false;

        XNameAccess the_graphics = oObj.getGraphicObjects();
        res = the_graphics.hasByName("SwXTextDocument");

        tRes.tested("getGraphicObjects()",res);
    }
View Full Code Here

     * Test calls the method. <p>
     * Has <b> OK </b> status if the method returns not
     * <code>null</code> value.
     */
    public void _getBookmarks() {
        XNameAccess bookmarks = oObj.getBookmarks();
        tRes.tested("getBookmarks()",bookmarks != null);
    }
View Full Code Here

TOP

Related Classes of com.sun.star.container.XNameAccess

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.