[Libreoffice-commits] core.git: cui/source

2018-10-07 Thread Libreoffice Gerrit user
 cui/source/customize/cfg.cxx |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 307c29ecbcd63b787374c5c2aefabdc4353d2723
Author: Muhammet Kara 
AuthorDate: Mon Oct 8 01:08:25 2018 +0300
Commit: Muhammet Kara 
CommitDate: Mon Oct 8 08:42:23 2018 +0200

tdf#119266: Nodes don't expand on double click in the Customize dialog

Change-Id: I8b6667dc631df2fd38a8a2d99668b4a2336801b6
Reviewed-on: https://gerrit.libreoffice.org/61504
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 

diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 3c4b266f240b..af8fea0455f7 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -1752,8 +1752,12 @@ IMPL_LINK( SvxConfigPage, MoveHdl, Button *, pButton, 
void )
 IMPL_LINK_NOARG( SvxConfigPage, FunctionDoubleClickHdl, SvTreeListBox *, bool )
 {
 if ( m_pAddCommandButton->IsEnabled() )
+{
 m_pAddCommandButton->Click();
-return false;
+return false;
+}
+else
+return true;
 }
 
 IMPL_LINK_NOARG( SvxConfigPage, SelectFunctionHdl, SvTreeListBox *, void )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/inc vcl/Library_vclplug_qt5.mk vcl/qt5

2018-10-07 Thread Libreoffice Gerrit user
 vcl/Library_vclplug_qt5.mk  |1 
 vcl/inc/qt5/Qt5AccessibleText.hxx   |   62 ++
 vcl/inc/qt5/Qt5AccessibleWidget.hxx |2 
 vcl/qt5/Qt5AccessibleText.cxx   |   99 
 vcl/qt5/Qt5AccessibleWidget.cxx |6 ++
 5 files changed, 170 insertions(+)

New commits:
commit ed1eff2bcbc6324f8ea635e0a11512ff0f117019
Author: Samuel Mehrbrodt 
AuthorDate: Thu Oct 4 15:11:27 2018 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Mon Oct 8 08:12:23 2018 +0200

Qt5AccessibleWidget: Add stub for QAccessibleTextInterface

Change-Id: Iee80b40d2c33a0464abfc285360e76774c644b32
Reviewed-on: https://gerrit.libreoffice.org/61372
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/vcl/Library_vclplug_qt5.mk b/vcl/Library_vclplug_qt5.mk
index be237f37f232..1bb360e2a760 100644
--- a/vcl/Library_vclplug_qt5.mk
+++ b/vcl/Library_vclplug_qt5.mk
@@ -80,6 +80,7 @@ $(eval $(call gb_Library_add_libs,vclplug_qt5,\
 endif
 
 $(eval $(call gb_Library_add_exception_objects,vclplug_qt5,\
+vcl/qt5/Qt5AccessibleText \
 vcl/qt5/Qt5AccessibleValue \
 vcl/qt5/Qt5AccessibleWidget \
 vcl/qt5/Qt5Bitmap \
diff --git a/vcl/inc/qt5/Qt5AccessibleText.hxx 
b/vcl/inc/qt5/Qt5AccessibleText.hxx
new file mode 100644
index ..2f9e50381009
--- /dev/null
+++ b/vcl/inc/qt5/Qt5AccessibleText.hxx
@@ -0,0 +1,62 @@
+/* -*- 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/.
+ */
+
+#pragma once
+
+#include 
+
+#include "Qt5AccessibleWidget.hxx"
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+class Qt5Frame;
+class Qt5Widget;
+
+class VCLPLUG_QT5_PUBLIC Qt5AccessibleText : public QAccessibleTextInterface
+{
+public:
+Qt5AccessibleText(const 
css::uno::Reference xAccessible);
+
+void addSelection(int startOffset, int endOffset) override;
+QString attributes(int offset, int* startOffset, int* endOffset) const 
override;
+int characterCount() const override;
+QRect characterRect(int offset) const override;
+int cursorPosition() const override;
+int offsetAtPoint(const QPoint& point) const override;
+void removeSelection(int selectionIndex) override;
+void scrollToSubstring(int startIndex, int endIndex) override;
+void selection(int selectionIndex, int* startOffset, int* endOffset) const 
override;
+int selectionCount() const override;
+void setCursorPosition(int position) override;
+void setSelection(int selectionIndex, int startOffset, int endOffset) 
override;
+QString text(int startOffset, int endOffset) const override;
+QString textAfterOffset(int offset, QAccessible::TextBoundaryType 
boundaryType,
+int* startOffset, int* endOffset) const override;
+QString textAtOffset(int offset, QAccessible::TextBoundaryType 
boundaryType, int* startOffset,
+ int* endOffset) const override;
+QString textBeforeOffset(int offset, QAccessible::TextBoundaryType 
boundaryType,
+ int* startOffset, int* endOffset) const override;
+
+private:
+css::uno::Reference m_xAccessible;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/qt5/Qt5AccessibleWidget.hxx 
b/vcl/inc/qt5/Qt5AccessibleWidget.hxx
index 980c464b9658..1e372479e479 100644
--- a/vcl/inc/qt5/Qt5AccessibleWidget.hxx
+++ b/vcl/inc/qt5/Qt5AccessibleWidget.hxx
@@ -19,6 +19,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -68,6 +69,7 @@ public:
 QStringList keyBindingsForAction(const QString& actionName) const override;
 
 QAccessibleValueInterface* valueInterface();
+QAccessibleTextInterface* textInterface();
 
 // Factory
 static QAccessibleInterface* customFactory(const QString& classname, 
QObject* object);
diff --git a/vcl/qt5/Qt5AccessibleText.cxx b/vcl/qt5/Qt5AccessibleText.cxx
new file mode 100644
index ..07e3350369d9
--- /dev/null
+++ b/vcl/qt5/Qt5AccessibleText.cxx
@@ -0,0 +1,99 @@
+/* -*- 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional i

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

2018-10-07 Thread Libreoffice Gerrit user
 sfx2/source/dialog/templdlg.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 94bf82a8ceba41c32cf3620529e6ce8ea94f18c0
Author: Jim Raykowski 
AuthorDate: Sun Sep 2 15:07:26 2018 -0800
Commit: Jim Raykowski 
CommitDate: Mon Oct 8 02:38:33 2018 +0200

tdf#99678 Show style in common template dialog tree box immediatly

...after creation using New Style dialog

Change-Id: Idb24f537fe7be2dfb9660a1a5de0bcd26612affc
Reviewed-on: https://gerrit.libreoffice.org/59914
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 

diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 88042ea54ea4..448f70182d23 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -1704,6 +1704,7 @@ void 
SfxCommonTemplateDialog_Impl::ActionSelect(sal_uInt16 nEntry)
  aTemplName, "",
  
static_cast(GetFamilyItem_Impl()->GetFamily()),
  nFilter);
+UpdateFamily_Impl();
 }
 pStyleSheetPool->SetSearchMask( eFam, nFilter );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: solenv/bin

2018-10-07 Thread Libreoffice Gerrit user
 solenv/bin/native-code.py |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit e46f8a9a4e3c5b0542c0813b476b449f3af8d607
Author: Caolán McNamara 
AuthorDate: Sun Oct 7 20:40:54 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sun Oct 7 21:43:05 2018 +0200

move com_sun_star_comp_Writer_RtfExport_get_implementation to writer

Change-Id: I039d416adc23722740125c5f0845e79c47505f03
Reviewed-on: https://gerrit.libreoffice.org/61503
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index d0d236e9bc93..c552058b72bf 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -257,8 +257,6 @@ core_constructor_list = [
 
"com_sun_star_comp_oox_docprop_DocumentPropertiesImporter_get_implementation",
 "com_sun_star_comp_oox_ppt_PowerPointImport_get_implementation",
 "com_sun_star_comp_oox_ShapeContextHandler_get_implementation",
-# sw/util/msword.component
-"com_sun_star_comp_Writer_RtfExport_get_implementation",
 ]
 
 # edit group for apps, where you can edit documents
@@ -371,6 +369,8 @@ writer_constructor_list = [
 "com_sun_star_util_comp_FinalThreadManager_get_implementation",
 # sw/util/swd.component
 "com_sun_star_comp_writer_FormatDetector_get_implementation",
+# sw/util/msword.component
+"com_sun_star_comp_Writer_RtfExport_get_implementation",
 # writerfilter/util/writerfilter.component
 "com_sun_star_comp_Writer_RtfFilter_get_implementation",
 "com_sun_star_comp_Writer_WriterFilter_get_implementation",
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - svx/source

2018-10-07 Thread Libreoffice Gerrit user
 svx/source/dialog/srchdlg.cxx |   66 +++---
 1 file changed, 55 insertions(+), 11 deletions(-)

New commits:
commit 7dbe17d5a6b866cca9b81418f3f0cd1d32214265
Author: Caolán McNamara 
AuthorDate: Thu Oct 4 15:37:14 2018 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Sun Oct 7 21:41:09 2018 +0200

Resolves: tdf#106340 resize dialog when search/replace labels are 
shown/hidden

Change-Id: I1e20807f613a73c7dbefcb8e331f99d484eb5c04
Reviewed-on: https://gerrit.libreoffice.org/61394
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index 6a999380ee7a..ec59bef81287 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -1103,6 +1103,8 @@ void SvxSearchDialog::InitAttrList_Impl( const 
SfxItemSet* pSSet,
 memcpy( pImpl->pRanges.get(), pTmp, sizeof(sal_uInt16) * nCnt );
 }
 
+bool bSetOptimalLayoutSize = false;
+
 // See to it that are the texts of the attributes are correct
 OUString aDesc;
 
@@ -1119,7 +1121,11 @@ void SvxSearchDialog::InitAttrList_Impl( const 
SfxItemSet* pSSet,
 
 if ( !aDesc.isEmpty() )
 {
-m_pSearchAttrText->Show();
+if (!m_pSearchAttrText->IsVisible())
+{
+m_pSearchAttrText->Show();
+bSetOptimalLayoutSize = true;
+}
 bFormat |= true;
 }
 }
@@ -1138,11 +1144,18 @@ void SvxSearchDialog::InitAttrList_Impl( const 
SfxItemSet* pSSet,
 
 if ( !aDesc.isEmpty() )
 {
-m_pReplaceAttrText->Show();
+if (!m_pReplaceAttrText->IsVisible())
+{
+m_pReplaceAttrText->Show();
+bSetOptimalLayoutSize = true;
+}
 bFormat |= true;
 }
 }
 }
+
+if (bSetOptimalLayoutSize)
+setOptimalLayoutSize();
 }
 
 
@@ -1569,8 +1582,12 @@ IMPL_LINK_NOARG(SvxSearchDialog, TemplateHdl_Impl, 
Button*, void)
 
 if(!sDesc.isEmpty())
 {
-m_pSearchAttrText->Show();
-m_pReplaceAttrText->Show();
+if (!m_pReplaceAttrText->IsVisible() || 
!m_pReplaceAttrText->IsVisible())
+{
+m_pSearchAttrText->Show();
+m_pReplaceAttrText->Show();
+setOptimalLayoutSize();
+}
 }
 }
 m_pFormatBtn->Disable();
@@ -1596,8 +1613,12 @@ IMPL_LINK_NOARG(SvxSearchDialog, TemplateHdl_Impl, 
Button*, void)
 
 if(!sDesc.isEmpty())
 {
-m_pSearchAttrText->Show();
-m_pReplaceAttrText->Show();
+if (!m_pReplaceAttrText->IsVisible() || 
!m_pReplaceAttrText->IsVisible())
+{
+m_pSearchAttrText->Show();
+m_pReplaceAttrText->Show();
+setOptimalLayoutSize();
+}
 }
 
 EnableControl_Impl(m_pFormatBtn);
@@ -2093,19 +2114,32 @@ IMPL_LINK_NOARG(SvxSearchDialog, NoFormatHdl_Impl, 
Button*, void)
 bFormat = false;
 m_pLayoutBtn->Check( false );
 
+bool bSetOptimalLayoutSize = false;
+
 if ( bSearch )
 {
 pSearchList->Clear();
 m_pSearchAttrText->SetText( "" );
-m_pSearchAttrText->Hide();
+if (m_pSearchAttrText->IsVisible())
+{
+m_pSearchAttrText->Hide();
+bSetOptimalLayoutSize = true;
+}
 }
 else
 {
 pReplaceList->Clear();
 m_pReplaceAttrText->SetText( "" );
-m_pReplaceAttrText->Hide();
+if (m_pReplaceAttrText->IsVisible())
+{
+m_pReplaceAttrText->Hide();
+bSetOptimalLayoutSize = true;
+}
 }
 
+if (bSetOptimalLayoutSize)
+setOptimalLayoutSize();
+
 pImpl->bSaveToModule = false;
 TemplateHdl_Impl(m_pLayoutBtn);
 pImpl->bSaveToModule = true;
@@ -2221,24 +2255,34 @@ void SvxSearchDialog::PaintAttrText_Impl()
 if ( !bFormat && !aDesc.isEmpty() )
 bFormat = true;
 
+bool bSetOptimalLayoutSize = false;
+
 if ( bSearch )
 {
 m_pSearchAttrText->SetText( aDesc );
-if(!aDesc.isEmpty())
+if (!aDesc.isEmpty() && !m_pSearchAttrText->IsVisible())
+{
 m_pSearchAttrText->Show();
+bSetOptimalLayoutSize = true;
+}
 
 FocusHdl_Impl(*m_pSearchLB);
 }
 else
 {
 m_pReplaceAttrText->SetText( aDesc );
-if(!aDesc.isEmpty())
+if (!aDesc.isEmpty() && !m_pReplaceAttrText->IsVisible())
+{
 m_pReplaceAttrText->Show();
+bSetOptimalLayoutSize = true;
+}
 
 FocusHdl_Impl(*m_pReplaceLB);
 }
-}
 
+if (bSetOptimalLayoutSize)
+setOptimalLayoutSize();
+}
 
 void SvxSear

[Libreoffice-commits] core.git: include/svx reportdesign/source svx/source

2018-10-07 Thread Libreoffice Gerrit user
 include/svx/fmview.hxx |2 ++
 reportdesign/source/ui/report/ReportController.cxx |4 
 svx/source/form/fmview.cxx |4 ++--
 svx/source/form/fmvwimp.cxx|6 +-
 svx/source/inc/fmvwimp.hxx |2 ++
 5 files changed, 15 insertions(+), 3 deletions(-)

New commits:
commit f2bd68c33c13b94cf844227d04a7eba9fe3723f8
Author: Julien Nabet 
AuthorDate: Sun Sep 30 01:25:48 2018 +0200
Commit: Julien Nabet 
CommitDate: Sun Oct 7 21:19:52 2018 +0200

tdf#120152: fix adding labels in reportdesign

Regression from:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=4b4942224b550235da228655677b5c068a053254

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

diff --git a/include/svx/fmview.hxx b/include/svx/fmview.hxx
index cec43527f499..106e83131733 100644
--- a/include/svx/fmview.hxx
+++ b/include/svx/fmview.hxx
@@ -95,6 +95,8 @@ public:
 sal_uInt16 _nControlObjectID,
 SdrInventor _nInventor,
 sal_uInt16 _nLabelObjectID,
+SdrPage* _pLabelPage,
+SdrPage* _pControlPage,
 
 // tdf#118963 Need a SdrModel for SdrObject creation. To make the
 // demand clear, hand over a SdrMldel&
diff --git a/reportdesign/source/ui/report/ReportController.cxx 
b/reportdesign/source/ui/report/ReportController.cxx
index 1319f3be33fc..c0288eb92de6 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -3146,6 +3146,8 @@ void OReportController::createControl(const Sequence< 
PropertyValue >& _aArgs,co
 _nObjectId,
 SdrInventor::ReportDesign,
 OBJ_DLG_FIXEDTEXT,
+nullptr,
+pSectionWindow->getReportSection().getPage(),
 
 // tdf#118963 Need a SdrModel for SdrObject creation. Dereferencing
 // m_aReportModel seems pretty safe, it's done in other places, 
initialized
@@ -3453,6 +3455,8 @@ void OReportController::addPairControls(const Sequence< 
PropertyValue >& aArgs)
 nOBJID,
 SdrInventor::ReportDesign,
 OBJ_DLG_FIXEDTEXT,
+pSectionWindow[1]->getReportSection().getPage(),
+pSectionWindow[0]->getReportSection().getPage(),
 
 // tdf#118963 Need a SdrModel for SdrObject creation. 
Dereferencing
 // m_aReportModel seems pretty safe, it's done in other 
places, initialized
diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx
index e4670a1fb714..5f93b1750b85 100644
--- a/svx/source/form/fmview.cxx
+++ b/svx/source/form/fmview.cxx
@@ -566,7 +566,7 @@ FmFormObj* FmFormView::getMarkedGrid() const
 void FmFormView::createControlLabelPair( OutputDevice const * _pOutDev, 
sal_Int32 _nXOffsetMM, sal_Int32 _nYOffsetMM,
 const Reference< XPropertySet >& _rxField, const Reference< XNumberFormats 
>& _rxNumberFormats,
 sal_uInt16 _nControlObjectID, SdrInventor _nInventor, sal_uInt16 
_nLabelObjectID,
-SdrModel& _rModel,
+SdrPage* _pLabelPage, SdrPage* _pControlPage, SdrModel& _rModel,
 std::unique_ptr& _rpLabel,
 std::unique_ptr& _rpControl )
 {
@@ -574,7 +574,7 @@ void FmFormView::createControlLabelPair( OutputDevice const 
* _pOutDev, sal_Int3
 *_pOutDev, _nXOffsetMM, _nYOffsetMM,
 _rxField, _rxNumberFormats,
 _nControlObjectID, "", _nInventor, _nLabelObjectID,
-_rModel,
+_pLabelPage, _pControlPage, _rModel,
 _rpLabel, _rpControl
 );
 }
diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx
index ec0df8ee71a7..aa953fa13616 100644
--- a/svx/source/form/fmvwimp.cxx
+++ b/svx/source/form/fmvwimp.cxx
@@ -1526,6 +1526,8 @@ bool FmXFormView::createControlLabelPair( OutputDevice 
const & _rOutDev, sal_Int
 _rFieldPostfix,
 SdrInventor::FmForm,
 OBJ_FM_FIXEDTEXT,
+nullptr,
+nullptr,
 
 // tdf#118963 Hand over a SdrModel to SdrObject-creation. It uses the 
local m_pView
 // and already returning false when nullptr == getView() could be 
done, but m_pView
@@ -1557,7 +1559,7 @@ bool FmXFormView::createControlLabelPair( OutputDevice 
const & _rOutDev, sal_Int
 const Reference< XPropertySet >& _rxField,
 const Reference< XNumberFormats >& _rxNumberFormats, sal_uInt16 
_nControlObjectID,
 const OUString& _rFieldPostfix, SdrInventor _nInventor, sal_uInt16 
_nLabelObjectID,
-SdrModel& _rModel,
+SdrPage* _pLabelPage, SdrPage* _pControlPage, SdrModel& _rModel,
 std::unique_ptr& _rpLabel, 
std::unique_ptr& _rpControl)
 {
 sal_Int32 nDataType = 0;
@@ -1604,6 +1606,7 @@ bool FmXFormView::createControlLabelPair( OutputDevice 
const & _rOutDev, sal_Int
 _rModel,
 _nInventor,
 

Re: Upstream clang compiler plugins, licensing

2018-10-07 Thread Noel Grandin
IANAL, obviously, but possibly you could pick the plugins you want and ask
all the people who worked on that plugin to re-license their work (there
are not that many, and they are mostly still around)

For the record, for anything in compilerplugins/ that I have touched, I
grant you permission to submit my work to LLVM under their license.

Also, note that LLVM is likely to want you to write the plugins in quite a
different style, they don't use our style of overriding ASTVisitor anymore,
so upstreaming is not trivial, they like using some kind of matcher API for
traversing the AST, and they have a whole Checker framework for clang-tidy
stuff.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: sfx2/inc sfx2/source

2018-10-07 Thread Libreoffice Gerrit user
 sfx2/inc/pch/precompiled_sfx.hxx |1 -
 sfx2/inc/preventduplicateinteraction.hxx |2 --
 sfx2/source/appl/newhelp.hxx |1 -
 3 files changed, 4 deletions(-)

New commits:
commit 45385a532b2d4bd227d6771e54b2b8a9faca939c
Author: Caolán McNamara 
AuthorDate: Sat Oct 6 21:32:08 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sun Oct 7 19:44:55 2018 +0200

drop unnecessary includes

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

diff --git a/sfx2/inc/pch/precompiled_sfx.hxx b/sfx2/inc/pch/precompiled_sfx.hxx
index 51b5c8e10195..079cca3ddb51 100644
--- a/sfx2/inc/pch/precompiled_sfx.hxx
+++ b/sfx2/inc/pch/precompiled_sfx.hxx
@@ -97,7 +97,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/sfx2/inc/preventduplicateinteraction.hxx 
b/sfx2/inc/preventduplicateinteraction.hxx
index 8fdf8f79ea22..8a8cd91b565c 100644
--- a/sfx2/inc/preventduplicateinteraction.hxx
+++ b/sfx2/inc/preventduplicateinteraction.hxx
@@ -34,8 +34,6 @@
 
 #include 
 #include 
-#include 
-#include 
 #include 
 
 namespace com { namespace sun { namespace star { namespace uno {
diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx
index fa660cd5f01c..a887f5d00127 100644
--- a/sfx2/source/appl/newhelp.hxx
+++ b/sfx2/source/appl/newhelp.hxx
@@ -32,7 +32,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - extensions/source extensions/uiconfig include/svx sd/source svx/source svx/uiconfig

2018-10-07 Thread Libreoffice Gerrit user
 extensions/source/propctrlr/formcomponenthandler.cxx  |6 -
 extensions/source/propctrlr/listselectiondlg.cxx  |   60 +-
 extensions/source/propctrlr/listselectiondlg.hxx  |   22 +
 extensions/uiconfig/spropctrlr/ui/listselectdialog.ui |   50 +++-
 include/svx/fontworkgallery.hxx   |   20 
 sd/source/ui/dlg/RemoteDialogClientBox.hxx|1 
 svx/source/tbxctrls/fontworkgallery.cxx   |   18 +---
 svx/source/toolbars/fontworkbar.cxx   |8 -
 svx/uiconfig/ui/fontworkspacingdialog.ui  |   73 +-
 9 files changed, 132 insertions(+), 126 deletions(-)

New commits:
commit cf5a2fbbdaace0cbf0e7cbb39e280ec900a82b08
Author: Caolán McNamara 
AuthorDate: Sat Oct 6 21:23:13 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sun Oct 7 19:44:44 2018 +0200

weld FontworkCharacterSpacingDialog

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

diff --git a/include/svx/fontworkgallery.hxx b/include/svx/fontworkgallery.hxx
index 58ff23d34698..610b0ad96452 100644
--- a/include/svx/fontworkgallery.hxx
+++ b/include/svx/fontworkgallery.hxx
@@ -22,40 +22,28 @@
 #define INCLUDED_SVX_FONTWORKGALLERY_HXX
 
 #include 
-
-#include 
-#include 
-#include 
-#include 
-#include 
-
 #include 
-
 #include 
-
+#include 
 #include 
 
 class FmFormModel;
 class SdrView;
-namespace vcl { class Window; }
 class SdrTextObj;
 class SdrObject;
 class SdrModel;
-
 class SfxBindings;
 
-
 namespace svx
 {
 
-class SAL_WARN_UNUSED FontworkCharacterSpacingDialog : public ModalDialog
+class SAL_WARN_UNUSED FontworkCharacterSpacingDialog : public 
weld::GenericDialogController
 {
-VclPtr m_pMtrScale;
+std::unique_ptr m_xMtrScale;
 
 public:
-FontworkCharacterSpacingDialog( vcl::Window* pParent, sal_Int32 nScale );
+FontworkCharacterSpacingDialog(weld::Window* pParent, sal_Int32 nScale);
 virtual ~FontworkCharacterSpacingDialog() override;
-virtual void dispose() override;
 
 sal_Int32 getScale() const;
 };
diff --git a/sd/source/ui/dlg/RemoteDialogClientBox.hxx 
b/sd/source/ui/dlg/RemoteDialogClientBox.hxx
index c839165a79cc..6ab8522d65f3 100644
--- a/sd/source/ui/dlg/RemoteDialogClientBox.hxx
+++ b/sd/source/ui/dlg/RemoteDialogClientBox.hxx
@@ -24,7 +24,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include 
diff --git a/svx/source/tbxctrls/fontworkgallery.cxx 
b/svx/source/tbxctrls/fontworkgallery.cxx
index 65243aad0fc2..700a0c852bc8 100644
--- a/svx/source/tbxctrls/fontworkgallery.cxx
+++ b/svx/source/tbxctrls/fontworkgallery.cxx
@@ -624,28 +624,20 @@ 
com_sun_star_comp_svx_FontworkCharacterSpacingControl_get_implementation(
 return cppu::acquire(new FontworkCharacterSpacingControl(xContext));
 }
 
-
-FontworkCharacterSpacingDialog::FontworkCharacterSpacingDialog( vcl::Window* 
pParent, sal_Int32 nScale )
-:   ModalDialog( pParent, "FontworkSpacingDialog" , 
"svx/ui/fontworkspacingdialog.ui" )
+FontworkCharacterSpacingDialog::FontworkCharacterSpacingDialog(weld::Window* 
pParent, sal_Int32 nScale)
+: GenericDialogController(pParent, "svx/ui/fontworkspacingdialog.ui", 
"FontworkSpacingDialog")
+, m_xMtrScale(m_xBuilder->weld_metric_spin_button("entry", FUNIT_PERCENT))
 {
-get(m_pMtrScale, "entry");
-m_pMtrScale->SetValue( nScale );
+m_xMtrScale->set_value(nScale, FUNIT_PERCENT);
 }
 
 FontworkCharacterSpacingDialog::~FontworkCharacterSpacingDialog()
 {
-disposeOnce();
-}
-
-void FontworkCharacterSpacingDialog::dispose()
-{
-m_pMtrScale.clear();
-ModalDialog::dispose();
 }
 
 sal_Int32 FontworkCharacterSpacingDialog::getScale() const
 {
-return static_cast(m_pMtrScale->GetValue());
+return static_cast(m_xMtrScale->get_value(FUNIT_PERCENT));
 }
 
 }
diff --git a/svx/source/toolbars/fontworkbar.cxx 
b/svx/source/toolbars/fontworkbar.cxx
index f5283818191b..90b05316fdc0 100644
--- a/svx/source/toolbars/fontworkbar.cxx
+++ b/svx/source/toolbars/fontworkbar.cxx
@@ -471,11 +471,11 @@ void FontworkBar::execute( SdrView* pSdrView, SfxRequest 
const & rReq, SfxBindin
 if( rReq.GetArgs() && ( rReq.GetArgs()->GetItemState( 
SID_FONTWORK_CHARACTER_SPACING ) == SfxItemState::SET ) )
 {
 sal_Int32 nCharSpacing = 
rReq.GetArgs()->GetItem(SID_FONTWORK_CHARACTER_SPACING)->GetValue();
-ScopedVclPtrInstance< FontworkCharacterSpacingDialog > aDlg( 
nullptr, nCharSpacing );
-sal_uInt16 nRet = aDlg->Execute();
-if( nRet != 0 )
+FontworkCharacterSpacingDialog aDlg(rReq.GetFrameWeld(), 
nCharSpacing);
+sal_uInt16 nRet = aDlg.run();
+if (nRet != RET_CANCEL)
 {
-SfxInt32Item aItem( SID_FONTWORK_CHARACTER_SPACING, 
aDlg->getScale() );
+

[Libreoffice-commits] core.git: extensions/source extensions/uiconfig

2018-10-07 Thread Libreoffice Gerrit user
 extensions/source/propctrlr/newdatatype.cxx  |   30 +++
 extensions/source/propctrlr/newdatatype.hxx  |   21 ++-
 extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx |6 +-
 extensions/uiconfig/spropctrlr/ui/datatypedialog.ui  |9 ++-
 4 files changed, 28 insertions(+), 38 deletions(-)

New commits:
commit 6846f2f204dbaaf9f32c2f717eb39d3a01711087
Author: Caolán McNamara 
AuthorDate: Sat Oct 6 20:54:44 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sun Oct 7 19:44:02 2018 +0200

weld NewDataTypeDialog

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

diff --git a/extensions/source/propctrlr/newdatatype.cxx 
b/extensions/source/propctrlr/newdatatype.cxx
index 6aa4dc633992..8c2876e73b38 100644
--- a/extensions/source/propctrlr/newdatatype.cxx
+++ b/extensions/source/propctrlr/newdatatype.cxx
@@ -28,15 +28,13 @@ namespace pcr
 //= NewDataTypeDialog
 
 
-NewDataTypeDialog::NewDataTypeDialog( vcl::Window* _pParent, const 
OUString& _rNameBase, const std::vector< OUString >& _rProhibitedNames )
-: ModalDialog( _pParent, "DataTypeDialog",
-"modules/spropctrlr/ui/datatypedialog.ui" )
+NewDataTypeDialog::NewDataTypeDialog(weld::Window* pParent, const 
OUString& _rNameBase, const std::vector< OUString >& _rProhibitedNames)
+: GenericDialogController(pParent, 
"modules/spropctrlr/ui/datatypedialog.ui", "DataTypeDialog")
 , m_aProhibitedNames( _rProhibitedNames.begin(), 
_rProhibitedNames.end() )
+, m_xName(m_xBuilder->weld_entry("entry"))
+, m_xOK(m_xBuilder->weld_button("ok"))
 {
-get(m_pName, "entry");
-get(m_pOK, "ok");
-
-m_pName->SetModifyHdl( LINK( this, NewDataTypeDialog, OnNameModified ) 
);
+m_xName->connect_changed(LINK(this, NewDataTypeDialog, 
OnNameModified));
 
 // find an initial name
 // for this, first remove trailing digits
@@ -61,32 +59,22 @@ namespace pcr
 }
 while ( m_aProhibitedNames.find( sInitialName ) != 
m_aProhibitedNames.end() );
 
-m_pName->SetText( sInitialName );
-OnNameModified( *m_pName );
+m_xName->set_text(sInitialName);
+OnNameModified(*m_xName);
 }
 
 NewDataTypeDialog::~NewDataTypeDialog()
 {
-disposeOnce();
-}
-
-void NewDataTypeDialog::dispose()
-{
-m_pName.clear();
-m_pOK.clear();
-ModalDialog::dispose();
 }
 
-IMPL_LINK_NOARG( NewDataTypeDialog, OnNameModified, Edit&, void )
+IMPL_LINK_NOARG(NewDataTypeDialog, OnNameModified, weld::Entry&, void)
 {
 OUString sCurrentName = GetName();
 bool bNameIsOK = ( !sCurrentName.isEmpty() )
   && ( m_aProhibitedNames.find( sCurrentName ) == 
m_aProhibitedNames.end() );
 
-m_pOK->Enable( bNameIsOK );
+m_xOK->set_sensitive(bNameIsOK);
 }
-
-
 } // namespace pcr
 
 
diff --git a/extensions/source/propctrlr/newdatatype.hxx 
b/extensions/source/propctrlr/newdatatype.hxx
index 9185d1f02100..19a88f31c75f 100644
--- a/extensions/source/propctrlr/newdatatype.hxx
+++ b/extensions/source/propctrlr/newdatatype.hxx
@@ -20,10 +20,7 @@
 #ifndef INCLUDED_EXTENSIONS_SOURCE_PROPCTRLR_NEWDATATYPE_HXX
 #define INCLUDED_EXTENSIONS_SOURCE_PROPCTRLR_NEWDATATYPE_HXX
 
-#include 
-#include 
-#include 
-#include 
+#include 
 
 #include 
 #include 
@@ -32,24 +29,22 @@
 namespace pcr
 {
 //= NewDataTypeDialog
-class NewDataTypeDialog : public ModalDialog
+class NewDataTypeDialog : public weld::GenericDialogController
 {
 private:
-VclPtr   m_pName;
-VclPtr   m_pOK;
-
-std::set< OUString > m_aProhibitedNames;
+std::set m_aProhibitedNames;
 
+std::unique_ptr m_xName;
+std::unique_ptr m_xOK;
 public:
-NewDataTypeDialog(vcl::Window* _pParent, const OUString& _rNameBase,
+NewDataTypeDialog(weld::Window* _pParent, const OUString& _rNameBase,
 const std::vector< OUString >& _rProhibitedNames );
 virtual ~NewDataTypeDialog() override;
-virtual void dispose() override;
 
-OUString GetName() const { return m_pName->GetText(); }
+OUString GetName() const { return m_xName->get_text(); }
 
 private:
-DECL_LINK( OnNameModified, Edit&, void );
+DECL_LINK(OnNameModified, weld::Entry&, void);
 };
 
 
diff --git a/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx 
b/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx
index 37eb19bdf6da..ec4d6c9f914a 100644
--- a/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx
+++ b/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx
@@ -488,11 +488,11 @@ namespace pcr
 std::vector< OUString > aExistentNames;
 m_pH

[Libreoffice-commits] core.git: 2 commits - reportdesign/source reportdesign/uiconfig sd/source

2018-10-07 Thread Libreoffice Gerrit user
 reportdesign/source/ui/dlg/PageNumber.cxx |   58 ++
 reportdesign/source/ui/inc/PageNumber.hxx |   33 +++---
 reportdesign/source/ui/report/ReportController.cxx|4 -
 reportdesign/uiconfig/dbreport/ui/pagenumberdialog.ui |   13 ++--
 sd/source/ui/func/fupoor.cxx  |   12 ---
 sd/source/ui/inc/fupoor.hxx   |3 
 6 files changed, 42 insertions(+), 81 deletions(-)

New commits:
commit 08d4100a81396c2c35f074efc41ee89c795e3ab6
Author: Caolán McNamara 
AuthorDate: Sat Oct 6 20:48:02 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sun Oct 7 19:43:51 2018 +0200

weld OPageNumberDialog

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

diff --git a/reportdesign/source/ui/dlg/PageNumber.cxx 
b/reportdesign/source/ui/dlg/PageNumber.cxx
index 27fb930b1205..4821b7ac9d52 100644
--- a/reportdesign/source/ui/dlg/PageNumber.cxx
+++ b/reportdesign/source/ui/dlg/PageNumber.cxx
@@ -36,46 +36,30 @@ using namespace ::comphelper;
 
 // class OPageNumberDialog
 
-OPageNumberDialog::OPageNumberDialog( vcl::Window* _pParent
-   ,const uno::Reference< 
report::XReportDefinition >& _xHoldAlive
-   ,OReportController* _pController)
-: ModalDialog( _pParent, "PageNumberDialog" , 
"modules/dbreport/ui/pagenumberdialog.ui" )
-,m_pController(_pController)
-,m_xHoldAlive(_xHoldAlive)
+OPageNumberDialog::OPageNumberDialog(weld::Window* pParent,
+ const uno::Reference< 
report::XReportDefinition >& _xHoldAlive,
+ OReportController* _pController)
+: GenericDialogController(pParent, 
"modules/dbreport/ui/pagenumberdialog.ui", "PageNumberDialog")
+, m_pController(_pController)
+, m_xHoldAlive(_xHoldAlive)
+, m_xPageN(m_xBuilder->weld_radio_button("pagen"))
+, m_xPageNofM(m_xBuilder->weld_radio_button("pagenofm"))
+, m_xTopPage(m_xBuilder->weld_radio_button("toppage"))
+, m_xBottomPage(m_xBuilder->weld_radio_button("bottompage"))
+, m_xAlignmentLst(m_xBuilder->weld_combo_box("alignment"))
+, 
m_xShowNumberOnFirstPage(m_xBuilder->weld_check_button("shownumberonfirstpage"))
 {
-get(m_pPageN,"pagen");
-get(m_pPageNofM,"pagenofm");
-get(m_pTopPage,"toppage");
-get(m_pBottomPage,"bottompage");
-get(m_pAlignmentLst,"alignment");
-get(m_pShowNumberOnFirstPage,"shownumberonfirstpage");
-
-
-m_pShowNumberOnFirstPage->Hide();
-
+m_xShowNumberOnFirstPage->hide();
 }
 
-
 OPageNumberDialog::~OPageNumberDialog()
 {
-disposeOnce();
-}
-
-void OPageNumberDialog::dispose()
-{
-m_pPageN.clear();
-m_pPageNofM.clear();
-m_pTopPage.clear();
-m_pBottomPage.clear();
-m_pAlignmentLst.clear();
-m_pShowNumberOnFirstPage.clear();
-ModalDialog::dispose();
 }
 
-short OPageNumberDialog::Execute()
+void OPageNumberDialog::execute()
 {
-short nRet = ModalDialog::Execute();
-if ( nRet == RET_OK )
+short nRet = m_xDialog->run();
+if (nRet == RET_OK)
 {
 try
 {
@@ -83,7 +67,7 @@ short OPageNumberDialog::Execute()
 sal_Int32 nPosX = 0;
 sal_Int32 nPos2X = 0;
 awt::Size aRptSize = 
getStyleProperty(m_xHoldAlive,PROPERTY_PAPERSIZE);
-switch ( m_pAlignmentLst->GetSelectedEntryPos() )
+switch (m_xAlignmentLst->get_active())
 {
 case 0: // left
 nPosX = 
getStyleProperty(m_xHoldAlive,PROPERTY_LEFTMARGIN);
@@ -102,23 +86,21 @@ short OPageNumberDialog::Execute()
 default:
 break;
 }
-if ( m_pAlignmentLst->GetSelectedEntryPos() > 2 )
+if (m_xAlignmentLst->get_active() > 2)
 nPosX = nPos2X;
 
 uno::Sequence aValues( 
comphelper::InitPropertySequence({
 { PROPERTY_POSITION, uno::Any(awt::Point(nPosX,0)) },
-{ PROPERTY_PAGEHEADERON, uno::Any(m_pTopPage->IsChecked()) 
},
-{ PROPERTY_STATE, uno::Any(m_pPageNofM->IsChecked()) }
+{ PROPERTY_PAGEHEADERON, 
uno::Any(m_xTopPage->get_active()) },
+{ PROPERTY_STATE, uno::Any(m_xPageNofM->get_active()) }
 }));
 
 m_pController->executeChecked(SID_INSERT_FLD_PGNUMBER,aValues);
 }
 catch(uno::Exception&)
 {
-nRet = RET_NO;
 }
 }
-return nRet;
 }
 
 } // rptui
diff --git a/reportdesign/source/ui/inc/PageNumber.hxx 
b/reportdesign/source/ui/inc/PageNumber.hxx
index 1bfe03dfcaad..8a5150698e2d 100644
--- a/reportdesign/source/ui/inc/PageNumber.hxx
+++ b/reportdesign/source/ui/inc/PageNumber.hxx
@@ -19,14 +19,9 @@
 #i

Upstream clang compiler plugins, licensing

2018-10-07 Thread Tamás Zolnai
Hi all,

I plan to work on clang static analyzer in the next monthes and I'm
wondering whether how we can move some of the LO's compiler plugins to
upstream.

As I see LO's license is not compatible with LLVM license [1], as LLVM
license is a more permissive license which allows to make the code part of
a proprietary software for example. So I just wonder what is the best way
to integrate things to clang from LO, either as a compiler plugin or a
static analyzer check.

An idea might be to relicense the compilerplugin code with the LLVM
license, which means additional administration of course, but would make
reusing the code much easier. However I'm not sure this is the best way to
solve this licensing incompatibility.

Any idea is appreciated here or any experience with upstreaming to an open
source software with incompatible license.

Thanks,
Tamás

[1] https://opensource.org/licenses/NCSA
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: reportdesign/source

2018-10-07 Thread Libreoffice Gerrit user
 reportdesign/source/ui/report/ReportSection.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 8b119b972b37a7e497091167bb6944a1c167f9bb
Author: Julien Nabet 
AuthorDate: Sun Sep 30 11:56:08 2018 +0200
Commit: Julien Nabet 
CommitDate: Sun Oct 7 18:09:37 2018 +0200

tdf#120151: fix crash in edit report

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

diff --git a/reportdesign/source/ui/report/ReportSection.cxx 
b/reportdesign/source/ui/report/ReportSection.cxx
index 8170adbdfe92..e64cee395cf5 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -353,6 +353,7 @@ void OReportSection::Copy(uno::Sequence< beans::NamedValue 
>& _rAllreadyCopiedOb
 try
 {
 SdrObject* 
pNewObj(pSdrObject->CloneSdrObject(pSdrObject->getSdrModelFromSdrObject()));
+m_pPage->NbcInsertObject(pNewObj);
 aCopies.emplace_back(pNewObj->getUnoShape(),uno::UNO_QUERY);
 if ( _bEraseAnddNoClone )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: starmath/inc starmath/source

2018-10-07 Thread Libreoffice Gerrit user
 starmath/inc/parse.hxx|   28 +--
 starmath/source/parse.cxx |  110 ++
 2 files changed, 68 insertions(+), 70 deletions(-)

New commits:
commit 3e15dd2915f6f0ebb485781e837f1d9c94268b68
Author: Noel Grandin 
AuthorDate: Thu Oct 4 15:34:38 2018 +0200
Commit: Noel Grandin 
CommitDate: Sun Oct 7 18:08:51 2018 +0200

use more unique_ptr in SmParser

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

diff --git a/starmath/inc/parse.hxx b/starmath/inc/parse.hxx
index 17e20b4cdaea..851512030c5b 100644
--- a/starmath/inc/parse.hxx
+++ b/starmath/inc/parse.hxx
@@ -89,27 +89,27 @@ class SmParser
 std::unique_ptr DoSubSup(TG nActiveGroup, SmNode *pGivenNode);
 std::unique_ptr DoOpSubSup();
 std::unique_ptr DoPower();
-SmBlankNode *DoBlank();
-SmNode *DoTerm(bool bGroupNumberIdent);
-SmNode *DoEscape();
-SmOperNode *DoOperator();
+std::unique_ptr DoBlank();
+std::unique_ptr DoTerm(bool bGroupNumberIdent);
+std::unique_ptr DoEscape();
+std::unique_ptr DoOperator();
 std::unique_ptr DoOper();
-SmStructureNode *DoUnOper();
+std::unique_ptr DoUnOper();
 std::unique_ptr DoAlign(bool bUseExtraSpaces = true);
 std::unique_ptr DoFontAttribut();
 std::unique_ptr DoAttribut();
 std::unique_ptr DoFont();
 std::unique_ptr DoFontSize();
 std::unique_ptr DoColor();
-SmStructureNode *DoBrace();
-SmBracebodyNode *DoBracebody(bool bIsLeftRight);
-SmTextNode *DoFunction();
-SmTableNode *DoBinom();
-SmStructureNode *DoStack();
-SmStructureNode *DoMatrix();
-SmSpecialNode *DoSpecial();
-SmGlyphSpecialNode *DoGlyphSpecial();
-SmExpressionNode *DoError(SmParseError Error);
+std::unique_ptr DoBrace();
+std::unique_ptr DoBracebody(bool bIsLeftRight);
+std::unique_ptr DoFunction();
+std::unique_ptr DoBinom();
+std::unique_ptr DoStack();
+std::unique_ptr DoMatrix();
+std::unique_ptr DoSpecial();
+std::unique_ptr DoGlyphSpecial();
+std::unique_ptr DoError(SmParseError Error);
 // end of grammar
 
 public:
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index 56d778f9b44c..71f9a3a4dce6 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -988,7 +988,7 @@ std::unique_ptr SmParser::DoAlign(bool 
bUseExtraSpaces)
 
 // allow for just one align statement in 5.0
 if (TokenInGroup(TG::Align))
-return std::unique_ptr(DoError(SmParseError::DoubleAlign));
+return DoError(SmParseError::DoubleAlign);
 }
 
 auto pNode = DoExpression(bUseExtraSpaces);
@@ -1146,7 +1146,7 @@ std::unique_ptr SmParser::DoProduct()
 //Let the glyph node know it's a binary operation
 m_aCurToken.eType = TBOPER;
 m_aCurToken.nGroup = TG::Product;
-xOper.reset(DoGlyphSpecial());
+xOper = DoGlyphSpecial();
 break;
 
 case TOVERBRACE :
@@ -1243,7 +1243,7 @@ std::unique_ptr SmParser::DoSubSup(TG 
nActiveGroup, SmNode *pGivenNode)
 {
 // forget the earlier one, remember an error instead
 aSubNodes[nIndex].reset();
-xENode.reset(DoError(SmParseError::DoubleSubsupscript)); // this 
also skips current token.
+xENode = DoError(SmParseError::DoubleSubsupscript); // this also 
skips current token.
 }
 else
 {
@@ -1261,7 +1261,7 @@ std::unique_ptr SmParser::DoSubSup(TG 
nActiveGroup, SmNode *pGivenNode)
 xSNode = DoRelation();
 }
 else
-xSNode.reset(DoTerm(true));
+xSNode = DoTerm(true);
 
 aSubNodes[nIndex] = std::move(xENode ? xENode : xSNode);
 }
@@ -1308,7 +1308,7 @@ std::unique_ptr SmParser::DoPower()
 return xNode;
 }
 
-SmBlankNode *SmParser::DoBlank()
+std::unique_ptr SmParser::DoBlank()
 {
 DepthProtect aDepthGuard(m_nParseDepth);
 if (aDepthGuard.TooDeep())
@@ -1330,10 +1330,10 @@ SmBlankNode *SmParser::DoBlank()
 {
 pBlankNode->Clear();
 }
-return pBlankNode.release();
+return pBlankNode;
 }
 
-SmNode *SmParser::DoTerm(bool bGroupNumberIdent)
+std::unique_ptr SmParser::DoTerm(bool bGroupNumberIdent)
 {
 DepthProtect aDepthGuard(m_nParseDepth);
 if (aDepthGuard.TooDeep())
@@ -1362,18 +1362,18 @@ SmNode *SmParser::DoTerm(bool bGroupNumberIdent)
 xSNode->SetSubNodes(nullptr, nullptr);
 
 NextToken();
-return xSNode.release();
+return std::unique_ptr(xSNode.release());
 }
 
 auto pNode = DoAlign(!bNoSpace);
 if (m_aCurToken.eType == TRGROUP) {
 NextToken();
-return pNode.release();
+return pNode;
 }
 auto 

[Libreoffice-commits] core.git: cui/source

2018-10-07 Thread Libreoffice Gerrit user
 cui/source/inc/backgrnd.hxx  |   16 +++-
 cui/source/tabpages/backgrnd.cxx |  127 +++
 2 files changed, 63 insertions(+), 80 deletions(-)

New commits:
commit 10510c002229c63ebf04b3b2a78b3f48fd95311c
Author: Noel Grandin 
AuthorDate: Fri Oct 5 14:48:21 2018 +0200
Commit: Noel Grandin 
CommitDate: Sun Oct 7 18:08:34 2018 +0200

flatten some impls in SvxBackgroundTabPage

having not one, but two separate impl classes and then a whole bunch of
data members?

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

diff --git a/cui/source/inc/backgrnd.hxx b/cui/source/inc/backgrnd.hxx
index db665c4815ef..256b91f2081c 100644
--- a/cui/source/inc/backgrnd.hxx
+++ b/cui/source/inc/backgrnd.hxx
@@ -30,8 +30,6 @@
 
 class BackgroundPreviewImpl;
 class SvxOpenGraphicDialog;
-struct SvxBackgroundTable_Impl;
-struct SvxBackgroundPage_Impl;
 class SvxBrushItem;
 
 /** class SvxBackgroundTabPage 
@@ -85,10 +83,20 @@ private:
 OUStringaBgdGraphicPath;
 OUStringaBgdGraphicFilter;
 
-std::unique_ptr pPageImpl;
+std::unique_ptr m_pLoadIdle;
+boolm_bIsImportDlgInExecute = false;
+
 std::unique_ptr pImportDlg;
 
-std::unique_ptr pTableBck_Impl;///< Items for 
Sw-Table must be corrected
+///< Items for Sw-Table must be corrected
+std::unique_ptr   m_pCellBrush;
+std::unique_ptr   m_pRowBrush;
+std::unique_ptr   m_pTableBrush;
+sal_uInt16  m_nCellWhich = 0;
+sal_uInt16  m_nRowWhich = 0;
+sal_uInt16  m_nTableWhich = 0;
+sal_Int32   m_nActPos = 0;
+
 std::unique_ptr pHighlighting;
 
 std::unique_ptr m_xWndPosition;
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index a4a3601b3aa5..52384f3cdea5 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -67,24 +67,6 @@ const sal_uInt16 SvxBackgroundTabPage::pPageRanges[] =
 0
 };
 
-struct SvxBackgroundTable_Impl
-{
-std::unique_ptr   pCellBrush;
-std::unique_ptr   pRowBrush;
-std::unique_ptr   pTableBrush;
-sal_uInt16  nCellWhich;
-sal_uInt16  nRowWhich;
-sal_uInt16  nTableWhich;
-sal_Int32   nActPos;
-
-SvxBackgroundTable_Impl()
-: nCellWhich(0)
-, nRowWhich(0)
-, nTableWhich(0)
-, nActPos(0)
-{}
-};
-
 struct SvxBackgroundPage_Impl
 {
 std::unique_ptr pLoadIdle;
@@ -290,7 +272,6 @@ SvxBackgroundTabPage::SvxBackgroundTabPage(TabPageParent 
pParent, const SfxItemS
 , bHighlighting(false)
 , bCharBackColor(false)
 , m_bColorSelected(false)
-, pPageImpl(new SvxBackgroundPage_Impl)
 , m_xWndPosition(new SvxRectCtl(this))
 , m_xBackgroundColorSet(new 
ColorValueSet(m_xBuilder->weld_scrolled_window("backgroundcolorsetwin")))
 , m_xPreview1(new BackgroundPreviewImpl)
@@ -349,9 +330,11 @@ SvxBackgroundTabPage::~SvxBackgroundTabPage()
 
 void SvxBackgroundTabPage::dispose()
 {
-pPageImpl.reset();
+m_pLoadIdle.reset();
 pImportDlg.reset();
-pTableBck_Impl.reset();
+m_pCellBrush.reset();
+m_pRowBrush.reset();
+m_pTableBrush.reset();
 m_xPreviewWin2.reset();
 m_xPreviewWin1.reset();
 m_xBackgroundColorSetWin.reset();
@@ -461,40 +444,32 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet )
 {
 if (m_xTblLBox->get_visible())
 {
-int nValue = m_xTblLBox->get_active();
-
-if ( pTableBck_Impl )
-{
-pTableBck_Impl->pCellBrush.reset();
-pTableBck_Impl->pRowBrush.reset();
-pTableBck_Impl->pTableBrush.reset();
-}
-else
-pTableBck_Impl.reset( new SvxBackgroundTable_Impl() );
-
-pTableBck_Impl->nActPos = nValue;
+m_pCellBrush.reset();
+m_pRowBrush.reset();
+m_pTableBrush.reset();
+m_nActPos = m_xTblLBox->get_active();
 
 nWhich = GetWhich( SID_ATTR_BRUSH );
 if ( rSet->GetItemState( nWhich, false ) >= SfxItemState::DEFAULT )
 {
 aBgdAttr = static_cast(rSet->Get(nWhich));
-pTableBck_Impl->pCellBrush.reset(new SvxBrushItem(aBgdAttr));
+m_pCellBrush.reset(new SvxBrushItem(aBgdAttr));
 }
-pTableBck_Impl->nCellWhich = nWhich;
+m_nCellWhich = nWhich;
 
 if ( rSet->GetItemState( SID_ATTR_BRUSH_ROW, false ) >= 
SfxItemState::DEFAULT )
 {
 aBgdAttr = static_cast(rSet->Get(SID_ATTR_BRUSH_ROW));
-pTableBck_Impl->pRowBrush.reset(new SvxBrushItem(aBgdAttr));
+m_pRowBrush.reset(new SvxBrushItem(aBgdAttr));
 }
-pTableBck_Impl->nRowWhich = SID_ATTR_BRUSH_ROW;
+   

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

2018-10-07 Thread Libreoffice Gerrit user
 sc/source/core/tool/queryparam.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 9d8c89d9044edb5ad5c8bc4a8f0fd5868192714e
Author: Eike Rathke 
AuthorDate: Sun Oct 7 00:24:31 2018 +0200
Commit: Eike Rathke 
CommitDate: Sun Oct 7 17:46:15 2018 +0200

Resolves: tdf#73081 empty <> not-empty is also a match if numeric

This simplifies to match empty for the same conditions whether
numeric or not, an empty string does not result in numeric 0 here.

Change-Id: I923a3e1f07dd2691d3ac720fc28ba76986fe6c3d
Reviewed-on: https://gerrit.libreoffice.org/61486
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/sc/source/core/tool/queryparam.cxx 
b/sc/source/core/tool/queryparam.cxx
index 269eb700bb83..6e2fefa3f323 100644
--- a/sc/source/core/tool/queryparam.cxx
+++ b/sc/source/core/tool/queryparam.cxx
@@ -290,9 +290,9 @@ void ScQueryParamBase::FillInExcelSyntax(
  * This could be handled independently if all queries should support
  * it, needs to be evaluated if that actually is desired. */
 
-// (empty = empty) is a match, and (empty <> not-empty) also is a match
-if (rItem.meType == ScQueryEntry::ByString)
-rItem.mbMatchEmpty = ((rEntry.eOp == SC_EQUAL && 
rItem.maString.isEmpty())
+// (empty = empty) is a match, and (empty <> not-empty) also is a
+// match. (empty = 0) is not a match.
+rItem.mbMatchEmpty = ((rEntry.eOp == SC_EQUAL && 
rItem.maString.isEmpty())
 || (rEntry.eOp == SC_NOT_EQUAL && !rItem.maString.isEmpty()));
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: basegfx/source editeng/source include/basegfx sw/source vcl/win

2018-10-07 Thread Libreoffice Gerrit user
 basegfx/source/tools/systemdependentdata.cxx  |2 +-
 editeng/source/editeng/impedit4.cxx   |2 +-
 include/basegfx/utils/systemdependentdata.hxx |2 +-
 sw/source/core/txtnode/txtedt.cxx |2 +-
 vcl/win/gdi/gdiimpl.cxx   |4 ++--
 5 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 86d9e48fc60dd7325658feca7088100c78023a7b
Author: Andrea Gelmini 
AuthorDate: Sun Oct 7 10:01:10 2018 +0200
Commit: Julien Nabet 
CommitDate: Sun Oct 7 15:28:53 2018 +0200

Fix typos

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

diff --git a/basegfx/source/tools/systemdependentdata.cxx 
b/basegfx/source/tools/systemdependentdata.cxx
index c727462c7191..a2ebcdf23b8a 100644
--- a/basegfx/source/tools/systemdependentdata.cxx
+++ b/basegfx/source/tools/systemdependentdata.cxx
@@ -89,7 +89,7 @@ namespace basegfx
 // a corresponding scaling factor
 const double fScaleToMB(3600.0 / (1024.0 * 1024.0 * 10.0));
 
-// also use a multiplier to move the start point higer
+// also use a multiplier to move the start point higher
 const double fMultiplierSeconds(10.0);
 
 // calculate
diff --git a/editeng/source/editeng/impedit4.cxx 
b/editeng/source/editeng/impedit4.cxx
index 6fdc00971ec5..c57ba48bd237 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -2704,7 +2704,7 @@ EditSelection ImpEditEngine::TransliterateText( const 
EditSelection& rSelection,
 
 // since we don't use Hiragana/Katakana or half-width/full-width 
transliterations here
 // it is fine to use ANYWORD_IGNOREWHITESPACES. (ANY_WORD btw is 
broken and will
-// occasionaly miss words in consecutive sentences). Also with 
ANYWORD_IGNOREWHITESPACES
+// occasionally miss words in consecutive sentences). Also with 
ANYWORD_IGNOREWHITESPACES
 // text like 'just-in-time' will be converted to 'Just-In-Time' which 
seems to be the
 // proper thing to do.
 const sal_Int16 nWordType = i18n::WordType::ANYWORD_IGNOREWHITESPACES;
diff --git a/include/basegfx/utils/systemdependentdata.hxx 
b/include/basegfx/utils/systemdependentdata.hxx
index d5cc8d645eb6..32f02bea6fa2 100644
--- a/include/basegfx/utils/systemdependentdata.hxx
+++ b/include/basegfx/utils/systemdependentdata.hxx
@@ -111,7 +111,7 @@ namespace basegfx
 
 // Calculate HoldCyclesInSeconds based on using
 // getHoldCyclesInSeconds and estimateUsageInBytes, the
-// result is crated once on-demand and buffered in
+// result is created once on-demand and buffered in
 // mnCalculatedCycles
 sal_uInt32 calculateCombinedHoldCyclesInSeconds() const;
 
diff --git a/sw/source/core/txtnode/txtedt.cxx 
b/sw/source/core/txtnode/txtedt.cxx
index d6847e65bf1d..74b33c963af8 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -1722,7 +1722,7 @@ void SwTextNode::TransliterateText(
 {
 // since we don't use Hiragana/Katakana or half-width/full-width 
transliterations here
 // it is fine to use ANYWORD_IGNOREWHITESPACES. (ANY_WORD btw is 
broken and will
-// occasionaly miss words in consecutive sentences). Also with 
ANYWORD_IGNOREWHITESPACES
+// occasionally miss words in consecutive sentences). Also with 
ANYWORD_IGNOREWHITESPACES
 // text like 'just-in-time' will be converted to 'Just-In-Time' which 
seems to be the
 // proper thing to do.
 const sal_Int16 nWordType = WordType::ANYWORD_IGNOREWHITESPACES;
diff --git a/vcl/win/gdi/gdiimpl.cxx b/vcl/win/gdi/gdiimpl.cxx
index a77e26f0e180..d11fb692dcd2 100644
--- a/vcl/win/gdi/gdiimpl.cxx
+++ b/vcl/win/gdi/gdiimpl.cxx
@@ -2042,7 +2042,7 @@ bool WinSalGraphicsImpl::drawPolyPolygon(
 aGraphics.SetTransform(&aMatrix);
 }
 
-// prepare local instabce of Gdiplus::GraphicsPath
+// prepare local instance of Gdiplus::GraphicsPath
 std::shared_ptr pGraphicsPath;
 
 // try to access buffered data
@@ -2257,7 +2257,7 @@ bool WinSalGraphicsImpl::drawPolyLine(
 }
 }
 
-// prepare local instabce of Gdiplus::GraphicsPath
+// prepare local instance of Gdiplus::GraphicsPath
 std::shared_ptr pGraphicsPath;
 
 // try to access buffered data
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-07 Thread Libreoffice Gerrit user
 sc/source/core/data/drwlayer.cxx|1 +
 sw/source/core/doc/DocumentDrawModelManager.cxx |1 +
 2 files changed, 2 insertions(+)

New commits:
commit fbc2b2d93a091c9dba26139878dd3d0acc5f31e9
Author: Regina Henschel 
AuthorDate: Fri Oct 5 21:24:45 2018 +0200
Commit: Regina Henschel 
CommitDate: Sun Oct 7 15:11:36 2018 +0200

tdf#120317 Set control layer name if not default

In commit a9ec212c1b545d745285f0ab3119a80713b1d1f2 the internal
default name of the layer, which holds form controls, was changed to
controls, the same name as used in file format and UNO. Users of
the class SdrLayerAdmin have to set the control layer name
explicitly in case they want an own, different name.

Change-Id: Ia08a85a4d01a75ee2c5115da25b2a409204ccc01
Reviewed-on: https://gerrit.libreoffice.org/61447
Tested-by: Jenkins
Reviewed-by: Regina Henschel 

diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index 7fd0e6bd6201..1e97aa0600f8 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -296,6 +296,7 @@ ScDrawLayer::ScDrawLayer( ScDocument* pDocument, const 
OUString& rName ) :
 rAdmin.NewLayer("hinten",   sal_uInt8(SC_LAYER_BACK));
 rAdmin.NewLayer("intern",   sal_uInt8(SC_LAYER_INTERN));
 rAdmin.NewLayer("Controls", sal_uInt8(SC_LAYER_CONTROLS));
+rAdmin.SetControlLayerName("Controls");
 rAdmin.NewLayer("hidden",   sal_uInt8(SC_LAYER_HIDDEN));
 // "Controls" is new - must also be created when loading
 
diff --git a/sw/source/core/doc/DocumentDrawModelManager.cxx 
b/sw/source/core/doc/DocumentDrawModelManager.cxx
index e6da069859fd..1f5f4bfa8f5a 100644
--- a/sw/source/core/doc/DocumentDrawModelManager.cxx
+++ b/sw/source/core/doc/DocumentDrawModelManager.cxx
@@ -93,6 +93,7 @@ void DocumentDrawModelManager::InitDrawModel()
 
 sLayerNm = "Controls";
 mnControls = mpDrawModel->GetLayerAdmin().NewLayer( sLayerNm )->GetID();
+mpDrawModel->GetLayerAdmin().SetControlLayerName(sLayerNm);
 
 // add invisible layers corresponding to the visible ones.
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: o3tl/qa vcl/source

2018-10-07 Thread Libreoffice Gerrit user
 o3tl/qa/test-lru_map.cxx  |2 +-
 vcl/source/font/fontcache.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 67e5201cc6caee52d8e37e98a0d535c085c19cb4
Author: Julien Nabet 
AuthorDate: Sun Oct 7 13:06:05 2018 +0200
Commit: Julien Nabet 
CommitDate: Sun Oct 7 14:43:03 2018 +0200

-Werror=catch-value=

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

diff --git a/o3tl/qa/test-lru_map.cxx b/o3tl/qa/test-lru_map.cxx
index a7f9777e2c5f..f0810084b6c7 100644
--- a/o3tl/qa/test-lru_map.cxx
+++ b/o3tl/qa/test-lru_map.cxx
@@ -261,7 +261,7 @@ void lru_map_test::testRemoveIf()
 });
 CPPUNIT_ASSERT(false); // not reached
 }
-catch (limit_except)
+catch (limit_except&)
 {
 // contains 7..4
 CPPUNIT_ASSERT_EQUAL(size_t(4), lru.size());
diff --git a/vcl/source/font/fontcache.cxx b/vcl/source/font/fontcache.cxx
index 2b2e062ecea0..b8e4bec2b5ce 100644
--- a/vcl/source/font/fontcache.cxx
+++ b/vcl/source/font/fontcache.cxx
@@ -186,7 +186,7 @@ rtl::Reference 
ImplFontCache::GetFontInstance( PhysicalFont
 return true;
 });
 }
-catch (limit_exception) {}
+catch (limit_exception&) {}
 }
 
 assert(pFontInstance);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source

2018-10-07 Thread Libreoffice Gerrit user
 cui/source/tabpages/backgrnd.cxx |   68 +--
 1 file changed, 23 insertions(+), 45 deletions(-)

New commits:
commit 8a445db3bb59a3e046daa62c1a1e0e199f3977b7
Author: Noel Grandin 
AuthorDate: Fri Oct 5 14:37:00 2018 +0200
Commit: Noel Grandin 
CommitDate: Sun Oct 7 11:48:04 2018 +0200

use std::unique_ptr in SvxBackgroundTable_Impl and SvxBackgroundPage_Impl

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

diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 5452b11da15d..a4a3601b3aa5 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -69,19 +69,16 @@ const sal_uInt16 SvxBackgroundTabPage::pPageRanges[] =
 
 struct SvxBackgroundTable_Impl
 {
-SvxBrushItem*   pCellBrush;
-SvxBrushItem*   pRowBrush;
-SvxBrushItem*   pTableBrush;
+std::unique_ptr   pCellBrush;
+std::unique_ptr   pRowBrush;
+std::unique_ptr   pTableBrush;
 sal_uInt16  nCellWhich;
 sal_uInt16  nRowWhich;
 sal_uInt16  nTableWhich;
 sal_Int32   nActPos;
 
 SvxBackgroundTable_Impl()
-: pCellBrush(nullptr)
-, pRowBrush(nullptr)
-, pTableBrush(nullptr)
-, nCellWhich(0)
+: nCellWhich(0)
 , nRowWhich(0)
 , nTableWhich(0)
 , nActPos(0)
@@ -90,13 +87,8 @@ struct SvxBackgroundTable_Impl
 
 struct SvxBackgroundPage_Impl
 {
-Idle*  pLoadIdle;
-boolbIsImportDlgInExecute;
-
-SvxBackgroundPage_Impl()
-: pLoadIdle(nullptr)
-, bIsImportDlgInExecute(false)
-{}
+std::unique_ptr pLoadIdle;
+boolbIsImportDlgInExecute = false;
 };
 
 /// Returns the fill style of the currently selected entry.
@@ -357,27 +349,13 @@ SvxBackgroundTabPage::~SvxBackgroundTabPage()
 
 void SvxBackgroundTabPage::dispose()
 {
-if (pPageImpl)
-{
-delete pPageImpl->pLoadIdle;
-pPageImpl.reset();
-}
-
+pPageImpl.reset();
 pImportDlg.reset();
-
-if( pTableBck_Impl)
-{
-delete pTableBck_Impl->pCellBrush;
-delete pTableBck_Impl->pRowBrush;
-delete pTableBck_Impl->pTableBrush;
-pTableBck_Impl.reset();
-}
-
+pTableBck_Impl.reset();
 m_xPreviewWin2.reset();
 m_xPreviewWin1.reset();
 m_xBackgroundColorSetWin.reset();
 m_xWndPositionWin.reset();
-
 m_xPreview2.reset();
 m_xPreview1.reset();
 m_xBackgroundColorSet.reset();
@@ -487,9 +465,9 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet )
 
 if ( pTableBck_Impl )
 {
-DELETEZ( pTableBck_Impl->pCellBrush);
-DELETEZ( pTableBck_Impl->pRowBrush);
-DELETEZ( pTableBck_Impl->pTableBrush);
+pTableBck_Impl->pCellBrush.reset();
+pTableBck_Impl->pRowBrush.reset();
+pTableBck_Impl->pTableBrush.reset();
 }
 else
 pTableBck_Impl.reset( new SvxBackgroundTable_Impl() );
@@ -500,21 +478,21 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet )
 if ( rSet->GetItemState( nWhich, false ) >= SfxItemState::DEFAULT )
 {
 aBgdAttr = static_cast(rSet->Get(nWhich));
-pTableBck_Impl->pCellBrush = new SvxBrushItem(aBgdAttr);
+pTableBck_Impl->pCellBrush.reset(new SvxBrushItem(aBgdAttr));
 }
 pTableBck_Impl->nCellWhich = nWhich;
 
 if ( rSet->GetItemState( SID_ATTR_BRUSH_ROW, false ) >= 
SfxItemState::DEFAULT )
 {
 aBgdAttr = static_cast(rSet->Get(SID_ATTR_BRUSH_ROW));
-pTableBck_Impl->pRowBrush = new SvxBrushItem(aBgdAttr);
+pTableBck_Impl->pRowBrush.reset(new SvxBrushItem(aBgdAttr));
 }
 pTableBck_Impl->nRowWhich = SID_ATTR_BRUSH_ROW;
 
 if ( rSet->GetItemState( SID_ATTR_BRUSH_TABLE, false ) >= 
SfxItemState::DEFAULT )
 {
 aBgdAttr = static_cast(rSet->Get(SID_ATTR_BRUSH_TABLE));
-pTableBck_Impl->pTableBrush = new SvxBrushItem(aBgdAttr);
+pTableBck_Impl->pTableBrush.reset(new SvxBrushItem(aBgdAttr));
 }
 pTableBck_Impl->nTableWhich = SID_ATTR_BRUSH_TABLE;
 
@@ -562,7 +540,7 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* 
rCoreSet )
 if ( pPageImpl->pLoadIdle && pPageImpl->pLoadIdle->IsActive() )
 {
 pPageImpl->pLoadIdle->Stop();
-LoadIdleHdl_Impl( pPageImpl->pLoadIdle );
+LoadIdleHdl_Impl( pPageImpl->pLoadIdle.get() );
 }
 
 bool bModified = false;
@@ -821,7 +799,7 @@ void SvxBackgroundTabPage::ShowSelector()
 m_xBtnPosition->connect_toggled(HDL(RadioClickHdl_Impl));
 
 // delayed loading via timer (because of UI-Update)
-

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

2018-10-07 Thread Libreoffice Gerrit user
 sc/source/ui/cctrl/checklistmenu.cxx |4 ++--
 sc/source/ui/inc/checklistmenu.hxx   |2 +-
 sc/source/ui/view/gridwin.cxx|2 +-
 sc/source/ui/view/gridwin2.cxx   |2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit c666ea47bcf45b3c530778a7d0eea888e949947e
Author: Noel Grandin 
AuthorDate: Fri Oct 5 11:09:05 2018 +0200
Commit: Noel Grandin 
CommitDate: Sun Oct 7 11:47:20 2018 +0200

use more std::unique_ptr in ScCheckListMenuWindow

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

diff --git a/sc/source/ui/cctrl/checklistmenu.cxx 
b/sc/source/ui/cctrl/checklistmenu.cxx
index 9dcd5894baec..6a2a8b436674 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -2008,9 +2008,9 @@ void ScCheckListMenuWindow::close(bool bOK)
 EndPopupMode();
 }
 
-void ScCheckListMenuWindow::setExtendedData(ExtendedData* p)
+void ScCheckListMenuWindow::setExtendedData(std::unique_ptr p)
 {
-mpExtendedData.reset(p);
+mpExtendedData = std::move(p);
 }
 
 ScCheckListMenuWindow::ExtendedData* ScCheckListMenuWindow::getExtendedData()
diff --git a/sc/source/ui/inc/checklistmenu.hxx 
b/sc/source/ui/inc/checklistmenu.hxx
index 076ad2414afa..c3638b147384 100644
--- a/sc/source/ui/inc/checklistmenu.hxx
+++ b/sc/source/ui/inc/checklistmenu.hxx
@@ -355,7 +355,7 @@ public:
  * popup window class manages its life time; no explicit deletion of the
  * instance is needed in the client code.
  */
-void setExtendedData(ExtendedData* p);
+void setExtendedData(std::unique_ptr p);
 
 /**
  * Get the store auxiliary data, or NULL if no such data is stored.
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 4bbdc97493e0..fdcdf2da7e5b 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -662,7 +662,7 @@ void ScGridWindow::LaunchAutoFilterMenu(SCCOL nCol, SCROW 
nRow)
 return;
 
 pData->mpData = pDBData;
-mpAutoFilterPopup->setExtendedData(pData.release());
+mpAutoFilterPopup->setExtendedData(std::move(pData));
 
 ScQueryParam aParam;
 pDBData->GetQueryParam(aParam);
diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx
index 66e1a83ee25c..4adfc1e32f5d 100644
--- a/sc/source/ui/view/gridwin2.cxx
+++ b/sc/source/ui/view/gridwin2.cxx
@@ -470,7 +470,7 @@ void ScGridWindow::DPLaunchFieldPopupMenu(const Point& 
rScrPos, const Size& rScr
 mpDPFieldPopup.disposeAndClear();
 mpDPFieldPopup.reset(VclPtr::Create(this, 
pViewData->GetDocument()));
 mpDPFieldPopup->setName("DataPilot field member popup");
-mpDPFieldPopup->setExtendedData(pDPData.release());
+mpDPFieldPopup->setExtendedData(std::move(pDPData));
 mpDPFieldPopup->setOKAction(new DPFieldPopupOKAction(this));
 {
 // Populate field members.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits