[Libreoffice-commits] .: 4 commits - binfilter/bf_forms binfilter/bf_sfx2 binfilter/bf_svtools binfilter/bf_svx binfilter/inc

Michael Stahl mst at kemper.freedesktop.org
Tue Feb 14 14:40:40 PST 2012


 binfilter/bf_forms/source/misc/forms_InterfaceContainer.cxx |    6 ++++-
 binfilter/bf_sfx2/source/doc/timestamp.cxx                  |    4 +--
 binfilter/bf_svtools/source/misc/tl_strimp.cxx              |   13 ++++++++++++
 binfilter/bf_svx/source/xoutdev/svx_xattr.cxx               |    4 ++-
 binfilter/inc/bf_tools/string.hxx                           |   10 +--------
 5 files changed, 25 insertions(+), 12 deletions(-)

New commits:
commit 485398ddf96c6a7ca9e0903fa8f83f76cae43e3c
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Feb 14 23:37:14 2012 +0100

    binfilter::TimeStamp::Load: fix date/time on LP64 platform regression

diff --git a/binfilter/bf_sfx2/source/doc/timestamp.cxx b/binfilter/bf_sfx2/source/doc/timestamp.cxx
index 90ed421..bea1920 100644
--- a/binfilter/bf_sfx2/source/doc/timestamp.cxx
+++ b/binfilter/bf_sfx2/source/doc/timestamp.cxx
@@ -223,8 +223,8 @@ BOOL TimeStamp::Load ( SvStream& rStream )
     impl_adjustName ( m_sModifiedByName ) ;
 
     // Load date and time from stream.
-    long nDate ;
-    long nTime ;
+    sal_Int32 nDate ;
+    sal_Int32 nTime ;
 
     rStream >> nDate >> nTime ;
 
commit 508835a5ea8d385b3a740b769d75cdd4c3362809
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Feb 14 23:36:16 2012 +0100

    binfilter::frm::OInterfaceContainer::disposing: fix boost assertion

diff --git a/binfilter/bf_forms/source/misc/forms_InterfaceContainer.cxx b/binfilter/bf_forms/source/misc/forms_InterfaceContainer.cxx
index 53811e1..7a65da5 100644
--- a/binfilter/bf_forms/source/misc/forms_InterfaceContainer.cxx
+++ b/binfilter/bf_forms/source/misc/forms_InterfaceContainer.cxx
@@ -486,13 +486,17 @@ void SAL_CALL OInterfaceContainer::disposing(const EventObject& _rSource) throw(
                 "OInterfaceContainer::disposing: map element not normalized!" );
 
             if ( i->second.get() == _rSource.Source.get() )
+            {
                 // found it
+                m_aMap.erase(i);
                 break;
+            }
 
             ++i;
+
+            DBG_ASSERT( i != m_aMap.end(), "OInterfaceContainer::disposing: inconsistency: the element was in m_aItems, but not in m_aMap!" );
         }
 
-        m_aMap.erase(i);
         m_aItems.erase(j);
     }
 }
commit 76647a6e03d72de7f7359e3f86ae3e9bebeffa95
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Feb 14 23:35:27 2012 +0100

    binfilter::XColorItem::GetValue: null pointer crash

diff --git a/binfilter/bf_svx/source/xoutdev/svx_xattr.cxx b/binfilter/bf_svx/source/xoutdev/svx_xattr.cxx
index 35eaa77..341b16a 100644
--- a/binfilter/bf_svx/source/xoutdev/svx_xattr.cxx
+++ b/binfilter/bf_svx/source/xoutdev/svx_xattr.cxx
@@ -354,8 +354,10 @@ XubString aNameOrIndexEmptyString;
 /*N*/ {
 /*N*/   if (!IsIndex())
 /*N*/       return aColor;
-/*N*/   else
+/*N*/   else if (pTable)
 /*?*/       return pTable->Get(GetIndex())->GetColor();
+        else
+            return Color(); // whatever
 /*N*/
 /*N*/ }
 
commit d38915fd08569ea5c7138f1755d539cc399d4f00
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Feb 14 23:32:37 2012 +0100

    binfilter: fix insta-crash string constructors

diff --git a/binfilter/bf_svtools/source/misc/tl_strimp.cxx b/binfilter/bf_svtools/source/misc/tl_strimp.cxx
index b0d7279..81f864c 100644
--- a/binfilter/bf_svtools/source/misc/tl_strimp.cxx
+++ b/binfilter/bf_svtools/source/misc/tl_strimp.cxx
@@ -219,6 +219,19 @@ STRING::STRING( const STRING& rStr )
     mpData = rStr.mpData;
 }
 
+STRING::STRING( const ::STRING& rStr )
+{
+    DBG_CTOR( STRING, DBGCHECKSTRING );
+    DBG_CHKOBJ( &rStr, STRING, DBGCHECKSTRING );
+
+    // this is good enough for binfilter...
+    STRING temp;
+    temp.Assign(rStr);
+
+    STRING_ACQUIRE((STRING_TYPE *)temp.mpData);
+    mpData = temp.mpData;
+}
+
 // -----------------------------------------------------------------------
 
 STRING::STRING( const STRING& rStr, xub_StrLen nPos, xub_StrLen nLen )
diff --git a/binfilter/inc/bf_tools/string.hxx b/binfilter/inc/bf_tools/string.hxx
index 0b4c00e..3eab25a 100644
--- a/binfilter/inc/bf_tools/string.hxx
+++ b/binfilter/inc/bf_tools/string.hxx
@@ -141,10 +141,7 @@ private:
 public:
                         ByteString();
                         ByteString( const ByteString& rStr );
-                        ByteString( const ::ByteString& rStr )
-                        {
-                            Assign(rStr);
-                        }
+                        ByteString( const ::ByteString& rStr );
                         ByteString( const ByteString& rStr, xub_StrLen nPos, xub_StrLen nLen );
                         ByteString( const rtl::OString& rStr );
                         ByteString( const sal_Char* pCharStr );
@@ -376,10 +373,7 @@ private:
 public:
                         UniString();
                         UniString( const UniString& rStr );
-                        UniString( const ::UniString& rStr )
-                        {
-                            Assign(rStr);
-                        }
+                        UniString( const ::UniString& rStr );
                         UniString( const UniString& rStr, xub_StrLen nPos, xub_StrLen nLen );
                         UniString( const rtl::OUString& rStr );
                         UniString( const sal_Unicode* pCharStr );


More information about the Libreoffice-commits mailing list