Package com.sun.star.container

Examples of com.sun.star.container.XNameAccess


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

        XNameAccess oStyleFamilyNameAccess = null;
        // create testobject here
        log.println("getting style");
        XStyleFamiliesSupplier oStyleFamiliesSupplier = (XStyleFamiliesSupplier)
            UnoRuntime.queryInterface(
                XStyleFamiliesSupplier.class, xSpreadsheetDoc);

        XNameAccess oStyleFamilies = oStyleFamiliesSupplier.getStyleFamilies();
        XIndexAccess oStyleFamiliesIndexAccess = (XIndexAccess)
            UnoRuntime.queryInterface(XIndexAccess.class, oStyleFamilies);
        try {
            oStyleFamilyNameAccess = (XNameAccess) AnyConverter.toObject(
                new Type(XNameAccess.class),
View Full Code Here


            log.println("Getting test object ") ;

            // Getting named ranges.
            XPropertySet docProps = (XPropertySet)
                UnoRuntime.queryInterface(XPropertySet.class, xSheetDoc);
            XNameAccess links = (XNameAccess) AnyConverter.toObject(
                new Type(XNameAccess.class), UnoRuntime.queryInterface(
                    XNameAccess.class, docProps.getPropertyValue("DDELinks")));

            String[] linkNames = links.getElementNames();

            oObj = (XInterface) AnyConverter.toObject(
                new Type(XInterface.class),links.getByName(linkNames[0]));
            log.println("Creating object - " +
                                        ((oObj == null) ? "FAILED" : "OK"));
        } catch (com.sun.star.lang.WrappedTargetException e) {
            e.printStackTrace(log) ;
            throw new StatusException(
View Full Code Here

     */
    protected TestEnvironment createTestEnvironment(TestParameters tParam, PrintWriter log) {

        XInterface oObj = null;
        XPropertySet PropSet;
        XNameAccess PageStyles = null;
        XStyle StdStyle = null;

        XStyleFamiliesSupplier StyleFam = (XStyleFamiliesSupplier)
            UnoRuntime.queryInterface(XStyleFamiliesSupplier.class,
            xSpreadsheetDoc );

        XNameAccess StyleFamNames = StyleFam.getStyleFamilies();
        try{
            PageStyles = (XNameAccess) AnyConverter.toObject(
                new Type(XNameAccess.class),StyleFamNames.getByName("PageStyles"));
            StdStyle = (XStyle) AnyConverter.toObject(
                        new Type(XStyle.class),PageStyles.getByName("Default"));
        } catch(com.sun.star.lang.WrappedTargetException e){
            e.printStackTrace(log);
            throw new StatusException("Couldn't get by name", e);
View Full Code Here

            ex.printStackTrace(log);
            throw new StatusException("could not insert '"+myGroupName+"' into container",ex);
        }
       
       
        XNameAccess oContNames = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, oContainer);
       
        if (Param.getBool(util.PropertyName.DEBUG_IS_ACTIVE)){
            String contNames[] = oContNames.getElementNames();
            for (int i =0; i < contNames.length; i++){
                log.println("ContainerNames[ "+ i + "]: " + contNames[i]);
            }
        }
       
        try{
            oObj = (XInterface) AnyConverter.toObject(new Type(XInterface.class),oContNames.getByName(myGroupName));
        } catch (com.sun.star.uno.Exception e) {
            e.printStackTrace(log);
            throw new StatusException("Couldn't get AutoTextGroup '"+myGroupName + "'", e);
        }
       
View Full Code Here

        {
            try
            {
                this.oTextTableHandler = _oTextTableHandler;
                String[] TableNames = oTextTableHandler.xTextTablesSupplier.getTextTables().getElementNames();
                XNameAccess xAllTextTables = oTextTableHandler.xTextTablesSupplier.getTextTables();
                if ((xAllTextTables.hasByName(ReportTextDocument.TBLRECORDSECTION)) || (xAllTextTables.hasByName(ReportTextDocument.COPYOFTBLRECORDSECTION)))
                {
                    Object oTable;
                    if (xAllTextTables.hasByName(ReportTextDocument.COPYOFTBLRECORDSECTION))
                    {
                        oTable = xAllTextTables.getByName(ReportTextDocument.COPYOFTBLRECORDSECTION);
                    }
                    else
                    {
                        oTable = xAllTextTables.getByName(ReportTextDocument.TBLRECORDSECTION);
                    }
                    xTextTable = (XTextTable) UnoRuntime.queryInterface(XTextTable.class, oTable);
                    xTableName = (XNamed) UnoRuntime.queryInterface(XNamed.class, xTextTable);
                }
                else
View Full Code Here

    public boolean checkReportLayoutMode( String[] GroupFieldNames)
        {
            try
            {
                XNameAccess xTextSections = oTextSectionHandler.xTextSectionsSupplier.getTextSections();
                Object oTextSection;
                if (GroupFieldNames.length > 0)
                {
                    oTextSection = xTextSections.getByName(GROUPSECTION + String.valueOf(1));
                }
                else
                {
                    oTextSection = xTextSections.getByName(RECORDSECTION);
                }
                boolean bLayoutMode = AnyConverter.toBoolean(Helper.getUnoPropertyValue(oTextSection, "IsVisible"));
                return bLayoutMode;
            }
            catch( Exception exception )
View Full Code Here


    public void createReportForm(String SOREPORTFORMNAME)
        {
            com.sun.star.container.XNameContainer xNamedForm = oFormHandler.insertFormbyName(SOREPORTFORMNAME);
            XNameAccess xNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, xNamedForm);
            oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, "CommandType", new String(Integer.toString(CurDBMetaData.getCommandType())));
            if (CurDBMetaData.getCommandType() == CommandType.QUERY)
            {
                oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, "QueryName", CurDBMetaData.getCommandName());
                // oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, "Command", "");
View Full Code Here

    public void updateTextSections(String[] SelGroupNames) throws Exception
        {
            String TableName;
            DBColumn OldDBColumn;
            DBColumn CurDBColumn;
            XNameAccess xTableNames = oTextTableHandler.xTextTablesSupplier.getTextTables();
            int GroupFieldCount = SelGroupNames.length;
            for (int i = 0; i < GroupFieldCount; i++)
            {
                TableName = TBLGROUPSECTION + Integer.toString(i + 1);
                OldDBColumn = (DBColumn) DBColumnsVector.get(i);
View Full Code Here

            sInvisibleSectionNames[0] = RECORDSECTION;
            for (int i = 1; i <= GroupCount; i++)
            {
                sInvisibleSectionNames[i] = GROUPSECTION + i;
            }
            XNameAccess xNameAccessTextSections = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, oTextSectionHandler.xTextSectionsSupplier.getTextSections());
            String[] sSectionNames = xNameAccessTextSections.getElementNames();
            for (int i = 0; i < sSectionNames.length; i++)
            {
                String sSectionName = sSectionNames[i];
                if (JavaTools.FieldInList(sInvisibleSectionNames, sSectionName) < 0)
                {
View Full Code Here


    public void removeNonLayoutTextTables()
        {
            String[] sLayoutTableNames = getLayoutTextTableNames();
            XNameAccess xNameAccessTextTables = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, oTextTableHandler.xTextTablesSupplier.getTextTables());
            String[] sTableNames = xNameAccessTextTables.getElementNames();
            for (int i = 0; i < sTableNames.length; i++)
            {
                String sTableName = sTableNames[i];
                if (JavaTools.FieldInList(sLayoutTableNames, sTableName) < 0)
                {
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.