def getTransferDataFlavors(self): df_rdf = DataFlavor() df_rdf.MimeType = self._rdf_type df_rdf.HumanPresentableName = "" #df_rdf.DataType = uno.getTypeByName("[]byte") df_rdf.DataType = uno.getTypeByName("string") df_img = DataFlavor() df_img.MimeType = self._img_type df_img.HumanPresentableName = "" df_img.DataType = uno.getTypeByName("[]byte") return (df_rdf, df_img)
def getTransferDataFlavors(self): flavor = DataFlavor() transferable = self.transferable[0] if transferable == "body": if self._getDocumentUserProperty("SendAsHtml"): flavor.MimeType = "text/html;charset=utf-8" flavor.HumanPresentableName = "HTML-Documents" else: flavor.MimeType = "text/plain;charset=utf-16" flavor.HumanPresentableName = "Unicode text" else: type = self._getAttachmentType(transferable) flavor.MimeType = type flavor.HumanPresentableName = type return (flavor,)
def getTransferDataFlavors(self): return DataFlavor(MimeType=self.unicode_content_type, HumanPresentableName="Unicode Text"),
def __init__(self, text): df = DataFlavor() df.MimeType = CLIPBOARD_FORMAT_TEXT df.HumanPresentableName = "encoded text utf-16" self.flavors = [df] self.data = [text]
def __init__(self, text): df = DataFlavor() df.MimeType = "text/plain;charset=utf-16" df.HumanPresentableName = "encoded text utf-16" self.flavors = [df] self.data = [text] #[text.encode('ascii')]