[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang dbaccess/source editeng/source i18npool/source include/editeng include/sfx2 include/svl include/svx include/vcl sc/inc sc/source sd/so

2023-06-29 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/unusedmethods.results|  308 ++
 compilerplugins/clang/unusedmethods.unused-returns.results |   34 -
 dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx  |8 
 dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx  |2 
 editeng/source/outliner/outlin2.cxx|5 
 i18npool/source/localedata/LocaleNode.hxx  |1 
 i18npool/source/localedata/filewriter.cxx  |5 
 include/editeng/outliner.hxx   |1 
 include/sfx2/thumbnailviewitem.hxx |2 
 include/svl/SfxBroadcaster.hxx |4 
 include/svx/svdview.hxx|2 
 include/vcl/menubarupdateicon.hxx  |   93 ---
 sc/inc/scmod.hxx   |2 
 sc/inc/table.hxx   |2 
 sc/source/core/data/table5.cxx |   42 -
 sc/source/ui/app/scmod.cxx |   22 
 sc/source/ui/drawfunc/fusel2.cxx   |   10 
 sc/source/ui/inc/fusel.hxx |2 
 sd/source/ui/inc/DrawViewShell.hxx |1 
 sd/source/ui/inc/SlideSorter.hxx   |2 
 sd/source/ui/slidesorter/shell/SlideSorter.cxx |7 
 sd/source/ui/view/drviews1.cxx |   10 
 sfx2/source/control/thumbnailviewitem.cxx  |5 
 svgio/inc/svgstyleattributes.hxx   |6 
 svgio/source/svgreader/svgstyleattributes.cxx  |   90 +--
 svl/source/notify/SfxBroadcaster.cxx   |   12 
 sw/inc/ndgrf.hxx   |4 
 sw/inc/swmodule.hxx|2 
 sw/source/core/graphic/ndgrf.cxx   |   15 
 sw/source/uibase/app/apphdl.cxx|   20 
 sw/source/uibase/inc/shdwcrsr.hxx  |2 
 sw/source/uibase/utlui/shdwcrsr.cxx|   21 
 vcl/inc/bitmap/BitmapWriteAccess.hxx   |7 
 vcl/inc/svdata.hxx |2 
 vcl/inc/unx/saldisp.hxx|1 
 vcl/source/app/svapp.cxx   |   17 
 vcl/source/window/bubblewindow.cxx |  374 -
 vcl/unx/generic/app/saldisp.cxx|  104 ---
 38 files changed, 222 insertions(+), 1025 deletions(-)

New commits:
commit 74cd0d0b281f8df75612bfb600df2eae62c4d21d
Author: Noel Grandin 
AuthorDate: Thu Jun 29 13:53:30 2023 +0200
Commit: Noel Grandin 
CommitDate: Thu Jun 29 17:34:00 2023 +0200

loplugin:unusedmethods

Change-Id: I95ab7581dec35b113cb657ce8e5ee27c89c73593
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153746
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/compilerplugins/clang/unusedmethods.results 
b/compilerplugins/clang/unusedmethods.results
index fcda4538fe36..4296a0144afd 100644
--- a/compilerplugins/clang/unusedmethods.results
+++ b/compilerplugins/clang/unusedmethods.results
@@ -1,7 +1,5 @@
 basegfx/source/range/b2drangeclipper.cxx:686
 type-parameter-?-? basegfx::(anonymous 
namespace)::eraseFromList(type-parameter-?-? &,const type-parameter-?-? &)
-basegfx/test/boxclipper.hxx:28
-double basegfx2d::getRandomOrdinal(const unsigned long)
 basic/source/inc/buffer.hxx:40
 void SbiBuffer::operator+=(signed char)
 basic/source/inc/buffer.hxx:41
@@ -134,20 +132,14 @@ cui/source/inc/GraphicsTestsDialog.hxx:48
 void GraphicsTestsDialog::HandleResultViewRequest(weld::Button &)
 cui/source/inc/GraphicsTestsDialog.hxx:48
 void GraphicsTestsDialog::LinkStubHandleResultViewRequest(void 
*,weld::Button &)
-cui/source/inc/optdict.hxx:92
-_Bool SvxEditDictionaryDialog::InsertTextHdl(SvxEditDictionaryDialog 
*,rtl::OUString &)
-cui/source/inc/optdict.hxx:92
-_Bool SvxEditDictionaryDialog::LinkStubInsertTextHdl(void *,rtl::OUString 
&)
 cui/source/inc/SvxNotebookbarConfigPage.hxx:40
 void SvxNotebookbarConfigPage::SetElement()
 dbaccess/source/filter/hsqldb/fbalterparser.hxx:19
 void dbahsql::FbAlterStmtParser::ensureProperTableLengths() const
 dbaccess/source/filter/hsqldb/parseschema.hxx:80
 const std::map > & 
dbahsql::SchemaParser::getPrimaryKeys() const
-dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx:235
-void dbaui::OPostgresConnectionPageSetup::LinkStubOnEditModified(void 
*,weld::Entry &)
-dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx:264
-rtl::OUString dbaui::OPostgresConnectionPageSetup::getURLNoPrefix() const
+dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx:252
+rtl::OUString dbaui::OPostgresConnectionPageSetup::impl_getURL() const
 

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang dbaccess/source sd/source sfx2/source svx/source sw/source

2023-06-29 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/test/unusedfields.cxx   |   44 ++
 compilerplugins/clang/unusedfields.cxx|   44 +++---
 dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx |1 
 sd/source/filter/eppt/pptx-animations-nodectx.cxx |5 -
 sd/source/filter/eppt/pptx-animations-nodectx.hxx |1 
 sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx |3 
 sd/source/ui/slidesorter/controller/SlsProperties.cxx |3 
 sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx  |   18 
 sd/source/ui/slidesorter/inc/controller/SlsProperties.hxx |6 -
 sfx2/source/control/recentdocsviewitem.cxx|3 
 sfx2/source/control/recentdocsviewitem.hxx|1 
 svx/source/dialog/framelinkarray.cxx  |5 -
 sw/source/uibase/docvw/edtwin.cxx |3 
 sw/source/uibase/inc/shdwcrsr.hxx |5 -
 14 files changed, 88 insertions(+), 54 deletions(-)

New commits:
commit 3d24564ef01396f1a66dcd971f11e34d84d65d7d
Author: Noel Grandin 
AuthorDate: Thu Jun 29 13:01:07 2023 +0200
Commit: Noel Grandin 
CommitDate: Thu Jun 29 17:33:40 2023 +0200

mbIsUIReadOnly is dead

after I removed SetUIReadOnly in
commit e2c7a6bd572644b928704f6cb3696b568ac0aba1
loplugin::unusedmethods

and that was dead because of
commit cb32938d572777c9a5d75007cc76ba50c5a698eb
[API CHANGE] remove unused SlideSorterService

Change-Id: Ib0e170794e0f448b094b3d1ca5d309deab4c1bf7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153744
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx 
b/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx
index f447c565639e..b635accc5535 100644
--- a/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx
@@ -74,9 +74,6 @@ void DragAndDropContext::UpdatePosition (
 if (mpTargetSlideSorter == nullptr)
 return;
 
-if (mpTargetSlideSorter->GetProperties()->IsUIReadOnly())
-return;
-
 // Convert window coordinates into model coordinates (we need the
 // window coordinates for auto-scrolling because that remains
 // constant while scrolling.)
diff --git a/sd/source/ui/slidesorter/controller/SlsProperties.cxx 
b/sd/source/ui/slidesorter/controller/SlsProperties.cxx
index 908f3031d2be..cbe0d6e0ea7a 100644
--- a/sd/source/ui/slidesorter/controller/SlsProperties.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsProperties.cxx
@@ -25,8 +25,7 @@ namespace sd::slidesorter::controller {
 
 Properties::Properties()
 : 
maBackgroundColor(Application::GetSettings().GetStyleSettings().GetWindowColor()),
-  
maSelectionColor(Application::GetSettings().GetStyleSettings().GetHighlightColor()),
-  mbIsUIReadOnly(false)
+  
maSelectionColor(Application::GetSettings().GetStyleSettings().GetHighlightColor())
 {
 }
 
diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx 
b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
index 450fdd294a55..f8376ec409fd 100644
--- a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
@@ -466,9 +466,6 @@ bool SelectionFunction::KeyInput (const KeyEvent& rEvent)
 case KEY_DELETE:
 case KEY_BACKSPACE:
 {
-if (mrSlideSorter.GetProperties()->IsUIReadOnly())
-break;
-
 
mrController.GetSelectionManager()->DeleteSelectedPages(rCode.GetCode()==KEY_DELETE);
 
 mnShiftKeySelectionAnchor = -1;
@@ -560,10 +557,7 @@ void SelectionFunction::MoveFocus (
 
 void SelectionFunction::DoCut()
 {
-if ( ! mrSlideSorter.GetProperties()->IsUIReadOnly())
-{
-mrController.GetClipboard().DoCut();
-}
+mrController.GetClipboard().DoCut();
 }
 
 void SelectionFunction::DoCopy()
@@ -573,10 +567,7 @@ void SelectionFunction::DoCopy()
 
 void SelectionFunction::DoPaste()
 {
-if ( ! mrSlideSorter.GetProperties()->IsUIReadOnly())
-{
-mrController.GetClipboard().DoPaste();
-}
+mrController.GetClipboard().DoPaste();
 }
 
 bool SelectionFunction::cancel()
@@ -950,10 +941,7 @@ void SelectionFunction::ModeHandler::StartDrag (
 if (SD_MOD()->pTransferDrag != nullptr)
 return;
 
-if ( ! mrSlideSorter.GetProperties()->IsUIReadOnly())
-{
-mrSelectionFunction.SwitchToDragAndDropMode(rMousePosition);
-}
+mrSelectionFunction.SwitchToDragAndDropMode(rMousePosition);
 }
 
 //= NormalModeHandler =
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsProperties.hxx 
b/sd/source/ui/slidesorter/inc/controller/SlsProperties.hxx
index 

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang dbaccess/source drawinglayer/source emfio/source extensions/source filter/source include/rtl l10ntools/source oox/source sal/qa script

2020-11-10 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/test/xmlimport.cxx |   32 +++
 compilerplugins/clang/xmlimport.cxx  |   81 +++
 dbaccess/source/ui/dlg/dbwizsetup.cxx|6 -
 drawinglayer/source/tools/emfpfont.cxx   |   11 +-
 drawinglayer/source/tools/emfphelperdata.cxx |8 -
 drawinglayer/source/tools/emfppen.cxx|   31 +++
 drawinglayer/source/tools/emfpstringformat.cxx   |   43 +-
 emfio/source/reader/emfreader.cxx|2 
 extensions/source/ole/oleobjw.cxx|2 
 filter/source/msfilter/mstoolbar.cxx |2 
 include/rtl/string.hxx   |2 
 include/rtl/ustring.hxx  |2 
 l10ntools/source/localize.cxx|6 -
 oox/source/vml/vmldrawing.cxx|2 
 sal/qa/osl/file/osl_File.cxx |   24 ++---
 sc/source/filter/excel/xestream.cxx  |2 
 sc/source/ui/vba/vbaeventshelper.cxx |8 -
 scripting/source/dlgprov/dlgevtatt.cxx   |2 
 scripting/source/protocolhandler/scripthandler.cxx   |5 -
 scripting/source/provider/URIHelper.cxx  |4 
 scripting/source/vbaevents/eventhelper.cxx   |3 
 sd/qa/unit/tiledrendering/tiledrendering.cxx |2 
 sdext/source/minimizer/informationdialog.cxx |2 
 sdext/source/minimizer/optimizerdialogcontrols.cxx   |2 
 sw/qa/extras/tiledrendering/tiledrendering.cxx   |2 
 sw/source/ui/vba/vbaoptions.cxx  |2 
 unodevtools/source/skeletonmaker/cppcompskeleton.cxx |2 
 vbahelper/source/msforms/vbauserform.cxx |2 
 xmloff/source/text/txtfldi.cxx   |2 
 29 files changed, 204 insertions(+), 90 deletions(-)

New commits:
commit cc1e6ee2dd4609c27cb7a09aa47a779592a3e22c
Author: Noel Grandin 
AuthorDate: Tue Nov 10 14:41:56 2020 +0200
Commit: Noel Grandin 
CommitDate: Wed Nov 11 06:33:40 2020 +0100

disable O(U)String::concat for internal code

in favour of the more widely used, and better optimised, operator+

Change-Id: I6a1b37e0f3d253af1f7a0892443f59b620efea63
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105523
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx 
b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index 1dd342c12401..473c0d32ca34 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -751,7 +751,7 @@ bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
 createUniqueFolderName();
 sUrl = aDBPathURL.GetMainURL( 
INetURLObject::DecodeMechanism::NONE);
 xSimpleFileAccess->createFolder(sUrl);
-sUrl = eType.concat(sUrl);
+sUrl = eType + sUrl;
 }
 m_pOutSet->Put(SfxStringItem(DSID_CONNECTURL, sUrl));
 m_pImpl->saveChanges(*m_pOutSet);
@@ -817,7 +817,7 @@ bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
 if (bFolderExists)
 {
 i++;
-pURL->setName(sLastSegmentName.concat(OUString::number(i)));
+pURL->setName(sLastSegmentName + OUString::number(i));
 }
 }
 }
@@ -835,7 +835,7 @@ bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
 bElementExists = xSimpleFileAccess->exists( 
aExistenceCheck.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
 if ( bElementExists )
 {
-aExistenceCheck.setBase( BaseName.concat( OUString::number( i 
) ) );
+aExistenceCheck.setBase( BaseName + OUString::number( i ) );
 ++i;
 }
 }
diff --git a/drawinglayer/source/tools/emfpfont.cxx 
b/drawinglayer/source/tools/emfpfont.cxx
index f641fdd4d21b..609135460992 100644
--- a/drawinglayer/source/tools/emfpfont.cxx
+++ b/drawinglayer/source/tools/emfpfont.cxx
@@ -18,27 +18,28 @@
  */
 
 #include 
+#include 
 #include "emfpfont.hxx"
 
 namespace emfplushelper
 {
 static OUString FontStyleToString(sal_uInt32 style)
 {
-OUString sStyle;
+OUStringBuffer sStyle;
 
 if (style & FontStyleBold)
 sStyle = "\n\t\t\tFontStyleBold";
 
 if (style & FontStyleItalic)
-sStyle = sStyle.concat("\n\t\t\tFontStyleItalic");
+sStyle.append("\n\t\t\tFontStyleItalic");
 
 if (style & FontStyleUnderline)
-sStyle = sStyle.concat("\n\t\t\tFontStyleUnderline");
+sStyle.append("\n\t\t\tFontStyleUnderline");
 
 if (style & FontStyleStrikeout)
-sStyle = sStyle.concat("\n\t\t\tFontStyleStrikeout");
+sStyle.append("\n\t\t\tFontStyleStrikeout");
 
-return sStyle;
+return sStyle.makeStringAndClear();
 }
 
 void 

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang dbaccess/source

2019-10-22 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/virtualdead.unusedparams.results |   12 
 dbaccess/source/core/api/CacheSet.cxx  |   15 ---
 dbaccess/source/core/api/CacheSet.hxx  |3 ---
 dbaccess/source/core/api/KeySet.cxx|   17 +
 dbaccess/source/core/api/KeySet.hxx|5 -
 dbaccess/source/core/api/RowSetCache.cxx   |   16 
 dbaccess/source/core/api/querycontainer.cxx|2 +-
 dbaccess/source/core/api/tablecontainer.cxx|2 +-
 dbaccess/source/core/dataaccess/documentcontainer.cxx  |4 ++--
 dbaccess/source/core/inc/containerapprove.hxx  |7 +--
 dbaccess/source/core/inc/objectnameapproval.hxx|2 +-
 dbaccess/source/core/misc/objectnameapproval.cxx   |2 +-
 12 files changed, 16 insertions(+), 71 deletions(-)

New commits:
commit db90e072fa0d0fe6514361cc50273aaa47563478
Author: Noel Grandin 
AuthorDate: Fri Oct 18 15:53:57 2019 +0200
Commit: Noel Grandin 
CommitDate: Tue Oct 22 08:13:45 2019 +0200

loplugin:virtualdead unused params in OCacheSet

these methods do nothing except forward to their similar named variants,
so just remove them

Change-Id: I28d31bbe2c1e39fe5a9c2d7eaa9e14006213ab27
Reviewed-on: https://gerrit.libreoffice.org/81247
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/compilerplugins/clang/virtualdead.unusedparams.results 
b/compilerplugins/clang/virtualdead.unusedparams.results
index 99806442c261..fda3eaf9f698 100644
--- a/compilerplugins/clang/virtualdead.unusedparams.results
+++ b/compilerplugins/clang/virtualdead.unusedparams.results
@@ -37,15 +37,6 @@ chart2/source/controller/dialogs/ChangingResource.hxx:30
 chart2/source/controller/dialogs/ChartTypeDialogController.hxx:105
 void chart::ChartTypeDialogController::fillExtraControls(const class 
chart::ChartTypeParameter &,const class com::sun::star::uno::Reference &,const class 
com::sun::star::uno::Reference 
&,)const
 011
-dbaccess/source/core/api/CacheSet.hxx:174
-_Bool dbaccess::OCacheSet::previous_checked(_Bool,)
-0
-dbaccess/source/core/api/CacheSet.hxx:175
-_Bool dbaccess::OCacheSet::absolute_checked(int,_Bool,)
-10
-dbaccess/source/core/api/CacheSet.hxx:176
-_Bool dbaccess::OCacheSet::last_checked(_Bool,)
-0
 desktop/source/deployment/registry/inc/dp_backend.h:84
 void dp_registry::backend::Package::processPackage_(class 
osl::ResettableGuard &,_Bool,_Bool,const class 
rtl::Reference &,const class 
com::sun::star::uno::Reference 
&,)
 0
diff --git a/dbaccess/source/core/api/CacheSet.cxx 
b/dbaccess/source/core/api/CacheSet.cxx
index 62020e68d4db..59a9669e4db3 100644
--- a/dbaccess/source/core/api/CacheSet.cxx
+++ b/dbaccess/source/core/api/CacheSet.cxx
@@ -540,21 +540,6 @@ bool OCacheSet::previous(  )
 return m_xDriverSet->previous();
 }
 
-bool OCacheSet::last_checked( bool /*i_bFetchRow*/)
-{
-return last();
-}
-
-bool OCacheSet::previous_checked( bool /*i_bFetchRow*/ )
-{
-return previous();
-}
-
-bool OCacheSet::absolute_checked( sal_Int32 row,bool /*i_bFetchRow*/ )
-{
-return absolute(row);
-}
-
 void OCacheSet::refreshRow(  )
 {
 m_xDriverSet->refreshRow();
diff --git a/dbaccess/source/core/api/CacheSet.hxx 
b/dbaccess/source/core/api/CacheSet.hxx
index 0fc0e5777a6e..efdd843250b4 100644
--- a/dbaccess/source/core/api/CacheSet.hxx
+++ b/dbaccess/source/core/api/CacheSet.hxx
@@ -171,9 +171,6 @@ namespace dbaccess
 virtual bool columnValuesUpdated(ORowSetValueVector::Vector& 
o_aCachedRow,const ORowSetValueVector::Vector& i_aRow);
 virtual bool updateColumnValues(const ORowSetValueVector::Vector& 
io_aCachedRow,ORowSetValueVector::Vector& io_aRow,const std::vector& 
i_aChangedColumns);
 virtual void fillMissingValues(ORowSetValueVector::Vector& io_aRow) 
const;
-virtual bool previous_checked( bool i_bFetchRow );
-virtual bool absolute_checked( sal_Int32 row,bool i_bFetchRow );
-virtual bool last_checked( bool i_bFetchRow);
 };
 }
 #endif // INCLUDED_DBACCESS_SOURCE_CORE_API_CACHESET_HXX
diff --git a/dbaccess/source/core/api/KeySet.cxx 
b/dbaccess/source/core/api/KeySet.cxx
index 137f1e3b4104..f83ac766237d 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -1040,11 +1040,6 @@ bool OKeySet::first()
 
 bool OKeySet::last(  )
 {
-return last_checked(true);
-}
-
-bool OKeySet::last_checked( bool /* i_bFetchRow */ )
-{
 m_bInserted = m_bUpdated = m_bDeleted = false;
 bool bFetchedRow = fillAllRows();
 
@@ -1067,11 +1062,6 @@ sal_Int32 OKeySet::getRow(  )
 
 bool OKeySet::absolute( sal_Int32 row )
 {
-return absolute_checked(row,true);
-}
-
-bool OKeySet::absolute_checked( sal_Int32 row, bool /* i_bFetchRow */ )
-{
 m_bInserted = m_bUpdated = m_bDeleted = false;
 OSL_ENSURE(row,"absolute(0) isn't allowed!");
 

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang dbaccess/source sc/source

2019-10-21 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/virtualdead.unusedparams.results |3 
 dbaccess/source/ui/app/AppController.cxx   |2 
 dbaccess/source/ui/app/AppController.hxx   |2 
 dbaccess/source/ui/browser/dsbrowserDnD.cxx|2 
 dbaccess/source/ui/control/dbtreelistbox.cxx   |4 
 dbaccess/source/ui/inc/callbacks.hxx   |2 
 dbaccess/source/ui/inc/unodatbr.hxx|2 
 sc/source/ui/view/tabcont.cxx  |2 
 sc/source/ui/view/tabview.cxx  |   49 
 sc/source/ui/view/tabview2.cxx |   99 -
 sc/source/ui/view/tabview3.cxx |   58 +
 sc/source/ui/view/tabvwsh3.cxx |2 
 12 files changed, 119 insertions(+), 108 deletions(-)

New commits:
commit ad3e00237f48c52dbd2833f21f5e2f5acfdd4167
Author: Noel Grandin 
AuthorDate: Mon Oct 21 16:28:48 2019 +0200
Commit: Noel Grandin 
CommitDate: Mon Oct 21 19:32:42 2019 +0200

sc: rowcol: tdf#50916 convert tabview

Change-Id: I3ea46f14e50698f091b09750d5d21bb902ef
Reviewed-on: https://gerrit.libreoffice.org/81245
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx
index 4a2739c28fe0..11dd41de5254 100644
--- a/sc/source/ui/view/tabcont.cxx
+++ b/sc/source/ui/view/tabcont.cxx
@@ -480,7 +480,7 @@ void ScTabControl::DoDrag()
 ScDocument& rDoc = pDocSh->GetDocument();
 
 SCTAB nTab = pViewData->GetTabNo();
-ScRange aTabRange( 0, 0, nTab, MAXCOL, MAXROW, nTab );
+ScRange aTabRange( 0, 0, nTab, rDoc.MaxCol(), rDoc.MaxRow(), nTab );
 ScMarkData aTabMark = pViewData->GetMarkData();
 aTabMark.ResetMark();   // doesn't change marked table information
 aTabMark.SetMarkArea( aTabRange );
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index baf486d514a5..807dc27d4993 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -1169,6 +1169,7 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll, 
void )
 
 void ScTabView::ScrollX( long nDeltaX, ScHSplitPos eWhich, bool bUpdBars )
 {
+ScDocument* pDoc = aViewData.GetDocument();
 SCCOL nOldX = aViewData.GetPosX(eWhich);
 SCCOL nNewX = nOldX + static_cast(nDeltaX);
 if ( nNewX < 0 )
@@ -1176,17 +1177,16 @@ void ScTabView::ScrollX( long nDeltaX, ScHSplitPos 
eWhich, bool bUpdBars )
 nDeltaX -= nNewX;
 nNewX = 0;
 }
-if ( nNewX > MAXCOL )
+if ( nNewX > pDoc->MaxCol() )
 {
-nDeltaX -= nNewX - MAXCOL;
-nNewX = MAXCOL;
+nDeltaX -= nNewX - pDoc->MaxCol();
+nNewX = pDoc->MaxCol();
 }
 
 SCCOL nDir = ( nDeltaX > 0 ) ? 1 : -1;
-ScDocument* pDoc = aViewData.GetDocument();
 SCTAB nTab = aViewData.GetTabNo();
 while ( pDoc->ColHidden(nNewX, nTab) &&
-nNewX+nDir >= 0 && nNewX+nDir <= MAXCOL )
+nNewX+nDir >= 0 && nNewX+nDir <= pDoc->MaxCol() )
 nNewX = sal::static_int_cast( nNewX + nDir );
 
 // freeze
@@ -1207,7 +1207,7 @@ void ScTabView::ScrollX( long nDeltaX, ScHSplitPos 
eWhich, bool bUpdBars )
 
 HideAllCursors();
 
-if ( nNewX >= 0 && nNewX <= MAXCOL && nDeltaX )
+if ( nNewX >= 0 && nNewX <= pDoc->MaxCol() && nDeltaX )
 {
 SCCOL nTrackX = std::max( nOldX, nNewX );
 
@@ -1252,6 +1252,7 @@ void ScTabView::ScrollX( long nDeltaX, ScHSplitPos 
eWhich, bool bUpdBars )
 
 void ScTabView::ScrollY( long nDeltaY, ScVSplitPos eWhich, bool bUpdBars )
 {
+ScDocument* pDoc = aViewData.GetDocument();
 SCROW nOldY = aViewData.GetPosY(eWhich);
 SCROW nNewY = nOldY + static_cast(nDeltaY);
 if ( nNewY < 0 )
@@ -1259,17 +1260,16 @@ void ScTabView::ScrollY( long nDeltaY, ScVSplitPos 
eWhich, bool bUpdBars )
 nDeltaY -= nNewY;
 nNewY = 0;
 }
-if ( nNewY > MAXROW )
+if ( nNewY > pDoc->MaxRow() )
 {
-nDeltaY -= nNewY - MAXROW;
-nNewY = MAXROW;
+nDeltaY -= nNewY - pDoc->MaxRow();
+nNewY = pDoc->MaxRow();
 }
 
 SCROW nDir = ( nDeltaY > 0 ) ? 1 : -1;
-ScDocument* pDoc = aViewData.GetDocument();
 SCTAB nTab = aViewData.GetTabNo();
 while ( pDoc->RowHidden(nNewY, nTab) &&
-nNewY+nDir >= 0 && nNewY+nDir <= MAXROW )
+nNewY+nDir >= 0 && nNewY+nDir <= pDoc->MaxRow() )
 nNewY += nDir;
 
 // freeze
@@ -1290,7 +1290,7 @@ void ScTabView::ScrollY( long nDeltaY, ScVSplitPos 
eWhich, bool bUpdBars )
 
 HideAllCursors();
 
-if ( nNewY >= 0 && nNewY <= MAXROW && nDeltaY )
+if ( nNewY >= 0 && nNewY <= pDoc->MaxRow() && nDeltaY )
 {
 SCROW nTrackY = std::max( nOldY, nNewY );
 
@@ -1354,7 +1354,7 @@ SCROW lcl_LastVisible( const ScViewData& rViewData )
 ScDocument* pDoc = rViewData.GetDocument();
 SCTAB nTab = rViewData.GetTabNo();
 
-SCROW nVis = MAXROW;
+

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang dbaccess/source editeng/source include/editeng include/vcl sw/source vcl/inc vcl/opengl vcl/source vcl/unx

2019-10-04 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/unusedfields.only-used-in-constructor.results |   16 
 compilerplugins/clang/unusedfields.readonly.results |   46 -
 compilerplugins/clang/unusedfields.untouched.results|   14 
 compilerplugins/clang/unusedfields.writeonly.results|   26 
 compilerplugins/clang/unusedmethods.results |  264 
+++---
 compilerplugins/clang/unusedmethods.unused-returns.results  |   16 
 dbaccess/source/ui/control/ColumnControlWindow.cxx  |2 
 dbaccess/source/ui/control/FieldDescControl.cxx |1 
 dbaccess/source/ui/inc/FieldDescControl.hxx |3 
 editeng/source/misc/splwrap.cxx |2 
 include/editeng/splwrap.hxx |2 
 include/vcl/edit.hxx|1 
 include/vcl/tabctrl.hxx |3 
 include/vcl/vclmedit.hxx|1 
 sw/source/uibase/lingu/hyp.cxx  |1 
 vcl/inc/opengl/x11/gdiimpl.hxx  |3 
 vcl/inc/unx/gtk/gtksys.hxx  |1 
 vcl/inc/unx/salgdi.h|   13 
 vcl/inc/unx/x11/x11gdiimpl.h|2 
 vcl/inc/wizdlg.hxx  |   43 -
 vcl/opengl/x11/gdiimpl.cxx  |   36 -
 vcl/source/control/edit.cxx |1 
 vcl/source/control/roadmapwizard.cxx|   48 -
 vcl/source/control/tabctrl.cxx  |   16 
 vcl/source/control/wizardmachine.cxx|   23 
 vcl/source/edit/vclmedit.cxx|1 
 vcl/unx/generic/gdi/font.cxx|   27 -
 vcl/unx/generic/gdi/gdiimpl.cxx |5 
 vcl/unx/generic/gdi/gdiimpl.hxx |3 
 vcl/unx/generic/gdi/salgdi2.cxx |   37 -
 vcl/unx/gtk3/gtk3gtksys.cxx |6 
 31 files changed, 128 insertions(+), 535 deletions(-)

New commits:
commit 316557d6f4fe8a15112b39f3c808dda38cce018c
Author: Noel Grandin 
AuthorDate: Fri Oct 4 09:42:28 2019 +0200
Commit: Noel Grandin 
CommitDate: Fri Oct 4 14:22:55 2019 +0200

loplugin:unusedfields

Change-Id: If0df5216dccd2c0a7aa790668471993f5d4d5d32
Reviewed-on: https://gerrit.libreoffice.org/80183
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git 
a/compilerplugins/clang/unusedfields.only-used-in-constructor.results 
b/compilerplugins/clang/unusedfields.only-used-in-constructor.results
index 4b49911a92f9..63a578850f5c 100644
--- a/compilerplugins/clang/unusedfields.only-used-in-constructor.results
+++ b/compilerplugins/clang/unusedfields.only-used-in-constructor.results
@@ -146,7 +146,7 @@ cui/source/inc/tabstpge.hxx:87
 SvxTabulatorTabPage m_aCenterWin class TabWin_Impl
 cui/source/inc/tabstpge.hxx:88
 SvxTabulatorTabPage m_aDezWin class TabWin_Impl
-cui/source/options/optcolor.cxx:237
+cui/source/options/optcolor.cxx:235
 ColorConfigWindow_Impl::Entry m_aDefaultColor class Color
 dbaccess/source/core/api/RowSet.hxx:111
 dbaccess::ORowSet m_aURL class rtl::OUString
@@ -570,10 +570,6 @@ sc/source/ui/inc/msgpool.hxx:44
 ScMessagePool aCondFormatDlgItem class ScCondFormatDlgItem
 sc/source/ui/inc/notemark.hxx:46
 ScNoteMarker m_aTimer class Timer
-sc/source/ui/inc/output.hxx:188
-ScOutputData nTilePosX long
-sc/source/ui/inc/output.hxx:189
-ScOutputData nTilePosY long
 sc/source/ui/inc/PivotLayoutTreeListBase.hxx:48
 ScPivotLayoutTreeListBase maDropTargetHelper class 
ScPivotLayoutTreeDropTarget
 sc/source/ui/inc/xmlsourcedlg.hxx:62
@@ -631,9 +627,9 @@ sdext/source/pdfimport/pdfparse/pdfparse.cxx:263
 sdext/source/pdfimport/pdfparse/pdfparse.cxx:263
 PDFGrammar::definition dict_begin rule
 sdext/source/pdfimport/pdfparse/pdfparse.cxx:263
-PDFGrammar::definition value rule
-sdext/source/pdfimport/pdfparse/pdfparse.cxx:263
 PDFGrammar::definition dict_end rule
+sdext/source/pdfimport/pdfparse/pdfparse.cxx:263
+PDFGrammar::definition value rule
 sdext/source/pdfimport/pdfparse/pdfparse.cxx:264
 PDFGrammar::definition object_end rule
 sdext/source/pdfimport/pdfparse/pdfparse.cxx:264
@@ -806,8 +802,6 @@ vcl/inc/salmenu.hxx:43
 SalMenuButtonItem maImage class Image
 vcl/inc/salmenu.hxx:44
 SalMenuButtonItem maToolTipText class rtl::OUString
-vcl/inc/unx/gtk/gtkframe.hxx:186
-GtkSalFrame m_nWorkArea int
 vcl/inc/unx/i18n_ic.hxx:40
 SalI18N_InputContext maPreeditStartCallback 

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang dbaccess/source editeng/source include/editeng include/oox include/svl include/svtools include/svx include/tools include/unotools incl

2017-08-25 Thread Noel Grandin
 compilerplugins/clang/unusedmethods.results|   98 ++--
 compilerplugins/clang/unusedmethods.unused-returns.results |   26 -
 dbaccess/source/core/dataaccess/databasedocument.cxx   |5 
 dbaccess/source/core/dataaccess/databasedocument.hxx   |8 
 dbaccess/source/ui/inc/unoadmin.hxx|2 
 dbaccess/source/ui/uno/unoadmin.cxx|   10 
 editeng/source/items/flditem.cxx   |7 
 include/editeng/flditem.hxx|1 
 include/editeng/measfld.hxx|1 
 include/oox/core/binarycodec.hxx   |  197 
 include/svl/inettype.hxx   |6 
 include/svl/itempool.hxx   |6 
 include/svl/macitem.hxx|5 
 include/svl/metitem.hxx|1 
 include/svtools/calendar.hxx   |4 
 include/svtools/ruler.hxx  |1 
 include/svx/EnhancedCustomShape2d.hxx  |5 
 include/svx/framelink.hxx  |   44 -
 include/svx/framelinkarray.hxx |6 
 include/svx/searchcharmap.hxx  |1 
 include/svx/xbtmpit.hxx|2 
 include/tools/pstm.hxx |1 
 include/tools/stream.hxx   |3 
 include/tools/unqidx.hxx   |   62 --
 include/unotools/calendarwrapper.hxx   |1 
 include/vcl/msgbox.hxx |3 
 include/vcl/texteng.hxx|1 
 oox/source/core/binarycodec.cxx|  296 -
 sc/inc/attrib.hxx  |3 
 sc/source/core/data/attrib.cxx |   12 
 svl/source/items/intitem.cxx   |5 
 svl/source/misc/inettype.cxx   |  259 ---
 svtools/source/control/calendar.cxx|   49 --
 svtools/source/control/ruler.cxx   |5 
 svtools/source/graphic/grfcache.cxx|   24 -
 svtools/source/graphic/grfcache.hxx|2 
 svx/source/dialog/framelink.cxx|5 
 svx/source/dialog/framelinkarray.cxx   |   12 
 svx/source/dialog/searchcharmap.cxx|6 
 svx/source/xoutdev/xattrbmp.cxx|   57 --
 sw/source/filter/ww8/WW8FFData.hxx |4 
 sw/source/filter/ww8/docxexport.hxx|3 
 tools/Library_tl.mk|1 
 tools/source/memtools/unqidx.cxx   |   48 --
 tools/source/stream/stream.cxx |   12 
 unotools/source/i18n/calendarwrapper.cxx   |   13 
 vcl/source/edit/textdoc.cxx|   23 -
 vcl/source/edit/textdoc.hxx|2 
 vcl/source/edit/texteng.cxx|   11 
 49 files changed, 84 insertions(+), 1275 deletions(-)

New commits:
commit 1b694dad643334ec1bab3f823dcd68f44a05ebe3
Author: Noel Grandin 
Date:   Thu Aug 24 22:14:27 2017 +0200

loplugin:unusedmethods

Change-Id: Iaaf9092ec4d6189492906648b84494d087fed81f
Reviewed-on: https://gerrit.libreoffice.org/41539
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/compilerplugins/clang/unusedmethods.results 
b/compilerplugins/clang/unusedmethods.results
index 6af3710f63bf..caca2e63d579 100644
--- a/compilerplugins/clang/unusedmethods.results
+++ b/compilerplugins/clang/unusedmethods.results
@@ -22,14 +22,32 @@ desktop/inc/lib/init.hxx:45
 _Bool desktop::CallbackFlushHandler::isEventLatchOn() const
 desktop/inc/lib/init.hxx:47
 _Bool desktop::CallbackFlushHandler::isPartTilePainting() const
-drawinglayer/source/tools/emfpbrush.hxx:123
-unsigned int emfplushelper::EMFPBrush::GetType() const
 drawinglayer/source/tools/emfpcustomlinecap.hxx:37
 void emfplushelper::EMFPCustomLineCap::SetAttributes(struct 
com::sun::star::rendering::StrokeAttributes &)
-drawinglayer/source/tools/emfppen.hxx:62
-void emfplushelper::EMFPPen::SetStrokeWidth(struct 
com::sun::star::rendering::StrokeAttributes &,struct 
emfplushelper::EmfPlusHelperData &,const class basegfx::B2DHomMatrix &)
+drawinglayer/source/tools/emfpfont.hxx:38
+_Bool emfplushelper::EMFPFont::Underline()
+drawinglayer/source/tools/emfpfont.hxx:39
+_Bool emfplushelper::EMFPFont::Strikeout()
 

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang dbaccess/source vcl/source

2015-11-20 Thread Noel Grandin
 compilerplugins/clang/unusedfields.py  |2 
 dbaccess/source/core/api/RowSetBase.cxx|2 
 dbaccess/source/core/api/RowSetCache.cxx   |1 
 dbaccess/source/core/api/RowSetCache.hxx   |2 
 dbaccess/source/core/api/query.cxx |1 
 dbaccess/source/core/api/query.hxx |1 
 dbaccess/source/core/dataaccess/myucp_datasupplier.cxx |   14 
 dbaccess/source/core/dataaccess/myucp_datasupplier.hxx |3 
 dbaccess/source/core/dataaccess/myucp_resultset.cxx|6 
 dbaccess/source/filter/xml/xmlExport.cxx   |   35 --
 dbaccess/source/ui/browser/sbagrid.cxx |   11 
 dbaccess/source/ui/browser/unodatbr.cxx|1 
 dbaccess/source/ui/dlg/ConnectionPageSetup.cxx |1 
 dbaccess/source/ui/dlg/ConnectionPageSetup.hxx |1 
 dbaccess/source/ui/dlg/dlgsave.cxx |  240 -
 dbaccess/source/ui/dlg/dsselect.cxx|4 
 dbaccess/source/ui/dlg/dsselect.hxx|   13 
 dbaccess/source/ui/inc/QueryTableView.hxx  |9 
 dbaccess/source/ui/inc/TableDesignControl.hxx  |1 
 dbaccess/source/ui/inc/linkeddocuments.hxx |1 
 dbaccess/source/ui/inc/sbagrid.hxx |4 
 dbaccess/source/ui/inc/unodatbr.hxx|2 
 dbaccess/source/ui/tabledesign/TEditControl.hxx|1 
 dbaccess/source/ui/tabledesign/TableDesignControl.cxx  |1 
 vcl/source/window/brdwin.cxx   |4 
 25 files changed, 144 insertions(+), 217 deletions(-)

New commits:
commit 3aff028b8f8c62d948d0d6f29a8bd4d169d1e762
Author: Noel Grandin 
Date:   Fri Nov 20 14:06:06 2015 +0200

loplugin:unusedfields in dbaccess

Change-Id: I563c3727c1719fe21acced269e5469c2de7112e8

diff --git a/compilerplugins/clang/unusedfields.py 
b/compilerplugins/clang/unusedfields.py
index bade9a8..40b5def 100755
--- a/compilerplugins/clang/unusedfields.py
+++ b/compilerplugins/clang/unusedfields.py
@@ -55,6 +55,8 @@ for d in definitionSet:
 continue
 if (definitionToSourceLocationMap[d].startswith("include/")):
 continue
+if (definitionToSourceLocationMap[d].startswith("external/")):
+continue
 
 tmp1set.add((clazz, definitionToSourceLocationMap[d]))
 
diff --git a/dbaccess/source/core/api/RowSetBase.cxx 
b/dbaccess/source/core/api/RowSetBase.cxx
index 7b9d528..2ad04ad 100644
--- a/dbaccess/source/core/api/RowSetBase.cxx
+++ b/dbaccess/source/core/api/RowSetBase.cxx
@@ -1371,9 +1371,7 @@ sal_Int32 ORowSetBase::impl_getRowCount() const
 struct ORowSetNotifierImpl
 {
 ::std::vectoraChangedColumns;
-::std::vector  aChangedBookmarks;
 ORowSetValueVector::Vector  aRow;
-
 };
 
 
diff --git a/dbaccess/source/core/api/RowSetCache.cxx 
b/dbaccess/source/core/api/RowSetCache.cxx
index 9423345..1ba973c 100644
--- a/dbaccess/source/core/api/RowSetCache.cxx
+++ b/dbaccess/source/core/api/RowSetCache.cxx
@@ -94,7 +94,6 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& 
_xRs,
 ,m_pCacheSet(nullptr)
 ,m_pMatrix(nullptr)
 ,m_pInsertMatrix(nullptr)
-,m_nLastColumnIndex(0)
 ,m_nFetchSize(0)
 ,m_nRowCount(0)
 ,m_nPrivileges( Privilege::SELECT )
diff --git a/dbaccess/source/core/api/RowSetCache.hxx 
b/dbaccess/source/core/api/RowSetCache.hxx
index ee9af8f7..a8eeaa0 100644
--- a/dbaccess/source/core/api/RowSetCache.hxx
+++ b/dbaccess/source/core/api/RowSetCache.hxx
@@ -77,8 +77,6 @@ namespace dbaccess
 ORowSetMatrix*  m_pInsertMatrix;// represent 
the rows which should be inserted normally this is only one
 ORowSetMatrix::iterator m_aInsertRow;   // represent a 
insert row
 
-sal_Int32   m_nLastColumnIndex; // the last 
column ask for, used for wasNull()
-
 connectivity::OSQLTable m_aUpdateTable; // used for 
updates/deletes and inserts
 
 sal_Int32   m_nFetchSize;
diff --git a/dbaccess/source/core/api/query.cxx 
b/dbaccess/source/core/api/query.cxx
index 943b0c8..d0b5874 100644
--- a/dbaccess/source/core/api/query.cxx
+++ b/dbaccess/source/core/api/query.cxx
@@ -77,7 +77,6 @@ OQuery::OQuery( const Reference< XPropertySet >& 
_rxCommandDefinition
 ,m_xConnection(_rxConn)
 ,m_pColumnMediator( nullptr )
 ,m_pWarnings( nullptr )
-,m_bCaseSensitiv(true)
 ,m_eDoingCurrently(NONE)
 {
 registerProperties();
diff --git a/dbaccess/source/core/api/query.hxx 
b/dbaccess/source/core/api/query.hxx
index ed5d098..83a6e78 100644
--- a/dbaccess/source/core/api/query.hxx
+++ b/dbaccess/source/core/api/query.hxx
@@ -65,7 +65,6 @@ protected:
 css::uno::Reference< css::beans::XPropertySetInfo >   
m_xCommandPropInfo;
 ::rtl::Reference< OContainerMediator >