[openoffice.org/f13/master] tweak patches to apply
Caolan McNamara
caolanm at fedoraproject.org
Thu Jan 27 09:57:16 UTC 2011
commit f8d6ebf62be1dd500efaa9aa052ac4d4f226a2ef
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jan 27 09:57:04 2011 +0000
tweak patches to apply
0001-Resolves-rhbz-657628-divide-by-zero.patch | 7 +-
...-crash-in-scanner-dialog-reset-link-in-dt.patch | 48 ++----
...ice.org-3.3.0.rh637738.libgcrypt.addmutex.patch | 157 ++++++++++----------
workspace.jl155.patch | 20 ++--
4 files changed, 109 insertions(+), 123 deletions(-)
---
diff --git a/0001-Resolves-rhbz-657628-divide-by-zero.patch b/0001-Resolves-rhbz-657628-divide-by-zero.patch
index 316650d..99811bd 100644
--- a/0001-Resolves-rhbz-657628-divide-by-zero.patch
+++ b/0001-Resolves-rhbz-657628-divide-by-zero.patch
@@ -11,8 +11,8 @@ diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/s
index 159c8af..98c6546 100644
--- a/extensions/source/scanner/sanedlg.cxx
+++ b/extensions/source/scanner/sanedlg.cxx
-@@ -743,21 +743,23 @@ void SaneDlg::AcquirePreview()
- maReslBox.SetValue( (ULONG)fResl );
+@@ -744,21 +744,23 @@
+ maReslBox.SetValue( (ULONG)fResl );
if( mbDragEnable )
+ {
@@ -37,6 +37,3 @@ index 159c8af..98c6546 100644
{
int nVWidth = (maBottomRight.Y() - maTopLeft.Y()) * aBMSize.Width() / aBMSize.Height();
maPreviewRect = Rectangle( Point( ( maTopLeft.X() + maBottomRight.X() )/2 - nVWidth/2, maTopLeft.Y() ),
---
-1.7.3.2
-
diff --git a/0001-rhbz-648475-crash-in-scanner-dialog-reset-link-in-dt.patch b/0001-rhbz-648475-crash-in-scanner-dialog-reset-link-in-dt.patch
index 0ba1976..a2b967c 100644
--- a/0001-rhbz-648475-crash-in-scanner-dialog-reset-link-in-dt.patch
+++ b/0001-rhbz-648475-crash-in-scanner-dialog-reset-link-in-dt.patch
@@ -11,7 +11,7 @@ diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/s
index 759c5c8..159c8af 100644
--- a/extensions/source/scanner/sanedlg.cxx
+++ b/extensions/source/scanner/sanedlg.cxx
-@@ -133,6 +133,7 @@ SaneDlg::SaneDlg( Window* pParent, Sane& rSane ) :
+@@ -134,6 +134,7 @@
SaneDlg::~SaneDlg()
{
@@ -19,34 +19,18 @@ index 759c5c8..159c8af 100644
}
short SaneDlg::Execute()
-@@ -479,14 +480,12 @@ IMPL_LINK( SaneDlg, ClickBtnHdl, Button*, pButton )
- {
- double fRes = (double)maReslBox.GetValue();
- SetAdjustedNumericalValue( "resolution", fRes );
-- mrSane.SetReloadOptionsHdl( maOldLink );
- UpdateScanArea( TRUE );
- SaveState();
- EndDialog( mrSane.IsOpen() ? 1 : 0 );
- }
- else if( pButton == &maCancelButton )
- {
-- mrSane.SetReloadOptionsHdl( maOldLink );
- mrSane.Close();
- EndDialog( 0 );
- }
-@@ -689,9 +688,9 @@ IMPL_LINK( SaneDlg, ModifyHdl, Edit*, pEdit )
-
- IMPL_LINK( SaneDlg, ReloadSaneOptionsHdl, Sane*, /*pSane*/ )
- {
-- mnCurrentOption = -1;
-- mnCurrentElement = 0;
-- DisableOption();
-+ mnCurrentOption = -1;
-+ mnCurrentElement = 0;
-+ DisableOption();
- // #92024# preserve preview rect, should only be set
- // initially or in AcquirePreview
- Rectangle aPreviewRect = maPreviewRect;
---
-1.7.3.1
-
+@@ -480,14 +481,12 @@
+ {
+ double fRes = (double)maReslBox.GetValue();
+ SetAdjustedNumericalValue( "resolution", fRes );
+- mrSane.SetReloadOptionsHdl( maOldLink );
+ UpdateScanArea( TRUE );
+ SaveState();
+ EndDialog( mrSane.IsOpen() ? 1 : 0 );
+ }
+ else if( pButton == &maCancelButton )
+ {
+- mrSane.SetReloadOptionsHdl( maOldLink );
+ mrSane.Close();
+ EndDialog( 0 );
+ }
diff --git a/openoffice.org-3.3.0.rh637738.libgcrypt.addmutex.patch b/openoffice.org-3.3.0.rh637738.libgcrypt.addmutex.patch
index 2e630d5..69a089c 100644
--- a/openoffice.org-3.3.0.rh637738.libgcrypt.addmutex.patch
+++ b/openoffice.org-3.3.0.rh637738.libgcrypt.addmutex.patch
@@ -23,7 +23,7 @@
process_headers(req, ioResource, inHeaderNames);
--- ucb/source/ucp/webdav/NeonSession.cxx 2010-09-27 11:08:46.000000000 +0100
+++ ucb/source/ucp/webdav/NeonSession.cxx 2010-09-27 13:26:01.000000000 +0100
-@@ -618,7 +618,12 @@
+@@ -121,7 +121,12 @@
// -------------------------------------------------------------------
// static members!
bool NeonSession::m_bGlobalsInited = false;
@@ -34,10 +34,10 @@
+//initializes it first, and as non-thread-safe, leaving the entire
+//stack unsafe
+osl::Mutex aGlobalNeonMutex;
- NeonLockStore NeonSession::m_aNeonLockStore;
-
// -------------------------------------------------------------------
-@@ -647,7 +652,10 @@
+ // Helper fuction
+ // -------------------------------------------------------------------
+@@ -668,7 +673,10 @@
{
if ( m_pHttpSession )
{
@@ -47,22 +47,22 @@
+ ne_session_destroy( m_pHttpSession );
+ }
m_pHttpSession = 0;
- }
- delete static_cast< RequestDataMap * >( m_pRequestData );
-@@ -673,11 +681,7 @@
+ // Note: Uncomment the following if locking support is required
+ /*
+@@ -694,11 +702,7 @@
if ( m_pHttpSession == 0 )
{
- // Ensure that Neon sockets are initialized
+ // Ensure that Neon sockets are initialize
-
-- // --> tkr #151111# crashed if copy and pasted pictures from the internet
-- // ne_sock_init() was executed by two threads at the same time.
-- osl::Guard< osl::Mutex > theGlobalGuard( m_aGlobalMutex );
-- // <--
-+ osl::Guard< osl::Mutex > theGlobalGuard( aGlobalNeonMutex );
+- // --> tkr #151111# crashed if copy and pasted pictures from the internet
+- // ne_sock_init() was executed by two threads at the same time.
+- osl::Guard< osl::Mutex > theGlobalGuard( m_aGlobalMutex );
+- // <--
++ osl::Guard< osl::Mutex > theGlobalGuard( aGlobalNeonMutex );
if ( !m_bGlobalsInited )
{
if ( ne_sock_init() != 0 )
-@@ -726,7 +730,10 @@
+@@ -733,7 +737,10 @@
m_nProxyPort = rProxyCfg.nPort;
// new session needed, destroy old first
@@ -74,18 +74,19 @@
m_pHttpSession = 0;
bCreateNewSession = true;
}
-@@ -739,14 +746,15 @@
+@@ -746,15 +753,16 @@
// currently (0.22.0) neon does not allow to pass the user info
// to the session
- m_pHttpSession = ne_session_create(
-- rtl::OUStringToOString( m_aScheme,
-- RTL_TEXTENCODING_UTF8 ).getStr(),
-- /* theUri.GetUserInfo(),
-- @@@ for FTP via HTTP proxy, but not supported by Neon */
-- rtl::OUStringToOString( m_aHostName,
-- RTL_TEXTENCODING_UTF8 ).getStr(),
-- m_nPort );
+- rtl::OUStringToOString( m_aScheme,
+- RTL_TEXTENCODING_UTF8 ).getStr(),
+- /* theUri.GetUserInfo(),
+- @@@ for FTP via HTTP proxy, but not supported by Neon */
+- rtl::OUStringToOString( m_aHostName,
+- RTL_TEXTENCODING_UTF8 ).getStr(),
+- m_nPort );
+-
+ {
+ osl::Guard< osl::Mutex > theGlobalGuard( aGlobalNeonMutex );
+ m_pHttpSession = ne_session_create(
@@ -95,19 +96,19 @@
+ rtl::OUStringToOString( m_aHostName, RTL_TEXTENCODING_UTF8 ).getStr(),
+ m_nPort );
+ }
-
++
if ( m_pHttpSession == 0 )
throw DAVException( DAVException::DAV_SESSION_CREATE,
-@@ -1638,12 +1646,11 @@
- void NeonSession::abort()
+ NeonUri::makeConnectionEndPointString(
+@@ -1319,11 +1327,11 @@
+ void NeonSession::ABORT()
throw ( DAVException )
{
-- // 11.11.09 (tkr): The following code lines causing crashes if
-- // closing a ongoing connection. It turned out that this existing
-- // solution doesn't work in multi-threading environments.
-- // So I disabled them in 3.2. . Issue #73893# should fix it in OOo 3.3.
-- //if ( m_pHttpSession )
-- // ne_close_connection( m_pHttpSession );
+- // 11.11.09 (tkr): The following code lines causing crashes if closing a ongoing connection. It turned out that this existing solution doesn't work in multi-threading environments.
+- // So I disabled them in 3.2. . Issue #73893# should fix it in OOo 3.3.
+-
+- //if (NULL !=m_pHttpSession)
+- // ne_close_connection(m_pHttpSession);
+ if ( m_pHttpSession )
+ {
+ osl::Guard< osl::Mutex > theGlobalGuard( aGlobalNeonMutex );
@@ -116,9 +117,9 @@
}
// -------------------------------------------------------------------
-@@ -1934,7 +1941,10 @@
- ne_decompress * dc
- = ne_decompress_reader( req, ne_accept_2xx, reader, userdata );
+@@ -1706,7 +1714,10 @@
+ #endif
+ ne_add_response_body_reader( req, ne_accept_2xx, reader, userdata );
- ret = ne_request_dispatch( req );
+ {
@@ -128,7 +129,7 @@
#if NEON_VERSION >= 0x0250
if ( getheaders )
-@@ -1974,7 +1984,10 @@
+@@ -1744,7 +1755,10 @@
ne_set_request_body_buffer( req, buffer, size );
@@ -140,7 +141,7 @@
if ( ret == NE_OK && ne_get_status( req )->klass != 2 )
ret = NE_ERROR;
-@@ -2019,7 +2032,10 @@
+@@ -1789,7 +1803,10 @@
ne_set_request_body_buffer( req, buffer, strlen( buffer ) );
@@ -154,18 +155,26 @@
// ret = NE_ERROR;
--- ucb/source/ucp/webdav/NeonSession.hxx 2010-09-27 11:08:46.000000000 +0100
+++ ucb/source/ucp/webdav/NeonSession.hxx 2010-09-27 13:06:43.000000000 +0100
-@@ -66,7 +66,6 @@
- DAVRequestEnvironment m_aEnv;
-
- static bool m_bGlobalsInited;
-- static osl::Mutex m_aGlobalMutex;
- static NeonLockStore m_aNeonLockStore;
-
- protected:
+@@ -53,7 +53,6 @@
+ {
+ private:
+ osl::Mutex m_aMutex;
+- static osl::Mutex m_aGlobalMutex;
+ rtl::OUString m_aScheme;
+ rtl::OUString m_aHostName;
+ rtl::OUString m_aProxyName;
--- ucb/source/ucp/webdav/NeonPropFindRequest.cxx 2010-11-26 09:07:55.000000000 +0000
+++ ucb/source/ucp/webdav/NeonPropFindRequest.cxx 2010-12-09 20:16:41.000000000 +0000
-@@ -259,6 +259,8 @@
- theResources->push_back( theResource );
+@@ -181,6 +181,7 @@
+ = static_cast< vector< DAVResource > * >( userdata );
+ theResources->push_back( theResource );
+ }
++
+ // -------------------------------------------------------------------
+ extern "C" int NPFR_propnames_iter( void* userdata,
+ const NeonPropName* pname,
+@@ -225,6 +226,8 @@
+ theResources->push_back( theResource );
}
+extern osl::Mutex aGlobalNeonMutex;
@@ -173,48 +182,44 @@
// -------------------------------------------------------------------
// Constructor
// -------------------------------------------------------------------
-@@ -286,12 +288,15 @@
- thePropNames[ theIndex ].nspace = NULL;
- thePropNames[ theIndex ].name = NULL;
+@@ -252,12 +255,15 @@
+ thePropNames[ theIndex ].nspace = NULL;
+ thePropNames[ theIndex ].name = NULL;
- nError = ne_simple_propfind( inSession,
-+ {
-+ osl::Guard< osl::Mutex > theGlobalGuard( aGlobalNeonMutex );
++ {
++ osl::Guard< osl::Mutex > theGlobalGuard( aGlobalNeonMutex );
+ nError = ne_simple_propfind( inSession,
inPath,
inDepth,
thePropNames,
NPFR_propfind_results,
&ioResources );
-+ }
-
- for ( theIndex = 0; theIndex < thePropCount; theIndex ++ )
- free( (void *)thePropNames[ theIndex ].name );
-@@ -301,6 +306,7 @@
- else
- {
- // ALLPROP
-+ osl::Guard< osl::Mutex > theGlobalGuard( aGlobalNeonMutex );
++ }
+
+ for ( theIndex = 0; theIndex < thePropCount; theIndex ++ )
+ free( (void *)thePropNames[ theIndex ].name );
+@@ -266,6 +272,7 @@
+ }
+ else
+ {
++ osl::Guard< osl::Mutex > theGlobalGuard( aGlobalNeonMutex );
+ // ALLPROP
nError = ne_simple_propfind( inSession,
inPath,
- inDepth,
-@@ -333,11 +333,14 @@ NeonPropFindRequest::NeonPropFindRequest(
- std::vector< DAVResourceInfo > & ioResInfo,
- int & nError )
+@@ -292,11 +299,14 @@
+ std::vector< DAVResourceInfo > & ioResInfo,
+ int & nError )
{
- nError = ne_propnames( inSession,
-- inPath,
-- inDepth,
-- NPFR_propnames_results,
-- &ioResInfo );
-+ {
-+ osl::Guard< osl::Mutex > theGlobalGuard( aGlobalNeonMutex );
-+ nError = ne_propnames( inSession,
-+ inPath,
-+ inDepth,
-+ NPFR_propnames_results,
-+ &ioResInfo );
-+ }
++ {
++ osl::Guard< osl::Mutex > theGlobalGuard( aGlobalNeonMutex );
++ nError = ne_propnames( inSession,
+ inPath,
+ inDepth,
+ NPFR_propnames_results,
+ &ioResInfo );
++ }
// #87585# - Sometimes neon lies (because some servers lie).
if ( ( nError == NE_OK ) && ioResInfo.empty() )
diff --git a/workspace.jl155.patch b/workspace.jl155.patch
index 3c49fab..84dc7b5 100644
--- a/workspace.jl155.patch
+++ b/workspace.jl155.patch
@@ -8,7 +8,7 @@ diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/d
index 5f1b359..00d9cd3 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
-@@ -413,6 +413,7 @@ void ExtBoxWithBtns_Impl::MouseButtonDown( const MouseEvent& rMEvt )
+@@ -427,6 +427,7 @@
}
else if ( rMEvt.IsLeft() )
{
@@ -16,15 +16,15 @@ index 5f1b359..00d9cd3 100644
if ( rMEvt.IsMod1() && HasActive() )
selectEntry( EXTENSION_LISTBOX_ENTRY_NOTFOUND ); // Selecting an not existing entry will deselect the current one
else
-@@ -766,6 +767,7 @@ void ExtMgrDialog::setGetExtensionsURL( const ::rtl::OUString &rURL )
+@@ -784,6 +785,7 @@
long ExtMgrDialog::addPackageToList( const uno::Reference< deployment::XPackage > &xPackage,
- bool bLicenseMissing )
+ const uno::Reference< deployment::XPackageManager > &xPackageManager )
{
+ const vos::OGuard aGuard( Application::GetSolarMutex() );
m_aUpdateBtn.Enable( true );
- return m_pExtensionBox->addEntry( xPackage, bLicenseMissing );
+ return m_pExtensionBox->addEntry( xPackage, xPackageManager );
}
-@@ -1037,6 +1039,7 @@ void ExtMgrDialog::updateProgress( const OUString &rText,
+@@ -1041,6 +1043,7 @@
//------------------------------------------------------------------------------
void ExtMgrDialog::updatePackageInfo( const uno::Reference< deployment::XPackage > &xPackage )
{
@@ -32,15 +32,15 @@ index 5f1b359..00d9cd3 100644
m_pExtensionBox->updateEntry( xPackage );
}
-@@ -1322,6 +1325,7 @@ long UpdateRequiredDialog::addPackageToList( const uno::Reference< deployment::X
- if ( !bLicenseMissing && !checkDependencies( xPackage ) )
+@@ -1327,6 +1330,7 @@
+ if ( !checkDependencies( xPackage ) )
{
- m_bHasLockedEntries |= m_pManager->isReadOnly( xPackage );
+ m_bHasLockedEntries |= (bool) xPackageManager->isReadOnly();
+ const vos::OGuard aGuard( Application::GetSolarMutex() );
m_aUpdateBtn.Enable( true );
- return m_pExtensionBox->addEntry( xPackage );
+ return m_pExtensionBox->addEntry( xPackage, xPackageManager );
}
-@@ -1450,6 +1454,7 @@ void UpdateRequiredDialog::updatePackageInfo( const uno::Reference< deployment::
+@@ -1457,6 +1461,7 @@
// We will remove all updated packages with satisfied dependencies, but
// we will show all disabled entries so the user sees the result
// of the 'disable all' button
More information about the scm-commits
mailing list