[Libreoffice-commits] core.git: 5 commits - sd/source vcl/inc vcl/source vcl/unx

Herbert Dürr hdu at apache.org
Wed Mar 6 04:32:07 PST 2013


 sd/source/ui/app/optsitem.cxx               |    4 ++--
 vcl/inc/vcl/morebtn.hxx                     |    8 ++++----
 vcl/source/control/morebtn.cxx              |   12 ++++++------
 vcl/source/control/quickselectionengine.cxx |    8 ++++----
 vcl/source/filter/jpeg/jpegc.c              |    9 ++++++++-
 vcl/source/gdi/sallayout.cxx                |    2 +-
 vcl/unx/generic/printer/cupsmgr.cxx         |    1 -
 7 files changed, 25 insertions(+), 19 deletions(-)

New commits:
commit 6374ae0721a5e5da9ed1a477f9642feba01199a6
Author: Herbert Dürr <hdu at apache.org>
Date:   Wed Jul 18 08:16:30 2012 +0000

    Resolves: #i120306# cleanup failed loading of problematic jpeg
    
    Patch-by: orw
    Tested-by: orw
    (cherry picked from commit 52c755f84a4755982d0f0933986c292d199a34f0)
    
    Conflicts:
    	svtools/source/filter/jpeg/jpegc.c
    
    Change-Id: Ic0686ad44fcd527fc6f182748e255daceac2089e

diff --git a/vcl/source/filter/jpeg/jpegc.c b/vcl/source/filter/jpeg/jpegc.c
index 0f92948..7e2ae48 100644
--- a/vcl/source/filter/jpeg/jpegc.c
+++ b/vcl/source/filter/jpeg/jpegc.c
@@ -194,7 +194,14 @@ void ReadJPEG( void* pJPEGReader, void* pIStm, long* pLines )
         }
     }
 
-    jpeg_finish_decompress( &cinfo );
+    if ( pDIB )
+    {
+        jpeg_finish_decompress( &cinfo );
+    }
+    else
+    {
+        jpeg_abort_decompress( &cinfo );
+    }
     if (pScanLineBuffer!=NULL) {
         rtl_freeMemory( pScanLineBuffer );
         pScanLineBuffer=NULL;
commit c407de35fb9ebf1a585fe490dbf353f7e1a01dd1
Author: Herbert Dürr <hdu at apache.org>
Date:   Mon Jun 18 14:04:55 2012 +0000

    c#706125# fix overallocation on 64bit platforms
    
    (cherry picked from commit febadae3d165ba12f2f7944b441fdfc328a3725a)
    
    Conflicts:
    	vcl/source/gdi/sallayout.cxx
    
    Change-Id: I928bbf253cb5f7824b870ca77d04d3e453af67bd

diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index 695256c..c0aae95 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -981,7 +981,7 @@ void GenericSalLayout::ApplyDXArray( ImplLayoutArgs& rArgs )
     }
 
     // calculate adjusted cluster widths
-    sal_Int32* pNewGlyphWidths = (sal_Int32*)alloca( m_GlyphItems.size() * sizeof(long) );
+    sal_Int32* pNewGlyphWidths = (sal_Int32*)alloca( m_GlyphItems.size() * sizeof(sal_Int32) );
     for( i = 0; i < m_GlyphItems.size(); ++i )
         pNewGlyphWidths[ i ] = 0;
 
commit a424a01a735b117a0a0913b5e322ee9005407844
Author: Herbert Dürr <hdu at apache.org>
Date:   Mon Jun 18 12:35:06 2012 +0000

    c#708666# remove unused member m_aThread from GetPPDAttribs struct
    
    (cherry picked from commit 83587cfa95ca3ffa6c857d184f28e74c5b0a6bd7)
    
    Change-Id: I15bb5c1e6007688bc394858bea8374c59b965057

diff --git a/vcl/unx/generic/printer/cupsmgr.cxx b/vcl/unx/generic/printer/cupsmgr.cxx
index e087264..1c58bfb 100644
--- a/vcl/unx/generic/printer/cupsmgr.cxx
+++ b/vcl/unx/generic/printer/cupsmgr.cxx
@@ -52,7 +52,6 @@ struct GetPPDAttribs
     osl::Condition      m_aCondition;
     OString             m_aParameter;
     OString             m_aResult;
-    oslThread           m_aThread;
     int                 m_nRefs;
     bool*               m_pResetRunning;
     osl::Mutex*         m_pSyncMutex;
commit c604243cae1eab5de55b8c7ed97f3deae8f6dd34
Author: Herbert Dürr <hdu at apache.org>
Date:   Thu Jun 14 14:16:15 2012 +0000

    c#708912# fix a double free in Sd*Options
    
    (cherry picked from commit a6ee3d58c7cc3e6b0c4ddb31ddd8f495385adad2)
    
    Change-Id: I382c4d0b1206f84d2e38818aa022a3f4b1684b04

diff --git a/sd/source/ui/app/optsitem.cxx b/sd/source/ui/app/optsitem.cxx
index 1ad7d2e..ce978d3 100644
--- a/sd/source/ui/app/optsitem.cxx
+++ b/sd/source/ui/app/optsitem.cxx
@@ -137,8 +137,8 @@ void SdOptionsGeneric::Init() const
 
 SdOptionsGeneric::~SdOptionsGeneric()
 {
-    if( mpCfgItem )
-        delete mpCfgItem;
+    delete mpCfgItem;
+    mpCfgItem = NULL;
 }
 
 // -----------------------------------------------------------------------------
commit c79da6a42f1aa630435a1d2092580f3b1e9ff850
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 28 23:46:40 2013 +0000

    some XubString->OUString
    
    Change-Id: Ic2baaa9d6de5e6b53bbd11e5917f206336302f7c

diff --git a/vcl/inc/vcl/morebtn.hxx b/vcl/inc/vcl/morebtn.hxx
index 7172265..a715f37 100644
--- a/vcl/inc/vcl/morebtn.hxx
+++ b/vcl/inc/vcl/morebtn.hxx
@@ -71,10 +71,10 @@ public:
     void                SetText( const OUString& rNewText );
     OUString            GetText() const;
 
-    void                SetMoreText( const XubString& rNewText );
-    void                SetLessText( const XubString& rNewText );
-    XubString           GetMoreText() const;
-    XubString           GetLessText() const;
+    void                SetMoreText( const OUString& rNewText );
+    void                SetLessText( const OUString& rNewText );
+    OUString            GetMoreText() const;
+    OUString            GetLessText() const;
 };
 
 inline void MoreButton::SetState( sal_Bool bNewState )
diff --git a/vcl/source/control/morebtn.cxx b/vcl/source/control/morebtn.cxx
index 337bdc6..2d3b974 100644
--- a/vcl/source/control/morebtn.cxx
+++ b/vcl/source/control/morebtn.cxx
@@ -29,8 +29,8 @@ typedef ::std::vector< Window* > ImplMoreWindowList;
 struct ImplMoreButtonData
 {
     ImplMoreWindowList *mpItemList;
-    XubString           maMoreText;
-    XubString           maLessText;
+    OUString            maMoreText;
+    OUString            maLessText;
 };
 
 // =======================================================================
@@ -219,7 +219,7 @@ OUString MoreButton::GetText() const
 }
 
 // -----------------------------------------------------------------------
-void MoreButton::SetMoreText( const XubString& rText )
+void MoreButton::SetMoreText( const OUString& rText )
 {
     if ( mpMBData )
         mpMBData->maMoreText = rText;
@@ -229,7 +229,7 @@ void MoreButton::SetMoreText( const XubString& rText )
 }
 
 // -----------------------------------------------------------------------
-XubString MoreButton::GetMoreText() const
+OUString MoreButton::GetMoreText() const
 {
     if ( mpMBData )
         return mpMBData->maMoreText;
@@ -238,7 +238,7 @@ XubString MoreButton::GetMoreText() const
 }
 
 // -----------------------------------------------------------------------
-void MoreButton::SetLessText( const XubString& rText )
+void MoreButton::SetLessText( const OUString& rText )
 {
     if ( mpMBData )
         mpMBData->maLessText = rText;
@@ -248,7 +248,7 @@ void MoreButton::SetLessText( const XubString& rText )
 }
 
 // -----------------------------------------------------------------------
-XubString MoreButton::GetLessText() const
+OUString MoreButton::GetLessText() const
 {
     if ( mpMBData )
         return mpMBData->maLessText;
diff --git a/vcl/source/control/quickselectionengine.cxx b/vcl/source/control/quickselectionengine.cxx
index 5b87527..36d038e 100644
--- a/vcl/source/control/quickselectionengine.cxx
+++ b/vcl/source/control/quickselectionengine.cxx
@@ -78,7 +78,7 @@ namespace vcl
     }
 
     //--------------------------------------------------------------------
-    static StringEntryIdentifier findMatchingEntry( const String& _searchString, QuickSelectionEngine_Data& _engineData )
+    static StringEntryIdentifier findMatchingEntry( const OUString& _searchString, QuickSelectionEngine_Data& _engineData )
     {
         const vcl::I18nHelper& rI18nHelper = Application::GetSettings().GetLocaleI18nHelper();
             // TODO: do we really need the Window's settings here? The original code used it ...
@@ -138,14 +138,14 @@ namespace vcl
                     m_pData->aSingleSearchChar.reset();
             }
 
-            XubString aSearchTemp( m_pData->sCurrentSearchString );
+            OUString aSearchTemp( m_pData->sCurrentSearchString );
 
             StringEntryIdentifier pMatchingEntry = findMatchingEntry( aSearchTemp, *m_pData );
             OSL_TRACE( "QuickSelectionEngine::HandleKeyEvent: found %p", pMatchingEntry );
-            if ( !pMatchingEntry && ( aSearchTemp.Len() > 1 ) && !!m_pData->aSingleSearchChar )
+            if ( !pMatchingEntry && (aSearchTemp.getLength() > 1) && !!m_pData->aSingleSearchChar )
             {
                 // if there's only one letter in the search string, use a different search mode
-                aSearchTemp = *m_pData->aSingleSearchChar;
+                aSearchTemp = OUString(*m_pData->aSingleSearchChar);
                 pMatchingEntry = findMatchingEntry( aSearchTemp, *m_pData );
             }
 


More information about the Libreoffice-commits mailing list