loplugin:changetoolsgen in svx
and fix the regex in the plugin for matching += operator Change-Id: I26b3e3fac1d4ef3e756cc9431b983b5f27ee76d6 Reviewed-on: https://gerrit.libreoffice.org/50037 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -214,13 +214,13 @@ bool ChangeToolsGen::ChangeBinaryOperatorPlusMinus(BinaryOperator const* binaryO
|
||||
std::string newText;
|
||||
if (binaryOp->getOpcode() == BO_AddAssign)
|
||||
{
|
||||
newText = std::regex_replace(callText, std::regex(methodName + " *\\( *\\) +\\+= *"),
|
||||
newText = std::regex_replace(callText, std::regex(methodName + " *\\( *\\) *\\+= *"),
|
||||
"Adjust" + methodName + "(");
|
||||
newText += " )";
|
||||
}
|
||||
else
|
||||
{
|
||||
newText = std::regex_replace(callText, std::regex(methodName + " *\\( *\\) +\\-= *"),
|
||||
newText = std::regex_replace(callText, std::regex(methodName + " *\\( *\\) *\\-= *"),
|
||||
"Adjust" + methodName + "( -(");
|
||||
newText += ") )";
|
||||
}
|
||||
|
Reference in New Issue
Block a user