diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-07-08 18:02:23 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-07-08 18:02:23 +0200 |
commit | 9f1682f4e752c4f9ea43a21d1e201b014a88aca8 (patch) | |
tree | 91b799cee44ecb9b3fe7ff3ce7ae10c76dc88adc /starmath/source/view.cxx | |
parent | feab17bc3626b5d1585d91ce006b4b9105483c1f (diff) |
various warnings
Change-Id: I1e4f6920601bad273b5255defc9377ef303083fc
Diffstat (limited to 'starmath/source/view.cxx')
-rw-r--r-- | starmath/source/view.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index 1c4ca5401969..c5ffc3983223 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -1669,7 +1669,7 @@ void SmViewShell::Execute(SfxRequest& rReq) SfxMedium* pClipboardMedium = new SfxMedium(); pClipboardMedium->GetItemSet(); //generate initial itemset, not sure if necessary const SfxFilter* pMathFilter = - SfxFilter::GetFilterByName(OUString::createFromAscii(MATHML_XML)); + SfxFilter::GetFilterByName(MATHML_XML); pClipboardMedium->SetFilter(pMathFilter); pClipboardMedium->setStreamToLoadFrom(xStrm, true /*bIsReadOnly*/); InsertFrom(*pClipboardMedium); @@ -1688,14 +1688,14 @@ void SmViewShell::Execute(SfxRequest& rReq) SfxMedium* pClipboardMedium = new SfxMedium(); pClipboardMedium->GetItemSet(); //generates initial itemset, not sure if necessary const SfxFilter* pMathFilter = - SfxFilter::GetFilterByName(OUString::createFromAscii(MATHML_XML)); + SfxFilter::GetFilterByName(MATHML_XML); pClipboardMedium->SetFilter(pMathFilter); SvMemoryStream * pStrm; // 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. bool bForceUTF16 = false; - sal_Int32 nPosL = aString.indexOf( OUString::createFromAscii("encoding=\"")); + sal_Int32 nPosL = aString.indexOf("encoding=\""); sal_Int32 nPosU = -1; if ( nPosL >= 0 && nPosL +10 < aString.getLength() ) { @@ -1708,12 +1708,12 @@ void SmViewShell::Execute(SfxRequest& rReq) } if ( bForceUTF16 ) { - OUString aNewString = aString.replaceAt( nPosL,nPosU-nPosL,OUString::createFromAscii("UTF-16")); - pStrm = new SvMemoryStream( (void*)aNewString.getStr(), aNewString.getLength() * sizeof(sal_Unicode), StreamMode::READ); + OUString aNewString = aString.replaceAt( nPosL,nPosU-nPosL,"UTF-16"); + pStrm = new SvMemoryStream( const_cast<sal_Unicode *>(aNewString.getStr()), aNewString.getLength() * sizeof(sal_Unicode), StreamMode::READ); } else { - pStrm = new SvMemoryStream( (void*)aString.getStr(), aString.getLength() * sizeof(sal_Unicode), StreamMode::READ); + pStrm = new SvMemoryStream( const_cast<sal_Unicode *>(aString.getStr()), aString.getLength() * sizeof(sal_Unicode), StreamMode::READ); } uno::Reference<io::XInputStream> xStrm2( new ::utl::OInputStreamWrapper(*pStrm) ); pClipboardMedium->setStreamToLoadFrom(xStrm2, true /*bIsReadOnly*/); |