1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <sal/config.h>
22 #include <tools/debug.hxx>
23 #include <tools/globname.hxx>
24 #include <sot/exchange.hxx>
25 #include <sot/formats.hxx>
26 #include <comphelper/classids.hxx>
27 #include <com/sun/star/datatransfer/DataFlavor.hpp>
28 #include <comphelper/documentconstants.hxx>
33 using namespace::com::sun::star::uno
;
34 using namespace::com::sun::star::datatransfer
;
39 * These tables contain all MimeTypes, format identifiers, and types used in
40 * the Office. The table is sorted by the format string ID, and each ID is
41 * exactly 1 greater than its predecessor ID, so that the ID can be used as a
44 struct DataFlavorRepresentation
48 const css::uno::Type
* pType
;
51 const DataFlavorRepresentation
* FormatArray_Impl()
53 static const DataFlavorRepresentation aInstance
[] =
55 /* 0 SOT_FORMAT_SYSTEM_START*/ { "", "", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
56 /* 1 SotClipboardFormatId::STRING*/ { "text/plain;charset=utf-16", "Text", &cppu::UnoType
<OUString
>::get()},
57 /* 2 SotClipboardFormatId::BITMAP*/ { "application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"", "Bitmap", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
58 /* 3 SotClipboardFormatId::GDIMETAFILE*/ { "application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\"", "GDIMetaFile", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
59 /* 4 SotClipboardFormatId::PRIVATE*/ { "application/x-openoffice-private;windows_formatname=\"Private\"", "Private", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
60 /* 5 SotClipboardFormatId::SIMPLE_FILE*/ { "application/x-openoffice-file;windows_formatname=\"FileNameW\"", "FileName", &cppu::UnoType
<OUString
>::get() },
61 /* 6 SotClipboardFormatId::FILE_LIST*/ { "application/x-openoffice-filelist;windows_formatname=\"FileList\"", "FileList", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
62 /* 7 EMPTY*/ { "", "", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
63 /* 8 EMPTY*/ { "", "", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
64 /* 9 EMPTY*/ { "", "", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
65 /* 10 SotClipboardFormatId::RTF*/ { "text/rtf", "Rich Text Format", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
66 /* 11 SotClipboardFormatId::DRAWING*/ { "application/x-openoffice-drawing;windows_formatname=\"Drawing Format\"", "Drawing Format", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
67 /* 12 SotClipboardFormatId::SVXB*/ { "application/x-openoffice-svxb;windows_formatname=\"SVXB (StarView Bitmap/Animation)\"", "SVXB (StarView Bitmap/Animation)", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
68 /* 13 SotClipboardFormatId::SVIM*/ { "application/x-openoffice-svim;windows_formatname=\"SVIM (StarView ImageMap)\"", "SVIM (StarView ImageMap)", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
69 /* 14 SotClipboardFormatId::XFA*/ { "application/x-libreoffice-xfa;windows_formatname=\"XFA (XOutDev FillAttr Any)\"", "XFA (XOutDev FillAttr Any)", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
70 /* 15 SotClipboardFormatId::EDITENGINE_ODF_TEXT_FLAT*/ { "application/vnd.oasis.opendocument.text-flat-xml", "Flat XML format (EditEngine ODF)", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
71 /* 16 SotClipboardFormatId::INTERNALLINK_STATE*/ { "application/x-openoffice-internallink-state;windows_formatname=\"StatusInfo vom SvxInternalLink\"", "StatusInfo vom SvxInternalLink", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
72 /* 17 SotClipboardFormatId::SOLK*/ { "application/x-openoffice-solk;windows_formatname=\"SOLK (StarOffice Link)\"", "SOLK (StarOffice Link)", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
73 /* 18 SotClipboardFormatId::NETSCAPE_BOOKMARK*/ { "application/x-openoffice-netscape-bookmark;windows_formatname=\"Netscape Bookmark\"", "Netscape Bookmark", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
74 /* 19 SotClipboardFormatId::TREELISTBOX*/ { "application/x-openoffice-treelistbox;windows_formatname=\"SV_LBOX_DD_FORMAT\"", "SV_LBOX_DD_FORMAT", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
75 /* 20 SotClipboardFormatId::NATIVE*/ { "application/x-openoffice-native;windows_formatname=\"Native\"", "Native", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
76 /* 21 SotClipboardFormatId::OWNERLINK*/ { "application/x-openoffice-ownerlink;windows_formatname=\"OwnerLink\"", "OwnerLink", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
77 /* 22 SotClipboardFormatId::STARSERVER*/ { "application/x-openoffice-starserver;windows_formatname=\"StarServerFormat\"", "StarServerFormat", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
78 /* 23 SotClipboardFormatId::STAROBJECT*/ { "application/x-openoffice-starobject;windows_formatname=\"StarObjectFormat\"", "StarObjectFormat", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
79 /* 24 SotClipboardFormatId::APPLETOBJECT*/ { "application/x-openoffice-appletobject;windows_formatname=\"Applet Object\"", "Applet Object", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
80 /* 25 SotClipboardFormatId::PLUGIN_OBJECT*/ { "application/x-openoffice-plugin-object;windows_formatname=\"PlugIn Object\"", "PlugIn Object", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
81 /* 26 SotClipboardFormatId::STARWRITER_30*/ { "application/x-openoffice-starwriter-30;windows_formatname=\"StarWriter 3.0\"", "StarWriter 3.0", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
82 /* 27 SotClipboardFormatId::STARWRITER_40*/ { "application/x-openoffice-starwriter-40;windows_formatname=\"StarWriter 4.0\"", "StarWriter 4.0", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
83 /* 28 SotClipboardFormatId::STARWRITER_50*/ { "application/x-openoffice-starwriter-50;windows_formatname=\"StarWriter 5.0\"", "StarWriter 5.0", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
84 /* 29 SotClipboardFormatId::STARWRITERWEB_40*/ { "application/x-openoffice-starwriterweb-40;windows_formatname=\"StarWriter/Web 4.0\"", "StarWriter/Web 4.0", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
85 /* 30 SotClipboardFormatId::STARWRITERWEB_50*/ { "application/x-openoffice-starwriterweb-50;windows_formatname=\"StarWriter/Web 5.0\"", "StarWriter/Web 5.0", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
86 /* 31 SotClipboardFormatId::STARWRITERGLOB_40*/ { "application/x-openoffice-starwriterglob-40;windows_formatname=\"StarWriter/Global 4.0\"", "StarWriter/Global 4.0", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
87 /* 32 SotClipboardFormatId::STARWRITERGLOB_50*/ { "application/x-openoffice-starwriterglob-50;windows_formatname=\"StarWriter/Global 5.0\"", "StarWriter/Global 5.0", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
88 /* 33 SotClipboardFormatId::STARDRAW*/ { "application/x-openoffice-stardraw;windows_formatname=\"StarDrawDocument\"", "StarDrawDocument", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
89 /* 34 SotClipboardFormatId::STARDRAW_40*/ { "application/x-openoffice-stardraw-40;windows_formatname=\"StarDrawDocument 4.0\"", "StarDrawDocument 4.0", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
90 /* 35 SotClipboardFormatId::STARIMPRESS_50*/ { "application/x-openoffice-starimpress-50;windows_formatname=\"StarImpress 5.0\"", "StarImpress 5.0", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
91 /* 36 SotClipboardFormatId::STARDRAW_50*/ { "application/x-openoffice-stardraw-50;windows_formatname=\"StarDraw 5.0\"", "StarDraw 5.0", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
92 /* 37 SotClipboardFormatId::STARCALC*/ { "application/x-openoffice-starcalc;windows_formatname=\"StarCalcDocument\"", "StarCalcDocument", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
93 /* 38 SotClipboardFormatId::STARCALC_40*/ { "application/x-openoffice-starcalc-40;windows_formatname=\"StarCalc 4.0\"", "StarCalc 4.0", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
94 /* 39 SotClipboardFormatId::STARCALC_50*/ { "application/x-openoffice-starcalc-50;windows_formatname=\"StarCalc 5.0\"", "StarCalc 5.0", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
95 /* 40 SotClipboardFormatId::STARCHART*/ { "application/x-openoffice-starchart;windows_formatname=\"StarChartDocument\"", "StarChartDocument", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
96 /* 41 SotClipboardFormatId::STARCHART_40*/ { "application/x-openoffice-starchart-40;windows_formatname=\"StarChartDocument 4.0\"", "StarChartDocument 4.0", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
97 /* 42 SotClipboardFormatId::STARCHART_50*/ { "application/x-openoffice-starchart-50;windows_formatname=\"StarChart 5.0\"", "StarChart 5.0", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
98 /* 43 SotClipboardFormatId::STARIMAGE*/ { "application/x-openoffice-starimage;windows_formatname=\"StarImageDocument\"", "StarImageDocument", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
99 /* 44 SotClipboardFormatId::STARIMAGE_40*/ { "application/x-openoffice-starimage-40;windows_formatname=\"StarImageDocument 4.0\"", "StarImageDocument 4.0", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
100 /* 45 SotClipboardFormatId::STARIMAGE_50*/ { "application/x-openoffice-starimage-50;windows_formatname=\"StarImage 5.0\"", "StarImage 5.0", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
101 /* 46 SotClipboardFormatId::STARMATH*/ { "application/x-openoffice-starmath;windows_formatname=\"StarMath\"", "StarMath", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
102 /* 47 SotClipboardFormatId::STARMATH_40*/ { "application/x-openoffice-starmath-40;windows_formatname=\"StarMathDocument 4.0\"", "StarMathDocument 4.0", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
103 /* 48 SotClipboardFormatId::STARMATH_50*/ { "application/x-openoffice-starmath-50;windows_formatname=\"StarMath 5.0\"", "StarMath 5.0", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
104 /* 49 SotClipboardFormatId::STAROBJECT_PAINTDOC*/ { "application/x-openoffice-starobject-paintdoc;windows_formatname=\"StarObjectPaintDocument\"", "StarObjectPaintDocument", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
105 /* 50 SotClipboardFormatId::FILLED_AREA*/ { "application/x-openoffice-filled-area;windows_formatname=\"FilledArea\"", "FilledArea", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
106 /* 51 SotClipboardFormatId::HTML*/ { "text/html", "HTML (HyperText Markup Language)", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
107 /* 52 SotClipboardFormatId::HTML_SIMPLE*/ { "application/x-openoffice-html-simple;windows_formatname=\"HTML Format\"", "HTML Format", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
108 /* 53 SotClipboardFormatId::CHAOS*/ { "application/x-openoffice-chaos;windows_formatname=\"FORMAT_CHAOS\"", "FORMAT_CHAOS", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
109 /* 54 SotClipboardFormatId::CNT_MSGATTACHFILE*/ { "application/x-openoffice-cnt-msgattachfile;windows_formatname=\"CNT_MSGATTACHFILE_FORMAT\"", "CNT_MSGATTACHFILE_FORMAT", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
110 /* 55 SotClipboardFormatId::BIFF_5*/ { "application/x-openoffice-biff5;windows_formatname=\"Biff5\"", "Biff5", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
111 /* 56 SotClipboardFormatId::BIFF__5*/ { "application/x-openoffice-biff-5;windows_formatname=\"Biff 5\"", "Biff 5", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
112 /* 57 SotClipboardFormatId::SYLK*/ { "application/x-openoffice-sylk;windows_formatname=\"Sylk\"", "Sylk", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
113 /* 58 SotClipboardFormatId::SYLK_BIGCAPS*/ { "application/x-openoffice-sylk-bigcaps;windows_formatname=\"SYLK\"", "SYLK", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
114 /* 59 SotClipboardFormatId::LINK*/ { "application/x-openoffice-link;windows_formatname=\"Link\"", "Link", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
115 /* 60 SotClipboardFormatId::DIF*/ { "application/x-openoffice-dif;windows_formatname=\"DIF\"", "DIF", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
116 /* 61 SotClipboardFormatId::STARDRAW_TABBAR*/ { "application/x-openoffice-stardraw-tabbar;windows_formatname=\"StarDraw TabBar\"", "StarDraw TabBar", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
117 /* 62 SotClipboardFormatId::SONLK*/ { "application/x-openoffice-sonlk;windows_formatname=\"SONLK (StarOffice Navi Link)\"", "SONLK (StarOffice Navi Link)", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
118 /* 63 SotClipboardFormatId::MSWORD_DOC*/ { "application/msword", "MSWordDoc", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
119 /* 64 SotClipboardFormatId::STAR_FRAMESET_DOC*/ { "application/x-openoffice-star-frameset-doc;windows_formatname=\"StarFrameSetDocument\"", "StarFrameSetDocument", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
120 /* 65 SotClipboardFormatId::OFFICE_DOC*/ { "application/x-openoffice-office-doc;windows_formatname=\"OfficeDocument\"", "OfficeDocument", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
121 /* 66 SotClipboardFormatId::NOTES_DOCINFO*/ { "application/x-openoffice-notes-docinfo;windows_formatname=\"NotesDocInfo\"", "NotesDocInfo", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
122 /* 67 SotClipboardFormatId::NOTES_HNOTE*/ { "application/x-openoffice-notes-hnote;windows_formatname=\"NoteshNote\"", "NoteshNote", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
123 /* 68 SotClipboardFormatId::NOTES_NATIVE*/ { "application/x-openoffice-notes-native;windows_formatname=\"Native\"", "Native", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
124 /* 69 SotClipboardFormatId::SFX_DOC*/ { "application/x-openoffice-sfx-doc;windows_formatname=\"SfxDocument\"", "SfxDocument", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
125 /* 70 SotClipboardFormatId::EVDF*/ { "application/x-openoffice-evdf;windows_formatname=\"EVDF (Explorer View Dummy Format)\"", "EVDF (Explorer View Dummy Format)", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
126 /* 71 SotClipboardFormatId::ESDF*/ { "application/x-openoffice-esdf;windows_formatname=\"ESDF (Explorer Search Dummy Format)\"", "ESDF (Explorer Search Dummy Format)", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
127 /* 72 SotClipboardFormatId::IDF*/ { "application/x-openoffice-idf;windows_formatname=\"IDF (Iconview Dummy Format)\"", "IDF (Iconview Dummy Format)", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
128 /* 73 SotClipboardFormatId::EFTP*/ { "application/x-openoffice-eftp;windows_formatname=\"EFTP (Explorer Ftp File)\"", "EFTP (Explorer Ftp File)", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
129 /* 74 SotClipboardFormatId::EFD*/ { "application/x-openoffice-efd;windows_formatname=\"EFD (Explorer Ftp Dir)\"", "EFD (Explorer Ftp Dir)", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
130 /* 75 SotClipboardFormatId::SVX_FORMFIELDEXCH*/ { "application/x-openoffice-svx-formfieldexch;windows_formatname=\"SvxFormFieldExch\"", "SvxFormFieldExch", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
131 /* 76 SotClipboardFormatId::EXTENDED_TABBAR*/ { "application/x-openoffice-extended-tabbar;windows_formatname=\"ExtendedTabBar\"", "ExtendedTabBar", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
132 /* 77 SotClipboardFormatId::SBA_DATAEXCHANGE*/ { "application/x-openoffice-sba-dataexchange;windows_formatname=\"SBA-DATAFORMAT\"", "SBA-DATAFORMAT", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
133 /* 78 SotClipboardFormatId::SBA_FIELDDATAEXCHANGE*/ { "application/x-openoffice-sba-fielddataexchange;windows_formatname=\"SBA-FIELDFORMAT\"", "SBA-FIELDFORMAT", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
134 /* 79 SotClipboardFormatId::SBA_PRIVATE_URL*/ { "application/x-openoffice-sba-private-url;windows_formatname=\"SBA-PRIVATEURLFORMAT\"", "SBA-PRIVATEURLFORMAT", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
135 /* 80 SotClipboardFormatId::SBA_TABED*/ { "application/x-openofficesba-tabed;windows_formatname=\"Tabed\"", "Tabed", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
136 /* 81 SotClipboardFormatId::SBA_TABID*/ { "application/x-openoffice-sba-tabid;windows_formatname=\"Tabid\"", "Tabid", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
137 /* 82 SotClipboardFormatId::SBA_JOIN*/ { "application/x-openoffice-sba-join;windows_formatname=\"SBA-JOINFORMAT\"", "SBA-JOINFORMAT", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
138 /* 83 SotClipboardFormatId::OBJECTDESCRIPTOR*/ { "application/x-openoffice-objectdescriptor-xml;windows_formatname=\"Star Object Descriptor (XML)\"", "Star Object Descriptor (XML)", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
139 /* 84 SotClipboardFormatId::LINKSRCDESCRIPTOR*/ { "application/x-openoffice-linksrcdescriptor-xml;windows_formatname=\"Star Link Source Descriptor (XML)\"", "Star Link Source Descriptor (XML)", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
140 /* 85 SotClipboardFormatId::EMBED_SOURCE*/ { "application/x-openoffice-embed-source-xml;windows_formatname=\"Star Embed Source (XML)\"", "Star Embed Source (XML)", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
141 /* 86 SotClipboardFormatId::LINK_SOURCE*/ { "application/x-openoffice-link-source-xml;windows_formatname=\"Star Link Source (XML)\"", "Star Link Source (XML)", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
142 /* 87 SotClipboardFormatId::EMBEDDED_OBJ*/ { "application/x-openoffice-embedded-obj-xml;windows_formatname=\"Star Embedded Object (XML)\"", "Star Embedded Object (XML)", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
143 /* 88 SotClipboardFormatId::FILECONTENT*/ { "application/x-openoffice-filecontent;windows_formatname=\"FileContents\"", "FileContents", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
144 /* 89 SotClipboardFormatId::FILEGRPDESCRIPTOR*/ { "application/x-openoffice-filegrpdescriptor;windows_formatname=\"FileGroupDescriptorW\"", "FileGroupDescriptor", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
145 /* 90 SotClipboardFormatId::FILENAME*/ { "application/x-openoffice-filename;windows_formatname=\"FileNameW\"", "FileName", &cppu::UnoType
<OUString
>::get() },
146 /* 91 SotClipboardFormatId::SD_OLE*/ { "application/x-openoffice-sd-ole;windows_formatname=\"SD-OLE\"", "SD-OLE", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
147 /* 92 SotClipboardFormatId::EMBEDDED_OBJ_OLE*/ { "application/x-openoffice-embedded-obj-ole;windows_formatname=\"Embedded Object\"", "Embedded Object", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
148 /* 93 SotClipboardFormatId::EMBED_SOURCE_OLE*/ { "application/x-openoffice-embed-source-ole;windows_formatname=\"Embed Source\"", "Embed Source", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
149 /* 94 SotClipboardFormatId::OBJECTDESCRIPTOR_OLE*/ { "application/x-openoffice-objectdescriptor-ole;windows_formatname=\"Object Descriptor\"", "Object Descriptor", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
150 /* 95 SotClipboardFormatId::LINKSRCDESCRIPTOR_OLE*/ { "application/x-openoffice-linkdescriptor-ole;windows_formatname=\"Link Source Descriptor\"", "Link Source Descriptor", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
151 /* 96 SotClipboardFormatId::LINK_SOURCE_OLE*/ { "application/x-openoffice-link-source-ole;windows_formatname=\"Link Source\"", "Link Source", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
152 /* 97 SotClipboardFormatId::SBA_CTRLDATAEXCHANGE*/ { "application/x-openoffice-sba-ctrldataexchange;windows_formatname=\"SBA-CTRLFORMAT\"", "SBA-CTRLFORMAT", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
153 /* 98 SotClipboardFormatId::OUTPLACE_OBJ*/ { "application/x-openoffice-outplace-obj;windows_formatname=\"OutPlace Object\"", "OutPlace Object", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
154 /* 99 SotClipboardFormatId::CNT_OWN_CLIP*/ { "application/x-openoffice-cnt-own-clip;windows_formatname=\"CntOwnClipboard\"", "CntOwnClipboard", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
155 /*100 SotClipboardFormatId::INET_IMAGE*/ { "application/x-openoffice-inet-image;windows_formatname=\"SO-INet-Image\"", "SO-INet-Image", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
156 /*101 SotClipboardFormatId::NETSCAPE_IMAGE*/ { "application/x-openoffice-netscape-image;windows_formatname=\"Netscape Image Format\"", "Netscape Image Format", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
157 /*102 SotClipboardFormatId::SBA_FORMEXCHANGE*/ { "application/x-openoffice-sba-formexchange;windows_formatname=\"SBA_FORMEXCHANGE\"", "SBA_FORMEXCHANGE", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
158 /*103 SotClipboardFormatId::SBA_REPORTEXCHANGE*/ { "application/x-openoffice-sba-reportexchange;windows_formatname=\"SBA_REPORTEXCHANGE\"", "SBA_REPORTEXCHANGE", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
159 /*104 SotClipboardFormatId::UNIFORMRESOURCELOCATOR*/ { "application/x-openoffice-uniformresourcelocator;windows_formatname=\"UniformResourceLocatorW\"", "UniformResourceLocator", &cppu::UnoType
<OUString
>::get() },
160 /*105 SotClipboardFormatId::STARCHARTDOCUMENT_50*/ { "application/x-openoffice-starchartdocument-50;windows_formatname=\"StarChartDocument 5.0\"", "StarChartDocument 5.0", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
161 /*106 SotClipboardFormatId::GRAPHOBJ*/ { "application/x-openoffice-graphobj;windows_formatname=\"Graphic Object\"", "Graphic Object", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
162 /*107 SotClipboardFormatId::STARWRITER_60*/ { MIMETYPE_VND_SUN_XML_WRITER_ASCII
, "Writer 6.0", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
163 /*108 SotClipboardFormatId::STARWRITERWEB_60*/ { MIMETYPE_VND_SUN_XML_WRITER_WEB_ASCII
, "Writer/Web 6.0", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
164 /*109 SotClipboardFormatId::STARWRITERGLOB_60*/ { MIMETYPE_VND_SUN_XML_WRITER_GLOBAL_ASCII
, "Writer/Global 6.0", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
165 /*110 SotClipboardFormatId::STARWDRAW_60*/ { MIMETYPE_VND_SUN_XML_DRAW_ASCII
, "Draw 6.0", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
166 /*111 SotClipboardFormatId::STARIMPRESS_60*/ { MIMETYPE_VND_SUN_XML_IMPRESS_ASCII
, "Impress 6.0", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
167 /*112 SotClipboardFormatId::STARCALC_60*/ { MIMETYPE_VND_SUN_XML_CALC_ASCII
, "Calc 6.0", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
168 /*113 SotClipboardFormatId::STARCHART_60*/ { MIMETYPE_VND_SUN_XML_CHART_ASCII
, "Chart 6.0", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
169 /*114 SotClipboardFormatId::STARMATH_60*/ { MIMETYPE_VND_SUN_XML_MATH_ASCII
, "Math 6.0", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
170 /*115 SotClipboardFormatId::WMF*/ { "application/x-openoffice-wmf;windows_formatname=\"Image WMF\"", "Windows MetaFile", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
171 /*116 SotClipboardFormatId::DBACCESS_QUERY*/ { "application/x-openoffice-dbaccess-query;windows_formatname=\"Data source Query Object\"", "Data source Query Object", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
172 /*117 SotClipboardFormatId::DBACCESS_TABLE*/ { "application/x-openoffice-dbaccess-table;windows_formatname=\"Data source Table\"", "Data source Table", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
173 /*118 SotClipboardFormatId::DBACCESS_COMMAND*/ { "application/x-openoffice-dbaccess-command;windows_formatname=\"SQL query\"", "SQL query", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
174 /*119 SotClipboardFormatId::DIALOG_60*/ { "application/vnd.sun.xml.dialog", "Dialog 6.0", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
175 /*120 SotClipboardFormatId::EMF*/ { "application/x-openoffice-emf;windows_formatname=\"Image EMF\"", "Windows Enhanced MetaFile", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
176 /*121 SotClipboardFormatId::BIFF_8*/ { "application/x-openoffice-biff-8;windows_formatname=\"Biff8\"", "Biff8", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
177 /*122 SotClipboardFormatId::BMP*/ { "image/bmp", "Windows Bitmap", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
178 /*123 SotClipboardFormatId::HTML_NO_COMMENT */ { "application/x-openoffice-html-no-comment;windows_formatname=\"HTML Format\"", "HTML (no comment)", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
179 /*124 SotClipboardFormatId::STARWRITER_8*/ { MIMETYPE_OASIS_OPENDOCUMENT_TEXT_ASCII
, "Writer 8", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
180 /*125 SotClipboardFormatId::STARWRITERWEB_8*/ { MIMETYPE_OASIS_OPENDOCUMENT_TEXT_WEB_ASCII
, "Writer/Web 8", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
181 /*126 SotClipboardFormatId::STARWRITERGLOB_8*/ { MIMETYPE_OASIS_OPENDOCUMENT_TEXT_GLOBAL_ASCII
, "Writer/Global 8", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
182 /*127 SotClipboardFormatId::STARWDRAW_8*/ { MIMETYPE_OASIS_OPENDOCUMENT_DRAWING_ASCII
, "Draw 8", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
183 /*128 SotClipboardFormatId::STARIMPRESS_8*/ { MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION_ASCII
, "Impress 8", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
184 /*129 SotClipboardFormatId::STARCALC_8*/ { MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_ASCII
, "Calc 8", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
185 /*130 SotClipboardFormatId::STARCHART_8*/ { MIMETYPE_OASIS_OPENDOCUMENT_CHART_ASCII
, "Chart 8", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
186 /*131 SotClipboardFormatId::STARMATH_8*/ { MIMETYPE_OASIS_OPENDOCUMENT_FORMULA_ASCII
, "Math 8", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
187 /*132 SotClipboardFormatId::XFORMS */ { "application/x-openoffice-xforms;windows_formatname=\"??? Format\"", "???", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
188 /*133 SotClipboardFormatId::STARWRITER_8_TEMPLATE*/ { MIMETYPE_OASIS_OPENDOCUMENT_TEXT_TEMPLATE_ASCII
, "Writer 8 Template", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
189 /*134 SotClipboardFormatId::STARWDRAW_8_TEMPLATE*/ { MIMETYPE_OASIS_OPENDOCUMENT_DRAWING_TEMPLATE_ASCII
, "Draw 8 Template", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
190 /*135 SotClipboardFormatId::STARIMPRESS_8_TEMPLATE*/ { MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION_TEMPLATE_ASCII
, "Impress 8 Template", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
191 /*136 SotClipboardFormatId::STARCALC_8_TEMPLATE*/ { MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_TEMPLATE_ASCII
, "Calc 8 Template", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
192 /*137 SotClipboardFormatId::STARCHART_8_TEMPLATE*/ { MIMETYPE_OASIS_OPENDOCUMENT_CHART_TEMPLATE_ASCII
, "Chart 8 Template", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
193 /*138 SotClipboardFormatId::STARMATH_8_TEMPLATE*/ { MIMETYPE_OASIS_OPENDOCUMENT_FORMULA_TEMPLATE_ASCII
, "Math 8 Template", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
194 /*139 SotClipboardFormatId::STARBASE_8*/ { MIMETYPE_OASIS_OPENDOCUMENT_DATABASE_ASCII
, "StarBase 8", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
195 /*140 SotClipboardFormatId::HC_GDIMETAFILE*/ { "application/x-openoffice-highcontrast-gdimetafile;windows_formatname=\"GDIMetaFile\"", "High Contrast GDIMetaFile", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
196 /*141 SotClipboardFormatId::PNG*/ { "image/png", "PNG Bitmap", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
197 /*142 SotClipboardFormatId::STARWRITERGLOB_8_TEMPLATE*/ { MIMETYPE_OASIS_OPENDOCUMENT_TEXT_GLOBAL_TEMPLATE_ASCII
, "Writer/Global 8 Template", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
198 /*143 SotClipboardFormatId::MATHML*/ { "application/mathml+xml", "MathML", &::cppu::UnoType
<const Sequence
< sal_Int8
>>::get() },
199 /*144 SotClipboardFormatId::JPEG*/ { "image/jpeg", "JPEG Bitmap", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
200 /*145 SotClipboardFormatId::RICHTEXT*/ { "text/richtext", "Richtext Format", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
201 /*146 SotClipboardFormatId::STRING_TSVC*/ { "application/x-libreoffice-tsvc", "Text TSV-Calc", &cppu::UnoType
<OUString
>::get() },
202 /*147 SotClipboardFormatId::PDF*/ { "application/pdf", "PDF Document", &cppu::UnoType
<Sequence
<sal_Int8
>>::get() },
204 return &aInstance
[0];
207 typedef std::vector
<css::datatransfer::DataFlavor
> tDataFlavorList
;
210 static tDataFlavorList
& InitFormats_Impl()
212 static tDataFlavorList gImplData
;
217 /*************************************************************************
219 |* SotExchange::RegisterFormatName()
221 |* Description CLIP.SDW
222 *************************************************************************/
223 SotClipboardFormatId
SotExchange::RegisterFormatName( const OUString
& rName
)
225 const DataFlavorRepresentation
*pFormatArray_Impl
= FormatArray_Impl();
226 // test the default first - name
227 for( SotClipboardFormatId i
= SotClipboardFormatId::STRING
; i
<= SotClipboardFormatId::FILE_LIST
; ++i
)
228 if( rName
.equalsAscii( pFormatArray_Impl
[ static_cast<int>(i
) ].pName
) )
231 // BM: the chart format 105 ("StarChartDocument 5.0") was written
232 // only into 5.1 chart documents - in 5.0 and 5.2 it was 42 ("StarChart 5.0")
233 // The registry only contains the entry for the 42 format id.
234 for( SotClipboardFormatId i
= SotClipboardFormatId::RTF
; i
<= SotClipboardFormatId::USER_END
; ++i
)
235 if( rName
.equalsAscii( pFormatArray_Impl
[ static_cast<int>(i
) ].pName
) )
236 return ( (i
== SotClipboardFormatId::STARCHARTDOCUMENT_50
)
237 ? SotClipboardFormatId::STARCHART_50
240 // then in the dynamic list
241 tDataFlavorList
& rL
= InitFormats_Impl();
242 for( tDataFlavorList::size_type i
= 0; i
< rL
.size(); i
++ )
244 auto const& rFlavor
= rL
[ i
];
245 if( rName
== rFlavor
.HumanPresentableName
)
246 return static_cast<SotClipboardFormatId
>(i
+ static_cast<int>(SotClipboardFormatId::USER_END
) + 1);
249 DataFlavor aNewFlavor
;
250 aNewFlavor
.MimeType
= rName
;
251 aNewFlavor
.HumanPresentableName
= rName
;
252 aNewFlavor
.DataType
= cppu::UnoType
<OUString
>::get();
254 rL
.push_back( std::move(aNewFlavor
) );
256 return static_cast<SotClipboardFormatId
>(static_cast<int>(rL
.size()-1) + static_cast<int>(SotClipboardFormatId::USER_END
) + 1);
259 SotClipboardFormatId
SotExchange::RegisterFormatMimeType( const OUString
& rMimeType
)
261 const DataFlavorRepresentation
*pFormatArray_Impl
= FormatArray_Impl();
262 // test the default first - name
263 for( SotClipboardFormatId i
= SotClipboardFormatId::STRING
; i
<= SotClipboardFormatId::FILE_LIST
; ++i
)
264 if( rMimeType
.equals( pFormatArray_Impl
[ static_cast<int>(i
) ].pMimeType
) )
267 for( SotClipboardFormatId i
= SotClipboardFormatId::RTF
; i
<= SotClipboardFormatId::USER_END
; ++i
)
268 if( rMimeType
.equals( pFormatArray_Impl
[ static_cast<int>(i
) ].pMimeType
) )
271 // then in the dynamic list
272 tDataFlavorList
& rL
= InitFormats_Impl();
273 for( tDataFlavorList::size_type i
= 0; i
< rL
.size(); i
++ )
275 auto const& rFlavor
= rL
[ i
];
276 if( rMimeType
== rFlavor
.MimeType
)
277 return static_cast<SotClipboardFormatId
>(i
+ static_cast<int>(SotClipboardFormatId::USER_END
) + 1);
280 DataFlavor aNewFlavor
;
281 aNewFlavor
.MimeType
= rMimeType
;
282 aNewFlavor
.HumanPresentableName
= rMimeType
;
283 aNewFlavor
.DataType
= cppu::UnoType
<OUString
>::get();
285 rL
.push_back( std::move(aNewFlavor
) );
287 return static_cast<SotClipboardFormatId
>(static_cast<int>(rL
.size()-1) + static_cast<int>(SotClipboardFormatId::USER_END
) + 1);
290 /*************************************************************************
292 |* SotExchange::RegisterFormatName()
294 |* Description CLIP.SDW
295 *************************************************************************/
296 SotClipboardFormatId
SotExchange::RegisterFormat( const DataFlavor
& rFlavor
)
298 SotClipboardFormatId nRet
= GetFormat( rFlavor
);
300 if( nRet
== SotClipboardFormatId::NONE
)
302 tDataFlavorList
& rL
= InitFormats_Impl();
303 nRet
= static_cast<SotClipboardFormatId
>(rL
.size() + static_cast<int>(SotClipboardFormatId::USER_END
) + 1);
304 rL
.emplace_back( rFlavor
);
310 /*************************************************************************
312 |* SotExchange::GetFormatDataFlavor()
314 *************************************************************************/
316 bool SotExchange::GetFormatDataFlavor( SotClipboardFormatId nFormat
, DataFlavor
& rFlavor
)
320 if( SotClipboardFormatId::USER_END
>= nFormat
)
322 const DataFlavorRepresentation
& rData
= FormatArray_Impl()[static_cast<int>(nFormat
)];
323 rFlavor
.MimeType
= rData
.pMimeType
;
324 rFlavor
.HumanPresentableName
= OUString::createFromAscii( rData
.pName
);
325 rFlavor
.DataType
= *rData
.pType
;
331 tDataFlavorList
& rL
= InitFormats_Impl();
333 unsigned i
= static_cast<int>(nFormat
) - static_cast<int>(SotClipboardFormatId::USER_END
) - 1;
342 rFlavor
= DataFlavor();
347 DBG_ASSERT( bRet
, "SotExchange::GetFormatDataFlavor(): DataFlavor not initialized" );
352 /*************************************************************************
354 |* SotExchange::GetFormatMimeType( SotClipboardFormatId nFormat )
356 *************************************************************************/
358 OUString
SotExchange::GetFormatMimeType( SotClipboardFormatId nFormat
)
361 if( SotClipboardFormatId::USER_END
>= nFormat
)
362 sMimeType
= FormatArray_Impl()[static_cast<int>(nFormat
)].pMimeType
;
365 tDataFlavorList
& rL
= InitFormats_Impl();
367 unsigned i
= static_cast<int>(nFormat
) - static_cast<int>(SotClipboardFormatId::USER_END
) - 1;
370 sMimeType
= rL
[ i
].MimeType
;
373 DBG_ASSERT( !sMimeType
.isEmpty(), "SotExchange::GetFormatMimeType(): DataFlavor not initialized" );
378 /*************************************************************************
380 |* SotExchange::GetFormatIdFromMimeType( const String& rMimeType )
382 *************************************************************************/
384 SotClipboardFormatId
SotExchange::GetFormatIdFromMimeType( std::u16string_view rMimeType
)
386 const DataFlavorRepresentation
*pFormatArray_Impl
= FormatArray_Impl();
387 for( SotClipboardFormatId i
= SotClipboardFormatId::STRING
; i
<= SotClipboardFormatId::FILE_LIST
; ++i
)
388 if( rMimeType
== pFormatArray_Impl
[ static_cast<int>(i
) ].pMimeType
)
391 // BM: the chart format 105 ("StarChartDocument 5.0") was written
392 // only into 5.1 chart documents - in 5.0 and 5.2 it was 42 ("StarChart 5.0")
393 // The registry only contains the entry for the 42 format id.
394 for( SotClipboardFormatId i
= SotClipboardFormatId::RTF
; i
<= SotClipboardFormatId::USER_END
; ++i
)
395 if( rMimeType
== pFormatArray_Impl
[ static_cast<int>(i
) ].pMimeType
)
396 return ( (i
== SotClipboardFormatId::STARCHARTDOCUMENT_50
)
397 ? SotClipboardFormatId::STARCHART_50
400 // then in the dynamic list
401 tDataFlavorList
& rL
= InitFormats_Impl();
403 for( tDataFlavorList::size_type i
= 0; i
< rL
.size(); i
++ )
405 auto const& rFlavor
= rL
[ i
];
406 if( rMimeType
== rFlavor
.MimeType
)
407 return static_cast<SotClipboardFormatId
>(i
+ static_cast<int>(SotClipboardFormatId::USER_END
) + 1);
410 return SotClipboardFormatId::NONE
;
413 /*************************************************************************
415 |* SotExchange::GetFormatName()
417 |* Description CLIP.SDW
418 *************************************************************************/
419 SotClipboardFormatId
SotExchange::GetFormat( const DataFlavor
& rFlavor
)
421 // test the default first - name
422 const OUString
& rMimeType
= rFlavor
.MimeType
;
424 const DataFlavorRepresentation
*pFormatArray_Impl
= FormatArray_Impl();
425 for( SotClipboardFormatId i
= SotClipboardFormatId::STRING
; i
<= SotClipboardFormatId::FILE_LIST
; ++i
)
426 if( rMimeType
.equals( pFormatArray_Impl
[ static_cast<int>(i
) ].pMimeType
) )
429 // BM: the chart format 105 ("StarChartDocument 5.0") was written
430 // only into 5.1 chart documents - in 5.0 and 5.2 it was 42 ("StarChart 5.0")
431 // The registry only contains the entry for the 42 format id.
432 for( SotClipboardFormatId i
= SotClipboardFormatId::RTF
; i
<= SotClipboardFormatId::USER_END
; ++i
)
434 const OUString
& pFormatMimeType
= pFormatArray_Impl
[ static_cast<int>(i
) ].pMimeType
;
435 const sal_Int32 nFormatMimeTypeLen
= pFormatMimeType
.getLength();
436 if( rMimeType
.match( pFormatMimeType
) &&
437 ( rMimeType
.getLength() == nFormatMimeTypeLen
||
438 rMimeType
[ nFormatMimeTypeLen
] == ';' ) )
439 return ( (i
== SotClipboardFormatId::STARCHARTDOCUMENT_50
)
440 ? SotClipboardFormatId::STARCHART_50
444 // then in the dynamic list
445 tDataFlavorList
& rL
= InitFormats_Impl();
446 for( tDataFlavorList::size_type i
= 0; i
< rL
.size(); i
++ )
448 if( rMimeType
== rL
[ i
].MimeType
)
449 return static_cast<SotClipboardFormatId
>(i
+ static_cast<int>(SotClipboardFormatId::USER_END
) + 1);
452 return SotClipboardFormatId::NONE
;
455 /*************************************************************************
457 |* SotExchange::GetFormatName()
459 |* Description CLIP.SDW
460 *************************************************************************/
461 OUString
SotExchange::GetFormatName( SotClipboardFormatId nFormat
)
466 if( GetFormatDataFlavor( nFormat
, aFlavor
) )
467 aRet
= aFlavor
.HumanPresentableName
;
472 bool SotExchange::IsInternal( const SvGlobalName
& rName
)
474 return rName
== SvGlobalName(SO3_SW_CLASSID_60
) ||
475 rName
== SvGlobalName(SO3_SC_CLASSID_60
) ||
476 rName
== SvGlobalName(SO3_SIMPRESS_CLASSID_60
) ||
477 rName
== SvGlobalName(SO3_SDRAW_CLASSID_60
) ||
478 rName
== SvGlobalName(SO3_SCH_CLASSID_60
) ||
479 rName
== SvGlobalName(SO3_SM_CLASSID_60
) ||
480 rName
== SvGlobalName(SO3_SWWEB_CLASSID_60
) ||
481 rName
== SvGlobalName(SO3_SWGLOB_CLASSID_60
);
484 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */