Package com.sun.star.wizards.common

Examples of com.sun.star.wizards.common.FileAccess


        templates = new Hashtable(3);

        TransformerFactory tf = TransformerFactory.newInstance();

        String workPath = getSettings().workPath;
        FileAccess fa = new FileAccess(xmsf);
        String stylesheetPath = fa.getURL(getSettings().workPath, "layouts/" + cp_FSName);

        String[] files = fa.listFiles(stylesheetPath, false);

        for (int i = 0; i < files.length; i++)
        {
            if (FileAccess.getExtension(files[i]).equals("xsl"))
            {
View Full Code Here


    {
        if (fileAccess == null)
        {
            try
            {
                fileAccess = new FileAccess(xmsf);
            }
            catch (Exception ex)
            {
            }
        }
View Full Code Here

     * @param wwRoot is the root directory of the web wizard files (
     * usually [oo]/share/template/[lang]/wizard/web
     */
    public StylePreview(XMultiServiceFactory xmsf, String wwRoot_) throws Exception
    {
        fileAccess = new FileAccess(xmsf);

        tempDir = createTempDir(xmsf);

        htmlFilename = FileAccess.connectURLs(tempDir, "wwpreview.html");
        cssFilename = FileAccess.connectURLs(tempDir, "style.css");
View Full Code Here

    public void initializePath()
    {
        try
        {
            FileAccess myFA = new FileAccess(xMSF);
            xSaveTextBox.setText(myFA.getPath(sDefaultDirectory + "/" + sDefaultName, null));
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
View Full Code Here

                            SystemDialog myFilePickerDialog = SystemDialog.createStoreDialog(xMSF);
                            myFilePickerDialog.callStoreDialog(sDefaultDirectory, sDefaultName, sDefaultFilter);
                            String sStorePath = myFilePickerDialog.sStorePath;
                            if (sStorePath != null)
                            {
                                FileAccess myFA = new FileAccess(xMSF);
                                xSaveTextBox.setText(myFA.getPath(sStorePath, null));
                                sDefaultDirectory = FileAccess.getParentDir(sStorePath);
                                sDefaultName = myFA.getFilename(sStorePath);
                            }
                            break;
                        default:
                            break;
                    }
View Full Code Here

            ErrorHandler er)
            throws Exception
    {
        this.xmsf = xmsf;
        this.settings = settings;
        fileAccess = new FileAccess(xmsf);
        errorHandler = er;

        ucb = new UCB(xmsf);

        int taskSteps = getTaskSteps();
View Full Code Here

     * @return the FileAccess memeber object.
     */
    private FileAccess getFileAccess() {
        if (fileAccess1 == null)
            try {
                fileAccess1 = new FileAccess(xMSF);
            } catch (Exception e) {
                e.printStackTrace();
            }
        return fileAccess1;
   
View Full Code Here

    public boolean finishWizard() {
        boolean bSaveSuccess = false; // pesimistic :(
        XTextDocument xTextDocument;

        try {
            FileAccess fileAccess = new FileAccess(xMSF);
            sPath = myPathSelection.getSelectedPath();
            if (sPath.equals("")) {
                myPathSelection.triggerPathPicker();
                sPath = myPathSelection.getSelectedPath();
            }
            sPath = fileAccess.getURL(sPath);
   
            //first, if the filename was not changed, thus
            //it is coming from a saved session, check if the
            // file exists and warn the user.
            if (!filenameChanged)
                if (fileAccess.exists(sPath, true)) {
   
                    int answer = SystemDialog.showMessageBox(xMSF, xControl.getPeer(), "MessBox", VclWindowPeerAttribute.YES_NO + VclWindowPeerAttribute.DEF_NO, resources.resFileExists);
                    if (answer == 3) // user said: no, do not overwrite....
                        return false;
                }
View Full Code Here

        sd.addFilter(resources.resImages, "*.jpg;*.jpeg;*.jpe;*.gif", true);
        sd.addFilter(resources.resAllFiles, "*.*", false);

        settings = (CGSettings) set_.root;

        fileAccess = new FileAccess(xmsf);
        il.setListModel(new Model(set_));
        il.setImageSize(new Size(40, 40));
        il.setRenderer(new BGRenderer(0));
        build();

View Full Code Here

    {
        if (fileAccess == null)
        {
            try
            {
                fileAccess = new FileAccess(xMSF);
            }
            catch (Exception ex)
            {
                ex.printStackTrace();
            }
View Full Code Here

TOP

Related Classes of com.sun.star.wizards.common.FileAccess

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.