[Libreoffice-commits] core.git: basctl/source basegfx/source basic/source canvas/source chart2/inc chart2/qa chart2/source codemaker/source comphelper/source compilerplugins/clang configmgr/source connectivity/source dbaccess/source desktop/source editeng/source embeddedobj/source extensions/source filter/source formula/source framework/inc framework/source i18nlangtag/source i18npool/inc i18npool/source include/basic include/codemaker include/comphelper include/connectivity include/editeng include/i18nlangtag include/oox include/sfx2 include/svl include/svtools include/svx include/toolkit include/ucbhelper include/unotools include/vbahelper include/vcl include/xmloff l10ntools/inc l10ntools/source linguistic/source lotuswordpro/source oox/source opencl/inc opencl/source package/inc package/source pyuno/source reportdesign/source rsc/inc rsc/source sal/qa sc/inc sc/source sdext/source sd/inc sd/source sfx2/inc sfx2/source slideshow/source starmath/inc starmath/source stoc/source svl/source svtool s/source svx/inc svx/source sw/inc sw/source toolkit/source ucbhelper/source ucb/source UnoControls/source unotools/source vbahelper/source vcl/inc vcl/source vcl/unx writerfilter/inc writerfilter/source writerperfect/source xmlhelp/source xmloff/inc xmloff/source xmlsecurity/source

Noel Grandin noel at peralex.com
Wed Jul 27 06:49:08 UTC 2016


 UnoControls/source/controls/framecontrol.cxx                             |    2 
 UnoControls/source/inc/framecontrol.hxx                                  |    2 
 basctl/source/basicide/baside2.cxx                                       |    2 
 basctl/source/basicide/baside2.hxx                                       |    2 
 basctl/source/dlged/dlged.cxx                                            |    2 
 basctl/source/inc/dlged.hxx                                              |    2 
 basegfx/source/tools/b2dclipstate.cxx                                    |    2 
 basic/source/classes/errobject.cxx                                       |    4 
 basic/source/classes/sb.cxx                                              |    2 
 basic/source/classes/sbunoobj.cxx                                        |    6 
 basic/source/classes/sbxmod.cxx                                          |    2 
 basic/source/inc/errobject.hxx                                           |    4 
 basic/source/runtime/methods.cxx                                         |    2 
 basic/source/runtime/methods1.cxx                                        |    2 
 canvas/source/cairo/cairo_spritecanvashelper.cxx                         |    4 
 canvas/source/cairo/cairo_spritecanvashelper.hxx                         |    4 
 chart2/inc/ChartModel.hxx                                                |    2 
 chart2/qa/extras/chart2export.cxx                                        |    2 
 chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx          |    2 
 chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx          |    2 
 chart2/source/controller/dialogs/DialogModel.cxx                         |    2 
 chart2/source/controller/dialogs/DialogModel.hxx                         |    2 
 chart2/source/controller/dialogs/RangeSelectionHelper.cxx                |    2 
 chart2/source/controller/inc/RangeSelectionHelper.hxx                    |    2 
 chart2/source/inc/ExplicitCategoriesProvider.hxx                         |    2 
 chart2/source/inc/chartview/DrawModelWrapper.hxx                         |    4 
 chart2/source/model/main/ChartModel.cxx                                  |    2 
 chart2/source/tools/ExplicitCategoriesProvider.cxx                       |    2 
 chart2/source/view/inc/VDataSeries.hxx                                   |    4 
 chart2/source/view/main/DrawModelWrapper.cxx                             |    4 
 chart2/source/view/main/DummyXShape.cxx                                  |    2 
 chart2/source/view/main/VDataSeries.cxx                                  |    4 
 codemaker/source/codemaker/options.cxx                                   |    2 
 comphelper/source/container/container.cxx                                |    2 
 comphelper/source/misc/accessibletexthelper.cxx                          |    4 
 comphelper/source/property/propertysetinfo.cxx                           |    4 
 comphelper/source/xml/ofopxmlhelper.cxx                                  |    4 
 compilerplugins/clang/passstuffbyref.cxx                                 |   94 ++++++++--
 configmgr/source/lock.cxx                                                |    2 
 configmgr/source/lock.hxx                                                |    2 
 configmgr/source/propertynode.cxx                                        |    2 
 configmgr/source/propertynode.hxx                                        |    2 
 configmgr/source/rootaccess.cxx                                          |    2 
 configmgr/source/rootaccess.hxx                                          |    2 
 connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx           |   26 +-
 connectivity/source/commontools/dbconversion.cxx                         |    2 
 connectivity/source/cpool/ZPoolCollection.cxx                            |    2 
 connectivity/source/cpool/ZPoolCollection.hxx                            |    2 
 connectivity/source/drivers/calc/CConnection.cxx                         |    2 
 connectivity/source/drivers/dbase/DIndex.cxx                             |    2 
 connectivity/source/drivers/hsqldb/HDriver.cxx                           |    2 
 connectivity/source/drivers/hsqldb/HStorageMap.cxx                       |    6 
 connectivity/source/drivers/jdbc/Object.cxx                              |    2 
 connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx               |    2 
 connectivity/source/inc/FDatabaseMetaDataResultSet.hxx                   |   26 +-
 connectivity/source/inc/calc/CConnection.hxx                             |    2 
 connectivity/source/inc/dbase/DIndex.hxx                                 |    2 
 connectivity/source/inc/hsqldb/HDriver.hxx                               |    2 
 connectivity/source/inc/hsqldb/HStorageMap.hxx                           |    6 
 dbaccess/source/core/api/RowSetCacheIterator.cxx                         |    3 
 dbaccess/source/core/api/RowSetCacheIterator.hxx                         |    2 
 dbaccess/source/core/dataaccess/connection.cxx                           |    2 
 dbaccess/source/core/dataaccess/connection.hxx                           |    2 
 dbaccess/source/core/dataaccess/databasedocument.cxx                     |    4 
 dbaccess/source/core/dataaccess/databasedocument.hxx                     |    4 
 dbaccess/source/filter/xml/xmlExport.cxx                                 |    6 
 dbaccess/source/filter/xml/xmlExport.hxx                                 |    6 
 dbaccess/source/filter/xml/xmlfilter.cxx                                 |    6 
 dbaccess/source/filter/xml/xmlfilter.hxx                                 |    6 
 dbaccess/source/ui/control/ColumnControlWindow.cxx                       |    2 
 dbaccess/source/ui/dlg/DbAdminImpl.cxx                                   |    2 
 dbaccess/source/ui/dlg/DbAdminImpl.hxx                                   |    2 
 dbaccess/source/ui/dlg/sqlmessage.cxx                                    |    6 
 dbaccess/source/ui/inc/ColumnControlWindow.hxx                           |    2 
 dbaccess/source/ui/inc/WCopyTable.hxx                                    |    2 
 dbaccess/source/ui/misc/WCopyTable.cxx                                   |    2 
 desktop/source/deployment/registry/dp_backenddb.cxx                      |    4 
 desktop/source/deployment/registry/help/dp_help.cxx                      |    4 
 desktop/source/deployment/registry/inc/dp_backenddb.hxx                  |    4 
 editeng/source/accessibility/AccessibleEditableTextPara.cxx              |    2 
 editeng/source/editeng/eerdll.cxx                                        |    4 
 editeng/source/editeng/eerdll2.hxx                                       |    4 
 editeng/source/editeng/impedit.hxx                                       |    6 
 editeng/source/editeng/impedit3.cxx                                      |    4 
 editeng/source/editeng/impedit4.cxx                                      |    2 
 editeng/source/uno/unoipset.cxx                                          |    2 
 embeddedobj/source/commonembedding/embedobj.cxx                          |    2 
 embeddedobj/source/general/docholder.cxx                                 |    2 
 embeddedobj/source/inc/commonembobj.hxx                                  |    2 
 embeddedobj/source/inc/docholder.hxx                                     |    2 
 extensions/source/bibliography/bibconfig.cxx                             |    2 
 extensions/source/bibliography/bibconfig.hxx                             |    2 
 extensions/source/bibliography/bibload.cxx                               |   10 -
 extensions/source/bibliography/datman.cxx                                |    4 
 extensions/source/bibliography/datman.hxx                                |    4 
 extensions/source/propctrlr/composeduiupdate.cxx                         |    2 
 extensions/source/propctrlr/composeduiupdate.hxx                         |    2 
 filter/source/flash/swfwriter.hxx                                        |    2 
 filter/source/flash/swfwriter1.cxx                                       |    2 
 formula/source/ui/dlg/formula.cxx                                        |    4 
 framework/inc/helper/mischelper.hxx                                      |    2 
 framework/source/fwe/classes/imagewrapper.cxx                            |    2 
 framework/source/fwe/classes/rootactiontriggercontainer.cxx              |    2 
 framework/source/fwi/helper/mischelper.cxx                               |    2 
 framework/source/services/substitutepathvars.cxx                         |    4 
 i18nlangtag/source/languagetag/languagetag.cxx                           |   20 +-
 i18npool/inc/characterclassificationImpl.hxx                             |    2 
 i18npool/inc/indexentrysupplier.hxx                                      |    2 
 i18npool/inc/xdictionary.hxx                                             |    2 
 i18npool/source/breakiterator/xdictionary.cxx                            |    2 
 i18npool/source/characterclassification/characterclassificationImpl.cxx  |    2 
 i18npool/source/indexentry/indexentrysupplier.cxx                        |    2 
 include/basic/sbmod.hxx                                                  |    2 
 include/basic/sbstar.hxx                                                 |    2 
 include/codemaker/options.hxx                                            |    2 
 include/comphelper/accessibletexthelper.hxx                              |    4 
 include/comphelper/container.hxx                                         |    2 
 include/connectivity/dbconversion.hxx                                    |    2 
 include/editeng/unoipset.hxx                                             |    2 
 include/i18nlangtag/languagetag.hxx                                      |    2 
 include/oox/drawingml/shape.hxx                                          |    4 
 include/oox/ole/axcontrol.hxx                                            |    2 
 include/oox/ole/vbaproject.hxx                                           |    4 
 include/oox/ppt/timenode.hxx                                             |    2 
 include/sfx2/docfile.hxx                                                 |    2 
 include/sfx2/sfxbasemodel.hxx                                            |    2 
 include/sfx2/thumbnailviewitem.hxx                                       |    2 
 include/svl/itemprop.hxx                                                 |    2 
 include/svl/style.hxx                                                    |    2 
 include/svtools/fmtfield.hxx                                             |    2 
 include/svx/sdr/contact/viewcontact.hxx                                  |    2 
 include/svx/sdr/contact/viewcontactofe3d.hxx                             |    2 
 include/svx/sdr/contact/viewobjectcontact.hxx                            |    2 
 include/svx/sdr/overlay/overlaymanager.hxx                               |    2 
 include/svx/sdrpaintwindow.hxx                                           |    2 
 include/svx/svdmodel.hxx                                                 |    2 
 include/svx/svdoashp.hxx                                                 |    2 
 include/svx/svdpage.hxx                                                  |    2 
 include/svx/textchain.hxx                                                |    4 
 include/svx/xmleohlp.hxx                                                 |    2 
 include/svx/xtable.hxx                                                   |    6 
 include/toolkit/awt/vclxprinter.hxx                                      |    2 
 include/ucbhelper/interactionrequest.hxx                                 |    2 
 include/unotools/lingucfg.hxx                                            |    2 
 include/unotools/localedatawrapper.hxx                                   |    2 
 include/vbahelper/vbahelper.hxx                                          |    2 
 include/vbahelper/vbashaperange.hxx                                      |    2 
 include/vcl/commandinfoprovider.hxx                                      |    8 
 include/vcl/edit.hxx                                                     |    2 
 include/vcl/helper.hxx                                                   |    4 
 include/vcl/layout.hxx                                                   |    4 
 include/vcl/longcurr.hxx                                                 |    2 
 include/vcl/mnemonic.hxx                                                 |    2 
 include/vcl/tabctrl.hxx                                                  |    2 
 include/vcl/texteng.hxx                                                  |    6 
 include/xmloff/xmlexp.hxx                                                |   28 +-
 include/xmloff/xmlimp.hxx                                                |   16 -
 l10ntools/inc/export.hxx                                                 |    2 
 l10ntools/inc/po.hxx                                                     |    6 
 l10ntools/source/merge.cxx                                               |    2 
 l10ntools/source/po.cxx                                                  |    6 
 linguistic/source/gciterator.cxx                                         |    2 
 linguistic/source/gciterator.hxx                                         |    2 
 lotuswordpro/source/filter/lwpcelllayout.cxx                             |    2 
 lotuswordpro/source/filter/lwpcelllayout.hxx                             |    2 
 lotuswordpro/source/filter/lwppara.hxx                                   |    2 
 lotuswordpro/source/filter/lwppara1.cxx                                  |    2 
 oox/source/drawingml/shape.cxx                                           |    4 
 oox/source/ole/axcontrol.cxx                                             |    2 
 oox/source/ole/vbaproject.cxx                                            |    4 
 oox/source/shape/ShapeContextHandler.cxx                                 |   14 -
 oox/source/shape/ShapeContextHandler.hxx                                 |   14 -
 opencl/inc/opencl_device.hxx                                             |    2 
 opencl/source/opencl_device.cxx                                          |    2 
 opencl/source/openclwrapper.cxx                                          |    2 
 package/inc/ZipPackageStream.hxx                                         |    2 
 package/source/xstor/owriteablestream.cxx                                |    6 
 package/source/xstor/owriteablestream.hxx                                |    6 
 package/source/zippackage/ZipPackageStream.cxx                           |    2 
 pyuno/source/module/pyuno_impl.hxx                                       |    2 
 pyuno/source/module/pyuno_runtime.cxx                                    |    2 
 reportdesign/source/ui/inc/ReportController.hxx                          |    4 
 reportdesign/source/ui/report/ReportController.cxx                       |    4 
 rsc/inc/rsctop.hxx                                                       |    2 
 rsc/source/parser/rscdb.cxx                                              |    4 
 rsc/source/res/rsctop.cxx                                                |    2 
 sal/qa/osl/file/osl_File.cxx                                             |    2 
 sc/inc/docuno.hxx                                                        |    2 
 sc/inc/dpobject.hxx                                                      |    2 
 sc/inc/pivot.hxx                                                         |    4 
 sc/inc/viewopti.hxx                                                      |    2 
 sc/source/core/data/dpobject.cxx                                         |    2 
 sc/source/core/data/pivot2.cxx                                           |    4 
 sc/source/core/opencl/formulagroupcl.cxx                                 |    4 
 sc/source/core/tool/calcconfig.cxx                                       |    2 
 sc/source/core/tool/viewopti.cxx                                         |    2 
 sc/source/filter/excel/xechart.cxx                                       |    2 
 sc/source/filter/excel/xeroot.cxx                                        |    2 
 sc/source/filter/inc/commentsbuffer.hxx                                  |    2 
 sc/source/filter/inc/richstring.hxx                                      |    2 
 sc/source/filter/inc/stylesbuffer.hxx                                    |    6 
 sc/source/filter/inc/workbooksettings.hxx                                |    2 
 sc/source/filter/inc/xechart.hxx                                         |    2 
 sc/source/filter/inc/xeroot.hxx                                          |    2 
 sc/source/filter/oox/commentsbuffer.cxx                                  |    2 
 sc/source/filter/oox/richstring.cxx                                      |    2 
 sc/source/filter/oox/stylesbuffer.cxx                                    |    6 
 sc/source/filter/oox/workbooksettings.cxx                                |    2 
 sc/source/filter/xml/xmlsubti.cxx                                        |    8 
 sc/source/filter/xml/xmlsubti.hxx                                        |    4 
 sc/source/ui/unoobj/docuno.cxx                                           |    2 
 sc/source/ui/vba/excelvbahelper.cxx                                      |    2 
 sc/source/ui/vba/vbaapplication.cxx                                      |    2 
 sc/source/ui/vba/vbachartobject.cxx                                      |    2 
 sc/source/ui/vba/vbachartobject.hxx                                      |    2 
 sc/source/ui/vba/vbaformat.cxx                                           |    2 
 sc/source/ui/vba/vbaformat.hxx                                           |    2 
 sc/source/ui/vba/vbaglobals.cxx                                          |    6 
 sc/source/ui/vba/vbaglobals.hxx                                          |    2 
 sc/source/ui/vba/vbasheetobjects.cxx                                     |    4 
 sd/inc/sdpage.hxx                                                        |    4 
 sd/source/core/sdpage_animations.cxx                                     |    4 
 sd/source/filter/html/buttonset.cxx                                      |    4 
 sd/source/filter/html/htmlex.cxx                                         |    2 
 sd/source/filter/html/htmlex.hxx                                         |    2 
 sd/source/filter/ppt/ppt97animations.cxx                                 |    4 
 sd/source/filter/ppt/ppt97animations.hxx                                 |    4 
 sd/source/ui/inc/SlideSorter.hxx                                         |    4 
 sd/source/ui/presenter/PresenterTextView.cxx                             |    4 
 sd/source/ui/slidesorter/controller/SlideSorterController.cxx            |    8 
 sd/source/ui/slidesorter/controller/SlsInsertionIndicatorHandler.cxx     |    2 
 sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx        |    8 
 sd/source/ui/slidesorter/inc/controller/SlsInsertionIndicatorHandler.hxx |    2 
 sd/source/ui/slidesorter/inc/controller/SlsTransferableData.hxx          |    2 
 sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx                    |    6 
 sd/source/ui/slidesorter/shell/SlideSorter.cxx                           |    4 
 sd/source/ui/slidesorter/view/SlideSorterView.cxx                        |    6 
 sd/source/ui/unoidl/facreg.cxx                                           |    2 
 sdext/source/presenter/PresenterAccessibility.cxx                        |    4 
 sdext/source/presenter/PresenterBitmapContainer.cxx                      |    2 
 sdext/source/presenter/PresenterBitmapContainer.hxx                      |    2 
 sdext/source/presenter/PresenterButton.cxx                               |    2 
 sdext/source/presenter/PresenterButton.hxx                               |    2 
 sdext/source/presenter/PresenterScrollBar.cxx                            |    2 
 sdext/source/presenter/PresenterScrollBar.hxx                            |    2 
 sdext/source/presenter/PresenterToolBar.cxx                              |    6 
 sdext/source/presenter/PresenterToolBar.hxx                              |    2 
 sfx2/inc/guisaveas.hxx                                                   |    6 
 sfx2/source/appl/newhelp.cxx                                             |    2 
 sfx2/source/appl/newhelp.hxx                                             |    2 
 sfx2/source/appl/sfxhelp.cxx                                             |    2 
 sfx2/source/control/thumbnailviewitem.cxx                                |    2 
 sfx2/source/doc/DocumentMetadataAccess.cxx                               |    2 
 sfx2/source/doc/docfile.cxx                                              |    2 
 sfx2/source/doc/doctemplateslocal.cxx                                    |    2 
 sfx2/source/doc/doctemplateslocal.hxx                                    |    2 
 sfx2/source/doc/guisaveas.cxx                                            |   22 +-
 sfx2/source/doc/sfxbasemodel.cxx                                         |    2 
 slideshow/source/engine/shapes/drawshape.cxx                             |    2 
 slideshow/source/engine/shapes/drawshape.hxx                             |    2 
 slideshow/source/engine/shapesubset.cxx                                  |    2 
 slideshow/source/inc/shapesubset.hxx                                     |    2 
 starmath/inc/document.hxx                                                |    2 
 starmath/source/document.cxx                                             |    2 
 stoc/source/servicemanager/servicemanager.cxx                            |    2 
 svl/source/inc/passwordcontainer.hxx                                     |    2 
 svl/source/items/itemprop.cxx                                            |    2 
 svl/source/items/style.cxx                                               |    2 
 svl/source/passwordcontainer/passwordcontainer.cxx                       |    2 
 svtools/source/config/menuoptions.cxx                                    |    4 
 svtools/source/control/fmtfield.cxx                                      |    2 
 svtools/source/control/valueacc.cxx                                      |    2 
 svtools/source/control/valueimp.hxx                                      |    2 
 svtools/source/misc/sampletext.cxx                                       |    8 
 svx/inc/sdr/contact/viewobjectcontactofe3d.hxx                           |    2 
 svx/source/accessibility/charmapacc.cxx                                  |    2 
 svx/source/accessibility/svxpixelctlaccessiblecontext.cxx                |    2 
 svx/source/accessibility/svxrectctaccessiblecontext.cxx                  |    2 
 svx/source/customshapes/EnhancedCustomShapeFontWork.cxx                  |    2 
 svx/source/customshapes/EnhancedCustomShapeFontWork.hxx                  |    2 
 svx/source/dialog/rubydialog.cxx                                         |    4 
 svx/source/form/formcontroller.cxx                                       |    2 
 svx/source/inc/charmapacc.hxx                                            |    4 
 svx/source/inc/datanavi.hxx                                              |    8 
 svx/source/inc/formcontroller.hxx                                        |    2 
 svx/source/inc/svxpixelctlaccessiblecontext.hxx                          |    2 
 svx/source/inc/svxrectctaccessiblecontext.hxx                            |    2 
 svx/source/sdr/contact/viewcontact.cxx                                   |    2 
 svx/source/sdr/contact/viewcontactofe3d.cxx                              |    2 
 svx/source/sdr/contact/viewobjectcontact.cxx                             |    2 
 svx/source/sdr/contact/viewobjectcontactofe3d.cxx                        |    2 
 svx/source/sdr/overlay/overlaymanager.cxx                                |    2 
 svx/source/svdraw/sdrpaintwindow.cxx                                     |    2 
 svx/source/svdraw/svdmodel.cxx                                           |    2 
 svx/source/svdraw/svdoashp.cxx                                           |    2 
 svx/source/svdraw/svdpage.cxx                                            |    2 
 svx/source/xml/xmleohlp.cxx                                              |    2 
 svx/source/xoutdev/xtabdash.cxx                                          |    6 
 sw/inc/authfld.hxx                                                       |    4 
 sw/inc/breakit.hxx                                                       |    2 
 sw/inc/dbmgr.hxx                                                         |    2 
 sw/inc/doc.hxx                                                           |    4 
 sw/inc/ndole.hxx                                                         |    2 
 sw/inc/swmodule.hxx                                                      |    4 
 sw/inc/tox.hxx                                                           |   26 +-
 sw/source/core/access/accpara.cxx                                        |    4 
 sw/source/core/doc/doc.cxx                                               |    2 
 sw/source/core/doc/docnew.cxx                                            |    2 
 sw/source/core/inc/txmsrt.hxx                                            |    4 
 sw/source/core/ole/ndole.cxx                                             |    2 
 sw/source/ui/vba/vbaglobals.cxx                                          |    2 
 sw/source/ui/vba/vbaglobals.hxx                                          |    2 
 sw/source/uibase/app/swmodule.cxx                                        |    4 
 sw/source/uibase/dbui/dbmgr.cxx                                          |    2 
 sw/source/uibase/fldui/fldmgr.cxx                                        |    2 
 sw/source/uibase/inc/fldmgr.hxx                                          |    2 
 toolkit/source/awt/vclxprinter.cxx                                       |    2 
 ucb/source/core/providermap.hxx                                          |    2 
 ucb/source/core/ucb.cxx                                                  |    2 
 ucb/source/ucp/cmis/cmis_content.cxx                                     |    4 
 ucb/source/ucp/cmis/cmis_content.hxx                                     |    4 
 ucb/source/ucp/file/filtask.hxx                                          |    2 
 ucbhelper/source/provider/interactionrequest.cxx                         |    2 
 unotools/source/config/lingucfg.cxx                                      |    2 
 unotools/source/config/moduleoptions.cxx                                 |    2 
 unotools/source/i18n/localedatawrapper.cxx                               |    2 
 vbahelper/source/vbahelper/vbahelper.cxx                                 |    2 
 vbahelper/source/vbahelper/vbashaperange.cxx                             |    2 
 vcl/inc/impfontcharmap.hxx                                               |    2 
 vcl/inc/printdlg.hxx                                                     |    2 
 vcl/inc/unx/freetype_glyphcache.hxx                                      |    2 
 vcl/inc/unx/gtk/gtkinst.hxx                                              |    2 
 vcl/source/control/edit.cxx                                              |    2 
 vcl/source/control/field2.cxx                                            |    2 
 vcl/source/control/longcurr.cxx                                          |    2 
 vcl/source/control/tabctrl.cxx                                           |    2 
 vcl/source/edit/texteng.cxx                                              |    6 
 vcl/source/font/fontcharmap.cxx                                          |    2 
 vcl/source/helper/commandinfoprovider.cxx                                |    8 
 vcl/source/window/layout.cxx                                             |    4 
 vcl/source/window/mnemonic.cxx                                           |    2 
 vcl/source/window/printdlg.cxx                                           |    2 
 vcl/unx/generic/fontmanager/helper.cxx                                   |    4 
 vcl/unx/generic/glyphs/freetype_glyphcache.cxx                           |    2 
 vcl/unx/gtk/a11y/atkhypertext.cxx                                        |    2 
 vcl/unx/gtk/gtkinst.cxx                                                  |    2 
 writerfilter/inc/ooxml/QNameToString.hxx                                 |    2 
 writerfilter/source/dmapper/DomainMapper_Impl.cxx                        |   10 -
 writerfilter/source/dmapper/DomainMapper_Impl.hxx                        |   18 -
 writerfilter/source/dmapper/FormControlHelper.cxx                        |   12 -
 writerfilter/source/dmapper/GraphicImport.cxx                            |    2 
 writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx                   |    2 
 writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx                   |    2 
 writerfilter/source/ooxml/OOXMLPropertySet.cxx                           |    2 
 writerfilter/source/ooxml/OOXMLPropertySet.hxx                           |    2 
 writerfilter/source/ooxml/qnametostrcore.cxx                             |    2 
 writerperfect/source/common/WPXSvInputStream.cxx                         |    4 
 xmlhelp/source/cxxhelp/provider/urlparameter.cxx                         |    6 
 xmlhelp/source/cxxhelp/provider/urlparameter.hxx                         |    8 
 xmlhelp/source/treeview/tvread.cxx                                       |    2 
 xmloff/inc/txtfldi.hxx                                                   |    2 
 xmloff/source/text/XMLRedlineExport.cxx                                  |    2 
 xmloff/source/text/XMLRedlineExport.hxx                                  |    2 
 xmloff/source/text/txtfldi.cxx                                           |    2 
 xmlsecurity/source/helper/xsecctl.hxx                                    |    2 
 xmlsecurity/source/helper/xsecverify.cxx                                 |    2 
 366 files changed, 693 insertions(+), 620 deletions(-)

New commits:
commit 508c95f1b655d9cfa6be37a5a9de9aff6fd383bf
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Jul 18 09:22:27 2016 +0200

    improve passstuffbyref return analysis
    
    Change-Id: I4258bcc97273d8bb7a8c4879fac02a427f76e18c
    Reviewed-on: https://gerrit.libreoffice.org/27317
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/UnoControls/source/controls/framecontrol.cxx b/UnoControls/source/controls/framecontrol.cxx
index 658974f..091a86d 100644
--- a/UnoControls/source/controls/framecontrol.cxx
+++ b/UnoControls/source/controls/framecontrol.cxx
@@ -491,7 +491,7 @@ void FrameControl::impl_deleteFrame()
 
 //  private method
 
-const Sequence< Property > FrameControl::impl_getStaticPropertyDescriptor()
+const Sequence< Property >& FrameControl::impl_getStaticPropertyDescriptor()
 {
     // All Properties of this implementation. The array must be sorted!
     static const Property pPropertys[PROPERTY_COUNT] =
diff --git a/UnoControls/source/inc/framecontrol.hxx b/UnoControls/source/inc/framecontrol.hxx
index fa17ebf..e98fdec 100644
--- a/UnoControls/source/inc/framecontrol.hxx
+++ b/UnoControls/source/inc/framecontrol.hxx
@@ -205,7 +205,7 @@ private:
 
     void impl_deleteFrame();
 
-    static const css::uno::Sequence< css::beans::Property > impl_getStaticPropertyDescriptor();
+    static const css::uno::Sequence< css::beans::Property >& impl_getStaticPropertyDescriptor();
 
 //  private variables
 
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index dcbbb3f..1a4ad3e 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -190,7 +190,7 @@ ModulWindow::ModulWindow (ModulWindowLayout* pParent, ScriptDocument const& rDoc
     SetBackground();
 }
 
-SbModuleRef ModulWindow::XModule()
+SbModuleRef const & ModulWindow::XModule()
 {
     // ModuleWindows can now be created as a result of the
     // modules getting created via the api. This is a result of an
diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx
index ba5caba..23d8477 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -314,7 +314,7 @@ private:
     static void         GoOnTop();
 
     sal_Int32           FormatAndPrint( Printer* pPrinter, sal_Int32 nPage = -1 );
-    SbModuleRef         XModule();
+    SbModuleRef const & XModule();
 protected:
     virtual void    Resize() override;
     virtual void    GetFocus() override;
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index 5cd8753..157a2eb 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -251,7 +251,7 @@ DlgEditor::~DlgEditor()
 }
 
 
-Reference< awt::XControlContainer > DlgEditor::GetWindowControlContainer()
+Reference< awt::XControlContainer > const & DlgEditor::GetWindowControlContainer()
 {
     if (!m_xControlContainer.is())
         m_xControlContainer = VCLUnoHelper::CreateControlContainer(&rWindow);
diff --git a/basctl/source/inc/dlged.hxx b/basctl/source/inc/dlged.hxx
index 5963f07..1fba583 100644
--- a/basctl/source/inc/dlged.hxx
+++ b/basctl/source/inc/dlged.hxx
@@ -147,7 +147,7 @@ public:
         @see GetWindow
         @see SetWindow
     */
-    css::uno::Reference< css::awt::XControlContainer >
+    css::uno::Reference< css::awt::XControlContainer > const &
                     GetWindowControlContainer();
 
     void            SetScrollBars( ScrollBar* pHScroll, ScrollBar* pVScroll );
diff --git a/basegfx/source/tools/b2dclipstate.cxx b/basegfx/source/tools/b2dclipstate.cxx
index 251a0e1..d4bc4fa 100644
--- a/basegfx/source/tools/b2dclipstate.cxx
+++ b/basegfx/source/tools/b2dclipstate.cxx
@@ -173,7 +173,7 @@ namespace tools
             addPolyPolygon(rPolyPoly,XOR);
         }
 
-        B2DPolyPolygon getClipPoly() const
+        B2DPolyPolygon const & getClipPoly() const
         {
             commitPendingRanges();
             commitPendingPolygons();
diff --git a/basic/source/classes/errobject.cxx b/basic/source/classes/errobject.cxx
index 7bf2095..45421d5 100644
--- a/basic/source/classes/errobject.cxx
+++ b/basic/source/classes/errobject.cxx
@@ -189,7 +189,7 @@ SbxErrObject::~SbxErrObject()
     OSL_TRACE("SbxErrObject::~SbxErrObject dtor");
 }
 
-uno::Reference< vba::XErrObject >
+uno::Reference< vba::XErrObject > const &
 SbxErrObject::getUnoErrObject()
 {
     SbxVariable* pVar = getErrObject();
@@ -197,7 +197,7 @@ SbxErrObject::getUnoErrObject()
     return pGlobErr->m_xErr;
 }
 
-SbxVariableRef
+SbxVariableRef const &
 SbxErrObject::getErrObject()
 {
     static SbxVariableRef pGlobErr = new SbxErrObject( OUString("Err"), uno::makeAny( uno::Reference< vba::XErrObject >( new ErrObject() ) ) );
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index 6d2aaa6..a4de8a1 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -1815,7 +1815,7 @@ void StarBASIC::SetGlobalBreakHdl( const Link<StarBASIC*,sal_uInt16>& rLink )
     GetSbData()->aBreakHdl = rLink;
 }
 
-SbxArrayRef StarBASIC::getUnoListeners()
+SbxArrayRef const & StarBASIC::getUnoListeners()
 {
     if( !xUnoListeners.Is() )
     {
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 21be5c9..10e96e6 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -167,7 +167,7 @@ Reference< XIdlReflection > getCoreReflection_Impl()
 }
 
 // save CoreReflection statically
-Reference< XHierarchicalNameAccess > getCoreReflection_HierarchicalNameAccess_Impl()
+Reference< XHierarchicalNameAccess > const & getCoreReflection_HierarchicalNameAccess_Impl()
 {
     static Reference< XHierarchicalNameAccess > xCoreReflection_HierarchicalNameAccess;
 
@@ -184,7 +184,7 @@ Reference< XHierarchicalNameAccess > getCoreReflection_HierarchicalNameAccess_Im
 }
 
 // Hold TypeProvider statically
-Reference< XHierarchicalNameAccess > getTypeProvider_Impl()
+Reference< XHierarchicalNameAccess > const & getTypeProvider_Impl()
 {
     static Reference< XHierarchicalNameAccess > xAccess;
 
@@ -210,7 +210,7 @@ Reference< XHierarchicalNameAccess > getTypeProvider_Impl()
 }
 
 // Hold TypeConverter statically
-Reference< XTypeConverter > getTypeConverter_Impl()
+Reference< XTypeConverter > const & getTypeConverter_Impl()
 {
     static Reference< XTypeConverter > xTypeConverter;
 
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 1e59c13..76ab1aa 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -492,7 +492,7 @@ SbModule::~SbModule()
     mxWrapper = nullptr;
 }
 
-uno::Reference< script::XInvocation >
+uno::Reference< script::XInvocation > const &
 SbModule::GetUnoModule()
 {
     if ( !mxWrapper.is() )
diff --git a/basic/source/inc/errobject.hxx b/basic/source/inc/errobject.hxx
index 88cef68..796b831 100644
--- a/basic/source/inc/errobject.hxx
+++ b/basic/source/inc/errobject.hxx
@@ -32,8 +32,8 @@ class SbxErrObject : public SbUnoObject
     virtual ~SbxErrObject();
 
 public:
-    static SbxVariableRef getErrObject();
-    static css::uno::Reference< ooo::vba::XErrObject > getUnoErrObject();
+    static SbxVariableRef const & getErrObject();
+    static css::uno::Reference< ooo::vba::XErrObject > const & getUnoErrObject();
 
     void setNumberAndDescription( ::sal_Int32 _number, const OUString& _description )
         throw (css::uno::RuntimeException);
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 2abca34..420298a 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -160,7 +160,7 @@ OUString getFullPath( const OUString& aRelPath )
 }
 
 // TODO: -> SbiGlobals
-static uno::Reference< ucb::XSimpleFileAccess3 > getFileAccess()
+static uno::Reference< ucb::XSimpleFileAccess3 > const & getFileAccess()
 {
     static uno::Reference< ucb::XSimpleFileAccess3 > xSFI;
     if( !xSFI.is() )
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx
index 6bddfd5..93183d2 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -67,7 +67,7 @@ using namespace com::sun::star::lang;
 using namespace com::sun::star::sheet;
 using namespace com::sun::star::uno;
 
-static Reference< XCalendar4 > getLocaleCalendar()
+static Reference< XCalendar4 > const & getLocaleCalendar()
 {
     static Reference< XCalendar4 > xCalendar;
     if( !xCalendar.is() )
diff --git a/canvas/source/cairo/cairo_spritecanvashelper.cxx b/canvas/source/cairo/cairo_spritecanvashelper.cxx
index 03fa559..8ffa34e 100644
--- a/canvas/source/cairo/cairo_spritecanvashelper.cxx
+++ b/canvas/source/cairo/cairo_spritecanvashelper.cxx
@@ -481,7 +481,7 @@ namespace cairocanvas
         cairo_paint( pWindowCairo.get() );
     }
 
-    ::cairo::SurfaceSharedPtr SpriteCanvasHelper::getCompositingSurface( const ::basegfx::B2ISize& rNeededSize )
+    ::cairo::SurfaceSharedPtr const & SpriteCanvasHelper::getCompositingSurface( const ::basegfx::B2ISize& rNeededSize )
     {
         if( rNeededSize.getX() > maCompositingSurfaceSize.getX() ||
             rNeededSize.getY() > maCompositingSurfaceSize.getY() )
@@ -501,7 +501,7 @@ namespace cairocanvas
         return mpCompositingSurface;
     }
 
-    ::cairo::SurfaceSharedPtr SpriteCanvasHelper::getTemporarySurface()
+    ::cairo::SurfaceSharedPtr const & SpriteCanvasHelper::getTemporarySurface()
     {
         if ( !mpTemporarySurface )
             mpTemporarySurface = createSurface( maCompositingSurfaceSize );
diff --git a/canvas/source/cairo/cairo_spritecanvashelper.hxx b/canvas/source/cairo/cairo_spritecanvashelper.hxx
index 2fc3222..35cf736 100644
--- a/canvas/source/cairo/cairo_spritecanvashelper.hxx
+++ b/canvas/source/cairo/cairo_spritecanvashelper.hxx
@@ -117,8 +117,8 @@ namespace cairocanvas
                             const ::std::vector< ::canvas::Sprite::Reference >& rSortedUpdateSprites );
 
     private:
-        ::cairo::SurfaceSharedPtr getCompositingSurface( const ::basegfx::B2ISize& rNeededSize );
-        ::cairo::SurfaceSharedPtr getTemporarySurface();
+        ::cairo::SurfaceSharedPtr const & getCompositingSurface( const ::basegfx::B2ISize& rNeededSize );
+        ::cairo::SurfaceSharedPtr const & getTemporarySurface();
         ::cairo::SurfaceSharedPtr createSurface( const ::basegfx::B2ISize& rNeededSize ) const;
 
         /// Set from the SpriteCanvas: instance coordinating sprite redraw
diff --git a/chart2/inc/ChartModel.hxx b/chart2/inc/ChartModel.hxx
index b3caaad..92c6c05 100644
--- a/chart2/inc/ChartModel.hxx
+++ b/chart2/inc/ChartModel.hxx
@@ -568,7 +568,7 @@ public:
         throw (css::uno::RuntimeException, std::exception) override;
 
     // normal methods
-    css::uno::Reference< css::util::XNumberFormatsSupplier >
+    css::uno::Reference< css::util::XNumberFormatsSupplier > const &
         getNumberFormatsSupplier();
 
     const css::uno::Reference< css::uno::XInterface >& getChartView() { return xChartView;}
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx
index 846daa7..6f8004d 100644
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -200,7 +200,7 @@ public:
     }
 };
 
-OUString findChartFile(const OUString& rDir, uno::Reference< container::XNameAccess > const & xNames )
+OUString const & findChartFile(const OUString& rDir, uno::Reference< container::XNameAccess > const & xNames )
 {
     uno::Sequence<OUString> rNames = xNames->getElementNames();
     OUString* pElement = std::find_if(rNames.begin(), rNames.end(), CheckForChartName(rDir));
diff --git a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx
index 68c57a5..904ec57 100644
--- a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx
+++ b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx
@@ -98,7 +98,7 @@ Reference< chart2::XDiagram > Chart2ModelContact::getChart2Diagram() const
     return ChartModelHelper::findDiagram( this->getChartModel() );
 }
 
-uno::Reference< lang::XUnoTunnel > Chart2ModelContact::getChartView() const
+uno::Reference< lang::XUnoTunnel > const & Chart2ModelContact::getChartView() const
 {
     if(!m_xChartView.is())
     {
diff --git a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx
index 8b64b5f..a0e9305 100644
--- a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx
+++ b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx
@@ -126,7 +126,7 @@ public:
 
 private: //methods
     ExplicitValueProvider* getExplicitValueProvider() const;
-    css::uno::Reference< css::lang::XUnoTunnel > getChartView() const;
+    css::uno::Reference< css::lang::XUnoTunnel > const & getChartView() const;
 
 public: //member
     css::uno::Reference< css::uno::XComponentContext >  m_xContext;
diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx
index 2503d85..08f391d 100644
--- a/chart2/source/controller/dialogs/DialogModel.cxx
+++ b/chart2/source/controller/dialogs/DialogModel.cxx
@@ -396,7 +396,7 @@ void DialogModel::setTemplate(
     m_xTemplate = xTemplate;
 }
 
-::std::shared_ptr< RangeSelectionHelper >
+::std::shared_ptr< RangeSelectionHelper > const &
     DialogModel::getRangeSelectionHelper() const
 {
     if( ! m_spRangeSelectionHelper.get())
diff --git a/chart2/source/controller/dialogs/DialogModel.hxx b/chart2/source/controller/dialogs/DialogModel.hxx
index a863b61..73fe00a 100644
--- a/chart2/source/controller/dialogs/DialogModel.hxx
+++ b/chart2/source/controller/dialogs/DialogModel.hxx
@@ -76,7 +76,7 @@ public:
     void setTemplate(
         const css::uno::Reference< css::chart2::XChartTypeTemplate > & xTemplate );
 
-    std::shared_ptr< RangeSelectionHelper >
+    std::shared_ptr< RangeSelectionHelper > const &
         getRangeSelectionHelper() const;
 
     css::uno::Reference< css::frame::XModel >
diff --git a/chart2/source/controller/dialogs/RangeSelectionHelper.cxx b/chart2/source/controller/dialogs/RangeSelectionHelper.cxx
index c092b32..013c625 100644
--- a/chart2/source/controller/dialogs/RangeSelectionHelper.cxx
+++ b/chart2/source/controller/dialogs/RangeSelectionHelper.cxx
@@ -54,7 +54,7 @@ bool RangeSelectionHelper::hasRangeSelection()
     return getRangeSelection().is();
 }
 
-Reference< sheet::XRangeSelection > RangeSelectionHelper::getRangeSelection()
+Reference< sheet::XRangeSelection > const & RangeSelectionHelper::getRangeSelection()
 {
     if( !m_xRangeSelection.is() &&
         m_xChartDocument.is() )
diff --git a/chart2/source/controller/inc/RangeSelectionHelper.hxx b/chart2/source/controller/inc/RangeSelectionHelper.hxx
index 049c19e..0b2ab71 100644
--- a/chart2/source/controller/inc/RangeSelectionHelper.hxx
+++ b/chart2/source/controller/inc/RangeSelectionHelper.hxx
@@ -43,7 +43,7 @@ public:
     ~RangeSelectionHelper();
 
     bool hasRangeSelection();
-    css::uno::Reference< css::sheet::XRangeSelection > getRangeSelection();
+    css::uno::Reference< css::sheet::XRangeSelection > const & getRangeSelection();
     void raiseRangeSelectionDocument();
     bool chooseRange(
         const OUString & aCurrentRange,
diff --git a/chart2/source/inc/ExplicitCategoriesProvider.hxx b/chart2/source/inc/ExplicitCategoriesProvider.hxx
index 60de98f..54763be 100644
--- a/chart2/source/inc/ExplicitCategoriesProvider.hxx
+++ b/chart2/source/inc/ExplicitCategoriesProvider.hxx
@@ -59,7 +59,7 @@ public:
 
     css::uno::Reference< css::chart2::data::XDataSequence > getOriginalCategories();
 
-    css::uno::Sequence< OUString > getSimpleCategories();
+    css::uno::Sequence< OUString > const & getSimpleCategories();
     const std::vector<ComplexCategory>* getCategoriesByLevel( sal_Int32 nLevel );
 
     static OUString getCategoryByIndex(
diff --git a/chart2/source/inc/chartview/DrawModelWrapper.hxx b/chart2/source/inc/chartview/DrawModelWrapper.hxx
index 20cbcae..91ac42c 100644
--- a/chart2/source/inc/chartview/DrawModelWrapper.hxx
+++ b/chart2/source/inc/chartview/DrawModelWrapper.hxx
@@ -51,11 +51,11 @@ public:
     css::uno::Reference< css::lang::XMultiServiceFactory > getShapeFactory();
 
     // the main page will contain the normal view objects
-    css::uno::Reference< css::drawing::XDrawPage > getMainDrawPage();
+    css::uno::Reference< css::drawing::XDrawPage > const & getMainDrawPage();
     SAL_DLLPRIVATE void clearMainDrawPage();
 
     // the extra page is not visible, but contains some extras like the symbols for data points
-    css::uno::Reference< css::drawing::XDrawPage > getHiddenDrawPage();
+    css::uno::Reference< css::drawing::XDrawPage > const & getHiddenDrawPage();
 
     static css::uno::Reference< css::drawing::XShapes >
          getChartRootShape( const css::uno::Reference< css::drawing::XDrawPage>& xPage );
diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx
index 48ec543..b9647eb 100644
--- a/chart2/source/model/main/ChartModel.cxx
+++ b/chart2/source/model/main/ChartModel.cxx
@@ -1301,7 +1301,7 @@ Sequence< OUString > SAL_CALL ChartModel::getAvailableServiceNames()
     return aResult;
 }
 
-Reference< util::XNumberFormatsSupplier > ChartModel::getNumberFormatsSupplier()
+Reference< util::XNumberFormatsSupplier > const & ChartModel::getNumberFormatsSupplier()
 {
     if( !m_xNumberFormatsSupplier.is() )
     {
diff --git a/chart2/source/tools/ExplicitCategoriesProvider.cxx b/chart2/source/tools/ExplicitCategoriesProvider.cxx
index fc45f1f..d2f2452 100644
--- a/chart2/source/tools/ExplicitCategoriesProvider.cxx
+++ b/chart2/source/tools/ExplicitCategoriesProvider.cxx
@@ -504,7 +504,7 @@ void ExplicitCategoriesProvider::init()
     }
 }
 
-Sequence< OUString > ExplicitCategoriesProvider::getSimpleCategories()
+Sequence< OUString > const & ExplicitCategoriesProvider::getSimpleCategories()
 {
     if( !m_bIsExplicitCategoriesInited )
     {
diff --git a/chart2/source/view/inc/VDataSeries.hxx b/chart2/source/view/inc/VDataSeries.hxx
index 7231f05..f547cb4 100644
--- a/chart2/source/view/inc/VDataSeries.hxx
+++ b/chart2/source/view/inc/VDataSeries.hxx
@@ -94,8 +94,8 @@ public:
 
     bool        hasPropertyMapping( const OUString& rPropName ) const;
 
-    css::uno::Sequence< double > getAllX() const;
-    css::uno::Sequence< double > getAllY() const;
+    css::uno::Sequence< double > const & getAllX() const;
+    css::uno::Sequence< double > const & getAllY() const;
 
     double getXMeanValue() const;
     double getYMeanValue() const;
diff --git a/chart2/source/view/main/DrawModelWrapper.cxx b/chart2/source/view/main/DrawModelWrapper.cxx
index f787a49..d628860 100644
--- a/chart2/source/view/main/DrawModelWrapper.cxx
+++ b/chart2/source/view/main/DrawModelWrapper.cxx
@@ -163,7 +163,7 @@ uno::Reference< lang::XMultiServiceFactory > DrawModelWrapper::getShapeFactory()
     return xShapeFactory;
 }
 
-uno::Reference< drawing::XDrawPage > DrawModelWrapper::getMainDrawPage()
+uno::Reference< drawing::XDrawPage > const & DrawModelWrapper::getMainDrawPage()
 {
     if (m_xMainDrawPage.is())
         return m_xMainDrawPage;
@@ -192,7 +192,7 @@ uno::Reference< drawing::XDrawPage > DrawModelWrapper::getMainDrawPage()
     // AbstractShapeFactory::getOrCreateShapeFactory(this->getShapeFactory())->getOrCreateChartRootShape( m_xMainDrawPage );
     return m_xMainDrawPage;
 }
-uno::Reference< drawing::XDrawPage > DrawModelWrapper::getHiddenDrawPage()
+uno::Reference< drawing::XDrawPage > const & DrawModelWrapper::getHiddenDrawPage()
 {
     if( !m_xHiddenDrawPage.is() )
     {
diff --git a/chart2/source/view/main/DummyXShape.cxx b/chart2/source/view/main/DummyXShape.cxx
index 544b272..579765a 100644
--- a/chart2/source/view/main/DummyXShape.cxx
+++ b/chart2/source/view/main/DummyXShape.cxx
@@ -304,7 +304,7 @@ OUString SAL_CALL DummyXShape::getImplementationName()
 
 namespace {
 
-uno::Sequence< OUString > listSupportedServices()
+uno::Sequence< OUString > const & listSupportedServices()
 {
     static const uno::Sequence< OUString > aSupportedServices{
         "com.sun.star.drawing.Shape",
diff --git a/chart2/source/view/main/VDataSeries.cxx b/chart2/source/view/main/VDataSeries.cxx
index 6b98b7a..81e7bd2 100644
--- a/chart2/source/view/main/VDataSeries.cxx
+++ b/chart2/source/view/main/VDataSeries.cxx
@@ -725,7 +725,7 @@ double VDataSeries::getMaximumofAllDifferentYValues( sal_Int32 index ) const
     return fMax;
 }
 
-uno::Sequence< double > VDataSeries::getAllX() const
+uno::Sequence< double > const & VDataSeries::getAllX() const
 {
     if(!m_aValues_X.is() && !m_aValues_X.getLength() && m_nPointCount)
     {
@@ -738,7 +738,7 @@ uno::Sequence< double > VDataSeries::getAllX() const
     return m_aValues_X.Doubles;
 }
 
-uno::Sequence< double > VDataSeries::getAllY() const
+uno::Sequence< double > const & VDataSeries::getAllY() const
 {
     if(!m_aValues_Y.is() && !m_aValues_Y.getLength() && m_nPointCount)
     {
diff --git a/codemaker/source/codemaker/options.cxx b/codemaker/source/codemaker/options.cxx
index f4f3185..83d0b2f 100644
--- a/codemaker/source/codemaker/options.cxx
+++ b/codemaker/source/codemaker/options.cxx
@@ -37,7 +37,7 @@ bool Options::isValid(const OString& option) const
     return m_options.find(option) != m_options.end();
 }
 
-const OString Options::getOption(const OString& option) const
+const OString& Options::getOption(const OString& option) const
     throw( IllegalArgument )
 {
     OptionMap::const_iterator i(m_options.find(option));
diff --git a/comphelper/source/container/container.cxx b/comphelper/source/container/container.cxx
index 44f117b..a383a53 100644
--- a/comphelper/source/container/container.cxx
+++ b/comphelper/source/container/container.cxx
@@ -39,7 +39,7 @@ IndexAccessIterator::IndexAccessIterator(css::uno::Reference< css::uno::XInterfa
 IndexAccessIterator::~IndexAccessIterator() {}
 
 
-css::uno::Reference< css::uno::XInterface> IndexAccessIterator::Next()
+css::uno::Reference< css::uno::XInterface> const & IndexAccessIterator::Next()
 {
     bool bCheckingStartingPoint = !m_xCurrentObject.is();
         // Is the current node the starting point?
diff --git a/comphelper/source/misc/accessibletexthelper.cxx b/comphelper/source/misc/accessibletexthelper.cxx
index 3cec05e..29ca9c6 100644
--- a/comphelper/source/misc/accessibletexthelper.cxx
+++ b/comphelper/source/misc/accessibletexthelper.cxx
@@ -54,7 +54,7 @@ namespace comphelper
     }
 
 
-    Reference < i18n::XBreakIterator > OCommonAccessibleText::implGetBreakIterator()
+    Reference < i18n::XBreakIterator > const & OCommonAccessibleText::implGetBreakIterator()
     {
         if ( !m_xBreakIter.is() )
         {
@@ -66,7 +66,7 @@ namespace comphelper
     }
 
 
-    Reference < i18n::XCharacterClassification > OCommonAccessibleText::implGetCharacterClassification()
+    Reference < i18n::XCharacterClassification > const & OCommonAccessibleText::implGetCharacterClassification()
     {
         if ( !m_xCharClass.is() )
         {
diff --git a/comphelper/source/property/propertysetinfo.cxx b/comphelper/source/property/propertysetinfo.cxx
index ca73b51..9c1e809 100644
--- a/comphelper/source/property/propertysetinfo.cxx
+++ b/comphelper/source/property/propertysetinfo.cxx
@@ -40,7 +40,7 @@ public:
     void add(PropertyMapEntry const * pMap) throw();
     void remove( const OUString& aName ) throw();
 
-    std::vector< Property > getProperties() throw();
+    std::vector< Property > const & getProperties() throw();
 
     const PropertyMap& getPropertyMap() const throw() { return maPropertyMap;}
 
@@ -83,7 +83,7 @@ void PropertyMapImpl::remove( const OUString& aName ) throw()
     maProperties.clear();
 }
 
-std::vector< Property > PropertyMapImpl::getProperties() throw()
+std::vector< Property > const & PropertyMapImpl::getProperties() throw()
 {
     // maybe we have to generate the properties after
     // a change in the property map or at first call
diff --git a/comphelper/source/xml/ofopxmlhelper.cxx b/comphelper/source/xml/ofopxmlhelper.cxx
index c7bfcf8..b50c30e 100644
--- a/comphelper/source/xml/ofopxmlhelper.cxx
+++ b/comphelper/source/xml/ofopxmlhelper.cxx
@@ -67,7 +67,7 @@ class OFOPXMLHelper_Impl
 
 
 public:
-    css::uno::Sequence< css::uno::Sequence< css::beans::StringPair > > GetParsingResult();
+    css::uno::Sequence< css::uno::Sequence< css::beans::StringPair > > const & GetParsingResult();
 
     explicit OFOPXMLHelper_Impl( sal_uInt16 nFormat ); // must not be created directly
     virtual ~OFOPXMLHelper_Impl();
@@ -284,7 +284,7 @@ OFOPXMLHelper_Impl::~OFOPXMLHelper_Impl()
 }
 
 
-uno::Sequence< uno::Sequence< beans::StringPair > > OFOPXMLHelper_Impl::GetParsingResult()
+uno::Sequence< uno::Sequence< beans::StringPair > > const & OFOPXMLHelper_Impl::GetParsingResult()
 {
     if ( m_aElementsSeq.size() )
         throw uno::RuntimeException(); // the parsing has still not finished!
diff --git a/compilerplugins/clang/passstuffbyref.cxx b/compilerplugins/clang/passstuffbyref.cxx
index 3cf7a35..b1b3169 100644
--- a/compilerplugins/clang/passstuffbyref.cxx
+++ b/compilerplugins/clang/passstuffbyref.cxx
@@ -36,7 +36,7 @@ public:
     virtual void run() override { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
 
     // When warning about function params of primitive type that could be passed
-    // by value instead of by reference, make sure not to warn if the paremeter
+    // by value instead of by reference, make sure not to warn if the parameter
     // is ever bound to a reference; on the one hand, this needs scaffolding in
     // all Traverse*Decl functions (indirectly) derived from FunctionDecl; and
     // on the other hand, use a hack of ignoring just the DeclRefExprs nested in
@@ -51,9 +51,8 @@ public:
     bool TraverseImplicitCastExpr(ImplicitCastExpr * expr);
     bool VisitDeclRefExpr(const DeclRefExpr * expr);
 
-    bool VisitCallExpr(const CallExpr * ) { if (mbInsideFunctionDecl) mbFoundDisqualifier = true; return true; }
-    bool VisitMaterializeTemporaryExpr(const MaterializeTemporaryExpr * ) { if (mbInsideFunctionDecl) mbFoundDisqualifier = true; return true; }
-    bool VisitDeclStmt(const DeclStmt * ) { if (mbInsideFunctionDecl) mbFoundDisqualifier = true; return true; }
+    bool VisitReturnStmt(const ReturnStmt * );
+    bool VisitVarDecl(const VarDecl * );
 
 private:
     template<typename T> bool traverseAnyFunctionDecl(
@@ -62,6 +61,8 @@ private:
     void checkReturnValue(const FunctionDecl * functionDecl, const CXXMethodDecl * methodDecl);
     bool isFat(QualType type);
     bool isPrimitiveConstRef(QualType type);
+    bool isReturnExprDisqualified(const Expr* expr);
+
     bool mbInsideFunctionDecl;
     bool mbFoundDisqualifier;
 
@@ -228,10 +229,10 @@ void PassStuffByRef::checkParams(const FunctionDecl * functionDecl) {
 
 void PassStuffByRef::checkReturnValue(const FunctionDecl * functionDecl, const CXXMethodDecl * methodDecl) {
 
-    if (methodDecl && methodDecl->isVirtual()) {
+    if (methodDecl && (methodDecl->isVirtual() || methodDecl->hasAttr<OverrideAttr>())) {
         return;
     }
-    if( !functionDecl->hasBody()) {
+    if( !functionDecl->doesThisDeclarationHaveABody()) {
         return;
     }
 
@@ -258,7 +259,8 @@ void PassStuffByRef::checkReturnValue(const FunctionDecl * functionDecl, const C
         || (dc.MemberFunction().Class("Model").Namespace("xforms")
             .GlobalNamespace())
         || (dc.MemberFunction().Class("Submission").Namespace("xforms")
-            .GlobalNamespace()))
+            .GlobalNamespace())
+        || (dc.Function("TopLeft").Class("SwRect").GlobalNamespace()))
     {
         return;
     }
@@ -274,8 +276,7 @@ void PassStuffByRef::checkReturnValue(const FunctionDecl * functionDecl, const C
         return;
     // depends on a define
     if (dc.Function("GetSharedFileURL").Class("SfxObjectShell")
-        .GlobalNamespace())
-    {
+        .GlobalNamespace()) {
         return;
     }
     mbInsideFunctionDecl = true;
@@ -297,12 +298,85 @@ void PassStuffByRef::checkReturnValue(const FunctionDecl * functionDecl, const C
     {
         report(
                 DiagnosticsEngine::Note,
-                "rather return by const& than by value",
+                "decl here",
                 functionDecl->getCanonicalDecl()->getSourceRange().getBegin())
             << functionDecl->getCanonicalDecl()->getSourceRange();
     }
 }
 
+bool PassStuffByRef::VisitReturnStmt(const ReturnStmt * returnStmt)
+{
+    if (!mbInsideFunctionDecl)
+        return true;
+    const Expr* expr = dyn_cast<Expr>(*returnStmt->child_begin())->IgnoreParenCasts();
+
+    if (isReturnExprDisqualified(expr)) {
+        mbFoundDisqualifier = true;
+        return true;
+    }
+    return true;
+}
+
+bool PassStuffByRef::isReturnExprDisqualified(const Expr* expr)
+{
+    if (isa<ExprWithCleanups>(expr)) {
+        return true;
+    }
+    if (const CXXConstructExpr* constructExpr = dyn_cast<CXXConstructExpr>(expr)) {
+        if (constructExpr->getNumArgs()==1) {
+            expr = constructExpr->getArg(0)->IgnoreParenCasts();
+        }
+    }
+    if (isa<CXXConstructExpr>(expr)) {
+        return true;
+    }
+    if (const ArraySubscriptExpr* childExpr = dyn_cast<ArraySubscriptExpr>(expr)) {
+        expr = childExpr->getLHS();
+    }
+    if (const MemberExpr* memberExpr = dyn_cast<MemberExpr>(expr)) {
+        expr = memberExpr->getBase();
+    }
+    if (const DeclRefExpr* declRef = dyn_cast<DeclRefExpr>(expr)) {
+        const VarDecl* varDecl = dyn_cast<VarDecl>(declRef->getDecl());
+        if (varDecl) {
+            if (varDecl->getStorageDuration() == SD_Automatic
+                || varDecl->getStorageDuration() == SD_FullExpression ) {
+                return true;
+            }
+            return false;
+        }
+    }
+    if (const ConditionalOperator* condOper = dyn_cast<ConditionalOperator>(expr)) {
+        return isReturnExprDisqualified(condOper->getTrueExpr())
+            || isReturnExprDisqualified(condOper->getFalseExpr());
+    }
+    if (const CallExpr* callExpr = dyn_cast<CallExpr>(expr)) {
+        return !loplugin::TypeCheck(callExpr->getType()).Const().LvalueReference();
+    }
+    return true;
+}
+
+bool PassStuffByRef::VisitVarDecl(const VarDecl * varDecl)
+{
+    if (!mbInsideFunctionDecl)
+        return true;
+    // things guarded by locking are probably best left alone
+    loplugin::TypeCheck dc(varDecl->getType());
+    if (dc.Class("Guard").Namespace("osl").GlobalNamespace())
+        mbFoundDisqualifier = true;
+    if (dc.Class("ClearableGuard").Namespace("osl").GlobalNamespace())
+        mbFoundDisqualifier = true;
+    if (dc.Class("ResettableGuard").Namespace("osl").GlobalNamespace())
+        mbFoundDisqualifier = true;
+    else if (dc.Class("SolarMutexGuard").GlobalNamespace())
+        mbFoundDisqualifier = true;
+    else if (dc.Class("SfxModelGuard").GlobalNamespace())
+        mbFoundDisqualifier = true;
+    else if (dc.Class("ReadWriteGuard").Namespace("utl").GlobalNamespace())
+        mbFoundDisqualifier = true;
+    return true;
+}
+
 // Would produce a wrong recommendation for
 //
 //   PresenterFrameworkObserver::RunOnUpdateEnd(
diff --git a/configmgr/source/lock.cxx b/configmgr/source/lock.cxx
index 66a2be9..9258b35 100644
--- a/configmgr/source/lock.cxx
+++ b/configmgr/source/lock.cxx
@@ -25,7 +25,7 @@
 
 namespace configmgr {
 
-std::shared_ptr<osl::Mutex> lock()
+std::shared_ptr<osl::Mutex> const & lock()
 {
     static std::shared_ptr<osl::Mutex> theLock;
     if (!theLock.get())
diff --git a/configmgr/source/lock.hxx b/configmgr/source/lock.hxx
index d8c050e..ee98efc 100644
--- a/configmgr/source/lock.hxx
+++ b/configmgr/source/lock.hxx
@@ -26,7 +26,7 @@
 
 namespace configmgr {
 
-std::shared_ptr<osl::Mutex> lock();
+std::shared_ptr<osl::Mutex> const & lock();
 
 }
 
diff --git a/configmgr/source/propertynode.cxx b/configmgr/source/propertynode.cxx
index 97c32b2..041cd50 100644
--- a/configmgr/source/propertynode.cxx
+++ b/configmgr/source/propertynode.cxx
@@ -48,7 +48,7 @@ rtl::Reference< Node > PropertyNode::clone(bool) const {
 }
 
 
-css::uno::Any PropertyNode::getValue(Components & components) {
+css::uno::Any const & PropertyNode::getValue(Components & components) {
     if (!externalDescriptor_.isEmpty()) {
         css::beans::Optional< css::uno::Any > val(
             components.getExternalValue(externalDescriptor_));
diff --git a/configmgr/source/propertynode.hxx b/configmgr/source/propertynode.hxx
index 7716ae9..e1ddb44 100644
--- a/configmgr/source/propertynode.hxx
+++ b/configmgr/source/propertynode.hxx
@@ -45,7 +45,7 @@ public:
 
     bool isNillable() const { return nillable_;}
 
-    css::uno::Any getValue(Components & components);
+    css::uno::Any const & getValue(Components & components);
 
     void setValue(int layer, css::uno::Any const & value);
     css::uno::Any *getValuePtr(int layer);
diff --git a/configmgr/source/rootaccess.cxx b/configmgr/source/rootaccess.cxx
index a84898d..3d4bbd5 100644
--- a/configmgr/source/rootaccess.cxx
+++ b/configmgr/source/rootaccess.cxx
@@ -101,7 +101,7 @@ void RootAccess::release() throw () {
     Access::release();
 }
 
-OUString RootAccess::getAbsolutePathRepresentation() {
+OUString const & RootAccess::getAbsolutePathRepresentation() {
     getNode(); // turn pathRepresentation_ into canonic form
     return pathRepresentation_;
 }
diff --git a/configmgr/source/rootaccess.hxx b/configmgr/source/rootaccess.hxx
index a308ef5..8ea6b20 100644
--- a/configmgr/source/rootaccess.hxx
+++ b/configmgr/source/rootaccess.hxx
@@ -70,7 +70,7 @@ public:
 
     virtual void SAL_CALL release() throw () override;
 
-    OUString getAbsolutePathRepresentation();
+    OUString const & getAbsolutePathRepresentation();
 
     const OUString& getLocale() const { return locale_;}
 
diff --git a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx
index 3337bd1..3e68e4a 100644
--- a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx
@@ -666,82 +666,82 @@ const ORowSetValue& ODatabaseMetaDataResultSet::getValue(sal_Int32 columnIndex)
 }
 
 /// return an empty ORowSetValueDecorator
-ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getEmptyValue()
+ORowSetValueDecoratorRef const & ODatabaseMetaDataResultSet::getEmptyValue()
 {
     static ORowSetValueDecoratorRef aEmptyValueRef = new ORowSetValueDecorator();
     return aEmptyValueRef;
 }
 
 /// return an ORowSetValueDecorator with 0 as value
-ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::get0Value()
+ORowSetValueDecoratorRef const & ODatabaseMetaDataResultSet::get0Value()
 {
     static ORowSetValueDecoratorRef a0ValueRef = new ORowSetValueDecorator((sal_Int32)0);
     return a0ValueRef;
 }
 
 /// return an ORowSetValueDecorator with 1 as value
-ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::get1Value()
+ORowSetValueDecoratorRef const & ODatabaseMetaDataResultSet::get1Value()
 {
     static ORowSetValueDecoratorRef a1ValueRef = new ORowSetValueDecorator((sal_Int32)1);
     return a1ValueRef;
 }
 
 /// return an ORowSetValueDecorator with ColumnSearch::BASIC as value
-ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getBasicValue()
+ORowSetValueDecoratorRef const & ODatabaseMetaDataResultSet::getBasicValue()
 {
     static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(ColumnSearch::BASIC);
     return aValueRef;
 }
 
-ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getSelectValue()
+ORowSetValueDecoratorRef const & ODatabaseMetaDataResultSet::getSelectValue()
 {
     static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(OUString("SELECT"));
     return aValueRef;
 }
 
-ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getInsertValue()
+ORowSetValueDecoratorRef const & ODatabaseMetaDataResultSet::getInsertValue()
 {
     static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(OUString("INSERT"));
     return aValueRef;
 }
 
-ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getDeleteValue()
+ORowSetValueDecoratorRef const & ODatabaseMetaDataResultSet::getDeleteValue()
 {
     static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(OUString("DELETE"));
     return aValueRef;
 }
 
-ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getUpdateValue()
+ORowSetValueDecoratorRef const & ODatabaseMetaDataResultSet::getUpdateValue()
 {
     static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(OUString("UPDATE"));
     return aValueRef;
 }
 
-ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getCreateValue()
+ORowSetValueDecoratorRef const & ODatabaseMetaDataResultSet::getCreateValue()
 {
     static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(OUString("CREATE"));
     return aValueRef;
 }
 
-ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getReadValue()
+ORowSetValueDecoratorRef const & ODatabaseMetaDataResultSet::getReadValue()
 {
     static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(OUString("READ"));
     return aValueRef;
 }
 
-ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getAlterValue()
+ORowSetValueDecoratorRef const & ODatabaseMetaDataResultSet::getAlterValue()
 {
     static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(OUString("ALTER"));
     return aValueRef;
 }
 
-ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getDropValue()
+ORowSetValueDecoratorRef const & ODatabaseMetaDataResultSet::getDropValue()
 {
     static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(OUString("DROP"));
     return aValueRef;
 }
 
-ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getQuoteValue()
+ORowSetValueDecoratorRef const & ODatabaseMetaDataResultSet::getQuoteValue()
 {
     static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(OUString("'"));
     return aValueRef;
diff --git a/connectivity/source/commontools/dbconversion.cxx b/connectivity/source/commontools/dbconversion.cxx
index 1646b64..63dc308 100644
--- a/connectivity/source/commontools/dbconversion.cxx
+++ b/connectivity/source/commontools/dbconversion.cxx
@@ -58,7 +58,7 @@ namespace dbtools
     using namespace ::com::sun::star::beans;
 
 
-    css::util::Date DBTypeConversion::getStandardDate()
+    css::util::Date const & DBTypeConversion::getStandardDate()
     {
         static css::util::Date STANDARD_DB_DATE(1,1,1900);
         return STANDARD_DB_DATE;
diff --git a/connectivity/source/cpool/ZPoolCollection.cxx b/connectivity/source/cpool/ZPoolCollection.cxx
index 9dd861d..ad462ea 100644
--- a/connectivity/source/cpool/ZPoolCollection.cxx
+++ b/connectivity/source/cpool/ZPoolCollection.cxx
@@ -249,7 +249,7 @@ bool OPoolCollection::isPoolingEnabled()
     return bEnabled;
 }
 
-Reference<XInterface> OPoolCollection::getConfigPoolRoot()
+Reference<XInterface> const & OPoolCollection::getConfigPoolRoot()
 {
     if(!m_xConfigNode.is())
         m_xConfigNode = createWithServiceFactory(getConnectionPoolNodeName());
diff --git a/connectivity/source/cpool/ZPoolCollection.hxx b/connectivity/source/cpool/ZPoolCollection.hxx
index ff31c6c..25c3f5a 100644
--- a/connectivity/source/cpool/ZPoolCollection.hxx
+++ b/connectivity/source/cpool/ZPoolCollection.hxx
@@ -86,7 +86,7 @@ namespace connectivity
 
         // some configuration helper methods
         css::uno::Reference< css::uno::XInterface > createWithServiceFactory(const OUString& _rPath) const;
-        css::uno::Reference< css::uno::XInterface > getConfigPoolRoot();
+        css::uno::Reference< css::uno::XInterface > const & getConfigPoolRoot();
         static css::uno::Reference< css::uno::XInterface > createWithProvider(   const css::uno::Reference< css::lang::XMultiServiceFactory >& _rxConfProvider,
                                                                                                     const OUString& _rPath);
         static css::uno::Reference< css::uno::XInterface > openNode( const OUString& _rPath,
diff --git a/connectivity/source/drivers/calc/CConnection.cxx b/connectivity/source/drivers/calc/CConnection.cxx
index f2cfdf2..0d32d31 100644
--- a/connectivity/source/drivers/calc/CConnection.cxx
+++ b/connectivity/source/drivers/calc/CConnection.cxx
@@ -101,7 +101,7 @@ void OCalcConnection::construct(const OUString& url,const Sequence< PropertyValu
     acquireDoc();
 }
 
-Reference< XSpreadsheetDocument> OCalcConnection::acquireDoc()
+Reference< XSpreadsheetDocument> const & OCalcConnection::acquireDoc()
 {
     if ( m_xDoc.is() )
     {
diff --git a/connectivity/source/drivers/dbase/DIndex.cxx b/connectivity/source/drivers/dbase/DIndex.cxx
index f384a89..f5f4c49 100644
--- a/connectivity/source/drivers/dbase/DIndex.cxx
+++ b/connectivity/source/drivers/dbase/DIndex.cxx
@@ -130,7 +130,7 @@ sal_Int64 ODbaseIndex::getSomething( const Sequence< sal_Int8 > & rId ) throw (R
                 : ODbaseIndex_BASE::getSomething(rId);
 }
 
-ONDXPagePtr ODbaseIndex::getRoot()
+ONDXPagePtr const & ODbaseIndex::getRoot()
 {
     openIndexFile();
     if (!m_aRoot.Is())
diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx
index 1a0ef32..3da4193 100644
--- a/connectivity/source/drivers/hsqldb/HDriver.cxx
+++ b/connectivity/source/drivers/hsqldb/HDriver.cxx
@@ -124,7 +124,7 @@ namespace connectivity
         cppu::WeakComponentImplHelperBase::disposing();
     }
 
-    Reference< XDriver > ODriverDelegator::loadDriver( )
+    Reference< XDriver > const & ODriverDelegator::loadDriver( )
     {
         if ( !m_xDriver.is() )
         {
diff --git a/connectivity/source/drivers/hsqldb/HStorageMap.cxx b/connectivity/source/drivers/hsqldb/HStorageMap.cxx
index cad5fbd..e79718a 100644
--- a/connectivity/source/drivers/hsqldb/HStorageMap.cxx
+++ b/connectivity/source/drivers/hsqldb/HStorageMap.cxx
@@ -79,21 +79,21 @@ namespace connectivity
             }
         }
 
-        Reference< XInputStream> StreamHelper::getInputStream()
+        Reference< XInputStream> const & StreamHelper::getInputStream()
         {
             if ( !m_xInputStream.is() )
                 m_xInputStream = m_xStream->getInputStream();
             return m_xInputStream;
         }
 
-        Reference< XOutputStream> StreamHelper::getOutputStream()
+        Reference< XOutputStream> const & StreamHelper::getOutputStream()
         {
             if ( !m_xOutputStream.is() )
                 m_xOutputStream = m_xStream->getOutputStream();
             return m_xOutputStream;
         }
 
-        Reference< XSeekable> StreamHelper::getSeek()
+        Reference< XSeekable> const & StreamHelper::getSeek()
         {
             if ( !m_xSeek.is() )
                 m_xSeek.set(m_xStream,UNO_QUERY);
diff --git a/connectivity/source/drivers/jdbc/Object.cxx b/connectivity/source/drivers/jdbc/Object.cxx
index e7666cc..068b1ed 100644
--- a/connectivity/source/drivers/jdbc/Object.cxx
+++ b/connectivity/source/drivers/jdbc/Object.cxx
@@ -40,7 +40,7 @@ using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::lang;
 
 
-::rtl::Reference< jvmaccess::VirtualMachine > getJavaVM2(const ::rtl::Reference< jvmaccess::VirtualMachine >& _rVM = ::rtl::Reference< jvmaccess::VirtualMachine >(),
+::rtl::Reference< jvmaccess::VirtualMachine > const & getJavaVM2(const ::rtl::Reference< jvmaccess::VirtualMachine >& _rVM = ::rtl::Reference< jvmaccess::VirtualMachine >(),
                                                         bool _bSet = false)
 {
     static ::rtl::Reference< jvmaccess::VirtualMachine > s_VM;
diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx
index d3410ba..c2c4c39 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx
@@ -90,7 +90,7 @@ namespace
     };
 
 
-    OUString lcl_guessProfileRoot( MozillaProductType _product )
+    OUString const & lcl_guessProfileRoot( MozillaProductType _product )
     {
         size_t productIndex = _product - 1;
 
diff --git a/connectivity/source/inc/FDatabaseMetaDataResultSet.hxx b/connectivity/source/inc/FDatabaseMetaDataResultSet.hxx
index 006266c..6d491ed 100644
--- a/connectivity/source/inc/FDatabaseMetaDataResultSet.hxx
+++ b/connectivity/source/inc/FDatabaseMetaDataResultSet.hxx
@@ -245,31 +245,31 @@ namespace connectivity
         // some methods to get already defined ORowSetValues
         // this increase the reuse of ORowSetValues
         /// return an empty ORowSetValueDecorator
-        static ORowSetValueDecoratorRef getEmptyValue();
+        static ORowSetValueDecoratorRef const & getEmptyValue();
         /// return an ORowSetValueDecorator with 0 as value
-        static ORowSetValueDecoratorRef get0Value();
+        static ORowSetValueDecoratorRef const & get0Value();
         /// return an ORowSetValueDecorator with 1 as value
-        static ORowSetValueDecoratorRef get1Value();
+        static ORowSetValueDecoratorRef const & get1Value();
         /// return an ORowSetValueDecorator with ColumnSearch::BASIC as value
-        static ORowSetValueDecoratorRef getBasicValue();
+        static ORowSetValueDecoratorRef const & getBasicValue();
         /// return an ORowSetValueDecorator with string SELECT as value
-        static ORowSetValueDecoratorRef getSelectValue();
+        static ORowSetValueDecoratorRef const & getSelectValue();
         /// return an ORowSetValueDecorator with string INSERT as value
-        static ORowSetValueDecoratorRef getInsertValue();
+        static ORowSetValueDecoratorRef const & getInsertValue();
         /// return an ORowSetValueDecorator with string DELETE as value
-        static ORowSetValueDecoratorRef getDeleteValue();
+        static ORowSetValueDecoratorRef const & getDeleteValue();
         /// return an ORowSetValueDecorator with string UPDATE as value
-        static ORowSetValueDecoratorRef getUpdateValue();
+        static ORowSetValueDecoratorRef const & getUpdateValue();
         /// return an ORowSetValueDecorator with string CREATE as value
-        static ORowSetValueDecoratorRef getCreateValue();
+        static ORowSetValueDecoratorRef const & getCreateValue();
         /// return an ORowSetValueDecorator with string READ as value
-        static ORowSetValueDecoratorRef getReadValue();
+        static ORowSetValueDecoratorRef const & getReadValue();
         /// return an ORowSetValueDecorator with string ALTER as value
-        static ORowSetValueDecoratorRef getAlterValue();
+        static ORowSetValueDecoratorRef const & getAlterValue();
         /// return an ORowSetValueDecorator with string DROP as value
-        static ORowSetValueDecoratorRef getDropValue();
+        static ORowSetValueDecoratorRef const & getDropValue();
         /// return an ORowSetValueDecorator with string ' as value
-        static ORowSetValueDecoratorRef getQuoteValue();
+        static ORowSetValueDecoratorRef const & getQuoteValue();
 
     };
 }
diff --git a/connectivity/source/inc/calc/CConnection.hxx b/connectivity/source/inc/calc/CConnection.hxx
index b8b734a..63b1d4a 100644
--- a/connectivity/source/inc/calc/CConnection.hxx
+++ b/connectivity/source/inc/calc/CConnection.hxx
@@ -70,7 +70,7 @@ namespace connectivity
             virtual css::uno::Reference< css::sdbc::XPreparedStatement > SAL_CALL prepareCall( const OUString& sql ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
 
             // no interface methods
-            css::uno::Reference< css::sheet::XSpreadsheetDocument> acquireDoc();
+            css::uno::Reference< css::sheet::XSpreadsheetDocument> const & acquireDoc();
             void releaseDoc();
 
             class ODocHolder
diff --git a/connectivity/source/inc/dbase/DIndex.hxx b/connectivity/source/inc/dbase/DIndex.hxx
index 5396e64..afe45a4 100644
--- a/connectivity/source/inc/dbase/DIndex.hxx
+++ b/connectivity/source/inc/dbase/DIndex.hxx
@@ -125,7 +125,7 @@ namespace connectivity
 
             ONDXPage* CreatePage(sal_uInt32 nPagePos, ONDXPage* pParent = nullptr, bool bLoad = false);
             void Collect(ONDXPage*);
-            ONDXPagePtr getRoot();
+            ONDXPagePtr const & getRoot();
 
             bool isUnique() const { return m_IsUnique; }
             bool UseCollector() const {return m_bUseCollector;}
diff --git a/connectivity/source/inc/hsqldb/HDriver.hxx b/connectivity/source/inc/hsqldb/HDriver.hxx
index 21bc044..255c660 100644
--- a/connectivity/source/inc/hsqldb/HDriver.hxx
+++ b/connectivity/source/inc/hsqldb/HDriver.hxx
@@ -72,7 +72,7 @@ namespace connectivity
                 @return
                     The driver which was currently selected.
             */
-            css::uno::Reference< css::sdbc::XDriver > loadDriver( );
+            css::uno::Reference< css::sdbc::XDriver > const & loadDriver( );
 
             /** shut down the connection and revoke the storage from the map
                 @param  _aIter
diff --git a/connectivity/source/inc/hsqldb/HStorageMap.hxx b/connectivity/source/inc/hsqldb/HStorageMap.hxx
index f0bbe98..62ae7ec3 100644
--- a/connectivity/source/inc/hsqldb/HStorageMap.hxx
+++ b/connectivity/source/inc/hsqldb/HStorageMap.hxx
@@ -48,9 +48,9 @@ namespace connectivity
             StreamHelper(const css::uno::Reference< css::io::XStream>& _xStream);
             ~StreamHelper();
 
-            css::uno::Reference< css::io::XInputStream>   getInputStream();
-            css::uno::Reference< css::io::XOutputStream>  getOutputStream();
-            css::uno::Reference< css::io::XSeekable>      getSeek();
+            css::uno::Reference< css::io::XInputStream> const &   getInputStream();
+            css::uno::Reference< css::io::XOutputStream> const &  getOutputStream();
+            css::uno::Reference< css::io::XSeekable> const &      getSeek();
         };
 
 
diff --git a/dbaccess/source/core/api/RowSetCacheIterator.cxx b/dbaccess/source/core/api/RowSetCacheIterator.cxx
index bc1c915..9fbbc32 100644
--- a/dbaccess/source/core/api/RowSetCacheIterator.cxx
+++ b/dbaccess/source/core/api/RowSetCacheIterator.cxx
@@ -22,6 +22,7 @@
 #include "RowSetBase.hxx"
 
 using namespace dbaccess;
+
 ORowSetCacheIterator::ORowSetCacheIterator(const ORowSetCacheIterator& _rRH)
 : m_aIter(_rRH.m_aIter)
 , m_pCache(_rRH.m_pCache)
@@ -29,7 +30,7 @@ ORowSetCacheIterator::ORowSetCacheIterator(const ORowSetCacheIterator& _rRH)
 {
 }
 
-ORowSetCacheIterator::operator ORowSetMatrix::iterator()
+ORowSetCacheIterator::operator ORowSetMatrix::iterator const &()
 {
     return m_aIter->second.aIterator;
 }
diff --git a/dbaccess/source/core/api/RowSetCacheIterator.hxx b/dbaccess/source/core/api/RowSetCacheIterator.hxx
index 4b4c97e..6c4a633 100644
--- a/dbaccess/source/core/api/RowSetCacheIterator.hxx
+++ b/dbaccess/source/core/api/RowSetCacheIterator.hxx
@@ -58,7 +58,7 @@ namespace dbaccess
 
         bool isNull() const;
         ORowSetCacheIterator& operator =(const ORowSetMatrix::iterator&);
-        operator ORowSetMatrix::iterator();
+        operator ORowSetMatrix::iterator const &();
 
         ORowSetRow& operator *();
 
diff --git a/dbaccess/source/core/dataaccess/connection.cxx b/dbaccess/source/core/dataaccess/connection.cxx
index 9b170bd..10c6334 100644
--- a/dbaccess/source/core/dataaccess/connection.cxx
+++ b/dbaccess/source/core/dataaccess/connection.cxx
@@ -669,7 +669,7 @@ Sequence< OUString > SAL_CALL OConnection::getAvailableServiceNames(  ) throw (R
     return aRet;
 }
 
-Reference< XTablesSupplier > OConnection::getMasterTables()
+Reference< XTablesSupplier > const & OConnection::getMasterTables()
 {
 // check if out "master connection" can supply tables
     if(!m_xMasterTables.is())
diff --git a/dbaccess/source/core/dataaccess/connection.hxx b/dbaccess/source/core/dataaccess/connection.hxx
index e06186c..eef6cfc 100644
--- a/dbaccess/source/core/dataaccess/connection.hxx
+++ b/dbaccess/source/core/dataaccess/connection.hxx
@@ -203,7 +203,7 @@ protected:
             throw css::lang::DisposedException();
     }
 
-    css::uno::Reference< css::sdbcx::XTablesSupplier > getMasterTables();
+    css::uno::Reference< css::sdbcx::XTablesSupplier > const & getMasterTables();
 
 private:
     /** checks whether or not there are naming conflicts between tables and queries
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx
index 9e0ee5e..4d28b37 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -1729,7 +1729,7 @@ Reference< XUIConfigurationManager > SAL_CALL ODatabaseDocument::getUIConfigurat
     return Reference< XUIConfigurationManager >( getUIConfigurationManager2(), UNO_QUERY_THROW );
 }
 
-Reference< XUIConfigurationManager2 > ODatabaseDocument::getUIConfigurationManager2(  ) throw (RuntimeException)
+Reference< XUIConfigurationManager2 > const & ODatabaseDocument::getUIConfigurationManager2(  ) throw (RuntimeException)
 {
     DocumentGuard aGuard(*this, DocumentGuard::DefaultMethod);
 
@@ -2090,7 +2090,7 @@ Reference< XController2 > SAL_CALL ODatabaseDocument::createViewController( cons
     return xController;
 }
 
-Reference< XTitle > ODatabaseDocument::impl_getTitleHelper_throw()
+Reference< XTitle > const & ODatabaseDocument::impl_getTitleHelper_throw()
 {
     if ( ! m_xTitleHelper.is ())
     {
diff --git a/dbaccess/source/core/dataaccess/databasedocument.hxx b/dbaccess/source/core/dataaccess/databasedocument.hxx
index 0b91ad8..dbee460 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.hxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.hxx
@@ -267,7 +267,7 @@ class ODatabaseDocument :public ModelDependentComponent             // ModelDepe
     // ModelDependentComponent overridables
     virtual css::uno::Reference< css::uno::XInterface > getThis() const override;
 
-    css::uno::Reference< css::frame::XTitle >             impl_getTitleHelper_throw();
+    css::uno::Reference< css::frame::XTitle > const &     impl_getTitleHelper_throw();
     css::uno::Reference< css::frame::XUntitledNumbers >   impl_getUntitledHelper_throw(
         const css::uno::Reference< css::uno::XInterface >& _xComponent = css::uno::Reference< css::uno::XInterface >());
 
@@ -466,7 +466,7 @@ public:
     }
 
 private:
-    css::uno::Reference< css::ui::XUIConfigurationManager2 > getUIConfigurationManager2() throw (css::uno::RuntimeException);
+    css::uno::Reference< css::ui::XUIConfigurationManager2 > const & getUIConfigurationManager2() throw (css::uno::RuntimeException);
 
     /** returns whether the model is currently being initialized
     */
diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx
index a17220c..735586a 100644
--- a/dbaccess/source/filter/xml/xmlExport.cxx
+++ b/dbaccess/source/filter/xml/xmlExport.cxx
@@ -1360,7 +1360,7 @@ OUString ODBExport::implConvertAny(const Any& _rValue)
     return aBuffer.makeStringAndClear();
 }
 
-rtl::Reference < XMLPropertySetMapper > ODBExport::GetTableStylesPropertySetMapper() const
+rtl::Reference < XMLPropertySetMapper > const & ODBExport::GetTableStylesPropertySetMapper() const
 {
     if ( !m_xTableStylesPropertySetMapper.is() )
     {
@@ -1369,7 +1369,7 @@ rtl::Reference < XMLPropertySetMapper > ODBExport::GetTableStylesPropertySetMapp
     return m_xTableStylesPropertySetMapper;
 }
 
-rtl::Reference < XMLPropertySetMapper > ODBExport::GetCellStylesPropertySetMapper() const
+rtl::Reference < XMLPropertySetMapper > const & ODBExport::GetCellStylesPropertySetMapper() const
 {
     if ( !m_xCellStylesPropertySetMapper.is() )
     {
@@ -1378,7 +1378,7 @@ rtl::Reference < XMLPropertySetMapper > ODBExport::GetCellStylesPropertySetMappe
     return m_xCellStylesPropertySetMapper;
 }
 
-rtl::Reference < XMLPropertySetMapper > ODBExport::GetColumnStylesPropertySetMapper() const
+rtl::Reference < XMLPropertySetMapper > const & ODBExport::GetColumnStylesPropertySetMapper() const
 {
     if ( !m_xColumnStylesPropertySetMapper.is() )
     {
diff --git a/dbaccess/source/filter/xml/xmlExport.hxx b/dbaccess/source/filter/xml/xmlExport.hxx
index 4a25fcf..3a335e2 100644
--- a/dbaccess/source/filter/xml/xmlExport.hxx
+++ b/dbaccess/source/filter/xml/xmlExport.hxx
@@ -154,7 +154,7 @@ class ODBExport : public SvXMLExport
 
     static OUString         implConvertAny(const Any& _rValue);
 
-    rtl::Reference < XMLPropertySetMapper > GetTableStylesPropertySetMapper() const;
+    rtl::Reference < XMLPropertySetMapper > const & GetTableStylesPropertySetMapper() const;
 
                             ODBExport() = delete;
 protected:
@@ -183,8 +183,8 @@ public:
     static css::uno::Reference<css::uno::XInterface> SAL_CALL Create(
         css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxORB);
 
-    rtl::Reference < XMLPropertySetMapper > GetColumnStylesPropertySetMapper() const;
-    rtl::Reference < XMLPropertySetMapper > GetCellStylesPropertySetMapper() const;
+    rtl::Reference < XMLPropertySetMapper > const & GetColumnStylesPropertySetMapper() const;
+    rtl::Reference < XMLPropertySetMapper > const & GetCellStylesPropertySetMapper() const;
 
     // XExporter
     virtual void SAL_CALL setSourceDocument( const css::uno::Reference< css::lang::XComponent >& xDoc ) throw(css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override;
diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx
index dcc8f76..6608e91 100644
--- a/dbaccess/source/filter/xml/xmlfilter.cxx
+++ b/dbaccess/source/filter/xml/xmlfilter.cxx
@@ -734,7 +734,7 @@ SvXMLImportContext* ODBFilter::CreateScriptContext( const OUString& _rLocalName
 }
 
 
-rtl::Reference < XMLPropertySetMapper > ODBFilter::GetTableStylesPropertySetMapper() const
+rtl::Reference < XMLPropertySetMapper > const & ODBFilter::GetTableStylesPropertySetMapper() const
 {
     if ( !m_xTableStylesPropertySetMapper.is() )
     {
@@ -744,7 +744,7 @@ rtl::Reference < XMLPropertySetMapper > ODBFilter::GetTableStylesPropertySetMapp
 }
 
 
-rtl::Reference < XMLPropertySetMapper > ODBFilter::GetColumnStylesPropertySetMapper() const
+rtl::Reference < XMLPropertySetMapper > const & ODBFilter::GetColumnStylesPropertySetMapper() const
 {
     if ( !m_xColumnStylesPropertySetMapper.is() )
     {
@@ -754,7 +754,7 @@ rtl::Reference < XMLPropertySetMapper > ODBFilter::GetColumnStylesPropertySetMap
 }
 
 
-rtl::Reference < XMLPropertySetMapper > ODBFilter::GetCellStylesPropertySetMapper() const
+rtl::Reference < XMLPropertySetMapper > const & ODBFilter::GetCellStylesPropertySetMapper() const
 {
     if ( !m_xCellStylesPropertySetMapper.is() )
     {
diff --git a/dbaccess/source/filter/xml/xmlfilter.hxx b/dbaccess/source/filter/xml/xmlfilter.hxx
index 5db6924..7e47f45 100644
--- a/dbaccess/source/filter/xml/xmlfilter.hxx
+++ b/dbaccess/source/filter/xml/xmlfilter.hxx
@@ -139,9 +139,9 @@ public:
     const SvXMLTokenMap& GetQueryElemTokenMap() const;
     const SvXMLTokenMap& GetColumnElemTokenMap() const;
 
-    rtl::Reference < XMLPropertySetMapper > GetTableStylesPropertySetMapper() const;
-    rtl::Reference < XMLPropertySetMapper > GetColumnStylesPropertySetMapper() const;
-    rtl::Reference < XMLPropertySetMapper > GetCellStylesPropertySetMapper() const;
+    rtl::Reference < XMLPropertySetMapper > const & GetTableStylesPropertySetMapper() const;
+    rtl::Reference < XMLPropertySetMapper > const & GetColumnStylesPropertySetMapper() const;
+    rtl::Reference < XMLPropertySetMapper > const & GetCellStylesPropertySetMapper() const;
 
     /** add a Info to the sequence which will be appended to the data source
         @param  _rInfo The property to append.
diff --git a/dbaccess/source/ui/control/ColumnControlWindow.cxx b/dbaccess/source/ui/control/ColumnControlWindow.cxx
index 122cec7..c3a1bb3 100644
--- a/dbaccess/source/ui/control/ColumnControlWindow.cxx
+++ b/dbaccess/source/ui/control/ColumnControlWindow.cxx
@@ -152,7 +152,7 @@ OUString OColumnControlWindow::getAutoIncrementValue() const
     return m_sAutoIncrementValue;
 }
 
-TOTypeInfoSP OColumnControlWindow::getDefaultTyp() const
+TOTypeInfoSP const & OColumnControlWindow::getDefaultTyp() const
 {
     if ( !m_pTypeInfo.get() )
     {
diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
index 6c80b1c..2490f0e 100644
--- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx
+++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
@@ -411,7 +411,7 @@ Reference< XDriver > ODbDataSourceAdministrationHelper::getDriver(const OUString
     return xDriver;
 }
 
-Reference< XPropertySet > ODbDataSourceAdministrationHelper::getCurrentDataSource()
+Reference< XPropertySet > const & ODbDataSourceAdministrationHelper::getCurrentDataSource()
 {
     if ( !m_xDatasource.is() )
     {
diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.hxx b/dbaccess/source/ui/dlg/DbAdminImpl.hxx
index 64efba4..7d6e908 100644
--- a/dbaccess/source/ui/dlg/DbAdminImpl.hxx
+++ b/dbaccess/source/ui/dlg/DbAdminImpl.hxx
@@ -103,7 +103,7 @@ namespace dbaui
 
         /** returns the data source the dialog is currently working with
         */
-        css::uno::Reference< css::beans::XPropertySet >   getCurrentDataSource();
+        css::uno::Reference< css::beans::XPropertySet > const &  getCurrentDataSource();
         // returns the Url of a database document
         static OUString        getDocumentUrl(SfxItemSet& _rDest);
 
diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx
index 4de77cc..2df16e9 100644
--- a/dbaccess/source/ui/dlg/sqlmessage.cxx
+++ b/dbaccess/source/ui/dlg/sqlmessage.cxx
@@ -68,7 +68,7 @@ namespace
         {
         }
 
-        Image getImage() const
+        Image const & getImage() const
         {
             if ( !m_defaultImage )
                 m_defaultImage = Image( ModuleRes( m_defaultImageID ) );
@@ -107,7 +107,7 @@ namespace
         {
         }
 
-        std::shared_ptr< ImageProvider >   getImageProvider( SQLExceptionInfo::TYPE _eType ) const
+        std::shared_ptr< ImageProvider > const & getImageProvider( SQLExceptionInfo::TYPE _eType ) const
         {
             std::shared_ptr< ImageProvider >* ppProvider( &m_pErrorImage );
             sal_uInt16 nNormalImageID( BMP_EXCEPTION_ERROR );
@@ -133,7 +133,7 @@ namespace
             return *ppProvider;
         }
 
-        std::shared_ptr< LabelProvider >   getLabelProvider( SQLExceptionInfo::TYPE _eType, bool _bSubLabel ) const
+        std::shared_ptr< LabelProvider > const & getLabelProvider( SQLExceptionInfo::TYPE _eType, bool _bSubLabel ) const
         {
             std::shared_ptr< LabelProvider >* ppProvider( &m_pErrorLabel );
             sal_uInt16 nLabelID( STR_EXCEPTION_ERROR );
diff --git a/dbaccess/source/ui/inc/ColumnControlWindow.hxx b/dbaccess/source/ui/inc/ColumnControlWindow.hxx
index 7a1cf40..7c7f63a 100644
--- a/dbaccess/source/ui/inc/ColumnControlWindow.hxx
+++ b/dbaccess/source/ui/inc/ColumnControlWindow.hxx
@@ -61,7 +61,7 @@ namespace dbaui
         virtual css::uno::Reference< css::sdbc::XDatabaseMetaData> getMetaData() override;
         virtual css::uno::Reference< css::sdbc::XConnection> getConnection() override;
         virtual const OTypeInfoMap* getTypeInfo() const override;
-        TOTypeInfoSP getDefaultTyp() const;
+        TOTypeInfoSP const & getDefaultTyp() const;
     };
 }   // namespace dbaui
 #endif // INCLUDED_DBACCESS_SOURCE_UI_INC_COLUMNCONTROLWINDOW_HXX
diff --git a/dbaccess/source/ui/inc/WCopyTable.hxx b/dbaccess/source/ui/inc/WCopyTable.hxx
index 212d034..dd8c38c 100644
--- a/dbaccess/source/ui/inc/WCopyTable.hxx
+++ b/dbaccess/source/ui/inc/WCopyTable.hxx
@@ -208,7 +208,7 @@ namespace dbaui
 
     private:
         void    impl_ensureColumnInfo_throw();
-        ::utl::SharedUNOComponent< css::sdbc::XPreparedStatement >
+        ::utl::SharedUNOComponent< css::sdbc::XPreparedStatement > const &
                 impl_ensureStatement_throw();
     };
 
diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx
index 73281f4..56142ce 100644
--- a/dbaccess/source/ui/misc/WCopyTable.cxx
+++ b/dbaccess/source/ui/misc/WCopyTable.cxx
@@ -330,7 +330,7 @@ void NamedTableCopySource::impl_ensureColumnInfo_throw()
     }
 }
 
-::utl::SharedUNOComponent< XPreparedStatement > NamedTableCopySource::impl_ensureStatement_throw()
+::utl::SharedUNOComponent< XPreparedStatement > const & NamedTableCopySource::impl_ensureStatement_throw()
 {
     if ( !m_xStatement.is() )
         m_xStatement.set( m_xConnection->prepareStatement( getSelectStatement() ), UNO_SET_THROW );
diff --git a/desktop/source/deployment/registry/dp_backenddb.cxx b/desktop/source/deployment/registry/dp_backenddb.cxx
index 535d9a4..cf3f75b 100644
--- a/desktop/source/deployment/registry/dp_backenddb.cxx
+++ b/desktop/source/deployment/registry/dp_backenddb.cxx
@@ -63,7 +63,7 @@ void BackendDb::save()
     ucbDb.writeStream(xData, true /*replace existing*/);
 }
 
-css::uno::Reference<css::xml::dom::XDocument> BackendDb::getDocument()
+css::uno::Reference<css::xml::dom::XDocument> const & BackendDb::getDocument()
 {
     if (!m_doc.is())
     {
@@ -106,7 +106,7 @@ css::uno::Reference<css::xml::dom::XDocument> BackendDb::getDocument()
     return m_doc;
 }
 
-Reference<css::xml::xpath::XXPathAPI> BackendDb::getXPathAPI()
+Reference<css::xml::xpath::XXPathAPI> const & BackendDb::getXPathAPI()
 {
     if (!m_xpathApi.is())
     {
diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx
index 8bed8bb..73e1b43 100644
--- a/desktop/source/deployment/registry/help/dp_help.cxx
+++ b/desktop/source/deployment/registry/help/dp_help.cxx
@@ -106,7 +106,7 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend
     void revokeEntryFromDb(OUString const & url);
     bool activateEntry(OUString const & url);
 
-    Reference< ucb::XSimpleFileAccess3 > getFileAccess();
+    Reference< ucb::XSimpleFileAccess3 > const & getFileAccess();
     Reference< ucb::XSimpleFileAccess3 > m_xSFA;
 
     const Reference<deployment::XPackageTypeInfo> m_xHelpTypeInfo;
@@ -601,7 +601,7 @@ void BackendImpl::implCollectXhpFiles( const OUString& aDir,
     }
 }
 
-Reference< ucb::XSimpleFileAccess3 > BackendImpl::getFileAccess()
+Reference< ucb::XSimpleFileAccess3 > const & BackendImpl::getFileAccess()
 {
     if( !m_xSFA.is() )
     {
diff --git a/desktop/source/deployment/registry/inc/dp_backenddb.hxx b/desktop/source/deployment/registry/inc/dp_backenddb.hxx
index 36b15f8..8731cdc 100644
--- a/desktop/source/deployment/registry/inc/dp_backenddb.hxx
+++ b/desktop/source/deployment/registry/inc/dp_backenddb.hxx
@@ -58,11 +58,11 @@ protected:
 
     /* caller must make sure that only one thread accesses the function
      */
-    css::uno::Reference<css::xml::dom::XDocument> getDocument();
+    css::uno::Reference<css::xml::dom::XDocument> const & getDocument();
 
     /* the namespace prefix is "reg" (without quotes)
      */
-    css::uno::Reference<css::xml::xpath::XXPathAPI> getXPathAPI();
+    css::uno::Reference<css::xml::xpath::XXPathAPI> const & getXPathAPI();
     void save();
     void removeElement(OUString const & sXPathExpression);
 
diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index 6813187..a719dbf 100644
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -836,7 +836,7 @@ namespace accessibility
         }
     }
 
-    static uno::Sequence< OUString > getAttributeNames()
+    static uno::Sequence< OUString > const & getAttributeNames()
     {
         static uno::Sequence< OUString >* pNames = nullptr;
 
diff --git a/editeng/source/editeng/eerdll.cxx b/editeng/source/editeng/eerdll.cxx
index 1de90eb..89d1b84 100644
--- a/editeng/source/editeng/eerdll.cxx
+++ b/editeng/source/editeng/eerdll.cxx
@@ -175,7 +175,7 @@ SfxPoolItem** GlobalEditData::GetDefItems()
     return ppDefItems;
 }
 
-rtl::Reference<SvxForbiddenCharactersTable> GlobalEditData::GetForbiddenCharsTable()
+rtl::Reference<SvxForbiddenCharactersTable> const & GlobalEditData::GetForbiddenCharsTable()
 {
     if ( !xForbiddenCharsTable.is() )
     {
@@ -184,7 +184,7 @@ rtl::Reference<SvxForbiddenCharactersTable> GlobalEditData::GetForbiddenCharsTab
     return xForbiddenCharsTable;
 }
 
-uno::Reference< linguistic2::XLanguageGuessing > GlobalEditData::GetLanguageGuesser()
+uno::Reference< linguistic2::XLanguageGuessing > const & GlobalEditData::GetLanguageGuesser()
 {
     if (!xLanguageGuesser.is())
     {
diff --git a/editeng/source/editeng/eerdll2.hxx b/editeng/source/editeng/eerdll2.hxx
index c19347d..ffb96fe 100644
--- a/editeng/source/editeng/eerdll2.hxx
+++ b/editeng/source/editeng/eerdll2.hxx
@@ -40,9 +40,9 @@ public:
 
     SfxPoolItem**   GetDefItems();
 
-    rtl::Reference<SvxForbiddenCharactersTable> GetForbiddenCharsTable();
+    rtl::Reference<SvxForbiddenCharactersTable> const & GetForbiddenCharsTable();
     void            SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> const & xForbiddenChars ) { xForbiddenCharsTable = xForbiddenChars; }
-    css::uno::Reference< css::linguistic2::XLanguageGuessing > GetLanguageGuesser();
+    css::uno::Reference< css::linguistic2::XLanguageGuessing > const & GetLanguageGuesser();
 };
 
 #endif // INCLUDED_EDITENG_SOURCE_EDITENG_EERDLL2_HXX
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index 1798234..9bd6c66 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -679,8 +679,8 @@ private:
 
     void                SetValidPaperSize( const Size& rSz );
 
-    css::uno::Reference < css::i18n::XBreakIterator > ImplGetBreakIterator() const;
-    css::uno::Reference < css::i18n::XExtendedInputSequenceChecker > ImplGetInputSequenceChecker() const;
+    css::uno::Reference < css::i18n::XBreakIterator > const & ImplGetBreakIterator() const;
+    css::uno::Reference < css::i18n::XExtendedInputSequenceChecker > const & ImplGetInputSequenceChecker() const;
 
     void ImplUpdateOverflowingParaNum( sal_uInt32 );
     void ImplUpdateOverflowingLineNum( sal_uInt32, sal_uInt32, sal_uInt32 );
@@ -899,7 +899,7 @@ public:
     EditView*           GetActiveView() const   { return pActiveView; }
     void                SetActiveView( EditView* pView );
 
-    css::uno::Reference< css::linguistic2::XSpellChecker1 >
+    css::uno::Reference< css::linguistic2::XSpellChecker1 > const &
                         GetSpeller();
     void                SetSpeller( css::uno::Reference< css::linguistic2::XSpellChecker1 > const &xSpl )
                             { xSpeller = xSpl; }
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 9fdb389..d31ecbe 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -4226,7 +4226,7 @@ void ImpEditEngine::ImplInitLayoutMode( OutputDevice* pOutDev, sal_Int32 nPara,
     ImplInitDigitMode( pOutDev, eLang );
 }
 
-Reference < i18n::XBreakIterator > ImpEditEngine::ImplGetBreakIterator() const
+Reference < i18n::XBreakIterator > const & ImpEditEngine::ImplGetBreakIterator() const
 {
     if ( !xBI.is() )
     {
@@ -4236,7 +4236,7 @@ Reference < i18n::XBreakIterator > ImpEditEngine::ImplGetBreakIterator() const
     return xBI;
 }
 
-Reference < i18n::XExtendedInputSequenceChecker > ImpEditEngine::ImplGetInputSequenceChecker() const
+Reference < i18n::XExtendedInputSequenceChecker > const & ImpEditEngine::ImplGetInputSequenceChecker() const
 {
     if ( !xISC.is() )
     {
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 4dfd2d6..1facdd5 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -1449,7 +1449,7 @@ css::lang::Locale ImpEditEngine::GetLocale( const EditPaM& rPaM ) const
     return LanguageTag( GetLanguage( rPaM ) ).getLocale();
 }
 
-Reference< XSpellChecker1 > ImpEditEngine::GetSpeller()
+Reference< XSpellChecker1 > const & ImpEditEngine::GetSpeller()
 {
     if ( !xSpeller.is() )
         xSpeller = LinguMgr::GetSpellChecker();
diff --git a/editeng/source/uno/unoipset.cxx b/editeng/source/uno/unoipset.cxx
index f325079..02c5d9d 100644
--- a/editeng/source/uno/unoipset.cxx
+++ b/editeng/source/uno/unoipset.cxx
@@ -261,7 +261,7 @@ const SfxItemPropertySimpleEntry* SvxItemPropertySet::getPropertyMapEntry(const
  }
 
 
-uno::Reference< beans::XPropertySetInfo >  SvxItemPropertySet::getPropertySetInfo() const
+uno::Reference< beans::XPropertySetInfo > const &  SvxItemPropertySet::getPropertySetInfo() const
 {
     if( !m_xInfo.is() )
         m_xInfo = new SfxItemPropertySetInfo( m_aPropertyMap );
diff --git a/embeddedobj/source/commonembedding/embedobj.cxx b/embeddedobj/source/commonembedding/embedobj.cxx
index cda0aad..5142871 100644
--- a/embeddedobj/source/commonembedding/embedobj.cxx
+++ b/embeddedobj/source/commonembedding/embedobj.cxx
@@ -389,7 +389,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState )
 }
 
 
-uno::Sequence< sal_Int32 > OCommonEmbeddedObject::GetIntermediateStatesSequence_Impl( sal_Int32 nNewState )
+uno::Sequence< sal_Int32 > const & OCommonEmbeddedObject::GetIntermediateStatesSequence_Impl( sal_Int32 nNewState )
 {
     sal_Int32 nCurInd = 0;
     for ( nCurInd = 0; nCurInd < m_aAcceptedStates.getLength(); nCurInd++ )
diff --git a/embeddedobj/source/general/docholder.cxx b/embeddedobj/source/general/docholder.cxx
index 7dab006..dabebe8 100644
--- a/embeddedobj/source/general/docholder.cxx
+++ b/embeddedobj/source/general/docholder.cxx
@@ -818,7 +818,7 @@ bool DocumentHolder::HideUI( const uno::Reference< css::frame::XLayoutManager >&
 }
 
 
-uno::Reference< frame::XFrame > DocumentHolder::GetDocFrame()
+uno::Reference< frame::XFrame > const & DocumentHolder::GetDocFrame()
 {
     // the frame for outplace activation
     if ( !m_xFrame.is() )
diff --git a/embeddedobj/source/inc/commonembobj.hxx b/embeddedobj/source/inc/commonembobj.hxx
index b3f4524..72217de 100644
--- a/embeddedobj/source/inc/commonembobj.hxx
+++ b/embeddedobj/source/inc/commonembobj.hxx
@@ -186,7 +186,7 @@ private:
 
     void SwitchStateTo_Impl( sal_Int32 nNextState );
 
-    css::uno::Sequence< sal_Int32 > GetIntermediateStatesSequence_Impl( sal_Int32 nNewState );
+    css::uno::Sequence< sal_Int32 > const & GetIntermediateStatesSequence_Impl( sal_Int32 nNewState );
 
     OUString GetFilterName( sal_Int32 nVersion ) const;
     css::uno::Reference< css::util::XCloseable > LoadDocumentFromStorage_Impl();
diff --git a/embeddedobj/source/inc/docholder.hxx b/embeddedobj/source/inc/docholder.hxx
index 10a9b57..3e62725 100644
--- a/embeddedobj/source/inc/docholder.hxx
+++ b/embeddedobj/source/inc/docholder.hxx
@@ -82,7 +82,7 @@ private:
     css::uno::Sequence< css::uno::Any > m_aOutplaceFrameProps;
 
 
-    css::uno::Reference< css::frame::XFrame > GetDocFrame();
+    css::uno::Reference< css::frame::XFrame > const & GetDocFrame();
     bool LoadDocToFrame( bool );
 
     css::awt::Rectangle CalculateBorderedArea( const css::awt::Rectangle& aRect );
diff --git a/extensions/source/bibliography/bibconfig.cxx b/extensions/source/bibliography/bibconfig.cxx
index 9b59d38..34fd9a2 100644
--- a/extensions/source/bibliography/bibconfig.cxx
+++ b/extensions/source/bibliography/bibconfig.cxx
@@ -37,7 +37,7 @@ using namespace ::com::sun::star::sdb;
 
 const char cDataSourceHistory[] = "DataSourceHistory";
 
-Sequence<OUString> BibConfig::GetPropertyNames()
+Sequence<OUString> const & BibConfig::GetPropertyNames()
 {
     static Sequence<OUString> aNames;
     if(!aNames.getLength())
diff --git a/extensions/source/bibliography/bibconfig.hxx b/extensions/source/bibliography/bibconfig.hxx
index c260f8e..f4dba75 100644
--- a/extensions/source/bibliography/bibconfig.hxx
+++ b/extensions/source/bibliography/bibconfig.hxx
@@ -101,7 +101,7 @@ class BibConfig : public utl::ConfigItem
 
     OUString               aColumnDefaults[COLUMN_COUNT];
 
-    static css::uno::Sequence<OUString> GetPropertyNames();
+    static css::uno::Sequence<OUString> const & GetPropertyNames();
 
     virtual void    ImplCommit() override;
 
diff --git a/extensions/source/bibliography/bibload.cxx b/extensions/source/bibliography/bibload.cxx
index 3bff83b..3d9d475 100644
--- a/extensions/source/bibliography/bibload.cxx
+++ b/extensions/source/bibliography/bibload.cxx
@@ -88,9 +88,9 @@ private:
                                 const Reference< XLoadEventListener > & aListener);
 
     BibDataManager*         GetDataManager()const;
-    Reference< XNameAccess >            GetDataColumns() const;
-    Reference< XResultSet >             GetDataCursor() const;
-    Reference< sdb::XColumn >               GetIdentifierColumn() const;
+    Reference< XNameAccess > const &    GetDataColumns() const;
+    Reference< XResultSet > const &     GetDataCursor() const;
+    Reference< sdb::XColumn >           GetIdentifierColumn() const;
 
 public:
                             BibliographyLoader();
@@ -336,7 +336,7 @@ BibDataManager* BibliographyLoader::GetDataManager()const
     return m_pDatMan;
 }
 
-Reference< XNameAccess >  BibliographyLoader::GetDataColumns() const
+Reference< XNameAccess > const & BibliographyLoader::GetDataColumns() const
 {
     if (!m_xColumns.is())
     {
@@ -406,7 +406,7 @@ Reference< sdb::XColumn >  BibliographyLoader::GetIdentifierColumn() const
     return xReturn;
 }
 
-Reference< XResultSet >  BibliographyLoader::GetDataCursor() const
+Reference< XResultSet > const &  BibliographyLoader::GetDataCursor() const
 {
     if (!m_xCursor.is())
         GetDataColumns();
diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx
index 930a115..8ce8ba0 100644
--- a/extensions/source/bibliography/datman.cxx
+++ b/extensions/source/bibliography/datman.cxx
@@ -744,7 +744,7 @@ Reference< awt::XControlModel > BibDataManager::updateGridModel()
     return updateGridModel( m_xForm );
 }
 
-Reference< awt::XControlModel > BibDataManager::updateGridModel(const Reference< XForm > & xDbForm)
+Reference< awt::XControlModel > const & BibDataManager::updateGridModel(const Reference< XForm > & xDbForm)
 {
     try
     {
@@ -1595,7 +1595,7 @@ void BibDataManager::SetToolbar(BibToolBar* pSet)
         pToolbar->SetDatMan(*this);
 }
 
-uno::Reference< form::runtime::XFormController > BibDataManager::GetFormController()
+uno::Reference< form::runtime::XFormController > const & BibDataManager::GetFormController()
 {
     if(!m_xFormCtrl.is())
     {
diff --git a/extensions/source/bibliography/datman.hxx b/extensions/source/bibliography/datman.hxx
index 5bda576..19fd550 100644
--- a/extensions/source/bibliography/datman.hxx
+++ b/extensions/source/bibliography/datman.hxx
@@ -106,7 +106,7 @@ protected:
         void                        SetMeAsUidListener();
         void                        RemoveMeAsUidListener();
 
-        css::uno::Reference< css::awt::XControlModel >
+        css::uno::Reference< css::awt::XControlModel > const &
                                     updateGridModel(const css::uno::Reference< css::form::XForm > & xDbForm);
         static css::uno::Reference< css::awt::XControlModel >
                                     createGridModel( const OUString& rName );
@@ -172,7 +172,7 @@ public:
         const OUString&             GetIdentifierMapping();
         void                        ResetIdentifierMapping() {sIdentifierMapping.clear();}
 
-        css::uno::Reference< css::form::runtime::XFormController > GetFormController();
+        css::uno::Reference< css::form::runtime::XFormController > const & GetFormController();
         void                        RegisterInterceptor( ::bib::BibBeamer* pBibBeamer);
 
         bool                        HasActiveConnection();
diff --git a/extensions/source/propctrlr/composeduiupdate.cxx b/extensions/source/propctrlr/composeduiupdate.cxx
index 398dea7..8295cdd 100644
--- a/extensions/source/propctrlr/composeduiupdate.cxx
+++ b/extensions/source/propctrlr/composeduiupdate.cxx
@@ -746,7 +746,7 @@ namespace pcr
     }
 
 
-    Reference< XObjectInspectorUI > ComposedPropertyUIUpdate::getDelegatorUI() const
+    Reference< XObjectInspectorUI > const & ComposedPropertyUIUpdate::getDelegatorUI() const
     {
         impl_checkDisposed();
         return m_xDelegatorUI;
diff --git a/extensions/source/propctrlr/composeduiupdate.hxx b/extensions/source/propctrlr/composeduiupdate.hxx
index 30011af..bd2539f 100644
--- a/extensions/source/propctrlr/composeduiupdate.hxx
+++ b/extensions/source/propctrlr/composeduiupdate.hxx
@@ -89,7 +89,7 @@ namespace pcr
         /** returns the delegator UI
             @throw css::lang::DisposedException
         */
-        css::uno::Reference< css::inspection::XObjectInspectorUI > getDelegatorUI() const;
+        css::uno::Reference< css::inspection::XObjectInspectorUI > const & getDelegatorUI() const;
 
         /** returns a ->XObjectInspectorUI instance belonging to a given property handler
 
diff --git a/filter/source/flash/swfwriter.hxx b/filter/source/flash/swfwriter.hxx
index 0a2ea58..8d3c8b4 100644
--- a/filter/source/flash/swfwriter.hxx
+++ b/filter/source/flash/swfwriter.hxx
@@ -368,7 +368,7 @@ private:
                                    const double P3x, const double P3y,
                                    const double P4x, const double P4y );
 
-    css::uno::Reference < css::i18n::XBreakIterator > Impl_GetBreakIterator();
+    css::uno::Reference < css::i18n::XBreakIterator > const & Impl_GetBreakIterator();
 
 private:
     css::uno::Reference< css::i18n::XBreakIterator > mxBreakIterator;
diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx
index 5d1d057..05058d0 100644
--- a/filter/source/flash/swfwriter1.cxx
+++ b/filter/source/flash/swfwriter1.cxx
@@ -1987,7 +1987,7 @@ void Writer::Impl_quadBezierApprox( BitStream& rBits,
     }
 }
 
-Reference < XBreakIterator > Writer::Impl_GetBreakIterator()
+Reference < XBreakIterator > const & Writer::Impl_GetBreakIterator()
 {
     if ( !mxBreakIterator.is() )
     {
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index ae2f189..6173a5a 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -122,7 +122,7 @@ public:
     RefEdit*        GetCurrRefEdit();
 
     const FormulaHelper& GetFormulaHelper() const { return m_aFormulaHelper;}
-    uno::Reference< sheet::XFormulaOpCodeMapper > GetFormulaOpCodeMapper() const;
+    uno::Reference< sheet::XFormulaOpCodeMapper > const & GetFormulaOpCodeMapper() const;
 
     DECL_LINK_TYPED( ModifyHdl, ParaWin&, void );
     DECL_LINK_TYPED( FxHdl, ParaWin&, void );
@@ -404,7 +404,7 @@ void FormulaDlg_Impl::PreNotify( NotifyEvent& rNEvt )
     pData->SetFocusWindow(pWin);
 }
 
-uno::Reference< sheet::XFormulaOpCodeMapper > FormulaDlg_Impl::GetFormulaOpCodeMapper() const
+uno::Reference< sheet::XFormulaOpCodeMapper > const & FormulaDlg_Impl::GetFormulaOpCodeMapper() const
 {
     if ( !m_xOpCodeMapper.is() )
     {
diff --git a/framework/inc/helper/mischelper.hxx b/framework/inc/helper/mischelper.hxx
index 84d3dc5..9999856 100644
--- a/framework/inc/helper/mischelper.hxx
+++ b/framework/inc/helper/mischelper.hxx
@@ -118,7 +118,7 @@ class FWI_DLLPUBLIC LanguageGuessingHelper
 public:
     LanguageGuessingHelper(const css::uno::Reference< css::uno::XComponentContext >& _xContext) : m_xContext(_xContext){}
 
-    css::uno::Reference< css::linguistic2::XLanguageGuessing >  GetGuesser() const;
+    css::uno::Reference< css::linguistic2::XLanguageGuessing > const &  GetGuesser() const;
 };
 
 FWI_DLLPUBLIC void FillLangItems( std::set< OUString > &rLangItems,
diff --git a/framework/source/fwe/classes/imagewrapper.cxx b/framework/source/fwe/classes/imagewrapper.cxx
index 1924eeb..98897e3 100644
--- a/framework/source/fwe/classes/imagewrapper.cxx
+++ b/framework/source/fwe/classes/imagewrapper.cxx
@@ -32,7 +32,7 @@ using namespace com::sun::star::uno;
 namespace framework
 {
 
-static Sequence< sal_Int8 > impl_getStaticIdentifier()
+static Sequence< sal_Int8 > const & impl_getStaticIdentifier()
 {
     static const sal_uInt8 pGUID[16] = { 0x46, 0xAD, 0x69, 0xFB, 0xA7, 0xBE, 0x44, 0x83, 0xB2, 0xA7, 0xB3, 0xEC, 0x59, 0x4A, 0xB7, 0x00 };
     static css::uno::Sequence< sal_Int8 > seqID(reinterpret_cast<const sal_Int8*>(pGUID), 16);
diff --git a/framework/source/fwe/classes/rootactiontriggercontainer.cxx b/framework/source/fwe/classes/rootactiontriggercontainer.cxx
index f58cdcc..7c43124 100644
--- a/framework/source/fwe/classes/rootactiontriggercontainer.cxx
+++ b/framework/source/fwe/classes/rootactiontriggercontainer.cxx
@@ -37,7 +37,7 @@ using namespace com::sun::star::beans;
 namespace framework
 {
 
-static Sequence< sal_Int8 > impl_getStaticIdentifier()
+static Sequence< sal_Int8 > const & impl_getStaticIdentifier()
 {
     static const sal_uInt8 pGUID[16] = { 0x17, 0x0F, 0xA2, 0xC9, 0xCA, 0x50, 0x4A, 0xD3, 0xA6, 0x3B, 0x39, 0x99, 0xC5, 0x96, 0x43, 0x27 };
     static css::uno::Sequence< sal_Int8 > seqID(reinterpret_cast<const sal_Int8*>(pGUID), 16);
diff --git a/framework/source/fwi/helper/mischelper.cxx b/framework/source/fwi/helper/mischelper.cxx
index 7eb5a40..7ce88b2 100644
--- a/framework/source/fwi/helper/mischelper.cxx
+++ b/framework/source/fwi/helper/mischelper.cxx
@@ -43,7 +43,7 @@ using namespace ::com::sun::star::lang;
 namespace framework
 {
 
-uno::Reference< linguistic2::XLanguageGuessing > LanguageGuessingHelper::GetGuesser() const
+uno::Reference< linguistic2::XLanguageGuessing > const & LanguageGuessingHelper::GetGuesser() const
 {
     if (!m_xLanguageGuesser.is())
     {
diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx
index 0e611e6..b46cb21 100644
--- a/framework/source/services/substitutepathvars.cxx
+++ b/framework/source/services/substitutepathvars.cxx
@@ -274,7 +274,7 @@ protected:
         throw (css::container::NoSuchElementException, css::uno::RuntimeException);
     OUString impl_reSubstituteVariables( const OUString& aText )
         throw (css::uno::RuntimeException);
-    OUString impl_getSubstituteVariableValue( const OUString& variable )
+    OUString const & impl_getSubstituteVariableValue( const OUString& variable )
         throw (css::container::NoSuchElementException, css::uno::RuntimeException);
 
 private:
@@ -1147,7 +1147,7 @@ throw ( RuntimeException )
 }
 
 // This method support both request schemes "$("<varname>")" or "<varname>".
-OUString SubstitutePathVariables::impl_getSubstituteVariableValue( const OUString& rVariable )
+OUString const & SubstitutePathVariables::impl_getSubstituteVariableValue( const OUString& rVariable )
 throw ( NoSuchElementException, RuntimeException )
 {
     OUString aVariable;
diff --git a/i18nlangtag/source/languagetag/languagetag.cxx b/i18nlangtag/source/languagetag/languagetag.cxx
index b34a5e9..f87fe58 100644
--- a/i18nlangtag/source/languagetag/languagetag.cxx
+++ b/i18nlangtag/source/languagetag/languagetag.cxx
@@ -280,12 +280,12 @@ private:
     mutable bool                            mbCachedCountry     : 1;
     mutable bool                            mbCachedVariants    : 1;
 
-    const OUString &    getBcp47() const;
-    OUString            getLanguage() const;
-    OUString            getScript() const;
-    OUString            getCountry() const;
+    OUString const &    getBcp47() const;
+    OUString const &    getLanguage() const;
+    OUString const &    getScript() const;
+    OUString const &    getCountry() const;
     OUString            getRegion() const;
-    OUString            getVariants() const;
+    OUString const &    getVariants() const;
     bool                hasScript() const;
 
     bool                isIsoLocale() const;
@@ -996,7 +996,7 @@ LanguageTag::ImplPtr LanguageTag::registerImpl() const
 }
 
 
-LanguageTag::ImplPtr LanguageTag::getImpl() const
+LanguageTag::ImplPtr const & LanguageTag::getImpl() const
 {
     if (!mpImpl)
     {
@@ -1802,7 +1802,7 @@ bool LanguageTag::isIsoScript( const OUString& rScript )
 }
 
 
-OUString LanguageTagImpl::getLanguage() const
+OUString const & LanguageTagImpl::getLanguage() const
 {
     if (!mbCachedLanguage)
     {
@@ -1824,7 +1824,7 @@ OUString LanguageTag::getLanguage() const
 }
 
 
-OUString LanguageTagImpl::getScript() const
+OUString const & LanguageTagImpl::getScript() const
 {
     if (!mbCachedScript)
     {
@@ -1858,7 +1858,7 @@ OUString LanguageTag::getLanguageAndScript() const
 }
 
 
-OUString LanguageTagImpl::getCountry() const
+OUString const & LanguageTagImpl::getCountry() const
 {
     if (!mbCachedCountry)
     {
@@ -1888,7 +1888,7 @@ OUString LanguageTagImpl::getRegion() const
 }
 
 
-OUString LanguageTagImpl::getVariants() const
+OUString const & LanguageTagImpl::getVariants() const
 {
     if (!mbCachedVariants)
     {
diff --git a/i18npool/inc/characterclassificationImpl.hxx b/i18npool/inc/characterclassificationImpl.hxx
index ef44b26..b775e10 100644
--- a/i18npool/inc/characterclassificationImpl.hxx
+++ b/i18npool/inc/characterclassificationImpl.hxx
@@ -99,7 +99,7 @@ private:
     css::uno::Reference < css::uno::XComponentContext > m_xContext;
     css::uno::Reference < XCharacterClassification > xUCI;
 
-    css::uno::Reference < XCharacterClassification > SAL_CALL getLocaleSpecificCharacterClassification(const css::lang::Locale& rLocale)
+    css::uno::Reference < XCharacterClassification > const & SAL_CALL getLocaleSpecificCharacterClassification(const css::lang::Locale& rLocale)
         throw(css::uno::RuntimeException);
     bool SAL_CALL createLocaleSpecificCharacterClassification(const OUString& serviceName, const css::lang::Locale& rLocale);
 
diff --git a/i18npool/inc/indexentrysupplier.hxx b/i18npool/inc/indexentrysupplier.hxx
index 8b59211..594059e 100644
--- a/i18npool/inc/indexentrysupplier.hxx
+++ b/i18npool/inc/indexentrysupplier.hxx
@@ -89,7 +89,7 @@ private:
     css::uno::Reference < css::i18n::XExtendedIndexEntrySupplier > xIES;
     css::uno::Reference < css::uno::XComponentContext > m_xContext;
     bool SAL_CALL createLocaleSpecificIndexEntrySupplier(const OUString& name) throw( css::uno::RuntimeException );
-    css::uno::Reference < css::i18n::XExtendedIndexEntrySupplier > SAL_CALL getLocaleSpecificIndexEntrySupplier(
+    css::uno::Reference < css::i18n::XExtendedIndexEntrySupplier > const & SAL_CALL getLocaleSpecificIndexEntrySupplier(
         const css::lang::Locale& rLocale, const OUString& rSortAlgorithm) throw (css::uno::RuntimeException);
 
 protected:
diff --git a/i18npool/inc/xdictionary.hxx b/i18npool/inc/xdictionary.hxx
index ed6b269..09707ff 100644
--- a/i18npool/inc/xdictionary.hxx
+++ b/i18npool/inc/xdictionary.hxx
@@ -71,7 +71,7 @@ public:
     ~xdictionary();
     Boundary nextWord( const OUString& rText, sal_Int32 nPos, sal_Int16 wordType);
     Boundary previousWord( const OUString& rText, sal_Int32 nPos, sal_Int16 wordType);
-    Boundary getWordBoundary( const OUString& rText, sal_Int32 nPos, sal_Int16 wordType, bool bDirection );
+    Boundary const & getWordBoundary( const OUString& rText, sal_Int32 nPos, sal_Int16 wordType, bool bDirection );
     void setJapaneseWordBreak();
 
 private:
diff --git a/i18npool/source/breakiterator/xdictionary.cxx b/i18npool/source/breakiterator/xdictionary.cxx
index 551ce85..69aba9c 100644
--- a/i18npool/source/breakiterator/xdictionary.cxx
+++ b/i18npool/source/breakiterator/xdictionary.cxx
@@ -428,7 +428,7 @@ Boundary xdictionary::nextWord(const OUString& rText, sal_Int32 anyPos, sal_Int1
         return getWordBoundary(rText, anyPos, wordType, true);
 }
 
-Boundary xdictionary::getWordBoundary(const OUString& rText, sal_Int32 anyPos, sal_Int16 wordType, bool bDirection)
+Boundary const & xdictionary::getWordBoundary(const OUString& rText, sal_Int32 anyPos, sal_Int16 wordType, bool bDirection)
 {
         const sal_Unicode *text=rText.getStr();
         sal_Int32 len=rText.getLength();
diff --git a/i18npool/source/characterclassification/characterclassificationImpl.cxx b/i18npool/source/characterclassification/characterclassificationImpl.cxx
index 41aa591..424f5ca 100644
--- a/i18npool/source/characterclassification/characterclassificationImpl.cxx
+++ b/i18npool/source/characterclassification/characterclassificationImpl.cxx
@@ -152,7 +152,7 @@ bool SAL_CALL CharacterClassificationImpl::createLocaleSpecificCharacterClassifi
     return false;
 }
 
-Reference < XCharacterClassification > SAL_CALL
+Reference < XCharacterClassification > const & SAL_CALL
 CharacterClassificationImpl::getLocaleSpecificCharacterClassification(const Locale& rLocale)
         throw(RuntimeException)
 {
diff --git a/i18npool/source/indexentry/indexentrysupplier.cxx b/i18npool/source/indexentry/indexentrysupplier.cxx
index ed3dbe7..2ade78f 100644
--- a/i18npool/source/indexentry/indexentrysupplier.cxx
+++ b/i18npool/source/indexentry/indexentrysupplier.cxx
@@ -110,7 +110,7 @@ bool SAL_CALL IndexEntrySupplier::createLocaleSpecificIndexEntrySupplier(const O
     return false;
 }
 
-Reference < css::i18n::XExtendedIndexEntrySupplier > SAL_CALL
+Reference < css::i18n::XExtendedIndexEntrySupplier > const & SAL_CALL
 IndexEntrySupplier::getLocaleSpecificIndexEntrySupplier(const Locale& rLocale, const OUString& rSortAlgorithm) throw (RuntimeException)
 {
     if (xIES.is() && rSortAlgorithm == aSortAlgorithm && rLocale.Language == aLocale.Language &&
diff --git a/include/basic/sbmod.hxx b/include/basic/sbmod.hxx
index 3727d1d..03d6fb2 100644
--- a/include/basic/sbmod.hxx
+++ b/include/basic/sbmod.hxx
@@ -128,7 +128,7 @@ public:
     bool     isProxyModule() { return bIsProxyModule; }
     void     AddVarName( const OUString& aName );
     void     RemoveVars();
-    css::uno::Reference< css::script::XInvocation > GetUnoModule();
+    css::uno::Reference< css::script::XInvocation > const & GetUnoModule();
     bool     createCOMWrapperForIface( css::uno::Any& o_rRetAny, SbClassModuleObject* pProxyClassModuleObject );
     void     GetCodeCompleteDataFromParse(CodeCompleteDataCache& aCache);
     const SbxArrayRef& GetMethods() { return pMethods;}
diff --git a/include/basic/sbstar.hxx b/include/basic/sbstar.hxx
index 1fda1b5..47f21bc 100644
--- a/include/basic/sbstar.hxx
+++ b/include/basic/sbstar.hxx
@@ -144,7 +144,7 @@ public:
 
     static void     SetGlobalBreakHdl( const Link<StarBASIC*,sal_uInt16>& rNewHdl );
 
-    SbxArrayRef     getUnoListeners();
+    SbxArrayRef const & getUnoListeners();
 
     static SbxBase* FindSBXInCurrentScope( const OUString& rName );
     static SbMethod* GetActiveMethod( sal_uInt16 nLevel = 0 );
diff --git a/include/codemaker/options.hxx b/include/codemaker/options.hxx
index 2d7ddbf..5a0f0db 100644
--- a/include/codemaker/options.hxx
+++ b/include/codemaker/options.hxx
@@ -52,7 +52,7 @@ public:
 
     const ::rtl::OString&   getProgramName() const { return m_program;}
     bool                isValid(const ::rtl::OString& option) const;
-    const ::rtl::OString    getOption(const ::rtl::OString& option) const
+    const OString&      getOption(const ::rtl::OString& option) const
         throw( IllegalArgument );
 
     const StringVector& getInputFiles() { return m_inputFiles;}
diff --git a/include/comphelper/accessibletexthelper.hxx b/include/comphelper/accessibletexthelper.hxx
index 7dd0fc5..368e468 100644
--- a/include/comphelper/accessibletexthelper.hxx
+++ b/include/comphelper/accessibletexthelper.hxx
@@ -48,8 +48,8 @@ namespace comphelper
         OCommonAccessibleText();
         virtual ~OCommonAccessibleText();
 
-        css::uno::Reference < css::i18n::XBreakIterator >             implGetBreakIterator();
-        css::uno::Reference < css::i18n::XCharacterClassification >   implGetCharacterClassification();
+        css::uno::Reference < css::i18n::XBreakIterator > const &            implGetBreakIterator();
+        css::uno::Reference < css::i18n::XCharacterClassification > const &  implGetCharacterClassification();
         static bool                      implIsValidBoundary( css::i18n::Boundary& rBoundary, sal_Int32 nLength );
         static bool                      implIsValidIndex( sal_Int32 nIndex, sal_Int32 nLength );
         static bool                      implIsValidRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex, sal_Int32 nLength );
diff --git a/include/comphelper/container.hxx b/include/comphelper/container.hxx
index 12b33ab..03a7e96 100644
--- a/include/comphelper/container.hxx
+++ b/include/comphelper/container.hxx
@@ -51,7 +51,7 @@ public:
 
     virtual ~IndexAccessIterator();
 
-    css::uno::Reference< css::uno::XInterface>    Next();
+    css::uno::Reference< css::uno::XInterface> const &    Next();
 
     virtual void Invalidate() { m_xCurrentObject = nullptr; }
 
diff --git a/include/connectivity/dbconversion.hxx b/include/connectivity/dbconversion.hxx
index a79436e..0c60402 100644
--- a/include/connectivity/dbconversion.hxx
+++ b/include/connectivity/dbconversion.hxx
@@ -67,7 +67,7 @@ namespace dbtools
 {
     namespace DBTypeConversion
     {
-        OOO_DLLPUBLIC_DBTOOLS css::util::Date getStandardDate();
+        OOO_DLLPUBLIC_DBTOOLS css::util::Date const & getStandardDate();
         OOO_DLLPUBLIC_DBTOOLS void setValue(const css::uno::Reference< css::sdb::XColumnUpdate>& xVariant,
                                     const css::uno::Reference< css::util::XNumberFormatter>& xFormatter,
                                     const css::util::Date& rNullDate,
diff --git a/include/editeng/unoipset.hxx b/include/editeng/unoipset.hxx
index fc24cfb..9eeede1 100644
--- a/include/editeng/unoipset.hxx
+++ b/include/editeng/unoipset.hxx
@@ -57,7 +57,7 @@ public:
     void AddUsrAnyForID(const css::uno::Any& rAny, sal_uInt16 nWID);
     void ClearAllUsrAny();
 
-    css::uno::Reference< css::beans::XPropertySetInfo > getPropertySetInfo() const;
+    css::uno::Reference< css::beans::XPropertySetInfo > const & getPropertySetInfo() const;
     const SfxItemPropertyMap& getPropertyMap() const { return m_aPropertyMap;}
     const SfxItemPropertySimpleEntry* getPropertyMapEntry(const OUString &rName) const;
 };
diff --git a/include/i18nlangtag/languagetag.hxx b/include/i18nlangtag/languagetag.hxx
index f494d78..a1b1bb9 100644
--- a/include/i18nlangtag/languagetag.hxx
+++ b/include/i18nlangtag/languagetag.hxx
@@ -514,7 +514,7 @@ private:
     mutable bool                            mbInitializedLangID : 1;
             bool                            mbIsFallback        : 1;
 
-    ImplPtr             getImpl() const;
+    ImplPtr const &     getImpl() const;
     ImplPtr             registerImpl() const;
     void                syncFromImpl();
     void                syncVarsFromRawImpl() const;
diff --git a/include/oox/drawingml/shape.hxx b/include/oox/drawingml/shape.hxx
index 520bc51..1367e2e 100644
--- a/include/oox/drawingml/shape.hxx
+++ b/include/oox/drawingml/shape.hxx
@@ -123,7 +123,7 @@ public:
     Shape3DProperties&              get3DProperties() { return *mp3DPropertiesPtr; }

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list