[ooo-build-commit] Branch 'ooo/OOO320' - 3 commits - comphelper/source goodies/source vcl/source vcl/unx

Jan Holesovsky kendy at kemper.freedesktop.org
Wed Dec 16 20:52:18 PST 2009


 comphelper/source/misc/comphelper_services.cxx |    2 
 comphelper/source/misc/documentiologring.cxx   |   25 ++++++----
 comphelper/source/misc/documentiologring.hxx   |   11 ++--
 goodies/source/graphic/grfcache.cxx            |   20 ++++++--
 vcl/source/gdi/pdfwriter_impl.cxx              |    5 ++
 vcl/unx/source/plugadapt/salplug.cxx           |   58 +++++++++++++++----------
 6 files changed, 80 insertions(+), 41 deletions(-)

New commits:
commit 6f8cd32308ffb98b36ef2686c8e44dcddee28fa3
Author: Oliver Bolte <obo at openoffice.org>
Date:   Mon Dec 14 11:44:06 2009 +0000

    CWS-TOOLING: integrate CWS jl146
    2009-12-11 15:27:57 +0100 jsk  r277793 : jl146: #i107038 - The page is now centered so the workarounds for UNIX(like) OS are no longer required. Fixed one timing issue in a tools library
    2009-12-11 14:51:36 +0100 mav  r277792 : #i107525# use the system file locking after storing process is over
    2009-12-11 08:01:14 +0100 hde  r277783 : reverted previous changes
    2009-12-11 07:57:16 +0100 hde  r277782 : Introduce new sub to change default page layout
    2009-12-11 07:54:40 +0100 hde  r277781 : Introduce new sub to change default page layout
    2009-12-10 14:12:21 +0100 hde  r277779 : FIX: initial dialog closed that opened after loading document, close all documents at end of testcase
    2009-12-10 13:21:20 +0100 jsk  r277778 : jl146: #i107038 - Added call to ViewZoom at the end of hNewDocument() for Writer documents
    2009-12-10 13:19:53 +0100 mav  r277777 : #i10000# adopt for unix
    2009-12-10 11:58:47 +0100 hde  r277774 : FIX: selection of tabpage failed
    2009-12-10 11:58:16 +0100 mav  r277773 : #i107512# let the singleton be registered
    2009-12-10 11:28:23 +0100 jsk  r277771 : jl146: #i107038 - Reverting changes made for the given issue as it is no longer reproducible in a m7.
    2009-12-10 09:43:31 +0100 hde  r277770 : FIX: document must'nt be read only, export Filter fixed
    2009-12-09 21:51:15 +0100 mav  r277769 : #i107525# let the original file be locked with the system file locking
    2009-12-09 12:10:48 +0100 er  r277763 : #i107501# #i107518# ScRange::Parse_XL_Header: reset external doc name if it was none
    2009-12-09 11:54:32 +0100 jsk  r277762 : jl149: #i107548 - e_extensions.bas was unable to handle root-installations. Now we identify the installation target directory messagebox (which only pops up if the user has the rights to install into shared layer). Otherwise we skip.
    2009-12-09 08:56:16 +0100 jsk  r277756 : sb146: #i107548 - Replacing publisher.inc with the version from cws sb111 (which brings dynamic waiting plus extra time for unopkg add to complete)
    2009-12-08 15:11:19 +0100 jl  r277751 : #i107528# incorrect string conversion of the path of the berkeley db causes the Extension Manager to abort

diff --git a/comphelper/source/misc/comphelper_services.cxx b/comphelper/source/misc/comphelper_services.cxx
index b6b8b6d..c338e68 100644
--- a/comphelper/source/misc/comphelper_services.cxx
+++ b/comphelper/source/misc/comphelper_services.cxx
@@ -39,6 +39,7 @@ extern void createRegistryInfo_AnyCompareFactory();
 extern void createRegistryInfo_OfficeInstallationDirectories();
 extern void createRegistryInfo_OInstanceLocker();
 extern void createRegistryInfo_Map();
+extern void createRegistryInfo_OSimpleLogRing();
 
 //........................................................................
 namespace comphelper { namespace module
@@ -63,6 +64,7 @@ namespace comphelper { namespace module
                 createRegistryInfo_OfficeInstallationDirectories();
                 createRegistryInfo_OInstanceLocker();
                 createRegistryInfo_Map();
+                createRegistryInfo_OSimpleLogRing();
             }
         }
     }
diff --git a/comphelper/source/misc/documentiologring.cxx b/comphelper/source/misc/documentiologring.cxx
index 7969b93..8b999aa 100644
--- a/comphelper/source/misc/documentiologring.cxx
+++ b/comphelper/source/misc/documentiologring.cxx
@@ -34,6 +34,8 @@
 #include <com/sun/star/frame/DoubleInitializationException.hpp>
 #include <com/sun/star/lang/IllegalArgumentException.hpp>
 
+#include <comphelper_module.hxx>
+
 #include "documentiologring.hxx"
 
 using namespace ::com::sun::star;
@@ -56,33 +58,33 @@ OSimpleLogRing::~OSimpleLogRing()
 }
 
 // ----------------------------------------------------------
-uno::Sequence< ::rtl::OUString > SAL_CALL OSimpleLogRing::impl_staticGetSupportedServiceNames()
+uno::Sequence< ::rtl::OUString > SAL_CALL OSimpleLogRing::getSupportedServiceNames_static()
 {
     uno::Sequence< rtl::OUString > aResult( 1 );
-    aResult[0] = impl_staticGetServiceName();
+    aResult[0] = getServiceName_static();
     return aResult;
 }
 
 // ----------------------------------------------------------
-::rtl::OUString SAL_CALL OSimpleLogRing::impl_staticGetImplementationName()
+::rtl::OUString SAL_CALL OSimpleLogRing::getImplementationName_static()
 {
     return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.logging.SimpleLogRing" ) );
 }
 
 // ----------------------------------------------------------
-::rtl::OUString SAL_CALL OSimpleLogRing::impl_staticGetSingletonName()
+::rtl::OUString SAL_CALL OSimpleLogRing::getSingletonName_static()
 {
     return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.logging.DocumentIOLogRing" ) );
 }
 
 // ----------------------------------------------------------
-::rtl::OUString SAL_CALL OSimpleLogRing::impl_staticGetServiceName()
+::rtl::OUString SAL_CALL OSimpleLogRing::getServiceName_static()
 {
     return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.logging.SimpleLogRing" ) );
 }
 
 // ----------------------------------------------------------
-uno::Reference< uno::XInterface > SAL_CALL OSimpleLogRing::impl_staticCreateSelfInstance( const uno::Reference< uno::XComponentContext >& rxContext )
+uno::Reference< uno::XInterface > SAL_CALL OSimpleLogRing::Create( const uno::Reference< uno::XComponentContext >& rxContext )
 {
     return static_cast< cppu::OWeakObject* >( new OSimpleLogRing( rxContext ) );
 }
@@ -149,13 +151,13 @@ void SAL_CALL OSimpleLogRing::initialize( const uno::Sequence< uno::Any >& aArgu
 // ----------------------------------------------------------
 ::rtl::OUString SAL_CALL OSimpleLogRing::getImplementationName() throw (uno::RuntimeException)
 {
-    return impl_staticGetImplementationName();
+    return getImplementationName_static();
 }
 
 // ----------------------------------------------------------
 ::sal_Bool SAL_CALL OSimpleLogRing::supportsService( const ::rtl::OUString& aServiceName ) throw (uno::RuntimeException)
 {
-    const uno::Sequence< rtl::OUString > & aSupportedNames = impl_staticGetSupportedServiceNames();
+    const uno::Sequence< rtl::OUString > & aSupportedNames = getSupportedServiceNames_static();
     for ( sal_Int32 nInd = 0; nInd < aSupportedNames.getLength(); nInd++ )
     {
         if ( aSupportedNames[ nInd ].equals( aServiceName ) )
@@ -168,8 +170,13 @@ void SAL_CALL OSimpleLogRing::initialize( const uno::Sequence< uno::Any >& aArgu
 // ----------------------------------------------------------
 uno::Sequence< ::rtl::OUString > SAL_CALL OSimpleLogRing::getSupportedServiceNames() throw (uno::RuntimeException)
 {
-    return impl_staticGetSupportedServiceNames();
+    return getSupportedServiceNames_static();
 }
 
 } // namespace comphelper
 
+void createRegistryInfo_OSimpleLogRing()
+{
+    static ::comphelper::module::OAutoRegistration< ::comphelper::OSimpleLogRing > aAutoRegistration;
+    static ::comphelper::module::OSingletonRegistration< ::comphelper::OSimpleLogRing > aSingletonRegistration;
+}
diff --git a/comphelper/source/misc/documentiologring.hxx b/comphelper/source/misc/documentiologring.hxx
index 3818bde..75bf51e 100644
--- a/comphelper/source/misc/documentiologring.hxx
+++ b/comphelper/source/misc/documentiologring.hxx
@@ -60,17 +60,16 @@ public:
     virtual ~OSimpleLogRing();
 
     static ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
-            impl_staticGetSupportedServiceNames();
+            getSupportedServiceNames_static();
 
-    static ::rtl::OUString SAL_CALL impl_staticGetImplementationName();
+    static ::rtl::OUString SAL_CALL getImplementationName_static();
 
-    static ::rtl::OUString SAL_CALL impl_staticGetSingletonName();
+    static ::rtl::OUString SAL_CALL getSingletonName_static();
 
-    static ::rtl::OUString SAL_CALL impl_staticGetServiceName();
+    static ::rtl::OUString SAL_CALL getServiceName_static();
 
     static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
-        impl_staticCreateSelfInstance( 
-            const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext );
+        Create( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext );
 
 // XSimpleLogRing
     virtual void SAL_CALL logString( const ::rtl::OUString& aMessage ) throw (::com::sun::star::uno::RuntimeException);
commit bcc9b7c861d9e2effc0e9e07a5fc854f1b87cbd5
Author: Oliver Bolte <obo at openoffice.org>
Date:   Mon Dec 14 09:57:09 2009 +0000

    CWS-TOOLING: integrate CWS ooo32gsl10
    2009-12-09 15:51:45 +0100 pl  r277767 : #i107554# protect against stack underflow
    2009-12-08 19:21:07 +0100 pl  r277755 : #i107529# change fallback mechanism

diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index a85ea2e..2218445 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -10134,12 +10134,17 @@ void PDFWriterImpl::setFont( const Font& rFont )
 
 void PDFWriterImpl::push( sal_uInt16 nFlags )
 {
+    OSL_ENSURE( m_aGraphicsStack.size() > 0, "invalid graphics stack" );
     m_aGraphicsStack.push_front( m_aGraphicsStack.front() );
     m_aGraphicsStack.front().m_nFlags = nFlags;
 }
 
 void PDFWriterImpl::pop()
 {
+    OSL_ENSURE( m_aGraphicsStack.size() > 1, "pop without push" );
+    if( m_aGraphicsStack.size() < 2 )
+        return;
+    
     GraphicsState aState = m_aGraphicsStack.front();
     m_aGraphicsStack.pop_front();
     GraphicsState& rOld = m_aGraphicsStack.front();
diff --git a/vcl/unx/source/plugadapt/salplug.cxx b/vcl/unx/source/plugadapt/salplug.cxx
index 81c6349..2165df6 100644
--- a/vcl/unx/source/plugadapt/salplug.cxx
+++ b/vcl/unx/source/plugadapt/salplug.cxx
@@ -149,34 +149,53 @@ static const rtl::OUString& get_desktop_environment()
     return aRet;
 }
 
-static const char* autodetect_plugin()
+static SalInstance* autodetect_plugin()
 {
+    static const char* pKDEFallbackList[] =
+    {
+        "kde4", "kde", "gtk", "gen", 0
+    };
+    
+    static const char* pStandardFallbackList[] =
+    {
+        "gtk", "gen", 0
+    };
+    
+    static const char* pHeadlessFallbackList[] =
+    {
+        "svp", 0
+    };
+
     const rtl::OUString& desktop( get_desktop_environment() );
-    const char * pRet = "gen";
+    const char ** pList = pStandardFallbackList;
+    int nListEntry = 0;
     
     // no server at all: dummy plugin
     if ( desktop.equalsAscii( desktop_strings[DESKTOP_NONE] ) )
-        pRet = "svp";
+        pList = pHeadlessFallbackList;
     else if ( desktop.equalsAscii( desktop_strings[DESKTOP_GNOME] ) )
-        pRet = "gtk";
+        pList = pStandardFallbackList;
     else if( desktop.equalsAscii( desktop_strings[DESKTOP_KDE] ) )
-        pRet = "kde";
+    {
+        pList = pKDEFallbackList;
+        nListEntry = 1;
+    }
     else if( desktop.equalsAscii( desktop_strings[DESKTOP_KDE4] ) )
-        pRet = "kde4";
-    else
+        pList = pKDEFallbackList;
+    
+    SalInstance* pInst = NULL;
+    while( pList[nListEntry] && pInst == NULL )
     {
-        // #i95296# use the much nicer looking gtk plugin
-        // on desktops that set gtk variables (e.g. XFCE)
-        static const char* pEnv = getenv( "GTK2_RC_FILES" );
-        if( pEnv && *pEnv ) // check for existance and non emptiness
-            pRet = "gtk";
+        rtl::OUString aTry( rtl::OUString::createFromAscii( pList[nListEntry] ) ); 
+        pInst = tryInstance( aTry );        
+        #if OSL_DEBUG_LEVEL > 1
+        if( pInst )
+            std::fprintf( stderr, "plugin autodetection: %s\n", pList[nListEntry] );
+        #endif
+        nListEntry++;
     }
-        
-#if OSL_DEBUG_LEVEL > 1
-    std::fprintf( stderr, "plugin autodetection: %s\n", pRet );
-#endif
 
-    return pRet;
+    return pInst;
 }
 
 static SalInstance* check_headless_plugin()
@@ -202,11 +221,8 @@ SalInstance *CreateSalInstance()
         pInst = check_headless_plugin();
     
     if( ! pInst && !(pUsePlugin && *pUsePlugin) )
-        pUsePlugin = autodetect_plugin();
+        pInst = autodetect_plugin();
     
-    if( ! pInst && pUsePlugin && *pUsePlugin )
-        pInst = tryInstance( OUString::createFromAscii( pUsePlugin ) );
-
     // fallback to gen
     if( ! pInst )
         pInst = tryInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "gen" ) ) );
commit b257d6c9f0d43aefb80786ee507db587a71082f2
Author: Oliver Bolte <obo at openoffice.org>
Date:   Mon Dec 14 08:59:59 2009 +0000

    CWS-TOOLING: integrate CWS communitypatches320
    2009-12-14 08:15:29 +0100 ka  r277799 : added community patches

diff --git a/goodies/source/graphic/grfcache.cxx b/goodies/source/graphic/grfcache.cxx
index ae89292..97a3fd2 100644
--- a/goodies/source/graphic/grfcache.cxx
+++ b/goodies/source/graphic/grfcache.cxx
@@ -37,6 +37,8 @@
 #include <tools/poly.hxx>
 #include "grfcache.hxx"
 
+#include <memory>
+
 // -----------
 // - Defines -
 // -----------
@@ -594,7 +596,7 @@ void GraphicCache::AddGraphicObject( const GraphicObject& rObj, Graphic& rSubsti
         if( pCopyObj )
         {
             GraphicCacheEntry* pEntry = static_cast< GraphicCacheEntry* >( maGraphicCache.First() );
-
+        
             while( !bInserted && pEntry )
             {
                 if( pEntry->HasGraphicObjectReference( *pCopyObj ) )
@@ -612,7 +614,12 @@ void GraphicCache::AddGraphicObject( const GraphicObject& rObj, Graphic& rSubsti
         if( !bInserted )
         {
             GraphicCacheEntry* pEntry = static_cast< GraphicCacheEntry* >( maGraphicCache.First() );
-            const GraphicID	aID( rObj );
+            ::std::auto_ptr< GraphicID > apID;
+            
+            if( !pID )
+            {
+                apID.reset( new GraphicID( rObj ) );
+            }
     
             while( !bInserted && pEntry )
             {
@@ -647,10 +654,13 @@ void GraphicCache::AddGraphicObject( const GraphicObject& rObj, Graphic& rSubsti
                         }
                     }
                 }
-                else if( rEntryID == aID )
+                else
                 {
-                    pEntry->AddGraphicObjectReference( rObj, rSubstitute );
-                    bInserted = TRUE;
+                    if( rEntryID == *apID )
+                    {
+                        pEntry->AddGraphicObjectReference( rObj, rSubstitute );
+                        bInserted = TRUE;
+                    }
                 }
     
                 if( !bInserted )


More information about the ooo-build-commit mailing list