From fc0227ffc8e1aa3d450c3eebd06f7fdd5ce226db Mon Sep 17 00:00:00 2001 From: Kai Sommerfeld Date: Tue, 24 Aug 2010 13:48:11 +0200 Subject: #i114085# - Dialog must be centered, removed absolaute position. --- uui/source/sslwarndlg.src | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/uui/source/sslwarndlg.src b/uui/source/sslwarndlg.src index bea7d06da3..b9986f9271 100644 --- a/uui/source/sslwarndlg.src +++ b/uui/source/sslwarndlg.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -41,7 +41,6 @@ ModalDialog DLG_UUI_SSLWARN Moveable = TRUE ; OutputSize = TRUE ; SVLook = TRUE ; - Pos = MAP_APPFONT( 221, 158 ); Size = MAP_APPFONT( DLG_WIDTH, DLG_HEIGHT ); Text [ en-US ] = "Security Warning: "; @@ -88,15 +87,15 @@ ModalDialog DLG_UUI_SSLWARN { Pos = MAP_APPFONT( RSC_SP_DLG_INNERBORDER_LEFT, RSC_SP_DLG_INNERBORDER_TOP ); Size = MAP_APPFONT( DLG_WARMIMG_WIDTH , DLG_WARMIMG_HEIGHT ); - + Fixed = Image { /* ImageBitmap = Bitmap { File = "certificate_40x56.png"; }; */ MaskColor = Color{Red=0xffff;Green=0x0000;Blue=0xffff;}; }; - + }; - + FixedLine FL_LINE { Pos = MAP_APPFONT( 0, DLG_CTLBTN_START_Y - RSC_SP_FLGR_INNERBORDER_TOP - RSC_CD_FIXEDLINE_HEIGHT ); -- cgit v1.2.3 From 204027f85b1234323100f08d58c60f2caded2f45 Mon Sep 17 00:00:00 2001 From: Kai Sommerfeld Date: Mon, 20 Sep 2010 16:05:13 +0200 Subject: #i114622# - Workaround for buggy Oracle Beehive server response for lockdiscovery property. --- ucb/source/ucp/webdav/LockSequence.cxx | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/ucb/source/ucp/webdav/LockSequence.cxx b/ucb/source/ucp/webdav/LockSequence.cxx index 2c51d5ce1f..98e6195403 100644 --- a/ucb/source/ucp/webdav/LockSequence.cxx +++ b/ucb/source/ucp/webdav/LockSequence.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -35,6 +35,8 @@ using namespace webdav_ucp; using namespace com::sun::star; +#define BEEHIVE_BUGS_WORKAROUND + ////////////////////////////////////////////////////////////////////////// struct LockSequenceParseContext @@ -128,7 +130,11 @@ extern "C" int LockSequence_startelement_callback( extern "C" int LockSequence_chardata_callback( void *userdata, int state, +#ifdef BEEHIVE_BUGS_WORKAROUND + const char *buf1, +#else const char *buf, +#endif size_t len ) { LockSequenceParseContext * pCtx @@ -136,6 +142,15 @@ extern "C" int LockSequence_chardata_callback( if ( !pCtx->pLock ) pCtx->pLock = new ucb::Lock; +#ifdef BEEHIVE_BUGS_WORKAROUND + // Beehive sends XML values containing trailing newlines. + if ( buf1[ len - 1 ] == 0x0a ) + len--; + + char * buf = new char[ len + 1 ](); + strncpy( buf, buf1, len ); +#endif + switch ( state ) { case STATE_DEPTH: @@ -203,12 +218,8 @@ extern "C" int LockSequence_chardata_callback( // @@@ // } else - { - pCtx->pLock->Timeout = sal_Int64( -1 ); - pCtx->hasTimeout = true; OSL_ENSURE( sal_False, "LockSequence_chardata_callback - Unknown timeout!" ); - } break; case STATE_HREF: @@ -223,6 +234,11 @@ extern "C" int LockSequence_chardata_callback( } } + +#ifdef BEEHIVE_BUGS_WORKAROUND + delete [] buf; +#endif + return 0; // zero to continue, non-zero to abort parsing } -- cgit v1.2.3 From 1896e6ebb647f11152ca76704d3e17cc2421958d Mon Sep 17 00:00:00 2001 From: Kai Sommerfeld Date: Tue, 21 Sep 2010 15:50:18 +0200 Subject: #i114622# - Fixed wrong arguments for InteractiveLockingLockedExceptions- --- ucb/source/ucp/webdav/webdavcontent.cxx | 58 ++++++++++++++++++++------------- 1 file changed, 36 insertions(+), 22 deletions(-) diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx index c4aab34aa2..b679b81b5d 100644 --- a/ucb/source/ucp/webdav/webdavcontent.cxx +++ b/ucb/source/ucp/webdav/webdavcontent.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -1183,7 +1183,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( std::auto_ptr< ContentProperties > xProps; std::auto_ptr< ContentProperties > xCachedProps; std::auto_ptr< DAVResourceAccess > xResAccess; - rtl::OUString aEscapedTitle; + rtl::OUString aUnescapedTitle; bool bHasAll = false; uno::Reference< lang::XMultiServiceFactory > xSMgr; uno::Reference< ucb::XContentIdentifier > xIdentifier; @@ -1192,7 +1192,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( { osl::Guard< osl::Mutex > aGuard( m_aMutex ); - aEscapedTitle = NeonUri::unescape( m_aEscapedTitle ); + aUnescapedTitle = NeonUri::unescape( m_aEscapedTitle ); xSMgr.set( m_xSMgr ); xIdentifier.set( m_xIdentifier ); xProvider.set( m_xProvider.get() ); @@ -1365,7 +1365,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( if ( m_eResourceType == NON_DAV ) xProps->addProperties( aMissingProps, ContentProperties( - aEscapedTitle, + aUnescapedTitle, false ) ); } catch ( DAVException const & e ) @@ -1386,32 +1386,32 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( // might trigger HTTP redirect. // Therefore, title must be updated here. NeonUri aUri( xResAccess->getURL() ); - aEscapedTitle = aUri.GetPathBaseName(); + aUnescapedTitle = aUri.GetPathBaseNameUnescaped(); - if ( UNKNOWN == rType ) + if ( rType == UNKNOWN ) { - xProps.reset( new ContentProperties( aEscapedTitle ) ); + xProps.reset( new ContentProperties( aUnescapedTitle ) ); } // For DAV resources we only know the Title, for non-DAV // resources we additionally know that it is a document. - if ( DAV == rType ) + else if ( rType == DAV ) { //xProps.reset( - // new ContentProperties( aEscapedTitle ) ); + // new ContentProperties( aUnescapedTitle ) ); xProps->addProperty( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ), - uno::makeAny( aEscapedTitle ), + uno::makeAny( aUnescapedTitle ), true ); } else { if ( !xProps.get() ) - xProps.reset( new ContentProperties( aEscapedTitle, false ) ); + xProps.reset( new ContentProperties( aUnescapedTitle, false ) ); else xProps->addProperty( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ), - uno::makeAny( aEscapedTitle ), + uno::makeAny( aUnescapedTitle ), true ); xProps->addProperty( @@ -1429,7 +1429,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( // No server access for just created (not yet committed) objects. // Only a minimal set of properties supported at this stage. if (m_bTransient) - xProps.reset( new ContentProperties( aEscapedTitle, + xProps.reset( new ContentProperties( aUnescapedTitle, m_bCollection ) ); } @@ -1480,7 +1480,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( m_xCachedProps->addProperties( *xProps.get() ); m_xResAccess.reset( new DAVResourceAccess( *xResAccess.get() ) ); - m_aEscapedTitle = aEscapedTitle; + m_aEscapedTitle = NeonUri::escapeSegment( aUnescapedTitle ); } return xResultRow; @@ -2947,6 +2947,20 @@ uno::Any Content::MapDAVException( const DAVException & e, sal_Bool bWrite ) // Map DAVException... uno::Any aException; + rtl::OUString aURL; + if ( m_bTransient ) + { + aURL = getParentURL(); + if ( aURL.lastIndexOf( '/' ) != ( aURL.getLength() - 1 ) ) + aURL += rtl::OUString::createFromAscii( "/" ); + + aURL += m_aEscapedTitle; + } + else + { + aURL = m_xIdentifier->getContentIdentifier(); + } + switch ( e.getStatus() ) { case SC_NOT_FOUND: @@ -2954,7 +2968,7 @@ uno::Any Content::MapDAVException( const DAVException & e, sal_Bool bWrite ) uno::Sequence< uno::Any > aArgs( 1 ); aArgs[ 0 ] <<= beans::PropertyValue( rtl::OUString::createFromAscii("Uri"), -1, - uno::makeAny(m_xIdentifier->getContentIdentifier()), + uno::makeAny(aURL), beans::PropertyState_DIRECT_VALUE); aException <<= @@ -3044,14 +3058,14 @@ uno::Any Content::MapDAVException( const DAVException & e, sal_Bool bWrite ) rtl::OUString::createFromAscii( "Locked!" ), static_cast< cppu::OWeakObject * >( this ), task::InteractionClassification_ERROR, - m_xIdentifier->getContentIdentifier(), - sal_True ); + aURL, + sal_False ); // not SelfOwned #else { uno::Sequence< uno::Any > aArgs( 1 ); aArgs[ 0 ] <<= beans::PropertyValue( rtl::OUString::createFromAscii("Uri"), -1, - uno::makeAny(m_xIdentifier->getContentIdentifier()), + uno::makeAny(aURL), beans::PropertyState_DIRECT_VALUE); aException <<= @@ -3071,8 +3085,8 @@ uno::Any Content::MapDAVException( const DAVException & e, sal_Bool bWrite ) rtl::OUString::createFromAscii( "Locked (self)!" ), static_cast< cppu::OWeakObject * >( this ), task::InteractionClassification_ERROR, - m_xIdentifier->getContentIdentifier(), - sal_True ); + aURL, + sal_True ); // SelfOwned break; case DAVException::DAV_NOT_LOCKED: @@ -3081,7 +3095,7 @@ uno::Any Content::MapDAVException( const DAVException & e, sal_Bool bWrite ) rtl::OUString::createFromAscii( "Not locked!" ), static_cast< cppu::OWeakObject * >( this ), task::InteractionClassification_ERROR, - m_xIdentifier->getContentIdentifier() ); + aURL ); break; case DAVException::DAV_LOCK_EXPIRED: @@ -3090,7 +3104,7 @@ uno::Any Content::MapDAVException( const DAVException & e, sal_Bool bWrite ) rtl::OUString::createFromAscii( "Lock expired!" ), static_cast< cppu::OWeakObject * >( this ), task::InteractionClassification_ERROR, - m_xIdentifier->getContentIdentifier() ); + aURL ); break; default: -- cgit v1.2.3 From 7cea2e8c32ea92843c5ae6c673ff843dc11e3f07 Mon Sep 17 00:00:00 2001 From: Kai Sommerfeld Date: Tue, 21 Sep 2010 16:10:51 +0200 Subject: #i114622# - set infinite timeout in case of unknown timeout. --- ucb/source/ucp/webdav/LockSequence.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ucb/source/ucp/webdav/LockSequence.cxx b/ucb/source/ucp/webdav/LockSequence.cxx index 98e6195403..bc9b9f0175 100644 --- a/ucb/source/ucp/webdav/LockSequence.cxx +++ b/ucb/source/ucp/webdav/LockSequence.cxx @@ -218,8 +218,12 @@ extern "C" int LockSequence_chardata_callback( // @@@ // } else + { + pCtx->pLock->Timeout = sal_Int64( -1 ); + pCtx->hasTimeout = true; OSL_ENSURE( sal_False, - "LockSequence_chardata_callback - Unknown timeout!" ); + "LockSequence_chardata_callback - Unknown timeout!" ); + } break; case STATE_HREF: -- cgit v1.2.3 From 381f4d1f599c0ed6663344f2898ced5b9ee44f91 Mon Sep 17 00:00:00 2001 From: Kai Sommerfeld Date: Fri, 1 Oct 2010 12:50:38 +0200 Subject: #i114876# - Added support for MediaDescriptor properties 'SuggestedSaveAsDir' and 'SuggestedSaveAsName'. --- sfx2/inc/sfx2/sfxsids.hrc | 72 +++++++++++++++-------------- sfx2/source/appl/appuno.cxx | 108 +++++++++++++++++++++++++++++--------------- 2 files changed, 109 insertions(+), 71 deletions(-) mode change 100755 => 100644 sfx2/source/appl/appuno.cxx diff --git a/sfx2/inc/sfx2/sfxsids.hrc b/sfx2/inc/sfx2/sfxsids.hrc index 457dbad41c..d439d1a93d 100644 --- a/sfx2/inc/sfx2/sfxsids.hrc +++ b/sfx2/inc/sfx2/sfxsids.hrc @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -135,7 +135,7 @@ #define SID_JUMPTOMARK (SID_SFX_START + 598) #define SID_OPENTEMPLATE (SID_SFX_START + 594) #define SID_SAVEASDOC (SID_SFX_START + 502) -#define SID_CLOSING (SID_SFX_START +1539) +#define SID_CLOSING (SID_SFX_START +1539) #define SID_CLOSEDOC (SID_SFX_START + 503) #define SID_CLOSEDOCS (SID_SFX_START + 595) #define SID_CLOSEDOC_SAVE (SID_SFX_START + 1) @@ -155,7 +155,7 @@ #define SID_RELOAD (SID_SFX_START + 508) #define SID_PRINTDOCDIRECT (SID_SFX_START + 509) #define SID_PICKLIST (SID_SFX_START + 510) -#define SID_ATTR_XWINDOW (SID_SFX_START + 777) +#define SID_ATTR_XWINDOW (SID_SFX_START + 777) #define SID_PLUGIN_MODE (SID_SFX_START + 827) #define SID_EXPORTDOC (SID_SFX_START + 829) #define SID_EXPORTDOCASPDF (SID_SFX_START + 1673) @@ -190,17 +190,17 @@ #define SID_EXPLORER_FILEPROPS_START (SID_SFX_START + 1390) #define SID_EXPLORER_FILEPROPS_END (SID_SFX_START + 1399) -#define ID_FILETP_START SID_EXPLORER_FILEPROPS_START -#define ID_FILETP_READONLY (ID_FILETP_START + 0) -#define ID_FILETP_TITLE (ID_FILETP_START + 1) +#define ID_FILETP_START SID_EXPLORER_FILEPROPS_START +#define ID_FILETP_READONLY (ID_FILETP_START + 0) +#define ID_FILETP_TITLE (ID_FILETP_START + 1) #define SID_EXPLORER_PROPS_START (SID_SFX_START + 1410) #define SID_EXPLORER_PROPS_END (SID_SFX_START + 1499) -#define SID_AUTOLOAD (SID_SFX_START + 1509) +#define SID_AUTOLOAD (SID_SFX_START + 1509) #define SID_FILLFRAME (SID_SFX_START + 1516) #define SID_BASEURL (SID_SFX_START + 1518) -#define SID_TEMPLATE (SID_SFX_START + 1519) +#define SID_TEMPLATE (SID_SFX_START + 1519) #define SID_ONLINE_REGISTRATION (SID_SFX_START + 1537) @@ -224,10 +224,10 @@ #define SID_OFFICE_PLK (SID_SFX_START + 1601) #define SID_OFFICE_PALK (SID_SFX_START + 1604) -#define SID_CHECK_KEY (SID_SFX_START + 1605) -#define SID_OFFICE_PRIVATE_USE (SID_SFX_START + 1606) -#define SID_OFFICE_COMMERCIAL_USE (SID_SFX_START + 1607) -#define SID_OFFICE_CUSTOMERNUMBER (SID_SFX_START + 1608) +#define SID_CHECK_KEY (SID_SFX_START + 1605) +#define SID_OFFICE_PRIVATE_USE (SID_SFX_START + 1606) +#define SID_OFFICE_COMMERCIAL_USE (SID_SFX_START + 1607) +#define SID_OFFICE_CUSTOMERNUMBER (SID_SFX_START + 1608) #define SID_OFFICE_INVALIDATE_TITLE (SID_SFX_START + 1609) #define SID_OFFICE_CHECK_PLZ (SID_SFX_START + 1610) #define SID_INTERNET_SEARCH (SID_SFX_START + 1611) @@ -240,14 +240,14 @@ #define SID_NEW_MSG_PARENT (SID_SFX_START + 1622) -#define SID_PGP_ENCODE (SID_SFX_START + 1625) -#define SID_PGP_DECODE (SID_SFX_START + 1626) -#define SID_TIPWINDOW (SID_SFX_START + 1632) -#define SID_CHARSET (SID_SFX_START + 1633) -#define SID_OVERWRITE (SID_SFX_START + 1634) +#define SID_PGP_ENCODE (SID_SFX_START + 1625) +#define SID_PGP_DECODE (SID_SFX_START + 1626) +#define SID_TIPWINDOW (SID_SFX_START + 1632) +#define SID_CHARSET (SID_SFX_START + 1633) +#define SID_OVERWRITE (SID_SFX_START + 1634) #define SID_RENAME (SID_SFX_START + 1653) -#define SID_PARTWIN (SID_SFX_START + 1640) -#define SID_CRASH (SID_SFX_START + 1645) +#define SID_PARTWIN (SID_SFX_START + 1640) +#define SID_CRASH (SID_SFX_START + 1645) #define SID_FAIL_ON_WARNING (SID_SFX_START + 1646) #define SID_MAIL_CHILDWIN (SID_SFX_START + 1647) #define SID_INPUTSTREAM (SID_SFX_START + 1648) @@ -275,7 +275,7 @@ #define SID_SHOW_IME_STATUS_WINDOW (SID_SFX_START + 1680) #define SID_UPDATE_CONFIG (SID_SFX_START + 1681) #define SID_VIEWONLY (SID_SFX_START + 1682) -#define SID_REPAIRPACKAGE (SID_SFX_START + 1683) +#define SID_REPAIRPACKAGE (SID_SFX_START + 1683) #define SID_ADDONHELP (SID_SFX_START + 1684) #define SID_OBJECTSHELL (SID_SFX_START + 1685) #define SID_MINIMIZED (SID_SFX_START + 1687) @@ -285,7 +285,7 @@ #define SID_MACROORGANIZER (SID_SFX_START + 1691) #define SID_RUNMACRO (SID_SFX_START + 1692) #define SID_AVMEDIA_TOOLBOX (SID_SFX_START + 1693) -#define SID_AVMEDIA_PLAYER (SID_SFX_START + 1694) +#define SID_AVMEDIA_PLAYER (SID_SFX_START + 1694) #define SID_INSERT_AVMEDIA (SID_SFX_START + 1696) #define SID_RECENTFILELIST (SID_SFX_START + 1697) #define SID_AVAILABLE_TOOLBARS (SID_SFX_START + 1698) @@ -309,8 +309,10 @@ #define SID_DEFAULTFILENAME (SID_SFX_START + 1717) #define SID_MODIFYPASSWORDINFO (SID_SFX_START + 1718) #define SID_RECOMMENDREADONLY (SID_SFX_START + 1719) -#define SID_SFX_free_START (SID_SFX_START + 1720) -#define SID_SFX_free_END (SID_SFX_START + 3999) +#define SID_SUGGESTEDSAVEASDIR (SID_SFX_START + 1720) +#define SID_SUGGESTEDSAVEASNAME (SID_SFX_START + 1721) +#define SID_SFX_free_START (SID_SFX_START + 1722) +#define SID_SFX_free_END (SID_SFX_START + 3999) #define SID_OPEN_NEW_VIEW (SID_SFX_START + 520) // FREE, was SID_VIEW_ZOOM_MODE @@ -493,7 +495,7 @@ #define SID_PASTE (SID_SFX_START + 712) // steht unter diesem Wert in chaos/cntids.hrc!!! -//#define SID_DELETE (SID_SFX_START + 713) +//#define SID_DELETE (SID_SFX_START + 713) #define SID_BACKSPACE (SID_SFX_START + 714) #define SID_FORMATPAINTBRUSH (SID_SFX_START + 715) @@ -558,7 +560,7 @@ #define SID_RESTORETOOLBOX (SID_SFX_START + 903) #define SID_CONFIG (SID_SFX_START + 904) #define SID_TOGGLECOMMONTASKBAR (SID_SFX_START + 928) -#define SID_TOGGLEINETBAR (SID_SFX_START + 928) +#define SID_TOGGLEINETBAR (SID_SFX_START + 928) #define SID_TOGGLEOBJECTBAR (SID_SFX_START + 905) #define SID_CONFIGTOOLBOX (SID_SFX_START + 906) #define SID_TOOLBOXOPTIONS (SID_SFX_START + 907) @@ -654,10 +656,10 @@ #define SID_OPT_DESKTOP_PATH (SID_SFX_START + 1558) #define SID_OPT_CACHE_PATH (SID_SFX_START + 1559) -#define SID_OPT_HELP_PATH (SID_SFX_START + 1560) +#define SID_OPT_HELP_PATH (SID_SFX_START + 1560) #define SID_OPT_BOOKMARKS_PATH (SID_SFX_START + 1561) #define SID_OPT_GALLERY_PATH (SID_SFX_START + 1562) -#define SID_OPT_NEWDOC_PATH (SID_SFX_START + 1563) +#define SID_OPT_NEWDOC_PATH (SID_SFX_START + 1563) #define SID_OPT_AGENTS_PATH (SID_SFX_START + 1564) #define SID_OPT_AUTOPILOT_PATH (SID_SFX_START + 1565) #define SID_OPT_EXPLORER_PATH (SID_SFX_START + 1566) @@ -751,12 +753,12 @@ #define SID_ATTR_AUTOHELPAGENT (SID_OPTIONS_START + 67) #define SID_AUTOHELPAGENT_RESET (SID_OPTIONS_START + 68) #define SID_HELPAGENT_TIMEOUT (SID_OPTIONS_START + 93) -#define SID_ATTR_WELCOMESCREEN (SID_OPTIONS_START + 81) +#define SID_ATTR_WELCOMESCREEN (SID_OPTIONS_START + 81) #define SID_WELCOMESCREEN_RESET (SID_OPTIONS_START + 82) -#define SID_RESTORE_EXPAND_STATE (SID_OPTIONS_START + 83) +#define SID_RESTORE_EXPAND_STATE (SID_OPTIONS_START + 83) #define SID_ATTR_QUICKLAUNCHER (SID_OPTIONS_START + 74) #define SID_ATTR_YEAR2000 (SID_OPTIONS_START + 87) -#define SID_ATTR_ALLOWFOLDERWEBVIEW (SID_OPTIONS_START + 92) +#define SID_ATTR_ALLOWFOLDERWEBVIEW (SID_OPTIONS_START + 92) // PathTabPage @@ -825,7 +827,7 @@ #define SID_INET_CHANNELS_ONOFF (SID_OPTIONS_START + 64) -#define SID_INET_COOKIESHANDLE (SID_OPTIONS_START + 69) +#define SID_INET_COOKIESHANDLE (SID_OPTIONS_START + 69) #define SID_INET_CACHEJS (SID_OPTIONS_START + 70) #define SID_INET_CACHEEXPIRED (SID_OPTIONS_START + 71) @@ -836,9 +838,9 @@ #define SID_SAVEREL_FSYS (SID_OPTIONS_START + 31) // Automatisches update von Styles - Verwalten-TabPage -#define SID_ATTR_AUTO_STYLE_UPDATE (SID_OPTIONS_START + 65) +#define SID_ATTR_AUTO_STYLE_UPDATE (SID_OPTIONS_START + 65) -#define SID_SECURE_URL (SID_OPTIONS_START + 66) +#define SID_SECURE_URL (SID_OPTIONS_START + 66) #define SID_OPT_SCREENSCALING (SID_OPTIONS_START + 78) @@ -941,7 +943,7 @@ #define SID_BASICIDE_ARG_COLUMN1 ( SID_BASICIDE_START + 49 ) #define SID_BASICIDE_ARG_COLUMN2 ( SID_BASICIDE_START + 50 ) #define SID_BASICIDE_ARG_DOCUMENT_MODEL ( SID_BASICIDE_START + 51 ) -#define SID_BASICIDE_MANAGE_LANG ( SID_BASICIDE_START + 52 ) +#define SID_BASICIDE_MANAGE_LANG ( SID_BASICIDE_START + 52 ) #define SID_BASICIDE_CURRENT_LANG ( SID_BASICIDE_START + 53 ) // SlotIds f"ur Apps -------------------------------------------------------- @@ -989,7 +991,7 @@ //----------------------------------------------------------------------- -#define SID_ATTR_CHAR_FILLCOLOR (SID_SFX_START + 1551) +#define SID_ATTR_CHAR_FILLCOLOR (SID_SFX_START + 1551) // SfxScriptOrganizerItem #define MID_SCRIPT_ORGANIZER_LANGUAGE 1 // Don't use zero for MID's. It's forbidden to do it! diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx old mode 100755 new mode 100644 index 2a7bb3f56d..37cf0804fa --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -166,7 +166,7 @@ static char const sDontEdit[] = "DontEdit"; static char const sSilent[] = "Silent"; static char const sJumpMark[] = "JumpMark"; static char const sFileName[] = "FileName"; -static char const sSalvageURL[] = "SalvagedFile"; +static char const sSalvagedFile[] = "SalvagedFile"; static char const sStatusInd[] = "StatusIndicator"; static char const sModel[] = "Model"; static char const sFrame[] = "Frame"; @@ -192,6 +192,8 @@ static char const sUseSystemDialog[] = "UseSystemDialog"; static char const sStandardDir[] = "StandardDir"; static char const sBlackList[] = "BlackList"; static char const sModifyPasswordInfo[] = "ModifyPasswordInfo"; +static char const sSuggestedSaveAsDir[] = "SuggestedSaveAsDir"; +static char const sSuggestedSaveAsName[] = "SuggestedSaveAsName"; void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rArgs, SfxAllItemSet& rSet, const SfxSlot* pSlot ) { @@ -686,7 +688,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); - DBG_ASSERT( bOK, "invalid type or value for StanadardDir" ); + DBG_ASSERT( bOK, "invalid type or value for StandardDir" ); if (bOK) rSet.Put( SfxStringItem( SID_STANDARD_DIR, sVal ) ); } @@ -710,11 +712,11 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_FILE_NAME, sVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sSalvageURL)) ) + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sSalvagedFile)) ) { ::rtl::OUString sVal; sal_Bool bOK = (rProp.Value >>= sVal); - DBG_ASSERT( bOK, "invalid type or value for SalvageURL" ); + DBG_ASSERT( bOK, "invalid type or value for SalvagedFile" ); if (bOK) rSet.Put( SfxStringItem( SID_DOC_SALVAGE, sVal ) ); } @@ -722,7 +724,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque { ::rtl::OUString sVal; sal_Bool bOK = (rProp.Value >>= sVal); - DBG_ASSERT( bOK, "invalid type or value for SalvageURL" ); + DBG_ASSERT( bOK, "invalid type or value for FolderName" ); if (bOK) rSet.Put( SfxStringItem( SID_PATH, sVal ) ); } @@ -851,6 +853,22 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque { rSet.Put( SfxUnoAnyItem( SID_MODIFYPASSWORDINFO, rProp.Value ) ); } + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sSuggestedSaveAsDir)) ) + { + ::rtl::OUString sVal; + sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); + DBG_ASSERT( bOK, "invalid type or value for SuggestedSaveAsDir" ); + if (bOK) + rSet.Put( SfxStringItem( SID_SUGGESTEDSAVEASDIR, sVal ) ); + } + else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sSuggestedSaveAsName)) ) + { + ::rtl::OUString sVal; + sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); + DBG_ASSERT( bOK, "invalid type or value for SuggestedSaveAsName" ); + if (bOK) + rSet.Put( SfxStringItem( SID_SUGGESTEDSAVEASNAME, sVal ) ); + } #ifdef DBG_UTIL else --nFoundArgs; @@ -1065,6 +1083,10 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta nAdditional++; if ( rSet.GetItemState( SID_MODIFYPASSWORDINFO ) == SFX_ITEM_SET ) nAdditional++; + if ( rSet.GetItemState( SID_SUGGESTEDSAVEASDIR ) == SFX_ITEM_SET ) + nAdditional++; + if ( rSet.GetItemState( SID_SUGGESTEDSAVEASNAME ) == SFX_ITEM_SET ) + nAdditional++; // consider additional arguments nProps += nAdditional; @@ -1206,6 +1228,10 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta continue; if ( nId == SID_MODIFYPASSWORDINFO ) continue; + if ( nId == SID_SUGGESTEDSAVEASDIR ) + continue; + if ( nId == SID_SUGGESTEDSAVEASNAME ) + continue; } ByteString aDbg( "Unknown item detected: "); @@ -1478,7 +1504,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta if ( rSet.GetItemState( SID_BLACK_LIST, sal_False, &pItem ) == SFX_ITEM_SET ) { pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sBlackList)); - + com::sun::star::uno::Sequence< rtl::OUString > aList; ((SfxStringListItem*)pItem)->GetStringList( aList ); pValue[nActProp++].Value <<= aList ; @@ -1490,7 +1516,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta } if ( rSet.GetItemState( SID_DOC_SALVAGE, sal_False, &pItem ) == SFX_ITEM_SET ) { - pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sSalvageURL)); + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sSalvagedFile)); pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); } if ( rSet.GetItemState( SID_PATH, sal_False, &pItem ) == SFX_ITEM_SET ) @@ -1569,6 +1595,16 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sModifyPasswordInfo)); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } + if ( rSet.GetItemState( SID_SUGGESTEDSAVEASDIR, sal_False, &pItem ) == SFX_ITEM_SET ) + { + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sSuggestedSaveAsDir)); + pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); + } + if ( rSet.GetItemState( SID_SUGGESTEDSAVEASNAME, sal_False, &pItem ) == SFX_ITEM_SET ) + { + pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sSuggestedSaveAsName)); + pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); + } } } @@ -1874,8 +1910,8 @@ ErrCode SfxMacroLoader::loadMacro( const ::rtl::OUString& rURL, com::sun::star:: } if ( pSh && pSh->GetModel().is() ) - // remove flag for modal mode - pSh->SetMacroMode_Impl( FALSE ); + // remove flag for modal mode + pSh->SetMacroMode_Impl( FALSE ); } else nErr = ERRCODE_BASIC_PROC_UNDEFINED; @@ -2156,7 +2192,7 @@ SFX2_DLLPUBLIC sal_Bool SAL_CALL component_writeInfo( xNewKey = xKey->createKey( aTempStr ); xNewKey->createKey( ::rtl::OUString::createFromAscii("com.sun.star.frame.SpecialEmbeddedObject") ); #endif - + // IFrameObject aImpl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aImpl += ::sfx2::IFrameObject::impl_getStaticImplementationName(); @@ -2377,18 +2413,18 @@ RequestFilterOptions::RequestFilterOptions( ::com::sun::star::uno::Reference< :: ::rtl::OUString temp; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > temp2; ::com::sun::star::document::FilterOptionsRequest aOptionsRequest( temp, - temp2, + temp2, rModel, rProperties ); - m_aRequest <<= aOptionsRequest; + m_aRequest <<= aOptionsRequest; - m_pAbort = new ContinuationAbort; - m_pOptions = new FilterOptionsContinuation; + m_pAbort = new ContinuationAbort; + m_pOptions = new FilterOptionsContinuation; - m_lContinuations.realloc( 2 ); - m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pAbort ); - m_lContinuations[1] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pOptions ); + m_lContinuations.realloc( 2 ); + m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pAbort ); + m_lContinuations[1] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pOptions ); } ::com::sun::star::uno::Any SAL_CALL RequestFilterOptions::getRequest() @@ -2411,17 +2447,17 @@ RequestPackageReparation::RequestPackageReparation( ::rtl::OUString aName ) ::rtl::OUString temp; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > temp2; ::com::sun::star::document::BrokenPackageRequest aBrokenPackageRequest( temp, - temp2, - aName ); + temp2, + aName ); - m_aRequest <<= aBrokenPackageRequest; + m_aRequest <<= aBrokenPackageRequest; - m_pApprove = new ContinuationApprove; - m_pDisapprove = new ContinuationDisapprove; + m_pApprove = new ContinuationApprove; + m_pDisapprove = new ContinuationDisapprove; - m_lContinuations.realloc( 2 ); - m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pApprove ); - m_lContinuations[1] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pDisapprove ); + m_lContinuations.realloc( 2 ); + m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pApprove ); + m_lContinuations[1] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pDisapprove ); } /*uno::*/Any SAL_CALL RequestPackageReparation::queryInterface( const /*uno::*/Type& rType ) throw (RuntimeException) @@ -2432,7 +2468,7 @@ RequestPackageReparation::RequestPackageReparation( ::rtl::OUString aName ) static_cast< XWeak* > ( this ), // my own interfaces static_cast< XInteractionRequest* > ( this ) ); -} +} void SAL_CALL RequestPackageReparation::acquire( ) throw () { @@ -2442,7 +2478,7 @@ void SAL_CALL RequestPackageReparation::acquire( ) throw () void SAL_CALL RequestPackageReparation::release( ) throw () { OWeakObject::release(); -} +} ::com::sun::star::uno::Any SAL_CALL RequestPackageReparation::getRequest() throw( ::com::sun::star::uno::RuntimeException ) @@ -2464,15 +2500,15 @@ NotifyBrokenPackage::NotifyBrokenPackage( ::rtl::OUString aName ) ::rtl::OUString temp; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > temp2; ::com::sun::star::document::BrokenPackageRequest aBrokenPackageRequest( temp, - temp2, - aName ); + temp2, + aName ); - m_aRequest <<= aBrokenPackageRequest; + m_aRequest <<= aBrokenPackageRequest; - m_pAbort = new ContinuationAbort; + m_pAbort = new ContinuationAbort; - m_lContinuations.realloc( 1 ); - m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pAbort ); + m_lContinuations.realloc( 1 ); + m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pAbort ); } /*uno::*/Any SAL_CALL NotifyBrokenPackage::queryInterface( const /*uno::*/Type& rType ) throw (RuntimeException) @@ -2483,7 +2519,7 @@ NotifyBrokenPackage::NotifyBrokenPackage( ::rtl::OUString aName ) static_cast< XWeak* > ( this ), // my own interfaces static_cast< XInteractionRequest* > ( this ) ); -} +} void SAL_CALL NotifyBrokenPackage::acquire( ) throw () { @@ -2493,7 +2529,7 @@ void SAL_CALL NotifyBrokenPackage::acquire( ) throw () void SAL_CALL NotifyBrokenPackage::release( ) throw () { OWeakObject::release(); -} +} ::com::sun::star::uno::Any SAL_CALL NotifyBrokenPackage::getRequest() throw( ::com::sun::star::uno::RuntimeException ) -- cgit v1.2.3 From 18fea2b856e86a56dfdb061f05ae340ab7ac332a Mon Sep 17 00:00:00 2001 From: Kai Sommerfeld Date: Wed, 13 Oct 2010 14:32:41 +0200 Subject: #i115050# - Drop support for neon < 0.26.0 --- ucb/source/ucp/webdav/LinkSequence.cxx | 6 +- ucb/source/ucp/webdav/LockEntrySequence.cxx | 6 +- ucb/source/ucp/webdav/LockSequence.cxx | 4 -- ucb/source/ucp/webdav/NeonHeadRequest.cxx | 91 +++----------------------- ucb/source/ucp/webdav/NeonPropFindRequest.cxx | 20 +----- ucb/source/ucp/webdav/NeonSession.cxx | 20 +----- ucb/source/ucp/webdav/NeonUri.cxx | 20 +----- ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx | 6 +- 8 files changed, 16 insertions(+), 157 deletions(-) diff --git a/ucb/source/ucp/webdav/LinkSequence.cxx b/ucb/source/ucp/webdav/LinkSequence.cxx index 1d33216b4d..31ec14ba0a 100644 --- a/ucb/source/ucp/webdav/LinkSequence.cxx +++ b/ucb/source/ucp/webdav/LinkSequence.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -168,11 +168,7 @@ bool LinkSequence::createFromXML( const rtl::OString & rInData, rInData.getStr() + nStart, nEnd - nStart + TOKEN_LENGTH ); -#if NEON_VERSION >= 0x0250 success = !ne_xml_failed( parser ); -#else - success = !!ne_xml_valid( parser ); -#endif ne_xml_destroy( parser ); diff --git a/ucb/source/ucp/webdav/LockEntrySequence.cxx b/ucb/source/ucp/webdav/LockEntrySequence.cxx index 8ed838d720..1e577a4798 100644 --- a/ucb/source/ucp/webdav/LockEntrySequence.cxx +++ b/ucb/source/ucp/webdav/LockEntrySequence.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -215,11 +215,7 @@ bool LockEntrySequence::createFromXML( const rtl::OString & rInData, rInData.getStr() + nStart, nEnd - nStart + TOKEN_LENGTH ); -#if NEON_VERSION >= 0x0250 success = !ne_xml_failed( parser ); -#else - success = !!ne_xml_valid( parser ); -#endif ne_xml_destroy( parser ); diff --git a/ucb/source/ucp/webdav/LockSequence.cxx b/ucb/source/ucp/webdav/LockSequence.cxx index bc9b9f0175..f95badaf19 100644 --- a/ucb/source/ucp/webdav/LockSequence.cxx +++ b/ucb/source/ucp/webdav/LockSequence.cxx @@ -343,11 +343,7 @@ bool LockSequence::createFromXML( const rtl::OString & rInData, rInData.getStr() + nStart, nEnd - nStart + TOKEN_LENGTH ); -#if NEON_VERSION >= 0x0250 success = !ne_xml_failed( parser ); -#else - success = !!ne_xml_valid( parser ); -#endif ne_xml_destroy( parser ); diff --git a/ucb/source/ucp/webdav/NeonHeadRequest.cxx b/ucb/source/ucp/webdav/NeonHeadRequest.cxx index 4b29afae5a..1e5294882a 100644 --- a/ucb/source/ucp/webdav/NeonHeadRequest.cxx +++ b/ucb/source/ucp/webdav/NeonHeadRequest.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -37,16 +37,15 @@ using namespace com::sun::star; namespace { -#if NEON_VERSION >= 0x0250 -void process_headers(ne_request *req, - DAVResource &rResource, - const std::vector< ::rtl::OUString > &rHeaderNames) +void process_headers( ne_request * req, + DAVResource & rResource, + const std::vector< ::rtl::OUString > & rHeaderNames ) { - void *cursor = NULL; - const char *name, *value; + void * cursor = NULL; + const char * name, *value; - while ((cursor = ne_response_header_iterate(req, cursor, - &name, &value)) != NULL) { + while ( ( cursor = ne_response_header_iterate( req, cursor, + &name, &value ) ) != NULL ) { rtl::OUString aHeaderName( rtl::OUString::createFromAscii( name ) ); rtl::OUString aHeaderValue( rtl::OUString::createFromAscii( value ) ); @@ -86,69 +85,6 @@ void process_headers(ne_request *req, } } } -#else -struct NeonHeadRequestContext -{ - DAVResource * pResource; - const std::vector< ::rtl::OUString > * pHeaderNames; - - NeonHeadRequestContext( DAVResource * p, - const std::vector< ::rtl::OUString > * pHeaders ) - : pResource( p ), pHeaderNames( pHeaders ) {} -}; - -extern "C" void NHR_ResponseHeaderCatcher( void * userdata, - const char * value ) -{ - rtl::OUString aHeader( rtl::OUString::createFromAscii( value ) ); - sal_Int32 nPos = aHeader.indexOf( ':' ); - - if ( nPos != -1 ) - { - rtl::OUString aHeaderName( aHeader.copy( 0, nPos ) ); - - NeonHeadRequestContext * pCtx - = static_cast< NeonHeadRequestContext * >( userdata ); - - // Note: Empty vector means that all headers are requested. - bool bIncludeIt = ( pCtx->pHeaderNames->size() == 0 ); - - if ( !bIncludeIt ) - { - // Check whether this header was requested. - std::vector< ::rtl::OUString >::const_iterator it( - pCtx->pHeaderNames->begin() ); - const std::vector< ::rtl::OUString >::const_iterator end( - pCtx->pHeaderNames->end() ); - - while ( it != end ) - { - if ( (*it) == aHeaderName ) - break; - - ++it; - } - - if ( it != end ) - bIncludeIt = true; - } - - if ( bIncludeIt ) - { - // Create & set the PropertyValue - DAVPropertyValue thePropertyValue; - thePropertyValue.Name = aHeaderName; - thePropertyValue.IsCaseSensitive = false; - - if ( nPos < aHeader.getLength() ) - thePropertyValue.Value <<= aHeader.copy( nPos + 1 ).trim(); - - // Add the newly created PropertyValue - pCtx->pResource->properties.push_back( thePropertyValue ); - } - } -} -#endif } // namespace @@ -156,7 +92,7 @@ extern "C" void NHR_ResponseHeaderCatcher( void * userdata, // Constructor // ------------------------------------------------------------------- -NeonHeadRequest::NeonHeadRequest( HttpSession* inSession, +NeonHeadRequest::NeonHeadRequest( HttpSession * inSession, const rtl::OUString & inPath, const std::vector< ::rtl::OUString > & inHeaderNames, @@ -174,16 +110,9 @@ NeonHeadRequest::NeonHeadRequest( HttpSession* inSession, inPath, RTL_TEXTENCODING_UTF8 ) ); -#if NEON_VERSION < 0x0250 - NeonHeadRequestContext aCtx( &ioResource, &inHeaderNames ); - ne_add_response_header_catcher( req, NHR_ResponseHeaderCatcher, &aCtx ); -#endif - nError = ne_request_dispatch( req ); -#if NEON_VERSION >= 0x0250 - process_headers(req, ioResource, inHeaderNames); -#endif + process_headers( req, ioResource, inHeaderNames ); if ( nError == NE_OK && ne_get_status( req )->klass != 2 ) nError = NE_ERROR; diff --git a/ucb/source/ucp/webdav/NeonPropFindRequest.cxx b/ucb/source/ucp/webdav/NeonPropFindRequest.cxx index 172e43511b..f794516d20 100644 --- a/ucb/source/ucp/webdav/NeonPropFindRequest.cxx +++ b/ucb/source/ucp/webdav/NeonPropFindRequest.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -191,22 +191,13 @@ extern "C" int NPFR_propfind_iter( void* userdata, // ------------------------------------------------------------------- extern "C" void NPFR_propfind_results( void* userdata, -#if NEON_VERSION >= 0x0260 const ne_uri* uri, -#else - const char* href, -#endif const NeonPropFindResultSet* set ) { // @@@ href is not the uri! DAVResource ctor wants uri! -#if NEON_VERSION >= 0x0260 DAVResource theResource( OStringToOUString( uri->path, RTL_TEXTENCODING_UTF8 ) ); -#else - DAVResource theResource( - OStringToOUString( href, RTL_TEXTENCODING_UTF8 ) ); -#endif ne_propset_iterate( set, NPFR_propfind_iter, &theResource ); @@ -233,22 +224,13 @@ extern "C" int NPFR_propnames_iter( void* userdata, // ------------------------------------------------------------------- extern "C" void NPFR_propnames_results( void* userdata, -#if NEON_VERSION >= 0x0260 const ne_uri* uri, -#else - const char* href, -#endif const NeonPropFindResultSet* results ) { // @@@ href is not the uri! DAVResourceInfo ctor wants uri! // Create entry for the resource. -#if NEON_VERSION >= 0x0260 DAVResourceInfo theResource( OStringToOUString( uri->path, RTL_TEXTENCODING_UTF8 ) ); -#else - DAVResourceInfo theResource( - OStringToOUString( href, RTL_TEXTENCODING_UTF8 ) ); -#endif // Fill entry. ne_propset_iterate( results, NPFR_propnames_iter, &theResource ); diff --git a/ucb/source/ucp/webdav/NeonSession.cxx b/ucb/source/ucp/webdav/NeonSession.cxx index 254fae5469..dca92a040a 100644 --- a/ucb/source/ucp/webdav/NeonSession.cxx +++ b/ucb/source/ucp/webdav/NeonSession.cxx @@ -184,11 +184,7 @@ struct NeonRequestContext // A simple Neon response_block_reader for use with an XInputStream // ------------------------------------------------------------------- -#if NEON_VERSION >= 0x0250 extern "C" int NeonSession_ResponseBlockReader(void * inUserData, -#else -extern "C" void NeonSession_ResponseBlockReader(void * inUserData, -#endif const char * inBuf, size_t inLen ) { @@ -204,9 +200,7 @@ extern "C" void NeonSession_ResponseBlockReader(void * inUserData, if ( xInputStream.is() ) xInputStream->AddToStream( inBuf, inLen ); } -#if NEON_VERSION >= 0x0250 return 0; -#endif } // ------------------------------------------------------------------- @@ -214,11 +208,7 @@ extern "C" void NeonSession_ResponseBlockReader(void * inUserData, // A simple Neon response_block_reader for use with an XOutputStream // ------------------------------------------------------------------- -#if NEON_VERSION >= 0x0250 extern "C" int NeonSession_ResponseBlockWriter( void * inUserData, -#else -extern "C" void NeonSession_ResponseBlockWriter( void * inUserData, -#endif const char * inBuf, size_t inLen ) { @@ -236,9 +226,7 @@ extern "C" void NeonSession_ResponseBlockWriter( void * inUserData, xOutputStream->writeBytes( aSeq ); } } -#if NEON_VERSION >= 0x0250 return 0; -#endif } // ------------------------------------------------------------------- @@ -1926,17 +1914,11 @@ int NeonSession::GET( ne_session * sess, void *cursor = NULL; const char *name, *value; -#if NEON_VERSION < 0x0250 - if ( getheaders ) - ne_add_response_header_catcher( - req, runResponseHeaderHandler, userdata ); -#endif ne_decompress * dc = ne_decompress_reader( req, ne_accept_2xx, reader, userdata ); ret = ne_request_dispatch( req ); -#if NEON_VERSION >= 0x0250 if ( getheaders ) { while ( ( cursor = ne_response_header_iterate( @@ -1948,7 +1930,7 @@ int NeonSession::GET( ne_session * sess, runResponseHeaderHandler(userdata, buffer); } } -#endif + if ( ret == NE_OK && ne_get_status( req )->klass != 2 ) ret = NE_ERROR; diff --git a/ucb/source/ucp/webdav/NeonUri.cxx b/ucb/source/ucp/webdav/NeonUri.cxx index 85b9d1fbfe..27f24c6311 100644 --- a/ucb/source/ucp/webdav/NeonUri.cxx +++ b/ucb/source/ucp/webdav/NeonUri.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -59,36 +59,24 @@ using namespace webdav_ucp; namespace { const ne_uri g_sUriDefaultsHTTP = { "http", -#if NEON_VERSION >= 0x0260 NULL, -#endif NULL, DEFAULT_HTTP_PORT, -#if NEON_VERSION >= 0x0260 NULL, -#endif NULL, NULL }; const ne_uri g_sUriDefaultsHTTPS = { "https", -#if NEON_VERSION >= 0x0260 NULL, -#endif NULL, DEFAULT_HTTPS_PORT, -#if NEON_VERSION >= 0x0260 NULL, -#endif NULL, NULL }; const ne_uri g_sUriDefaultsFTP = { "ftp", -#if NEON_VERSION >= 0x0260 NULL, -#endif NULL, DEFAULT_FTP_PORT, -#if NEON_VERSION >= 0x0260 NULL, -#endif NULL, NULL }; } // namespace @@ -174,11 +162,7 @@ void NeonUri::init( const rtl::OString & rUri, const ne_uri * pUri ) pUri->scheme ? pUri->scheme : pUriDefs->scheme, RTL_TEXTENCODING_UTF8 ); mUserInfo = rtl::OStringToOUString( -#if NEON_VERSION >= 0x0260 pUri->userinfo ? pUri->userinfo : pUriDefs->userinfo, -#else - pUri->authinfo ? pUri->authinfo : pUriDefs->authinfo, -#endif RTL_TEXTENCODING_UTF8 ); mHostName = rtl::OStringToOUString( pUri->host ? pUri->host : pUriDefs->host, @@ -188,7 +172,6 @@ void NeonUri::init( const rtl::OString & rUri, const ne_uri * pUri ) pUri->path ? pUri->path : pUriDefs->path, RTL_TEXTENCODING_UTF8 ); -#if NEON_VERSION >= 0x0260 if ( pUri->query ) { mPath += rtl::OUString::createFromAscii( "?" ); @@ -202,7 +185,6 @@ void NeonUri::init( const rtl::OString & rUri, const ne_uri * pUri ) mPath += rtl::OStringToOUString( pUri->fragment, RTL_TEXTENCODING_UTF8 ); } -#endif } // ------------------------------------------------------------------- diff --git a/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx b/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx index f9a36d3113..42f30c665b 100644 --- a/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx +++ b/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -373,11 +373,7 @@ bool UCBDeadPropertyValue::createFromXML( const rtl::OString & rInData, ne_xml_parse( parser, rInData.getStr(), rInData.getLength() ); -#if NEON_VERSION >= 0x0250 success = !ne_xml_failed( parser ); -#else - success = !!ne_xml_valid( parser ); -#endif ne_xml_destroy( parser ); -- cgit v1.2.3 From 83fb3512719e5a71e20095d9446e396b27d3aa83 Mon Sep 17 00:00:00 2001 From: Kai Sommerfeld Date: Thu, 21 Oct 2010 17:46:55 +0200 Subject: #i114622# - Reverted wrong optimization. --- ucb/source/ucp/webdav/webdavcontent.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx index b679b81b5d..c58ba20719 100644 --- a/ucb/source/ucp/webdav/webdavcontent.cxx +++ b/ucb/source/ucp/webdav/webdavcontent.cxx @@ -1395,7 +1395,8 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( // For DAV resources we only know the Title, for non-DAV // resources we additionally know that it is a document. - else if ( rType == DAV ) + + if ( rType == DAV ) { //xProps.reset( // new ContentProperties( aUnescapedTitle ) ); -- cgit v1.2.3