diff options
137 files changed, 1059 insertions, 2924 deletions
diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx index 89e6287da..49dd197f9 100644 --- a/accessibility/source/extended/textwindowaccessibility.cxx +++ b/accessibility/source/extended/textwindowaccessibility.cxx @@ -1989,10 +1989,14 @@ void Document::handleParagraphNotifications() determineVisibleRange(); notifyVisibleRangeChanges(aOldVisibleBegin, aOldVisibleEnd, m_xParagraphs->end()); - Paragraphs::iterator aIt(m_xParagraphs->begin() + n); - ::rtl::Reference< ParagraphImpl > xParagraph(getParagraph(aIt)); - if (xParagraph.is()) - xParagraph->textChanged(); + + if (n < m_xParagraphs->size()) + { + Paragraphs::iterator aIt(m_xParagraphs->begin() + n); + ::rtl::Reference< ParagraphImpl > xParagraph(getParagraph(aIt)); + if (xParagraph.is()) + xParagraph->textChanged(); + } break; } default: diff --git a/accessibility/source/standard/vclxaccessiblelistboxlist.cxx b/accessibility/source/standard/vclxaccessiblelistboxlist.cxx deleted file mode 100644 index b88d19247..000000000 --- a/accessibility/source/standard/vclxaccessiblelistboxlist.cxx +++ /dev/null @@ -1,335 +0,0 @@ -/************************************************************************* - * - * 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 - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_accessibility.hxx" -#include <accessibility/standard/vclxaccessiblelistboxlist.hxx> -#include <accessibility/standard/vclxaccessiblelistitem.hxx> -#include <accessibility/helper/listboxhelper.hxx> - -#include <algorithm> - -#include <com/sun/star/accessibility/AccessibleEventId.hpp> -#include <com/sun/star/accessibility/AccessibleStateType.hpp> -#include <tools/debug.hxx> -#include <vcl/svapp.hxx> -#include <vcl/lstbox.hxx> -#include <vcl/unohelp.hxx> - -#include <toolkit/awt/vclxwindow.hxx> -#include <toolkit/helper/convert.hxx> - -#include <comphelper/sequence.hxx> -#include <cppuhelper/typeprovider.hxx> -#include <unotools/accessiblestatesethelper.hxx> - -using namespace ::com::sun::star; -using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::accessibility; - - -namespace -{ - void checkSelection_Impl( sal_Int32 _nIndex, const ListBox& _rListBox, sal_Bool bSelected ) - throw (::com::sun::star::lang::IndexOutOfBoundsException) - { - sal_Int32 nCount = bSelected ? (sal_Int32)_rListBox.GetSelectEntryCount() - : (sal_Int32)_rListBox.GetEntryCount(); - if ( _nIndex < 0 || _nIndex >= nCount ) - throw ::com::sun::star::lang::IndexOutOfBoundsException(); - } -} - - -VCLXAccessibleListBoxList::VCLXAccessibleListBoxList (VCLXWindow* pVCLWindow, - BoxType aBoxType,const Reference< XAccessible >& _xParent) - : VCLXAccessibleList (pVCLWindow, aBoxType, _xParent) -{ -} - - - - -VCLXAccessibleListBoxList::~VCLXAccessibleListBoxList (void) -{ -} - - - - -void VCLXAccessibleListBoxList::ProcessWindowEvent (const VclWindowEvent& rVclWindowEvent) -{ - switch ( rVclWindowEvent.GetId() ) - { - case VCLEVENT_LISTBOX_SCROLLED: - UpdateEntryRange_Impl(); - break; - - case VCLEVENT_LISTBOX_SELECT: - if ( !m_bDisableProcessEvent ) - UpdateSelection_Impl(); - break; - - default: - VCLXAccessibleList::ProcessWindowEvent (rVclWindowEvent); - } -} - -IMPLEMENT_FORWARD_XINTERFACE2(VCLXAccessibleListBoxList, VCLXAccessibleList, VCLXAccessibleListBoxList_BASE) -IMPLEMENT_FORWARD_XTYPEPROVIDER2(VCLXAccessibleListBoxList, VCLXAccessibleList, VCLXAccessibleListBoxList_BASE) - - - -//===== XServiceInfo ======================================================== - -::rtl::OUString VCLXAccessibleListBoxList::getImplementationName (void) - throw (RuntimeException) -{ - return ::rtl::OUString::createFromAscii("com.sun.star.comp.toolkit.AccessibleListBoxList"); -} - - - - -Sequence< ::rtl::OUString > VCLXAccessibleListBoxList::getSupportedServiceNames (void) - throw (RuntimeException) -{ - Sequence< ::rtl::OUString > aNames = VCLXAccessibleList::getSupportedServiceNames(); - sal_Int32 nLength = aNames.getLength(); - aNames.realloc( nLength + 1 ); - aNames[nLength] = ::rtl::OUString::createFromAscii( - "com.sun.star.accessibility.AccessibleListBoxList"); - return aNames; -} -// ----------------------------------------------------------------------------- - -void VCLXAccessibleListBoxList::UpdateSelection_Impl() -{ - uno::Any aOldValue, aNewValue; - - { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); - ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); - Reference< XAccessible > xNewAcc; - - ListBox* pListBox = static_cast< ListBox* >( GetWindow() ); - if ( pListBox ) - { - USHORT nPos = 0; - ListItems::iterator aEnd = m_aAccessibleChildren.end(); - for ( ListItems::iterator aIter = m_aAccessibleChildren.begin(); - aIter != aEnd; ++aIter,++nPos) - { - if ( aIter->is() ) - { - VCLXAccessibleListItem* pItem = static_cast< VCLXAccessibleListItem* >( aIter->get() ); - // Retrieve the item's index from the list entry. - BOOL bNowSelected = pListBox->IsEntryPosSelected (nPos); - - if ( bNowSelected && !pItem->IsSelected() ) - { - xNewAcc = *aIter; - aNewValue <<= xNewAcc; - m_nLastSelectedPos = nPos; - } - - pItem->SetSelected( bNowSelected ); - } - else - { // it could happen that a child was not created before - checkEntrySelected(pListBox,nPos,aNewValue,xNewAcc); - } - } - - USHORT nCount = pListBox->GetEntryCount(); - if ( nPos < nCount ) // here we have to check the if any other listbox entry is selected - { - for (; nPos < nCount && !checkEntrySelected(pListBox,nPos,aNewValue,xNewAcc) ;++nPos ) - ; - } - } - - if ( xNewAcc.is() && pListBox->HasFocus() ) - { - if ( m_nLastSelectedPos != LISTBOX_ENTRY_NOTFOUND ) - aOldValue <<= getAccessibleChild( (sal_Int32)m_nLastSelectedPos ); - aNewValue <<= xNewAcc; - } - } - - if ( aNewValue.hasValue() || aOldValue.hasValue() ) - NotifyAccessibleEvent( - AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, - aOldValue, - aNewValue ); - - NotifyAccessibleEvent( AccessibleEventId::SELECTION_CHANGED, Any(), Any() ); -} - -// ----------------------------------------------------------------------------- -// XAccessibleSelection -// ----------------------------------------------------------------------------- -void SAL_CALL VCLXAccessibleListBoxList::selectAccessibleChild( sal_Int32 nChildIndex ) throw (IndexOutOfBoundsException, RuntimeException) -{ - sal_Bool bNotify = sal_False; - - { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); - ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); - - ListBox* pListBox = static_cast< ListBox* >( GetWindow() ); - if ( pListBox ) - { - checkSelection_Impl( nChildIndex, *pListBox, sal_False ); - pListBox->SelectEntryPos( (USHORT)nChildIndex, TRUE ); - // call the select handler, don't handle events in this time - m_bDisableProcessEvent = true; - pListBox->Select(); - m_bDisableProcessEvent = false; - bNotify = sal_True; - } - } - - if ( bNotify ) - UpdateSelection_Impl(); -} -// ----------------------------------------------------------------------------- -sal_Bool SAL_CALL VCLXAccessibleListBoxList::isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (IndexOutOfBoundsException, RuntimeException) -{ - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); - ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); - - sal_Bool bRet = sal_False; - ListBox* pListBox = static_cast< ListBox* >( GetWindow() ); - if ( pListBox ) - { - checkSelection_Impl( nChildIndex, *pListBox, sal_False ); - bRet = pListBox->IsEntryPosSelected( (USHORT)nChildIndex ); - } - return bRet; -} -// ----------------------------------------------------------------------------- -void SAL_CALL VCLXAccessibleListBoxList::clearAccessibleSelection( ) throw (RuntimeException) -{ - sal_Bool bNotify = sal_False; - - { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); - ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); - - ListBox* pListBox = static_cast< ListBox* >( GetWindow() ); - if ( pListBox ) - { - pListBox->SetNoSelection(); - bNotify = sal_True; - } - } - - if ( bNotify ) - UpdateSelection_Impl(); -} -// ----------------------------------------------------------------------------- -void SAL_CALL VCLXAccessibleListBoxList::selectAllAccessibleChildren( ) throw (RuntimeException) -{ - sal_Bool bNotify = sal_False; - - { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); - ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); - - ListBox* pListBox = static_cast< ListBox* >( GetWindow() ); - if ( pListBox ) - { - USHORT nCount = pListBox->GetEntryCount(); - for ( USHORT i = 0; i < nCount; ++i ) - pListBox->SelectEntryPos( i, TRUE ); - // call the select handler, don't handle events in this time - m_bDisableProcessEvent = true; - pListBox->Select(); - m_bDisableProcessEvent = false; - bNotify = sal_True; - } - } - - if ( bNotify ) - UpdateSelection_Impl(); -} -// ----------------------------------------------------------------------------- -sal_Int32 SAL_CALL VCLXAccessibleListBoxList::getSelectedAccessibleChildCount( ) throw (RuntimeException) -{ - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); - ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); - - sal_Int32 nCount = 0; - ListBox* pListBox = static_cast< ListBox* >( GetWindow() ); - if ( pListBox ) - nCount = pListBox->GetSelectEntryCount(); - return nCount; -} -// ----------------------------------------------------------------------------- -Reference< XAccessible > SAL_CALL VCLXAccessibleListBoxList::getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (IndexOutOfBoundsException, RuntimeException) -{ - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); - ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); - - ListBox* pListBox = static_cast< ListBox* >( GetWindow() ); - if ( pListBox ) - { - checkSelection_Impl( nSelectedChildIndex, *pListBox, sal_True ); - return getAccessibleChild( (sal_Int32)pListBox->GetSelectEntryPos( (USHORT)nSelectedChildIndex ) ); - } - - return NULL; -} -// ----------------------------------------------------------------------------- -void SAL_CALL VCLXAccessibleListBoxList::deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (IndexOutOfBoundsException, RuntimeException) -{ - sal_Bool bNotify = sal_False; - - { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); - ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); - - ListBox* pListBox = static_cast< ListBox* >( GetWindow() ); - if ( pListBox ) - { - checkSelection_Impl( nSelectedChildIndex, *pListBox, sal_False ); - pListBox->SelectEntryPos( (USHORT)nSelectedChildIndex, FALSE ); - // call the select handler, don't handle events in this time - m_bDisableProcessEvent = true; - pListBox->Select(); - m_bDisableProcessEvent = false; - bNotify = sal_True; - } - } - - if ( bNotify ) - UpdateSelection_Impl(); -} -// ----------------------------------------------------------------------------- - diff --git a/automation/inc/automation/communi.hxx b/automation/inc/automation/communi.hxx index e726530b4..822613e45 100644 --- a/automation/inc/automation/communi.hxx +++ b/automation/inc/automation/communi.hxx @@ -76,10 +76,10 @@ public: CommunicationManagerClient( BOOL bUseMultiChannel = FALSE ); }; -class CommunicationLinkViaSocket : public SimpleCommunicationLinkViaSocket, public NAMESPACE_VOS(OThread) +class CommunicationLinkViaSocket : public SimpleCommunicationLinkViaSocket, public vos::OThread { public: - CommunicationLinkViaSocket( CommunicationManager *pMan, NAMESPACE_VOS(OStreamSocket) *pSocket ); + CommunicationLinkViaSocket( CommunicationManager *pMan, vos::OStreamSocket *pSocket ); virtual ~CommunicationLinkViaSocket(); virtual BOOL IsCommunicationError(); @@ -101,8 +101,8 @@ protected: virtual BOOL ShutdownCommunication(); ULONG nConnectionClosedEventId; ULONG nDataReceivedEventId; - NAMESPACE_VOS(OMutex) aMConnectionClosed; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist - NAMESPACE_VOS(OMutex) aMDataReceived; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist + vos::OMutex aMConnectionClosed; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist + vos::OMutex aMDataReceived; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist virtual void WaitForShutdown(); DECL_LINK( ShutdownLink, void* ); @@ -133,7 +133,7 @@ private: void AddConnection( CommunicationLink *pNewConnection ); }; -class CommunicationManagerServerAcceptThread: public NAMESPACE_VOS(OThread) +class CommunicationManagerServerAcceptThread: public vos::OThread { public: CommunicationManagerServerAcceptThread( CommunicationManagerServerViaSocket* pServer, ULONG nPort, USHORT nMaxCon = CM_UNLIMITED_CONNECTIONS ); @@ -145,11 +145,11 @@ protected: private: CommunicationManagerServerViaSocket* pMyServer; - NAMESPACE_VOS(OAcceptorSocket) *pAcceptorSocket; + vos::OAcceptorSocket *pAcceptorSocket; ULONG nPortToListen; USHORT nMaxConnections; ULONG nAddConnectionEventId; - NAMESPACE_VOS(OMutex) aMAddConnection; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist + vos::OMutex aMAddConnection; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist void CallInfoMsg( InfoString aMsg ){ pMyServer->CallInfoMsg( aMsg ); } CM_InfoType GetInfoType(){ return pMyServer->GetInfoType(); } @@ -174,7 +174,7 @@ private: ByteString aHostToTalk; ULONG nPortToTalk; protected: - virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, NAMESPACE_VOS(OConnectorSocket) *pCS ){ return new CommunicationLinkViaSocket( pCM, pCS ); } + virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, vos::OConnectorSocket *pCS ){ return new CommunicationLinkViaSocket( pCM, pCS ); } }; #endif diff --git a/automation/inc/automation/simplecm.hxx b/automation/inc/automation/simplecm.hxx index ee0f42680..44bd6e688 100644 --- a/automation/inc/automation/simplecm.hxx +++ b/automation/inc/automation/simplecm.hxx @@ -337,14 +337,14 @@ private: ByteString aMyName; TCPIO* pTCPIO; - NAMESPACE_VOS(OStreamSocket) *pStreamSocket; + vos::OStreamSocket *pStreamSocket; protected: - SimpleCommunicationLinkViaSocket( CommunicationManager *pMan, NAMESPACE_VOS(OStreamSocket) *pSocket ); + SimpleCommunicationLinkViaSocket( CommunicationManager *pMan, vos::OStreamSocket *pSocket ); virtual ~SimpleCommunicationLinkViaSocket(); - NAMESPACE_VOS(OStreamSocket)* GetStreamSocket() { return pStreamSocket; } - void SetStreamSocket( NAMESPACE_VOS(OStreamSocket)* pSocket ); + vos::OStreamSocket* GetStreamSocket() { return pStreamSocket; } + void SetStreamSocket( vos::OStreamSocket* pSocket ); SvStream *pReceiveStream; BOOL DoReceiveDataStream(); /// Recieve DataPacket from Socket @@ -358,7 +358,7 @@ protected: class SimpleCommunicationLinkViaSocketWithReceiveCallbacks : public SimpleCommunicationLinkViaSocket { public: - SimpleCommunicationLinkViaSocketWithReceiveCallbacks( CommunicationManager *pMan, NAMESPACE_VOS(OStreamSocket) *pSocket ); + SimpleCommunicationLinkViaSocketWithReceiveCallbacks( CommunicationManager *pMan, vos::OStreamSocket *pSocket ); ~SimpleCommunicationLinkViaSocketWithReceiveCallbacks(); virtual BOOL ReceiveDataStream(); protected: @@ -371,7 +371,7 @@ class CommonSocketFunctions public: BOOL DoStartCommunication( CommunicationManager *pCM, ICommunicationManagerClient *pCMC, ByteString aHost, ULONG nPort ); protected: - virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, NAMESPACE_VOS(OConnectorSocket) *pCS )=0; + virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, vos::OConnectorSocket *pCS )=0; }; class SingleCommunicationManagerClientViaSocket : public SingleCommunicationManager, public ICommunicationManagerClient, CommonSocketFunctions @@ -387,7 +387,7 @@ private: ByteString aHostToTalk; ULONG nPortToTalk; protected: - virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, NAMESPACE_VOS(OConnectorSocket) *pCS ){ return new SimpleCommunicationLinkViaSocketWithReceiveCallbacks( pCM, pCS ); } + virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, vos::OConnectorSocket *pCS ){ return new SimpleCommunicationLinkViaSocketWithReceiveCallbacks( pCM, pCS ); } }; #endif diff --git a/automation/source/communi/communi.cxx b/automation/source/communi/communi.cxx index 42402d7e9..0fe86ae26 100644 --- a/automation/source/communi/communi.cxx +++ b/automation/source/communi/communi.cxx @@ -66,9 +66,9 @@ _SV_SEEK_PTR( nm, AE ) SV_IMPL_PTRARR_SORT( CommunicationLinkList, CommunicationLink* ); -NAMESPACE_VOS(OMutex) *pMPostUserEvent=NULL; // Notwendig, da nicht threadfest +vos::OMutex *pMPostUserEvent=NULL; // Notwendig, da nicht threadfest -CommunicationLinkViaSocket::CommunicationLinkViaSocket( CommunicationManager *pMan, NAMESPACE_VOS(OStreamSocket) *pSocket ) +CommunicationLinkViaSocket::CommunicationLinkViaSocket( CommunicationManager *pMan, vos::OStreamSocket *pSocket ) : SimpleCommunicationLinkViaSocket( pMan, pSocket ) , nConnectionClosedEventId( 0 ) , nDataReceivedEventId( 0 ) @@ -77,7 +77,7 @@ CommunicationLinkViaSocket::CommunicationLinkViaSocket( CommunicationManager *pM { SetPutDataReceivedHdl(LINK( this, CommunicationLinkViaSocket, PutDataReceivedHdl )); if ( !pMPostUserEvent ) - pMPostUserEvent = new NAMESPACE_VOS(OMutex); + pMPostUserEvent = new vos::OMutex; // this is necassary to prevent the running thread from sending the close event // before the open event has been sent. StartCallback(); @@ -92,7 +92,7 @@ CommunicationLinkViaSocket::~CommunicationLinkViaSocket() while ( nConnectionClosedEventId || nDataReceivedEventId ) GetpApp()->Yield(); { - NAMESPACE_VOS(OGuard) aGuard( aMConnectionClosed ); + vos::OGuard aGuard( aMConnectionClosed ); if ( nConnectionClosedEventId ) { GetpApp()->RemoveUserEvent( nConnectionClosedEventId ); @@ -103,7 +103,7 @@ CommunicationLinkViaSocket::~CommunicationLinkViaSocket() } } { - NAMESPACE_VOS(OGuard) aGuard( aMDataReceived ); + vos::OGuard aGuard( aMDataReceived ); if ( nDataReceivedEventId ) { GetpApp()->RemoveUserEvent( nDataReceivedEventId ); @@ -132,7 +132,7 @@ BOOL CommunicationLinkViaSocket::ShutdownCommunication() join(); - NAMESPACE_VOS(OStreamSocket) *pTempSocket = GetStreamSocket(); + vos::OStreamSocket *pTempSocket = GetStreamSocket(); SetStreamSocket( NULL ); delete pTempSocket; @@ -209,8 +209,8 @@ void CommunicationLinkViaSocket::run() SetNewPacketAsCurrent(); StartCallback(); { - NAMESPACE_VOS(OGuard) aGuard( aMDataReceived ); - NAMESPACE_VOS(OGuard) aGuard2( *pMPostUserEvent ); + vos::OGuard aGuard( aMDataReceived ); + vos::OGuard aGuard2( *pMPostUserEvent ); mlPutDataReceived.Call(this); } } @@ -220,8 +220,8 @@ void CommunicationLinkViaSocket::run() StartCallback(); { - NAMESPACE_VOS(OGuard) aGuard( aMConnectionClosed ); - NAMESPACE_VOS(OGuard) aGuard2( *pMPostUserEvent ); + vos::OGuard aGuard( aMConnectionClosed ); + vos::OGuard aGuard2( *pMPostUserEvent ); nConnectionClosedEventId = GetpApp()->PostUserEvent( LINK( this, CommunicationLinkViaSocket, ConnectionClosed ) ); } } @@ -238,7 +238,7 @@ BOOL CommunicationLinkViaSocket::DoTransferDataStream( SvStream *pDataStream, CM long CommunicationLinkViaSocket::ConnectionClosed( void* EMPTYARG ) { { - NAMESPACE_VOS(OGuard) aGuard( aMConnectionClosed ); + vos::OGuard aGuard( aMConnectionClosed ); nConnectionClosedEventId = 0; // Achtung!! alles andere muß oben gemacht werden. } ShutdownCommunication(); @@ -249,7 +249,7 @@ long CommunicationLinkViaSocket::ConnectionClosed( void* EMPTYARG ) long CommunicationLinkViaSocket::DataReceived( void* EMPTYARG ) { { - NAMESPACE_VOS(OGuard) aGuard( aMDataReceived ); + vos::OGuard aGuard( aMDataReceived ); nDataReceivedEventId = 0; // Achtung!! alles andere muß oben gemacht werden. } return CommunicationLink::DataReceived( ); @@ -453,7 +453,7 @@ CommunicationManagerServerAcceptThread::CommunicationManagerServerAcceptThread( , xmNewConnection( NULL ) { if ( !pMPostUserEvent ) - pMPostUserEvent = new NAMESPACE_VOS(OMutex); + pMPostUserEvent = new vos::OMutex; create(); } @@ -480,7 +480,7 @@ CommunicationManagerServerAcceptThread::~CommunicationManagerServerAcceptThread( DEBUGPRINTF ("Destructor CommunicationManagerServerAcceptThread Übersprungen!!!! (wegen Solaris BUG)\n"); #endif { - NAMESPACE_VOS(OGuard) aGuard( aMAddConnection ); + vos::OGuard aGuard( aMAddConnection ); if ( nAddConnectionEventId ) { GetpApp()->RemoveUserEvent( nAddConnectionEventId ); @@ -500,8 +500,8 @@ void CommunicationManagerServerAcceptThread::run() if ( !nPortToListen ) return; - pAcceptorSocket = new NAMESPACE_VOS(OAcceptorSocket)(); - NAMESPACE_VOS(OInetSocketAddr) Addr; + pAcceptorSocket = new vos::OAcceptorSocket(); + vos::OInetSocketAddr Addr; Addr.setPort( nPortToListen ); pAcceptorSocket->setReuseAddr( 1 ); if ( !pAcceptorSocket->bind( Addr ) ) @@ -514,14 +514,14 @@ void CommunicationManagerServerAcceptThread::run() } - NAMESPACE_VOS(OStreamSocket) *pStreamSocket = NULL; + vos::OStreamSocket *pStreamSocket = NULL; while ( schedule() ) { - pStreamSocket = new NAMESPACE_VOS(OStreamSocket); + pStreamSocket = new vos::OStreamSocket; switch ( pAcceptorSocket->acceptConnection( *pStreamSocket ) ) { - case NAMESPACE_VOS(ISocketTypes::TResult_Ok): + case vos::ISocketTypes::TResult_Ok: { pStreamSocket->setTcpNoDelay( 1 ); @@ -531,23 +531,23 @@ void CommunicationManagerServerAcceptThread::run() xmNewConnection = new CommunicationLinkViaSocket( pMyServer, pStreamSocket ); xmNewConnection->StartCallback(); { - NAMESPACE_VOS(OGuard) aGuard( aMAddConnection ); - NAMESPACE_VOS(OGuard) aGuard2( *pMPostUserEvent ); + vos::OGuard aGuard( aMAddConnection ); + vos::OGuard aGuard2( *pMPostUserEvent ); nAddConnectionEventId = GetpApp()->PostUserEvent( LINK( this, CommunicationManagerServerAcceptThread, AddConnection ) ); } } break; - case NAMESPACE_VOS(ISocketTypes::TResult_TimedOut): + case vos::ISocketTypes::TResult_TimedOut: delete pStreamSocket; pStreamSocket = NULL; break; - case NAMESPACE_VOS(ISocketTypes::TResult_Error): + case vos::ISocketTypes::TResult_Error: delete pStreamSocket; pStreamSocket = NULL; break; - case NAMESPACE_VOS(ISocketTypes::TResult_Interrupted): - case NAMESPACE_VOS(ISocketTypes::TResult_InProgress): + case vos::ISocketTypes::TResult_Interrupted: + case vos::ISocketTypes::TResult_InProgress: break; // -Wall not handled... } } @@ -557,7 +557,7 @@ void CommunicationManagerServerAcceptThread::run() IMPL_LINK( CommunicationManagerServerAcceptThread, AddConnection, void*, EMPTYARG ) { { - NAMESPACE_VOS(OGuard) aGuard( aMAddConnection ); + vos::OGuard aGuard( aMAddConnection ); nAddConnectionEventId = 0; } pMyServer->AddConnection( xmNewConnection ); diff --git a/automation/source/server/statemnt.cxx b/automation/source/server/statemnt.cxx index 40bdedbac..a5155a251 100644 --- a/automation/source/server/statemnt.cxx +++ b/automation/source/server/statemnt.cxx @@ -3083,13 +3083,6 @@ BOOL StatementCommand::Execute() nDirFlags = nFlags = Sb_ATTR_HIDDEN | Sb_ATTR_SYSTEM | Sb_ATTR_DIRECTORY; // Nur diese Bitmaske ist unter Windows erlaubt - #ifdef WIN - if( nFlags & ~0x1E ) - { - nDirFlags = 0; - StarBASIC::Error( SbERR_BAD_ARGUMENT ); - } - #endif // Sb_ATTR_VOLUME wird getrennt gehandelt if( nDirFlags & Sb_ATTR_VOLUME ) aPath = aEntry.GetVolume(); @@ -3121,31 +3114,7 @@ BOOL StatementCommand::Execute() } DirEntry aNextEntry=(*(pDir))[nDirPos++]; aPath = aNextEntry.GetName(); //Full(); - #ifdef WIN - aNextEntry.ToAbs(); - String sFull(aNextEntry.GetFull()); - unsigned nFlags; - - if (_dos_getfileattr( sFull.GetStr(), &nFlags )) - nErrorcode = FSYS_ERR_NOTEXISTS; - else - { - INT16 nCurFlags = nDirFlags; - if( (nCurFlags == Sb_ATTR_NORMAL) - && !(nFlags & ( _A_HIDDEN | _A_SYSTEM | _A_VOLID | _A_SUBDIR ) ) ) - break; - else if( (nCurFlags & Sb_ATTR_HIDDEN) && (nFlags & _A_HIDDEN) ) - break; - else if( (nCurFlags & Sb_ATTR_SYSTEM) && (nFlags & _A_SYSTEM) ) - break; - else if( (nCurFlags & Sb_ATTR_VOLUME) && (nFlags & _A_VOLID) ) - break; - else if( (nCurFlags & Sb_ATTR_DIRECTORY) && (nFlags & _A_SUBDIR) ) - break; - } - #else break; - #endif } } if ( !nErrorcode ) diff --git a/automation/source/simplecm/simplecm.cxx b/automation/source/simplecm/simplecm.cxx index 002b0a70c..5a105e723 100644 --- a/automation/source/simplecm/simplecm.cxx +++ b/automation/source/simplecm/simplecm.cxx @@ -136,7 +136,7 @@ void CommunicationLink::SetApplication( const ByteString& aApp ) } -SimpleCommunicationLinkViaSocket::SimpleCommunicationLinkViaSocket( CommunicationManager *pMan, NAMESPACE_VOS(OStreamSocket) *pSocket ) +SimpleCommunicationLinkViaSocket::SimpleCommunicationLinkViaSocket( CommunicationManager *pMan, vos::OStreamSocket *pSocket ) : CommunicationLink( pMan ) , aCommunicationPartner() , aMyName() @@ -158,7 +158,7 @@ SimpleCommunicationLinkViaSocket::~SimpleCommunicationLinkViaSocket() pStreamSocket = NULL; } -void SimpleCommunicationLinkViaSocket::SetStreamSocket( NAMESPACE_VOS(OStreamSocket)* pSocket ) +void SimpleCommunicationLinkViaSocket::SetStreamSocket( vos::OStreamSocket* pSocket ) { if ( pTCPIO ) pTCPIO->SetStreamSocket( pSocket ); @@ -202,9 +202,9 @@ ByteString SimpleCommunicationLinkViaSocket::GetCommunicationPartner( CM_NameTyp case CM_DOTTED: { rtl::OUString aDotted; - NAMESPACE_VOS(OSocketAddr) *pPeerAdr = new NAMESPACE_VOS(OSocketAddr); + vos::OSocketAddr *pPeerAdr = new vos::OSocketAddr; pStreamSocket->getPeerAddr( *pPeerAdr ); - ((NAMESPACE_VOS(OInetSocketAddr*))pPeerAdr)->getDottedAddr( aDotted ); + ((vos::OInetSocketAddr*)pPeerAdr)->getDottedAddr( aDotted ); delete pPeerAdr; return ByteString( UniString(aDotted), RTL_TEXTENCODING_UTF8 ); } @@ -234,9 +234,9 @@ ByteString SimpleCommunicationLinkViaSocket::GetMyName( CM_NameType eType ) case CM_DOTTED: { rtl::OUString aDotted; - NAMESPACE_VOS(OSocketAddr) *pPeerAdr = new NAMESPACE_VOS(OSocketAddr); + vos::OSocketAddr *pPeerAdr = new vos::OSocketAddr; pStreamSocket->getLocalAddr( *pPeerAdr ); - ((NAMESPACE_VOS(OInetSocketAddr*))pPeerAdr)->getDottedAddr( aDotted ); + ((vos::OInetSocketAddr*)pPeerAdr)->getDottedAddr( aDotted ); delete pPeerAdr; return ByteString( UniString(aDotted), RTL_TEXTENCODING_UTF8 ); } @@ -352,7 +352,7 @@ BOOL SimpleCommunicationLinkViaSocket::SendHandshake( HandshakeType aHandshakeTy return !bWasError; } -SimpleCommunicationLinkViaSocketWithReceiveCallbacks::SimpleCommunicationLinkViaSocketWithReceiveCallbacks( CommunicationManager *pMan, NAMESPACE_VOS(OStreamSocket) *pSocket ) +SimpleCommunicationLinkViaSocketWithReceiveCallbacks::SimpleCommunicationLinkViaSocketWithReceiveCallbacks( CommunicationManager *pMan, vos::OStreamSocket *pSocket ) : SimpleCommunicationLinkViaSocket( pMan, pSocket ) { } @@ -396,7 +396,7 @@ BOOL SimpleCommunicationLinkViaSocketWithReceiveCallbacks::ShutdownCommunication if ( GetStreamSocket() ) GetStreamSocket()->close(); - NAMESPACE_VOS(OStreamSocket) *pTempSocket = GetStreamSocket(); + vos::OStreamSocket *pTempSocket = GetStreamSocket(); SetStreamSocket( NULL ); delete pTempSocket; @@ -437,7 +437,7 @@ BOOL CommunicationManager::StartCommunication( ByteString aHost, ULONG nPort ) ByteString CommunicationManager::GetMyName( CM_NameType ) { rtl::OUString aHostname; - NAMESPACE_VOS(OSocketAddr)::getLocalHostname( aHostname ); + vos::OSocketAddr::getLocalHostname( aHostname ); return ByteString( UniString(aHostname), RTL_TEXTENCODING_UTF8 ); } @@ -672,8 +672,8 @@ SingleCommunicationManagerClientViaSocket::SingleCommunicationManagerClientViaSo BOOL CommonSocketFunctions::DoStartCommunication( CommunicationManager *pCM, ICommunicationManagerClient *pCMC, ByteString aHost, ULONG nPort ) { - NAMESPACE_VOS(OInetSocketAddr) Addr; - NAMESPACE_VOS(OConnectorSocket) *pConnSocket; + vos::OInetSocketAddr Addr; + vos::OConnectorSocket *pConnSocket; Addr.setAddr( rtl::OUString( UniString( aHost, RTL_TEXTENCODING_UTF8 ) ) ); Addr.setPort( nPort ); @@ -683,9 +683,9 @@ BOOL CommonSocketFunctions::DoStartCommunication( CommunicationManager *pCM, ICo aTV.Nanosec = 0; do { - pConnSocket = new NAMESPACE_VOS(OConnectorSocket)(); + pConnSocket = new vos::OConnectorSocket(); pConnSocket->setTcpNoDelay( 1 ); - if ( pConnSocket->connect( Addr, &aTV ) == NAMESPACE_VOS(ISocketTypes::TResult_Ok) ) + if ( pConnSocket->connect( Addr, &aTV ) == vos::ISocketTypes::TResult_Ok ) { pConnSocket->setTcpNoDelay( 1 ); diff --git a/automation/source/simplecm/tcpio.cxx b/automation/source/simplecm/tcpio.cxx index c37c807cb..7a8d8f674 100644 --- a/automation/source/simplecm/tcpio.cxx +++ b/automation/source/simplecm/tcpio.cxx @@ -63,7 +63,7 @@ comm_USHORT TCPIO::ReceiveBytes( void* pBuffer, comm_UINT32 nLen ) // helper -void TCPIO::SetStreamSocket( NAMESPACE_VOS(OStreamSocket) *pSocket ) +void TCPIO::SetStreamSocket( vos::OStreamSocket *pSocket ) { vos::OGuard aRGuard( aMSocketReadAccess ); vos::OGuard aWGuard( aMSocketWriteAccess ); diff --git a/automation/source/simplecm/tcpio.hxx b/automation/source/simplecm/tcpio.hxx index 9884f3454..d68805455 100644 --- a/automation/source/simplecm/tcpio.hxx +++ b/automation/source/simplecm/tcpio.hxx @@ -36,14 +36,14 @@ class TCPIO : public ITransmiter, public IReceiver { private: - NAMESPACE_VOS(OStreamSocket) *pStreamSocket; + vos::OStreamSocket *pStreamSocket; vos::OMutex aMSocketReadAccess; vos::OMutex aMSocketWriteAccess; public: /// - TCPIO( NAMESPACE_VOS(OStreamSocket) *pSocket ):pStreamSocket( pSocket ){} + TCPIO( vos::OStreamSocket *pSocket ):pStreamSocket( pSocket ){} virtual ~TCPIO(){} @@ -54,7 +54,7 @@ public: virtual comm_USHORT ReceiveBytes( void* pBuffer, comm_UINT32 nLen ); // helper - void SetStreamSocket( NAMESPACE_VOS(OStreamSocket) *pSocket ); + void SetStreamSocket( vos::OStreamSocket *pSocket ); }; diff --git a/automation/source/testtool/httprequest.cxx b/automation/source/testtool/httprequest.cxx index 9061c08f9..b171d81e9 100644 --- a/automation/source/testtool/httprequest.cxx +++ b/automation/source/testtool/httprequest.cxx @@ -78,7 +78,7 @@ BOOL HttpRequest::Execute() Init(); // Open channel to standard redir host - NAMESPACE_VOS(OInetSocketAddr) aConnectAddr; + vos::OInetSocketAddr aConnectAddr; if ( aProxyHost.Len() ) { @@ -95,8 +95,8 @@ BOOL HttpRequest::Execute() aTV.Seconds = 10; // Warte 10 Sekunden aTV.Nanosec = 0; - pOutSocket = new NAMESPACE_VOS(OConnectorSocket)(); - if ( pOutSocket->connect( aConnectAddr, &aTV ) == NAMESPACE_VOS(ISocketTypes::TResult_Ok) ) + pOutSocket = new vos::OConnectorSocket(); + if ( pOutSocket->connect( aConnectAddr, &aTV ) == vos::ISocketTypes::TResult_Ok ) { // pOutSocket->setTcpNoDelay( 1 ); } diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index e307720fd..f98f31a4d 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -91,9 +91,7 @@ using namespace ::com::sun::star::io; using namespace ::com::sun::star::resource; using namespace ::com::sun::star::ui::dialogs; -#if defined(MAC) -#define FILTERMASK_ALL "****" -#elif defined(OW) || defined(MTF) +#if defined(UNX) #define FILTERMASK_ALL "*" #elif defined(PM2) #define FILTERMASK_ALL "" diff --git a/basctl/source/basicide/basides2.cxx b/basctl/source/basicide/basides2.cxx index 393dd4e02..78f40794c 100644 --- a/basctl/source/basicide/basides2.cxx +++ b/basctl/source/basicide/basides2.cxx @@ -51,7 +51,6 @@ #include <tools/diagnose_ex.h> #include <sfx2/sfxdefs.hxx> #include <sfx2/signaturestate.hxx> -#include <com/sun/star/script/XVBAModuleInfo.hpp> #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/container/XNamed.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx index f112d5a06..9aac98d44 100644 --- a/basctl/source/basicide/bastype2.cxx +++ b/basctl/source/basicide/bastype2.cxx @@ -52,9 +52,8 @@ #include <comphelper/componentcontext.hxx> #include <map> #include <com/sun/star/script/ModuleType.hpp> -#include <com/sun/star/script/XVBAModuleInfo.hpp> +#include <com/sun/star/script/vba/XVBAModuleInfo.hpp> #include <com/sun/star/container/XNameContainer.hpp> -#include <com/sun/star/script/XVBAModuleInfo.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/container/XNamed.hpp> @@ -65,7 +64,7 @@ void ModuleInfoHelper::getObjectName( const uno::Reference< container::XNameCont { try { - uno::Reference< script::XVBAModuleInfo > xVBAModuleInfo( rLib, uno::UNO_QUERY ); + uno::Reference< script::vba::XVBAModuleInfo > xVBAModuleInfo( rLib, uno::UNO_QUERY ); if ( xVBAModuleInfo.is() && xVBAModuleInfo->hasModuleInfo( rModName ) ) { script::ModuleInfo aModuleInfo = xVBAModuleInfo->getModuleInfo( rModName ); @@ -86,8 +85,8 @@ void ModuleInfoHelper::getObjectName( const uno::Reference< container::XNameCont sal_Int32 ModuleInfoHelper::getModuleType( const uno::Reference< container::XNameContainer >& rLib, const String& rModName ) { - sal_Int32 nType = com::sun::star::script::ModuleType::NORMAL; - uno::Reference< script::XVBAModuleInfo > xVBAModuleInfo( rLib, uno::UNO_QUERY ); + sal_Int32 nType = script::ModuleType::NORMAL; + uno::Reference< script::vba::XVBAModuleInfo > xVBAModuleInfo( rLib, uno::UNO_QUERY ); if ( xVBAModuleInfo.is() && xVBAModuleInfo->hasModuleInfo( rModName ) ) { script::ModuleInfo aModuleInfo = xVBAModuleInfo->getModuleInfo( rModName ); diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx index 5fc34d9f7..cfbd761c1 100644 --- a/basctl/source/basicide/scriptdocument.cxx +++ b/basctl/source/basicide/scriptdocument.cxx @@ -53,8 +53,8 @@ #include <com/sun/star/frame/XModel2.hpp> #include <com/sun/star/awt/XWindow2.hpp> #include <com/sun/star/document/XEmbeddedScripts.hpp> -#include <com/sun/star/script/XVBAModuleInfo.hpp> -#include <com/sun/star/script/XVBACompat.hpp> +#include <com/sun/star/script/vba/XVBACompatibility.hpp> +#include <com/sun/star/script/vba/XVBAModuleInfo.hpp> /** === end UNO includes === **/ #include <sfx2/objsh.hxx> @@ -142,8 +142,8 @@ namespace basctl using ::com::sun::star::document::XEventBroadcaster; using ::com::sun::star::document::XEmbeddedScripts; using ::com::sun::star::script::ModuleInfo; - using ::com::sun::star::script::XVBAModuleInfo; - using ::com::sun::star::script::XVBACompat; + using ::com::sun::star::script::vba::XVBACompatibility; + using ::com::sun::star::script::vba::XVBAModuleInfo; /** === end UNO using === **/ namespace MacroExecMode = ::com::sun::star::document::MacroExecMode; namespace FrameSearchFlag = ::com::sun::star::frame::FrameSearchFlag; @@ -456,9 +456,9 @@ namespace basctl #ifdef FUTURE_VBA_CWS if ( !isApplication() ) { - Reference< XVBACompat > xVBACompat( getLibraryContainer( E_SCRIPTS ), UNO_QUERY ); + Reference< XVBACompatibility > xVBACompat( getLibraryContainer( E_SCRIPTS ), UNO_QUERY ); if ( xVBACompat.is() ) - bResult = xVBACompat->getVBACompatModeOn(); + bResult = xVBACompat->getVBACompatibilityMode(); } #endif return bResult; diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx index 50e22f9a8..f96adaf6d 100644 --- a/cui/source/customize/acccfg.cxx +++ b/cui/source/customize/acccfg.cxx @@ -1366,133 +1366,6 @@ IMPL_LINK( SfxAcceleratorConfigPage, SaveHdl, sfx2::FileDialogHelper*, EMPTYARG return 0; } -::rtl::OUString RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL ) -{ - ::rtl::OUString aLabel; - if ( aCmdURL.getLength() ) - { - try - { - uno::Reference< container::XNameAccess > xNameAccess( ::comphelper::getProcessServiceFactory()->createInstance( rtl::OUString::createFromAscii("com.sun.star.frame.UICommandDescription") ), uno::UNO_QUERY ); - if ( xNameAccess.is() ) - { - uno::Reference< container::XNameAccess > xUICommandLabels; - const ::rtl::OUString aModule( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.TextDocument" ) ); - uno::Any a = xNameAccess->getByName( aModule ); - uno::Reference< container::XNameAccess > xUICommands; - a >>= xUICommandLabels; - rtl::OUString aStr; - uno::Sequence< beans::PropertyValue > aPropSeq; - a = xUICommandLabels->getByName( aCmdURL ); - if ( a >>= aPropSeq ) - { - for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ ) - { - if ( aPropSeq[i].Name.equalsAscii( "Name" )) - { - aPropSeq[i].Value >>= aStr; - break; - } - } - } - aLabel = aStr; - } - } - catch ( uno::Exception& ) - { - } - } - - return aLabel; -} - - -//----------------------------------------------- -String SfxAcceleratorConfigPage::GetFunctionName(KeyFuncType eType) const -{ - ::rtl::OUStringBuffer sName(256); - sName.appendAscii("\""); - switch(eType) - { - case KEYFUNC_NEW : - sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:NewDoc") ) ); - break; - - case KEYFUNC_OPEN : - sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Open") ) ); - break; - - case KEYFUNC_SAVE : - sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Save") ) ); - break; - - case KEYFUNC_SAVEAS : - sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:SaveAs") ) ); - break; - - case KEYFUNC_PRINT : - sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Print") ) ); - break; - - case KEYFUNC_CLOSE : - sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Close") ) ); - break; - - case KEYFUNC_QUIT : - sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Quit") ) ); - break; - - case KEYFUNC_CUT : - sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Cut") ) ); - break; - - case KEYFUNC_COPY : - sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Copy") ) ); - break; - - case KEYFUNC_PASTE : - sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Paste") ) ); - break; - - case KEYFUNC_UNDO : - sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Undo") ) ); - break; - - case KEYFUNC_REDO : - sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Redo") ) ); - break; - - case KEYFUNC_DELETE : - sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Delete") ) ); - break; - - case KEYFUNC_REPEAT : - sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Repeat") ) ); - break; - - case KEYFUNC_FIND : - sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Search") ) ); - break; - - case KEYFUNC_FINDBACKWARD : - sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:SearchBackwards") ) ); - break; - - case KEYFUNC_PROPERTIES : - sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Options") ) ); - break; - - case KEYFUNC_FRONT : - sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:ToFront") ) ); - break; - - default: - break; - } - sName.appendAscii("\""); - return String(sName.makeStringAndClear()); -} - //----------------------------------------------- void SfxAcceleratorConfigPage::StartFileDialog( WinBits nBits, const String& rTitle ) { @@ -1575,37 +1448,6 @@ void SfxAcceleratorConfigPage::Reset( const SfxItemSet& rSet ) } //----------------------------------------------- -void SfxAcceleratorConfigPage::SelectMacro(const SfxMacroInfoItem *pItem) -{ - m_pMacroInfoItem = pItem; - pGroupLBox->SelectMacro( pItem ); -} - -//----------------------------------------------- -void SfxAcceleratorConfigPage::CopySource2Target(const css::uno::Reference< css::ui::XAcceleratorConfiguration >& xSourceAccMgr, - const css::uno::Reference< css::ui::XAcceleratorConfiguration >& xTargetAccMgr) -{ - const css::uno::Sequence< css::awt::KeyEvent > lKeys = xSourceAccMgr->getAllKeyEvents(); - sal_Int32 c = lKeys.getLength(); - sal_Int32 i = 0; - for (i=0; i<c; ++i) - { - const css::awt::KeyEvent& rKey = lKeys[i]; - ::rtl::OUString sCommand = xSourceAccMgr->getCommandByKeyEvent(rKey); - xTargetAccMgr->setKeyEvent(rKey, sCommand); - } -} - -//----------------------------------------------- -KeyCode SfxAcceleratorConfigPage::MapPosToKeyCode(USHORT nPos) const -{ - TAccInfo* pEntry = (TAccInfo*)aEntriesBox.GetEntry(0, nPos)->GetUserData(); - KeyCode aCode(KEYCODE_ARRAY[pEntry->m_nKeyPos] & 0xFFF , - KEYCODE_ARRAY[pEntry->m_nKeyPos] & (KEY_SHIFT | KEY_MOD2)); - return aCode; -} - -//----------------------------------------------- USHORT SfxAcceleratorConfigPage::MapKeyCodeToPos(const KeyCode& aKey) const { USHORT nCode1 = aKey.GetCode()+aKey.GetModifier(); diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 211deeffb..db5f94e89 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -144,6 +144,8 @@ namespace container = com::sun::star::container; namespace beans = com::sun::star::beans; namespace graphic = com::sun::star::graphic; +#if OSL_DEBUG_LEVEL > 1 + void printPropertySet( const OUString& prefix, const uno::Reference< beans::XPropertySet >& xPropSet ) @@ -208,6 +210,8 @@ void printEntries(SvxEntries* entries) } } +#endif + OUString stripHotKey( const OUString& str ) { @@ -918,11 +922,6 @@ void SvxConfigDialog::PageCreated( USHORT nId, SfxTabPage& rPage ) } } -void SvxConfigDialog::ActivateTabPage( USHORT nSlotId ) -{ - (void)nSlotId; -} - /****************************************************************************** * * The SaveInData class is used to hold data for entries in the Save In @@ -3055,75 +3054,6 @@ SvxConfigEntry* SvxMainMenuOrganizerDialog::GetSelectedEntry() return (SvxConfigEntry*)aMenuListBox.FirstSelected()->GetUserData(); } -SvxConfigEntry::SvxConfigEntry( - const uno::Sequence< beans::PropertyValue >& rProperties, - const uno::Reference< container::XNameAccess >& rCommandToLabelMap ) - : - nId( 1 ), - bPopUp( FALSE ), - bStrEdited( FALSE ), - bIsUserDefined( FALSE ), - bIsMain( FALSE ), - bIsParentData( FALSE ), - bIsVisible( TRUE ), - nStyle( 0 ), - pEntries( 0 ) -{ - sal_uInt16 nType( css::ui::ItemType::DEFAULT ); - OUString aHelpURL_; - - for ( sal_Int32 i = 0; i < rProperties.getLength(); i++ ) - { - if ( rProperties[i].Name.equalsAscii( ITEM_DESCRIPTOR_COMMANDURL )) - { - rProperties[i].Value >>= aCommand; - } - else if ( rProperties[i].Name.equalsAscii( ITEM_DESCRIPTOR_HELPURL )) - { - rProperties[i].Value >>= aHelpURL_; - } - else if ( rProperties[i].Name.equalsAscii( ITEM_DESCRIPTOR_LABEL )) - { - rProperties[i].Value >>= aLabel; - } - else if ( rProperties[i].Name.equalsAscii( ITEM_DESCRIPTOR_TYPE )) - { - rProperties[i].Value >>= nType; - } - } - - if ( nType == css::ui::ItemType::DEFAULT ) - { - uno::Any a; - try - { - a = rCommandToLabelMap->getByName( aCommand ); - bIsUserDefined = FALSE; - } - catch ( container::NoSuchElementException& ) - { - bIsUserDefined = TRUE; - } - - // If custom label not set retrieve it from the command to info service - if ( aLabel.equals( OUString() ) ) - { - uno::Sequence< beans::PropertyValue > aPropSeq; - if ( a >>= aPropSeq ) - { - for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ ) - { - if ( aPropSeq[i].Name.equalsAscii( ITEM_DESCRIPTOR_LABEL ) ) - { - aPropSeq[i].Value >>= aLabel; - break; - } - } - } - } - } -} - const OUString& SvxConfigEntry::GetHelpText() { @@ -3150,133 +3080,6 @@ SvxConfigEntry::GetHelpText() return aHelpText; } -uno::Sequence< beans::PropertyValue > -SvxConfigEntry::GetProperties( - const uno::Reference< container::XNameAccess >& rCommandToLabelMap ) -{ - if ( IsSeparator() ) - { - uno::Sequence< beans::PropertyValue > aPropSeq( 1 ); - - aPropSeq[0].Name = OUString( - RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_TYPE ) ); - aPropSeq[0].Value <<= css::ui::ItemType::SEPARATOR_LINE; - - return aPropSeq; - } - - static const OUString aDescriptorCommandURL ( - RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_COMMANDURL ) ); - - static const OUString aDescriptorType( - RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_TYPE ) ); - - static const OUString aDescriptorLabel( - RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_LABEL ) ); - - static const OUString aDescriptorHelpURL( - RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_HELPURL ) ); - - uno::Sequence< beans::PropertyValue > aPropSeq( 4 ); - - aPropSeq[0].Name = aDescriptorCommandURL; - aPropSeq[0].Value <<= rtl::OUString( GetCommand() ); - - aPropSeq[1].Name = aDescriptorType; - aPropSeq[1].Value <<= css::ui::ItemType::DEFAULT; - - // If the name has not been changed and the name is the same as - // in the default command to label map then the label can be stored - // as an empty string. - // It will be initialised again later using the command to label map. - aPropSeq[2].Name = aDescriptorLabel; - if ( HasChangedName() == FALSE && GetCommand().getLength() ) - { - BOOL isDefaultName = FALSE; - try - { - uno::Any a( rCommandToLabelMap->getByName( GetCommand() ) ); - uno::Sequence< beans::PropertyValue > tmpPropSeq; - if ( a >>= tmpPropSeq ) - { - for ( sal_Int32 i = 0; i < tmpPropSeq.getLength(); i++ ) - { - if ( tmpPropSeq[i].Name.equals( aDescriptorLabel ) ) - { - OUString tmpLabel; - tmpPropSeq[i].Value >>= tmpLabel; - - if ( tmpLabel.equals( GetName() ) ) - { - isDefaultName = TRUE; - } - - break; - } - } - } - } - catch ( container::NoSuchElementException& ) - { - // isDefaultName is left as FALSE - } - - if ( isDefaultName ) - { - aPropSeq[2].Value <<= rtl::OUString(); - } - else - { - aPropSeq[2].Value <<= rtl::OUString( GetName() ); - } - } - else - { - aPropSeq[2].Value <<= rtl::OUString( GetName() ); - } - - aPropSeq[3].Name = aDescriptorHelpURL; - aPropSeq[3].Value <<= rtl::OUString( GetHelpURL() ); - - return aPropSeq; -} - -/* -SvxMenuConfigEntry::SvxMenuConfigEntry( - const uno::Sequence< beans::PropertyValue >& rProperties, - const uno::Reference< container::XNameAccess >& rCommandToLabelMap ) - : - SvxConfigEntry( rProperties, rCommandToLabelMap ) -{ - uno::Reference< container::XIndexAccess > aChildren; - - for ( sal_Int32 i = 0; i < rProperties.getLength(); i++ ) - { - if ( rProperties[i].Name.equalsAscii( ITEM_DESCRIPTOR_CONTAINER )) - { - rProperties[i].Value >>= aChildren; - } - } - - if ( aChildren.is() ) - { - SetPopup( TRUE ); - SetEntries( new SvxEntries() ); - - uno::Sequence< beans::PropertyValue > aProps; - for ( sal_Int32 i = 0; i < aChildren->getCount(); i++ ) - { - if ( aChildren->getByIndex( i ) >>= aProps ) - { - SvxConfigEntry* pEntry = - new SvxMenuConfigEntry( aProps, rCommandToLabelMap ); - GetEntries()->push_back( pEntry ); - } - } - } -} -*/ - SvxConfigEntry::SvxConfigEntry( const OUString& rDisplayName, const OUString& rCommandURL, bool bPopup, bool bParentData ) : nId( 1 ) @@ -4695,51 +4498,6 @@ void ToolbarSaveInData::RestoreToolbar( SvxConfigEntry* pToolbar ) } } -void ToolbarSaveInData::ReloadToolbar( const OUString& rResourceURL ) -{ - SvxEntries::const_iterator iter = GetEntries()->begin(); - SvxConfigEntry* pToolbar = NULL; - - for ( ; iter != GetEntries()->end(); iter++ ) - { - SvxConfigEntry* pEntry = *iter; - - if ( pEntry->GetCommand().equals( rResourceURL ) ) - { - pToolbar = pEntry; - break; - } - } - - if ( pToolbar != NULL ) - { - delete pToolbar->GetEntries(); - - try - { - uno::Reference< container::XIndexAccess > xToolbarSettings; - - if ( pToolbar->IsParentData() ) - { - xToolbarSettings = GetParentConfigManager()->getSettings( - pToolbar->GetCommand(), sal_False); - } - else - { - xToolbarSettings = GetConfigManager()->getSettings( - pToolbar->GetCommand(), sal_False); - } - - LoadToolbar( xToolbarSettings, pToolbar ); - } - catch ( container::NoSuchElementException& ) - { - // toolbar not found for some reason - // it will not appear in the toolbar list - } - } -} - bool ToolbarSaveInData::LoadToolbar( const uno::Reference< container::XIndexAccess >& xToolbarSettings, SvxConfigEntry* pParentData ) diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx index dce62d51f..10b3f7a8b 100644 --- a/cui/source/customize/cfgutil.cxx +++ b/cui/source/customize/cfgutil.cxx @@ -376,40 +376,6 @@ void SfxConfigFunctionListBox_Impl::ClearAll() Clear(); } -SvLBoxEntry* SfxConfigFunctionListBox_Impl::GetEntry_Impl( const String& rName ) -/* Beschreibung - Ermittelt den SvLBoxEntry zu einem "ubergebenen String. Das setzt voraus, da\s - die Namen eindeutig sind. -*/ -{ - SvLBoxEntry *pEntry = First(); - while ( pEntry ) - { - if ( GetEntryText( pEntry ) == rName ) - return pEntry; - pEntry = Next( pEntry ); - } - - return NULL; -} - -SvLBoxEntry* SfxConfigFunctionListBox_Impl::GetEntry_Impl( USHORT nId ) -/* Beschreibung - Ermittelt den SvLBoxEntry zu einer "ubergebenen Id. -*/ -{ - SvLBoxEntry *pEntry = First(); - while ( pEntry ) - { - SfxGroupInfo_Impl *pData = (SfxGroupInfo_Impl*) pEntry->GetUserData(); - if ( pData && pData->nOrd == nId ) - return pEntry; - pEntry = Next( pEntry ); - } - - return NULL; -} - SfxMacroInfo* SfxConfigFunctionListBox_Impl::GetMacroInfo() /* Beschreibung Gibt die MacroInfo des selektierten Entry zur"uck ( sofern vorhanden ). @@ -451,60 +417,6 @@ String SfxConfigFunctionListBox_Impl::GetCurLabel() return pData->sCommand; } -USHORT SfxConfigFunctionListBox_Impl::GetId( SvLBoxEntry *pEntry ) -/* Beschreibung - Gibt die Ordnungsnummer ( SlotId oder Macro-Nummer ) des Eintrags zur"uck. -*/ -{ - SfxGroupInfo_Impl *pData = pEntry ? - (SfxGroupInfo_Impl*) pEntry->GetUserData() : 0; - if ( pData ) - return pData->nOrd; - return 0; -} - -/* -String SfxConfigFunctionListBox_Impl::GetHelpText( SvLBoxEntry *pEntry ) -{ - // Information zum selektierten Entry aus den Userdaten holen - SfxGroupInfo_Impl *pInfo = pEntry ? (SfxGroupInfo_Impl*) pEntry->GetUserData(): 0; - if ( pInfo ) - { - switch ( pInfo->nKind ) - { - case SFX_CFGGROUP_FUNCTION : - case SFX_CFGFUNCTION_SLOT : - { - // Eintrag ist eine Funktion, Hilfe aus der Office-Hilfe - USHORT nId = pInfo->nOrd; - String aText = Application::GetHelp()->GetHelpText( nId, this ); - - if ( !aText.Len() ) - aText = SFX_SLOTPOOL().GetSlotHelpText_Impl( nId ); - return aText; - } - - case SFX_CFGGROUP_SCRIPTCONTAINER : - case SFX_CFGFUNCTION_SCRIPT : - case SFX_CFGGROUP_BASICMGR : - case SFX_CFGGROUP_DOCBASICMGR : - case SFX_CFGGROUP_BASICLIB : - case SFX_CFGGROUP_BASICMOD : - case SFX_CFGFUNCTION_MACRO : - { - // Eintrag ist ein Macro, Hilfe aus der MacroInfo - SfxMacroInfo *pMacInfo = (SfxMacroInfo*) pInfo->pObject; - return pMacInfo->GetHelpText(); - } - - case SFX_CFGGROUP_STYLES : - return String(); - } - } - - return String(); -}*/ - void SfxConfigFunctionListBox_Impl::FunctionSelected() /* Beschreibung Setzt die Balloonhelp zur"uck, da diese immer den Helptext des selektierten @@ -1247,25 +1159,6 @@ SfxConfigGroupListBox_Impl::getDocumentModel( Reference< XComponentContext >& xC return xModel; } -::rtl::OUString SfxConfigGroupListBox_Impl::parseLocationName( const ::rtl::OUString& location ) -{ - // strip out the last leaf of location name - // e.g. file://dir1/dir2/Blah.sxw - > Blah.sxw - ::rtl::OUString temp = location; - sal_Int32 lastSlashIndex = temp.lastIndexOf( ::rtl::OUString::createFromAscii( "/" ) ); - - if ( ( lastSlashIndex + 1 ) < temp.getLength() ) - { - temp = temp.copy( lastSlashIndex + 1 ); - } - // maybe we should throw here!!! - else - { - OSL_TRACE("Something wrong with name, perhaps we should throw an exception"); - } - return temp; -} - //----------------------------------------------- ::rtl::OUString SfxConfigGroupListBox_Impl::MapCommand2UIName(const ::rtl::OUString& sCommand) { diff --git a/cui/source/customize/selector.cxx b/cui/source/customize/selector.cxx index 31b2e367e..3b80d8062 100644 --- a/cui/source/customize/selector.cxx +++ b/cui/source/customize/selector.cxx @@ -154,42 +154,6 @@ void SvxConfigFunctionListBox_Impl::ClearAll() Clear(); } -SvLBoxEntry* SvxConfigFunctionListBox_Impl::GetEntry_Impl( const String& rName ) -{ - SvLBoxEntry *pEntry = First(); - while ( pEntry ) - { - if ( GetEntryText( pEntry ) == rName ) - return pEntry; - pEntry = Next( pEntry ); - } - - return NULL; -} - -SvLBoxEntry* SvxConfigFunctionListBox_Impl::GetEntry_Impl( USHORT nId ) -{ - SvLBoxEntry *pEntry = First(); - while ( pEntry ) - { - SvxGroupInfo_Impl *pData = (SvxGroupInfo_Impl*) pEntry->GetUserData(); - if ( pData && pData->nOrd == nId ) - return pEntry; - pEntry = Next( pEntry ); - } - - return NULL; -} - -USHORT SvxConfigFunctionListBox_Impl::GetId( SvLBoxEntry *pEntry ) -{ - SvxGroupInfo_Impl *pData = pEntry ? - (SvxGroupInfo_Impl*) pEntry->GetUserData() : 0; - if ( pData ) - return pData->nOrd; - return 0; -} - String SvxConfigFunctionListBox_Impl::GetHelpText( SvLBoxEntry *pEntry ) { // Information zum selektierten Entry aus den Userdaten holen @@ -1214,12 +1178,6 @@ SvxScriptSelectorDialog::SetDialogDescription( const String& rDescription ) aDialogDescription.SetText( rDescription ); } -USHORT -SvxScriptSelectorDialog::GetSelectedId() -{ - return aCommands.GetId( aCommands.GetLastSelectedEntry() ); -} - String SvxScriptSelectorDialog::GetScriptURL() const { diff --git a/cui/source/dialogs/commonlingui.cxx b/cui/source/dialogs/commonlingui.cxx index 059c983c5..848ec0598 100644 --- a/cui/source/dialogs/commonlingui.cxx +++ b/cui/source/dialogs/commonlingui.cxx @@ -183,52 +183,6 @@ void SvxCommonLinguisticControl::InsertControlGroup( Window& _rFirstGroupWindow, // (FirstWindow, LastWindow) was no valid control group } -// ----------------------------------------------------------------------- -String SvxCommonLinguisticControl::GetNewEditWord() -{ - return aNewWordED.GetText(); -} - -// ----------------------------------------------------------------------- -void SvxCommonLinguisticControl::SetNewEditWord( const String& _rNew ) -{ - aNewWordED.SetText( _rNew ); -} - -//----------------------------------------------------------------------------- -void SvxCommonLinguisticControl::UpdateIgnoreHelp( ) -{ - - String aInfoStr( RTL_CONSTASCII_USTRINGPARAM( ": " ) ); - aInfoStr.Append( GetCurrentText() ); - - String aString = GetNonMnemonicString( aIgnoreAllBtn.GetText() ); - aString.Append( aInfoStr ); - aIgnoreAllBtn.SetQuickHelpText( aString ); - - aString = GetNonMnemonicString( aIgnoreBtn.GetText() ); - aString.Append( aInfoStr ); - aIgnoreBtn.SetQuickHelpText( aString ); -} - -//----------------------------------------------------------------------------- -void SvxCommonLinguisticControl::UpdateChangesHelp( const String& _rNewText ) -{ - String aInfoStr( RTL_CONSTASCII_USTRINGPARAM( ": " ) ); - aInfoStr.Append( GetCurrentText() ); - aInfoStr.Append( String( RTL_CONSTASCII_USTRINGPARAM( " -> " ) ) ); - aInfoStr.Append( _rNewText ); - // TODO: shouldn't this be part of the resources, for proper localization? - - String aString = GetNonMnemonicString( aChangeAllBtn.GetText() ); - aString.Append( aInfoStr ); - aChangeAllBtn.SetQuickHelpText( aString ); - - aString = GetNonMnemonicString( aChangeBtn.GetText() ); - aString.Append( aInfoStr ); - aChangeBtn.SetQuickHelpText( aString ); -} - //----------------------------------------------------------------------------- void SvxCommonLinguisticControl::Paint( const Rectangle& rRect ) { diff --git a/cui/source/dialogs/commonlingui.hxx b/cui/source/dialogs/commonlingui.hxx index 0a15def01..3356b5cb8 100644 --- a/cui/source/dialogs/commonlingui.hxx +++ b/cui/source/dialogs/commonlingui.hxx @@ -152,18 +152,6 @@ public: // returns the location (upper-left corner) of the group of action buttons inline Point GetActionButtonsLocation( ) const { return aIgnoreBtn.GetPosPixel(); } - - // updates the help texts for the "change" and "change all" buttons according to the currently - // entered texts - void UpdateChangesHelp( const String& _rNewText ); - inline void UpdateChangesHelp( ) { UpdateChangesHelp( GetWordInputControl().GetText() ); } - - // updates the help texts for the "ignore" and "always ignore" buttons according to the currently - // entered texts - void UpdateIgnoreHelp( ); - - String GetNewEditWord(); - void SetNewEditWord( const String& _rNew ); }; diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index 9e0792333..181c2b131 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -959,7 +959,7 @@ void TPGalleryThemeProperties::FillFilterList() } } -#if defined(WIN) || defined(WNT) +#if defined(WNT) if ( aExtensions.Len() > 240 ) aExtensions = DEFINE_CONST_UNICODE( "*.*" ); #endif diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx index 573819dfe..83f59438e 100644 --- a/cui/source/dialogs/cuihyperdlg.cxx +++ b/cui/source/dialogs/cuihyperdlg.cxx @@ -136,9 +136,6 @@ SvxHpLinkDlg::SvxHpLinkDlg (Window* pParent, SfxBindings* pBindings) pEntry = AddTabPage ( RID_SVXPAGE_HYPERLINK_NEWDOCUMENT, aStrTitle, aImage, aImageHC, SvxHyperlinkNewDocTp::Create ); pEntry->SetQuickHelpText( CUI_RESSTR( RID_SVXSTR_HYPERDLG_HLDOCNTP_HELP ) ); - // all tab pages set -> create mnemonics - // CreateIconTextAutoMnemonics(); #99671# not useful, because this is not what user expects when using mnemonics on the pages - // create itemset for tabpages mpItemSet = new SfxItemSet( SFX_APP()->GetPool(), SID_HYPERLINK_GETLINK, SID_HYPERLINK_SETLINK ); diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx index edbfb7f4d..73a303a63 100644 --- a/cui/source/dialogs/hangulhanjadlg.cxx +++ b/cui/source/dialogs/hangulhanjadlg.cxx @@ -690,12 +690,6 @@ namespace svx } //------------------------------------------------------------------------- - void HangulHanjaConversionDialog::SetOptionsHdl( const Link& _rHdl ) - { - m_pPlayground->SetButtonHandler( SvxCommonLinguisticControl::eOptions, _rHdl ); - } - - //------------------------------------------------------------------------- void HangulHanjaConversionDialog::SetFindHdl( const Link& _rHdl ) { m_aFind.SetClickHdl( _rHdl ); @@ -866,11 +860,6 @@ namespace svx } //------------------------------------------------------------------------- - sal_Bool HangulHanjaConversionDialog::GetByCharacter( ) const - { - return m_aReplaceByChar.IsChecked(); - } - //------------------------------------------------------------------------- void HangulHanjaConversionDialog::SetConversionDirectionState( sal_Bool _bTryBothDirections, HHC::ConversionDirection _ePrimaryConversionDirection ) diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx index cf74a4b06..c63ec3f46 100644 --- a/cui/source/dialogs/hldocntp.cxx +++ b/cui/source/dialogs/hldocntp.cxx @@ -173,37 +173,6 @@ void SvxHyperlinkNewDocTp::FillDlgFields ( String& /*aStrURL*/ ) #define INTERNETSHORTCUT_URL_TAG "URL" #define INTERNETSHORTCUT_ICONID_TAG "IconIndex" -void SvxHyperlinkNewDocTp::ReadURLFile( const String& rFile, String& rTitle, String& rURL, sal_Int32& rIconId, BOOL* pShowAsFolder ) -{ - // Open file - Config aCfg( rFile ); - aCfg.SetGroup( INTERNETSHORTCUT_ID_TAG ); - - // read URL - rURL = aCfg.ReadKey( ByteString( RTL_CONSTASCII_STRINGPARAM( INTERNETSHORTCUT_URL_TAG) ), RTL_TEXTENCODING_ASCII_US ); - SvtPathOptions aPathOpt; - rURL = aPathOpt.SubstituteVariable( rURL ); - - // read target - if ( pShowAsFolder ) - { - String aTemp( aCfg.ReadKey( ByteString( RTL_CONSTASCII_STRINGPARAM( INTERNETSHORTCUT_TARGET_TAG ) ), RTL_TEXTENCODING_ASCII_US ) ); - *pShowAsFolder = aTemp == String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( INTERNETSHORTCUT_FOLDER_TAG ) ); - } - - // read image-ID - String aStrIconId( aCfg.ReadKey( ByteString( RTL_CONSTASCII_STRINGPARAM( INTERNETSHORTCUT_ICONID_TAG ) ), RTL_TEXTENCODING_ASCII_US ) ); - rIconId = aStrIconId.ToInt32(); - - // read title - String aLangStr = aPathOpt.SubstituteVariable( DEFINE_CONST_UNICODE("$(vlang)") ); - ByteString aLang( aLangStr, RTL_TEXTENCODING_UTF8 ); - ByteString aGroup = INTERNETSHORTCUT_ID_TAG; - ( ( aGroup += '-' ) += aLang ) += ".W"; - aCfg.SetGroup( aGroup ); - rTitle = String( aCfg.ReadKey( INTERNETSHORTCUT_TITLE_TAG ), RTL_TEXTENCODING_UTF7 ); -} - void SvxHyperlinkNewDocTp::FillDocumentList () { EnterWait(); diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx index 2d0dab48f..a7b083880 100644 --- a/cui/source/dialogs/iconcdlg.cxx +++ b/cui/source/dialogs/iconcdlg.cxx @@ -149,56 +149,6 @@ sal_Bool IconChoicePage::QueryClose() /********************************************************************** | -| handling itemsets -| -\**********************************************************************/ - -const SfxPoolItem* IconChoicePage::GetItem( const SfxItemSet& rSet, - USHORT nSlot ) -{ - const SfxItemPool* pPool = rSet.GetPool(); - USHORT nWh = pPool->GetWhich( nSlot ); - const SfxPoolItem* pItem = 0; - rSet.GetItemState( nWh, TRUE, &pItem ); - - if ( !pItem && nWh != nSlot ) - pItem = &pPool->GetDefaultItem( nWh ); - - return pItem; -} - -// ----------------------------------------------------------------------- - -const SfxPoolItem* IconChoicePage::GetOldItem( const SfxItemSet& rSet, - USHORT nSlot ) -{ - const SfxItemSet& rOldSet = GetItemSet(); - USHORT nWh = GetWhich( nSlot ); - const SfxPoolItem* pItem = 0; - - if ( bStandard && rOldSet.GetParent() ) - pItem = GetItem( *rOldSet.GetParent(), nSlot ); - else if ( rSet.GetParent() && SFX_ITEM_DONTCARE == rSet.GetItemState( nWh ) ) - pItem = GetItem( *rSet.GetParent(), nSlot ); - else - pItem = GetItem( rOldSet, nSlot ); - - return pItem; -} - -// ----------------------------------------------------------------------- - -const SfxPoolItem* IconChoicePage::GetExchangeItem( const SfxItemSet& rSet, - USHORT nSlot ) -{ - if ( pDialog && !pDialog->IsInOK() && pDialog->GetExampleSet() ) - return GetItem( *pDialog->GetExampleSet(), nSlot ); - else - return GetOldItem( rSet, nSlot ); -} - -/********************************************************************** -| | window-methods | \**********************************************************************/ @@ -380,18 +330,6 @@ IconChoiceDialog ::~IconChoiceDialog () delete pData; } - // remove Pagelist -/* for ( i=0; i<maPageList.Count(); i++ ) - { - IconChoicePageData* pData = (IconChoicePageData*)maPageList.GetObject ( i ); - - if ( pData->bOnDemand ) - delete ( SfxItemSet * )&( pData->pPage->GetItemSet() ); - - delete pData->pPage; - delete pData; - }*/ - // remove Userdata from Icons for ( i=0; i<maIconCtrl.GetEntryCount(); i++) { @@ -415,26 +353,6 @@ IconChoiceDialog ::~IconChoiceDialog () SvxIconChoiceCtrlEntry* IconChoiceDialog::AddTabPage( USHORT nId, const String& rIconText, const Image& rChoiceIcon, - CreatePage pCreateFunc /* != 0 */, - GetPageRanges pRangesFunc /* darf 0 sein */, - BOOL bItemsOnDemand, ULONG /*nPos*/ ) -{ - IconChoicePageData* pData = new IconChoicePageData ( nId, pCreateFunc, - pRangesFunc, - bItemsOnDemand ); - maPageList.Insert ( pData, LIST_APPEND ); - - pData->fnGetRanges = pRangesFunc; - pData->bOnDemand = bItemsOnDemand; - - USHORT *pId = new USHORT ( nId ); - SvxIconChoiceCtrlEntry* pEntry = maIconCtrl.InsertEntry( rIconText, rChoiceIcon ); - pEntry->SetUserData ( (void*) pId ); - return pEntry; -} - -SvxIconChoiceCtrlEntry* IconChoiceDialog::AddTabPage( USHORT nId, const String& rIconText, - const Image& rChoiceIcon, const Image& rChoiceIconHC, CreatePage pCreateFunc /* != 0 */, GetPageRanges pRangesFunc /* darf 0 sein */, @@ -456,65 +374,6 @@ SvxIconChoiceCtrlEntry* IconChoiceDialog::AddTabPage( USHORT nId, const String& /********************************************************************** | -| remove page -| -\**********************************************************************/ - -void IconChoiceDialog::RemoveTabPage( USHORT nId ) -{ - IconChoicePageData* pData = GetPageData ( nId ); - - // remove page from list - if ( pData ) - { - maPageList.Remove ( pData ); - - // save settings - if ( pData->pPage ) - { - pData->pPage->FillUserData(); - String aPageData(pData->pPage->GetUserData()); - if ( aPageData.Len() ) - { - SvtViewOptions aTabPageOpt( E_TABPAGE, String::CreateFromInt32( pData->nId ) ); - - SetViewOptUserItem( aTabPageOpt, aPageData ); - } - } - - if ( pData->bOnDemand ) - delete ( SfxItemSet * )&( pData->pPage->GetItemSet() ); - - delete pData->pPage; - delete pData; - } - - // remove Icon - BOOL bFound=FALSE; - for ( ULONG i=0; i<maIconCtrl.GetEntryCount() && !bFound; i++) - { - SvxIconChoiceCtrlEntry* pEntry = maIconCtrl.GetEntry ( i ); - USHORT* pUserData = (USHORT*) pEntry->GetUserData(); - - if ( *pUserData == nId ) - { - delete pUserData; - maIconCtrl.RemoveEntry ( pEntry ); - bFound = TRUE; - } - } - - // was it the current page ? - if ( nId == mnCurrentPageId ) - { - mnCurrentPageId = maPageList.First()->nId; - } - - Invalidate (); -} - -/********************************************************************** -| | Paint-method | \**********************************************************************/ @@ -572,13 +431,6 @@ EIconChoicePos IconChoiceDialog::SetCtrlPos( const EIconChoicePos& rPos ) return eOldPos; } -void IconChoiceDialog::SetCtrlColor ( const Color& rColor ) -{ - Wallpaper aWallpaper ( rColor ); - maIconCtrl.SetBackground( aWallpaper ); - maIconCtrl.SetFontColorToBackground (); -} - /********************************************************************** | | Show / Hide page or button @@ -601,14 +453,6 @@ void IconChoiceDialog::HidePageImpl ( IconChoicePageData* pData ) // ----------------------------------------------------------------------- -void IconChoiceDialog::RemoveResetButton() -{ - aResetBtn.Hide(); - bHideResetBtn = TRUE; -} - -// ----------------------------------------------------------------------- - void IconChoiceDialog::ShowPage( USHORT nId ) { bool bInvalidate = GetCurPageId() != nId; @@ -1144,40 +988,6 @@ void IconChoiceDialog::SetInputSet( const SfxItemSet* pInSet ) // ----------------------------------------------------------------------- -// Liefert die Pages, die ihre Sets onDemand liefern, das OutputItemSet. -const SfxItemSet* IconChoiceDialog::GetOutputItemSet ( USHORT nId ) -{ - IconChoicePageData * pData = GetPageData ( nId ); - DBG_ASSERT( pData, "TabPage nicht gefunden" ); - - if ( pData ) - { - if ( !pData->pPage ) - return NULL; - - if ( pData->bOnDemand ) - return &pData->pPage->GetItemSet(); - - return pOutSet; - } - - return NULL; -} - -// ----------------------------------------------------------------------- - -int IconChoiceDialog::FillOutputItemSet() -{ - int nRet = IconChoicePage::LEAVE_PAGE; - if ( OK_Impl() ) - Ok(); - else - nRet = IconChoicePage::KEEP_PAGE; - return nRet; -} - -// ----------------------------------------------------------------------- - void IconChoiceDialog::PageCreated( USHORT /*nId*/, IconChoicePage& /*rPage*/ ) { // not interested in @@ -1404,13 +1214,6 @@ short IconChoiceDialog::Ok() // ----------------------------------------------------------------------- -BOOL IconChoiceDialog::IsInOK() const -{ - return bInOK; -} - -// ----------------------------------------------------------------------- - void IconChoiceDialog::FocusOnIcon( USHORT nId ) { // set focus to icon for the current visible page @@ -1426,10 +1229,3 @@ void IconChoiceDialog::FocusOnIcon( USHORT nId ) } } } - -// ----------------------------------------------------------------------- - -void IconChoiceDialog::CreateIconTextAutoMnemonics( void ) -{ - maIconCtrl.CreateAutoMnemonics(); -} diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx index 48ae30ef9..741c48914 100644 --- a/cui/source/dialogs/insdlg.cxx +++ b/cui/source/dialogs/insdlg.cxx @@ -196,11 +196,6 @@ void SvInsertOleDlg::SelectDefault() aLbObjecttype.SelectEntryPos( 0 ); } -void SvInsertOleDlg::FillObjectServerList( SvObjectServerList* pList ) -{ - pList->FillInsertObjects(); -} - // ----------------------------------------------------------------------- SvInsertOleDlg::SvInsertOleDlg ( diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx index ff1b07a60..efef9c7f0 100644 --- a/cui/source/dialogs/scriptdlg.cxx +++ b/cui/source/dialogs/scriptdlg.cxx @@ -367,15 +367,6 @@ void SFTreeListBox:: RequestSubEntries( SvLBoxEntry* pRootEntry, Reference< ::co } } -void SFTreeListBox::UpdateEntries() -{ -} - -SvLBoxEntry* SFTreeListBox::FindEntry( SvLBoxEntry* , const String& , BYTE ) -{ - return 0; -} - long SFTreeListBox::ExpandingHdl() { return TRUE; @@ -626,10 +617,6 @@ short SvxScriptOrgDialog::Execute() return nRet; } -void SvxScriptOrgDialog::EnableButton( Button& , BOOL ) -{ -} - void SvxScriptOrgDialog::CheckButtons( Reference< browse::XBrowseNode >& node ) { if ( node.is() ) @@ -921,38 +908,6 @@ Reference< XModel > SvxScriptOrgDialog::getModel( SvLBoxEntry* pEntry ) return model; } -Reference< XInterface > -SvxScriptOrgDialog::getDocumentModel( Reference< XComponentContext >& xCtx, ::rtl::OUString& docName ) -{ - Reference< XInterface > xModel; - Reference< lang::XMultiComponentFactory > mcf = - xCtx->getServiceManager(); - Reference< frame::XDesktop > desktop ( - mcf->createInstanceWithContext( - ::rtl::OUString::createFromAscii("com.sun.star.frame.Desktop"), xCtx ), - UNO_QUERY ); - - Reference< container::XEnumerationAccess > componentsAccess = - desktop->getComponents(); - Reference< container::XEnumeration > components = - componentsAccess->createEnumeration(); - while (components->hasMoreElements()) - { - Reference< frame::XModel > model( - components->nextElement(), UNO_QUERY ); - if ( model.is() ) - { - ::rtl::OUString sTdocUrl = ::comphelper::DocumentInfo::getDocumentTitle( model ); - if( sTdocUrl.equals( docName ) ) - { - xModel = model; - break; - } - } - } - return xModel; -} - void SvxScriptOrgDialog::createEntry( SvLBoxEntry* pEntry ) { @@ -1371,28 +1326,6 @@ void SvxScriptOrgDialog::RestorePreviousSelection() aScriptsBox.SetCurEntry( pEntry ); } -BOOL SFTreeListBox::dialogSort1( Reference< browse::XBrowseNode > node1, - Reference< browse::XBrowseNode > node2 ) -{ - ::rtl::OUString userStr = ::rtl::OUString::createFromAscii("user"); - ::rtl::OUString shareStr = ::rtl::OUString::createFromAscii("share"); - if( node1->getName().equals( userStr ) ) - return true; - if( node2->getName().equals( userStr ) ) - return false; - if( node1->getName().equals( shareStr ) ) - return true; - if( node2->getName().equals( shareStr ) ) - return false; - return dialogSort2( node1, node2 ); -} - -BOOL SFTreeListBox::dialogSort2( Reference< browse::XBrowseNode > node1, - Reference< browse::XBrowseNode > node2 ) -{ - return ( node1->getName().compareTo( node2->getName() ) < 0 ); -} - ::rtl::OUString ReplaceString( const ::rtl::OUString& source, const ::rtl::OUString& token, diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx index 752a84dac..c069e973d 100755 --- a/cui/source/dialogs/thesdlg.cxx +++ b/cui/source/dialogs/thesdlg.cxx @@ -172,12 +172,21 @@ void ReplaceEdit_Impl::SetText( const XubString& rStr, const Selection& rNewSele // class ThesaurusAlternativesCtrl_Impl ---------------------------------- +AlternativesString_Impl::AlternativesString_Impl( + ThesaurusAlternativesCtrl_Impl &rControl, + SvLBoxEntry* pEntry, USHORT nFlags, const String& rStr ) : + // + SvLBoxString( pEntry, nFlags, rStr ), + m_rControlImpl( rControl ) +{ +} + void AlternativesString_Impl::Paint( const Point& rPos, SvLBox& rDev, USHORT, SvLBoxEntry* pEntry ) { - AlternativesUserData_Impl* pData = (AlternativesUserData_Impl*)pEntry->GetUserData(); + AlternativesExtraData* pData = m_rControlImpl.GetExtraData( pEntry ); Point aPos( rPos ); Font aOldFont( rDev.GetFont()); if (pData && pData->IsHeader()) @@ -207,14 +216,40 @@ ThesaurusAlternativesCtrl_Impl::ThesaurusAlternativesCtrl_Impl( ThesaurusAlternativesCtrl_Impl::~ThesaurusAlternativesCtrl_Impl() { - ClearUserData(); + ClearExtraData(); +} + + +void ThesaurusAlternativesCtrl_Impl::ClearExtraData() +{ + UserDataMap_t aEmpty; + m_aUserData.swap( aEmpty ); +} + + +void ThesaurusAlternativesCtrl_Impl::SetExtraData( + const SvLBoxEntry *pEntry, + const AlternativesExtraData &rData ) +{ + if (!pEntry) + return; + + UserDataMap_t::iterator aIt( m_aUserData.find( pEntry ) ); + if (aIt != m_aUserData.end()) + aIt->second = rData; + else + m_aUserData[ pEntry ] = rData; } -void ThesaurusAlternativesCtrl_Impl::ClearUserData() +AlternativesExtraData * ThesaurusAlternativesCtrl_Impl::GetExtraData( + const SvLBoxEntry *pEntry ) { - for (USHORT i = 0; i < GetEntryCount(); ++i) - delete (AlternativesUserData_Impl*)GetEntry(i)->GetUserData(); + AlternativesExtraData *pRes = NULL; + UserDataMap_t::iterator aIt( m_aUserData.find( pEntry ) ); + if (aIt != m_aUserData.end()) + pRes = &aIt->second; + return pRes; } @@ -230,10 +265,9 @@ SvLBoxEntry * ThesaurusAlternativesCtrl_Impl::AddEntry( sal_Int32 nVal, const St pEntry->AddItem( new SvLBoxString( pEntry, 0, String() ) ); // add empty column aText += rText; pEntry->AddItem( new SvLBoxContextBmp( pEntry, 0, Image(), Image(), 0 ) ); // otherwise crash - pEntry->AddItem( new AlternativesString_Impl( pEntry, 0, aText ) ); + pEntry->AddItem( new AlternativesString_Impl( *this, pEntry, 0, aText ) ); - AlternativesUserData_Impl* pUserData = new AlternativesUserData_Impl( rText, bIsHeader ); - pEntry->SetUserData( pUserData ); + SetExtraData( pEntry, AlternativesExtraData( rText, bIsHeader ) ); GetModel()->Insert( pEntry ); if (bIsHeader) @@ -365,7 +399,7 @@ bool SvxThesaurusDialog_Impl::UpdateAlternativesBox_Impl() m_pAlternativesCT->SetUpdateMode( FALSE ); // clear old user data of control before creating new ones via AddEntry below - m_pAlternativesCT->ClearUserData(); + m_pAlternativesCT->ClearExtraData(); m_pAlternativesCT->Clear(); for (sal_Int32 i = 0; i < nMeanings; ++i) @@ -468,9 +502,9 @@ IMPL_LINK( SvxThesaurusDialog_Impl, AlternativesSelectHdl_Impl, SvxCheckListBox SvLBoxEntry *pEntry = pBox ? pBox->GetCurEntry() : NULL; if (pEntry) { - AlternativesUserData_Impl * pData = (AlternativesUserData_Impl *) pEntry->GetUserData(); + AlternativesExtraData * pData = m_pAlternativesCT->GetExtraData( pEntry ); String aStr; - if (!pData->IsHeader()) + if (pData && !pData->IsHeader()) { aStr = pData->GetText(); GetReplaceEditString( aStr ); @@ -486,9 +520,9 @@ IMPL_LINK( SvxThesaurusDialog_Impl, AlternativesDoubleClickHdl_Impl, SvxCheckLis SvLBoxEntry *pEntry = pBox ? pBox->GetCurEntry() : NULL; if (pEntry) { - AlternativesUserData_Impl * pData = (AlternativesUserData_Impl *) pEntry->GetUserData(); + AlternativesExtraData * pData = m_pAlternativesCT->GetExtraData( pEntry ); String aStr; - if (!pData->IsHeader()) + if (pData && !pData->IsHeader()) { aStr = pData->GetText(); GetReplaceEditString( aStr ); @@ -509,8 +543,8 @@ IMPL_LINK( SvxThesaurusDialog_Impl, AlternativesDoubleClickHdl_Impl, SvxCheckLis IMPL_STATIC_LINK( SvxThesaurusDialog_Impl, SelectFirstHdl_Impl, SvxCheckListBox *, pBox ) { (void) pThis; - if (pBox && pBox->GetEntryCount() > 0) - pBox->SelectEntryPos( 0 ); + if (pBox && pBox->GetEntryCount() >= 2) + pBox->SelectEntryPos( 1 ); // pos 0 is a 'header' that is not selectable return 0; } diff --git a/cui/source/dialogs/thesdlg.src b/cui/source/dialogs/thesdlg.src index e96406f8e..058435d3f 100755 --- a/cui/source/dialogs/thesdlg.src +++ b/cui/source/dialogs/thesdlg.src @@ -59,7 +59,7 @@ ModalDialog RID_SVXDLG_THESAURUS { Pos = MAP_APPFONT ( 24 , 5 ) ; Size = MAP_APPFONT ( 143 , 8 ) ; - Text [ en-US ] = "Current ~word" ; + Text [ en-US ] = "~Current word" ; LEFT = TRUE ; }; ComboBox CB_WORD @@ -95,7 +95,7 @@ ModalDialog RID_SVXDLG_THESAURUS { Pos = MAP_APPFONT ( 5 , 173 ) ; Size = MAP_APPFONT ( 255 , 8 ) ; - Text [ en-US ] = "Replace ~with" ; + Text [ en-US ] = "~Replace with" ; LEFT = TRUE ; }; Edit ED_REPL @@ -120,7 +120,7 @@ ModalDialog RID_SVXDLG_THESAURUS { Pos = MAP_APPFONT ( 105 , 210 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; - Text [ en-US ] = "~Replace" ; + Text [ en-US ] = "Replace" ; DefButton = TRUE ; }; CancelButton BTN_THES_CANCEL diff --git a/cui/source/dialogs/thesdlg_impl.hxx b/cui/source/dialogs/thesdlg_impl.hxx index cc10964c4..d92039e7a 100755 --- a/cui/source/dialogs/thesdlg_impl.hxx +++ b/cui/source/dialogs/thesdlg_impl.hxx @@ -51,11 +51,16 @@ #include <com/sun/star/linguistic2/XMeaning.hpp> #include <stack> +#include <map> #include <algorithm> using namespace ::com::sun::star; using ::rtl::OUString; +class SvLBoxEntry; +class ThesaurusAlternativesCtrl_Impl; + + // class LookUpComboBox_Impl -------------------------------------------------- class LookUpComboBox_Impl : public ComboBox @@ -105,17 +110,14 @@ public: // class ThesaurusAlternativesCtrl_Impl ---------------------------------- -class AlternativesUserData_Impl +class AlternativesExtraData { String sText; bool bHeader; - // disable copy c-tor and assignment operator - AlternativesUserData_Impl( const AlternativesUserData_Impl & ); - AlternativesUserData_Impl & operator = ( const AlternativesUserData_Impl & ); - public: - AlternativesUserData_Impl( const String &rText, bool bIsHeader ) : + AlternativesExtraData() : bHeader( false ) {} + AlternativesExtraData( const String &rText, bool bIsHeader ) : sText(rText), bHeader(bIsHeader) { @@ -128,10 +130,11 @@ public: class AlternativesString_Impl : public SvLBoxString { + ThesaurusAlternativesCtrl_Impl & m_rControlImpl; public: - AlternativesString_Impl( SvLBoxEntry* pEntry, USHORT nFlags, const String& rStr ) - : SvLBoxString( pEntry, nFlags, rStr ) {} + AlternativesString_Impl( ThesaurusAlternativesCtrl_Impl &rControl, + SvLBoxEntry* pEntry, USHORT nFlags, const String& rStr ); virtual void Paint( const Point& rPos, SvLBox& rDev, USHORT nFlags, SvLBoxEntry* pEntry); }; @@ -142,6 +145,9 @@ class ThesaurusAlternativesCtrl_Impl : { SvxThesaurusDialog_Impl & m_rDialogImpl; + typedef std::map< const SvLBoxEntry *, AlternativesExtraData > UserDataMap_t; + UserDataMap_t m_aUserData; + // disable copy c-tor and assignment operator ThesaurusAlternativesCtrl_Impl( const ThesaurusAlternativesCtrl_Impl & ); ThesaurusAlternativesCtrl_Impl & operator = ( const ThesaurusAlternativesCtrl_Impl & ); @@ -152,7 +158,10 @@ public: SvLBoxEntry * AddEntry( sal_Int32 nVal, const String &rText, bool bIsHeader ); - void ClearUserData(); + + void ClearExtraData(); + void SetExtraData( const SvLBoxEntry *pEntry, const AlternativesExtraData &rData ); + AlternativesExtraData * GetExtraData( const SvLBoxEntry *pEntry ); virtual void KeyInput( const KeyEvent& rKEvt ); virtual void Paint( const Rectangle& rRect ); diff --git a/cui/source/dialogs/zoom.cxx b/cui/source/dialogs/zoom.cxx index 0c15cff54..960259917 100644 --- a/cui/source/dialogs/zoom.cxx +++ b/cui/source/dialogs/zoom.cxx @@ -58,13 +58,6 @@ // static ---------------------------------------------------------------- -static USHORT pRanges[] = -{ - SID_ATTR_ZOOM, - SID_ATTR_ZOOM, - 0 -}; - #define SPECIAL_FACTOR ((USHORT)0xFFFF) // class SvxZoomDialog --------------------------------------------------- @@ -124,29 +117,6 @@ void SvxZoomDialog::SetFactor( USHORT nNewFactor, USHORT nBtnId ) // ----------------------------------------------------------------------- -void SvxZoomDialog::SetButtonText( USHORT nBtnId, const String& rNewTxt ) -{ - switch ( nBtnId ) - { - case ZOOMBTN_OPTIMAL: // Optimal-Button - aOptimalBtn.SetText( rNewTxt ); - break; - - case ZOOMBTN_PAGEWIDTH: // Seitenbreite-Button - aPageWidthBtn.SetText( rNewTxt ); - break; - - case ZOOMBTN_WHOLEPAGE: // Ganze Seite-Button - aWholePageBtn.SetText( rNewTxt ); - break; - - default: - DBG_ERROR( "wrong button number" ); - } -} - -// ----------------------------------------------------------------------- - void SvxZoomDialog::HideButton( USHORT nBtnId ) { switch ( nBtnId ) @@ -181,13 +151,6 @@ void SvxZoomDialog::SetLimits( USHORT nMin, USHORT nMax ) // ----------------------------------------------------------------------- -void SvxZoomDialog::SetSpinSize( USHORT nNewSpin ) -{ - aUserEdit.SetSpinSize( nNewSpin ); -} - -// ----------------------------------------------------------------------- - SvxZoomDialog::SvxZoomDialog( Window* pParent, const SfxItemSet& rCoreSet ) : SfxModalDialog( pParent, CUI_RES( RID_SVXDLG_ZOOM ) ), @@ -370,13 +333,6 @@ SvxZoomDialog::~SvxZoomDialog() // ----------------------------------------------------------------------- -USHORT* SvxZoomDialog::GetRanges() -{ - return pRanges; -} - -// ----------------------------------------------------------------------- - IMPL_LINK( SvxZoomDialog, UserHdl, RadioButton *, pBtn ) { bModified |= TRUE; diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index 41e80068d..557453a2c 100755..100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -235,24 +235,6 @@ class AbstractSpellDialog_Impl : public AbstractSpellDialog virtual SfxBindings& GetBindings(); }; -//for SvxSpellCheckDialog begin -//STRIP001 class AbstractSvxSpellCheckDialog_Impl : public AbstractSvxSpellCheckDialog //add for FmShowColsDialog -//STRIP001 { -//STRIP001 SvxSpellCheckDialog * pDlg; -//STRIP001 public -//STRIP001 AbstractSvxSpellCheckDialog_Impl ( SvxSpellCheckDialog* p) -//STRIP001 : pDlg(p) -//STRIP001 {} -//STRIP001 virtual USHORT Execute() ; -//STRIP001 virtual void SetNewEditWord( const String& _rNew ) ; -//STRIP001 virtual void SetLanguage( sal_uInt16 nLang ) ; -//STRIP001 virtual void HideAutoCorrect() ; -//STRIP001 virtual String GetNewEditWord(); -//STRIP001 virtual void SetNewEditWord( const String& _rNew ); -//STRIP001 } -//for SvxSpellCheckDialog end - - //for SearchProgress begin class SearchProgress; class AbstractSearchProgress_Impl : public AbstractSearchProgress diff --git a/cui/source/inc/acccfg.hxx b/cui/source/inc/acccfg.hxx index c7315e803..99b0291f1 100644 --- a/cui/source/inc/acccfg.hxx +++ b/cui/source/inc/acccfg.hxx @@ -184,9 +184,7 @@ private: String GetLabel4Command(const String& sCommand); void InitAccCfg(); - KeyCode MapPosToKeyCode( USHORT nPos ) const; USHORT MapKeyCodeToPos( const KeyCode &rCode ) const; - String GetFunctionName( KeyFuncType eType ) const; css::uno::Reference< css::frame::XModel > SearchForAlreadyLoadedDoc(const String& sName); void StartFileDialog( WinBits nBits, const String& rTitle ); @@ -202,10 +200,7 @@ public: virtual BOOL FillItemSet( SfxItemSet& ); virtual void Reset( const SfxItemSet& ); - void SelectMacro(const SfxMacroInfoItem*); void Apply(const css::uno::Reference< css::ui::XAcceleratorConfiguration >& pAccMgr); - void CopySource2Target(const css::uno::Reference< css::ui::XAcceleratorConfiguration >& xSourceAccMgr, - const css::uno::Reference< css::ui::XAcceleratorConfiguration >& xTargetAccMgr); static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); }; @@ -223,50 +218,6 @@ public: void ExpandEntry ( USHORT nPos, const String &rStr ); }; -/* -// class USHORTArr ********************************************************** - -DECL_2BYTEARRAY(USHORTArr, USHORT, 10, 10) - -// class SfxAcceleratorConfigDialog ************************************************** - -class SfxAcceleratorConfigDialog : public ModalDialog -{ - OKButton aOKButton; - CancelButton aCancelButton; - PushButton aChangeButton; - PushButton aRemoveButton; - SfxAcceleratorConfigListBox aEntriesBox; - FixedText aDescriptionTextText; - FixedText aDescriptionInfoText; - FixedLine aKeyboardGroup; - FixedText aGroupText; - ListBox aGroupLBox; - FixedText aFunctionText; - ListBox aFunctionBox; - FixedText aKeyText; - ListBox aKeyBox; - FixedLine aFunctionsGroup; - - USHORTArr aAccelArr; - USHORTArr aFunctionArr; - USHORTArr aKeyArr; - - void OKHdl ( Button * ); - void ChangeHdl( Button * ); - void RemoveHdl( Button * ); - void SelectHdl( ListBox *pListBox ); - - KeyCode PosToKeyCode ( USHORT nPos ) const; - USHORT KeyCodeToPos ( const KeyCode &rCode ) const; - String GetFunctionName( KeyFuncType eType ) const; - -public: - - SfxAcceleratorConfigDialog( Window *pParent ); -}; -*/ - class SvxShortcutAssignDlg : public SfxSingleTabDialog { public: diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx index 9ddade3b3..77d81b1f5 100644 --- a/cui/source/inc/cfg.hxx +++ b/cui/source/inc/cfg.hxx @@ -75,8 +75,6 @@ public: SvxConfigDialog( Window*, const SfxItemSet* ); ~SvxConfigDialog(); - void ActivateTabPage( USHORT ); - virtual void PageCreated( USHORT nId, SfxTabPage &rPage ); virtual short Ok(); @@ -258,12 +256,6 @@ private: public: - SvxConfigEntry( - const ::com::sun::star::uno::Sequence< - ::com::sun::star::beans::PropertyValue >& rProperties, - const ::com::sun::star::uno::Reference< - ::com::sun::star::container::XNameAccess >& rCommandToLabelMap ); - SvxConfigEntry( const ::rtl::OUString& rDisplayName, const ::rtl::OUString& rCommandURL, bool bPopup = FALSE, @@ -337,11 +329,6 @@ public: sal_Int32 GetStyle() { return nStyle; } void SetStyle( sal_Int32 style ) { nStyle = style; } - - com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > - GetProperties( - const ::com::sun::star::uno::Reference< - ::com::sun::star::container::XNameAccess >& rCommandToLabelMap ); }; class SvxMenuEntriesListBox : public SvTreeListBox @@ -694,7 +681,6 @@ public: void RestoreToolbar( SvxConfigEntry* pToolbar ); void RemoveToolbar( SvxConfigEntry* pToolbar ); void ApplyToolbar( SvxConfigEntry* pToolbar ); - void ReloadToolbar( const rtl::OUString& rURL ); rtl::OUString GetSystemUIName( const rtl::OUString& rResourceURL ); diff --git a/cui/source/inc/cfgutil.hxx b/cui/source/inc/cfgutil.hxx index e31303011..705edb0c6 100644 --- a/cui/source/inc/cfgutil.hxx +++ b/cui/source/inc/cfgutil.hxx @@ -139,12 +139,8 @@ public: ~SfxConfigFunctionListBox_Impl(); void ClearAll(); - SvLBoxEntry* GetEntry_Impl( USHORT nId ); - SvLBoxEntry* GetEntry_Impl( const String& ); - USHORT GetId( SvLBoxEntry *pEntry ); using Window::GetHelpText; String GetHelpText( SvLBoxEntry *pEntry ); - USHORT GetCurId() { return GetId( FirstSelected() ); } String GetCurCommand(); String GetCurLabel(); SfxMacroInfo* GetMacroInfo(); @@ -173,7 +169,6 @@ class SfxConfigGroupListBox_Impl : public SvTreeListBox Image GetImage( ::com::sun::star::uno::Reference< ::com::sun::star::script::browse::XBrowseNode > node, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xCtx, bool bIsRootNode, bool bHighContrast ); ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > getDocumentModel( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xCtx, ::rtl::OUString& docName ); - ::rtl::OUString parseLocationName( const ::rtl::OUString& location ); void InitModule(); void InitBasic(); diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx index 53a59dfb9..5d58f31eb 100644 --- a/cui/source/inc/chardlg.hxx +++ b/cui/source/inc/chardlg.hxx @@ -155,7 +155,6 @@ private: void Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp ); BOOL FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp ); void ResetColor_Impl( const SfxItemSet& rSet ); - BOOL FillItemSetColor_Impl( SfxItemSet& rSet ); DECL_LINK( UpdateHdl_Impl, Timer* ); DECL_LINK( FontModifyHdl_Impl, void* ); diff --git a/cui/source/inc/cuisrchdlg.hxx b/cui/source/inc/cuisrchdlg.hxx index 833d27a27..58ca9d8f9 100644 --- a/cui/source/inc/cuisrchdlg.hxx +++ b/cui/source/inc/cuisrchdlg.hxx @@ -67,7 +67,6 @@ public: virtual void Activate(); INT32 GetTransliterationFlags() const; - void SetTransliterationFlags( INT32 nSettings ); }; #endif diff --git a/cui/source/inc/dbregister.hxx b/cui/source/inc/dbregister.hxx index 3cccde182..a57e492db 100644 --- a/cui/source/inc/dbregister.hxx +++ b/cui/source/inc/dbregister.hxx @@ -95,13 +95,6 @@ namespace svx */ void openLinkDialog(const String& _sOldName,const String& _sOldLocation,SvLBoxEntry* _pEntry = NULL); - /** opens a file pciker to select a database file - @param _sLocation - If set, the file picker use it as default directory - @return - the location of the database file - */ - String getFileLocation(const String& _sLocation); #endif public: diff --git a/cui/source/inc/hangulhanjadlg.hxx b/cui/source/inc/hangulhanjadlg.hxx index cc9f8223f..d41d89a1a 100644 --- a/cui/source/inc/hangulhanjadlg.hxx +++ b/cui/source/inc/hangulhanjadlg.hxx @@ -152,7 +152,6 @@ namespace svx void SetIgnoreAllHdl( const Link& _rHdl ); void SetChangeHdl( const Link& _rHdl ); void SetChangeAllHdl( const Link& _rHdl ); - void SetOptionsHdl( const Link& _rHdl ); void SetClickByCharacterHdl( const Link& _rHdl ); void SetConversionFormatChangedHdl( const Link& _rHdl ); @@ -174,8 +173,6 @@ namespace svx editeng::HangulHanjaConversion::ConversionFormat GetConversionFormat( ) const; void SetByCharacter( sal_Bool _bByCharacter ); - sal_Bool GetByCharacter( ) const; - void SetConversionDirectionState( sal_Bool _bTryBothDirections, editeng::HangulHanjaConversion::ConversionDirection _ePrimaryConversionDirection ); // should text which does not match the primary conversion direction be ignored? diff --git a/cui/source/inc/hldocntp.hxx b/cui/source/inc/hldocntp.hxx index 77e4a5df7..a5ed2527c 100644 --- a/cui/source/inc/hldocntp.hxx +++ b/cui/source/inc/hldocntp.hxx @@ -53,8 +53,6 @@ private: DECL_LINK (ClickNewHdl_Impl , void * ); // Button : New Image GetImage( USHORT nId ); - void ReadURLFile( const String& rFile, String& rTitle, String& rURL, sal_Int32& rIconId, BOOL* pShowAsFolder);//, String* pFrame, String* pOpenAs, String* pDefTempl, String* pDefURL ); - //String ReadURL_Impl( Config& rURLFile, const DirEntry& rFile ); protected: void FillDlgFields ( String& aStrURL ); diff --git a/cui/source/inc/iconcdlg.hxx b/cui/source/inc/iconcdlg.hxx index d756588a6..4efc355c7 100644 --- a/cui/source/inc/iconcdlg.hxx +++ b/cui/source/inc/iconcdlg.hxx @@ -116,8 +116,6 @@ protected : USHORT GetSlot( USHORT nWhich ) const { return pSet->GetPool()->GetSlotId( nWhich ); } USHORT GetWhich( USHORT nSlot ) const { return pSet->GetPool()->GetWhich( nSlot ); } - const SfxPoolItem* GetOldItem( const SfxItemSet& rSet, USHORT nSlot ); - const SfxPoolItem* GetExchangeItem( const SfxItemSet& rSet, USHORT nSlot ); public : virtual ~IconChoicePage(); @@ -148,8 +146,6 @@ public : virtual BOOL IsReadOnly() const; virtual sal_Bool QueryClose(); - static const SfxPoolItem* GetItem( const SfxItemSet& rSet, USHORT nSlot ); - void StateChanged( StateChangedType nType ); void DataChanged( const DataChangedEvent& rDCEvt ); }; @@ -221,7 +217,6 @@ protected : void ResetPageImpl (); short Ok(); - BOOL IsInOK() const; public : @@ -242,17 +237,10 @@ public : // SvxIconChoiceCtrlEntry* AddTabPage( - USHORT nId, const String& rIconText, const Image& rChoiceIcon, - CreatePage pCreateFunc /* != NULL */, GetPageRanges pRangesFunc = NULL /* NULL allowed*/, - BOOL bItemsOnDemand = FALSE, ULONG nPos = LIST_APPEND ); - - SvxIconChoiceCtrlEntry* AddTabPage( USHORT nId, const String& rIconText, const Image& rChoiceIcon, const Image& rChoiceIconHC, CreatePage pCreateFunc /* != NULL */, GetPageRanges pRangesFunc = NULL /* NULL allowed*/, BOOL bItemsOnDemand = FALSE, ULONG nPos = LIST_APPEND ); - void RemoveTabPage( USHORT nId ); - void SetCurPageId( USHORT nId ) { mnCurrentPageId = nId; FocusOnIcon( nId ); } USHORT GetCurPageId() const { return mnCurrentPageId; } void ShowPage( USHORT nId ); @@ -261,8 +249,6 @@ public : const USHORT* GetInputRanges( const SfxItemPool& ); void SetInputSet( const SfxItemSet* pInSet ); const SfxItemSet* GetOutputItemSet() const { return pOutSet; } - const SfxItemSet* GetOutputItemSet( USHORT nId ); - int FillOutputItemSet(); const OKButton& GetOKButton() const { return aOKBtn; } OKButton& GetOKButton() { return aOKBtn; } @@ -271,18 +257,13 @@ public : const HelpButton& GetHelpButton() const { return aHelpBtn; } HelpButton& GetHelpButton() { return aHelpBtn; } - void RemoveResetButton(); - short Execute(); void Start( BOOL bShow = TRUE ); sal_Bool QueryClose(); const SfxItemSet* GetExampleSet() const { return pExampleSet; } - void SetCtrlColor ( const Color& rColor ); EIconChoicePos SetCtrlPos ( const EIconChoicePos& rPos ); - - void CreateIconTextAutoMnemonics( void ); }; #endif //_ICCDLG_HXX diff --git a/cui/source/inc/insdlg.hxx b/cui/source/inc/insdlg.hxx index 8930228eb..4ff1e1261 100644 --- a/cui/source/inc/insdlg.hxx +++ b/cui/source/inc/insdlg.hxx @@ -89,8 +89,6 @@ class SvInsertOleDlg : public InsertObjectDialog_Impl BOOL IsCreateNew() const { return aRbNewObject.IsChecked(); } public: - static void FillObjectServerList( SvObjectServerList* ); - SvInsertOleDlg( Window* pParent, const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xStorage, const SvObjectServerList* pServers = NULL ); diff --git a/cui/source/inc/macroass.hxx b/cui/source/inc/macroass.hxx index 688993e51..55fe62b24 100644 --- a/cui/source/inc/macroass.hxx +++ b/cui/source/inc/macroass.hxx @@ -60,7 +60,6 @@ class _SfxMacroTabPage : public SfxTabPage DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, AssignDeleteHdl_Impl, PushButton * ); DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, ChangeScriptHdl_Impl, RadioButton * ); - DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, GetFocus_Impl, Edit* ); DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, TimeOut_Impl, Timer* ); protected: @@ -86,19 +85,11 @@ public: virtual void ScriptChanged( const String& rLanguage ); virtual void PageCreated (SfxAllItemSet aSet); - // zum setzen / abfragen der Links - void SetGetRangeLink( FNGetRangeHdl pFn ); - FNGetRangeHdl GetGetRangeLink() const; - void SetGetMacrosOfRangeLink( FNGetMacrosOfRangeHdl pFn ); - FNGetMacrosOfRangeHdl GetGetMacrosOfRangeLink() const; - // --------- Erben aus der Basis ------------- virtual BOOL FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); - void SetReadOnly( BOOL bSet ); BOOL IsReadOnly() const; - void SelectEvent( const String& rEventName, USHORT nEventId ); }; inline const SvxMacroTableDtor& _SfxMacroTabPage::GetMacroTbl() const diff --git a/cui/source/inc/optimprove.hxx b/cui/source/inc/optimprove.hxx index f984f798c..f7f4b12a0 100644 --- a/cui/source/inc/optimprove.hxx +++ b/cui/source/inc/optimprove.hxx @@ -36,14 +36,6 @@ #include <sfx2/basedlgs.hxx> #include <sfx2/tabdlg.hxx> -// class SvxEmptyPage ---------------------------------------------------- - -class SvxEmptyPage : public TabPage -{ -public: - SvxEmptyPage( Window* pParent ); -}; - // class SvxImprovementPage ---------------------------------------------- class SvxImprovementPage : public TabPage @@ -105,7 +97,6 @@ public: virtual ~SvxImprovementOptionsPage(); static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); - static sal_uInt16* GetRanges(); virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); @@ -123,16 +114,5 @@ public: SvxImprovementDialog( Window* pParent, const String& rInfoURL ); }; -class SvxInfoWindow : public Window -{ -private: - FixedText m_aInfoText; - -public: - SvxInfoWindow( Window* pParent, const ResId& rResId ); - - void SetInfoText( const String& rText ); -}; - #endif diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx index 56a7f0025..806875ff3 100644 --- a/cui/source/inc/paragrph.hxx +++ b/cui/source/inc/paragrph.hxx @@ -135,7 +135,6 @@ public: void SetPageWidth( USHORT nPageWidth ); - void SetMaxDistance( USHORT nMaxDist ); void EnableRelativeMode(); void EnableRegisterMode(); void EnableAutoFirstLine(); diff --git a/cui/source/inc/scriptdlg.hxx b/cui/source/inc/scriptdlg.hxx index 709a8936e..acd537971 100644 --- a/cui/source/inc/scriptdlg.hxx +++ b/cui/source/inc/scriptdlg.hxx @@ -97,13 +97,7 @@ protected: void ExpandTree( SvLBoxEntry* pRootEntry ); virtual void RequestingChilds( SvLBoxEntry* pParent ); virtual void ExpandedHdl(); - SvLBoxEntry* FindEntry( SvLBoxEntry* pParent, const String& rText, BYTE nType ); virtual long ExpandingHdl(); - static BOOL dialogSort1( com::sun::star::uno::Reference< com::sun::star::script::browse::XBrowseNode > node1, - com::sun::star::uno::Reference< com::sun::star::script::browse::XBrowseNode > node2 ); - static BOOL dialogSort2( com::sun::star::uno::Reference< com::sun::star::script::browse::XBrowseNode > node1, - com::sun::star::uno::Reference< com::sun::star::script::browse::XBrowseNode > node2 ); - public: void Init( const ::rtl::OUString& language ); void RequestSubEntries( SvLBoxEntry* pRootEntry, ::com::sun::star::uno::Reference< ::com::sun::star::script::browse::XBrowseNode >& node, @@ -111,8 +105,6 @@ public: SFTreeListBox( Window* pParent, const ResId& rRes ); ~SFTreeListBox(); - void UpdateEntries(); - void ExpandAllTrees(); @@ -202,15 +194,12 @@ protected: BOOL getBoolProperty( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xProps, ::rtl::OUString& propName ); void CheckButtons( ::com::sun::star::uno::Reference< ::com::sun::star::script::browse::XBrowseNode >& node ); - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > getDocumentModel( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xCtx, ::rtl::OUString& docName ); - void createEntry( SvLBoxEntry* pEntry ); void renameEntry( SvLBoxEntry* pEntry ); void deleteEntry( SvLBoxEntry* pEntry ); ::com::sun::star::uno::Reference< ::com::sun::star::script::browse::XBrowseNode > getBrowseNode( SvLBoxEntry* pEntry ); ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > getModel( SvLBoxEntry* pEntry ); - void EnableButton( Button& rButton, BOOL bEnable ); String getListOfChildren( ::com::sun::star::uno::Reference< com::sun::star::script::browse::XBrowseNode > node, int depth ); void StoreCurrentSelection(); void RestorePreviousSelection(); diff --git a/cui/source/inc/selector.hxx b/cui/source/inc/selector.hxx index 7381d19df..e6f498695 100644 --- a/cui/source/inc/selector.hxx +++ b/cui/source/inc/selector.hxx @@ -115,13 +115,8 @@ public: SvxConfigFunctionListBox_Impl( Window*, const ResId& ); ~SvxConfigFunctionListBox_Impl(); void ClearAll(); - SvLBoxEntry* GetEntry_Impl( USHORT nId ); - SvLBoxEntry* GetEntry_Impl( const String& ); - USHORT GetId( SvLBoxEntry *pEntry ); String GetHelpText( SvLBoxEntry *pEntry ); using Window::GetHelpText; - USHORT GetCurId() - { return GetId( FirstSelected() ); } SvLBoxEntry* GetLastSelectedEntry(); void FunctionSelected(); @@ -235,7 +230,6 @@ public: void SetImageProvider( ImageProvider* provider ) { aCategories.SetImageProvider( provider ); } - USHORT GetSelectedId(); String GetScriptURL() const; String GetSelectedDisplayName(); String GetSelectedHelpText(); diff --git a/cui/source/inc/treeopt.hxx b/cui/source/inc/treeopt.hxx index 2689c0030..c337c17cd 100644 --- a/cui/source/inc/treeopt.hxx +++ b/cui/source/inc/treeopt.hxx @@ -336,12 +336,6 @@ private: public: ExtensionsTabPage( - Window* pParent, const ResId&, - const rtl::OUString& rPageURL, const rtl::OUString& rEvtHdl, - const com::sun::star::uno::Reference< - com::sun::star::awt::XContainerWindowProvider >& rProvider ); - - ExtensionsTabPage( Window* pParent, WinBits nStyle, const rtl::OUString& rPageURL, const rtl::OUString& rEvtHdl, const com::sun::star::uno::Reference< @@ -354,6 +348,5 @@ public: void ResetPage(); void SavePage(); - void HideWindow(); }; diff --git a/cui/source/inc/zoom.hxx b/cui/source/inc/zoom.hxx index d47c2347f..79092ee4b 100644 --- a/cui/source/inc/zoom.hxx +++ b/cui/source/inc/zoom.hxx @@ -99,16 +99,13 @@ public: SvxZoomDialog( Window* pParent, const SfxItemSet& rCoreSet ); ~SvxZoomDialog(); - static USHORT* GetRanges(); const SfxItemSet* GetOutputItemSet() const { return pOutSet; } USHORT GetFactor() const; void SetFactor( USHORT nNewFactor, USHORT nBtnId = 0 ); - void SetButtonText( USHORT nBtnId, const String& aNewTxt ); void HideButton( USHORT nBtnId ); void SetLimits( USHORT nMin, USHORT nMax ); - void SetSpinSize( USHORT nNewSpin ); }; #include <layout/layout-post.hxx> diff --git a/cui/source/options/connpoolsettings.cxx b/cui/source/options/connpoolsettings.cxx index 610cb2512..75f0cad8e 100644 --- a/cui/source/options/connpoolsettings.cxx +++ b/cui/source/options/connpoolsettings.cxx @@ -39,13 +39,6 @@ namespace offapp //= DriverPooling //==================================================================== //-------------------------------------------------------------------- - DriverPooling::DriverPooling() - :bEnabled(sal_False) - ,nTimeoutSeconds(0) - { - } - - //-------------------------------------------------------------------- DriverPooling::DriverPooling( const String& _rName, sal_Bool _bEnabled, const sal_Int32 _nTimeout ) :sName(_rName) ,bEnabled(_bEnabled) diff --git a/cui/source/options/connpoolsettings.hxx b/cui/source/options/connpoolsettings.hxx index a1e73443d..910eab82d 100644 --- a/cui/source/options/connpoolsettings.hxx +++ b/cui/source/options/connpoolsettings.hxx @@ -46,7 +46,6 @@ namespace offapp sal_Bool bEnabled; sal_Int32 nTimeoutSeconds; - DriverPooling(); DriverPooling( const String& _rName, sal_Bool _bEnabled, const sal_Int32 _nTimeout ); sal_Bool operator == (const DriverPooling& _rR) const; diff --git a/cui/source/options/cuisrchdlg.cxx b/cui/source/options/cuisrchdlg.cxx index df48317a5..2dab110b6 100644 --- a/cui/source/options/cuisrchdlg.cxx +++ b/cui/source/options/cuisrchdlg.cxx @@ -92,9 +92,3 @@ INT32 SvxJSearchOptionsDialog::GetTransliterationFlags() const { return pPage->GetTransliterationFlags(); } - - -void SvxJSearchOptionsDialog::SetTransliterationFlags( INT32 nSettings ) -{ - pPage->SetTransliterationFlags( nSettings ); -} diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx index f73435fce..51d941b44 100644 --- a/cui/source/options/dbregister.cxx +++ b/cui/source/options/dbregister.cxx @@ -425,60 +425,6 @@ void DbRegistrationOptionsPage::insertNewEntry( const ::rtl::OUString& _sName,co } // ----------------------------------------------------------------------------- -String DbRegistrationOptionsPage::getFileLocation(const String& _sLocation) -{ - try - { - rtl::OUString aService( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FilePicker" ) ); - Reference < XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() ); - Reference < XFilePicker > xFilePicker( xFactory->createInstance( aService ), UNO_QUERY ); - OSL_ENSURE(xFilePicker.is() ,"Could create file picker service!"); - Reference < XFilterManager> xFilterManager(xFilePicker,UNO_QUERY); - static const String s_sDatabaseType = String::CreateFromAscii("StarOffice XML (Base)"); - const SfxFilter* pFilter = SfxFilter::GetFilterByName( s_sDatabaseType); - if ( pFilter ) - { - xFilterManager->appendFilter( pFilter->GetUIName(),pFilter->GetDefaultExtension()); - xFilterManager->setCurrentFilter(pFilter->GetUIName()); - } - - INetURLObject aURL( _sLocation, INET_PROT_FILE ); - xFilePicker->setMultiSelectionMode(sal_False); - xFilePicker->setDisplayDirectory( aURL.GetMainURL( INetURLObject::NO_DECODE ) ); - short nRet = xFilePicker->execute(); - - if ( ExecutableDialogResults::OK == nRet ) - { - - // old path is an URL? - INetURLObject aObj( _sLocation ); - FASTBOOL bURL = ( aObj.GetProtocol() != INET_PROT_NOT_VALID ); - Sequence< ::rtl::OUString > aFiles = xFilePicker->getFiles(); - INetURLObject aNewObj( aFiles[0] ); - aNewObj.removeFinalSlash(); - - // then the new path also an URL else system path - String sNewLocation = bURL ? rtl::OUString(aFiles[0]) : aNewObj.getFSysPath( INetURLObject::FSYS_DETECT ); - - if ( -#ifdef UNX - // Unix is case sensitive - ( sNewLocation != _sLocation ) -#else - ( sNewLocation.CompareIgnoreCaseToAscii( _sLocation ) != COMPARE_EQUAL ) -#endif - ) - return sNewLocation; - } - } - catch( Exception& ) - { - DBG_ERRORFILE( "DbRegistrationOptionsPage::EditLocationHdl: exception from folder picker" ); - } - - return String(); -} -// ----------------------------------------------------------------------------- void DbRegistrationOptionsPage::openLinkDialog(const String& _sOldName,const String& _sOldLocation,SvLBoxEntry* _pEntry) { ODocumentLinkDialog aDlg(this,_pEntry == NULL); diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx index 100866b73..f18439b3d 100644..100755 --- a/cui/source/options/optdict.cxx +++ b/cui/source/options/optdict.cxx @@ -168,6 +168,7 @@ IMPL_LINK( SvxNewDictionaryDialog, OKHdl_Impl, Button *, EMPTYARG ) String aURL( linguistic::GetWritableDictionaryURL( sDict ) ); xNewDic = Reference< XDictionary > ( xDicList->createDictionary( sDict, aLocale, eType, aURL ) , UNO_QUERY ); + xNewDic->setActive( sal_True ); } DBG_ASSERT(xNewDic.is(), "NULL pointer"); } diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 41a459e3c..6ab8fe5d6 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -1159,51 +1159,6 @@ void OfaViewTabPage::Reset( const SfxItemSet& ) LINK( this, OfaViewTabPage, OnAntialiasingToggled ).Call( NULL ); #endif } -/* -----------------------------23.11.00 14:55-------------------------------- - - ---------------------------------------------------------------------------*/ -class LangConfigItem_Impl : public ConfigItem -{ - Any aValue; - OUString aPropertyName; -public: - LangConfigItem_Impl(const OUString& rTree, const OUString& rProperty); - ~LangConfigItem_Impl(); - - virtual void Commit(); - - const Any& GetValue() const {return aValue;} - void SetValue(Any& rValue) {aValue = rValue; SetModified();} -}; -/* -----------------------------23.11.00 15:06-------------------------------- - - ---------------------------------------------------------------------------*/ -LangConfigItem_Impl::LangConfigItem_Impl( - const OUString& rTree, const OUString& rProperty) : - ConfigItem(rTree), - aPropertyName(rProperty) -{ - Sequence<OUString> aNames(1); - aNames.getArray()[0] = aPropertyName; - Sequence<Any> aValues = GetProperties(aNames); - aValue = aValues.getConstArray()[0]; -} -/* -----------------------------23.11.00 15:06-------------------------------- - - ---------------------------------------------------------------------------*/ -LangConfigItem_Impl::~LangConfigItem_Impl() -{} -/* -----------------------------23.11.00 15:10-------------------------------- - - ---------------------------------------------------------------------------*/ -void LangConfigItem_Impl::Commit() -{ - Sequence<OUString> aNames(1); - aNames.getArray()[0] = aPropertyName; - Sequence<Any> aValues(1); - aValues.getArray()[0] = aValue; - PutProperties(aNames, aValues); -} /* -----------------22.07.2003 10:33----------------- --------------------------------------------------*/ diff --git a/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx index c7310bd3c..1c5cb9bd1 100644 --- a/cui/source/options/optgenrl.cxx +++ b/cui/source/options/optgenrl.cxx @@ -70,26 +70,6 @@ struct GeneralTabPage_Impl // ----------------------------------------------------------------------- -// kommt aus adritem.cxx -//CHINA001 extern String ConvertToStore_Impl( const String& ); -//copy from adritem.cxx, since it will leave in svx. -String ConvertToStore_Impl( const String& rText ) -{ - String sRet; - USHORT i = 0; - - while ( i < rText.Len() ) - { - if ( rText.GetChar(i) == '\\' || rText.GetChar(i) == '#' ) - sRet += '\\'; - sRet += rText.GetChar(i++); - } - return sRet; -} - - -// ----------------------------------------------------------------------- - SvxGeneralTabPage::SvxGeneralTabPage( Window* pParent, const SfxItemSet& rCoreSet ) : SfxTabPage( pParent, CUI_RES(RID_SFXPAGE_GENERAL), rCoreSet ), diff --git a/cui/source/options/optimprove.cxx b/cui/source/options/optimprove.cxx index f71f9b450..4dd20b8b5 100644 --- a/cui/source/options/optimprove.cxx +++ b/cui/source/options/optimprove.cxx @@ -197,31 +197,3 @@ IMPL_LINK( SvxImprovementDialog, HandleOK, OKButton*, EMPTYARG ) EndDialog( RET_OK ); return 0; } - -// class SvxInfoWindow --------------------------------------------------- - -SvxInfoWindow::SvxInfoWindow( Window* pParent, const ResId& rResId ) : - Window( pParent, rResId ), - m_aInfoText( this ) -{ - m_aInfoText.SetPosSizePixel( Point( 10, 10 ), Size( 150, 10 ) ); - - const StyleSettings& rSettings = GetSettings().GetStyleSettings(); - Wallpaper aWall( rSettings.GetWindowColor() ); - SetBackground( aWall ); - Font aNewFont( m_aInfoText.GetFont() ); - aNewFont.SetTransparent( TRUE ); - m_aInfoText.SetFont( aNewFont ); - m_aInfoText.SetBackground( aWall ); - m_aInfoText.SetControlForeground( rSettings.GetWindowTextColor() ); -} - -void SvxInfoWindow::SetInfoText( const String& rText ) -{ - m_aInfoText.SetText( rText ); - Size aSize = m_aInfoText.CalcMinimumSize(); - Size aWinSize = GetSizePixel(); - Point aPos( ( aWinSize.Width() - aSize.Width() ) / 2, ( aWinSize.Height() - aSize.Height() ) / 2 ); - m_aInfoText.SetPosSizePixel( aPos, aSize ); -} - diff --git a/cui/source/options/optimprove2.cxx b/cui/source/options/optimprove2.cxx index a0e246ce6..562280426 100644 --- a/cui/source/options/optimprove2.cxx +++ b/cui/source/options/optimprove2.cxx @@ -61,16 +61,6 @@ namespace uno = ::com::sun::star::uno; namespace util = ::com::sun::star::util; using namespace com::sun::star::system; -// class SvxEmptyPage ---------------------------------------------------- - -SvxEmptyPage::SvxEmptyPage( Window* pParent ) : - - TabPage( pParent, CUI_RES( RID_SVXPAGE_IMPROVEMENT ) ) - -{ - FreeResource(); -} - // class SvxImprovementOptionsPage --------------------------------------- SvxImprovementOptionsPage::SvxImprovementOptionsPage( Window* pParent, const SfxItemSet& rSet ) : @@ -164,11 +154,6 @@ SfxTabPage* SvxImprovementOptionsPage::Create( Window* pParent, const SfxItemSet return new SvxImprovementOptionsPage( pParent, rSet ); } -sal_uInt16* SvxImprovementOptionsPage::GetRanges() -{ - return NULL; -} - sal_Bool SvxImprovementOptionsPage::FillItemSet( SfxItemSet& /*rSet*/ ) { uno::Reference< lang::XMultiServiceFactory > xSMGR = ::comphelper::getProcessServiceFactory(); diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx index 6144bb40a..1c81914e9 100755..100644 --- a/cui/source/options/optinet2.cxx +++ b/cui/source/options/optinet2.cxx @@ -136,47 +136,6 @@ const char* SEARCHENGINE_GROUP = "SearchEngines-$(vlang)"; // ----------------------------------------------------------------------- -String lcl_MakeTabEntry(const SfxFilter* pFilter) -{ - String sEntry(pFilter->GetMimeType()); - sEntry += '\t'; - sEntry += pFilter->GetWildcard().GetWildCard(); - sEntry += '\t'; - sEntry += pFilter->GetName(); -#if defined(OS2) - sEntry += '\t'; - sEntry += pFilter->GetTypeName(); -#endif - return sEntry; -} - -// ----------------------------------------------------------------------- - -BOOL IsJavaInstalled_Impl( /*!!!SfxIniManager* pIniMgr*/ ) -{ - BOOL bRet = FALSE; -/*!!! (pb) needs new implementation - String aIniEntry; - String aFullName = Config::GetConfigName( pIniMgr->Get( SFX_KEY_USERCONFIG_PATH ), - String::CreateFromAscii("java") ); - INetURLObject aIniFileObj( aFullName, INET_PROT_FILE ); - String aIniPath = aIniFileObj.getName(); - if ( pIniMgr->SearchFile( aIniPath ) ) - { - Config aJavaCfg( aIniPath ); - aJavaCfg.SetGroup( "Java" ); - ByteString sTemp = aJavaCfg.ReadKey( ByteString(::rtl::OUStringToOString(pIniMgr->GetKeyName( SFX_KEY_JAVA_SYSTEMCLASSPATH ),RTL_TEXTENCODING_UTF8)) ); - String aJavaSystemClassPath = ::rtl::OStringToOUString(sTemp,RTL_TEXTENCODING_UTF8); - String aJavaRuntimeLib = ::rtl::OStringToOUString(aJavaCfg.ReadKey( "RuntimeLib" ),RTL_TEXTENCODING_UTF8); - if ( aJavaSystemClassPath.Len() && aJavaRuntimeLib.Len() ) - bRet = TRUE; - } -*/ - return bRet; -} - -// ----------------------------------------------------------------------- - void SvxNoSpaceEdit::KeyInput( const KeyEvent& rKEvent ) { if ( bOnlyNumeric ) @@ -1130,146 +1089,6 @@ IMPL_LINK( SvxSearchTabPage, SearchPartHdl_Impl, RadioButton *, EMPTYARG ) return 0; } -// ----------------------------------------------------------------------- - -/********************************************************************/ -/********************************************************************/ -/* */ -/* SvxOtherTabPage */ -/* */ -/********************************************************************/ -/********************************************************************/ - -/*-----------------15.05.97 09:51------------------- - ---------------------------------------------------*/ -/* -SvxPatternField::SvxPatternField( Window* pParent, const ResId& rResId ) : - - PatternField( pParent, rResId ), - - sMsg233 ( ResId( ST_MSG_233 ) ), - sMsg255 ( ResId( ST_MSG_255 ) ) - -{ - FreeResource(); - SelectFixedFont(); -} */ - -/*-----------------15.05.97 09:51------------------- - ---------------------------------------------------*/ - -/*void SvxPatternField::KeyInput( const KeyEvent& rKEvt ) -{ - PatternField::KeyInput( rKEvt ); - BOOL bDelete = ( rKEvt.GetKeyCode().GetCode() == KEY_DELETE ); - String sEntry( GetText() ); - sEntry[(USHORT)3] = '.'; - sEntry[(USHORT)7] = '.'; - sEntry[(USHORT)11] = '.'; - Selection aSelection( GetSelection() ); - String sPart( sEntry.GetToken( 0, '.' ) ); - USHORT i, nPart( sPart.EraseLeadingChars() ); - BOOL bSet = FALSE; - - if ( sPart.Len() && ( !nPart || nPart > 255 ) ) - { - // der erste Part darf nicht 0 und nicht gr"osser 255 sein - String sMsg( sPart ); - sMsg += ' '; - sMsg += sMsg233; - InfoBox( this, sMsg ).Execute(); - - if ( nPart == 0 ) - sPart = " 1"; - else - sPart = "255"; - sEntry.SetToken( 0, '.', sPart ); - bSet = TRUE; - }; - - for ( i = 1; i < 4; i++ ) - { - // die anderen Parts d"urfen nicht gr"osser 255 sein - sPart = sEntry.GetToken( i, '.' ); - nPart = sPart.EraseLeadingChars(); - - if ( nPart > 255 ) - { - String sMsg( sPart ); - sMsg += ' '; - sMsg += sMsg255; - InfoBox( this, sMsg ).Execute(); - - if ( nPart == 0 ) - sPart = " 1"; - else - sPart = "255"; - sEntry.SetToken( i, '.', sPart ); - bSet = TRUE; - }; - } - - if ( bSet ) - { - SetText( sEntry ); - SetSelection( aSelection ); - } -} -*/ -// ----------------------------------------------------------------------- -#if 0 -long SvxPatternField::Notify( NotifyEvent& rNEvt ) -{ - return PatternField::Notify( rNEvt ); -/*! long nHandled = 0; - - if ( rNEvt.GetType() == EVENT_KEYUP ) - { - const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); - KeyInput( *pKEvt ); - nHandled = 1; - } - return nHandled;*/ -} -#endif - -// class JavaScriptDisableQueryBox_Impl -------------------------------------- - -class JavaScriptDisableQueryBox_Impl : public ModalDialog -{ -private: - FixedImage aImage; - FixedText aWarningFT; - CheckBox aDisableCB; - OKButton aYesBtn; - CancelButton aNoBtn; - -public: - JavaScriptDisableQueryBox_Impl( Window* pParent ); - - BOOL IsWarningDisabled() const { return aDisableCB.IsChecked(); } -}; - -JavaScriptDisableQueryBox_Impl::JavaScriptDisableQueryBox_Impl( Window* pParent ) : - - ModalDialog( pParent, CUI_RES( RID_SVXDLG_OPT_JAVASCRIPT_DISABLE ) ), - - aImage ( this, CUI_RES( IMG_JSCPT_WARNING ) ), - aWarningFT ( this, CUI_RES( FT_JSCPT_WARNING ) ), - aDisableCB ( this, CUI_RES( CB_JSCPT_DISABLE ) ), - aYesBtn ( this, CUI_RES( BTN_JSCPT_YES ) ), - aNoBtn ( this, CUI_RES( BTN_JSCPT_NO ) ) - -{ - FreeResource(); - - aYesBtn.SetText( Button::GetStandardText( BUTTON_YES ) ); - aNoBtn.SetText( Button::GetStandardText( BUTTON_NO ) ); - aImage.SetImage( WarningBox::GetStandardImage() ); -} - //#98647#---------------------------------------------- void SvxScriptExecListBox::RequestHelp( const HelpEvent& rHEvt ) { // try to show tips just like as on toolbars @@ -1645,25 +1464,6 @@ int SvxSecurityTabPage::DeactivatePage( SfxItemSet* _pSet ) namespace { -/* bool Enable( const SvtSecurityOptions& _rOpt, SvtSecurityOptions::EOption _eOpt, Control& _rCtrl, FixedImage& _rImg ) - { - bool b = _rOpt.IsOptionEnabled( _eOpt ); - _rCtrl.Enable( b ); - _Img.Show( !b ); - return b; - } -*/ - bool EnableAndSet( const SvtSecurityOptions& _rOpt, SvtSecurityOptions::EOption _eOpt, - CheckBox& _rCtrl, FixedImage& _rImg ) - { -// bool b = Enable( _rOpt, _eOpt, _rCtrl, _rImg ); - bool b = _rOpt.IsOptionEnabled( _eOpt ); - _rCtrl.Enable( b ); - _rImg.Show( !b ); - _rCtrl.Check( _rOpt.IsOptionSet( _eOpt ) ); - return b; - } - bool CheckAndSave( SvtSecurityOptions& _rOpt, SvtSecurityOptions::EOption _eOpt, const bool _bIsChecked, bool& _rModfied ) { bool bModified = false; diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx index 1e784fec2..702ad5ac7 100644 --- a/cui/source/options/optjava.cxx +++ b/cui/source/options/optjava.cxx @@ -65,56 +65,6 @@ using namespace ::com::sun::star::ucb; using namespace ::com::sun::star::ui::dialogs; using namespace ::com::sun::star::uno; -// class SvxJavaTable ---------------------------------------------------- - -SvxJavaTable::SvxJavaTable( Window* _pParent, const ResId& _rId ) : - - SvxSimpleTable( _pParent, _rId ) - -{ -} - -SvxJavaTable::~SvxJavaTable() -{ -} - -void SvxJavaTable::SetTabs() -{ - SvxSimpleTable::SetTabs(); -/* - USHORT nAdjust = SV_LBOXTAB_ADJUST_RIGHT | SV_LBOXTAB_ADJUST_LEFT | - SV_LBOXTAB_ADJUST_CENTER | SV_LBOXTAB_ADJUST_NUMERIC | SV_LBOXTAB_FORCE; - if ( aTabs.Count() > 0 ) - { - SvLBoxTab* pTab = (SvLBoxTab*)aTabs.GetObject(0); - pTab->nFlags &= ~nAdjust; - pTab->nFlags |= SV_LBOXTAB_PUSHABLE | SV_LBOXTAB_ADJUST_CENTER | SV_LBOXTAB_FORCE; - } -*/ -} - -void SvxJavaTable::MouseButtonUp( const MouseEvent& _rMEvt ) -{ - m_aCurMousePoint = _rMEvt.GetPosPixel(); - SvxSimpleTable::MouseButtonUp( _rMEvt ); -} - -void SvxJavaTable::KeyInput( const KeyEvent& rKEvt ) -{ - if ( !rKEvt.GetKeyCode().GetModifier() && KEY_SPACE == rKEvt.GetKeyCode().GetCode() ) - { - SvLBoxEntry* pEntry = FirstSelected(); - if ( GetCheckButtonState( pEntry ) == SV_BUTTON_UNCHECKED ) - { - SetCheckButtonState( pEntry, SV_BUTTON_CHECKED ); - GetCheckButtonHdl().Call( NULL ); - return ; - } - } - - SvxSimpleTable::KeyInput( rKEvt ); -} - // ----------------------------------------------------------------------- bool areListsEqual( const Sequence< ::rtl::OUString >& rListA, const Sequence< ::rtl::OUString >& rListB ) diff --git a/cui/source/options/optjava.hxx b/cui/source/options/optjava.hxx index 1914b7ebc..d74b21b41 100644 --- a/cui/source/options/optjava.hxx +++ b/cui/source/options/optjava.hxx @@ -47,27 +47,6 @@ typedef struct _JavaInfo JavaInfo; class SvxJavaParameterDlg; class SvxJavaClassPathDlg; -// class SvxJavaTable ---------------------------------------------------- - -class SvxJavaTable : public SvxSimpleTable -{ - using SvxSimpleTable::SetTabs; -private: - Point m_aCurMousePoint; - -protected: - virtual void SetTabs(); - virtual void MouseButtonUp( const MouseEvent& _rMEvt ); - virtual void KeyInput( const KeyEvent& rKEvt ); - -public: - SvxJavaTable( Window* _pParent, const ResId& _rId ); - ~SvxJavaTable(); - - - inline Point GetCurMousePoint() { return m_aCurMousePoint; } -}; - // class SvxJavaOptionsPage ---------------------------------------------- class SvxJavaOptionsPage : public SfxTabPage diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx index e0e832e39..8c52d9a40 100644 --- a/cui/source/options/optsave.cxx +++ b/cui/source/options/optsave.cxx @@ -78,37 +78,6 @@ using rtl::OUString; #define WININDEX_AUTOSAVE ((USHORT)6) #define WININDEX_SAVEURL_RELFSYS ((USHORT)9) -// -------------------- -------------------------------------------------- -class FilterWarningDialog_Impl : public ModalDialog -{ - OKButton aOk; - CancelButton aCancel; - FixedImage aImage; - FixedInfo aFilterWarningFT; - - public: - FilterWarningDialog_Impl(Window* pParent); - - void SetFilterName(const String& rFilterUIName); -}; -// ---------------------------------------------------------------------- -FilterWarningDialog_Impl::FilterWarningDialog_Impl(Window* pParent) : - ModalDialog(pParent, CUI_RES( RID_SVXDLG_FILTER_WARNING ) ), - aOk( this, CUI_RES(PB_OK )), - aCancel( this, CUI_RES(PB_CANCEL )), - aImage( this, CUI_RES(IMG_WARNING )), - aFilterWarningFT( this, CUI_RES(FT_FILTER_WARNING )) -{ - FreeResource(); - aImage.SetImage(WarningBox::GetStandardImage()); -} -// ---------------------------------------------------------------------- -void FilterWarningDialog_Impl::SetFilterName(const String& rFilterUIName) -{ - String sTmp(aFilterWarningFT.GetText()); - sTmp.SearchAndReplaceAscii("%1", rFilterUIName); - aFilterWarningFT.SetText(sTmp); -} // ---------------------------------------------------------------------- #ifdef FILTER_WARNING_ENABLED class SvxAlienFilterWarningConfig_Impl : public utl::ConfigItem @@ -324,23 +293,6 @@ SfxTabPage* SfxSaveTabPage::Create( Window* pParent, return ( new SfxSaveTabPage( pParent, rAttrSet ) ); } -/* -----------------------------05.04.01 13:10-------------------------------- - - ---------------------------------------------------------------------------*/ -OUString lcl_ExtractUIName(const Sequence<PropertyValue> rProperties) -{ - OUString sRet; - const PropertyValue* pProperties = rProperties.getConstArray(); - for(int nProp = 0; nProp < rProperties.getLength(); nProp++) - { - if(!pProperties[nProp].Name.compareToAscii("UIName")) - { - pProperties[nProp].Value >>= sRet; - break; - } - } - return sRet; -} // ----------------------------------------------------------------------- bool SfxSaveTabPage::AcceptFilter( USHORT nPos ) { diff --git a/cui/source/options/sdbcdriverenum.cxx b/cui/source/options/sdbcdriverenum.cxx index 34289b9b2..f1e6b9525 100644 --- a/cui/source/options/sdbcdriverenum.cxx +++ b/cui/source/options/sdbcdriverenum.cxx @@ -115,13 +115,6 @@ namespace offapp { return m_pImpl->getDriverImplNames().end(); } - - //-------------------------------------------------------------------- - sal_Int32 ODriverEnumeration::size() const throw() - { - return m_pImpl->getDriverImplNames().size(); - } - //........................................................................ } // namespace offapp //........................................................................ diff --git a/cui/source/options/sdbcdriverenum.hxx b/cui/source/options/sdbcdriverenum.hxx index e8b03b273..60f6eb6b9 100644 --- a/cui/source/options/sdbcdriverenum.hxx +++ b/cui/source/options/sdbcdriverenum.hxx @@ -64,7 +64,6 @@ namespace offapp const_iterator begin() const throw(); const_iterator end() const throw(); - sal_Int32 size() const throw(); }; //........................................................................ diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 257d44d98..fa11d7bcd 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -40,6 +40,7 @@ #include <com/sun/star/frame/XLoadable.hpp> #include <tools/rcid.h> #include <tools/shl.hxx> +#include <tools/urlobj.hxx> #include <comphelper/processfactory.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <com/sun/star/beans/PropertyValue.hpp> @@ -2709,22 +2710,6 @@ short OfaTreeOptionsDialog::Execute() // class ExtensionsTabPage ----------------------------------------------- ExtensionsTabPage::ExtensionsTabPage( - Window* pParent, const ResId& rResId, const rtl::OUString& rPageURL, - const rtl::OUString& rEvtHdl, const Reference< awt::XContainerWindowProvider >& rProvider ) : - - TabPage( pParent, rResId ), - - m_sPageURL ( rPageURL ), - m_sEventHdl ( rEvtHdl ), - m_xWinProvider ( rProvider ), - m_bIsWindowHidden ( false ) - -{ -} - -// ----------------------------------------------------------------------- - -ExtensionsTabPage::ExtensionsTabPage( Window* pParent, WinBits nStyle, const rtl::OUString& rPageURL, const rtl::OUString& rEvtHdl, const Reference< awt::XContainerWindowProvider >& rProvider ) : @@ -2862,15 +2847,3 @@ void ExtensionsTabPage::SavePage() { DispatchAction( C2U("ok") ); } - -// ----------------------------------------------------------------------- - -void ExtensionsTabPage::HideWindow() -{ - if ( !m_bIsWindowHidden && m_xPage.is() ) - { - m_xPage->setVisible( sal_False ); - m_bIsWindowHidden = true; - } -} - diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx index 48aac82fb..08e05d1ac 100644 --- a/cui/source/tabpages/border.cxx +++ b/cui/source/tabpages/border.cxx @@ -155,17 +155,6 @@ Color TpBorderRGBColor( ColorData aColorData ) } // ----------------------------------------------------------------------- - -Color TpBorderRGBColor( const Color& rColor ) -{ - Color aRGBColor( rColor.GetRed(), - rColor.GetGreen(), - rColor.GetBlue() ); - - return( aRGBColor ); -} - -// ----------------------------------------------------------------------- void lcl_SetDecimalDigitsTo1(MetricField& rField) { sal_Int64 nMin = rField.Denormalize( rField.GetMin( FUNIT_TWIP ) ); diff --git a/cui/source/tabpages/borderconn.cxx b/cui/source/tabpages/borderconn.cxx index b25aef2f1..c56061927 100644 --- a/cui/source/tabpages/borderconn.cxx +++ b/cui/source/tabpages/borderconn.cxx @@ -283,13 +283,6 @@ sfx::ItemConnectionBase* CreateFrameLineConnection( USHORT nSlot, return new FrameLineConnection( nSlot, new FrameSelectorWrapper( rFrameSel, eBorder ), nFlags ); } -sfx::ItemConnectionBase* CreateFrameBoxConnection( USHORT /*nBoxSlot*/, USHORT /*nBoxInfoSlot*/, - FrameSelector& /*rFrameSel*/, FrameBorderType /*eBorder*/, sfx::ItemConnFlags /*nFlags*/ ) -{ - DBG_ERRORFILE( "svx::CreateFrameBoxConnection - not implemented" ); - return 0; -} - sfx::ItemConnectionBase* CreateMarginConnection( const SfxItemSet& rItemSet, MetricField& rMfLeft, MetricField& rMfRight, MetricField& rMfTop, MetricField& rMfBottom, diff --git a/cui/source/tabpages/borderconn.hxx b/cui/source/tabpages/borderconn.hxx index fa2d8e872..235840eec 100644 --- a/cui/source/tabpages/borderconn.hxx +++ b/cui/source/tabpages/borderconn.hxx @@ -48,13 +48,6 @@ sfx::ItemConnectionBase* CreateFrameLineConnection( USHORT nSlot, FrameSelector& rFrameSel, FrameBorderType eBorder, sfx::ItemConnFlags nFlags = sfx::ITEMCONN_DEFAULT ); -/** Creates an item connection object that connects an SvxBoxItem and an - SvxBoxInfoItem with an svx::FrameSelector control. */ -sfx::ItemConnectionBase* CreateFrameBoxConnection( - USHORT nBoxSlot, USHORT nBoxInfoSlot, - FrameSelector& rFrameSel, FrameBorderType eBorder, - sfx::ItemConnFlags nFlags = sfx::ITEMCONN_DEFAULT ); - /** Creates an item connection object that connects an SvxMarginItem with the controls of the SvxBorderTabPage. */ sfx::ItemConnectionBase* CreateMarginConnection( const SfxItemSet& rItemSet, diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index 76d49acff..7a06dccb7 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -1523,47 +1523,6 @@ void SvxCharNamePage::ResetColor_Impl( const SfxItemSet& rSet ) // ----------------------------------------------------------------------- -BOOL SvxCharNamePage::FillItemSetColor_Impl( SfxItemSet& rSet ) -{ - USHORT nWhich = GetWhich( SID_ATTR_CHAR_COLOR ); - const SvxColorItem* pOld = (const SvxColorItem*)GetOldItem( rSet, SID_ATTR_CHAR_COLOR ); - const SvxColorItem* pItem = NULL; - BOOL bChanged = TRUE; - const SfxItemSet* pExampleSet = GetTabDialog() ? GetTabDialog()->GetExampleSet() : NULL; - const SfxItemSet& rOldSet = GetItemSet(); - - Color aSelectedColor; - if ( m_pColorLB->GetSelectEntry() == m_pImpl->m_aTransparentText ) - aSelectedColor = Color( COL_TRANSPARENT ); - else - aSelectedColor = m_pColorLB->GetSelectEntryColor(); - - if ( pOld && pOld->GetValue() == aSelectedColor ) - bChanged = FALSE; - - if ( !bChanged ) - bChanged = ( m_pColorLB->GetSavedValue() == LISTBOX_ENTRY_NOTFOUND ); - - if ( !bChanged && pExampleSet && - pExampleSet->GetItemState( nWhich, FALSE, (const SfxPoolItem**)&pItem ) == SFX_ITEM_SET && - ( (SvxColorItem*)pItem )->GetValue() != aSelectedColor ) - bChanged = TRUE; - - BOOL bModified = FALSE; - - if ( bChanged && m_pColorLB->GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND ) - { - rSet.Put( SvxColorItem( aSelectedColor, nWhich ) ); - bModified = TRUE; - } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) - CLEARTITEM; - - return bModified; -} - -// ----------------------------------------------------------------------- - IMPL_LINK( SvxCharNamePage, UpdateHdl_Impl, Timer*, EMPTYARG ) { UpdatePreview_Impl(); @@ -1656,7 +1615,6 @@ BOOL SvxCharNamePage::FillItemSet( SfxItemSet& rSet ) BOOL bModified = FillItemSet_Impl( rSet, Western ); bModified |= FillItemSet_Impl( rSet, Asian ); bModified |= FillItemSet_Impl( rSet, Ctl ); -//! bModified |= FillItemSetColor_Impl( rSet ); return bModified; } diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx index 345bbd0cd..68242aeff 100644 --- a/cui/source/tabpages/macroass.cxx +++ b/cui/source/tabpages/macroass.cxx @@ -237,26 +237,6 @@ void _SfxMacroTabPage::ScriptChanged( const String& aLangName ) EnableButtons( aLangName ); } -void _SfxMacroTabPage::SetGetRangeLink( FNGetRangeHdl pFn ) -{ - mpImpl->fnGetRange = pFn; -} - -FNGetRangeHdl _SfxMacroTabPage::GetGetRangeLink() const -{ - return mpImpl->fnGetRange; -} - -void _SfxMacroTabPage::SetGetMacrosOfRangeLink( FNGetMacrosOfRangeHdl pFn ) -{ - mpImpl->fnGetMacroOfRange = pFn; -} - -FNGetMacrosOfRangeHdl _SfxMacroTabPage::GetGetMacrosOfRangeLink() const -{ - return mpImpl->fnGetMacroOfRange; -} - BOOL _SfxMacroTabPage::FillItemSet( SfxItemSet& rSet ) { SvxMacroItem aItem( GetWhich( aPageRg[0] ) ); @@ -313,11 +293,6 @@ void _SfxMacroTabPage::Reset( const SfxItemSet& rSet ) rListBox.SetCurEntry( pE ); } -void _SfxMacroTabPage::SetReadOnly( BOOL bSet ) -{ - mpImpl->bReadOnly = bSet; -} - BOOL _SfxMacroTabPage::IsReadOnly() const { return mpImpl->bReadOnly; @@ -392,12 +367,6 @@ IMPL_STATIC_LINK( _SfxMacroTabPage, SelectMacro_Impl, ListBox*, EMPTYARG ) return 0; } -IMPL_STATIC_LINK( _SfxMacroTabPage, GetFocus_Impl, Edit*, EMPTYARG ) -{ - pThis->EnableButtons( DEFINE_CONST_UNICODE("JavaScript") ); - return 0; -} - IMPL_STATIC_LINK( _SfxMacroTabPage, AssignDeleteHdl_Impl, PushButton*, pBtn ) { _SfxMacroTabPage_Impl* pImpl = pThis->mpImpl; @@ -580,24 +549,6 @@ void _SfxMacroTabPage::FillEvents() } } -void _SfxMacroTabPage::SelectEvent( const String & /*rEventName*/, USHORT nEventId ) -{ - SvHeaderTabListBox& rListBox = mpImpl->pEventLB->GetListBox(); - ULONG nEntryCnt = rListBox.GetEntryCount(); - - for( ULONG n = 0 ; n < nEntryCnt ; ++n ) - { - SvLBoxEntry* pE = rListBox.GetEntry( n ); - if( pE && ( USHORT ) ( ULONG ) pE->GetUserData() == nEventId ) - { - rListBox.SetCurEntry( pE ); - rListBox.MakeVisible( pE ); - break; - } - } -} - - SvStringsDtor* __EXPORT _ImpGetRangeHdl( _SfxMacroTabPage* /*pTbPg*/, const String& rLanguage ) { SvStringsDtor* pNew = new SvStringsDtor; diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 368859a5a..bec08cd8a 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -939,28 +939,6 @@ void SvxNumPickTabPage::PageCreated(SfxAllItemSet aSet) SetCharFmtNames( pNumCharFmt->GetValue(),pBulletCharFmt->GetValue()); } //end of CHINA001 -/*-----------------07.02.97 15.59------------------- - ---------------------------------------------------*/ -void lcl_PaintLevel(OutputDevice* pVDev, sal_Int16 nNumberingType, - const OUString& rBulletChar, const OUString& rText, const OUString& rFontName, - Point& rLeft, Font& rRuleFont, const Font& rTextFont) -{ - - if(NumberingType::CHAR_SPECIAL == nNumberingType ) - { - rRuleFont.SetStyleName(rFontName); - pVDev->SetFont(rRuleFont); - pVDev->DrawText(rLeft, rBulletChar); - rLeft.X() += pVDev->GetTextWidth(rBulletChar); - } - else - { - pVDev->SetFont(rTextFont); - pVDev->DrawText(rLeft, rText); - rLeft.X() += pVDev->GetTextWidth(rText); - } -} /**************************************************************************/ /* */ diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index d500078e8..c1e5471fc 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -957,13 +957,6 @@ void SvxStdParagraphTabPage::SetPageWidth( USHORT nPageWidth ) { nWidth = nPageWidth; } -/*-----------------16.01.97 18.01------------------- - ---------------------------------------------------*/ -void SvxStdParagraphTabPage::SetMaxDistance( USHORT nMaxDist ) -{ - nAbst = nMaxDist; -} /*-----------------17.01.97 08.11------------------- diff --git a/extensions/source/config/ldap/ldapaccess.cxx b/extensions/source/config/ldap/ldapaccess.cxx index acb95c690..b146c0eaa 100644 --- a/extensions/source/config/ldap/ldapaccess.cxx +++ b/extensions/source/config/ldap/ldapaccess.cxx @@ -279,7 +279,7 @@ void LdapConnection::loadModule() { if ( !s_Ldap_Module ) { -#if defined(WIN) || defined(WNT) +#if defined(WNT) # define LIBLDAP "nsldap32v50.dll" #else # ifdef WITH_OPENLDAP diff --git a/extensions/source/nsplugin/source/so_env.cxx b/extensions/source/nsplugin/source/so_env.cxx index 325c64cf8..7544c5ab0 100644 --- a/extensions/source/nsplugin/source/so_env.cxx +++ b/extensions/source/nsplugin/source/so_env.cxx @@ -204,7 +204,9 @@ int nspluginOOoModuleHook (void** aResult) strcpy (realFileName, libFileName); } + #if OSL_DEBUG_LEVEL > 1 fprintf (stderr, "OpenOffice path before fixup is '%s'\n", realFileName); + #endif if (realFileName[0] != '/') { /* a relative sym-link and we need to get an absolute path */ @@ -223,7 +225,9 @@ int nspluginOOoModuleHook (void** aResult) *aResult = realFileName; + #if OSL_DEBUG_LEVEL > 1 fprintf (stderr, "OpenOffice path is '%s'\n", realFileName); + #endif return 0; } diff --git a/extensions/source/ole/oleobjw.cxx b/extensions/source/ole/oleobjw.cxx index 1aadd37b2..7a73ed7e6 100644..100755 --- a/extensions/source/ole/oleobjw.cxx +++ b/extensions/source/ole/oleobjw.cxx @@ -69,6 +69,7 @@ using namespace boost; using namespace osl; using namespace rtl; using namespace cppu; +using namespace com::sun::star::script; using namespace com::sun::star::lang; using namespace com::sun::star::bridge; using namespace com::sun::star::bridge::oleautomation; @@ -108,7 +109,7 @@ IUnknownWrapper_Impl::IUnknownWrapper_Impl( Reference<XMultiServiceFactory>& xFa sal_uInt8 unoWrapperClass, sal_uInt8 comWrapperClass): UnoConversionUtilities<IUnknownWrapper_Impl>( xFactory, unoWrapperClass, comWrapperClass), m_pxIdlClass( NULL), m_eJScript( JScriptUndefined), - m_bComTlbIndexInit(false) + m_bComTlbIndexInit(false), m_bHasDfltMethod(false), m_bHasDfltProperty(false) { } @@ -147,17 +148,15 @@ IUnknownWrapper_Impl::~IUnknownWrapper_Impl() Any IUnknownWrapper_Impl::queryInterface(const Type& t) throw (RuntimeException) { - if (t == getCppuType(static_cast<Reference<XInvocation>*>( 0))) - { - if (m_spDispatch) - return WeakImplHelper4<XInvocation, XBridgeSupplier2, - XInitialization, XAutomationObject>::queryInterface(t); - else - return Any(); - } - - return WeakImplHelper4<XInvocation, XBridgeSupplier2, - XInitialization, XAutomationObject>::queryInterface(t); + if (t == getCppuType(static_cast<Reference<XDefaultMethod>*>( 0)) && !m_bHasDfltMethod ) + return Any(); + if (t == getCppuType(static_cast<Reference<XDefaultProperty>*>( 0)) && !m_bHasDfltProperty ) + return Any(); + if (t == getCppuType(static_cast<Reference<XInvocation>*>( 0)) && !m_spDispatch) + return Any(); + + return WeakImplHelper6<XInvocation, XBridgeSupplier2, + XInitialization, XAutomationObject, XDefaultProperty, XDefaultMethod>::queryInterface(t); } Reference<XIntrospectionAccess> SAL_CALL IUnknownWrapper_Impl::getIntrospection(void) @@ -1194,6 +1193,68 @@ void SAL_CALL IUnknownWrapper_Impl::initialize( const Sequence< Any >& aArgument aArguments[1] >>= m_bOriginalDispatch; aArguments[2] >>= m_seqTypes; + + ITypeInfo* pType = NULL; + try + { + // a COM object implementation that has no TypeInfo is still a legal COM object; + // such objects can at least be transported through UNO using the bridge + // so we should allow to create wrappers for them as well + pType = getTypeInfo(); + } + catch( BridgeRuntimeError& ) + {} + catch( Exception& ) + {} + + if ( pType ) + { + try + { + // Get Default member + CComBSTR defaultMemberName; + if ( SUCCEEDED( pType->GetDocumentation(0, &defaultMemberName, 0, 0, 0 ) ) ) + { + OUString usName(reinterpret_cast<const sal_Unicode*>(LPCOLESTR(defaultMemberName))); + FuncDesc aDescGet(pType); + FuncDesc aDescPut(pType); + VarDesc aVarDesc(pType); + // see if this is a property first ( more likely to be a property then a method ) + getPropDesc( usName, & aDescGet, & aDescPut, & aVarDesc); + + if ( !aDescGet && !aDescPut ) + { + getFuncDesc( usName, &aDescGet ); + if ( !aDescGet ) + throw BridgeRuntimeError( OUSTR("[automation bridge]IUnknownWrapper_Impl::initialize() Failed to get Function or Property desc. for " ) + usName ); + } + // now for some funny heuristics to make basic understand what to do + // a single aDescGet ( that doesn't take any params ) would be + // a read only ( defaultmember ) property e.g. this object + // should implement XDefaultProperty + // a single aDescGet ( that *does* ) take params is basically a + // default method e.g. implement XDefaultMethod + + // a DescPut ( I guess we only really support a default param with '1' param ) as a setValue ( but I guess we can leave it through, the object will fail if we don't get it right anyway ) + if ( aDescPut || ( aDescGet && aDescGet->cParams == 0 ) ) + m_bHasDfltProperty = true; + if ( aDescGet->cParams > 0 ) + m_bHasDfltMethod = true; + if ( m_bHasDfltProperty || m_bHasDfltMethod ) + m_sDefaultMember = usName; + } + } + catch ( BridgeRuntimeError & e ) + { + throw RuntimeException( e.message, Reference<XInterface>() ); + } + catch( Exception& e ) + { + throw RuntimeException( + OUSTR("[automation bridge] unexpected exception in IUnknownWrapper_Impl::initialiase() error message: \n") + e.Message, + Reference<XInterface>() ); + } + } } // UnoConversionUtilities -------------------------------------------------------------------------------- @@ -1445,6 +1506,9 @@ Any IUnknownWrapper_Impl::invokeWithDispIdComTlb(const OUString& sFuncName, arDispidNamedArgs.reset(new DISPID[nSizeAr]); HRESULT hr = getTypeInfo()->GetIDsOfNames(arNames, nSizeAr, arDispidNamedArgs.get()); + if ( hr == E_NOTIMPL ) + hr = m_spDispatch->GetIDsOfNames(IID_NULL, arNames, nSizeAr, LOCALE_USER_DEFAULT, arDispidNamedArgs.get() ); + if (hr == S_OK) { // In a "property put" operation, the property value is a named param with the diff --git a/extensions/source/ole/oleobjw.hxx b/extensions/source/ole/oleobjw.hxx index dfc88a50c..334fb18e5 100644 --- a/extensions/source/ole/oleobjw.hxx +++ b/extensions/source/ole/oleobjw.hxx @@ -50,11 +50,14 @@ #endif #include <cppuhelper/implbase3.hxx> #include <cppuhelper/implbase4.hxx> +#include <cppuhelper/implbase6.hxx> #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/bridge/oleautomation/XAutomationObject.hpp> #include <rtl/ustring.hxx> +#include <com/sun/star/script/XDefaultProperty.hpp> +#include <com/sun/star/script/XDefaultMethod.hpp> #include <typelib/typedescription.hxx> #include "unoconversionutilities.hxx" @@ -78,7 +81,8 @@ typedef hash_multimap<OUString, unsigned int, hashOUString_Impl, equalOUString_I // This class wraps an IDispatch and maps XInvocation calls to IDispatch calls on the wrapped object. // If m_TypeDescription is set then this class represents an UNO interface implemented in a COM component. // The interface is not a real interface in terms of an abstract class but is realized through IDispatch. -class IUnknownWrapper_Impl : public WeakImplHelper4<XInvocation, XBridgeSupplier2, XInitialization, XAutomationObject>, +class IUnknownWrapper_Impl : public WeakImplHelper6<XInvocation, XBridgeSupplier2, XInitialization, XAutomationObject, XDefaultProperty, XDefaultMethod>, + public UnoConversionUtilities<IUnknownWrapper_Impl> { @@ -126,8 +130,10 @@ public: // XInitialization virtual void SAL_CALL initialize( const Sequence< Any >& aArguments ) throw(Exception, RuntimeException); + virtual ::rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (::com::sun::star::uno::RuntimeException) { return m_sDefaultMember; } protected: - + virtual ::rtl::OUString SAL_CALL getDefaultMethodName( ) throw (::com::sun::star::uno::RuntimeException) { return m_sDefaultMember; } + // ---------------------------------------------------------------------------- virtual Any invokeWithDispIdUnoTlb(const OUString& sFunctionName, const Sequence< Any >& Params, @@ -253,6 +259,9 @@ protected: bool m_bComTlbIndexInit; // Keeps the ITypeInfo obtained from IDispatch::GetTypeInfo CComPtr< ITypeInfo > m_spTypeInfo; + rtl::OUString m_sDefaultMember; + bool m_bHasDfltMethod; + bool m_bHasDfltProperty; }; } // end namespace diff --git a/extensions/source/ole/unoconversionutilities.hxx b/extensions/source/ole/unoconversionutilities.hxx index e8eb3ad6f..1fec67353 100644 --- a/extensions/source/ole/unoconversionutilities.hxx +++ b/extensions/source/ole/unoconversionutilities.hxx @@ -1324,33 +1324,47 @@ SAFEARRAY* UnoConversionUtilities<T>::createUnoSequenceWrapper(const Any& rSeq) typelib_TypeDescription* pSeqElementDesc= NULL; TYPELIB_DANGER_GET( &pSeqElementDesc, pSeqElementTypeRef); - sal_Int32 nElementSize= pSeqElementDesc->nSize; - n= punoSeq->nElements; - - SAFEARRAYBOUND rgsabound[1]; - rgsabound[0].lLbound = 0; - rgsabound[0].cElements = n; - VARIANT oleElement; - long safeI[1]; - - pArray = SafeArrayCreate(VT_VARIANT, 1, rgsabound); - - Any unoElement; - // sal_uInt8 * pSeqData= (sal_uInt8*) punoSeq->pElements; - sal_uInt8 * pSeqData= (sal_uInt8*) punoSeq->elements; - - for (sal_uInt32 i = 0; i < n; i++) + + // try to find VARIANT type that is related to the UNO type of the sequence elements + // the sequence as a sequence element should be handled in a special way + VARTYPE eTargetElementType = VT_EMPTY; + if ( pSeqElementDesc->eTypeClass != TypeClass_SEQUENCE ) + eTargetElementType = mapTypeClassToVartype( static_cast< TypeClass >( pSeqElementDesc->eTypeClass ) ); + + if ( eTargetElementType != VT_EMPTY ) + pArray = createUnoSequenceWrapper( rSeq, eTargetElementType ); + + if ( !pArray ) { - unoElement.setValue( pSeqData + i * nElementSize, pSeqElementDesc); - VariantInit(&oleElement); + sal_Int32 nElementSize= pSeqElementDesc->nSize; + n= punoSeq->nElements; - anyToVariant(&oleElement, unoElement); + SAFEARRAYBOUND rgsabound[1]; + rgsabound[0].lLbound = 0; + rgsabound[0].cElements = n; + VARIANT oleElement; + long safeI[1]; - safeI[0] = i; - SafeArrayPutElement(pArray, safeI, &oleElement); + pArray = SafeArrayCreate(VT_VARIANT, 1, rgsabound); - VariantClear(&oleElement); + Any unoElement; + // sal_uInt8 * pSeqData= (sal_uInt8*) punoSeq->pElements; + sal_uInt8 * pSeqData= (sal_uInt8*) punoSeq->elements; + + for (sal_uInt32 i = 0; i < n; i++) + { + unoElement.setValue( pSeqData + i * nElementSize, pSeqElementDesc); + VariantInit(&oleElement); + + anyToVariant(&oleElement, unoElement); + + safeI[0] = i; + SafeArrayPutElement(pArray, safeI, &oleElement); + + VariantClear(&oleElement); + } } + TYPELIB_DANGER_RELEASE( pSeqElementDesc); return pArray; diff --git a/extensions/source/plugin/inc/plugin/unx/mediator.hxx b/extensions/source/plugin/inc/plugin/unx/mediator.hxx index 800e06aa1..99f41aed3 100644 --- a/extensions/source/plugin/inc/plugin/unx/mediator.hxx +++ b/extensions/source/plugin/inc/plugin/unx/mediator.hxx @@ -90,10 +90,10 @@ protected: int m_nSocket; std::vector<MediatorMessage*> m_aMessageQueue; - NAMESPACE_VOS(OMutex) m_aQueueMutex; - NAMESPACE_VOS(OMutex) m_aSendMutex; + vos::OMutex m_aQueueMutex; + vos::OMutex m_aSendMutex; // only one thread can send a message at any given time - NAMESPACE_VOS(OCondition) m_aNewMessageCdtn; + vos::OCondition m_aNewMessageCdtn; MediatorListener* m_pListener; // thread to fill the queue @@ -150,7 +150,7 @@ public: } }; -class MediatorListener : public NAMESPACE_VOS( OThread ) +class MediatorListener : public vos:: OThread { friend class Mediator; private: diff --git a/extensions/source/plugin/inc/plugin/unx/plugcon.hxx b/extensions/source/plugin/inc/plugin/unx/plugcon.hxx index c347fed29..a91be657e 100644 --- a/extensions/source/plugin/inc/plugin/unx/plugcon.hxx +++ b/extensions/source/plugin/inc/plugin/unx/plugcon.hxx @@ -166,7 +166,7 @@ public: class PluginConnector : public Mediator { protected: - NAMESPACE_VOS(OMutex) m_aUserEventMutex; + vos::OMutex m_aUserEventMutex; static std::vector<PluginConnector*> allConnectors; diff --git a/extensions/source/plugin/unx/mediator.cxx b/extensions/source/plugin/unx/mediator.cxx index 9ddc0d740..9344da93f 100644 --- a/extensions/source/plugin/unx/mediator.cxx +++ b/extensions/source/plugin/unx/mediator.cxx @@ -80,7 +80,7 @@ ULONG Mediator::SendMessage( ULONG nBytes, const char* pBytes, ULONG nMessageID if( ! m_pListener ) return 0; - NAMESPACE_VOS(OGuard) aGuard( m_aSendMutex ); + vos::OGuard aGuard( m_aSendMutex ); if( ! nMessageID ) nMessageID = m_nCurrentID; @@ -132,7 +132,7 @@ MediatorMessage* Mediator::WaitForAnswer( ULONG nMessageID ) while( m_pListener ) { { - NAMESPACE_VOS(OGuard) aGuard( m_aQueueMutex ); + vos::OGuard aGuard( m_aQueueMutex ); for( size_t i = 0; i < m_aMessageQueue.size(); i++ ) { MediatorMessage* pMessage = m_aMessageQueue[ i ]; @@ -157,7 +157,7 @@ MediatorMessage* Mediator::GetNextMessage( BOOL bWait ) { // guard must be after WaitForMessage, else the listener // cannot insert a new one -> deadlock - NAMESPACE_VOS(OGuard) aGuard( m_aQueueMutex ); + vos::OGuard aGuard( m_aQueueMutex ); for( size_t i = 0; i < m_aMessageQueue.size(); i++ ) { MediatorMessage* pMessage = m_aMessageQueue[ i ]; @@ -207,7 +207,7 @@ void MediatorListener::run() { ::vos::OGuard aMyGuard( m_aMutex ); { - NAMESPACE_VOS(OGuard) + vos::OGuard aGuard( m_pMediator->m_aQueueMutex ); MediatorMessage* pMessage = new MediatorMessage( nHeader[ 0 ], nHeader[ 1 ], pBuffer ); diff --git a/extensions/source/plugin/unx/nppapi.cxx b/extensions/source/plugin/unx/nppapi.cxx index bfe9d4edc..bb26490f6 100644 --- a/extensions/source/plugin/unx/nppapi.cxx +++ b/extensions/source/plugin/unx/nppapi.cxx @@ -27,7 +27,7 @@ PluginConnector::PluginConnector( int nSocket ) : PluginConnector::~PluginConnector() { - NAMESPACE_VOS(OGuard) aGuard( m_aUserEventMutex ); + vos::OGuard aGuard( m_aUserEventMutex ); for( std::vector< PluginConnector* >::iterator it = allConnectors.begin(); it != allConnectors.end(); ++it ) { @@ -41,7 +41,7 @@ PluginConnector::~PluginConnector() IMPL_LINK( PluginConnector, NewMessageHdl, Mediator*, /*pMediator*/ ) { - NAMESPACE_VOS(OGuard) aGuard( m_aUserEventMutex ); + vos::OGuard aGuard( m_aUserEventMutex ); bool bFound = false; for( std::vector< PluginConnector* >::iterator it = allConnectors.begin(); it != allConnectors.end() && bFound == false; ++it ) @@ -68,7 +68,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) return 0; /* { - NAMESPACE_VOS(OGuard) aGuard( m_aUserEventMutex ); + vos::OGuard aGuard( m_aUserEventMutex ); m_aUserEventIDs.pop_front(); } */ diff --git a/extensions/source/plugin/unx/plugcon.cxx b/extensions/source/plugin/unx/plugcon.cxx index d2cadb707..69ed867be 100644 --- a/extensions/source/plugin/unx/plugcon.cxx +++ b/extensions/source/plugin/unx/plugcon.cxx @@ -172,7 +172,7 @@ MediatorMessage* PluginConnector::WaitForAnswer( ULONG nMessageID ) while( m_pListener ) { { - NAMESPACE_VOS(OGuard) aGuard( m_aQueueMutex ); + vos::OGuard aGuard( m_aQueueMutex ); for( size_t i = 0; i < m_aMessageQueue.size(); i++ ) { MediatorMessage* pMessage = m_aMessageQueue[ i ]; diff --git a/extensions/source/scanner/scanner.cxx b/extensions/source/scanner/scanner.cxx index 0f4e05b41..83fce0735 100644 --- a/extensions/source/scanner/scanner.cxx +++ b/extensions/source/scanner/scanner.cxx @@ -43,13 +43,14 @@ REF( XInterface ) SAL_CALL ScannerManager_CreateInstance( const REF( com::sun::s ScannerManager::ScannerManager() : mpData( NULL ) { + AcquireData(); } // ----------------------------------------------------------------------------- ScannerManager::~ScannerManager() { - DestroyData(); + ReleaseData(); } // ----------------------------------------------------------------------------- diff --git a/extensions/source/scanner/scanner.hxx b/extensions/source/scanner/scanner.hxx index 3fae6e8dc..a1179e6a6 100644 --- a/extensions/source/scanner/scanner.hxx +++ b/extensions/source/scanner/scanner.hxx @@ -73,7 +73,8 @@ protected: vos::OMutex maProtector; void* mpData; - void DestroyData(); + void AcquireData(); + void ReleaseData(); public: @@ -105,7 +106,7 @@ public: void Unlock() { maProtector.release(); } void* GetData() const { return mpData; } - void SetData( void* pData ) { DestroyData(); mpData = pData; } + void SetData( void* pData ) { ReleaseData(); mpData = pData; } }; // ----------------------------------------------------------------------------- diff --git a/extensions/source/scanner/scanunx.cxx b/extensions/source/scanner/scanunx.cxx index f40253497..242fa3e99 100644 --- a/extensions/source/scanner/scanunx.cxx +++ b/extensions/source/scanner/scanunx.cxx @@ -31,6 +31,7 @@ #include <sanedlg.hxx> #include <vos/thread.hxx> #include <tools/list.hxx> +#include <boost/shared_ptr.hpp> #if OSL_DEBUG_LEVEL > 1 #include <stdio.h> @@ -113,12 +114,41 @@ struct SaneHolder vos::OMutex m_aProtector; ScanError m_nError; bool m_bBusy; + + SaneHolder() : m_nError(ScanError_ScanErrorNone), m_bBusy(false) {} }; -DECLARE_LIST( SaneHolderList, SaneHolder* ) +namespace +{ + typedef std::vector< boost::shared_ptr<SaneHolder> > sanevec; + class allSanes + { + private: + int mnRefCount; + public: + sanevec m_aSanes; + allSanes() : mnRefCount(0) {} + void acquire(); + void release(); + }; + + void allSanes::acquire() + { + ++mnRefCount; + } + + void allSanes::release() + { + // was unused, now because of i99835: "Scanning interface not SANE API + // compliant" destroy all SaneHolder to get Sane Dtor called + --mnRefCount; + if (!mnRefCount) + m_aSanes.clear(); + } -static SaneHolderList allSanes; -static vos::OMutex aSaneProtector; + struct theSaneProtector : public rtl::Static<vos::OMutex, theSaneProtector> {}; + struct theSanes : public rtl::Static<allSanes, theSanes> {}; +} // ----------------- // - ScannerThread - @@ -126,7 +156,7 @@ static vos::OMutex aSaneProtector; class ScannerThread : public vos::OThread { - SaneHolder* m_pHolder; + boost::shared_ptr<SaneHolder> m_pHolder; REF( com::sun::star::lang::XEventListener ) m_xListener; ScannerManager* m_pManager; // just for the disposing call @@ -134,7 +164,7 @@ public: virtual void run(); virtual void onTerminated() { delete this; } public: - ScannerThread( SaneHolder* pHolder, + ScannerThread( boost::shared_ptr<SaneHolder> pHolder, const REF( com::sun::star::lang::XEventListener )& listener, ScannerManager* pManager ); virtual ~ScannerThread(); @@ -143,7 +173,7 @@ public: // ----------------------------------------------------------------------------- ScannerThread::ScannerThread( - SaneHolder* pHolder, + boost::shared_ptr<SaneHolder> pHolder, const REF( com::sun::star::lang::XEventListener )& listener, ScannerManager* pManager ) : m_pHolder( pHolder ), m_xListener( listener ), m_pManager( pManager ) @@ -192,16 +222,16 @@ void ScannerThread::run() // - ScannerManager - // ------------------ -void ScannerManager::DestroyData() +void ScannerManager::AcquireData() { - // was unused, now because of i99835: "Scanning interface not SANE API compliant" - // delete all SaneHolder to get Sane Dtor called - int i; - for ( i = allSanes.Count(); i > 0; i-- ) - { - SaneHolder *pSaneHolder = allSanes.GetObject(i-1); - if ( pSaneHolder ) delete pSaneHolder; - } + vos::OGuard aGuard( theSaneProtector::get() ); + theSanes::get().acquire(); +} + +void ScannerManager::ReleaseData() +{ + vos::OGuard aGuard( theSaneProtector::get() ); + theSanes::get().release(); } // ----------------------------------------------------------------------------- @@ -224,17 +254,14 @@ SEQ( sal_Int8 ) ScannerManager::getDIB() throw() SEQ( ScannerContext ) ScannerManager::getAvailableScanners() throw() { - vos::OGuard aGuard( aSaneProtector ); + vos::OGuard aGuard( theSaneProtector::get() ); + sanevec &rSanes = theSanes::get().m_aSanes; - if( ! allSanes.Count() ) + if( rSanes.empty() ) { - SaneHolder* pSaneHolder = new SaneHolder; - pSaneHolder->m_nError = ScanError_ScanErrorNone; - pSaneHolder->m_bBusy = false; + boost::shared_ptr<SaneHolder> pSaneHolder(new SaneHolder); if( Sane::IsSane() ) - allSanes.Insert( pSaneHolder ); - else - delete pSaneHolder; + rSanes.push_back( pSaneHolder ); } if( Sane::IsSane() ) @@ -252,20 +279,21 @@ SEQ( ScannerContext ) ScannerManager::getAvailableScanners() throw() BOOL ScannerManager::configureScanner( ScannerContext& scanner_context ) throw( ScannerException ) { - vos::OGuard aGuard( aSaneProtector ); + vos::OGuard aGuard( theSaneProtector::get() ); + sanevec &rSanes = theSanes::get().m_aSanes; #if OSL_DEBUG_LEVEL > 1 fprintf( stderr, "ScannerManager::configureScanner\n" ); #endif - if( scanner_context.InternalData < 0 || (ULONG)scanner_context.InternalData >= allSanes.Count() ) + if( scanner_context.InternalData < 0 || (ULONG)scanner_context.InternalData >= rSanes.size() ) throw ScannerException( ::rtl::OUString::createFromAscii( "Scanner does not exist" ), REF( XScannerManager )( this ), ScanError_InvalidContext ); - SaneHolder* pHolder = allSanes.GetObject( scanner_context.InternalData ); + boost::shared_ptr<SaneHolder> pHolder = rSanes[scanner_context.InternalData]; if( pHolder->m_bBusy ) throw ScannerException( ::rtl::OUString::createFromAscii( "Scanner is busy" ), @@ -286,19 +314,20 @@ BOOL ScannerManager::configureScanner( ScannerContext& scanner_context ) throw( void ScannerManager::startScan( const ScannerContext& scanner_context, const REF( com::sun::star::lang::XEventListener )& listener ) throw( ScannerException ) { - vos::OGuard aGuard( aSaneProtector ); + vos::OGuard aGuard( theSaneProtector::get() ); + sanevec &rSanes = theSanes::get().m_aSanes; #if OSL_DEBUG_LEVEL > 1 fprintf( stderr, "ScannerManager::startScan\n" ); #endif - if( scanner_context.InternalData < 0 || (ULONG)scanner_context.InternalData >= allSanes.Count() ) + if( scanner_context.InternalData < 0 || (ULONG)scanner_context.InternalData >= rSanes.size() ) throw ScannerException( ::rtl::OUString::createFromAscii( "Scanner does not exist" ), REF( XScannerManager )( this ), ScanError_InvalidContext ); - SaneHolder* pHolder = allSanes.GetObject( scanner_context.InternalData ); + boost::shared_ptr<SaneHolder> pHolder = rSanes[scanner_context.InternalData]; if( pHolder->m_bBusy ) throw ScannerException( ::rtl::OUString::createFromAscii( "Scanner is busy" ), @@ -315,16 +344,17 @@ void ScannerManager::startScan( const ScannerContext& scanner_context, ScanError ScannerManager::getError( const ScannerContext& scanner_context ) throw( ScannerException ) { - vos::OGuard aGuard( aSaneProtector ); + vos::OGuard aGuard( theSaneProtector::get() ); + sanevec &rSanes = theSanes::get().m_aSanes; - if( scanner_context.InternalData < 0 || (ULONG)scanner_context.InternalData >= allSanes.Count() ) + if( scanner_context.InternalData < 0 || (ULONG)scanner_context.InternalData >= rSanes.size() ) throw ScannerException( ::rtl::OUString::createFromAscii( "Scanner does not exist" ), REF( XScannerManager )( this ), ScanError_InvalidContext ); - SaneHolder* pHolder = allSanes.GetObject( scanner_context.InternalData ); + boost::shared_ptr<SaneHolder> pHolder = rSanes[scanner_context.InternalData]; return pHolder->m_nError; } @@ -333,15 +363,16 @@ ScanError ScannerManager::getError( const ScannerContext& scanner_context ) thro REF( AWT::XBitmap ) ScannerManager::getBitmap( const ScannerContext& scanner_context ) throw( ScannerException ) { - vos::OGuard aGuard( aSaneProtector ); + vos::OGuard aGuard( theSaneProtector::get() ); + sanevec &rSanes = theSanes::get().m_aSanes; - if( scanner_context.InternalData < 0 || (ULONG)scanner_context.InternalData >= allSanes.Count() ) + if( scanner_context.InternalData < 0 || (ULONG)scanner_context.InternalData >= rSanes.size() ) throw ScannerException( ::rtl::OUString::createFromAscii( "Scanner does not exist" ), REF( XScannerManager )( this ), ScanError_InvalidContext ); - SaneHolder* pHolder = allSanes.GetObject( scanner_context.InternalData ); + boost::shared_ptr<SaneHolder> pHolder = rSanes[scanner_context.InternalData]; vos::OGuard aProtGuard( pHolder->m_aProtector ); diff --git a/extensions/source/scanner/scanwin.cxx b/extensions/source/scanner/scanwin.cxx index ebdee62d3..1febb7200 100644 --- a/extensions/source/scanner/scanwin.cxx +++ b/extensions/source/scanner/scanwin.cxx @@ -74,10 +74,7 @@ using namespace ::com::sun::star; #define FIXTODOUBLE( nFix ) ((double)nFix.Whole+(double)nFix.Frac/65536.) #define FIXTOLONG( nFix ) ((long)floor(FIXTODOUBLE(nFix)+0.5)) -#if defined WIN -#define TWAIN_LIBNAME "TWAIN.DLL" -#define TWAIN_FUNCNAME "DSM_Entry" -#elif defined WNT +#if defined WNT #define TWAIN_LIBNAME "TWAIN_32.DLL" #define TWAIN_FUNCNAME "DSM_Entry" #endif @@ -109,7 +106,7 @@ class ImpTwain : public ::cppu::WeakImplHelper1< util::XCloseListener > TW_IDENTITY aSrcIdent; Link aNotifyLink; DSMENTRYPROC pDSM; - NAMESPACE_VOS( OModule )* pMod; + vos:: OModule * pMod; ULONG nCurState; HWND hTwainWnd; HHOOK hTwainHook; @@ -887,7 +884,11 @@ static Twain aTwain; // - ScannerManager - // ------------------ -void ScannerManager::DestroyData() +void ScannerManager::AcquireData() +{ +} + +void ScannerManager::ReleaseData() { if( mpData ) { @@ -979,7 +980,7 @@ SEQ( sal_Int8 ) ScannerManager::getDIB() throw() } GlobalUnlock( hDIB ); - DestroyData(); + ReleaseData(); } return aRet; @@ -1009,7 +1010,7 @@ BOOL SAL_CALL ScannerManager::configureScanner( ScannerContext& rContext ) if( rContext.InternalData != 0 || rContext.ScannerName != ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TWAIN" ) ) ) throw ScannerException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Scanner does not exist" ) ), xThis, ScanError_InvalidContext ); - DestroyData(); + ReleaseData(); return aTwain.SelectSource( *this ); } @@ -1025,7 +1026,7 @@ void SAL_CALL ScannerManager::startScan( const ScannerContext& rContext, const u if( rContext.InternalData != 0 || rContext.ScannerName != ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TWAIN" ) ) ) throw ScannerException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Scanner does not exist" ) ), xThis, ScanError_InvalidContext ); - DestroyData(); + ReleaseData(); aTwain.PerformTransfer( *this, rxListener ); } diff --git a/extensions/source/scanner/twain.cxx b/extensions/source/scanner/twain.cxx index 8f8261bd5..28532b733 100644 --- a/extensions/source/scanner/twain.cxx +++ b/extensions/source/scanner/twain.cxx @@ -31,7 +31,7 @@ #include <string.h> #include <math.h> -#if defined( WNT ) || defined (WIN) +#if defined( WNT ) #include <tools/svwin.h> #endif #ifdef OS2 @@ -52,10 +52,7 @@ #define FIXTODOUBLE( nFix ) ((double)nFix.Whole+(double)nFix.Frac/65536.) #define FIXTOLONG( nFix ) ((long)floor(FIXTODOUBLE(nFix)+0.5)) -#if defined WIN -#define TWAIN_LIBNAME "TWAIN.DLL" -#define TWAIN_FUNCNAME "DSM_Entry" -#elif defined WNT +#if defined WNT #define TWAIN_LIBNAME "TWAIN_32.DLL" #define TWAIN_FUNCNAME "DSM_Entry" #elif defined OS2 @@ -242,7 +239,7 @@ void ImpTwain::ImplOpenSourceManager() { if( 1 == nCurState ) { - pMod = new NAMESPACE_VOS( OModule )(); + pMod = new vos:: OModule (); if( pMod->load( TWAIN_LIBNAME ) ) { diff --git a/extensions/source/scanner/twain.hxx b/extensions/source/scanner/twain.hxx index faa3bcc76..3116f5a65 100644 --- a/extensions/source/scanner/twain.hxx +++ b/extensions/source/scanner/twain.hxx @@ -57,7 +57,7 @@ class ImpTwain Link aNotifyLink; Bitmap aBitmap; DSMENTRYPROC pDSM; - NAMESPACE_VOS( OModule )* pMod; + vos:: OModule * pMod; ULONG nCurState; void ImplCreate(); diff --git a/extensions/source/update/check/updatecheckjob.cxx b/extensions/source/update/check/updatecheckjob.cxx index 04c4d932f..c75530388 100644..100755 --- a/extensions/source/update/check/updatecheckjob.cxx +++ b/extensions/source/update/check/updatecheckjob.cxx @@ -327,13 +327,14 @@ void SAL_CALL UpdateCheckJob::queryTermination( lang::EventObject const & ) } //------------------------------------------------------------------------------ -void SAL_CALL UpdateCheckJob::notifyTermination( lang::EventObject const & rEvt ) +void SAL_CALL UpdateCheckJob::notifyTermination( lang::EventObject const & ) throw ( uno::RuntimeException ) { if ( m_pInitThread.get() != 0 ) + { m_pInitThread->setTerminating(); - - disposing( rEvt ); + m_pInitThread->join(); + } } } // anonymous namespace diff --git a/extensions/test/stm/datatest.cxx b/extensions/test/stm/datatest.cxx index 7d4e33c77..142bd8147 100644 --- a/extensions/test/stm/datatest.cxx +++ b/extensions/test/stm/datatest.cxx @@ -53,10 +53,8 @@ #include "testfactreg.hxx" -#ifndef _VOS_NO_NAMESPACE using namespace vos; using namespace usr; -#endif #define DATASTREAM_TEST_MAX_HANDLE 1 diff --git a/extensions/test/stm/marktest.cxx b/extensions/test/stm/marktest.cxx index 96eb7c4e2..e2cff6339 100644 --- a/extensions/test/stm/marktest.cxx +++ b/extensions/test/stm/marktest.cxx @@ -50,12 +50,8 @@ #include "testfactreg.hxx" -#ifndef _VOS_NO_NAMESPACE using namespace vos; using namespace usr; -#endif - - class OMarkableOutputStreamTest : public XSimpleTest, diff --git a/extensions/test/stm/pipetest.cxx b/extensions/test/stm/pipetest.cxx index b72f0a08f..e9840d2b8 100644 --- a/extensions/test/stm/pipetest.cxx +++ b/extensions/test/stm/pipetest.cxx @@ -48,10 +48,8 @@ #define IMPLEMENTATION_NAME L"test.com.sun.star.comp.extensions.stm.Pipe" #define SERVICE_NAME L"test.com.sun.star.io.Pipe" -#ifndef _VOS_NO_NAMESPACE using namespace vos; using namespace usr; -#endif class WriteToStreamThread : public OThread diff --git a/extensions/test/stm/testfactreg.cxx b/extensions/test/stm/testfactreg.cxx index 23b9b9a6d..bbbfa1cb4 100644 --- a/extensions/test/stm/testfactreg.cxx +++ b/extensions/test/stm/testfactreg.cxx @@ -35,10 +35,8 @@ #include "testfactreg.hxx" -#ifndef _VOS_NO_NAMESPACE using namespace vos; using namespace usr; -#endif #ifdef __cplusplus extern "C" diff --git a/extensions/workben/testpgp.cxx b/extensions/workben/testpgp.cxx index 7981f0b7c..c6ae35bad 100644 --- a/extensions/workben/testpgp.cxx +++ b/extensions/workben/testpgp.cxx @@ -555,7 +555,7 @@ BOOL install ( String aModule ("module://"); char pBuffer[1024]; - NAMESPACE_VOS(ORealDynamicLoader)::computeModuleName ( + vos::ORealDynamicLoader::computeModuleName ( prefix, pBuffer, sizeof(pBuffer)); aModule += pBuffer; @@ -573,7 +573,7 @@ BOOL uninstall ( String aModule ("module://"); char pBuffer[1024]; - NAMESPACE_VOS(ORealDynamicLoader)::computeModuleName ( + vos::ORealDynamicLoader::computeModuleName ( prefix, pBuffer, sizeof(pBuffer)); aModule += pBuffer; diff --git a/forms/source/component/Button.cxx b/forms/source/component/Button.cxx index a0c32617c..a6f9e6441 100644 --- a/forms/source/component/Button.cxx +++ b/forms/source/component/Button.cxx @@ -439,7 +439,7 @@ void SAL_CALL OButtonControl::disposing( const EventObject& _rSource ) throw( Ru void OButtonControl::actionPerformed(const ActionEvent& /*rEvent*/) throw ( ::com::sun::star::uno::RuntimeException) { // Asynchron fuer starutil::URL-Button - sal_uInt32 n = Application::PostUserEvent( LINK(this, OButtonControl,OnClick) ); + ULONG n = Application::PostUserEvent( LINK(this, OButtonControl,OnClick) ); { ::osl::MutexGuard aGuard( m_aMutex ); m_nClickEvent = n; diff --git a/forms/source/component/Button.hxx b/forms/source/component/Button.hxx index b875bb340..41ed4974e 100644 --- a/forms/source/component/Button.hxx +++ b/forms/source/component/Button.hxx @@ -127,7 +127,7 @@ class OButtonControl :public OButtonControl_BASE ,public OFormNavigationHelper { private: - sal_uInt32 m_nClickEvent; + ULONG m_nClickEvent; sal_Int16 m_nTargetUrlFeatureId; /// caches the value of the "Enabled" property of our model sal_Bool m_bEnabledByPropertyValue; diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx index a69ec26a6..da88d6bc0 100644 --- a/forms/source/component/ImageControl.cxx +++ b/forms/source/component/ImageControl.cxx @@ -190,6 +190,7 @@ void OImageControlModel::implConstruct() { m_pImageProducer = new ImageProducer; m_xImageProducer = m_pImageProducer; + m_pImageProducer->SetDoneHdl( LINK( this, OImageControlModel, OnImageImportDone ) ); } //------------------------------------------------------------------ @@ -630,6 +631,16 @@ void SAL_CALL OImageControlModel::startProduction( ) throw (RuntimeException) GetImageProducer()->startProduction(); } +//------------------------------------------------------------------------------ +IMPL_LINK( OImageControlModel, OnImageImportDone, ::Graphic*, i_pGraphic ) +{ + ENSURE_OR_RETURN( i_pGraphic, "OImageControlModel::OnImageImportDone: illegal graphic!", 0L ); + setPropertyValue( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Graphic" ) ), + makeAny( Image( i_pGraphic->GetBitmapEx() ).GetXGraphic() ) + ); + return 1L; +} //================================================================== // OImageControlControl diff --git a/forms/source/component/ImageControl.hxx b/forms/source/component/ImageControl.hxx index 3caa4cc82..8099fed51 100644 --- a/forms/source/component/ImageControl.hxx +++ b/forms/source/component/ImageControl.hxx @@ -140,6 +140,8 @@ protected: bound field, or the control itself if there is no bound field */ sal_Bool impl_updateStreamForURL_lck( const ::rtl::OUString& _rURL, ValueChangeInstigator _eInstigator ); + + DECL_LINK( OnImageImportDone, ::Graphic* ); }; //================================================================== diff --git a/forms/source/component/imgprod.cxx b/forms/source/component/imgprod.cxx index 1aab51738..60143f9ed 100644 --- a/forms/source/component/imgprod.cxx +++ b/forms/source/component/imgprod.cxx @@ -190,11 +190,7 @@ ErrCode ImgProdLockBytes::Stat( SvLockBytesStat* pStat, SvLockBytesStatFlag eFla ImageProducer::ImageProducer() : mpStm ( NULL ), - mpFilter ( NULL ), - mnStatus ( 0UL ), - mbConsInit ( sal_False ), - mnLastError ( 0UL ), - mbAsync ( sal_False ) + mbConsInit ( sal_False ) { mpGraphic = new Graphic; DBG_ASSERT( Application::GetFilterHdl().IsSet(), "ImageProducer::ImageProducer(): No filter handler set" ); @@ -207,9 +203,6 @@ ImageProducer::~ImageProducer() delete mpGraphic; mpGraphic = NULL; - delete mpFilter; - mpFilter = NULL; - delete mpStm; mpStm = NULL; @@ -261,7 +254,6 @@ void ImageProducer::SetImage( const ::rtl::OUString& rPath ) maURL = rPath; mpGraphic->Clear(); mbConsInit = sal_False; - mbAsync = sal_False; delete mpStm; if ( ::svt::GraphicAccess::isSupportedURL( maURL ) ) @@ -284,7 +276,6 @@ void ImageProducer::SetImage( SvStream& rStm ) maURL = ::rtl::OUString(); mpGraphic->Clear(); mbConsInit = sal_False; - mbAsync = sal_False; delete mpStm; mpStm = new SvStream( new ImgProdLockBytes( &rStm, sal_False ) ); @@ -297,7 +288,6 @@ void ImageProducer::setImage( ::com::sun::star::uno::Reference< ::com::sun::star maURL = ::rtl::OUString(); mpGraphic->Clear(); mbConsInit = sal_False; - mbAsync = sal_False; delete mpStm; if( rInputStmRef.is() ) @@ -318,9 +308,7 @@ void ImageProducer::NewDataAvailable() void ImageProducer::startProduction() throw(::com::sun::star::uno::RuntimeException) { - ResetLastError(); - - if( maConsList.Count() ) + if( maConsList.Count() || maDoneHdl.IsSet() ) { bool bNotifyEmptyGraphics = false; @@ -331,8 +319,8 @@ void ImageProducer::startProduction() throw(::com::sun::star::uno::RuntimeExcept // graphic is cleared if a new Stream is set if( ( mpGraphic->GetType() == GRAPHIC_NONE ) || mpGraphic->GetContext() ) { - if( !ImplImportGraphic( *mpGraphic ) && maErrorHdl.IsSet() ) - maErrorHdl.Call( this ); + if ( ImplImportGraphic( *mpGraphic ) && maDoneHdl.IsSet() ) + maDoneHdl.Call( mpGraphic ); } if( mpGraphic->GetType() != GRAPHIC_NONE ) @@ -371,33 +359,16 @@ void ImageProducer::startProduction() throw(::com::sun::star::uno::RuntimeExcept sal_Bool ImageProducer::ImplImportGraphic( Graphic& rGraphic ) { - USHORT nFilter = GRFILTER_FORMAT_DONTKNOW; - short nRet; - sal_Bool bRet = sal_False; - if( ERRCODE_IO_PENDING == mpStm->GetError() ) mpStm->ResetError(); mpStm->Seek( 0UL ); - if( mpFilter ) - nRet = mpFilter->ImportGraphic( rGraphic, String(), *mpStm, nFilter ); - else - { - if( GraphicConverter::Import( *mpStm, rGraphic ) == ERRCODE_NONE ) - nRet = GRFILTER_OK; - else - nRet = GRFILTER_FILTERERROR; - } + sal_Bool bRet = GraphicConverter::Import( *mpStm, rGraphic ) == ERRCODE_NONE; if( ERRCODE_IO_PENDING == mpStm->GetError() ) mpStm->ResetError(); - if( nRet == GRFILTER_OK ) - bRet = sal_True; - else - mnLastError = nRet; - return bRet; } @@ -405,10 +376,6 @@ sal_Bool ImageProducer::ImplImportGraphic( Graphic& rGraphic ) void ImageProducer::ImplUpdateData( const Graphic& rGraphic ) { - // asynchronous? - if( mpGraphic->GetContext() ) - mbAsync = sal_True; - ImplInitConsumer( rGraphic ); if( mbConsInit && maConsList.Count() ) @@ -425,7 +392,7 @@ void ImageProducer::ImplUpdateData( const Graphic& rGraphic ) // iterate through interfaces for( pCons = aTmp.First(); pCons; pCons = aTmp.Next() ) - ( *(::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > *) pCons )->complete( mnStatus = ::com::sun::star::awt::ImageStatus::IMAGESTATUS_STATICIMAGEDONE, this ); + ( *(::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > *) pCons )->complete( ::com::sun::star::awt::ImageStatus::IMAGESTATUS_STATICIMAGEDONE, this ); // delete interfaces in temporary list for( pCons = aTmp.First(); pCons; pCons = aTmp.Next() ) diff --git a/forms/source/component/imgprod.hxx b/forms/source/component/imgprod.hxx index b81510e39..25e9f6f9d 100644 --- a/forms/source/component/imgprod.hxx +++ b/forms/source/component/imgprod.hxx @@ -64,20 +64,9 @@ private: List maConsList; Graphic* mpGraphic; SvStream* mpStm; - GraphicFilter* mpFilter; sal_uInt32 mnTransIndex; - sal_uInt32 mnStatus; sal_Bool mbConsInit; - sal_Bool mbStmDel; - Link maErrorHdl; - sal_uInt32 mnLastError; - - sal_uInt32 mnExtra2; - - sal_Bool mbAsync; - sal_Bool mbExtra1; - sal_Bool mbExtra2; - sal_Bool mbExtra3; + Link maDoneHdl; sal_Bool ImplImportGraphic( Graphic& rGraphic ); void ImplUpdateData( const Graphic& rGraphic ); @@ -92,14 +81,11 @@ public: void SetImage( const ::rtl::OUString& rPath ); void SetImage( SvStream& rStm ); - void SetErrorHandler( const Link& rErrorHdl ) { maErrorHdl = rErrorHdl; } - const Link& GetErrorHandler() const { return maErrorHdl; } - - sal_uInt32 GetLastError() const { return mnLastError; } - void ResetLastError() { mnLastError = 0; } - void NewDataAvailable(); + void SetDoneHdl( const Link& i_rHdl ) { maDoneHdl = i_rHdl; } + const Link& GetDoneHdl() const { return maDoneHdl; } + // ::com::sun::star::uno::XInterface ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); void SAL_CALL acquire() throw() { OWeakObject::acquire(); } diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallData.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallData.java index 8ceec83a7..d3ba4abc5 100755 --- a/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallData.java +++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallData.java @@ -75,6 +75,8 @@ public class InstallData static private boolean databaseQueried = false; static private boolean useRtl = false; static private boolean installedProductMinorSet = false; + static private boolean isDebianSystem = false; + static private boolean debianInvestigated = false; static private String installType; /* custom or typical installation */ static private String osType; /* Linux, SunOS, ... */ static private String installDir = null; @@ -649,6 +651,22 @@ public class InstallData installedProductMinorSet = value; } + public boolean debianInvestigated() { + return debianInvestigated; + } + + public void setDebianInvestigated(boolean value) { + debianInvestigated = value; + } + + public boolean isDebianSystem() { + return isDebianSystem; + } + + public void setIsDebianSystem(boolean value) { + isDebianSystem = value; + } + public boolean databaseQueried() { return databaseQueried; } diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/LinuxInstaller.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/LinuxInstaller.java index e99a93cb0..c66c84a56 100755 --- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/LinuxInstaller.java +++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/LinuxInstaller.java @@ -190,6 +190,22 @@ public class LinuxInstaller extends Installer { if ( sofficeLink.exists() ) { useForce = true; } } + // On Debian based systems, rpms can be installed with the switch --force-debian, if a rpm + // is installed. + + String forceDebianString = ""; + String nodepsString = ""; + + if ( ! data.debianInvestigated() ) { + helper.investigateDebian(data); + data.setDebianInvestigated(true); + } + + if ( data.isDebianSystem() ) { + forceDebianString = "--force-debian"; + nodepsString = "--nodeps"; + } + String rpmCommand = ""; String[] rpmCommandArray; String databasePath = null; @@ -212,107 +228,123 @@ public class LinuxInstaller extends Installer { if (useForce) { if (useLocalDatabase) { if ( relocations != null ) { - rpmCommand = "rpm --upgrade --ignoresize --force -vh " + + rpmCommand = "rpm --upgrade --ignoresize --force " + forceDebianString + " " + nodepsString + " -vh " + "--relocate " + relocations + " " + databaseString + " " + databasePath + " " + packageName; - rpmCommandArray = new String[10]; + rpmCommandArray = new String[12]; rpmCommandArray[0] = "rpm"; rpmCommandArray[1] = "--upgrade"; rpmCommandArray[2] = "--ignoresize"; rpmCommandArray[3] = "--force"; - rpmCommandArray[4] = "-vh"; - rpmCommandArray[5] = "--relocate"; - rpmCommandArray[6] = relocations; - rpmCommandArray[7] = databaseString; - rpmCommandArray[8] = databasePath; - rpmCommandArray[9] = packageName; + rpmCommandArray[4] = forceDebianString; + rpmCommandArray[5] = nodepsString; + rpmCommandArray[6] = "-vh"; + rpmCommandArray[7] = "--relocate"; + rpmCommandArray[8] = relocations; + rpmCommandArray[9] = databaseString; + rpmCommandArray[10] = databasePath; + rpmCommandArray[11] = packageName; } else { - rpmCommand = "rpm --upgrade --ignoresize --force -vh " + + rpmCommand = "rpm --upgrade --ignoresize --force " + forceDebianString + " " + nodepsString + " -vh " + databaseString + " " + databasePath + " " + packageName; - rpmCommandArray = new String[8]; + rpmCommandArray = new String[10]; rpmCommandArray[0] = "rpm"; rpmCommandArray[1] = "--upgrade"; rpmCommandArray[2] = "--ignoresize"; rpmCommandArray[3] = "--force"; - rpmCommandArray[4] = "-vh"; - rpmCommandArray[5] = databaseString; - rpmCommandArray[6] = databasePath; - rpmCommandArray[7] = packageName; + rpmCommandArray[4] = forceDebianString; + rpmCommandArray[5] = nodepsString; + rpmCommandArray[6] = "-vh"; + rpmCommandArray[7] = databaseString; + rpmCommandArray[8] = databasePath; + rpmCommandArray[9] = packageName; } } else { if ( relocations != null ) { - rpmCommand = "rpm --upgrade --ignoresize --force -vh " + + rpmCommand = "rpm --upgrade --ignoresize --force " + forceDebianString + " " + nodepsString + " -vh " + "--relocate " + relocations + " " + packageName; - rpmCommandArray = new String[8]; + rpmCommandArray = new String[10]; rpmCommandArray[0] = "rpm"; rpmCommandArray[1] = "--upgrade"; rpmCommandArray[2] = "--ignoresize"; rpmCommandArray[3] = "--force"; - rpmCommandArray[4] = "-vh"; - rpmCommandArray[5] = "--relocate"; - rpmCommandArray[6] = relocations; - rpmCommandArray[7] = packageName; + rpmCommandArray[4] = forceDebianString; + rpmCommandArray[5] = nodepsString; + rpmCommandArray[6] = "-vh"; + rpmCommandArray[7] = "--relocate"; + rpmCommandArray[8] = relocations; + rpmCommandArray[9] = packageName; } else { - rpmCommand = "rpm --upgrade --ignoresize --force -vh " + packageName; - rpmCommandArray = new String[6]; + rpmCommand = "rpm --upgrade --ignoresize --force " + forceDebianString + " " + nodepsString + " -vh " + packageName; + rpmCommandArray = new String[8]; rpmCommandArray[0] = "rpm"; rpmCommandArray[1] = "--upgrade"; rpmCommandArray[2] = "--ignoresize"; rpmCommandArray[3] = "--force"; - rpmCommandArray[4] = "-vh"; - rpmCommandArray[5] = packageName; + rpmCommandArray[4] = forceDebianString; + rpmCommandArray[5] = nodepsString; + rpmCommandArray[6] = "-vh"; + rpmCommandArray[7] = packageName; } } } else { if (useLocalDatabase) { if ( relocations != null ) { - rpmCommand = "rpm --upgrade --ignoresize -vh " + + rpmCommand = "rpm --upgrade --ignoresize " + forceDebianString + " " + nodepsString + " -vh " + "--relocate " + relocations + " " + databaseString + " " + databasePath + " " + packageName; - rpmCommandArray = new String[9]; + rpmCommandArray = new String[11]; rpmCommandArray[0] = "rpm"; rpmCommandArray[1] = "--upgrade"; rpmCommandArray[2] = "--ignoresize"; - rpmCommandArray[3] = "-vh"; - rpmCommandArray[4] = "--relocate"; - rpmCommandArray[5] = relocations; - rpmCommandArray[6] = databaseString; - rpmCommandArray[7] = databasePath; - rpmCommandArray[8] = packageName; + rpmCommandArray[3] = forceDebianString; + rpmCommandArray[4] = nodepsString; + rpmCommandArray[5] = "-vh"; + rpmCommandArray[6] = "--relocate"; + rpmCommandArray[7] = relocations; + rpmCommandArray[8] = databaseString; + rpmCommandArray[9] = databasePath; + rpmCommandArray[10] = packageName; } else { - rpmCommand = "rpm --upgrade --ignoresize -vh " + + rpmCommand = "rpm --upgrade --ignoresize " + forceDebianString + " " + nodepsString + " -vh " + databaseString + " " + databasePath + " " + packageName; - rpmCommandArray = new String[7]; + rpmCommandArray = new String[9]; rpmCommandArray[0] = "rpm"; rpmCommandArray[1] = "--upgrade"; rpmCommandArray[2] = "--ignoresize"; - rpmCommandArray[3] = "-vh"; - rpmCommandArray[4] = databaseString; - rpmCommandArray[5] = databasePath; - rpmCommandArray[6] = packageName; + rpmCommandArray[3] = forceDebianString; + rpmCommandArray[4] = nodepsString; + rpmCommandArray[5] = "-vh"; + rpmCommandArray[6] = databaseString; + rpmCommandArray[7] = databasePath; + rpmCommandArray[8] = packageName; } } else { if ( relocations != null ) { - rpmCommand = "rpm --upgrade --ignoresize -vh " + + rpmCommand = "rpm --upgrade --ignoresize " + forceDebianString + " " + nodepsString + " -vh " + "--relocate " + relocations + " " + packageName; - rpmCommandArray = new String[7]; + rpmCommandArray = new String[9]; rpmCommandArray[0] = "rpm"; rpmCommandArray[1] = "--upgrade"; rpmCommandArray[2] = "--ignoresize"; - rpmCommandArray[3] = "-vh"; - rpmCommandArray[4] = "--relocate"; - rpmCommandArray[5] = relocations; - rpmCommandArray[6] = packageName; + rpmCommandArray[3] = forceDebianString; + rpmCommandArray[4] = nodepsString; + rpmCommandArray[5] = "-vh"; + rpmCommandArray[6] = "--relocate"; + rpmCommandArray[7] = relocations; + rpmCommandArray[8] = packageName; } else { - rpmCommand = "rpm --upgrade --ignoresize -vh " + packageName; - rpmCommandArray = new String[5]; + rpmCommand = "rpm --upgrade --ignoresize " + forceDebianString + " " + nodepsString + " -vh " + packageName; + rpmCommandArray = new String[7]; rpmCommandArray[0] = "rpm"; rpmCommandArray[1] = "--upgrade"; rpmCommandArray[2] = "--ignoresize"; - rpmCommandArray[3] = "-vh"; - rpmCommandArray[4] = packageName; + rpmCommandArray[3] = forceDebianString; + rpmCommandArray[4] = nodepsString; + rpmCommandArray[5] = "-vh"; + rpmCommandArray[6] = packageName; } } } @@ -382,21 +414,63 @@ public class LinuxInstaller extends Installer { databaseString = "--dbpath"; useLocalDatabase = true; } + + // On Debian based systems, rpms can be installed with the switch --force-debian, if a rpm + // is installed. + + String forceDebianString = ""; + String nodepsString = ""; + + if ( ! data.debianInvestigated() ) { + helper.investigateDebian(data); + data.setDebianInvestigated(true); + } + + if ( data.isDebianSystem() ) { + forceDebianString = "--force-debian"; + nodepsString = "--nodeps"; + } + + // Code duplication for isDebianSystem is necessary, because there is no valid position + // for forceDebianString, if it is empty. This is no problem in installPackage. + + if ( data.isDebianSystem() ) { - if (useLocalDatabase) { - rpmCommand = "rpm -ev" + " " + databaseString + " " + databasePath + " " + packageName; - rpmCommandArray = new String[5]; - rpmCommandArray[0] = "rpm"; - rpmCommandArray[1] = "-ev"; - rpmCommandArray[2] = databaseString; - rpmCommandArray[3] = databasePath; - rpmCommandArray[4] = packageName; + if (useLocalDatabase) { + rpmCommand = "rpm " + forceDebianString + " " + nodepsString + " -ev" + " " + databaseString + " " + databasePath + " " + packageName; + rpmCommandArray = new String[7]; + rpmCommandArray[0] = "rpm"; + rpmCommandArray[1] = forceDebianString; + rpmCommandArray[2] = nodepsString; + rpmCommandArray[3] = "-ev"; + rpmCommandArray[4] = databaseString; + rpmCommandArray[5] = databasePath; + rpmCommandArray[6] = packageName; + } else { + rpmCommand = "rpm " + forceDebianString + " " + nodepsString + " -ev" + " " + packageName; + rpmCommandArray = new String[5]; + rpmCommandArray[0] = "rpm"; + rpmCommandArray[1] = forceDebianString; + rpmCommandArray[2] = nodepsString; + rpmCommandArray[3] = "-ev"; + rpmCommandArray[4] = packageName; + } } else { - rpmCommand = "rpm -ev" + " " + packageName; - rpmCommandArray = new String[3]; - rpmCommandArray[0] = "rpm"; - rpmCommandArray[1] = "-ev"; - rpmCommandArray[2] = packageName; + if (useLocalDatabase) { + rpmCommand = "rpm -ev" + " " + databaseString + " " + databasePath + " " + packageName; + rpmCommandArray = new String[5]; + rpmCommandArray[0] = "rpm"; + rpmCommandArray[1] = "-ev"; + rpmCommandArray[2] = databaseString; + rpmCommandArray[3] = databasePath; + rpmCommandArray[4] = packageName; + } else { + rpmCommand = "rpm -ev" + " " + packageName; + rpmCommandArray = new String[3]; + rpmCommandArray[0] = "rpm"; + rpmCommandArray[1] = "-ev"; + rpmCommandArray[2] = packageName; + } } Vector returnVector = new Vector(); diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallerHelper/LinuxHelper.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallerHelper/LinuxHelper.java index 1ce882713..9ce41daf2 100755 --- a/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallerHelper/LinuxHelper.java +++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallerHelper/LinuxHelper.java @@ -380,6 +380,27 @@ import java.util.Vector;public class LinuxHelper { databasePath = databaseFile.getPath(); return databasePath; } + + public void investigateDebian(InstallData data) { + + // String rpmQuery = "rpm --help; + String[] rpmQueryArray = new String[2]; + rpmQueryArray[0] = "rpm"; + rpmQueryArray[1] = "--help"; + + Vector returnVector = new Vector(); + Vector returnErrorVector = new Vector(); + int returnValue = ExecuteProcess.executeProcessReturnVector(rpmQueryArray, returnVector, returnErrorVector); + + // Checking if the return vector contains the string "force-debian" + + for (int i = 0; i < returnVector.size(); i++) { + String line = (String) returnVector.get(i); + if ( line.indexOf("force-debian") > -1 ) { + data.setIsDebianSystem(true); + } + } + } public void getLinuxFileInfo(PackageDescription packageData) { // analyzing a string like "openoffice-core01-2.0.3-159" as "name-version-release" diff --git a/lingucomponent/prj/build.lst b/lingucomponent/prj/build.lst index 045aaee82..15ee595c6 100644 --- a/lingucomponent/prj/build.lst +++ b/lingucomponent/prj/build.lst @@ -1,4 +1,4 @@ -lc lingucomponent : linguistic libtextcat svl HYPHEN:hyphen HUNSPELL:hunspell MYTHES:mythes NULL +lc lingucomponent : linguistic LIBTEXTCAT:libtextcat LIBTEXTCATDATA:libtextcat svl HYPHEN:hyphen HUNSPELL:hunspell MYTHES:mythes NULL lc lingucomponent usr1 - all lc_mkout NULL lc lingucomponent\inc nmake - all lc_inc NULL lc lingucomponent\source\lingutil nmake - all lc_util lc_inc NULL diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx index f9b7816cb..ce4378609 100644 --- a/package/source/zipapi/ZipFile.cxx +++ b/package/source/zipapi/ZipFile.cxx @@ -1051,11 +1051,7 @@ void ZipFile::getSizeAndCRC( sal_Int32 nOffset, sal_Int32 nCompressedSize, sal_I nRealSize += nInBlock; } - if( aInflaterLocal.finished() ) - { - *nSize = nRealSize; - *nCRC = aCRC.getValue(); - } - else - *nSize = *nCRC = 0; + *nSize = nRealSize; + *nCRC = aCRC.getValue(); } + diff --git a/setup_native/scripts/admin.pl b/setup_native/scripts/admin.pl index 62a94fb3b..466182b24 100644 --- a/setup_native/scripts/admin.pl +++ b/setup_native/scripts/admin.pl @@ -298,6 +298,69 @@ sub get_sourcepath_from_filename_and_includepath return \$onefile; } +############################################################## +# Removing all empty directories below a specified directory +############################################################## + +sub remove_empty_dirs_in_folder +{ + my ( $dir, $firstrun ) = @_; + + if ( $firstrun ) + { + print "Removing superfluous directories\n"; + } + + my @content = (); + + $dir =~ s/\Q$separator\E\s*$//; + + if ( -d $dir ) + { + opendir(DIR, $dir); + @content = readdir(DIR); + closedir(DIR); + + my $oneitem; + + foreach $oneitem (@content) + { + if ((!($oneitem eq ".")) && (!($oneitem eq ".."))) + { + my $item = $dir . $separator . $oneitem; + + if ( -d $item ) # recursive + { + remove_empty_dirs_in_folder($item, 0); + } + } + } + + # try to remove empty directory + my $returnvalue = rmdir $dir; + + # if ( $returnvalue ) { print "Successfully removed empty dir $dir\n"; } + } +} + +#################################################### +# Detecting the directory with extensions +#################################################### + +sub get_extensions_dir +{ + my ( $unopkgfile ) = @_; + + my $localbranddir = $unopkgfile; + get_path_from_fullqualifiedname(\$localbranddir); # "program" dir in brand layer + get_path_from_fullqualifiedname(\$localbranddir); # root dir in brand layer + $localbranddir =~ s/\Q$separator\E\s*$//; + my $extensiondir = $localbranddir . $separator . "share" . $separator . "extensions"; + my $preregdir = $localbranddir . $separator . "share" . $separator . "prereg" . $separator . "bundled"; + + return ($extensiondir, $preregdir); +} + ######################################################## # Finding all files with a specified file extension # in a specified directory. @@ -784,6 +847,12 @@ sub create_directory_structure my @startparents = ("TARGETDIR", "INSTALLLOCATION"); foreach $dir (@startparents) { create_directory_tree($dir, \%fullpathhash, $targetdir, $dirhash); } + + # Also adding the pathes of the startparents + foreach $dir (@startparents) + { + if ( ! exists($fullpathhash{$dir}) ) { $fullpathhash{$dir} = $targetdir; } + } return \%fullpathhash; } @@ -874,7 +943,6 @@ sub copy_files_into_directory_structure print "Copying files\n"; my $unopkgfile = ""; - my @extensions = (); for ( my $i = 1; $i <= $maxsequence; $i++ ) { @@ -917,8 +985,6 @@ sub copy_files_into_directory_structure if ( ! $copyreturn) { exit_program("ERROR: Could not copy $source to $dest\n"); } - # Collecting all extensions - if ( $destfile =~ /\.oxt\s*$/ ) { push(@extensions, $destfile); } # Searching unopkg.exe if ( $destfile =~ /unopkg\.exe\s*$/ ) { $unopkgfile = $destfile; } # if (( $^O =~ /cygwin/i ) && ( $destfile =~ /\.exe\s*$/ )) { change_privileges($destfile, "775"); } @@ -929,7 +995,7 @@ sub copy_files_into_directory_structure # } } - return ($unopkgfile, \@extensions); + return ($unopkgfile); } ###################################################### @@ -1020,12 +1086,19 @@ sub get_temppath } #################################################################################### -# Registering one extension +# Registering extensions #################################################################################### -sub register_one_extension +sub register_extensions_sync { - my ($unopkgfile, $extension, $temppath) = @_; + my ($unopkgfile, $localtemppath, $preregdir) = @_; + + if ( $preregdir eq "" ) + { + my $logtext = "ERROR: Failed to determine \"prereg\" folder for extension registration! Please check your installation set."; + print $logtext . "\n"; + exit_program($logtext); + } my $from = cwd(); @@ -1045,22 +1118,17 @@ sub register_one_extension $path_displayed = 1; } - $temppath =~ s/\\/\//g; - $temppath = "/".$temppath; - - # Converting path of $extension for cygwin - - my $localextension = $extension; - if ( $^O =~ /cygwin/i ) { - $localextension = qx{cygpath -w "$extension"}; - $localextension =~ s/\\/\\\\/g; - } + $localtemppath =~ s/\\/\//g; if ( $^O =~ /cygwin/i ) { $executable = "./" . $executable; + $preregdir = qx{cygpath -m "$preregdir"}; + chomp($preregdir); } - my $systemcall = $executable . " add --shared --verbose --suppress-license " . "\"" . $localextension . "\"" . " -env:UserInstallation=file://" . $temppath . " 2\>\&1 |"; + $preregdir =~ s/\/\s*$//g; + + my $systemcall = $executable . " sync --verbose -env:BUNDLED_EXTENSIONS_USER=\"file:///" . $preregdir . "\"" . " -env:UserInstallation=file:///" . $localtemppath . " 2\>\&1 |"; print "... $systemcall\n"; @@ -1088,26 +1156,20 @@ sub register_one_extension sub register_extensions { - my ($unopkgfile, $extensions, $temppath) = @_; + my ($unopkgfile, $temppath, $preregdir) = @_; - if ( $#{$extensions} > -1 ) - { - print "Registering extensions:\n"; + print "Registering extensions:\n"; - if (( ! -f $unopkgfile ) || ( $unopkgfile eq "" )) - { - print("WARNING: Could not find unopkg.exe (Language Pack?)!\n"); - } - else - { - foreach $extension ( @{$extensions} ) { register_one_extension($unopkgfile, $extension, $temppath); } - remove_complete_directory($temppath, 1) - } + if (( ! -f $unopkgfile ) || ( $unopkgfile eq "" )) + { + print("WARNING: Could not find unopkg.exe (Language Pack?)!\n"); } else { - print "No extensions to register.\n"; + register_extensions_sync($unopkgfile, $temppath, $preregdir); + remove_complete_directory($temppath, 1); } + } #################################################################################### @@ -1351,7 +1413,7 @@ my ( $filehash, $fileorder, $maxsequence ) = analyze_file_file($filecontent); my $fullpathhash = create_directory_structure($dirhash, $targetdir); # Copying files -my ($unopkgfile, $extensions) = copy_files_into_directory_structure($fileorder, $filehash, $componenthash, $fullpathhash, $maxsequence, $unpackdir, $installdir, $dirhash); +my ($unopkgfile) = copy_files_into_directory_structure($fileorder, $filehash, $componenthash, $fullpathhash, $maxsequence, $unpackdir, $installdir, $dirhash); if ( $^O =~ /cygwin/i ) { change_privileges_full($targetdir); } my $msidatabase = $targetdir . $separator . $databasefilename; @@ -1363,10 +1425,14 @@ $filename = $helperdir . $separator . "CustomAction.idt"; $filecontent = read_file($filename); my $register_extensions_exists = analyze_customaction_file($filecontent); +# Removing empty dirs in extension folder +my ( $extensionfolder, $preregdir ) = get_extensions_dir($unopkgfile); +if ( -d $extensionfolder ) { remove_empty_dirs_in_folder($extensionfolder, 1); } + if ( $register_extensions_exists ) { # Registering extensions - register_extensions($unopkgfile, $extensions, $temppath); + register_extensions($unopkgfile, $temppath, $preregdir); } # Saving info in Summary Information Stream of msi database (required for following patches) diff --git a/setup_native/scripts/install_linux.sh b/setup_native/scripts/install_linux.sh index 955a185ac..12801b62f 100644 --- a/setup_native/scripts/install_linux.sh +++ b/setup_native/scripts/install_linux.sh @@ -121,6 +121,14 @@ then exit 2 fi +# #163256# check if we are on a debian system... +if rpm --help | grep debian >/dev/null; +then + DEBIAN_FLAGS="--force-debian --nodeps" +else + DEBIAN_FLAGS= +fi + # # Determine whether this should be an update or a fresh install # @@ -227,7 +235,7 @@ FAKEDBRPM=/tmp/fake-db-1.0-$$.noarch.rpm linenum=??? tail -n +$linenum $0 > $FAKEDBRPM -rpm --upgrade --ignoresize --dbpath $RPM_DB_PATH $FAKEDBRPM +rpm ${DEBIAN_FLAGS} --upgrade --ignoresize --dbpath $RPM_DB_PATH $FAKEDBRPM rm -f $FAKEDBRPM @@ -253,7 +261,7 @@ echo "Installing the RPMs" ABSROOT=`cd ${INSTALLDIR}; pwd` RELOCATIONS=`rpm -qp --qf "--relocate %{PREFIXES}=${ABSROOT}%{PREFIXES} \n" $RPMLIST | sort -u | tr -d "\012"` -UserInstallation=\$BRAND_BASE_DIR/../UserInstallation rpm $RPMCMD --ignoresize -vh $RELOCATIONS --dbpath $RPM_DB_PATH $RPMLIST +UserInstallation=\$BRAND_BASE_DIR/../UserInstallation rpm ${DEBIAN_FLAGS} $RPMCMD --ignoresize -vh $RELOCATIONS --dbpath $RPM_DB_PATH $RPMLIST # # Create a link into the users home directory @@ -268,11 +276,11 @@ if [ "$UPDATE" = "yes" -a ! -f $INSTALLDIR/program/bootstraprc ] then echo echo "Update failed due to a bug in RPM, uninstalling .." - rpm --erase -v --nodeps --dbpath $RPM_DB_PATH `rpm --query --queryformat "%{NAME} " --package $RPMLIST --dbpath $RPM_DB_PATH` + rpm ${DEBIAN_FLAGS} --erase -v --nodeps --dbpath $RPM_DB_PATH `rpm --query --queryformat "%{NAME} " --package $RPMLIST --dbpath $RPM_DB_PATH` echo echo "Now re-installing new packages .." echo - rpm --install --nodeps --ignoresize -vh $RELOCATIONS --dbpath $RPM_DB_PATH $RPMLIST + rpm ${DEBIAN_FLAGS} --install --nodeps --ignoresize -vh $RELOCATIONS --dbpath $RPM_DB_PATH $RPMLIST echo fi diff --git a/setup_native/source/java/javaversion.dat b/setup_native/source/java/javaversion.dat index a629a4037..bb935ac2c 100755 --- a/setup_native/source/java/javaversion.dat +++ b/setup_native/source/java/javaversion.dat @@ -26,30 +26,30 @@ #************************************************************************* # GUI String in the installer ("Java Runtime Environment (${JAVAVERSION})") -JAVAVERSION=Java 6 Update 20 -WINDOWSJAVAVERSION=Java 6 Update 20 +JAVAVERSION=Java 6 Update 21 +WINDOWSJAVAVERSION=Java 6 Update 21 # Windows (scp2 and downloadtemplate.nsi) -WINDOWSJAVAFILENAME=jre-6u20-windows-i586.exe -WINDOWSJAVAREGISTRYENTRY=1.6.0_20 +WINDOWSJAVAFILENAME=jre-6u21-windows-i586.exe +WINDOWSJAVAREGISTRYENTRY=1.6.0_21 # Linux (scp2) -LINUXJAVAFILENAME=jre-6u20-linux-i586.rpm +LINUXJAVAFILENAME=jre-6u21-linux-i586.rpm # Linux (rpmUnit.xml, rpm -qp <filename> ) -LINUXJAVANAME=jre-1.6.0_20-fcs +LINUXJAVANAME=jre-1.6.0_21-fcs # Linux-x64 (scp2) -LINUXX64JAVAFILENAME=jre-6u20-linux-amd64.rpm +LINUXX64JAVAFILENAME=jre-6u21-linux-amd64.rpm # Solaris Sparc (scp2) -SOLSJAVARTPACKED=SUNWj6rt_1_6_0_20_sparc.tar.gz -SOLSJAVACFGPACKED=SUNWj6cfg_1_6_0_20_sparc.tar.gz -SOLSJAVAMANPACKED=SUNWj6man_1_6_0_20_sparc.tar.gz +SOLSJAVARTPACKED=SUNWj6rt_1_6_0_21_sparc.tar.gz +SOLSJAVACFGPACKED=SUNWj6cfg_1_6_0_21_sparc.tar.gz +SOLSJAVAMANPACKED=SUNWj6man_1_6_0_21_sparc.tar.gz # Solaris x86 (scp2) -SOLIJAVARTPACKED=SUNWj6rt_1_6_0_20_x86.tar.gz -SOLIJAVACFGPACKED=SUNWj6cfg_1_6_0_20_x86.tar.gz -SOLIJAVAMANPACKED=SUNWj6man_1_6_0_20_x86.tar.gz +SOLIJAVARTPACKED=SUNWj6rt_1_6_0_21_x86.tar.gz +SOLIJAVACFGPACKED=SUNWj6cfg_1_6_0_21_x86.tar.gz +SOLIJAVAMANPACKED=SUNWj6man_1_6_0_21_x86.tar.gz # Solaris (pkgUnit.xml, needs only to be changed in major changes) SOLARISJAVART=SUNWj6rt diff --git a/setup_native/source/java/javaversion2.dat b/setup_native/source/java/javaversion2.dat index a629a4037..bb935ac2c 100644 --- a/setup_native/source/java/javaversion2.dat +++ b/setup_native/source/java/javaversion2.dat @@ -26,30 +26,30 @@ #************************************************************************* # GUI String in the installer ("Java Runtime Environment (${JAVAVERSION})") -JAVAVERSION=Java 6 Update 20 -WINDOWSJAVAVERSION=Java 6 Update 20 +JAVAVERSION=Java 6 Update 21 +WINDOWSJAVAVERSION=Java 6 Update 21 # Windows (scp2 and downloadtemplate.nsi) -WINDOWSJAVAFILENAME=jre-6u20-windows-i586.exe -WINDOWSJAVAREGISTRYENTRY=1.6.0_20 +WINDOWSJAVAFILENAME=jre-6u21-windows-i586.exe +WINDOWSJAVAREGISTRYENTRY=1.6.0_21 # Linux (scp2) -LINUXJAVAFILENAME=jre-6u20-linux-i586.rpm +LINUXJAVAFILENAME=jre-6u21-linux-i586.rpm # Linux (rpmUnit.xml, rpm -qp <filename> ) -LINUXJAVANAME=jre-1.6.0_20-fcs +LINUXJAVANAME=jre-1.6.0_21-fcs # Linux-x64 (scp2) -LINUXX64JAVAFILENAME=jre-6u20-linux-amd64.rpm +LINUXX64JAVAFILENAME=jre-6u21-linux-amd64.rpm # Solaris Sparc (scp2) -SOLSJAVARTPACKED=SUNWj6rt_1_6_0_20_sparc.tar.gz -SOLSJAVACFGPACKED=SUNWj6cfg_1_6_0_20_sparc.tar.gz -SOLSJAVAMANPACKED=SUNWj6man_1_6_0_20_sparc.tar.gz +SOLSJAVARTPACKED=SUNWj6rt_1_6_0_21_sparc.tar.gz +SOLSJAVACFGPACKED=SUNWj6cfg_1_6_0_21_sparc.tar.gz +SOLSJAVAMANPACKED=SUNWj6man_1_6_0_21_sparc.tar.gz # Solaris x86 (scp2) -SOLIJAVARTPACKED=SUNWj6rt_1_6_0_20_x86.tar.gz -SOLIJAVACFGPACKED=SUNWj6cfg_1_6_0_20_x86.tar.gz -SOLIJAVAMANPACKED=SUNWj6man_1_6_0_20_x86.tar.gz +SOLIJAVARTPACKED=SUNWj6rt_1_6_0_21_x86.tar.gz +SOLIJAVACFGPACKED=SUNWj6cfg_1_6_0_21_x86.tar.gz +SOLIJAVAMANPACKED=SUNWj6man_1_6_0_21_x86.tar.gz # Solaris (pkgUnit.xml, needs only to be changed in major changes) SOLARISJAVART=SUNWj6rt diff --git a/setup_native/source/mac/broffice/DS_Store b/setup_native/source/mac/broffice/DS_Store Binary files differindex 06aad72c9..b0407ef50 100644 --- a/setup_native/source/mac/broffice/DS_Store +++ b/setup_native/source/mac/broffice/DS_Store diff --git a/setup_native/source/mac/ooo/DS_Store b/setup_native/source/mac/ooo/DS_Store Binary files differindex 632e6aff9..e722b546e 100644 --- a/setup_native/source/mac/ooo/DS_Store +++ b/setup_native/source/mac/ooo/DS_Store diff --git a/setup_native/source/mac/ooo/DS_Store_Langpack b/setup_native/source/mac/ooo/DS_Store_Langpack Binary files differindex 1b53eba75..3a8ad71a5 100644 --- a/setup_native/source/mac/ooo/DS_Store_Langpack +++ b/setup_native/source/mac/ooo/DS_Store_Langpack diff --git a/setup_native/source/packinfo/package.txt b/setup_native/source/packinfo/package.txt new file mode 100644 index 000000000..4ec319646 --- /dev/null +++ b/setup_native/source/packinfo/package.txt @@ -0,0 +1 @@ +DO NOT DELETE THIS FILE
\ No newline at end of file diff --git a/setup_native/source/packinfo/packinfo_office.txt b/setup_native/source/packinfo/packinfo_office.txt index 903e1834e..fb04b347f 100755 --- a/setup_native/source/packinfo/packinfo_office.txt +++ b/setup_native/source/packinfo/packinfo_office.txt @@ -477,6 +477,7 @@ End Start module = "gid_Module_Root_Extension_Oooimprovement" +script = "shellscripts_extensions.txt" solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-oooimprovement" solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION" packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-oooimprovement" @@ -492,6 +493,7 @@ End Start module = "gid_Module_Root_Extension_Dictionary_Af" +script = "shellscripts_extensions.txt" solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-af" solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION" packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-af" @@ -507,6 +509,7 @@ End Start module = "gid_Module_Root_Extension_Dictionary_Ca" +script = "shellscripts_extensions.txt" solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-ca" solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION" packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-ca" @@ -522,6 +525,7 @@ End Start module = "gid_Module_Root_Extension_Dictionary_Cs" +script = "shellscripts_extensions.txt" solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-cs" solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION" packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-cs" @@ -537,6 +541,7 @@ End Start module = "gid_Module_Root_Extension_Dictionary_Da" +script = "shellscripts_extensions.txt" solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-da" solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION" packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-da" @@ -552,6 +557,7 @@ End Start module = "gid_Module_Root_Extension_Dictionary_De_AT" +script = "shellscripts_extensions.txt" solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-de-AT" solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION" packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-de-AT" @@ -567,6 +573,7 @@ End Start module = "gid_Module_Root_Extension_Dictionary_De_CH" +script = "shellscripts_extensions.txt" solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-de-CH" solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION" packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-de-CH" @@ -582,6 +589,7 @@ End Start module = "gid_Module_Root_Extension_Dictionary_De_DE" +script = "shellscripts_extensions.txt" solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-de-DE" solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION" packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-de-DE" @@ -597,6 +605,7 @@ End Start module = "gid_Module_Root_Extension_Dictionary_En" +script = "shellscripts_extensions.txt" solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-en" solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION" packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-en" @@ -612,6 +621,7 @@ End Start module = "gid_Module_Root_Extension_Dictionary_Es" +script = "shellscripts_extensions.txt" solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-es" solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION" packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-es" @@ -627,6 +637,7 @@ End Start module = "gid_Module_Root_Extension_Dictionary_Et" +script = "shellscripts_extensions.txt" solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-et" solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION" packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-et" @@ -642,6 +653,7 @@ End Start module = "gid_Module_Root_Extension_Dictionary_Fr" +script = "shellscripts_extensions.txt" solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-fr" solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION" packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-fr" @@ -657,6 +669,7 @@ End Start module = "gid_Module_Root_Extension_Dictionary_Gl" +script = "shellscripts_extensions.txt" solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-gl" solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION" packagename = "%BASISPACKAGEPREFIX%OOOBASEVERSION-dict-gl" @@ -672,6 +685,7 @@ End Start module = "gid_Module_Root_Extension_Dictionary_He" +script = "shellscripts_extensions.txt" solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-he" solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION" packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-he" @@ -687,6 +701,7 @@ End Start module = "gid_Module_Root_Extension_Dictionary_Hu" +script = "shellscripts_extensions.txt" solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-hu" solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION" packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-hu" @@ -702,6 +717,7 @@ End Start module = "gid_Module_Root_Extension_Dictionary_It" +script = "shellscripts_extensions.txt" solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-it" solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION" packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-it" @@ -717,6 +733,7 @@ End Start module = "gid_Module_Root_Extension_Dictionary_Ku_Tr" +script = "shellscripts_extensions.txt" solarispackagename = "%PACKAGEPREFIX%WITHOUTDOTUNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-ku-TR" solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%WITHOUTDOTUNIXPRODUCTNAME%BRANDPACKAGEVERSION" packagename = "%UNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-ku-TR" @@ -732,6 +749,7 @@ End Start module = "gid_Module_Root_Extension_Dictionary_Lt" +script = "shellscripts_extensions.txt" solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-lt" solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION" packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-lt" @@ -747,6 +765,7 @@ End Start module = "gid_Module_Root_Extension_Dictionary_Ne" +script = "shellscripts_extensions.txt" solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-ne" solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION" packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-ne" @@ -762,6 +781,7 @@ End Start module = "gid_Module_Root_Extension_Dictionary_Nl" +script = "shellscripts_extensions.txt" solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-nl" solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION" packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-nl" @@ -777,6 +797,7 @@ End Start module = "gid_Module_Root_Extension_Dictionary_No" +script = "shellscripts_extensions.txt" solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-no" solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION" packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-no" @@ -792,6 +813,7 @@ End Start module = "gid_Module_Root_Extension_Dictionary_Pl" +script = "shellscripts_extensions.txt" solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-pl" solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION" packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-pl" @@ -807,6 +829,7 @@ End Start module = "gid_Module_Root_Extension_Dictionary_Pt" +script = "shellscripts_extensions.txt" solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-pt" solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION" packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-pt" @@ -822,6 +845,7 @@ End Start module = "gid_Module_Root_Extension_Dictionary_Ro" +script = "shellscripts_extensions.txt" solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-ro" solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION" packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-ro" @@ -837,6 +861,7 @@ End Start module = "gid_Module_Root_Extension_Dictionary_Ru" +script = "shellscripts_extensions.txt" solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-ru" solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION" packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-ru" @@ -852,6 +877,7 @@ End Start module = "gid_Module_Root_Extension_Dictionary_Sk" +script = "shellscripts_extensions.txt" solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-sk" solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION" packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-sk" @@ -867,6 +893,7 @@ End Start module = "gid_Module_Root_Extension_Dictionary_Sl" +script = "shellscripts_extensions.txt" solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-sl" solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION" packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-sl" @@ -882,6 +909,7 @@ End Start module = "gid_Module_Root_Extension_Dictionary_Sr" +script = "shellscripts_extensions.txt" solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-sr" solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION" packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-sr" @@ -897,6 +925,7 @@ End Start module = "gid_Module_Root_Extension_Dictionary_Sv" +script = "shellscripts_extensions.txt" solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-sv" solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION" packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-sv" @@ -912,6 +941,7 @@ End Start module = "gid_Module_Root_Extension_Dictionary_Sw" +script = "shellscripts_extensions.txt" solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-sw" solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION" packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-sw" @@ -927,6 +957,7 @@ End Start module = "gid_Module_Root_Extension_Dictionary_Th" +script = "shellscripts_extensions.txt" solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-th" solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION" packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-th" @@ -942,6 +973,7 @@ End Start module = "gid_Module_Root_Extension_Dictionary_Vi" +script = "shellscripts_extensions.txt" solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-vi" solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION" packagename = "%BASISPACKAGEPREFIX%OOOBASEVERSION-dict-vi" @@ -957,6 +989,7 @@ End Start module = "gid_Module_Root_Extension_Dictionary_Zu" +script = "shellscripts_extensions.txt" solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-zu" solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION" packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-zu" diff --git a/setup_native/source/packinfo/shellscripts_extensions.txt b/setup_native/source/packinfo/shellscripts_extensions.txt index 424962e3d..c73e7fae5 100755 --- a/setup_native/source/packinfo/shellscripts_extensions.txt +++ b/setup_native/source/packinfo/shellscripts_extensions.txt @@ -27,7 +27,7 @@ fi # DISKLESS_SRVC=`echo $$BASEDIR | /usr/bin/grep export/Solaris_[1-9][0-9]/usr_$${ARCH}.all` if [ "$$DISKLESS_SRVC" ]; then - UNOPKG=/export/Solaris_11/usr_`uname -p`.all/opt/staroffice9/program/unopkg + UNOPKG=/export/Solaris_11/usr_`uname -p`.allPRODUCTDIRECTORYNAME/program/unopkg POSTRUN=$$PKG_INSTALL_ROOT/usr_`uname -p`.all/usr/lib/postrun CLIENT_BASEDIR=$$PKG_INSTALL_ROOT/usr_$${ARCH}.all else @@ -38,18 +38,20 @@ fi if [ -x $$POSTRUN ]; then ( echo "test -x \"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg\" || exit 0" echo "umask 022" - echo "\"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg\" add --shared --suppress-license --bundled \"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/share/extension/install/${OXTFILENAME}\" \"-env:UserInstallation=file:////$$INSTDIR\" '-env:UNO_JAVA_JFW_INSTALL_DATA=\$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'" + echo "\"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg\" sync \"-env:BUNDLED_EXTENSIONS_USER=file:////$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/share/prereg/bundled\" \"-env:UserInstallation=file:////$$INSTDIR\" '-env:UNO_JAVA_JFW_INSTALL_DATA=\$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'" + echo "find \"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/share/prereg/bundled\" -type f -exec chmod 644 {} \\;" ) | $$POSTRUN -b -c UNOPKG if [ "$$?" != "0" ]; then - echo "\nERROR: Installation of UNO extension ${OXTFILENAME}" + echo "\nERROR: Installation of UNO extensions" echo " through $$POSTRUN failed." exit 1 fi else # No postrun available, try running unopkg directly - "$$UNOPKG" add --shared --suppress-license --bundled "$$BASEDIR/PRODUCTDIRECTORYNAME/share/extension/install/${OXTFILENAME}" "-env:UserInstallation=file:////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1' + "$$UNOPKG" sync "-env:BUNDLED_EXTENSIONS_USER=file:////////$$BASEDIR/PRODUCTDIRECTORYNAME/share/prereg/bundled" "-env:UserInstallation=file:////////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1' + find "$$BASEDIR/PRODUCTDIRECTORYNAME/share/prereg/bundled" -type f -exec chmod 644 {} \; if [ "$$?" != "0" ]; then - echo "\nERROR: Installation of UNO extension ${OXTFILENAME} failed." + echo "\nERROR: Installation of UNO extensions failed." test "$$BASEDIR" = "$$CLIENT_BASEDIR" || echo "ERROR: alternate root install requires SUNWpostrun package to be installed" echo 'ERROR: Make sure the runtime requirements (operating system, patch level, architecture) are met.' exit 1 @@ -63,7 +65,8 @@ fi exit 0 END -%preremove << END +%postremove << END + if [ -n "$$TMPDIR" ]; then UNOPKGTMP="$$TMPDIR" elif [ -n "$$TMP" ]; then @@ -89,15 +92,17 @@ if [ -x $$PKG_INSTALL_ROOT/usr/lib/postrun ]; then ( echo "test -x \"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg\" || exit 0" echo "cd \"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/program\"" echo "umask 022" - echo "\"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg\" remove --shared --bundled \"${OXTFILENAME}\" \"-env:UserInstallation=file:////$$INSTDIR\" '-env:UNO_JAVA_JFW_INSTALL_DATA=\$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'" + echo "\"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg\" sync \"-env:BUNDLED_EXTENSIONS_USER=file:////$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/share/prereg/bundled\" \"-env:UserInstallation=file:////$$INSTDIR\" '-env:UNO_JAVA_JFW_INSTALL_DATA=\$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'" + echo "find \"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/share/prereg/bundled\" -type f -exec chmod 644 {} \\;" echo "rm -rf \"$$INSTDIR\"" ) | $$PKG_INSTALL_ROOT/usr/lib/postrun -c UNOPKG else # No postrun available, try running unopkg directly test -x $$BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg || exit 0 - "$$BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg" remove --shared --bundled "${OXTFILENAME}" "-env:UserInstallation=file:////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1' + "$$BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg" sync "-env:BUNDLED_EXTENSIONS_USER=file:////////$$BASEDIR/PRODUCTDIRECTORYNAME/share/prereg/bundled" "-env:UserInstallation=file:////////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1' + echo "find \"$$BASEDIR/PRODUCTDIRECTORYNAME/share/prereg/bundled\" -type f -exec chmod 644 {} \\;" if [ "$$?" != "0" ]; then - echo "\nERROR: Removal of UNO extension ${OXTFILENAME} failed." + echo "\nERROR: Removal of UNO extension failed." test "$$BASEDIR" = "$$CLIENT_BASEDIR" || echo "ERROR: alternate root uninstall requires SUNWpostrun package to be installed" echo 'ERROR: Make sure the runtime requirements (operating system, patch level, architecture) are met.' exit 1 @@ -115,44 +120,6 @@ END %format rpm -# As remove does not need the oxt file, this could potentially -# be done in the postinstall script as well. -%preinstall << END -# if this is an update, remove the old package instance first -test "$$1" = "2" || exit 0 - -#Find the temp dir -if [ -n "$$TMPDIR" ]; then - UNOPKGTMP="$$TMPDIR" -elif [ -n "$$TMP" ]; then - UNOPKGTMP="$$TMP" -elif [ -d "/tmp" ]; then - UNOPKGTMP="/tmp" -else - echo "No tmp directory found!" - exit 1 -fi - -#Create the command which creates a temporary directory -if [ -x "/bin/mktemp" ] -then - INSTDIR=`/bin/mktemp -d "$${UNOPKGTMP}/userinstall.XXXXXX"` -else - INSTDIR="$${UNOPKGTMP}/userinstall.$$$$" - mkdir "$$INSTDIR" -fi - -if [ -x "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/program/unopkg" ]; then - "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/program/unopkg" remove --shared --bundled "${OXTFILENAME}" "-env:UserInstallation=file:////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1' -fi - -if [ -n "$$INSTDIR" ]; then - rm -rf "$$INSTDIR" -fi - -exit 0 -END - %postinstall << END #Find the temp dir if [ -n "$$TMPDIR" ]; then @@ -176,7 +143,8 @@ else fi if [ -x "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/program/unopkg" ]; then - "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/program/unopkg" add --shared --suppress-license --shared "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/share/extension/install/${OXTFILENAME}" "-env:UserInstallation=file://////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1' + "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/program/unopkg" sync "-env:BUNDLED_EXTENSIONS_USER=file:////$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/share/prereg/bundled" "-env:UserInstallation=file:////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1' + find "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/share/prereg/bundled" -type f -exec chmod 644 {} \; fi if [ -n "$$INSTDIR" ]; then @@ -185,13 +153,9 @@ fi exit 0 - END -%preremove << END -# if this is an update, just do nothing -test "$$1" = "0" || exit 0 - +%postremove << END #Find the temp dir if [ -n "$$TMPDIR" ]; then UNOPKGTMP="$$TMPDIR" @@ -214,7 +178,8 @@ else fi if [ -x "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/program/unopkg" ]; then - "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/program/unopkg" remove --shared --bundled "${OXTFILENAME}" "-env:UserInstallation=file:////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1' + "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/program/unopkg" sync "-env:BUNDLED_EXTENSIONS_USER=file:////$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/share/prereg/bundled" "-env:UserInstallation=file:////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1' + find "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/share/prereg/bundled" -type f -exec chmod 644 {} \; fi if [ -n "$$INSTDIR" ]; then @@ -226,53 +191,6 @@ END %format deb -# As remove does not need the oxt file, this could potentially -# be done in the postinstall script as well. -%preinstall << END -# if this is an update, remove the old package instance first -if [ "$$1" != "upgrade" ] -then - exit 0 -fi - -#Find the temp dir -if [ -n "$$TMPDIR" ] -then - UNOPKGTMP="$$TMPDIR" -elif [ -n "$$TMP" ] -then - UNOPKGTMP="$$TMP" -elif [ -d "/tmp" ] -then - UNOPKGTMP="/tmp" -else - echo "No tmp directory found!" - exit 1 -fi - - -#Create the command which creates a temporary directory -if [ -x "/bin/mktemp" ] -then - INSTDIR=`/bin/mktemp -d "$${UNOPKGTMP}/userinstall.XXXXXX"` -else - INSTDIR="$${UNOPKGTMP}/userinstall.$$$$" - mkdir "$$INSTDIR" -fi - -if [ -x "PRODUCTDIRECTORYNAME/program/unopkg" ] -then - "PRODUCTDIRECTORYNAME/program/unopkg" remove --shared --bundled "${OXTFILENAME}" "-env:UserInstallation=file:////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1' -fi - -if [ -n "$$INSTDIR" ] -then - rm -rf "$$INSTDIR" -fi - -exit 0 -END - %postinstall << END #Find the temp dir if [ -n "$$TMPDIR" ] @@ -299,7 +217,8 @@ else fi if [ -x "PRODUCTDIRECTORYNAME/program/unopkg" ]; then - "PRODUCTDIRECTORYNAME/program/unopkg" add --shared --suppress-license --bundled "PRODUCTDIRECTORYNAME/share/extension/install/${OXTFILENAME}" "-env:UserInstallation=file://////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1' + "PRODUCTDIRECTORYNAME/program/unopkg" sync "-env:BUNDLED_EXTENSIONS_USER=file://////PRODUCTDIRECTORYNAME/share/prereg/bundled" "-env:UserInstallation=file://////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1' + find "PRODUCTDIRECTORYNAME/share/prereg/bundled" -type f -exec chmod 644 {} \; fi if [ -n "$$INSTDIR" ] @@ -309,18 +228,10 @@ fi exit 0 - END -%preremove << END -# if this is an update, just do nothing - -if [ "$$1" = "upgrade" ] -then - exit 0 -fi - -#Find the temp dir +%postremove << END +# Find the temp dir if [ -n "$$TMPDIR" ] then UNOPKGTMP="$$TMPDIR" @@ -346,7 +257,8 @@ fi if [ -x "PRODUCTDIRECTORYNAME/program/unopkg" ] then - "PRODUCTDIRECTORYNAME/program/unopkg" remove --shared --bundled "${OXTFILENAME}" "-env:UserInstallation=file:////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1' + "PRODUCTDIRECTORYNAME/program/unopkg" sync "-env:BUNDLED_EXTENSIONS_USER=file://////PRODUCTDIRECTORYNAME/share/prereg/bundled" "-env:UserInstallation=file://////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1' + find "PRODUCTDIRECTORYNAME/share/prereg/bundled" -type f -exec chmod 644 {} \; fi if [ -n "$$INSTDIR" ] diff --git a/setup_native/source/win32/customactions/languagepacks/exports.dxp b/setup_native/source/win32/customactions/languagepacks/exports.dxp index d01befd5d..c098a38d5 100644 --- a/setup_native/source/win32/customactions/languagepacks/exports.dxp +++ b/setup_native/source/win32/customactions/languagepacks/exports.dxp @@ -2,3 +2,5 @@ SetProductInstallationPath RegisterLanguagePack GetUserInstallMode IsOfficeRunning +RegisterExtensions + diff --git a/setup_native/source/win32/customactions/languagepacks/makefile.mk b/setup_native/source/win32/customactions/languagepacks/makefile.mk index 69526077c..8da47ab1c 100644 --- a/setup_native/source/win32/customactions/languagepacks/makefile.mk +++ b/setup_native/source/win32/customactions/languagepacks/makefile.mk @@ -77,6 +77,7 @@ STDSHL+= \ #SHL1LIBS = $(SLB)$/$(TARGET).lib SHL1OBJS = $(SLOFILES) \ + $(SLO)$/registerextensions.obj \ $(SLO)$/seterror.obj SHL1TARGET = $(TARGET) diff --git a/setup_native/source/win32/customactions/patch/exports.dxp b/setup_native/source/win32/customactions/patch/exports.dxp index b57f2838b..dd5eb4dcf 100755 --- a/setup_native/source/win32/customactions/patch/exports.dxp +++ b/setup_native/source/win32/customactions/patch/exports.dxp @@ -7,3 +7,5 @@ IsOfficeRunning SetFeatureState SetNewFeatureState ShowOnlineUpdateDialog +RegisterExtensions +RemoveExtensions diff --git a/setup_native/source/win32/customactions/patch/makefile.mk b/setup_native/source/win32/customactions/patch/makefile.mk index cb8733de2..577053892 100755 --- a/setup_native/source/win32/customactions/patch/makefile.mk +++ b/setup_native/source/win32/customactions/patch/makefile.mk @@ -76,6 +76,7 @@ SHL1OBJS = $(SLOFILES) \ $(SLO)$/shutdown_quickstart.obj \ $(SLO)$/quickstarter.obj \ $(SLO)$/upgrade.obj \ + $(SLO)$/registerextensions.obj \ $(SLO)$/seterror.obj SHL1TARGET = $(TARGET) diff --git a/setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx b/setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx index aea7610b7..4c06be2ed 100644..100755 --- a/setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx +++ b/setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx @@ -116,14 +116,43 @@ static BOOL CheckExtensionInRegistry( LPCSTR lpSubKey ) { // We will replace registration for word pad bRet = true; } - if ( strncmp( szBuffer, "OpenOffice.org.", 15 ) == 0 ) + else if ( strncmp( szBuffer, "OpenOffice.org.", 15 ) == 0 ) { // We will replace registration for our own types, too bRet = true; } - if ( strncmp( szBuffer, "ooostub.", 8 ) == 0 ) + else if ( strncmp( szBuffer, "ooostub.", 8 ) == 0 ) { // We will replace registration for ooostub, too bRet = true; } + else + { + OutputDebugStringFormat( " Checking OpenWithList of [%s].\n", lpSubKey ); + HKEY hSubKey; + lResult = RegOpenKeyExA( hKey, "OpenWithList", 0, KEY_ENUMERATE_SUB_KEYS, &hSubKey ); + if ( ERROR_SUCCESS == lResult ) + { + DWORD nIndex = 0; + while ( ERROR_SUCCESS == lResult ) + { + nSize = sizeof( szBuffer ); + lResult = RegEnumKeyExA( hSubKey, nIndex++, szBuffer, &nSize, NULL, NULL, NULL, NULL ); + if ( ERROR_SUCCESS == lResult ) + { + OutputDebugStringFormat( " Found value [%s] in OpenWithList of [%s].\n", szBuffer, lpSubKey ); + if ( strncmp( szBuffer, "WordPad.exe", 11 ) == 0 ) + { // We will replace registration for word pad + bRet = true; + } + else if ( nSize > 0 ) + bRet = false; + } + } + } + else + { + OutputDebugStringFormat( " No OpenWithList found!\n" ); + } + } } else // no default value found -> return TRUE to register for that key bRet = true; diff --git a/setup_native/source/win32/customactions/shellextensions/completeinstallpath.cxx b/setup_native/source/win32/customactions/shellextensions/completeinstallpath.cxx new file mode 100644 index 000000000..68d7cef52 --- /dev/null +++ b/setup_native/source/win32/customactions/shellextensions/completeinstallpath.cxx @@ -0,0 +1,180 @@ +/************************************************************************* + * + * 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 + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#define _WIN32_WINDOWS 0x0410 +#ifdef _MSC_VER +#pragma warning(push, 1) /* disable warnings within system headers */ +#endif +#define WIN32_LEAN_AND_MEAN +#include <windows.h> +#include <msiquery.h> +#ifdef _MSC_VER +#pragma warning(pop) +#endif + +#include <malloc.h> + +#ifdef UNICODE +#define _UNICODE +#define _tstring wstring +#else +#define _tstring string +#endif +#include <tchar.h> +#include <string> + +using namespace std; + +namespace +{ + std::_tstring GetMsiProperty( MSIHANDLE handle, const std::_tstring& sProperty ) + { + std::_tstring result; + TCHAR szDummy[1] = TEXT(""); + DWORD nChars = 0; + + if ( MsiGetProperty( handle, sProperty.c_str(), szDummy, &nChars ) == ERROR_MORE_DATA ) + { + DWORD nBytes = ++nChars * sizeof(TCHAR); + LPTSTR buffer = reinterpret_cast<LPTSTR>(_alloca(nBytes)); + ZeroMemory( buffer, nBytes ); + MsiGetProperty(handle, sProperty.c_str(), buffer, &nChars); + result = buffer; + } + + return result; + } +} // namespace + +extern "C" UINT __stdcall CompleteInstallPath( MSIHANDLE handle ) +{ + // This CustomAction is necessary for updates from OOo 3.0, OOo 3.1 and OOo 3.2 to versions + // OOo 3.3 or later. This is caused by a change of INSTALLLOCATION, that starting with OOo 3.3 + // contains the name of the product again (instead of only "c:\program files"). Unfortunately + // this causes in an update installation, that INSTALLLOCATION is set to "c:\program files", + // so that in an OOo 3.3 or later, the directory "program" or "share" are directly created + // below "c:\program files". + + TCHAR szValue[8192]; + DWORD nValueSize = sizeof(szValue); + HKEY hKey; + std::_tstring sInstDir; + std::_tstring mystr; + + // Reading property OFFICEDIRHOSTNAME_, that contains the part of the path behind + // the program files folder. + + std::_tstring sInstallLocation = GetMsiProperty( handle, TEXT("INSTALLLOCATION") ); + std::_tstring sOfficeDirHostname = GetMsiProperty( handle, TEXT("OFFICEDIRHOSTNAME_") ); + + // If sInstallLocation ends with (contains) the string sOfficeDirHostname, + // INSTALLLOCATION is good and nothing has to be done here. + + bool pathCompletionRequired = true; + + if ( _tcsstr( sInstallLocation.c_str(), sOfficeDirHostname.c_str() ) ) + { + pathCompletionRequired = false; // nothing to do + // mystr = "Nothing to do, officedir is included into installlocation"; + // MessageBox( NULL, mystr.c_str(), "It is part of installlocation", MB_OK ); + } + + // If the path INSTALLLOCATION does not end with this string, INSTALLLOCATION is maybe + // transfered from an OOo 3.0, OOo 3.1 and OOo 3.2 and need to be changed therefore. + + if ( pathCompletionRequired ) + { + std::_tstring sManufacturer = GetMsiProperty( handle, TEXT("Manufacturer") ); + std::_tstring sDefinedName = GetMsiProperty( handle, TEXT("DEFINEDPRODUCT") ); + std::_tstring sUpgradeCode = GetMsiProperty( handle, TEXT("UpgradeCode") ); + + // sUpdateVersion can be "3.0", "3.1" or "3.2" + + std::_tstring sProductKey30 = "Software\\" + sManufacturer + "\\" + sDefinedName + + "\\" + "3.0" + "\\" + sUpgradeCode; + + std::_tstring sProductKey31 = "Software\\" + sManufacturer + "\\" + sDefinedName + + "\\" + "3.1" + "\\" + sUpgradeCode; + + std::_tstring sProductKey32 = "Software\\" + sManufacturer + "\\" + sDefinedName + + "\\" + "3.2" + "\\" + sUpgradeCode; + + // mystr = "ProductKey: " + sProductKey; + // MessageBox( NULL, mystr.c_str(), "ProductKey", MB_OK ); + + // mystr = "Checking registry"; + // MessageBox( NULL, mystr.c_str(), "registry search", MB_OK ); + + bool oldVersionExists = false; + + if ( ERROR_SUCCESS == RegOpenKey( HKEY_CURRENT_USER, sProductKey30.c_str(), &hKey ) ) + { + oldVersionExists = true; + RegCloseKey( hKey ); + } + else if ( ERROR_SUCCESS == RegOpenKey( HKEY_CURRENT_USER, sProductKey31.c_str(), &hKey ) ) + { + oldVersionExists = true; + RegCloseKey( hKey ); + } + else if ( ERROR_SUCCESS == RegOpenKey( HKEY_CURRENT_USER, sProductKey32.c_str(), &hKey ) ) + { + oldVersionExists = true; + RegCloseKey( hKey ); + } + else if ( ERROR_SUCCESS == RegOpenKey( HKEY_LOCAL_MACHINE, sProductKey30.c_str(), &hKey ) ) + { + oldVersionExists = true; + RegCloseKey( hKey ); + } + else if ( ERROR_SUCCESS == RegOpenKey( HKEY_LOCAL_MACHINE, sProductKey31.c_str(), &hKey ) ) + { + oldVersionExists = true; + RegCloseKey( hKey ); + } + else if ( ERROR_SUCCESS == RegOpenKey( HKEY_LOCAL_MACHINE, sProductKey32.c_str(), &hKey ) ) + { + oldVersionExists = true; + RegCloseKey( hKey ); + } + + if ( oldVersionExists ) + { + // Adding the new path content sOfficeDirHostname + sInstallLocation = sInstallLocation + sOfficeDirHostname; + // Setting the new property value + MsiSetProperty(handle, TEXT("INSTALLLOCATION"), sInstallLocation.c_str()); + // mystr = "Setting path to: " + sInstallLocation; + // MessageBox( NULL, mystr.c_str(), "sInstallLocation", MB_OK ); + } + } + + // mystr = "Ending with INSTALLLOCATION: " + sInstallLocation; + // MessageBox( NULL, mystr.c_str(), "END", MB_OK ); + + return ERROR_SUCCESS; +} diff --git a/setup_native/source/win32/customactions/shellextensions/exports.dxp b/setup_native/source/win32/customactions/shellextensions/exports.dxp index 0e53492e4..5826d3392 100644 --- a/setup_native/source/win32/customactions/shellextensions/exports.dxp +++ b/setup_native/source/win32/customactions/shellextensions/exports.dxp @@ -5,7 +5,10 @@ DeinstallStartmenuFolderIcon SetProductInstallMode RebuildShellIconCache ExecutePostUninstallScript +CompleteInstallPath MigrateInstallPath +RegisterExtensions +RemoveExtensions CheckInstallDirectory SetAdminInstallProperty CreateLayerLinks diff --git a/setup_native/source/win32/customactions/shellextensions/makefile.mk b/setup_native/source/win32/customactions/shellextensions/makefile.mk index 9eef136a8..23fe24bb6 100644 --- a/setup_native/source/win32/customactions/shellextensions/makefile.mk +++ b/setup_native/source/win32/customactions/shellextensions/makefile.mk @@ -58,10 +58,12 @@ SLOFILES = \ $(SLO)$/iconcache.obj \ $(SLO)$/postuninstall.obj \ $(SLO)$/migrateinstallpath.obj \ + $(SLO)$/completeinstallpath.obj \ $(SLO)$/checkdirectory.obj \ $(SLO)$/setadmininstall.obj \ $(SLO)$/layerlinks.obj \ $(SLO)$/dotnetcheck.obj \ + $(SLO)$/registerextensions.obj \ $(SLO)$/copyeditiondata.obj \ $(SLO)$/vistaspecial.obj \ $(SLO)$/checkrunningoffice.obj \ diff --git a/setup_native/source/win32/customactions/shellextensions/registerextensions.cxx b/setup_native/source/win32/customactions/shellextensions/registerextensions.cxx index 83946e794..c1aadd409 100644 --- a/setup_native/source/win32/customactions/shellextensions/registerextensions.cxx +++ b/setup_native/source/win32/customactions/shellextensions/registerextensions.cxx @@ -319,202 +319,56 @@ extern "C" UINT __stdcall RegisterExtensions(MSIHANDLE handle) { std::_tstring sInstDir = GetMsiProperty( handle, TEXT("INSTALLLOCATION") ); std::_tstring sUnoPkgFile = sInstDir + TEXT("program\\unopkg.exe"); - std::_tstring sShareInstallDir = sInstDir + TEXT("share\\extension\\install\\"); - std::_tstring sPattern = sShareInstallDir + TEXT("*.oxt"); std::_tstring mystr; WIN32_FIND_DATA aFindFileData; mystr = "unopkg file: " + sUnoPkgFile; - // MessageBox(NULL, mystr.c_str(), "Command", MB_OK); - - mystr = "oxt file directory: " + sShareInstallDir; - // MessageBox(NULL, mystr.c_str(), "Command", MB_OK); + //MessageBox(NULL, mystr.c_str(), "Command", MB_OK); // Find unopkg.exe - HANDLE hFindUnopkg = FindFirstFile( sUnoPkgFile.c_str(), &aFindFileData ); if ( hFindUnopkg != INVALID_HANDLE_VALUE ) { // unopkg.exe exists in program directory - // Finding all oxt files in sShareInstallDir - - HANDLE hFindOxt = FindFirstFile( sPattern.c_str(), &aFindFileData ); - - if ( hFindOxt != INVALID_HANDLE_VALUE ) - { - bool fNextFile = false; + const std::_tstring sTempFolder(createTempFolder()); + std::_tstring sCommandPart1 = sUnoPkgFile + " sync"; + std::_tstring sCommand = sCommandPart1 + + TEXT(" -env:BUNDLED_EXTENSIONS_USER=$BRAND_BASE_DIR/share/prereg/bundled") + + TEXT(" -env:UNO_JAVA_JFW_INSTALL_DATA=$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml") + + TEXT(" -env:UserInstallation=") + sTempFolder; + mystr = "Command: " + sCommand; + //MessageBox(NULL, mystr.c_str(), "Command", MB_OK); + + DWORD exitCode = 0; + bool fSuccess = ExecuteCommand( sCommand.c_str(), & exitCode); - do - { - const std::_tstring sTempFolder(createTempFolder()); - std::_tstring sOxtFile = sShareInstallDir + aFindFileData.cFileName; - std::_tstring sCommandPart1 = sUnoPkgFile + " add --shared --suppress-license --bundled " + "\"" + sOxtFile + "\""; - std::_tstring sCommand = sCommandPart1 - + TEXT(" -env:UNO_JAVA_JFW_INSTALL_DATA=$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml") - + TEXT(" -env:UserInstallation=") + sTempFolder; - mystr = "Command: " + sCommand; - // MessageBox(NULL, mystr.c_str(), "Command", MB_OK); - - DWORD exitCode = 0; - bool fSuccess = ExecuteCommand( sCommand.c_str(), & exitCode); - // unopkg in OOo 2.2.1 and early had a bug that it failed when receiving - // a bootstrap parameter (-env:...) then it exited with a value != 0. - if (fSuccess && exitCode != 0) - { - std::_tstring sCommand = sCommandPart1; - mystr = "Command: " + sCommand; - // MessageBox(NULL, mystr.c_str(), "Command", MB_OK); - fSuccess = ExecuteCommand( sCommand.c_str(), & exitCode); - } - deleteTempFolder(sTempFolder); - - // if ( fSuccess ) - // { - // mystr = "Executed successfully!"; - // MessageBox(NULL, mystr.c_str(), "Command", MB_OK); - // } - // else - // { - // mystr = "An error occured during execution!"; - // MessageBox(NULL, mystr.c_str(), "Command", MB_OK); - // } - - fNextFile = FindNextFile( hFindOxt, &aFindFileData ); - - } while ( fNextFile ); - - FindClose( hFindOxt ); - } + deleteTempFolder(sTempFolder); + +// if ( fSuccess ) +// { +// mystr = "Executed successfully!"; +// MessageBox(NULL, mystr.c_str(), "Command", MB_OK); +// } +// else +// { +// mystr = "An error occured during execution!"; +// MessageBox(NULL, mystr.c_str(), "Command", MB_OK); +// } + + FindClose( hFindUnopkg ); } - // else - // { - // mystr = "Error: Did not find " + sUnoPkgFile; - // MessageBox(NULL, mystr.c_str(), "Command", MB_OK); - // } +// else +// { +// mystr = "Error: Did not find " + sUnoPkgFile; +// MessageBox(NULL, mystr.c_str(), "Command", MB_OK); +// } return ERROR_SUCCESS; } -extern "C" UINT __stdcall DeregisterExtensions(MSIHANDLE handle) -{ - std::_tstring mystr; - - // Finding the product with the help of the propery FINDPRODUCT, - // that contains a Windows Registry key, that points to the install location. - - TCHAR szValue[8192]; - DWORD nValueSize = sizeof(szValue); - HKEY hKey; - std::_tstring sInstDir; - - std::_tstring sProductKey = GetMsiProperty( handle, TEXT("FINDPRODUCT") ); - // MessageBox( NULL, sProductKey.c_str(), "Titel", MB_OK ); - - if ( ERROR_SUCCESS == RegOpenKey( HKEY_CURRENT_USER, sProductKey.c_str(), &hKey ) ) - { - if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("INSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) - { - sInstDir = szValue; - } - RegCloseKey( hKey ); - } - else if ( ERROR_SUCCESS == RegOpenKey( HKEY_LOCAL_MACHINE, sProductKey.c_str(), &hKey ) ) - { - if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("INSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) - { - sInstDir = szValue; - } - RegCloseKey( hKey ); - } - else - { - return ERROR_SUCCESS; - } - - // MessageBox( NULL, sInstDir.c_str(), "install location", MB_OK ); - - // Searching for the unopkg.exe - - std::_tstring sUnoPkgFile = sInstDir + TEXT("program\\unopkg.exe"); - std::_tstring sShareInstallDir = sInstDir + TEXT("share\\extension\\install\\"); - std::_tstring sPattern = sShareInstallDir + TEXT("*.oxt"); - - WIN32_FIND_DATA aFindFileData; - - // Find unopkg.exe - - HANDLE hFindUnopkg = FindFirstFile( sUnoPkgFile.c_str(), &aFindFileData ); - - if ( hFindUnopkg != INVALID_HANDLE_VALUE ) - { - // unopkg.exe exists in program directory - - // Finding all oxt files in sShareInstallDir - - HANDLE hFindOxt = FindFirstFile( sPattern.c_str(), &aFindFileData ); - - if ( hFindOxt != INVALID_HANDLE_VALUE ) - { - bool fNextFile = false; - - do - { - const std::_tstring sTempFolder(createTempFolder()); - // When removing extensions, only the oxt file name is required, without path - // Therefore no quoting is required - // std::_tstring sOxtFile = sShareInstallDir + aFindFileData.cFileName; - std::_tstring sOxtFile = aFindFileData.cFileName; - std::_tstring sCommandPart1 = sUnoPkgFile + " remove --shared --bundled " + "\"" - + sOxtFile + "\""; - std::_tstring sCommand = sCommandPart1 - + TEXT(" -env:UNO_JAVA_JFW_INSTALL_DATA=$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml") - + TEXT(" -env:UserInstallation=") + sTempFolder; - - mystr = "Command: " + sCommand; - //MessageBox(NULL, mystr.c_str(), "Command", MB_OK); - DWORD exitCode = 0; - bool fSuccess = ExecuteCommand( sCommand.c_str(), & exitCode); - // unopkg in OOo 2.2.1 and early had a bug that it failed when receiving - // a bootstrap parameter (-env:...) then it exited with a value != 0. - if (fSuccess && exitCode != 0) - { - std::_tstring sCommand = sCommandPart1; - mystr = "Command: " + sCommand; - //MessageBox(NULL, mystr.c_str(), "Command", MB_OK); - fSuccess = ExecuteCommand( sCommand.c_str(), & exitCode); - } - - deleteTempFolder(sTempFolder); - - if ( fSuccess ) - { - mystr = "Executed successfully!"; - // MessageBox(NULL, mystr.c_str(), "Command", MB_OK); - } - else - { - mystr = "An error occured during execution!"; - // MessageBox(NULL, mystr.c_str(), "Command", MB_OK); - } - - fNextFile = FindNextFile( hFindOxt, &aFindFileData ); - - } while ( fNextFile ); - - FindClose( hFindOxt ); - } - } - // else - // { - // mystr = "Not found: " + sUnoPkgFile; - // MessageBox(NULL, mystr.c_str(), "Command", MB_OK); - // } - - return ERROR_SUCCESS; -} extern "C" UINT __stdcall RemoveExtensions(MSIHANDLE handle) { @@ -529,7 +383,7 @@ extern "C" UINT __stdcall RemoveExtensions(MSIHANDLE handle) std::_tstring sInstDir; std::_tstring sProductKey = GetMsiProperty( handle, TEXT("FINDPRODUCT") ); - // MessageBox( NULL, sProductKey.c_str(), "Titel", MB_OK ); + //MessageBox( NULL, sProductKey.c_str(), "Titel", MB_OK ); if ( ERROR_SUCCESS == RegOpenKey( HKEY_CURRENT_USER, sProductKey.c_str(), &hKey ) ) { @@ -552,22 +406,22 @@ extern "C" UINT __stdcall RemoveExtensions(MSIHANDLE handle) return ERROR_SUCCESS; } - // Removing complete directory "share\uno_packages\cache" + // Removing complete directory "Basis\presets\bundled" - std::_tstring sCacheDir = sInstDir + TEXT("share\\uno_packages\\cache"); + std::_tstring sCacheDir = sInstDir + TEXT("share\\prereg\\bundled"); bool fSuccess = RemoveCompleteDirectory( sCacheDir ); - if ( fSuccess ) - { - mystr = "Executed successfully!"; - // MessageBox(NULL, mystr.c_str(), "Main methode", MB_OK); - } - else - { - mystr = "An error occured during execution!"; - // MessageBox(NULL, mystr.c_str(), "Main methode", MB_OK); - } +// if ( fSuccess ) +// { +// mystr = "Executed successfully!"; +// MessageBox(NULL, mystr.c_str(), "Main methode", MB_OK); +// } +// else +// { +// mystr = "An error occured during execution!"; +// MessageBox(NULL, mystr.c_str(), "Main methode", MB_OK); +// } return ERROR_SUCCESS; } diff --git a/xmlsecurity/source/dialogs/resourcemanager.cxx b/xmlsecurity/source/dialogs/resourcemanager.cxx index e2f7b1413..635b8dd3c 100644 --- a/xmlsecurity/source/dialogs/resourcemanager.cxx +++ b/xmlsecurity/source/dialogs/resourcemanager.cxx @@ -149,7 +149,7 @@ namespace XmlSec */ #ifdef WNT vector< pair< OUString, OUString> > parseDN(const OUString& rRawString) - { +{ vector< pair<OUString, OUString> > retVal; bool bInEscape = false; bool bInValue = false; @@ -197,7 +197,7 @@ vector< pair< OUString, OUString> > parseDN(const OUString& rRawString) bInEscape = false; } } - else if (c == ',') + else if (c == ',' || c == '+') { //The comma separate the attribute value pairs. //If the comma is not part of a value (the value would then be enclosed in '"'), @@ -292,7 +292,7 @@ vector< pair< OUString, OUString> > parseDN(const OUString& rRawString) bInEscape = false; } } - else if (c == ',') + else if (c == ',' || c == '+') { //The comma separate the attribute value pairs. //If the comma is not part of a value (the value would then be enclosed in '"'), diff --git a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx index d4c0689e5..f5948d624 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx +++ b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx @@ -107,7 +107,7 @@ findTypeInDN(const OUString& rRawString, const OUString& sTypeName) bInEscape = false; } } - else if (c == ',') + else if (c == ',' || c == '+') { //The comma separate the attribute value pairs. //If the comma is not part of a value (the value would then be enclosed in '"'), diff --git a/xmlsecurity/test_docs/certs/end_certs/User_32_Root_11.crt b/xmlsecurity/test_docs/certs/end_certs/User_32_Root_11.crt Binary files differnew file mode 100755 index 000000000..dc28470c8 --- /dev/null +++ b/xmlsecurity/test_docs/certs/end_certs/User_32_Root_11.crt diff --git a/xmlsecurity/test_docs/certs/end_certs/User_33_Root_11.crt b/xmlsecurity/test_docs/certs/end_certs/User_33_Root_11.crt Binary files differnew file mode 100755 index 000000000..df9d81d8d --- /dev/null +++ b/xmlsecurity/test_docs/certs/end_certs/User_33_Root_11.crt diff --git a/xmlsecurity/test_docs/certs/end_certs/User_34_Root_11.crt b/xmlsecurity/test_docs/certs/end_certs/User_34_Root_11.crt Binary files differnew file mode 100755 index 000000000..018da383d --- /dev/null +++ b/xmlsecurity/test_docs/certs/end_certs/User_34_Root_11.crt diff --git a/xmlsecurity/test_docs/certs/p12/Root_11.p12 b/xmlsecurity/test_docs/certs/p12/Root_11.p12 Binary files differnew file mode 100644 index 000000000..7df592643 --- /dev/null +++ b/xmlsecurity/test_docs/certs/p12/Root_11.p12 diff --git a/xmlsecurity/test_docs/certs/p12/User_32_Root_11.p12 b/xmlsecurity/test_docs/certs/p12/User_32_Root_11.p12 Binary files differnew file mode 100644 index 000000000..17e22f7a5 --- /dev/null +++ b/xmlsecurity/test_docs/certs/p12/User_32_Root_11.p12 diff --git a/xmlsecurity/test_docs/certs/p12/User_33_Root_11.p12 b/xmlsecurity/test_docs/certs/p12/User_33_Root_11.p12 Binary files differnew file mode 100644 index 000000000..5982532a9 --- /dev/null +++ b/xmlsecurity/test_docs/certs/p12/User_33_Root_11.p12 diff --git a/xmlsecurity/test_docs/certs/p12/User_34_Root_11.p12 b/xmlsecurity/test_docs/certs/p12/User_34_Root_11.p12 Binary files differnew file mode 100644 index 000000000..4c00b21d4 --- /dev/null +++ b/xmlsecurity/test_docs/certs/p12/User_34_Root_11.p12 diff --git a/xmlsecurity/test_docs/documents/dn_multivalue_rdn.odt b/xmlsecurity/test_docs/documents/dn_multivalue_rdn.odt Binary files differnew file mode 100755 index 000000000..4d34bc0f5 --- /dev/null +++ b/xmlsecurity/test_docs/documents/dn_multivalue_rdn.odt diff --git a/xmlsecurity/test_docs/documents/dn_single_multivalue_rdn.odt b/xmlsecurity/test_docs/documents/dn_single_multivalue_rdn.odt Binary files differnew file mode 100755 index 000000000..798f25a35 --- /dev/null +++ b/xmlsecurity/test_docs/documents/dn_single_multivalue_rdn.odt diff --git a/xmlsecurity/test_docs/documents/dn_single_multivalue_rdn_with_quoting.odt b/xmlsecurity/test_docs/documents/dn_single_multivalue_rdn_with_quoting.odt Binary files differnew file mode 100755 index 000000000..591f9aa4d --- /dev/null +++ b/xmlsecurity/test_docs/documents/dn_single_multivalue_rdn_with_quoting.odt diff --git a/xmlsecurity/test_docs/test_description.odt b/xmlsecurity/test_docs/test_description.odt Binary files differindex 9c2eff18d..45bbb5b0d 100755 --- a/xmlsecurity/test_docs/test_description.odt +++ b/xmlsecurity/test_docs/test_description.odt |