[Libreoffice-commits] core.git: binaryurp/source chart2/source codemaker/source comphelper/source compilerplugins/clang connectivity/source dbaccess/source editeng/source extensions/source hwpfilter/source idlc/inc include/basic include/codemaker include/comphelper include/editeng include/svx include/vcl lotuswordpro/source reportdesign/source sc/inc sc/qa sc/source sd/source sfx2/source shell/source starmath/inc starmath/source svx/source sw/inc sw/qa sw/source ucb/source vcl/generic vcl/inc vcl/source xmloff/source xmlscript/source
Noel Grandin
noel at peralex.com
Tue Jun 24 02:35:07 PDT 2014
binaryurp/source/binaryany.hxx | 2
binaryurp/source/bridge.cxx | 4
chart2/source/view/charttypes/GL3DBarChart.cxx | 6
chart2/source/view/main/OpenglShapeFactory.cxx | 6
codemaker/source/cppumaker/cpputype.cxx | 10
codemaker/source/javamaker/javatype.cxx | 4
comphelper/source/property/propertysethelper.cxx | 4
comphelper/source/property/propertysetinfo.cxx | 4
compilerplugins/clang/returnbyref.cxx | 153
connectivity/source/drivers/mork/MNSINIParser.hxx | 2
connectivity/source/drivers/mork/MNSProfileDiscover.cxx | 2
connectivity/source/drivers/mozab/bootstrap/MNSINIParser.hxx | 2
connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx | 2
connectivity/source/drivers/odbc/OPreparedStatement.cxx | 8
connectivity/source/inc/odbc/OBoundParam.hxx | 4
dbaccess/source/ui/control/RelationControl.cxx | 38
dbaccess/source/ui/dlg/RelationDlg.cxx | 2
dbaccess/source/ui/inc/JoinController.hxx | 4
dbaccess/source/ui/inc/JoinTableView.hxx | 14
dbaccess/source/ui/inc/TableConnection.hxx | 2
dbaccess/source/ui/inc/TableConnectionData.hxx | 4
dbaccess/source/ui/inc/TableController.hxx | 4
dbaccess/source/ui/inc/TableWindow.hxx | 4
dbaccess/source/ui/inc/WCopyTable.hxx | 12
dbaccess/source/ui/misc/WCPage.cxx | 12
dbaccess/source/ui/misc/WColumnSelect.cxx | 42
dbaccess/source/ui/misc/WCopyTable.cxx | 6
dbaccess/source/ui/misc/WExtendPages.cxx | 8
dbaccess/source/ui/misc/WNameMatch.cxx | 24
dbaccess/source/ui/misc/WTypeSelect.cxx | 8
dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx | 8
dbaccess/source/ui/querydesign/JAccess.cxx | 8
dbaccess/source/ui/querydesign/JoinDesignView.cxx | 2
dbaccess/source/ui/querydesign/JoinTableView.cxx | 152
dbaccess/source/ui/querydesign/QueryDesignView.cxx | 54
dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.cxx | 2
dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx | 2
dbaccess/source/ui/querydesign/QueryTableView.cxx | 224
dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx | 85
dbaccess/source/ui/querydesign/TableConnection.cxx | 18
dbaccess/source/ui/querydesign/TableConnectionData.cxx | 6
dbaccess/source/ui/querydesign/TableWindowAccess.cxx | 27
dbaccess/source/ui/querydesign/TableWindowTitle.cxx | 6
dbaccess/source/ui/relationdesign/RTableConnection.cxx | 6
dbaccess/source/ui/relationdesign/RelationDesignView.cxx | 2
dbaccess/source/ui/relationdesign/RelationTableView.cxx | 34
dbaccess/source/ui/tabledesign/TEditControl.cxx | 24
dbaccess/source/ui/tabledesign/TableFieldControl.cxx | 2
editeng/source/uno/unotext.cxx | 2
extensions/source/plugin/base/evtlstnr.cxx | 2
extensions/source/plugin/base/manager.cxx | 2
extensions/source/plugin/base/nfuncs.cxx | 6
extensions/source/plugin/base/plcom.cxx | 4
extensions/source/plugin/base/xplugin.cxx | 24
extensions/source/plugin/inc/plugin/impl.hxx | 6
extensions/source/propctrlr/standardcontrol.cxx | 30
hwpfilter/source/hpara.h | 2
hwpfilter/source/hwpfile.h | 6
hwpfilter/source/hwpreader.cxx | 186
idlc/inc/idlc/idlc.hxx | 4
include/basic/sbxvar.hxx | 2
include/codemaker/exceptiontree.hxx | 4
include/comphelper/propertysetinfo.hxx | 2
include/editeng/unoipset.hxx | 2
include/svx/charmap.hxx | 2
include/vcl/openglwin.hxx | 2
lotuswordpro/source/filter/benlist.cxx | 12
lotuswordpro/source/filter/benobj.cxx | 2
lotuswordpro/source/filter/bento.hxx | 18
lotuswordpro/source/filter/lwp9reader.cxx | 4
lotuswordpro/source/filter/lwpbackgroundoverride.hxx | 2
lotuswordpro/source/filter/lwpbulletstylemgr.cxx | 4
lotuswordpro/source/filter/lwpcelllayout.cxx | 36
lotuswordpro/source/filter/lwpcelllayout.hxx | 2
lotuswordpro/source/filter/lwpcharacterstyle.cxx | 8
lotuswordpro/source/filter/lwpcontent.hxx | 6
lotuswordpro/source/filter/lwpdivinfo.cxx | 6
lotuswordpro/source/filter/lwpdivinfo.hxx | 6
lotuswordpro/source/filter/lwpdlvlist.hxx | 18
lotuswordpro/source/filter/lwpdoc.cxx | 102
lotuswordpro/source/filter/lwpdoc.hxx | 42
lotuswordpro/source/filter/lwpfilehdr.hxx | 6
lotuswordpro/source/filter/lwpfnlayout.cxx | 32
lotuswordpro/source/filter/lwpfootnote.cxx | 6
lotuswordpro/source/filter/lwpfootnote.hxx | 14
lotuswordpro/source/filter/lwpfoundry.cxx | 46
lotuswordpro/source/filter/lwpfoundry.hxx | 22
lotuswordpro/source/filter/lwpframelayout.cxx | 31
lotuswordpro/source/filter/lwpframelayout.hxx | 4
lotuswordpro/source/filter/lwpfrib.cxx | 6
lotuswordpro/source/filter/lwpfribbreaks.cxx | 2
lotuswordpro/source/filter/lwpfribbreaks.hxx | 2
lotuswordpro/source/filter/lwpfribframe.cxx | 2
lotuswordpro/source/filter/lwpfribmark.cxx | 6
lotuswordpro/source/filter/lwpfribptr.cxx | 12
lotuswordpro/source/filter/lwpfribsection.cxx | 28
lotuswordpro/source/filter/lwpfribtable.cxx | 4
lotuswordpro/source/filter/lwpgrfobj.cxx | 34
lotuswordpro/source/filter/lwpgrfobj.hxx | 2
lotuswordpro/source/filter/lwpholder.hxx | 12
lotuswordpro/source/filter/lwplayout.cxx | 70
lotuswordpro/source/filter/lwplayout.hxx | 8
lotuswordpro/source/filter/lwplaypiece.hxx | 14
lotuswordpro/source/filter/lwpmarker.cxx | 5
lotuswordpro/source/filter/lwpnotes.cxx | 4
lotuswordpro/source/filter/lwpobj.hxx | 2
lotuswordpro/source/filter/lwpobjfactory.cxx | 6
lotuswordpro/source/filter/lwpobjfactory.hxx | 2
lotuswordpro/source/filter/lwpobjhdr.hxx | 6
lotuswordpro/source/filter/lwpobjid.cxx | 8
lotuswordpro/source/filter/lwppagehint.hxx | 4
lotuswordpro/source/filter/lwppagelayout.cxx | 56
lotuswordpro/source/filter/lwppara.cxx | 29
lotuswordpro/source/filter/lwppara.hxx | 14
lotuswordpro/source/filter/lwppara1.cxx | 6
lotuswordpro/source/filter/lwpparastyle.cxx | 16
lotuswordpro/source/filter/lwpproplist.cxx | 4
lotuswordpro/source/filter/lwprowlayout.cxx | 38
lotuswordpro/source/filter/lwprowlayout.hxx | 2
lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx | 6
lotuswordpro/source/filter/lwpsection.hxx | 16
lotuswordpro/source/filter/lwpsilverbullet.cxx | 36
lotuswordpro/source/filter/lwpsilverbullet.hxx | 2
lotuswordpro/source/filter/lwpslvlist.hxx | 2
lotuswordpro/source/filter/lwpstory.cxx | 70
lotuswordpro/source/filter/lwpstory.hxx | 14
lotuswordpro/source/filter/lwptable.cxx | 2
lotuswordpro/source/filter/lwptable.hxx | 2
lotuswordpro/source/filter/lwptablelayout.cxx | 91
lotuswordpro/source/filter/lwptablelayout.hxx | 2
lotuswordpro/source/filter/lwptaboverride.hxx | 8
lotuswordpro/source/filter/lwptblcell.hxx | 10
lotuswordpro/source/filter/lwptoc.cxx | 16
lotuswordpro/source/filter/lwpvpointer.hxx | 2
lotuswordpro/source/filter/tocread.cxx | 10
lotuswordpro/source/filter/utlist.cxx | 14
lotuswordpro/source/filter/utlist.hxx | 4
lotuswordpro/source/filter/xfilter/xfborders.hxx | 8
reportdesign/source/ui/inc/ScrollHelper.hxx | 6
reportdesign/source/ui/misc/UITools.cxx | 8
reportdesign/source/ui/report/ViewsWindow.cxx | 6
reportdesign/source/ui/report/dlgedfunc.cxx | 8
sc/inc/document.hxx | 4
sc/inc/dpfilteredcache.hxx | 2
sc/inc/externalrefmgr.hxx | 2
sc/inc/olinetab.hxx | 8
sc/inc/refreshtimerprotector.hxx | 4
sc/qa/extras/macros-test.cxx | 4
sc/qa/unit/filters-test.cxx | 172
sc/qa/unit/helper/qahelper.cxx | 14
sc/qa/unit/helper/qahelper.hxx | 2
sc/qa/unit/helper/shared_test_impl.hxx | 26
sc/qa/unit/opencl-test.cxx | 2986 ++++------
sc/qa/unit/rangelst_test.cxx | 2
sc/qa/unit/subsequent_export-test.cxx | 634 +-
sc/qa/unit/subsequent_filters-test.cxx | 715 +-
sc/qa/unit/ucalc.cxx | 74
sc/qa/unit/ucalc_formula.cxx | 114
sc/qa/unit/ucalc_sharedformula.cxx | 10
sc/source/core/data/dpfilteredcache.cxx | 12
sc/source/core/data/dpgroup.cxx | 28
sc/source/core/data/dpobject.cxx | 2
sc/source/core/data/dpshttab.cxx | 4
sc/source/core/data/dptabdat.cxx | 15
sc/source/core/data/dptabsrc.cxx | 2
sc/source/core/data/table2.cxx | 21
sc/source/core/tool/consoli.cxx | 4
sc/source/core/tool/dbdata.cxx | 2
sc/source/core/tool/refreshtimer.cxx | 14
sc/source/filter/excel/impop.cxx | 4
sc/source/filter/excel/xestream.cxx | 6
sc/source/filter/excel/xetable.cxx | 22
sc/source/filter/inc/xetable.hxx | 2
sc/source/filter/oox/workbookhelper.cxx | 2
sc/source/filter/xml/XMLExportIterator.hxx | 4
sc/source/filter/xml/XMLStylesExportHelper.hxx | 2
sc/source/filter/xml/xmlcoli.cxx | 6
sc/source/filter/xml/xmldrani.cxx | 2
sc/source/filter/xml/xmlexprt.cxx | 41
sc/source/filter/xml/xmlrowi.cxx | 4
sc/source/filter/xml/xmltabi.cxx | 20
sc/source/filter/xml/xmlwrap.cxx | 2
sc/source/ui/Accessibility/AccessibleCell.cxx | 12
sc/source/ui/Accessibility/AccessibleDocument.cxx | 77
sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx | 20
sc/source/ui/Accessibility/AccessiblePageHeader.cxx | 31
sc/source/ui/Accessibility/AccessiblePreviewCell.cxx | 2
sc/source/ui/Accessibility/AccessiblePreviewTable.cxx | 12
sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx | 112
sc/source/ui/Accessibility/AccessibleText.cxx | 97
sc/source/ui/app/client.cxx | 6
sc/source/ui/app/drwtrans.cxx | 21
sc/source/ui/app/inputhdl.cxx | 120
sc/source/ui/app/inputwin.cxx | 82
sc/source/ui/app/scmod.cxx | 70
sc/source/ui/app/seltrans.cxx | 20
sc/source/ui/app/transobj.cxx | 46
sc/source/ui/dbgui/consdlg.cxx | 12
sc/source/ui/dbgui/scendlg.cxx | 2
sc/source/ui/dbgui/scuiimoptdlg.cxx | 2
sc/source/ui/docshell/arealink.cxx | 60
sc/source/ui/docshell/datastream.cxx | 7
sc/source/ui/docshell/dbdocfun.cxx | 302 -
sc/source/ui/docshell/dbdocimp.cxx | 66
sc/source/ui/docshell/docfunc.cxx | 1056 +--
sc/source/ui/docshell/docsh.cxx | 42
sc/source/ui/docshell/docsh3.cxx | 10
sc/source/ui/docshell/docsh4.cxx | 127
sc/source/ui/docshell/docsh5.cxx | 20
sc/source/ui/docshell/docsh6.cxx | 4
sc/source/ui/docshell/docsh8.cxx | 14
sc/source/ui/docshell/externalrefmgr.cxx | 36
sc/source/ui/docshell/olinefun.cxx | 259
sc/source/ui/docshell/servobj.cxx | 26
sc/source/ui/docshell/tablink.cxx | 93
sc/source/ui/drawfunc/drawsh5.cxx | 4
sc/source/ui/drawfunc/fuconstr.cxx | 20
sc/source/ui/drawfunc/fudraw.cxx | 12
sc/source/ui/drawfunc/fuins1.cxx | 12
sc/source/ui/drawfunc/fuins2.cxx | 60
sc/source/ui/drawfunc/fupoor.cxx | 10
sc/source/ui/drawfunc/fusel.cxx | 14
sc/source/ui/drawfunc/fusel2.cxx | 12
sc/source/ui/drawfunc/futext.cxx | 12
sc/source/ui/drawfunc/futext2.cxx | 4
sc/source/ui/drawfunc/futext3.cxx | 2
sc/source/ui/formdlg/formula.cxx | 8
sc/source/ui/inc/consdlg.hxx | 2
sc/source/ui/inc/datastream.hxx | 1
sc/source/ui/inc/docsh.hxx | 2
sc/source/ui/inc/optsolver.hxx | 2
sc/source/ui/inc/prevwsh.hxx | 2
sc/source/ui/inc/tabview.hxx | 6
sc/source/ui/miscdlgs/anyrefdg.cxx | 4
sc/source/ui/miscdlgs/datafdlg.cxx | 16
sc/source/ui/miscdlgs/datastreamdlg.cxx | 8
sc/source/ui/miscdlgs/instbdlg.cxx | 2
sc/source/ui/miscdlgs/linkarea.cxx | 2
sc/source/ui/miscdlgs/mvtabdlg.cxx | 2
sc/source/ui/miscdlgs/optsolver.cxx | 22
sc/source/ui/miscdlgs/redcom.cxx | 16
sc/source/ui/namedlg/namepast.cxx | 4
sc/source/ui/navipi/content.cxx | 24
sc/source/ui/navipi/navipi.cxx | 4
sc/source/ui/optdlg/tpusrlst.cxx | 2
sc/source/ui/optdlg/tpview.cxx | 2
sc/source/ui/pagedlg/areasdlg.cxx | 4
sc/source/ui/pagedlg/tphf.cxx | 6
sc/source/ui/undo/undobase.cxx | 92
sc/source/ui/undo/undoblk.cxx | 332 -
sc/source/ui/undo/undoblk2.cxx | 22
sc/source/ui/undo/undoblk3.cxx | 296
sc/source/ui/undo/undocell.cxx | 130
sc/source/ui/undo/undocell2.cxx | 4
sc/source/ui/undo/undodat.cxx | 366 -
sc/source/ui/undo/undorangename.cxx | 14
sc/source/ui/undo/undostyl.cxx | 20
sc/source/ui/undo/undotab.cxx | 266
sc/source/ui/undo/undoutil.cxx | 4
sc/source/ui/unoobj/addruno.cxx | 20
sc/source/ui/unoobj/cellsuno.cxx | 768 +-
sc/source/ui/unoobj/chartuno.cxx | 82
sc/source/ui/unoobj/confuno.cxx | 550 -
sc/source/ui/unoobj/cursuno.cxx | 24
sc/source/ui/unoobj/dapiuno.cxx | 46
sc/source/ui/unoobj/datauno.cxx | 68
sc/source/ui/unoobj/defltuno.cxx | 88
sc/source/ui/unoobj/dispuno.cxx | 6
sc/source/ui/unoobj/docuno.cxx | 288
sc/source/ui/unoobj/drdefuno.cxx | 6
sc/source/ui/unoobj/editsrc.cxx | 10
sc/source/ui/unoobj/eventuno.cxx | 10
sc/source/ui/unoobj/fielduno.cxx | 4
sc/source/ui/unoobj/forbiuno.cxx | 12
sc/source/ui/unoobj/linkuno.cxx | 213
sc/source/ui/unoobj/nameuno.cxx | 130
sc/source/ui/unoobj/notesuno.cxx | 6
sc/source/ui/unoobj/servuno.cxx | 44
sc/source/ui/unoobj/styleuno.cxx | 84
sc/source/ui/unoobj/targuno.cxx | 8
sc/source/ui/unoobj/textuno.cxx | 22
sc/source/ui/unoobj/tokenuno.cxx | 34
sc/source/ui/unoobj/viewuno.cxx | 262
sc/source/ui/vba/excelvbahelper.cxx | 18
sc/source/ui/vba/vbaapplication.cxx | 26
sc/source/ui/vba/vbachart.cxx | 10
sc/source/ui/vba/vbaeventshelper.cxx | 2
sc/source/ui/vba/vbaname.cxx | 4
sc/source/ui/vba/vbanames.cxx | 6
sc/source/ui/vba/vbapagesetup.cxx | 4
sc/source/ui/vba/vbarange.cxx | 157
sc/source/ui/vba/vbarange.hxx | 2
sc/source/ui/vba/vbatextboxshape.cxx | 2
sc/source/ui/vba/vbawindow.cxx | 30
sc/source/ui/vba/vbaworkbook.cxx | 10
sc/source/ui/vba/vbaworksheet.cxx | 30
sc/source/ui/vba/vbaworksheets.cxx | 4
sc/source/ui/view/cellsh.cxx | 16
sc/source/ui/view/cellsh2.cxx | 16
sc/source/ui/view/dbfunc.cxx | 94
sc/source/ui/view/dbfunc2.cxx | 10
sc/source/ui/view/dbfunc3.cxx | 254
sc/source/ui/view/drawvie4.cxx | 4
sc/source/ui/view/formatsh.cxx | 78
sc/source/ui/view/gridwin.cxx | 48
sc/source/ui/view/gridwin2.cxx | 18
sc/source/ui/view/gridwin4.cxx | 30
sc/source/ui/view/hdrcont.cxx | 14
sc/source/ui/view/olinewin.cxx | 2
sc/source/ui/view/pfuncache.cxx | 18
sc/source/ui/view/pgbrksh.cxx | 6
sc/source/ui/view/pivotsh.cxx | 24
sc/source/ui/view/preview.cxx | 66
sc/source/ui/view/prevwsh.cxx | 32
sc/source/ui/view/prevwsh2.cxx | 2
sc/source/ui/view/printfun.cxx | 2
sc/source/ui/view/reffact.cxx | 4
sc/source/ui/view/select.cxx | 2
sc/source/ui/view/spelldialog.cxx | 4
sc/source/ui/view/spelleng.cxx | 2
sc/source/ui/view/tabcont.cxx | 6
sc/source/ui/view/tabview.cxx | 12
sc/source/ui/view/tabview2.cxx | 4
sc/source/ui/view/tabview3.cxx | 6
sc/source/ui/view/tabvwsh.cxx | 2
sc/source/ui/view/tabvwsh2.cxx | 8
sc/source/ui/view/tabvwsh3.cxx | 70
sc/source/ui/view/tabvwsh4.cxx | 192
sc/source/ui/view/tabvwsh5.cxx | 42
sc/source/ui/view/tabvwsh8.cxx | 2
sc/source/ui/view/tabvwsh9.cxx | 2
sc/source/ui/view/tabvwsha.cxx | 127
sc/source/ui/view/tabvwshb.cxx | 24
sc/source/ui/view/tabvwshc.cxx | 116
sc/source/ui/view/tabvwshd.cxx | 2
sc/source/ui/view/tabvwshe.cxx | 26
sc/source/ui/view/tabvwshf.cxx | 76
sc/source/ui/view/tabvwshg.cxx | 8
sc/source/ui/view/tabvwshh.cxx | 8
sc/source/ui/view/viewdata.cxx | 4
sc/source/ui/view/viewfun2.cxx | 532 -
sc/source/ui/view/viewfun3.cxx | 116
sc/source/ui/view/viewfun4.cxx | 154
sc/source/ui/view/viewfun5.cxx | 44
sc/source/ui/view/viewfun6.cxx | 90
sc/source/ui/view/viewfun7.cxx | 42
sc/source/ui/view/viewfunc.cxx | 598 +-
sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx | 2
sd/source/ui/accessibility/AccessibleOutlineView.cxx | 6
sd/source/ui/app/sdmod2.cxx | 8
sd/source/ui/docshell/docshel4.cxx | 2
sd/source/ui/docshell/docshell.cxx | 4
sd/source/ui/func/fubullet.cxx | 4
sd/source/ui/func/fuinsfil.cxx | 28
sd/source/ui/func/fupoor.cxx | 20
sd/source/ui/inc/DrawViewShell.hxx | 2
sd/source/ui/inc/OutlineView.hxx | 4
sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx | 4
sd/source/ui/unoidl/unopage.cxx | 2
sd/source/ui/unoidl/unopback.cxx | 4
sd/source/ui/view/drtxtob.cxx | 2
sd/source/ui/view/outlnvs2.cxx | 8
sd/source/ui/view/outlnvsh.cxx | 149
sd/source/ui/view/viewshel.cxx | 5
sfx2/source/bastyp/fltfnc.cxx | 6
shell/source/sessioninstall/SyncDbusSessionHelper.cxx | 8
starmath/inc/view.hxx | 4
starmath/source/edit.cxx | 2
starmath/source/view.cxx | 5
svx/source/accessibility/charmapacc.cxx | 18
svx/source/unodraw/unoshape.cxx | 6
sw/inc/crsrsh.hxx | 2
sw/inc/dcontact.hxx | 4
sw/inc/pam.hxx | 8
sw/inc/txatbase.hxx | 6
sw/qa/core/uwriter.cxx | 42
sw/qa/extras/uiwriter/uiwriter.cxx | 6
sw/source/core/access/accpara.cxx | 12
sw/source/core/crsr/callnk.cxx | 2
sw/source/core/crsr/crsrsh.cxx | 26
sw/source/core/crsr/crstrvl.cxx | 30
sw/source/core/crsr/findattr.cxx | 18
sw/source/core/crsr/findtxt.cxx | 12
sw/source/core/crsr/pam.cxx | 6
sw/source/core/crsr/swcrsr.cxx | 34
sw/source/core/crsr/trvlfnfl.cxx | 12
sw/source/core/crsr/trvlreg.cxx | 8
sw/source/core/crsr/trvltbl.cxx | 2
sw/source/core/crsr/viscrs.cxx | 2
sw/source/core/doc/dbgoutsw.cxx | 2
sw/source/core/doc/doc.cxx | 16
sw/source/core/doc/docedt.cxx | 16
sw/source/core/doc/docfld.cxx | 10
sw/source/core/doc/docfmt.cxx | 4
sw/source/core/doc/docftn.cxx | 8
sw/source/core/doc/doclay.cxx | 2
sw/source/core/doc/docruby.cxx | 10
sw/source/core/doc/doctxm.cxx | 16
sw/source/core/doc/ftnidx.cxx | 2
sw/source/core/doc/textboxhelper.cxx | 2
sw/source/core/doc/visiturl.cxx | 2
sw/source/core/docnode/ndcopy.cxx | 2
sw/source/core/docnode/ndtbl.cxx | 6
sw/source/core/docnode/ndtbl1.cxx | 2
sw/source/core/docnode/node2lay.cxx | 2
sw/source/core/docnode/nodedump.cxx | 2
sw/source/core/draw/dcontact.cxx | 16
sw/source/core/edit/acorrect.cxx | 6
sw/source/core/edit/autofmt.cxx | 10
sw/source/core/edit/edattr.cxx | 2
sw/source/core/edit/eddel.cxx | 14
sw/source/core/edit/editsh.cxx | 38
sw/source/core/edit/edlingu.cxx | 6
sw/source/core/edit/ednumber.cxx | 16
sw/source/core/edit/edtab.cxx | 6
sw/source/core/edit/edws.cxx | 6
sw/source/core/fields/ddefld.cxx | 4
sw/source/core/fields/expfld.cxx | 4
sw/source/core/fields/postithelper.cxx | 2
sw/source/core/fields/reffld.cxx | 10
sw/source/core/frmedt/fecopy.cxx | 22
sw/source/core/frmedt/fefly1.cxx | 2
sw/source/core/frmedt/fetab.cxx | 6
sw/source/core/frmedt/tblsel.cxx | 8
sw/source/core/inc/doctxm.hxx | 2
sw/source/core/inc/flowfrm.hxx | 4
sw/source/core/inc/fntcache.hxx | 4
sw/source/core/inc/swfntcch.hxx | 4
sw/source/core/layout/calcmove.cxx | 2
sw/source/core/layout/flowfrm.cxx | 10
sw/source/core/layout/flycnt.cxx | 2
sw/source/core/layout/frmtool.cxx | 6
sw/source/core/layout/ftnfrm.cxx | 2
sw/source/core/layout/laycache.cxx | 8
sw/source/core/layout/layhelp.hxx | 2
sw/source/core/layout/layouter.cxx | 2
sw/source/core/layout/paintfrm.cxx | 17
sw/source/core/layout/tabfrm.cxx | 2
sw/source/core/layout/trvlfrm.cxx | 10
sw/source/core/layout/wsfrm.cxx | 2
sw/source/core/table/swtable.cxx | 4
sw/source/core/text/EnhancedPDFExportHelper.cxx | 2
sw/source/core/text/frmcrsr.cxx | 14
sw/source/core/text/frmform.cxx | 60
sw/source/core/text/frmpaint.cxx | 26
sw/source/core/text/inftxt.cxx | 10
sw/source/core/text/inftxt.hxx | 10
sw/source/core/text/itradj.cxx | 6
sw/source/core/text/itratr.cxx | 8
sw/source/core/text/itrform2.cxx | 26
sw/source/core/text/itrpaint.cxx | 2
sw/source/core/text/itrtxt.cxx | 2
sw/source/core/text/porfly.cxx | 2
sw/source/core/text/porlay.cxx | 2
sw/source/core/text/porlay.hxx | 12
sw/source/core/text/pormulti.cxx | 22
sw/source/core/text/porrst.cxx | 4
sw/source/core/text/redlnitr.cxx | 2
sw/source/core/text/txtdrop.cxx | 6
sw/source/core/text/txtfld.cxx | 4
sw/source/core/text/txtfrm.cxx | 32
sw/source/core/text/txtftn.cxx | 8
sw/source/core/text/txthyph.cxx | 2
sw/source/core/tox/ToxTextGenerator.cxx | 2
sw/source/core/tox/tox.cxx | 2
sw/source/core/tox/txmsrt.cxx | 22
sw/source/core/txtnode/atrfld.cxx | 16
sw/source/core/txtnode/atrflyin.cxx | 4
sw/source/core/txtnode/fntcache.cxx | 4
sw/source/core/txtnode/fntcap.cxx | 2
sw/source/core/txtnode/modeltoviewhelper.cxx | 2
sw/source/core/txtnode/ndhints.cxx | 30
sw/source/core/txtnode/ndtxt.cxx | 76
sw/source/core/txtnode/thints.cxx | 112
sw/source/core/txtnode/txatritr.cxx | 2
sw/source/core/txtnode/txtatr2.cxx | 6
sw/source/core/txtnode/txtedt.cxx | 8
sw/source/core/undo/rolbck.cxx | 16
sw/source/core/undo/unattr.cxx | 6
sw/source/core/undo/undel.cxx | 2
sw/source/core/undo/undobj.cxx | 18
sw/source/core/undo/undobj1.cxx | 2
sw/source/core/undo/unins.cxx | 2
sw/source/core/undo/unmove.cxx | 4
sw/source/core/undo/unovwr.cxx | 4
sw/source/core/undo/unredln.cxx | 23
sw/source/core/undo/unsort.cxx | 2
sw/source/core/undo/unspnd.cxx | 2
sw/source/core/undo/untbl.cxx | 12
sw/source/core/unocore/unocrsrhelper.cxx | 40
sw/source/core/unocore/unodraw.cxx | 6
sw/source/core/unocore/unofield.cxx | 12
sw/source/core/unocore/unoframe.cxx | 8
sw/source/core/unocore/unoftn.cxx | 10
sw/source/core/unocore/unoidx.cxx | 12
sw/source/core/unocore/unoobj.cxx | 16
sw/source/core/unocore/unoobj2.cxx | 12
sw/source/core/unocore/unoport.cxx | 2
sw/source/core/unocore/unoportenum.cxx | 18
sw/source/core/unocore/unoredline.cxx | 10
sw/source/core/unocore/unorefmk.cxx | 20
sw/source/core/unocore/unosect.cxx | 18
sw/source/core/unocore/unotbl.cxx | 18
sw/source/core/unocore/unotext.cxx | 41
sw/source/core/view/vprint.cxx | 2
sw/source/filter/ascii/ascatr.cxx | 8
sw/source/filter/basflt/shellio.cxx | 10
sw/source/filter/html/htmlatr.cxx | 12
sw/source/filter/html/htmlfld.cxx | 2
sw/source/filter/html/htmlfldw.cxx | 2
sw/source/filter/html/htmlftn.cxx | 2
sw/source/filter/html/htmlgrin.cxx | 2
sw/source/filter/html/htmlnumreader.cxx | 8
sw/source/filter/html/htmlnumwriter.cxx | 4
sw/source/filter/html/htmltab.cxx | 2
sw/source/filter/html/swhtml.cxx | 10
sw/source/filter/html/wrthtml.cxx | 24
sw/source/filter/ww1/fltshell.cxx | 2
sw/source/filter/ww1/w1filter.cxx | 6
sw/source/filter/ww1/w1struct.hxx | 2
sw/source/filter/ww8/rtfexport.cxx | 2
sw/source/filter/ww8/wrtw8nds.cxx | 36
sw/source/filter/ww8/wrtw8sty.cxx | 2
sw/source/filter/ww8/wrtww8.cxx | 46
sw/source/filter/ww8/ww8atr.cxx | 7
sw/source/filter/ww8/ww8par.cxx | 20
sw/source/filter/ww8/ww8par2.cxx | 6
sw/source/filter/ww8/ww8par3.cxx | 6
sw/source/filter/ww8/ww8par5.cxx | 4
sw/source/filter/ww8/ww8par6.cxx | 4
sw/source/filter/xml/xmltbli.cxx | 2
sw/source/ui/index/swuiidxmrk.cxx | 2
sw/source/ui/misc/swmodalredlineacceptdlg.cxx | 2
sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx | 8
sw/source/uibase/docvw/AnnotationWin.cxx | 8
sw/source/uibase/docvw/SidebarWin.cxx | 4
sw/source/uibase/docvw/edtwin.cxx | 6
sw/source/uibase/docvw/frmsidebarwincontainer.cxx | 2
sw/source/uibase/inc/pview.hxx | 6
sw/source/uibase/inc/redlndlg.hxx | 2
sw/source/uibase/shells/langhelper.cxx | 2
sw/source/uibase/uno/unotxdoc.cxx | 10
sw/source/uibase/uno/unotxvw.cxx | 10
sw/source/uibase/wrtsh/delete.cxx | 9
ucb/source/sorter/sortresult.cxx | 10
ucb/source/sorter/sortresult.hxx | 6
vcl/generic/glyphs/gcach_ftyp.cxx | 2
vcl/generic/glyphs/gcach_ftyp.hxx | 4
vcl/inc/generic/glyphcache.hxx | 2
vcl/inc/ilstbox.hxx | 2
vcl/source/control/combobox.cxx | 46
vcl/source/control/ilstbox.cxx | 12
vcl/source/control/lstbox.cxx | 60
vcl/source/gdi/pdfwriter_impl.cxx | 8
vcl/source/gdi/pdfwriter_impl2.cxx | 8
vcl/source/window/openglwin.cxx | 4
xmloff/source/text/txtparae.cxx | 28
xmlscript/source/xmldlg_imexp/imp_share.hxx | 4
xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx | 12
559 files changed, 10063 insertions(+), 10616 deletions(-)
New commits:
commit e2080e70fe8b085f18e868e46340454720fa94ca
Author: Noel Grandin <noel at peralex.com>
Date: Wed Jun 18 12:14:29 2014 +0200
new compilerplugin returnbyref
Find places where we are returning a pointer to something, where we can
be returning a reference.
e.g.
class A {
struct X x;
public X* getX() { return &x; }
}
which can be:
public X& getX() { return x; }
Change-Id: I796fd23fd36a18aedf6e36bc28f8fab4f518c6c7
diff --git a/binaryurp/source/binaryany.hxx b/binaryurp/source/binaryany.hxx
index 38197f1..717216a 100644
--- a/binaryurp/source/binaryany.hxx
+++ b/binaryurp/source/binaryany.hxx
@@ -47,7 +47,7 @@ public:
BinaryAny & operator =(BinaryAny const & other) throw ();
- uno_Any * get() throw () { return &data_; }
+ uno_Any& get() throw () { return data_; }
com::sun::star::uno::TypeDescription getType() const throw ();
diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx
index dc0f347..9191d23 100644
--- a/binaryurp/source/bridge.cxx
+++ b/binaryurp/source/bridge.cxx
@@ -352,7 +352,7 @@ BinaryAny Bridge::mapCppToBinaryAny(css::uno::Any const & cppAny) {
BinaryAny out;
out.~BinaryAny();
uno_copyAndConvertData(
- out.get(), &in,
+ &out.get(), &in,
css::uno::TypeDescription(cppu::UnoType< css::uno::Any >::get()).get(),
cppToBinaryMapping_.get());
return out;
@@ -992,7 +992,7 @@ css::uno::Any Bridge::mapBinaryToCppAny(BinaryAny const & binaryAny) {
css::uno::Any out;
out.~Any();
uno_copyAndConvertData(
- &out, in.get(),
+ &out, &in.get(),
css::uno::TypeDescription(cppu::UnoType< css::uno::Any >::get()).get(),
binaryToCppMapping_.get());
return out;
diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx
index 808bb90..f29202e 100644
--- a/chart2/source/view/charttypes/GL3DBarChart.cxx
+++ b/chart2/source/view/charttypes/GL3DBarChart.cxx
@@ -301,10 +301,10 @@ void GL3DBarChart::render()
if(!mbValidContext)
return;
- mrWindow.getContext()->makeCurrent();
+ mrWindow.getContext().makeCurrent();
Size aSize = mrWindow.GetSizePixel();
mpRenderer->SetSize(aSize);
- mrWindow.getContext()->setWinSize(aSize);
+ mrWindow.getContext().setWinSize(aSize);
if(mbNeedsNewRender)
{
for(boost::ptr_vector<opengl3D::Renderable3DObject>::iterator itr = maShapes.begin(),
@@ -319,7 +319,7 @@ void GL3DBarChart::render()
}
mpRenderer->ProcessUnrenderedShape(mbNeedsNewRender);
mbNeedsNewRender = false;
- mrWindow.getContext()->swapBuffers();
+ mrWindow.getContext().swapBuffers();
}
void GL3DBarChart::update()
diff --git a/chart2/source/view/main/OpenglShapeFactory.cxx b/chart2/source/view/main/OpenglShapeFactory.cxx
index a340b01..827b892 100644
--- a/chart2/source/view/main/OpenglShapeFactory.cxx
+++ b/chart2/source/view/main/OpenglShapeFactory.cxx
@@ -459,15 +459,15 @@ bool OpenglShapeFactory::preRender(OpenGLWindow* pWindow)
return false;
pWindow->Show();
- pWindow->getContext()->makeCurrent();
+ pWindow->getContext().makeCurrent();
Size aSize = pWindow->GetSizePixel();
- pWindow->getContext()->setWinSize(aSize);
+ pWindow->getContext().setWinSize(aSize);
return true;
}
void OpenglShapeFactory::postRender(OpenGLWindow* pWindow)
{
- pWindow->getContext()->swapBuffers();
+ pWindow->getContext().swapBuffers();
}
void OpenglShapeFactory::clearPage(uno::Reference< drawing::XShapes > xRootShape)
diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx
index 4a3e4d7..5e166fa 100644
--- a/codemaker/source/cppumaker/cpputype.cxx
+++ b/codemaker/source/cppumaker/cpputype.cxx
@@ -3421,10 +3421,10 @@ void ServiceType::dumpHxxFile(
{
tree.add(u2b(*j), m_typeMgr);
}
- if (!tree.getRoot()->present) {
+ if (!tree.getRoot().present) {
includes.add("com.sun.star.uno.Exception");
includes.add("com.sun.star.uno.RuntimeException");
- includeExceptions(includes, tree.getRoot());
+ includeExceptions(includes, &tree.getRoot());
}
}
}
@@ -3603,7 +3603,7 @@ void ServiceType::dumpHxxFile(
{
tree.add(u2b(*j), m_typeMgr);
}
- if (!tree.getRoot()->present) {
+ if (!tree.getRoot().present) {
o << indent() << "try {\n";
inc();
}
@@ -3657,14 +3657,14 @@ void ServiceType::dumpHxxFile(
o << "the_arguments";
}
o << ", the_context), ::css::uno::UNO_QUERY);\n#endif\n";
- if (!tree.getRoot()->present) {
+ if (!tree.getRoot().present) {
dec();
o << indent()
<< ("} catch (const ::css::uno::RuntimeException &) {\n");
inc();
o << indent() << "throw;\n";
dec();
- dumpCatchClauses(o, tree.getRoot());
+ dumpCatchClauses(o, &tree.getRoot());
o << indent()
<< ("} catch (const ::css::uno::Exception &"
" the_exception) {\n");
diff --git a/codemaker/source/javamaker/javatype.cxx b/codemaker/source/javamaker/javatype.cxx
index 40a1784..9e08171 100644
--- a/codemaker/source/javamaker/javatype.cxx
+++ b/codemaker/source/javamaker/javatype.cxx
@@ -2156,7 +2156,7 @@ void addConstructor(
codemaker::convertString(returnType).replace('.', '/'));
// stack: instance
code->instrAreturn();
- if (!tree.getRoot()->present) {
+ if (!tree.getRoot().present) {
ClassFile::Code::Position pos1 = code->getPosition();
// stack: e
code->instrInvokevirtual(
@@ -2188,7 +2188,7 @@ void addConstructor(
ClassFile::Code::Position pos2 = code->getPosition();
code->instrAthrow();
addExceptionHandlers(
- tree.getRoot(), tryStart, tryEnd, pos2, code.get());
+ &tree.getRoot(), tryStart, tryEnd, pos2, code.get());
code->addException(
tryStart, tryEnd, pos1, "com/sun/star/uno/Exception");
dependencies->insert("com.sun.star.uno.Exception");
diff --git a/comphelper/source/property/propertysethelper.cxx b/comphelper/source/property/propertysethelper.cxx
index 66b7843..eb07e50 100644
--- a/comphelper/source/property/propertysethelper.cxx
+++ b/comphelper/source/property/propertysethelper.cxx
@@ -40,9 +40,9 @@ public:
PropertyMapEntry const * PropertySetHelperImpl::find( const OUString& aName ) const throw()
{
- PropertyMap::const_iterator aIter = mpInfo->getPropertyMap()->find( aName );
+ PropertyMap::const_iterator aIter = mpInfo->getPropertyMap().find( aName );
- if( mpInfo->getPropertyMap()->end() != aIter )
+ if( mpInfo->getPropertyMap().end() != aIter )
{
return (*aIter).second;
}
diff --git a/comphelper/source/property/propertysetinfo.cxx b/comphelper/source/property/propertysetinfo.cxx
index 1f3bb28..df4738d 100644
--- a/comphelper/source/property/propertysetinfo.cxx
+++ b/comphelper/source/property/propertysetinfo.cxx
@@ -40,7 +40,7 @@ public:
Sequence< Property > getProperties() throw();
- const PropertyMap* getPropertyMap() const throw() { return &maPropertyMap;}
+ const PropertyMap& getPropertyMap() const throw() { return maPropertyMap;}
Property getPropertyByName( const OUString& aName ) throw( UnknownPropertyException );
bool hasPropertyByName( const OUString& aName ) throw();
@@ -182,7 +182,7 @@ sal_Bool SAL_CALL PropertySetInfo::hasPropertyByName( const OUString& Name ) thr
return mpMap->hasPropertyByName( Name );
}
-const PropertyMap* PropertySetInfo::getPropertyMap() const throw()
+const PropertyMap& PropertySetInfo::getPropertyMap() const throw()
{
return mpMap->getPropertyMap();
}
diff --git a/compilerplugins/clang/returnbyref.cxx b/compilerplugins/clang/returnbyref.cxx
new file mode 100644
index 0000000..a386b5d
--- /dev/null
+++ b/compilerplugins/clang/returnbyref.cxx
@@ -0,0 +1,153 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <string>
+#include <set>
+
+#include "plugin.hxx"
+
+// Find places where we are returning a pointer to something, where we can be returning a reference.
+// e.g.
+// class A {
+// struct X x;
+// public:
+// X* getX() { return &x; }
+// }
+// which can be:
+// X& getX() { return x; }
+
+namespace {
+
+class ReturnByRef:
+ public RecursiveASTVisitor<ReturnByRef>, public loplugin::Plugin
+{
+public:
+ explicit ReturnByRef(InstantiationData const & data): Plugin(data) {}
+
+ virtual void run() override { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
+
+ bool VisitCXXMethodDecl(const CXXMethodDecl * decl);
+private:
+ bool isInUnoIncludeFile(SourceLocation spellingLocation) const;
+ bool isInMainFile(SourceLocation spellingLocation) const;
+};
+
+bool ReturnByRef::VisitCXXMethodDecl(const CXXMethodDecl * functionDecl) {
+ if (ignoreLocation(functionDecl)) {
+ return true;
+ }
+ if (functionDecl->isVirtual()) {
+ return true;
+ }
+ if (!functionDecl->isInstance()) {
+ return true;
+ }
+ if (!functionDecl->hasBody()) {
+ return true;
+ }
+ // ignore stuff that forms part of the stable URE interface
+ if (isInUnoIncludeFile(compiler.getSourceManager().getSpellingLoc(
+ functionDecl->getCanonicalDecl()->getNameInfo().getLoc()))) {
+ return true;
+ }
+ QualType t1 { functionDecl->getResultType() };
+ if (!t1->isPointerType()) {
+ return true;
+ }
+ // Ignore stuff like:
+ // operator Window *(){ return &m_rWindow; }
+ if (dyn_cast< CXXConversionDecl >( functionDecl ) != nullptr) {
+ return true;
+ }
+
+ /*
+ The AST here looks like:
+ -CompoundStmt
+ `-ReturnStmt
+ `-UnaryOperator
+ `-MemberExpr
+ `-CXXThisExpr
+ */
+
+ const CompoundStmt* compoundStmt = dyn_cast< CompoundStmt >( functionDecl->getBody() );
+ if (compoundStmt == nullptr || compoundStmt->body_begin() == compoundStmt->body_end()) {
+ return true;
+ }
+ const ReturnStmt* returnStmt = dyn_cast<ReturnStmt>(*compoundStmt->child_begin());
+ if (returnStmt == nullptr) {
+ return true;
+ }
+
+ const Stmt* nextStmt = dyn_cast<Expr>(*returnStmt->child_begin())->IgnoreParens();
+ const UnaryOperator* unaryOperator = dyn_cast<UnaryOperator>(nextStmt);
+ if (unaryOperator == nullptr || unaryOperator->getOpcode() != UO_AddrOf) {
+ return true;
+ }
+
+ nextStmt = dyn_cast<Expr>(*unaryOperator->child_begin())->IgnoreParens();
+ const MemberExpr* memberExpr = dyn_cast<MemberExpr>(nextStmt);
+ if (memberExpr == nullptr) {
+ return true;
+ }
+
+ nextStmt = dyn_cast<Expr>(*memberExpr->child_begin())->IgnoreParens();
+ const CXXThisExpr* cXXThisExpr = dyn_cast<CXXThisExpr>(nextStmt);
+ if (cXXThisExpr == nullptr) {
+ return true;
+ }
+
+ report(
+ DiagnosticsEngine::Warning,
+ "rather return by reference",
+ functionDecl->getSourceRange().getBegin())
+ << functionDecl->getSourceRange();
+ // display the location of the class member declaration so I don't have to search for it by hand
+ report(
+ DiagnosticsEngine::Note,
+ "rather return by reference",
+ functionDecl->getCanonicalDecl()->getSourceRange().getBegin())
+ << functionDecl->getCanonicalDecl()->getSourceRange();
+
+ return true;
+}
+
+bool ReturnByRef::isInUnoIncludeFile(SourceLocation spellingLocation) const {
+ StringRef name {
+ compiler.getSourceManager().getFilename(spellingLocation) };
+ return isInMainFile(spellingLocation)
+ ? (name == SRCDIR "/cppu/source/cppu/compat.cxx"
+ || name == SRCDIR "/cppuhelper/source/compat.cxx"
+ || name == SRCDIR "/sal/osl/all/compat.cxx")
+ : (name.startswith(SRCDIR "/include/com/")
+ || name.startswith(SRCDIR "/include/cppu/")
+ || name.startswith(SRCDIR "/include/cppuhelper/")
+ || name.startswith(SRCDIR "/include/osl/")
+ || name.startswith(SRCDIR "/include/rtl/")
+ || name.startswith(SRCDIR "/include/sal/")
+ || name.startswith(SRCDIR "/include/salhelper/")
+ || name.startswith(SRCDIR "/include/systools/")
+ || name.startswith(SRCDIR "/include/typelib/")
+ || name.startswith(SRCDIR "/include/uno/")
+ || name.startswith(SRCDIR "/workdir/")
+ || name == SRCDIR "/include/comphelper/implbase_var.hxx");
+}
+
+bool ReturnByRef::isInMainFile(SourceLocation spellingLocation) const {
+#if (__clang_major__ == 3 && __clang_minor__ >= 4) || __clang_major__ > 3
+ return compiler.getSourceManager().isInMainFile(spellingLocation);
+#else
+ return compiler.getSourceManager().isFromMainFile(spellingLocation);
+#endif
+}
+
+loplugin::Plugin::Registration< ReturnByRef > X("returnbyref");
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/mork/MNSINIParser.hxx b/connectivity/source/drivers/mork/MNSINIParser.hxx
index afdd742..1967cf3 100644
--- a/connectivity/source/drivers/mork/MNSINIParser.hxx
+++ b/connectivity/source/drivers/mork/MNSINIParser.hxx
@@ -63,7 +63,7 @@ class IniParser
{
IniSectionMap mAllSection;
public:
- IniSectionMap * getAllSection(){return &mAllSection;};
+ IniSectionMap& getAllSection() { return mAllSection; }
IniParser(OUString const & rIniName) throw(com::sun::star::io::IOException);
};
diff --git a/connectivity/source/drivers/mork/MNSProfileDiscover.cxx b/connectivity/source/drivers/mork/MNSProfileDiscover.cxx
index 7622c80..401fc48 100644
--- a/connectivity/source/drivers/mork/MNSProfileDiscover.cxx
+++ b/connectivity/source/drivers/mork/MNSProfileDiscover.cxx
@@ -66,7 +66,7 @@ namespace connectivity
OUString regDir = getRegistryDir(product);
OUString profilesIni = regDir + "profiles.ini";
IniParser parser( profilesIni );
- IniSectionMap &mAllSection = *(parser.getAllSection());
+ IniSectionMap &mAllSection = parser.getAllSection();
IniSectionMap::iterator iBegin = mAllSection.begin();
IniSectionMap::iterator iEnd = mAllSection.end();
diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.hxx b/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.hxx
index b5795c1..7a5a2ac 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.hxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.hxx
@@ -62,7 +62,7 @@ class IniParser
{
IniSectionMap mAllSection;
public:
- IniSectionMap * getAllSection(){return &mAllSection;};
+ IniSectionMap& getAllSection() { return mAllSection; }
IniParser(OUString const & rIniName) throw(com::sun::star::io::IOException);
};
diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx
index 6660a5c..1d5e5d3 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx
@@ -148,7 +148,7 @@ namespace connectivity
OUString regDir = getRegistryDir(product);
OUString profilesIni = regDir + "profiles.ini";
IniParser parser( profilesIni );
- IniSectionMap &mAllSection = *(parser.getAllSection());
+ IniSectionMap &mAllSection = parser.getAllSection();
IniSectionMap::iterator iBegin = mAllSection.begin();
IniSectionMap::iterator iEnd = mAllSection.end();
diff --git a/connectivity/source/drivers/odbc/OPreparedStatement.cxx b/connectivity/source/drivers/odbc/OPreparedStatement.cxx
index 67dfaee..74eb5c3 100644
--- a/connectivity/source/drivers/odbc/OPreparedStatement.cxx
+++ b/connectivity/source/drivers/odbc/OPreparedStatement.cxx
@@ -373,8 +373,8 @@ void OPreparedStatement::setParameter(const sal_Int32 parameterIndex, const sal_
SQLSMALLINT fCType, fSqlType;
OTools::getBindTypes(useWChar, m_pConnection->useOldDateFormat(), OTools::jdbcTypeToOdbc(_nType), fCType, fSqlType);
- SQLLEN *pDataLen=boundParams[parameterIndex-1].getBindLengthBuffer();
- *pDataLen=_nDataLen;
+ SQLLEN& rDataLen = boundParams[parameterIndex-1].getBindLengthBuffer();
+ rDataLen = _nDataLen;
SQLRETURN nRetcode;
nRetcode = (*(T3SQLBindParameter)m_pConnection->getOdbcFunction(ODBC3SQLBindParameter))(
@@ -389,7 +389,7 @@ void OPreparedStatement::setParameter(const sal_Int32 parameterIndex, const sal_
// we trust the ODBC driver not to touch it because SQL_PARAM_INPUT
const_cast<void*>(_pData),
_nDataAllocLen,
- pDataLen);
+ &rDataLen);
OTools::ThrowException(m_pConnection, nRetcode, m_aStatementHandle, SQL_HANDLE_STMT, *this);
}
@@ -742,7 +742,7 @@ SQLLEN* OPreparedStatement::getLengthBuf (sal_Int32 index)
if ((index >= 1) &&
(index <= numParams))
{
- b = boundParams[index - 1].getBindLengthBuffer ();
+ b = &boundParams[index - 1].getBindLengthBuffer ();
}
return b;
diff --git a/connectivity/source/inc/odbc/OBoundParam.hxx b/connectivity/source/inc/odbc/OBoundParam.hxx
index 4c0eacc..d851e2a 100644
--- a/connectivity/source/inc/odbc/OBoundParam.hxx
+++ b/connectivity/source/inc/odbc/OBoundParam.hxx
@@ -73,9 +73,9 @@ namespace connectivity
// getBindLengthBuffer
// Returns the length buffer to be used when binding to a parameter
- SQLLEN* getBindLengthBuffer ()
+ SQLLEN& getBindLengthBuffer ()
{
- return ¶mLength;
+ return paramLength;
}
diff --git a/dbaccess/source/ui/control/RelationControl.cxx b/dbaccess/source/ui/control/RelationControl.cxx
index c11deee..9082511 100644
--- a/dbaccess/source/ui/control/RelationControl.cxx
+++ b/dbaccess/source/ui/control/RelationControl.cxx
@@ -184,7 +184,7 @@ namespace dbaui
// not the first call
RowRemoved(0, GetRowCount());
- RowInserted(0, m_pConnData->GetConnLineDataList()->size() + 1, true); // add one extra row
+ RowInserted(0, m_pConnData->GetConnLineDataList().size() + 1, true); // add one extra row
}
void ORelationControl::Resize()
@@ -234,16 +234,16 @@ namespace dbaui
if ( nRow != BROWSER_ENDOFSELECTION )
{
OUString sFieldName(m_pListCell->GetSelectEntry());
- OConnectionLineDataVec* pLines = m_pConnData->GetConnLineDataList();
- if ( pLines->size() <= static_cast<OConnectionLineDataVec::size_type>(nRow) )
+ OConnectionLineDataVec& rLines = m_pConnData->GetConnLineDataList();
+ if ( rLines.size() <= static_cast<OConnectionLineDataVec::size_type>(nRow) )
{
- pLines->push_back(new OConnectionLineData());
- nRow = pLines->size() - 1;
- // add new past-pLines row
+ rLines.push_back(new OConnectionLineData());
+ nRow = rLines.size() - 1;
+ // add new past-rLines row
m_ops.push_back(make_pair(INSERT, make_pair(nRow+1, nRow+2)));
}
- OConnectionLineDataRef pConnLineData = (*pLines)[nRow];
+ OConnectionLineDataRef pConnLineData = rLines[nRow];
switch( getColumnIdent( GetCurColumnId() ) )
{
@@ -259,9 +259,9 @@ namespace dbaui
//m_ops.push_back(make_pair(MODIFY, make_pair(nRow, nRow+1)));
}
- const OConnectionLineDataVec::size_type oldSize = m_pConnData->GetConnLineDataList()->size();
+ const OConnectionLineDataVec::size_type oldSize = m_pConnData->GetConnLineDataList().size();
OConnectionLineDataVec::size_type line = m_pConnData->normalizeLines();
- const OConnectionLineDataVec::size_type newSize = m_pConnData->GetConnLineDataList()->size();
+ const OConnectionLineDataVec::size_type newSize = m_pConnData->GetConnLineDataList().size();
assert(newSize <= oldSize);
m_ops.push_back(make_pair(MODIFY, make_pair(line, newSize)));
m_ops.push_back(make_pair(DELETE, make_pair(newSize, oldSize)));
@@ -280,9 +280,9 @@ namespace dbaui
OUString ORelationControl::GetCellText( long nRow, sal_uInt16 nColId ) const
{
OUString sText;
- if ( m_pConnData->GetConnLineDataList()->size() > static_cast<size_t>(nRow) )
+ if ( m_pConnData->GetConnLineDataList().size() > static_cast<size_t>(nRow) )
{
- OConnectionLineDataRef pConnLineData = (*m_pConnData->GetConnLineDataList())[nRow];
+ OConnectionLineDataRef pConnLineData = m_pConnData->GetConnLineDataList()[nRow];
switch( getColumnIdent( nColId ) )
{
case SOURCE_COLUMN:
@@ -403,7 +403,7 @@ namespace dbaui
const OJoinTableView* pView = _pSource->getTableView();
OTableConnection* pConn = pView->GetTabConn(_pSource,_pDest);
- if ( pConn && !m_pConnData->GetConnLineDataList()->empty() )
+ if ( pConn && !m_pConnData->GetConnLineDataList().empty() )
{
m_pConnData->CopyFrom(*pConn->GetData());
m_pBoxControl->getContainer()->notifyConnectionChange();
@@ -411,9 +411,9 @@ namespace dbaui
else
{
// no connection found so we clear our data
- OConnectionLineDataVec* pLines = m_pConnData->GetConnLineDataList();
- ::std::for_each(pLines->begin(),
- pLines->end(),
+ OConnectionLineDataVec& rLines = m_pConnData->GetConnLineDataList();
+ ::std::for_each(rLines.begin(),
+ rLines.end(),
OUnaryRefFunctor<OConnectionLineData>( ::std::mem_fun(&OConnectionLineData::Reset))
);
@@ -608,12 +608,12 @@ namespace dbaui
{
// Enable/disable the OK button, depending on having a valid situation
TTableConnectionData::value_type pConnData = m_pRC_Tables->getData();
- const OConnectionLineDataVec* pLines = pConnData->GetConnLineDataList();
- bool bValid = !pLines->empty();
+ const OConnectionLineDataVec& rLines = pConnData->GetConnLineDataList();
+ bool bValid = !rLines.empty();
if (bValid)
{
- OConnectionLineDataVec::const_iterator l(pLines->begin());
- const OConnectionLineDataVec::const_iterator le(pLines->end());
+ OConnectionLineDataVec::const_iterator l(rLines.begin());
+ const OConnectionLineDataVec::const_iterator le(rLines.end());
for (; bValid && l!=le; ++l)
{
bValid = ! ((*l)->GetSourceFieldName().isEmpty() || (*l)->GetDestFieldName().isEmpty());
diff --git a/dbaccess/source/ui/dlg/RelationDlg.cxx b/dbaccess/source/ui/dlg/RelationDlg.cxx
index ee482d5..63d5351 100644
--- a/dbaccess/source/ui/dlg/RelationDlg.cxx
+++ b/dbaccess/source/ui/dlg/RelationDlg.cxx
@@ -52,7 +52,7 @@ ORelationDialog::ORelationDialog( OJoinTableView* pParent,
bool bAllowTableSelect )
: ModalDialog(pParent, "RelationDialog",
"dbaccess/ui/relationdialog.ui")
- , m_pTableMap(pParent->GetTabWinMap())
+ , m_pTableMap(&pParent->GetTabWinMap())
, m_pOrigConnData(pConnectionData)
, m_bTriedOneUpdate(false)
{
diff --git a/dbaccess/source/ui/inc/JoinController.hxx b/dbaccess/source/ui/inc/JoinController.hxx
index a2ec241..01ff6fd 100644
--- a/dbaccess/source/ui/inc/JoinController.hxx
+++ b/dbaccess/source/ui/inc/JoinController.hxx
@@ -82,8 +82,8 @@ namespace dbaui
OJoinController(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rM);
// attribute access
- inline TTableWindowData* getTableWindowData() { return &m_vTableData; }
- inline TTableConnectionData* getTableConnectionData() { return &m_vTableConnectionData;}
+ inline TTableWindowData& getTableWindowData() { return m_vTableData; }
+ inline TTableConnectionData& getTableConnectionData() { return m_vTableConnectionData;}
inline OAddTableDlg* getAddTableDialog()const { return m_pAddTableDialog; }
// OSingleDocumentController overridables
diff --git a/dbaccess/source/ui/inc/JoinTableView.hxx b/dbaccess/source/ui/inc/JoinTableView.hxx
index 61b0147..aa266ab 100644
--- a/dbaccess/source/ui/inc/JoinTableView.hxx
+++ b/dbaccess/source/ui/inc/JoinTableView.hxx
@@ -67,8 +67,8 @@ namespace dbaui
void resetRange(const Point& _aSize);
// own methods
- ScrollBar* GetHScrollBar() { return &m_aHScrollBar; }
- ScrollBar* GetVScrollBar() { return &m_aVScrollBar; }
+ ScrollBar& GetHScrollBar() { return m_aHScrollBar; }
+ ScrollBar& GetVScrollBar() { return m_aVScrollBar; }
};
@@ -121,8 +121,8 @@ namespace dbaui
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible() SAL_OVERRIDE;
// own methods
- ScrollBar* GetHScrollBar() { return static_cast<OScrollWindowHelper*>(GetParent())->GetHScrollBar(); }
- ScrollBar* GetVScrollBar() { return static_cast<OScrollWindowHelper*>(GetParent())->GetVScrollBar(); }
+ ScrollBar& GetHScrollBar() { return static_cast<OScrollWindowHelper*>(GetParent())->GetHScrollBar(); }
+ ScrollBar& GetVScrollBar() { return static_cast<OScrollWindowHelper*>(GetParent())->GetVScrollBar(); }
DECL_LINK( ScrollHdl, ScrollBar* );
void DrawConnections( const Rectangle& rRect );
@@ -174,12 +174,12 @@ namespace dbaui
void DeselectConn(OTableConnection* pConn);
void SelectConn(OTableConnection* pConn);
- OTableWindowMap* GetTabWinMap() { return &m_aTableMap; }
- const OTableWindowMap* GetTabWinMap() const { return &m_aTableMap; }
+ OTableWindowMap& GetTabWinMap() { return m_aTableMap; }
+ const OTableWindowMap& GetTabWinMap() const { return m_aTableMap; }
/** gives a read only access to the connection vector
*/
- const ::std::vector<OTableConnection*>* getTableConnections() const { return &m_vTableConnection; }
+ const ::std::vector<OTableConnection*>& getTableConnections() const { return m_vTableConnection; }
bool ExistsAConn(const OTableWindow* pFromWin) const;
diff --git a/dbaccess/source/ui/inc/TableConnection.hxx b/dbaccess/source/ui/inc/TableConnection.hxx
index a48e54f..95f6075 100644
--- a/dbaccess/source/ui/inc/TableConnection.hxx
+++ b/dbaccess/source/ui/inc/TableConnection.hxx
@@ -92,7 +92,7 @@ namespace dbaui
Rectangle GetBoundingRect() const;
inline TTableConnectionData::value_type GetData() const { return m_pData; }
- const ::std::vector<OConnectionLine*>* GetConnLineList() const { return &m_vConnLine; }
+ const ::std::vector<OConnectionLine*>& GetConnLineList() const { return m_vConnLine; }
inline OJoinTableView* GetParent() const { return m_pParent; }
virtual void Draw( const Rectangle& rRect );
using Window::Draw;
diff --git a/dbaccess/source/ui/inc/TableConnectionData.hxx b/dbaccess/source/ui/inc/TableConnectionData.hxx
index 187377b..36ca8d1 100644
--- a/dbaccess/source/ui/inc/TableConnectionData.hxx
+++ b/dbaccess/source/ui/inc/TableConnectionData.hxx
@@ -84,8 +84,8 @@ namespace dbaui
*/
OConnectionLineDataVec::size_type normalizeLines();
- const OConnectionLineDataVec* GetConnLineDataList() const { return &m_vConnLineData; }
- OConnectionLineDataVec* GetConnLineDataList() { return &m_vConnLineData; }
+ const OConnectionLineDataVec& GetConnLineDataList() const { return m_vConnLineData; }
+ OConnectionLineDataVec& GetConnLineDataList() { return m_vConnLineData; }
inline TTableWindowData::value_type getReferencingTable() const { return m_pReferencingTable; }
inline TTableWindowData::value_type getReferencedTable() const { return m_pReferencedTable; }
diff --git a/dbaccess/source/ui/inc/TableController.hxx b/dbaccess/source/ui/inc/TableController.hxx
index a6d8438..d0f6b4d 100644
--- a/dbaccess/source/ui/inc/TableController.hxx
+++ b/dbaccess/source/ui/inc/TableController.hxx
@@ -101,12 +101,12 @@ namespace dbaui
virtual void impl_onModifyChanged() SAL_OVERRIDE;
- inline ::std::vector< ::boost::shared_ptr<OTableRow> >* getRows() { return &m_vRowList; }
+ inline ::std::vector< ::boost::shared_ptr<OTableRow> >& getRows() { return m_vRowList; }
/// returns the position of the first empty row
sal_Int32 getFirstEmptyRowPosition();
- inline const OTypeInfoMap* getTypeInfo() const { return &m_aTypeInfo; }
+ inline const OTypeInfoMap& getTypeInfo() const { return m_aTypeInfo; }
inline TOTypeInfoSP getTypeInfo(sal_Int32 _nPos) const { return m_aTypeInfoIndex[_nPos]->second; }
TOTypeInfoSP getTypeInfoByType(sal_Int32 _nDataType) const;
diff --git a/dbaccess/source/ui/inc/TableWindow.hxx b/dbaccess/source/ui/inc/TableWindow.hxx
index ed11ef6..82028e1 100644
--- a/dbaccess/source/ui/inc/TableWindow.hxx
+++ b/dbaccess/source/ui/inc/TableWindow.hxx
@@ -146,9 +146,9 @@ namespace dbaui
OUString GetTableName() const { return m_pData->GetTableName(); }
OUString GetWinName() const { return m_pData->GetWinName(); }
OUString GetComposedName() const { return m_pData->GetComposedName(); }
- OTableWindowListBox* GetListBox() const { return m_pListBox; }
+ OTableWindowListBox* GetListBox() const { return m_pListBox; }
TTableWindowData::value_type GetData() const { return m_pData; }
- OTableWindowTitle* GetTitleCtrl() { return &m_aTitle; }
+ OTableWindowTitle& GetTitleCtrl() { return m_aTitle; }
/** returns the name which should be used when displaying join or relations
@return
diff --git a/dbaccess/source/ui/inc/WCopyTable.hxx b/dbaccess/source/ui/inc/WCopyTable.hxx
index 2cfb67f..c8b6831f 100644
--- a/dbaccess/source/ui/inc/WCopyTable.hxx
+++ b/dbaccess/source/ui/inc/WCopyTable.hxx
@@ -369,19 +369,19 @@ namespace dbaui
OUString getPrimaryKeyName() const { return m_aKeyName; }
TOTypeInfoSP getTypeInfo(sal_Int32 _nPos) const { return m_aTypeInfoIndex[_nPos]->second; }
- const OTypeInfoMap* getTypeInfo() const { return &m_aTypeInfo; }
+ const OTypeInfoMap& getTypeInfo() const { return m_aTypeInfo; }
TOTypeInfoSP getDestTypeInfo(sal_Int32 _nPos) const { return m_aDestTypeInfoIndex[_nPos]->second; }
- const OTypeInfoMap* getDestTypeInfo() const { return &m_aDestTypeInfo; }
+ const OTypeInfoMap& getDestTypeInfo() const { return m_aDestTypeInfo; }
::com::sun::star::lang::Locale GetLocale() const { return m_aLocale; }
::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > GetFormatter() const { return m_xFormatter; }
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext> GetComponentContext() const { return m_xContext; }
- const ODatabaseExport::TColumns* getSourceColumns() const{ return &m_vSourceColumns; }
- const ODatabaseExport::TColumnVector* getSrcVector() const { return &m_vSourceVec; }
- ODatabaseExport::TColumns* getDestColumns() { return &m_vDestColumns; }
- const ODatabaseExport::TColumnVector* getDestVector() const { return &m_aDestVec; }
+ const ODatabaseExport::TColumns& getSourceColumns() const{ return m_vSourceColumns; }
+ const ODatabaseExport::TColumnVector& getSrcVector() const { return m_vSourceVec; }
+ ODatabaseExport::TColumns& getDestColumns() { return m_vDestColumns; }
+ const ODatabaseExport::TColumnVector& getDestVector() const { return m_aDestVec; }
OUString getName() const { return m_sName; }
/** clears the dest vectors
diff --git a/dbaccess/source/ui/misc/WCPage.cxx b/dbaccess/source/ui/misc/WCPage.cxx
index e849e91..7cfb2b9 100644
--- a/dbaccess/source/ui/misc/WCPage.cxx
+++ b/dbaccess/source/ui/misc/WCPage.cxx
@@ -265,8 +265,8 @@ bool OCopyTable::checkAppendData()
xTables = xSup->getTables();
if(xTables.is() && xTables->hasByName(m_pEdTableName->GetText()))
{
- const ODatabaseExport::TColumnVector* pSrcColumns = m_pParent->getSrcVector();
- const sal_uInt32 nSrcSize = pSrcColumns->size();
+ const ODatabaseExport::TColumnVector& rSrcColumns = m_pParent->getSrcVector();
+ const sal_uInt32 nSrcSize = rSrcColumns.size();
m_pParent->m_vColumnPos.resize( nSrcSize, ODatabaseExport::TPositions::value_type( COLUMN_POSITION_NOT_FOUND, COLUMN_POSITION_NOT_FOUND ) );
m_pParent->m_vColumnTypes.resize( nSrcSize , COLUMN_POSITION_NOT_FOUND );
@@ -274,10 +274,10 @@ bool OCopyTable::checkAppendData()
xTables->getByName( m_pEdTableName->GetText() ) >>= xTable;
ObjectCopySource aTableCopySource( m_pParent->m_xDestConnection, xTable );
m_pParent->loadData( aTableCopySource, m_pParent->m_vDestColumns, m_pParent->m_aDestVec );
- const ODatabaseExport::TColumnVector* pDestColumns = m_pParent->getDestVector();
- ODatabaseExport::TColumnVector::const_iterator aDestIter = pDestColumns->begin();
- ODatabaseExport::TColumnVector::const_iterator aDestEnd = pDestColumns->end();
- const sal_uInt32 nDestSize = pDestColumns->size();
+ const ODatabaseExport::TColumnVector& rDestColumns = m_pParent->getDestVector();
+ ODatabaseExport::TColumnVector::const_iterator aDestIter = rDestColumns.begin();
+ ODatabaseExport::TColumnVector::const_iterator aDestEnd = rDestColumns.end();
+ const sal_uInt32 nDestSize = rDestColumns.size();
bool bNotConvert;
sal_uInt32 i = 0;
for(sal_Int32 nPos = 1;aDestIter != aDestEnd && i < nDestSize && i < nSrcSize;++aDestIter,++nPos,++i)
diff --git a/dbaccess/source/ui/misc/WColumnSelect.cxx b/dbaccess/source/ui/misc/WColumnSelect.cxx
index 26cccda..fab9f5e 100644
--- a/dbaccess/source/ui/misc/WColumnSelect.cxx
+++ b/dbaccess/source/ui/misc/WColumnSelect.cxx
@@ -108,9 +108,9 @@ void OWizColumnSelect::Reset()
m_pParent->m_mNameMapping.clear();
// insert the source columns in the left listbox
- const ODatabaseExport::TColumnVector* pSrcColumns = m_pParent->getSrcVector();
- ODatabaseExport::TColumnVector::const_iterator aIter = pSrcColumns->begin();
- ODatabaseExport::TColumnVector::const_iterator aEnd = pSrcColumns->end();
+ const ODatabaseExport::TColumnVector& rSrcColumns = m_pParent->getSrcVector();
+ ODatabaseExport::TColumnVector::const_iterator aIter = rSrcColumns.begin();
+ ODatabaseExport::TColumnVector::const_iterator aEnd = rSrcColumns.end();
for(;aIter != aEnd;++aIter)
{
@@ -127,15 +127,15 @@ void OWizColumnSelect::Reset()
void OWizColumnSelect::ActivatePage( )
{
// if there are no dest columns reset the left side with the origibnal columns
- if(m_pParent->getDestColumns()->empty())
+ if(m_pParent->getDestColumns().empty())
Reset();
clearListBox(*m_pNewColumnNames);
- const ODatabaseExport::TColumnVector* pDestColumns = m_pParent->getDestVector();
+ const ODatabaseExport::TColumnVector& rDestColumns = m_pParent->getDestVector();
- ODatabaseExport::TColumnVector::const_iterator aIter = pDestColumns->begin();
- ODatabaseExport::TColumnVector::const_iterator aEnd = pDestColumns->end();
+ ODatabaseExport::TColumnVector::const_iterator aIter = rDestColumns.begin();
+ ODatabaseExport::TColumnVector::const_iterator aEnd = rDestColumns.end();
for(;aIter != aEnd;++aIter)
{
sal_uInt16 nPos = m_pNewColumnNames->InsertEntry((*aIter)->first);
@@ -164,7 +164,7 @@ bool OWizColumnSelect::LeavePage()
if ( m_pParent->GetPressedButton() == OCopyTableWizard::WIZARD_NEXT
|| m_pParent->GetPressedButton() == OCopyTableWizard::WIZARD_FINISH
)
- return m_pParent->getDestColumns()->size() != 0;
+ return m_pParent->getDestColumns().size() != 0;
else
return true;
}
@@ -331,15 +331,15 @@ void OWizColumnSelect::moveColumn( ListBox* _pRight,
OSL_ENSURE(aIter != m_pParent->m_mNameMapping.end(),"Column must be defined");
if ( aIter == m_pParent->m_mNameMapping.end() )
return; // do nothing
- const ODatabaseExport::TColumns* pSrcColumns = m_pParent->getSourceColumns();
- ODatabaseExport::TColumns::const_iterator aSrcIter = pSrcColumns->find((*aIter).first);
- if ( aSrcIter != pSrcColumns->end() )
+ const ODatabaseExport::TColumns& rSrcColumns = m_pParent->getSourceColumns();
+ ODatabaseExport::TColumns::const_iterator aSrcIter = rSrcColumns.find((*aIter).first);
+ if ( aSrcIter != rSrcColumns.end() )
{
// we need also the old position of this column to insert it back on that position again
- const ODatabaseExport::TColumnVector* pSrcVector = m_pParent->getSrcVector();
- ODatabaseExport::TColumnVector::const_iterator aPos = ::std::find(pSrcVector->begin(),pSrcVector->end(),aSrcIter);
- OSL_ENSURE( aPos != pSrcVector->end(),"Invalid position for the iterator here!");
- ODatabaseExport::TColumnVector::size_type nPos = (aPos - pSrcVector->begin()) - adjustColumnPosition(_pLeft, _sColumnName, (aPos - pSrcVector->begin()), _aCase);
+ const ODatabaseExport::TColumnVector& rSrcVector = m_pParent->getSrcVector();
+ ODatabaseExport::TColumnVector::const_iterator aPos = ::std::find(rSrcVector.begin(), rSrcVector.end(), aSrcIter);
+ OSL_ENSURE( aPos != rSrcVector.end(),"Invalid position for the iterator here!");
+ ODatabaseExport::TColumnVector::size_type nPos = (aPos - rSrcVector.begin()) - adjustColumnPosition(_pLeft, _sColumnName, (aPos - rSrcVector.begin()), _aCase);
_pRight->SetEntryData( _pRight->InsertEntry( (*aIter).first, sal::static_int_cast< sal_uInt16 >(nPos)),aSrcIter->second );
_rRightColumns.push_back((*aIter).first);
@@ -379,14 +379,14 @@ sal_uInt16 OWizColumnSelect::adjustColumnPosition( ListBox* _pLeft,
);
OSL_ENSURE(aIter != m_pParent->m_mNameMapping.end(),"Column must be defined");
- const ODatabaseExport::TColumns* pSrcColumns = m_pParent->getSourceColumns();
- ODatabaseExport::TColumns::const_iterator aSrcIter = pSrcColumns->find((*aIter).first);
- if ( aSrcIter != pSrcColumns->end() )
+ const ODatabaseExport::TColumns& rSrcColumns = m_pParent->getSourceColumns();
+ ODatabaseExport::TColumns::const_iterator aSrcIter = rSrcColumns.find((*aIter).first);
+ if ( aSrcIter != rSrcColumns.end() )
{
// we need also the old position of this column to insert it back on that position again
- const ODatabaseExport::TColumnVector* pSrcVector = m_pParent->getSrcVector();
- ODatabaseExport::TColumnVector::const_iterator aPos = ::std::find(pSrcVector->begin(),pSrcVector->end(),aSrcIter);
- ODatabaseExport::TColumnVector::size_type nPos = aPos - pSrcVector->begin();
+ const ODatabaseExport::TColumnVector& rSrcVector = m_pParent->getSrcVector();
+ ODatabaseExport::TColumnVector::const_iterator aPos = ::std::find(rSrcVector.begin(), rSrcVector.end(), aSrcIter);
+ ODatabaseExport::TColumnVector::size_type nPos = aPos - rSrcVector.begin();
if( nPos < nCurrentPos)
{
nAdjustedPos++;
diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx
index d293ea7..6e6fcd2 100644
--- a/dbaccess/source/ui/misc/WCopyTable.cxx
+++ b/dbaccess/source/ui/misc/WCopyTable.cxx
@@ -1225,11 +1225,11 @@ Reference< XPropertySet > OCopyTableWizard::createTable()
Reference< XColumnsSupplier > xSuppDestinationColumns( xTable, UNO_QUERY );
// now append the columns
- const ODatabaseExport::TColumnVector* pVec = getDestVector();
- appendColumns( xSuppDestinationColumns, pVec );
+ const ODatabaseExport::TColumnVector& rVec = getDestVector();
+ appendColumns( xSuppDestinationColumns, &rVec );
// now append the primary key
Reference<XKeysSupplier> xKeySup(xTable,UNO_QUERY);
- appendKey(xKeySup,pVec);
+ appendKey(xKeySup, &rVec);
Reference<XAppend> xAppend(xTables,UNO_QUERY);
if(xAppend.is())
diff --git a/dbaccess/source/ui/misc/WExtendPages.cxx b/dbaccess/source/ui/misc/WExtendPages.cxx
index 9f6839b..7d1646f 100644
--- a/dbaccess/source/ui/misc/WExtendPages.cxx
+++ b/dbaccess/source/ui/misc/WExtendPages.cxx
@@ -31,8 +31,8 @@ SvParser* OWizHTMLExtend::createReader(sal_Int32 _nRows)
m_pParent->GetColumnPositions(),
m_pParent->GetFormatter(),
m_pParent->GetComponentContext(),
- m_pParent->getDestVector(),
- m_pParent->getTypeInfo(),
+ &m_pParent->getDestVector(),
+ &m_pParent->getTypeInfo(),
m_pParent->shouldCreatePrimaryKey());
}
@@ -43,8 +43,8 @@ SvParser* OWizRTFExtend::createReader(sal_Int32 _nRows)
m_pParent->GetColumnPositions(),
m_pParent->GetFormatter(),
m_pParent->GetComponentContext(),
- m_pParent->getDestVector(),
- m_pParent->getTypeInfo(),
+ &m_pParent->getDestVector(),
+ &m_pParent->getTypeInfo(),
m_pParent->shouldCreatePrimaryKey());
}
diff --git a/dbaccess/source/ui/misc/WNameMatch.cxx b/dbaccess/source/ui/misc/WNameMatch.cxx
index 088a850..b274ba2 100644
--- a/dbaccess/source/ui/misc/WNameMatch.cxx
+++ b/dbaccess/source/ui/misc/WNameMatch.cxx
@@ -104,8 +104,8 @@ void OWizNameMatching::ActivatePage( )
aName += m_pParent->m_sName;
m_FT_TABLE_RIGHT.SetText(aName);
- m_CTRL_LEFT.FillListBox(*m_pParent->getSrcVector());
- m_CTRL_RIGHT.FillListBox(*m_pParent->getDestVector());
+ m_CTRL_LEFT.FillListBox(m_pParent->getSrcVector());
+ m_CTRL_RIGHT.FillListBox(m_pParent->getDestVector());
m_ibColumn_up.Enable( m_CTRL_LEFT.GetEntryCount() > 1 );
m_ibColumn_down.Enable( m_CTRL_LEFT.GetEntryCount() > 1 );
@@ -120,12 +120,12 @@ void OWizNameMatching::ActivatePage( )
bool OWizNameMatching::LeavePage()
{
- const ODatabaseExport::TColumnVector* pSrcColumns = m_pParent->getSrcVector();
+ const ODatabaseExport::TColumnVector& rSrcColumns = m_pParent->getSrcVector();
m_pParent->m_vColumnPos.clear();
m_pParent->m_vColumnTypes.clear();
- m_pParent->m_vColumnPos.resize( pSrcColumns->size(), ODatabaseExport::TPositions::value_type( COLUMN_POSITION_NOT_FOUND, COLUMN_POSITION_NOT_FOUND ) );
- m_pParent->m_vColumnTypes.resize( pSrcColumns->size(), COLUMN_POSITION_NOT_FOUND );
+ m_pParent->m_vColumnPos.resize( rSrcColumns.size(), ODatabaseExport::TPositions::value_type( COLUMN_POSITION_NOT_FOUND, COLUMN_POSITION_NOT_FOUND ) );
+ m_pParent->m_vColumnTypes.resize( rSrcColumns.size(), COLUMN_POSITION_NOT_FOUND );
sal_Int32 nParamPos = 0;
SvTreeListEntry* pLeftEntry = m_CTRL_LEFT.GetModel()->First();
@@ -135,26 +135,26 @@ bool OWizNameMatching::LeavePage()
OFieldDescription* pSrcField = static_cast<OFieldDescription*>(pLeftEntry->GetUserData());
OSL_ENSURE(pSrcField,"OWizNameMatching: OColumn can not be null!");
- ODatabaseExport::TColumnVector::const_iterator aSrcIter = pSrcColumns->begin();
- ODatabaseExport::TColumnVector::const_iterator aSrcEnd = pSrcColumns->end();
+ ODatabaseExport::TColumnVector::const_iterator aSrcIter = rSrcColumns.begin();
+ ODatabaseExport::TColumnVector::const_iterator aSrcEnd = rSrcColumns.end();
for(;aSrcIter != aSrcEnd && (*aSrcIter)->second != pSrcField;++aSrcIter)
;
- const sal_Int32 nPos = ::std::distance(pSrcColumns->begin(),aSrcIter);
+ const sal_Int32 nPos = ::std::distance(rSrcColumns.begin(),aSrcIter);
if(m_CTRL_LEFT.GetCheckButtonState(pLeftEntry) == SV_BUTTON_CHECKED)
{
OFieldDescription* pDestField = static_cast<OFieldDescription*>(pRightEntry->GetUserData());
OSL_ENSURE(pDestField,"OWizNameMatching: OColumn can not be null!");
- const ODatabaseExport::TColumnVector* pDestColumns = m_pParent->getDestVector();
- ODatabaseExport::TColumnVector::const_iterator aDestIter = pDestColumns->begin();
- ODatabaseExport::TColumnVector::const_iterator aDestEnd = pDestColumns->end();
+ const ODatabaseExport::TColumnVector& rDestColumns = m_pParent->getDestVector();
+ ODatabaseExport::TColumnVector::const_iterator aDestIter = rDestColumns.begin();
+ ODatabaseExport::TColumnVector::const_iterator aDestEnd = rDestColumns.end();
for(;aDestIter != aDestEnd && (*aDestIter)->second != pDestField;++aDestIter)
;
OSL_ENSURE((nPos) < static_cast<sal_Int32>(m_pParent->m_vColumnPos.size()),"m_pParent->m_vColumnPos: Illegal index for vector");
m_pParent->m_vColumnPos[nPos].first = ++nParamPos;
- m_pParent->m_vColumnPos[nPos].second = ::std::distance(pDestColumns->begin(),aDestIter) + 1;
+ m_pParent->m_vColumnPos[nPos].second = ::std::distance(rDestColumns.begin(),aDestIter) + 1;
bool bNotConvert = true;
TOTypeInfoSP pTypeInfo;
diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx b/dbaccess/source/ui/misc/WTypeSelect.cxx
index 6c3180d..018e797 100644
--- a/dbaccess/source/ui/misc/WTypeSelect.cxx
+++ b/dbaccess/source/ui/misc/WTypeSelect.cxx
@@ -186,7 +186,7 @@ TOTypeInfoSP OWizTypeSelectControl::getTypeInfo(sal_Int32 _nPos)
const OTypeInfoMap* OWizTypeSelectControl::getTypeInfo() const
{
- return static_cast<OWizTypeSelect*>(GetParent())->m_pParent->getDestTypeInfo();
+ return &static_cast<OWizTypeSelect*>(GetParent())->m_pParent->getDestTypeInfo();
}
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData> OWizTypeSelectControl::getMetaData()
@@ -285,9 +285,9 @@ void OWizTypeSelect::Reset()
sal_Int32 nBreakPos;
m_pParent->CheckColumns(nBreakPos);
- const ODatabaseExport::TColumnVector* pDestColumns = m_pParent->getDestVector();
- ODatabaseExport::TColumnVector::const_iterator aIter = pDestColumns->begin();
- ODatabaseExport::TColumnVector::const_iterator aEnd = pDestColumns->end();
+ const ODatabaseExport::TColumnVector& rDestColumns = m_pParent->getDestVector();
+ ODatabaseExport::TColumnVector::const_iterator aIter = rDestColumns.begin();
+ ODatabaseExport::TColumnVector::const_iterator aEnd = rDestColumns.end();
for(;aIter != aEnd;++aIter)
{
sal_uInt16 nPos;
diff --git a/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx b/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
index 5506c7f..02d1759 100644
--- a/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
+++ b/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
@@ -81,10 +81,10 @@ namespace dbaui
if( m_pLine )
{
// search the position of our table window in the table window map
- nIndex = m_pLine->GetParent()->GetTabWinMap()->size();
- const ::std::vector<OTableConnection*>* pVec = m_pLine->GetParent()->getTableConnections();
- ::std::vector<OTableConnection*>::const_iterator aIter = pVec->begin();
- ::std::vector<OTableConnection*>::const_iterator aEnd = pVec->end();
+ nIndex = m_pLine->GetParent()->GetTabWinMap().size();
+ const ::std::vector<OTableConnection*>& rVec = m_pLine->GetParent()->getTableConnections();
+ ::std::vector<OTableConnection*>::const_iterator aIter = rVec.begin();
+ ::std::vector<OTableConnection*>::const_iterator aEnd = rVec.end();
for (; aIter != aEnd && (*aIter) != m_pLine; ++nIndex,++aIter)
;
nIndex = ( aIter != aEnd ) ? nIndex : -1;
diff --git a/dbaccess/source/ui/querydesign/JAccess.cxx b/dbaccess/source/ui/querydesign/JAccess.cxx
index 7d0b8ad..717128e 100644
--- a/dbaccess/source/ui/querydesign/JAccess.cxx
+++ b/dbaccess/source/ui/querydesign/JAccess.cxx
@@ -58,7 +58,7 @@ namespace dbaui
::osl::MutexGuard aGuard( m_aMutex );
sal_Int32 nChildCount = 0;
if ( m_pTableView )
- nChildCount = m_pTableView->GetTabWinCount() + m_pTableView->getTableConnections()->size();
+ nChildCount = m_pTableView->GetTabWinCount() + m_pTableView->getTableConnections().size();
return nChildCount;
}
Reference< XAccessible > SAL_CALL OJoinDesignViewAccess::getAccessibleChild( sal_Int32 i ) throw (IndexOutOfBoundsException,RuntimeException, std::exception)
@@ -71,13 +71,13 @@ namespace dbaui
sal_Int32 nTableWindowCount = m_pTableView->GetTabWinCount();
if( i < nTableWindowCount )
{
- OJoinTableView::OTableWindowMap::iterator aIter = m_pTableView->GetTabWinMap()->begin();
+ OJoinTableView::OTableWindowMap::iterator aIter = m_pTableView->GetTabWinMap().begin();
for (sal_Int32 j=i; j; ++aIter,--j)
;
aRet = aIter->second->GetAccessible();
}
- else if( size_t(i - nTableWindowCount) < m_pTableView->getTableConnections()->size() )
- aRet = (*m_pTableView->getTableConnections())[i - nTableWindowCount]->GetAccessible();
+ else if( size_t(i - nTableWindowCount) < m_pTableView->getTableConnections().size() )
+ aRet = m_pTableView->getTableConnections()[i - nTableWindowCount]->GetAccessible();
}
else
throw IndexOutOfBoundsException();
diff --git a/dbaccess/source/ui/querydesign/JoinDesignView.cxx b/dbaccess/source/ui/querydesign/JoinDesignView.cxx
index cfe2d69..6372e15 100644
--- a/dbaccess/source/ui/querydesign/JoinDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/JoinDesignView.cxx
@@ -97,7 +97,7 @@ void OJoinDesignView::setReadOnly(sal_Bool /*_bReadOnly*/)
void OJoinDesignView::SaveTabWinUIConfig(OTableWindow* pWin)
{
- getController().SaveTabWinPosSize(pWin, m_pScrollWindow->GetHScrollBar()->GetThumbPos(), m_pScrollWindow->GetVScrollBar()->GetThumbPos());
+ getController().SaveTabWinPosSize(pWin, m_pScrollWindow->GetHScrollBar().GetThumbPos(), m_pScrollWindow->GetVScrollBar().GetThumbPos());
}
void OJoinDesignView::KeyInput( const KeyEvent& rEvt )
diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx
index c29d55a..e9d7dc8 100644
--- a/dbaccess/source/ui/querydesign/JoinTableView.cxx
+++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx
@@ -73,14 +73,14 @@ OScrollWindowHelper::OScrollWindowHelper( Window* pParent) : Window( pParent)
// ScrollBars
- GetHScrollBar()->SetRange( Range(0, 1000) );
- GetVScrollBar()->SetRange( Range(0, 1000) );
+ GetHScrollBar().SetRange( Range(0, 1000) );
+ GetVScrollBar().SetRange( Range(0, 1000) );
- GetHScrollBar()->SetLineSize( LINE_SIZE );
- GetVScrollBar()->SetLineSize( LINE_SIZE );
+ GetHScrollBar().SetLineSize( LINE_SIZE );
+ GetVScrollBar().SetLineSize( LINE_SIZE );
- GetHScrollBar()->Show();
- GetVScrollBar()->Show();
+ GetHScrollBar().Show();
+ GetVScrollBar().Show();
m_pCornerWindow->Show();
// normally we should be SCROLL_PANE
@@ -98,15 +98,15 @@ void OScrollWindowHelper::setTableView(OJoinTableView* _pTableView)
{
m_pTableView = _pTableView;
// ScrollBars
- GetHScrollBar()->SetScrollHdl( LINK(m_pTableView, OJoinTableView, ScrollHdl) );
- GetVScrollBar()->SetScrollHdl( LINK(m_pTableView, OJoinTableView, ScrollHdl) );
+ GetHScrollBar().SetScrollHdl( LINK(m_pTableView, OJoinTableView, ScrollHdl) );
+ GetVScrollBar().SetScrollHdl( LINK(m_pTableView, OJoinTableView, ScrollHdl) );
}
void OScrollWindowHelper::resetRange(const Point& _aSize)
{
Point aPos = PixelToLogic(_aSize);
- GetHScrollBar()->SetRange( Range(0, aPos.X() + TABWIN_SPACING_X) );
- GetVScrollBar()->SetRange( Range(0, aPos.Y() + TABWIN_SPACING_Y) );
+ GetHScrollBar().SetRange( Range(0, aPos.X() + TABWIN_SPACING_X) );
+ GetVScrollBar().SetRange( Range(0, aPos.Y() + TABWIN_SPACING_Y) );
}
void OScrollWindowHelper::Resize()
@@ -114,15 +114,15 @@ void OScrollWindowHelper::Resize()
Window::Resize();
Size aTotalOutputSize = GetOutputSizePixel();
- long nHScrollHeight = GetHScrollBar()->GetSizePixel().Height();
- long nVScrollWidth = GetVScrollBar()->GetSizePixel().Width();
+ long nHScrollHeight = GetHScrollBar().GetSizePixel().Height();
+ long nVScrollWidth = GetVScrollBar().GetSizePixel().Width();
- GetHScrollBar()->SetPosSizePixel(
+ GetHScrollBar().SetPosSizePixel(
Point( 0, aTotalOutputSize.Height()-nHScrollHeight ),
Size( aTotalOutputSize.Width()-nVScrollWidth, nHScrollHeight )
);
- GetVScrollBar()->SetPosSizePixel(
+ GetVScrollBar().SetPosSizePixel(
Point( aTotalOutputSize.Width()-nVScrollWidth, 0 ),
Size( nVScrollWidth, aTotalOutputSize.Height()-nHScrollHeight )
);
@@ -132,20 +132,20 @@ void OScrollWindowHelper::Resize()
Size( nVScrollWidth, nHScrollHeight )
);
- GetHScrollBar()->SetPageSize( aTotalOutputSize.Width() );
- GetHScrollBar()->SetVisibleSize( aTotalOutputSize.Width() );
+ GetHScrollBar().SetPageSize( aTotalOutputSize.Width() );
+ GetHScrollBar().SetVisibleSize( aTotalOutputSize.Width() );
- GetVScrollBar()->SetPageSize( aTotalOutputSize.Height() );
- GetVScrollBar()->SetVisibleSize( aTotalOutputSize.Height() );
+ GetVScrollBar().SetPageSize( aTotalOutputSize.Height() );
+ GetVScrollBar().SetVisibleSize( aTotalOutputSize.Height() );
// adjust the ranges of the scrollbars if necessary
- long lRange = GetHScrollBar()->GetRange().Max() - GetHScrollBar()->GetRange().Min();
+ long lRange = GetHScrollBar().GetRange().Max() - GetHScrollBar().GetRange().Min();
if (m_pTableView->GetScrollOffset().X() + aTotalOutputSize.Width() > lRange)
- GetHScrollBar()->SetRangeMax(m_pTableView->GetScrollOffset().X() + aTotalOutputSize.Width() + GetHScrollBar()->GetRange().Min());
+ GetHScrollBar().SetRangeMax(m_pTableView->GetScrollOffset().X() + aTotalOutputSize.Width() + GetHScrollBar().GetRange().Min());
- lRange = GetVScrollBar()->GetRange().Max() - GetVScrollBar()->GetRange().Min();
+ lRange = GetVScrollBar().GetRange().Max() - GetVScrollBar().GetRange().Min();
if (m_pTableView->GetScrollOffset().Y() + aTotalOutputSize.Height() > lRange)
- GetVScrollBar()->SetRangeMax(m_pTableView->GetScrollOffset().Y() + aTotalOutputSize.Height() + GetVScrollBar()->GetRange().Min());
+ GetVScrollBar().SetRangeMax(m_pTableView->GetScrollOffset().Y() + aTotalOutputSize.Height() + GetVScrollBar().GetRange().Min());
m_pTableView->SetPosSizePixel(Point( 0, 0 ),Size( aTotalOutputSize.Width()-nVScrollWidth, aTotalOutputSize.Height()-nHScrollHeight ));
}
@@ -186,7 +186,7 @@ OJoinTableView::~OJoinTableView()
IMPL_LINK( OJoinTableView, ScrollHdl, ScrollBar*, pScrollBar )
{
// move all windows
- ScrollPane( pScrollBar->GetDelta(), (pScrollBar == GetHScrollBar()), false );
+ ScrollPane( pScrollBar->GetDelta(), (pScrollBar == &GetHScrollBar()), false );
return 0;
}
@@ -202,8 +202,8 @@ void OJoinTableView::Resize()
return;
// we have at least one table so resize it
- m_aScrollOffset.X() = GetHScrollBar()->GetThumbPos();
- m_aScrollOffset.Y() = GetVScrollBar()->GetThumbPos();
+ m_aScrollOffset.X() = GetHScrollBar().GetThumbPos();
+ m_aScrollOffset.Y() = GetVScrollBar().GetThumbPos();
OTableWindow* pCheck = m_aTableMap.begin()->second;
Point aRealPos = pCheck->GetPosPixel();
@@ -311,7 +311,7 @@ void OJoinTableView::AddTabWin(const OUString& _rComposedName, const OUString& r
OTableWindow* pNewTabWin = createWindow( pNewTabWinData );
if ( pNewTabWin->Init() )
{
- m_pView->getController().getTableWindowData()->push_back( pNewTabWinData);
+ m_pView->getController().getTableWindowData().push_back( pNewTabWinData);
// when we already have a table with this name insert the full qualified one instead
if(m_aTableMap.find(rWinName) != m_aTableMap.end())
m_aTableMap[_rComposedName] = pNewTabWin;
@@ -366,10 +366,10 @@ void OJoinTableView::RemoveTabWin( OTableWindow* pTabWin )
pTabWin->Hide();
OJoinController& rController = m_pView->getController();
- TTableWindowData::iterator aFind = ::std::find(rController.getTableWindowData()->begin(),rController.getTableWindowData()->end(),pData);
- if(aFind != rController.getTableWindowData()->end())
+ TTableWindowData::iterator aFind = ::std::find(rController.getTableWindowData().begin(), rController.getTableWindowData().end(), pData);
+ if(aFind != rController.getTableWindowData().end())
{
- rController.getTableWindowData()->erase(aFind);
+ rController.getTableWindowData().erase(aFind);
rController.setModified(sal_True);
}
@@ -395,16 +395,14 @@ namespace
bool isScrollAllowed( OJoinTableView* _pView,long nDelta, bool bHoriz)
{
// adjust ScrollBar-Positions
- ScrollBar* pBar = _pView->GetVScrollBar();
- if( bHoriz )
- pBar = _pView->GetHScrollBar();
+ ScrollBar& rBar = bHoriz ? _pView->GetHScrollBar() : _pView->GetVScrollBar() ;
- long nOldThumbPos = pBar->GetThumbPos();
+ long nOldThumbPos = rBar.GetThumbPos();
long nNewThumbPos = nOldThumbPos + nDelta;
if( nNewThumbPos < 0 )
nNewThumbPos = 0;
- else if( nNewThumbPos > pBar->GetRangeMax() )
- nNewThumbPos = pBar->GetRangeMax();
+ else if( nNewThumbPos > rBar.GetRangeMax() )
+ nNewThumbPos = rBar.GetRangeMax();
if ( bHoriz )
{
@@ -462,12 +460,12 @@ namespace
if ( bVisbile )
{
- sal_Int32 nHRangeMax = _pView->GetHScrollBar()->GetRangeMax();
- sal_Int32 nVRangeMax = _pView->GetVScrollBar()->GetRangeMax();
+ sal_Int32 nHRangeMax = _pView->GetHScrollBar().GetRangeMax();
+ sal_Int32 nVRangeMax = _pView->GetVScrollBar().GetRangeMax();
- if ( aSize.Width() + _pView->GetHScrollBar()->GetThumbPos() + _nScrollX > nHRangeMax )
+ if ( aSize.Width() + _pView->GetHScrollBar().GetThumbPos() + _nScrollX > nHRangeMax )
bVisbile = false;
- if ( bVisbile && aSize.Height() + _pView->GetVScrollBar()->GetThumbPos() + _nScrollY > nVRangeMax )
+ if ( bVisbile && aSize.Height() + _pView->GetVScrollBar().GetThumbPos() + _nScrollY > nVRangeMax )
bVisbile = false;
}
}
@@ -576,10 +574,10 @@ void OJoinTableView::SetDefaultTabWinPosSize( OTableWindow* pTabWin )
aBottom.X() += aNewSize.Width();
aBottom.Y() += aNewSize.Height();
- if(!GetHScrollBar()->GetRange().IsInside(aBottom.X()))
- GetHScrollBar()->SetRange( Range(0, aBottom.X()) );
- if(!GetVScrollBar()->GetRange().IsInside(aBottom.Y()))
- GetVScrollBar()->SetRange( Range(0, aBottom.Y()) );
+ if(!GetHScrollBar().GetRange().IsInside(aBottom.X()))
+ GetHScrollBar().SetRange( Range(0, aBottom.X()) );
+ if(!GetVScrollBar().GetRange().IsInside(aBottom.Y()))
+ GetVScrollBar().SetRange( Range(0, aBottom.Y()) );
pTabWin->SetPosSizePixel( aNewPos, aNewSize );
}
@@ -643,50 +641,50 @@ bool OJoinTableView::ScrollPane( long nDelta, bool bHoriz, bool bPaintScrollBars
{
if( bHoriz )
{
- long nOldThumbPos = GetHScrollBar()->GetThumbPos();
+ long nOldThumbPos = GetHScrollBar().GetThumbPos();
long nNewThumbPos = nOldThumbPos + nDelta;
if( nNewThumbPos < 0 )
{
nNewThumbPos = 0;
bRet = false;
}
- if( nNewThumbPos > GetHScrollBar()->GetRange().Max() )
+ if( nNewThumbPos > GetHScrollBar().GetRange().Max() )
{
- nNewThumbPos = GetHScrollBar()->GetRange().Max();
+ nNewThumbPos = GetHScrollBar().GetRange().Max();
bRet = false;
}
- GetHScrollBar()->SetThumbPos( nNewThumbPos );
- nDelta = GetHScrollBar()->GetThumbPos() - nOldThumbPos;
+ GetHScrollBar().SetThumbPos( nNewThumbPos );
+ nDelta = GetHScrollBar().GetThumbPos() - nOldThumbPos;
}
else
{
- long nOldThumbPos = GetVScrollBar()->GetThumbPos();
+ long nOldThumbPos = GetVScrollBar().GetThumbPos();
long nNewThumbPos = nOldThumbPos+nDelta;
if( nNewThumbPos < 0 )
{
nNewThumbPos = 0;
bRet = false;
}
- if( nNewThumbPos > GetVScrollBar()->GetRange().Max() )
+ if( nNewThumbPos > GetVScrollBar().GetRange().Max() )
{
- nNewThumbPos = GetVScrollBar()->GetRange().Max();
+ nNewThumbPos = GetVScrollBar().GetRange().Max();
bRet = false;
}
- GetVScrollBar()->SetThumbPos( nNewThumbPos );
- nDelta = GetVScrollBar()->GetThumbPos() - nOldThumbPos;
+ GetVScrollBar().SetThumbPos( nNewThumbPos );
+ nDelta = GetVScrollBar().GetThumbPos() - nOldThumbPos;
}
}
// If ScrollOffset hitting borders, no redrawing.
- if( (GetHScrollBar()->GetThumbPos()==m_aScrollOffset.X()) &&
- (GetVScrollBar()->GetThumbPos()==m_aScrollOffset.Y()) )
+ if( (GetHScrollBar().GetThumbPos()==m_aScrollOffset.X()) &&
+ (GetVScrollBar().GetThumbPos()==m_aScrollOffset.Y()) )
return false;
// set ScrollOffset anew
if (bHoriz)
- m_aScrollOffset.X() = GetHScrollBar()->GetThumbPos();
+ m_aScrollOffset.X() = GetHScrollBar().GetThumbPos();
else
- m_aScrollOffset.Y() = GetVScrollBar()->GetThumbPos();
+ m_aScrollOffset.Y() = GetVScrollBar().GetThumbPos();
// move all windows
OTableWindow* pTabWin;
@@ -749,7 +747,7 @@ void OJoinTableView::Tracking( const TrackingEvent& rTEvt )
if ( ! (pData && pData->HasPosition() && (pData->GetPosition() == aDragWinPos)))
{
// old logic coordinates
- Point ptOldPos = m_pDragWin->GetPosPixel() + Point(GetHScrollBar()->GetThumbPos(), GetVScrollBar()->GetThumbPos());
+ Point ptOldPos = m_pDragWin->GetPosPixel() + Point(GetHScrollBar().GetThumbPos(), GetVScrollBar().GetThumbPos());
// new positioning
m_pDragWin->SetPosPixel(aDragWinPos);
TabWinMoved(m_pDragWin, ptOldPos);
@@ -894,9 +892,9 @@ void OJoinTableView::SelectConn(OTableConnection* pConn)
SvTreeListEntry* pFirstSourceVisible = pSourceBox->GetFirstEntryInView();
SvTreeListEntry* pFirstDestVisible = pDestBox->GetFirstEntryInView();
- const ::std::vector<OConnectionLine*>* pLines = pConn->GetConnLineList();
- ::std::vector<OConnectionLine*>::const_reverse_iterator aIter = pLines->rbegin();
- for(;aIter != pLines->rend();++aIter)
+ const ::std::vector<OConnectionLine*>& rLines = pConn->GetConnLineList();
+ ::std::vector<OConnectionLine*>::const_reverse_iterator aIter = rLines.rbegin();
+ for(;aIter != rLines.rend();++aIter)
{
if ((*aIter)->IsValid())
{
@@ -1077,7 +1075,7 @@ void OJoinTableView::invalidateAndModify(SfxUndoAction *_pAction)
void OJoinTableView::TabWinMoved(OTableWindow* ptWhich, const Point& ptOldPosition)
{
- Point ptThumbPos(GetHScrollBar()->GetThumbPos(), GetVScrollBar()->GetThumbPos());
+ Point ptThumbPos(GetHScrollBar().GetThumbPos(), GetVScrollBar().GetThumbPos());
ptWhich->GetData()->SetPosition(ptWhich->GetPosPixel() + ptThumbPos);
invalidateAndModify(new OJoinMoveTabWinUndoAct(this, ptOldPosition, ptWhich));
@@ -1150,9 +1148,9 @@ void OJoinTableView::Command(const CommandEvent& rEvt)
{
if( pSelConnection )
{
- const ::std::vector<OConnectionLine*>* pLines = pSelConnection->GetConnLineList();
- ::std::vector<OConnectionLine*>::const_iterator aIter = ::std::find_if(pLines->begin(),pLines->end(),::std::mem_fun(&OConnectionLine::IsValid));
- if( aIter != pLines->end() )
+ const ::std::vector<OConnectionLine*>& rLines = pSelConnection->GetConnLineList();
+ ::std::vector<OConnectionLine*>::const_iterator aIter = ::std::find_if(rLines.begin(), rLines.end(),::std::mem_fun(&OConnectionLine::IsValid));
+ if( aIter != rLines.end() )
executePopup((*aIter)->getMidPoint(),pSelConnection);
}
}
@@ -1475,16 +1473,14 @@ void OJoinTableView::HideTabWins()
{
SetUpdateMode(false);
- OTableWindowMap* pTabWins = GetTabWinMap();
- if ( pTabWins )
- {
- // working on a copy because the real list will be cleared in inner calls
- OTableWindowMap aCopy(*pTabWins);
- OTableWindowMap::iterator aIter = aCopy.begin();
- OTableWindowMap::iterator aEnd = aCopy.end();
- for(;aIter != aEnd;++aIter)
- RemoveTabWin(aIter->second);
- }
+ OTableWindowMap& rTabWins = GetTabWinMap();
+
+ // working on a copy because the real list will be cleared in inner calls
+ OTableWindowMap aCopy(rTabWins);
+ OTableWindowMap::iterator aIter = aCopy.begin();
+ OTableWindowMap::iterator aEnd = aCopy.end();
+ for(;aIter != aEnd;++aIter)
+ RemoveTabWin(aIter->second);
m_pView->getController().setModified(sal_True);
@@ -1571,10 +1567,10 @@ void OJoinTableView::addConnection(OTableConnection* _pConnection,bool _bAddData
if ( _bAddData )
{
#if OSL_DEBUG_LEVEL > 0
- TTableConnectionData* pTabConnDataList = m_pView->getController().getTableConnectionData();
- OSL_ENSURE( ::std::find(pTabConnDataList->begin(),pTabConnDataList->end(),_pConnection->GetData()) == pTabConnDataList->end(),"Data already in vector!");
+ TTableConnectionData& rTabConnDataList = m_pView->getController().getTableConnectionData();
+ OSL_ENSURE( ::std::find(rTabConnDataList.begin(), rTabConnDataList.end(),_pConnection->GetData()) == rTabConnDataList.end(),"Data already in vector!");
#endif
- m_pView->getController().getTableConnectionData()->push_back(_pConnection->GetData());
+ m_pView->getController().getTableConnectionData().push_back(_pConnection->GetData());
}
m_vTableConnection.push_back(_pConnection);
_pConnection->RecalcLines();
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index c515159..213fc3e 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -339,7 +339,7 @@ namespace
bBrace = true;
_rJoin = _rJoin.replaceAt(_rJoin.getLength()-1,1,OUString(' '));
}
- (_rJoin += C_AND) += BuildJoinCriteria(_xConnection,pData->GetConnLineDataList(),pData);
+ (_rJoin += C_AND) += BuildJoinCriteria(_xConnection,&pData->GetConnLineDataList(),pData);
if(bBrace)
_rJoin += ")";
_pEntryConn->SetVisited(true);
@@ -413,7 +413,7 @@ namespace
if ( CROSS_JOIN != pData->GetJoinType() && !pData->isNatural() )
{
aErg += " ON ";
- aErg += BuildJoinCriteria(_xConnection,pData->GetConnLineDataList(),pData);
+ aErg += BuildJoinCriteria(_xConnection,&pData->GetConnLineDataList(),pData);
}
return aErg;
@@ -508,9 +508,9 @@ namespace
pEntryConn->SetVisited(true);
// first search for the "to" window
- const ::std::vector<OTableConnection*>* pConnections = pEntryConn->GetParent()->getTableConnections();
- ::std::vector<OTableConnection*>::const_iterator aIter = pConnections->begin();
- ::std::vector<OTableConnection*>::const_iterator aEnd = pConnections->end();
+ const ::std::vector<OTableConnection*>& rConnections = pEntryConn->GetParent()->getTableConnections();
+ ::std::vector<OTableConnection*>::const_iterator aIter = rConnections.begin();
+ ::std::vector<OTableConnection*>::const_iterator aEnd = rConnections.end();
for(;aIter != aEnd;++aIter)
{
OQueryTableConnection* pNext = static_cast<OQueryTableConnection*>(*aIter);
@@ -528,7 +528,7 @@ namespace
if(aIter == aEnd)
{
OQueryTableWindow* pEntryTabFrom = static_cast<OQueryTableWindow*>(pEntryConn->GetSourceWin());
- aIter = pConnections->begin();
+ aIter = rConnections.begin();
for(;aIter != aEnd;++aIter)
{
OQueryTableConnection* pNext = static_cast<OQueryTableConnection*>(*aIter);
@@ -636,7 +636,7 @@ namespace
const Reference< XDatabaseMetaData > xMetaData = xConnection->getMetaData();
const OUString aQuote = xMetaData->getIdentifierQuoteString();
- OJoinTableView::OTableWindowMap* pTabList = _pView->getTableView()->GetTabWinMap();
+ OJoinTableView::OTableWindowMap& rTabList = _pView->getTableView()->GetTabWinMap();
const static OUString sFieldSeparator(", ");
const static OUString s_sAs(" AS ");
@@ -660,8 +660,8 @@ namespace
{
// we have to look if we have alias.* here but before we have to check if the column doesn't already exist
OTableFieldDescRef aInfo = new OTableFieldDesc();
- OJoinTableView::OTableWindowMap::iterator tableIter = pTabList->begin();
- OJoinTableView::OTableWindowMap::iterator tableEnd = pTabList->end();
+ OJoinTableView::OTableWindowMap::iterator tableIter = rTabList.begin();
+ OJoinTableView::OTableWindowMap::iterator tableEnd = rTabList.end();
bool bFound = false;
for(;!bFound && tableIter != tableEnd ;++tableIter)
{
@@ -995,7 +995,7 @@ namespace
{
if(!_rJoinCrit.isEmpty())
_rJoinCrit += C_AND;
- _rJoinCrit += BuildJoinCriteria(_xConnection,pEntryConnData->GetConnLineDataList(),pEntryConnData);
+ _rJoinCrit += BuildJoinCriteria(_xConnection,&pEntryConnData->GetConnLineDataList(),pEntryConnData);
}
}
}
@@ -1532,9 +1532,9 @@ namespace
OSQLParseNode* pParamNode = pFunction->getChild(pFunction->count()-2);
if ( pParamNode && pParamNode->getTokenValue().toChar() == '*' )
{
- OJoinTableView::OTableWindowMap* pTabList = _pView->getTableView()->GetTabWinMap();
- OJoinTableView::OTableWindowMap::iterator aIter = pTabList->begin();
- OJoinTableView::OTableWindowMap::iterator aTabEnd = pTabList->end();
+ OJoinTableView::OTableWindowMap& rTabList = _pView->getTableView()->GetTabWinMap();
+ OJoinTableView::OTableWindowMap::iterator aIter = rTabList.begin();
+ OJoinTableView::OTableWindowMap::iterator aTabEnd = rTabList.end();
for(;aIter != aTabEnd;++aIter)
{
OQueryTableWindow* pTabWin = static_cast<OQueryTableWindow*>(aIter->second);
@@ -1606,9 +1606,9 @@ namespace
true));
if ( pConn )
{
- OConnectionLineDataVec* pLineDataList = pConn->GetData()->GetConnLineDataList();
- OConnectionLineDataVec::iterator aIter = pLineDataList->begin();
- OConnectionLineDataVec::iterator aEnd = pLineDataList->end();
+ OConnectionLineDataVec& rLineDataList = pConn->GetData()->GetConnLineDataList();
+ OConnectionLineDataVec::iterator aIter = rLineDataList.begin();
+ OConnectionLineDataVec::iterator aEnd = rLineDataList.end();
for(;aIter != aEnd;++aIter)
{
if((*aIter)->GetSourceFieldName() == aDragLeft->GetField() ||
@@ -2022,7 +2022,7 @@ namespace
}
// now delete the data for which we haven't any tablewindow
- OJoinTableView::OTableWindowMap aTableMap(*pTableView->GetTabWinMap());
+ OJoinTableView::OTableWindowMap aTableMap(pTableView->GetTabWinMap());
OJoinTableView::OTableWindowMap::iterator aIterTableMap = aTableMap.begin();
OJoinTableView::OTableWindowMap::iterator aIterTableEnd = aTableMap.end();
for(;aIterTableMap != aIterTableEnd;++aIterTableMap)
@@ -2056,7 +2056,7 @@ namespace
rController.setLimit(-1);
}
- if ( (eErrorCode = InstallFields(_pView,pParseTree, pTableView->GetTabWinMap())) == eOk )
+ if ( (eErrorCode = InstallFields(_pView, pParseTree, &pTableView->GetTabWinMap())) == eOk )
{
// GetSelectionCriteria must be called before GetHavingCriteria
sal_uInt16 nLevel=0;
@@ -2735,11 +2735,11 @@ void OQueryDesignView::fillValidFields(const OUString& sAliasName, ComboBox* pFi
bool bAllTables = sAliasName.isEmpty();
- OJoinTableView::OTableWindowMap* pTabWins = m_pTableView->GetTabWinMap();
+ OJoinTableView::OTableWindowMap& rTabWins = m_pTableView->GetTabWinMap();
OUString strCurrentPrefix;
::std::vector< OUString> aFields;
- OJoinTableView::OTableWindowMap::iterator aIter = pTabWins->begin();
- OJoinTableView::OTableWindowMap::iterator aEnd = pTabWins->end();
+ OJoinTableView::OTableWindowMap::iterator aIter = rTabWins.begin();
+ OJoinTableView::OTableWindowMap::iterator aEnd = rTabWins.end();
for(;aIter != aEnd;++aIter)
{
OQueryTableWindow* pCurrentWin = static_cast<OQueryTableWindow*>(aIter->second);
@@ -2831,8 +2831,8 @@ OUString OQueryDesignView::getStatement()
return OUString();
}
- OQueryTableView::OTableWindowMap* pTabList = m_pTableView->GetTabWinMap();
- sal_uInt32 nTabcount = pTabList->size();
+ OQueryTableView::OTableWindowMap& rTabList = m_pTableView->GetTabWinMap();
+ sal_uInt32 nTabcount = rTabList.size();
OUString aFieldListStr(GenerateSelectList(this,rFieldList,nTabcount>1));
if( aFieldListStr.isEmpty() )
@@ -2844,9 +2844,9 @@ OUString OQueryDesignView::getStatement()
// and trigger a error message
// ----------------- Build table list ----------------------
- const ::std::vector<OTableConnection*>* pConnList = m_pTableView->getTableConnections();
+ const ::std::vector<OTableConnection*>& rConnList = m_pTableView->getTableConnections();
Reference< XConnection> xConnection = rController.getConnection();
- OUString aTableListStr(GenerateFromClause(xConnection,pTabList,pConnList));
+ OUString aTableListStr(GenerateFromClause(xConnection,&rTabList,&rConnList));
OSL_ENSURE(!aTableListStr.isEmpty(), "OQueryDesignView::getStatement() : unexpected : have Fields, but no Tables !");
// if fields exist now, these only can be created by inserting from an already existing table; if on the other hand
// a table is deleted, also the belonging fields will be deleted -> therefore it CANNOT occur that fields
@@ -2858,7 +2858,7 @@ OUString OQueryDesignView::getStatement()
return OUString();
OUString aJoinCrit;
- GenerateInnerJoinCriterias(xConnection,aJoinCrit,pConnList);
+ GenerateInnerJoinCriterias(xConnection,aJoinCrit,&rConnList);
if(!aJoinCrit.isEmpty())
{
OUString aTmp = "( " + aJoinCrit + " )";
@@ -2990,7 +2990,7 @@ bool OQueryDesignView::isSlotEnabled(sal_Int32 _nSlotId)
void OQueryDesignView::SaveUIConfig()
{
OQueryController& rCtrl = static_cast<OQueryController&>(getController());
- rCtrl.SaveTabWinsPosSize( m_pTableView->GetTabWinMap(), m_pScrollWindow->GetHScrollBar()->GetThumbPos(), m_pScrollWindow->GetVScrollBar()->GetThumbPos() );
+ rCtrl.SaveTabWinsPosSize( &m_pTableView->GetTabWinMap(), m_pScrollWindow->GetHScrollBar().GetThumbPos(), m_pScrollWindow->GetVScrollBar().GetThumbPos() );
rCtrl.setVisibleRows( m_pSelectionBox->GetNoneVisibleRows() );
if ( m_aSplitter.GetSplitPosPixel() != 0 )
rCtrl.setSplitPos( m_aSplitter.GetSplitPosPixel() );
diff --git a/dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.cxx b/dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.cxx
index 7b0eaed..e7a0a59 100644
--- a/dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.cxx
+++ b/dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.cxx
@@ -23,7 +23,7 @@
using namespace dbaui;
void OJoinMoveTabWinUndoAct::TogglePosition()
{
- Point ptFrameScrollPos(m_pOwner->GetHScrollBar()->GetThumbPos(), m_pOwner->GetVScrollBar()->GetThumbPos());
+ Point ptFrameScrollPos(m_pOwner->GetHScrollBar().GetThumbPos(), m_pOwner->GetVScrollBar().GetThumbPos());
Point ptNext = m_pTabWin->GetPosPixel() + ptFrameScrollPos;
m_pTabWin->SetPosPixel(m_ptNextPosition - ptFrameScrollPos);
diff --git a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx
index 33df8ff..22c9921 100644
--- a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx
+++ b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx
@@ -54,7 +54,7 @@ namespace dbaui
// access to the managed connections
sal_uInt16 ConnCount() { return (sal_uInt16)m_vTableConnection.size(); }
- ::std::vector<OTableConnection*>* GetTabConnList() { return &m_vTableConnection; }
+ ::std::vector<OTableConnection*>& GetTabConnList() { return m_vTableConnection; }
void InsertConnection( OTableConnection* pConnection ) { m_vTableConnection.push_back(pConnection); }
void RemoveConnection( OTableConnection* pConnection )
diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx
index 68b0550..4626706 100644
--- a/dbaccess/source/ui/querydesign/QueryTableView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx
@@ -118,7 +118,7 @@ namespace
{
OQueryTableConnectionData* pData = static_cast< OQueryTableConnectionData*>(_pConnectionData.get());
- DlgQryJoin aDlg(_pView,_pConnectionData,_pView->GetTabWinMap(),_pView->getDesignView()->getController().getConnection(),_bSelectableTables);
+ DlgQryJoin aDlg(_pView,_pConnectionData,&_pView->GetTabWinMap(),_pView->getDesignView()->getController().getConnection(),_bSelectableTables);
bool bOk = aDlg.Execute() == RET_OK;
if( bOk )
{
@@ -236,11 +236,11 @@ sal_Int32 OQueryTableView::CountTableAlias(const OUString& rName, sal_Int32& rMa
{
sal_Int32 nRet = 0;
- OTableWindowMap::iterator aIter = GetTabWinMap()->find(rName);
- while(aIter != GetTabWinMap()->end())
+ OTableWindowMap::iterator aIter = GetTabWinMap().find(rName);
+ while(aIter != GetTabWinMap().end())
{
- OUString aNewName = OUString(rName) + "_" + OUString::number(++nRet);
- aIter = GetTabWinMap()->find(aNewName);
+ OUString aNewName = rName + "_" + OUString::number(++nRet);
+ aIter = GetTabWinMap().find(aNewName);
}
rMax = nRet;
@@ -250,17 +250,17 @@ sal_Int32 OQueryTableView::CountTableAlias(const OUString& rName, sal_Int32& rMa
void OQueryTableView::ReSync()
{
- TTableWindowData* pTabWinDataList = m_pView->getController().getTableWindowData();
- OSL_ENSURE((getTableConnections()->size()==0) && (GetTabWinMap()->size()==0),
+ TTableWindowData& rTabWinDataList = m_pView->getController().getTableWindowData();
+ OSL_ENSURE((getTableConnections().size()==0) && (GetTabWinMap().size()==0),
"before calling OQueryTableView::ReSync() please call ClearAll !");
// I need a collection of all window names that cannot be created so that I do not initialize connections for them.
::std::vector<OUString> arrInvalidTables;
- TTableWindowData::reverse_iterator aIter = pTabWinDataList->rbegin();
+ TTableWindowData::reverse_iterator aIter = rTabWinDataList.rbegin();
// Create the window and add it
- for(;aIter != pTabWinDataList->rend();++aIter)
+ for(;aIter != rTabWinDataList.rend();++aIter)
{
OQueryTableWindowData* pData = static_cast<OQueryTableWindowData*>(aIter->get());
OTableWindow* pTabWin = createWindow(*aIter);
@@ -276,11 +276,11 @@ void OQueryTableView::ReSync()
delete pTabWin;
arrInvalidTables.push_back(pData->GetAliasName());
- pTabWinDataList->erase( ::std::remove(pTabWinDataList->begin(),pTabWinDataList->end(),*aIter) ,pTabWinDataList->end());
+ rTabWinDataList.erase( ::std::remove(rTabWinDataList.begin(), rTabWinDataList.end(), *aIter), rTabWinDataList.end());
continue;
}
- (*GetTabWinMap())[pData->GetAliasName()] = pTabWin; // add at the beginning as I am going backwards through the DataList
+ GetTabWinMap()[pData->GetAliasName()] = pTabWin; // add at the beginning as I am going backwards through the DataList
// Use the default if there is no position or size
if (!pData->HasPosition() && !pData->HasSize())
SetDefaultTabWinPosSize(pTabWin);
@@ -289,10 +289,10 @@ void OQueryTableView::ReSync()
}
// Add the connections
- TTableConnectionData* pTabConnDataList = m_pView->getController().getTableConnectionData();
- TTableConnectionData::reverse_iterator aConIter = pTabConnDataList->rbegin();
+ TTableConnectionData& rTabConnDataList = m_pView->getController().getTableConnectionData();
+ TTableConnectionData::reverse_iterator aConIter = rTabConnDataList.rbegin();
- for(;aConIter != pTabConnDataList->rend();++aConIter)
+ for(;aConIter != rTabConnDataList.rend();++aConIter)
{
OQueryTableConnectionData* pTabConnData = static_cast<OQueryTableConnectionData*>(aConIter->get());
@@ -305,7 +305,7 @@ void OQueryTableView::ReSync()
if (bInvalid)
{
// no -> bad luck, no connection
- pTabConnDataList->erase( ::std::remove(pTabConnDataList->begin(),pTabConnDataList->end(),*aConIter) ,pTabConnDataList->end());
+ rTabConnDataList.erase( ::std::remove(rTabConnDataList.begin(), rTabConnDataList.end(), *aConIter), rTabConnDataList.end());
continue;
}
@@ -331,15 +331,15 @@ void OQueryTableView::NotifyTabConnection(const OQueryTableConnection& rNewConn,
{
// let's first check if I have the connection already
OQueryTableConnection* pTabConn = NULL;
- const ::std::vector<OTableConnection*>* pConnections = getTableConnections();
- ::std::vector<OTableConnection*>::const_iterator aEnd = pConnections->end();
- ::std::vector<OTableConnection*>::const_iterator aIter = ::std::find( pConnections->begin(),
+ const ::std::vector<OTableConnection*>& rConnections = getTableConnections();
+ ::std::vector<OTableConnection*>::const_iterator aEnd = rConnections.end();
+ ::std::vector<OTableConnection*>::const_iterator aIter = ::std::find( rConnections.begin(),
aEnd,
static_cast<const OTableConnection*>(&rNewConn)
);
if(aIter == aEnd )
{
- aIter = pConnections->begin();
+ aIter = rConnections.begin();
for(;aIter != aEnd;++aIter)
{
if(*static_cast<OQueryTableConnection*>(*aIter) == rNewConn)
@@ -445,9 +445,9 @@ void OQueryTableView::AddTabWin(const OUString& _rComposedName, const OUString&
// first check if this already has its data
bool bAppend = bNewTable;
TTableWindowData::value_type pNewTabWinData;
- TTableWindowData* pWindowData = getDesignView()->getController().getTableWindowData();
- TTableWindowData::iterator aWinIter = pWindowData->begin();
- TTableWindowData::iterator aWinEnd = pWindowData->end();
+ TTableWindowData& rWindowData = getDesignView()->getController().getTableWindowData();
+ TTableWindowData::iterator aWinIter = rWindowData.begin();
+ TTableWindowData::iterator aWinEnd = rWindowData.end();
for(;aWinIter != aWinEnd;++aWinIter)
{
pNewTabWinData = *aWinIter;
@@ -479,8 +479,8 @@ void OQueryTableView::AddTabWin(const OUString& _rComposedName, const OUString&
}
// Show the relations between the individual tables
- OTableWindowMap* pTabWins = GetTabWinMap();
- if(bNewTable && !pTabWins->empty() && !_rTableName.isEmpty())
+ OTableWindowMap& rTabWins = GetTabWinMap();
+ if(bNewTable && !rTabWins.empty() && !_rTableName.isEmpty())
{
modified();
if ( m_pAccessible )
@@ -523,11 +523,11 @@ void OQueryTableView::AddTabWin(const OUString& _rComposedName, const OUString&
xProp->getPropertyValue(PROPERTY_REFERENCEDTABLE) >>= aReferencedTable;
OSL_ENSURE(!aReferencedTable.isEmpty(),"Foreign key without referencedTableName");
- OTableWindowMap::const_iterator aIter = pTabWins->find(aReferencedTable);
- OTableWindowMap::const_iterator aEnd = pTabWins->end();
+ OTableWindowMap::const_iterator aIter = rTabWins.find(aReferencedTable);
+ OTableWindowMap::const_iterator aEnd = rTabWins.end();
if(aIter == aEnd)
{
- for(aIter = pTabWins->begin();aIter != aEnd;++aIter)
+ for(aIter = rTabWins.begin();aIter != aEnd;++aIter)
{
OQueryTableWindow* pTabWinTmp = static_cast<OQueryTableWindow*>(aIter->second);
OSL_ENSURE( pTabWinTmp,"TableWindow is null!" );
@@ -543,8 +543,8 @@ void OQueryTableView::AddTabWin(const OUString& _rComposedName, const OUString&
case KeyType::PRIMARY:
{
// we have a primary key so look in our list if there exists a key which this is referred to
- OTableWindowMap::const_iterator aIter = pTabWins->begin();
- OTableWindowMap::const_iterator aEnd = pTabWins->end();
+ OTableWindowMap::const_iterator aIter = rTabWins.begin();
+ OTableWindowMap::const_iterator aEnd = rTabWins.end();
for(;aIter != aEnd;++aIter)
{
OQueryTableWindow* pTabWinTmp = static_cast<OQueryTableWindow*>(aIter->second);
@@ -659,9 +659,9 @@ void OQueryTableView::createNewConnection()
TTableConnectionData::value_type pData(new OQueryTableConnectionData());
if( openJoinDialog(this,pData,true) )
{
- OTableWindowMap* pMap = GetTabWinMap();
- OQueryTableWindow* pSourceWin = static_cast< OQueryTableWindow*>((*pMap)[pData->getReferencingTable()->GetWinName()]);
- OQueryTableWindow* pDestWin = static_cast< OQueryTableWindow*>((*pMap)[pData->getReferencedTable()->GetWinName()]);
+ OTableWindowMap& rMap = GetTabWinMap();
+ OQueryTableWindow* pSourceWin = static_cast< OQueryTableWindow*>(rMap[pData->getReferencingTable()->GetWinName()]);
+ OQueryTableWindow* pDestWin = static_cast< OQueryTableWindow*>(rMap[pData->getReferencedTable()->GetWinName()]);
// first we have to look if the this connection already exists
OTableConnection* pConn = GetTabConn(pSourceWin,pDestWin,true);
bool bNew = true;
@@ -706,8 +706,8 @@ OQueryTableWindow* OQueryTableView::FindTable(const OUString& rAliasName)
{
OSL_ENSURE(!rAliasName.isEmpty(), "OQueryTableView::FindTable : the AliasName should not be empty !");
// (it is harmless but does not make sense and indicates that there is probably an error in the caller)
- OTableWindowMap::const_iterator aIter = GetTabWinMap()->find(rAliasName);
- if(aIter != GetTabWinMap()->end())
+ OTableWindowMap::const_iterator aIter = GetTabWinMap().find(rAliasName);
+ if(aIter != GetTabWinMap().end())
return static_cast<OQueryTableWindow*>(aIter->second);
return NULL;
}
@@ -715,8 +715,8 @@ OQueryTableWindow* OQueryTableView::FindTable(const OUString& rAliasName)
bool OQueryTableView::FindTableFromField(const OUString& rFieldName, OTableFieldDescRef& rInfo, sal_uInt16& rCnt)
{
rCnt = 0;
- OTableWindowMap::const_iterator aIter = GetTabWinMap()->begin();
- OTableWindowMap::const_iterator aEnd = GetTabWinMap()->end();
+ OTableWindowMap::const_iterator aIter = GetTabWinMap().begin();
+ OTableWindowMap::const_iterator aEnd = GetTabWinMap().end();
for(;aIter != aEnd;++aIter)
{
if(static_cast<OQueryTableWindow*>(aIter->second)->ExistsField(rFieldName, rInfo))
@@ -728,11 +728,10 @@ bool OQueryTableView::FindTableFromField(const OUString& rFieldName, OTableField
bool OQueryTableView::ContainsTabWin(const OTableWindow& rTabWin)
{
- OTableWindowMap* pTabWins = GetTabWinMap();
- OSL_ENSURE(pTabWins != NULL, "OQueryTableView::RemoveTabWin : Window should not be NULL !");
+ OTableWindowMap& rTabWins = GetTabWinMap();
- OTableWindowMap::iterator aIter = pTabWins->begin();
- OTableWindowMap::iterator aEnd = pTabWins->end();
+ OTableWindowMap::iterator aIter = rTabWins.begin();
+ OTableWindowMap::iterator aEnd = rTabWins.end();
for ( ;aIter != aEnd ; ++aIter )
{
@@ -808,74 +807,70 @@ void OQueryTableView::DropConnection(OQueryTableConnection* pConn)
void OQueryTableView::HideTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUndoAct* pUndoAction )
{
- OTableWindowMap* pTabWins = GetTabWinMap();
- OSL_ENSURE(pTabWins != NULL, "OQueryTableView::HideTabWin : have no TabWins !");
-
- if (pTabWin)
- {
- // Window
- // save the position in its data
- getDesignView()->SaveTabWinUIConfig(pTabWin);
- // (I need to go via the parent, as only the parent knows the position of the scrollbars)
- // and then out of the TabWins list and hide
- OTableWindowMap::iterator aIter = pTabWins->begin();
- OTableWindowMap::iterator aEnd = pTabWins->end();
- for ( ;aIter != aEnd ; ++aIter )
- if ( aIter->second == pTabWin )
- {
- pTabWins->erase( aIter );
- break;
- }
+ OTableWindowMap& rTabWins = GetTabWinMap();
+
+ // Window
+ // save the position in its data
+ getDesignView()->SaveTabWinUIConfig(pTabWin);
+ // (I need to go via the parent, as only the parent knows the position of the scrollbars)
+ // and then out of the TabWins list and hide
+ OTableWindowMap::iterator aIter = rTabWins.begin();
+ OTableWindowMap::iterator aEnd = rTabWins.end();
+ for ( ;aIter != aEnd ; ++aIter )
+ if ( aIter->second == pTabWin )
+ {
+ rTabWins.erase( aIter );
+ break;
+ }
- pTabWin->Hide(); // do not destroy it, as it is still in the undo list!!
+ pTabWin->Hide(); // do not destroy it, as it is still in the undo list!!
- // the TabWin data must also be passed out of my responsibility
- TTableWindowData* pTabWinDataList = m_pView->getController().getTableWindowData();
- pTabWinDataList->erase( ::std::remove(pTabWinDataList->begin(),pTabWinDataList->end(),pTabWin->GetData()),pTabWinDataList->end());
- // The data should not be destroyed as TabWin itself - which is still alive - needs them
- // Either it goes back into my responsibility, (via ShowTabWin), then I add the data back,
- // or the Undo-Action, which currently has full responsibility for the window
- // and its data, gets destroyed and destroys both the window and its data
+ // the TabWin data must also be passed out of my responsibility
+ TTableWindowData& rTabWinDataList = m_pView->getController().getTableWindowData();
+ rTabWinDataList.erase( ::std::remove(rTabWinDataList.begin(), rTabWinDataList.end(), pTabWin->GetData()), rTabWinDataList.end());
+ // The data should not be destroyed as TabWin itself - which is still alive - needs them
+ // Either it goes back into my responsibility, (via ShowTabWin), then I add the data back,
+ // or the Undo-Action, which currently has full responsibility for the window
+ // and its data, gets destroyed and destroys both the window and its data
- if (m_pLastFocusTabWin == pTabWin)
- m_pLastFocusTabWin = NULL;
+ if (m_pLastFocusTabWin == pTabWin)
+ m_pLastFocusTabWin = NULL;
- // collect connections belonging to the window and pass to UndoAction
- sal_Int16 nCnt = 0;
- const ::std::vector<OTableConnection*>* pTabConList = getTableConnections();
- ::std::vector<OTableConnection*>::const_iterator aIter2 = pTabConList->begin();
- for(;aIter2 != pTabConList->end();)// the end may change
+ // collect connections belonging to the window and pass to UndoAction
+ sal_Int16 nCnt = 0;
+ const ::std::vector<OTableConnection*>& rTabConList = getTableConnections();
+ ::std::vector<OTableConnection*>::const_iterator aIter2 = rTabConList.begin();
+ for(;aIter2 != rTabConList.end();)// the end may change
+ {
+ OQueryTableConnection* pTmpEntry = static_cast<OQueryTableConnection*>(*aIter2);
+ OSL_ENSURE(pTmpEntry,"OQueryTableConnection is null!");
+ if( pTmpEntry->GetAliasName(JTCS_FROM) == pTabWin->GetAliasName() ||
+ pTmpEntry->GetAliasName(JTCS_TO) == pTabWin->GetAliasName() )
{
- OQueryTableConnection* pTmpEntry = static_cast<OQueryTableConnection*>(*aIter2);
- OSL_ENSURE(pTmpEntry,"OQueryTableConnection is null!");
- if( pTmpEntry->GetAliasName(JTCS_FROM) == pTabWin->GetAliasName() ||
- pTmpEntry->GetAliasName(JTCS_TO) == pTabWin->GetAliasName() )
- {
- // add to undo list
- pUndoAction->InsertConnection(pTmpEntry);
-
- // call base class because we append an undo action
- // but this time we are in a undo action list
- OJoinTableView::RemoveConnection(pTmpEntry,sal_False);
- aIter2 = pTabConList->begin();
- ++nCnt;
- }
- else
- ++aIter2;
+ // add to undo list
+ pUndoAction->InsertConnection(pTmpEntry);
+
+ // call base class because we append an undo action
+ // but this time we are in a undo action list
+ OJoinTableView::RemoveConnection(pTmpEntry,sal_False);
+ aIter2 = rTabConList.begin();
+ ++nCnt;
}
+ else
+ ++aIter2;
+ }
- if (nCnt)
- InvalidateConnections();
+ if (nCnt)
+ InvalidateConnections();
- m_pView->getController().InvalidateFeature(ID_BROWSER_ADDTABLE);
+ m_pView->getController().InvalidateFeature(ID_BROWSER_ADDTABLE);
- // inform the UndoAction that the window and connections belong to it
- pUndoAction->SetOwnership(true);
+ // inform the UndoAction that the window and connections belong to it
+ pUndoAction->SetOwnership(true);
- // by doing so, we have modified the document
- m_pView->getController().setModified( sal_True );
- m_pView->getController().InvalidateFeature(SID_BROWSER_CLEAR_QUERY);
- }
+ // by doing so, we have modified the document
+ m_pView->getController().setModified( sal_True );
+ m_pView->getController().InvalidateFeature(SID_BROWSER_CLEAR_QUERY);
}
bool OQueryTableView::ShowTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUndoAct* pUndoAction, bool _bAppend )
@@ -901,8 +896,8 @@ bool OQueryTableView::ShowTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUndoAc
// Show the window and add to the list
OUString sName = static_cast< OQueryTableWindowData*>(pData.get())->GetAliasName();
- OSL_ENSURE(GetTabWinMap()->find(sName) == GetTabWinMap()->end(),"Alias name already in list!");
- GetTabWinMap()->insert(OTableWindowMap::value_type(sName,pTabWin));
+ OSL_ENSURE(GetTabWinMap().find(sName) == GetTabWinMap().end(),"Alias name already in list!");
+ GetTabWinMap().insert(OTableWindowMap::value_type(sName,pTabWin));
pTabWin->Show();
@@ -913,18 +908,18 @@ bool OQueryTableView::ShowTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUndoAc
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list