summaryrefslogtreecommitdiff
path: root/sfx2/source/doc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-04-21 10:12:53 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-04-21 21:46:09 +0200
commitf712c531336b2c44636a35ad682913550640e0d3 (patch)
tree17f96584923f9de4945479eb67d65fa7b2a2331e /sfx2/source/doc
parent90cbe03a0bd65151c197d3d4aeaf48a696f13fad (diff)
loplugin:unnecessarygetstr extend to checking std::string::c_str
Change-Id: I17398e2a6a31a2c98ba8e54b5c8045f22aee8759 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150749 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/source/doc')
-rw-r--r--sfx2/source/doc/autoredactdialog.cxx10
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx2
2 files changed, 6 insertions, 6 deletions
diff --git a/sfx2/source/doc/autoredactdialog.cxx b/sfx2/source/doc/autoredactdialog.cxx
index 5e61849c079a..f84af9622f95 100644
--- a/sfx2/source/doc/autoredactdialog.cxx
+++ b/sfx2/source/doc/autoredactdialog.cxx
@@ -367,14 +367,14 @@ boost::property_tree::ptree redactionTargetToJSON(const RedactionTarget* pTarget
std::unique_ptr<RedactionTarget>
JSONtoRedactionTarget(const boost::property_tree::ptree::value_type& rValue)
{
- OUString sName = OUString::fromUtf8(rValue.second.get<std::string>("sName").c_str());
+ OUString sName = OUString::fromUtf8(rValue.second.get<std::string>("sName"));
RedactionTargetType eType
= static_cast<RedactionTargetType>(atoi(rValue.second.get<std::string>("eType").c_str()));
- OUString sContent = OUString::fromUtf8(rValue.second.get<std::string>("sContent").c_str());
+ OUString sContent = OUString::fromUtf8(rValue.second.get<std::string>("sContent"));
bool bCaseSensitive
- = OUString::fromUtf8(rValue.second.get<std::string>("bCaseSensitive").c_str()).toBoolean();
+ = OUString::fromUtf8(rValue.second.get<std::string>("bCaseSensitive")).toBoolean();
bool bWholeWords
- = OUString::fromUtf8(rValue.second.get<std::string>("bWholeWords").c_str()).toBoolean();
+ = OUString::fromUtf8(rValue.second.get<std::string>("bWholeWords")).toBoolean();
sal_uInt32 nID = atoi(rValue.second.get<std::string>("nID").c_str());
return std::unique_ptr<RedactionTarget>(
@@ -607,7 +607,7 @@ SfxAutoRedactDialog::~SfxAutoRedactDialog()
boost::property_tree::write_json(aStream, aTargetsTree, false);
- OUString sUserDataStr(OUString::fromUtf8(aStream.str().c_str()));
+ OUString sUserDataStr(OUString::fromUtf8(aStream.str()));
// Store the dialog data
SvtViewOptions aDlgOpt(EViewType::Dialog, m_xDialog->get_help_id());
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 73f0a3137d7e..8ff60d41ff90 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -3217,7 +3217,7 @@ void SfxBaseModel::impl_store( const OUString& sURL
std::stringstream aErrCode;
aErrCode << nErrCode;
throw task::ErrorCodeIOException(
- "SfxBaseModel::impl_store <" + sURL + "> failed: " + OUString::fromUtf8(aErrCode.str().c_str()),
+ "SfxBaseModel::impl_store <" + sURL + "> failed: " + OUString::fromUtf8(aErrCode.str()),
Reference< XInterface >(), sal_uInt32(nErrCode));
}
}