Search in sources :

Example 6 with ConvertedFiles

use of com.herewhite.sdk.domain.ConvertedFiles in project whiteboard-android by netless-io.

the class Converter method getPpt.

private ConvertedFiles getPpt(ConversionInfo info, ConvertType type) {
    int fileLength = info.getConvertedFileList().length;
    String[] sliderURLs = new String[fileLength];
    Scene[] scenes = new Scene[fileLength];
    ConvertedFiles files = new ConvertedFiles();
    files.setTaskId(taskId);
    files.setType(convertType(type));
    for (int i = 0; i < fileLength; i++) {
        PptPage pptPage = info.getConvertedFileList()[i];
        pptPage.setSrc(info.getPrefix() + pptPage.getSrc());
        sliderURLs[i] = pptPage.getSrc();
        scenes[i] = new Scene(String.valueOf(i + 1), pptPage);
    }
    files.setSlideURLs(sliderURLs);
    files.setScenes(scenes);
    return files;
}
Also used : ConvertedFiles(com.herewhite.sdk.domain.ConvertedFiles) PptPage(com.herewhite.sdk.domain.PptPage) Scene(com.herewhite.sdk.domain.Scene)

Example 7 with ConvertedFiles

use of com.herewhite.sdk.domain.ConvertedFiles in project whiteboard-android by netless-io.

the class ConverterV5 method getPpt.

private ConvertedFiles getPpt(ConversionInfo info, ConvertType type) {
    int length = info.getConvertedFileList().length;
    String[] sliderURLs = new String[length];
    Scene[] scenes = new Scene[length];
    for (int i = 0; i < length; i++) {
        PptPage pptPage = info.getConvertedFileList()[i];
        sliderURLs[i] = pptPage.getSrc();
        scenes[i] = new Scene(String.valueOf(i + 1), pptPage);
    }
    ConvertedFiles files = new ConvertedFiles();
    files.setTaskId(taskUuid);
    files.setType(type);
    files.setSlideURLs(sliderURLs);
    files.setScenes(scenes);
    return files;
}
Also used : ConvertedFiles(com.herewhite.sdk.domain.ConvertedFiles) PptPage(com.herewhite.sdk.domain.PptPage) Scene(com.herewhite.sdk.domain.Scene)

Aggregations

ConvertedFiles (com.herewhite.sdk.domain.ConvertedFiles)7 ConverterCallbacks (com.herewhite.sdk.ConverterCallbacks)5 ConversionInfo (com.herewhite.sdk.domain.ConversionInfo)5 ConvertException (com.herewhite.sdk.domain.ConvertException)5 Converter (com.herewhite.sdk.Converter)4 MapBuilder (com.herewhite.demo.utils.MapBuilder)3 ConverterV5 (com.herewhite.sdk.converter.ConverterV5)3 PptPage (com.herewhite.sdk.domain.PptPage)2 Scene (com.herewhite.sdk.domain.Scene)2