if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { Window window = getWindow(); Slide slide = new Slide(); slide.setInterpolator(new LinearInterpolator()); slide.setSlideEdge(Gravity.LEFT); slide.excludeTarget(android.R.id.statusBarBackground, true); slide.excludeTarget(android.R.id.navigationBarBackground, true); window.setExitTransition(slide); // The Transition to use to move Views out of the scene when calling a new Activity. window.setReenterTransition(slide); // The Transition to use to move Views into the scene when reentering from a previously-started Activity. window.setBackgroundDrawable(new ColorDrawable(Color.BLACK)); }
private void extractMacros(HSLFSlideShow ppt, XHTMLContentHandler xhtml) { //get macro persist id DocInfoListContainer list = (DocInfoListContainer)ppt.getDocumentRecord().findFirstOfType(RecordTypes.List.typeID); if (list == null) { return; } VBAInfoContainer vbaInfo = (VBAInfoContainer)list.findFirstOfType(RecordTypes.VBAInfo.typeID); if (vbaInfo == null) { return; } VBAInfoAtom vbaAtom = (VBAInfoAtom)vbaInfo.findFirstOfType(RecordTypes.VBAInfoAtom.typeID); if (vbaAtom == null) { return; } long persistId = vbaAtom.getPersistIdRef(); for (HSLFObjectData objData : ppt.getEmbeddedObjects()) { if (objData.getExOleObjStg().getPersistId() == persistId) { try (POIFSFileSystem poifsFileSystem = new POIFSFileSystem(objData.getInputStream())) { try { OfficeParser.extractMacros(poifsFileSystem, xhtml, EmbeddedDocumentUtil.getEmbeddedDocumentExtractor(context)); } catch (IOException|SAXException inner) { EmbeddedDocumentUtil.recordException(inner, parentMetadata); } } catch (IOException e) { EmbeddedDocumentUtil.recordEmbeddedStreamException(e, parentMetadata);//swallow } } } }
@Override public void linkToUrl(String url) { InteractiveInfoAtom iia = info.getInteractiveInfoAtom(); iia.setAction(InteractiveInfoAtom.ACTION_HYPERLINK); iia.setJump(InteractiveInfoAtom.JUMP_NONE); iia.setHyperlinkType(InteractiveInfoAtom.LINK_Url); exHyper.setLinkURL(url); exHyper.setLinkTitle(url); exHyper.setLinkOptions(0x10); }
int addToObjListAtom(RecordContainer exObj) { ExObjList lst = getDocumentRecord().getExObjList(true); ExObjListAtom objAtom = lst.getExObjListAtom(); // increment the object ID seed int objectId = (int) objAtom.getObjectIDSeed() + 1; objAtom.setObjectIDSeed(objectId); lst.addChildAfter(exObj, objAtom); return objectId; }
/** * Insert a {@link CString} record that stores the user's date. * * @return the created {@link CString} record that stores the user's date. */ public CString addUserDateAtom(){ if(csDate != null) return csDate; csDate = new CString(); csDate.setOptions(USERDATEATOM << 4); addChildAfter(csDate, hdAtom); return csDate; }
/** * Change the current page size * * @param pgsize * page size (in points) */ public void setPageSize(Dimension pgsize) { DocumentAtom docatom = _documentRecord.getDocumentAtom(); docatom.setSlideSizeX(pgsize.width * Shape.MASTER_DPI / Shape.POINT_DPI); docatom.setSlideSizeY(pgsize.height * Shape.MASTER_DPI / Shape.POINT_DPI); }
/** * Add a font in this presentation * * @param fontInfo the font to add * @return the registered HSLFFontInfo - the font info object is unique based on the typeface */ public HSLFFontInfo addFont(FontInfo fontInfo) { return getDocumentRecord().getEnvironment().getFontCollection().addFont(fontInfo); }
/** * Get a font by index * * @param idx * 0-based index of the font * @return of an instance of <code>PPFont</code> or <code>null</code> if not * found */ public HSLFFontInfo getFont(int idx) { return getDocumentRecord().getEnvironment().getFontCollection().getFontInfo(idx); }
/** * An integer that specifies the format ID to be used to style the datetime. * * @return an integer that specifies the format ID to be used to style the datetime. */ public int getDateTimeFormat(){ return _container.getHeadersFootersAtom().getFormatId(); }
/** * An integer that specifies the format ID to be used to style the datetime. * * @param formatId an integer that specifies the format ID to be used to style the datetime. */ public void setDateTimeFormat(int formatId){ _container.getHeadersFootersAtom().setFormatId(formatId); }
public void setMenuName(final String menuName) { this.menuName = safeCString(this.menuName, 0x1); this.menuName.setText(menuName); }
/** * Get the number of characters covered by this records * * @return the number of characters covered by this records */ public int getCharactersCovered(){ int covered = 0; for (TextSpecInfoRun r : getTextSpecInfoRuns()) { covered += r.getLength(); } return covered; }
@Override public Date getDate() { return _comment2000.getComment2000Atom().getDate(); }
@Override public void setDate(Date date) { _comment2000.getComment2000Atom().setDate(date); }
@Override public void linkToEmail(String emailAddress) { InteractiveInfoAtom iia = info.getInteractiveInfoAtom(); iia.setAction(InteractiveInfoAtom.ACTION_HYPERLINK); iia.setJump(InteractiveInfoAtom.JUMP_NONE); iia.setHyperlinkType(InteractiveInfoAtom.LINK_Url); exHyper.setLinkURL("mailto:"+emailAddress); exHyper.setLinkTitle(emailAddress); exHyper.setLinkOptions(0x10); }
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { Window window = getWindow(); Slide slide = new Slide(); slide.setInterpolator(new LinearInterpolator()); slide.setSlideEdge(Gravity.RIGHT); slide.excludeTarget(android.R.id.statusBarBackground, true); slide.excludeTarget(android.R.id.navigationBarBackground, true); window.setEnterTransition(slide); // The Transition to use to move Views into the initial Scene. window.setReturnTransition(slide); // The Transition to use to move Views out of the Scene when the Window is preparing to close. window.setBackgroundDrawable(new ColorDrawable(Color.BLACK)); }
/** * Insert a {@link CString} record that stores the user's date. * * @return the created {@link CString} record that stores the user's date. */ public CString addUserDateAtom(){ if(csDate != null) return csDate; csDate = new CString(); csDate.setOptions(USERDATEATOM << 4); addChildAfter(csDate, hdAtom); return csDate; }
/** * An integer that specifies the format ID to be used to style the datetime. * * @return an integer that specifies the format ID to be used to style the datetime. */ public int getDateTimeFormat(){ return _container.getHeadersFootersAtom().getFormatId(); }
public void setClipboardName(final String clipboardName) { this.clipboardName = safeCString(this.clipboardName, 0x3); this.clipboardName.setText(clipboardName); }