summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-04-24 11:37:48 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-04-24 18:04:50 +0200
commit5c1561561a859c561fb2321420f1abb7f1cedde3 (patch)
tree7a96cf8b32bd4c088298df3c4067f0d81f549057 /vcl/source
parent5e6d8efbf3fb456ca370df04b21d2e340d9831ad (diff)
loplugin:unnecessarygetstr extend to more std::string checking
suggested by mike kaganski Change-Id: I5f5f254142767aca45a6101abdd84a0163ca6a34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150936 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/app/unohelp2.cxx2
-rw-r--r--vcl/source/control/edit.cxx2
-rw-r--r--vcl/source/control/field2.cxx2
-rw-r--r--vcl/source/gdi/mtfxmldump.cxx2
4 files changed, 4 insertions, 4 deletions
diff --git a/vcl/source/app/unohelp2.cxx b/vcl/source/app/unohelp2.cxx
index 5bdb6c8388e5..575b9c74417c 100644
--- a/vcl/source/app/unohelp2.cxx
+++ b/vcl/source/app/unohelp2.cxx
@@ -69,7 +69,7 @@ namespace vcl::unohelper {
aTree.put("mimeType", "text/plain");
std::stringstream aStream;
boost::property_tree::write_json(aStream, aTree);
- pNotifier->libreOfficeKitViewCallback(LOK_CALLBACK_CLIPBOARD_CHANGED, aStream.str().c_str());
+ pNotifier->libreOfficeKitViewCallback(LOK_CALLBACK_CLIPBOARD_CHANGED, OString(aStream.str()));
}
}
catch( const uno::Exception& )
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index d0eca8ab0acf..10c68412a627 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -835,7 +835,7 @@ void Edit::ImplInsertText( const OUString& rStr, const Selection* pNewSel, bool
// the text that needs to be checked is only the one
// before the current cursor position
- const OUString aOldText( maText.getStr(), nTmpPos);
+ const OUString aOldText( maText.subView(0, nTmpPos) );
OUString aTmpText( aOldText );
if (officecfg::Office::Common::I18N::CTL::CTLSequenceCheckingTypeAndReplace::get())
{
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx
index 726af088d89c..3142106609ed 100644
--- a/vcl/source/control/field2.cxx
+++ b/vcl/source/control/field2.cxx
@@ -2318,7 +2318,7 @@ static bool ImplIsValidTimePortion( bool _bSkipInvalidCharacters, const OUString
static bool ImplCutTimePortion( OUStringBuffer& _rStr, sal_Int32 _nSepPos, bool _bSkipInvalidCharacters, short* _pPortion )
{
- OUString sPortion(_rStr.getStr(), _nSepPos );
+ OUString sPortion(_rStr.subView(0, _nSepPos));
if (_nSepPos < _rStr.getLength())
_rStr.remove(0, _nSepPos + 1);
diff --git a/vcl/source/gdi/mtfxmldump.cxx b/vcl/source/gdi/mtfxmldump.cxx
index fc38ee0a5a97..1b85e23fb584 100644
--- a/vcl/source/gdi/mtfxmldump.cxx
+++ b/vcl/source/gdi/mtfxmldump.cxx
@@ -575,7 +575,7 @@ OString toHexString(const std::vector<unsigned char>& a)
aStrm << std::setw(2) << std::setfill('0') << std::hex << static_cast<int>(i);
}
- return OString(aStrm.str().c_str());
+ return OString(aStrm.str());
}
void writeBitmapContentChecksum(tools::XmlWriter& rWriter, Bitmap const& rBitmap)