[Libreoffice-commits] core.git: 5 commits - sc/inc sc/source sd/qa sd/source sw/source

Michael Stahl mstahl at redhat.com
Wed Jul 8 02:34:56 PDT 2015


 sc/inc/pch/precompiled_sc.hxx                                  |    1 -
 sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx         |    2 --
 sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx |    4 +---
 sc/source/ui/StatisticsDialogs/FTestDialog.cxx                 |    6 ++----
 sc/source/ui/StatisticsDialogs/TTestDialog.cxx                 |    6 ++----
 sc/source/ui/StatisticsDialogs/ZTestDialog.cxx                 |    6 ++----
 sd/qa/unit/export-tests.cxx                                    |    2 +-
 sd/source/core/stlsheet.cxx                                    |    7 +++++++
 sw/source/uibase/sidebar/PagePropertyPanel.cxx                 |   10 ++++------
 sw/source/uibase/sidebar/SwPanelFactory.cxx                    |    1 -
 10 files changed, 19 insertions(+), 26 deletions(-)

New commits:
commit 5f3930edf853003fa57130b0a7d0a92059f94dc7
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Jul 7 22:12:51 2015 +0200

    sw: remove boost::bind from PagePropertyPanel
    
    Change-Id: I4e5bb81a14ee996bddc8585b5d350487f5f20d50

diff --git a/sw/source/uibase/sidebar/PagePropertyPanel.cxx b/sw/source/uibase/sidebar/PagePropertyPanel.cxx
index 0d0ac10..4300404 100644
--- a/sw/source/uibase/sidebar/PagePropertyPanel.cxx
+++ b/sw/source/uibase/sidebar/PagePropertyPanel.cxx
@@ -48,8 +48,6 @@
 #include <sfx2/viewsh.hxx>
 #include <sfx2/objsh.hxx>
 
-#include <boost/bind.hpp>
-
 #include <com/sun/star/frame/XController.hpp>
 #include <com/sun/star/frame/XModel.hpp>
 #include <com/sun/star/document/XUndoManagerSupplier.hpp>
@@ -171,16 +169,16 @@ PagePropertyPanel::PagePropertyPanel(
     , m_aSwPagePgMetricControl(SID_ATTR_METRIC, *pBindings, *this)
 
     , maOrientationPopup( this,
-                          ::boost::bind( &PagePropertyPanel::CreatePageOrientationControl, this, _1 ),
+            [this] (svx::sidebar::PopupContainer *parent)  { return this->CreatePageOrientationControl(parent); },
                           OUString("Page orientation") )
     , maMarginPopup( this,
-                     ::boost::bind( &PagePropertyPanel::CreatePageMarginControl, this, _1 ),
+            [this] (svx::sidebar::PopupContainer *parent) { return this->CreatePageMarginControl(parent); },
                      OUString("Page margins") )
     , maSizePopup( this,
-                   ::boost::bind( &PagePropertyPanel::CreatePageSizeControl, this, _1 ),
+            [this] (svx::sidebar::PopupContainer *parent) { return this->CreatePageSizeControl(parent); },
                    OUString("Page size") )
     , maColumnPopup( this,
-                     ::boost::bind( &PagePropertyPanel::CreatePageColumnControl, this, _1 ),
+            [this] (svx::sidebar::PopupContainer *parent) { return this->CreatePageColumnControl(parent); },
                      OUString("Page columns") )
 
     , mxUndoManager( getUndoManager( rxFrame ) )
diff --git a/sw/source/uibase/sidebar/SwPanelFactory.cxx b/sw/source/uibase/sidebar/SwPanelFactory.cxx
index 92dd487..ae6feab 100644
--- a/sw/source/uibase/sidebar/SwPanelFactory.cxx
+++ b/sw/source/uibase/sidebar/SwPanelFactory.cxx
@@ -37,7 +37,6 @@
 #include <cppuhelper/basemutex.hxx>
 #include <cppuhelper/supportsservice.hxx>
 
-#include <boost/bind.hpp>
 #include <boost/noncopyable.hpp>
 
 using namespace css;
commit 177f59b9e0ebdbde1d13d0c18d57e215287eafbf
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Jul 7 17:49:21 2015 +0200

    sc: convert boost::scoped_ptr to std::unique_ptr while there
    
    Change-Id: I5c03889f3611b7c1799c39aa75a223ba34b603e4

diff --git a/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx b/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx
index 36ed5fe..1759c71 100644
--- a/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx
@@ -11,7 +11,6 @@
 #include <sfx2/dispatch.hxx>
 #include <svl/zforlist.hxx>
 #include <svl/undo.hxx>
-#include <boost/scoped_ptr.hpp>
 
 #include "formulacell.hxx"
 #include "rangelst.hxx"
diff --git a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
index 4f935c0..0701b2e 100644
--- a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
@@ -11,7 +11,6 @@
 #include <sfx2/dispatch.hxx>
 #include <svl/zforlist.hxx>
 #include <svl/undo.hxx>
-#include <boost/scoped_ptr.hpp>
 
 #include "formulacell.hxx"
 #include "rangelst.hxx"
@@ -87,7 +86,7 @@ ScRange ScDescriptiveStatisticsDialog::ApplyOutput(ScDocShell* pDocShell)
             formula::FormulaGrammar::mergeToGrammar( formula::FormulaGrammar::GRAM_ENGLISH, mAddressDetails.eConv));
     FormulaTemplate aTemplate(mDocument);
 
-    boost::scoped_ptr<DataRangeIterator> pIterator;
+    std::unique_ptr<DataRangeIterator> pIterator;
     if (mGroupedBy == BY_COLUMN)
         pIterator.reset(new DataRangeByColumnIterator(mInputRange));
     else
diff --git a/sc/source/ui/StatisticsDialogs/FTestDialog.cxx b/sc/source/ui/StatisticsDialogs/FTestDialog.cxx
index a23699d..c2e68e8 100644
--- a/sc/source/ui/StatisticsDialogs/FTestDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/FTestDialog.cxx
@@ -11,7 +11,6 @@
 #include <sfx2/dispatch.hxx>
 #include <svl/zforlist.hxx>
 #include <svl/undo.hxx>
-#include <boost/scoped_ptr.hpp>
 
 #include "formulacell.hxx"
 #include "rangelst.hxx"
@@ -56,13 +55,13 @@ ScRange ScFTestDialog::ApplyOutput(ScDocShell* pDocShell)
             formula::FormulaGrammar::mergeToGrammar(formula::FormulaGrammar::GRAM_ENGLISH, mAddressDetails.eConv));
     FormulaTemplate aTemplate(mDocument);
 
-    boost::scoped_ptr<DataRangeIterator> pVariable1Iterator;
+    std::unique_ptr<DataRangeIterator> pVariable1Iterator;
     if (mGroupedBy == BY_COLUMN)
         pVariable1Iterator.reset(new DataRangeByColumnIterator(mVariable1Range));
     else
         pVariable1Iterator.reset(new DataRangeByRowIterator(mVariable1Range));
 
-    boost::scoped_ptr<DataRangeIterator> pVariable2Iterator;
+    std::unique_ptr<DataRangeIterator> pVariable2Iterator;
     if (mGroupedBy == BY_COLUMN)
         pVariable2Iterator.reset(new DataRangeByColumnIterator(mVariable2Range));
     else
diff --git a/sc/source/ui/StatisticsDialogs/TTestDialog.cxx b/sc/source/ui/StatisticsDialogs/TTestDialog.cxx
index a94e822..457cb67 100644
--- a/sc/source/ui/StatisticsDialogs/TTestDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/TTestDialog.cxx
@@ -11,7 +11,6 @@
 #include <sfx2/dispatch.hxx>
 #include <svl/zforlist.hxx>
 #include <svl/undo.hxx>
-#include <boost/scoped_ptr.hpp>
 
 #include "formulacell.hxx"
 #include "rangelst.hxx"
@@ -56,13 +55,13 @@ ScRange ScTTestDialog::ApplyOutput(ScDocShell* pDocShell)
             formula::FormulaGrammar::mergeToGrammar( formula::FormulaGrammar::GRAM_ENGLISH, mAddressDetails.eConv));
     FormulaTemplate aTemplate(mDocument);
 
-    boost::scoped_ptr<DataRangeIterator> pVariable1Iterator;
+    std::unique_ptr<DataRangeIterator> pVariable1Iterator;
     if (mGroupedBy == BY_COLUMN)
         pVariable1Iterator.reset(new DataRangeByColumnIterator(mVariable1Range));
     else
         pVariable1Iterator.reset(new DataRangeByRowIterator(mVariable1Range));
 
-    boost::scoped_ptr<DataRangeIterator> pVariable2Iterator;
+    std::unique_ptr<DataRangeIterator> pVariable2Iterator;
     if (mGroupedBy == BY_COLUMN)
         pVariable2Iterator.reset(new DataRangeByColumnIterator(mVariable2Range));
     else
diff --git a/sc/source/ui/StatisticsDialogs/ZTestDialog.cxx b/sc/source/ui/StatisticsDialogs/ZTestDialog.cxx
index e1e92d3..4be10af 100644
--- a/sc/source/ui/StatisticsDialogs/ZTestDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/ZTestDialog.cxx
@@ -11,7 +11,6 @@
 #include <sfx2/dispatch.hxx>
 #include <svl/zforlist.hxx>
 #include <svl/undo.hxx>
-#include <boost/scoped_ptr.hpp>
 
 #include "formulacell.hxx"
 #include "rangelst.hxx"
@@ -56,13 +55,13 @@ ScRange ScZTestDialog::ApplyOutput(ScDocShell* pDocShell)
             formula::FormulaGrammar::mergeToGrammar( formula::FormulaGrammar::GRAM_ENGLISH, mAddressDetails.eConv));
     FormulaTemplate aTemplate(mDocument);
 
-    boost::scoped_ptr<DataRangeIterator> pVariable1Iterator;
+    std::unique_ptr<DataRangeIterator> pVariable1Iterator;
     if (mGroupedBy == BY_COLUMN)
         pVariable1Iterator.reset(new DataRangeByColumnIterator(mVariable1Range));
     else
         pVariable1Iterator.reset(new DataRangeByRowIterator(mVariable1Range));
 
-    boost::scoped_ptr<DataRangeIterator> pVariable2Iterator;
+    std::unique_ptr<DataRangeIterator> pVariable2Iterator;
     if (mGroupedBy == BY_COLUMN)
         pVariable2Iterator.reset(new DataRangeByColumnIterator(mVariable2Range));
     else
commit 1349c8356429279f6b6ff6d8fc7a1a51e5c7ee55
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Jul 7 17:44:29 2015 +0200

    sc: remove unused boost::random includes
    
    Change-Id: I91b5ad2319f7c2b57c890106e94f8de79cbefbc0

diff --git a/sc/inc/pch/precompiled_sc.hxx b/sc/inc/pch/precompiled_sc.hxx
index 7b9f21e..8ebbb25 100644
--- a/sc/inc/pch/precompiled_sc.hxx
+++ b/sc/inc/pch/precompiled_sc.hxx
@@ -41,7 +41,6 @@
 #include <boost/noncopyable.hpp>
 #include <boost/ptr_container/ptr_map.hpp>
 #include <boost/ptr_container/ptr_vector.hpp>
-#include <boost/random.hpp>
 #include <memory>
 #include <boost/scoped_ptr.hpp>
 #include <boost/shared_ptr.hpp>
diff --git a/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx b/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx
index 1e6483d..36ed5fe 100644
--- a/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx
@@ -11,7 +11,6 @@
 #include <sfx2/dispatch.hxx>
 #include <svl/zforlist.hxx>
 #include <svl/undo.hxx>
-#include <boost/random.hpp>
 #include <boost/scoped_ptr.hpp>
 
 #include "formulacell.hxx"
diff --git a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
index 363c84d..4f935c0 100644
--- a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
@@ -11,7 +11,6 @@
 #include <sfx2/dispatch.hxx>
 #include <svl/zforlist.hxx>
 #include <svl/undo.hxx>
-#include <boost/random.hpp>
 #include <boost/scoped_ptr.hpp>
 
 #include "formulacell.hxx"
diff --git a/sc/source/ui/StatisticsDialogs/FTestDialog.cxx b/sc/source/ui/StatisticsDialogs/FTestDialog.cxx
index e18deb5..a23699d 100644
--- a/sc/source/ui/StatisticsDialogs/FTestDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/FTestDialog.cxx
@@ -11,7 +11,6 @@
 #include <sfx2/dispatch.hxx>
 #include <svl/zforlist.hxx>
 #include <svl/undo.hxx>
-#include <boost/random.hpp>
 #include <boost/scoped_ptr.hpp>
 
 #include "formulacell.hxx"
diff --git a/sc/source/ui/StatisticsDialogs/TTestDialog.cxx b/sc/source/ui/StatisticsDialogs/TTestDialog.cxx
index 17c4bfe..a94e822 100644
--- a/sc/source/ui/StatisticsDialogs/TTestDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/TTestDialog.cxx
@@ -11,7 +11,6 @@
 #include <sfx2/dispatch.hxx>
 #include <svl/zforlist.hxx>
 #include <svl/undo.hxx>
-#include <boost/random.hpp>
 #include <boost/scoped_ptr.hpp>
 
 #include "formulacell.hxx"
diff --git a/sc/source/ui/StatisticsDialogs/ZTestDialog.cxx b/sc/source/ui/StatisticsDialogs/ZTestDialog.cxx
index 4ab24c4..e1e92d3 100644
--- a/sc/source/ui/StatisticsDialogs/ZTestDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/ZTestDialog.cxx
@@ -11,7 +11,6 @@
 #include <sfx2/dispatch.hxx>
 #include <svl/zforlist.hxx>
 #include <svl/undo.hxx>
-#include <boost/random.hpp>
 #include <boost/scoped_ptr.hpp>
 
 #include "formulacell.hxx"
commit b7fffe8460a3c6f619e540f35eb119e0b4a255e7
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Jul 7 22:47:24 2015 +0200

    sd: test that we fixed the SdStyleSheet lifecycle
    
    Change-Id: Ia7e3c28eec02f23e4926cfb77b0afe7f8e79c711

diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index 51a5e51..fe60aeb 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -686,8 +686,8 @@ void SdExportTest::testTdf80020()
         uno::Reference<container::XNameAccess> xStyleFamily(xStyleFamilies->getByName("graphics"), uno::UNO_QUERY);
         uno::Reference<style::XStyle> xStyle(xStyleFamily->getByName("Test Style"), uno::UNO_QUERY);
         CPPUNIT_ASSERT_EQUAL(OUString("text"), xStyle->getParentStyle());
+        xDocShRef = saveAndReload( xDocShRef, ODP );
     }
-    xDocShRef = saveAndReload( xDocShRef, ODP );
     uno::Reference<style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(xDocShRef->GetModel(), uno::UNO_QUERY);
     uno::Reference<container::XNameAccess> xStyleFamilies(xStyleFamiliesSupplier->getStyleFamilies(), uno::UNO_QUERY);
     uno::Reference<container::XNameAccess> xStyleFamily(xStyleFamilies->getByName("graphics"), uno::UNO_QUERY);
commit 8904bf48e0cb4d5d0890684ce82dc2ff3252e41f
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Jul 7 23:57:07 2015 +0200

    sd: dispose SdStyleSheet properly
    
    If it's disposed during document destruction it still retained pointers
    to SfxItemSet and SfxStyleSheetBasePool.
    
    Change-Id: I7b986b4fe5ca466f0fa86a99b744f5e2f85e08be

diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index 4ed6289..050b1c0 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -773,6 +773,13 @@ void SAL_CALL SdStyleSheet::dispose(  ) throw (RuntimeException, std::exception)
 
 void SdStyleSheet::disposing()
 {
+    SolarMutexGuard aGuard;
+    if (bMySet)
+    {
+        delete pSet;
+    }
+    pSet = nullptr;
+    pPool = nullptr;
     mxPool.clear();
 }
 


More information about the Libreoffice-commits mailing list