summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorOliver Specht <oliver.specht@cib.de>2016-12-30 16:47:17 +0100
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2017-01-09 00:34:30 +0000
commit048e30c1f8231e6cd144a9251061f6fa127b353e (patch)
tree712f9d5cf96f28e01eb980f6314df855b619a7eb /svtools
parent6f0993f2365cd8b6ce53f7a6e705c7fc9bd07ab6 (diff)
tdf#101828 handle rtf/richtext correctly
Change-Id: Id894f62a918bd6e6fa59f8d546307343bf2bd4b0 Reviewed-on: https://gerrit.libreoffice.org/32682 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/dialogs/formats.src4
-rw-r--r--svtools/source/dialogs/insdlg.cxx3
-rw-r--r--svtools/source/misc/transfer.cxx4
3 files changed, 10 insertions, 1 deletions
diff --git a/svtools/source/dialogs/formats.src b/svtools/source/dialogs/formats.src
index b9451a1f51a4..3ecaff7ac772 100644
--- a/svtools/source/dialogs/formats.src
+++ b/svtools/source/dialogs/formats.src
@@ -35,6 +35,10 @@ String STR_FORMAT_RTF
{
Text [ en-US ] = "Formatted text [RTF]" ;
};
+String STR_FORMAT_ID_RICHTEXT
+{
+ Text [ en-US ] = "Formatted text [Richtext]" ;
+};
String STR_FORMAT_ID_DRAWING
{
Text [ en-US ] = "Drawing format";
diff --git a/svtools/source/dialogs/insdlg.cxx b/svtools/source/dialogs/insdlg.cxx
index b9a6f535a1a3..5d76ec22de3b 100644
--- a/svtools/source/dialogs/insdlg.cxx
+++ b/svtools/source/dialogs/insdlg.cxx
@@ -263,7 +263,8 @@ OUString SvPasteObjectHelper::GetSotFormatUIName( SotClipboardFormatId nId )
{ SotClipboardFormatId::DBACCESS_COMMAND, STR_FORMAT_ID_DBACCESS_COMMAND },
{ SotClipboardFormatId::DIALOG_60, STR_FORMAT_ID_DIALOG_60 },
{ SotClipboardFormatId::FILEGRPDESCRIPTOR, STR_FORMAT_ID_FILEGRPDESCRIPTOR },
- { SotClipboardFormatId::HTML_NO_COMMENT, STR_FORMAT_ID_HTML_NO_COMMENT }
+ { SotClipboardFormatId::HTML_NO_COMMENT, STR_FORMAT_ID_HTML_NO_COMMENT },
+ { SotClipboardFormatId::RICHTEXT, STR_FORMAT_ID_RICHTEXT },
};
OUString aUIName;
diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx
index 4cce44721c3e..ade1bc011038 100644
--- a/svtools/source/misc/transfer.cxx
+++ b/svtools/source/misc/transfer.cxx
@@ -1271,6 +1271,10 @@ void TransferableDataHelper::FillDataFlavorExVector( const Sequence< DataFlavor
{
rDataFlavorExVector[ rDataFlavorExVector.size() - 1 ].mnSotId = SotClipboardFormatId::RTF;
}
+ else if( xMimeType.is() && xMimeType->getFullMediaType().equalsIgnoreAsciiCase( "text/richtext" ) )
+ {
+ rDataFlavorExVector[ rDataFlavorExVector.size() - 1 ].mnSotId = SotClipboardFormatId::RICHTEXT;
+ }
else if( xMimeType.is() && xMimeType->getFullMediaType().equalsIgnoreAsciiCase( "text/html" ) )
{