reportdesign: Use const OUString& instead of const char* param

Change-Id: Ic76641beb8644e6b3348bd9d73a8a906b4cd5988
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187919
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This commit is contained in:
Michael Weghorn
2025-07-16 07:48:26 +02:00
parent 81a1eaa5f3
commit 0adfac0338
2 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ namespace rptui
const OUString m_sPattern;
public:
ConditionalExpression( const char* _pAsciiPattern );
ConditionalExpression(const OUString& sPattern);
/** assembles an expression string from a field data source, and one or two operands
*/
@@ -29,8 +29,8 @@ namespace rptui
// = ConditionalExpression
ConditionalExpression::ConditionalExpression( const char* _pAsciiPattern )
:m_sPattern( OUString::createFromAscii( _pAsciiPattern ) )
ConditionalExpression::ConditionalExpression(const OUString& sPattern)
: m_sPattern(sPattern)
{
}
@@ -163,14 +163,14 @@ namespace rptui
{
ConditionalExpressions().swap(_out_rCondExp);
_out_rCondExp[ eBetween ] = std::make_shared<ConditionalExpression>( "AND( ( $$ ) >= ( $1 ); ( $$ ) <= ( $2 ) )" );
_out_rCondExp[ eNotBetween ] = std::make_shared<ConditionalExpression>( "NOT( AND( ( $$ ) >= ( $1 ); ( $$ ) <= ( $2 ) ) )" );
_out_rCondExp[ eEqualTo ] = std::make_shared<ConditionalExpression>( "( $$ ) = ( $1 )" );
_out_rCondExp[ eNotEqualTo ] = std::make_shared<ConditionalExpression>( "( $$ ) <> ( $1 )" );
_out_rCondExp[ eGreaterThan ] = std::make_shared<ConditionalExpression>( "( $$ ) > ( $1 )" );
_out_rCondExp[ eLessThan ] = std::make_shared<ConditionalExpression>( "( $$ ) < ( $1 )" );
_out_rCondExp[ eGreaterOrEqual ] = std::make_shared<ConditionalExpression>( "( $$ ) >= ( $1 )" );
_out_rCondExp[ eLessOrEqual ] = std::make_shared<ConditionalExpression>( "( $$ ) <= ( $1 )" );
_out_rCondExp[ eBetween ] = std::make_shared<ConditionalExpression>(u"AND( ( $$ ) >= ( $1 ); ( $$ ) <= ( $2 ) )"_ustr);
_out_rCondExp[ eNotBetween ] = std::make_shared<ConditionalExpression>(u"NOT( AND( ( $$ ) >= ( $1 ); ( $$ ) <= ( $2 ) ) )"_ustr);
_out_rCondExp[ eEqualTo ] = std::make_shared<ConditionalExpression>(u"( $$ ) = ( $1 )"_ustr);
_out_rCondExp[ eNotEqualTo ] = std::make_shared<ConditionalExpression>(u"( $$ ) <> ( $1 )"_ustr);
_out_rCondExp[ eGreaterThan ] = std::make_shared<ConditionalExpression>(u"( $$ ) > ( $1 )"_ustr);
_out_rCondExp[ eLessThan ] = std::make_shared<ConditionalExpression>(u"( $$ ) < ( $1 )"_ustr);
_out_rCondExp[ eGreaterOrEqual ] = std::make_shared<ConditionalExpression>(u"( $$ ) >= ( $1 )"_ustr);
_out_rCondExp[ eLessOrEqual ] = std::make_shared<ConditionalExpression>(u"( $$ ) <= ( $1 )"_ustr);
return _out_rCondExp.size();
}