[Libreoffice-commits] .: 3 commits - sfx2/qa svx/inc svx/source ucb/qa

Bjoern Michaelsen bmichaelsen at kemper.freedesktop.org
Mon May 23 02:31:49 PDT 2011


 sfx2/qa/complex/sfx2/UndoManager.java |    1 +
 svx/inc/svx/gridctrl.hxx              |    2 +-
 svx/source/fmcomp/gridctrl.cxx        |   14 +++++++-------
 ucb/qa/unoapi/knownissues.xcl         |    3 ---
 4 files changed, 9 insertions(+), 11 deletions(-)

New commits:
commit 1151eaf2612c0037d7bbdd5c45a54b0346377f20
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date:   Sun May 22 16:23:24 2011 +0200

    fdo#35663: be more explicit on asserts

diff --git a/sfx2/qa/complex/sfx2/UndoManager.java b/sfx2/qa/complex/sfx2/UndoManager.java
index afae8ed..27e93d2 100755
--- a/sfx2/qa/complex/sfx2/UndoManager.java
+++ b/sfx2/qa/complex/sfx2/UndoManager.java
@@ -781,6 +781,7 @@ public class UndoManager
         m_currentTestCase.doSingleModification();
         assertEquals( "when the Undo manager is locked, no implicit additions should happen",
             0, m_undoListener.getUndoActionsAdded() );
+        assertTrue( "Undo manager gets unlocked as a side effect of performing a simple operation", i_undoManager.isLocked() );
         i_undoManager.unlock();
         assertEquals( "unlock is not expected to add collected actions - they should be discarded",
             0, m_undoListener.getUndoActionsAdded() );
commit f25b836319678ab333a1a997cc7fdadfedad8e08
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date:   Sun May 22 15:14:40 2011 +0200

    fdo#35728: fix GridControl crash
    
    * various forms.OGridControlModel tests segfaulted
    * root cause is the migration to stl containers in DbGridControl
    * the old tools container returned the removed pointer or NULL causing no failure
    * a signed int was used as index while the functions returned a unsigned int
    * the GRID_COLUMN_NOT_FOUND magic value was out of the signed range

diff --git a/svx/inc/svx/gridctrl.hxx b/svx/inc/svx/gridctrl.hxx
index 8187508..48a938e 100644
--- a/svx/inc/svx/gridctrl.hxx
+++ b/svx/inc/svx/gridctrl.hxx
@@ -116,7 +116,7 @@ public:
     virtual void columnChanged() = 0;
 };
 
-#define GRID_COLUMN_NOT_FOUND   ((sal_uInt16)-1)
+#define GRID_COLUMN_NOT_FOUND   SAL_MAX_UINT16
 
 //==================================================================
 // InitWindowFacet, describing which aspect of a column's Window to (re-)initialize
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index a6d4458..66fd40f 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -1722,13 +1722,13 @@ sal_uInt16 DbGridControl::AppendColumn(const XubString& rName, sal_uInt16 nWidth
 //------------------------------------------------------------------------------
 void DbGridControl::RemoveColumn(sal_uInt16 nId)
 {
-    sal_Int16 nIndex = GetModelColumnPos(nId);
-    DbGridControl_Base::RemoveColumn(nId);
-
-    delete m_aColumns[ nIndex ];
-    DbGridColumns::iterator it = m_aColumns.begin();
-    ::std::advance( it, nIndex );
-    m_aColumns.erase( it );
+    const sal_uInt16 nIndex = GetModelColumnPos(nId);
+    if(nIndex != GRID_COLUMN_NOT_FOUND)
+    {
+        DbGridControl_Base::RemoveColumn(nId);
+        delete m_aColumns[nIndex];
+        m_aColumns.erase( m_aColumns.begin()+nIndex );
+    }
 }
 
 //------------------------------------------------------------------------------
commit 1de9a489367e3bd0f9db6256b320b1224b2f4fa8
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date:   Sun May 22 13:28:28 2011 +0200

    fdo#35727: reenable ucb.UniversalContentBroker::...::XContentProviderManager
    
    * renable ucb.UniversalContentBroker::com::sun::star::ucb::XContentProviderManager

diff --git a/ucb/qa/unoapi/knownissues.xcl b/ucb/qa/unoapi/knownissues.xcl
index efbafe7..7929c16 100755
--- a/ucb/qa/unoapi/knownissues.xcl
+++ b/ucb/qa/unoapi/knownissues.xcl
@@ -1,5 +1,2 @@
 ### i86626 ###
 ucb.UniversalContentBroker::com::sun::star::ucb::XCommandProcessor
-
-### fd#35727 ###
-ucb.UniversalContentBroker::com::sun::star::ucb::XContentProviderManager


More information about the Libreoffice-commits mailing list