diff options
Diffstat (limited to 'desktop/source')
54 files changed, 340 insertions, 294 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 923ff20fd4c6..996fc6cf36ef 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -195,12 +195,10 @@ ResMgr* Desktop::GetDesktopResManager() { if ( !Desktop::pResMgr ) { - String aMgrName = String::CreateFromAscii( "dkt" ); - // Create desktop resource manager and bootstrap process // was successful. Use default way to get language specific message. if ( Application::IsInExecute() ) - Desktop::pResMgr = ResMgr::CreateResMgr( U2S( aMgrName )); + Desktop::pResMgr = ResMgr::CreateResMgr("dkt"); if ( !Desktop::pResMgr ) { @@ -215,7 +213,7 @@ ResMgr* Desktop::GetDesktopResManager() ::com::sun::star::lang::Locale aLocale( aLanguage, aCountry, aVariant ); - Desktop::pResMgr = ResMgr::SearchCreateResMgr( U2S( aMgrName ), aLocale); + Desktop::pResMgr = ResMgr::SearchCreateResMgr( "dkt", aLocale); AllSettings as = GetSettings(); as.SetUILocale(aLocale); SetSettings(as); @@ -572,64 +570,67 @@ throw() } else if( TypeToCopy == +1 ) // Folder { - osl::Directory aDir( srcUnqPath ); - aDir.open(); - err = osl::Directory::create( dstUnqPath ); osl::FileBase::RC next = err; - if( err == osl::FileBase::E_None || - err == osl::FileBase::E_EXIST ) + if( err == osl::FileBase::E_None || err == osl::FileBase::E_EXIST ) { err = osl::FileBase::E_None; - sal_Int32 n_Mask = FileStatusMask_FileURL | FileStatusMask_FileName | FileStatusMask_Type; - - osl::DirectoryItem aDirItem; - while( err == osl::FileBase::E_None && ( next = aDir.getNextItem( aDirItem ) ) == osl::FileBase::E_None ) + osl::Directory aDir( srcUnqPath ); + if (aDir.open() == osl::FileBase::E_None) { - sal_Bool IsDoc = false; - sal_Bool bFilter = false; - osl::FileStatus aFileStatus( n_Mask ); - aDirItem.getFileStatus( aFileStatus ); - if( aFileStatus.isValid( FileStatusMask_Type ) ) - IsDoc = aFileStatus.getFileType() == osl::FileStatus::Regular; - - // Getting the information for the next recursive copy - sal_Int32 newTypeToCopy = IsDoc ? -1 : +1; - - rtl::OUString newSrcUnqPath; - if( aFileStatus.isValid( FileStatusMask_FileURL ) ) - newSrcUnqPath = aFileStatus.getFileURL(); - - rtl::OUString newDstUnqPath = dstUnqPath; - rtl::OUString tit; - if( aFileStatus.isValid( FileStatusMask_FileName ) ) + sal_Int32 n_Mask = FileStatusMask_FileURL | + FileStatusMask_FileName | + FileStatusMask_Type; + + osl::DirectoryItem aDirItem; + while( err == osl::FileBase::E_None && ( next = aDir.getNextItem( aDirItem ) ) == osl::FileBase::E_None ) { - ::rtl::OUString aFileName = aFileStatus.getFileName(); - tit = rtl::Uri::encode( aFileName, - rtl_UriCharClassPchar, - rtl_UriEncodeIgnoreEscapes, - RTL_TEXTENCODING_UTF8 ); - - // Special treatment for "lastsychronized" file. Must not be - // copied from the bundled folder! - if ( IsDoc && aFileName.equalsAscii( pLastSyncFileName )) - bFilter = true; - } + sal_Bool IsDoc = false; + sal_Bool bFilter = false; + osl::FileStatus aFileStatus( n_Mask ); + aDirItem.getFileStatus( aFileStatus ); + if( aFileStatus.isValid( FileStatusMask_Type ) ) + IsDoc = aFileStatus.getFileType() == osl::FileStatus::Regular; + + // Getting the information for the next recursive copy + sal_Int32 newTypeToCopy = IsDoc ? -1 : +1; + + rtl::OUString newSrcUnqPath; + if( aFileStatus.isValid( FileStatusMask_FileURL ) ) + newSrcUnqPath = aFileStatus.getFileURL(); + + rtl::OUString newDstUnqPath = dstUnqPath; + rtl::OUString tit; + if( aFileStatus.isValid( FileStatusMask_FileName ) ) + { + ::rtl::OUString aFileName = aFileStatus.getFileName(); + tit = rtl::Uri::encode( aFileName, + rtl_UriCharClassPchar, + rtl_UriEncodeIgnoreEscapes, + RTL_TEXTENCODING_UTF8 ); + + // Special treatment for "lastsychronized" file. Must not be + // copied from the bundled folder! + if ( IsDoc && aFileName.equalsAscii( pLastSyncFileName )) + bFilter = true; + } - if( newDstUnqPath.lastIndexOf( sal_Unicode('/') ) != newDstUnqPath.getLength()-1 ) - newDstUnqPath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + if( newDstUnqPath.lastIndexOf( sal_Unicode('/') ) != newDstUnqPath.getLength()-1 ) + newDstUnqPath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); - newDstUnqPath += tit; + newDstUnqPath += tit; - if (( newSrcUnqPath != dstUnqPath ) && !bFilter ) - err = copy_bundled_recursive( newSrcUnqPath,newDstUnqPath, newTypeToCopy ); - } + if (( newSrcUnqPath != dstUnqPath ) && !bFilter ) + err = copy_bundled_recursive( newSrcUnqPath,newDstUnqPath, newTypeToCopy ); + } - if( err == osl::FileBase::E_None && next != osl::FileBase::E_NOENT ) - err = next; + if( err == osl::FileBase::E_None && next != osl::FileBase::E_NOENT ) + err = next; + + aDir.close(); + } } - aDir.close(); } return err; @@ -1603,13 +1604,11 @@ int Desktop::Main() // create title string sal_Bool bCheckOk = sal_False; ::com::sun::star::lang::Locale aLocale; - String aMgrName = String::CreateFromAscii( "iso" ); - ResMgr* pLabelResMgr = ResMgr::SearchCreateResMgr( U2S( aMgrName ), aLocale ); + ResMgr* pLabelResMgr = ResMgr::SearchCreateResMgr( "iso", aLocale ); if ( !pLabelResMgr ) { // no "iso" resource -> search for "ooo" resource - aMgrName = String::CreateFromAscii( "ooo" ); - pLabelResMgr = ResMgr::SearchCreateResMgr( U2S( aMgrName ), aLocale); + pLabelResMgr = ResMgr::SearchCreateResMgr( "ooo", aLocale); } String aTitle = pLabelResMgr ? String( ResId( RID_APPTITLE, *pLabelResMgr ) ) : String(); delete pLabelResMgr; diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx index 40b987c79aa1..973a88357f46 100644 --- a/desktop/source/app/appinit.cxx +++ b/desktop/source/app/appinit.cxx @@ -82,7 +82,6 @@ #define DESKTOP_TEMPDIRNAME "soffice.tmp" -using namespace rtl; using namespace desktop; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; @@ -90,6 +89,8 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::registry; using namespace ::com::sun::star::ucb; +using ::rtl::OUString; + namespace desktop { @@ -102,7 +103,7 @@ static bool configureUcb(bool bServer, rtl::OUString const & rPortalConnect) xServiceFactory( comphelper::getProcessServiceFactory() ); if (!xServiceFactory.is()) { - DBG_ERROR("configureUcb(): No XMultiServiceFactory"); + OSL_FAIL("configureUcb(): No XMultiServiceFactory"); return false; } @@ -173,7 +174,7 @@ static bool configureUcb(bool bServer, rtl::OUString const & rPortalConnect) } } } - } catch (RuntimeException e) { + } catch (RuntimeException &e) { } } #endif // GNOME_VFS_ENABLED @@ -276,7 +277,7 @@ void Desktop::RegisterServices( Reference< XMultiServiceFactory >& xSMgr ) pCmdLine->GetPortalConnectString( aPortalConnect ); if ( !configureUcb( bServer, aPortalConnect ) ) { - DBG_ERROR( "Can't configure UCB" ); + OSL_FAIL( "Can't configure UCB" ); throw com::sun::star::uno::Exception(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RegisterServices, configureUcb")), NULL); } diff --git a/desktop/source/app/appsys.cxx b/desktop/source/app/appsys.cxx index ac01ec2dd669..287a9464793e 100644 --- a/desktop/source/app/appsys.cxx +++ b/desktop/source/app/appsys.cxx @@ -35,9 +35,8 @@ #include <rtl/ustring.hxx> #include <tools/solar.h> -#include <tools/prewin.h> -#include <winreg.h> -#include <tools/postwin.h> +#include <prewin.h> +#include <postwin.h> #include <tools/urlobj.hxx> @@ -55,7 +54,7 @@ void FATToVFat_Impl( String& aName ) HANDLE h = FindFirstFile( U2S(aName).getStr(), &aData ); if ( h ) { - // FAT-Kurzname in VFAT-Langname wandeln + // Change FAT short filename into VFAT long filename aObj.removeSegment(); aObj.insertName( String::CreateFromAscii( aData.cFileName ) ); aName = aObj.PathToFileName(); diff --git a/desktop/source/app/checkinstall.cxx b/desktop/source/app/checkinstall.cxx index 0777eda34592..c0e853d9eef5 100644 --- a/desktop/source/app/checkinstall.cxx +++ b/desktop/source/app/checkinstall.cxx @@ -39,11 +39,12 @@ #include <vcl/msgbox.hxx> #include <tools/date.hxx> -using namespace rtl; using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::beans; +using ::rtl::OUString; + namespace desktop { diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx index d0bb6c3d87be..6798e8ede85a 100644 --- a/desktop/source/app/cmdlineargs.cxx +++ b/desktop/source/app/cmdlineargs.cxx @@ -43,11 +43,12 @@ #include <cstdio> -using namespace rtl; using namespace com::sun::star::lang; using namespace com::sun::star::uri; using namespace com::sun::star::uno; +using ::rtl::OUString; + namespace desktop { diff --git a/desktop/source/app/desktopcontext.cxx b/desktop/source/app/desktopcontext.cxx index bed77fae9f69..2a8ed7ef628c 100644 --- a/desktop/source/app/desktopcontext.cxx +++ b/desktop/source/app/desktopcontext.cxx @@ -33,10 +33,11 @@ #include <vcl/svapp.hxx> #include <svtools/javainteractionhandler.hxx> -using namespace rtl; using namespace com::sun::star::uno; using namespace com::sun::star::task; +using ::rtl::OUString; + namespace desktop { diff --git a/desktop/source/app/dispatchwatcher.cxx b/desktop/source/app/dispatchwatcher.cxx index 858e4e9acf0b..501fdc19bfd5 100644 --- a/desktop/source/app/dispatchwatcher.cxx +++ b/desktop/source/app/dispatchwatcher.cxx @@ -634,7 +634,7 @@ throw(::com::sun::star::uno::RuntimeException) void SAL_CALL DispatchWatcher::dispatchFinished( const DispatchResultEvent& ) throw( RuntimeException ) { osl::ClearableMutexGuard aGuard( GetMutex() ); - sal_Int16 nCount = m_nRequestCount; + sal_Int16 nCount = --m_nRequestCount; aGuard.clear(); OfficeIPCThread::RequestsCompleted( 1 ); if ( !nCount && !OfficeIPCThread::AreRequestsPending() ) diff --git a/desktop/source/app/dispatchwatcher.hxx b/desktop/source/app/dispatchwatcher.hxx index d8b08747dd45..0fde60da603f 100644 --- a/desktop/source/app/dispatchwatcher.hxx +++ b/desktop/source/app/dispatchwatcher.hxx @@ -34,7 +34,7 @@ #include <com/sun/star/frame/XDispatchResultListener.hpp> #include "officeipcthread.hxx" -#include <hash_map> +#include <boost/unordered_map.hpp> #include <vector> namespace desktop @@ -56,7 +56,7 @@ struct OUStringHashCode } }; -class DispatchWatcherHashMap : public ::std::hash_map< ::rtl::OUString, sal_Int32, OUStringHashCode, ::std::equal_to< ::rtl::OUString > > +class DispatchWatcherHashMap : public ::boost::unordered_map< ::rtl::OUString, sal_Int32, OUStringHashCode, ::std::equal_to< ::rtl::OUString > > { public: inline void free() diff --git a/desktop/source/app/langselect.cxx b/desktop/source/app/langselect.cxx index 11c5c6a25919..d70703103967 100644 --- a/desktop/source/app/langselect.cxx +++ b/desktop/source/app/langselect.cxx @@ -54,13 +54,16 @@ #include <osl/process.h> #include <osl/file.hxx> -using namespace rtl; using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::container; using namespace com::sun::star::beans; using namespace com::sun::star::util; +using ::rtl::OUString; +using ::rtl::OUStringBuffer; +using ::rtl::OString; + namespace desktop { static char const SOFFICE_BOOTSTRAP[] = "Bootstrap"; diff --git a/desktop/source/app/lockfile.cxx b/desktop/source/app/lockfile.cxx index d75e5b8bc5f8..5e534f2b2107 100644 --- a/desktop/source/app/lockfile.cxx +++ b/desktop/source/app/lockfile.cxx @@ -31,9 +31,8 @@ #include <stdlib.h> #include <time.h> #ifdef WNT -#include <tools/prewin.h> -#include <windows.h> -#include <tools/postwin.h> +#include <prewin.h> +#include <postwin.h> #else #include <unistd.h> #endif diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx index b441d6d32f80..f699463ec089 100644 --- a/desktop/source/app/officeipcthread.cxx +++ b/desktop/source/app/officeipcthread.cxx @@ -53,12 +53,15 @@ #include "rtl/process.h" #include "tools/getprocessworkingdir.hxx" -using namespace rtl; using namespace desktop; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::frame; +using ::rtl::OString; +using ::rtl::OUString; +using ::rtl::OUStringBuffer; + const char *OfficeIPCThread::sc_aTerminationSequence = "InternalIPC::TerminateThread"; const int OfficeIPCThread::sc_nTSeqLength = 28; const char *OfficeIPCThread::sc_aShowSequence = "-tofront"; @@ -555,7 +558,7 @@ OfficeIPCThread::Status OfficeIPCThread::EnableOfficeIPCThread() return IPC_STATUS_BOOTSTRAP_ERROR; } } - // finaly, write the string onto the pipe + // finally, write the string onto the pipe aStreamPipe.write( aArguments.GetBuffer(), aArguments.Len() ); aStreamPipe.write( "\0", 1 ); diff --git a/desktop/source/deployment/dp_persmap.cxx b/desktop/source/deployment/dp_persmap.cxx index 2716ed23fc0a..78d4a64d3242 100644 --- a/desktop/source/deployment/dp_persmap.cxx +++ b/desktop/source/deployment/dp_persmap.cxx @@ -228,15 +228,14 @@ t_string2string_map PersistentMap::getEntries() const if (err != 0) throw_rtexc(err); - ::std::pair<t_string2string_map::iterator, bool > insertion( - ret.insert( t_string2string_map::value_type( - t_string2string_map::value_type( - OString( static_cast< sal_Char const * >( - dbKey.get_data()), - dbKey.get_size() ), - OString( static_cast< sal_Char const * >( - dbData.get_data()), - dbData.get_size() ) ) ) ) ); +#if OSL_DEBUG_LEVEL > 0 + ::std::pair<t_string2string_map::iterator, bool> insertion = +#endif + ret.insert( + t_string2string_map::value_type( + OString( static_cast<sal_Char const*>(dbKey.get_data()), dbKey.get_size() ), + OString( static_cast<sal_Char const*>(dbData.get_data()), dbData.get_size() ) + ) ); OSL_ASSERT( insertion.second ); } err = pcurs->close(); diff --git a/desktop/source/deployment/gui/dp_gui.hrc b/desktop/source/deployment/gui/dp_gui.hrc index d0ae3c468d9b..d0ae3c468d9b 100755..100644 --- a/desktop/source/deployment/gui/dp_gui.hrc +++ b/desktop/source/deployment/gui/dp_gui.hrc diff --git a/desktop/source/deployment/gui/dp_gui_autoscrolledit.cxx b/desktop/source/deployment/gui/dp_gui_autoscrolledit.cxx index 9bde835bf140..198498c4bd8c 100644 --- a/desktop/source/deployment/gui/dp_gui_autoscrolledit.cxx +++ b/desktop/source/deployment/gui/dp_gui_autoscrolledit.cxx @@ -47,7 +47,6 @@ AutoScrollEdit::AutoScrollEdit( Window* pParent, const ResId& rResId ) ScrollBar* pScroll = GetVScrollBar(); if (pScroll) pScroll->Hide(); -// SetLeftMargin( 0 ); StartListening( *GetTextEngine() ); } diff --git a/desktop/source/deployment/gui/dp_gui_dialog.src b/desktop/source/deployment/gui/dp_gui_dialog.src index 2ea6fefff877..2ea6fefff877 100755..100644 --- a/desktop/source/deployment/gui/dp_gui_dialog.src +++ b/desktop/source/deployment/gui/dp_gui_dialog.src diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.hxx b/desktop/source/deployment/gui/dp_gui_dialog2.hxx index 795360732837..b13adbb48051 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.hxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.hxx @@ -222,7 +222,6 @@ public: virtual short Execute(); virtual void Resize(); virtual BOOL Close(); -// virtual long Notify( NotifyEvent& rNEvt ); virtual void showProgress( bool bStart ); virtual void updateProgress( const ::rtl::OUString &rText, diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx index a202e592d9c3..a5f3dc60cfa0 100644 --- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx +++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx @@ -102,9 +102,9 @@ #endif #ifdef WNT -#include "tools/prewin.h" +#include "prewin.h" #include <objbase.h> -#include "tools/postwin.h" +#include "postwin.h" #endif @@ -807,12 +807,6 @@ void ExtensionCmdQueue::Thread::execute() break; } } - //catch ( deployment::DeploymentException &) - //{ - //} - //catch ( lang::IllegalArgumentException &) - //{ - //} catch ( ucb::CommandAbortedException & ) { //This exception is thrown when the user clicks cancel on the progressbar. @@ -874,9 +868,6 @@ void ExtensionCmdQueue::Thread::execute() currentCmdEnv->stopProgress(); } //end for - //enable all buttons -// m_pDialog->m_bAddingExtensions = false; -// m_pDialog->updateButtonStates(); #ifdef WNT CoUninitialize(); #endif diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx index bd5282a251ad..e55e21c71eac 100644 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx @@ -821,10 +821,10 @@ void UpdateDialog::notifyMenubar( bool bPrepareOnly, bool bRecheckOnly ) return; css::uno::Sequence< css::uno::Sequence< rtl::OUString > > aItemList; - sal_Int32 nCount = 0; if ( ! bRecheckOnly ) { + sal_Int32 nCount = 0; for ( sal_Int16 i = 0; i < m_updates.getItemCount(); ++i ) { css::uno::Sequence< rtl::OUString > aItem(2); @@ -1039,6 +1039,7 @@ IMPL_LINK(UpdateDialog, selectionHandler, void *, EMPTYARG) { // create error string for version mismatch ::rtl::OUString sVersion( RTL_CONSTASCII_USTRINGPARAM("%VERSION") ); + ::rtl::OUString sProductName( RTL_CONSTASCII_USTRINGPARAM("%PRODUCTNAME") ); sal_Int32 nPos = m_noDependencyCurVer.indexOf( sVersion ); if ( nPos >= 0 ) { @@ -1046,6 +1047,16 @@ IMPL_LINK(UpdateDialog, selectionHandler, void *, EMPTYARG) ::rtl::Bootstrap::expandMacros(sCurVersion); m_noDependencyCurVer = m_noDependencyCurVer.replaceAt( nPos, sVersion.getLength(), sCurVersion ); } + nPos = m_noDependencyCurVer.indexOf( sProductName ); + if ( nPos >= 0 ) + { + m_noDependencyCurVer = m_noDependencyCurVer.replaceAt( nPos, sProductName.getLength(), BrandName::get() ); + } + nPos = m_noDependency.indexOf( sProductName ); + if ( nPos >= 0 ) + { + m_noDependency = m_noDependency.replaceAt( nPos, sProductName.getLength(), BrandName::get() ); + } b.append(m_noInstall); b.append(LF); diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.src b/desktop/source/deployment/gui/dp_gui_updatedialog.src index 47497cb3846b..7e601851e757 100644 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.src +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.src @@ -234,10 +234,10 @@ ModalDialog RID_DLG_UPDATE { Text[en-US] = "The extension cannot be updated because:"; }; String RID_DLG_UPDATE_NODEPENDENCY { - Text[en-US] = "Required OpenOffice.org version doesn't match:"; + Text[en-US] = "Required %PRODUCTNAME version doesn't match:"; }; String RID_DLG_UPDATE_NODEPENDENCY_CUR_VER { - Text[en-US] = "You have OpenOffice.org %VERSION"; + Text[en-US] = "You have %PRODUCTNAME %VERSION"; }; String RID_DLG_UPDATE_BROWSERBASED { Text[en-US] = "browser based update"; diff --git a/desktop/source/deployment/gui/license_dialog.hxx b/desktop/source/deployment/gui/license_dialog.hxx index cb43f74ee528..2bddfd4f4102 100644 --- a/desktop/source/deployment/gui/license_dialog.hxx +++ b/desktop/source/deployment/gui/license_dialog.hxx @@ -45,7 +45,6 @@ namespace dp_gui { class LicenseDialog : public ::cppu::WeakImplHelper1<ui::dialogs::XExecutableDialog> -// task::XJobExecutor> { Reference<XComponentContext> const m_xComponentContext; Reference<awt::XWindow> /* const */ m_parent; @@ -63,10 +62,6 @@ public: virtual void SAL_CALL setTitle( OUString const & title ) throw (RuntimeException); virtual sal_Int16 SAL_CALL execute() throw (RuntimeException); - - //// XJobExecutor - //virtual void SAL_CALL trigger( OUString const & event ) - // throw (RuntimeException); }; } #endif diff --git a/desktop/source/deployment/gui/makefile.mk b/desktop/source/deployment/gui/makefile.mk index 9f1a50134248..509761c5b1e1 100644 --- a/desktop/source/deployment/gui/makefile.mk +++ b/desktop/source/deployment/gui/makefile.mk @@ -30,7 +30,6 @@ PRJ = ..$/..$/.. PRJNAME = desktop TARGET = deploymentgui ENABLE_EXCEPTIONS = TRUE -#USE_DEFFILE = TRUE NO_BSYMBOLIC = TRUE USE_PCH := ENABLE_PCH := @@ -87,8 +86,6 @@ SHL1LIBS = $(SLB)$/$(TARGET).lib SHL1DEF = $(MISC)$/$(SHL1TARGET).def DEF1NAME = $(SHL1TARGET) -#DEFLIB1NAME = $(TARGET) -#DEF1DEPN = SRS1NAME = $(TARGET) SRC1FILES = \ diff --git a/desktop/source/deployment/inc/dp_dependencies.hxx b/desktop/source/deployment/inc/dp_dependencies.hxx index 07221e173520..e39c70c99a91 100644 --- a/desktop/source/deployment/inc/dp_dependencies.hxx +++ b/desktop/source/deployment/inc/dp_dependencies.hxx @@ -29,6 +29,7 @@ #ifndef INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_INC_DP_DEPENDENCIES_HXX #define INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_INC_DP_DEPENDENCIES_HXX +#include "unotools/configmgr.hxx" #include "sal/config.h" #include "com/sun/star/uno/Reference.hxx" #include "com/sun/star/uno/Sequence.hxx" @@ -44,6 +45,14 @@ namespace rtl { class OUString; } namespace dp_misc { +struct BrandName : public ::rtl::StaticWithInit<const ::rtl::OUString, BrandName> { + const ::rtl::OUString operator () () { + return ::utl::ConfigManager::GetDirectConfigProperty( + ::utl::ConfigManager::PRODUCTNAME ).get< ::rtl::OUString >(); + } +}; + + /** Dependency handling. */ diff --git a/desktop/source/deployment/inc/dp_persmap.h b/desktop/source/deployment/inc/dp_persmap.h index 16392c464bf1..c078cf902ec5 100644 --- a/desktop/source/deployment/inc/dp_persmap.h +++ b/desktop/source/deployment/inc/dp_persmap.h @@ -31,14 +31,14 @@ #include "rtl/ustring.hxx" #include "db.hxx" -#include <hash_map> +#include <boost/unordered_map.hpp> using namespace berkeleydbproxy; namespace dp_misc { -typedef ::std::hash_map< +typedef ::boost::unordered_map< ::rtl::OString, ::rtl::OString, ::rtl::OStringHash > t_string2string_map; //============================================================================== diff --git a/desktop/source/deployment/makefile.mk b/desktop/source/deployment/makefile.mk index 6d83a5c1004b..ce494b449608 100644 --- a/desktop/source/deployment/makefile.mk +++ b/desktop/source/deployment/makefile.mk @@ -30,7 +30,6 @@ PRJ = ..$/.. PRJNAME = desktop TARGET = deployment ENABLE_EXCEPTIONS = TRUE -#USE_DEFFILE = TRUE NO_BSYMBOLIC = TRUE .IF "$(GUI)"=="OS2" diff --git a/desktop/source/deployment/manager/dp_activepackages.cxx b/desktop/source/deployment/manager/dp_activepackages.cxx index dabc1e37cf24..f220aaf40daa 100644 --- a/desktop/source/deployment/manager/dp_activepackages.cxx +++ b/desktop/source/deployment/manager/dp_activepackages.cxx @@ -41,7 +41,7 @@ #include "rtl/uri.h" #include "rtl/uri.hxx" #include "rtl/ustring.hxx" -#include <hash_map> +#include <boost/unordered_map.hpp> #include "dp_identifier.hxx" #include "dp_persmap.h" diff --git a/desktop/source/deployment/manager/dp_commandenvironments.cxx b/desktop/source/deployment/manager/dp_commandenvironments.cxx index e159382f2c7b..78448cfa1726 100644 --- a/desktop/source/deployment/manager/dp_commandenvironments.cxx +++ b/desktop/source/deployment/manager/dp_commandenvironments.cxx @@ -250,11 +250,6 @@ void NoLicenseCommandEnv::handle( handle_(approve, abort, xRequest); } -// SilentCheckPrerequisitesCommandEnv::SilentCheckPrerequisitesCommandEnv( -// css::uno::Reference< css::task::XInteractionHandler> const & handler): -// BaseCommandEnv(handler) -// { -// } SilentCheckPrerequisitesCommandEnv::SilentCheckPrerequisitesCommandEnv() { } diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx index 0f8498877f77..1b84fea78f77 100644 --- a/desktop/source/deployment/manager/dp_extensionmanager.cxx +++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx @@ -65,7 +65,7 @@ #include "boost/bind.hpp" #include <list> -#include <hash_map> +#include <boost/unordered_map.hpp> #include <algorithm> namespace deploy = com::sun::star::deployment; @@ -729,9 +729,13 @@ Reference<deploy::XPackage> ExtensionManager::addExtension( if (repository.equals(OUSTR("user"))) bUserDisabled2 = false; + // pass the two values via variables to workaround gcc-4.3.4 specific bug (bnc#655912) + OUString sNewExtensionIdentifier = dp_misc::getIdentifier(xNewExtension); + OUString sNewExtensionFileName = xNewExtension->getName(); + activateExtension( - dp_misc::getIdentifier(xNewExtension), - xNewExtension->getName(), bUserDisabled2, false, xAbortChannel, + sNewExtensionIdentifier, sNewExtensionFileName, + bUserDisabled2, false, xAbortChannel, Reference<ucb::XCommandEnvironment>()); } else diff --git a/desktop/source/deployment/manager/dp_extensionmanager.hxx b/desktop/source/deployment/manager/dp_extensionmanager.hxx index 8677f960ef91..6bb8fa6e6377 100644 --- a/desktop/source/deployment/manager/dp_extensionmanager.hxx +++ b/desktop/source/deployment/manager/dp_extensionmanager.hxx @@ -45,7 +45,7 @@ namespace css = ::com::sun::star; namespace dp_manager { -typedef ::std::hash_map< +typedef ::boost::unordered_map< ::rtl::OUString, ::std::vector<css::uno::Reference<css::deployment::XPackage> >, ::rtl::OUStringHash > id2extensions; diff --git a/desktop/source/deployment/manager/dp_managerfac.cxx b/desktop/source/deployment/manager/dp_managerfac.cxx index 55bd259a276d..cb2f3b7f4387 100644 --- a/desktop/source/deployment/manager/dp_managerfac.cxx +++ b/desktop/source/deployment/manager/dp_managerfac.cxx @@ -55,7 +55,7 @@ class PackageManagerFactoryImpl : private MutexHolder, public t_pmfac_helper Reference<deployment::XPackageManager> m_xUserMgr; Reference<deployment::XPackageManager> m_xSharedMgr; Reference<deployment::XPackageManager> m_xBundledMgr; - typedef ::std::hash_map< + typedef ::boost::unordered_map< OUString, WeakReference<deployment::XPackageManager>, ::rtl::OUStringHash > t_string2weakref; t_string2weakref m_managers; diff --git a/desktop/source/deployment/misc/dp_dependencies.cxx b/desktop/source/deployment/misc/dp_dependencies.cxx index 375138d86532..6b937547ae93 100644 --- a/desktop/source/deployment/misc/dp_dependencies.cxx +++ b/desktop/source/deployment/misc/dp_dependencies.cxx @@ -137,6 +137,7 @@ check(::dp_misc::DescriptionInfoset const & infoset) { ::rtl::OUString sReason; ::rtl::OUString sValue; ::rtl::OUString sVersion(RTL_CONSTASCII_USTRINGPARAM("%VERSION")); + ::rtl::OUString sProductName(RTL_CONSTASCII_USTRINGPARAM("%PRODUCTNAME")); if ( dependency->getNamespaceURI().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( xmlNamespace ) ) && dependency->getTagName().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OpenOffice.org-minimal-version" ) ) ) @@ -166,6 +167,9 @@ check(::dp_misc::DescriptionInfoset const & infoset) { sal_Int32 nPos = sReason.indexOf( sVersion ); if ( nPos >= 0 ) sReason = sReason.replaceAt( nPos, sVersion.getLength(), sValue ); + nPos = sReason.indexOf( sProductName ); + if ( nPos >= 0 ) + sReason = sReason.replaceAt( nPos, sProductName.getLength(), BrandName::get() ); return sReason; } diff --git a/desktop/source/deployment/misc/dp_misc.src b/desktop/source/deployment/misc/dp_misc.src index 0d341122af16..4639879d7582 100644 --- a/desktop/source/deployment/misc/dp_misc.src +++ b/desktop/source/deployment/misc/dp_misc.src @@ -32,9 +32,9 @@ String RID_DEPLYOMENT_DEPENDENCIES_UNKNOWN { }; String RID_DEPLYOMENT_DEPENDENCIES_MIN { - Text[en-US] = "Extensions requires at least OpenOffice.org %VERSION"; + Text[en-US] = "Extensions requires at least %PRODUCTNAME %VERSION"; }; String RID_DEPLYOMENT_DEPENDENCIES_MAX { - Text[en-US] = "Extension doesn't support versions greater than: OpenOffice.org %VERSION"; + Text[en-US] = "Extension doesn't support versions greater than: %PRODUCTNAME %VERSION"; }; diff --git a/desktop/source/deployment/misc/dp_platform.cxx b/desktop/source/deployment/misc/dp_platform.cxx index 459e7da4b5f0..eefe9282c69d 100644 --- a/desktop/source/deployment/misc/dp_platform.cxx +++ b/desktop/source/deployment/misc/dp_platform.cxx @@ -38,6 +38,7 @@ #define PLATFORM_ALL "all" #define PLATFORM_WIN_X86 "windows_x86" +#define PLATFORM_WIN_X86_64 "windows_x86_64" #define PLATFORM_LINUX_X86 "linux_x86" #define PLATFORM_LINUX_X86_64 "linux_x86_64" #define PLATFORM_KFREEBSD_X86 "kfreebsd_x86" @@ -70,6 +71,8 @@ #define PLATFORM_OS2_X86 "os2_x86" #define PLATFORM_OPENBSD_X86 "openbsd_x86" #define PLATFORM_OPENBSD_X86_64 "openbsd_x86_64" +#define PLATFORM_DRAGONFLY_X86 "dragonfly_x86" +#define PLATFORM_DRAGONFLY_X86_64 "dragonfly_x86_64" #define PLATFORM_AIX_POWERPC "aix_powerpc" @@ -131,6 +134,8 @@ namespace ret = true; else if (token.equals(OUSTR(PLATFORM_WIN_X86))) ret = checkOSandCPU(OUSTR("Windows"), OUSTR("x86")); + else if (token.equals(OUSTR(PLATFORM_WIN_X86_64))) + ret = checkOSandCPU(OUSTR("Windows"), OUSTR("x86_64")); else if (token.equals(OUSTR(PLATFORM_LINUX_X86))) ret = checkOSandCPU(OUSTR("Linux"), OUSTR("x86")); else if (token.equals(OUSTR(PLATFORM_LINUX_X86_64))) @@ -191,6 +196,10 @@ namespace ret = checkOSandCPU(OUSTR("OpenBSD"), OUSTR("x86")); else if (token.equals(OUSTR(PLATFORM_OPENBSD_X86_64))) ret = checkOSandCPU(OUSTR("OpenBSD"), OUSTR("X86_64")); + else if (token.equals(OUSTR(PLATFORM_DRAGONFLY_X86))) + ret = checkOSandCPU(OUSTR("DragonFly"), OUSTR("x86")); + else if (token.equals(OUSTR(PLATFORM_DRAGONFLY_X86_64))) + ret = checkOSandCPU(OUSTR("DragonFly"), OUSTR("X86_64")); else { OSL_ENSURE(0, "Extension Manager: The extension supports an unknown platform. " diff --git a/desktop/source/deployment/misc/dp_update.cxx b/desktop/source/deployment/misc/dp_update.cxx index 5455dbd3d9e6..8aee216e44cc 100644 --- a/desktop/source/deployment/misc/dp_update.cxx +++ b/desktop/source/deployment/misc/dp_update.cxx @@ -271,14 +271,6 @@ UPDATE_SOURCE isUpdateUserExtension( retVal = UPDATE_SOURCE_ONLINE; } - //No update for bundled extensions, they are updated only by the setup - //else if (bundledVersion.getLength()) - //{ - // int index = determineHighestVersion( - // OUString(), OUString(), bundledVersion, onlineVersion); - // if (index == 3) - // retVal = UPDATE_SOURCE_ONLINE; - //} } else { @@ -317,14 +309,6 @@ UPDATE_SOURCE isUpdateSharedExtension( else if (index == 3) retVal = UPDATE_SOURCE_ONLINE; } - //No update for bundled extensions, they are updated only by the setup - //else if (bundledVersion.getLength()) - //{ - // int index = determineHighestVersion( - // OUString(), OUString(), bundledVersion, onlineVersion); - // if (index == 3) - // retVal = UPDATE_SOURCE_ONLINE; - //} return retVal; } diff --git a/desktop/source/deployment/registry/component/dp_component.cxx b/desktop/source/deployment/registry/component/dp_component.cxx index 1cda30d69297..b09b31e74961 100644 --- a/desktop/source/deployment/registry/component/dp_component.cxx +++ b/desktop/source/deployment/registry/component/dp_component.cxx @@ -55,7 +55,7 @@ #include "com/sun/star/ucb/NameClash.hpp" #include "com/sun/star/util/XMacroExpander.hpp" #include <list> -#include <hash_map> +#include <boost/unordered_map.hpp> #include <vector> #include <memory> #include <algorithm> @@ -193,6 +193,42 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend }; friend class TypelibraryPackageImpl; + /** Serves for unregistering packages that were registered on a + different platform. This can happen if one has remotely mounted + /home, for example. + */ + class OtherPlatformPackageImpl : public ::dp_registry::backend::Package + { + public: + OtherPlatformPackageImpl( + ::rtl::Reference<PackageRegistryBackend> const & myBackend, + OUString const & url, OUString const & name, + Reference<deployment::XPackageTypeInfo> const & xPackageType, + bool bRemoved, OUString const & identifier, OUString const& rPlatform); + + private: + BackendImpl * getMyBackend() const; + + const Reference<registry::XSimpleRegistry> impl_openRDB() const; + const Reference<XInterface> impl_createInstance(OUString const& rService) const; + + // Package + virtual beans::Optional< beans::Ambiguous<sal_Bool> > isRegistered_( + ::osl::ResettableMutexGuard & guard, + ::rtl::Reference<AbortChannel> const & abortChannel, + Reference<XCommandEnvironment> const & xCmdEnv ); + virtual void processPackage_( + ::osl::ResettableMutexGuard & guard, + bool registerPackage, + bool startup, + ::rtl::Reference<AbortChannel> const & abortChannel, + Reference<XCommandEnvironment> const & xCmdEnv ); + + private: + OUString const m_aPlatform; + }; + friend class OtherPlatformPackageImpl; + t_stringlist m_jar_typelibs; t_stringlist m_rdb_typelibs; t_stringlist & getTypelibs( bool jar ) { @@ -203,7 +239,7 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend bool m_unorc_modified; bool bSwitchedRdbFiles; - typedef ::std::hash_map< OUString, Reference<XInterface>, + typedef ::boost::unordered_map< OUString, Reference<XInterface>, ::rtl::OUStringHash > t_string2object; t_string2object m_backendObjects; @@ -458,7 +494,6 @@ void BackendImpl::initServiceRdbFiles() m_xComponentContext ), UNO_QUERY_THROW ); m_xCommonRDB->open( makeURL( expandUnoRcUrl(getCachePath()), m_commonRDB ), -// m_readOnly, !m_readOnly ); false, true); } if (m_nativeRDB.getLength() > 0) { @@ -469,7 +504,6 @@ void BackendImpl::initServiceRdbFiles() m_xComponentContext ), UNO_QUERY_THROW ); m_xNativeRDB->open( makeURL( expandUnoRcUrl(getCachePath()), m_nativeRDB ), -// m_readOnly, !m_readOnly ); false, true); } } @@ -694,16 +728,30 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_( INetContentTypeParameter const * param = params.find( ByteString("platform") ); - if (param == 0 || platform_fits( param->m_sValue )) { + bool bPlatformFits(param == 0); + String aPlatform; + if (!bPlatformFits) // platform is specified, we have to check + { + aPlatform = param->m_sValue; + bPlatformFits = platform_fits(aPlatform); + } + // If the package is being removed, do not care whether + // platform fits. We won't be using it anyway. + if (bPlatformFits || bRemoved) { param = params.find( ByteString("type") ); if (param != 0) { String const & value = param->m_sValue; if (value.EqualsIgnoreCaseAscii("native")) { - return new BackendImpl::ComponentPackageImpl( - this, url, name, m_xDynComponentTypeInfo, - OUSTR("com.sun.star.loader.SharedLibrary"), - bRemoved, identifier); + if (bPlatformFits) + return new BackendImpl::ComponentPackageImpl( + this, url, name, m_xDynComponentTypeInfo, + OUSTR("com.sun.star.loader.SharedLibrary"), + bRemoved, identifier); + else + return new BackendImpl::OtherPlatformPackageImpl( + this, url, name, m_xDynComponentTypeInfo, + bRemoved, identifier, aPlatform); } if (value.EqualsIgnoreCaseAscii("Java")) { return new BackendImpl::ComponentPackageImpl( @@ -1567,6 +1615,110 @@ void BackendImpl::TypelibraryPackageImpl::processPackage_( } } +BackendImpl::OtherPlatformPackageImpl::OtherPlatformPackageImpl( + ::rtl::Reference<PackageRegistryBackend> const & myBackend, + OUString const & url, OUString const & name, + Reference<deployment::XPackageTypeInfo> const & xPackageType, + bool bRemoved, OUString const & identifier, OUString const& rPlatform) + : Package(myBackend, url, name, name, xPackageType, bRemoved, identifier) + , m_aPlatform(rPlatform) +{ + OSL_PRECOND(bRemoved, "this class can only be used for removing packages!"); +} + +BackendImpl * +BackendImpl::OtherPlatformPackageImpl::getMyBackend() const +{ + BackendImpl * pBackend = static_cast<BackendImpl *>(m_myBackend.get()); + if (NULL == pBackend) + { + //Throws a DisposedException + check(); + //We should never get here... + throw RuntimeException( + OUSTR("Failed to get the BackendImpl"), + static_cast<OWeakObject*>(const_cast<OtherPlatformPackageImpl*>(this))); + } + return pBackend; +} + +Reference<registry::XSimpleRegistry> const +BackendImpl::OtherPlatformPackageImpl::impl_openRDB() const +{ + OUString const aRDB(m_aPlatform + OUString(RTL_CONSTASCII_USTRINGPARAM(".rdb"))); + OUString const aRDBPath(makeURL(getMyBackend()->getCachePath(), aRDB)); + + Reference<registry::XSimpleRegistry> xRegistry; + + try + { + xRegistry.set( + impl_createInstance( + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.SimpleRegistry"))), + UNO_QUERY) + ; + if (xRegistry.is()) + xRegistry->open(expandUnoRcUrl(aRDBPath), false, false); + } + catch (registry::InvalidRegistryException const&) + { + // If the registry does not exist, we do not need to bother at all + xRegistry.set(0); + } + + OSL_POSTCOND(xRegistry.is(), "could not create registry for the package's platform"); + return xRegistry; +} + +Reference<XInterface> const +BackendImpl::OtherPlatformPackageImpl::impl_createInstance(OUString const& rService) +const +{ + Reference<XComponentContext> const xContext(getMyBackend()->getComponentContext()); + OSL_ASSERT(xContext.is()); + Reference<XInterface> xService; + if (xContext.is()) + xService.set(xContext->getServiceManager()->createInstanceWithContext(rService, xContext)); + return xService; +} + +beans::Optional<beans::Ambiguous<sal_Bool> > +BackendImpl::OtherPlatformPackageImpl::isRegistered_( + ::osl::ResettableMutexGuard& /* guard */, + ::rtl::Reference<AbortChannel> const& /* abortChannel */, + Reference<XCommandEnvironment> const& /* xCmdEnv */ ) +{ + return beans::Optional<beans::Ambiguous<sal_Bool> >(sal_True, + beans::Ambiguous<sal_Bool>(sal_True, sal_False)); +} + +void +BackendImpl::OtherPlatformPackageImpl::processPackage_( + ::osl::ResettableMutexGuard& /* guard */, + bool bRegisterPackage, + bool /* bStartup */, + ::rtl::Reference<AbortChannel> const& /* abortChannel */, + Reference<XCommandEnvironment> const& /* xCmdEnv */) +{ + OSL_PRECOND(!bRegisterPackage, "this class can only be used for removing packages!"); + (void) bRegisterPackage; + + OUString const aURL(getURL()); + + Reference<registry::XSimpleRegistry> const xServicesRDB(impl_openRDB()); + Reference<registry::XImplementationRegistration> const xImplReg( + impl_createInstance( + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.ImplementationRegistration"))), + UNO_QUERY) + ; + if (xImplReg.is() && xServicesRDB.is()) + xImplReg->revokeImplementation(aURL, xServicesRDB); + if (xServicesRDB.is()) + xServicesRDB->close(); + + getMyBackend()->deleteDataFromDb(aURL); +} + } // anon namespace namespace sdecl = comphelper::service_decl; diff --git a/desktop/source/deployment/registry/dp_registry.cxx b/desktop/source/deployment/registry/dp_registry.cxx index bffdaeae1924..2c7cb4c2168d 100644 --- a/desktop/source/deployment/registry/dp_registry.cxx +++ b/desktop/source/deployment/registry/dp_registry.cxx @@ -50,9 +50,9 @@ #include "com/sun/star/util/XUpdatable.hpp" #include "com/sun/star/container/XContentEnumerationAccess.hpp" #include "com/sun/star/deployment/PackageRegistryBackend.hpp" -#include <hash_map> +#include <boost/unordered_map.hpp> #include <set> -#include <hash_set> +#include <boost/unordered_set.hpp> #include <memory> using namespace ::dp_misc; @@ -91,10 +91,10 @@ class PackageRegistryImpl : private MutexHolder, public t_helper return str1.equalsIgnoreAsciiCase( str2 ); } }; - typedef ::std::hash_map< + typedef ::boost::unordered_map< OUString, Reference<deployment::XPackageRegistry>, ci_string_hash, ci_string_equals > t_string2registry; - typedef ::std::hash_map< + typedef ::boost::unordered_map< OUString, OUString, ci_string_hash, ci_string_equals > t_string2string; typedef ::std::set< @@ -190,7 +190,7 @@ void PackageRegistryImpl::insertBackend( Reference<deployment::XPackageRegistry> const & xBackend ) { m_allBackends.insert( xBackend ); - typedef ::std::hash_set<OUString, ::rtl::OUStringHash> t_stringset; + typedef ::boost::unordered_set<OUString, ::rtl::OUStringHash> t_stringset; t_stringset ambiguousFilters; const Sequence< Reference<deployment::XPackageTypeInfo> > packageTypes( diff --git a/desktop/source/deployment/registry/executable/dp_executable.cxx b/desktop/source/deployment/registry/executable/dp_executable.cxx index 1b05a3fae184..1af6fb0f2240 100644 --- a/desktop/source/deployment/registry/executable/dp_executable.cxx +++ b/desktop/source/deployment/registry/executable/dp_executable.cxx @@ -84,7 +84,7 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend }; friend class ExecutablePackageImpl; - typedef ::std::hash_map< OUString, Reference<XInterface>, + typedef ::boost::unordered_map< OUString, Reference<XInterface>, ::rtl::OUStringHash > t_string2object; // PackageRegistryBackend diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx index d69e5698b7a4..1a118c8b04fb 100644 --- a/desktop/source/deployment/registry/help/dp_help.cxx +++ b/desktop/source/deployment/registry/help/dp_help.cxx @@ -236,13 +236,6 @@ BackendImpl::PackageImpl::PackageImpl( : Package( myBackend, url, name, name, xPackageType, bRemoved, identifier) { -// if (bRemoved) -// { -// ::boost::optional<HelpBackendDb::Data> opt = -// getMyBackend()->readDataFromDb(url); -// if (opt) -// m_dbData = *opt; -// } } // Package diff --git a/desktop/source/deployment/registry/inc/dp_backend.h b/desktop/source/deployment/registry/inc/dp_backend.h index 4e97689e253f..984b17efae66 100644 --- a/desktop/source/deployment/registry/inc/dp_backend.h +++ b/desktop/source/deployment/registry/inc/dp_backend.h @@ -43,7 +43,7 @@ #include "com/sun/star/deployment/XPackageManager.hpp" #include "com/sun/star/deployment/InvalidRemovedParameterException.hpp" #include <memory> -#include <hash_map> +#include <boost/unordered_map.hpp> #include <list> #include "dp_registry.hrc" @@ -283,7 +283,7 @@ class PackageRegistryBackend // XPackageManager::getDeployedPackages is called often. This results in a lot //of bindPackage calls which are costly. Therefore we keep hard references in //the map now. - typedef ::std::hash_map< + typedef ::boost::unordered_map< ::rtl::OUString, css::uno::Reference<css::deployment::XPackage>, ::rtl::OUStringHash > t_string2ref; t_string2ref m_bound; diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx index 0c89b4a62739..2b9188dba835 100644 --- a/desktop/source/deployment/registry/package/dp_package.cxx +++ b/desktop/source/deployment/registry/package/dp_package.cxx @@ -701,10 +701,6 @@ bool BackendImpl::PackageImpl::checkDependencies( return true; else return false; - //throw css::deployment::DeploymentException( - // OUSTR("Extension Manager: User declined the license."), - // static_cast<OWeakObject*>(this), - // Any( css::deployment::LicenseException(OUSTR("User declined the license."), 0, m_name, sLicense))); } return true; } catch (css::ucb::CommandFailedException&) { diff --git a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx index 7904331ef11b..7cd7af56fa6a 100644 --- a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx +++ b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx @@ -172,43 +172,6 @@ BackendImpl::BackendImpl( { if (! transientMode()) { -/* - if (office_is_running()) - { - Reference<XComponentContext> xContext( getComponentContext() ); - m_xScriptLibs.set( - xContext->getServiceManager()->createInstanceWithContext( - OUSTR("com.sun.star." - "script.ApplicationScriptLibraryContainer"), - xContext ), UNO_QUERY_THROW ); - m_xDialogLibs.set( - xContext->getServiceManager()->createInstanceWithContext( - OUSTR("com.sun.star." - "script.ApplicationDialogLibraryContainer"), - xContext ), UNO_QUERY_THROW ); - } - else - { - OUString basic_path( - m_eContext == CONTEXT_USER - ? OUSTR("vnd.sun.star.expand:${$BRAND_BASE_DIR/program/" - SAL_CONFIGFILE("bootstrap") - ":UserInstallation}/user/basic") - : OUSTR("vnd.sun.star.expand:${$BRAND_BASE_DIR/program/" - SAL_CONFIGFILE("bootstrap") - ":BaseInstallation}/share/basic") ); - m_basic_script_libs.reset( - new LibraryContainer( - makeURL( basic_path, OUSTR("script.xlc") ), - getMutex(), - getComponentContext() ) ); - m_dialog_libs.reset( - new LibraryContainer( - makeURL( basic_path, OUSTR("dialog.xlc") ), - getMutex(), - getComponentContext() ) ); - } -*/ } } diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx index 86296ba19ac2..8505a64064bf 100644 --- a/desktop/source/migration/migration.cxx +++ b/desktop/source/migration/migration.cxx @@ -65,7 +65,6 @@ #include <com/sun/star/ui/XUIConfigurationStorage.hpp> #include <com/sun/star/ui/XUIConfigurationPersistence.hpp> -using namespace rtl; using namespace osl; using namespace std; using namespace com::sun::star::task; @@ -76,6 +75,9 @@ using namespace com::sun::star::container; using com::sun::star::uno::Exception; using namespace com::sun::star; +using ::rtl::OUString; +using ::rtl::OString; + namespace desktop { static const ::rtl::OUString ITEM_DESCRIPTOR_COMMANDURL(RTL_CONSTASCII_USTRINGPARAM("CommandURL")); diff --git a/desktop/source/migration/migration_impl.hxx b/desktop/source/migration/migration_impl.hxx index ebb7c96c620c..2d079aeb99a5 100644 --- a/desktop/source/migration/migration_impl.hxx +++ b/desktop/source/migration/migration_impl.hxx @@ -31,7 +31,7 @@ #include <vector> #include <algorithm> #include <memory> -#include <hash_map> +#include <boost/unordered_map.hpp> #include "migration.hxx" @@ -138,7 +138,7 @@ struct MigrationItem ::rtl::OUString GetPrevSibling() const { return m_sPrevSibling; } }; -typedef ::std::hash_map< ::rtl::OUString, +typedef ::boost::unordered_map< ::rtl::OUString, ::std::vector< MigrationItem >, ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > MigrationHashMap; diff --git a/desktop/source/migration/services/jvmfwk.cxx b/desktop/source/migration/services/jvmfwk.cxx index 095c740e826b..05c359c500a0 100644 --- a/desktop/source/migration/services/jvmfwk.cxx +++ b/desktop/source/migration/services/jvmfwk.cxx @@ -52,6 +52,8 @@ #include <stdio.h> #include "osl/thread.hxx" +using ::rtl::OUString; + #define OUSTR(x) rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( x )) #define SERVICE_NAME "com.sun.star.migration.Java" @@ -61,7 +63,6 @@ #define USER_CLASS_PATH 2 namespace css = com::sun::star; -using namespace rtl; using namespace com::sun::star::uno; using namespace com::sun::star::beans; using namespace com::sun::star::lang; @@ -78,7 +79,7 @@ public: JavaInfo* pData; CJavaInfo(); ~CJavaInfo(); - operator JavaInfo* (); + operator JavaInfo* () const; }; CJavaInfo::CJavaInfo(): pData(NULL) @@ -90,7 +91,7 @@ CJavaInfo::~CJavaInfo() jfw_freeJavaInfo(pData); } -CJavaInfo::operator JavaInfo*() +CJavaInfo::operator JavaInfo*() const { return pData; } diff --git a/desktop/source/migration/services/makefile.mk b/desktop/source/migration/services/makefile.mk index 2f3eb9308ebd..35f21ba99d50 100644 --- a/desktop/source/migration/services/makefile.mk +++ b/desktop/source/migration/services/makefile.mk @@ -34,6 +34,7 @@ COMP1TYPELIST = migrationoo2 LIBTARGET=NO # --- Settings ----------------------------------------------------- + .INCLUDE : ..$/..$/deployment/inc/dp_misc.mk .INCLUDE : settings.mk DLLPRE = @@ -80,7 +81,6 @@ SHL1STDLIBS= \ SHL1DEPN= SHL1IMPLIB=imigrationoo2 -#SHL1LIBS=$(SLB)$/$(TARGET).lib SHL1DEF=$(MISC)$/$(SHL1TARGET).def DEF1NAME=$(SHL1TARGET) @@ -108,7 +108,6 @@ SHL2STDLIBS= \ SHL2DEPN= SHL2IMPLIB=imigrationoo3 -#SHL2LIBS=$(SLB)$/$(SHL2TARGET).lib SHL2DEF=$(MISC)$/$(SHL2TARGET).def DEF2NAME=$(SHL2TARGET) diff --git a/desktop/source/offacc/acceptor.cxx b/desktop/source/offacc/acceptor.cxx index a5b13a636bfc..8d00dc8b7a8a 100644 --- a/desktop/source/offacc/acceptor.cxx +++ b/desktop/source/offacc/acceptor.cxx @@ -286,18 +286,6 @@ Reference<XInterface> SAL_CALL AccInstanceProvider::getInstance (const OUString& rInstance = rNamingService; } } - /* - else if ( aName.compareToAscii("com.sun.star.ucb.RemoteContentProviderAcceptor" )) - { - Reference< XMultiServiceFactory > rSMgr = ::comphelper::getProcessServiceFactory(); - if ( rSMgr.is() ) { - try { - rInstance = rSMgr->createInstance( sObjectName ); - } - catch (Exception const &) {} - } - } - */ return rInstance; } diff --git a/desktop/source/pagein/makefile.mk b/desktop/source/pagein/makefile.mk index bc63314c9601..09248d4f9469 100644 --- a/desktop/source/pagein/makefile.mk +++ b/desktop/source/pagein/makefile.mk @@ -142,14 +142,6 @@ $(MISC)$/$(TARGET)-common : makefile.mk @-echo $(URELIBPATH)$/$(DLLPRE)reg$(UDKDLLPOST) >> $@ @-echo $(URELIBPATH)$/$(DLLPRE)store$(UDKDLLPOST) >> $@ @-echo $(URELIBPATH)$/reflection$(UNODLLPOST) >> $@ -.IF "$(USE_SYSTEM_STL)"!="YES" -.IF "$(COMNAME)" == "gcc2" || "$(COMNAME)" == "gcc3" - @-echo $(URELIBPATH)$/$(DLLPRE)stlport_gcc$(DLLPOST) >> $@ -.ENDIF # gcc -.IF "$(COMNAME)" == "sunpro5" - @-echo $(URELIBPATH)$/$(DLLPRE)stlport_sunpro$(DLLPOST) >> $@ -.ENDIF # sunpro5 -.ENDIF # SYSTEM_STL @-echo $(URELIBPATH)$/$(DLLPRE)uno_cppuhelper$(COMID)$(UDKDLLPOST) >> $@ @-echo $(URELIBPATH)$/$(DLLPRE)uno_cppu$(UDKDLLPOST) >> $@ @-echo $(URELIBPATH)$/$(DLLPRE)uno_sal$(UDKDLLPOST) >> $@ diff --git a/desktop/source/pkgchk/unopkg/unopkg_app.cxx b/desktop/source/pkgchk/unopkg/unopkg_app.cxx index 743790f73cfd..afc06c2fd245 100644 --- a/desktop/source/pkgchk/unopkg/unopkg_app.cxx +++ b/desktop/source/pkgchk/unopkg/unopkg_app.cxx @@ -500,10 +500,9 @@ extern "C" int unopkg_main() //Now prepare the vector which tells what extension has an //unaccepted license vecUnaccepted.resize(vecExtUnaccepted.size() + vec_packages.size()); - ::std::vector<bool>::iterator i_unaccepted = - ::std::fill_n(vecUnaccepted.begin(), - vecExtUnaccepted.size(), true); - ::std::fill_n(i_unaccepted, vec_packages.size(), false); + ::std::fill_n(vecUnaccepted.begin(), vecExtUnaccepted.size(), true); + ::std::fill_n(vecUnaccepted.begin() + vecExtUnaccepted.size(), + vec_packages.size(), false); dp_misc::writeConsole( OUSTR("All deployed ") + repository + OUSTR(" extensions:\n\n")); diff --git a/desktop/source/registration/com/sun/star/registration/Registration.java b/desktop/source/registration/com/sun/star/registration/Registration.java index 7fc24b80398f..96dd66375afa 100644 --- a/desktop/source/registration/com/sun/star/registration/Registration.java +++ b/desktop/source/registration/com/sun/star/registration/Registration.java @@ -315,7 +315,6 @@ public class Registration { out.close(); int returnCode = con.getResponseCode(); -// if (returnCode == HttpURLConnection.HTTP_OK); } catch(java.lang.Exception e) { // IOException and UnknownHostException } diff --git a/desktop/source/so_comp/evaluation.cxx b/desktop/source/so_comp/evaluation.cxx index a27f9b062cf1..8890d26462ec 100644 --- a/desktop/source/so_comp/evaluation.cxx +++ b/desktop/source/so_comp/evaluation.cxx @@ -43,12 +43,13 @@ #include "../app/desktop.hrc" -using namespace rtl; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::registry; +using ::rtl::OUString; + namespace desktop { static SOEvaluation* pSOEval=0; diff --git a/desktop/source/so_comp/makefile.mk b/desktop/source/so_comp/makefile.mk index 590f99518c68..5016489425df 100644 --- a/desktop/source/so_comp/makefile.mk +++ b/desktop/source/so_comp/makefile.mk @@ -37,11 +37,6 @@ ENABLE_EXCEPTIONS=TRUE .INCLUDE : settings.mk -# --- Define time bomb date. Not active for OOo -------------------- -# --- Change something in evaluation.cxx!!! (e.g. line 313) -# --- You must use the yyyymmdd format!!! -------------------------- -#CDEFS+=-DTIMEBOMB=20050930 - # --- Files -------------------------------------------------------- SLOFILES = $(SLO)$/evaluation.obj \ diff --git a/desktop/source/so_comp/oemjob.cxx b/desktop/source/so_comp/oemjob.cxx index d3e37ddfe87b..bdb45e5eb0a7 100644 --- a/desktop/source/so_comp/oemjob.cxx +++ b/desktop/source/so_comp/oemjob.cxx @@ -43,7 +43,6 @@ #include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp> #include <com/sun/star/beans/NamedValue.hpp> -using namespace rtl; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::beans; @@ -51,6 +50,10 @@ using namespace ::com::sun::star::ui::dialogs; using namespace ::com::sun::star::frame; using namespace ::com::sun::star::util; +using ::rtl::OUString; +using ::rtl::OUStringBuffer; +using ::rtl::Bootstrap; + namespace desktop{ char const OEM_PRELOAD_SECTION[] = "Bootstrap"; @@ -163,33 +166,6 @@ throw ( RuntimeException ) } else { // user declined... // terminate. - /* - Reference< XDesktop > xDesktop( m_xServiceManager->createInstance( - OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop"))), - UNO_QUERY ); - xDesktop->terminate(); - */ - /* - OUString aName; - OUString aEnvType; - Reference<XFrame> rFrame; - Reference<XModel> rModel; - Reference<XCloseable> rClose; - for (int i=0; i<args.getLength(); i++) - { - if (args[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("EnvType"))) - args[i].Value >>= aEnvType; - else if (args[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Frame"))) { - args[i].Value >>= rFrame; - rClose = Reference<XCloseable>(rFrame, UNO_QUERY); - } - else if (args[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Model"))) { - args[i].Value >>= rModel; - rClose = Reference<XCloseable>(rModel, UNO_QUERY); - } - } - if (rClose.is()) rClose->close(sal_True); - */ bCont = sal_False; } } @@ -197,13 +173,6 @@ throw ( RuntimeException ) // don't try again bCont = sal_True; } - /* - NamedValue nv; - nv.Name = OUString(RTL_CONSTASCII_USTRINGPARAM("Deactivate")); - nv.Value <<= bDeactivate; - Sequence<NamedValue> s(1); - s[0] = nv; - */ Any r; r <<= bCont; return r; diff --git a/desktop/source/so_comp/services.cxx b/desktop/source/so_comp/services.cxx index 1eedd4d47bda..177b5fb3ff12 100644 --- a/desktop/source/so_comp/services.cxx +++ b/desktop/source/so_comp/services.cxx @@ -42,13 +42,14 @@ #include <string.h> -using namespace rtl; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::registry; using namespace ::desktop; +using ::rtl::OUString; + static const char* pServices[] = { SOEvaluation::serviceName, diff --git a/desktop/source/splash/services_spl.cxx b/desktop/source/splash/services_spl.cxx index b63f89792a29..d79adf8725d5 100644 --- a/desktop/source/splash/services_spl.cxx +++ b/desktop/source/splash/services_spl.cxx @@ -37,13 +37,14 @@ #include "splash.hxx" -using namespace rtl; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::registry; using namespace ::desktop; +using ::rtl::OUString; + static const char* pServices[] = { SplashScreen::serviceName, diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx index d0f1230c644f..eaf9751a3aff 100644 --- a/desktop/source/splash/splash.cxx +++ b/desktop/source/splash/splash.cxx @@ -254,9 +254,7 @@ void SplashScreen::updateStatus() { if (!_bVisible || _bProgressEnd) return; if (!_bPaintProgress) _bPaintProgress = sal_True; - //_bPaintBitmap=sal_False; Paint(Rectangle()); - //_bPaintBitmap=sal_True; Flush(); } @@ -322,8 +320,6 @@ void SplashScreen::loadConfig() if ( sProgressFrameColor.getLength() ) { UINT8 nRed = 0; - UINT8 nGreen = 0; - UINT8 nBlue = 0; sal_Int32 idx = 0; sal_Int32 temp = sProgressFrameColor.getToken( 0, ',', idx ).toInt32(); if ( idx != -1 ) @@ -333,8 +329,8 @@ void SplashScreen::loadConfig() } if ( idx != -1 ) { - nGreen = static_cast< UINT8 >( temp ); - nBlue = static_cast< UINT8 >( sProgressFrameColor.getToken( 0, ',', idx ).toInt32() ); + UINT8 nGreen = static_cast< UINT8 >( temp ); + UINT8 nBlue = static_cast< UINT8 >( sProgressFrameColor.getToken( 0, ',', idx ).toInt32() ); _cProgressFrameColor = Color( nRed, nGreen, nBlue ); } } @@ -342,8 +338,6 @@ void SplashScreen::loadConfig() if ( sProgressBarColor.getLength() ) { UINT8 nRed = 0; - UINT8 nGreen = 0; - UINT8 nBlue = 0; sal_Int32 idx = 0; sal_Int32 temp = sProgressBarColor.getToken( 0, ',', idx ).toInt32(); if ( idx != -1 ) @@ -353,8 +347,8 @@ void SplashScreen::loadConfig() } if ( idx != -1 ) { - nGreen = static_cast< UINT8 >( temp ); - nBlue = static_cast< UINT8 >( sProgressBarColor.getToken( 0, ',', idx ).toInt32() ); + UINT8 nGreen = static_cast< UINT8 >( temp ); + UINT8 nBlue = static_cast< UINT8 >( sProgressBarColor.getToken( 0, ',', idx ).toInt32() ); _cProgressBarColor = Color( nRed, nGreen, nBlue ); } } @@ -411,8 +405,7 @@ void SplashScreen::SetScreenBitmap(BitmapEx &rBitmap) aStrBuf.append( "intro_" ); if ( _sAppName.getLength() > 0 ) { - aStrBuf.append( OString( _sAppName, _sAppName.getLength(), - RTL_TEXTENCODING_UTF8 ) ); + aStrBuf.append( OUStringToOString(_sAppName, RTL_TEXTENCODING_UTF8) ); aStrBuf.append( "_" ); } aResBuf.append( OString::valueOf( nWidth )); @@ -420,12 +413,12 @@ void SplashScreen::SetScreenBitmap(BitmapEx &rBitmap) aResBuf.append( OString::valueOf( nHeight )); aStrBuf.append( aResBuf.getStr() ); - if (Application::LoadBrandBitmap (aStrBuf.makeStringAndClear(), rBitmap)) + if (Application::LoadBrandBitmap (aStrBuf.makeStringAndClear().getStr(), rBitmap)) return; aStrBuf.append( "intro_" ); aStrBuf.append( aResBuf.getStr() ); - if (Application::LoadBrandBitmap (aResBuf.makeStringAndClear(), rBitmap)) + if (Application::LoadBrandBitmap (aResBuf.makeStringAndClear().getStr(), rBitmap)) return; Application::LoadBrandBitmap ("intro", rBitmap); |