[Libreoffice-commits] core.git: include/sot include/svtools sot/source svtools/source

Eike Rathke erack at redhat.com
Mon Nov 13 11:59:20 UTC 2017


 include/sot/formats.hxx           |    3 ++-
 include/svtools/strings.hrc       |    1 +
 sot/source/base/exchange.cxx      |    3 ++-
 svtools/source/dialogs/insdlg.cxx |    1 +
 4 files changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 1568e51ff288e43b0a97257dbe3d3c81bdb1d386
Author: Eike Rathke <erack at redhat.com>
Date:   Mon Nov 13 12:57:53 2017 +0100

    SotClipboardFormatId::STRING_TSVC "Unformatted text [TSV-Calc]", tdf#113571
    
    In preparation to solve tdf#113571 *AND* keeping tdf#32213 fixed
    we need two separate unformatted text formats to distinguish
    between in-Calc on-cell paste and external or in-cell paste.
    
    Change-Id: Ic81a0c17d0643af2f5f4be50e67b690fd8846388

diff --git a/include/sot/formats.hxx b/include/sot/formats.hxx
index 260f43b8ea09..4e36686203a8 100644
--- a/include/sot/formats.hxx
+++ b/include/sot/formats.hxx
@@ -173,8 +173,9 @@ enum class SotClipboardFormatId : sal_uLong
     MATHML                 = 143,
     JPEG                   = 144,
     RICHTEXT               = 145,
+    STRING_TSVC            = 146,
     // the point at which we start allocating "runtime" format IDs
-    USER_END  = RICHTEXT
+    USER_END  = STRING_TSVC
 };
 
 /** Make it easier to iterate over format IDs */
diff --git a/include/svtools/strings.hrc b/include/svtools/strings.hrc
index 19a08ce498f8..a7af8ca5889d 100644
--- a/include/svtools/strings.hrc
+++ b/include/svtools/strings.hrc
@@ -27,6 +27,7 @@
 #define STR_REPEAT                              NC_("STR_REPEAT", "~Repeat: ")
 
 #define STR_FORMAT_STRING                       NC_("STR_FORMAT_STRING", "Unformatted text")
+#define STR_FORMAT_ID_STRING_TSVC               NC_("STR_FORMAT_ID_STRING_TSVC", "Unformatted text [TSV-Calc]")
 #define STR_FORMAT_BITMAP                       NC_("STR_FORMAT_BITMAP", "Bitmap")
 #define STR_FORMAT_GDIMETAFILE                  NC_("STR_FORMAT_GDIMETAFILE", "GDI metafile")
 #define STR_FORMAT_RTF                          NC_("STR_FORMAT_RTF", "Formatted text [RTF]")
diff --git a/sot/source/base/exchange.cxx b/sot/source/base/exchange.cxx
index 37d917730e46..e69ae15d8ae8 100644
--- a/sot/source/base/exchange.cxx
+++ b/sot/source/base/exchange.cxx
@@ -203,7 +203,8 @@ namespace
             /*142 SotClipboardFormatId::STARWRITERGLOB_8_TEMPLATE*/      { MIMETYPE_OASIS_OPENDOCUMENT_TEXT_GLOBAL_TEMPLATE_ASCII, "Writer/Global 8 Template", &cppu::UnoType<Sequence<sal_Int8>>::get() },
             /*143 SotClipboardFormatId::MATHML*/   { "application/mathml+xml", "MathML", &::cppu::UnoType<const Sequence< sal_Int8 >>::get() },
             /*144 SotClipboardFormatId::JPEG*/ { "image/jpeg", "JPEG Bitmap", &cppu::UnoType<Sequence<sal_Int8>>::get() },
-            /*145 SotClipboardFormatId::RICHTEXT*/ { "text/richtext", "Richtext Format", &cppu::UnoType<Sequence<sal_Int8>>::get() }
+            /*145 SotClipboardFormatId::RICHTEXT*/ { "text/richtext", "Richtext Format", &cppu::UnoType<Sequence<sal_Int8>>::get() },
+            /*146 SotClipboardFormatId::STRING_TSVC*/            { "application/x-libreoffice-tsvc", "Text TSV-Calc", &cppu::UnoType<OUString>::get() }
             };
         return &aInstance[0];
         }
diff --git a/svtools/source/dialogs/insdlg.cxx b/svtools/source/dialogs/insdlg.cxx
index a16bdc4c0bf9..08c68596063f 100644
--- a/svtools/source/dialogs/insdlg.cxx
+++ b/svtools/source/dialogs/insdlg.cxx
@@ -263,6 +263,7 @@ OUString SvPasteObjectHelper::GetSotFormatUIName( SotClipboardFormatId nId )
         { SotClipboardFormatId::FILEGRPDESCRIPTOR,   STR_FORMAT_ID_FILEGRPDESCRIPTOR },
         { SotClipboardFormatId::HTML_NO_COMMENT,     STR_FORMAT_ID_HTML_NO_COMMENT },
         { SotClipboardFormatId::RICHTEXT,            STR_FORMAT_ID_RICHTEXT },
+        { SotClipboardFormatId::STRING_TSVC,         STR_FORMAT_ID_STRING_TSVC },
     };
 
     const char* pResId = nullptr;


More information about the Libreoffice-commits mailing list