Examples of XFileIdentifierConverter


Examples of com.sun.star.ucb.XFileIdentifierConverter

        loadProperties.putAll(inputFormat.getImportOptions());

        Map/*<String,Object>*/ storeProperties = outputFormat.getExportOptions(inputFormat.getFamily());

        synchronized (openOfficeConnection) {
      XFileIdentifierConverter fileContentProvider = openOfficeConnection.getFileContentProvider();
      String inputUrl = fileContentProvider.getFileURLFromSystemPath("", inputFile.getAbsolutePath());
      String outputUrl = fileContentProvider.getFileURLFromSystemPath("", outputFile.getAbsolutePath());
           
      try {
        loadAndExport(inputUrl, loadProperties, outputUrl, storeProperties);
            } catch (OpenOfficeException openOfficeException) {
                throw openOfficeException;
View Full Code Here

Examples of com.sun.star.ucb.XFileIdentifierConverter

            XPropertySet xPropertySet = (XPropertySet) com.sun.star.uno.UnoRuntime.queryInterface(XPropertySet.class, oPathSettings);
            String sWorkUrl = (String) xPropertySet.getPropertyValue("Work");
           
            // convert the Url to a system path that is "human readable"...
            Object oFCProvider = m_xMCF.createInstanceWithContext("com.sun.star.ucb.FileContentProvider", m_xContext);
            XFileIdentifierConverter xFileIdentifierConverter = (XFileIdentifierConverter) UnoRuntime.queryInterface(XFileIdentifierConverter.class, oFCProvider);
            String sSystemWorkPath = xFileIdentifierConverter.getSystemPathFromFileURL(sWorkUrl);
           
            // create a controlmodel at the multiservicefactory of the dialog model...
            Object oFCModel = m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlFileControlModel");
           
            // Set the properties at the model - keep in mind to pass the property names in alphabetical order!
View Full Code Here

Examples of com.sun.star.ucb.XFileIdentifierConverter

    public XGraphic getGraphic(XMultiComponentFactory _xMCF, String _sImageSystemPath){
        XGraphic xGraphic = null;
        try{
            java.io.File oFile = new java.io.File(_sImageSystemPath);
            Object oFCProvider = _xMCF.createInstanceWithContext("com.sun.star.ucb.FileContentProvider", this.m_xContext);
            XFileIdentifierConverter xFileIdentifierConverter = (XFileIdentifierConverter) UnoRuntime.queryInterface(XFileIdentifierConverter.class, oFCProvider);
            String sImageUrl = xFileIdentifierConverter.getFileURLFromSystemPath(_sImageSystemPath, oFile.getAbsolutePath());
           
            // create a GraphicProvider at the global service manager...
            Object oGraphicProvider = m_xMCF.createInstanceWithContext("com.sun.star.graphic.GraphicProvider", m_xContext);
            XGraphicProvider xGraphicProvider = (XGraphicProvider) UnoRuntime.queryInterface(XGraphicProvider.class, oGraphicProvider);
            // create the graphic object
View Full Code Here

Examples of com.sun.star.ucb.XFileIdentifierConverter

            XPropertySet xPropertySet = (XPropertySet) com.sun.star.uno.UnoRuntime.queryInterface(XPropertySet.class, oPathSettings);
            String sWorkUrl = (String) xPropertySet.getPropertyValue("Work");
           
            // convert the Url to a system path that is "human readable"...
            Object oFCProvider = m_xMCF.createInstanceWithContext("com.sun.star.ucb.FileContentProvider", m_xContext);
            XFileIdentifierConverter xFileIdentifierConverter = (XFileIdentifierConverter) UnoRuntime.queryInterface(XFileIdentifierConverter.class, oFCProvider);
            String sSystemWorkPath = xFileIdentifierConverter.getSystemPathFromFileURL(sWorkUrl);
           
            // create a controlmodel at the multiservicefactory of the dialog model...
            Object oFCModel = m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlFileControlModel");
           
            // Set the properties at the model - keep in mind to pass the property names in alphabetical order!
View Full Code Here

Examples of com.sun.star.ucb.XFileIdentifierConverter

    public XGraphic getGraphic(XMultiComponentFactory _xMCF, String _sImageSystemPath){
        XGraphic xGraphic = null;
        try{
            java.io.File oFile = new java.io.File(_sImageSystemPath);
            Object oFCProvider = _xMCF.createInstanceWithContext("com.sun.star.ucb.FileContentProvider", this.m_xContext);
            XFileIdentifierConverter xFileIdentifierConverter = (XFileIdentifierConverter) UnoRuntime.queryInterface(XFileIdentifierConverter.class, oFCProvider);
            String sImageUrl = xFileIdentifierConverter.getFileURLFromSystemPath(_sImageSystemPath, oFile.getAbsolutePath());
           
            // create a GraphicProvider at the global service manager...
            Object oGraphicProvider = m_xMCF.createInstanceWithContext("com.sun.star.graphic.GraphicProvider", m_xContext);
            XGraphicProvider xGraphicProvider = (XGraphicProvider) UnoRuntime.queryInterface(XGraphicProvider.class, oGraphicProvider);
            // create the graphic object
View Full Code Here

Examples of com.sun.star.ucb.XFileIdentifierConverter

            XPropertySet xPropertySet = (XPropertySet) com.sun.star.uno.UnoRuntime.queryInterface(XPropertySet.class, oPathSettings);
            String sWorkUrl = (String) xPropertySet.getPropertyValue("Work");
           
            // convert the Url to a system path that is "human readable"...
            Object oFCProvider = m_xMCF.createInstanceWithContext("com.sun.star.ucb.FileContentProvider", m_xContext);
            XFileIdentifierConverter xFileIdentifierConverter = (XFileIdentifierConverter) UnoRuntime.queryInterface(XFileIdentifierConverter.class, oFCProvider);
            String sSystemWorkPath = xFileIdentifierConverter.getSystemPathFromFileURL(sWorkUrl);
           
            // create a controlmodel at the multiservicefactory of the dialog model...
            Object oFCModel = m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlFileControlModel");
           
            // Set the properties at the model - keep in mind to pass the property names in alphabetical order!
View Full Code Here

Examples of com.sun.star.ucb.XFileIdentifierConverter

    public XGraphic getGraphic(XMultiComponentFactory _xMCF, String _sImageSystemPath){
        XGraphic xGraphic = null;
        try{
            java.io.File oFile = new java.io.File(_sImageSystemPath);
            Object oFCProvider = _xMCF.createInstanceWithContext("com.sun.star.ucb.FileContentProvider", this.m_xContext);
            XFileIdentifierConverter xFileIdentifierConverter = (XFileIdentifierConverter) UnoRuntime.queryInterface(XFileIdentifierConverter.class, oFCProvider);
            String sImageUrl = xFileIdentifierConverter.getFileURLFromSystemPath(_sImageSystemPath, oFile.getAbsolutePath());
           
            // create a GraphicProvider at the global service manager...
            Object oGraphicProvider = m_xMCF.createInstanceWithContext("com.sun.star.graphic.GraphicProvider", m_xContext);
            XGraphicProvider xGraphicProvider = (XGraphicProvider) UnoRuntime.queryInterface(XGraphicProvider.class, oGraphicProvider);
            // create the graphic object
View Full Code Here

Examples of com.sun.star.ucb.XFileIdentifierConverter

            XPropertySet xPropertySet = (XPropertySet) com.sun.star.uno.UnoRuntime.queryInterface(XPropertySet.class, oPathSettings);
            String sWorkUrl = (String) xPropertySet.getPropertyValue("Work");
           
            // convert the Url to a system path that is "human readable"...
            Object oFCProvider = m_xMCF.createInstanceWithContext("com.sun.star.ucb.FileContentProvider", m_xContext);
            XFileIdentifierConverter xFileIdentifierConverter = (XFileIdentifierConverter) UnoRuntime.queryInterface(XFileIdentifierConverter.class, oFCProvider);
            String sSystemWorkPath = xFileIdentifierConverter.getSystemPathFromFileURL(sWorkUrl);
           
            // create a controlmodel at the multiservicefactory of the dialog model...
            Object oFCModel = m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlFileControlModel");
           
            // Set the properties at the model - keep in mind to pass the property names in alphabetical order!
View Full Code Here

Examples of com.sun.star.ucb.XFileIdentifierConverter

    public XGraphic getGraphic(XMultiComponentFactory _xMCF, String _sImageSystemPath){
        XGraphic xGraphic = null;
        try{
            java.io.File oFile = new java.io.File(_sImageSystemPath);
            Object oFCProvider = _xMCF.createInstanceWithContext("com.sun.star.ucb.FileContentProvider", this.m_xContext);
            XFileIdentifierConverter xFileIdentifierConverter = (XFileIdentifierConverter) UnoRuntime.queryInterface(XFileIdentifierConverter.class, oFCProvider);
            String sImageUrl = xFileIdentifierConverter.getFileURLFromSystemPath(_sImageSystemPath, oFile.getAbsolutePath());
           
            // create a GraphicProvider at the global service manager...
            Object oGraphicProvider = m_xMCF.createInstanceWithContext("com.sun.star.graphic.GraphicProvider", m_xContext);
            XGraphicProvider xGraphicProvider = (XGraphicProvider) UnoRuntime.queryInterface(XGraphicProvider.class, oGraphicProvider);
            // create the graphic object
View Full Code Here

Examples of com.sun.star.ucb.XFileIdentifierConverter


    public static String convertfromURLNotation(XMultiServiceFactory xmsf, String URLPath){   
  try {
    Object fcv = xmsf.createInstance("com.sun.star.ucb.FileContentProvider");
    XFileIdentifierConverter filenameConverter =
      (XFileIdentifierConverter) UnoRuntime.queryInterface(
      XFileIdentifierConverter.class,fcv);
    return filenameConverter.getSystemPathFromFileURL(URLPath);
  }
  catch (Exception ex) {
    ex.printStackTrace();
    return null;
  }   
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.