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

2023-11-24 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/fieldcast.results  |3 --
 sc/source/filter/inc/workbookhelper.hxx  |8 +++
 sc/source/filter/oox/addressconverter.cxx|1 
 sc/source/filter/oox/externallinkbuffer.cxx  |5 ++--
 sc/source/filter/oox/numberformatsbuffer.cxx |3 +-
 sc/source/filter/oox/querytablebuffer.cxx|3 +-
 sc/source/filter/oox/scenariobuffer.cxx  |1 
 sc/source/filter/oox/sheetdatabuffer.cxx |3 +-
 sc/source/filter/oox/stylesbuffer.cxx|3 +-
 sc/source/filter/oox/tablebuffer.cxx |3 +-
 sc/source/filter/oox/unitconverter.cxx   |3 +-
 sc/source/filter/oox/viewsettings.cxx|4 +--
 sc/source/filter/oox/workbookhelper.cxx  |   30 +--
 sc/source/filter/oox/workbooksettings.cxx|7 +++---
 sc/source/filter/oox/worksheetbuffer.cxx |1 
 sc/source/filter/xml/xmlimprt.cxx|   19 -
 sc/source/filter/xml/xmlimprt.hxx|3 +-
 sc/source/ui/unoobj/servuno.cxx  |5 +---
 18 files changed, 52 insertions(+), 53 deletions(-)

New commits:
commit 6f0f7fa17aebe888cb8264bd48d741f469ba56b9
Author: Noel Grandin 
AuthorDate: Thu Nov 23 20:58:21 2023 +0200
Commit: Noel Grandin 
CommitDate: Fri Nov 24 12:47:32 2023 +0100

loplugin:fieldcast in ScXMLImport

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

diff --git a/compilerplugins/clang/fieldcast.results 
b/compilerplugins/clang/fieldcast.results
index b3a206434484..6fa27d645135 100644
--- a/compilerplugins/clang/fieldcast.results
+++ b/compilerplugins/clang/fieldcast.results
@@ -298,9 +298,6 @@ sc/source/filter/excel/xeformula.cxx:60
 sc/source/filter/inc/eeimport.hxx:43
 ScEEImport mpParser std::unique_ptr
 ScHTMLParser
-sc/source/filter/xml/xmlimprt.hxx:156
-ScXMLImport xSheetCellRanges 
css::uno::Reference
-ScCellRangesObj
 sc/source/ui/inc/AccessibleContextBase.hxx:232
 ScAccessibleContextBase mxParent 
css::uno::Reference
 ScAccessibleSpreadsheet
diff --git a/sc/source/filter/xml/xmlimprt.cxx 
b/sc/source/filter/xml/xmlimprt.cxx
index db113a47b4b1..b9c775fff470 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -982,7 +982,7 @@ void ScXMLImport::SetStyleToRanges()
 
 if (!sPrevStyleName.isEmpty())
 {
-uno::Reference  xProperties (xSheetCellRanges, 
uno::UNO_QUERY);
+uno::Reference  xProperties (mxSheetCellRanges);
 if (xProperties.is())
 {
 XMLTableStylesContext *pStyles(static_cast(GetAutoStyles()));
@@ -1006,7 +1006,7 @@ void ScXMLImport::SetStyleToRanges()
 }
 
 // store first cell of first range for each style, once per 
sheet
-uno::Sequence 
aAddresses(xSheetCellRanges->getRangeAddresses());
+uno::Sequence 
aAddresses(mxSheetCellRanges->getRangeAddresses());
 pStyle->ApplyCondFormat(aAddresses);
 if ( aAddresses.hasElements() )
 {
@@ -1035,11 +1035,10 @@ void ScXMLImport::SetStyleToRanges()
 {
 uno::Reference  
xMultiServiceFactory(GetModel(), uno::UNO_QUERY);
 if (xMultiServiceFactory.is())
-xSheetCellRanges.set(uno::Reference 
(
-
xMultiServiceFactory->createInstance("com.sun.star.sheet.SheetCellRanges"),
-uno::UNO_QUERY));
+mxSheetCellRanges = _cast(
+
*xMultiServiceFactory->createInstance("com.sun.star.sheet.SheetCellRanges"));
 }
-OSL_ENSURE(xSheetCellRanges.is(), "didn't get SheetCellRanges");
+OSL_ENSURE(mxSheetCellRanges.is(), "didn't get SheetCellRanges");
 }
 
 void ScXMLImport::SetStyleToRanges(const ScRangeList& rRanges, const OUString* 
pStyleName,
@@ -1076,15 +1075,15 @@ void ScXMLImport::SetStyleToRanges(const ScRangeList& 
rRanges, const OUString* p
 sPrevCurrency.clear();
 }
 
-if (!xSheetCellRanges.is() && GetModel().is())
+if (!mxSheetCellRanges.is() && GetModel().is())
 {
 uno::Reference  
xMultiServiceFactory(GetModel(), uno::UNO_QUERY);
 if (xMultiServiceFactory.is())
-xSheetCellRanges.set(uno::Reference 
(xMultiServiceFactory->createInstance("com.sun.star.sheet.SheetCellRanges"),
 uno::UNO_QUERY));
-OSL_ENSURE(xSheetCellRanges.is(), "didn't get SheetCellRanges");
+mxSheetCellRanges = 
_cast(*xMultiServiceFactory->createInstance("com.sun.star.sheet.SheetCellRanges"));
+OSL_ENSURE(mxSheetCellRanges.is(), "didn't get SheetCellRanges");
 
 }
-
static_cast(xSheetCellRanges.get())->SetNewRanges(rRanges);
+mxSheetCellRanges->SetNewRanges(rRanges);
 }
 
 bool ScXMLImport::SetNullDateOnUnitConverter()
diff --git a/sc/source/filter/xml/xmlimprt.hxx 
b/sc/source/filter/xml/xmlimprt.hxx
index 88feb0ddb671..7dddb7d6f5c9 

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang forms/source framework/inc framework/source

2023-11-22 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/fieldcast.results  |6 -
 forms/source/xforms/binding.cxx  |   76 ++-
 forms/source/xforms/binding.hxx  |   11 +--
 forms/source/xforms/model_helper.hxx |4 -
 framework/inc/services/layoutmanager.hxx |5 -
 framework/source/layoutmanager/layoutmanager.cxx |   68 
 6 files changed, 72 insertions(+), 98 deletions(-)

New commits:
commit 89945d719282ba83d6a06be899a1320c40daee12
Author: Noel Grandin 
AuthorDate: Wed Nov 22 22:03:34 2023 +0200
Commit: Noel Grandin 
CommitDate: Thu Nov 23 08:14:02 2023 +0100

loplugin:fieldcast in LayoutManager

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

diff --git a/compilerplugins/clang/fieldcast.results 
b/compilerplugins/clang/fieldcast.results
index e803723cd774..aa36df627b34 100644
--- a/compilerplugins/clang/fieldcast.results
+++ b/compilerplugins/clang/fieldcast.results
@@ -88,9 +88,6 @@ editeng/source/editeng/impedit.hxx:506
 extensions/source/update/check/updatecheck.hxx:164
 UpdateCheck m_pThread WorkerThread *
 (anonymous namespace)::UpdateCheckThread
-framework/inc/services/layoutmanager.hxx:253
-framework::LayoutManager m_xMenuBar 
css::uno::Reference
-framework::MenuBarWrapper
 framework/inc/services/layoutmanager.hxx:256
 framework::LayoutManager m_xProgressBarBackup 
css::uno::Reference
 framework::ProgressBarWrapper
diff --git a/framework/inc/services/layoutmanager.hxx 
b/framework/inc/services/layoutmanager.hxx
index 28f78d5bdc0f..6675737d4b15 100644
--- a/framework/inc/services/layoutmanager.hxx
+++ b/framework/inc/services/layoutmanager.hxx
@@ -42,9 +42,10 @@
 #include 
 
 class MenuBar;
+
 namespace framework
 {
-
+class MenuBarWrapper;
 class ToolbarLayoutManager;
 class GlobalSettings;
 namespace detail
@@ -250,7 +251,7 @@ namespace framework
 css::awt::Rectangle
m_aDockingArea;
 css::uno::Reference< css::ui::XDockingAreaAcceptor >   
m_xDockingAreaAcceptor;
 rtl::Reference< MenuBarManager >   
m_xInplaceMenuBar;
-css::uno::Reference< css::ui::XUIElement > 
m_xMenuBar;
+rtl::Reference< MenuBarWrapper >   
m_xMenuBar;
 UIElement  
m_aStatusBarElement;
 UIElement  
m_aProgressBarElement;
 css::uno::Reference< css::ui::XUIElement > 
m_xProgressBarBackup;
diff --git a/framework/source/layoutmanager/layoutmanager.cxx 
b/framework/source/layoutmanager/layoutmanager.cxx
index d4d30416ad26..3b5a0af3017c 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -154,7 +154,7 @@ void LayoutManager::implts_createMenuBar(const OUString& 
rMenuBarName)
 if (m_bInplaceMenuSet || m_xMenuBar.is())
 return;
 
-m_xMenuBar = implts_createElement( rMenuBarName );
+m_xMenuBar.set( static_cast< MenuBarWrapper* >(implts_createElement( 
rMenuBarName ).get()) );
 if ( !m_xMenuBar.is() )
 return;
 
@@ -164,19 +164,15 @@ void LayoutManager::implts_createMenuBar(const OUString& 
rMenuBarName)
 
 Reference< awt::XMenuBar > xMenuBar;
 
-Reference< XPropertySet > xPropSet( m_xMenuBar, UNO_QUERY );
-if ( xPropSet.is() )
+try
+{
+m_xMenuBar->getPropertyValue("XMenuBar") >>= xMenuBar;
+}
+catch (const beans::UnknownPropertyException&)
+{
+}
+catch (const lang::WrappedTargetException&)
 {
-try
-{
-xPropSet->getPropertyValue("XMenuBar") >>= xMenuBar;
-}
-catch (const beans::UnknownPropertyException&)
-{
-}
-catch (const lang::WrappedTargetException&)
-{
-}
 }
 
 if ( !xMenuBar.is() )
@@ -215,12 +211,11 @@ void LayoutManager::impl_clearUpMenuBar()
 {
 Reference< awt::XMenuBar > xMenuBar;
 
-Reference< XPropertySet > xPropSet( m_xMenuBar, UNO_QUERY );
-if ( xPropSet.is() )
+if ( m_xMenuBar.is() )
 {
 try
 {
-xPropSet->getPropertyValue("XMenuBar") >>= xMenuBar;
+m_xMenuBar->getPropertyValue("XMenuBar") >>= xMenuBar;
 }
 catch (const beans::UnknownPropertyException&)
 {
@@ -252,10 +247,11 @@ void LayoutManager::impl_clearUpMenuBar()
 pMenuBar.disposeAndClear();
 m_bInplaceMenuSet = false;
 
-Reference< XComponent > xComp( m_xMenuBar, UNO_QUERY );
-if ( 

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang solenv/CompilerTest_compilerplugins_clang.mk vcl/source xmlsecurity/source

2023-11-07 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/fieldcast.cxx   |  199 +
 compilerplugins/clang/fieldcast.py|   71 
 compilerplugins/clang/fieldcast.results   | 1038 ++
 compilerplugins/clang/test/fieldcast.cxx  |   34 
 solenv/CompilerTest_compilerplugins_clang.mk  |1 
 vcl/source/window/menu.cxx|4 
 vcl/source/window/menubarwindow.cxx   |2 
 vcl/source/window/menufloatingwindow.cxx  |2 
 vcl/source/window/menuitemlist.hxx|2 
 xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx |   12 
 xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.hxx |2 
 11 files changed, 1355 insertions(+), 12 deletions(-)

New commits:
commit 3b8e58b3bea6fd67cb7c5dc25115a32ca6975117
Author: Noel Grandin 
AuthorDate: Tue Nov 7 13:29:51 2023 +0200
Commit: Noel Grandin 
CommitDate: Wed Nov 8 06:50:35 2023 +0100

loplugin:fieldcast in vcl

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

diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 60673fbe434e..3a66b962ebd6 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -747,7 +747,7 @@ void Menu::SetPopupMenu( sal_uInt16 nItemId, PopupMenu* 
pMenu )
 return;
 
 // same menu, nothing to do
-if ( static_cast(pData->pSubMenu.get()) == pMenu )
+if ( pData->pSubMenu.get() == pMenu )
 return;
 
 // remove old menu
@@ -779,7 +779,7 @@ PopupMenu* Menu::GetPopupMenu( sal_uInt16 nItemId ) const
 MenuItemData* pData = pItemList->GetData( nItemId );
 
 if ( pData )
-return static_cast(pData->pSubMenu.get());
+return pData->pSubMenu.get();
 else
 return nullptr;
 }
diff --git a/vcl/source/window/menubarwindow.cxx 
b/vcl/source/window/menubarwindow.cxx
index e77b600ea445..c52b0cf6787a 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -287,7 +287,7 @@ void MenuBarWindow::ImplCreatePopup( bool bPreSelectFirst )
  ( pItemData->pSubMenu != m_pActivePopup )) )
 return;
 
-m_pActivePopup = static_cast(pItemData->pSubMenu.get());
+m_pActivePopup = pItemData->pSubMenu.get();
 tools::Long nX = 0;
 MenuItemData* pData = nullptr;
 for ( sal_uLong n = 0; n < m_nHighlightedItem; n++ )
diff --git a/vcl/source/window/menufloatingwindow.cxx 
b/vcl/source/window/menufloatingwindow.cxx
index 3fb13ee1deee..95a0d3f4d02a 100644
--- a/vcl/source/window/menufloatingwindow.cxx
+++ b/vcl/source/window/menufloatingwindow.cxx
@@ -336,7 +336,7 @@ IMPL_LINK( MenuFloatingWindow, HighlightChanged, Timer*, 
pTimer, void )
 if ( !(pItemData->bEnabled && pItemData->pSubMenu && 
pItemData->pSubMenu->GetItemCount() && ( pItemData->pSubMenu != pActivePopup )) 
)
 return;
 
-pActivePopup = static_cast(pItemData->pSubMenu.get());
+pActivePopup = pItemData->pSubMenu.get();
 tools::Long nY = nScrollerHeight+ImplGetStartY();
 MenuItemData* pData = nullptr;
 for ( sal_uLong n = 0; n < nHighlightedItem; n++ )
diff --git a/vcl/source/window/menuitemlist.hxx 
b/vcl/source/window/menuitemlist.hxx
index 4cd89b478577..fc25a402922d 100644
--- a/vcl/source/window/menuitemlist.hxx
+++ b/vcl/source/window/menuitemlist.hxx
@@ -35,7 +35,7 @@ struct MenuItemData
 sal_uInt16  nId;// SV Id
 MenuItemTypeeType;  // MenuItem-Type
 MenuItemBitsnBits;  // MenuItem-Bits
-VclPtrpSubMenu;   // Pointer to SubMenu
+VclPtr pSubMenu; // Pointer to SubMenu
 OUStringaText;  // Menu-Text
 SalLayoutGlyphs aTextGlyphs;///< Text layout of aText.
 OUStringaHelpText;  // Help-String
commit 74f884d48ed27e1ce861620a57802ad156a86d15
Author: Noel Grandin 
AuthorDate: Tue Nov 7 12:50:17 2023 +0200
Commit: Noel Grandin 
CommitDate: Wed Nov 8 06:50:24 2023 +0100

new loplugin:fieldcast

new plugin to look for class fields that are always cast to some
subtype, which indicates that they should probably just be declared to
be that subtype.

Perform one of the suggested improvements in xmlsecurity/

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

diff --git a/compilerplugins/clang/fieldcast.cxx 
b/compilerplugins/clang/fieldcast.cxx
new file mode 100644
index ..7f2b728e8e22
--- /dev/null
+++ b/compilerplugins/clang/fieldcast.cxx
@@ -0,0 +1,199 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * 

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

2023-11-06 Thread Szymon Kłos (via logerrit)
 compilerplugins/clang/badstatics.cxx|1 
 include/sfx2/notebookbar/SfxNotebookBar.hxx |3 
 sfx2/source/appl/appserv.cxx|4 -
 sfx2/source/control/dispatch.cxx|3 
 sfx2/source/notebookbar/SfxNotebookBar.cxx  |   89 ++--
 5 files changed, 69 insertions(+), 31 deletions(-)

New commits:
commit b9159cf17ba61cb78c45f7223027f3e47126643b
Author: Szymon Kłos 
AuthorDate: Sat Nov 4 15:08:14 2023 +0100
Commit: Szymon Kłos 
CommitDate: Mon Nov 6 10:04:39 2023 +0100

lok: notebookbar: query SID_NOTEBOOKBAR only when requested to switch UI

commit 5bd2931b57a6cb4ac1f39d7ddae874ac693cfab0
tdf#102063 Notebookbar wont appear on launch

introduced some Query hack to SfxDispatcher::Update_Impl what
causes many updates on lots of different actions.
It breaks multi-view state of notebookbar in LOK case,
so don't do that. It should be reviewed for regular case too.

Change-Id: I8f26bddc6cff991c56a1172893d83b90fb225acd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158937
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 5b0ef2ca491f..d58b62a9bf3b 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -805,7 +805,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
 
 aCurrentMode = comphelper::getString( aAppNode.getNodeValue( 
"Active" ) );
 
-if ( aCurrentMode == aNewName )
+if ( !comphelper::LibreOfficeKit::isActive() && aCurrentMode 
== aNewName )
 {
 bDone = true;
 break;
@@ -931,6 +931,8 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
 // Show/Hide the Notebookbar
 const SfxStringItem pItem(SID_NOTEBOOKBAR, aNewName);
 pViewFrame->GetDispatcher()->ExecuteList(SID_NOTEBOOKBAR, 
SfxCallMode::SYNCHRON, {});
+const SfxPoolItem *pNbItem;
+pViewFrame->GetDispatcher()->QueryState(SID_NOTEBOOKBAR, 
pNbItem);
 
 // Show toolbars
 for ( const OUString& rName : 
std::as_const(aMandatoryToolbars) )
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 6a492bffda7e..9134f8da574d 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -1120,7 +1120,8 @@ void SfxDispatcher::Update_Impl( bool bForce )
 if ( xLayoutManager.is() )
 xLayoutManager->unlock();
 
-if ( SfxViewShell::Current() && SfxViewShell::Current()->GetDispatcher() )
+if ( !comphelper::LibreOfficeKit::isActive() &&
+SfxViewShell::Current() && SfxViewShell::Current()->GetDispatcher() )
 {
 const SfxPoolItem *pItem;
 SfxViewShell::Current()->GetDispatcher()->QueryState(SID_NOTEBOOKBAR, 
pItem);
commit 6bf428d354349995f7a20e6ce38a47c238911abe
Author: Szymon Kłos 
AuthorDate: Sat Nov 4 12:05:16 2023 +0100
Commit: Szymon Kłos 
CommitDate: Mon Nov 6 10:04:31 2023 +0100

lok: notebookbar: handle multiple sessions

This fixes regression from commit db5a78c8ab1eae30e442151f07b0dc4dcd017550
lok: notebookbar: don't recreate toolbars too often

When we had 2 sessions with notebookbar and one of them switched
to compact mode - other session's notebookbar didn't work.

Before previous change we recreated notebookbar and its welded wrapper
on every StateMethod call for LOK case. So when it become destroyed
we made it working again. But now we need to introduce better management
and not rely on single instence we get from SystemWindow.

Also it's bad idea to rely 100% on SfxNotebookBar::IsActive in LOK
case as when other view will turn notebookbar off, but QueryState
will be trigerred in our session - we will think that it should be
destroyed (it reads config state which is shared between views).
So trust only "true" value (it happens after calling SID_TOOLBAR_MODE),
but destroy notebookbar only after explicit call of
SfxNotebookBar::CloseMethod. It seems to have good result when tested
with multiple views in Online. Maybe we can track Notebookbar state
per view later to make things simpler in LOK case.

Change-Id: Ie739c6441ca05884b0ef20bff23751467706b562
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158936
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/compilerplugins/clang/badstatics.cxx 
b/compilerplugins/clang/badstatics.cxx
index f22dabac9b48..328218086453 100644
--- a/compilerplugins/clang/badstatics.cxx
+++ b/compilerplugins/clang/badstatics.cxx
@@ -211,6 +211,7 @@ public:
 || name == "s_aLOKWeldBuildersMap" // LOK only, similar case 
as above
 || name == "s_aLOKPopupsMap" // LOK only, similar case as above
 

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

2023-10-14 Thread Caolán McNamara (via logerrit)
 compilerplugins/clang/unnecessaryvirtual.results |2 --
 sw/source/uibase/utlui/navipi.cxx|6 ++
 vcl/inc/salvtables.hxx   |2 +-
 3 files changed, 7 insertions(+), 3 deletions(-)

New commits:
commit 025372363e5310ffe0e729648f97faef2fe784eb
Author: Caolán McNamara 
AuthorDate: Sat Oct 14 19:01:48 2023 +0100
Commit: Caolán McNamara 
CommitDate: Sat Oct 14 21:51:32 2023 +0200

get_iter_abs_pos doesn't neeed to be virtual

Change-Id: If69768ffac37aa7b39a806b3c67ad8cbdafc5d2f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157981
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/compilerplugins/clang/unnecessaryvirtual.results 
b/compilerplugins/clang/unnecessaryvirtual.results
index 7404a1cffd85..96c0ef52a9b5 100644
--- a/compilerplugins/clang/unnecessaryvirtual.results
+++ b/compilerplugins/clang/unnecessaryvirtual.results
@@ -448,8 +448,6 @@ vcl/inc/salobj.hxx:49
 void SalObject::Enable(_Bool,)
 vcl/inc/salprn.hxx:116
 enum SalPrinterError SalPrinter::GetErrorCode()
-vcl/inc/salvtables.hxx:1771
-_Bool SalInstanceTreeView::get_iter_abs_pos(class weld::TreeIter 
&,int,)const
 vcl/inc/skia/gdiimpl.hxx:230
 void SkiaSalGraphicsImpl::createSurface()
 vcl/inc/skia/gdiimpl.hxx:240
diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx
index 09186972a3ab..8648db8e5143 100644
--- a/vcl/inc/salvtables.hxx
+++ b/vcl/inc/salvtables.hxx
@@ -1770,7 +1770,7 @@ public:
 
 virtual bool get_iter_first(weld::TreeIter& rIter) const override;
 
-virtual bool get_iter_abs_pos(weld::TreeIter& rIter, int nPos) const;
+bool get_iter_abs_pos(weld::TreeIter& rIter, int nPos) const;
 
 virtual bool iter_next_sibling(weld::TreeIter& rIter) const override;
 
commit 5bdcd30a64ef814e63d1548ab798cc8a81944b49
Author: Attila Szűcs 
AuthorDate: Thu May 18 10:36:38 2023 +0200
Commit: Caolán McNamara 
CommitDate: Sat Oct 14 21:51:22 2023 +0200

LOK: Navigator: headings expanded by default

Called an expand_row for the first element of the contetnTree
in the navigator constructor.
Right now contructor is called every time when navigator is
opened, it may change later. (desktop app do it only if navigator
opens in a new window, not on sidebar)

Change-Id: Ibe4b71e6a6ddb573269178f83c295b0c2cbd53b0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151939
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 
(cherry picked from commit 09c40d669cac5f167fa68cb5c6ad94a6a9e2a844)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157960
Tested-by: Jenkins
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/sw/source/uibase/utlui/navipi.cxx 
b/sw/source/uibase/utlui/navipi.cxx
index ad89c6b1a7bb..67807c69f8bc 100644
--- a/sw/source/uibase/utlui/navipi.cxx
+++ b/sw/source/uibase/utlui/navipi.cxx
@@ -734,6 +734,12 @@ SwNavigationPI::SwNavigationPI(weld::Widget* pParent,
 m_xGlobalBox->hide();
 m_xGlobalToolBox->hide();
 m_xGlobalTree->HideTree();
+
+//Open Headings by default
+auto& pTreeView = m_xContentTree->get_widget();
+std::unique_ptr itEntry(pTreeView.make_iterator());
+pTreeView.get_iter_first(*itEntry);
+pTreeView.expand_row(*itEntry);
 }
 }
 


[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang include/ucbhelper sal/osl sc/inc sc/source solenv/clang-format ucbhelper/source

2023-10-12 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/unusedmethods.results|   98 ++
 compilerplugins/clang/unusedmethods.unused-returns.results |   14 
 include/ucbhelper/interceptedinteraction.hxx   |   15 
 sal/osl/unx/backtrace.c|  210 -
 sal/osl/unx/backtrace_bsd.c|  105 ++
 sal/osl/unx/backtrace_other.c  |   39 ++
 sal/osl/unx/backtrace_solaris.c|  134 
 sc/inc/tablink.hxx |1 
 sc/source/ui/docshell/tablink.cxx  |8 
 solenv/clang-format/excludelist|3 
 ucbhelper/source/client/interceptedinteraction.cxx |4 
 11 files changed, 331 insertions(+), 300 deletions(-)

New commits:
commit 6056a0e320f0aabbde7adb28c42e00ed72ef2e5b
Author: Noel Grandin 
AuthorDate: Wed Oct 11 11:25:12 2023 +0200
Commit: Noel Grandin 
CommitDate: Thu Oct 12 16:11:29 2023 +0200

loplugin:unusedmethods

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

diff --git a/compilerplugins/clang/unusedmethods.results 
b/compilerplugins/clang/unusedmethods.results
index 0ed5031af7c3..5927b7e5845f 100644
--- a/compilerplugins/clang/unusedmethods.results
+++ b/compilerplugins/clang/unusedmethods.results
@@ -380,11 +380,11 @@ include/basegfx/tuple/Size2D.hxx:100
 Size2D basegfx::operator*(const 
Size2D &,const Size2D &)
 include/basegfx/tuple/Size2D.hxx:108
 Size2D basegfx::operator/(const 
Size2D &,const Size2D &)
-include/basegfx/tuple/Tuple2D.hxx:83
+include/basegfx/tuple/Tuple2D.hxx:72
 _Bool basegfx::Tuple2D::equal(const basegfx::Tuple2D &) const
-include/basegfx/tuple/Tuple2D.hxx:83
+include/basegfx/tuple/Tuple2D.hxx:72
 _Bool basegfx::Tuple2D::equal(const basegfx::Tuple2D &) const
-include/basegfx/tuple/Tuple2D.hxx:83
+include/basegfx/tuple/Tuple2D.hxx:72
 _Bool basegfx::Tuple2D::equal(const basegfx::Tuple2D &) const
 include/basegfx/utils/b2dclipstate.hxx:72
 _Bool basegfx::utils::B2DClipState::operator!=(const 
basegfx::utils::B2DClipState &) const
@@ -442,14 +442,22 @@ include/comphelper/configuration.hxx:270
 void comphelper::ConfigurationLocalizedProperty::set(const 
type-parameter-?-? &,const std::shared_ptr &)
 include/comphelper/configuration.hxx:305
 
com::sun::star::uno::Reference
 comphelper::ConfigurationGroup::get(const 
std::shared_ptr &)
-include/comphelper/errcode.hxx:84
+include/comphelper/errcode.hxx:91
 _Bool ErrCode::operator<(const ErrCode &) const
-include/comphelper/errcode.hxx:85
+include/comphelper/errcode.hxx:92
 _Bool ErrCode::operator<=(const ErrCode &) const
-include/comphelper/errcode.hxx:86
+include/comphelper/errcode.hxx:93
 _Bool ErrCode::operator>(const ErrCode &) const
-include/comphelper/errcode.hxx:87
+include/comphelper/errcode.hxx:94
 _Bool ErrCode::operator>=(const ErrCode &) const
+include/comphelper/errcode.hxx:188
+ ErrCodeMsg::ErrCodeMsg(ErrCode,const rtl::OUString &,const rtl::OUString 
&,struct std::experimental::source_location)
+include/comphelper/errcode.hxx:215
+const std::optional & 
ErrCodeMsg::GetSourceLocation() const
+include/comphelper/errcode.hxx:224
+_Bool ErrCodeMsg::operator==(const ErrCodeMsg &) const
+include/comphelper/errcode.hxx:225
+_Bool ErrCodeMsg::operator!=(const ErrCodeMsg &) const
 include/comphelper/flagguard.hxx:33
 ValueRestorationGuard_Impl comphelper::(ValueRestorationGuard_Impl)
 include/comphelper/flagguard.hxx:37
@@ -1060,7 +1068,7 @@ include/oox/export/drawingml.hxx:363
 _Bool oox::drawingml::DrawingML::WriteCharColor(const 
com::sun::star::uno::Reference &)
 include/oox/export/drawingml.hxx:504
 Color oox::drawingml::DrawingML::ColorWithIntensity(unsigned int,unsigned 
int)
-include/oox/helper/attributelist.hxx:69
+include/oox/helper/attributelist.hxx:68
 long 
oox::AttributeConversion::decodeHyper(std::basic_string_view)
 include/oox/helper/containerhelper.hxx:51
 _Bool oox::ValueRange::operator!=(const struct oox::ValueRange &) const
@@ -1104,10 +1112,10 @@ include/sfx2/infobar.hxx:104
 void SfxInfoBarWindow::SetCommandHandler(weld::Button &,const 
rtl::OUString &)
 include/sfx2/lokcomponenthelpers.hxx:49
 void LokChartHelper::Invalidate()
-include/sfx2/msg.hxx:120
+include/sfx2/msg.hxx:119
 const std::type_info * SfxType0::Type() const
-include/sfx2/sidebar/FocusManager.hxx:128
-_Bool sfx2::sidebar::FocusManager::MoveFocusInsideDeckTitle(const 
sfx2::sidebar::FocusManager::FocusLocation &,const int)
+include/sfx2/sidebar/FocusManager.hxx:110
+_Bool sfx2::sidebar::FocusManager::IsPanelTitleVisible(const int) const
 include/sfx2/viewsh.hxx:466
 enum LOKDeviceFormFactor SfxViewShell::GetLOKDeviceFormFactor() const
 include/svl/itemiter.hxx:44
@@ 

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

2023-10-09 Thread Stephan Bergmann (via logerrit)
 compilerplugins/clang/casttovoid.cxx |5 +
 vcl/skia/osx/gdiimpl.cxx |3 +--
 2 files changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 969990becc001d5fe5a34ff976cb022786c10c76
Author: Stephan Bergmann 
AuthorDate: Mon Oct 9 16:36:11 2023 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Oct 9 22:33:02 2023 +0200

Avoid a false loplugin:casttovoid on macOS

...involving conditional preprocessed code at

> vcl/skia/SkiaHelper.cxx:265:13: error: unnecessary cast to void 
[loplugin:casttovoid]
>   265 | (void)blockDisable;
>   | ^~
> vcl/skia/SkiaHelper.cxx:286:22: note: first consumption is here 
[loplugin:casttovoid]
>   286 | if (!blockDisable && 
!DefaultMTLDeviceIsSupported())
>   |  ^~~~

Change-Id: I222d72d240852be2d64fe08d345f00d137cd5a63
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157707
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/compilerplugins/clang/casttovoid.cxx 
b/compilerplugins/clang/casttovoid.cxx
index bddfcb4da503..c02cf6887365 100644
--- a/compilerplugins/clang/casttovoid.cxx
+++ b/compilerplugins/clang/casttovoid.cxx
@@ -425,6 +425,11 @@ private:
 }
 }
 } else {
+if (auto const fun = 
dyn_cast_or_null(i.first->getDeclContext())) {
+if 
(containsPreprocessingConditionalInclusion(fun->getSourceRange())) {
+continue;
+}
+}
 for (auto const j: i.second.castToVoid) {
 report(
 DiagnosticsEngine::Warning, "unnecessary cast to void",
commit ba124320327beea8a4068ffa93a9050fa3dd5c38
Author: Stephan Bergmann 
AuthorDate: Mon Oct 9 16:45:07 2023 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Oct 9 22:32:47 2023 +0200

loplugin:casttovoid

Change-Id: Ifa6c18651b2e3faa4500f19217bf11dba10f02fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157709
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/vcl/skia/osx/gdiimpl.cxx b/vcl/skia/osx/gdiimpl.cxx
index e64f84b111bc..752208c0bc41 100644
--- a/vcl/skia/osx/gdiimpl.cxx
+++ b/vcl/skia/osx/gdiimpl.cxx
@@ -37,9 +37,8 @@
 
 using namespace SkiaHelper;
 
-static void releaseInstalledPixels(void* pAddr, void* pContext)
+static void releaseInstalledPixels(void* pAddr, void*)
 {
-(void)pContext;
 if (pAddr)
 delete[] static_cast(pAddr);
 }


[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang include/sfx2 sc/inc sc/source sd/Library_sd.mk sd/Library_sdui.mk sd/source sfx2/source

2023-09-24 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/unusedmethods.results|  438 +
 compilerplugins/clang/unusedmethods.unused-returns.results |   68 +-
 include/sfx2/sidebar/FocusManager.hxx  |2 
 sc/inc/tablink.hxx |1 
 sc/source/ui/docshell/tablink.cxx  |5 
 sd/Library_sd.mk   |2 
 sd/Library_sdui.mk |1 
 sd/source/filter/html/buttonset.cxx|  247 ---
 sd/source/filter/html/buttonset.hxx|   51 -
 sd/source/filter/html/htmlattr.cxx |   72 --
 sd/source/filter/html/htmlattr.hxx |   40 -
 sd/source/ui/dlg/assclass.cxx  |  160 
 sd/source/ui/inc/assclass.hxx  |   68 --
 sfx2/source/sidebar/FocusManager.cxx   |   28 
 14 files changed, 227 insertions(+), 956 deletions(-)

New commits:
commit c5cff66335ca162b52270059e57214c4065caf66
Author: Noel Grandin 
AuthorDate: Sat Sep 23 21:06:25 2023 +0200
Commit: Noel Grandin 
CommitDate: Sun Sep 24 18:32:29 2023 +0200

loplugin:unusedmethods

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

diff --git a/compilerplugins/clang/unusedmethods.results 
b/compilerplugins/clang/unusedmethods.results
index 335a54622235..0ed5031af7c3 100644
--- a/compilerplugins/clang/unusedmethods.results
+++ b/compilerplugins/clang/unusedmethods.results
@@ -188,7 +188,7 @@ editeng/inc/edtspell.hxx:104
 __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator 
>, std::vector > WrongList::end() const
 editeng/source/editeng/impedit.hxx:234
 tools::Rectangle LOKSpecialPositioning::GetWindowPos(const 
tools::Rectangle &,enum MapUnit) const
-editeng/source/editeng/impedit.hxx:759
+editeng/source/editeng/impedit.hxx:761
 double ImpEditEngine::scaleYFontValue(unsigned short) const
 embeddedobj/source/msole/olecomponent.hxx:75
 _Bool OleComponent::InitializeObject_Impl()
@@ -278,7 +278,7 @@ include/basegfx/curve/b2dcubicbezier.hxx:194
 void basegfx::B2DCubicBezier::transform(const basegfx::B2DHomMatrix &)
 include/basegfx/curve/b2dcubicbezier.hxx:197
 void basegfx::B2DCubicBezier::fround()
-include/basegfx/matrix/b2dhommatrix.hxx:114
+include/basegfx/matrix/b2dhommatrix.hxx:113
 void basegfx::B2DHomMatrix::scale(const basegfx::B2DTuple &)
 include/basegfx/matrix/b2dhommatrixtools.hxx:132
 basegfx::B2DHomMatrix 
basegfx::utils::createRotateAroundCenterKeepAspectRatioStayInsideRange(const 
basegfx::B2DRange &,double)
@@ -298,9 +298,9 @@ include/basegfx/matrix/b3dhommatrix.hxx:105
 basegfx::B3DHomMatrix & basegfx::B3DHomMatrix::operator*=(double)
 include/basegfx/matrix/b3dhommatrix.hxx:106
 basegfx::B3DHomMatrix & basegfx::B3DHomMatrix::operator/=(double)
-include/basegfx/matrix/hommatrixtemplate.hxx:46
+include/basegfx/matrix/hommatrixtemplate.hxx:43
  basegfx::internal::ImplMatLine::ImplMatLine(unsigned short)
-include/basegfx/matrix/hommatrixtemplate.hxx:300
+include/basegfx/matrix/hommatrixtemplate.hxx:297
 _Bool basegfx::internal::ImplHomMatrixTemplate::isInvertible() const
 include/basegfx/numeric/ftools.hxx:116
 double basegfx::snapToRange(double,double,double)
@@ -338,9 +338,9 @@ include/basegfx/range/b1drange.hxx:143
 double basegfx::B1DRange::clamp(double) const
 include/basegfx/range/b2dpolyrange.hxx:64
 _Bool basegfx::B2DPolyRange::operator!=(const basegfx::B2DPolyRange &) 
const
-include/basegfx/range/b2drange.hxx:128
+include/basegfx/range/b2drange.hxx:127
 const basegfx::B2DRange & basegfx::B2DRange::getUnitB2DRange()
-include/basegfx/range/b2drange.hxx:133
+include/basegfx/range/b2drange.hxx:132
 basegfx::B2DRange basegfx::operator*(const basegfx::B2DHomMatrix &,const 
basegfx::B2DRange &)
 include/basegfx/range/b2ibox.hxx:61
  basegfx::B2IBox::B2IBox()
@@ -364,7 +364,7 @@ include/basegfx/range/b3drange.hxx:218
 const basegfx::B3DRange & basegfx::B3DRange::getUnitB3DRange()
 include/basegfx/range/b3drange.hxx:223
 basegfx::B3DRange basegfx::operator*(const basegfx::B3DHomMatrix &,const 
basegfx::B3DRange &)
-include/basegfx/range/Range2D.hxx:170
+include/basegfx/range/Range2D.hxx:176
 Tuple2D basegfx::Range2D::clamp(const 
Tuple2D &) const
 include/basegfx/tuple/b3ituple.hxx:43
  basegfx::B3ITuple::B3ITuple()
@@ -388,25 +388,27 @@ include/basegfx/tuple/Tuple2D.hxx:83
 _Bool basegfx::Tuple2D::equal(const basegfx::Tuple2D &) const
 include/basegfx/utils/b2dclipstate.hxx:72
 _Bool basegfx::utils::B2DClipState::operator!=(const 
basegfx::utils::B2DClipState &) const
-include/basegfx/utils/bgradient.hxx:132
+include/basegfx/utils/bgradient.hxx:113
  

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang include/svx include/xmloff reportdesign/source sd/source svx/source sw/inc xmloff/source

2023-09-05 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/implinheritancehelper.cxx |4 +++
 include/svx/fmdpage.hxx |   12 ++
 include/svx/unopage.hxx |7 +-
 include/xmloff/xmlictxt.hxx |3 ++
 reportdesign/source/core/inc/ReportDrawPage.hxx |1 
 sd/source/ui/inc/unopage.hxx|7 --
 sd/source/ui/slideshow/slideshowimpl.cxx|1 
 sd/source/ui/unoidl/unopage.cxx |   27 +++-
 svx/source/form/fmdpage.cxx |   20 -
 svx/source/unodraw/unopage.cxx  |6 -
 sw/inc/unodraw.hxx  |6 ++---
 xmloff/source/draw/shapeimport.cxx  |2 -
 12 files changed, 23 insertions(+), 73 deletions(-)

New commits:
commit 5a7c5151a5bab89c70984a9b04540c9e0244ecf0
Author: Noel Grandin 
AuthorDate: Tue Sep 5 12:16:15 2023 +0200
Commit: Noel Grandin 
CommitDate: Tue Sep 5 14:31:33 2023 +0200

SAL_WARN->SAL_INFO in XMLShapeImportHelper

these attributes are typically processed elsewhere, so this warning is
not useful

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

diff --git a/include/xmloff/xmlictxt.hxx b/include/xmloff/xmlictxt.hxx
index ea10bd002b83..ab7a70442ffa 100644
--- a/include/xmloff/xmlictxt.hxx
+++ b/include/xmloff/xmlictxt.hxx
@@ -114,6 +114,9 @@ public:
 #define XMLOFF_WARN_UNKNOWN(area, rIter) \
 SAL_WARN(area, "unknown attribute " << 
SvXMLImport::getPrefixAndNameFromToken(rIter.getToken()) << " value=" << 
rIter.toString());
 
+#define XMLOFF_INFO_UNKNOWN(area, rIter) \
+SAL_INFO(area, "unknown attribute " << 
SvXMLImport::getPrefixAndNameFromToken(rIter.getToken()) << " value=" << 
rIter.toString());
+
 #define XMLOFF_WARN_UNKNOWN_ATTR(area, token, value) \
 SAL_WARN(area, "unknown attribute " << 
SvXMLImport::getPrefixAndNameFromToken(token) << "=" << value);
 
diff --git a/xmloff/source/draw/shapeimport.cxx 
b/xmloff/source/draw/shapeimport.cxx
index 45c1d22fcabb..5b0e6d101787 100644
--- a/xmloff/source/draw/shapeimport.cxx
+++ b/xmloff/source/draw/shapeimport.cxx
@@ -349,7 +349,7 @@ SvXMLShapeContext* 
XMLShapeImportHelper::CreateGroupChildContext(
 for (auto  : sax_fastparser::castToFastAttributeList( xAttrList ))
 {
 if (!pContext->processAttribute( aIter ))
-XMLOFF_WARN_UNKNOWN("xmloff", aIter);
+XMLOFF_INFO_UNKNOWN("xmloff", aIter);
 }
 return pContext;
 }
commit 5fac945201bc381e0642218c380a6a72cfc6328c
Author: Noel Grandin 
AuthorDate: Tue Sep 5 11:38:10 2023 +0200
Commit: Noel Grandin 
CommitDate: Tue Sep 5 14:31:24 2023 +0200

SvxDrawPage does not need to use aggregation

we use custom subclasses when we want to modify behaviour

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

diff --git a/compilerplugins/clang/implinheritancehelper.cxx 
b/compilerplugins/clang/implinheritancehelper.cxx
index fb24ed96f2dd..1eb1db60a90b 100644
--- a/compilerplugins/clang/implinheritancehelper.cxx
+++ b/compilerplugins/clang/implinheritancehelper.cxx
@@ -74,6 +74,10 @@ bool ImplInheritanceHelper::VisitCXXRecordDecl(const 
CXXRecordDecl* cxxRecordDec
 .Namespace("pcr")
 .GlobalNamespace())
 return true;
+if 
(loplugin::DeclCheck(cxxRecordDecl).Class("SdDrawPage").GlobalNamespace())
+return true;
+if 
(loplugin::DeclCheck(cxxRecordDecl).Class("SdMasterPage").GlobalNamespace())
+return true;
 
 // check if this class extends cppu::WeakImplHelper
 if (!loplugin::isDerivedFrom(cxxRecordDecl, [](Decl const* decl) -> bool {
diff --git a/include/svx/fmdpage.hxx b/include/svx/fmdpage.hxx
index 3842e8b0b02e..e7f3732cad1c 100644
--- a/include/svx/fmdpage.hxx
+++ b/include/svx/fmdpage.hxx
@@ -21,14 +21,14 @@
 
 #include 
 #include 
-#include 
 #include 
 
 
 // SvxFmDrawPage
 
-class SVXCORE_DLLPUBLIC SvxFmDrawPage   :public SvxDrawPage
-,public css::form::XFormsSupplier2
+typedef cppu::ImplInheritanceHelper 
SvxFmDrawPage_Base;
+
+class SVXCORE_DLLPUBLIC SvxFmDrawPage : public SvxFmDrawPage_Base
 {
 protected:
 
@@ -44,14 +44,8 @@ public:
 SvxFmDrawPage( SdrPage* pPage );
 virtual ~SvxFmDrawPage() noexcept override;
 
-// UNO binding
-DECLARE_UNO3_AGG_DEFAULTS(SvxFmDrawPage, SvxDrawPage)
-
-virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type& 
aType ) override;
 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() 
override;
 
-virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes(  ) 
override;
-
 // XFormsSupplier
 virtual css::uno::Reference< 

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang include/unotools sc/source sd/source unotools/source

2023-07-21 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/unusedmethods.results |  248 +---
 compilerplugins/clang/unusedmethods.unused-returns.results  |   38 -
 include/unotools/pathoptions.hxx|   19 
 sc/source/ui/inc/output.hxx |4 
 sc/source/ui/view/output2.cxx   |4 
 sd/source/ui/slidesorter/controller/SlsPageSelector.cxx |9 
 sd/source/ui/slidesorter/inc/controller/SlsPageSelector.hxx |7 
 unotools/source/config/pathoptions.cxx  |  114 -
 8 files changed, 135 insertions(+), 308 deletions(-)

New commits:
commit b735eba5a80984ca6c291e4265fae5551b11e64e
Author: Noel Grandin 
AuthorDate: Fri Jul 21 13:40:25 2023 +0200
Commit: Noel Grandin 
CommitDate: Fri Jul 21 22:16:57 2023 +0200

loplugin:unusedmethods

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

diff --git a/compilerplugins/clang/unusedmethods.results 
b/compilerplugins/clang/unusedmethods.results
index 4296a0144afd..77d563e9d719 100644
--- a/compilerplugins/clang/unusedmethods.results
+++ b/compilerplugins/clang/unusedmethods.results
@@ -32,13 +32,11 @@ canvas/inc/rendering/isurfaceproxymanager.hxx:63
 std::shared_ptr 
canvas::createSurfaceProxyManager(const std::shared_ptr &)
 canvas/inc/vclwrapper.hxx:66
  
canvas::vcltools::VCLObject::VCLObject(unique_ptr >)
-canvas/inc/vclwrapper.hxx:135
-type-parameter-?-? & canvas::vcltools::VCLObject::get()
-canvas/inc/vclwrapper.hxx:136
-const type-parameter-?-? & canvas::vcltools::VCLObject::get() const
 canvas/inc/vclwrapper.hxx:138
 void canvas::vcltools::VCLObject::swap(VCLObject &)
-canvas/source/vcl/impltools.hxx:102
+canvas/source/vcl/canvasfont.hxx:78
+const struct com::sun::star::geometry::Matrix2D & 
vclcanvas::CanvasFont::getFontMatrix() const
+canvas/source/vcl/impltools.hxx:107
  vclcanvas::tools::LocalGuard::LocalGuard()
 chart2/source/view/axes/VAxisBase.hxx:73
 std::shared_ptr chart::VAxisBase::getDataTableView()
@@ -138,8 +136,6 @@ 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:252
-rtl::OUString dbaui::OPostgresConnectionPageSetup::impl_getURL() const
 dbaccess/source/ui/inc/dsmeta.hxx:87
 __gnu_debug::_Safe_iterator, 
std::set > dbaui::FeatureSet::begin() const
 dbaccess/source/ui/inc/dsmeta.hxx:88
@@ -270,8 +266,6 @@ filter/source/svg/svgwriter.hxx:347
 Color SVGActionWriter::ImplGetColorWithIntensity(const Color &,unsigned 
short)
 hwpfilter/source/hiodev.h:63
 unsigned long HIODev::read4b(void *,unsigned long)
-i18npool/source/localedata/LocaleNode.hxx:52
-void OFileWriter::writeIntParameter(const char *,const short,short) const
 idl/source/prj/svidl.cxx:103
 int main(int,char **)
 include/basegfx/color/bcolormodifier.hxx:392
@@ -380,11 +374,11 @@ include/basegfx/tuple/b3ituple.hxx:75
 int & basegfx::B3ITuple::operator[](int)
 include/basegfx/tuple/Size2D.hxx:72
 Size2D & basegfx::Size2D::operator/=(type-parameter-?-?)
-include/basegfx/tuple/Size2D.hxx:90
+include/basegfx/tuple/Size2D.hxx:92
 Size2D basegfx::operator+(const 
Size2D &,const Size2D &)
-include/basegfx/tuple/Size2D.hxx:98
+include/basegfx/tuple/Size2D.hxx:100
 Size2D basegfx::operator*(const 
Size2D &,const Size2D &)
-include/basegfx/tuple/Size2D.hxx:106
+include/basegfx/tuple/Size2D.hxx:108
 Size2D basegfx::operator/(const 
Size2D &,const Size2D &)
 include/basegfx/tuple/Tuple2D.hxx:83
 _Bool basegfx::Tuple2D::equal(const basegfx::Tuple2D &) const
@@ -396,16 +390,24 @@ include/basegfx/utils/b2dclipstate.hxx:72
 _Bool basegfx::utils::B2DClipState::operator!=(const 
basegfx::utils::B2DClipState &) const
 include/basegfx/utils/bgradient.hxx:132
  
basegfx::BColorStops::BColorStops(__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator >, 
std::vector 
>,__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator >, 
std::vector >)
-include/basegfx/utils/canvastools.hxx:110
+include/basegfx/utils/canvastools.hxx:111
 struct com::sun::star::geometry::AffineMatrix3D & 
basegfx::unotools::affineMatrixFromHomMatrix3D(struct 
com::sun::star::geometry::AffineMatrix3D &,const basegfx::B3DHomMatrix &)
-include/basegfx/utils/canvastools.hxx:130
+include/basegfx/utils/canvastools.hxx:131
 basegfx::B3DRange basegfx::unotools::b3DRectangleFromRealRectangle3D(const 
struct com::sun::star::geometry::RealRectangle3D &)
 include/basegfx/utils/systemdependentdata.hxx:83
 unsigned int 
basegfx::SystemDependentData::getCombinedHoldCyclesInSeconds() const
 include/basegfx/utils/unopolypolygon.hxx:87
 const basegfx::B2DPolyPolygon & 

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

2023-07-21 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/unusedfields.only-used-in-constructor.results |   46 
++-
 compilerplugins/clang/unusedfields.readonly.results |   16 +-
 compilerplugins/clang/unusedfields.untouched.results|   20 +--
 compilerplugins/clang/unusedfields.writeonly.results|   62 
--
 vcl/source/gdi/pdfextoutdevdata.cxx |2 
 xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx  |6 
 6 files changed, 60 insertions(+), 92 deletions(-)

New commits:
commit a66b9c9adfb2306a021cd286c8346dd1058499ce
Author: Noel Grandin 
AuthorDate: Fri Jul 21 11:52:24 2023 +0200
Commit: Noel Grandin 
CommitDate: Fri Jul 21 22:16:34 2023 +0200

loplugin:unusedfields

Change-Id: Ic2e9de67a00bb9ca8ab4d0f7528b22c58d0cc360
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154721
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 d897f095b3c2..01db79dd80aa 100644
--- a/compilerplugins/clang/unusedfields.only-used-in-constructor.results
+++ b/compilerplugins/clang/unusedfields.only-used-in-constructor.results
@@ -16,7 +16,7 @@ binaryurp/source/writer.hxx:135
 binaryurp::Writer state_ WriterState
 canvas/source/tools/surfaceproxy.hxx:104
 canvas::SurfaceProxy mpPageManager PageManagerSharedPtr
-canvas/source/vcl/impltools.hxx:114
+canvas/source/vcl/impltools.hxx:119
 vclcanvas::tools::LocalGuard aSolarGuard SolarMutexGuard
 chart2/source/controller/accessibility/AccessibleChartShape.hxx:78
 chart::AccessibleChartShape m_aShapeTreeInfo 
::accessibility::AccessibleShapeTreeInfo
@@ -140,7 +140,7 @@ cppu/source/uno/check.cxx:267
 (anonymous namespace)::Char4 chars Char3
 cui/source/dialogs/colorpicker.cxx:748
 cui::(anonymous namespace)::ColorPickerDialog m_aColorPrevious 
ColorPreviewControl
-cui/source/factory/dlgfact.cxx:1240
+cui/source/factory/dlgfact.cxx:1245
 (anonymous namespace)::SvxMacroAssignDialog_Impl m_aItems SfxItemSet
 cui/source/inc/AdditionsDialog.hxx:47
 AdditionInfo sReleaseVersion OUString
@@ -586,9 +586,9 @@ sc/inc/token.hxx:402
 SingleDoubleRefModifier aDub ScComplexRefData
 sc/qa/unit/tiledrendering/tiledrendering.cxx:439
 (anonymous namespace)::ViewCallback m_callbackWrapper 
TestLokCallbackWrapper
-sc/source/core/data/document.cxx:1252
+sc/source/core/data/document.cxx:1217
 (anonymous namespace)::BroadcastRecalcOnRefMoveGuard aSwitch 
sc::AutoCalcSwitch
-sc/source/core/data/document.cxx:1253
+sc/source/core/data/document.cxx:1218
 (anonymous namespace)::BroadcastRecalcOnRefMoveGuard aBulk ScBulkBroadcast
 sc/source/core/data/table2.cxx:812
 (anonymous namespace)::TransClipHandler mnEndRow size_t
@@ -810,7 +810,7 @@ 
svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx:1098
 (anonymous namespace)::ExpressionGrammar::definition identifier 
::boost::spirit::classic::rule
 svx/source/dialog/contimp.hxx:75
 SvxSuperContourDlg aContourItem SvxContourDlgItem
-svx/source/dialog/framelinkarray.cxx:520
+svx/source/dialog/framelinkarray.cxx:515
 svx::frame::(anonymous namespace)::MergedCellIterator mnFirstRow sal_Int32
 svx/source/dialog/imapwnd.hxx:88
 IMapWindow maItemInfos SfxItemInfo[1]
@@ -832,8 +832,6 @@ sw/inc/unosett.hxx:144
 SwXNumberingRules m_pImpl ::sw::UnoImplPtr
 sw/qa/core/test_ToxTextGenerator.cxx:140
 (anonymous namespace)::ToxTextGeneratorWithMockedChapterField 
mChapterFieldType SwChapterFieldType
-sw/qa/extras/rtfimport/rtfimport.cxx:73
-Test m_aSavedSettings AllSettings
 sw/qa/extras/uiwriter/uiwriter5.cxx:66
 SwUiWriterTest5 m_aSavedSettings AllSettings
 sw/qa/extras/uiwriter/uiwriter7.cxx:2286
@@ -878,8 +876,6 @@ sw/source/uibase/inc/uivwimp.hxx:95
 SwView_Impl m_xTmpSelDocShell SfxObjectShellLock
 sw/source/uibase/inc/unodispatch.hxx:43
 SwXDispatchProviderInterceptor::DispatchMutexLock_Impl aGuard 
SolarMutexGuard
-sw/source/uibase/sidebar/A11yCheckIssuesPanel.hxx:91
-sw::sidebar::A11yCheckIssuesPanel m_getIssueCollection 
std::function
 toolkit/source/awt/stylesettings.cxx:74
 toolkit::(anonymous namespace)::StyleMethodGuard m_aGuard SolarMutexGuard
 ucb/source/ucp/gio/gio_mount.hxx:73
@@ -896,7 +892,7 @@ vcl/inc/graphic/Manager.hxx:42
 vcl::graphic::Manager maSwapOutTimer Timer
 vcl/inc/headless/BitmapHelper.hxx:32
 BitmapHelper aTmpBmp SvpSalBitmap
-vcl/inc/jsdialog/jsdialogbuilder.hxx:702
+vcl/inc/jsdialog/jsdialogbuilder.hxx:716
 JSToolbar m_pPopovers std::map
 vcl/inc/pdf/pdfbuildin_fonts.hxx:34
 vcl::pdf::BuildinFont m_nAscent const int
@@ -906,9 +902,9 @@ vcl/inc/pdf/pdfbuildin_fonts.hxx:42
 vcl::pdf::BuildinFont m_aWidths const int[256]
 vcl/inc/salprn.hxx:45
 SalPrinterQueueInfo moPortName std::optional
-vcl/inc/salvtables.hxx:615
+vcl/inc/salvtables.hxx:616
 

[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 svx/source

2023-06-03 Thread Szymon Kłos (via logerrit)
 compilerplugins/clang/badstatics.cxx|1 
 svx/source/inc/StylesPreviewWindow.hxx  |1 
 svx/source/tbxctrls/StylesPreviewWindow.cxx |   66 +---
 3 files changed, 61 insertions(+), 7 deletions(-)

New commits:
commit d8b834a750a284ecd04cac1f4de4cb9cbf05c42c
Author: Szymon Kłos 
AuthorDate: Fri Jun 2 18:31:55 2023 +0200
Commit: Caolán McNamara 
CommitDate: Sat Jun 3 17:44:01 2023 +0200

Styles preview cache cleanup on exit

Change-Id: I28929d4137008ebcca1733837d0b2112b6859a89
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152563
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152576
Tested-by: Jenkins

diff --git a/compilerplugins/clang/badstatics.cxx 
b/compilerplugins/clang/badstatics.cxx
index 7c604bc5ee66..f22dabac9b48 100644
--- a/compilerplugins/clang/badstatics.cxx
+++ b/compilerplugins/clang/badstatics.cxx
@@ -199,9 +199,8 @@ public:
 || name == "g_aWindowList"
 //vcl/unx/gtk3/a11y/atkutil.cxx, asserted empty at exit
 || name == "gFontPreviewVirDevs"
-|| (loplugin::DeclCheck(pVarDecl).Var("aPreviewCache")
-.Class("StylesPreviewWindow_Base").GlobalNamespace()) // 
TODO: temp disable
 //svtools/source/control/ctrlbox.cxx, empty at exit
+|| name == "gStylePreviewCache" // 
svx/source/tbxctrls/StylesPreviewWindow.cxx
 || name == "aLogger" // FormulaLogger& FormulaLogger::get() in 
sc/source/core/tool/formulalogger.cxx
 || name == "s_aUncommittedRegistrations" // 
sw/source/uibase/dbui/dbmgr.cxx
 || (loplugin::DeclCheck(pVarDecl).Var("aAllListeners")
diff --git a/svx/source/inc/StylesPreviewWindow.hxx 
b/svx/source/inc/StylesPreviewWindow.hxx
index 47e21dcb4ca0..de4984e35968 100644
--- a/svx/source/inc/StylesPreviewWindow.hxx
+++ b/svx/source/inc/StylesPreviewWindow.hxx
@@ -127,8 +127,6 @@ private:
 void UpdateStylesList();
 void UpdateSelection();
 bool Command(const CommandEvent& rEvent);
-
-static std::map> aPreviewCache;
 };
 
 class StylesPreviewWindow_Impl final : public InterimItemWindow, public 
StylesPreviewWindow_Base
diff --git a/svx/source/tbxctrls/StylesPreviewWindow.cxx 
b/svx/source/tbxctrls/StylesPreviewWindow.cxx
index c1e3549fb54a..a51283d0d750 100644
--- a/svx/source/tbxctrls/StylesPreviewWindow.cxx
+++ b/svx/source/tbxctrls/StylesPreviewWindow.cxx
@@ -60,7 +60,36 @@
 
 #include 
 
-std::map> 
StylesPreviewWindow_Base::aPreviewCache;
+namespace
+{
+class StylePreviewCache
+{
+static std::map> gStylePreviewCache;
+static int gStylePreviewCacheClients;
+
+public:
+static std::map>& Get() { return 
gStylePreviewCache; }
+
+static void ClearCache()
+{
+for (auto& aPreview : gStylePreviewCache)
+aPreview.second.disposeAndClear();
+
+gStylePreviewCache.clear();
+}
+
+static void RegisterClient() { gStylePreviewCacheClients++; }
+static void UnregisterClient()
+{
+gStylePreviewCacheClients--;
+if (!gStylePreviewCacheClients)
+ClearCache();
+}
+};
+
+std::map> 
StylePreviewCache::gStylePreviewCache;
+int StylePreviewCache::gStylePreviewCacheClients;
+}
 
 StyleStatusListener::StyleStatusListener(
 StylesPreviewWindow_Base* pPreviewControl,
@@ -103,8 +132,10 @@ StylePoolChangeListener::~StylePoolChangeListener()
 EndListening(*m_pStyleSheetPool);
 }
 
-void StylePoolChangeListener::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& 
/*rHint*/)
+void StylePoolChangeListener::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& 
rHint)
 {
+if (rHint.GetId() == SfxHintId::StyleSheetModified)
+StylePreviewCache::ClearCache();
 m_pPreviewControl->RequestStylesListUpdate();
 }
 
@@ -378,6 +409,8 @@ StylesPreviewWindow_Base::StylesPreviewWindow_Base(
 , m_aUpdateTask(*this)
 , m_aDefaultStyles(std::move(aDefaultStyles))
 {
+StylePreviewCache::RegisterClient();
+
 m_xStylesView->connect_selection_changed(LINK(this, 
StylesPreviewWindow_Base, Selected));
 m_xStylesView->connect_item_activated(LINK(this, StylesPreviewWindow_Base, 
DoubleClick));
 m_xStylesView->connect_command(LINK(this, StylesPreviewWindow_Base, 
DoCommand));
@@ -424,6 +457,8 @@ StylesPreviewWindow_Base::~StylesPreviewWindow_Base()
 
 m_aUpdateTask.Stop();
 
+StylePreviewCache::UnregisterClient();
+
 try
 {
 m_xStatusListener->dispose();
@@ -465,8 +500,9 @@ void StylesListUpdateTask::Invoke()
 VclPtr
 StylesPreviewWindow_Base::GetCachedPreview(const std::pair& rStyle)
 {
-if (aPreviewCache.find(rStyle.second) != aPreviewCache.end())
-return aPreviewCache[rStyle.second];
+auto aFound = StylePreviewCache::Get().find(rStyle.second);
+if (aFound != StylePreviewCache::Get().end())
+

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang include/drawinglayer

2022-12-22 Thread Stephan Bergmann (via logerrit)
 compilerplugins/clang/check.cxx  |   13 ++---
 compilerplugins/clang/check.hxx  |4 +++-
 include/drawinglayer/processor2d/d2dpixelprocessor2d.hxx |2 +-
 3 files changed, 14 insertions(+), 5 deletions(-)

New commits:
commit e816ca42f9f5d21ae50939559900c1aede994d0e
Author: Stephan Bergmann 
AuthorDate: Thu Dec 22 09:39:52 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Dec 22 10:44:42 2022 +

-Werror,-Wmicrosoft-extra-qualification (clang-cl)

Change-Id: I7f0f551110d1df4e27d89ac1016fb5ff3f71151d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144736
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/include/drawinglayer/processor2d/d2dpixelprocessor2d.hxx 
b/include/drawinglayer/processor2d/d2dpixelprocessor2d.hxx
index 3d84d6dd42af..a08fef7b7ae2 100644
--- a/include/drawinglayer/processor2d/d2dpixelprocessor2d.hxx
+++ b/include/drawinglayer/processor2d/d2dpixelprocessor2d.hxx
@@ -80,7 +80,7 @@ class DRAWINGLAYER_DLLPUBLIC D2DPixelProcessor2D : public 
BaseProcessor2D
 processMarkerArrayPrimitive2D(const primitive2d::MarkerArrayPrimitive2D& 
rMarkerArrayCandidate);
 void processBackgroundColorPrimitive2D(
 const primitive2d::BackgroundColorPrimitive2D& 
rBackgroundColorCandidate);
-void D2DPixelProcessor2D::processPolygonStrokePrimitive2D(
+void processPolygonStrokePrimitive2D(
 const primitive2d::PolygonStrokePrimitive2D& rPolygonStrokeCandidate);
 void processLineRectanglePrimitive2D(
 const primitive2d::LineRectanglePrimitive2D& 
rLineRectanglePrimitive2D);
commit 28f248a3397b50ae6047a7a907f5a159b1b1d310
Author: Stephan Bergmann 
AuthorDate: Thu Dec 22 09:33:05 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Dec 22 10:44:35 2022 +

Make namespace checks look through LinkageSpecs

My clang-cl --with-visual-studio=2022preview build against VS 2022 Preview
17.5.0 Preview 2.0 had started to fail with

> [build CPT] compilerplugins/clang/test/getstr.cxx
> error: 'error' diagnostics expected but not seen:
>   File compilerplugins/clang/test/getstr.cxx Line 42: directly use object 
of type '{{(rtl::)?}}OString' in a call of 'operator <<', instead of calling 
'getStr' first [loplugin:getstr]
>   File compilerplugins/clang/test/getstr.cxx Line 48: directly use object 
of type 'S' (aka 'rtl::OString') in a call of 'operator <<', instead of calling 
'getStr' first [loplugin:getstr]
>   File compilerplugins/clang/test/getstr.cxx Line 49: directly use object 
of type 'rtl::OString' in a call of 'operator <<', instead of calling 'getStr' 
first [loplugin:getstr]
>   File compilerplugins/clang/test/getstr.cxx Line 55: directly use object 
of type 'rtl::OString' in a call of 'operator <<', instead of calling 'getStr' 
first [loplugin:getstr]
>   File compilerplugins/clang/test/getstr.cxx Line 57: directly use object 
of type '{{(rtl::)?}}OString' in a call of 'operator <<', instead of calling 
'getStr' first [loplugin:getstr]
> 5 errors generated.

apparently because
C:/Program Files/Microsoft Visual 
Studio/2022/Preview/VC/Tools/MSVC/14.35.32124/include/ostream
now contains

[...]
> _EXPORT_STD extern "C++" template 
> class basic_ostream : virtual public basic_ios<_Elem, _Traits> { // 
control insertions into a stream buffer
[...]

with a wrapping extern "C++", so the call to StdNamespace() in

> if (!loplugin::TypeCheck(expr->getArg(0)->getType())
>  .ClassOrStruct("basic_ostream")
>  .StdNamespace()) //TODO: check template args

in compilerplugins/clang/getstr.cxx no longer matched

Change-Id: Iaeb461d5aa855a8602c5c6f791407c08a1c5d309
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144735
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/compilerplugins/clang/check.cxx b/compilerplugins/clang/check.cxx
index 93fd7c7f7307..7be98bf97d5c 100644
--- a/compilerplugins/clang/check.cxx
+++ b/compilerplugins/clang/check.cxx
@@ -202,7 +202,7 @@ TerminalCheck ContextCheck::GlobalNamespace() const {
 
 TerminalCheck ContextCheck::StdNamespace() const {
 return TerminalCheck(
-context_ != nullptr && context_->isStdNamespace());
+context_ != nullptr && lookThroughLinkageSpec()->isStdNamespace());
 }
 
 namespace {
@@ -224,15 +224,22 @@ bool isStdOrNestedNamespace(clang::DeclContext const * 
context) {
 }
 
 TerminalCheck ContextCheck::StdOrNestedNamespace() const {
-return TerminalCheck(context_ != nullptr && 
isStdOrNestedNamespace(context_));
+return TerminalCheck(context_ != nullptr && 
isStdOrNestedNamespace(lookThroughLinkageSpec()));
 }
 
 ContextCheck ContextCheck::AnonymousNamespace() const {
-auto n = llvm::dyn_cast_or_null(context_);
+auto n = 
llvm::dyn_cast_or_null(lookThroughLinkageSpec());
 return 

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang solenv/CompilerTest_compilerplugins_clang.mk xmlhelp/source

2022-12-19 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/implinheritancehelper.cxx  |  120 +++
 compilerplugins/clang/test/implinheritancehelper.cxx |   26 
 solenv/CompilerTest_compilerplugins_clang.mk |1 
 xmlhelp/source/cxxhelp/provider/provider.cxx |   49 ---
 xmlhelp/source/cxxhelp/provider/provider.hxx |   17 --
 5 files changed, 150 insertions(+), 63 deletions(-)

New commits:
commit 0a5d85e76f12d1819b0ed1d5b531e731e57c201c
Author: Noel Grandin 
AuthorDate: Mon Dec 19 08:48:21 2022 +0200
Commit: Noel Grandin 
CommitDate: Tue Dec 20 06:05:13 2022 +

new loplugin:implinheritancehelper

Look for places we should be using ImplInheritanceHelper, which handles
various boilerplate for us

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

diff --git a/compilerplugins/clang/implinheritancehelper.cxx 
b/compilerplugins/clang/implinheritancehelper.cxx
new file mode 100644
index ..fb24ed96f2dd
--- /dev/null
+++ b/compilerplugins/clang/implinheritancehelper.cxx
@@ -0,0 +1,120 @@
+/* -*- 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 
+#include 
+
+#include "check.hxx"
+#include "plugin.hxx"
+#include "config_clang.h"
+#include "clang/AST/CXXInheritance.h"
+
+/**
+
+Look for places where we should be using ImplInheritanceHelper
+
+*/
+
+namespace
+{
+class ImplInheritanceHelper : public 
loplugin::FilteringPlugin
+{
+public:
+explicit ImplInheritanceHelper(loplugin::InstantiationData const& data)
+: FilteringPlugin(data)
+{
+}
+
+virtual bool preRun() override { return true; }
+
+virtual void run() override
+{
+if (preRun())
+TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
+}
+
+bool VisitCXXRecordDecl(const CXXRecordDecl*);
+};
+
+bool ImplInheritanceHelper::VisitCXXRecordDecl(const CXXRecordDecl* 
cxxRecordDecl)
+{
+if (ignoreLocation(cxxRecordDecl))
+return true;
+if (!cxxRecordDecl->isThisDeclarationADefinition())
+return true;
+if (cxxRecordDecl->isDependentContext())
+return true;
+
+// ignore the utility template classes
+SourceLocation spellingLocation
+= 
compiler.getSourceManager().getSpellingLoc(cxxRecordDecl->getBeginLoc());
+StringRef fileName = getFilenameOfLocation(spellingLocation);
+if (loplugin::hasPathnamePrefix(fileName, SRCDIR "/include/cppu"))
+return true;
+if (loplugin::isSamePathname(fileName, SRCDIR 
"/include/comphelper/compbase.hxx"))
+return true;
+
+// not sure why this extends XPropertyState but does not support it in 
queryInterface.
+if (loplugin::DeclCheck(cxxRecordDecl)
+.Class("ChainablePropertySet")
+.Namespace("comphelper")
+.GlobalNamespace())
+return true;
+// in these cases the UNO interface is optional
+if 
(loplugin::DeclCheck(cxxRecordDecl).Class("OFSInputStreamContainer").GlobalNamespace())
+return true;
+if (loplugin::DeclCheck(cxxRecordDecl)
+.Class("OPropertyBrowserController")
+.Namespace("pcr")
+.GlobalNamespace())
+return true;
+
+// check if this class extends cppu::WeakImplHelper
+if (!loplugin::isDerivedFrom(cxxRecordDecl, [](Decl const* decl) -> bool {
+return bool(loplugin::DeclCheck(decl)
+.Class("WeakImplHelper")
+.Namespace("cppu")
+.GlobalNamespace());
+}))
+return true;
+// check if this class directly inherits from a UNO interface class
+bool foundOne = false;
+for (auto const& i : cxxRecordDecl->bases())
+{
+auto rt = i.getType()->getAs();
+if (!rt)
+continue;
+auto const bd = cast(rt->getDecl())->getDefinition();
+auto ctx = bd->getDeclContext();
+if (!ctx->isNamespace())
+break;
+auto ns = dyn_cast(ctx);
+while (ns)
+{
+if (ns->getIdentifier() && ns->getName() == "star")
+{
+foundOne = true;
+break;
+}
+ns = dyn_cast_or_null(ns->getParent());
+}
+}
+if (!foundOne)
+return true;
+report(DiagnosticsEngine::Warning, "can probably use ImplInheritanceHelper 
here",
+   cxxRecordDecl->getLocation())
+<< cxxRecordDecl->getSourceRange();
+return true;
+}
+
+loplugin::Plugin::Registration
+implinheritancehelper("implinheritancehelper");
+}
+
+/* 

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang officecfg/registry sdext/source sd/uiconfig sd/UIConfig_simpress.mk

2022-12-06 Thread Caolán McNamara (via logerrit)
 compilerplugins/clang/unusedenumconstants.writeonly.results   |
2 
 officecfg/registry/data/org/openoffice/Office/PresentationMinimizer.xcu   |   
22 
 officecfg/registry/schema/org/openoffice/Office/PresentationMinimizer.xcs |   
32 -
 sd/UIConfig_simpress.mk   |
1 
 sd/uiconfig/simpress/ui/pminfodialog.ui   |   
46 +
 sdext/source/minimizer/impoptimizer.cxx   |
9 
 sdext/source/minimizer/impoptimizer.hxx   |
4 
 sdext/source/minimizer/informationdialog.cxx  |  
272 +-
 sdext/source/minimizer/informationdialog.hxx  |   
41 -
 sdext/source/minimizer/optimizerdialog.cxx|
3 
 sdext/source/minimizer/pppoptimizertoken.cxx  |   
13 
 sdext/source/minimizer/pppoptimizertoken.hxx  |   
13 
 12 files changed, 137 insertions(+), 321 deletions(-)

New commits:
commit 54f74923644c427f5d5c1aaf307be866d1991816
Author: Caolán McNamara 
AuthorDate: Tue Dec 6 16:34:23 2022 +
Commit: Caolán McNamara 
CommitDate: Tue Dec 6 19:30:22 2022 +

weld InformationDialog info dialog

Change-Id: I6a3631fe06a1b46164f01d706ecefd7252509382
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143740
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/compilerplugins/clang/unusedenumconstants.writeonly.results 
b/compilerplugins/clang/unusedenumconstants.writeonly.results
index bf474efc7ad8..e78ed74414cd 100644
--- a/compilerplugins/clang/unusedenumconstants.writeonly.results
+++ b/compilerplugins/clang/unusedenumconstants.writeonly.results
@@ -3952,8 +3952,6 @@ sdext/source/minimizer/pppoptimizertoken.hxx:110
 enum PPPOptimizerTokenEnum STR_SLIDES
 sdext/source/minimizer/pppoptimizertoken.hxx:116
 enum PPPOptimizerTokenEnum STR_SUMMARY
-sdext/source/minimizer/pppoptimizertoken.hxx:119
-enum PPPOptimizerTokenEnum STR_AUTOMATICALLY_OPEN
 sdext/source/minimizer/pppoptimizertoken.hxx:122
 enum PPPOptimizerTokenEnum STR_DELETE_SLIDES
 sdext/source/minimizer/pppoptimizertoken.hxx:123
diff --git 
a/officecfg/registry/data/org/openoffice/Office/PresentationMinimizer.xcu 
b/officecfg/registry/data/org/openoffice/Office/PresentationMinimizer.xcu
index f1ac8d8f1891..f9a9ea5e3546 100644
--- a/officecfg/registry/data/org/openoffice/Office/PresentationMinimizer.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/PresentationMinimizer.xcu
@@ -47,9 +47,6 @@ The current presentation contains no OLE objects.
 
 Summary
 
-
-~Open newly created presentation
-
 
 Delete %SLIDES slides.
 
@@ -65,17 +62,20 @@ The current presentation contains no OLE objects.
 
 OK
 
-
-The Presentation Minimizer has 
successfully updated the presentation '%TITLE'. The file size has changed from 
%OLDFILESIZE MB to %NEWFILESIZE MB.
+
+Successfully updated the presentation 
'%TITLE'.
+
+
+The file size has changed from 
%OLDFILESIZE MB to %NEWFILESIZE MB.
 
-
-The Presentation Minimizer has 
successfully updated the presentation '%TITLE'. The file size has changed from 
%OLDFILESIZE MB to approximated %NEWFILESIZE MB.
+
+The file size has changed from 
%OLDFILESIZE MB to approximated %NEWFILESIZE MB.
 
-
-The Presentation Minimizer has 
successfully updated the presentation '%TITLE'. The file size has changed to 
%NEWFILESIZE MB.
+
+The file size has changed to %NEWFILESIZE 
MB.
 
-
-The Presentation Minimizer has 
successfully updated the presentation '%TITLE'. The file size has changed to 
approximated %NEWFILESIZE MB.
+
+The file size has changed to approximated 
%NEWFILESIZE MB.
 
 
 Duplicating presentation...
diff --git 
a/officecfg/registry/schema/org/openoffice/Office/PresentationMinimizer.xcs 
b/officecfg/registry/schema/org/openoffice/Office/PresentationMinimizer.xcs
index d2148807ca01..8a6eadb7c3a8 100644
--- a/officecfg/registry/schema/org/openoffice/Office/PresentationMinimizer.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/PresentationMinimizer.xcs
@@ -161,10 +161,6 @@ The current presentation contains no OLE objects.
String STR_SUMMARY.
Summary

-   
-   String STR_AUTOMATICALLY_OPEN.
-   ~Open newly created presentation
-   

String STR_DELETE_SLIDES.
Delete %SLIDES slides
@@ -187,21 +183,25 

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang include/vcl officecfg/registry sdext/source sd/uiconfig sd/UIConfig_simpress.mk vcl/inc vcl/source vcl/unx

2022-12-06 Thread Caolán McNamara (via logerrit)
 compilerplugins/clang/unusedenumconstants.writeonly.results   |   
64 
 include/vcl/weld.hxx  |
2 
 officecfg/registry/data/org/openoffice/Office/PresentationMinimizer.xcu   |  
110 -
 officecfg/registry/schema/org/openoffice/Office/PresentationMinimizer.xcs |  
146 -
 sd/UIConfig_simpress.mk   |
5 
 sd/uiconfig/simpress/ui/pmimagespage.ui   |  
201 +
 sd/uiconfig/simpress/ui/pmintropage.ui|  
134 +
 sd/uiconfig/simpress/ui/pmobjectspage.ui  |  
120 +
 sd/uiconfig/simpress/ui/pmslidespage.ui   |  
129 +
 sd/uiconfig/simpress/ui/pmsummarypage.ui  |  
267 ++
 sdext/source/minimizer/configurationaccess.cxx|
2 
 sdext/source/minimizer/configurationaccess.hxx|
6 
 sdext/source/minimizer/optimizerdialog.cxx| 
1042 --
 sdext/source/minimizer/optimizerdialog.hxx|  
258 +-
 sdext/source/minimizer/optimizerdialogcontrols.cxx|  
604 -
 sdext/source/minimizer/pppoptimizerdialog.cxx |
1 
 sdext/source/minimizer/pppoptimizertoken.cxx  |   
56 
 sdext/source/minimizer/pppoptimizertoken.hxx  |   
54 
 vcl/inc/wizdlg.hxx|
1 
 vcl/source/app/salvtables.cxx |
5 
 vcl/source/control/roadmapwizard.cxx  |
5 
 vcl/unx/gtk3/gtkinst.cxx  |
5 
 22 files changed, 1524 insertions(+), 1693 deletions(-)

New commits:
commit 353ede41b97729a98ac090f89889a055051db98c
Author: Caolán McNamara 
AuthorDate: Tue Dec 6 15:30:10 2022 +
Commit: Caolán McNamara 
CommitDate: Tue Dec 6 19:29:51 2022 +

add Assistant::set_page_side_image

Change-Id: I70685a74ebed465771473ce885f4f29af209cda6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143737
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 4b376d3ac44f..4b4ea74f13b3 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -650,6 +650,8 @@ public:
 
 virtual void set_page_side_help_id(const OString& rHelpId) = 0;
 
+virtual void set_page_side_image(const OUString& rImage) = 0;
+
 void connect_jump_page(const Link& rLink) { 
m_aJumpPageHdl = rLink; }
 };
 
diff --git a/sdext/source/minimizer/optimizerdialog.cxx 
b/sdext/source/minimizer/optimizerdialog.cxx
index 15ce1c3d1187..4b7e6f039988 100644
--- a/sdext/source/minimizer/optimizerdialog.cxx
+++ b/sdext/source/minimizer/optimizerdialog.cxx
@@ -242,9 +242,7 @@ void OptimizerDialog::InitRoadmap()
  ITEM_ID_SUMMARY}
 );
 
-#if 0
-xPropertySet->setPropertyValue( "ImageURL", Any( 
OUString("private:graphicrepository/" BMP_PRESENTATION_MINIMIZER) ) );
-#endif
+m_xAssistant->set_page_side_image(BMP_PRESENTATION_MINIMIZER);
 }
 
 void OptimizerDialog::UpdateConfiguration()
diff --git a/vcl/inc/wizdlg.hxx b/vcl/inc/wizdlg.hxx
index da3ff4d1af3a..31bd376168b6 100644
--- a/vcl/inc/wizdlg.hxx
+++ b/vcl/inc/wizdlg.hxx
@@ -134,6 +134,7 @@ namespace vcl
 const Size& GetPageSizePixel() const { return maPageSize; }
 
 voidSetRoadmapHelpId( const OString& _rId );
+voidSetRoadmapBitmap( const BitmapEx& maBitmap );
 
 voidInsertRoadmapItem(int nIndex, const OUString& rLabel, 
int nId, bool bEnabled);
 voidDeleteRoadmapItems();
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 7af5cccb4e6b..39ee33de947f 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -2157,6 +2157,11 @@ public:
 m_xWizard->SetRoadmapHelpId(rHelpId);
 }
 
+virtual void set_page_side_image(const OUString& rImage) override
+{
+m_xWizard->SetRoadmapBitmap(createImage(rImage).GetBitmapEx());
+}
+
 weld::Button* weld_widget_for_response(int nResponse) override;
 
 virtual ~SalInstanceAssistant() override
diff --git a/vcl/source/control/roadmapwizard.cxx 
b/vcl/source/control/roadmapwizard.cxx
index b1738d5bef83..fe4c53b92e02 100644
--- a/vcl/source/control/roadmapwizard.cxx
+++ b/vcl/source/control/roadmapwizard.cxx
@@ -228,6 +228,11 @@ namespace vcl
 m_xRoadmapImpl->pRoadmap->SetHelpId( _rId );
 }
 
+void RoadmapWizard::SetRoadmapBitmap(const BitmapEx& rBmp)
+{
+m_xRoadmapImpl->pRoadmap->SetRoadmapBitmap(rBmp);
+}
+
 void RoadmapWizardMachine::SetRoadmapHelpId(const OString& rId)
 {
 

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

2022-03-24 Thread Stephan Bergmann (via logerrit)
 compilerplugins/clang/test/trivialconstructor.cxx |4 +++-
 winaccessibility/source/UAccCOM/MAccessible.cxx   |4 ++--
 winaccessibility/source/UAccCOM/MAccessible.h |3 ++-
 3 files changed, 7 insertions(+), 4 deletions(-)

New commits:
commit d105539a79c68cb134f15518d27134767150d164
Author: Stephan Bergmann 
AuthorDate: Thu Mar 24 08:07:03 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Mar 24 09:28:29 2022 +0100

loplugin:stringviewparam

Change-Id: If67d685eb930a299587a711eb5f77cbe9fd0ca09
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132020
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx 
b/winaccessibility/source/UAccCOM/MAccessible.cxx
index 11ad99d13542..4dda3bc6beee 100644
--- a/winaccessibility/source/UAccCOM/MAccessible.cxx
+++ b/winaccessibility/source/UAccCOM/MAccessible.cxx
@@ -2796,7 +2796,7 @@ OUString CMAccessible::get_StringFromAny(Any const & pAny)
 return OUString();
 }
 
-OUString CMAccessible::get_String4Numbering(const Any& pAny, sal_Int16 
numberingLevel,const OUString& numberingPrefix)
+OUString CMAccessible::get_String4Numbering(const Any& pAny, sal_Int16 
numberingLevel,std::u16string_view numberingPrefix)
 {
 Reference< css::container::XIndexReplace > pXIndex;
 if((pAny>>=pXIndex) && (numberingLevel !=-1))//numbering level is -1,means 
invalid value
@@ -2818,7 +2818,7 @@ OUString CMAccessible::get_String4Numbering(const Any& 
pAny, sal_Int16 numbering
 buf.append(pTemp);
 buf.append(',');
 
-if (rProp.Name == "NumberingType" && 
!numberingPrefix.isEmpty())
+if (rProp.Name == "NumberingType" && !numberingPrefix.empty())
 {
 buf.append("NumberingPrefix=");
 buf.append(numberingPrefix);
diff --git a/winaccessibility/source/UAccCOM/MAccessible.h 
b/winaccessibility/source/UAccCOM/MAccessible.h
index c265d9f7ce82..5d18d74abf84 100644
--- a/winaccessibility/source/UAccCOM/MAccessible.h
+++ b/winaccessibility/source/UAccCOM/MAccessible.h
@@ -22,6 +22,7 @@
 #include "stdafx.h"
 #include "Resource.h"   // main symbols
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -229,7 +230,7 @@ public:
 static OUString get_StringFromAny(css::uno::Any const & pAny);
 
 static OUString get_String4Numbering(const css::uno::Any& pAny,
-sal_Int16 numberingLevel, const OUString& numberingPrefix);
+sal_Int16 numberingLevel, std::u16string_view numberingPrefix);
 
 // Helper function for data conversion.
 static void ConvertAnyToVariant(const css::uno::Any ,
commit 5ace52e6aef6f602ce8bf367b45ab2b740a85cd6
Author: Stephan Bergmann 
AuthorDate: Thu Mar 24 08:02:36 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Mar 24 09:28:15 2022 +0100

Adapt loplugin:trivialconsructor to clang-cl

...where the S4 template constructor may still have an unparsed null body, 
so

if (!constructorDecl->hasTrivialBody())
return true;

will suppress the expected warning.  Lets just accept that clang-cl on 
Windows
will find less instances of loplugin:trivialconstructor.  (And moving the
expected-error comment around on the line was demanded by clang-format.  Oh 
my.)

Change-Id: I3357fbd0fbf932f7f93c421c2f079a8cfc536eef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132019
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/compilerplugins/clang/test/trivialconstructor.cxx 
b/compilerplugins/clang/test/trivialconstructor.cxx
index 5b48c4cf4250..eed26f8bf305 100644
--- a/compilerplugins/clang/test/trivialconstructor.cxx
+++ b/compilerplugins/clang/test/trivialconstructor.cxx
@@ -27,7 +27,9 @@ struct S3
 
 template  struct S4
 {
-// expected-error@+1 {{no need for explicit constructor decl 
[loplugin:trivialconstructor]}}
+#if !defined _MSC_VER
+// expected-error@+2 {{no need for explicit constructor decl 
[loplugin:trivialconstructor]}}
+#endif
 S4() {}
 };
 


[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang solenv/CompilerTest_compilerplugins_clang.mk sw/inc sw/qa sw/source

2022-03-16 Thread László Németh (via logerrit)
 compilerplugins/clang/test/trivialconstructor.cxx |   46 ++
 compilerplugins/clang/trivialconstructor.cxx  |   16 +--
 solenv/CompilerTest_compilerplugins_clang.mk  |1 
 sw/inc/redline.hxx|3 +
 sw/inc/strings.hrc|2 
 sw/qa/uitest/writer_tests/trackedChanges.py   |   31 ++
 sw/source/core/doc/docredln.cxx   |   14 ++
 sw/source/uibase/misc/redlndlg.cxx|6 --
 8 files changed, 111 insertions(+), 8 deletions(-)

New commits:
commit 3a14b2040ecd95a23acbc3e8d0f8087505135f11
Author: László Németh 
AuthorDate: Wed Mar 16 14:29:34 2022 +0100
Commit: László Németh 
CommitDate: Wed Mar 16 16:09:47 2022 +0100

tdf#148032 sw: add redline comment for tracked comments

Tracked insertion/deletion of comments were shown as
plain text insertion/deletion in that case, too, when
there is no other text change in the redline (only
the invisible placeholder character CH_TXTATR_INWORD
of the comment). This was fixed by the new action
icons of the Manage Changes dialog window before,
but for better accessibility, now redline of a newly
inserted/deleted comment gets also a redline comment
"Comment added"/"Comment deleted", shown in Manage
Changes dialog window with the Comment added/Comment
deleted action icons, as suggested by Heiko Tietze.

Note: because the redline comment (at least the
tracked insertions) are stored in the document,
this is a back-compatible solution.

Follow-up to commit 128d3b454467e34538903b2eab45e866f976b314
"tdf#73125 sw: add Insert/Delete Comment Manage Changes action icons".

Change-Id: I7a9e82ae1b9519e4883956f69de0aafc289f7f99
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131659
Tested-by: Jenkins
Reviewed-by: László Németh 

diff --git a/sw/inc/redline.hxx b/sw/inc/redline.hxx
index 5e01cfa8349f..37c7e536d52c 100644
--- a/sw/inc/redline.hxx
+++ b/sw/inc/redline.hxx
@@ -208,6 +208,9 @@ public:
 OUString const & GetAuthorString( sal_uInt16 nPos = 0 ) const;
 const DateTime& GetTimeStamp( sal_uInt16 nPos = 0) const;
 RedlineType GetType( sal_uInt16 nPos = 0 ) const;
+// text content of the redline is only an annotation placeholder
+// (i.e. a comment, but don't confuse it with comment of the redline)
+bool IsAnnotation() const;
 const OUString& GetComment( sal_uInt16 nPos = 0 ) const;
 
 void SetComment( const OUString& rS ) { m_pRedlineData->SetComment( rS ); }
diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc
index afcbbb86335e..b9a5cd8b6d82 100644
--- a/sw/inc/strings.hrc
+++ b/sw/inc/strings.hrc
@@ -1280,6 +1280,8 @@
 #define STR_REDLINE_FORMATTED   NC_("STR_REDLINE_FORMATTED", 
"Formats")
 #define STR_REDLINE_TABLECHGNC_("STR_REDLINE_TABLECHG", 
"Table Changes")
 #define STR_REDLINE_FMTCOLLSET  NC_("STR_REDLINE_FMTCOLLSET", 
"Applied Paragraph Styles")
+#define STR_REDLINE_COMMENT_ADDED   
NC_("STR_REDLINE_COMMENT_ADDED", "Comment added")
+#define STR_REDLINE_COMMENT_DELETED 
NC_("STR_REDLINE_COMMENT_DELETED", "Comment deleted")
 #define STR_PAGENC_("STR_PAGE", "Page ")
 #define STR_PAGE_COUNT  NC_("STR_PAGE_COUNT", "Page %1 
of %2")
 #define STR_PAGE_COUNT_CUSTOM   NC_("STR_PAGE_COUNT_CUSTOM", 
"Page %1 of %2 (Page %3)")
diff --git a/sw/qa/uitest/writer_tests/trackedChanges.py 
b/sw/qa/uitest/writer_tests/trackedChanges.py
index 58f4957cc03d..c04034e7149b 100644
--- a/sw/qa/uitest/writer_tests/trackedChanges.py
+++ b/sw/qa/uitest/writer_tests/trackedChanges.py
@@ -10,6 +10,7 @@
 # tests for tracked changes ; tdf912270
 from uitest.framework import UITestCase
 from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file, 
type_text
+from libreoffice.uno.propertyvalue import mkPropertyValues
 
 class trackedchanges(UITestCase):
 
@@ -322,4 +323,34 @@ class trackedchanges(UITestCase):
 tables = document.getTextTables()
 self.assertEqual(3, len(tables))
 
+def test_tdf148032(self):
+
+with 
self.ui_test.load_file(get_url_for_data_file("trackedChanges.odt")) as document:
+
+xWriterDoc = self.xUITest.getTopFocusWindow()
+xWriterEdit = xWriterDoc.getChild("writer_edit")
+
+# adding new Comment
+self.xUITest.executeCommand(".uno:InsertAnnotation")
+
+# wait until the comment is available
+xComment1 = self.ui_test.wait_until_child_is_available('Comment1')
+
+xEditView1 = xComment1.getChild("editview")
+xEditView1.executeAction("TYPE", mkPropertyValues({"TEXT": "This 
is the First Comment"}))
+self.assertEqual(get_state_as_dict(xComment1)["Text"], "This is 
the First Comment" )
+

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

2021-10-15 Thread Armin Le Grand (Allotropia) (via logerrit)
 compilerplugins/clang/test/unnecessaryoverride-dtor.cxx |2 +-
 compilerplugins/clang/unnecessaryoverride.cxx   |7 ---
 sw/source/core/docnode/ndtbl1.cxx   |2 ++
 sw/source/uibase/shells/basesh.cxx  |3 ++-
 4 files changed, 5 insertions(+), 9 deletions(-)

New commits:
commit e299f1f5e6097d9e5857dba65a65c33ac31974ae
Author: Armin Le Grand (Allotropia) 
AuthorDate: Thu Oct 14 17:56:22 2021 +0200
Commit: Armin Le Grand 
CommitDate: Fri Oct 15 17:15:31 2021 +0200

tdf#144843 call to GetBoxBackground requires incarnated item

Change-Id: Id47f26a762804cd8c1b5742966ec54b71a26ab09

Added assert/warning to SwDoc::GetBoxAttr - that is the
method used by GetBoxBackground && GetBoxDirection

Change-Id: I59e8dfb790e3872810885a8f888cea57be27e80c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123619
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
Reviewed-by: Armin Le Grand 

diff --git a/sw/source/core/docnode/ndtbl1.cxx 
b/sw/source/core/docnode/ndtbl1.cxx
index ef44f23ca57f..964b2cb610f2 100644
--- a/sw/source/core/docnode/ndtbl1.cxx
+++ b/sw/source/core/docnode/ndtbl1.cxx
@@ -1250,6 +1250,8 @@ void SwDoc::SetBoxAttr( const SwCursor& rCursor, const 
SfxPoolItem  )
 
 bool SwDoc::GetBoxAttr( const SwCursor& rCursor, std::unique_ptr& 
rToFill )
 {
+// tdf#144843 calling GetBoxAttr *requires* object
+assert(rToFill && "requires object here");
 bool bRet = false;
 SwTableNode* pTableNd = 
rCursor.GetPoint()->nNode.GetNode().FindTableNode();
 SwSelBoxes aBoxes;
diff --git a/sw/source/uibase/shells/basesh.cxx 
b/sw/source/uibase/shells/basesh.cxx
index 292b1f10c851..da474db91901 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -2713,7 +2713,8 @@ void SwBaseShell::ExecDlg(SfxRequest )
 if ( rSh.IsTableMode() )
 {
 // Get background attributes of the table and put it in the set
-std::unique_ptr aBrush;
+// tdf#144843 calling GetBoxBackground *requires* an 
incarnation to be handed over
+std::unique_ptr 
aBrush(std::make_unique(RES_BACKGROUND));
 rSh.GetBoxBackground( aBrush );
 pDlg.disposeAndReset(pFact->CreateSwBackgroundDialog(pMDI, 
aSet));
 aSet.Put( *aBrush );
commit 7dc2ac46be574b59cac7923ac55cf650c4fd1168
Author: Stephan Bergmann 
AuthorDate: Fri Oct 15 15:01:00 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Oct 15 17:15:21 2021 +0200

loplugin:unnecessaryoverride corner case is subsumed now

...by modifications done to the plugin in
af908d9f18fbb83a5c393f856026cebefd821f18 "Avoid usage of incomplete types in
member functions defined in-class" (if the dtor's definition is spelled
`= default;` rather than `{}`, but which should always be possible)

Change-Id: Iddce2baf3635a12131854e86a609951309ffbc26
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123656
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/compilerplugins/clang/test/unnecessaryoverride-dtor.cxx 
b/compilerplugins/clang/test/unnecessaryoverride-dtor.cxx
index 8ed472749105..960909b4ea4c 100644
--- a/compilerplugins/clang/test/unnecessaryoverride-dtor.cxx
+++ b/compilerplugins/clang/test/unnecessaryoverride-dtor.cxx
@@ -125,7 +125,7 @@ struct CompleteBase {
 // a class defined in a .hxx with the dtor declared (but not defined) as 
inline in the .hxx,
 // and then defined in the cxx (making it effectively only callable from 
within the cxx);
 // removing the dtor declaration from the class definition would change the 
dtor to be callable from everywhere
-MarkedInlineButNotDefined::~MarkedInlineButNotDefined() {}
+MarkedInlineButNotDefined::~MarkedInlineButNotDefined() = default;
 
 // avoid loplugin:unreffun:
 int main() {
diff --git a/compilerplugins/clang/unnecessaryoverride.cxx 
b/compilerplugins/clang/unnecessaryoverride.cxx
index 0641339d4e6f..7e7d39a0a5d8 100644
--- a/compilerplugins/clang/unnecessaryoverride.cxx
+++ b/compilerplugins/clang/unnecessaryoverride.cxx
@@ -193,13 +193,6 @@ bool UnnecessaryOverride::VisitCXXMethodDecl(const 
CXXMethodDecl* methodDecl)
 return true;
 }
 }
-// corner case
-if (methodDecl->isInlined()
-&& 
compiler.getSourceManager().isInMainFile(methodDecl->getLocation())
-&& 
!compiler.getSourceManager().isInMainFile(methodDecl->getCanonicalDecl()->getLocation()))
-{
-return true;
-}
 if (methodDecl->isExplicitlyDefaulted()) {
 if (methodDecl->getPreviousDecl() != nullptr) {
 return true;


[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 drawinglayer/source

2020-10-29 Thread Stephan Bergmann (via logerrit)
 compilerplugins/clang/toolslong.cxx  |3 +--
 drawinglayer/source/primitive2d/textlayoutdevice.cxx |   14 ++
 2 files changed, 15 insertions(+), 2 deletions(-)

New commits:
commit e58592414da353aaef9432277d7155fc0c0f0213
Author: Stephan Bergmann 
AuthorDate: Thu Oct 29 08:13:48 2020 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Oct 29 10:14:03 2020 +0100

Clean up loplugin:toolslong ignorelist

...after c070fac05fef41f788b53fe2c1f60519688a40b1 "Teach loplugin:toolslong
about curl_easy_getinfo"

Change-Id: Ia0c09c8d35fb7d023e3794532c240d53ee248752
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104990
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/compilerplugins/clang/toolslong.cxx 
b/compilerplugins/clang/toolslong.cxx
index 094087911e6a..32e94f8397e5 100644
--- a/compilerplugins/clang/toolslong.cxx
+++ b/compilerplugins/clang/toolslong.cxx
@@ -125,8 +125,7 @@ void ToolsLong::run()
 
 StringRef fn(handler.getMainFileName());
 // sberg says this is fine
-if (loplugin::isSamePathname(fn, SRCDIR 
"/extensions/source/update/check/download.cxx")
-|| loplugin::isSamePathname(fn, SRCDIR 
"/pyuno/source/module/pyuno.cxx"))
+if (loplugin::isSamePathname(fn, SRCDIR "/pyuno/source/module/pyuno.cxx"))
 return;
 
 TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
commit f39e4b6b6f8aa8b4af22b6eb30a52e98cd5a6455
Author: Samuel Mehrbrodt 
AuthorDate: Wed Oct 28 14:21:20 2020 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Thu Oct 29 10:13:54 2020 +0100

Revert "tdf#127471 Remove font width scaling hack"

This reverts commit 8891a2fc2a4bf86add68691b7ac167a07a8add84.

Reason for revert: Causes regressions like tdf#136891

Change-Id: I940c447bec38231b666eeac4212f09e22117504e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104847
Tested-by: Samuel Mehrbrodt 
Reviewed-by: Samuel Mehrbrodt 

diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx 
b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
index 2820ebfbc03d..0730dc397707 100644
--- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx
+++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
@@ -427,6 +427,20 @@ namespace drawinglayer::primitive2d
 aRetval.SetPitch(rFontAttribute.getMonospaced() ? PITCH_FIXED : 
PITCH_VARIABLE);
 aRetval.SetLanguage(LanguageTag::convertToLanguageType( rLocale, 
false));
 
+#ifdef _WIN32
+// for WIN32 systems, correct the FontWidth if FontScaling is used
+if(bFontIsScaled && nHeight > 0)
+{
+const FontMetric 
aUnscaledFontMetric(Application::GetDefaultDevice()->GetFontMetric(aRetval));
+
+if(aUnscaledFontMetric.GetAverageFontWidth() > 0)
+{
+const double fScaleFactor(static_cast(nWidth) / 
static_cast(nHeight));
+const sal_uInt32 
nScaledWidth(basegfx::fround(static_cast(aUnscaledFontMetric.GetAverageFontWidth())
 * fScaleFactor));
+aRetval.SetAverageFontWidth(nScaledWidth);
+}
+}
+#endif
 // handle FontRotation (if defined)
 if(!basegfx::fTools::equalZero(fFontRotation))
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-02 Thread Caolán McNamara (via logerrit)
 compilerplugins/clang/unusedmethods.results   |4 
 include/vcl/NotebookBarAddonsMerger.hxx   |   19 +++
 include/vcl/weld.hxx  |1 -
 vcl/inc/salvtables.hxx|3 ---
 vcl/source/app/salvtables.cxx |7 ---
 vcl/source/window/NotebookBarAddonsMerger.cxx |   20 +---
 vcl/unx/gtk3/gtk3gtkinst.cxx  |6 --
 7 files changed, 16 insertions(+), 44 deletions(-)

New commits:
commit 558301f99940997526513853e3e0d11f0b63d3ac
Author: Caolán McNamara 
AuthorDate: Tue Sep 1 17:24:49 2020 +0100
Commit: Caolán McNamara 
CommitDate: Wed Sep 2 13:52:51 2020 +0200

MergeNotebookBarMenuAddons has only static methods

Change-Id: I962003d4753b726184d87916ba012b3808424653
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101916
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/compilerplugins/clang/unusedmethods.results 
b/compilerplugins/clang/unusedmethods.results
index 4b98a47d9293..f7c4661dfcbb 100644
--- a/compilerplugins/clang/unusedmethods.results
+++ b/compilerplugins/clang/unusedmethods.results
@@ -782,8 +782,6 @@ include/vcl/ITiledRenderable.hxx:214
 enum PointerStyle vcl::ITiledRenderable::getPointer()
 include/vcl/lok.hxx:22
 void vcl::lok::unregisterPollCallbacks()
-include/vcl/NotebookBarAddonsMerger.hxx:55
- NotebookBarAddonsMerger::NotebookBarAddonsMerger()
 include/vcl/opengl/OpenGLHelper.hxx:67
 void OpenGLHelper::renderToFile(long,long,const class rtl::OUString &)
 include/vcl/opengl/OpenGLHelper.hxx:100
diff --git a/include/vcl/NotebookBarAddonsMerger.hxx 
b/include/vcl/NotebookBarAddonsMerger.hxx
index 20d6a7b71aef..ef0e7d677e17 100644
--- a/include/vcl/NotebookBarAddonsMerger.hxx
+++ b/include/vcl/NotebookBarAddonsMerger.hxx
@@ -49,19 +49,14 @@ struct AddonNotebookBarItem
 OUString sStyle;
 };
 
-class NotebookBarAddonsMerger
+namespace NotebookBarAddonsMerger
 {
-public:
-NotebookBarAddonsMerger();
-~NotebookBarAddonsMerger();
-static void MergeNotebookBarAddons(vcl::Window* pParent,
-   const VclBuilder::customMakeWidget& 
pFunction,
-   const 
css::uno::Reference& rFrame,
-   const NotebookBarAddonsItem& 
aNotebookBarAddonsItem,
-   VclBuilder::stringmap& rVec);
-static void MergeNotebookBarMenuAddons(Menu* pPopupMenu, sal_Int16 nItemId,
-   const OString& sItemIdName,
-   NotebookBarAddonsItem& 
aNotebookBarAddonsItem);
+void MergeNotebookBarAddons(vcl::Window* pParent, const 
VclBuilder::customMakeWidget& pFunction,
+const css::uno::Reference& 
rFrame,
+const NotebookBarAddonsItem& 
aNotebookBarAddonsItem,
+VclBuilder::stringmap& rVec);
+void MergeNotebookBarMenuAddons(Menu* pPopupMenu, sal_Int16 nItemId, const 
OString& sItemIdName,
+NotebookBarAddonsItem& aNotebookBarAddonsItem);
 };
 
 #endif
diff --git a/vcl/source/window/NotebookBarAddonsMerger.cxx 
b/vcl/source/window/NotebookBarAddonsMerger.cxx
index 7ab27c038f13..1d8d5a7e7aec 100644
--- a/vcl/source/window/NotebookBarAddonsMerger.cxx
+++ b/vcl/source/window/NotebookBarAddonsMerger.cxx
@@ -103,14 +103,12 @@ static void CreateNotebookBarToolBox(vcl::Window* 
pNotebookbarToolBox,
 pToolbox->Show();
 }
 
-NotebookBarAddonsMerger::NotebookBarAddonsMerger() {}
-
-NotebookBarAddonsMerger::~NotebookBarAddonsMerger() {}
-
-void NotebookBarAddonsMerger::MergeNotebookBarAddons(
-vcl::Window* pParent, const VclBuilder::customMakeWidget& pFunction,
-const css::uno::Reference& m_xFrame,
-const NotebookBarAddonsItem& aNotebookBarAddonsItem, 
VclBuilder::stringmap& rMap)
+namespace NotebookBarAddonsMerger
+{
+void MergeNotebookBarAddons(vcl::Window* pParent, const 
VclBuilder::customMakeWidget& pFunction,
+const css::uno::Reference& 
m_xFrame,
+const NotebookBarAddonsItem& 
aNotebookBarAddonsItem,
+VclBuilder::stringmap& rMap)
 {
 std::vector aImageVec = aNotebookBarAddonsItem.aImageValues;
 unsigned long nIter = 0;
@@ -145,9 +143,8 @@ void NotebookBarAddonsMerger::MergeNotebookBarAddons(
 }
 }
 
-void NotebookBarAddonsMerger::MergeNotebookBarMenuAddons(
-Menu* pPopupMenu, sal_Int16 nItemId, const OString& sItemIdName,
-NotebookBarAddonsItem& aNotebookBarAddonsItem)
+void MergeNotebookBarMenuAddons(Menu* pPopupMenu, sal_Int16 nItemId, const 
OString& sItemIdName,
+NotebookBarAddonsItem& aNotebookBarAddonsItem)
 {
 std::vector aImageVec = aNotebookBarAddonsItem.aImageValues;
 unsigned long nIter = 0;
@@ -182,5 +179,6 @@ void 

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang connectivity/source cui/source dbaccess/source desktop/source framework/source oox/source package/source sd/source sw/source unoidl/so

2020-08-04 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/buriedassign.cxx  |8 
 compilerplugins/clang/compat.hxx|9 
 compilerplugins/clang/simplifybool.cxx  |2 
 connectivity/source/drivers/dbase/DTable.cxx|4 
 connectivity/source/drivers/firebird/Connection.cxx |2 
 cui/source/customize/cfg.cxx|2 
 dbaccess/source/core/dataaccess/definitioncontainer.cxx |5 
 desktop/source/deployment/registry/package/dp_package.cxx   |2 
 framework/source/uielement/imagebuttontoolbarcontroller.cxx |4 
 oox/source/core/filterdetect.cxx|4 
 package/source/manifest/ManifestImport.cxx  |3 
 sd/source/filter/eppt/pptx-text.cxx |4 
 sw/source/core/access/accpara.cxx   |4 
 sw/source/core/doc/docbm.cxx|4 
 sw/source/core/doc/docedt.cxx   |4 
 sw/source/core/doc/docnum.cxx   |2 
 sw/source/core/unocore/unomap.cxx   |2 
 sw/source/filter/ww8/wrtw8nds.cxx   |2 
 sw/source/uibase/uno/unotxdoc.cxx   |4 
 unoidl/source/legacyprovider.cxx|6 
 vcl/backendtest/VisualBackendTest.cxx   |   22 
 vcl/headless/CustomWidgetDraw.cxx   |   44 
 vcl/headless/svpframe.cxx   |   42 
 vcl/headless/svpgdi.cxx |   48 
 vcl/opengl/RenderList.cxx   |  112 -
 vcl/opengl/gdiimpl.cxx  |  102 -
 vcl/opengl/texture.cxx  |   54 
 vcl/opengl/x11/X11DeviceInfo.cxx|   32 
 vcl/opengl/x11/gdiimpl.cxx  |   26 
 vcl/qt5/Qt5FilePicker.cxx   |   50 
 vcl/qt5/Qt5Frame.cxx|  164 -
 vcl/qt5/Qt5Menu.cxx |   84 
 vcl/skia/SkiaHelper.cxx |   78 
 vcl/skia/salbmp.cxx |   22 
 vcl/skia/zone.cxx   |   30 
 vcl/source/animate/Animation.cxx|   95 -
 vcl/source/app/help.cxx |   24 
 vcl/source/app/salvtables.cxx   |  151 -
 vcl/source/app/settings.cxx |   24 
 vcl/source/app/svapp.cxx|   26 
 vcl/source/app/svdata.cxx   |   44 
 vcl/source/app/unohelp.cxx  |   23 
 vcl/source/bitmap/Octree.cxx|   62 
 vcl/source/bitmap/bitmap.cxx|   94 
 vcl/source/control/button.cxx   |  426 ++--
 vcl/source/control/combobox.cxx |   54 
 vcl/source/control/edit.cxx |  237 +-
 vcl/source/control/field.cxx|   94 
 vcl/source/control/field2.cxx   |  292 +--
 vcl/source/control/imp_listbox.cxx  |  166 -
 vcl/source/control/listbox.cxx  |  120 -
 vcl/source/control/prgsbar.cxx  |   32 
 vcl/source/control/scrbar.cxx   |  101 -
 vcl/source/control/slider.cxx   |  130 -
 vcl/source/control/spinbtn.cxx  |   23 
 vcl/source/control/spinfld.cxx  |  142 -
 vcl/source/control/tabctrl.cxx  |  312 +--
 vcl/source/edit/textdata.cxx|   48 
 vcl/source/edit/texteng.cxx |  102 -
 vcl/source/edit/textundo.cxx|   34 
 vcl/source/edit/textview.cxx|  362 +--
 vcl/source/edit/vclmedit.cxx|   64 
 vcl/source/filter/FilterConfigCache.cxx |  106 -
 vcl/source/filter/FilterConfigItem.cxx  |  148 -
 vcl/source/filter/igif/gifread.cxx  |   34 
 vcl/source/filter/jpeg/JpegReader.cxx   |   22 
 vcl/source/filter/png/pngwrite.cxx  |  232 +-
 vcl/source/filter/wmf/emfwr.cxx |  186 -
 vcl/source/filter/wmf/wmfwr.cxx | 1136 ++--
 vcl/source/fontsubset/sft.cxx   |   62 
 vcl/source/fontsubset/ttcr.cxx  |   86 
 vcl/source/helper/canvasbitmap.cxx  

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

2020-07-25 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/constantparam.booleans.results |  172 ++-
 compilerplugins/clang/constantparam.constructors.results |   78 +++---
 compilerplugins/clang/constantparam.numbers.results  |   74 +++---
 extensions/source/update/ui/updatecheckui.cxx|6 
 vcl/unx/generic/dtrans/X11_droptarget.cxx|2 
 vcl/unx/generic/dtrans/X11_selection.cxx |2 
 vcl/unx/generic/dtrans/X11_selection.hxx |2 
 7 files changed, 153 insertions(+), 183 deletions(-)

New commits:
commit f133d4c7831d87f8d9bcf3b519515109ad3d4b1b
Author: Noel Grandin 
AuthorDate: Sat Jul 25 09:23:18 2020 +0200
Commit: Noel Grandin 
CommitDate: Sat Jul 25 10:39:05 2020 +0200

inline some use-once constants

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

diff --git a/vcl/unx/generic/dtrans/X11_droptarget.cxx 
b/vcl/unx/generic/dtrans/X11_droptarget.cxx
index 5e1320fe3107..72f8dff00d9e 100644
--- a/vcl/unx/generic/dtrans/X11_droptarget.cxx
+++ b/vcl/unx/generic/dtrans/X11_droptarget.cxx
@@ -161,7 +161,7 @@ void DropTarget::dragOver( const DropTargetDragEvent& dtde 
) throw()
 // XServiceInfo
 OUString DropTarget::getImplementationName()
 {
-return XDND_DROPTARGET_IMPLEMENTATION_NAME;
+return "com.sun.star.datatransfer.dnd.XdndDropTarget";
 }
 
 sal_Bool DropTarget::supportsService( const OUString& ServiceName )
diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx 
b/vcl/unx/generic/dtrans/X11_selection.cxx
index 735235ad2391..20321c9915c2 100644
--- a/vcl/unx/generic/dtrans/X11_selection.cxx
+++ b/vcl/unx/generic/dtrans/X11_selection.cxx
@@ -4141,7 +4141,7 @@ void SelectionManagerHolder::startDrag(
 
 OUString SelectionManagerHolder::getImplementationName()
 {
-return XDND_IMPLEMENTATION_NAME;
+return "com.sun.star.datatransfer.dnd.XdndSupport";
 }
 
 sal_Bool SelectionManagerHolder::supportsService( const OUString& ServiceName )
diff --git a/vcl/unx/generic/dtrans/X11_selection.hxx 
b/vcl/unx/generic/dtrans/X11_selection.hxx
index 5bcabe9bdb78..2b49b15fb356 100644
--- a/vcl/unx/generic/dtrans/X11_selection.hxx
+++ b/vcl/unx/generic/dtrans/X11_selection.hxx
@@ -40,8 +40,6 @@
 
 #include 
 
-#define XDND_IMPLEMENTATION_NAME "com.sun.star.datatransfer.dnd.XdndSupport"
-#define XDND_DROPTARGET_IMPLEMENTATION_NAME 
"com.sun.star.datatransfer.dnd.XdndDropTarget"
 
 namespace x11 {
 
commit 7a820058909b766f3d185cf619298f741bb44b2e
Author: Noel Grandin 
AuthorDate: Sat Jul 25 09:04:14 2020 +0200
Commit: Noel Grandin 
CommitDate: Sat Jul 25 10:38:59 2020 +0200

loplugin:constantparam

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

diff --git a/compilerplugins/clang/constantparam.booleans.results 
b/compilerplugins/clang/constantparam.booleans.results
index e8e813e4ce0f..0891a2f691c8 100644
--- a/compilerplugins/clang/constantparam.booleans.results
+++ b/compilerplugins/clang/constantparam.booleans.results
@@ -378,7 +378,7 @@ desktop/source/deployment/gui/dp_gui_updatedialog.hxx:103
 void dp_gui::UpdateDialog::addAdditional(struct 
dp_gui::UpdateDialog::Index *,_Bool)
 _Bool bEnableCheckBox
 0
-desktop/source/lib/init.cxx:6255
+desktop/source/lib/init.cxx:6257
 struct _LibreOfficeKit * libreofficekit_hook_2(const char *,const char *)
 const char * user_profile_url
 0
@@ -554,10 +554,6 @@ hwpfilter/source/hwpfile.h:146
 void HWPFile::Read4b(void *,unsigned long)
 unsigned long nmemb
 1
-i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx:580
-class com::sun::star::uno::Any getPropertyByName(const class 
com::sun::star::uno::Sequence 
&,const char *,_Bool)
-_Bool bRequired
-1
 i18npool/source/localedata/LocaleNode.hxx:73
 const class rtl::OUString & Attr::getValueByIndex(int) const
 int idx
@@ -1210,7 +1206,7 @@ include/svx/frmsel.hxx:144
 void svx::FrameSelector::SelectAllBorders(_Bool)
 _Bool bSelect
 0
-include/svx/gridctrl.hxx:393
+include/svx/gridctrl.hxx:394
 void DbGridControl::RemoveRows(_Bool)
 _Bool bNewCursor
 0
@@ -1526,7 +1522,7 @@ include/vcl/accessibletableprovider.hxx:114
 _Bool vcl::IAccessibleTableProvider::GetGlyphBoundRects(const class Point 
&,const class rtl::OUString &,int,int,class std::__debug::vector > &)
 int nIndex
 0
-include/vcl/alpha.hxx:58
+include/vcl/alpha.hxx:54
 void AlphaMask::Replace(unsigned char,unsigned char)
 unsigned char cSearchTransparency
 0
@@ -1550,7 +1546,7 @@ include/vcl/dibtools.hxx:46
 _Bool ReadDIBBitmapEx(class BitmapEx &,class SvStream &,_Bool,_Bool)
 _Bool bFileHeader
 1
-include/vcl/edit.hxx:98
+include/vcl/edit.hxx:96
 void Edit::ImplClearBackground(class OutputDevice &,const 

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang sc/source starmath/source svtools/source svx/source sw/source

2020-07-03 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/unusedenumconstants.py|1 
 compilerplugins/clang/unusedenumconstants.readonly.results  |  640 
 compilerplugins/clang/unusedenumconstants.untouched.results |  214 
 compilerplugins/clang/unusedenumconstants.writeonly.results | 8778 +---
 sc/source/ui/inc/checklistmenu.hxx  |   13 
 starmath/source/mathmlimport.hxx|7 
 svtools/source/control/valueset.cxx |1 
 svx/source/inc/fmexpl.hxx   |1 
 sw/source/filter/html/css1atr.cxx   |   39 
 9 files changed, 4701 insertions(+), 4993 deletions(-)

New commits:
commit dc119d12f03391c4c83a1819d09d5c046623cad5
Author: Noel Grandin 
AuthorDate: Fri Jul 3 12:43:21 2020 +0200
Commit: Noel Grandin 
CommitDate: Fri Jul 3 14:51:48 2020 +0200

loplugin:unusedenumconstants

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

diff --git a/compilerplugins/clang/unusedenumconstants.py 
b/compilerplugins/clang/unusedenumconstants.py
index 3e78f0f55401..34a459bd0b54 100755
--- a/compilerplugins/clang/unusedenumconstants.py
+++ b/compilerplugins/clang/unusedenumconstants.py
@@ -110,6 +110,7 @@ def is_ignore(srcLoc):
  "include/oox/ppt/animationspersist.hxx",
  "include/vcl/fontcapabilities.hxx",
  "sw/inc/poolfmt.hxx",
+ "include/xmloff/xmltoken.hxx",
 # unit test code
  "cppu/source/uno/check.cxx",
 # general weird nonsense going on
diff --git a/compilerplugins/clang/unusedenumconstants.readonly.results 
b/compilerplugins/clang/unusedenumconstants.readonly.results
index 1285b0cbfbbd..265ed33296d2 100644
--- a/compilerplugins/clang/unusedenumconstants.readonly.results
+++ b/compilerplugins/clang/unusedenumconstants.readonly.results
@@ -1,11 +1,11 @@
-bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx:77
-enum x86_64_reg_class X86_64_SSEUP_CLASS
-bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx:78
-enum x86_64_reg_class X86_64_X87_CLASS
 bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx:79
-enum x86_64_reg_class X86_64_X87UP_CLASS
+enum (anonymous namespace)::x86_64_reg_class X86_64_SSEUP_CLASS
+bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx:80
+enum (anonymous namespace)::x86_64_reg_class X86_64_X87_CLASS
+bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx:81
+enum (anonymous namespace)::x86_64_reg_class X86_64_X87UP_CLASS
 chart2/source/inc/CharacterProperties.hxx:121
-enum chart::CharacterProperties::(anonymous at 
/media/disk2/libo4/chart2/source/inc/CharacterProperties.hxx:42:5) 
FAST_PROPERTY_ID_END_CHAR_PROP
+enum chart::CharacterProperties::(anonymous at 
/home/noel/libo2/chart2/source/inc/CharacterProperties.hxx:42:5) 
FAST_PROPERTY_ID_END_CHAR_PROP
 chart2/source/inc/TitleHelper.hxx:48
 enum chart::TitleHelper::eTitleType NORMAL_TITLE_END
 chart2/source/view/inc/ShapeFactory.hxx:50
@@ -38,62 +38,154 @@ chart2/source/view/inc/ShapeFactory.hxx:63
 enum chart::SymbolEnum Symbol_HorizontalBar
 chart2/source/view/inc/ShapeFactory.hxx:64
 enum chart::SymbolEnum Symbol_VerticalBar
-configmgr/source/access.hxx:445
-enum configmgr::Access::(anonymous at 
/media/disk2/libo4/configmgr/source/access.hxx:443:5) IS_SET_MEMBER
-configmgr/source/access.hxx:445
-enum configmgr::Access::(anonymous at 
/media/disk2/libo4/configmgr/source/access.hxx:443:5) IS_GROUP_MEMBER
+configmgr/source/access.hxx:444
+enum configmgr::Access::(anonymous at 
/home/noel/libo2/configmgr/source/access.hxx:442:5) IS_GROUP_MEMBER
+configmgr/source/access.hxx:444
+enum configmgr::Access::(anonymous at 
/home/noel/libo2/configmgr/source/access.hxx:442:5) IS_SET_MEMBER
 configmgr/source/parsemanager.hxx:44
-enum configmgr::ParseManager::(anonymous at 
/media/disk2/libo4/configmgr/source/parsemanager.hxx:44:5) NAMESPACE_OOR
+enum configmgr::ParseManager::(anonymous at 
/home/noel/libo2/configmgr/source/parsemanager.hxx:44:5) NAMESPACE_XS
 configmgr/source/parsemanager.hxx:44
-enum configmgr::ParseManager::(anonymous at 
/media/disk2/libo4/configmgr/source/parsemanager.hxx:44:5) NAMESPACE_XS
+enum configmgr::ParseManager::(anonymous at 
/home/noel/libo2/configmgr/source/parsemanager.hxx:44:5) NAMESPACE_XSI
 configmgr/source/parsemanager.hxx:44
-enum configmgr::ParseManager::(anonymous at 
/media/disk2/libo4/configmgr/source/parsemanager.hxx:44:5) NAMESPACE_XSI
+enum configmgr::ParseManager::(anonymous at 
/home/noel/libo2/configmgr/source/parsemanager.hxx:44:5) NAMESPACE_OOR
 connectivity/source/drivers/evoab2/NConnection.hxx:41
 connectivity::evoab::SDBCAddress::sdbc_address_type Unknown
-cui/source/options/optgenrl.cxx:62
+cui/source/options/optgenrl.cxx:63
 enum (anonymous namespace)::RowType nRowCount
 

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang desktop/source include/sfx2 include/vcl sfx2/source vcl/inc vcl/jsdialog vcl/source

2020-07-03 Thread Szymon Kłos (via logerrit)
 compilerplugins/clang/badstatics.cxx|1 +
 desktop/source/lib/init.cxx |   13 +
 include/sfx2/notebookbar/SfxNotebookBar.hxx |7 +--
 include/vcl/notebookbar.hxx |6 --
 include/vcl/weld.hxx|2 +-
 sfx2/source/notebookbar/SfxNotebookBar.cxx  |   23 ++-
 vcl/inc/jsdialog/jsdialogbuilder.hxx|   12 
 vcl/jsdialog/jsdialogbuilder.cxx|   28 
 vcl/source/control/notebookbar.cxx  |   12 ++--
 9 files changed, 88 insertions(+), 16 deletions(-)

New commits:
commit e2b50a956cd34179d4f1e7f87834a94188011843
Author: Szymon Kłos 
AuthorDate: Tue Jun 16 14:07:32 2020 +0200
Commit: Szymon Kłos 
CommitDate: Fri Jul 3 09:50:41 2020 +0200

jsdialog: weld toolbar

Change-Id: If105d6716fc43f471f63f4eb60fa85498cb3dcc6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96934
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97789
Tested-by: Jenkins

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 792b6f8f5419..1ced81cb6ea2 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3716,6 +3716,19 @@ static void doc_sendDialogEvent(LibreOfficeKitDocument* 
/*pThis*/, unsigned nWin
 bContinueWithLOKWindow = true;
 }
 }
+else if (sControlType == "toolbox")
+{
+auto pToolbar = dynamic_cast(pWidget);
+if (pToolbar)
+{
+if (sAction == "click")
+{
+
pToolbar->signal_clicked(OUStringToOString(aMap["data"], 
RTL_TEXTENCODING_ASCII_US));
+}
+else
+bContinueWithLOKWindow = true;
+}
+}
 else
 {
 bContinueWithLOKWindow = true;
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 8f2008598b80..cf4abaf5011d 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -2187,7 +2187,6 @@ protected:
 Link m_aClickHdl;
 Link m_aToggleMenuHdl;
 
-void signal_clicked(const OString& rIdent) { m_aClickHdl.Call(rIdent); }
 void signal_toggle_menu(const OString& rIdent) { 
m_aToggleMenuHdl.Call(rIdent); }
 
 public:
@@ -2236,6 +2235,7 @@ public:
 
 void connect_clicked(const Link& rLink) { 
m_aClickHdl = rLink; }
 void connect_menu_toggled(const Link& rLink) { 
m_aToggleMenuHdl = rLink; }
+virtual void signal_clicked(const OString& rIdent) { 
m_aClickHdl.Call(rIdent); }
 };
 
 class VCL_DLLPUBLIC SizeGroup
diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx 
b/vcl/inc/jsdialog/jsdialogbuilder.hxx
index f68853d34037..0e907fe03a59 100644
--- a/vcl/inc/jsdialog/jsdialogbuilder.hxx
+++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx
@@ -19,6 +19,7 @@
 #include 
 #include 
 
+class ToolBox;
 class ComboBox;
 typedef std::map WidgetMap;
 
@@ -85,6 +86,8 @@ public:
 weld_drawing_area(const OString& id, const a11yref& rA11yImpl = nullptr,
   FactoryFunction pUITestFactoryFunction = nullptr, void* 
pUserData = nullptr,
   bool bTakeOwnership = false) override;
+std::unique_ptr weld_toolbar(const OString& id,
+bool bTakeOwnership = false) 
override;
 
 static weld::MessageDialog* CreateMessageDialog(weld::Widget* pParent,
 VclMessageType 
eMessageType,
@@ -223,4 +226,13 @@ public:
 virtual void queue_draw_area(int x, int y, int width, int height) override;
 };
 
+class VCL_DLLPUBLIC JSToolbar : public JSWidget
+{
+public:
+JSToolbar(VclPtr aOwnedToplevel, ::ToolBox* pToolbox, 
SalInstanceBuilder* pBuilder,
+  bool bTakeOwnership);
+
+void signal_clicked(const OString& rIdent) override;
+};
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index b678c34333b2..9f566b7c7434 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -18,6 +18,7 @@
 #include 
 #include 
 #include 
+#include 
 
 JSDialogNotifyIdle::JSDialogNotifyIdle(VclPtr aWindow)
 : Idle("JSDialog notify")
@@ -309,6 +310,21 @@ JSInstanceBuilder::weld_drawing_area(const OString& id, 
const a11yref& rA11yImpl
 return pWeldWidget;
 }
 
+std::unique_ptr JSInstanceBuilder::weld_toolbar(const OString& 
id,
+   bool 
bTakeOwnership)
+{
+ToolBox* pToolBox = m_xBuilder->get(id);
+auto pWeldWidget = pToolBox ? std::make_unique(
+ 

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

2020-06-10 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/buriedassign.cxx  |   97 ++--
 compilerplugins/clang/test/buriedassign.cxx |   32 +
 sc/source/core/tool/interpr5.cxx|9 ++
 sw/source/core/bastyp/calc.cxx  |4 -
 sw/source/core/bastyp/swcache.cxx   |8 +-
 sw/source/core/bastyp/swregion.cxx  |7 +-
 sw/source/core/crsr/findattr.cxx|   11 ++-
 sw/source/core/crsr/swcrsr.cxx  |   28 +---
 sw/source/core/crsr/trvltbl.cxx |7 +-
 sw/source/core/doc/docbm.cxx|6 +
 sw/source/core/doc/docfld.cxx   |3 
 sw/source/core/doc/doclay.cxx   |3 
 sw/source/core/doc/docnum.cxx   |5 +
 sw/source/core/doc/docsort.cxx  |5 +
 sw/source/core/doc/tblcpy.cxx   |6 +
 sw/source/core/doc/tblrwcl.cxx  |3 
 sw/source/core/docnode/ndcopy.cxx   |6 +
 sw/source/core/docnode/ndsect.cxx   |5 +
 sw/source/core/docnode/ndtbl.cxx|   38 +++---
 sw/source/core/docnode/ndtbl1.cxx   |   12 +--
 sw/source/core/docnode/node.cxx |   15 ++--
 sw/source/core/draw/dcontact.cxx|   17 ++--
 sw/source/core/draw/dview.cxx   |4 -
 sw/source/core/edit/edattr.cxx  |5 +
 sw/source/core/edit/edfcol.cxx  |3 
 sw/source/core/edit/edfld.cxx   |3 
 sw/source/core/edit/editsh.cxx  |3 
 sw/source/core/fields/reffld.cxx|3 
 sw/source/core/frmedt/feshview.cxx  |4 -
 sw/source/core/frmedt/fetab.cxx |3 
 sw/source/core/frmedt/fews.cxx  |6 +
 sw/source/core/frmedt/tblsel.cxx|   19 +++--
 sw/source/core/layout/findfrm.cxx   |4 -
 sw/source/core/layout/flowfrm.cxx   |6 +
 sw/source/core/layout/frmtool.cxx   |4 -
 sw/source/core/layout/layact.cxx|4 -
 sw/source/core/layout/paintfrm.cxx  |4 -
 sw/source/core/layout/sectfrm.cxx   |6 +
 sw/source/core/layout/tabfrm.cxx|   10 +-
 sw/source/core/layout/trvlfrm.cxx   |3 
 sw/source/core/layout/wsfrm.cxx |   21 --
 sw/source/core/table/swtable.cxx|9 +-
 sw/source/core/text/frmcrsr.cxx |3 
 sw/source/core/text/itrtxt.cxx  |6 +
 sw/source/core/text/porfly.cxx  |4 -
 sw/source/core/text/txtfrm.cxx  |   11 +--
 sw/source/core/txtnode/atrfld.cxx   |7 +-
 sw/source/core/txtnode/atrftn.cxx   |3 
 sw/source/core/undo/undobj.cxx  |3 
 sw/source/core/undo/unmove.cxx  |3 
 sw/source/core/unocore/unoframe.cxx |9 +-
 sw/source/core/view/vprint.cxx  |8 +-
 sw/source/filter/ascii/parasc.cxx   |3 
 sw/source/filter/docx/swdocxreader.cxx  |6 +
 sw/source/filter/html/htmlgrin.cxx  |3 
 sw/source/filter/writer/writer.cxx  |6 +
 sw/source/filter/writer/wrt_fn.cxx  |   17 ++--
 sw/source/filter/ww8/rtfexport.cxx  |   38 ++
 sw/source/filter/ww8/wrtw8esh.cxx   |   23 --
 sw/source/filter/ww8/wrtw8sty.cxx   |3 
 sw/source/filter/ww8/wrtww8.cxx |8 +-
 sw/source/filter/ww8/ww8atr.cxx |3 
 sw/source/filter/ww8/ww8glsy.cxx|6 +
 sw/source/filter/ww8/ww8par.cxx |3 
 sw/source/filter/ww8/ww8par5.cxx|4 -
 sw/source/ui/dbui/dbinsdlg.cxx  |3 
 sw/source/ui/dbui/mmaddressblockpage.cxx|4 -
 sw/source/ui/fldui/inpdlg.cxx   |5 -
 sw/source/ui/frmdlg/frmpage.cxx |   12 ++-
 sw/source/ui/index/swuiidxmrk.cxx   |3 
 sw/source/ui/vba/vbatablehelper.cxx |3 
 sw/source/uibase/app/apphdl.cxx |3 
 sw/source/uibase/app/docsh.cxx  |6 -
 sw/source/uibase/docvw/romenu.cxx   |4 -
 sw/source/uibase/fldui/fldmgr.cxx   |4 -
 sw/source/uibase/misc/redlndlg.cxx  |   12 ++-
 sw/source/uibase/shells/frmsh.cxx   |   12 ++-
 sw/source/uibase/shells/grfsh.cxx   |4 -
 sw/source/uibase/uno/unotxdoc.cxx   |   16 ++--
 79 files changed, 500 insertions(+), 222 deletions(-)

New commits:
commit 9a5f2961b085ce2f23ecdf0a03d1114bacac8e2c
Author: Noel Grandin 
AuthorDate: Wed Jun 10 13:46:09 2020 +0200
Commit: Noel Grandin 
CommitDate: Wed Jun 10 20:43:44 2020 +0200

tdf#133858 opening spreadsheet with large array formula takes 10 mins

the spreadsheet has lots of SUM(IF over a whole column.

Which results in us allocating a matrix with 1 million rows, which is
rather slow to process.

So reduce the matrix to the data that is actually there.

We can only do this for some opcodes, because other opcodes act

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang cui/source filter/source include/filter include/sfx2 include/svtools include/vcl sc/source svtools/source svx/inc svx/source sw/inc sw

2020-05-13 Thread Stephan Bergmann (via logerrit)
 compilerplugins/clang/unusedmethods.results  |  428 ---
 cui/source/inc/about.hxx |1 
 filter/source/msfilter/svdfppt.cxx   |   17 
 include/filter/msfilter/svdfppt.hxx  |1 
 include/sfx2/StylePreviewRenderer.hxx|1 
 include/svtools/toolboxcontroller.hxx|2 
 include/vcl/combobox.hxx |2 
 include/vcl/toolbox.hxx  |5 
 include/vcl/treelistbox.hxx  |2 
 include/vcl/viewdataentry.hxx|6 
 sc/source/filter/excel/xiroot.cxx|6 
 sc/source/filter/inc/xiroot.hxx  |2 
 svtools/source/uno/toolboxcontroller.cxx |   14 
 svx/inc/CommonStylePreviewRenderer.hxx   |1 
 svx/source/styles/CommonStylePreviewRenderer.cxx |9 
 sw/inc/accessibilityoptions.hxx  |3 
 sw/source/core/inc/swfont.hxx|1 
 sw/source/core/inc/txtfrm.hxx|5 
 sw/source/core/view/viewsh.cxx   |2 
 ucb/source/ucp/webdav/ContentProperties.hxx  |2 
 ucb/source/ucp/webdav/DAVSession.hxx |2 
 ucb/source/ucp/webdav/DAVSessionFactory.hxx  |2 
 ucb/source/ucp/webdav/DateTimeHelper.hxx |2 
 ucb/source/ucp/webdav/webdavcontent.hxx  |8 
 ucb/source/ucp/webdav/webdavprovider.hxx |2 
 vcl/source/control/combobox.cxx  |5 
 vcl/source/treelist/iconview.cxx |3 
 vcl/source/treelist/treelistbox.cxx  |1 
 vcl/source/treelist/viewdataentry.cxx|   16 
 29 files changed, 247 insertions(+), 304 deletions(-)

New commits:
commit 0a7b676dd9221f2635c0c23e219fe7e168d3ed41
Author: Stephan Bergmann 
AuthorDate: Wed May 13 15:34:30 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Wed May 13 17:56:28 2020 +0200

Fix syntax errors in --with-webdav=serf code

...introduced with de61e14d0b6ee90cb4d170af340275d811b9fbbf "compact 
namespace
in ucb..uui"

Change-Id: I58e24303e1e12db0a53d46acc2daef1faa2e4cf6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94128
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/ucb/source/ucp/webdav/ContentProperties.hxx 
b/ucb/source/ucp/webdav/ContentProperties.hxx
index bb5a41eea85e..a48383f8e945 100644
--- a/ucb/source/ucp/webdav/ContentProperties.hxx
+++ b/ucb/source/ucp/webdav/ContentProperties.hxx
@@ -31,7 +31,7 @@
 
 namespace com::sun::star::beans {
 struct Property;
-} } } }
+}
 
 namespace http_dav_ucp
 {
diff --git a/ucb/source/ucp/webdav/DAVSession.hxx 
b/ucb/source/ucp/webdav/DAVSession.hxx
index 3d77ec5d5ac2..aa47b1504b22 100644
--- a/ucb/source/ucp/webdav/DAVSession.hxx
+++ b/ucb/source/ucp/webdav/DAVSession.hxx
@@ -32,7 +32,7 @@
 
 namespace com::sun::star::ucb {
 struct Lock;
-} } } }
+}
 
 namespace http_dav_ucp
 {
diff --git a/ucb/source/ucp/webdav/DAVSessionFactory.hxx 
b/ucb/source/ucp/webdav/DAVSessionFactory.hxx
index 62d9cd7e13ea..ec1fcfe3c0c4 100644
--- a/ucb/source/ucp/webdav/DAVSessionFactory.hxx
+++ b/ucb/source/ucp/webdav/DAVSessionFactory.hxx
@@ -36,7 +36,7 @@ using namespace com::sun::star;
 
 namespace com::sun::star::lang {
 class XMultiServiceFactory;
-} } } }
+}
 
 namespace http_dav_ucp
 {
diff --git a/ucb/source/ucp/webdav/DateTimeHelper.hxx 
b/ucb/source/ucp/webdav/DateTimeHelper.hxx
index d5c0d451b980..b639215335a8 100644
--- a/ucb/source/ucp/webdav/DateTimeHelper.hxx
+++ b/ucb/source/ucp/webdav/DateTimeHelper.hxx
@@ -26,7 +26,7 @@
 
 namespace com::sun::star::util {
 struct DateTime;
-} } } }
+}
 
 namespace rtl {
 class OUString;
diff --git a/ucb/source/ucp/webdav/webdavcontent.hxx 
b/ucb/source/ucp/webdav/webdavcontent.hxx
index 814b338a741d..ad4e932291de 100644
--- a/ucb/source/ucp/webdav/webdavcontent.hxx
+++ b/ucb/source/ucp/webdav/webdavcontent.hxx
@@ -33,22 +33,22 @@
 namespace com::sun::star::beans {
 struct Property;
 struct PropertyValue;
-} } } }
+}
 
 namespace com::sun::star::io {
 class XInputStream;
-} } } }
+}
 
 namespace com::sun::star::sdbc {
 class XRow;
-} } } }
+}
 
 namespace com::sun::star::ucb {
 struct OpenCommandArgument2;
 struct PropertyCommandArgument;
 struct PostCommandArgument2;
 struct TransferInfo;
-} } } }
+}
 
 namespace http_dav_ucp
 {
diff --git a/ucb/source/ucp/webdav/webdavprovider.hxx 
b/ucb/source/ucp/webdav/webdavprovider.hxx
index 322f530a1682..e399178a9df9 100644
--- a/ucb/source/ucp/webdav/webdavprovider.hxx
+++ b/ucb/source/ucp/webdav/webdavprovider.hxx
@@ -33,7 +33,7 @@
 
 namespace com::sun::star::lang {
 class XSingleServiceFactory;
-} } } }
+}
 
 namespace http_dav_ucp {
 
commit bd537420b07fc82bd9a3eb01f3e5b3b33c21a5cb
Author: Noel Grandin 
AuthorDate: Wed May 13 15:16:58 2020 +0200
Commit: Noel Grandin 
CommitDate: Wed May 13 17:56:14 2020 +0200


[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang xmloff/inc xmlsecurity/inc

2019-12-22 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/finalclasses.py|3 
 xmloff/inc/AttributeContainerHandler.hxx |2 
 xmloff/inc/DomBuilderContext.hxx |2 
 xmloff/inc/MetaExportComponent.hxx   |4 
 xmloff/inc/PageMasterImportContext.hxx   |4 
 xmloff/inc/SchXMLAutoStylePoolP.hxx  |2 
 xmloff/inc/SchXMLImport.hxx  |3 
 xmloff/inc/StyleMap.hxx  |2 
 xmloff/inc/XMLBackgroundImageContext.hxx |2 
 xmloff/inc/XMLBasicExportFilter.hxx  |2 
 xmloff/inc/XMLBitmapLogicalSizePropertyHandler.hxx   |2 
 xmloff/inc/XMLBitmapRepeatOffsetPropertyHandler.hxx  |2 
 xmloff/inc/XMLChartPropertySetMapper.hxx |   10 -
 xmloff/inc/XMLChartStyleContext.hxx  |3 
 xmloff/inc/XMLClipPropertyHandler.hxx|2 
 xmloff/inc/XMLEmbeddedObjectImportContext.hxx|2 
 xmloff/inc/XMLFillBitmapSizePropertyHandler.hxx  |2 
 xmloff/inc/XMLFootnoteConfigurationImportContext.hxx |2 
 xmloff/inc/XMLImageMapContext.hxx|2 
 xmloff/inc/XMLIndexBibliographyConfigurationContext.hxx  |2 
 xmloff/inc/XMLIsPercentagePropertyHandler.hxx|2 
 xmloff/inc/XMLLineNumberingImportContext.hxx |4 
 xmloff/inc/XMLNumberStylesImport.hxx |2 
 xmloff/inc/XMLPercentOrMeasurePropertyHandler.hxx|2 
 xmloff/inc/XMLRectangleMembersHandler.hxx|2 
 xmloff/inc/XMLReplacementImageContext.hxx|2 
 xmloff/inc/XMLScriptContextFactory.hxx   |2 
 xmloff/inc/XMLScriptExportHandler.hxx|2 
 xmloff/inc/XMLStarBasicContextFactory.hxx|2 
 xmloff/inc/XMLStarBasicExportHandler.hxx |2 
 xmloff/inc/XMLStringBufferImportContext.hxx  |2 
 xmloff/inc/XMLTextColumnsContext.hxx |2 
 xmloff/inc/XMLTextColumnsPropertyHandler.hxx |2 
 xmloff/inc/XMLTextHeaderFooterContext.hxx|2 
 xmloff/inc/animationimport.hxx   |2 
 xmloff/inc/animimp.hxx   |2 
 xmloff/inc/propimp0.hxx  |8 -
 xmloff/inc/txtfldi.hxx   |  116 +++
 xmloff/inc/txtvfldi.hxx  |   40 ++---
 xmloff/inc/xmltabi.hxx   |2 
 xmloff/inc/xmlversion.hxx|   12 -
 xmlsecurity/inc/framework/saxeventkeeperimpl.hxx |2 
 xmlsecurity/inc/framework/signaturecreatorimpl.hxx   |2 
 xmlsecurity/inc/framework/signatureverifierimpl.hxx  |2 
 xmlsecurity/inc/framework/xmlsignaturetemplateimpl.hxx   |2 
 xmlsecurity/inc/gpg/SEInitializer.hxx|2 
 xmlsecurity/inc/gpg/xmlsignature_gpgimpl.hxx |2 
 xmlsecurity/inc/macrosecurity.hxx|2 
 xmlsecurity/inc/xmlsec/xmldocumentwrapper_xmlsecimpl.hxx |2 
 xmlsecurity/inc/xmlsignaturehelper2.hxx  |2 
 xmlsecurity/inc/xsecctl.hxx  |2 
 51 files changed, 140 insertions(+), 147 deletions(-)

New commits:
commit e7f16852b96d0ccaaa8a5e2cdc55a0d77679d97c
Author: Noel Grandin 
AuthorDate: Sun Dec 22 17:22:49 2019 +0200
Commit: Noel Grandin 
CommitDate: Sun Dec 22 18:04:13 2019 +0100

loplugin:finalclasses in xmloff

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

diff --git a/xmloff/inc/AttributeContainerHandler.hxx 
b/xmloff/inc/AttributeContainerHandler.hxx
index 4cdeccaaf1eb..1d6a26ae199e 100644
--- a/xmloff/inc/AttributeContainerHandler.hxx
+++ b/xmloff/inc/AttributeContainerHandler.hxx
@@ -25,7 +25,7 @@
 /**
 PropertyHandler for the XML-data-type:
 */
-class XMLAttributeContainerHandler : public XMLPropertyHandler
+class XMLAttributeContainerHandler final : public XMLPropertyHandler
 {
 public:
 virtual ~XMLAttributeContainerHandler() override;
diff --git a/xmloff/inc/DomBuilderContext.hxx b/xmloff/inc/DomBuilderContext.hxx
index 0df0f6de135d..cf73d6e7d608 100644
--- a/xmloff/inc/DomBuilderContext.hxx
+++ b/xmloff/inc/DomBuilderContext.hxx
@@ -41,7 +41,7 @@ class SvXMLImportContext;
 /**
  * DomBuilderContext creates a DOM tree suitable for in-memory processing of
  * XML data from a sequence of SAX events */
-class DomBuilderContext : public SvXMLImportContext
+class DomBuilderContext final : public SvXMLImportContext
 {
 css::uno::Reference mxNode;
 
diff --git a/xmloff/inc/MetaExportComponent.hxx 
b/xmloff/inc/MetaExportComponent.hxx
index 34278d87631a..e9ac444666cc 

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang include/sfx2 include/svx reportdesign/source sc/inc sc/qa sc/source sfx2/source svx/source

2019-12-14 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/refcounting.cxx   |3 
 include/sfx2/dinfdlg.hxx|   10 ---
 include/sfx2/frame.hxx  |1 
 include/sfx2/sidebar/SidebarDockingWindow.hxx   |3 
 include/sfx2/viewfrm.hxx|2 
 include/svx/SvxPresetListBox.hxx|1 
 include/svx/fmsrcimp.hxx|1 
 include/svx/galtheme.hxx|2 
 include/svx/langbox.hxx |1 
 include/svx/sdr/overlay/overlayanimatedbitmapex.hxx |8 --
 include/svx/sdr/overlay/overlaybitmapex.hxx |9 --
 include/svx/sdr/overlay/overlaytriangle.hxx |6 -
 include/svx/sdrpaintwindow.hxx  |4 -
 include/svx/svdglue.hxx |1 
 include/svx/svdhlpln.hxx|1 
 include/svx/svdpagv.hxx |2 
 reportdesign/source/core/api/Group.cxx  |2 
 reportdesign/source/core/inc/Group.hxx  |2 
 reportdesign/source/filter/xml/xmlStyleImport.cxx   |2 
 reportdesign/source/filter/xml/xmlStyleImport.hxx   |2 
 reportdesign/source/ui/dlg/AddField.cxx |2 
 reportdesign/source/ui/inc/AddField.hxx |1 
 sc/inc/address.hxx  |   14 ++--
 sc/inc/document.hxx |   22 --
 sc/inc/markmulti.hxx|9 +-
 sc/inc/sheetlimits.hxx  |   66 
 sc/qa/unit/mark_test.cxx|3 
 sc/source/core/data/documen2.cxx|2 
 sc/source/core/data/markdata.cxx|8 +-
 sc/source/core/data/markmulti.cxx   |   41 ++--
 sfx2/source/dialog/dinfdlg.cxx  |   20 +++---
 sfx2/source/doc/doctempl.cxx|8 --
 sfx2/source/sidebar/SidebarDockingWindow.cxx|4 -
 sfx2/source/view/frame.cxx  |2 
 sfx2/source/view/frame2.cxx |5 -
 sfx2/source/view/viewfrm.cxx|2 
 svx/source/dialog/langbox.cxx   |7 --
 svx/source/form/fmsrcimp.cxx|8 --
 svx/source/gallery2/galtheme.cxx|3 
 svx/source/sdr/overlay/overlayanimatedbitmapex.cxx  |   12 +--
 svx/source/sdr/overlay/overlaybitmapex.cxx  |   10 +--
 svx/source/sdr/overlay/overlaytriangle.cxx  |4 -
 svx/source/svdraw/sdrpaintwindow.cxx|4 -
 svx/source/svdraw/svdglue.cxx   |7 --
 svx/source/svdraw/svdhlpln.cxx  |7 --
 svx/source/svdraw/svdpagv.cxx   |7 --
 svx/source/tbxctrls/SvxPresetListBox.cxx|2 
 47 files changed, 154 insertions(+), 189 deletions(-)

New commits:
commit f6064b13586aa8681907b69e4f43643251f9b803
Author: Noel Grandin 
AuthorDate: Sat Dec 14 12:05:55 2019 +0200
Commit: Noel Grandin 
CommitDate: Sat Dec 14 13:34:41 2019 +0100

sc: rowcol: convert mark data

with this patch I can finally load a 3201 column document

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

diff --git a/compilerplugins/clang/refcounting.cxx 
b/compilerplugins/clang/refcounting.cxx
index 168d775b28d2..531039d74cdc 100644
--- a/compilerplugins/clang/refcounting.cxx
+++ b/compilerplugins/clang/refcounting.cxx
@@ -252,6 +252,9 @@ bool containsSalhelperReferenceObjectSubclass(const 
clang::Type* pType0) {
 pRecordDecl = pRecordDecl->getCanonicalDecl();
 }
 if (pRecordDecl) {
+// for performance reasons we sometimes allocate temporaries on the 
stack
+if 
(loplugin::DeclCheck(pRecordDecl).Struct("ScSheetLimits").GlobalNamespace())
+return false;
 const ClassTemplateSpecializationDecl* pTemplate = 
dyn_cast(pRecordDecl);
 if (pTemplate) {
 auto const dc = loplugin::DeclCheck(pTemplate);
diff --git a/sc/inc/address.hxx b/sc/inc/address.hxx
index 2109d582f67b..79af2eab6ca8 100644
--- a/sc/inc/address.hxx
+++ b/sc/inc/address.hxx
@@ -70,6 +70,8 @@ const SCROW   MAXROW = MAXROWCOUNT - 1;
 const SCCOL   MAXCOL = MAXCOLCOUNT - 1;
 const SCTAB   MAXTAB = MAXTABCOUNT - 1;
 const SCCOLROWMAXCOLROW  = MAXROW;
+const SCROW   MAXROW_JUMBO   = 16 * 1000 * 1000;
+const SCCOL   MAXCOL_JUMBO   = 16384;
 // Maximum tiled rendering values
 const SCROW   MAXTILEDROW= 50;
 // Limit the initial tab count to prevent users to set the count too high,
@@ -90,13 +92,13 @@ const SCROW MAXROW_30 = 8191;
 
 [[nodiscard]] inline bool ValidCol( SCCOL nCol, SCCOL nMaxCol )
 {
-  

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang desktop/inc desktop/source include/vcl sw/source vcl/inc vcl/source

2019-12-12 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/singlevalfields.could-be-bool.results |   45 -
 compilerplugins/clang/singlevalfields.results   |  324 
+++-
 compilerplugins/clang/unusedfields.only-used-in-constructor.results |  392 
+-
 compilerplugins/clang/unusedfields.readonly.results |  290 
+++
 compilerplugins/clang/unusedfields.untouched.results|  236 
+++---
 compilerplugins/clang/unusedfields.writeonly.results|  266 
+++---
 desktop/inc/lib/init.hxx|1 
 desktop/source/lib/init.cxx |5 
 include/vcl/treelistbox.hxx |1 
 sw/source/uibase/inc/olmenu.hxx |3 
 sw/source/uibase/lingu/olmenu.cxx   |3 
 vcl/inc/svimpbox.hxx|5 
 vcl/source/control/imivctl.hxx  |3 
 vcl/source/control/imivctl1.cxx |   17 
 vcl/source/treelist/svimpbox.cxx|   31 
 vcl/source/treelist/svtabbx.cxx |   14 
 vcl/source/treelist/treelistbox.cxx |5 
 17 files changed, 793 insertions(+), 848 deletions(-)

New commits:
commit 753084a3f73bb8a88412feac7aa40a2750e6e9f3
Author: Noel Grandin 
AuthorDate: Wed Dec 11 12:56:57 2019 +0200
Commit: Noel Grandin 
CommitDate: Fri Dec 13 07:05:24 2019 +0100

loplugin:singlevalfields

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

diff --git a/compilerplugins/clang/singlevalfields.could-be-bool.results 
b/compilerplugins/clang/singlevalfields.could-be-bool.results
index 8009a02ee3bc..dc2692b082bf 100644
--- a/compilerplugins/clang/singlevalfields.could-be-bool.results
+++ b/compilerplugins/clang/singlevalfields.could-be-bool.results
@@ -16,16 +16,16 @@ desktop/source/app/main.c:29
 editeng/source/misc/hangulhanja.cxx:79
 editeng::HangulHanjaConversion_Impl m_eConvType
 class HangulHanjaConversion::ConversionType
-editeng/source/misc/svxacorr.cxx:234
+editeng/source/misc/svxacorr.cxx:239
 GetIgnoreTranslWrapper bIsInit
 int
-filter/source/graphicfilter/eps/eps.cxx:142
-PSWriter nNextChrSetId
+filter/source/graphicfilter/eps/eps.cxx:144
+(anonymous namespace)::PSWriter nNextChrSetId
 sal_uInt8
 include/opencl/openclwrapper.hxx:46
 openclwrapper::GPUEnv mnIsUserCreated
 int
-include/svtools/ruler.hxx:621
+include/svtools/ruler.hxx:622
 Ruler mnBorderWidth
 long
 include/tools/ref.hxx:126
@@ -49,8 +49,8 @@ jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx:191
 libreofficekit/source/gtk/tilebuffer.hxx:229
 LOEvent m_nSetGraphicSelectionType
 int
-sal/rtl/cipher.cxx:110
-Cipher_Impl m_algorithm
+sal/rtl/cipher.cxx:112
+(anonymous namespace)::Cipher_Impl m_algorithm
 rtlCipherAlgorithm
 sc/source/filter/inc/stylesbuffer.hxx:290
 oox::xls::ApiAlignmentData mnHorJustifyMethod
@@ -58,35 +58,26 @@ sc/source/filter/inc/stylesbuffer.hxx:290
 sc/source/filter/inc/stylesbuffer.hxx:292
 oox::xls::ApiAlignmentData mnVerJustifyMethod
 sal_Int32
-sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx:1025
-ScPagePreviewCountData nHeaders
+sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx:1067
+(anonymous namespace)::ScPagePreviewCountData nHeaders
 long
-sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx:1026
-ScPagePreviewCountData nTables
+sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx:1068
+(anonymous namespace)::ScPagePreviewCountData nTables
 long
-sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx:1028
-ScPagePreviewCountData nFooters
+sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx:1070
+(anonymous namespace)::ScPagePreviewCountData nFooters
 long
 sc/source/ui/vba/vbahyperlink.hxx:83
 ScVbaHyperlink mnType
 long
-sd/qa/unit/tiledrendering/tiledrendering.cxx:956
-ViewCallback m_nPart
+sd/qa/unit/tiledrendering/tiledrendering.cxx:958
+(anonymous namespace)::ViewCallback m_nPart
 int
-soltools/cpp/_tokens.c:35
-/media/disk2/libo4/soltools/cpp/_tokens.c EBCDIC_ExternTokenDetected
-int
-soltools/cpp/_tokens.c:36
-/media/disk2/libo4/soltools/cpp/_tokens.c EBCDIC_StartTokenDetected
-int
-soltools/cpp/cpp.h:121
-includelist always
-char
 svx/source/inc/cell.hxx:205
 sdr::table::Cell mnCellContentType
 css::table::CellContentType
-svx/source/table/tablertfimporter.cxx:55
-sdr::table::RTFCellDefault mnRowSpan
+svx/source/table/tablertfimporter.cxx:57
+sdr::table::(anonymous namespace)::RTFCellDefault mnRowSpan
 sal_Int32
 

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

2019-11-30 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/mergeclasses.py  |4 
 compilerplugins/clang/mergeclasses.results |  196 +++--
 svx/source/form/fmscriptingenv.cxx |   54 ---
 svx/source/form/fmundo.cxx |2 
 svx/source/inc/fmscriptingenv.hxx  |   35 +++--
 svx/source/inc/fmundo.hxx  |2 
 6 files changed, 161 insertions(+), 132 deletions(-)

New commits:
commit 6b6609fc03d484ce1bfb18162b709704049b5ee9
Author: Noel Grandin 
AuthorDate: Fri Nov 29 15:21:51 2019 +0200
Commit: Noel Grandin 
CommitDate: Sat Nov 30 21:33:48 2019 +0100

loplugin:mergeclasses FormScriptingEnvironment with 
IFormScriptingEnvironment

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

diff --git a/svx/source/form/fmscriptingenv.cxx 
b/svx/source/form/fmscriptingenv.cxx
index f76f8e86f729..aa480dd3a123 100644
--- a/svx/source/form/fmscriptingenv.cxx
+++ b/svx/source/form/fmscriptingenv.cxx
@@ -71,19 +71,11 @@ namespace svxform
 using ::com::sun::star::awt::XControl;
 using ::com::sun::star::beans::XPropertySet;
 
-namespace {
-
-class FormScriptingEnvironment;
-
-}
-
 //= FormScriptListener
 
 typedef ::cppu::WeakImplHelper <   XScriptListener
 >   FormScriptListener_Base;
 
-namespace {
-
 /** implements the XScriptListener interface, is used by 
FormScriptingEnvironment
 */
 class FormScriptListener:public FormScriptListener_Base
@@ -145,37 +137,6 @@ namespace svxform
 DECL_LINK( OnAsyncScriptEvent, void*, void );
 };
 
-class FormScriptingEnvironment:
-public IFormScriptingEnvironment
-{
-private:
-typedef rtl::Reference ListenerImplementation;
-
-private:
-::osl::Mutexm_aMutex;
-ListenerImplementation  m_pScriptListener;
-FmFormModel&m_rFormModel;
-boolm_bDisposed;
-
-public:
-explicit FormScriptingEnvironment( FmFormModel& _rModel );
-FormScriptingEnvironment(const FormScriptingEnvironment&) = delete;
-FormScriptingEnvironment& operator=(const FormScriptingEnvironment&) = 
delete;
-
-// callback for FormScriptListener
-void doFireScriptEvent( const ScriptEvent& _rEvent, Any* 
_pSynchronousResult );
-
-// IFormScriptingEnvironment
-virtual void registerEventAttacherManager( const Reference< 
XEventAttacherManager >& _rxManager ) override;
-virtual void revokeEventAttacherManager( const Reference< 
XEventAttacherManager >& _rxManager ) override;
-virtual void dispose() override;
-
-private:
-void impl_registerOrRevoke_throw( const Reference< 
XEventAttacherManager >& _rxManager, bool _bRegister );
-};
-
-}
-
 FormScriptListener::FormScriptListener( FormScriptingEnvironment* 
pScriptExecutor )
 :m_pScriptExecutor( pScriptExecutor )
 {
@@ -906,7 +867,7 @@ namespace svxform
 :m_rFormModel( _rModel )
 ,m_bDisposed( false )
 {
-m_pScriptListener = ListenerImplementation( new FormScriptListener( 
this ) );
+m_pScriptListener = new FormScriptListener( this );
 // note that this is a cyclic reference between the FormScriptListener 
and the FormScriptingEnvironment
 // This cycle is broken up when our instance is disposed.
 }
@@ -946,12 +907,6 @@ namespace svxform
 impl_registerOrRevoke_throw( _rxManager, false );
 }
 
-
-IFormScriptingEnvironment::~IFormScriptingEnvironment()
-{
-}
-
-
 namespace
 {
 class NewStyleUNOScript
@@ -1080,13 +1035,6 @@ namespace svxform
 m_pScriptListener.clear();
 }
 
-
-PFormScriptingEnvironment createDefaultFormScriptingEnvironment( 
FmFormModel& _rModel )
-{
-return new FormScriptingEnvironment( _rModel );
-}
-
-
 }
 
 
diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx
index 2552161a43f9..d887bbad661f 100644
--- a/svx/source/form/fmundo.cxx
+++ b/svx/source/form/fmundo.cxx
@@ -177,7 +177,7 @@ static OUString static_STR_UNDO_PROPERTY;
 FmXUndoEnvironment::FmXUndoEnvironment(FmFormModel& _rModel)
:rModel( _rModel )
,m_pPropertySetCache( nullptr )
-   ,m_pScriptingEnv( 
::svxform::createDefaultFormScriptingEnvironment( _rModel ) )
+   ,m_pScriptingEnv( new svxform::FormScriptingEnvironment( 
_rModel ) )
,m_Locks( 0 )
,bReadOnly( false )
,m_bDisposed( false )
diff --git a/svx/source/inc/fmscriptingenv.hxx 
b/svx/source/inc/fmscriptingenv.hxx
index d747f038e844..ef4f29f80418 100644
--- a/svx/source/inc/fmscriptingenv.hxx
+++ b/svx/source/inc/fmscriptingenv.hxx
@@ -28,16 +28,21 @@ class FmFormModel;
 
 namespace svxform
 {
-
+class 

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

2019-11-30 Thread Stephan Bergmann (via logerrit)
 compilerplugins/clang/test/unnecessaryparen.cxx |2 +-
 compilerplugins/clang/unnecessaryparen.cxx  |4 +++-
 sd/inc/CustomAnimationPreset.hxx|2 +-
 sd/source/core/CustomAnimationPreset.cxx|6 +++---
 4 files changed, 8 insertions(+), 6 deletions(-)

New commits:
commit b2c3528cc400bd2c10e56bd9d49e3339013ae388
Author: Stephan Bergmann 
AuthorDate: Sat Nov 30 11:44:26 2019 +0100
Commit: Stephan Bergmann 
CommitDate: Sat Nov 30 14:59:33 2019 +0100

...and take implicit const casts into account

...following up on 4f8a744c4fcf2c69462af19bd807fee32413158d "Make
loplugin:unnecessaryparen treat member expressions consistently"

Change-Id: I444d2995e88990c3c6fa2b912ef68032daf2cad9
Reviewed-on: https://gerrit.libreoffice.org/84112
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/compilerplugins/clang/test/unnecessaryparen.cxx 
b/compilerplugins/clang/test/unnecessaryparen.cxx
index 88ed3650a09a..c33876ddae61 100644
--- a/compilerplugins/clang/test/unnecessaryparen.cxx
+++ b/compilerplugins/clang/test/unnecessaryparen.cxx
@@ -115,7 +115,7 @@ int main()
 (void)nBits;
 };
 
-struct B { operator bool(); };
+struct B { operator bool() const; };
 
 struct N { bool operator !(); };
 
diff --git a/compilerplugins/clang/unnecessaryparen.cxx 
b/compilerplugins/clang/unnecessaryparen.cxx
index 79085d80027e..106f2d2b3352 100644
--- a/compilerplugins/clang/unnecessaryparen.cxx
+++ b/compilerplugins/clang/unnecessaryparen.cxx
@@ -120,7 +120,9 @@ public:
 // ImplicitCastExpr, so that VisitMemberExpr doesn't erroneously pick 
it up (and note that
 // CXXMemberCallExpr's getImplicitObjectArgument() skips past the 
underlying MemberExpr):
 if (auto const e1 = dyn_cast(expr->getSubExpr())) {
-if (auto const e2 = 
dyn_cast(e1->getImplicitObjectArgument())) {
+if (auto const e2 = dyn_cast(
+e1->getImplicitObjectArgument()->IgnoreImpCasts()))
+{
 handled_.insert(e2);
 }
 }
commit 93161eed833913dfef9d9e125952ffd0ff66ac13
Author: Mark Hung 
AuthorDate: Mon Nov 18 00:48:06 2019 +0800
Commit: Mark Hung 
CommitDate: Sat Nov 30 14:59:22 2019 +0100

sd: fix typo maEffectDiscriptorMap -> maEffectDescriptorMap;

Change-Id: Ie0e8dc67969ca680e80c544f954d3bef9adbcb33
Reviewed-on: https://gerrit.libreoffice.org/83078
Tested-by: Jenkins
Reviewed-by: Mark Hung 

diff --git a/sd/inc/CustomAnimationPreset.hxx b/sd/inc/CustomAnimationPreset.hxx
index ad21b7a00d4a..220dedb9b0e3 100644
--- a/sd/inc/CustomAnimationPreset.hxx
+++ b/sd/inc/CustomAnimationPreset.hxx
@@ -118,7 +118,7 @@ private:
 
 private:
 css::uno::Reference< css::animations::XAnimationNode > mxRootNode;
-EffectDescriptorMap maEffectDiscriptorMap;
+EffectDescriptorMap maEffectDescriptorMap;
 UStringMap maEffectNameMap;
 UStringMap maPropertyNameMap;
 
diff --git a/sd/source/core/CustomAnimationPreset.cxx 
b/sd/source/core/CustomAnimationPreset.cxx
index e54c67d95b5c..ed20faf74b3b 100644
--- a/sd/source/core/CustomAnimationPreset.cxx
+++ b/sd/source/core/CustomAnimationPreset.cxx
@@ -320,7 +320,7 @@ void CustomAnimationPresets::importEffects()
 {
 pDescriptor.reset( new CustomAnimationPreset( pEffect 
) );
 pDescriptor->maLabel = getUINameForPresetId( 
pEffect->getPresetId() );
-maEffectDiscriptorMap[aPresetId] = pDescriptor;
+maEffectDescriptorMap[aPresetId] = pDescriptor;
 }
 
 ++aIter;
@@ -450,9 +450,9 @@ void CustomAnimationPresets::importPresets( const 
Reference< XMultiServiceFactor
 
 CustomAnimationPresetPtr CustomAnimationPresets::getEffectDescriptor( const 
OUString& rPresetId ) const
 {
-EffectDescriptorMap::const_iterator aIter( maEffectDiscriptorMap.find( 
rPresetId ) );
+EffectDescriptorMap::const_iterator aIter( maEffectDescriptorMap.find( 
rPresetId ) );
 
-if( aIter != maEffectDiscriptorMap.end() )
+if( aIter != maEffectDescriptorMap.end() )
 {
 return (*aIter).second;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang external/mdds

2019-11-25 Thread Stephan Bergmann (via logerrit)
 compilerplugins/clang/compat.hxx |   10 +-
 compilerplugins/clang/conditionalstring.cxx  |2 +-
 compilerplugins/clang/doubleconvert.cxx  |2 +-
 compilerplugins/clang/implicitboolconversion.cxx |4 ++--
 compilerplugins/clang/plugin.cxx |3 ++-
 compilerplugins/clang/redundantfcast.cxx |4 ++--
 compilerplugins/clang/referencecasting.cxx   |5 +++--
 compilerplugins/clang/simplifybool.cxx   |3 ++-
 compilerplugins/clang/stringbuffer.cxx   |3 ++-
 compilerplugins/clang/stringconstant.cxx |4 ++--
 compilerplugins/clang/stringstatic.cxx   |3 ++-
 compilerplugins/clang/unnecessaryparen.cxx   |2 +-
 compilerplugins/clang/unoany.cxx |5 +++--
 compilerplugins/clang/unoquery.cxx   |3 ++-
 external/mdds/UnpackedTarball_mdds.mk|1 +
 external/mdds/Wdeprecated-copy.patch |   11 +++
 16 files changed, 46 insertions(+), 19 deletions(-)

New commits:
commit 48d0d5482dd4fc496e039986a71bb785f4880cb7
Author: Stephan Bergmann 
AuthorDate: Mon Nov 25 17:01:03 2019 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Nov 26 07:13:00 2019 +0100

external/mdds: -Werror,-Wdeprecated-copy

> In file included from sc/source/core/data/cellvalues.cxx:12:
> In file included from sc/inc/column.hxx:28:
> In file included from sc/inc/mtvelements.hxx:30:
> In file included from 
workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector.hpp:33:
> workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector_itr.hpp:74:9: 
error: definition of implicit copy assignment operator for 'private_data' is 
deprecated because it has a user-declared copy constructor 
[-Werror,-Wdeprecated-copy]
> private_data(const private_data& other) :
> ^
> workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector_itr.hpp:44:8: 
note: in implicit copy assignment operator for 
'mdds::detail::mtv::iterator_value_node::private_data' first required here
> struct iterator_value_node
>^
> 
workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector_itr.hpp:219:20: 
note: in implicit copy assignment operator for 
'mdds::detail::mtv::iterator_value_node' first required here
> m_cur_node = other.m_cur_node;
>^
> 
workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector_itr.hpp:238:7: 
note: in instantiation of member function 
'mdds::detail::mtv::iterator_common_base, mdds::mtv::noncopyable_managed_element_block<53, 
EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, 
ScFormulaCell> >, sc::CellStoreEvent>::iterator_trait>::operator=' requested 
here
> class iterator_base : public iterator_common_base<_Trait>
>   ^

with recent Clang 10 trunk, similar to
 "Remove some redundantly
user-declared copy ctors and assignment ops"

Change-Id: I156674bad367ca68404c3c75d61ec72b401c6305
Reviewed-on: https://gerrit.libreoffice.org/83700
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/mdds/UnpackedTarball_mdds.mk 
b/external/mdds/UnpackedTarball_mdds.mk
index c015f4c13f5a..c5ca78bd368c 100644
--- a/external/mdds/UnpackedTarball_mdds.mk
+++ b/external/mdds/UnpackedTarball_mdds.mk
@@ -14,6 +14,7 @@ $(eval $(call 
gb_UnpackedTarball_set_tarball,mdds,$(MDDS_TARBALL)))
 $(eval $(call gb_UnpackedTarball_set_patchlevel,mdds,0))
 
 $(eval $(call gb_UnpackedTarball_add_patches,mdds,\
+external/mdds/Wdeprecated-copy.patch \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/mdds/Wdeprecated-copy.patch 
b/external/mdds/Wdeprecated-copy.patch
new file mode 100644
index ..edcb2ddaa9ec
--- /dev/null
+++ b/external/mdds/Wdeprecated-copy.patch
@@ -0,0 +1,11 @@
+--- include/mdds/multi_type_vector_itr.hpp
 include/mdds/multi_type_vector_itr.hpp
+@@ -71,8 +71,6 @@
+ private_data() : block_index(0) {}
+ private_data(size_type _block_index) :
+ block_index(_block_index) {}
+-private_data(const private_data& other) :
+-block_index(other.block_index) {}
+ 
+ void swap(private_data& other)
+ {
commit 95d8b368d11eeccc276c0c6ac225144566a1206d
Author: Stephan Bergmann 
AuthorDate: Mon Nov 25 13:04:02 2019 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Nov 26 07:12:38 2019 +0100

Adapt to clang::MaterializeTemporaryExpr::GetTemparyExpr rename

...in  "[NFC] Refactor representation of
materialized temporaries"

Change-Id: I02fbf6765f9713e4d457f07521129cc9d8db5751
Reviewed-on: https://gerrit.libreoffice.org/83669
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/compilerplugins/clang/compat.hxx 

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang cui/source sd/qa

2019-11-16 Thread Andrea Gelmini (via logerrit)
 compilerplugins/clang/consttobool.cxx |2 +-
 cui/source/customize/cfg.cxx  |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit bde2137d6efa7966672916ae5a0b8020bec7dbc4
Author: Andrea Gelmini 
AuthorDate: Sat Nov 16 16:21:07 2019 +0100
Commit: Julien Nabet 
CommitDate: Sun Nov 17 08:32:43 2019 +0100

Removed executable permission on file pptx

Change-Id: I93dd9533fc4f4d2acc1afe282754af0c78a25f73
Reviewed-on: https://gerrit.libreoffice.org/82985
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/sd/qa/unit/data/pptx/tdf128684.pptx 
b/sd/qa/unit/data/pptx/tdf128684.pptx
old mode 100755
new mode 100644
commit 4e053538db0e701f444a4dd81bfc0de2ca053c18
Author: Andrea Gelmini 
AuthorDate: Fri Nov 15 18:50:29 2019 +0100
Commit: Julien Nabet 
CommitDate: Sun Nov 17 08:32:34 2019 +0100

Fix typos

Change-Id: I9251205c47f26be7695496b5887b849fcf1335f1
Reviewed-on: https://gerrit.libreoffice.org/82814
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/compilerplugins/clang/consttobool.cxx 
b/compilerplugins/clang/consttobool.cxx
index a3c57d704b26..c7ebd6b2a162 100644
--- a/compilerplugins/clang/consttobool.cxx
+++ b/compilerplugins/clang/consttobool.cxx
@@ -153,7 +153,7 @@ public:
 {
 l1 = 
compiler.getSourceManager().getImmediateMacroCallerLoc(l1);
 }
-// For exmaple, /usr/include/glib-2.0/glib/gmacros.h from
+// For example, /usr/include/glib-2.0/glib/gmacros.h from
 // glib2-devel-2.62.1-1.fc31.x86_64 has
 //
 //   #define TRUE (!FALSE)
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 0f0f6dc7b1f9..4e084ce21951 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -3180,7 +3180,7 @@ sal_Int8 
SvxConfigPageFunctionDropTarget::AcceptDrop(const AcceptDropEvent& rEvt
 sal_Int8 SvxConfigPageFunctionDropTarget::ExecuteDrop( const ExecuteDropEvent& 
rEvt )
 {
 weld::TreeView* pSource = m_rTreeView.get_drag_source();
-// only draging within the same widget allowed
+// only dragging within the same widget allowed
 if (!pSource || pSource != _rTreeView)
 return DND_ACTION_NONE;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-10-28 Thread Szymon Kłos (via logerrit)
 compilerplugins/clang/stringadd.cxx |3 +--
 svx/sdi/svx.sdi |1 +
 sw/source/uibase/shells/basesh.cxx  |   32 ++--
 3 files changed, 32 insertions(+), 4 deletions(-)

New commits:
commit 1144712bb99cfb699e73b473ee44351c50a35613
Author: Szymon Kłos 
AuthorDate: Mon Oct 28 10:19:50 2019 +0100
Commit: Szymon Kłos 
CommitDate: Mon Oct 28 12:33:49 2019 +0100

jsdialogs: make possible to set .uno:BackgroundColor in Writer

Change-Id: Ifd6a63683ddf36a3c1e8babd9c030ae5f051ed00
Reviewed-on: https://gerrit.libreoffice.org/81596
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
index 8e977c82173c..acbee171bc2d 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -408,6 +408,7 @@ SfxVoidItem TableDesign SID_TABLEDESIGN
 ]
 
 SvxColorItem BackgroundColor SID_BACKGROUND_COLOR
+(SfxStringItem Color SID_ATTR_COLOR_STR, SvxColorItem BackgroundColor 
SID_BACKGROUND_COLOR)
 
 [
 AutoUpdate = TRUE,
diff --git a/sw/source/uibase/shells/basesh.cxx 
b/sw/source/uibase/shells/basesh.cxx
index 89f4e3a00824..e8600de55c43 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -2339,17 +2339,45 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq)
 case SID_BACKGROUND_COLOR:
 case SID_TABLE_CELL_BACKGROUND_COLOR:
 {
+const SfxPoolItem* pColorStringItem = nullptr;
+bool bIsTransparent = false;
+
 aBrushItem->SetGraphicPos(GPOS_NONE);
 
-if(pArgs)
+sal_uInt16 nSlotId = SID_BACKGROUND_COLOR ? SID_BACKGROUND_COLOR : 
SID_TABLE_CELL_BACKGROUND_COLOR;
+if (SfxItemState::SET == pArgs->GetItemState(SID_ATTR_COLOR_STR, 
false, ))
+{
+OUString sColor = static_cast(pColorStringItem)->GetValue();
+if (sColor == "transparent")
+{
+bIsTransparent = true;
+}
+else
+{
+Color aColor(sColor.toInt32(16));
+
+aBrushItem->SetColor(aColor);
+
+SvxColorItem aNewColorItem(nSlotId);
+aNewColorItem.SetValue(aColor);
+
+
GetView().GetViewFrame()->GetBindings().SetState(aNewColorItem);
+}
+}
+else if(pArgs)
 {
-const SvxColorItem& rNewColorItem = pArgs->Get(nSlot == 
SID_BACKGROUND_COLOR ? SID_BACKGROUND_COLOR : SID_TABLE_CELL_BACKGROUND_COLOR );
+const SvxColorItem& rNewColorItem = static_cast(pArgs->Get(nSlotId));
 const Color& rNewColor = rNewColorItem.GetValue();
 aBrushItem->SetColor(rNewColor);
 
GetView().GetViewFrame()->GetBindings().SetState(rNewColorItem);
 }
 else
 {
+bIsTransparent = true;
+}
+
+if (bIsTransparent)
+{
 aBrushItem->SetColor(COL_TRANSPARENT);
 rReq.AppendItem(SvxColorItem(COL_TRANSPARENT,nSlot));
 }
commit 6385e04f7e194ce6dcc82588f38355b467d0d276
Author: Stephan Bergmann 
AuthorDate: Mon Oct 28 10:20:08 2019 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Oct 28 12:33:38 2019 +0100

Completely remove lambda capture that is unused

...since 6d6fad522a2cd6a2959ea774969a86288f5a3cb7 "Introduce OStringChar" 
(and
had needlessly been kept alive with ce3badb157c58941608f878a7de98c7739e30aec
"compilerplugins: fix -Werror,-Wunused-lambda-capture")

Change-Id: Ie34ef1197f97ecab5b8f30741f1e2c4b3a9db594
Reviewed-on: https://gerrit.libreoffice.org/81591
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/compilerplugins/clang/stringadd.cxx 
b/compilerplugins/clang/stringadd.cxx
index c1023c641bbb..653c281f0ac7 100644
--- a/compilerplugins/clang/stringadd.cxx
+++ b/compilerplugins/clang/stringadd.cxx
@@ -204,8 +204,7 @@ bool 
StringAdd::VisitCXXOperatorCallExpr(CXXOperatorCallExpr const* operatorCall
 && !tc.Class("OString").Namespace("rtl").GlobalNamespace())
 return true;
 
-auto check = [operatorCall, this, ](unsigned arg) {
-(void)tc;
+auto check = [operatorCall, this](unsigned arg) {
 auto const e
 = 
dyn_cast(operatorCall->getArg(arg)->IgnoreParenImpCasts());
 if (e == nullptr)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang fpicker/source include/vcl sc/source sw/source vcl/source

2019-10-22 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/unusedenumconstants.readonly.results  |   64 
 compilerplugins/clang/unusedenumconstants.untouched.results |   50 
 compilerplugins/clang/unusedenumconstants.writeonly.results | 6894 +---
 fpicker/source/office/fileview.cxx  |5 
 include/vcl/headbar.hxx |4 
 include/vcl/salnativewidgets.hxx|6 
 sc/source/ui/view/hdrcont.cxx   |   23 
 sc/source/ui/view/output.cxx|   22 
 sc/source/ui/view/output2.cxx   |   14 
 sw/source/core/inc/swblocks.hxx |1 
 sw/source/core/swg/swblocks.cxx |2 
 vcl/source/outdev/nativecontrols.cxx|8 
 vcl/source/treelist/headbar.cxx |   23 
 13 files changed, 3528 insertions(+), 3588 deletions(-)

New commits:
commit 0dc168dfc3a693510e5776109e989ff5f956f7db
Author: Noel Grandin 
AuthorDate: Mon Oct 21 16:31:05 2019 +0200
Commit: Noel Grandin 
CommitDate: Tue Oct 22 18:13:16 2019 +0200

loplugin:unusedenumconstants

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

diff --git a/compilerplugins/clang/unusedenumconstants.readonly.results 
b/compilerplugins/clang/unusedenumconstants.readonly.results
index eb41cdfcc907..81aca172e382 100644
--- a/compilerplugins/clang/unusedenumconstants.readonly.results
+++ b/compilerplugins/clang/unusedenumconstants.readonly.results
@@ -5,7 +5,7 @@ bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx:78
 bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx:79
 enum x86_64_reg_class X86_64_X87UP_CLASS
 chart2/source/inc/CharacterProperties.hxx:121
-enum chart::CharacterProperties::(anonymous at 
/home/noel/libo2/chart2/source/inc/CharacterProperties.hxx:42:5) 
FAST_PROPERTY_ID_END_CHAR_PROP
+enum chart::CharacterProperties::(anonymous at 
/media/disk2/libo7/chart2/source/inc/CharacterProperties.hxx:42:5) 
FAST_PROPERTY_ID_END_CHAR_PROP
 chart2/source/inc/TitleHelper.hxx:48
 enum chart::TitleHelper::eTitleType NORMAL_TITLE_END
 chart2/source/view/inc/ShapeFactory.hxx:50
@@ -39,18 +39,18 @@ chart2/source/view/inc/ShapeFactory.hxx:63
 chart2/source/view/inc/ShapeFactory.hxx:64
 enum chart::SymbolEnum Symbol_VerticalBar
 configmgr/source/access.hxx:445
-enum configmgr::Access::(anonymous at 
/home/noel/libo2/configmgr/source/access.hxx:443:5) IS_GROUP_MEMBER
+enum configmgr::Access::(anonymous at 
/media/disk2/libo7/configmgr/source/access.hxx:443:5) IS_SET_MEMBER
 configmgr/source/access.hxx:445
-enum configmgr::Access::(anonymous at 
/home/noel/libo2/configmgr/source/access.hxx:443:5) IS_SET_MEMBER
+enum configmgr::Access::(anonymous at 
/media/disk2/libo7/configmgr/source/access.hxx:443:5) IS_GROUP_MEMBER
 configmgr/source/parsemanager.hxx:44
-enum configmgr::ParseManager::(anonymous at 
/home/noel/libo2/configmgr/source/parsemanager.hxx:44:5) NAMESPACE_XS
+enum configmgr::ParseManager::(anonymous at 
/media/disk2/libo7/configmgr/source/parsemanager.hxx:44:5) NAMESPACE_XS
 configmgr/source/parsemanager.hxx:44
-enum configmgr::ParseManager::(anonymous at 
/home/noel/libo2/configmgr/source/parsemanager.hxx:44:5) NAMESPACE_XSI
+enum configmgr::ParseManager::(anonymous at 
/media/disk2/libo7/configmgr/source/parsemanager.hxx:44:5) NAMESPACE_OOR
 configmgr/source/parsemanager.hxx:44
-enum configmgr::ParseManager::(anonymous at 
/home/noel/libo2/configmgr/source/parsemanager.hxx:44:5) NAMESPACE_OOR
+enum configmgr::ParseManager::(anonymous at 
/media/disk2/libo7/configmgr/source/parsemanager.hxx:44:5) NAMESPACE_XSI
 connectivity/source/drivers/evoab2/NConnection.hxx:41
 connectivity::evoab::SDBCAddress::sdbc_address_type Unknown
-cui/source/options/optgenrl.cxx:65
+cui/source/options/optgenrl.cxx:62
 enum (anonymous namespace)::RowType nRowCount
 dbaccess/source/core/inc/SingleSelectQueryComposer.hxx:72
 enum dbaccess::OSingleSelectQueryComposer::EColumnType SelectColumns
@@ -120,8 +120,6 @@ emfio/inc/mtftools.hxx:48
 enum emfio::BkMode Transparent
 emfio/inc/mtftools.hxx:82
 enum emfio::WMFRasterOp Nop
-extensions/source/update/check/updatehdl.hxx:59
-enum UpdateState UPDATESTATE_AUTO_START
 framework/inc/xml/imagesdocumenthandler.hxx:43
 enum framework::OReadImagesDocumentHandler::Image_XML_Entry 
IMG_ELEMENT_IMAGECONTAINER
 framework/inc/xml/imagesdocumenthandler.hxx:44
@@ -236,10 +234,6 @@ include/LibreOfficeKit/LibreOfficeKitEnums.h:40
 LibreOfficeKitTileMode LOK_TILEMODE_RGBA
 include/LibreOfficeKit/LibreOfficeKitEnums.h:99
 LibreOfficeKitOptionalFeatures LOK_FEATURE_RANGE_HEADERS
-include/LibreOfficeKit/LibreOfficeKitEnums.h:703
-LibreOfficeKitExtTextInputType LOK_EXT_TEXTINPUT

[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 sd/inc sd/source

2019-10-21 Thread Stephan Bergmann (via logerrit)
 compilerplugins/clang/getstr.cxx   |1 -
 sd/inc/OutlinerIterator.hxx|4 ++--
 sd/source/ui/view/OutlinerIterator.cxx |4 ++--
 3 files changed, 4 insertions(+), 5 deletions(-)

New commits:
commit 41147e20029c80c4941ca81bc5dca3782bef5d94
Author: Stephan Bergmann 
AuthorDate: Mon Oct 21 22:12:06 2019 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Oct 22 07:19:03 2019 +0200

Make comparison operator member functions const

...which avoids overload resolution ambiguities in C++20, when a synthesized
candidate of operator == for a reversed-argument rewrite conflicts with the
actual operator ==, due to the asymmetric const-ness of the implicit object
parameter and the RHS parameter.  (As observed with recent Clang 10 trunk 
with
-std=c++2a:

> sd/source/ui/view/Outliner.cxx:543:44: error: use of overloaded operator 
'!=' is ambiguous (with operand types '::sd::outliner::Iterator' and 
'sd::outliner::Iterator')
> mbMatchMayExist = 
(maObjectIterator!=sd::outliner::OutlinerContainer(this).begin());
>^ 
~
> sd/inc/OutlinerIterator.hxx:133:10: note: candidate function
> bool operator!= (const Iterator& rIterator);
>  ^
> sd/inc/OutlinerIterator.hxx:125:10: note: candidate function
> bool operator== (const Iterator& rIterator);
>  ^
> sd/inc/OutlinerIterator.hxx:125:10: note: candidate function (with 
reversed parameter order)

)

Change-Id: Ia477f3f9cf19a5ae0e15a4536d70924962098ce4
Reviewed-on: https://gerrit.libreoffice.org/81280
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/sd/inc/OutlinerIterator.hxx b/sd/inc/OutlinerIterator.hxx
index dcc8238d4271..e78e9447d506 100644
--- a/sd/inc/OutlinerIterator.hxx
+++ b/sd/inc/OutlinerIterator.hxx
@@ -122,7 +122,7 @@ public:
 @return
 Returns  when both iterators point to the same object.
 */
-bool operator== (const Iterator& rIterator);
+bool operator== (const Iterator& rIterator) const;
 /** Test whether two iterators point to different objects.  This is just
 the negation of the result of the equality operator.
 @param rIterator
@@ -130,7 +130,7 @@ public:
 @return
 Returns  when both iterators point to the different objects.
 */
-bool operator!= (const Iterator& rIterator);
+bool operator!= (const Iterator& rIterator) const;
 /** Reverse the direction of iteration.  The position of the iterator is
 not changed.  Thus calling this method twice returns to the old state.
 */
diff --git a/sd/source/ui/view/OutlinerIterator.cxx 
b/sd/source/ui/view/OutlinerIterator.cxx
index aa7bb51b1184..b91e6de9640c 100644
--- a/sd/source/ui/view/OutlinerIterator.cxx
+++ b/sd/source/ui/view/OutlinerIterator.cxx
@@ -104,7 +104,7 @@ Iterator& Iterator::operator++ ()
 return *this;
 }
 
-bool Iterator::operator== (const Iterator& rIterator)
+bool Iterator::operator== (const Iterator& rIterator) const
 {
 if (!mxIterator || !rIterator.mxIterator)
 return mxIterator.get() == rIterator.mxIterator.get();
@@ -112,7 +112,7 @@ bool Iterator::operator== (const Iterator& rIterator)
 return *mxIterator == *rIterator.mxIterator;
 }
 
-bool Iterator::operator!= (const Iterator& rIterator)
+bool Iterator::operator!= (const Iterator& rIterator) const
 {
 return ! operator==(rIterator);
 }
commit 20c6dfde1dff22de7d38ecea00bcf75aa21a1694
Author: Stephan Bergmann 
AuthorDate: Mon Oct 21 19:27:12 2019 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Oct 22 07:18:49 2019 +0200

There doesn't need to be a TemplateSpecializationType here

On both macOS (libc++) and Windows (MSVC standard library),
compilerplugins/clang/test/getstr.cxx failed four tests without this fix:

> error: 'error' diagnostics expected but not seen:
>   File compilerplugins/clang/test/getstr.cxx Line 29: suspicious use of 
'getStr' on an object of type 'rtl::OUStringBuffer'; the result is implicitly 
cast to a void pointer in a call of 'operator <<' [loplugin:getstr]
>   File compilerplugins/clang/test/getstr.cxx Line 30: directly use object 
of type 'S' (aka 'rtl::OString') in a call of 'operator <<', instead of calling 
'getStr' first [loplugin:getstr]
>   File compilerplugins/clang/test/getstr.cxx Line 34: suspicious use of 
'getStr' on an object of type 'rtl::OUStringBuffer'; the result is implicitly 
cast to a void pointer in a call of 'operator <<' [loplugin:getstr]
>   File compilerplugins/clang/test/getstr.cxx Line 35: directly use object 
of type 'rtl::OString' in a call of 'operator <<', instead of calling 'getStr' 
first [loplugin:getstr]

Change-Id: I65406d3d84bb5a89df44c8fd665b6e38d19f38c7
Reviewed-on: https://gerrit.libreoffice.org/81266
Tested-by: Jenkins

[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 forms/source sc/source

2019-10-21 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/virtualdead.unusedparams.results |6 -
 forms/source/richtext/attributedispatcher.cxx  |2 
 forms/source/richtext/attributedispatcher.hxx  |2 
 forms/source/richtext/richtextcontrol.cxx  |2 
 forms/source/richtext/richtextcontrol.hxx  |2 
 forms/source/richtext/richtextimplcontrol.cxx  |6 -
 forms/source/richtext/textattributelistener.hxx|4 -
 sc/source/ui/view/viewfun2.cxx |   49 +++---
 sc/source/ui/view/viewfun3.cxx |   30 
 sc/source/ui/view/viewfun4.cxx |6 -
 sc/source/ui/view/viewfunc.cxx |   58 -
 sc/source/ui/view/viewutil.cxx |4 -
 12 files changed, 83 insertions(+), 88 deletions(-)

New commits:
commit 1acc7c2fe72a48db0590a57ad447a47eb9d8a62e
Author: Noel Grandin 
AuthorDate: Fri Oct 18 15:40:37 2019 +0200
Commit: Noel Grandin 
CommitDate: Mon Oct 21 18:13:44 2019 +0200

loplugin:virtualdead unused params in forms

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

diff --git a/compilerplugins/clang/virtualdead.unusedparams.results 
b/compilerplugins/clang/virtualdead.unusedparams.results
index 685ee43e2b3c..e4f4db66e909 100644
--- a/compilerplugins/clang/virtualdead.unusedparams.results
+++ b/compilerplugins/clang/virtualdead.unusedparams.results
@@ -67,12 +67,6 @@ extensions/source/bibliography/loadlisteneradapter.hxx:110
 extensions/source/bibliography/loadlisteneradapter.hxx:111
 void bib::OLoadListener::_reloading(const struct 
com::sun::star::lang::EventObject &,)
 0
-forms/source/richtext/textattributelistener.hxx:32
-void frm::ITextAttributeListener::onAttributeStateChanged(int,const struct 
frm::AttributeState &,)
-10
-forms/source/richtext/textattributelistener.hxx:44
-void frm::ITextSelectionListener::onSelectionChanged(const struct 
ESelection &,)
-0
 include/canvas/base/bufferedgraphicdevicebase.hxx:230
 void canvas::BufferedGraphicDeviceBase::windowShown(const struct 
com::sun::star::lang::EventObject &,)
 0
diff --git a/forms/source/richtext/attributedispatcher.cxx 
b/forms/source/richtext/attributedispatcher.cxx
index dd81f3129cc7..0cabb526c75f 100644
--- a/forms/source/richtext/attributedispatcher.cxx
+++ b/forms/source/richtext/attributedispatcher.cxx
@@ -98,7 +98,7 @@ namespace frm
 }
 
 
-void OAttributeDispatcher::onAttributeStateChanged( AttributeId 
_nAttributeId, const AttributeState& /*_rState*/ )
+void OAttributeDispatcher::onAttributeStateChanged( AttributeId 
_nAttributeId )
 {
 OSL_ENSURE( _nAttributeId == m_nAttributeId, 
"OAttributeDispatcher::onAttributeStateChanged: wrong attribute!" );
 
diff --git a/forms/source/richtext/attributedispatcher.hxx 
b/forms/source/richtext/attributedispatcher.hxx
index 42a673209da1..685825f5c88f 100644
--- a/forms/source/richtext/attributedispatcher.hxx
+++ b/forms/source/richtext/attributedispatcher.hxx
@@ -61,7 +61,7 @@ namespace frm
 virtual void SAL_CALL dispatch( const css::util::URL& URL, const 
css::uno::Sequence< css::beans::PropertyValue >& Arguments ) override;
 
 // ITextAttributeListener
-virtual voidonAttributeStateChanged( AttributeId _nAttributeId, 
const AttributeState& _rState ) override;
+virtual voidonAttributeStateChanged( AttributeId _nAttributeId ) 
override;
 
 // ORichTextFeatureDispatcher
 virtual voiddisposing( ::osl::ClearableMutexGuard& 
_rClearBeforeNotify ) override;
diff --git a/forms/source/richtext/richtextcontrol.cxx 
b/forms/source/richtext/richtextcontrol.cxx
index 7e1b9bebcfd9..810d8e50c860 100644
--- a/forms/source/richtext/richtextcontrol.cxx
+++ b/forms/source/richtext/richtextcontrol.cxx
@@ -635,7 +635,7 @@ namespace frm
 }
 
 
-void ORichTextPeer::onSelectionChanged( const ESelection& /*_rSelection*/ )
+void ORichTextPeer::onSelectionChanged()
 {
 AttributeDispatchers::iterator aDispatcherPos = m_aDispatchers.find( 
SID_COPY );
 if ( aDispatcherPos != m_aDispatchers.end() )
diff --git a/forms/source/richtext/richtextcontrol.hxx 
b/forms/source/richtext/richtextcontrol.hxx
index 0c552848df5b..94aa8ce54e7c 100644
--- a/forms/source/richtext/richtextcontrol.hxx
+++ b/forms/source/richtext/richtextcontrol.hxx
@@ -117,7 +117,7 @@ namespace frm
 virtual css::uno::Sequence< css::uno::Reference< css::frame::XDispatch 
> > SAL_CALL queryDispatches( const css::uno::Sequence< 
css::frame::DispatchDescriptor >& Requests ) override;
 
 // ITextSelectionListener
-virtual voidonSelectionChanged( const ESelection& _rSelection ) 
override;
+virtual voidonSelectionChanged() override;
 
 private:
 SingleAttributeDispatcher 

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang editeng/source include/editeng sc/inc sc/source starmath/source svx/source

2019-10-21 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/virtualdead.unusedparams.results |6 --
 editeng/source/accessibility/AccessibleHyperlink.cxx   |2 +-
 editeng/source/editeng/editeng.cxx |2 +-
 editeng/source/editeng/eertfpar.cxx|2 +-
 editeng/source/editeng/eertfpar.hxx|2 +-
 editeng/source/editeng/impedit2.cxx|4 +---
 editeng/source/rtf/rtfitem.cxx |6 +++---
 editeng/source/uno/unoedprx.cxx|4 ++--
 editeng/source/uno/unofored.cxx|4 ++--
 editeng/source/uno/unoforou.cxx|2 +-
 editeng/source/uno/unotext.cxx |2 +-
 include/editeng/editeng.hxx|2 +-
 include/editeng/svxrtf.hxx |2 +-
 include/editeng/unoedprx.hxx   |2 +-
 include/editeng/unoedsrc.hxx   |2 +-
 include/editeng/unofored.hxx   |2 +-
 include/editeng/unoforou.hxx   |2 +-
 include/editeng/unotext.hxx|2 +-
 sc/inc/editutil.hxx|2 +-
 sc/source/core/tool/editutil.cxx   |2 +-
 starmath/source/accessibility.cxx  |2 +-
 starmath/source/accessibility.hxx  |2 +-
 svx/source/accessibility/AccessibleEmptyEditSource.cxx |2 +-
 svx/source/dialog/weldeditview.cxx |4 ++--
 24 files changed, 28 insertions(+), 36 deletions(-)

New commits:
commit 13012b3cfee3dfe8979de96fe22c9b8d20637755
Author: Noel Grandin 
AuthorDate: Fri Oct 18 15:21:56 2019 +0200
Commit: Noel Grandin 
CommitDate: Mon Oct 21 14:47:48 2019 +0200

loplugin:virtualdead unused param in EditEngine::FieldClicked

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

diff --git a/compilerplugins/clang/virtualdead.unusedparams.results 
b/compilerplugins/clang/virtualdead.unusedparams.results
index 09c0bb4700d9..90a168fee2d6 100644
--- a/compilerplugins/clang/virtualdead.unusedparams.results
+++ b/compilerplugins/clang/virtualdead.unusedparams.results
@@ -109,9 +109,6 @@ include/editeng/editeng.hxx:475
 include/editeng/editeng.hxx:478
 void EditEngine::ParagraphConnected(int,int,)
 01
-include/editeng/editeng.hxx:503
-void EditEngine::FieldClicked(const class SvxFieldItem &,int,int,)
-100
 include/filter/msfilter/msdffimp.hxx:546
 _Bool SvxMSDffManager::ShapeHasText(unsigned long,unsigned long,)const
 00
diff --git a/editeng/source/accessibility/AccessibleHyperlink.cxx 
b/editeng/source/accessibility/AccessibleHyperlink.cxx
index 104051824ea7..fea7bccfc0be 100644
--- a/editeng/source/accessibility/AccessibleHyperlink.cxx
+++ b/editeng/source/accessibility/AccessibleHyperlink.cxx
@@ -62,7 +62,7 @@ namespace accessibility
 bool bRet = false;
 if ( isValid() && ( nIndex == 0 ) )
 {
-rTA.FieldClicked( *pFld, nPara, nRealIdx );
+rTA.FieldClicked( *pFld );
 bRet = true;
 }
 return bRet;
diff --git a/editeng/source/editeng/editeng.cxx 
b/editeng/source/editeng/editeng.cxx
index 7d72d45c3194..ac9fdd5202ce 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -2567,7 +2567,7 @@ OUString EditEngine::CalcFieldValue( const SvxFieldItem&, 
sal_Int32, sal_Int32,
 return OUString(' ');
 }
 
-void EditEngine::FieldClicked( const SvxFieldItem&, sal_Int32, sal_Int32 )
+void EditEngine::FieldClicked( const SvxFieldItem& )
 {
 }
 
diff --git a/editeng/source/editeng/impedit2.cxx 
b/editeng/source/editeng/impedit2.cxx
index 75a5e741c471..5be0d3113ce5 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -609,9 +609,7 @@ bool ImpEditEngine::MouseButtonUp( const MouseEvent& rMEvt, 
EditView* pView )
   
css::system::SystemShellExecuteFlags::URIS_ONLY);
 }
 }
-EditPaM aPaM( aCurSel.Max() );
-sal_Int32 nPara = GetEditDoc().GetPos( aPaM.GetNode() );
-GetEditEnginePtr()->FieldClicked( *pFld, nPara, 
aPaM.GetIndex() );
+GetEditEnginePtr()->FieldClicked( *pFld );
 }
 }
 }
diff --git a/editeng/source/uno/unoedprx.cxx b/editeng/source/uno/unoedprx.cxx
index 35784061f501..915fe7193eaa 100644
--- a/editeng/source/uno/unoedprx.cxx
+++ b/editeng/source/uno/unoedprx.cxx
@@ -622,11 +622,11 @@ OUString SvxAccessibleTextAdapter::CalcFieldValue( const 
SvxFieldItem& rField, s
 return mpTextForwarder->CalcFieldValue( rField, nPara, nPos, rpTxtColor, 
rpFldColor );
 }
 
-void SvxAccessibleTextAdapter::FieldClicked( const 

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang cui/qa cui/source include/svx svx/source

2019-10-21 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/virtualdead.unusedparams.results |6 -
 cui/qa/unit/cui-dialogs-test.cxx   |2 -
 cui/source/factory/dlgfact.cxx |2 -
 cui/source/factory/dlgfact.hxx |2 -
 include/svx/svdundo.hxx|   16 +++
 include/svx/svxdlg.hxx |2 -
 svx/source/svdraw/svdundo.cxx  |   18 -
 svx/source/table/tablecontroller.cxx   |3 --
 8 files changed, 22 insertions(+), 29 deletions(-)

New commits:
commit d5ec8bc929d243fbd707b916883d0a192d5bb072
Author: Noel Grandin 
AuthorDate: Thu Oct 17 16:31:21 2019 +0200
Commit: Noel Grandin 
CommitDate: Mon Oct 21 08:32:27 2019 +0200

loplugin:virtualdead unused param in GetSdrRepeatComment

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

diff --git a/compilerplugins/clang/virtualdead.unusedparams.results 
b/compilerplugins/clang/virtualdead.unusedparams.results
index 0e644962f556..08ae23369b67 100644
--- a/compilerplugins/clang/virtualdead.unusedparams.results
+++ b/compilerplugins/clang/virtualdead.unusedparams.results
@@ -187,9 +187,6 @@ include/svx/selectioncontroller.hxx:48
 include/svx/svdhdl.hxx:242
 void SdrHdl::onHelpRequest(const class HelpEvent &,)
 0
-include/svx/svdundo.hxx:69
-class rtl::OUString SdrUndoAction::GetSdrRepeatComment(class SdrView 
&,)const
-0
 include/vcl/accessibletable.hxx:91
 class tools::Rectangle 
vcl::table::IAccessibleTable::GetFieldCharacterBounds(int,int,int,)
 001
diff --git a/include/svx/svdundo.hxx b/include/svx/svdundo.hxx
index 7b100cb9314b..7a33a71297c6 100644
--- a/include/svx/svdundo.hxx
+++ b/include/svx/svdundo.hxx
@@ -66,7 +66,7 @@ public:
 virtual void Repeat(SfxRepeatTarget& rView) override;
 
 virtual OUString GetRepeatComment(SfxRepeatTarget& rView) const override;
-virtual OUString GetSdrRepeatComment(SdrView& rView) const;
+virtual OUString GetSdrRepeatComment() const;
 
 virtual bool CanSdrRepeat(SdrView& rView) const;
 virtual void SdrRepeat(SdrView& rView);
@@ -103,7 +103,7 @@ public:
 void SetComment(const OUString& rStr) { aComment=rStr; }
 void SetObjDescription(const OUString& rStr) { aObjDescription=rStr; }
 virtual OUString GetComment() const override;
-virtual OUString GetSdrRepeatComment(SdrView& rView) const override;
+virtual OUString GetSdrRepeatComment() const override;
 
 virtual void Undo() override;
 virtual void Redo() override;
@@ -172,7 +172,7 @@ public:
 virtual void Redo() override;
 
 virtual OUString GetComment() const override;
-virtual OUString GetSdrRepeatComment(SdrView& rView) const override;
+virtual OUString GetSdrRepeatComment() const override;
 };
 
 /**
@@ -192,7 +192,7 @@ public:
 virtual void Redo() override;
 
 virtual OUString GetComment() const override;
-virtual OUString GetSdrRepeatComment(SdrView& rView) const override;
+virtual OUString GetSdrRepeatComment() const override;
 
 virtual void SdrRepeat(SdrView& rView) override;
 virtual bool CanSdrRepeat(SdrView& rView) const override;
@@ -296,7 +296,7 @@ public:
 virtual void Redo() override;
 
 virtual OUString GetComment() const override;
-virtual OUString GetSdrRepeatComment(SdrView& rView) const override;
+virtual OUString GetSdrRepeatComment() const override;
 
 virtual void SdrRepeat(SdrView& rView) override;
 virtual bool CanSdrRepeat(SdrView& rView) const override;
@@ -413,7 +413,7 @@ public:
 virtual void Redo() override;
 
 virtual OUString GetComment() const override;
-virtual OUString GetSdrRepeatComment(SdrView& rView) const override;
+virtual OUString GetSdrRepeatComment() const override;
 
 virtual void SdrRepeat(SdrView& rView) override;
 virtual bool CanSdrRepeat(SdrView& rView) const override;
@@ -569,7 +569,7 @@ public:
 virtual void Redo() override;
 
 virtual OUString GetComment() const override;
-virtual OUString GetSdrRepeatComment(SdrView& rView) const override;
+virtual OUString GetSdrRepeatComment() const override;
 
 virtual void SdrRepeat(SdrView& rView) override;
 virtual bool CanSdrRepeat(SdrView& rView) const override;
@@ -607,7 +607,7 @@ public:
 SdrUndoCopyPage(SdrPage& rNewPg): SdrUndoNewPage(rNewPg) {}
 
 virtual OUString GetComment() const override;
-virtual OUString GetSdrRepeatComment(SdrView& rView) const override;
+virtual OUString GetSdrRepeatComment() const override;
 
 virtual void SdrRepeat(SdrView& rView) override;
 virtual bool CanSdrRepeat(SdrView& rView) const override;
diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx
index 8d79d0c65b20..e27e6cf42c58 100644
--- a/svx/source/svdraw/svdundo.cxx

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

2019-10-20 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/virtualdead.unusedparams.results |6 --
 include/vcl/idle.hxx   |3 +--
 include/vcl/task.hxx   |3 +--
 include/vcl/timer.hxx  |3 +--
 include/vcl/treelist.hxx   |6 +-
 include/vcl/treelistbox.hxx|3 +--
 sw/inc/SwDocIdle.hxx   |3 +--
 sw/source/core/doc/SwDocIdle.cxx   |2 +-
 vcl/source/app/idle.cxx|2 +-
 vcl/source/app/scheduler.cxx   |4 ++--
 vcl/source/app/timer.cxx   |2 +-
 vcl/source/treelist/treelist.cxx   |7 +++
 vcl/source/treelist/treelistbox.cxx|4 +---
 13 files changed, 15 insertions(+), 33 deletions(-)

New commits:
commit fec35bf15da6f226ee90bc19e538ee36cc47a172
Author: Noel Grandin 
AuthorDate: Thu Oct 17 16:17:45 2019 +0200
Commit: Noel Grandin 
CommitDate: Sun Oct 20 21:54:00 2019 +0200

loplugin:virtualdead unused param in Task::UpdateMinPeriod

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

diff --git a/compilerplugins/clang/virtualdead.unusedparams.results 
b/compilerplugins/clang/virtualdead.unusedparams.results
index 186a2780eaba..353e844c8218 100644
--- a/compilerplugins/clang/virtualdead.unusedparams.results
+++ b/compilerplugins/clang/virtualdead.unusedparams.results
@@ -211,9 +211,6 @@ include/vcl/ITiledRenderable.hxx:209
 include/vcl/opengl/OpenGLContext.hxx:141
 struct SystemWindowData OpenGLContext::generateWinData(class vcl::Window 
*,_Bool,)
 10
-include/vcl/task.hxx:71
-unsigned long Task::UpdateMinPeriod(unsigned long,unsigned long,)const
-01
 include/xmloff/xmlimp.hxx:244
 class SvXMLImportContext * SvXMLImport::CreateDocumentContext(const 
unsigned short,const class rtl::OUString &,const class 
com::sun::star::uno::Reference 
&,)
 110
diff --git a/include/vcl/idle.hxx b/include/vcl/idle.hxx
index f58061313611..7bbd52d41f3b 100644
--- a/include/vcl/idle.hxx
+++ b/include/vcl/idle.hxx
@@ -35,8 +35,7 @@ private:
 sal_uInt64GetTimeout() const = delete;
 
 protected:
-virtual sal_uInt64 UpdateMinPeriod(
-sal_uInt64 nMinPeriod, sal_uInt64 nTimeNow ) const override;
+virtual sal_uInt64 UpdateMinPeriod( sal_uInt64 nTimeNow ) const override;
 
 Idle( bool bAuto, const sal_Char *pDebugName );
 
diff --git a/include/vcl/task.hxx b/include/vcl/task.hxx
index f39661461d99..0fc124de7a65 100644
--- a/include/vcl/task.hxx
+++ b/include/vcl/task.hxx
@@ -64,11 +64,10 @@ protected:
  * need another mechanism to wake up the Scheduler or rely on other
  * Tasks to be scheduled, or simply use a polling Timer.
  *
- * @param nMinPeriod the currently expected sleep time
  * @param nTimeNow the current time
  * @return the sleep time of the Task to become ready
  */
-virtual sal_uInt64 UpdateMinPeriod( sal_uInt64 nMinPeriod, sal_uInt64 
nTimeNow ) const = 0;
+virtual sal_uInt64 UpdateMinPeriod( sal_uInt64 nTimeNow ) const = 0;
 
 public:
 Task( const sal_Char *pDebugName );
diff --git a/include/vcl/timer.hxx b/include/vcl/timer.hxx
index 2ee882f60596..088a1e50e9c9 100644
--- a/include/vcl/timer.hxx
+++ b/include/vcl/timer.hxx
@@ -31,8 +31,7 @@ class VCL_DLLPUBLIC Timer : public Task
 
 protected:
 virtual void SetDeletionFlags() override;
-virtual sal_uInt64 UpdateMinPeriod(
-sal_uInt64 nMinPeriod, sal_uInt64 nTimeNow ) const override;
+virtual sal_uInt64 UpdateMinPeriod( sal_uInt64 nTimeNow ) const override;
 
 Timer( bool bAuto, const sal_Char *pDebugName );
 
diff --git a/sw/inc/SwDocIdle.hxx b/sw/inc/SwDocIdle.hxx
index 38072f8f3cdf..708dc1c1cb78 100644
--- a/sw/inc/SwDocIdle.hxx
+++ b/sw/inc/SwDocIdle.hxx
@@ -39,8 +39,7 @@ private:
 SwDoc _rDoc;
 
 protected:
-virtual sal_uInt64 UpdateMinPeriod(
-sal_uInt64 nMinPeriod, sal_uInt64 nTimeNow ) const override;
+virtual sal_uInt64 UpdateMinPeriod( sal_uInt64 nTimeNow ) const override;
 
 public:
 SwDocIdle( SwDoc  );
diff --git a/sw/source/core/doc/SwDocIdle.cxx b/sw/source/core/doc/SwDocIdle.cxx
index d2bf04f408dc..24f51c90e908 100644
--- a/sw/source/core/doc/SwDocIdle.cxx
+++ b/sw/source/core/doc/SwDocIdle.cxx
@@ -30,7 +30,7 @@
 namespace sw
 {
 
-sal_uInt64 SwDocIdle::UpdateMinPeriod( sal_uInt64 /* nMinPeriod */, sal_uInt64 
/* nTimeNow */ ) const
+sal_uInt64 SwDocIdle::UpdateMinPeriod( sal_uInt64 /* nTimeNow */ ) const
 {
 bool bReadyForSchedule = true;
 
diff --git a/vcl/source/app/idle.cxx b/vcl/source/app/idle.cxx
index a9a509775a7b..301cbb0bb727 100644
--- a/vcl/source/app/idle.cxx
+++ b/vcl/source/app/idle.cxx
@@ -52,7 +52,7 @@ void Idle::Start()
 

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

2019-10-19 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/virtualdead.unusedparams.results |6 --
 sc/source/ui/vba/vbarange.cxx  |   12 ++--
 sc/source/ui/vba/vbarange.hxx  |2 +-
 sd/source/ui/inc/OutlineView.hxx   |2 --
 sd/source/ui/inc/View.hxx  |2 --
 sd/source/ui/view/drviews1.cxx |4 ++--
 sd/source/ui/view/outlview.cxx |2 +-
 sd/source/ui/view/sdview2.cxx  |2 +-
 sd/source/ui/view/viewshe2.cxx |6 +++---
 9 files changed, 14 insertions(+), 24 deletions(-)

New commits:
commit b98cb40d974d40d131b6b25f96e9c53890154296
Author: Noel Grandin 
AuthorDate: Thu Oct 17 15:42:13 2019 +0200
Commit: Noel Grandin 
CommitDate: Sat Oct 19 07:59:26 2019 +0200

loplugin:virtualdead unused param in ValueGetter::processValue

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

diff --git a/compilerplugins/clang/virtualdead.unusedparams.results 
b/compilerplugins/clang/virtualdead.unusedparams.results
index ef8a78956ccb..3ac03d4acaa3 100644
--- a/compilerplugins/clang/virtualdead.unusedparams.results
+++ b/compilerplugins/clang/virtualdead.unusedparams.results
@@ -238,9 +238,6 @@ sc/inc/formulagroup.hxx:145
 sc/source/core/opencl/formulagroupcl.cxx:1059
 void 
sc::opencl::DynamicKernelSlidingArgument::GenSlidingWindowFunction(class 
std::__cxx11::basic_stringstream &,)
 0
-sc/source/ui/vba/vbarange.hxx:68
-void ValueGetter::processValue(int,int,const class 
com::sun::star::uno::Any &,)
-001
 sdext/source/pdfimport/inc/contentsink.hxx:150
 void pdfi::ContentSink::drawMask(const class 
com::sun::star::uno::Sequence 
&,_Bool,)
 10
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index f3b5480e1420..311cb9c1fc22 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -772,17 +772,17 @@ protected:
 public:
 CellValueGetter() {}
 virtual void visitNode( sal_Int32 x, sal_Int32 y, const uno::Reference< 
table::XCell >& xCell ) override;
-virtual void processValue( sal_Int32 x, sal_Int32 y, const uno::Any& 
aValue ) override;
+virtual void processValue( const uno::Any& aValue ) override;
 const uno::Any& getValue() const override { return maValue; }
 
 };
 
 void
-CellValueGetter::processValue(  sal_Int32 /*x*/, sal_Int32 /*y*/, const 
uno::Any& aValue )
+CellValueGetter::processValue(  const uno::Any& aValue )
 {
 maValue = aValue;
 }
-void CellValueGetter::visitNode( sal_Int32 x, sal_Int32 y, const 
uno::Reference< table::XCell >& xCell )
+void CellValueGetter::visitNode( sal_Int32 /*x*/, sal_Int32 /*y*/, const 
uno::Reference< table::XCell >& xCell )
 {
 uno::Any aValue;
 table::CellContentType eType = xCell->getType();
@@ -830,7 +830,7 @@ void CellValueGetter::visitNode( sal_Int32 x, sal_Int32 y, 
const uno::Reference<
 uno::Reference< text::XTextRange > xTextRange(xCell, 
::uno::UNO_QUERY_THROW);
 aValue <<= xTextRange->getString();
 }
-processValue( x,y,aValue );
+processValue( aValue );
 }
 
 class CellFormulaValueSetter : public CellValueSetter
@@ -889,7 +889,7 @@ private:
 formula::FormulaGrammar::Grammar const m_eGrammar;
 public:
 CellFormulaValueGetter(ScDocument* pDoc, formula::FormulaGrammar::Grammar 
eGram ) : CellValueGetter( ), m_pDoc( pDoc ), m_eGrammar( eGram ) {}
-virtual void visitNode( sal_Int32 x, sal_Int32 y, const uno::Reference< 
table::XCell >& xCell ) override
+virtual void visitNode( sal_Int32 /*x*/, sal_Int32 /*y*/, const 
uno::Reference< table::XCell >& xCell ) override
 {
 uno::Any aValue;
 aValue <<= xCell->getFormula();
@@ -911,7 +911,7 @@ public:
 aValue <<= sVal;
 }
 
-processValue( x,y,aValue );
+processValue( aValue );
 }
 
 };
diff --git a/sc/source/ui/vba/vbarange.hxx b/sc/source/ui/vba/vbarange.hxx
index 7a9b1b21b1d8..9cc7f6ded196 100644
--- a/sc/source/ui/vba/vbarange.hxx
+++ b/sc/source/ui/vba/vbarange.hxx
@@ -65,7 +65,7 @@ class ValueGetter : public ArrayVisitor
 {
 
 public:
-virtual void processValue( sal_Int32 x, sal_Int32 y, const css::uno::Any& 
aValue ) = 0;
+virtual void processValue( const css::uno::Any& aValue ) = 0;
 virtual const css::uno::Any& getValue() const = 0;
 };
 
commit 0d416965a64f30b811891ba977e58542dcfb2d4f
Author: Noel Grandin 
AuthorDate: Thu Oct 17 15:25:52 2019 +0200
Commit: Noel Grandin 
CommitDate: Sat Oct 19 07:59:11 2019 +0200

loplugin:virtualdead unused param in sd::View::AcceptDrop

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

diff --git 

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

2019-10-19 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/virtualdead.unusedparams.results |9 -
 sd/source/ui/app/sdmod1.cxx|4 ++--
 sd/source/ui/inc/OutlineViewShell.hxx  |2 +-
 sd/source/ui/inc/ViewShell.hxx |2 +-
 sd/source/ui/view/outlnvsh.cxx |2 +-
 sd/source/ui/view/viewshel.cxx |4 ++--
 slideshow/source/engine/opengl/TransitionImpl.cxx  |   14 +++---
 slideshow/source/engine/opengl/TransitionImpl.hxx  |4 ++--
 8 files changed, 16 insertions(+), 25 deletions(-)

New commits:
commit 7837447287bb846a255dd42acec888abdad8c4e7
Author: Noel Grandin 
AuthorDate: Thu Oct 17 15:15:32 2019 +0200
Commit: Noel Grandin 
CommitDate: Sat Oct 19 07:58:40 2019 +0200

loplugin:virtualdead unused param in sd::ViewShell::UpdatePreview

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

diff --git a/compilerplugins/clang/virtualdead.unusedparams.results 
b/compilerplugins/clang/virtualdead.unusedparams.results
index 74c5dc078e4a..62eeae5aac7b 100644
--- a/compilerplugins/clang/virtualdead.unusedparams.results
+++ b/compilerplugins/clang/virtualdead.unusedparams.results
@@ -247,9 +247,6 @@ sd/source/ui/inc/View.hxx:92
 sd/source/ui/inc/ViewClipboard.hxx:64
 unsigned short sd::ViewClipboard::DetermineInsertPosition(const class 
SdTransferable &,)
 0
-sd/source/ui/inc/ViewShell.hxx:212
-void sd::ViewShell::UpdatePreview(class SdPage *,_Bool,)
-10
 sdext/source/pdfimport/inc/contentsink.hxx:150
 void pdfi::ContentSink::drawMask(const class 
com::sun::star::uno::Sequence 
&,_Bool,)
 10
diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx
index 2949cdad454d..3d84ddb0da56 100644
--- a/sd/source/ui/app/sdmod1.cxx
+++ b/sd/source/ui/app/sdmod1.cxx
@@ -605,12 +605,12 @@ void OutlineToImpressFinalizer::operator() (bool)
 // following UpdatePreview() call accesses the
 // correct paragraphs.
 pView->SetActualPage(pPage);
-pOutlineShell->UpdatePreview(pPage, true);
+pOutlineShell->UpdatePreview(pPage);
 }
 // Select the first slide.
 SdPage* pPage = mrDocument.GetSdPage(0, PageKind::Standard);
 pView->SetActualPage(pPage);
-pOutlineShell->UpdatePreview(pPage, true);
+pOutlineShell->UpdatePreview(pPage);
 }
 
 // Undo-Stack needs to be cleared, else the user may remove the
diff --git a/sd/source/ui/inc/OutlineViewShell.hxx 
b/sd/source/ui/inc/OutlineViewShell.hxx
index f7d05f5721b9..b2a6aaf9aef4 100644
--- a/sd/source/ui/inc/OutlineViewShell.hxx
+++ b/sd/source/ui/inc/OutlineViewShell.hxx
@@ -132,7 +132,7 @@ public:
 
 /** Update the preview to show the specified page.
 */
-virtual void UpdatePreview (SdPage* pPage, bool bInit = false) override;
+virtual void UpdatePreview (SdPage* pPage) override;
 
 virtual css::uno::Reference 
CreateSubController() override;
 
diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx
index d446cef7996c..fd551dc298a5 100644
--- a/sd/source/ui/inc/ViewShell.hxx
+++ b/sd/source/ui/inc/ViewShell.hxx
@@ -209,7 +209,7 @@ public:
 model according to the content of the outline view.  This in turn
 updates the previews in the slide sorter.
 */
-virtual void UpdatePreview (SdPage* pPage, bool bInit = false);
+virtual void UpdatePreview (SdPage* pPage);
 
 voidDrawMarkRect(const ::tools::Rectangle& rRect) const;
 
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index 0c0ca15a4062..87bb5de8a454 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -1545,7 +1545,7 @@ SdPage* OutlineViewShell::GetActualPage()
 return pOlView->GetActualPage();
 }
 
-void OutlineViewShell::UpdatePreview( SdPage* pPage, bool )
+void OutlineViewShell::UpdatePreview( SdPage* pPage )
 {
 const bool bNewPage = pPage != pLastPage;
 pLastPage = pPage;
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index 45a775aa3375..5df5c54de71e 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -327,7 +327,7 @@ void ViewShell::Activate(bool bIsMDIActivate)
 GetCurrentFunction()->Activate();
 
 if(!GetDocSh()->IsUIActive())
-UpdatePreview( GetActualPage(), true );
+UpdatePreview( GetActualPage() );
 }
 
 ReadFrameViewData( mpFrameView );
@@ -1060,7 +1060,7 @@ bool ViewShell::PrepareClose (bool bUI)
 return bResult;
 }
 
-void ViewShell::UpdatePreview (SdPage*, bool )
+void ViewShell::UpdatePreview (SdPage*)
 {
 // Do nothing.  After the actual preview has been removed,
 // OutlineViewShell::UpdatePreview() is the place where something
commit 

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

2019-10-18 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/virtualdead.unusedparams.results |9 -
 slideshow/source/engine/animationfactory.cxx   |9 +++--
 slideshow/source/engine/animationnodes/animationcolornode.cxx  |3 +--
 slideshow/source/engine/eventmultiplexer.cxx   |   10 
--
 slideshow/source/engine/slide/shapemanagerimpl.cxx |9 +++--
 slideshow/source/engine/slide/shapemanagerimpl.hxx |6 ++
 slideshow/source/engine/slideshowimpl.cxx  |   10 
+++---
 slideshow/source/engine/transitions/shapetransitionfactory.cxx |6 ++
 slideshow/source/engine/transitions/slidechangebase.cxx|9 -
 slideshow/source/engine/transitions/slidechangebase.hxx|3 +--
 slideshow/source/inc/animation.hxx |3 +--
 slideshow/source/inc/eventmultiplexer.hxx  |6 ++
 slideshow/source/inc/shapelistenereventhandler.hxx |6 ++
 13 files changed, 28 insertions(+), 61 deletions(-)

New commits:
commit 33e176552d0f4b6d343de72433963c44fa44f9ba
Author: Noel Grandin 
AuthorDate: Thu Oct 17 14:42:29 2019 +0200
Commit: Noel Grandin 
CommitDate: Sat Oct 19 07:58:04 2019 +0200

loplugin:virtualdead unused param in Animation::prefetch

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

diff --git a/compilerplugins/clang/virtualdead.unusedparams.results 
b/compilerplugins/clang/virtualdead.unusedparams.results
index 9c96c1eccf30..e512aa6ecf29 100644
--- a/compilerplugins/clang/virtualdead.unusedparams.results
+++ b/compilerplugins/clang/virtualdead.unusedparams.results
@@ -292,9 +292,6 @@ slideshow/source/engine/opengl/TransitionImpl.hxx:174
 slideshow/source/engine/opengl/TransitionImpl.hxx:180
 void OGLTransitionImpl::finish(double,double,double,double,double,)
 0
-slideshow/source/inc/animation.hxx:61
-void slideshow::internal::Animation::prefetch(const class 
std::shared_ptr &,const class 
std::shared_ptr &,)
-00
 starmath/source/wordexportbase.hxx:37
 void SmWordExportBase::HandleText(const class SmNode *,int,)
 10
diff --git a/slideshow/source/engine/animationfactory.cxx 
b/slideshow/source/engine/animationfactory.cxx
index 4967bdc9c519..e1a02d083760 100644
--- a/slideshow/source/engine/animationfactory.cxx
+++ b/slideshow/source/engine/animationfactory.cxx
@@ -88,8 +88,7 @@ namespace slideshow
 
 // Animation interface
 
-virtual void prefetch( const AnimatableShapeSharedPtr&,
-   const ShapeAttributeLayerSharedPtr& ) 
override
+virtual void prefetch() override
 {}
 
 virtual void start( const AnimatableShapeSharedPtr& rShape,
@@ -242,8 +241,7 @@ namespace slideshow
 
 // Animation interface
 
-virtual void prefetch( const AnimatableShapeSharedPtr&,
-   const ShapeAttributeLayerSharedPtr& ) 
override
+virtual void prefetch() override
 {}
 
 virtual void start( const AnimatableShapeSharedPtr& rShape,
@@ -440,8 +438,7 @@ namespace slideshow
 
 // Animation interface
 
-virtual void prefetch( const AnimatableShapeSharedPtr&,
-   const ShapeAttributeLayerSharedPtr& )
+virtual void prefetch()
 {}
 
 virtual void start( const AnimatableShapeSharedPtr& rShape,
diff --git a/slideshow/source/engine/animationnodes/animationcolornode.cxx 
b/slideshow/source/engine/animationnodes/animationcolornode.cxx
index 79850c84b7a9..4d6daeec3a05 100644
--- a/slideshow/source/engine/animationnodes/animationcolornode.cxx
+++ b/slideshow/source/engine/animationnodes/animationcolornode.cxx
@@ -49,8 +49,7 @@ public:
 "HSLWrapper::HSLWrapper(): Invalid color animation delegate" );
 }
 
-virtual void prefetch( const AnimatableShapeSharedPtr&,
-   const ShapeAttributeLayerSharedPtr& ) override
+virtual void prefetch() override
 {}
 
 virtual void start( const AnimatableShapeSharedPtr& rShape,
diff --git a/slideshow/source/engine/slideshowimpl.cxx 
b/slideshow/source/engine/slideshowimpl.cxx
index a3a5dbe112ca..f81e9e9fb278 100644
--- a/slideshow/source/engine/slideshowimpl.cxx
+++ b/slideshow/source/engine/slideshowimpl.cxx
@@ -852,9 +852,7 @@ ActivitySharedPtr SlideShowImpl::createSlideTransition(
 // reached final size
 maEventQueue.addEvent(
 makeEvent( [pTransition] () {
-pTransition->prefetch(
-AnimatableShapeSharedPtr(),
-ShapeAttributeLayerSharedPtr()); },
+

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang compilerplugins/Makefile-clang.mk config_host.mk.in configure.ac

2019-10-07 Thread Luboš Luňák (via logerrit)
 compilerplugins/Makefile-clang.mk |   49 ++-
 compilerplugins/clang/sharedvisitor/analyzer.cxx  |   17 ++---
 compilerplugins/clang/sharedvisitor/generator.cxx |2 
 config_host.mk.in |3 
 configure.ac  |   69 --
 5 files changed, 96 insertions(+), 44 deletions(-)

New commits:
commit 79ca031fb2e8802aa4383362f83306fad6895729
Author: Luboš Luňák 
AuthorDate: Sat Oct 5 16:27:48 2019 +0200
Commit: Luboš Luňák 
CommitDate: Mon Oct 7 21:57:32 2019 +0200

make the clang plugins configure check faster

Use a header which is not so expensive to parse/compile.

Change-Id: I4197fb16938b19c18fed541dbf94bf2c97a60e66
Reviewed-on: https://gerrit.libreoffice.org/80301
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 

diff --git a/configure.ac b/configure.ac
index 156dca7b1ed0..7ba93a3f5247 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7036,7 +7036,7 @@ if test "$COM_IS_CLANG" = "TRUE"; then
 CXXCPP="$COMPILER_PLUGINS_CXX -E"
 CPPFLAGS="$COMPILER_PLUGINS_CXXFLAGS"
 CXXFLAGS="$COMPILER_PLUGINS_CXXFLAGS"
-AC_CHECK_HEADER(clang/AST/RecursiveASTVisitor.h,
+AC_CHECK_HEADER(clang/Basic/SourceLocation.h,
 [COMPILER_PLUGINS=TRUE],
 [
 if test "$compiler_plugins" = "yes"; then
@@ -7053,15 +7053,15 @@ if test "$COM_IS_CLANG" = "TRUE"; then
 LIBS="-lclangTooling -lclangDriver -lclangFrontend 
-lclangParse -lclangSema -lclangEdit \
  -lclangAnalysis -lclangAST -lclangLex -lclangSerialization -lclangBasic 
$COMPILER_PLUGINS_CXX_LINKFLAGS"
 AC_LINK_IFELSE([
-AC_LANG_PROGRAM([[#include "clang/Tooling/Tooling.h"]],
-[[ clang::tooling::runToolOnCode( nullptr, "some code" 
); ]])
+AC_LANG_PROGRAM([[#include 
"clang/Basic/SourceLocation.h"]],
+[[ clang::FullSourceLoc().dump(); ]])
 ],[CLANGTOOLLIBS="$LIBS"],[])
 fi
 if test -z "$CLANGTOOLLIBS"; then
 LIBS="-lclang-cpp $COMPILER_PLUGINS_CXX_LINKFLAGS"
 AC_LINK_IFELSE([
-AC_LANG_PROGRAM([[#include "clang/Tooling/Tooling.h"]],
-[[ clang::tooling::runToolOnCode( nullptr, "some code" 
); ]])
+AC_LANG_PROGRAM([[#include 
"clang/Basic/SourceLocation.h"]],
+[[ clang::FullSourceLoc().dump(); ]])
 ],[CLANGTOOLLIBS="$LIBS"],[])
 fi
 AC_MSG_RESULT([$CLANGTOOLLIBS])
commit ad5cbcf6ba0afdc1d8d7405c2641cce8de4a360b
Author: Luboš Luňák 
AuthorDate: Sun Oct 6 15:01:07 2019 +0200
Commit: Luboš Luňák 
CommitDate: Mon Oct 7 21:57:13 2019 +0200

try to autodetect flags needed to build Clang plugins

Instead of having a lot of it hardcoded, which brings problems like:
- Clang-to-be-10 has switched to -std=c++14, so our hardcoded c++11
  makes the build fail
- I cannot compile with my openSUSE-shipped clang, because it ships
  only libclang-cpp and not the other libClangSomething libs
The possibility to explicitly set the necessary variables is still there.

Change-Id: I58d401d4584fa064f1c1351a8a06ff4e29643063
Reviewed-on: https://gerrit.libreoffice.org/80300
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 

diff --git a/compilerplugins/Makefile-clang.mk 
b/compilerplugins/Makefile-clang.mk
index 14356d1548fd..a132df918b50 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -23,14 +23,14 @@ CLANGCXXFLAGS=/nologo /D_HAS_EXCEPTIONS=0 /wd4141 /wd4577 
/EHs-c- /GR-
 ifeq ($(CLANGDEBUG),)
 CLANGCXXFLAGS+=/O2 /Oi
 else
-CLANGCXXFLAGS+=/DEBUG
+CLANGCXXFLAGS+=/DEBUG /Od
 endif
 else # WNT
 CLANGCXXFLAGS=-Wall -Wextra -Wundef
 ifeq ($(CLANGDEBUG),)
 CLANGCXXFLAGS+=-O2
 else
-CLANGCXXFLAGS+=-g
+CLANGCXXFLAGS+=-g -O0 -UNDEBUG
 endif
 endif
 
@@ -61,20 +61,13 @@ CLANG_EXE_EXT =
 endif
 
 # Clang headers require these.
-CLANGDEFS=-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
-ifneq ($(OS),WNT)
-CLANGDEFS += -fno-rtti
-endif
+CLANGDEFS:=$(COMPILER_PLUGINS_CXXFLAGS)
 # All include locations needed (using -isystem silences various warnings when
 # including those files):
-ifeq ($(OS),WNT)
-CLANGINCLUDES=-I$(CLANGDIR)/include
-else
-CLANGINCLUDES=$(if $(filter /usr,$(CLANGDIR)),,-isystem $(CLANGDIR)/include)
+ifneq ($(OS),WNT)
+CLANGDEFS:=$(filter-out -isystem/usr/include,$(foreach 
opt,$(CLANGDEFS),$(patsubst -I%,-isystem%,$(opt
 endif
 
-LLVMCONFIG=$(CLANGDIR)/bin/llvm-config
-
 # Clang/LLVM libraries are intentionally not linked in, they are usually built 
as static libraries, which means the resulting
 # plugin would be big (even though the clang binary already includes it all) 
and it'd be necessary to explicitly specify
 # also all the dependency 

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang compilerplugins/Makefile-clang.mk

2019-10-07 Thread Luboš Luňák (via logerrit)
 compilerplugins/Makefile-clang.mk |8 ++--
 compilerplugins/clang/constfieldsrewrite.cxx  |1 +
 compilerplugins/clang/dbgunhandledexception.cxx   |1 +
 compilerplugins/clang/dyncastvisibility.cxx   |4 ++--
 compilerplugins/clang/empty.cxx   |2 +-
 compilerplugins/clang/getimplementationname.cxx   |3 +--
 compilerplugins/clang/implicitboolconversion.cxx  |1 +
 compilerplugins/clang/nullptr.cxx |6 ++
 compilerplugins/clang/sharedvisitor/generator.cxx |1 +
 compilerplugins/clang/stringconstant.cxx  |3 +--
 compilerplugins/clang/unusedfieldsremove.cxx  |1 +
 compilerplugins/clang/unusedmethodsremove.cxx |1 +
 12 files changed, 19 insertions(+), 13 deletions(-)

New commits:
commit b1c14c30ba99ede85e41934b565195b0cbc69703
Author: Luboš Luňák 
AuthorDate: Sun Oct 6 14:22:59 2019 +0200
Commit: Luboš Luňák 
CommitDate: Mon Oct 7 21:56:55 2019 +0200

fix various warnings in compilerplugins

These are triggered when using llvm-config --cxxflags for building,
and sometimes there's -Werror. The warnings were mostly unused
variables because of being used only in assert(), or default case
in switch that covers all enums (it's better to not handle default
to get warning if a case is not handled).

Change-Id: I0ecdd1f27390aadf033852b0d1ee0ca424ae3c37
Reviewed-on: https://gerrit.libreoffice.org/80317
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 

diff --git a/compilerplugins/clang/constfieldsrewrite.cxx 
b/compilerplugins/clang/constfieldsrewrite.cxx
index 209d97423a23..03fb3d0c3609 100644
--- a/compilerplugins/clang/constfieldsrewrite.cxx
+++ b/compilerplugins/clang/constfieldsrewrite.cxx
@@ -78,6 +78,7 @@ ConstFieldsRewrite::~ConstFieldsRewrite()
 //Cleanup
 int rc = munmap(mmappedData, mmapFilesize);
 assert(rc == 0);
+(void)rc;
 close(mmapFD);
 }
 
diff --git a/compilerplugins/clang/dbgunhandledexception.cxx 
b/compilerplugins/clang/dbgunhandledexception.cxx
index 81d6126fb3af..d1406c18a9dd 100644
--- a/compilerplugins/clang/dbgunhandledexception.cxx
+++ b/compilerplugins/clang/dbgunhandledexception.cxx
@@ -59,6 +59,7 @@ bool 
DbgUnhandledException::PreTraverseCXXCatchStmt(CXXCatchStmt* catchStmt)
 bool DbgUnhandledException::PostTraverseCXXCatchStmt(CXXCatchStmt* catchStmt, 
bool)
 {
 assert(currCatchStmt.top() == catchStmt);
+(void)catchStmt;
 currCatchStmt.pop();
 return true;
 }
diff --git a/compilerplugins/clang/dyncastvisibility.cxx 
b/compilerplugins/clang/dyncastvisibility.cxx
index 0f6021101e2b..3aa66e0dc21b 100644
--- a/compilerplugins/clang/dyncastvisibility.cxx
+++ b/compilerplugins/clang/dyncastvisibility.cxx
@@ -59,6 +59,7 @@ bool isDerivedFrom(
 if (bases->insert(bd).second) {
 auto const d = isDerivedFrom(bd, base, bases, hidden);
 assert(d);
+(void)d;
 *hidden |= getTypeVisibility(bd) != DefaultVisibility;
 }
 derived = true;
@@ -75,9 +76,8 @@ StringRef vis(Visibility v) {
 return "protected";
 case DefaultVisibility:
 return "default";
-default:
-llvm_unreachable("unknown visibility");
 }
+llvm_unreachable("unknown visibility");
 }
 
 class DynCastVisibility final:
diff --git a/compilerplugins/clang/empty.cxx b/compilerplugins/clang/empty.cxx
index 6ddbf2a84a2d..108745460d0c 100644
--- a/compilerplugins/clang/empty.cxx
+++ b/compilerplugins/clang/empty.cxx
@@ -35,7 +35,7 @@ BinaryOperatorKind reverse(BinaryOperatorKind op)
 case BO_NE:
 return op;
 default:
-assert(false);
+abort();
 }
 }
 
diff --git a/compilerplugins/clang/getimplementationname.cxx 
b/compilerplugins/clang/getimplementationname.cxx
index cf234079750e..acc45acb7442 100644
--- a/compilerplugins/clang/getimplementationname.cxx
+++ b/compilerplugins/clang/getimplementationname.cxx
@@ -209,8 +209,7 @@ bool GetImplementationName::isStringConstant(
 return false;//TODO
 }
 default:
-assert(false); //TODO???
-return "BAD11";
+abort(); //TODO???
 }
 }
 
diff --git a/compilerplugins/clang/implicitboolconversion.cxx 
b/compilerplugins/clang/implicitboolconversion.cxx
index a6ff1c53c26d..84addf67f858 100644
--- a/compilerplugins/clang/implicitboolconversion.cxx
+++ b/compilerplugins/clang/implicitboolconversion.cxx
@@ -174,6 +174,7 @@ bool isBoolExpr(Expr const * expr) {
 CXXOperatorCallExpr const * op
 = dyn_cast(stack.top());
 assert(op != nullptr);
+(void)op;
 TemplateDecl const * d
 = t->getTemplateName().getAsTemplateDecl();
 if (d == nullptr
diff --git a/compilerplugins/clang/nullptr.cxx 
b/compilerplugins/clang/nullptr.cxx
index 30458d7f7f5a..89535daa9849 

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang compilerplugins/Makefile-clang.mk

2019-10-06 Thread Luboš Luňák (via logerrit)
 compilerplugins/Makefile-clang.mk |2 +-
 compilerplugins/clang/flatten.cxx |   10 --
 2 files changed, 9 insertions(+), 3 deletions(-)

New commits:
commit 3e5d4ecbde512efe169536544489635f7f076fd2
Author: Luboš Luňák 
AuthorDate: Sun Oct 6 15:01:23 2019 +0200
Commit: Luboš Luňák 
CommitDate: Sun Oct 6 16:57:34 2019 +0200

the PCH in compilerplugins should also depend on the Makefile

Otherwise it may not get rebuilt in Jenkins when flags in the Makefile
change.

Change-Id: I9a06c5bbfd4af2714497c5658d8c523a6c929f68
Reviewed-on: https://gerrit.libreoffice.org/80318
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 

diff --git a/compilerplugins/Makefile-clang.mk 
b/compilerplugins/Makefile-clang.mk
index 1a2ceef369df..6e18ee55487a 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -306,7 +306,7 @@ LO_CLANG_ANALYZER_PCH_CXXFLAGS := -I$(BUILDDIR)/config_host 
-I$(CLANGDIR)/includ
 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
 
 $(CLANGOUTDIR)/sharedvisitor/clang.pch: 
$(CLANGINDIR)/sharedvisitor/precompiled_clang.hxx \
-$(CLANGOUTDIR)/clang-timestamp \
+$(SRCDIR)/compilerplugins/Makefile-clang.mk 
$(CLANGOUTDIR)/clang-timestamp \
 | $(CLANGOUTDIR)/sharedvisitor
$(call gb_Output_announce,$(subst $(BUILDDIR)/,,$@),$(true),PCH,1)
$(QUIET)$(CLANGDIR)/bin/clang -x c++-header 
$(LO_CLANG_ANALYZER_PCH_CXXFLAGS) \
commit 1cccad3dd24e4a5cf5d7299326ae302e71980971
Author: Luboš Luňák 
AuthorDate: Sat Oct 5 13:27:55 2019 +0200
Commit: Luboš Luňák 
CommitDate: Sun Oct 6 16:57:23 2019 +0200

replace throw with abort

There is nothing catching the exception anyway, and this fails
to compile if compiling the plugin with Clang's CXXFLAGS (which
include -fno-exceptions).

Change-Id: Iad9316ad9613e4fd66d0e5a16fd71bbb8066cc2b
Reviewed-on: https://gerrit.libreoffice.org/80299
Reviewed-by: Noel Grandin 
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 

diff --git a/compilerplugins/clang/flatten.cxx 
b/compilerplugins/clang/flatten.cxx
index e56d21603774..81f897cb0ee3 100644
--- a/compilerplugins/clang/flatten.cxx
+++ b/compilerplugins/clang/flatten.cxx
@@ -474,7 +474,10 @@ std::string stripOpenAndCloseBrace(std::string s)
 {
 size_t i = s.find("{");
 if (i == std::string::npos)
-throw "did not find {";
+{
+assert( !"did not find {" );
+abort();
+}
 
 ++i;
 // strip to line end
@@ -486,7 +489,10 @@ std::string stripOpenAndCloseBrace(std::string s)
 
 i = s.rfind("}");
 if (i == std::string::npos)
-throw "did not find }";
+{
+assert( !"did not find }" );
+abort();
+}
 --i;
 while (s[i] == ' ')
 --i;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[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 include/vcl solenv/CompilerTest_compilerplugins_clang.mk vcl/headless vcl/inc vcl/qt5 vcl/quartz vcl/source vcl/unx vcl/win

2019-08-23 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/returnconstval.cxx   |   76 +
 compilerplugins/clang/test/returnconstval.cxx  |   21 ++
 include/vcl/commandinfoprovider.hxx|2 
 include/vcl/graphicfilter.hxx  |2 
 include/vcl/region.hxx |4 -
 include/vcl/status.hxx |2 
 include/vcl/toolbox.hxx|2 
 solenv/CompilerTest_compilerplugins_clang.mk   |1 
 vcl/headless/svptext.cxx   |2 
 vcl/inc/headless/svpgdi.hxx|2 
 vcl/inc/qt5/Qt5Graphics.hxx|2 
 vcl/inc/quartz/salgdi.h|2 
 vcl/inc/salgdi.hxx |2 
 vcl/inc/textrender.hxx |2 
 vcl/inc/unx/cairotextrender.hxx|2 
 vcl/inc/unx/genpspgraphics.h   |2 
 vcl/inc/unx/glyphcache.hxx |2 
 vcl/inc/unx/salgdi.h   |2 
 vcl/inc/win/salgdi.h   |2 
 vcl/qt5/Qt5Graphics_Text.cxx   |2 
 vcl/quartz/salgdi.cxx  |5 -
 vcl/source/control/field.cxx   |2 
 vcl/source/filter/graphicfilter.cxx|4 -
 vcl/source/gdi/FileDefinitionWidgetDraw.cxx|4 -
 vcl/source/gdi/region.cxx  |4 -
 vcl/source/helper/commandinfoprovider.cxx  |   12 +--
 vcl/source/window/status.cxx   |2 
 vcl/source/window/toolbox2.cxx |2 
 vcl/unx/generic/gdi/cairotextrender.cxx|5 -
 vcl/unx/generic/gdi/font.cxx   |2 
 vcl/unx/generic/glyphs/freetype_glyphcache.cxx |5 -
 vcl/unx/generic/print/genpspgraphics.cxx   |5 -
 vcl/win/gdi/salfont.cxx|5 -
 33 files changed, 142 insertions(+), 49 deletions(-)

New commits:
commit 9d5b9bf881606e83a051cc192d08c4690f98a8ba
Author: Noel Grandin 
AuthorDate: Thu Aug 22 16:33:14 2019 +0200
Commit: Noel Grandin 
CommitDate: Fri Aug 23 09:12:23 2019 +0200

loplugin:returnconstval in vcl

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

diff --git a/include/vcl/commandinfoprovider.hxx 
b/include/vcl/commandinfoprovider.hxx
index f1254a04a14a..8b5bac1a5c31 100644
--- a/include/vcl/commandinfoprovider.hxx
+++ b/include/vcl/commandinfoprovider.hxx
@@ -88,7 +88,7 @@ namespace vcl { namespace CommandInfoProvider {
 const OUString& rsCommandName,
 const OUString& rModuleName);
 
-VCL_DLLPUBLIC OUString const GetModuleIdentifier(const 
css::uno::Reference& rxFrame);
+VCL_DLLPUBLIC OUString GetModuleIdentifier(const 
css::uno::Reference& rxFrame);
 } }
 
 #endif // INCLUDED_VCL_COMMANDINFOPROVIDER_HXX
diff --git a/include/vcl/graphicfilter.hxx b/include/vcl/graphicfilter.hxx
index 14373039b684..eea2e9ac8b7d 100644
--- a/include/vcl/graphicfilter.hxx
+++ b/include/vcl/graphicfilter.hxx
@@ -300,7 +300,7 @@ public:
 const FilterErrorEx&GetLastError() const { return *pErrorEx;}
 voidResetLastError();
 
-const Link GetFilterCallback() const;
+Link GetFilterCallback() const;
 static GraphicFilter& GetGraphicFilter();
 static ErrCode  LoadGraphic( const OUString& rPath, const OUString& 
rFilter,
  Graphic& rGraphic,
diff --git a/include/vcl/region.hxx b/include/vcl/region.hxx
index 80feefcec5b5..3edcaa033636 100644
--- a/include/vcl/region.hxx
+++ b/include/vcl/region.hxx
@@ -82,8 +82,8 @@ public:
 
 // access with converters, the asked data will be created from the most
 // valuable data, buffered and returned
-const tools::PolyPolygon GetAsPolyPolygon() const;
-const basegfx::B2DPolyPolygon GetAsB2DPolyPolygon() const;
+tools::PolyPolygon GetAsPolyPolygon() const;
+basegfx::B2DPolyPolygon GetAsB2DPolyPolygon() const;
 const RegionBand* GetAsRegionBand() const;
 
 // manipulators
diff --git a/include/vcl/status.hxx b/include/vcl/status.hxx
index c89b5064ff81..fe6ec34e41a4 100644
--- a/include/vcl/status.hxx
+++ b/include/vcl/status.hxx
@@ -156,7 +156,7 @@ public:
 void*   GetItemData( sal_uInt16 nItemId ) const;
 
 voidSetItemCommand( sal_uInt16 nItemId, const OUString& 
rCommand );
-const OUString  GetItemCommand( sal_uInt16 nItemId );
+OUStringGetItemCommand( sal_uInt16 nItemId );
 
 voidSetHelpText( sal_uInt16 nItemId, const OUString& rText 
);
 const OUString& GetHelpText( sal_uInt16 nItemId ) const;
diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx
index 21ba679150f6..32f9c061889e 100644
--- a/include/vcl/toolbox.hxx
+++ b/include/vcl/toolbox.hxx
@@ -413,7 +413,7 @@ public:
 boolIsItemReallyVisible( 

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang cui/source include/svx solenv/clang-format svx/Library_svxcore.mk svx/source sw/source

2019-07-30 Thread Caolán McNamara (via logerrit)
 compilerplugins/clang/constantparam.booleans.results |8 
 compilerplugins/clang/overrideparam.cxx  |4 
 cui/source/options/optfltr.cxx   |   22 +-
 include/svx/checklbx.hxx |   68 
 solenv/clang-format/blacklist|4 
 svx/Library_svxcore.mk   |1 
 svx/source/dialog/checklbx.cxx   |  161 ---
 sw/source/uibase/inc/optcomp.hxx |1 
 sw/source/uibase/inc/optload.hxx |1 
 9 files changed, 13 insertions(+), 257 deletions(-)

New commits:
commit ee0613bd9ed3a9539f1ebb58b51962c9ccd13376
Author: Caolán McNamara 
AuthorDate: Tue Jul 30 16:43:44 2019 +0100
Commit: Caolán McNamara 
CommitDate: Tue Jul 30 21:14:29 2019 +0200

bFirst means 1st vs 2nd column, and needs to alternate on each loop

this went wrong at...

commit f423ac2d3bdba4263f1f41e31e7e2b7715afdd6e
Date:   Tue Mar 5 15:16:16 2019 +0200

remove sal_IntPtr in OfaMSFilterTabPage2

and just use a scoped enum

Change-Id: I74bcca9ffee9faf4600da64b3c409dbf19a1290e
Reviewed-on: https://gerrit.libreoffice.org/76619
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/options/optfltr.cxx b/cui/source/options/optfltr.cxx
index d11c655a472f..54d7e5817fe2 100644
--- a/cui/source/options/optfltr.cxx
+++ b/cui/source/options/optfltr.cxx
@@ -210,12 +210,14 @@ bool OfaMSFilterTabPage2::FillItemSet( SfxItemSet* )
 ::SetSmartArt2Shape },
 };
 
-bool bCheck, bFirst = true;
+bool bFirstCol = true;
 for( const ChkCBoxEntries & rEntry : aChkArr )
 {
-sal_uInt16 nCol = bFirst ? 1 : 2;
-if (bFirst)
-bFirst = false;
+// we loop through the list, alternating reading the first/second 
column,
+// each row appears twice in the list (except for smartart, which is 
import
+// only
+sal_uInt16 nCol = bFirstCol ? 1 : 2;
+bFirstCol = !bFirstCol;
 SvTreeListEntry* pEntry = GetEntry4Type( rEntry.eType );
 if( pEntry )
 {
@@ -223,7 +225,7 @@ bool OfaMSFilterTabPage2::FillItemSet( SfxItemSet* )
 if (rItem.GetType() == SvLBoxItemType::Button)
 {
 SvItemStateFlags nButtonFlags = rItem.GetButtonFlags();
-bCheck = SvButtonState::Checked ==
+bool bCheck = SvButtonState::Checked ==
 SvLBoxButtonData::ConvertToButtonState( nButtonFlags );
 
 if( bCheck != (rOpt.*rEntry.FnIs)() )
@@ -283,12 +285,14 @@ void OfaMSFilterTabPage2::Reset( const SfxItemSet* )
 { MSFltrPg2_CheckBoxEntries::SmartArt, 
::IsSmartArt2Shape },
 };
 
-bool bFirst = true;
+bool bFirstCol = true;
 for( const ChkCBoxEntries & rArr : aChkArr )
 {
-sal_uInt16 nCol = bFirst ? 1 : 2;
-if (bFirst)
-bFirst = false;
+// we loop through the list, alternating reading the first/second 
column,
+// each row appears twice in the list (except for smartart, which is 
import
+// only
+sal_uInt16 nCol = bFirstCol ? 1 : 2;
+bFirstCol = !bFirstCol;
 SvTreeListEntry* pEntry = GetEntry4Type( rArr.eType );
 if( pEntry )
 {
commit 588f50ac41666e73a7c73c13e677a9927bad991f
Author: Caolán McNamara 
AuthorDate: Tue Jul 30 16:05:55 2019 +0100
Commit: Caolán McNamara 
CommitDate: Tue Jul 30 21:14:11 2019 +0200

remove newly unused SvxCheckListBox

Change-Id: I6a5f4dfea9fbb34f02c1752140e04d1d0a8a67a7
Reviewed-on: https://gerrit.libreoffice.org/76617
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/compilerplugins/clang/constantparam.booleans.results 
b/compilerplugins/clang/constantparam.booleans.results
index 39637cd6b887..a39ccbc292a8 100644
--- a/compilerplugins/clang/constantparam.booleans.results
+++ b/compilerplugins/clang/constantparam.booleans.results
@@ -254,10 +254,6 @@ cui/source/inc/hangulhanjadlg.hxx:60
 class rtl::OUString svx::SuggestionDisplay::GetEntry(unsigned short) const
 unsigned short nPos
 0
-cui/source/inc/radiobtnbox.hxx:40
-void svx::SvxRadioButtonListBox::SvxRadioButtonListBox(class 
SvSimpleTableContainer &,long)
-long nBits
-0
 cui/source/inc/scriptdlg.hxx:122
 void SvxScriptOrgDialog::insertEntry(const class rtl::OUString &,const 
class rtl::OUString &,const class weld::TreeIter *,_Bool,class 
std::unique_ptr > 
&&,const class rtl::OUString &,_Bool)
 _Bool bChildrenOnDemand
@@ -1114,10 +1110,6 @@ include/svx/algitem.hxx:39
 void SvxOrientationItem::SvxOrientationItem(int,_Bool,const unsigned short)
 const unsigned short nId
 0
-include/svx/checklbx.hxx:55
-void SvxCheckListBox::SelectEntryPos(unsigned 

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

2019-07-17 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/dbgunhandledexception.cxx   |8 +++---
 compilerplugins/clang/indentation.cxx |   14 ++
 compilerplugins/clang/literaltoboolconversion.cxx |7 +++--
 compilerplugins/clang/passparamsbyref.cxx |7 +++--
 compilerplugins/clang/sharedvisitor/generator.cxx |4 ++-
 compilerplugins/clang/sharedvisitor/sharedvisitor.cxx |   24 --
 compilerplugins/clang/unicodetochar.cxx   |   15 ++-
 compilerplugins/clang/unreffun.cxx|5 ++-
 sc/source/ui/Accessibility/AccessibleDocument.cxx |1 
 9 files changed, 54 insertions(+), 31 deletions(-)

New commits:
commit aab10bb21f230a0d0d6acf59ccab50dd3c2c3d0a
Author: Noel Grandin 
AuthorDate: Wed Jul 17 12:54:05 2019 +0200
Commit: Noel Grandin 
CommitDate: Wed Jul 17 20:40:14 2019 +0200

fix "tdf#119388 calc, slow removing column, improve ScChildrenShapes"

forgot to add the code to actually update the map, which would be bad
for accessibility

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

diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx 
b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index 1e9b8244a96e..856ef70b88c4 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -1182,6 +1182,7 @@ void ScChildrenShapes::AddShape(const 
uno::Reference& xShape, b
 ScAccessibleShapeData* pShape = new ScAccessibleShapeData();
 pShape->xShape = xShape;
 SortedShapes::iterator aNewItr = maZOrderedShapes.insert(aFindItr, 
pShape);
+maShapesMap[xShape] = pShape;
 SetAnchor(xShape, pShape);
 
 uno::Reference< beans::XPropertySet > xShapeProp(xShape, 
uno::UNO_QUERY);
commit 476fb5d26ea766ae1aa3238e2967480857872d29
Author: Noel Grandin 
AuthorDate: Wed Jul 17 15:07:50 2019 +0200
Commit: Noel Grandin 
CommitDate: Wed Jul 17 20:40:01 2019 +0200

Revert "simplify sharedplugin PostTraverse calls"

This reverts commit ff55ad1aceb10b900254c8ad3629775b7789d60a,
Lubos prefers it the way it was.

Change-Id: I68edc21c438b6aa2fc819245dd9a3d590af3a278
Reviewed-on: https://gerrit.libreoffice.org/75790
Reviewed-by: Luboš Luňák 
Tested-by: Jenkins

diff --git a/compilerplugins/clang/dbgunhandledexception.cxx 
b/compilerplugins/clang/dbgunhandledexception.cxx
index 0b0cb41edc2e..81d6126fb3af 100644
--- a/compilerplugins/clang/dbgunhandledexception.cxx
+++ b/compilerplugins/clang/dbgunhandledexception.cxx
@@ -34,7 +34,7 @@ public:
 bool VisitCallExpr(CallExpr const* call);
 bool TraverseCXXCatchStmt(CXXCatchStmt*);
 bool PreTraverseCXXCatchStmt(CXXCatchStmt*);
-void PostTraverseCXXCatchStmt(CXXCatchStmt*);
+bool PostTraverseCXXCatchStmt(CXXCatchStmt*, bool traverseOk);
 
 private:
 std::stack currCatchStmt;
@@ -56,10 +56,11 @@ bool 
DbgUnhandledException::PreTraverseCXXCatchStmt(CXXCatchStmt* catchStmt)
 return true;
 }
 
-void DbgUnhandledException::PostTraverseCXXCatchStmt(CXXCatchStmt* catchStmt)
+bool DbgUnhandledException::PostTraverseCXXCatchStmt(CXXCatchStmt* catchStmt, 
bool)
 {
 assert(currCatchStmt.top() == catchStmt);
 currCatchStmt.pop();
+return true;
 }
 
 bool DbgUnhandledException::TraverseCXXCatchStmt(CXXCatchStmt* catchStmt)
@@ -67,7 +68,8 @@ bool 
DbgUnhandledException::TraverseCXXCatchStmt(CXXCatchStmt* catchStmt)
 if (!PreTraverseCXXCatchStmt(catchStmt))
 return false;
 bool ret = RecursiveASTVisitor::TraverseCXXCatchStmt(catchStmt);
-PostTraverseCXXCatchStmt(catchStmt);
+if (!PostTraverseCXXCatchStmt(catchStmt, ret))
+return false;
 return ret;
 }
 
diff --git a/compilerplugins/clang/indentation.cxx 
b/compilerplugins/clang/indentation.cxx
index b544138f9f5d..eaa795e6765a 100644
--- a/compilerplugins/clang/indentation.cxx
+++ b/compilerplugins/clang/indentation.cxx
@@ -65,7 +65,7 @@ public:
 
 bool VisitCompoundStmt(CompoundStmt const*);
 bool PreTraverseSwitchStmt(SwitchStmt*);
-void PostTraverseSwitchStmt(SwitchStmt*);
+bool PostTraverseSwitchStmt(SwitchStmt*, bool);
 bool TraverseSwitchStmt(SwitchStmt*);
 bool VisitSwitchStmt(SwitchStmt const*);
 
@@ -79,14 +79,18 @@ bool Indentation::PreTraverseSwitchStmt(SwitchStmt* 
switchStmt)
 return true;
 }
 
-void Indentation::PostTraverseSwitchStmt(SwitchStmt*) { 
switchStmtBodies.pop_back(); }
+bool Indentation::PostTraverseSwitchStmt(SwitchStmt*, bool)
+{
+switchStmtBodies.pop_back();
+return true;
+}
 
 bool Indentation::TraverseSwitchStmt(SwitchStmt* switchStmt)
 {
 PreTraverseSwitchStmt(switchStmt);
-FilteringPlugin::TraverseSwitchStmt(switchStmt);
-PostTraverseSwitchStmt(switchStmt);
-return true;
+auto ret = 

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang solenv/clang-format

2019-07-17 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/overridevirtual.cxx |   28 ++
 compilerplugins/clang/sharedvisitor/sharedvisitor.cxx |   15 +
 solenv/clang-format/blacklist |2 -
 3 files changed, 33 insertions(+), 12 deletions(-)

New commits:
commit 8e3f4317823aa83e0ad9e7dc008a1550ef3c9798
Author: Noel Grandin 
AuthorDate: Tue Jul 16 14:54:14 2019 +0200
Commit: Noel Grandin 
CommitDate: Wed Jul 17 09:56:25 2019 +0200

make overrridevirtual a shared plugin

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

diff --git a/compilerplugins/clang/overridevirtual.cxx 
b/compilerplugins/clang/overridevirtual.cxx
index 9b31035d2156..8dd29ab0e426 100644
--- a/compilerplugins/clang/overridevirtual.cxx
+++ b/compilerplugins/clang/overridevirtual.cxx
@@ -6,6 +6,7 @@
  * 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/.
  */
+#ifndef LO_CLANG_SHARED_PLUGINS
 
 #include 
 #include 
@@ -26,6 +27,7 @@ public:
 explicit OverrideVirtual(loplugin::InstantiationData const & data):
 FilteringRewritePlugin(data) {}
 
+virtual bool preRun() override;
 virtual void run() override;
 
 bool VisitCXXMethodDecl(CXXMethodDecl const * decl);
@@ -34,13 +36,15 @@ private:
 std::set insertions_;
 };
 
-void OverrideVirtual::run() {
-if (compiler.getLangOpts().CPlusPlus
+bool OverrideVirtual::preRun() {
+return compiler.getLangOpts().CPlusPlus
 && compiler.getPreprocessor().getIdentifierInfo(
-"LIBO_INTERNAL_ONLY")->hasMacroDefinition())
-{
+"LIBO_INTERNAL_ONLY")->hasMacroDefinition();
+}
+
+void OverrideVirtual::run() {
+if (preRun())
 TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
-}
 }
 bool OverrideVirtual::VisitCXXMethodDecl(CXXMethodDecl const * decl) {
 // As a heuristic, ignore declarations where the name is spelled out in an
@@ -161,8 +165,10 @@ bool OverrideVirtual::VisitCXXMethodDecl(CXXMethodDecl 
const * decl) {
 return true;
 }
 
-loplugin::Plugin::Registration X("overridevirtual", true);
+loplugin::Plugin::Registration 
overridevirtual("overridevirtual");
 
-}
+} // namespace
+
+#endif // LO_CLANG_SHARED_PLUGINS
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/compilerplugins/clang/sharedvisitor/sharedvisitor.cxx 
b/compilerplugins/clang/sharedvisitor/sharedvisitor.cxx
index ed07569f5431..f3fe66c98fa2 100644
--- a/compilerplugins/clang/sharedvisitor/sharedvisitor.cxx
+++ b/compilerplugins/clang/sharedvisitor/sharedvisitor.cxx
@@ -25,6 +25,7 @@
 #include "../inlinevisible.cxx"
 #include "../loopvartoosmall.cxx"
 #include "../overrideparam.cxx"
+#include "../overridevirtual.cxx"
 #include "../pointerbool.cxx"
 #include "../privatebase.cxx"
 #include "../rangedforcopy.cxx"
@@ -82,6 +83,7 @@ public:
 , inlineVisible( nullptr )
 , loopVarTooSmall( nullptr )
 , overrideParam( nullptr )
+, overrideVirtual( nullptr )
 , pointerBool( nullptr )
 , privateBase( nullptr )
 , rangedForCopy( nullptr )
@@ -140,6 +142,8 @@ public:
 loopVarTooSmall = nullptr;
 if( overrideParam && !overrideParam->preRun())
 overrideParam = nullptr;
+if( overrideVirtual && !overrideVirtual->preRun())
+overrideVirtual = nullptr;
 if( pointerBool && !pointerBool->preRun())
 pointerBool = nullptr;
 if( privateBase && !privateBase->preRun())
@@ -226,6 +230,8 @@ public:
 loopVarTooSmall->postRun();
 if( overrideParam )
 overrideParam->postRun();
+if( overrideVirtual )
+overrideVirtual->postRun();
 if( pointerBool )
 pointerBool->postRun();
 if( privateBase )
@@ -318,6 +324,8 @@ public:
 loopVarTooSmall = static_cast< LoopVarTooSmall* >( plugin );
 else if( strcmp( name, "overrideparam" ) == 0 )
 overrideParam = static_cast< OverrideParam* >( plugin );
+else if( strcmp( name, "overridevirtual" ) == 0 )
+overrideVirtual = static_cast< OverrideVirtual* >( plugin );
 else if( strcmp( name, "pointerbool" ) == 0 )
 pointerBool = static_cast< PointerBool* >( plugin );
 else if( strcmp( name, "privatebase" ) == 0 )
@@ -549,6 +557,11 @@ public:
 if( !overrideParam->VisitCXXMethodDecl( arg ))
 overrideParam = nullptr;
 }
+if( overrideVirtual != nullptr )
+{
+if( !overrideVirtual->VisitCXXMethodDecl( arg ))
+overrideVirtual = nullptr;
+}
 if( typedefParam != nullptr )
 {
 if( !typedefParam->VisitCXXMethodDecl( arg ))
@@ -1130,6 +1143,7 @@ private:
 || inlineVisible != nullptr

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang cui/source include/sfx2 include/svtools include/unotools include/vcl svtools/source sw/inc sw/source unotools/source vcl/inc vcl/sourc

2019-07-17 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/dbgunhandledexception.cxx|8 
 compilerplugins/clang/sharedvisitor/generator.cxx  |4 
 compilerplugins/clang/sharedvisitor/sharedvisitor.cxx  |   15 
 compilerplugins/clang/unicodetochar.cxx|   15 
 compilerplugins/clang/unreffun.cxx |5 
 compilerplugins/clang/unusedmethods.results|  268 +++--
 compilerplugins/clang/unusedmethods.unused-returns.results |   54 +-
 cui/source/dialogs/iconcdlg.cxx|   64 ---
 cui/source/inc/cfg.hxx |5 
 cui/source/inc/cuihyperdlg.hxx |5 
 cui/source/inc/hltpbase.hxx|1 
 cui/source/inc/iconcdlg.hxx|2 
 include/sfx2/childwin.hxx  |2 
 include/svtools/inettbc.hxx|1 
 include/unotools/datetime.hxx  |2 
 include/vcl/bitmapex.hxx   |1 
 include/vcl/gfxlink.hxx|1 
 include/vcl/ivctrl.hxx |1 
 include/vcl/texteng.hxx|2 
 include/vcl/textview.hxx   |7 
 svtools/source/control/inettbc.cxx |9 
 sw/inc/IDocumentMarkAccess.hxx |7 
 sw/inc/redline.hxx |   23 -
 sw/source/core/doc/docbm.cxx   |   10 
 sw/source/core/doc/docredln.cxx|   61 --
 sw/source/core/inc/MarkManager.hxx |1 
 sw/source/filter/ww8/docxattributeoutput.cxx   |   51 --
 sw/source/filter/ww8/docxtablestyleexport.cxx  |5 
 sw/source/filter/ww8/docxtablestyleexport.hxx  |3 
 sw/source/ui/dbui/mmaddressblockpage.hxx   |2 
 unotools/source/misc/datetime.cxx  |7 
 vcl/inc/impglyphitem.hxx   |2 
 vcl/source/control/ivctrl.cxx  |5 
 vcl/source/edit/texteng.cxx|   50 --
 vcl/source/edit/textview.cxx   |2 
 vcl/source/gdi/gfxlink.cxx |   28 -
 36 files changed, 210 insertions(+), 519 deletions(-)

New commits:
commit 7bad1516c5f2a85b5bae3f49261ac2494cbb7162
Author: Noel Grandin 
AuthorDate: Wed Jul 17 05:41:08 2019 +0200
Commit: Noel Grandin 
CommitDate: Wed Jul 17 08:18:11 2019 +0200

loplugin:unusedmethods

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

diff --git a/compilerplugins/clang/unusedmethods.results 
b/compilerplugins/clang/unusedmethods.results
index f5023194594f..60ca3d010750 100644
--- a/compilerplugins/clang/unusedmethods.results
+++ b/compilerplugins/clang/unusedmethods.results
@@ -1,9 +1,19 @@
-basctl/source/basicide/moduldlg.hxx:150
-void basctl::ObjectPage::SetCurrentEntry(const class 
basctl::EntryDescriptor &)
-basctl/source/inc/bastype2.hxx:221
-void basctl::TreeListBox::SetMode(enum BrowseMode)
-basctl/source/inc/bastype2.hxx:222
-enum BrowseMode basctl::TreeListBox::GetMode() const
+basctl/source/inc/bastype2.hxx:337
+void basctl::SbTreeListBox::make_unsorted()
+basctl/source/inc/bastype2.hxx:338
+_Bool basctl::SbTreeListBox::get_sort_order()
+basctl/source/inc/bastype2.hxx:339
+void basctl::SbTreeListBox::set_sort_order(_Bool)
+basctl/source/inc/bastype2.hxx:341
+void basctl::SbTreeListBox::set_sort_indicator(enum TriState,int)
+basctl/source/inc/bastype2.hxx:345
+enum TriState basctl::SbTreeListBox::get_sort_indicator(int)
+basctl/source/inc/bastype2.hxx:350
+int basctl::SbTreeListBox::get_sort_column()
+basctl/source/inc/bastype2.hxx:351
+void basctl::SbTreeListBox::set_sort_column(int)
+basctl/source/inc/bastype2.hxx:353
+void basctl::SbTreeListBox::set_sort_func(const class std::function &)
 basegfx/source/range/b2drangeclipper.cxx:687
 type-parameter-?-? basegfx::(anonymous 
namespace)::eraseFromList(type-parameter-?-? &,const type-parameter-?-? &)
 basic/source/inc/buffer.hxx:41
@@ -18,15 +28,13 @@ connectivity/source/drivers/evoab2/NResultSetMetaData.hxx:51
 class com::sun::star::uno::Reference 
connectivity::evoab::OEvoabResultSetMetaData::operator Reference()
 connectivity/source/drivers/firebird/Driver.hxx:65
 const class com::sun::star::uno::Reference & 
connectivity::firebird::FirebirdDriver::getContext() const
-connectivity/source/drivers/firebird/Util.hxx:58
+connectivity/source/drivers/firebird/Util.hxx:70
  connectivity::firebird::ColumnTypeInfo::ColumnTypeInfo(short,const class 

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang sw/qa

2019-07-16 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/salunicodeliteral.cxx   |   22 -
 compilerplugins/clang/sfxpoolitem.cxx |7 
 compilerplugins/clang/sharedvisitor/sharedvisitor.cxx |  267 ++
 compilerplugins/clang/staticaccess.cxx|8 
 compilerplugins/clang/staticanonymous.cxx |   10 
 compilerplugins/clang/stringconcat.cxx|8 
 compilerplugins/clang/typedefparam.cxx|   11 
 compilerplugins/clang/unicodetochar.cxx   |   52 ++-
 compilerplugins/clang/unnecessarycatchthrow.cxx   |8 
 compilerplugins/clang/unoany.cxx  |   17 +
 compilerplugins/clang/unoquery.cxx|   20 +
 compilerplugins/clang/weakbase.cxx|   19 +
 sw/qa/extras/rtfexport/data/page-border.rtf   |4 
 sw/qa/extras/rtfexport/rtfexport4.cxx |   17 +
 14 files changed, 429 insertions(+), 41 deletions(-)

New commits:
commit 8d4fbc532e2058a906b06471501385404ff31541
Author: Noel Grandin 
AuthorDate: Tue Jul 16 08:13:59 2019 +0200
Commit: Noel Grandin 
CommitDate: Tue Jul 16 09:15:01 2019 +0200

convert some plugins to LO_CLANG_SHARED_PLUGINS

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

diff --git a/compilerplugins/clang/salunicodeliteral.cxx 
b/compilerplugins/clang/salunicodeliteral.cxx
index bdf83694b77e..4c2a00669ab0 100644
--- a/compilerplugins/clang/salunicodeliteral.cxx
+++ b/compilerplugins/clang/salunicodeliteral.cxx
@@ -6,6 +6,7 @@
  * 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/.
  */
+#ifndef LO_CLANG_SHARED_PLUGINS
 
 #include "check.hxx"
 #include "plugin.hxx"
@@ -41,16 +42,18 @@ public:
 return true;
 }
 
-private:
-void run() override {
-if (compiler.getLangOpts().CPlusPlus
+bool preRun() override {
+return compiler.getLangOpts().CPlusPlus
 && compiler.getPreprocessor().getIdentifierInfo(
-"LIBO_INTERNAL_ONLY")->hasMacroDefinition())
-{
+"LIBO_INTERNAL_ONLY")->hasMacroDefinition();
+}
+
+void run() override {
+if (preRun())
 TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
-}
 }
 
+private:
 void check(ExplicitCastExpr const * expr) {
 if (ignoreLocation(expr)
 || isInUnoIncludeFile(expr->getExprLoc()))
@@ -90,9 +93,10 @@ private:
 }
 };
 
-static loplugin::Plugin::Registration reg(
-"salunicodeliteral");
+static loplugin::Plugin::Registration 
salunicodeliteral("salunicodeliteral");
 
-}
+} // namespace
+
+#endif // LO_CLANG_SHARED_PLUGINS
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/compilerplugins/clang/sfxpoolitem.cxx 
b/compilerplugins/clang/sfxpoolitem.cxx
index bd2870fe06d3..ce52336c8e04 100644
--- a/compilerplugins/clang/sfxpoolitem.cxx
+++ b/compilerplugins/clang/sfxpoolitem.cxx
@@ -6,6 +6,7 @@
  * 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/.
  */
+#ifndef LO_CLANG_SHARED_PLUGINS
 
 #include 
 #include 
@@ -124,8 +125,10 @@ bool SfxPoolItem::VisitCXXRecordDecl(const CXXRecordDecl* 
decl)
 }
 
 
-loplugin::Plugin::Registration< SfxPoolItem > X("sfxpoolitem");
+loplugin::Plugin::Registration< SfxPoolItem > sfxpoolitem("sfxpoolitem");
 
-}
+} // namespace
+
+#endif // LO_CLANG_SHARED_PLUGINS
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/compilerplugins/clang/sharedvisitor/sharedvisitor.cxx 
b/compilerplugins/clang/sharedvisitor/sharedvisitor.cxx
index a6df13ca33b4..4532bbe250ca 100644
--- a/compilerplugins/clang/sharedvisitor/sharedvisitor.cxx
+++ b/compilerplugins/clang/sharedvisitor/sharedvisitor.cxx
@@ -26,13 +26,24 @@
 #include "../loopvartoosmall.cxx"
 #include "../privatebase.cxx"
 #include "../reservedid.cxx"
+#include "../salunicodeliteral.cxx"
+#include "../sfxpoolitem.cxx"
 #include "../simplifyconstruct.cxx"
+#include "../staticaccess.cxx"
+#include "../staticanonymous.cxx"
+#include "../stringconcat.cxx"
 #include "../stringstatic.cxx"
 #include "../subtlezeroinit.cxx"
+#include "../typedefparam.cxx"
+#include "../unicodetochar.cxx"
+#include "../unnecessarycatchthrow.cxx"
 #include "../unnecessaryoverride.cxx"
 #include "../unnecessaryparen.cxx"
+#include "../unoany.cxx"
+#include "../unoquery.cxx"
 #include "../unreffun.cxx"
 #include "../unusedvariablecheck.cxx"
+#include "../weakbase.cxx"
 #include "../weakobject.cxx"
 #include "../dyncastvisibility.cxx"
 #include "../vclwidgets.cxx"
@@ -64,13 +75,24 @@ public:
 , loopVarTooSmall( nullptr )
 , privateBase( nullptr )
 , reservedId( nullptr )
+, salUnicodeLiteral( nullptr )
+, 

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

2019-06-06 Thread Andrea Gelmini (via logerrit)
 compilerplugins/clang/typedefparam.cxx |6 +++---
 registry/source/reflread.hxx   |2 +-
 registry/source/reflwrit.hxx   |2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 94be791d321e22dbb83d7d1b718c8c967f790b8b
Author: Andrea Gelmini 
AuthorDate: Thu Jun 6 16:33:07 2019 +
Commit: Julien Nabet 
CommitDate: Fri Jun 7 07:07:55 2019 +0200

Fix typos

Change-Id: Iec0824418063fa4d146d9d48f3c74561fc0c5a67
Reviewed-on: https://gerrit.libreoffice.org/73631
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/registry/source/reflread.hxx b/registry/source/reflread.hxx
index e35e3e03e346..5fc428212c03 100644
--- a/registry/source/reflread.hxx
+++ b/registry/source/reflread.hxx
@@ -23,7 +23,7 @@
 #include 
 #include 
 
-/// Implememetation handle
+/// Implementation handle
 typedef void* TypeReaderImpl;
 
 /** RegistryTypeReades reads a binary type blob.
diff --git a/registry/source/reflwrit.hxx b/registry/source/reflwrit.hxx
index 6ea4d0e3a925..0a985ff4b4d4 100644
--- a/registry/source/reflwrit.hxx
+++ b/registry/source/reflwrit.hxx
@@ -25,7 +25,7 @@
 
 class RTConstValue;
 
-/// Implememetation handle
+/// Implementation handle
 typedef void* TypeWriterImpl;
 
 /** RegistryTypeWriter writes/creates a binary type blob.
commit a9d67bbb4bf0c1854081a78dc362dc9dac9c92e0
Author: Andrea Gelmini 
AuthorDate: Thu Jun 6 16:30:51 2019 +
Commit: Julien Nabet 
CommitDate: Fri Jun 7 07:07:36 2019 +0200

Fix typos

Change-Id: If9d52bd769d96865a3fbfdda1f339bbd0f8c3ca3
Reviewed-on: https://gerrit.libreoffice.org/73633
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/compilerplugins/clang/typedefparam.cxx 
b/compilerplugins/clang/typedefparam.cxx
index 60c413f37988..0b7a74ba1696 100644
--- a/compilerplugins/clang/typedefparam.cxx
+++ b/compilerplugins/clang/typedefparam.cxx
@@ -258,9 +258,9 @@ static bool areTypesEqual(QualType lhs, QualType rhs)
 //
 //   typedef __darwin_size_t size_t;
 //
-// where __darwin_size_t is a typedef for long unsigned int, too, so 
that, depening on the
-// order in which those two files get inclued, either of those two 
typedefs can act as a
-// redeclaration of the other one.  However, areTypesEqual would 
unhelpfuly consider such
+// where __darwin_size_t is a typedef for long unsigned int, too, so 
that, depending on the
+// order in which those two files get included, either of those two 
typedefs can act as a
+// redeclaration of the other one.  However, areTypesEqual would 
unhelpfully consider such
 // different occurrences of size_t to be non-equal, so filter them out 
here.  And, at least
 // with my libcxx trunk .../include/c++/v1/cstddef, std::size_t is a 
using declaration that
 // brings size_t from the global namespace into namespace std, so that 
the above checks for
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-04-27 Thread Andrea Gelmini (via logerrit)
 compilerplugins/clang/store/cascadingcondop.hxx|2 +-
 compilerplugins/clang/store/tutorial/tutorial1.hxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 15b8ffbe0d99606529dafebb33c529a091797286
Author: Andrea Gelmini 
AuthorDate: Wed Apr 24 13:21:17 2019 +
Commit: Julien Nabet 
CommitDate: Sun Apr 28 07:40:57 2019 +0200

Fix typo

Change-Id: Id6985abca7702039168381082da4e47603b9aaf3
Reviewed-on: https://gerrit.libreoffice.org/71451
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/compilerplugins/clang/store/tutorial/tutorial1.hxx 
b/compilerplugins/clang/store/tutorial/tutorial1.hxx
index 59f115147780..a296ab2cf27b 100644
--- a/compilerplugins/clang/store/tutorial/tutorial1.hxx
+++ b/compilerplugins/clang/store/tutorial/tutorial1.hxx
@@ -19,7 +19,7 @@ namespace loplugin
 
 // The class implementing the plugin action.
 class Tutorial1
-// Inherits from the Clang class that will allow examing the Clang AST 
tree (i.e. syntax tree).
+// Inherits from the Clang class that will allow examining the Clang AST 
tree (i.e. syntax tree).
 : public FilteringPlugin< Tutorial1 >
 {
 public:
commit 4f3c39b3953098cb0f93eb2ba1f0a20bb071e713
Author: Andrea Gelmini 
AuthorDate: Wed Apr 24 13:21:18 2019 +
Commit: Julien Nabet 
CommitDate: Sun Apr 28 07:40:46 2019 +0200

Fix typo

Change-Id: I8c928576919c9410eda0a7f33b2120d13c3bc6bf
Reviewed-on: https://gerrit.libreoffice.org/71450
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/compilerplugins/clang/store/cascadingcondop.hxx 
b/compilerplugins/clang/store/cascadingcondop.hxx
index 5bdf11093957..f2c995064eb4 100644
--- a/compilerplugins/clang/store/cascadingcondop.hxx
+++ b/compilerplugins/clang/store/cascadingcondop.hxx
@@ -21,7 +21,7 @@ struct WalkCounter;
 
 // The class implementing the plugin action.
 class CascadingCondOp
-// Inherits from the Clang class that will allow examing the Clang AST 
tree (i.e. syntax tree).
+// Inherits from the Clang class that will allow examining the Clang AST 
tree (i.e. syntax tree).
 : public FilteringPlugin< CascadingCondOp >
 {
 public:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang desktop/source include/svx include/xmloff sd/source svx/source vcl/inc vcl/source xmloff/source

2019-03-26 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/singlevalfields.could-be-bool.results |2 
 compilerplugins/clang/singlevalfields.results   |   85 
--
 compilerplugins/clang/unusedfields.only-used-in-constructor.results |   50 
++---
 compilerplugins/clang/unusedfields.readonly.results |   34 +---
 compilerplugins/clang/unusedfields.untouched.results|   56 
+++---
 compilerplugins/clang/unusedfields.writeonly.results|   44 
+
 desktop/source/deployment/gui/dp_gui_updatedialog.cxx   |   42 
 desktop/source/deployment/gui/dp_gui_updatedialog.hxx   |3 
 include/svx/langbox.hxx |1 
 include/xmloff/shapeexport.hxx  |1 
 sd/source/ui/dlg/sdtreelb.cxx   |   17 --
 sd/source/ui/inc/sdtreelb.hxx   |1 
 svx/source/dialog/langbox.cxx   |7 
 vcl/inc/toolbox.h   |1 
 vcl/source/window/toolbox.cxx   |   27 ---
 vcl/source/window/toolbox2.cxx  |1 
 xmloff/source/draw/shapeexport.cxx  |2 
 17 files changed, 117 insertions(+), 257 deletions(-)

New commits:
commit 7030a5860f99378ba951ecb8e2cc0425af63b741
Author: Noel Grandin 
AuthorDate: Mon Mar 25 15:11:16 2019 +0200
Commit: Noel Grandin 
CommitDate: Tue Mar 26 07:30:13 2019 +0100

loplugin:unusedfields

Change-Id: I31c953c8e4c1d4ec235ea318d0aa3b7cedaed1a3
Reviewed-on: https://gerrit.libreoffice.org/69683
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 6e89b56e1fa0..3e6dec99affc 100644
--- a/compilerplugins/clang/unusedfields.only-used-in-constructor.results
+++ b/compilerplugins/clang/unusedfields.only-used-in-constructor.results
@@ -9,9 +9,9 @@ avmedia/source/vlc/wrapper/Types.hxx:44
 avmedia/source/vlc/wrapper/Types.hxx:45
 libvlc_event_t::(anonymous union)::(anonymous) dummy2 const char *
 avmedia/source/vlc/wrapper/Types.hxx:46
-libvlc_event_t::(anonymous) padding struct (anonymous struct at 
/media/noel/disk2/libo6/avmedia/source/vlc/wrapper/Types.hxx:43:7)
+libvlc_event_t::(anonymous) padding struct (anonymous struct at 
/media/noel/disk2/libo4/avmedia/source/vlc/wrapper/Types.hxx:43:7)
 avmedia/source/vlc/wrapper/Types.hxx:47
-libvlc_event_t u union (anonymous union at 
/media/noel/disk2/libo6/avmedia/source/vlc/wrapper/Types.hxx:41:5)
+libvlc_event_t u union (anonymous union at 
/media/noel/disk2/libo4/avmedia/source/vlc/wrapper/Types.hxx:41:5)
 avmedia/source/vlc/wrapper/Types.hxx:53
 libvlc_track_description_t psz_name char *
 basegfx/source/polygon/b2dtrapezoid.cxx:202
@@ -32,10 +32,6 @@ chart2/source/controller/inc/dlg_View3D.hxx:53
 chart::View3DDialog m_aControllerLocker class chart::ControllerLockHelper
 chart2/source/controller/inc/RangeSelectionListener.hxx:63
 chart::RangeSelectionListener m_aControllerLockGuard class 
chart::ControllerLockGuardUNO
-chart2/source/inc/MediaDescriptorHelper.hxx:56
-apphelper::MediaDescriptorHelper m_aRegularProperties 
css::uno::Sequence
-chart2/source/inc/MediaDescriptorHelper.hxx:59
-apphelper::MediaDescriptorHelper m_aDeprecatedProperties 
css::uno::Sequence
 connectivity/source/commontools/RowFunctionParser.cxx:374
 connectivity::(anonymous namespace)::ExpressionGrammar::definition 
unaryFunction ::boost::spirit::rule
 connectivity/source/commontools/RowFunctionParser.cxx:375
@@ -134,10 +130,8 @@ cppu/source/uno/check.cxx:138
 (anonymous namespace)::Char4 chars struct (anonymous namespace)::Char3
 cui/source/dialogs/colorpicker.cxx:719
 cui::ColorPickerDialog m_aColorPrevious class cui::ColorPreviewControl
-cui/source/factory/dlgfact.cxx:1357
+cui/source/factory/dlgfact.cxx:1346
 SvxMacroAssignDialog m_aItems class SfxItemSet
-cui/source/inc/cfg.hxx:335
-SvxMenuEntriesListBox m_bIsInternalDrag _Bool
 cui/source/inc/cfgutil.hxx:242
 SvxScriptSelectorDialog m_aStylesInfo struct SfxStylesInfo_Impl
 cui/source/inc/cuitabarea.hxx:230
@@ -194,7 +188,7 @@ helpcompiler/inc/HelpCompiler.hxx:229
 HelpCompiler lang const std::string
 include/basic/basmgr.hxx:56
 BasicError nReason enum BasicErrorReason
-include/drawinglayer/primitive2d/textlayoutdevice.hxx:61
+include/drawinglayer/primitive2d/textlayoutdevice.hxx:58
 drawinglayer::primitive2d::TextLayouterDevice maSolarGuard class 
SolarMutexGuard
 include/drawinglayer/texture/texture3d.hxx:62
 drawinglayer::texture::GeoTexSvxBitmapEx maBitmap class Bitmap
@@ -317,13 +311,13 @@ include/sfx2/msg.hxx:147
 include/sfx2/msg.hxx:147
 SfxType14 aAttrib 

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

2019-03-15 Thread Libreoffice Gerrit user
 compilerplugins/clang/pahole-all-classes.py |  123 
 compilerplugins/clang/pahole.results|   66 +++
 desktop/source/lib/init.cxx |2 
 sc/inc/sortparam.hxx|2 
 sc/inc/types.hxx|7 -
 sc/source/core/data/types.cxx   |6 -
 sc/source/ui/dbgui/tpsort.cxx   |2 
 7 files changed, 197 insertions(+), 11 deletions(-)

New commits:
commit c8bad5e896801e6775fd80ea246893a77f534d60
Author: Noel Grandin 
AuthorDate: Fri Mar 15 13:46:53 2019 +0200
Commit: Noel Grandin 
CommitDate: Fri Mar 15 13:46:53 2019 +0200

loplugin:stringconstant

/home/noel/libo/desktop/source/lib/init.cxx:3571:22: error: rewrite call
of 'rtl::operator==' with empty string constant argument as call of
'rtl::OUString::isEmpty' [loplugin:stringconstant]
if (aHeaders == "")

Change-Id: If0d8c411c6dd563622a855e209c0a5692c222abe

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 160ac0d68749..09b092d8c21b 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3568,7 +3568,7 @@ static char* doc_getCommandValues(LibreOfficeKitDocument* 
pThis, const char* pCo
 }
 
 OUString aHeaders = pDoc->getRowColumnHeaders(aRectangle);
-if (aHeaders == "")
+if (aHeaders.isEmpty())
 return nullptr;
 
 OString aString = OUStringToOString(aHeaders, RTL_TEXTENCODING_UTF8);
commit 6c46fdd75de8cec4f62f9fed02212a2d1e0b71b5
Author: Noel Grandin 
AuthorDate: Thu Mar 14 12:55:25 2019 +0200
Commit: Noel Grandin 
CommitDate: Fri Mar 15 12:56:09 2019 +0200

new pahole-all-classes script, and update a couple of sc/ structs

Create a new script to scan our codebase for holes in our
structures.

Implemented a couple of the things I found

ScSortKeyState 12bytes -> 8bytes
sc::MultiDataCellState 12bytes -> 8bytes

Change-Id: I139dda36aedf02b7f19be121eb312e5552142b87

diff --git a/compilerplugins/clang/pahole-all-classes.py 
b/compilerplugins/clang/pahole-all-classes.py
new file mode 100755
index ..9fda73c8789f
--- /dev/null
+++ b/compilerplugins/clang/pahole-all-classes.py
@@ -0,0 +1,123 @@
+#!/usr/bin/python3
+#
+# Find holes in structures, so that we can pack them and improve our memory 
density.
+#
+# In order to make this work, you need to
+# (1) be operating in a workspace where you have a debug build of LibreOffice
+# (2) first run the unusedfields loplugin to generate a log file
+# (3) install the pahole stuff into your gdb, I used this one: 
https://github.com/PhilArmstrong/pahole-gdb
+# (4) ./compilerplugins/clang/pahole-all-classes.py > 
./compilerplugins/clang/pahole.results
+# Warning: running this script will make GDB soak up about 8G of RAM
+#
+
+import _thread
+import io
+import os
+import subprocess
+import time
+import re
+
+# search for all the class names in the file produced by the unusedfields 
loplugin
+#a = subprocess.Popen("grep 'definition:' workdir/loplugin.unusedfields.log | 
sort -u", stdout=subprocess.PIPE, shell=True)
+a = subprocess.Popen("cat n1", stdout=subprocess.PIPE, shell=True)
+
+classSourceLocDict = dict()
+classSet = set()
+with a.stdout as txt:
+for line in txt:
+tokens = line.decode('utf8').strip().split("\t")
+className = tokens[2].strip()
+srcLoc = tokens[5].strip()
+if "anonymous" in className: continue
+# for now, just check the stuff in /sc/inc
+if not srcLoc.startswith("sc/inc/"):
+continue
+if className in classSet: continue
+classSourceLocDict[srcLoc] = className
+classSet.add(className)
+a.terminate()
+
+gdbProc = subprocess.Popen("gdb", stdin=subprocess.PIPE, 
stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
+
+stdin = io.TextIOWrapper(gdbProc.stdin, 'utf-8')
+
+# make gdb load all the debugging info
+stdin.write("set confirm off\n")
+for filename in sorted(os.listdir('instdir/program')):
+if filename.endswith(".so"):
+stdin.write("add-symbol-file instdir/program/" + filename + "\n")
+stdin.flush()
+
+
+# Some of the pahole commands are going to fail, and I cannot read the error 
stream and the input stream
+# together because python has no way of (easily) doing a non-blocking read.
+# So I have to write the commands out using a background thread, and then read 
the entire resulting
+# stream out below.
+def write_pahole_commands():
+for srcLoc in sorted(classSourceLocDict.keys()):
+className = classSourceLocDict[srcLoc]
+stdin.write("echo " + className + " " + srcLoc + "\n")
+stdin.write("pahole " + className + "\n")
+stdin.flush()
+stdin.write("echo all-done\n")
+stdin.flush()
+stdin.close() # only way to make it flush the last echo command
+
+_thread.start_new_thread( 

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

2019-03-11 Thread Libreoffice Gerrit user
 compilerplugins/clang/blockblock.cxx|4 ++--
 compilerplugins/clang/pluginhandler.cxx |5 -
 2 files changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 67dd4dcbfc203d74b00f577a4e34c0a36e3cbe20
Author: Luboš Luňák 
AuthorDate: Tue Mar 5 16:07:44 2019 +0100
Commit: Noel Grandin 
CommitDate: Mon Mar 11 11:54:40 2019 +0100

blockblock clang plugin does not do rewriting

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

diff --git a/compilerplugins/clang/blockblock.cxx 
b/compilerplugins/clang/blockblock.cxx
index 6c9ef887cf10..9358845abc47 100644
--- a/compilerplugins/clang/blockblock.cxx
+++ b/compilerplugins/clang/blockblock.cxx
@@ -20,11 +20,11 @@
 namespace {
 
 class BlockBlock:
-public loplugin::FilteringRewritePlugin
+public loplugin::FilteringPlugin
 {
 public:
 explicit BlockBlock(loplugin::InstantiationData const & data):
-FilteringRewritePlugin(data) {}
+FilteringPlugin(data) {}
 
 virtual void run() override
 {
commit 571a63d5591aa6a9bbf7cdc1fc7c8d2824411d2d
Author: Luboš Luňák 
AuthorDate: Sun Feb 24 17:46:22 2019 +0100
Commit: Noel Grandin 
CommitDate: Mon Mar 11 11:54:25 2019 +0100

avoid a possible crash in loplugin's ignoreLocation()

For the built-in(?) __int128_t there's apparently no valid presumed 
location.

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

diff --git a/compilerplugins/clang/pluginhandler.cxx 
b/compilerplugins/clang/pluginhandler.cxx
index 5a31368bdee0..540e58dcd222 100644
--- a/compilerplugins/clang/pluginhandler.cxx
+++ b/compilerplugins/clang/pluginhandler.cxx
@@ -204,7 +204,10 @@ bool PluginHandler::checkIgnoreLocation(SourceLocation loc)
 SourceLocation expansionLoc = compiler.getSourceManager().getExpansionLoc( 
loc );
 if( compiler.getSourceManager().isInSystemHeader( expansionLoc ))
 return true;
-const char* bufferName = compiler.getSourceManager().getPresumedLoc( 
expansionLoc ).getFilename();
+PresumedLoc presumedLoc = compiler.getSourceManager().getPresumedLoc( 
expansionLoc );
+if( presumedLoc.isInvalid())
+return true;
+const char* bufferName = presumedLoc.getFilename();
 if (bufferName == NULL
 || hasPathnamePrefix(bufferName, SRCDIR "/external/")
 || isSamePathname(bufferName, SRCDIR 
"/sdext/source/pdfimport/wrapper/keyword_list") )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang cui/source dbaccess/source desktop/source extensions/source framework/inc framework/source include/svx include/vcl include/xmloff sc/s

2019-03-08 Thread Libreoffice Gerrit user
 compilerplugins/clang/unnecessaryvirtual-dead.results  |   12 
 compilerplugins/clang/unnecessaryvirtual.results   |   72 +--
 compilerplugins/clang/unusedmethods.results|  298 ++---
 compilerplugins/clang/unusedmethods.unused-returns.results |   34 -
 cui/source/dialogs/hangulhanjadlg.cxx  |   13 
 cui/source/inc/cfgutil.hxx |2 
 cui/source/inc/hangulhanjadlg.hxx  |2 
 dbaccess/source/ui/control/opendoccontrols.cxx |9 
 dbaccess/source/ui/inc/opendoccontrols.hxx |1 
 desktop/source/deployment/gui/dp_gui_updatedialog.cxx  |   47 --
 desktop/source/deployment/gui/dp_gui_updatedialog.hxx  |1 
 extensions/source/bibliography/general.hxx |2 
 framework/inc/jobs/jobresult.hxx   |1 
 framework/source/jobs/jobresult.cxx|   13 
 include/svx/checklbx.hxx   |2 
 include/svx/langbox.hxx|3 
 include/vcl/button.hxx |9 
 include/vcl/filter/PngImageReader.hxx  |2 
 include/vcl/toolbox.hxx|3 
 include/vcl/vclmedit.hxx   |2 
 include/xmloff/xmlstyle.hxx|2 
 sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx   |   31 -
 sc/source/ui/inc/AccessibleSpreadsheet.hxx |2 
 sd/source/ui/inc/ViewClipboard.hxx |2 
 sdext/source/presenter/PresenterSpritePane.cxx |5 
 sdext/source/presenter/PresenterSpritePane.hxx |2 
 svx/source/dialog/checklbx.cxx |5 
 svx/source/dialog/langbox.cxx  |   11 
 sw/source/uibase/inc/drawbase.hxx  |2 
 sw/source/uibase/inc/numfmtlb.hxx  |   11 
 vcl/source/control/button.cxx  |   10 
 vcl/source/edit/vclmedit.cxx   |6 
 vcl/source/window/toolbox2.cxx |5 
 xmloff/source/style/prstylei.cxx   |2 
 xmloff/source/style/xmlstyle.cxx   |2 
 35 files changed, 229 insertions(+), 397 deletions(-)

New commits:
commit 313744d4f23f242f5ee979d229fe394211ff7ffd
Author: Noel Grandin 
AuthorDate: Fri Mar 8 14:41:02 2019 +0200
Commit: Noel Grandin 
CommitDate: Sat Mar 9 07:28:25 2019 +0100

loplugin:unusedmethods

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

diff --git a/compilerplugins/clang/unusedmethods.results 
b/compilerplugins/clang/unusedmethods.results
index 7f6427557e20..63d19d42b302 100644
--- a/compilerplugins/clang/unusedmethods.results
+++ b/compilerplugins/clang/unusedmethods.results
@@ -1,8 +1,4 @@
-basctl/source/basicide/moduldlg.hxx:126
-void basctl::CheckBox::CheckEntryPos(unsigned long)
-basctl/source/basicide/moduldlg.hxx:127
-_Bool basctl::CheckBox::IsChecked(unsigned long) const
-basctl/source/basicide/moduldlg.hxx:255
+basctl/source/basicide/moduldlg.hxx:252
 void basctl::createLibImpl(class weld::Window *,const class 
basctl::ScriptDocument &,class basctl::CheckBox *,class basctl::TreeListBox *)
 basegfx/source/range/b2drangeclipper.cxx:687
 type-parameter-?-? basegfx::(anonymous 
namespace)::eraseFromList(type-parameter-?-? &,const type-parameter-?-? &)
@@ -52,19 +48,21 @@ connectivity/source/inc/OTypeInfo.hxx:46
 _Bool connectivity::OTypeInfo::operator==(const struct 
connectivity::OTypeInfo &) const
 connectivity/source/inc/OTypeInfo.hxx:47
 _Bool connectivity::OTypeInfo::operator!=(const struct 
connectivity::OTypeInfo &) const
+cui/source/inc/cfgutil.hxx:120
+class rtl::OUString SfxConfigFunctionListBox::GetCurCommand()
+cui/source/inc/cfgutil.hxx:121
+class rtl::OUString SfxConfigFunctionListBox::GetCurLabel()
 cui/source/inc/cfgutil.hxx:147
-class std::unique_ptr > 
CuiConfigFunctionListBox::make_iterator(const class weld::TreeIter *) const
-cui/source/inc/cfgutil.hxx:148
 _Bool CuiConfigFunctionListBox::get_iter_first(class weld::TreeIter &) 
const
-cui/source/inc/cfgutil.hxx:150
+cui/source/inc/cfgutil.hxx:149
 _Bool CuiConfigFunctionListBox::iter_next(class weld::TreeIter &) const
 cui/source/inc/cfgutil.hxx:151
 class rtl::OUString CuiConfigFunctionListBox::get_text(const class 
weld::TreeIter &) const
-cui/source/inc/cfgutil.hxx:152
-void CuiConfigFunctionListBox::scroll_to_row(const class weld::TreeIter &)
-cui/source/inc/cfgutil.hxx:153
-void CuiConfigFunctionListBox::select(const class weld::TreeIter &)
-cui/source/inc/hangulhanjadlg.hxx:265

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang cppcanvas/source cui/source include/vcl sc/source

2018-12-09 Thread Libreoffice Gerrit user
 compilerplugins/clang/unnecessaryvirtual-dead.results   |2 
 compilerplugins/clang/unnecessaryvirtual.results|   92 
--
 compilerplugins/clang/unusedfields.only-used-in-constructor.results |   88 
++---
 compilerplugins/clang/unusedfields.readonly.results |   66 
+++
 compilerplugins/clang/unusedfields.untouched.results|   62 
+-
 compilerplugins/clang/unusedfields.writeonly.results|   76 
+++-
 cppcanvas/source/inc/implrenderer.hxx   |   18 -
 cppcanvas/source/mtfrenderer/implrenderer.cxx   |2 
 cui/source/customize/cfgutil.cxx|2 
 include/vcl/tabctrl.hxx |2 
 sc/source/ui/inc/tabbgcolordlg.hxx  |1 
 sc/source/ui/miscdlgs/tabbgcolordlg.cxx |3 
 12 files changed, 222 insertions(+), 192 deletions(-)

New commits:
commit 2cfdf00a9a2f9287a822219bc8ab600edf3c0c35
Author: Noel Grandin 
AuthorDate: Sun Dec 9 08:49:34 2018 +0200
Commit: Noel Grandin 
CommitDate: Mon Dec 10 07:59:40 2018 +0100

loplugin:unnecessaryvirtual

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

diff --git a/compilerplugins/clang/unnecessaryvirtual-dead.results 
b/compilerplugins/clang/unnecessaryvirtual-dead.results
index 2dffa1efdc68..b282b717406d 100644
--- a/compilerplugins/clang/unnecessaryvirtual-dead.results
+++ b/compilerplugins/clang/unnecessaryvirtual-dead.results
@@ -8,6 +8,8 @@ include/canvas/base/graphicdevicebase.hxx:302
 void canvas::GraphicDeviceBase::removePropertyChangeListener(const class 
rtl::OUString &,const class com::sun::star::uno::Reference &,)
 include/canvas/base/graphicdevicebase.hxx:315
 void canvas::GraphicDeviceBase::removeVetoableChangeListener(const class 
rtl::OUString &,const class com::sun::star::uno::Reference &,)
+sc/source/core/opencl/formulagroupcl.cxx:1059
+void 
sc::opencl::DynamicKernelSlidingArgument::GenSlidingWindowFunction(class 
std::__cxx11::basic_stringstream &,)
 slideshow/source/engine/animationfactory.cxx:443
 void slideshow::internal::(anonymous 
namespace)::GenericAnimation::prefetch(const class std::shared_ptr &,const class std::shared_ptr &,)
 vcl/inc/salframe.hxx:135
diff --git a/compilerplugins/clang/unnecessaryvirtual.results 
b/compilerplugins/clang/unnecessaryvirtual.results
index d9fb3f6e502e..107bd14a2105 100644
--- a/compilerplugins/clang/unnecessaryvirtual.results
+++ b/compilerplugins/clang/unnecessaryvirtual.results
@@ -20,6 +20,8 @@ basic/source/comp/codegen.cxx:524
 _Bool BufferTransformer::processParams()
 chart2/source/inc/WeakListenerAdapter.hxx:57
 void chart::WeakListenerAdapter::disposing(const struct 
com::sun::star::lang::EventObject &,)
+cppcanvas/source/inc/implrenderer.hxx:69
+void cppcanvas::internal::EMFPObject::~EMFPObject()
 extensions/source/dbpilots/unoautopilot.hxx:99
 class cppu::IPropertyArrayHelper * 
dbp::OUnoAutoPilot::createArrayHelper()const
 extensions/source/propctrlr/commoncontrol.hxx:127
@@ -74,16 +76,6 @@ include/comphelper/weakeventlistener.hxx:120
 void comphelper::OWeakListenerAdapter::disposing(const struct 
com::sun::star::lang::EventObject &,)
 include/cppcanvas/font.hxx:38
 void cppcanvas::Font::~Font()
-include/sfx2/basedlgs.hxx:137
-void SfxModelessDialogController::FillInfo(struct SfxChildWinInfo &,)const
-include/sfx2/basedlgs.hxx:238
-class weld::Container * SfxSingleTabDialogController::get_content_area()
-include/sfx2/controlwrapper.hxx:215
-type-parameter-0-0 sfx::ListBoxWrapper::GetControlValue()const
-include/sfx2/controlwrapper.hxx:216
-void sfx::ListBoxWrapper::SetControlValue(type-parameter-0-0,)
-include/sfx2/tabdlg.hxx:106
-void SfxTabDialog::RefreshInputSet()
 include/svl/svdde.hxx:237
 class DdeData * DdeTopic::Get(enum SotClipboardFormatId,)
 include/svl/svdde.hxx:238
@@ -96,8 +88,6 @@ include/svl/svdde.hxx:244
 _Bool DdeTopic::StartAdviseLoop()
 include/svl/svdde.hxx:300
 void DdeService::~DdeService()
-include/svtools/valueset.hxx:492
-void SvtValueSet::Select()
 include/toolkit/controls/geometrycontrolmodel.hxx:191
 void OGeometryControlModel::fillProperties(class 
com::sun::star::uno::Sequence &,class 
com::sun::star::uno::Sequence &,)const
 include/vbahelper/vbacollectionimpl.hxx:290
@@ -122,67 +112,75 @@ include/vbahelper/vbareturntypes.hxx:40
 void ooo::vba::DefaultReturnHelper::setValue(type-parameter-0-0,)
 include/vbahelper/vbareturntypes.hxx:41
 type-parameter-0-0 ooo::vba::DefaultReturnHelper::getValue()
-sc/source/core/opencl/formulagroupcl.cxx:914
-void sc::opencl::DynamicKernelMixedArgument::GenNumDeclRef(class 
std::__cxx11::basic_stringstream &,)const

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

2018-12-08 Thread Libreoffice Gerrit user
 compilerplugins/clang/singlevalfields.results |   18 +-
 sfx2/source/doc/objmisc.cxx   |8 
 2 files changed, 13 insertions(+), 13 deletions(-)

New commits:
commit 3c0cb54b7ca20439e7e5e1e19dc6fcc75709973b
Author: Caolán McNamara 
AuthorDate: Fri Dec 7 16:42:16 2018 +
Commit: Noel Grandin 
CommitDate: Sat Dec 8 12:48:34 2018 +0100

crashtesting: doubly deleted reloadtimer

since...

commit 0cc702232e4799f03a468d1e8014d050a683165e
Date:   Tue Dec 4 15:00:43 2018 +0200

use unique_ptr in SfxObjectShell_Impl

Change-Id: I3f3b0514bdb87f59d9c5f34d2d36dc63e8b1e33d
Reviewed-on: https://gerrit.libreoffice.org/64527

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

diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index a7fc00a38aa8..b3e00909e375 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -1284,14 +1284,14 @@ void AutoReloadTimer_Impl::Invoke()
 SfxStringItem(SID_REFERER, pObjSh->GetMedium()->GetName()));
 }
 SfxRequest aReq( SID_RELOAD, SfxCallMode::SLOT, aSet );
-pObjSh->Get_Impl()->pReloadTimer = nullptr;
-delete this;
+// this will delete this
+pObjSh->Get_Impl()->pReloadTimer.reset();
 pFrame->ExecReload_Impl( aReq );
 return;
 }
 
-pObjSh->Get_Impl()->pReloadTimer = nullptr;
-delete this;
+// this will delete this
+pObjSh->Get_Impl()->pReloadTimer.reset();
 }
 
 SfxModule* SfxObjectShell::GetModule() const
commit e5efd197ad403619ac274c88e2e3be648886aa3d
Author: Andrea Gelmini 
AuthorDate: Fri Dec 7 16:55:55 2018 +0100
Commit: Noel Grandin 
CommitDate: Sat Dec 8 12:48:24 2018 +0100

Removed spurious chars

$ file compilerplugins/clang/singlevalfields.results -i

Before:
compilerplugins/clang/singlevalfields.results: 
application/octet-stream; charset=binary

After:
compilerplugins/clang/singlevalfields.results: text/x-c; 
charset=iso-8859-1

Then converted to UTF-8, to avoid troubles reading it with Python/Editors 
without
forcing latin-1, like this:

UnicodeDecodeError('utf-8', b'SwWW8ImplReader::Read_F_DocInfo aName41
ZULETZTGEDRUCKT
sw/source/filter/ww8/ww8par5.cxx:1569
SwWW8ImplReader::Read_F_DocInfo aName42
DERNI\xc8REIMPRESSION
', 155, 156, 'invalid continuation byte')

See here:

https://stackoverflow.com/questions/5552555/unicodedecodeerror-invalid-continuation-byte

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

diff --git a/compilerplugins/clang/singlevalfields.results 
b/compilerplugins/clang/singlevalfields.results
index adb9651d72cc..4fd98669fde5 100644
--- a/compilerplugins/clang/singlevalfields.results
+++ b/compilerplugins/clang/singlevalfields.results
@@ -1536,7 +1536,7 @@ sw/source/filter/ww8/ww8par3.cxx:370
 1
 sw/source/filter/ww8/ww8par5.cxx:1539
 SwWW8ImplReader::Read_F_DocInfo aName10
-
+
 sw/source/filter/ww8/ww8par5.cxx:1540
 SwWW8ImplReader::Read_F_DocInfo aName11
 TITEL
@@ -1551,13 +1551,13 @@ sw/source/filter/ww8/ww8par5.cxx:1546
 TITRO
 sw/source/filter/ww8/ww8par5.cxx:1548
 SwWW8ImplReader::Read_F_DocInfo aName20
-
+
 sw/source/filter/ww8/ww8par5.cxx:1549
 SwWW8ImplReader::Read_F_DocInfo aName21
 ERSTELLDATUM
 sw/source/filter/ww8/ww8par5.cxx:1551
 SwWW8ImplReader::Read_F_DocInfo aName22
-CR��
+CRÉÉ
 sw/source/filter/ww8/ww8par5.cxx:1553
 SwWW8ImplReader::Read_F_DocInfo aName23
 CREATED
@@ -1566,7 +1566,7 @@ sw/source/filter/ww8/ww8par5.cxx:1555
 CREADO
 sw/source/filter/ww8/ww8par5.cxx:1557
 SwWW8ImplReader::Read_F_DocInfo aName30
-
+
 sw/source/filter/ww8/ww8par5.cxx:1558
 SwWW8ImplReader::Read_F_DocInfo aName31
 ZULETZTGESPEICHERTZEIT
@@ -1581,13 +1581,13 @@ sw/source/filter/ww8/ww8par5.cxx:1564
 MODIFICADO
 sw/source/filter/ww8/ww8par5.cxx:1566
 SwWW8ImplReader::Read_F_DocInfo aName40
-
+
 sw/source/filter/ww8/ww8par5.cxx:1567
 SwWW8ImplReader::Read_F_DocInfo aName41
 ZULETZTGEDRUCKT
 sw/source/filter/ww8/ww8par5.cxx:1569
 SwWW8ImplReader::Read_F_DocInfo aName42
-DERNI�REIMPRESSION
+DERNIÈREIMPRESSION
 sw/source/filter/ww8/ww8par5.cxx:1571
 SwWW8ImplReader::Read_F_DocInfo aName43
 LASTPRINTED
@@ -1596,13 +1596,13 @@ sw/source/filter/ww8/ww8par5.cxx:1573
 HUPS PUPS
 sw/source/filter/ww8/ww8par5.cxx:1575
 SwWW8ImplReader::Read_F_DocInfo aName50
-
+
 sw/source/filter/ww8/ww8par5.cxx:1576
 SwWW8ImplReader::Read_F_DocInfo aName51
-�BERARBEITUNGSNUMMER
+ÜBERARBEITUNGSNUMMER
 sw/source/filter/ww8/ww8par5.cxx:1578

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

2018-11-26 Thread Libreoffice Gerrit user
 compilerplugins/clang/unusedenumconstants.readonly.results |2 
 include/vcl/splitwin.hxx   |3 
 svl/source/items/IndexedStyleSheets.cxx|   30 ++-
 vcl/source/window/splitwin.cxx |   99 -
 4 files changed, 51 insertions(+), 83 deletions(-)

New commits:
commit 37b3502b5c781007e701e78c3b361eba5ce8cfe0
Author: Noel Grandin 
AuthorDate: Fri Nov 23 15:18:50 2018 +0200
Commit: Noel Grandin 
CommitDate: Mon Nov 26 19:11:57 2018 +0100

remove unused enum value SplitWindowItemFlags::Invisible

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

diff --git a/compilerplugins/clang/unusedenumconstants.readonly.results 
b/compilerplugins/clang/unusedenumconstants.readonly.results
index 2994af2a95fe..0c0bad002db6 100644
--- a/compilerplugins/clang/unusedenumconstants.readonly.results
+++ b/compilerplugins/clang/unusedenumconstants.readonly.results
@@ -1070,8 +1070,6 @@ include/vcl/ptrstyle.hxx:92
 enum PointerStyle Chart
 include/vcl/salctype.hxx:41
 enum ConvertDataFormat PDF
-include/vcl/splitwin.hxx:37
-enum SplitWindowItemFlags Invisible
 include/vcl/vclenum.hxx:37
 enum MenuItemBits POPUPSELECT
 include/vcl/vclenum.hxx:143
diff --git a/include/vcl/splitwin.hxx b/include/vcl/splitwin.hxx
index 0c8edcfe298e..7f015ce96cf0 100644
--- a/include/vcl/splitwin.hxx
+++ b/include/vcl/splitwin.hxx
@@ -34,11 +34,10 @@ enum class SplitWindowItemFlags
 RelativeSize   = 0x0002,
 PercentSize= 0x0004,
 ColSet = 0x0008,
-Invisible  = 0x0010,
 };
 namespace o3tl
 {
-template<> struct typed_flags : 
is_typed_flags {};
+template<> struct typed_flags : 
is_typed_flags {};
 }
 
 #define SPLITWINDOW_APPEND  (sal_uInt16(0x))
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index 18085cade791..ed5b9621990a 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -401,7 +401,6 @@ static void ImplCalcSet( ImplSplitSet* pSet,
 sal_uInt16  nMins;
 sal_uInt16  nCalcItems;
 size_t  nItems = pSet->mvItems.size();
-sal_uInt16  nVisItems;
 sal_uInt16  nAbsItems;
 longnCalcSize;
 longnPos;
@@ -409,20 +408,12 @@ static void ImplCalcSet( ImplSplitSet* pSet,
 std::vector< ImplSplitItem >& rItems = pSet->mvItems;
 boolbEmpty;
 
-// get number of visible items
-nVisItems = 0;
-for ( auto& rItem : rItems )
-{
-if ( !(rItem.mnBits & SplitWindowItemFlags::Invisible) )
-nVisItems++;
-}
-
 // calculate sizes
 if ( bRows )
 nCalcSize = nSetHeight;
 else
 nCalcSize = nSetWidth;
-nCalcSize -= (nVisItems-1)*pSet->mnSplitSize;
+nCalcSize -= (rItems.size()-1)*pSet->mnSplitSize;
 if ( pSet->mbCalcPix || (pSet->mnLastSize != nCalcSize) )
 {
 long nPercentFactor = 10;
@@ -433,15 +424,12 @@ static void ImplCalcSet( ImplSplitSet* pSet,
 long nCurSize   = 0;
 for ( auto& rItem : rItems )
 {
-if ( !(rItem.mnBits & SplitWindowItemFlags::Invisible) )
-{
-if ( rItem.mnBits & SplitWindowItemFlags::RelativeSize )
-nRelCount += rItem.mnSize;
-else if ( rItem.mnBits & SplitWindowItemFlags::PercentSize )
-nPercent += rItem.mnSize;
-else
-nAbsSize += rItem.mnSize;
-}
+if ( rItem.mnBits & SplitWindowItemFlags::RelativeSize )
+nRelCount += rItem.mnSize;
+else if ( rItem.mnBits & SplitWindowItemFlags::PercentSize )
+nPercent += rItem.mnSize;
+else
+nAbsSize += rItem.mnSize;
 }
 // map relative values to percentages (percentage here one tenth of a 
procent)
 nPercent *= nPercentFactor;
@@ -466,9 +454,7 @@ static void ImplCalcSet( ImplSplitSet* pSet,
 long nSizeDelta = nCalcSize-nAbsSize;
 for ( auto& rItem : rItems )
 {
-if ( rItem.mnBits & SplitWindowItemFlags::Invisible )
-rItem.mnPixSize = 0;
-else if ( rItem.mnBits & SplitWindowItemFlags::RelativeSize )
+if ( rItem.mnBits & SplitWindowItemFlags::RelativeSize )
 {
 if ( nSizeDelta <= 0 )
 rItem.mnPixSize = 0;
@@ -500,13 +486,10 @@ static void ImplCalcSet( ImplSplitSet* pSet,
 // first resize absolute items relative
 for ( auto& rItem : rItems )
 {
-if ( !(rItem.mnBits & SplitWindowItemFlags::Invisible) )
+if ( !(rItem.mnBits & (SplitWindowItemFlags::RelativeSize | 
SplitWindowItemFlags::PercentSize)) )

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

2018-11-26 Thread Libreoffice Gerrit user
 compilerplugins/clang/unusedenumconstants.readonly.results |4 
 include/vcl/window.hxx |6 ++
 vcl/source/window/window.cxx   |2 +-
 vcl/source/window/window2.cxx  |1 -
 4 files changed, 3 insertions(+), 10 deletions(-)

New commits:
commit 12d0c06703842754de1eee4c1ea4f5796429730b
Author: Noel Grandin 
AuthorDate: Fri Nov 23 15:07:09 2018 +0200
Commit: Noel Grandin 
CommitDate: Mon Nov 26 14:07:48 2018 +0100

remove unused enum value TrackingEventFlags::DontCallHdl

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

diff --git a/compilerplugins/clang/unusedenumconstants.readonly.results 
b/compilerplugins/clang/unusedenumconstants.readonly.results
index 978c17c2454f..5e7a1dd16a29 100644
--- a/compilerplugins/clang/unusedenumconstants.readonly.results
+++ b/compilerplugins/clang/unusedenumconstants.readonly.results
@@ -1094,8 +1094,6 @@ include/vcl/wall.hxx:43
 enum WallpaperStyle BottomLeft
 include/vcl/wall.hxx:44
 enum WallpaperStyle Bottom
-include/vcl/window.hxx:121
-enum TrackingEventFlags DontCallHdl
 include/xmloff/shapeexport.hxx:53
 enum XMLShapeExportFlags WIDTH
 include/xmloff/shapeexport.hxx:54
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 8afd84688523..60389e836aa9 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -118,11 +118,10 @@ enum class TrackingEventFlags
 Focus  = 0x0004,
 Repeat = 0x0100,
 End= 0x1000,
-DontCallHdl= 0x8000,
 };
 namespace o3tl
 {
-template<> struct typed_flags : 
is_typed_flags {};
+template<> struct typed_flags : 
is_typed_flags {};
 }
 
 
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 922b4b4ab161..877c66bdee05 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -296,7 +296,6 @@ void Window::EndTracking( TrackingEventFlags nFlags )
 }
 
 // call EndTracking if required
-if ( !(nFlags & TrackingEventFlags::DontCallHdl) )
 {
 Point   aMousePos( 
mpWindowImpl->mpFrameData->mnLastMouseX, 
mpWindowImpl->mpFrameData->mnLastMouseY );
 if( ImplIsAntiparallel() )
commit ea72ad4474789af1532fd49677158f62ba8e2543
Author: Noel Grandin 
AuthorDate: Fri Nov 23 15:05:08 2018 +0200
Commit: Noel Grandin 
CommitDate: Mon Nov 26 14:07:37 2018 +0100

remove unused ShowFlags::NoParentUpdate

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

diff --git a/compilerplugins/clang/unusedenumconstants.readonly.results 
b/compilerplugins/clang/unusedenumconstants.readonly.results
index 327ddeb57286..978c17c2454f 100644
--- a/compilerplugins/clang/unusedenumconstants.readonly.results
+++ b/compilerplugins/clang/unusedenumconstants.readonly.results
@@ -1096,8 +1096,6 @@ include/vcl/wall.hxx:44
 enum WallpaperStyle Bottom
 include/vcl/window.hxx:121
 enum TrackingEventFlags DontCallHdl
-include/vcl/window.hxx:172
-enum ShowFlags NoParentUpdate
 include/xmloff/shapeexport.hxx:53
 enum XMLShapeExportFlags WIDTH
 include/xmloff/shapeexport.hxx:54
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index dc5def79c8a3..8afd84688523 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -169,14 +169,13 @@ namespace o3tl
 enum class ShowFlags
 {
 NONE   = 0x,
-NoParentUpdate = 0x0001,
 NoFocusChange  = 0x0002,
 NoActivate = 0x0004,
 ForegroundTask = 0x0008,
 };
 namespace o3tl
 {
-template<> struct typed_flags : is_typed_flags {};
+template<> struct typed_flags : is_typed_flags {};
 }
 
 // Flags for SetZOrder()
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index e1d97513172d..2b835fd81796 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -2232,7 +2232,7 @@ void Window::Show(bool bVisible, ShowFlags nFlags)
 aBounds.AdjustBottom(workaround_border );
 aInvRegion = aBounds;
 }
-if ( !mpWindowImpl->mbNoParentUpdate && !(nFlags & 
ShowFlags::NoParentUpdate) )
+if ( !mpWindowImpl->mbNoParentUpdate )
 {
 if ( !aInvRegion.IsEmpty() )
 ImplInvalidateParentFrameRegion( aInvRegion );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-11-24 Thread Libreoffice Gerrit user
 compilerplugins/clang/unusedenumconstants.readonly.results |4 ---
 sc/source/filter/lotus/lotread.cxx |4 ---
 sc/source/filter/oox/formulabase.cxx   |   13 --
 sc/source/ui/inc/undobase.hxx  |6 
 sc/source/ui/undo/undobase.cxx |   16 +++--
 sc/source/ui/undo/undoblk.cxx  |8 +++---
 sc/source/ui/undo/undotab.cxx  |2 -
 7 files changed, 16 insertions(+), 37 deletions(-)

New commits:
commit f326c3c01c3f2dd1ed244bded68d096cd680ad18
Author: Noel Grandin 
AuthorDate: Thu Nov 22 15:40:22 2018 +0200
Commit: Noel Grandin 
CommitDate: Sat Nov 24 19:05:07 2018 +0100

remove unused FuncFlags::BIFFIMPORTONLY,STATE::S_WK1

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

diff --git a/compilerplugins/clang/unusedenumconstants.readonly.results 
b/compilerplugins/clang/unusedenumconstants.readonly.results
index 0ad6cb92a0c2..88093da091b3 100644
--- a/compilerplugins/clang/unusedenumconstants.readonly.results
+++ b/compilerplugins/clang/unusedenumconstants.readonly.results
@@ -1178,8 +1178,6 @@ sc/source/filter/inc/unitconverter.hxx:44
 enum oox::xls::Unit UNIT_REFDEVY
 sc/source/filter/lotus/lotread.cxx:41
 enum STATE S_WK1
-sc/source/filter/oox/formulabase.cxx:63
-enum FuncFlags BIFFIMPORTONLY
 sc/source/ui/inc/viewdata.hxx:43
 enum ScSplitMode SC_SPLIT_MODE_MAX_ENUM
 sc/source/ui/inc/viewdata.hxx:45
diff --git a/sc/source/filter/lotus/lotread.cxx 
b/sc/source/filter/lotus/lotread.cxx
index 5be4db478cfc..155e265a6f4b 100644
--- a/sc/source/filter/lotus/lotread.cxx
+++ b/sc/source/filter/lotus/lotread.cxx
@@ -38,7 +38,6 @@ ErrCode ImportLotus::parse()
 enum STATE
 {
 S_START,// analyse first BOF
-S_WK1,  // in WK1-Stream
 S_WK3,  // in WK3-Section
 S_WK4,
 S_FM3,
@@ -107,9 +106,6 @@ ErrCode ImportLotus::parse()
 }
 break;
 
-case S_WK1: // S_WK1
-break;
-
 case S_WK3: // S_WK3
 case S_WK4: // S_WK4
 switch( nOp )
diff --git a/sc/source/filter/oox/formulabase.cxx 
b/sc/source/filter/oox/formulabase.cxx
index 4a11eef0ff87..7872a03529d1 100644
--- a/sc/source/filter/oox/formulabase.cxx
+++ b/sc/source/filter/oox/formulabase.cxx
@@ -60,13 +60,12 @@ enum class FuncFlags : sal_uInt16 {
 MACROCALL_NEW = MACROCALL | MACROCALL_FN, /** New Excel functions not
   defined in OOXML, _xlfn. 
prefix in all formats. OOXML name
   must exist. */
-BIFFIMPORTONLY= 0x0800,   /// Only used in BIFF binary import filter.
 BIFFEXPORTONLY= 0x1000,   /// Only used in BIFF binary export filter.
 INTERNAL  = 0x2000,   /// Function is internal in Calc.
 EUROTOOL  = 0x4000,   /// function of euro tool lib, 
FUNCLIB_EUROTOOL
 };
 namespace o3tl {
-template<> struct typed_flags : is_typed_flags {};
+template<> struct typed_flags : is_typed_flags {};
 }
 
 namespace oox {
@@ -191,13 +190,13 @@ struct FunctionData
 bool FunctionData::isSupported(bool bImportFilter) const
 {
 /*  For import filters: the FuncFlags::EXPORTONLY, 
FuncFlags::BIFFEXPORTONLY
-and FuncFlags::BIFFIMPORTONLY flag must not be set.
-For export filters: the FuncFlags::IMPORTONLY, 
FuncFlags::BIFFIMPORTONLY
-and FuncFlags::BIFFEXPORTONLY flag must not be 
set. */
+must not be set.
+For export filters: the FuncFlags::IMPORTONLY, 
FuncFlags::BIFFEXPORTONLY
+must not be set. */
 if (bImportFilter)
-return !(mnFlags & ( FuncFlags::EXPORTONLY | FuncFlags::BIFFEXPORTONLY 
| FuncFlags::BIFFIMPORTONLY));
+return !(mnFlags & ( FuncFlags::EXPORTONLY | 
FuncFlags::BIFFEXPORTONLY));
 else
-return !(mnFlags & ( FuncFlags::IMPORTONLY | FuncFlags::BIFFIMPORTONLY 
| FuncFlags::BIFFEXPORTONLY));
+return !(mnFlags & ( FuncFlags::IMPORTONLY | 
FuncFlags::BIFFEXPORTONLY));
 }
 
 const sal_uInt16 NOID = SAL_MAX_UINT16; /// No BIFF function identifier 
available.
commit 1ab34cdb4a8bf255ba6a0eb96b2a30c7be5e451b
Author: Noel Grandin 
AuthorDate: Thu Nov 22 15:37:23 2018 +0200
Commit: Noel Grandin 
CommitDate: Sat Nov 24 19:04:55 2018 +0100

remove ScMoveUndoMode enum

we only use one value

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

diff --git 

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang slideshow/source starmath/inc starmath/source

2018-11-24 Thread Libreoffice Gerrit user
 compilerplugins/clang/unusedenumconstants.readonly.results |4 
 slideshow/source/engine/shapes/drawshapesubsetting.cxx |2 --
 slideshow/source/inc/doctreenode.hxx   |2 --
 starmath/inc/node.hxx  |5 ++---
 starmath/source/node.cxx   |3 +--
 5 files changed, 3 insertions(+), 13 deletions(-)

New commits:
commit 8a629c1f9b143e6222c4711c4d296f5f51b3485d
Author: Noel Grandin 
AuthorDate: Thu Nov 22 15:18:58 2018 +0200
Commit: Noel Grandin 
CommitDate: Sat Nov 24 16:49:45 2018 +0100

remove unused DocTreeNode::NodeType::Invalid

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

diff --git a/compilerplugins/clang/unusedenumconstants.readonly.results 
b/compilerplugins/clang/unusedenumconstants.readonly.results
index d646e3e91cfe..2d3137a2774c 100644
--- a/compilerplugins/clang/unusedenumconstants.readonly.results
+++ b/compilerplugins/clang/unusedenumconstants.readonly.results
@@ -1232,8 +1232,6 @@ slideshow/source/engine/slideview.cxx:249
 enum slideshow::internal::(anonymous 
namespace)::LayerSpriteContainer::(anonymous at 
/home/noel/libo2/slideshow/source/engine/slideview.cxx:249:5) SPRITE_ULLAGE
 slideshow/source/engine/slideview.cxx:729
 enum slideshow::internal::(anonymous namespace)::SlideView::(anonymous at 
/home/noel/libo2/slideshow/source/engine/slideview.cxx:729:5) LAYER_ULLAGE
-slideshow/source/inc/doctreenode.hxx:52
-enum slideshow::internal::DocTreeNode::NodeType Invalid
 soltools/cpp/cpp.h:42
 int WS
 svgio/inc/svgstyleattributes.hxx:62
diff --git a/slideshow/source/engine/shapes/drawshapesubsetting.cxx 
b/slideshow/source/engine/shapes/drawshapesubsetting.cxx
index c7c9954316c1..5a0193e71928 100644
--- a/slideshow/source/engine/shapes/drawshapesubsetting.cxx
+++ b/slideshow/source/engine/shapes/drawshapesubsetting.cxx
@@ -604,8 +604,6 @@ namespace slideshow
 {
 switch( eNodeType )
 {
-case DocTreeNode::NodeType::Invalid:
-// FALLTHROUGH intended
 default:
 SAL_WARN( "slideshow", 
"DrawShapeSubsetting::mapDocTreeNode(): unexpected node type");
 return DrawShapeSubsetting::CLASS_NOOP;
diff --git a/slideshow/source/inc/doctreenode.hxx 
b/slideshow/source/inc/doctreenode.hxx
index 008979651b8a..1bb4beda5ec9 100644
--- a/slideshow/source/inc/doctreenode.hxx
+++ b/slideshow/source/inc/doctreenode.hxx
@@ -49,8 +49,6 @@ namespace slideshow
 /// Type of shape entity represented by this node
 enum class NodeType
 {
-Invalid=0,
-
 /// This node represents a paragraph
 LogicalParagraph=129,
 /// This node represents a word
commit 9afa992b34fbe9285398c6ec88e94d961da4094e
Author: Noel Grandin 
AuthorDate: Thu Nov 22 15:16:09 2018 +0200
Commit: Noel Grandin 
CommitDate: Sat Nov 24 16:49:32 2018 +0100

remove unused FontChangeMask::HorAlign

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

diff --git a/compilerplugins/clang/unusedenumconstants.readonly.results 
b/compilerplugins/clang/unusedenumconstants.readonly.results
index 282427e96af2..d646e3e91cfe 100644
--- a/compilerplugins/clang/unusedenumconstants.readonly.results
+++ b/compilerplugins/clang/unusedenumconstants.readonly.results
@@ -1236,8 +1236,6 @@ slideshow/source/inc/doctreenode.hxx:52
 enum slideshow::internal::DocTreeNode::NodeType Invalid
 soltools/cpp/cpp.h:42
 int WS
-starmath/inc/node.hxx:62
-enum FontChangeMask HorAlign
 svgio/inc/svgstyleattributes.hxx:62
 enum svgio::svgreader::FontSize FontSize_notset
 svl/source/numbers/zformat.cxx:358
diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx
index 9ee746d9d04c..640435a4101e 100644
--- a/starmath/inc/node.hxx
+++ b/starmath/inc/node.hxx
@@ -58,13 +58,12 @@ enum class FontChangeMask {
 Bold = 0x0004,
 Italic   = 0x0008,
 Color= 0x0010,
-Phantom  = 0x0020,
-HorAlign = 0x0040
+Phantom  = 0x0020
 };
 
 namespace o3tl
 {
-template<> struct typed_flags : 
is_typed_flags {};
+template<> struct typed_flags : 
is_typed_flags {};
 }
 
 
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 2eba1f5c58f1..9e1ef9279997 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -204,8 +204,7 @@ void SmNode::SetSize(const Fraction )
 
 void SmNode::SetRectHorAlign(RectHorAlign eHorAlign, bool bApplyToSubTree )
 {
-if (!(Flags() & FontChangeMask::HorAlign))
-meRectHorAlign = eHorAlign;
+meRectHorAlign = eHorAlign;
 
 if (bApplyToSubTree)
 

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

2018-11-24 Thread Libreoffice Gerrit user
 compilerplugins/clang/unusedenumconstants.readonly.results |   12 ---
 sc/source/ui/vba/vbasheetobject.cxx|   42 +++--
 sc/source/ui/vba/vbasheetobject.hxx|   15 
 scaddins/source/analysis/analysis.cxx  |8 +-
 scaddins/source/analysis/analysishelper.cxx|   18 -
 scaddins/source/analysis/analysishelper.hxx|   12 ---
 6 files changed, 20 insertions(+), 87 deletions(-)

New commits:
commit 102091b73d824cdda7f88d9a7b79d04eb33fabf7
Author: Noel Grandin 
AuthorDate: Thu Nov 22 15:30:58 2018 +0200
Commit: Noel Grandin 
CommitDate: Sat Nov 24 16:50:11 2018 +0100

remove ScVbaControlObjectBase::ListenerType enum

we only use one value from it

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

diff --git a/compilerplugins/clang/unusedenumconstants.readonly.results 
b/compilerplugins/clang/unusedenumconstants.readonly.results
index 8e28a282002a..8b78a97df024 100644
--- a/compilerplugins/clang/unusedenumconstants.readonly.results
+++ b/compilerplugins/clang/unusedenumconstants.readonly.results
@@ -1194,14 +1194,6 @@ sc/source/ui/unoobj/condformatuno.cxx:274
 enum (anonymous namespace)::DateProperties Date_StyleName
 sc/source/ui/unoobj/condformatuno.cxx:275
 enum (anonymous namespace)::DateProperties DateType
-sc/source/ui/vba/vbasheetobject.hxx:140
-enum ScVbaControlObjectBase::ListenerType LISTENER_MOUSE
-sc/source/ui/vba/vbasheetobject.hxx:141
-enum ScVbaControlObjectBase::ListenerType LISTENER_TEXT
-sc/source/ui/vba/vbasheetobject.hxx:142
-enum ScVbaControlObjectBase::ListenerType LISTENER_VALUE
-sc/source/ui/vba/vbasheetobject.hxx:143
-enum ScVbaControlObjectBase::ListenerType LISTENER_CHANGE
 scaddins/source/datefunc/datefunc.hxx:41
 enum ScaCategory Finance
 scaddins/source/datefunc/datefunc.hxx:42
diff --git a/sc/source/ui/vba/vbasheetobject.cxx 
b/sc/source/ui/vba/vbasheetobject.cxx
index 9e5b7856d6c4..80f9d3249e57 100644
--- a/sc/source/ui/vba/vbasheetobject.cxx
+++ b/sc/source/ui/vba/vbasheetobject.cxx
@@ -36,6 +36,10 @@
 using namespace ::com::sun::star;
 using namespace ::ooo::vba;
 
+constexpr OUStringLiteral gaListenerType = "XActionListener";
+constexpr OUStringLiteral gaEventMethod = "actionPerformed";
+
+
 ScVbaButtonCharacters::ScVbaButtonCharacters(
 const uno::Reference< XHelperInterface >& rxParent,
 const uno::Reference< uno::XComponentContext >& rxContext,
@@ -292,37 +296,11 @@ ScVbaControlObjectBase::ScVbaControlObjectBase(
 const uno::Reference< uno::XComponentContext >& rxContext,
 const uno::Reference< frame::XModel >& rxModel,
 const uno::Reference< container::XIndexContainer >& rxFormIC,
-const uno::Reference< drawing::XControlShape >& rxControlShape,
-ListenerType eListenerType ) :
+const uno::Reference< drawing::XControlShape >& rxControlShape ) :
 ScVbaControlObject_BASE( rxParent, rxContext, rxModel, uno::Reference< 
drawing::XShape >( rxControlShape, uno::UNO_QUERY_THROW ) ),
 mxFormIC( rxFormIC, uno::UNO_SET_THROW ),
 mxControlProps( rxControlShape->getControl(), uno::UNO_QUERY_THROW )
 {
-// set listener and event name to be used for OnAction attribute
-switch( eListenerType )
-{
-case LISTENER_ACTION:
-maListenerType = "XActionListener";
-maEventMethod = "actionPerformed";
-break;
-case LISTENER_MOUSE:
-maListenerType = "XMouseListener";
-maEventMethod = "mouseReleased";
-break;
-case LISTENER_TEXT:
-maListenerType = "XTextListener";
-maEventMethod = "textChanged";
-break;
-case LISTENER_VALUE:
-maListenerType = "XAdjustmentListener";
-maEventMethod = "adjustmentValueChanged";
-break;
-case LISTENER_CHANGE:
-maListenerType = "XChangeListener";
-maEventMethod = "changed";
-break;
-// no default, to let the compiler complain about missing case
-}
 }
 
 // XSheetObject attributes
@@ -348,7 +326,7 @@ OUString SAL_CALL ScVbaControlObjectBase::getOnAction()
 const script::ScriptEventDescriptor* pEventEnd = pEvent + 
aEvents.getLength();
 const OUString aScriptType = "Script";
 for( ; pEvent < pEventEnd; ++pEvent )
-if( (pEvent->ListenerType == maListenerType) && 
(pEvent->EventMethod == maEventMethod) && (pEvent->ScriptType == aScriptType) )
+if( (pEvent->ListenerType == gaListenerType) && 
(pEvent->EventMethod == gaEventMethod) && (pEvent->ScriptType == aScriptType) )
 return extractMacroName( pEvent->ScriptCode );
 }
 return OUString();
@@ -360,7 +338,7 @@ void SAL_CALL ScVbaControlObjectBase::setOnAction( const 
OUString& rMacroName )

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

2018-11-24 Thread Libreoffice Gerrit user
 compilerplugins/clang/unusedenumconstants.readonly.results |4 
 svx/inc/galbrws2.hxx   |5 ++---
 svx/source/gallery2/galbrws2.cxx   |   10 ++
 svx/source/gallery2/galctrl.cxx|8 
 sw/inc/IDocumentRedlineAccess.hxx  |5 +
 sw/source/core/doc/DocumentRedlineManager.cxx  |3 +--
 sw/source/core/doc/docredln.cxx|9 -
 7 files changed, 10 insertions(+), 34 deletions(-)

New commits:
commit 5a291af9969aa6e17a9827e7f6f6b12c7bebcc50
Author: Noel Grandin 
AuthorDate: Thu Nov 22 15:00:07 2018 +0200
Commit: Noel Grandin 
CommitDate: Sat Nov 24 13:23:12 2018 +0100

remove unused GalleryItemFlags::ThemeName

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

diff --git a/compilerplugins/clang/unusedenumconstants.readonly.results 
b/compilerplugins/clang/unusedenumconstants.readonly.results
index b82df1554c25..f980ab852405 100644
--- a/compilerplugins/clang/unusedenumconstants.readonly.results
+++ b/compilerplugins/clang/unusedenumconstants.readonly.results
@@ -1296,8 +1296,6 @@ svl/source/numbers/zformat.cxx:386
 enum BracketFormatSymbolType BRACKET_SYMBOLTYPE_NATNUM19
 svtools/source/contnr/fileview.cxx:110
 enum FileViewFlags SHOW_ONLYTITLE
-svx/inc/galbrws2.hxx:53
-enum GalleryItemFlags ThemeName
 svx/source/inc/docrecovery.hxx:85
 enum EDocStates TryLoadBackup
 svx/source/inc/docrecovery.hxx:86
diff --git a/svx/inc/galbrws2.hxx b/svx/inc/galbrws2.hxx
index 02394d5114bc..196ff7dfad6f 100644
--- a/svx/inc/galbrws2.hxx
+++ b/svx/inc/galbrws2.hxx
@@ -50,13 +50,12 @@ enum class GalleryBrowserTravel
 };
 
 enum class GalleryItemFlags {
-ThemeName  = 0x0001,
 Title  = 0x0002,
 Path   = 0x0004
 };
 namespace o3tl
 {
-template<> struct typed_flags : 
is_typed_flags {};
+template<> struct typed_flags : 
is_typed_flags {};
 }
 
 
@@ -132,7 +131,7 @@ private:
 
 public:
 
-static OUString GetItemText( const GalleryTheme& rTheme, const 
SgaObject& rObj, GalleryItemFlags nItemTextFlags );
+static OUString GetItemText( const SgaObject& rObj, GalleryItemFlags 
nItemTextFlags );
 
 public:
 
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx
index dd19615bb66f..1e89c6cc4801 100644
--- a/svx/source/gallery2/galbrws2.cxx
+++ b/svx/source/gallery2/galbrws2.cxx
@@ -1115,7 +1115,7 @@ void GalleryBrowser2::Execute(const OString )
 
 if( pObj )
 {
-const OUString  aOldTitle( GetItemText( *mpCurTheme, *pObj, 
GalleryItemFlags::Title ) );
+const OUString  aOldTitle( GetItemText( *pObj, 
GalleryItemFlags::Title ) );
 
 SvxAbstractDialogFactory* pFact = 
SvxAbstractDialogFactory::Create();
 ScopedVclPtr 
aDlg(pFact->CreateTitleDialog(GetFrameWeld(), aOldTitle));
@@ -1162,18 +1162,12 @@ void GalleryBrowser2::Execute(const OString )
 }
 }
 
-OUString GalleryBrowser2::GetItemText( const GalleryTheme& rTheme, const 
SgaObject& rObj, GalleryItemFlags nItemTextFlags )
+OUString GalleryBrowser2::GetItemText( const SgaObject& rObj, GalleryItemFlags 
nItemTextFlags )
 {
 OUString  aRet;
 
 const INetURLObject& aURL(rObj.GetURL());
 
-if( nItemTextFlags & GalleryItemFlags::ThemeName )
-{
-aRet += rTheme.GetName();
-aRet += " - ";
-}
-
 if( nItemTextFlags & GalleryItemFlags::Title )
 {
 OUString aTitle( rObj.GetTitle() );
diff --git a/svx/source/gallery2/galctrl.cxx b/svx/source/gallery2/galctrl.cxx
index 1a95c134bedb..af00c3fd15e0 100644
--- a/svx/source/gallery2/galctrl.cxx
+++ b/svx/source/gallery2/galctrl.cxx
@@ -335,7 +335,7 @@ void GalleryIconView::UserDraw(const UserDrawEvent& rUDEvt)
 if(pObj)
 {
 aBitmapEx = pObj->createPreviewBitmapEx(aSize);
-aItemTextTitle = GalleryBrowser2::GetItemText(*mpTheme, *pObj, 
GalleryItemFlags::Title);
+aItemTextTitle = GalleryBrowser2::GetItemText(*pObj, 
GalleryItemFlags::Title);
 
 mpTheme->SetPreviewBitmapExAndStrings(nId - 1, aBitmapEx, aSize, 
aItemTextTitle, aItemTextPath);
 }
@@ -451,7 +451,7 @@ OUString GalleryListView::GetCellText(long _nRow, 
sal_uInt16 /*nColumnId*/) cons
 
 if( pObj )
 {
-sRet = GalleryBrowser2::GetItemText( *mpTheme, *pObj, 
GalleryItemFlags::Title );
+sRet = GalleryBrowser2::GetItemText( *pObj, 
GalleryItemFlags::Title );
 }
 }
 
@@ -515,8 +515,8 @@ void GalleryListView::PaintField(vcl::RenderContext& rDev, 
const tools::Rectangl
 if(pObj)
 {
 aBitmapEx = pObj->createPreviewBitmapEx(aSize);
-aItemTextTitle = 

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

2018-11-24 Thread Libreoffice Gerrit user
 compilerplugins/clang/unusedenumconstants.readonly.results |6 
 sw/inc/tblenum.hxx |6 
 sw/source/core/doc/tblrwcl.cxx | 1535 +
 sw/source/core/docnode/ndtbl.cxx   |5 
 sw/source/core/frmedt/fetab.cxx|   86 
 sw/source/core/inc/dbg_lay.hxx |4 
 sw/source/core/layout/dbg_lay.cxx  |3 
 7 files changed, 202 insertions(+), 1443 deletions(-)

New commits:
commit dcda5569c41b33077a1795d1e147572a2d483d04
Author: Noel Grandin 
AuthorDate: Thu Nov 22 14:09:27 2018 +0200
Commit: Noel Grandin 
CommitDate: Sat Nov 24 12:38:31 2018 +0100

remove unused TableChgWidthHeightType::InsertDeleteMode

looks like as a consequence of
commit 2d5ce0e1b233c83f91481cd6b9306ac8de7f5ff8
Date:   Mon Mar 26 13:08:54 2018 +0200
tdf#116452 Remove "3 seconds to add/delete col/row" functions

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

diff --git a/compilerplugins/clang/unusedenumconstants.readonly.results 
b/compilerplugins/clang/unusedenumconstants.readonly.results
index 8bd1747a6358..65e40e4cb73c 100644
--- a/compilerplugins/clang/unusedenumconstants.readonly.results
+++ b/compilerplugins/clang/unusedenumconstants.readonly.results
@@ -1442,8 +1442,6 @@ sw/inc/poolfmt.hxx:422
 enum RES_POOL_COLLFMT_TYPE RES_POOLCOLL_DOC_TITEL
 sw/inc/reffld.hxx:38
 enum REFERENCESUBTYPE REF_OUTLINE
-sw/inc/tblenum.hxx:37
-enum TableChgWidthHeightType InsertDeleteMode
 sw/inc/undobj.hxx:134
 enum DelContentType Fly
 sw/inc/undobj.hxx:135
diff --git a/sw/inc/tblenum.hxx b/sw/inc/tblenum.hxx
index dd0504f80016..fd9ea7237fa7 100644
--- a/sw/inc/tblenum.hxx
+++ b/sw/inc/tblenum.hxx
@@ -34,14 +34,10 @@ enum class TableChgWidthHeightType : sal_uInt16
 InvalidPos   = 0x0f,
 
 // The following can be "or"ed in.
-InsertDeleteMode = 0x4000, // Insert/Del-mode: the Bigger-Flag
-   // tells what happens:
-   // bBigger -> box gets removed.
-   // !bBigger-> box gets inserted.
 BiggerMode   = 0x8000, // Box becomes larger -> else smaller.
 };
 namespace o3tl {
-template<> struct typed_flags : 
is_typed_flags {};
+template<> struct typed_flags : 
is_typed_flags {};
 }
 constexpr TableChgWidthHeightType extractPosition(TableChgWidthHeightType e) {
 return static_cast(static_cast(e) & 
0xf);
diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index 5b17b345666f..01af5d1d4d66 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -128,12 +128,6 @@ struct CR_SetBoxWidth
 {
 }
 
-std::unique_ptr CreateUndo( SwUndoId eUndoType )
-{
-pUndo = new SwUndoTableNdsChg( eUndoType, m_Boxes, *pTableNd );
-return std::unique_ptr(pUndo);
-}
-
 void LoopClear()
 {
 nLowerDiff = 0; nRemainWidth = 0;
@@ -144,14 +138,6 @@ static bool lcl_SetSelBoxWidth( SwTableLine* pLine, 
CR_SetBoxWidth& rParam,
  SwTwips nDist, bool bCheck );
 static bool lcl_SetOtherBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
 SwTwips nDist, bool bCheck );
-static bool lcl_InsSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
-SwTwips nDist, bool bCheck );
-static bool lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
-SwTwips nDist, bool bCheck );
-static bool lcl_DelSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
-SwTwips nDist, bool bCheck );
-static bool lcl_DelOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
-SwTwips nDist, bool bCheck );
 
 typedef bool (*FN_lcl_SetBoxWidth)(SwTableLine*, CR_SetBoxWidth&, SwTwips, 
bool );
 
@@ -204,8 +190,6 @@ struct CR_SetLineHeight
 {
 bTop = TableChgWidthHeightType::CellTop == extractPosition( eType );
 bBigger = bool(eType & TableChgWidthHeightType::BiggerMode );
-if( eType & TableChgWidthHeightType::InsertDeleteMode )
-bBigger = !bBigger;
 nMode = pTableNd->GetTable().GetTableChgMode();
 }
 CR_SetLineHeight( const CR_SetLineHeight& rCpy )
@@ -214,20 +198,12 @@ struct CR_SetLineHeight
 nMode( rCpy.nMode ),
 bBigger( rCpy.bBigger ), bTop( rCpy.bTop )
 {}
-
-std::unique_ptr CreateUndo( SwUndoId nUndoType )
-{
-pUndo = new SwUndoTableNdsChg( nUndoType, m_Boxes, *pTableNd );
-return std::unique_ptr(pUndo);
-}
 };
 
 static bool lcl_SetSelLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam,
  SwTwips nDist, bool bCheck );
 static 

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

2018-11-24 Thread Libreoffice Gerrit user
 compilerplugins/clang/unusedenumconstants.readonly.results |8 
 sw/source/filter/html/css1atr.cxx  |   12 
 sw/source/uibase/inc/numberingtypelistbox.hxx  |7 ++-
 sw/source/uibase/misc/numberingtypelistbox.cxx |6 +++---
 4 files changed, 9 insertions(+), 24 deletions(-)

New commits:
commit 0742d5d3ec630c5237eb2bee28d926fb90bef706
Author: Noel Grandin 
AuthorDate: Thu Nov 22 13:04:04 2018 +0200
Commit: Noel Grandin 
CommitDate: Sat Nov 24 11:19:10 2018 +0100

remove unused VarHeight from Css1FrameSize

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

diff --git a/compilerplugins/clang/unusedenumconstants.readonly.results 
b/compilerplugins/clang/unusedenumconstants.readonly.results
index 7f1b510b2bcc..74a84edad117 100644
--- a/compilerplugins/clang/unusedenumconstants.readonly.results
+++ b/compilerplugins/clang/unusedenumconstants.readonly.results
@@ -1476,8 +1476,6 @@ sw/source/core/unocore/unosett.cxx:1580
 enum (anonymous at 
/home/noel/libo2/sw/source/core/unocore/unosett.cxx:1577:5) InChapterFirst
 sw/source/core/unocore/unosett.cxx:1581
 enum (anonymous at 
/home/noel/libo2/sw/source/core/unocore/unosett.cxx:1577:5) InChapterLast
-sw/source/filter/html/css1atr.cxx:114
-enum Css1FrameSize VarHeight
 sw/source/filter/html/css1atr.cxx:117
 enum Css1FrameSize AnyHeight
 sw/source/filter/ww8/ww8scan.hxx:604
diff --git a/sw/source/filter/html/css1atr.cxx 
b/sw/source/filter/html/css1atr.cxx
index 630f3d611221..09302c33651a 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -111,14 +111,13 @@ enum class Css1Background {
 enum class Css1FrameSize {
 NONE   = 0x00,
 Width  = 0x01,
-VarHeight  = 0x02,
-MinHeight  = 0x04,
-FixHeight  = 0x08,
-AnyHeight  = 0x0e,
+MinHeight  = 0x02,
+FixHeight  = 0x04,
+AnyHeight  = 0x06,
 Pixel  = 0x10,
 };
 namespace o3tl {
-template<> struct typed_flags : 
is_typed_flags {};
+template<> struct typed_flags : 
is_typed_flags {};
 }
 
 #define DOT_LEADERS_MAX_WIDTH   18
@@ -2884,9 +2883,6 @@ static Writer& OutCSS1_SwFormatFrameSize( Writer& rWrt, 
const SfxPoolItem& rHt,
 case ATT_MIN_SIZE:
 bOutHeight = bool(nMode & Css1FrameSize::MinHeight);
 break;
-case ATT_VAR_SIZE:
-bOutHeight = bool(nMode & Css1FrameSize::VarHeight);
-break;
 default:
 OSL_ENSURE( bOutHeight, "Height will not be exported" );
 break;
commit 6b8cd04144cbafd32450e9ab98a7b25d816cf6e2
Author: Noel Grandin 
AuthorDate: Thu Nov 22 12:56:56 2018 +0200
Commit: Noel Grandin 
CommitDate: Sat Nov 24 11:19:04 2018 +0100

remove unused SwInsertNumTypes

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

diff --git a/compilerplugins/clang/unusedenumconstants.readonly.results 
b/compilerplugins/clang/unusedenumconstants.readonly.results
index 46d07937c843..7f1b510b2bcc 100644
--- a/compilerplugins/clang/unusedenumconstants.readonly.results
+++ b/compilerplugins/clang/unusedenumconstants.readonly.results
@@ -1490,12 +1490,6 @@ sw/source/uibase/inc/envimg.hxx:33
 enum SwEnvAlign ENV_VER_LEFT
 sw/source/uibase/inc/envimg.hxx:34
 enum SwEnvAlign ENV_VER_CNTR
-sw/source/uibase/inc/numberingtypelistbox.hxx:32
-enum SwInsertNumTypes PageStyleNumbering
-sw/source/uibase/inc/numberingtypelistbox.hxx:33
-enum SwInsertNumTypes Bitmap
-sw/source/uibase/inc/numberingtypelistbox.hxx:34
-enum SwInsertNumTypes Bullet
 tools/source/generic/poly.cxx:1122
 enum (anonymous at /home/noel/libo2/tools/source/generic/poly.cxx:1122:5) 
maxRecursionDepth
 ucbhelper/source/client/proxydecider.cxx:119
diff --git a/sw/source/uibase/inc/numberingtypelistbox.hxx 
b/sw/source/uibase/inc/numberingtypelistbox.hxx
index 6ceec6355c2a..593185708d9c 100644
--- a/sw/source/uibase/inc/numberingtypelistbox.hxx
+++ b/sw/source/uibase/inc/numberingtypelistbox.hxx
@@ -29,14 +29,11 @@
 enum class SwInsertNumTypes
 {
 NoNumbering  = 0x01,
-PageStyleNumbering   = 0x02,
-Bitmap   = 0x04,
-Bullet   = 0x08,
-Extended = 0x10
+Extended = 0x02
 };
 
 namespace o3tl {
-   template<> struct typed_flags : 
is_typed_flags {};
+   template<> struct typed_flags : 
is_typed_flags {};
 };
 
 struct SwNumberingTypeListBox_Impl;
diff --git a/sw/source/uibase/misc/numberingtypelistbox.cxx 
b/sw/source/uibase/misc/numberingtypelistbox.cxx
index f51f735822e6..83aa07940e71 100644
--- a/sw/source/uibase/misc/numberingtypelistbox.cxx
+++ b/sw/source/uibase/misc/numberingtypelistbox.cxx
@@ -79,15 +79,15 @@ void 

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

2018-11-24 Thread Libreoffice Gerrit user
 compilerplugins/clang/unusedenumconstants.readonly.results |   14 -
 uui/source/logindlg.cxx|   13 
 uui/source/logindlg.hxx|4 ---
 writerfilter/source/dmapper/PropertyIds.cxx|5 
 writerfilter/source/dmapper/PropertyIds.hxx|9 +---
 5 files changed, 4 insertions(+), 41 deletions(-)

New commits:
commit 9fe4d2225c22e6583043c6cf6c723432e3f4b19e
Author: Noel Grandin 
AuthorDate: Thu Nov 22 12:53:21 2018 +0200
Commit: Noel Grandin 
CommitDate: Sat Nov 24 11:18:53 2018 +0100

remove unused LoginFlags values

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

diff --git a/compilerplugins/clang/unusedenumconstants.readonly.results 
b/compilerplugins/clang/unusedenumconstants.readonly.results
index 563b3841417f..46d07937c843 100644
--- a/compilerplugins/clang/unusedenumconstants.readonly.results
+++ b/compilerplugins/clang/unusedenumconstants.readonly.results
@@ -1500,10 +1500,6 @@ tools/source/generic/poly.cxx:1122
 enum (anonymous at /home/noel/libo2/tools/source/generic/poly.cxx:1122:5) 
maxRecursionDepth
 ucbhelper/source/client/proxydecider.cxx:119
 enum ucbhelper::proxydecider_impl::InternetProxyDecider_Impl::ProxyType 
Automatic
-uui/source/logindlg.hxx:29
-enum LoginFlags NoUsername
-uui/source/logindlg.hxx:30
-enum LoginFlags NoPassword
 vcl/inc/fontsubset.hxx:41
 enum FontType ANY_TYPE1
 vcl/inc/salptype.hxx:45
diff --git a/uui/source/logindlg.cxx b/uui/source/logindlg.cxx
index 3f315bcc0f6a..bf9c39bf5436 100644
--- a/uui/source/logindlg.cxx
+++ b/uui/source/logindlg.cxx
@@ -45,22 +45,11 @@ void LoginDialog::SetPassword( const OUString& rNew )
 
 void LoginDialog::HideControls_Impl( LoginFlags nFlags )
 {
-if ( nFlags & LoginFlags::NoUsername )
-{
-m_xNameFT->hide();
-m_xNameED->hide();
-}
-else if ( nFlags & LoginFlags::UsernameReadonly )
+if ( nFlags & LoginFlags::UsernameReadonly )
 {
 m_xNameED->set_sensitive( false );
 }
 
-if ( nFlags & LoginFlags::NoPassword )
-{
-m_xPasswordFT->hide();
-m_xPasswordED->hide();
-}
-
 if ( nFlags & LoginFlags::NoSavePassword )
 m_xSavePasswdBtn->hide();
 
diff --git a/uui/source/logindlg.hxx b/uui/source/logindlg.hxx
index adfa31246e77..1c1fc39cd1fe 100644
--- a/uui/source/logindlg.hxx
+++ b/uui/source/logindlg.hxx
@@ -26,8 +26,6 @@
 
 enum class LoginFlags {
 NONE= 0x,
-NoUsername  = 0x0002,  // hide "name"
-NoPassword  = 0x0004,  // hide "password"
 NoSavePassword  = 0x0008,  // hide "save password"
 NoErrorText = 0x0010,  // hide message
 UsernameReadonly= 0x0040,  // "name" readonly
@@ -35,7 +33,7 @@ enum class LoginFlags {
 NoUseSysCreds   = 0x0100,  // hide "use system credentials"
 };
 namespace o3tl {
-template<> struct typed_flags : is_typed_flags {};
+template<> struct typed_flags : is_typed_flags {};
 }
 
 
commit 8f4ffbecee417fc7f3ed8fe2c62f9fdbdcc85634
Author: Noel Grandin 
AuthorDate: Thu Nov 22 12:48:59 2018 +0200
Commit: Noel Grandin 
CommitDate: Sat Nov 24 11:18:45 2018 +0100

remove unused PropertyIds values

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

diff --git a/compilerplugins/clang/unusedenumconstants.readonly.results 
b/compilerplugins/clang/unusedenumconstants.readonly.results
index f92ea5feb9c0..563b3841417f 100644
--- a/compilerplugins/clang/unusedenumconstants.readonly.results
+++ b/compilerplugins/clang/unusedenumconstants.readonly.results
@@ -1512,16 +1512,6 @@ vcl/source/gdi/CommonSalLayout.cxx:128
 enum (anonymous namespace)::VerticalOrientation Upright
 vcl/source/gdi/CommonSalLayout.cxx:131
 enum (anonymous namespace)::VerticalOrientation TransformedRotated
-writerfilter/source/dmapper/PropertyIds.hxx:134
-enum writerfilter::dmapper::PropertyIds PROP_GAMMA
-writerfilter/source/dmapper/PropertyIds.hxx:157
-enum writerfilter::dmapper::PropertyIds PROP_HORI_MIRRORED_ON_EVEN_PAGES
-writerfilter/source/dmapper/PropertyIds.hxx:158
-enum writerfilter::dmapper::PropertyIds PROP_HORI_MIRRORED_ON_ODD_PAGES
-writerfilter/source/dmapper/PropertyIds.hxx:222
-enum writerfilter::dmapper::PropertyIds PROP_PRINTER_PAPER_TRAY_INDEX
-writerfilter/source/dmapper/PropertyIds.hxx:274
-enum writerfilter::dmapper::PropertyIds PROP_VERT_MIRRORED
 writerfilter/source/ooxml/OOXMLFactory.hxx:39
 enum writerfilter::ooxml::ResourceType List
 writerfilter/source/ooxml/OOXMLFactory.hxx:40
diff --git a/writerfilter/source/dmapper/PropertyIds.cxx 
b/writerfilter/source/dmapper/PropertyIds.cxx
index d8b99ada629e..0842f9554b99 

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang filter/source include/canvas

2018-11-23 Thread Libreoffice Gerrit user
 compilerplugins/clang/unusedenumconstants.untouched.results |   34 
 filter/source/graphicfilter/idxf/dxf2mtf.hxx|4 -
 filter/source/graphicfilter/ipict/ipict.cxx |2 
 filter/source/msfilter/eschesdo.hxx |2 
 include/canvas/spriteredrawmanager.hxx  |2 
 5 files changed, 2 insertions(+), 42 deletions(-)

New commits:
commit f359f87d5f56c0d5905a8852cebe8b95bd47d9f3
Author: Noel Grandin 
AuthorDate: Thu Nov 22 11:04:36 2018 +0200
Commit: Noel Grandin 
CommitDate: Sat Nov 24 07:05:39 2018 +0100

remove some unused enums in filter

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

diff --git a/compilerplugins/clang/unusedenumconstants.untouched.results 
b/compilerplugins/clang/unusedenumconstants.untouched.results
index 6daa7bc07636..11c0bae17d1f 100644
--- a/compilerplugins/clang/unusedenumconstants.untouched.results
+++ b/compilerplugins/clang/unusedenumconstants.untouched.results
@@ -100,38 +100,6 @@ drawinglayer/source/tools/emfpbrush.hxx:83
 enum emfplushelper::EmfPlusHatchStyle HatchStyleSolidDiamond
 drawinglayer/source/tools/emfpimage.hxx:31
 emfplushelper::ImageDataType ImageDataTypeUnknown
-filter/source/graphicfilter/idxf/dxf2mtf.hxx:28
-enum BrushStyle BRUSH_NULL
-filter/source/graphicfilter/idxf/dxf2mtf.hxx:28
-enum BrushStyle BRUSH_HORZ
-filter/source/graphicfilter/idxf/dxf2mtf.hxx:28
-enum BrushStyle BRUSH_VERT
-filter/source/graphicfilter/idxf/dxf2mtf.hxx:28
-enum BrushStyle BRUSH_SOLID
-filter/source/graphicfilter/idxf/dxf2mtf.hxx:29
-enum BrushStyle BRUSH_CROSS
-filter/source/graphicfilter/idxf/dxf2mtf.hxx:29
-enum BrushStyle BRUSH_DIAGCROSS
-filter/source/graphicfilter/idxf/dxf2mtf.hxx:29
-enum BrushStyle BRUSH_DOWNDIAG
-filter/source/graphicfilter/idxf/dxf2mtf.hxx:29
-enum BrushStyle BRUSH_UPDIAG
-filter/source/graphicfilter/idxf/dxf2mtf.hxx:30
-enum BrushStyle BRUSH_75
-filter/source/graphicfilter/idxf/dxf2mtf.hxx:30
-enum BrushStyle BRUSH_25
-filter/source/graphicfilter/idxf/dxf2mtf.hxx:30
-enum BrushStyle BRUSH_50
-filter/source/graphicfilter/ipict/ipict.cxx:71
-enum PictReaderInternal::Pattern::BrushStyle BRUSH_NULL
-filter/source/msfilter/eschesdo.hxx:29
-enum ImplEESdrPageType NORMAL
-filter/source/msfilter/eschesdo.hxx:29
-enum ImplEESdrPageType UNDEFINED
-filter/source/msfilter/eschesdo.hxx:29
-enum ImplEESdrPageType NOTICE
-filter/source/msfilter/eschesdo.hxx:29
-enum ImplEESdrPageType MASTER
 include/connectivity/dbtools.hxx:822
 enum connectivity::dbase::DBFType dBaseIVMemo
 include/desktop/exithelper.h:25
diff --git a/filter/source/graphicfilter/idxf/dxf2mtf.hxx 
b/filter/source/graphicfilter/idxf/dxf2mtf.hxx
index ba5cc3ac84c5..e510c3e16789 100644
--- a/filter/source/graphicfilter/idxf/dxf2mtf.hxx
+++ b/filter/source/graphicfilter/idxf/dxf2mtf.hxx
@@ -25,10 +25,6 @@
 #include 
 
 enum PenStyle { PEN_NULL, PEN_SOLID, PEN_DOT, PEN_DASH, PEN_DASHDOT };
-enum BrushStyle { BRUSH_NULL, BRUSH_SOLID, BRUSH_HORZ, BRUSH_VERT,
-  BRUSH_CROSS, BRUSH_DIAGCROSS, BRUSH_UPDIAG, BRUSH_DOWNDIAG,
-  BRUSH_25, BRUSH_50, BRUSH_75 };
-
 
 class DXF2GDIMetaFile {
 private:
diff --git a/filter/source/graphicfilter/ipict/ipict.cxx 
b/filter/source/graphicfilter/ipict/ipict.cxx
index afe4236071be..5f88c398e975 100644
--- a/filter/source/graphicfilter/ipict/ipict.cxx
+++ b/filter/source/graphicfilter/ipict/ipict.cxx
@@ -68,7 +68,7 @@ namespace PictReaderInternal {
 bool isDefault() const { return !isRead; }
 
 enum PenStyle { PEN_NULL, PEN_SOLID, PEN_DOT, PEN_DASH, PEN_DASHDOT };
-enum BrushStyle { BRUSH_NULL, BRUSH_SOLID, BRUSH_HORZ, BRUSH_VERT,
+enum BrushStyle { BRUSH_SOLID, BRUSH_HORZ, BRUSH_VERT,
   BRUSH_CROSS, BRUSH_DIAGCROSS, BRUSH_UPDIAG, BRUSH_DOWNDIAG,
   BRUSH_25, BRUSH_50, BRUSH_75 };
 // Data
diff --git a/filter/source/msfilter/eschesdo.hxx 
b/filter/source/msfilter/eschesdo.hxx
index 537e78aa5761..4602a320b557 100644
--- a/filter/source/msfilter/eschesdo.hxx
+++ b/filter/source/msfilter/eschesdo.hxx
@@ -26,8 +26,6 @@
 
 // fractions of Draw PPTWriter etc.
 
-enum ImplEESdrPageType { NORMAL = 0, MASTER = 1, NOTICE = 2, UNDEFINED = 3 };
-
 class ImplEESdrWriter;
 class SdrObject;
 class SdrPage;
commit cfb09a460d236861c88380cbf6d5ebbf5c84cf71
Author: Noel Grandin 
AuthorDate: Thu Nov 22 11:01:26 2018 +0200
Commit: Noel Grandin 
CommitDate: Sat Nov 24 07:05:29 2018 +0100

remove unused SpriteChangeRecord::ChangeType::none

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

diff --git a/compilerplugins/clang/unusedenumconstants.untouched.results 

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang include/desktop include/editeng

2018-11-23 Thread Libreoffice Gerrit user
 compilerplugins/clang/unusedenumconstants.untouched.results |6 --
 include/desktop/exithelper.h|2 --
 include/editeng/editdata.hxx|2 +-
 3 files changed, 1 insertion(+), 9 deletions(-)

New commits:
commit a78118a94efb8a13be368f73fae3f567a2d2e1e4
Author: Noel Grandin 
AuthorDate: Thu Nov 22 10:59:28 2018 +0200
Commit: Noel Grandin 
CommitDate: Sat Nov 24 07:05:03 2018 +0100

remove unused EXITHELPER_SECOND_OFFICE

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

diff --git a/compilerplugins/clang/unusedenumconstants.untouched.results 
b/compilerplugins/clang/unusedenumconstants.untouched.results
index 2bdb2a97c26f..eee40dba2f0a 100644
--- a/compilerplugins/clang/unusedenumconstants.untouched.results
+++ b/compilerplugins/clang/unusedenumconstants.untouched.results
@@ -140,10 +140,6 @@ include/desktop/exithelper.h:25
 enum EExitCodes EXITHELPER_NO_ERROR
 include/desktop/exithelper.h:25
 int EXITHELPER_NO_ERROR
-include/desktop/exithelper.h:27
-int EXITHELPER_SECOND_OFFICE
-include/desktop/exithelper.h:27
-enum EExitCodes EXITHELPER_SECOND_OFFICE
 include/desktop/exithelper.h:29
 int EXITHELPER_FATAL_ERROR
 include/editeng/borderline.hxx:128
diff --git a/include/desktop/exithelper.h b/include/desktop/exithelper.h
index 76942393a4c8..4b81c68b895c 100644
--- a/include/desktop/exithelper.h
+++ b/include/desktop/exithelper.h
@@ -23,8 +23,6 @@
 enum EExitCodes {
 /* e.g. used to force showing of the command line help */
 EXITHELPER_NO_ERROR = 0,
-/* pipe was detected - second office must terminate itself */
-EXITHELPER_SECOND_OFFICE = 1,
 /* an uno exception was caught during startup */
 EXITHELPER_FATAL_ERROR = 77,
 /* user force automatic restart after crash */
commit 3ff1f462ea4b277b367048e52a068d877fe01c97
Author: Noel Grandin 
AuthorDate: Thu Nov 22 10:48:32 2018 +0200
Commit: Noel Grandin 
CommitDate: Sat Nov 24 07:04:53 2018 +0100

remove unused EESpellState::LanguageNotInstalled

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

diff --git a/compilerplugins/clang/unusedenumconstants.untouched.results 
b/compilerplugins/clang/unusedenumconstants.untouched.results
index 5504738812fe..2bdb2a97c26f 100644
--- a/compilerplugins/clang/unusedenumconstants.untouched.results
+++ b/compilerplugins/clang/unusedenumconstants.untouched.results
@@ -148,8 +148,6 @@ include/desktop/exithelper.h:29
 int EXITHELPER_FATAL_ERROR
 include/editeng/borderline.hxx:128
 enum SvxBorderLineStyle BORDER_LINE_STYLE_MAX
-include/editeng/editdata.hxx:41
-enum EESpellState LanguageNotInstalled
 include/i18nutil/transliteration.hxx:45
 enum TransliterationFlags NumToTextLower_zh_CN
 include/i18nutil/transliteration.hxx:47
diff --git a/include/editeng/editdata.hxx b/include/editeng/editdata.hxx
index 0b2e464ca015..d0517d1dc413 100644
--- a/include/editeng/editdata.hxx
+++ b/include/editeng/editdata.hxx
@@ -38,7 +38,7 @@ enum class EEHorizontalTextDirection { Default, L2R, R2L };
 enum class EESelectionMode  { Std, Hidden };
 // EESelectionMode::Hidden can be used to completely hide the selection. 
This is useful e.g. when you want show the selection
 // only as long as your window (which the edit view works on) has the focus
-enum class EESpellState  { Ok, LanguageNotInstalled, NoSpeller, ErrorFound };
+enum class EESpellState  { Ok, NoSpeller, ErrorFound };
 enum class EEAnchorMode {
 TopLeft, TopHCenter, TopRight,
 VCenterLeft, VCenterHCenter, VCenterRight,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-11-21 Thread Libreoffice Gerrit user
 compilerplugins/clang/unusedenumconstants.untouched.results |8 --
 sw/source/uibase/inc/wrtsh.hxx  |2 -
 sw/source/uibase/wrtsh/wrtsh2.cxx   |   14 ++--
 toolkit/source/controls/grid/defaultgriddatamodel.cxx   |2 -
 4 files changed, 8 insertions(+), 18 deletions(-)

New commits:
commit 49d074451c58932f4193169fabcc2256b49977f4
Author: Noel Grandin 
AuthorDate: Wed Nov 21 14:23:22 2018 +0200
Commit: Noel Grandin 
CommitDate: Thu Nov 22 07:36:10 2018 +0100

convert FieldDialogPressedButton to scoped enum

and removed unused EDIT

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

diff --git a/compilerplugins/clang/unusedenumconstants.untouched.results 
b/compilerplugins/clang/unusedenumconstants.untouched.results
index e2149c99eb2d..3697556b248a 100644
--- a/compilerplugins/clang/unusedenumconstants.untouched.results
+++ b/compilerplugins/clang/unusedenumconstants.untouched.results
@@ -512,8 +512,6 @@ sw/source/uibase/inc/tautofmt.hxx:36
 enum AutoFormatLine RIGHT_LINE
 sw/source/uibase/inc/tautofmt.hxx:36
 enum AutoFormatLine TOP_LINE
-sw/source/uibase/inc/wrtsh.hxx:365
-enum SwWrtShell::FieldDialogPressedButton BTN_EDIT
 sw/source/uibase/utlui/content.cxx:824
 enum STR_CONTEXT_IDX IDX_STR_LINK_REGION
 sw/source/uibase/utlui/content.cxx:825
diff --git a/sw/source/uibase/inc/wrtsh.hxx b/sw/source/uibase/inc/wrtsh.hxx
index 8e5717e5e045..6697fd01bd03 100644
--- a/sw/source/uibase/inc/wrtsh.hxx
+++ b/sw/source/uibase/inc/wrtsh.hxx
@@ -362,7 +362,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)();
 
 enum DoType { UNDO, REDO, REPEAT };
 
-enum FieldDialogPressedButton { BTN_NONE, BTN_EDIT, BTN_PREV, BTN_NEXT };
+enum class FieldDialogPressedButton { NONE, Previous, Next };
 
 voidDo( DoType eDoType, sal_uInt16 nCnt = 1 );
 OUString  GetDoString( DoType eDoType ) const;
diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx 
b/sw/source/uibase/wrtsh/wrtsh2.cxx
index 8d1707761ab6..bff262badbf3 100644
--- a/sw/source/uibase/wrtsh/wrtsh2.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh2.cxx
@@ -146,7 +146,7 @@ void SwWrtShell::UpdateInputFields( SwInputFieldList* pLst )
 bool bCancel = false;
 
 size_t nIndex = 0;
-FieldDialogPressedButton ePressedButton = BTN_NONE;
+FieldDialogPressedButton ePressedButton = 
FieldDialogPressedButton::NONE;
 
 SwField* pField = GetCurField();
 if (pField)
@@ -179,9 +179,9 @@ void SwWrtShell::UpdateInputFields( SwInputFieldList* pLst )
 // Otherwise update error at multi-selection:
 pTmp->GetField(nIndex)->GetTyp()->UpdateFields();
 
-if (ePressedButton == BTN_PREV && nIndex > 0)
+if (ePressedButton == FieldDialogPressedButton::Previous && 
nIndex > 0)
 nIndex--;
-else if (ePressedButton == BTN_NEXT && nIndex < nCnt - 1)
+else if (ePressedButton == FieldDialogPressedButton::Next && 
nIndex < nCnt - 1)
 nIndex++;
 else
 bCancel = true;
@@ -268,9 +268,9 @@ bool SwWrtShell::StartInputFieldDlg(SwField* pField, bool 
bPrevButton, bool bNex
 if (pPressedButton)
 {
 if (pDlg->PrevButtonPressed())
-*pPressedButton = BTN_PREV;
+*pPressedButton = FieldDialogPressedButton::Previous;
 else if (pDlg->NextButtonPressed())
-*pPressedButton = BTN_NEXT;
+*pPressedButton = FieldDialogPressedButton::Next;
 }
 
 pDlg.disposeAndClear();
@@ -288,9 +288,9 @@ bool SwWrtShell::StartDropDownFieldDlg(SwField* pField, 
bool bPrevButton, bool b
 if (pPressedButton)
 {
 if (pDlg->PrevButtonPressed())
-*pPressedButton = BTN_PREV;
+*pPressedButton = FieldDialogPressedButton::Previous;
 else if (pDlg->NextButtonPressed())
-*pPressedButton = BTN_NEXT;
+*pPressedButton = FieldDialogPressedButton::Next;
 }
 
 pDlg.disposeAndClear();
commit 54addc81ded0cc70a8e179b26141834e75be8e8e
Author: Noel Grandin 
AuthorDate: Wed Nov 21 13:59:06 2018 +0200
Commit: Noel Grandin 
CommitDate: Thu Nov 22 07:35:57 2018 +0100

remove unused broadcast_type enum

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

diff --git a/compilerplugins/clang/unusedenumconstants.untouched.results 
b/compilerplugins/clang/unusedenumconstants.untouched.results
index 4cd99c3ed3e9..e2149c99eb2d 100644
--- a/compilerplugins/clang/unusedenumconstants.untouched.results
+++ b/compilerplugins/clang/unusedenumconstants.untouched.results
@@ -526,12 +526,6 @@ sw/source/uibase/utlui/glbltree.cxx:147
 enum 

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang sc/source solenv/CompilerTest_compilerplugins_clang.mk

2018-11-05 Thread Libreoffice Gerrit user
 compilerplugins/clang/collapseif.cxx |  129 +++
 compilerplugins/clang/test/collapseif.cxx|   55 +++
 sc/source/filter/xml/xmlexprt.cxx|  110 ++-
 solenv/CompilerTest_compilerplugins_clang.mk |1 
 4 files changed, 236 insertions(+), 59 deletions(-)

New commits:
commit 4b363760b9f196e139ee367d54252c4d6cbe25f3
Author: Noel Grandin 
AuthorDate: Mon Nov 5 14:05:28 2018 +0200
Commit: Noel Grandin 
CommitDate: Tue Nov 6 07:45:56 2018 +0100

don't leave empty slots in array in ScXMLExport::GetViewSettings

the code was creating 4 entries in the array, but potentially not
putting anything there

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

diff --git a/sc/source/filter/xml/xmlexprt.cxx 
b/sc/source/filter/xml/xmlexprt.cxx
index 4532b06ee897..7c1649727880 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -5116,73 +5116,65 @@ void 
ScXMLExport::GetChangeTrackViewSettings(uno::Sequence
 sal_Int32 nChangePos(rProps.getLength());
 rProps.realloc(nChangePos + 1);
 beans::PropertyValue* pProps(rProps.getArray());
-if (pProps)
-{
-uno::Sequence 
aChangeProps(SC_VIEWCHANGES_COUNT);
-beans::PropertyValue* pChangeProps(aChangeProps.getArray());
-if (pChangeProps)
-{
-pChangeProps[SC_SHOW_CHANGES].Name = "ShowChanges";
-pChangeProps[SC_SHOW_CHANGES].Value <<= 
pViewSettings->ShowChanges();
-pChangeProps[SC_SHOW_ACCEPTED_CHANGES].Name = 
"ShowAcceptedChanges";
-pChangeProps[SC_SHOW_ACCEPTED_CHANGES].Value <<= 
pViewSettings->IsShowAccepted();
-pChangeProps[SC_SHOW_REJECTED_CHANGES].Name = 
"ShowRejectedChanges";
-pChangeProps[SC_SHOW_REJECTED_CHANGES].Value <<= 
pViewSettings->IsShowRejected();
-pChangeProps[SC_SHOW_CHANGES_BY_DATETIME].Name = 
"ShowChangesByDatetime";
-pChangeProps[SC_SHOW_CHANGES_BY_DATETIME].Value <<= 
pViewSettings->HasDate();
-pChangeProps[SC_SHOW_CHANGES_BY_DATETIME_MODE].Name = 
"ShowChangesByDatetimeMode";
-pChangeProps[SC_SHOW_CHANGES_BY_DATETIME_MODE].Value <<= 
static_cast(pViewSettings->GetTheDateMode());
-pChangeProps[SC_SHOW_CHANGES_BY_DATETIME_FIRST_DATETIME].Name 
= "ShowChangesByDatetimeFirstDatetime";
-pChangeProps[SC_SHOW_CHANGES_BY_DATETIME_FIRST_DATETIME].Value 
<<= pViewSettings->GetTheFirstDateTime().GetUNODateTime();
-pChangeProps[SC_SHOW_CHANGES_BY_DATETIME_SECOND_DATETIME].Name 
= "ShowChangesByDatetimeSecondDatetime";
-
pChangeProps[SC_SHOW_CHANGES_BY_DATETIME_SECOND_DATETIME].Value <<= 
pViewSettings->GetTheLastDateTime().GetUNODateTime();
-pChangeProps[SC_SHOW_CHANGES_BY_AUTHOR].Name = 
"ShowChangesByAuthor";
-pChangeProps[SC_SHOW_CHANGES_BY_AUTHOR].Value <<= 
pViewSettings->HasAuthor();
-pChangeProps[SC_SHOW_CHANGES_BY_AUTHOR_NAME].Name = 
"ShowChangesByAuthorName";
-pChangeProps[SC_SHOW_CHANGES_BY_AUTHOR_NAME].Value <<= 
pViewSettings->GetTheAuthorToShow();
-pChangeProps[SC_SHOW_CHANGES_BY_COMMENT].Name = 
"ShowChangesByComment";
-pChangeProps[SC_SHOW_CHANGES_BY_COMMENT].Value <<= 
pViewSettings->HasComment();
-pChangeProps[SC_SHOW_CHANGES_BY_COMMENT_TEXT].Name = 
"ShowChangesByCommentText";
-pChangeProps[SC_SHOW_CHANGES_BY_COMMENT_TEXT].Value <<= 
pViewSettings->GetTheComment();
-pChangeProps[SC_SHOW_CHANGES_BY_RANGES].Name = 
"ShowChangesByRanges";
-pChangeProps[SC_SHOW_CHANGES_BY_RANGES].Value <<= 
pViewSettings->HasRange();
-OUString sRangeList;
-ScRangeStringConverter::GetStringFromRangeList(sRangeList, 
&(pViewSettings->GetTheRangeList()), GetDocument(), FormulaGrammar::CONV_OOO);
-pChangeProps[SC_SHOW_CHANGES_BY_RANGES_LIST].Name = 
"ShowChangesByRangesList";
-pChangeProps[SC_SHOW_CHANGES_BY_RANGES_LIST].Value <<= 
sRangeList;
-
-pProps[nChangePos].Name = "TrackedChangesViewSettings";
-pProps[nChangePos].Value <<= aChangeProps;
-}
-}
+
+uno::Sequence aChangeProps(SC_VIEWCHANGES_COUNT);
+beans::PropertyValue* pChangeProps(aChangeProps.getArray());
+pChangeProps[SC_SHOW_CHANGES].Name = "ShowChanges";
+pChangeProps[SC_SHOW_CHANGES].Value <<= pViewSettings->ShowChanges();
+pChangeProps[SC_SHOW_ACCEPTED_CHANGES].Name = "ShowAcceptedChanges";
+pChangeProps[SC_SHOW_ACCEPTED_CHANGES].Value <<= 
pViewSettings->IsShowAccepted();
+pChangeProps[SC_SHOW_REJECTED_CHANGES].Name = 

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang i18npool/source include/svtools jvmfwk/plugins linguistic/source scripting/source sd/source sfx2/source svtools/source sw/inc sw/sourc

2018-10-22 Thread Libreoffice Gerrit user
 compilerplugins/clang/staticvar.cxx |7 
 compilerplugins/clang/unusedfields.cxx  |   17 
 compilerplugins/clang/unusedfields.only-used-in-constructor.results |   38 --
 compilerplugins/clang/unusedfields.readonly.results |   68 +--
 compilerplugins/clang/unusedfields.untouched.results|   68 ++-
 compilerplugins/clang/unusedfields.writeonly.results|  122 
++
 i18npool/source/inputchecker/inputsequencechecker.cxx   |2 
 i18npool/source/transliteration/transliterationImpl.cxx |2 
 include/svtools/ctrlbox.hxx |2 
 jvmfwk/plugins/sunmajor/pluginlib/vendorlist.hxx|4 
 linguistic/source/dlistimp.cxx  |2 
 scripting/source/basprov/basprov.cxx|2 
 scripting/source/dlgprov/dlgprov.cxx|2 
 sd/source/ui/animations/CustomAnimationDialog.cxx   |   64 +--
 sd/source/ui/animations/CustomAnimationDialog.hxx   |4 
 sfx2/source/appl/appdata.cxx|1 
 sfx2/source/control/bindings.cxx|2 
 sfx2/source/control/dispatch.cxx|4 
 sfx2/source/inc/appdata.hxx |1 
 svtools/source/control/ctrlbox.cxx  |5 
 sw/inc/cellatr.hxx  |5 
 sw/source/core/attr/cellatr.cxx |8 
 sw/source/uibase/envelp/labimg.cxx  |2 
 sw/source/uibase/inc/labimg.hxx |1 
 testtools/source/bridgetest/constructors.cxx|2 
 toolkit/source/awt/vclxtoolkit.cxx  |  178 
--
 toolkit/source/helper/vclunohelper.cxx  |8 
 tools/source/stream/strmunx.cxx |4 
 ucb/source/ucp/ext/ucpext_services.cxx  |2 
 unotools/source/config/lingucfg.cxx |4 
 unotools/source/misc/fontcvt.cxx|4 
 writerfilter/source/rtftok/rtfcharsets.cxx  |2 
 writerfilter/source/rtftok/rtfcharsets.hxx  |2 
 writerfilter/source/rtftok/rtfcontrolwords.cxx  |4 
 writerfilter/source/rtftok/rtfcontrolwords.hxx  |4 
 35 files changed, 367 insertions(+), 280 deletions(-)

New commits:
commit fd56d5fd409c832886bf42a020322e69b6a35d9e
Author: Noel Grandin 
AuthorDate: Mon Oct 22 10:08:13 2018 +0200
Commit: Noel Grandin 
CommitDate: Mon Oct 22 12:47:48 2018 +0200

loplugin:unusedfields improvemements

treat fields touched in operator== as not being important, which
finds some more stuff (but also adds some false+)

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

diff --git a/compilerplugins/clang/unusedfields.cxx 
b/compilerplugins/clang/unusedfields.cxx
index d11cfa7914cb..1e63ac19a3dd 100644
--- a/compilerplugins/clang/unusedfields.cxx
+++ b/compilerplugins/clang/unusedfields.cxx
@@ -393,6 +393,11 @@ bool UnusedFields::TraverseCXXMethodDecl(CXXMethodDecl* 
cxxMethodDecl)
 || cxxMethodDecl->isMoveAssignmentOperator()
 || (cxxMethodDecl->getIdentifier() && 
(cxxMethodDecl->getName().startswith("Clone") || 
cxxMethodDecl->getName().startswith("clone"
 insideMoveOrCopyOrCloneDeclParent = cxxMethodDecl->getParent();
+// these are similar in that they tend to simply enumerate all the 
fields of an object without putting
+// them to some useful purpose
+auto op = cxxMethodDecl->getOverloadedOperator();
+if (op == OO_EqualEqual || op == OO_ExclaimEqual)
+insideMoveOrCopyOrCloneDeclParent = cxxMethodDecl->getParent();
 }
 insideFunctionDecl = cxxMethodDecl;
 bool ret = RecursiveASTVisitor::TraverseCXXMethodDecl(cxxMethodDecl);
@@ -405,19 +410,29 @@ bool UnusedFields::TraverseFunctionDecl(FunctionDecl* 
functionDecl)
 {
 auto copy1 = insideStreamOutputOperator;
 auto copy2 = insideFunctionDecl;
+auto copy3 = insideMoveOrCopyOrCloneDeclParent;
 if (functionDecl->getLocation().isValid() && !ignoreLocation(functionDecl) 
&& functionDecl->isThisDeclarationADefinition())
 {
-if (functionDecl->getOverloadedOperator() == OO_LessLess
+auto op = functionDecl->getOverloadedOperator();
+if (op == OO_LessLess
 && functionDecl->getNumParams() == 2)
 {
 

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang include/sal svtools/source

2018-09-20 Thread Libreoffice Gerrit user
 compilerplugins/clang/fragiledestructor.cxx   |2 +-
 include/sal/types.h   |   12 
 svtools/source/config/optionsdrawinglayer.cxx |2 +-
 3 files changed, 2 insertions(+), 14 deletions(-)

New commits:
commit 852a6a57f99f8ceacee791329f2e6ca04a28dc58
Author: Stephan Bergmann 
AuthorDate: Thu Sep 20 11:18:34 2018 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Sep 20 15:53:56 2018 +0200

[API CHANGE] Remove unused SAL_FINAL

...which was never meant to be used by !LIBO_INTERNAL_ONLY code, anyway

Change-Id: I90225efa91c9fa047a23e2a9b73cea0b87c20594
Reviewed-on: https://gerrit.libreoffice.org/60803
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/include/sal/types.h b/include/sal/types.h
index 08751c33cd53..6bf4de970f71 100644
--- a/include/sal/types.h
+++ b/include/sal/types.h
@@ -409,18 +409,6 @@ namespace css = ::com::sun::star;
 #define SAL_OVERRIDE
 #endif
 
-/** C++11 "final" feature.
-
-For LIBO_INTERNAL_ONLY, mark a class as non-derivable or a method as 
non-overridable.
-
-@since LibreOffice 4.1
-*/
-#if defined LIBO_INTERNAL_ONLY
-#define SAL_FINAL final
-#else
-#define SAL_FINAL
-#endif
-
 #if defined LIBO_INTERNAL_ONLY
 #if HAVE_CPP_ATTRIBUTE_FALLTHROUGH
 #define SAL_FALLTHROUGH [[fallthrough]]
commit 92d4e9304cbe07115bfc6c6c0146943b7bcb7cf6
Author: Stephan Bergmann 
AuthorDate: Thu Sep 20 11:17:00 2018 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Sep 20 15:53:50 2018 +0200

Replace SAL_FINAL with final in internal code

Change-Id: Ib0d3324d7021ba1a8ff9779807d0a900be5e6226
Reviewed-on: https://gerrit.libreoffice.org/60802
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/compilerplugins/clang/fragiledestructor.cxx 
b/compilerplugins/clang/fragiledestructor.cxx
index 74f32aa165f6..1631cb30c1e9 100644
--- a/compilerplugins/clang/fragiledestructor.cxx
+++ b/compilerplugins/clang/fragiledestructor.cxx
@@ -95,7 +95,7 @@ bool FragileDestructor::VisitCXXMemberCallExpr(const 
CXXMemberCallExpr* callExpr
 return true;
 report(
 DiagnosticsEngine::Warning,
-"calling virtual method from destructor, either make the virtual 
method SAL_FINAL, or make this class SAL_FINAL",
+"calling virtual method from destructor, either make the virtual 
method final, or make this class final",
 compat::getBeginLoc(callExpr))
   << callExpr->getSourceRange();
 report(
diff --git a/svtools/source/config/optionsdrawinglayer.cxx 
b/svtools/source/config/optionsdrawinglayer.cxx
index d1e8427eb032..110af11c4ccd 100644
--- a/svtools/source/config/optionsdrawinglayer.cxx
+++ b/svtools/source/config/optionsdrawinglayer.cxx
@@ -206,7 +206,7 @@ public:
 //  private methods
 
 private:
-virtual void ImplCommit() SAL_FINAL override;
+virtual void ImplCommit() final override;
 
 static Sequence< OUString > impl_GetPropertyNames();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-09-18 Thread Libreoffice Gerrit user
 compilerplugins/clang/test/useuniqueptr.cxx |   32 +-
 compilerplugins/clang/useuniqueptr.cxx  |  395 +---
 idl/inc/object.hxx  |2 
 idl/inc/slot.hxx|2 
 idl/source/objects/object.cxx   |6 
 idl/source/objects/slot.cxx |   10 
 6 files changed, 343 insertions(+), 104 deletions(-)

New commits:
commit acc711238df5cf7cdd5b470d1439f6dc439f895a
Author: Noel Grandin 
AuthorDate: Mon Sep 17 13:56:00 2018 +0200
Commit: Noel Grandin 
CommitDate: Tue Sep 18 09:08:10 2018 +0200

loplugin:useuniqueptr in SvMetaSlot

no need to store ref-counted object like OString on the heap

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

diff --git a/idl/inc/object.hxx b/idl/inc/object.hxx
index 5b4bdb1eb6eb..822e562c26e1 100644
--- a/idl/inc/object.hxx
+++ b/idl/inc/object.hxx
@@ -59,7 +59,7 @@ private:
 
 static void WriteSlotStubs( const OString& rShellName,
 SvSlotElementList & rSlotList,
-std::vector & rList,
+std::vector & rList,
 SvStream & rOutStm );
 static sal_uInt16   WriteSlotParamArray( SvIdlDataBase & rBase,
 SvSlotElementList & rSlotList,
diff --git a/idl/inc/slot.hxx b/idl/inc/slot.hxx
index deef59ca6373..34709bc86bf2 100644
--- a/idl/inc/slot.hxx
+++ b/idl/inc/slot.hxx
@@ -119,7 +119,7 @@ public:
 virtual boolReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) 
override;
 virtual voidInsert( SvSlotElementList& ) override;
 voidWriteSlotStubs( const OString& rShellName,
-std::vector & rList,
+std::vector & rList,
 SvStream & rOutStm ) const;
 sal_uInt16  WriteSlotMap( const OString& rShellName,
 sal_uInt16 nCount,
diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx
index 0ff06ae6562b..4becd0240289 100644
--- a/idl/source/objects/object.cxx
+++ b/idl/source/objects/object.cxx
@@ -251,7 +251,7 @@ void SvMetaClass::FillClasses( SvMetaClassList & rList )
 
 void SvMetaClass::WriteSlotStubs( const OString& rShellName,
 SvSlotElementList & rSlotList,
-std::vector & rList,
+std::vector & rList,
 SvStream & rOutStm )
 {
 // write all attributes
@@ -306,10 +306,8 @@ void SvMetaClass::WriteSfx( SvIdlDataBase & rBase, 
SvStream & rOutStm )
 rOutStm << endl;
 rOutStm.WriteCharPtr( "};" ) << endl << endl;
 
-std::vector aStringList;
+std::vector aStringList;
 WriteSlotStubs( GetName(), aSlotList, aStringList, rOutStm );
-for ( size_t i = 0, n = aStringList.size(); i < n; ++i )
-delete aStringList[ i ];
 aStringList.clear();
 
 rOutStm << endl;
diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx
index e04edb927e5b..25de8ecb17d0 100644
--- a/idl/source/objects/slot.cxx
+++ b/idl/source/objects/slot.cxx
@@ -354,7 +354,7 @@ static OString MakeSlotName( SvStringHashEntry const * 
pEntry )
 };
 
 void SvMetaSlot::WriteSlotStubs( const OString& rShellName,
-std::vector & rList,
+std::vector & rList,
 SvStream & rOutStm ) const
 {
 if ( !GetExport() && !GetHidden() )
@@ -367,7 +367,7 @@ void SvMetaSlot::WriteSlotStubs( const OString& rShellName,
 bool bIn = false;
 for( size_t n = 0; n < rList.size(); n++ )
 {
-if (*rList[n] == aMethodName)
+if (rList[n] == aMethodName)
 {
 bIn = true;
 break;
@@ -376,7 +376,7 @@ void SvMetaSlot::WriteSlotStubs( const OString& rShellName,
 
 if ( !bIn )
 {
-rList.push_back( new OString(aMethodName) );
+rList.push_back( aMethodName );
 rOutStm.WriteCharPtr( "SFX_EXEC_STUB(" )
.WriteOString( rShellName )
.WriteChar( ',' )
@@ -392,7 +392,7 @@ void SvMetaSlot::WriteSlotStubs( const OString& rShellName,
 bool bIn = false;
 for ( size_t n=0; n < rList.size(); n++ )
 {
-if (*rList[n] == aMethodName)
+if (rList[n] == aMethodName)
 {
 bIn = true;
 break;
@@ -401,7 +401,7 @@ void SvMetaSlot::WriteSlotStubs( const OString& rShellName,
 
 if ( !bIn )
 {
-rList.push_back( new OString(aMethodName) );
+rList.push_back( 

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang solenv/CompilerTest_compilerplugins_clang.mk writerfilter/source xmlhelp/source xmloff/qa xmloff/source xmlscript/source xmlsecurity/s

2018-09-13 Thread Libreoffice Gerrit user
 compilerplugins/clang/constfields.cxx|  593 +++
 compilerplugins/clang/constfields.py |   95 +
 compilerplugins/clang/constfieldsrewrite.cxx |  143 ++
 compilerplugins/clang/test/constfields.cxx   |   45 
 compilerplugins/clang/unusedfields.cxx   |   28 
 compilerplugins/clang/unusedfields.py|   32 
 solenv/CompilerTest_compilerplugins_clang.mk |1 
 writerfilter/source/dmapper/DomainMapper.cxx |2 
 writerfilter/source/dmapper/DomainMapper_Impl.cxx|2 
 writerfilter/source/dmapper/PropertyMap.cxx  |1 
 writerfilter/source/dmapper/TextEffectsHandler.cxx   |3 
 writerfilter/source/ooxml/OOXMLDocumentImpl.cxx  |1 
 xmlhelp/source/cxxhelp/provider/db.hxx   |2 
 xmlhelp/source/cxxhelp/provider/provider.cxx |1 
 xmlhelp/source/cxxhelp/provider/resultsetbase.cxx|8 
 xmloff/qa/unit/uxmloff.cxx   |1 
 xmloff/source/chart/SchXMLSeries2Context.cxx |1 
 xmloff/source/chart/transporttypes.hxx   |1 
 xmloff/source/core/RDFaExportHelper.cxx  |2 
 xmloff/source/core/xmlexp.cxx|   15 
 xmloff/source/core/xmlimp.cxx|1 
 xmloff/source/draw/shapeimport.cxx   |2 
 xmloff/source/forms/handler/form_handler_factory.cxx |6 
 xmloff/source/forms/officeforms.cxx  |1 
 xmloff/source/style/MultiPropertySetHelper.cxx   |2 
 xmloff/source/style/styleexp.cxx |2 
 xmloff/source/style/xmlexppr.cxx |3 
 xmloff/source/style/xmlnumfe.cxx |8 
 xmloff/source/style/xmlstyle.cxx |3 
 xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx |1 
 xmloff/source/text/txtparae.cxx  |5 
 xmloff/source/xforms/XFormsBindContext.cxx   |3 
 xmlscript/source/xml_helper/xml_impctx.cxx   |3 
 xmlsecurity/source/framework/saxeventkeeperimpl.cxx  |3 
 xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx|3 
 xmlsecurity/source/helper/xsecverify.cxx |4 
 36 files changed, 897 insertions(+), 130 deletions(-)

New commits:
commit 5cd976bdef4334a5c28d6c7748ef5d72cf5025ff
Author: Noel Grandin 
AuthorDate: Wed Sep 12 17:01:48 2018 +0200
Commit: Noel Grandin 
CommitDate: Thu Sep 13 08:30:22 2018 +0200

loplugin:simplifyconstruct in writerfilter..xmlsecurity

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

diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index d88a4f701ac6..257b6bbad683 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -2543,7 +2543,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const 
PropertyMapPtr& rContext )
 const PropertyMapPtr pParagraphProps = 
m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH);
 if( pParagraphProps && 
pParagraphProps->isSet(PROP_PARA_STYLE_NAME) )
 {
-StyleSheetEntryPtr pStyle = nullptr;
+StyleSheetEntryPtr pStyle;
 OUString sStyleName;
 pParagraphProps->getProperty(PROP_PARA_STYLE_NAME)->second >>= 
sStyleName;
 if( !sStyleName.isEmpty() && GetStyleSheetTable() )
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 9caf6e3c8fd8..c0eea15bdb95 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -2919,7 +2919,7 @@ void DomainMapper_Impl::ChainTextFrames()
 sal_Int32 nSeq;
 OUString s_mso_next_textbox;
 bool bShapeNameSet;
-TextFramesForChaining(): xShape(nullptr), nId(0), nSeq(0), 
bShapeNameSet(false) {}
+TextFramesForChaining(): nId(0), nSeq(0), bShapeNameSet(false) {}
 } ;
 typedef std::map  ChainMap;
 
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx 
b/writerfilter/source/dmapper/PropertyMap.cxx
index e4fb96f7bfff..83d384844602 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -380,7 +380,6 @@ SectionPropertyMap::SectionPropertyMap( bool 
bIsFirstSection )
 , m_bTitlePage( false )
 , m_nColumnCount( 0 )
 , m_nColumnDistance( 1249 )
-, m_xColumnContainer( nullptr )
 , m_bSeparatorLineIsOn( false )
 

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang include/svl svl/source sw/source

2018-09-11 Thread Libreoffice Gerrit user
 compilerplugins/clang/plugin.cxx  |4 
 include/svl/stylepool.hxx |2 +-
 svl/source/items/stylepool.cxx|9 +
 sw/source/core/doc/swstylemanager.cxx |6 ++
 4 files changed, 12 insertions(+), 9 deletions(-)

New commits:
commit 1476d95b6ed3afa3546f61865ea938b62144
Author: Noel Grandin 
AuthorDate: Mon Sep 10 14:49:17 2018 +0200
Commit: Noel Grandin 
CommitDate: Tue Sep 11 08:17:42 2018 +0200

loplugin:useuniqueptr in StylePool::createIterator

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

diff --git a/include/svl/stylepool.hxx b/include/svl/stylepool.hxx
index 497ae845a36b..5fe2f2197186 100644
--- a/include/svl/stylepool.hxx
+++ b/include/svl/stylepool.hxx
@@ -62,7 +62,7 @@ public:
 @postcond the iterator "points before the first" SfxItemSet of the 
pool.
 The first StylePoolIterator::getNext() call will deliver the first 
SfxItemSet.
 */
-IStylePoolIteratorAccess* createIterator( const bool bSkipUnusedItemSets = 
false,
+std::unique_ptr createIterator( const bool 
bSkipUnusedItemSets = false,
   const bool 
bSkipIgnorableItems = false );
 
 ~StylePool();
diff --git a/svl/source/items/stylepool.cxx b/svl/source/items/stylepool.cxx
index f1ddc7e0ab7b..6192adee6650 100644
--- a/svl/source/items/stylepool.cxx
+++ b/svl/source/items/stylepool.cxx
@@ -20,6 +20,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -357,7 +358,7 @@ public:
 std::shared_ptr insertItemSet( const SfxItemSet& rSet );
 
 // #i86923#
-IStylePoolIteratorAccess* createIterator( bool bSkipUnusedItemSets,
+std::unique_ptr createIterator( bool 
bSkipUnusedItemSets,
   bool bSkipIgnorableItems );
 };
 
@@ -432,10 +433,10 @@ std::shared_ptr StylePoolImpl::insertItemSet( 
const SfxItemSet& rSet
 }
 
 // #i86923#
-IStylePoolIteratorAccess* StylePoolImpl::createIterator( bool 
bSkipUnusedItemSets,
+std::unique_ptr StylePoolImpl::createIterator( bool 
bSkipUnusedItemSets,
  bool 
bSkipIgnorableItems )
 {
-return new Iterator( maRoot, bSkipUnusedItemSets, bSkipIgnorableItems );
+return o3tl::make_unique( maRoot, bSkipUnusedItemSets, 
bSkipIgnorableItems );
 }
 // Ctor, Dtor and redirected methods of class StylePool, nearly inline ;-)
 
@@ -448,7 +449,7 @@ std::shared_ptr StylePool::insertItemSet( const 
SfxItemSet& rSet )
 { return pImpl->insertItemSet( rSet ); }
 
 // #i86923#
-IStylePoolIteratorAccess* StylePool::createIterator( const bool 
bSkipUnusedItemSets,
+std::unique_ptr StylePool::createIterator( const 
bool bSkipUnusedItemSets,
  const bool 
bSkipIgnorableItems )
 {
 return pImpl->createIterator( bSkipUnusedItemSets, bSkipIgnorableItems );
diff --git a/sw/source/core/doc/swstylemanager.cxx 
b/sw/source/core/doc/swstylemanager.cxx
index 40ca237164b8..0bef02b0ae08 100644
--- a/sw/source/core/doc/swstylemanager.cxx
+++ b/sw/source/core/doc/swstylemanager.cxx
@@ -43,7 +43,7 @@ public:
 
 void SwStyleCache::addCompletePool( StylePool& rPool )
 {
-IStylePoolIteratorAccess *pIter = rPool.createIterator();
+std::unique_ptr pIter = rPool.createIterator();
 std::shared_ptr pStyle = pIter->getNext();
 while( pStyle.get() )
 {
@@ -51,7 +51,6 @@ void SwStyleCache::addCompletePool( StylePool& rPool )
 mMap[ aName ] = pStyle;
 pStyle = pIter->getNext();
 }
-delete pIter;
 }
 
 class SwStyleManager : public IStyleAccess
@@ -140,7 +139,7 @@ void SwStyleManager::getAllStyles( 
std::vector> 
 {
 StylePool& rAutoPool = eFamily == IStyleAccess::AUTO_STYLE_CHAR ? 
aAutoCharPool : aAutoParaPool;
 // setup  iterator, which skips unused styles and ignorable 
items
-IStylePoolIteratorAccess *pIter = rAutoPool.createIterator( true, true );
+std::unique_ptr pIter = 
rAutoPool.createIterator( true, true );
 std::shared_ptr pStyle = pIter->getNext();
 while( pStyle.get() )
 {
@@ -148,7 +147,6 @@ void SwStyleManager::getAllStyles( 
std::vector> 
 
 pStyle = pIter->getNext();
 }
-delete pIter;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 9a9d407977494b405479b138a33fc6f8f1e2911d
Author: Noel Grandin 
AuthorDate: Mon Sep 10 15:31:24 2018 +0200
Commit: Noel Grandin 
CommitDate: Tue Sep 11 08:17:31 2018 +0200

prevent crashes when running the global-analysis plugins

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

diff --git a/compilerplugins/clang/plugin.cxx b/compilerplugins/clang/plugin.cxx
index 1348c3f0f00f..84975c99107a 100644
--- 

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang include/svl include/svtools include/svx sc/source sd/source svx/source

2018-08-08 Thread Libreoffice Gerrit user
 compilerplugins/clang/unnecessaryvirtual-dead.results |   10 -
 compilerplugins/clang/unnecessaryvirtual.results  |  156 +++---
 include/svl/undo.hxx  |   42 ++--
 include/svtools/treelistbox.hxx   |2 
 include/svx/sdr/contact/objectcontact.hxx |   14 -
 sc/source/ui/inc/StatisticsTwoVariableDialog.hxx  |2 
 sd/source/ui/framework/module/SlideSorterModule.hxx   |2 
 svx/source/inc/eventhandler.hxx   |   62 ---
 svx/source/sdr/contact/objectcontact.cxx  |   24 --
 svx/source/sdr/contact/objectcontactofpageview.cxx|   13 -
 svx/source/sdr/event/eventhandler.cxx |   93 --
 11 files changed, 125 insertions(+), 295 deletions(-)

New commits:
commit 1444bd72006fec7ebcd3c5df2399da26ad3b1466
Author: Noel Grandin 
AuthorDate: Tue Aug 7 21:44:48 2018 +0200
Commit: Noel Grandin 
CommitDate: Wed Aug 8 09:30:45 2018 +0200

loplugin:unnecessaryvirtual

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

diff --git a/compilerplugins/clang/unnecessaryvirtual-dead.results 
b/compilerplugins/clang/unnecessaryvirtual-dead.results
index 6c9fef9d3ab8..32e9137f6fcf 100644
--- a/compilerplugins/clang/unnecessaryvirtual-dead.results
+++ b/compilerplugins/clang/unnecessaryvirtual-dead.results
@@ -8,18 +8,14 @@ include/canvas/base/graphicdevicebase.hxx:302
 void canvas::GraphicDeviceBase::removePropertyChangeListener(const class 
rtl::OUString &,const class com::sun::star::uno::Reference &,)
 include/canvas/base/graphicdevicebase.hxx:315
 void canvas::GraphicDeviceBase::removeVetoableChangeListener(const class 
rtl::OUString &,const class com::sun::star::uno::Reference &,)
-include/svtools/valueset.hxx:498
-void SvtValueSet::UserDraw(const class UserDrawEvent &,)
-slideshow/source/engine/animationfactory.cxx:442
+slideshow/source/engine/animationfactory.cxx:443
 void slideshow::internal::(anonymous 
namespace)::GenericAnimation::prefetch(const class std::shared_ptr &,const class std::shared_ptr &,)
 vcl/inc/salframe.hxx:135
 void SalFrame::SetRepresentedURL(const class rtl::OUString &,)
 vcl/inc/salmenu.hxx:80
 void SalMenu::RemoveMenuBarButton(unsigned short,)
-vcl/inc/salobj.hxx:46
+vcl/inc/salobj.hxx:48
 void SalObject::Enable(_Bool,)
-vcl/inc/unx/saldata.hxx:68
-void X11SalData::initNWF()
 vcl/inc/unx/saldata.hxx:69
 void X11SalData::deInitNWF()
 writerfilter/source/ooxml/OOXMLFactory.hxx:71
@@ -29,4 +25,4 @@ writerfilter/source/ooxml/OOXMLFactory.hxx:72
 writerfilter/source/ooxml/OOXMLFactory.hxx:73
 void writerfilter::ooxml::OOXMLFactory_ns::endAction(class 
writerfilter::ooxml::OOXMLFastContextHandler *,)
 writerfilter/source/ooxml/OOXMLFactory.hxx:74
-void writerfilter::ooxml::OOXMLFactory_ns::attributeAction(class 
writerfilter::ooxml::OOXMLFastContextHandler *,int,const class 
std::shared_ptr &,)
+void writerfilter::ooxml::OOXMLFactory_ns::attributeAction(class 
writerfilter::ooxml::OOXMLFastContextHandler *,int,const class 
tools::SvRef &,)
diff --git a/compilerplugins/clang/unnecessaryvirtual.results 
b/compilerplugins/clang/unnecessaryvirtual.results
index 04c9dbad7855..8cf7943f5d66 100644
--- a/compilerplugins/clang/unnecessaryvirtual.results
+++ b/compilerplugins/clang/unnecessaryvirtual.results
@@ -64,6 +64,8 @@ include/comphelper/servicedecl.hxx:168
 unsigned char 
comphelper::service_decl::detail::OwnServiceImpl::supportsService(const class 
rtl::OUString &,)
 include/comphelper/servicedecl.hxx:172
 class com::sun::star::uno::Sequence 
comphelper::service_decl::detail::OwnServiceImpl::getSupportedServiceNames()
+include/comphelper/solarmutex.hxx:53
+_Bool comphelper::SolarMutex::tryToAcquire()
 include/comphelper/unique_disposing_ptr.hxx:169
 void 
comphelper::unique_disposing_solar_mutex_reset_ptr::reset(type-parameter-0-0 *,)
 include/comphelper/weakeventlistener.hxx:118
@@ -114,16 +116,52 @@ include/svl/svdde.hxx:251
 _Bool DdeTopic::StartAdviseLoop()
 include/svl/svdde.hxx:307
 void DdeService::~DdeService()
-include/svtools/treelistbox.hxx:722
+include/svl/undo.hxx:202
+void SfxUndoManager::SetMaxUndoActionCount(unsigned long,)
+include/svl/undo.hxx:205
+class rtl::OUString SfxUndoManager::GetUndoActionComment(unsigned 
long,const _Bool,)const
+include/svl/undo.hxx:206
+class SfxUndoAction * SfxUndoManager::GetUndoAction(unsigned long,)const
+include/svl/undo.hxx:210
+class rtl::OUString SfxUndoManager::GetRedoActionComment(unsigned 
long,const _Bool,)const
+include/svl/undo.hxx:211
+class SfxUndoAction * SfxUndoManager::GetRedoAction()const
+include/svl/undo.hxx:231
+void SfxUndoManager::Reset()
+include/svl/undo.hxx:234
+_Bool SfxUndoManager::IsDoing()const
+include/svl/undo.hxx:235
+unsigned long 

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang forms/source starmath/source vcl/source xmlhelp/source

2018-08-02 Thread Libreoffice Gerrit user
 compilerplugins/clang/stringloop.cxx  |  123 +-
 forms/source/xforms/model_ui.cxx  |   15 +--
 starmath/source/ooxmlimport.cxx   |   97 ++--
 vcl/source/filter/ipdf/pdfdocument.cxx|   11 +-
 xmlhelp/source/cxxhelp/provider/databases.cxx |4 
 5 files changed, 189 insertions(+), 61 deletions(-)

New commits:
commit e7a4426872429c2f286819cc0bdbc65fe4bd79cd
Author: Caolán McNamara 
AuthorDate: Wed Aug 1 19:25:27 2018 +0100
Commit: Caolán McNamara 
CommitDate: Thu Aug 2 10:13:23 2018 +0200

forcepoint#66 make sure we don't get stuck endlessly reparsing

Change-Id: Ie2733e8d7f73e5f6a072604c477e949cd944189a
Reviewed-on: https://gerrit.libreoffice.org/58441
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/vcl/source/filter/ipdf/pdfdocument.cxx 
b/vcl/source/filter/ipdf/pdfdocument.cxx
index 3d9008a22943..c74bcbbade84 100644
--- a/vcl/source/filter/ipdf/pdfdocument.cxx
+++ b/vcl/source/filter/ipdf/pdfdocument.cxx
@@ -2212,9 +2212,14 @@ size_t PDFDictionaryElement::Parse(const 
std::vector
 else if (!pDictionary->alreadyParsing())
 {
 // Nested dictionary.
-i = PDFDictionaryElement::Parse(rElements, pDictionary, 
pDictionary->m_aItems);
-rDictionary[aName] = pDictionary;
-aName.clear();
+const size_t nexti
+= PDFDictionaryElement::Parse(rElements, pDictionary, 
pDictionary->m_aItems);
+if (nexti >= i) // ensure we go forwards and not endlessly loop
+{
+i = nexti;
+rDictionary[aName] = pDictionary;
+aName.clear();
+}
 }
 }
 
commit d5415561e3979d33b2a7e1a06e2d5515a1e1dd33
Author: Noel Grandin 
AuthorDate: Thu Aug 2 08:59:42 2018 +0200
Commit: Noel Grandin 
CommitDate: Thu Aug 2 10:13:12 2018 +0200

loplugin:stringloop in various

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

diff --git a/compilerplugins/clang/stringloop.cxx 
b/compilerplugins/clang/stringloop.cxx
index 91cba802f3a6..31f1bfe08a37 100644
--- a/compilerplugins/clang/stringloop.cxx
+++ b/compilerplugins/clang/stringloop.cxx
@@ -39,6 +39,8 @@ private:
 
 void StringLoop::run()
 {
+// Various places are not worth changing, the code becomes too awkward
+// Just exclude stuff as I go
 StringRef fn(handler.getMainFileName());
 if (loplugin::hasPathnamePrefix(fn, SRCDIR "/bridges/"))
 return;
@@ -60,6 +62,120 @@ void StringLoop::run()
 return;
 if (loplugin::isSamePathname(fn, SRCDIR 
"/vcl/source/control/combobox.cxx"))
 return;
+if (loplugin::isSamePathname(fn, SRCDIR 
"/vcl/source/gdi/pdfwriter_impl.cxx"))
+return;
+if (loplugin::hasPathnamePrefix(fn, SRCDIR "/svtools/"))
+return;
+if (loplugin::hasPathnamePrefix(fn, SRCDIR "/idl/"))
+return;
+if (loplugin::hasPathnamePrefix(fn, SRCDIR "/framework/"))
+return;
+if (loplugin::hasPathnamePrefix(fn, SRCDIR "/basic/"))
+return;
+if (loplugin::hasPathnamePrefix(fn, SRCDIR "/sfx2/"))
+return;
+if (loplugin::hasPathnamePrefix(fn, SRCDIR "/avmedia/"))
+return;
+if (loplugin::hasPathnamePrefix(fn, SRCDIR "/connectivity/"))
+return;
+if (loplugin::hasPathnamePrefix(fn, SRCDIR "/editeng/"))
+return;
+if (loplugin::hasPathnamePrefix(fn, SRCDIR "/svx/"))
+return;
+if (loplugin::hasPathnamePrefix(fn, SRCDIR "/basctl/"))
+return;
+if (loplugin::hasPathnamePrefix(fn, SRCDIR "/filter/"))
+return;
+if (loplugin::hasPathnamePrefix(fn, SRCDIR "/chart2/"))
+return;
+if (loplugin::hasPathnamePrefix(fn, SRCDIR "/cui/"))
+return;
+if (loplugin::hasPathnamePrefix(fn, SRCDIR "/dbaccess/"))
+return;
+if (loplugin::hasPathnamePrefix(fn, SRCDIR "/oox/"))
+return;
+if (loplugin::hasPathnamePrefix(fn, SRCDIR "/writerfilter/"))
+return;
+if (loplugin::hasPathnamePrefix(fn, SRCDIR "/desktop/"))
+return;
+if (loplugin::hasPathnamePrefix(fn, SRCDIR "/extensions/"))
+return;
+if (loplugin::hasPathnamePrefix(fn, SRCDIR "/dtrans/"))
+return;
+if (loplugin::hasPathnamePrefix(fn, SRCDIR "/i18npool/"))
+return;
+if (loplugin::hasPathnamePrefix(fn, SRCDIR "/embeddedobj/"))
+return;
+if (loplugin::hasPathnamePrefix(fn, SRCDIR "/sd/"))
+return;
+if (loplugin::hasPathnamePrefix(fn, SRCDIR "/xmloff/"))
+return;
+if (loplugin::hasPathnamePrefix(fn, SRCDIR "/xmlhelp/"))
+return;
+if (loplugin::hasPathnamePrefix(fn, SRCDIR "/forms/"))
+return;
+if 

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang include/svx svx/source ucb/source

2018-07-31 Thread Libreoffice Gerrit user
 compilerplugins/clang/test/unnecessaryoverride.cxx |   31 +
 compilerplugins/clang/unnecessaryoverride.cxx  |   28 ++
 include/svx/svdview.hxx|2 -
 svx/source/svdraw/svdview.cxx  |5 ---
 ucb/source/ucp/cmis/cmis_datasupplier.cxx  |9 ++
 ucb/source/ucp/cmis/cmis_datasupplier.hxx  |2 -
 ucb/source/ucp/ftp/ftpdirp.cxx |3 --
 ucb/source/ucp/ftp/ftpdirp.hxx |2 -
 ucb/source/ucp/webdav-neon/webdavcontent.cxx   |4 +-
 ucb/source/ucp/webdav-neon/webdavcontentcaps.cxx   |4 --
 ucb/source/ucp/webdav-neon/webdavprovider.hxx  |2 -
 11 files changed, 63 insertions(+), 29 deletions(-)

New commits:
commit 7d13fe52bdb31d1263148567fec009df1de6e330
Author: Noel Grandin 
AuthorDate: Mon Jul 30 15:35:13 2018 +0200
Commit: Noel Grandin 
CommitDate: Tue Jul 31 14:59:41 2018 +0200

loplugin:returnconstant in ucb

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

diff --git a/ucb/source/ucp/cmis/cmis_datasupplier.cxx 
b/ucb/source/ucp/cmis/cmis_datasupplier.cxx
index 13133a2d27ad..01819ad36a03 100644
--- a/ucb/source/ucp/cmis/cmis_datasupplier.cxx
+++ b/ucb/source/ucp/cmis/cmis_datasupplier.cxx
@@ -30,10 +30,10 @@ namespace cmis
 {
 }
 
-bool DataSupplier::getData()
+void DataSupplier::getData()
 {
 if ( mbCountFinal )
-return true;
+return;
 
 std::vector< uno::Reference< ucb::XContent > > aChildren = 
m_pChildrenProvider->getChildren( );
 
@@ -51,8 +51,6 @@ namespace cmis
 }
 }
 mbCountFinal = true;
-
-return true;
 }
 
 DataSupplier::~DataSupplier()
@@ -90,7 +88,8 @@ namespace cmis
 if ( maResults.size() > nIndex ) // Result already present.
 return true;
 
-if ( getData() && maResults.size() > nIndex )
+getData();
+if ( maResults.size() > nIndex )
 return true;
 
 return false;
diff --git a/ucb/source/ucp/cmis/cmis_datasupplier.hxx 
b/ucb/source/ucp/cmis/cmis_datasupplier.hxx
index 619af90e355c..0f618f04bc54 100644
--- a/ucb/source/ucp/cmis/cmis_datasupplier.hxx
+++ b/ucb/source/ucp/cmis/cmis_datasupplier.hxx
@@ -39,7 +39,7 @@ namespace cmis
 ChildrenProvider* m_pChildrenProvider;
 sal_Int32 mnOpenMode;
 bool mbCountFinal;
-bool getData();
+void getData();
 ResultList maResults;
 
 public:
diff --git a/ucb/source/ucp/ftp/ftpdirp.cxx b/ucb/source/ucp/ftp/ftpdirp.cxx
index f4ab59afbbe8..ca439aa31a8a 100644
--- a/ucb/source/ucp/ftp/ftpdirp.cxx
+++ b/ucb/source/ucp/ftp/ftpdirp.cxx
@@ -1219,7 +1219,7 @@ bool FTPDirectoryParser::parseUNIX_isTime (
  * checked for validity of the given day in the given month and year.
  *
  */
-bool FTPDirectoryParser::setYear (
+void FTPDirectoryParser::setYear (
 DateTime , sal_uInt16 nYear)
 {
 if (nYear < 100)
@@ -1249,7 +1249,6 @@ bool FTPDirectoryParser::setYear (
 }
 
 rDateTime.SetYear(nYear);
-return true;
 }
 
 /*
diff --git a/ucb/source/ucp/ftp/ftpdirp.hxx b/ucb/source/ucp/ftp/ftpdirp.hxx
index 3284c7357fb4..983fab1d29ae 100644
--- a/ucb/source/ucp/ftp/ftpdirp.hxx
+++ b/ucb/source/ucp/ftp/ftpdirp.hxx
@@ -143,7 +143,7 @@ namespace ftp {
 sal_uInt16  nHour,
 DateTime& rDateTime);
 
-static bool setYear (
+static void setYear (
 DateTime& rDateTime,
 sal_uInt16  nYear);
 
diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx 
b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
index 3113b3c1f5f1..db25abd32205 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
@@ -1256,8 +1256,8 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
 
 while ( it != end )
 {
-if ( pProvider->getProperty( (*it).first, aProp ) )
-xRow->appendObject( aProp, (*it).second.value() );
+pProvider->getProperty( (*it).first, aProp );
+xRow->appendObject( aProp, (*it).second.value() );
 
 ++it;
 }
diff --git a/ucb/source/ucp/webdav-neon/webdavcontentcaps.cxx 
b/ucb/source/ucp/webdav-neon/webdavcontentcaps.cxx
index 5599b04ff65f..38b840bcbc15 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontentcaps.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontentcaps.cxx
@@ -62,7 +62,7 @@ using namespace webdav_ucp;
 // ContentProvider implementation.
 
 
-bool ContentProvider::getProperty(
+void ContentProvider::getProperty(
 const OUString & rPropName, beans::Property & rProp )
 {
 if ( !m_pProps )
@@ -277,8 +277,6 @@ bool ContentProvider::getProperty(
 cppu::UnoType::get(),
 

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

2018-07-30 Thread Libreoffice Gerrit user
 compilerplugins/clang/useuniqueptr.cxx |6 ++
 sw/source/ui/frmdlg/cption.cxx |2 +-
 sw/source/ui/frmdlg/frmpage.cxx|6 +++---
 sw/source/uibase/inc/cption.hxx|2 +-
 sw/source/uibase/inc/frmpage.hxx   |2 +-
 5 files changed, 12 insertions(+), 6 deletions(-)

New commits:
commit cfe896e7b811d4c2777531efcca8065a0d2fbf54
Author: Noel Grandin 
AuthorDate: Thu Jul 26 16:22:07 2018 +0200
Commit: Noel Grandin 
CommitDate: Mon Jul 30 08:21:01 2018 +0200

loplugin:useuniqueptr in SwGrfExtPage

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

diff --git a/compilerplugins/clang/useuniqueptr.cxx 
b/compilerplugins/clang/useuniqueptr.cxx
index ab254920b6c9..d93c40205a8d 100644
--- a/compilerplugins/clang/useuniqueptr.cxx
+++ b/compilerplugins/clang/useuniqueptr.cxx
@@ -110,6 +110,12 @@ public:
 // SfxObjectShell::pMedium
 if (fn == SRCDIR "/sfx2/source/doc/objxtor.cxx")
 return;
+// various
+if (fn == SRCDIR "/sw/source/filter/ww8/wrtww8.cxx")
+return;
+// WW8TabBandDesc
+if (fn == SRCDIR "/sw/source/filter/ww8/ww8par2.cxx")
+return;
 
 TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
 }
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index a0d58c8a34d9..8925187a4a7a 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -2406,7 +2406,7 @@ SwGrfExtPage::~SwGrfExtPage()
 
 void SwGrfExtPage::dispose()
 {
-delete pGrfDlg;
+pGrfDlg.reset();
 m_pMirror.clear();
 m_pMirrorVertBox.clear();
 m_pMirrorHorzBox.clear();
@@ -2603,9 +2603,9 @@ IMPL_LINK_NOARG(SwGrfExtPage, BrowseHdl, Button*, void)
 {
 if(!pGrfDlg)
 {
-pGrfDlg = new FileDialogHelper(
+pGrfDlg.reset(new FileDialogHelper(
 ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW,
-FileDialogFlags::Graphic, GetFrameWeld());
+FileDialogFlags::Graphic, GetFrameWeld()));
 pGrfDlg->SetTitle(get("linkframe")->get_label());
 }
 pGrfDlg->SetDisplayDirectory( m_pConnectED->GetText() );
diff --git a/sw/source/uibase/inc/frmpage.hxx b/sw/source/uibase/inc/frmpage.hxx
index 1b191e0e2279..6196cb3409da 100644
--- a/sw/source/uibase/inc/frmpage.hxx
+++ b/sw/source/uibase/inc/frmpage.hxx
@@ -222,7 +222,7 @@ class SwGrfExtPage: public SfxTabPage
 OUStringaFilterName;
 OUStringaGrfName, aNewGrfName;
 
-::sfx2::FileDialogHelper* pGrfDlg;
+std::unique_ptr<::sfx2::FileDialogHelper> pGrfDlg;
 
 boolbHtmlMode;
 
commit 95d7dc537e8979b67ed0928237404fd552880095
Author: Noel Grandin 
AuthorDate: Thu Jul 26 16:18:04 2018 +0200
Commit: Noel Grandin 
CommitDate: Mon Jul 30 08:20:53 2018 +0200

loplugin:useuniqueptr in SwCaptionDialog

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

diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx
index 1d62d1277e20..cc42c9a993f3 100644
--- a/sw/source/ui/frmdlg/cption.cxx
+++ b/sw/source/ui/frmdlg/cption.cxx
@@ -418,7 +418,7 @@ SwCaptionDialog::~SwCaptionDialog()
 
 void SwCaptionDialog::dispose()
 {
-delete pMgr;
+pMgr.reset();
 m_pTextEdit.clear();
 m_pCategoryBox.clear();
 m_pFormatText.clear();
diff --git a/sw/source/uibase/inc/cption.hxx b/sw/source/uibase/inc/cption.hxx
index 037debb11369..abf3855c52e1 100644
--- a/sw/source/uibase/inc/cption.hxx
+++ b/sw/source/uibase/inc/cption.hxx
@@ -58,7 +58,7 @@ class SwCaptionDialog : public SvxStandardDialog
 VclPtr m_pPreview;
 
 SwView// search per active, avoid View
-SwFieldMgr *pMgr;  // pointer to save the include
+std::unique_ptr pMgr;  // pointer to save the include
 
 OUString sCharacterStyle;
 bool bCopyAttributes;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-24 Thread Libreoffice Gerrit user
 compilerplugins/clang/test/useuniqueptr.cxx |5 +
 compilerplugins/clang/useuniqueptr.cxx  |2 +-
 sw/source/uibase/config/dbconfig.cxx|   13 +
 sw/source/uibase/inc/dbconfig.hxx   |4 ++--
 4 files changed, 13 insertions(+), 11 deletions(-)

New commits:
commit 4089e1d9f67a61322b1fa4330ee10f62b3684f7f
Author: Noel Grandin 
AuthorDate: Mon Jul 23 12:21:25 2018 +0200
Commit: Noel Grandin 
CommitDate: Tue Jul 24 08:34:32 2018 +0200

loplugin:useuniqueptr fix check for DELETEZ inside compound stmt

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

diff --git a/compilerplugins/clang/test/useuniqueptr.cxx 
b/compilerplugins/clang/test/useuniqueptr.cxx
index 24a34c0e54b9..844f7fb65d7e 100644
--- a/compilerplugins/clang/test/useuniqueptr.cxx
+++ b/compilerplugins/clang/test/useuniqueptr.cxx
@@ -154,11 +154,16 @@ class Foo12 {
 class Foo13 {
 int * m_pbar1; // expected-note {{member is here [loplugin:useuniqueptr]}}
 int * m_pbar2; // expected-note {{member is here [loplugin:useuniqueptr]}}
+int * m_pbar3; // expected-note {{member is here [loplugin:useuniqueptr]}}
 ~Foo13()
 {
 if (m_pbar1)
 DELETEZ(m_pbar1); // expected-error {{unconditional call to delete 
on a member, should be using std::unique_ptr [loplugin:useuniqueptr]}}
 DELETEZ(m_pbar2); // expected-error {{unconditional call to delete on 
a member, should be using std::unique_ptr [loplugin:useuniqueptr]}}
+if (m_pbar3)
+{
+DELETEZ(m_pbar3); // expected-error {{unconditional call to delete 
on a member, should be using std::unique_ptr [loplugin:useuniqueptr]}}
+}
 }
 };
 // check for unconditional inner compound statements
diff --git a/compilerplugins/clang/useuniqueptr.cxx 
b/compilerplugins/clang/useuniqueptr.cxx
index c7f6d7a2444c..f41b55a5eb0f 100644
--- a/compilerplugins/clang/useuniqueptr.cxx
+++ b/compilerplugins/clang/useuniqueptr.cxx
@@ -228,7 +228,7 @@ void UseUniquePtr::CheckForSimpleDelete(const 
CXXMethodDecl* methodDecl, const C
 auto ifDeleteExpr = dyn_cast(*j);
 if (ifDeleteExpr)
 CheckDeleteExpr(methodDecl, ifDeleteExpr);
-ParenExpr const * parenExpr = dyn_cast(*i);
+ParenExpr const * parenExpr = dyn_cast(*j);
 if (parenExpr)
 CheckParenExpr(methodDecl, parenExpr);
 }
commit fbd757349ea0dd2e9daecc2b6d1aa2e80aa7a319
Author: Noel Grandin 
AuthorDate: Mon Jul 23 12:08:56 2018 +0200
Commit: Noel Grandin 
CommitDate: Tue Jul 24 08:34:21 2018 +0200

loplugin:useuniqueptr in SwDBConfig

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

diff --git a/sw/source/uibase/config/dbconfig.cxx 
b/sw/source/uibase/config/dbconfig.cxx
index 91b24488bf36..34d0650dcde0 100644
--- a/sw/source/uibase/config/dbconfig.cxx
+++ b/sw/source/uibase/config/dbconfig.cxx
@@ -42,16 +42,14 @@ const Sequence& SwDBConfig::GetPropertyNames()
 
 SwDBConfig::SwDBConfig() :
 ConfigItem("Office.DataAccess",
-ConfigItemMode::DelayedUpdate|ConfigItemMode::ReleaseTree),
-pAdrImpl(nullptr),
-pBibImpl(nullptr)
+ConfigItemMode::DelayedUpdate|ConfigItemMode::ReleaseTree)
 {
 };
 
 SwDBConfig::~SwDBConfig()
 {
-delete pAdrImpl;
-delete pBibImpl;
+pAdrImpl.reset();
+pBibImpl.reset();
 }
 
 void SwDBConfig::Load()
@@ -59,10 +57,9 @@ void SwDBConfig::Load()
 const Sequence& rNames = GetPropertyNames();
 if(!pAdrImpl)
 {
-
-pAdrImpl = new SwDBData;
+pAdrImpl.reset(new SwDBData);
 pAdrImpl->nCommandType = 0;
-pBibImpl = new SwDBData;
+pBibImpl.reset(new SwDBData);
 pBibImpl->nCommandType = 0;
 }
 Sequence aValues = GetProperties(rNames);
diff --git a/sw/source/uibase/inc/dbconfig.hxx 
b/sw/source/uibase/inc/dbconfig.hxx
index 5ea79f423853..5a611f5d8be0 100644
--- a/sw/source/uibase/inc/dbconfig.hxx
+++ b/sw/source/uibase/inc/dbconfig.hxx
@@ -30,8 +30,8 @@ private:
 SAL_DLLPRIVATE static const css::uno::Sequence& 
GetPropertyNames();
 virtual void ImplCommit() override;
 
-SwDBData*   pAdrImpl;
-SwDBData*   pBibImpl;
+std::unique_ptr pAdrImpl;
+std::unique_ptr pBibImpl;
 
 public:
 SwDBConfig();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-24 Thread Libreoffice Gerrit user
 compilerplugins/clang/useuniqueptr.cxx  |3 +++
 sw/source/filter/html/htmlatr.cxx   |   14 +++---
 sw/source/filter/html/htmlflywriter.cxx |5 ++---
 sw/source/filter/html/wrthtml.cxx   |   15 ++-
 sw/source/filter/html/wrthtml.hxx   |6 +++---
 sw/source/filter/xml/xmlexp.cxx |1 +
 sw/source/filter/xml/xmlexp.hxx |6 +++---
 sw/source/filter/xml/xmliteme.cxx   |   12 ++--
 sw/source/filter/xml/xmltble.cxx|9 +++--
 9 files changed, 34 insertions(+), 37 deletions(-)

New commits:
commit 94e3568d3d1aa399d13c53f53a699c49da3e929c
Author: Noel Grandin 
AuthorDate: Mon Jul 23 09:35:43 2018 +0200
Commit: Noel Grandin 
CommitDate: Tue Jul 24 08:33:07 2018 +0200

loplugin:useuniqueptr in SwXMLExport

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

diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx
index 8a7da0693df1..1f86cd989b28 100644
--- a/sw/source/filter/xml/xmlexp.cxx
+++ b/sw/source/filter/xml/xmlexp.cxx
@@ -51,6 +51,7 @@
 #include 
 #include "xmltexte.hxx"
 #include "xmlexp.hxx"
+#include "xmlexpit.hxx"
 #include 
 #include 
 #include 
diff --git a/sw/source/filter/xml/xmlexp.hxx b/sw/source/filter/xml/xmlexp.hxx
index 211f50840da6..22e6a42368a7 100644
--- a/sw/source/filter/xml/xmlexp.hxx
+++ b/sw/source/filter/xml/xmlexp.hxx
@@ -47,9 +47,9 @@ typedef std::vector< SwXMLTableLines_Impl* > 
SwXMLTableLinesCache_Impl;
 
 class SwXMLExport : public SvXMLExport
 {
-SvXMLUnitConverter* m_pTwipUnitConverter;
-SvXMLExportItemMapper*  m_pTableItemMapper;
-SwXMLTableLinesCache_Impl*  m_pTableLines;
+std::unique_ptrm_pTwipUnitConverter;
+std::unique_ptr m_pTableItemMapper;
+std::unique_ptr m_pTableLines;
 
 SvXMLItemMapEntriesRef  m_xTableItemMap;
 SvXMLItemMapEntriesRef  m_xTableRowItemMap;
diff --git a/sw/source/filter/xml/xmliteme.cxx 
b/sw/source/filter/xml/xmliteme.cxx
index 60eaedd1f562..7ba4db9501d2 100644
--- a/sw/source/filter/xml/xmliteme.cxx
+++ b/sw/source/filter/xml/xmliteme.cxx
@@ -207,25 +207,25 @@ inline void SwXMLTableItemMapper_Impl::SetAbsWidth( 
sal_uInt32 nAbs )
 
 void SwXMLExport::InitItemExport()
 {
-m_pTwipUnitConverter = new SvXMLUnitConverter(getComponentContext(),
-util::MeasureUnit::TWIP, GetMM100UnitConverter().GetXMLMeasureUnit());
+m_pTwipUnitConverter.reset(new SvXMLUnitConverter(getComponentContext(),
+util::MeasureUnit::TWIP, GetMM100UnitConverter().GetXMLMeasureUnit()));
 
 m_xTableItemMap = new SvXMLItemMapEntries( aXMLTableItemMap );
 m_xTableRowItemMap = new SvXMLItemMapEntries( aXMLTableRowItemMap );
 m_xTableCellItemMap = new SvXMLItemMapEntries( aXMLTableCellItemMap );
 
-m_pTableItemMapper = new SwXMLTableItemMapper_Impl( m_xTableItemMap, *this 
);
+m_pTableItemMapper.reset(new SwXMLTableItemMapper_Impl( m_xTableItemMap, 
*this ));
 }
 
 void SwXMLExport::FinitItemExport()
 {
-delete m_pTableItemMapper;
-delete m_pTwipUnitConverter;
+m_pTableItemMapper.reset();
+m_pTwipUnitConverter.reset();
 }
 
 void SwXMLExport::ExportTableFormat( const SwFrameFormat& rFormat, sal_uInt32 
nAbsWidth )
 {
-static_cast(m_pTableItemMapper)
+static_cast(m_pTableItemMapper.get())
 ->SetAbsWidth( nAbsWidth );
 ExportFormat( rFormat, XML_TABLE );
 }
diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx
index 4077ce852723..9dbc82d0e92a 100644
--- a/sw/source/filter/xml/xmltble.cxx
+++ b/sw/source/filter/xml/xmltble.cxx
@@ -569,7 +569,7 @@ void SwXMLExport::ExportTableLinesAutoStyles( const 
SwTableLines& rLines,
 // pass 1: calculate columns
 SwXMLTableLines_Impl *pLines = new SwXMLTableLines_Impl( rLines );
 if( !m_pTableLines )
-m_pTableLines = new SwXMLTableLinesCache_Impl;
+m_pTableLines.reset(new SwXMLTableLinesCache_Impl);
 
 m_pTableLines->push_back( pLines );
 
@@ -995,10 +995,7 @@ void SwXMLExport::ExportTableLines( const SwTableLines& 
rLines,
 m_pTableLines->erase( it );
 
 if( m_pTableLines->empty() )
-{
-delete m_pTableLines ;
-m_pTableLines = nullptr;
-}
+m_pTableLines.reset();
 
 // pass 2: export columns
 const SwXMLTableColumns_Impl& rCols = pLines->GetColumns();
@@ -1201,7 +1198,7 @@ void SwXMLExport::DeleteTableLines()
 for (SwXMLTableLines_Impl* p : *m_pTableLines)
 delete p;
 m_pTableLines->clear();
-delete m_pTableLines;
+m_pTableLines.reset();
 }
 }
 
commit dba5dccfc5606ed6c6c888524460c9546143aaef
Author: Noel Grandin 
AuthorDate: Mon Jul 23 09:24:24 2018 +0200
Commit: Noel Grandin 
CommitDate: Tue Jul 24 08:32:56 2018 +0200

loplugin:useuniqueptr in SwHTMLWriter

Change-Id: I67f3dd615e798f8ac865b57332f6153530d81929
 

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

2018-07-20 Thread Libreoffice Gerrit user
 compilerplugins/clang/useuniqueptr.cxx |4 
 sc/source/filter/excel/xeescher.cxx|4 ++--
 sc/source/filter/inc/xcl97rec.hxx  |4 ++--
 sc/source/filter/xcl97/xcl97rec.cxx|   14 ++
 sc/source/ui/inc/tpview.hxx|2 +-
 sc/source/ui/optdlg/tpview.cxx |   11 +--
 6 files changed, 20 insertions(+), 19 deletions(-)

New commits:
commit 82a2a8f29e0f4bade59d26a7733f797188f1d57c
Author: Noel Grandin 
AuthorDate: Thu Jul 19 12:11:06 2018 +0200
Commit: Noel Grandin 
CommitDate: Fri Jul 20 09:00:02 2018 +0200

loplugin:useuniqueptr in XclObj

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

diff --git a/compilerplugins/clang/useuniqueptr.cxx 
b/compilerplugins/clang/useuniqueptr.cxx
index 3f563699e1f6..88bbec4a9d59 100644
--- a/compilerplugins/clang/useuniqueptr.cxx
+++ b/compilerplugins/clang/useuniqueptr.cxx
@@ -88,6 +88,10 @@ public:
 // SwHTMLParser::m_pPendStack
 if (fn == SRCDIR "/sw/source/filter/html/htmlcss1.cxx")
 return;
+// Visual Studio 2017 has trouble with these
+if (fn == SRCDIR "/comphelper/source/property/MasterPropertySet.cxx"
+|| fn == SRCDIR 
"/comphelper/source/property/MasterPropertySetInfo.cxx")
+return;
 
 
 TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
diff --git a/sc/source/filter/excel/xeescher.cxx 
b/sc/source/filter/excel/xeescher.cxx
index 855f28cd0433..b3e97ea16422 100644
--- a/sc/source/filter/excel/xeescher.cxx
+++ b/sc/source/filter/excel/xeescher.cxx
@@ -743,7 +743,7 @@ XclExpTbxControlObj::XclExpTbxControlObj( 
XclExpObjectManager& rRoot, Reference<
 /*  Be sure to construct the MSODRAWING record containing the
 ClientTextbox atom after the base OBJ's MSODRAWING record data is
 completed. */
-pClientTextbox = new XclExpMsoDrawing( mrEscherEx );
+pClientTextbox.reset( new XclExpMsoDrawing( mrEscherEx ) );
 mrEscherEx.AddAtom( 0, ESCHER_ClientTextbox );  // TXO record
 mrEscherEx.UpdateDffFragmentEnd();
 
@@ -756,7 +756,7 @@ XclExpTbxControlObj::XclExpTbxControlObj( 
XclExpObjectManager& rRoot, Reference<
 nXclFont = GetFontBuffer().Insert( aFontData, 
EXC_COLOR_CTRLTEXT );
 }
 
-pTxo = new XclTxo( aString, nXclFont );
+pTxo.reset( new XclTxo( aString, nXclFont ) );
 pTxo->SetHorAlign( (mnObjType == EXC_OBJTYPE_BUTTON) ? 
EXC_OBJ_HOR_CENTER : EXC_OBJ_HOR_LEFT );
 pTxo->SetVerAlign( EXC_OBJ_VER_CENTER );
 }
diff --git a/sc/source/filter/inc/xcl97rec.hxx 
b/sc/source/filter/inc/xcl97rec.hxx
index a8491bc44791..f97c9b72bf9d 100644
--- a/sc/source/filter/inc/xcl97rec.hxx
+++ b/sc/source/filter/inc/xcl97rec.hxx
@@ -87,8 +87,8 @@ class XclObj : public XclExpRecord
 protected:
 XclEscherEx&mrEscherEx;
 XclExpMsoDrawing*   pMsodrawing;
-XclExpMsoDrawing*   pClientTextbox;
-XclTxo* pTxo;
+std::unique_ptr pClientTextbox;
+std::unique_ptr pTxo;
 sal_uInt16  mnObjType;
 sal_uInt16  nObjId;
 sal_uInt16  nGrbit;
diff --git a/sc/source/filter/xcl97/xcl97rec.cxx 
b/sc/source/filter/xcl97/xcl97rec.cxx
index b8a9919ca5dd..2e3041662f1a 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -338,8 +338,6 @@ void XclExpObjList::ResetCounters()
 XclObj::XclObj( XclExpObjectManager& rObjMgr, sal_uInt16 nObjType, bool 
bOwnEscher ) :
 XclExpRecord( EXC_ID_OBJ, 26 ),
 mrEscherEx( rObjMgr.GetEscherEx() ),
-pClientTextbox( nullptr ),
-pTxo( nullptr ),
 mnObjType( nObjType ),
 nObjId(0),
 nGrbit( 0x6011 ),   // AutoLine, AutoFill, Printable, Locked
@@ -358,8 +356,8 @@ XclObj::~XclObj()
 {
 if ( !bFirstOnSheet )
 delete pMsodrawing;
-delete pClientTextbox;
-delete pTxo;
+pClientTextbox.reset();
+pTxo.reset();
 }
 
 void XclObj::ImplWriteAnchor( const SdrObject* pSdrObj, const 
tools::Rectangle* pChildAnchor )
@@ -410,10 +408,10 @@ void XclObj::SetText( const XclExpRoot& rRoot, const 
SdrTextObj& rObj )
 if ( !pClientTextbox )
 {
 mrEscherEx.UpdateDffFragmentEnd();
-pClientTextbox = new XclExpMsoDrawing( mrEscherEx );
+pClientTextbox.reset( new XclExpMsoDrawing( mrEscherEx ) );
 mrEscherEx.AddAtom( 0, ESCHER_ClientTextbox );// TXO record
 mrEscherEx.UpdateDffFragmentEnd();
-pTxo = new XclTxo( rRoot, rObj );
+pTxo.reset( new XclTxo( rRoot, rObj ) );
 }
 }
 
@@ -514,7 +512,7 @@ XclObjComment::XclObjComment( XclExpObjectManager& rObjMgr, 
const tools::Rectang
 {
 ProcessEscherObj( rObjMgr.GetRoot(), rRect, pCaption, bVisible);
 // TXO
-pTxo = new XclTxo( rObjMgr.GetRoot(), rEditObj, pCaption );
+pTxo 

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

2018-07-16 Thread Libreoffice Gerrit user
 compilerplugins/clang/useuniqueptr.cxx |6 +-
 sw/source/core/inc/UndoDraw.hxx|4 ++--
 sw/source/core/undo/undraw.cxx |   12 +---
 sw/source/core/undo/unovwr.cxx |   16 +++-
 4 files changed, 19 insertions(+), 19 deletions(-)

New commits:
commit 8bcea1698c6ec45923a7675ab1250204e952527d
Author: Noel Grandin 
AuthorDate: Fri Jul 13 11:36:09 2018 +0200
Commit: Noel Grandin 
CommitDate: Mon Jul 16 08:38:49 2018 +0200

loplugin:useuniqueptr in SwSdrUndo

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

diff --git a/sw/source/core/inc/UndoDraw.hxx b/sw/source/core/inc/UndoDraw.hxx
index 8229c2a8e77e..7df31833a46a 100644
--- a/sw/source/core/inc/UndoDraw.hxx
+++ b/sw/source/core/inc/UndoDraw.hxx
@@ -36,8 +36,8 @@ class SwDoc;
 // Undo for Draw Objects
 class SwSdrUndo : public SwUndo
 {
-SdrUndoAction* pSdrUndo;
-SdrMarkList* pMarkList; // MarkList for all selected SdrObjects
+std::unique_ptr pSdrUndo;
+std::unique_ptr pMarkList; // MarkList for all selected 
SdrObjects
 
 public:
 SwSdrUndo( SdrUndoAction* , const SdrMarkList* pMarkList, const SwDoc* 
pDoc );
diff --git a/sw/source/core/undo/undraw.cxx b/sw/source/core/undo/undraw.cxx
index f007d86eee08..9d164095ac5d 100644
--- a/sw/source/core/undo/undraw.cxx
+++ b/sw/source/core/undo/undraw.cxx
@@ -75,27 +75,25 @@ SwSdrUndo::SwSdrUndo( SdrUndoAction* pUndo, const 
SdrMarkList* pMrkLst, const Sw
 : SwUndo( SwUndoId::DRAWUNDO, pDoc ), pSdrUndo( pUndo )
 {
 if( pMrkLst && pMrkLst->GetMarkCount() )
-pMarkList = new SdrMarkList( *pMrkLst );
-else
-pMarkList = nullptr;
+pMarkList.reset( new SdrMarkList( *pMrkLst ) );
 }
 
 SwSdrUndo::~SwSdrUndo()
 {
-delete pSdrUndo;
-delete pMarkList;
+pSdrUndo.reset();
+pMarkList.reset();
 }
 
 void SwSdrUndo::UndoImpl(::sw::UndoRedoContext & rContext)
 {
 pSdrUndo->Undo();
-rContext.SetSelections(nullptr, pMarkList);
+rContext.SetSelections(nullptr, pMarkList.get());
 }
 
 void SwSdrUndo::RedoImpl(::sw::UndoRedoContext & rContext)
 {
 pSdrUndo->Redo();
-rContext.SetSelections(nullptr, pMarkList);
+rContext.SetSelections(nullptr, pMarkList.get());
 }
 
 OUString SwSdrUndo::GetComment() const
commit e7a252166e2d88b4e16f25a04f1d5072236e8c5e
Author: Noel Grandin 
AuthorDate: Fri Jul 13 11:27:23 2018 +0200
Commit: Noel Grandin 
CommitDate: Mon Jul 16 08:38:38 2018 +0200

loplugin:useuniqueptr in UndoTransliterate_Data

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

diff --git a/compilerplugins/clang/useuniqueptr.cxx 
b/compilerplugins/clang/useuniqueptr.cxx
index 0520546052a4..1cb392f718f8 100644
--- a/compilerplugins/clang/useuniqueptr.cxx
+++ b/compilerplugins/clang/useuniqueptr.cxx
@@ -70,11 +70,15 @@ public:
 if (fn == SRCDIR "/sc/source/ui/unoobj/funcuno.cxx")
 return;
 // SwAttrIter::m_pFont
-if (fn == SRCDIR "/sw/source/core/text/itratr.cxx")
+if (fn == SRCDIR "/sw/source/core/text/itratr.cxx"
+|| fn == SRCDIR "/sw/source/core/text/redlnitr.cxx")
 return;
 // SwWrongList
 if (fn == SRCDIR "/sw/source/core/text/wrong.cxx")
 return;
+// SwLineLayout::m_pNext
+if (fn == SRCDIR "/sw/source/core/text/porlay.cxx")
+return;
 
 TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
 }
diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx
index beafde6a4773..e2fb76a19f63 100644
--- a/sw/source/core/undo/unovwr.cxx
+++ b/sw/source/core/undo/unovwr.cxx
@@ -322,16 +322,15 @@ SwRewriter SwUndoOverwrite::GetRewriter() const
 struct UndoTransliterate_Data
 {
 OUStringsText;
-SwHistory*  pHistory;
-Sequence< sal_Int32 >*  pOffsets;
+std::unique_ptr pHistory;
+std::unique_ptr> pOffsets;
 sal_uLong   nNdIdx;
 sal_Int32  nStart, nLen;
 
 UndoTransliterate_Data( sal_uLong nNd, sal_Int32 nStt, sal_Int32 nStrLen, 
const OUString& rText )
-: sText( rText ), pHistory( nullptr ), pOffsets( nullptr ),
+: sText( rText ),
 nNdIdx( nNd ), nStart( nStt ), nLen( nStrLen )
 {}
-~UndoTransliterate_Data() { delete pOffsets; delete pHistory; }
 
 void SetChangeAtNode( SwDoc& rDoc );
 };
@@ -396,7 +395,7 @@ void SwUndoTransliterate::AddChanges( SwTextNode& rTNd,
 if( *p != ( nStart + n ))
 {
 // create the Offset array
-pNew->pOffsets = new Sequence  ( nLen );
+pNew->pOffsets.reset( new Sequence  ( nLen ) );
 sal_Int32* pIdx = pNew->pOffsets->getArray();
 p = pOffsets;
 long nMyOff, nNewVal = nStart;
@@ -428,16 +427,15 @@ void 

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

2018-07-13 Thread Noel Grandin
 compilerplugins/clang/useuniqueptr.cxx  |6 ++
 sw/source/core/inc/UndoTable.hxx|8 
 sw/source/core/txtnode/SwGrammarContact.cxx |   22 +-
 sw/source/core/undo/untbl.cxx   |   26 --
 4 files changed, 31 insertions(+), 31 deletions(-)

New commits:
commit c79bd83818dbd49dfd77ab82457057eff6a5d3d7
Author: Noel Grandin 
Date:   Thu Jul 12 16:57:07 2018 +0200

loplugin:useuniqueptr in SwUndoInsTable

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

diff --git a/sw/source/core/inc/UndoTable.hxx b/sw/source/core/inc/UndoTable.hxx
index 269644245dd0..88cece131191 100644
--- a/sw/source/core/inc/UndoTable.hxx
+++ b/sw/source/core/inc/UndoTable.hxx
@@ -48,10 +48,10 @@ class SwUndoInsTable : public SwUndo
 {
 OUString sTableNm;
 SwInsertTableOptions aInsTableOpts;
-SwDDEFieldType* pDDEFieldType;
-std::vector *pColWidth;
-SwRedlineData*  pRedlData;
-SwTableAutoFormat* pAutoFormat;
+std::unique_ptr pDDEFieldType;
+std::unique_ptr> pColWidth;
+std::unique_ptr  pRedlData;
+std::unique_ptr pAutoFormat;
 sal_uLong nSttNode;
 sal_uInt16 nRows, nCols;
 sal_uInt16 nAdjust;
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index 1f03b2e57441..927b489eba31 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -226,16 +226,16 @@ SwUndoInsTable::SwUndoInsTable( const SwPosition& rPos, 
sal_uInt16 nCl, sal_uInt
 {
 if( pColArr )
 {
-pColWidth = new std::vector(*pColArr);
+pColWidth.reset( new std::vector(*pColArr) );
 }
 if( pTAFormat )
-pAutoFormat = new SwTableAutoFormat( *pTAFormat );
+pAutoFormat.reset( new SwTableAutoFormat( *pTAFormat ) );
 
 // consider redline
 SwDoc& rDoc = *rPos.nNode.GetNode().GetDoc();
 if( rDoc.getIDocumentRedlineAccess().IsRedlineOn() )
 {
-pRedlData = new SwRedlineData( nsRedlineType_t::REDLINE_INSERT, 
rDoc.getIDocumentRedlineAccess().GetRedlineAuthor() );
+pRedlData.reset( new SwRedlineData( nsRedlineType_t::REDLINE_INSERT, 
rDoc.getIDocumentRedlineAccess().GetRedlineAuthor() ) );
 SetRedlineFlags( rDoc.getIDocumentRedlineAccess().GetRedlineFlags() );
 }
 
@@ -244,10 +244,10 @@ SwUndoInsTable::SwUndoInsTable( const SwPosition& rPos, 
sal_uInt16 nCl, sal_uInt
 
 SwUndoInsTable::~SwUndoInsTable()
 {
-delete pDDEFieldType;
-delete pColWidth;
-delete pRedlData;
-delete pAutoFormat;
+pDDEFieldType.reset();
+pColWidth.reset();
+pRedlData.reset();
+pAutoFormat.reset();
 }
 
 void SwUndoInsTable::UndoImpl(::sw::UndoRedoContext & rContext)
@@ -280,9 +280,8 @@ void SwUndoInsTable::UndoImpl(::sw::UndoRedoContext & 
rContext)
 }
 
 sTableNm = pTableNd->GetTable().GetFrameFormat()->GetName();
-if( dynamic_cast(>GetTable()) != nullptr )
-pDDEFieldType = 
static_cast(static_cast(pTableNd->GetTable()).
-GetDDEFieldType()->Copy());
+if( auto pDDETable = dynamic_cast(>GetTable()) )
+pDDEFieldType.reset( 
static_cast(pDDETable->GetDDEFieldType()->Copy()) );
 
 rDoc.GetNodes().Delete( aIdx, pTableNd->EndOfSectionIndex() -
 aIdx.GetIndex() + 1 );
@@ -300,7 +299,7 @@ void SwUndoInsTable::RedoImpl(::sw::UndoRedoContext & 
rContext)
 SwPosition const aPos(SwNodeIndex(rDoc.GetNodes(), nSttNode));
 const SwTable* pTable = rDoc.InsertTable( aInsTableOpts, aPos, nRows, 
nCols,
 nAdjust,
-pAutoFormat, pColWidth );
+pAutoFormat.get(), pColWidth.get() 
);
 static_cast(pTable->GetFrameFormat())->SetName( sTableNm );
 SwTableNode* pTableNode = rDoc.GetNodes()[nSttNode]->GetTableNode();
 
@@ -310,8 +309,7 @@ void SwUndoInsTable::RedoImpl(::sw::UndoRedoContext & 
rContext)
 *pDDEFieldType));
 std::unique_ptr pDDETable(new SwDDETable( 
pTableNode->GetTable(), pNewType ));
 pTableNode->SetNewTable( std::move(pDDETable) );
-delete pDDEFieldType;
-pDDEFieldType = nullptr;
+pDDEFieldType.reset();
 }
 
 if( (pRedlData && IDocumentRedlineAccess::IsRedlineOn( GetRedlineFlags() 
)) ||
@@ -340,7 +338,7 @@ void SwUndoInsTable::RepeatImpl(::sw::RepeatContext & 
rContext)
 {
 rContext.GetDoc().InsertTable(
 aInsTableOpts, *rContext.GetRepeatPaM().GetPoint(),
-nRows, nCols, nAdjust, pAutoFormat, pColWidth );
+nRows, nCols, nAdjust, pAutoFormat.get(), pColWidth.get() );
 }
 
 SwRewriter SwUndoInsTable::GetRewriter() const
commit c75f597722608732d991619f550063e7c5d7c485
Author: Noel Grandin 
Date:   Thu Jul 12 

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang editeng/source emfio/inc emfio/source filter/source include/editeng include/svx include/vcl oox/source reportdesign/source sc/source s

2018-07-02 Thread Noel Grandin
 compilerplugins/clang/unusedfields.cxx  |   16 +-
 compilerplugins/clang/unusedfields.only-used-in-constructor.results |   44 
+++---
 compilerplugins/clang/unusedfields.readonly.results |   66 
++
 compilerplugins/clang/unusedfields.untouched.results|   54 
++--
 compilerplugins/clang/unusedfields.writeonly.results|   50 
---
 editeng/source/outliner/outliner.cxx|   11 -
 editeng/source/outliner/outlobj.cxx |5 
 editeng/source/outliner/overflowingtxt.cxx  |   18 +-
 editeng/source/uno/unoforou.cxx |3 
 emfio/inc/wmfreader.hxx |1 
 emfio/source/reader/wmfreader.cxx   |3 
 filter/source/msfilter/msdffimp.cxx |8 -
 filter/source/msfilter/svdfppt.cxx  |6 
 include/editeng/outliner.hxx|4 
 include/editeng/outlobj.hxx |1 
 include/editeng/overflowingtxt.hxx  |   16 +-
 include/svx/colorbox.hxx|2 
 include/svx/fntctrl.hxx |2 
 include/svx/svdoashp.hxx|2 
 include/svx/svdobj.hxx  |4 
 include/svx/svdomeas.hxx|2 
 include/svx/svdotable.hxx   |2 
 include/svx/svdotext.hxx|6 
 include/svx/svdtext.hxx |2 
 include/vcl/window.hxx  |3 
 oox/source/export/drawingml.cxx |2 
 oox/source/export/vmlexport.cxx |2 
 reportdesign/source/core/sdr/ReportDrawPage.cxx |1 
 sc/source/core/data/postit.cxx  |7 -
 sc/source/filter/excel/xiescher.cxx |5 
 sc/source/ui/unoobj/editsrc.cxx |4 
 sd/inc/textapi.hxx  |2 
 sd/source/core/drawdoc4.cxx |6 
 sd/source/core/sdpage.cxx   |8 -
 sd/source/core/text/textapi.cxx |8 -
 sd/source/filter/xml/sdtransform.cxx|1 
 sd/source/filter/xml/sdxmlwrp.cxx   |1 
 sd/source/ui/annotations/annotationwindow.cxx   |4 
 sd/source/ui/dlg/headerfooterdlg.cxx|1 
 sd/source/ui/docshell/docshel4.cxx  |5 
 sd/source/ui/func/fuexpand.cxx  |   11 -
 sd/source/ui/func/fuinsert.cxx  |1 
 sd/source/ui/func/fuinsfil.cxx  |5 
 sd/source/ui/func/fumorph.cxx   |1 
 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx  |3 
 sd/source/ui/slidesorter/view/SlideSorterView.cxx   |2 
 sd/source/ui/view/DocumentRenderer.cxx  |9 -
 sd/source/ui/view/drviews2.cxx  |4 
 sd/source/ui/view/drviews7.cxx  |3 
 sd/source/ui/view/drviews8.cxx  |1 
 sd/source/ui/view/drviews9.cxx  |1 
 sd/source/ui/view/drviewse.cxx  |5 
 sd/source/ui/view/outlnvsh.cxx  |   17 +-
 sd/source/ui/view/outlview.cxx  |3 
 sd/source/ui/view/sdview.cxx|1 
 sd/source/ui/view/sdview4.cxx   |1 
 sd/source/ui/view/viewshe2.cxx  |1 
 sfx2/inc/bitset.hxx |1 
 sfx2/source/bastyp/bitset.cxx   |3 
 svx/source/accessibility/AccessibleShape.cxx|2 
 svx/source/customshapes/EnhancedCustomShapeEngine.cxx   |3 
 svx/source/dialog/fntctrl.cxx   |6 
 svx/source/inc/cell.hxx |4 
 svx/source/sdr/primitive2d/sdrattributecreator.cxx  |3 
 

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

2018-05-28 Thread Noel Grandin
 compilerplugins/clang/useuniqueptr.cxx |3 +++
 extensions/source/abpilot/abpfinalpage.cxx |6 +++---
 extensions/source/abpilot/abpfinalpage.hxx |2 +-
 extensions/source/scanner/grid.cxx |   12 ++--
 4 files changed, 13 insertions(+), 10 deletions(-)

New commits:
commit 0f30c9a1ef185a76c353349f497e576cfce0cd13
Author: Noel Grandin 
Date:   Thu May 17 14:51:04 2018 +0200

loplugin:useuniqueptr in GridWindow

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

diff --git a/compilerplugins/clang/useuniqueptr.cxx 
b/compilerplugins/clang/useuniqueptr.cxx
index f09701c03ca6..4dc5b85dbf3b 100644
--- a/compilerplugins/clang/useuniqueptr.cxx
+++ b/compilerplugins/clang/useuniqueptr.cxx
@@ -56,6 +56,9 @@ public:
 // can't use std::set> until C++14
 if (fn == SRCDIR "/editeng/source/misc/svxacorr.cxx")
 return;
+// horrible horrible spawn of evil ownership and deletion here
+if (fn == SRCDIR "/sfx2/source/view/ipclient.cxx")
+return;
 
 TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
 }
diff --git a/extensions/source/scanner/grid.cxx 
b/extensions/source/scanner/grid.cxx
index 30a325bd3ac0..b6be058570e9 100644
--- a/extensions/source/scanner/grid.cxx
+++ b/extensions/source/scanner/grid.cxx
@@ -80,7 +80,7 @@ class GridWindow : public vcl::Window
 double* m_pXValues;
 double* m_pOrigYValues;
 int m_nValues;
-double* m_pNewYValues;
+std::unique_ptr m_pNewYValues;
 
 sal_uInt16  m_BmOffX;
 sal_uInt16  m_BmOffY;
@@ -128,7 +128,7 @@ public:
 
 void setBoundings( double fMinX, double fMinY, double fMaxX, double fMaxY 
);
 
-double* getNewYValues() { return m_pNewYValues; }
+double* getNewYValues() { return m_pNewYValues.get(); }
 
 void ChangeMode(ResetType nType);
 
@@ -172,8 +172,8 @@ void GridWindow::Init(double* pXValues, double* pYValues, 
int nValues, bool bCut
 
 if (m_pOrigYValues && m_nValues)
 {
-m_pNewYValues = new double[ m_nValues ];
-memcpy( m_pNewYValues, m_pOrigYValues, sizeof( double ) * m_nValues );
+m_pNewYValues.reset(new double[ m_nValues ]);
+memcpy( m_pNewYValues.get(), m_pOrigYValues, sizeof( double ) * 
m_nValues );
 }
 
 setBoundings( 0, 0, 1023, 1023 );
@@ -238,7 +238,7 @@ GridWindow::~GridWindow()
 
 void GridWindow::dispose()
 {
-delete [] m_pNewYValues;
+m_pNewYValues.reset();
 vcl::Window::dispose();
 }
 
@@ -657,7 +657,7 @@ void GridWindow::ChangeMode(ResetType nType)
 case ResetType::RESET:
 {
 if( m_pOrigYValues && m_pNewYValues && m_nValues )
-memcpy( m_pNewYValues, m_pOrigYValues, 
m_nValues*sizeof(double) );
+memcpy( m_pNewYValues.get(), m_pOrigYValues, 
m_nValues*sizeof(double) );
 }
 break;
 case ResetType::EXPONENTIAL:
commit 34652fc397757ddb2cc9f1a3646bed2d031998c1
Author: Noel Grandin 
Date:   Thu May 17 14:50:37 2018 +0200

loplugin:useuniqueptr in abp::FinalPage

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

diff --git a/extensions/source/abpilot/abpfinalpage.cxx 
b/extensions/source/abpilot/abpfinalpage.cxx
index 73d0cdfe58a6..7bd03896f0c3 100644
--- a/extensions/source/abpilot/abpfinalpage.cxx
+++ b/extensions/source/abpilot/abpfinalpage.cxx
@@ -53,8 +53,8 @@ namespace abp
 get(m_pLocationLabel, "locationft");
 get(m_pName, "name");
 get(m_pDuplicateNameError, "warning");
-m_pLocationController = new 
svx::DatabaseLocationInputController(_pParent->getORB(),
-*m_pLocation, *m_pBrowse);
+m_pLocationController.reset( new 
svx::DatabaseLocationInputController(_pParent->getORB(),
+*m_pLocation, *m_pBrowse) );
 
 m_pName->SetModifyHdl( LINK(this, FinalPage, OnNameModified) );
 m_pLocation->SetModifyHdl( LINK(this, FinalPage, OnNameModified) );
@@ -72,7 +72,7 @@ namespace abp
 
 void FinalPage::dispose()
 {
-delete m_pLocationController;
+m_pLocationController.reset();
 m_pLocation.clear();
 m_pBrowse.clear();
 m_pRegisterName.clear();
diff --git a/extensions/source/abpilot/abpfinalpage.hxx 
b/extensions/source/abpilot/abpfinalpage.hxx
index 0c92487ed29a..595806a77570 100644
--- a/extensions/source/abpilot/abpfinalpage.hxx
+++ b/extensions/source/abpilot/abpfinalpage.hxx
@@ -43,7 +43,7 @@ namespace abp
 VclPtr m_pName;
 VclPtr

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

2018-05-11 Thread Noel Grandin
 compilerplugins/clang/datamembershadow.cxx|4 
 cui/source/inc/macropg.hxx|2 +-
 filter/source/graphicfilter/idxf/dxfentrd.cxx |4 
 filter/source/graphicfilter/idxf/dxfentrd.hxx |2 --
 4 files changed, 1 insertion(+), 11 deletions(-)

New commits:
commit 026077340dc5659ab4428691d4cd265d118eb726
Author: Noel Grandin 
Date:   Thu May 10 11:46:20 2018 +0200

loplugin:datamembershadow in SvxMacroTabPage_

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

diff --git a/compilerplugins/clang/datamembershadow.cxx 
b/compilerplugins/clang/datamembershadow.cxx
index 0262eca2d8bd..f92d748eaa25 100644
--- a/compilerplugins/clang/datamembershadow.cxx
+++ b/compilerplugins/clang/datamembershadow.cxx
@@ -53,8 +53,6 @@ bool DataMemberShadow::VisitFieldDecl(FieldDecl const * 
fieldDecl)
 return true;
 if (loplugin::isSamePathname(aFileName, SRCDIR 
"/cppcanvas/source/mtfrenderer/emfplus.cxx"))
 return true;
-if (loplugin::isSamePathname(aFileName, SRCDIR 
"/cui/source/customize/eventdlg.hxx"))
-return true;
 if (loplugin::isSamePathname(aFileName, SRCDIR 
"/include/sfx2/recentdocsview.hxx"))
 return true;
 if (loplugin::isSamePathname(aFileName, SRCDIR 
"/include/sfx2/templatelocalview.hxx"))
diff --git a/cui/source/inc/macropg.hxx b/cui/source/inc/macropg.hxx
index cd6ecb5533e1..2020c3e4f0bf 100644
--- a/cui/source/inc/macropg.hxx
+++ b/cui/source/inc/macropg.hxx
@@ -63,9 +63,9 @@ class SvxMacroTabPage_ : public SfxTabPage
 
 static long GenericHandler_Impl( SvxMacroTabPage_* pThis, PushButton* pBtn 
);
 
+css::uno::Reference< css::container::XNameReplace > m_xAppEvents;
 protected:
 SvxMacroTabPage_Impl*  mpImpl;
-css::uno::Reference< css::container::XNameReplace > m_xAppEvents;
 css::uno::Reference< css::container::XNameReplace > m_xDocEvents;
 css::uno::Reference< css::util::XModifiable > m_xModifiable;
 EventsHash m_appEventsHash;
commit 19156dccf7040094ce682081545213abb321c559
Author: Noel Grandin 
Date:   Thu May 10 11:41:57 2018 +0200

loplugin:datamembershadow in DXF filter

depending on which version of the DXF file format you look at, elevation
can be either group code 30 or group code 38. But since neither of these
fields is actually in use, lets just remove both until someone has an
actual use-case for them and can test against real data.

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

diff --git a/compilerplugins/clang/datamembershadow.cxx 
b/compilerplugins/clang/datamembershadow.cxx
index c4e9370b36f1..0262eca2d8bd 100644
--- a/compilerplugins/clang/datamembershadow.cxx
+++ b/compilerplugins/clang/datamembershadow.cxx
@@ -59,8 +59,6 @@ bool DataMemberShadow::VisitFieldDecl(FieldDecl const * 
fieldDecl)
 return true;
 if (loplugin::isSamePathname(aFileName, SRCDIR 
"/include/sfx2/templatelocalview.hxx"))
 return true;
-if (loplugin::isSamePathname(aFileName, SRCDIR 
"/filter/source/graphicfilter/idxf/dxfentrd.hxx"))
-return true;
 if (loplugin::isSamePathname(aFileName, SRCDIR 
"/sc/source/ui/vba/vbastyles.hxx"))
 return true;
 if (loplugin::isSamePathname(aFileName, SRCDIR "/sd/inc/Outliner.hxx"))
diff --git a/filter/source/graphicfilter/idxf/dxfentrd.cxx 
b/filter/source/graphicfilter/idxf/dxfentrd.cxx
index 7a9074a0a770..bcb698994831 100644
--- a/filter/source/graphicfilter/idxf/dxfentrd.cxx
+++ b/filter/source/graphicfilter/idxf/dxfentrd.cxx
@@ -29,7 +29,6 @@ DXFBasicEntity::DXFBasicEntity(DXFEntityType eThisType)
 {
 eType=eThisType;
 pSucc=nullptr;
-fElevation=0;
 fThickness=0;
 nColor=256;
 nSpace=0;
@@ -49,7 +48,6 @@ void DXFBasicEntity::EvaluateGroup(DXFGroupReader & rDGR)
 {
 case   8: m_sLayer = rDGR.GetS(); break;
 case   6: m_sLineType = rDGR.GetS(); break;
-case  38: fElevation=rDGR.GetF(); break;
 case  39: fThickness=rDGR.GetF(); break;
 case  62: nColor=rDGR.GetI(); break;
 case  67: nSpace=rDGR.GetI(); break;
@@ -374,7 +372,6 @@ void DXFAttribEntity::EvaluateGroup(DXFGroupReader & rDGR)
 
 DXFPolyLineEntity::DXFPolyLineEntity() : DXFBasicEntity(DXF_POLYLINE)
 {
-fElevation=0.0;
 nFlags=0;
 fSWidth=0.0;
 fEWidth=0.0;
@@ -388,7 +385,6 @@ DXFPolyLineEntity::DXFPolyLineEntity() : 
DXFBasicEntity(DXF_POLYLINE)
 void DXFPolyLineEntity::EvaluateGroup(DXFGroupReader & rDGR)
 {
 switch (rDGR.GetG()) {
-case 30: fElevation=rDGR.GetF(); break;
 case 70: nFlags=rDGR.GetI(); break;
 

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

2018-05-03 Thread Noel Grandin
 compilerplugins/clang/test/useuniqueptr.cxx|   10 ++
 compilerplugins/clang/useuniqueptr.cxx |   13 +++--
 connectivity/source/drivers/dbase/DIndex.cxx   |6 +-
 connectivity/source/drivers/dbase/DIndexes.cxx |4 ++--
 connectivity/source/drivers/dbase/DTable.cxx   |6 ++
 connectivity/source/drivers/file/FTable.cxx|   10 --
 connectivity/source/inc/dbase/DIndex.hxx   |2 +-
 connectivity/source/inc/dbase/DTable.hxx   |2 +-
 connectivity/source/inc/file/FTable.hxx|4 ++--
 9 files changed, 34 insertions(+), 23 deletions(-)

New commits:
commit b66ba0f0f297f7190f8d969486e07ede52987188
Author: Noel Grandin 
Date:   Wed May 2 15:42:39 2018 +0200

make createStream_simpleError return std::unique_ptr

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

diff --git a/connectivity/source/drivers/dbase/DIndex.cxx 
b/connectivity/source/drivers/dbase/DIndex.cxx
index e07402af2198..9468c3d3ad25 100644
--- a/connectivity/source/drivers/dbase/DIndex.cxx
+++ b/connectivity/source/drivers/dbase/DIndex.cxx
@@ -310,11 +310,7 @@ void ODbaseIndex::Release(bool bSave)
 
 void ODbaseIndex::closeImpl()
 {
-if(m_pFileStream)
-{
-delete m_pFileStream;
-m_pFileStream = nullptr;
-}
+m_pFileStream.reset();
 }
 
 ONDXPage* ODbaseIndex::CreatePage(sal_uInt32 nPagePos, ONDXPage* pParent, bool 
bLoad)
diff --git a/connectivity/source/drivers/dbase/DIndexes.cxx 
b/connectivity/source/drivers/dbase/DIndexes.cxx
index ee6a12f1906d..643c6740 100644
--- a/connectivity/source/drivers/dbase/DIndexes.cxx
+++ b/connectivity/source/drivers/dbase/DIndexes.cxx
@@ -52,7 +52,7 @@ sdbcx::ObjectType ODbaseIndexes::createObject(const OUString& 
_rName)
 }
 
 sdbcx::ObjectType xRet;
-SvStream* pFileStream = 
::connectivity::file::OFileTable::createStream_simpleError(sFile, 
StreamMode::READ | StreamMode::NOCREATE | StreamMode::SHARE_DENYWRITE);
+std::unique_ptr pFileStream = 
::connectivity::file::OFileTable::createStream_simpleError(sFile, 
StreamMode::READ | StreamMode::NOCREATE | StreamMode::SHARE_DENYWRITE);
 if(pFileStream)
 {
 pFileStream->SetEndian(SvStreamEndian::LITTLE);
@@ -61,7 +61,7 @@ sdbcx::ObjectType ODbaseIndexes::createObject(const OUString& 
_rName)
 
 pFileStream->Seek(0);
 ReadHeader(*pFileStream, aHeader);
-delete pFileStream;
+pFileStream.reset();
 
 ODbaseIndex* pIndex = new ODbaseIndex(m_pTable,aHeader,_rName);
 xRet = pIndex;
diff --git a/connectivity/source/drivers/dbase/DTable.cxx 
b/connectivity/source/drivers/dbase/DTable.cxx
index 9bcec1816b39..87be422f133c 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -978,8 +978,7 @@ void ODbaseTable::FileClose()
 if (m_pMemoStream && m_pMemoStream->IsWritable())
 m_pMemoStream->Flush();
 
-delete m_pMemoStream;
-m_pMemoStream = nullptr;
+m_pMemoStream.reset();
 
 ODbaseTable_BASE::FileClose();
 }
@@ -1383,8 +1382,7 @@ bool ODbaseTable::CreateMemoFile(const INetURLObject& 
aFile)
 (*m_pMemoStream).WriteUInt32( 1 );  // pointer to the 
first free block
 
 m_pMemoStream->Flush();
-delete m_pMemoStream;
-m_pMemoStream = nullptr;
+m_pMemoStream.reset();
 return true;
 }
 
diff --git a/connectivity/source/drivers/file/FTable.cxx 
b/connectivity/source/drivers/file/FTable.cxx
index 9ddadb19b86e..6358874f93f7 100644
--- a/connectivity/source/drivers/file/FTable.cxx
+++ b/connectivity/source/drivers/file/FTable.cxx
@@ -155,8 +155,7 @@ void OFileTable::FileClose()
 if (m_pFileStream && m_pFileStream->IsWritable())
 m_pFileStream->Flush();
 
-delete m_pFileStream;
-m_pFileStream = nullptr;
+m_pFileStream.reset();
 
 if (m_pBuffer)
 {
@@ -191,13 +190,12 @@ void OFileTable::dropColumn(sal_Int32 /*_nPos*/)
 }
 
 
-SvStream* OFileTable::createStream_simpleError( const OUString& _rFileName, 
StreamMode _eOpenMode)
+std::unique_ptr OFileTable::createStream_simpleError( const 
OUString& _rFileName, StreamMode _eOpenMode)
 {
-SvStream* pReturn = ::utl::UcbStreamHelper::CreateStream( _rFileName, 
_eOpenMode, bool(_eOpenMode & StreamMode::NOCREATE));
+std::unique_ptr pReturn(::utl::UcbStreamHelper::CreateStream( 
_rFileName, _eOpenMode, bool(_eOpenMode & StreamMode::NOCREATE)));
 if (pReturn && (ERRCODE_NONE != pReturn->GetErrorCode()))
 {
-delete pReturn;
-pReturn = nullptr;
+pReturn.reset();
 }
 return pReturn;
 }
diff --git a/connectivity/source/inc/dbase/DIndex.hxx 
b/connectivity/source/inc/dbase/DIndex.hxx
index 6e4356c4c3ee..bcb273aec506 100644
--- a/connectivity/source/inc/dbase/DIndex.hxx
+++ 

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

2018-04-29 Thread Noel Grandin
 compilerplugins/clang/test/useuniqueptr.cxx |   11 ++
 compilerplugins/clang/useuniqueptr.cxx  |   31 +
 include/svtools/calendar.hxx|9 +---
 svtools/source/control/calendar.cxx |   51 +++-
 4 files changed, 59 insertions(+), 43 deletions(-)

New commits:
commit 89f470752d0ecc2a389aa8f630800a195a341a6d
Author: Noel Grandin 
Date:   Tue Apr 24 13:35:12 2018 +0200

loplugin:useuniqueptr in Calendar

and remove some unused fields

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

diff --git a/include/svtools/calendar.hxx b/include/svtools/calendar.hxx
index b140ca01a64f..753ecad1f606 100644
--- a/include/svtools/calendar.hxx
+++ b/include/svtools/calendar.hxx
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 class MouseEvent;
@@ -124,8 +125,8 @@ typedef std::set IntDateSet;
 
 class SVT_DLLPUBLIC Calendar final : public Control
 {
-IntDateSet* mpSelectTable;
-IntDateSet* mpOldSelectTable;
+std::unique_ptr mpSelectTable;
+std::unique_ptr mpOldSelectTable;
 OUStringmaDayTexts[31];
 OUStringmaDayText;
 OUStringmaWeekText;
@@ -144,9 +145,6 @@ class SVT_DLLPUBLIC Calendar final : public Control
 DatemaDropDate;
 Color   maSelColor;
 Color   maOtherColor;
-Color*  mpStandardColor;
-Color*  mpSaturdayColor;
-Color*  mpSundayColor;
 sal_Int32   mnDayCount;
 longmnDaysOffX;
 longmnWeekDayOffY;
@@ -188,7 +186,6 @@ class SVT_DLLPUBLIC Calendar final : public Control
 SVT_DLLPRIVATE void ImplDrawSpin(vcl::RenderContext& 
rRenderContext);
 SVT_DLLPRIVATE void ImplDrawDate(vcl::RenderContext& 
rRenderContext, long nX, long nY,
  sal_uInt16 nDay, sal_uInt16 
nMonth, sal_Int16 nYear,
- DayOfWeek eDayOfWeek,
  bool bOther, sal_Int32 nToday);
 SVT_DLLPRIVATE void ImplDraw(vcl::RenderContext& rRenderContext);
 SVT_DLLPRIVATE void ImplUpdateDate( const Date& rDate );
diff --git a/svtools/source/control/calendar.cxx 
b/svtools/source/control/calendar.cxx
index 3771de6a8f7d..57af295f0a6d 100644
--- a/svtools/source/control/calendar.cxx
+++ b/svtools/source/control/calendar.cxx
@@ -69,11 +69,7 @@ static void ImplCalendarSelectDate( IntDateSet* pTable, 
const Date& rDate, bool
 
 void Calendar::ImplInit( WinBits nWinStyle )
 {
-mpSelectTable   = new IntDateSet;
-mpOldSelectTable= nullptr;
-mpStandardColor = nullptr;
-mpSaturdayColor = nullptr;
-mpSundayColor   = nullptr;
+mpSelectTable.reset(new IntDateSet);
 mnDayCount  = 0;
 mnWinStyle  = nWinStyle;
 mnFirstYear = 0;
@@ -107,7 +103,7 @@ void Calendar::ImplInit( WinBits nWinStyle )
 }
 
 SetFirstDate( maCurDate );
-ImplCalendarSelectDate( mpSelectTable, maCurDate, true );
+ImplCalendarSelectDate( mpSelectTable.get(), maCurDate, true );
 
 // Sonstige Strings erzeugen
 maDayText = SvtResId(STR_SVT_CALENDAR_DAY);
@@ -164,12 +160,8 @@ Calendar::~Calendar()
 
 void Calendar::dispose()
 {
-delete mpStandardColor;
-delete mpSaturdayColor;
-delete mpSundayColor;
-
-delete mpSelectTable;
-delete mpOldSelectTable;
+mpSelectTable.reset();
+mpOldSelectTable.reset();
 Control::dispose();
 }
 
@@ -544,10 +536,9 @@ void Calendar::ImplDrawSpin(vcl::RenderContext& 
rRenderContext )
 void Calendar::ImplDrawDate(vcl::RenderContext& rRenderContext,
 long nX, long nY,
 sal_uInt16 nDay, sal_uInt16 nMonth, sal_Int16 
nYear,
-DayOfWeek eDayOfWeek,
 bool bOther, sal_Int32 nToday )
 {
-Color* pTextColor = nullptr;
+Color const * pTextColor = nullptr;
 const OUString& rDay = maDayTexts[nDay - 1];
 tools::Rectangle aDateRect(nX, nY, nX + mnDayWidth - 1, nY + mnDayHeight - 
1);
 
@@ -571,15 +562,6 @@ void Calendar::ImplDrawDate(vcl::RenderContext& 
rRenderContext,
 pTextColor = 
 else if (bOther)
 pTextColor = 
-else
-{
-if (eDayOfWeek == SATURDAY)
-pTextColor = mpSaturdayColor;
-else if (eDayOfWeek == SUNDAY)
-pTextColor = mpSundayColor;
-if (!pTextColor)
-pTextColor = mpStandardColor;
-}
 
 if (bFocus)
 HideFocus();
@@ -756,14 +738,13 @@ void Calendar::ImplDraw(vcl::RenderContext& 
rRenderContext)
 nDeltaX = nDayX + (nDay * 

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang include/vcl vcl/source vcl/unx vcl/win

2018-04-27 Thread Caolán McNamara
 compilerplugins/clang/unusedenumconstants.writeonly.results |2 
 include/vcl/button.hxx  |3 
 include/vcl/settings.hxx|3 
 include/vcl/window.hxx  |3 
 vcl/source/app/settings.cxx |   16 
 vcl/source/control/button.cxx   |   40 +---
 vcl/unx/gtk/salnativewidgets-gtk.cxx|1 
 vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx   |   15 
 vcl/unx/kde4/KDESalFrame.cxx|1 
 vcl/unx/kde5/KDE5SalFrame.cxx   |1 
 vcl/win/window/salframe.cxx |1 
 11 files changed, 71 insertions(+), 15 deletions(-)

New commits:
commit 42494bfdd029c69cca7f0979a0ed3ab920efe45e
Author: Caolán McNamara 
Date:   Fri Apr 27 14:04:13 2018 +0100

Resolves: tdf#117178 distinguish between pressed vs unpressed rollover

Change-Id: If7964c6584d83609ad08dca7e669b85dfadf036e
Reviewed-on: https://gerrit.libreoffice.org/53563
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx
index b8cc012414ce..491831e147d9 100644
--- a/include/vcl/settings.hxx
+++ b/include/vcl/settings.hxx
@@ -276,6 +276,9 @@ public:
 voidSetButtonRolloverTextColor( const Color& 
rColor );
 const Color&GetButtonRolloverTextColor() const;
 
+voidSetButtonPressedRolloverTextColor( const 
Color& rColor );
+const Color&GetButtonPressedRolloverTextColor() const;
+
 voidSetRadioCheckTextColor( const Color& 
rColor );
 const Color&GetRadioCheckTextColor() const;
 
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index f9eaf47ce645..3c5d150df79c 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -94,6 +94,7 @@ struct ImplStyleData
 Color   maAlternatingRowColor;
 Color   maButtonTextColor;
 Color   maButtonRolloverTextColor;
+Color   maButtonPressedRolloverTextColor;
 Color   maCheckedColor;
 Color   maDarkShadowColor;
 Color   maDeactiveBorderColor;
@@ -562,6 +563,7 @@ ImplStyleData::ImplStyleData( const ImplStyleData& rData ) :
 maAlternatingRowColor( rData.maAlternatingRowColor ),
 maButtonTextColor( rData.maButtonTextColor ),
 maButtonRolloverTextColor( rData.maButtonRolloverTextColor ),
+maButtonPressedRolloverTextColor( rData.maButtonPressedRolloverTextColor ),
 maCheckedColor( rData.maCheckedColor ),
 maDarkShadowColor( rData.maDarkShadowColor ),
 maDeactiveBorderColor( rData.maDeactiveBorderColor ),
@@ -703,6 +705,7 @@ void ImplStyleData::SetStandardStyles()
 maDarkShadowColor   = COL_BLACK;
 maButtonTextColor   = COL_BLACK;
 maButtonRolloverTextColor   = COL_BLACK;
+maButtonPressedRolloverTextColor = COL_BLACK;
 maRadioCheckTextColor   = COL_BLACK;
 maGroupTextColor= COL_BLACK;
 maLabelTextColor= COL_BLACK;
@@ -876,6 +879,19 @@ StyleSettings::GetButtonRolloverTextColor() const
 }
 
 void
+StyleSettings::SetButtonPressedRolloverTextColor( const Color& rColor )
+{
+CopyData();
+mxData->maButtonPressedRolloverTextColor = rColor;
+}
+
+const Color&
+StyleSettings::GetButtonPressedRolloverTextColor() const
+{
+return mxData->maButtonPressedRolloverTextColor;
+}
+
+void
 StyleSettings::SetRadioCheckTextColor( const Color& rColor )
 {
 CopyData();
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 4bdc10f40010..ebd5aaee80a9 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -836,11 +836,21 @@ void PushButton::ImplDrawPushButtonContent(OutputDevice* 
pDev, DrawFlags nDrawFl
 if ( nDrawFlags & DrawFlags::Mono )
 aColor = COL_BLACK;
 else if( (nButtonFlags & DrawButtonFlags::Highlight) && 
IsNativeControlSupported(ControlType::Pushbutton, ControlPart::Entire) )
-aColor = rStyleSettings.GetButtonRolloverTextColor();
+{
+if (nButtonFlags & DrawButtonFlags::Pressed)
+aColor = rStyleSettings.GetButtonPressedRolloverTextColor();
+else
+aColor = rStyleSettings.GetButtonRolloverTextColor();
+}
 else if ( IsControlForeground() )
 aColor = GetControlForeground();
 else if( nButtonFlags & DrawButtonFlags::Highlight )
-aColor = rStyleSettings.GetButtonRolloverTextColor();
+{
+if 

  1   2   >