[Libreoffice-bugs] [Bug 112689] New: Replace chained O(U)StringBuffer::append() with operator+
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Wed Sep 27 09:21:25 UTC 2017
https://bugs.documentfoundation.org/show_bug.cgi?id=112689
Bug ID: 112689
Summary: Replace chained O(U)StringBuffer::append() with
operator+
Product: LibreOffice
Version: 6.0.0.0.alpha0+ Master
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: enhancement
Priority: medium
Component: LibreOffice
Assignee: libreoffice-bugs at lists.freedesktop.org
Reporter: muhammet.kara at pardus.org.tr
This is a follow-up from
https://bugs.documentfoundation.org/show_bug.cgi?id=57950
The codebase contains code such as:
OUStringBuffer buf;
buf.append( "pyuno bridge: expected for method " );
buf.append( aFunctionName );
buf.append( " one return value and " );
buf.append( aOutParamIndex.getLength() );
buf.append( " out parameters, got a sequence of " );
buf.append( seq.getLength() );
buf.append( " elements as return value." );
which could be more easily written as:
OUString sMsg = "pyuno bridge: expected for method "
+ aFunctionName
+ " one return value and "
+ OUString::number(aOutParamIndex.getLength())
+ " out parameters, got a sequence of "
+ OUString::number(seq.getLength())
+ " elements as return value.";
All these chained calls to OStringBuffer::append() and OUStringBuffer::append()
can be simply replaced by usage of operator+ as written in the example above.
Here is an example commit:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=7810858ee6cac233ce5868de1f2ef5de1d443af4
(You may also check the related bug reports for more examples.)
And you may check these files for some possible instances:
pyuno/source/module/pyuno_module.cxx
extensions/source/config/ldap/ldapaccess.cxx
extensions/source/propctrlr/selectlabeldialog.cxx
starmath/source/dialog.cxx
starmath/source/rtfexport.cxx
filter/source/graphicfilter/ipict/shape.cxx
ucb/source/ucp/ftp/ftpurl.cxx
ucb/source/core/provprox.cxx
desktop/source/deployment/registry/component/dp_component.cxx
svtools/source/misc/transfer.cxx
svtools/source/svhtml/htmlout.cxx
vcl/source/uitest/uiobject.cxx
vcl/source/window/mnemonic.cxx
vcl/unx/generic/fontmanager/fontconfig.cxx
cui/source/options/certpath.cxx
cui/source/options/optgdlg.cxx
cui/source/options/optlingu.cxx
unotools/source/config/configpaths.cxx
unotools/source/config/bootstrap.cxx
sax/source/tools/converter.cxx
connectivity/source/commontools/sqlerror.cxx
connectivity/source/drivers/firebird/Util.cxx
idlc/source/options.cxx
sc/source/ui/dbgui/foptmgr.cxx
sc/source/ui/condformat/condformathelper.cxx
sc/source/ui/condformat/condformatmgr.cxx
sc/source/ui/vba/vbahyperlink.cxx
sc/source/ui/view/tabview.cxx
sc/source/ui/view/cellsh1.cxx
sc/source/ui/view/editsh.cxx
sc/source/filter/html/htmlexp2.cxx
sc/source/filter/html/htmlexp.cxx
sc/source/filter/dif/difimp.cxx
sc/source/filter/oox/querytablebuffer.cxx
sc/source/filter/oox/worksheethelper.cxx
sc/source/filter/oox/formulabase.cxx
sc/source/filter/oox/drawingfragment.cxx
sc/source/filter/oox/autofilterbuffer.cxx
sc/source/filter/excel/xipivot.cxx
sc/source/filter/excel/xehelper.cxx
sc/source/filter/excel/xiescher.cxx
sc/source/core/tool/compiler.cxx
sc/source/core/tool/address.cxx
sc/source/core/tool/chgtrack.cxx
sc/source/core/data/postit.cxx
sc/source/core/data/validat.cxx
sc/qa/unit/subsequent_filters-test.cxx
sc/qa/unit/helper/qahelper.cxx
sal/test/testbootstrap.cxx
xmlhelp/source/cxxhelp/provider/databases.cxx
sw/source/ui/config/mailconfigpage.cxx
sw/source/ui/vba/vbarow.cxx
sw/source/ui/vba/vbacolumn.cxx
sw/source/filter/html/htmltabw.cxx
sw/source/filter/html/htmlflywriter.cxx
sw/source/filter/html/htmlftn.cxx
sw/source/filter/html/swhtml.cxx
sw/source/filter/html/htmldrawwriter.cxx
sw/source/filter/html/htmlplug.cxx
sw/source/filter/html/wrthtml.cxx
sw/source/filter/html/htmlfldw.cxx
sw/source/filter/html/htmlbas.cxx
sw/source/filter/ww8/docxsdrexport.cxx
sw/source/filter/ww8/rtfsdrexport.cxx
sw/source/filter/ww8/docxattributeoutput.cxx
sw/source/filter/ww8/wrtw8esh.cxx
sw/source/filter/ww8/rtfattributeoutput.cxx
sw/source/filter/ww8/rtfexport.cxx
sw/source/uibase/dbui/dbmgr.cxx
sw/source/uibase/docvw/edtwin.cxx
sw/source/uibase/docvw/edtwin2.cxx
sw/source/uibase/ribbar/inputwin.cxx
sw/source/core/doc/docbm.cxx
sw/source/core/crsr/bookmrk.cxx
sw/qa/core/layout-test.cxx
sw/qa/core/macros-test.cxx
basic/source/runtime/methods.cxx
sfx2/source/dialog/versdlg.cxx
sfx2/source/appl/childwin.cxx
sfx2/source/appl/newhelp.cxx
sfx2/source/appl/appuno.cxx
sfx2/source/appl/macroloader.cxx
sfx2/source/bastyp/frmhtmlw.cxx
oox/source/vml/vmlinputstream.cxx
oox/source/vml/vmlformatting.cxx
oox/source/ole/vbamodule.cxx
oox/source/export/vmlexport.cxx
oox/source/core/xmlfilterbase.cxx
oox/source/dump/dumperbase.cxx
oox/source/drawingml/chart/objectformatter.cxx
oox/source/drawingml/chart/titlecontext.cxx
oox/source/drawingml/lineproperties.cxx
i18npool/source/collator/collator_unicode.cxx
i18npool/source/breakiterator/breakiteratorImpl.cxx
i18npool/source/breakiterator/xdictionary.cxx
i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
i18npool/source/localedata/localedata.cxx
sdext/source/pdfimport/tree/genericelements.cxx
workdir/UnpackedTarball/hunspell/src/tools/hunspell.cxx
workdir/UnpackedTarball/icu/source/test/perf/DateFmtPerf/DateFmtPerf.h
workdir/UnpackedTarball/icu/source/common/unicode/localpointer.h
workdir/UnpackedTarball/firebird/src/dsql/DdlNodes.h
workdir/UnpackedTarball/firebird/src/common/StatusArg.h
sd/source/ui/remotecontrol/Listener.cxx
sd/source/core/drawdoc3.cxx
sd/source/core/sdpage2.cxx
sd/source/core/sdpage.cxx
editeng/source/misc/svxacorr.cxx
xmloff/source/forms/elementimport.cxx
xmloff/source/forms/layerimport.cxx
svl/source/misc/urihelper.cxx
svl/source/numbers/zforlist.cxx
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20170927/06dfc43a/attachment-0001.html>
More information about the Libreoffice-bugs
mailing list