summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2022-03-11 17:48:53 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2022-03-12 07:04:38 +0100
commit344353495c60dcdc69f7975ec4e51a753ebfb81f (patch)
tree258bead1be261a8c8876ee96e2f6eb7290ae578e /starmath
parentaef15ba6b5223804c9c795ed51f95af7c11f23fa (diff)
Related: tdf#128610 drop obsolete encoding attribute replacement
It was needed once, when we used expat; now libxml2 does its own detection (in its xmlDetectCharEncoding) after the strange dance in our XMLFile2UTFConverter::readAndConvert (which does nothing useful for UTF-16 case). The original problem in tdf#128610 was addressed in commit c964700d16d99d1569373a1eb9a1352fb3512915. This one just drops the obsolete replacement. Change-Id: I2e6b28212619dd0f6cb90ae8234277092a37e7a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131409 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/view.cxx10
1 files changed, 0 insertions, 10 deletions
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 77886a5795dc..4ab60033951e 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -1832,16 +1832,6 @@ void SmViewShell::Execute(SfxRequest& rReq)
SfxFilter::GetFilterByName(MATHML_XML);
aClipboardMedium.SetFilter(pMathFilter);
- // The text to be imported might asserts encoding like 'encoding="utf-8"' but FORMAT_STRING is UTF-16.
- // Force encoding to UTF-16, if encoding exists.
- sal_Int32 nPosL = aString.indexOf("encoding=\"");
- if ( nPosL >= 0 && nPosL +10 < aString.getLength() )
- {
- nPosL += 10;
- sal_Int32 nPosU = aString.indexOf( '"',nPosL);
- if (nPosU > nPosL)
- aString = aString.replaceAt(nPosL, nPosU - nPosL, u"UTF-16");
- }
SvMemoryStream aStrm( const_cast<sal_Unicode *>(aString.getStr()), aString.getLength() * sizeof(sal_Unicode), StreamMode::READ);
uno::Reference<io::XInputStream> xStrm2( new ::utl::OInputStreamWrapper(aStrm) );
aClipboardMedium.setStreamToLoadFrom(xStrm2, true /*bIsReadOnly*/);