sb130: merged in OOO330_m5
This commit is contained in:
commit
fd6cf3d74c
@ -96,11 +96,12 @@ void RootAccess::initBroadcaster(
|
|||||||
for (ChangesListeners::iterator i(changesListeners_.begin());
|
for (ChangesListeners::iterator i(changesListeners_.begin());
|
||||||
i != changesListeners_.end(); ++i)
|
i != changesListeners_.end(); ++i)
|
||||||
{
|
{
|
||||||
|
cppu::OWeakObject* pSource = static_cast< cppu::OWeakObject * >(this);
|
||||||
|
css::uno::Reference< css::uno::XInterface > xBase( pSource, css::uno::UNO_QUERY );
|
||||||
broadcaster->addChangesNotification(
|
broadcaster->addChangesNotification(
|
||||||
*i,
|
*i,
|
||||||
css::util::ChangesEvent(
|
css::util::ChangesEvent(
|
||||||
static_cast< cppu::OWeakObject * >(this),
|
pSource, makeAny( xBase ), set));
|
||||||
css::uno::makeAny(pathRepresentation_), set));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,9 @@
|
|||||||
// MARKER(update_precomp.py): autogen include statement, do not remove
|
// MARKER(update_precomp.py): autogen include statement, do not remove
|
||||||
#include "precompiled_desktop.hxx"
|
#include "precompiled_desktop.hxx"
|
||||||
|
|
||||||
|
#include <cstdlib>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include "app.hxx"
|
#include "app.hxx"
|
||||||
@ -119,6 +122,7 @@
|
|||||||
#include <osl/file.hxx>
|
#include <osl/file.hxx>
|
||||||
#include <osl/signal.h>
|
#include <osl/signal.h>
|
||||||
#include <rtl/uuid.h>
|
#include <rtl/uuid.h>
|
||||||
|
#include <rtl/uri.hxx>
|
||||||
#include <unotools/pathoptions.hxx>
|
#include <unotools/pathoptions.hxx>
|
||||||
#include <svl/languageoptions.hxx>
|
#include <svl/languageoptions.hxx>
|
||||||
#include <unotools/internaloptions.hxx>
|
#include <unotools/internaloptions.hxx>
|
||||||
@ -155,6 +159,11 @@
|
|||||||
|
|
||||||
#include "langselect.hxx"
|
#include "langselect.hxx"
|
||||||
|
|
||||||
|
#if defined MACOSX
|
||||||
|
#include <errno.h>
|
||||||
|
#include <sys/wait.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#define DEFINE_CONST_UNICODE(CONSTASCII) UniString(RTL_CONSTASCII_USTRINGPARAM(CONSTASCII))
|
#define DEFINE_CONST_UNICODE(CONSTASCII) UniString(RTL_CONSTASCII_USTRINGPARAM(CONSTASCII))
|
||||||
#define U2S(STRING) ::rtl::OUStringToOString(STRING, RTL_TEXTENCODING_UTF8)
|
#define U2S(STRING) ::rtl::OUStringToOString(STRING, RTL_TEXTENCODING_UTF8)
|
||||||
|
|
||||||
@ -460,6 +469,194 @@ void ReplaceStringHookProc( UniString& rStr )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const char pLastSyncFileName[] = "lastsynchronized";
|
||||||
|
static const sal_Int32 nStrLenLastSync = 16;
|
||||||
|
|
||||||
|
static bool needsSynchronization(
|
||||||
|
::rtl::OUString const & baseSynchronizedURL, ::rtl::OUString const & userSynchronizedURL )
|
||||||
|
{
|
||||||
|
bool bNeedsSync( false );
|
||||||
|
|
||||||
|
::osl::DirectoryItem itemUserFile;
|
||||||
|
::osl::File::RC err1 =
|
||||||
|
::osl::DirectoryItem::get(userSynchronizedURL, itemUserFile);
|
||||||
|
|
||||||
|
//If it does not exist, then there is nothing to be done
|
||||||
|
if (err1 == ::osl::File::E_NOENT)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else if (err1 != ::osl::File::E_None)
|
||||||
|
{
|
||||||
|
OSL_ENSURE(0, "Cannot access lastsynchronized in user layer");
|
||||||
|
return true; //sync just in case
|
||||||
|
}
|
||||||
|
|
||||||
|
//If last synchronized does not exist in base layer, then do nothing
|
||||||
|
::osl::DirectoryItem itemBaseFile;
|
||||||
|
::osl::File::RC err2 = ::osl::DirectoryItem::get(baseSynchronizedURL, itemBaseFile);
|
||||||
|
if (err2 == ::osl::File::E_NOENT)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (err2 != ::osl::File::E_None)
|
||||||
|
{
|
||||||
|
OSL_ENSURE(0, "Cannot access file lastsynchronized in base layer");
|
||||||
|
return true; //sync just in case
|
||||||
|
}
|
||||||
|
|
||||||
|
//compare the modification time of the extension folder and the last
|
||||||
|
//modified file
|
||||||
|
::osl::FileStatus statUser(FileStatusMask_ModifyTime);
|
||||||
|
::osl::FileStatus statBase(FileStatusMask_ModifyTime);
|
||||||
|
if (itemUserFile.getFileStatus(statUser) == ::osl::File::E_None)
|
||||||
|
{
|
||||||
|
if (itemBaseFile.getFileStatus(statBase) == ::osl::File::E_None)
|
||||||
|
{
|
||||||
|
TimeValue timeUser = statUser.getModifyTime();
|
||||||
|
TimeValue timeBase = statBase.getModifyTime();
|
||||||
|
|
||||||
|
if (timeUser.Seconds < timeBase.Seconds)
|
||||||
|
bNeedsSync = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
OSL_ASSERT(0);
|
||||||
|
bNeedsSync = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
OSL_ASSERT(0);
|
||||||
|
bNeedsSync = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return bNeedsSync;
|
||||||
|
}
|
||||||
|
|
||||||
|
static ::rtl::OUString getBrandSharePreregBundledPathURL()
|
||||||
|
{
|
||||||
|
::rtl::OUString url(
|
||||||
|
RTL_CONSTASCII_USTRINGPARAM("$BRAND_BASE_DIR/share/prereg/bundled"));
|
||||||
|
|
||||||
|
::rtl::Bootstrap::expandMacros(url);
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
|
||||||
|
static ::rtl::OUString getUserBundledExtPathURL()
|
||||||
|
{
|
||||||
|
::rtl::OUString folder( RTL_CONSTASCII_USTRINGPARAM( "$BUNDLED_EXTENSIONS_USER" ));
|
||||||
|
::rtl::Bootstrap::expandMacros(folder);
|
||||||
|
|
||||||
|
return folder;
|
||||||
|
}
|
||||||
|
|
||||||
|
static ::rtl::OUString getLastSyncFileURLFromBrandInstallation()
|
||||||
|
{
|
||||||
|
::rtl::OUString aURL = getBrandSharePreregBundledPathURL();
|
||||||
|
::sal_Int32 nLastIndex = aURL.lastIndexOf('/');
|
||||||
|
|
||||||
|
::rtl::OUStringBuffer aTmp( aURL );
|
||||||
|
|
||||||
|
if ( nLastIndex != aURL.getLength()-1 )
|
||||||
|
aTmp.appendAscii( "/" );
|
||||||
|
aTmp.appendAscii( pLastSyncFileName );
|
||||||
|
|
||||||
|
return aTmp.makeStringAndClear();
|
||||||
|
}
|
||||||
|
|
||||||
|
static ::rtl::OUString getLastSyncFileURLFromUserInstallation()
|
||||||
|
{
|
||||||
|
::rtl::OUString aUserBundledPathURL = getUserBundledExtPathURL();
|
||||||
|
::sal_Int32 nLastIndex = aUserBundledPathURL.lastIndexOf('/');
|
||||||
|
|
||||||
|
::rtl::OUStringBuffer aTmp( aUserBundledPathURL );
|
||||||
|
|
||||||
|
if ( nLastIndex != aUserBundledPathURL.getLength()-1 )
|
||||||
|
aTmp.appendAscii( "/" );
|
||||||
|
aTmp.appendAscii( pLastSyncFileName );
|
||||||
|
|
||||||
|
return aTmp.makeStringAndClear();
|
||||||
|
}
|
||||||
|
|
||||||
|
static osl::FileBase::RC copy_bundled_recursive(
|
||||||
|
const rtl::OUString& srcUnqPath,
|
||||||
|
const rtl::OUString& dstUnqPath,
|
||||||
|
sal_Int32 TypeToCopy )
|
||||||
|
throw()
|
||||||
|
{
|
||||||
|
osl::FileBase::RC err = osl::FileBase::E_None;
|
||||||
|
|
||||||
|
if( TypeToCopy == -1 ) // Document
|
||||||
|
{
|
||||||
|
err = osl::File::copy( srcUnqPath,dstUnqPath );
|
||||||
|
}
|
||||||
|
else if( TypeToCopy == +1 ) // Folder
|
||||||
|
{
|
||||||
|
osl::Directory aDir( srcUnqPath );
|
||||||
|
aDir.open();
|
||||||
|
|
||||||
|
err = osl::Directory::create( dstUnqPath );
|
||||||
|
osl::FileBase::RC next = err;
|
||||||
|
if( err == osl::FileBase::E_None ||
|
||||||
|
err == osl::FileBase::E_EXIST )
|
||||||
|
{
|
||||||
|
err = osl::FileBase::E_None;
|
||||||
|
sal_Int32 n_Mask = FileStatusMask_FileURL | FileStatusMask_FileName | FileStatusMask_Type;
|
||||||
|
|
||||||
|
osl::DirectoryItem aDirItem;
|
||||||
|
|
||||||
|
while( err == osl::FileBase::E_None && ( next = aDir.getNextItem( aDirItem ) ) == osl::FileBase::E_None )
|
||||||
|
{
|
||||||
|
sal_Bool IsDoc = false;
|
||||||
|
sal_Bool bFilter = false;
|
||||||
|
osl::FileStatus aFileStatus( n_Mask );
|
||||||
|
aDirItem.getFileStatus( aFileStatus );
|
||||||
|
if( aFileStatus.isValid( FileStatusMask_Type ) )
|
||||||
|
IsDoc = aFileStatus.getFileType() == osl::FileStatus::Regular;
|
||||||
|
|
||||||
|
// Getting the information for the next recursive copy
|
||||||
|
sal_Int32 newTypeToCopy = IsDoc ? -1 : +1;
|
||||||
|
|
||||||
|
rtl::OUString newSrcUnqPath;
|
||||||
|
if( aFileStatus.isValid( FileStatusMask_FileURL ) )
|
||||||
|
newSrcUnqPath = aFileStatus.getFileURL();
|
||||||
|
|
||||||
|
rtl::OUString newDstUnqPath = dstUnqPath;
|
||||||
|
rtl::OUString tit;
|
||||||
|
if( aFileStatus.isValid( FileStatusMask_FileName ) )
|
||||||
|
{
|
||||||
|
::rtl::OUString aFileName = aFileStatus.getFileName();
|
||||||
|
tit = rtl::Uri::encode( aFileName,
|
||||||
|
rtl_UriCharClassPchar,
|
||||||
|
rtl_UriEncodeIgnoreEscapes,
|
||||||
|
RTL_TEXTENCODING_UTF8 );
|
||||||
|
|
||||||
|
// Special treatment for "lastsychronized" file. Must not be
|
||||||
|
// copied from the bundled folder!
|
||||||
|
if ( IsDoc && aFileName.equalsAscii( pLastSyncFileName ))
|
||||||
|
bFilter = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( newDstUnqPath.lastIndexOf( sal_Unicode('/') ) != newDstUnqPath.getLength()-1 )
|
||||||
|
newDstUnqPath += rtl::OUString::createFromAscii( "/" );
|
||||||
|
|
||||||
|
newDstUnqPath += tit;
|
||||||
|
|
||||||
|
if (( newSrcUnqPath != dstUnqPath ) && !bFilter )
|
||||||
|
err = copy_bundled_recursive( newSrcUnqPath,newDstUnqPath, newTypeToCopy );
|
||||||
|
}
|
||||||
|
|
||||||
|
if( err == osl::FileBase::E_None && next != osl::FileBase::E_NOENT )
|
||||||
|
err = next;
|
||||||
|
}
|
||||||
|
aDir.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
Desktop::Desktop()
|
Desktop::Desktop()
|
||||||
: m_bServicesRegistered( false )
|
: m_bServicesRegistered( false )
|
||||||
, m_aBootstrapError( BE_OK )
|
, m_aBootstrapError( BE_OK )
|
||||||
@ -477,6 +674,24 @@ void Desktop::Init()
|
|||||||
RTL_LOGFILE_CONTEXT( aLog, "desktop (cd100003) ::Desktop::Init" );
|
RTL_LOGFILE_CONTEXT( aLog, "desktop (cd100003) ::Desktop::Init" );
|
||||||
SetBootstrapStatus(BS_OK);
|
SetBootstrapStatus(BS_OK);
|
||||||
|
|
||||||
|
// Check for lastsynchronized file for bundled extensions in the user directory
|
||||||
|
// and test if synchronzation is necessary!
|
||||||
|
{
|
||||||
|
::rtl::OUString aUserLastSyncFilePathURL = getLastSyncFileURLFromUserInstallation();
|
||||||
|
::rtl::OUString aPreregSyncFilePathURL = getLastSyncFileURLFromBrandInstallation();
|
||||||
|
|
||||||
|
if ( needsSynchronization( aPreregSyncFilePathURL, aUserLastSyncFilePathURL ))
|
||||||
|
{
|
||||||
|
rtl::OUString aUserPath = getUserBundledExtPathURL();
|
||||||
|
rtl::OUString aPreregBundledPath = getBrandSharePreregBundledPathURL();
|
||||||
|
|
||||||
|
// copy bundled folder to the user directory
|
||||||
|
osl::FileBase::RC rc = osl::Directory::createPath(aUserPath);
|
||||||
|
(void) rc;
|
||||||
|
copy_bundled_recursive( aPreregBundledPath, aUserPath, +1 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// create service factory...
|
// create service factory...
|
||||||
Reference < XMultiServiceFactory > rSMgr = CreateApplicationServiceManager();
|
Reference < XMultiServiceFactory > rSMgr = CreateApplicationServiceManager();
|
||||||
if( rSMgr.is() )
|
if( rSMgr.is() )
|
||||||
@ -1117,28 +1332,79 @@ sal_Bool Desktop::SaveTasks()
|
|||||||
sal_False);
|
sal_False);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MACOSX
|
namespace {
|
||||||
static void DoRestart()
|
|
||||||
{
|
|
||||||
oslProcess process;
|
|
||||||
oslProcessError error;
|
|
||||||
OUString sExecutableFile;
|
|
||||||
|
|
||||||
osl_getExecutableFile( &sExecutableFile.pData );
|
void restartOnMac(bool passArguments) {
|
||||||
|
#if defined MACOSX
|
||||||
error = osl_executeProcess(
|
OfficeIPCThread::DisableOfficeIPCThread();
|
||||||
sExecutableFile.pData,
|
rtl::OUString execUrl;
|
||||||
NULL,
|
OSL_VERIFY(osl_getExecutableFile(&execUrl.pData) == osl_Process_E_None);
|
||||||
0,
|
rtl::OUString execPath;
|
||||||
0,
|
rtl::OString execPath8;
|
||||||
NULL,
|
if ((osl::FileBase::getSystemPathFromFileURL(execUrl, execPath)
|
||||||
NULL,
|
!= osl::FileBase::E_None) ||
|
||||||
NULL,
|
!execPath.convertToString(
|
||||||
0,
|
&execPath8, osl_getThreadTextEncoding(),
|
||||||
&process
|
(RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR |
|
||||||
);
|
RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR)))
|
||||||
}
|
{
|
||||||
|
std::abort();
|
||||||
|
}
|
||||||
|
std::vector< rtl::OString > args;
|
||||||
|
args.push_back(execPath8);
|
||||||
|
bool wait = false;
|
||||||
|
if (passArguments) {
|
||||||
|
sal_uInt32 n = osl_getCommandArgCount();
|
||||||
|
for (sal_uInt32 i = 0; i < n; ++i) {
|
||||||
|
rtl::OUString arg;
|
||||||
|
OSL_VERIFY(osl_getCommandArg(i, &arg.pData) == osl_Process_E_None);
|
||||||
|
if (arg.matchAsciiL(RTL_CONSTASCII_STRINGPARAM("-accept="))) {
|
||||||
|
wait = true;
|
||||||
|
}
|
||||||
|
rtl::OString arg8;
|
||||||
|
if (!arg.convertToString(
|
||||||
|
&arg8, osl_getThreadTextEncoding(),
|
||||||
|
(RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR |
|
||||||
|
RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR)))
|
||||||
|
{
|
||||||
|
std::abort();
|
||||||
|
}
|
||||||
|
args.push_back(arg8);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
std::vector< char const * > argPtrs;
|
||||||
|
for (std::vector< rtl::OString >::iterator i(args.begin()); i != args.end();
|
||||||
|
++i)
|
||||||
|
{
|
||||||
|
argPtrs.push_back(i->getStr());
|
||||||
|
}
|
||||||
|
argPtrs.push_back(0);
|
||||||
|
execv(execPath8.getStr(), const_cast< char ** >(&argPtrs[0]));
|
||||||
|
if (errno == ENOTSUP) { // happens when multithreaded on OS X < 10.6
|
||||||
|
pid_t pid = fork();
|
||||||
|
if (pid == 0) {
|
||||||
|
execv(execPath8.getStr(), const_cast< char ** >(&argPtrs[0]));
|
||||||
|
} else if (pid > 0) {
|
||||||
|
// Two simultaneously running soffice processes lead to two dock
|
||||||
|
// icons, so avoid waiting here unless it must be assumed that the
|
||||||
|
// process invoking soffice itself wants to wait for soffice to
|
||||||
|
// finish:
|
||||||
|
if (!wait) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
int stat;
|
||||||
|
if (waitpid(pid, &stat, 0) == pid && WIFEXITED(stat)) {
|
||||||
|
_exit(WEXITSTATUS(stat));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
std::abort();
|
||||||
|
#else
|
||||||
|
(void) passArguments; // avoid warnings
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
USHORT Desktop::Exception(USHORT nError)
|
USHORT Desktop::Exception(USHORT nError)
|
||||||
{
|
{
|
||||||
@ -1209,9 +1475,7 @@ USHORT Desktop::Exception(USHORT nError)
|
|||||||
OfficeIPCThread::DisableOfficeIPCThread();
|
OfficeIPCThread::DisableOfficeIPCThread();
|
||||||
if( pSignalHandler )
|
if( pSignalHandler )
|
||||||
DELETEZ( pSignalHandler );
|
DELETEZ( pSignalHandler );
|
||||||
#ifdef MACOSX
|
restartOnMac(false);
|
||||||
DoRestart();
|
|
||||||
#endif
|
|
||||||
_exit( ExitHelper::E_CRASH_WITH_RESTART );
|
_exit( ExitHelper::E_CRASH_WITH_RESTART );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1294,6 +1558,9 @@ void Desktop::Main()
|
|||||||
std::auto_ptr<SvtLanguageOptions> pLanguageOptions;
|
std::auto_ptr<SvtLanguageOptions> pLanguageOptions;
|
||||||
std::auto_ptr<SvtPathOptions> pPathOptions;
|
std::auto_ptr<SvtPathOptions> pPathOptions;
|
||||||
|
|
||||||
|
sal_Bool bRestartRequested( sal_False );
|
||||||
|
sal_Bool bUseSystemFileDialog(sal_True);
|
||||||
|
int nAcquireCount( 0 );
|
||||||
Reference < css::document::XEventListener > xGlobalBroadcaster;
|
Reference < css::document::XEventListener > xGlobalBroadcaster;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -1423,6 +1690,13 @@ void Desktop::Main()
|
|||||||
( xSMgr->createInstance(
|
( xSMgr->createInstance(
|
||||||
DEFINE_CONST_UNICODE( "com.sun.star.frame.GlobalEventBroadcaster" ) ), UNO_QUERY );
|
DEFINE_CONST_UNICODE( "com.sun.star.frame.GlobalEventBroadcaster" ) ), UNO_QUERY );
|
||||||
|
|
||||||
|
/* ensure existance of a default window that messages can be dispatched to
|
||||||
|
This is for the benefit of testtool which uses PostUserEvent extensively
|
||||||
|
and else can deadlock while creating this window from another tread while
|
||||||
|
the main thread is not yet in the event loop.
|
||||||
|
*/
|
||||||
|
Application::GetDefaultDevice();
|
||||||
|
|
||||||
// initialize test-tool library (if available)
|
// initialize test-tool library (if available)
|
||||||
RTL_LOGFILE_CONTEXT_TRACE( aLog, "{ tools::InitTestToolLib" );
|
RTL_LOGFILE_CONTEXT_TRACE( aLog, "{ tools::InitTestToolLib" );
|
||||||
tools::InitTestToolLib();
|
tools::InitTestToolLib();
|
||||||
@ -1487,58 +1761,80 @@ void Desktop::Main()
|
|||||||
impl_checkRecoveryState(bCrashed, bExistsRecoveryData, bExistsSessionData);
|
impl_checkRecoveryState(bCrashed, bExistsRecoveryData, bExistsSessionData);
|
||||||
RTL_LOGFILE_CONTEXT_TRACE( aLog, "} impl_checkRecoveryState" );
|
RTL_LOGFILE_CONTEXT_TRACE( aLog, "} impl_checkRecoveryState" );
|
||||||
|
|
||||||
if (
|
Reference< ::com::sun::star::task::XRestartManager > xRestartManager;
|
||||||
(pCmdLineArgs->IsEmptyOrAcceptOnly() ) &&
|
|
||||||
(SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::E_SSTARTMODULE)) &&
|
|
||||||
(!bExistsRecoveryData ) &&
|
|
||||||
(!bExistsSessionData ) &&
|
|
||||||
(!Application::AnyInput( INPUT_APPEVENT ) )
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
RTL_LOGFILE_CONTEXT_TRACE( aLog, "{ create BackingComponent" );
|
::comphelper::ComponentContext aContext( xSMgr );
|
||||||
Reference< XFrame > xDesktopFrame( xSMgr->createInstance(
|
xRestartManager.set( aContext.getSingleton( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.task.OfficeRestartManager" ) ) ), UNO_QUERY );
|
||||||
OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" ))), UNO_QUERY );
|
}
|
||||||
if (xDesktopFrame.is())
|
|
||||||
|
// check whether the shutdown is caused by restart
|
||||||
|
bRestartRequested = ( xRestartManager.is() && xRestartManager->isRestartRequested( sal_True ) );
|
||||||
|
|
||||||
|
if ( pCmdLineArgs->IsHeadless() )
|
||||||
|
{
|
||||||
|
// Ensure that we use not the system file dialogs as
|
||||||
|
// headless mode relies on Application::EnableHeadlessMode()
|
||||||
|
// which does only work for VCL dialogs!!
|
||||||
|
SvtMiscOptions aMiscOptions;
|
||||||
|
bUseSystemFileDialog = aMiscOptions.UseSystemFileDialog();
|
||||||
|
aMiscOptions.SetUseSystemFileDialog( sal_False );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( !bRestartRequested )
|
||||||
|
{
|
||||||
|
if (
|
||||||
|
(pCmdLineArgs->IsEmptyOrAcceptOnly() ) &&
|
||||||
|
(SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::E_SSTARTMODULE)) &&
|
||||||
|
(!bExistsRecoveryData ) &&
|
||||||
|
(!bExistsSessionData ) &&
|
||||||
|
(!Application::AnyInput( INPUT_APPEVENT ) )
|
||||||
|
)
|
||||||
{
|
{
|
||||||
// SetSplashScreenProgress(60);
|
RTL_LOGFILE_CONTEXT_TRACE( aLog, "{ create BackingComponent" );
|
||||||
Reference< XFrame > xBackingFrame;
|
Reference< XFrame > xDesktopFrame( xSMgr->createInstance(
|
||||||
Reference< ::com::sun::star::awt::XWindow > xContainerWindow;
|
OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" ))), UNO_QUERY );
|
||||||
|
if (xDesktopFrame.is())
|
||||||
xBackingFrame = xDesktopFrame->findFrame(OUString( RTL_CONSTASCII_USTRINGPARAM( "_blank" )), 0);
|
|
||||||
if (xBackingFrame.is())
|
|
||||||
xContainerWindow = xBackingFrame->getContainerWindow();
|
|
||||||
if (xContainerWindow.is())
|
|
||||||
{
|
{
|
||||||
// set the WB_EXT_DOCUMENT style. Normally, this is done by the TaskCreator service when a "_blank"
|
// SetSplashScreenProgress(60);
|
||||||
// frame/window is created. Since we do not use the TaskCreator here, we need to mimic its behavior,
|
Reference< XFrame > xBackingFrame;
|
||||||
// otherwise documents loaded into this frame will later on miss functionality depending on the style.
|
Reference< ::com::sun::star::awt::XWindow > xContainerWindow;
|
||||||
Window* pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow );
|
|
||||||
OSL_ENSURE( pContainerWindow, "Desktop::Main: no implementation access to the frame's container window!" );
|
|
||||||
pContainerWindow->SetExtendedStyle( pContainerWindow->GetExtendedStyle() | WB_EXT_DOCUMENT );
|
|
||||||
|
|
||||||
SetSplashScreenProgress(75);
|
xBackingFrame = xDesktopFrame->findFrame(OUString( RTL_CONSTASCII_USTRINGPARAM( "_blank" )), 0);
|
||||||
Sequence< Any > lArgs(1);
|
if (xBackingFrame.is())
|
||||||
lArgs[0] <<= xContainerWindow;
|
xContainerWindow = xBackingFrame->getContainerWindow();
|
||||||
|
if (xContainerWindow.is())
|
||||||
Reference< XController > xBackingComp(
|
|
||||||
xSMgr->createInstanceWithArguments(OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.StartModule") ), lArgs),
|
|
||||||
UNO_QUERY);
|
|
||||||
// SetSplashScreenProgress(80);
|
|
||||||
if (xBackingComp.is())
|
|
||||||
{
|
{
|
||||||
Reference< ::com::sun::star::awt::XWindow > xBackingWin(xBackingComp, UNO_QUERY);
|
// set the WB_EXT_DOCUMENT style. Normally, this is done by the TaskCreator service when a "_blank"
|
||||||
// Attention: You MUST(!) call setComponent() before you call attachFrame().
|
// frame/window is created. Since we do not use the TaskCreator here, we need to mimic its behavior,
|
||||||
// Because the backing component set the property "IsBackingMode" of the frame
|
// otherwise documents loaded into this frame will later on miss functionality depending on the style.
|
||||||
// to true inside attachFrame(). But setComponent() reset this state everytimes ...
|
Window* pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow );
|
||||||
xBackingFrame->setComponent(xBackingWin, xBackingComp);
|
OSL_ENSURE( pContainerWindow, "Desktop::Main: no implementation access to the frame's container window!" );
|
||||||
SetSplashScreenProgress(100);
|
pContainerWindow->SetExtendedStyle( pContainerWindow->GetExtendedStyle() | WB_EXT_DOCUMENT );
|
||||||
xBackingComp->attachFrame(xBackingFrame);
|
|
||||||
CloseSplashScreen();
|
SetSplashScreenProgress(75);
|
||||||
xContainerWindow->setVisible(sal_True);
|
Sequence< Any > lArgs(1);
|
||||||
|
lArgs[0] <<= xContainerWindow;
|
||||||
|
|
||||||
|
Reference< XController > xBackingComp(
|
||||||
|
xSMgr->createInstanceWithArguments(OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.StartModule") ), lArgs),
|
||||||
|
UNO_QUERY);
|
||||||
|
// SetSplashScreenProgress(80);
|
||||||
|
if (xBackingComp.is())
|
||||||
|
{
|
||||||
|
Reference< ::com::sun::star::awt::XWindow > xBackingWin(xBackingComp, UNO_QUERY);
|
||||||
|
// Attention: You MUST(!) call setComponent() before you call attachFrame().
|
||||||
|
// Because the backing component set the property "IsBackingMode" of the frame
|
||||||
|
// to true inside attachFrame(). But setComponent() reset this state everytimes ...
|
||||||
|
xBackingFrame->setComponent(xBackingWin, xBackingComp);
|
||||||
|
SetSplashScreenProgress(100);
|
||||||
|
xBackingComp->attachFrame(xBackingFrame);
|
||||||
|
CloseSplashScreen();
|
||||||
|
xContainerWindow->setVisible(sal_True);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
RTL_LOGFILE_CONTEXT_TRACE( aLog, "} create BackingComponent" );
|
||||||
}
|
}
|
||||||
RTL_LOGFILE_CONTEXT_TRACE( aLog, "} create BackingComponent" );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch ( com::sun::star::lang::WrappedTargetException& wte )
|
catch ( com::sun::star::lang::WrappedTargetException& wte )
|
||||||
@ -1573,107 +1869,82 @@ void Desktop::Main()
|
|||||||
aOptions.SetVCLSettings();
|
aOptions.SetVCLSettings();
|
||||||
// SetSplashScreenProgress(60);
|
// SetSplashScreenProgress(60);
|
||||||
|
|
||||||
Application::SetFilterHdl( LINK( this, Desktop, ImplInitFilterHdl ) );
|
if ( !bRestartRequested )
|
||||||
|
|
||||||
sal_Bool bTerminateRequested = sal_False;
|
|
||||||
|
|
||||||
// Preload function depends on an initialized sfx application!
|
|
||||||
SetSplashScreenProgress(75);
|
|
||||||
|
|
||||||
sal_Bool bUseSystemFileDialog(sal_True);
|
|
||||||
if ( pCmdLineArgs->IsHeadless() )
|
|
||||||
{
|
{
|
||||||
// Ensure that we use not the system file dialogs as
|
Application::SetFilterHdl( LINK( this, Desktop, ImplInitFilterHdl ) );
|
||||||
// headless mode relies on Application::EnableHeadlessMode()
|
|
||||||
// which does only work for VCL dialogs!!
|
|
||||||
SvtMiscOptions aMiscOptions;
|
|
||||||
bUseSystemFileDialog = aMiscOptions.UseSystemFileDialog();
|
|
||||||
aMiscOptions.SetUseSystemFileDialog( sal_False );
|
|
||||||
}
|
|
||||||
|
|
||||||
// use system window dialogs
|
sal_Bool bTerminateRequested = sal_False;
|
||||||
Application::SetSystemWindowMode( SYSTEMWINDOW_MODE_DIALOG );
|
|
||||||
|
|
||||||
// SetSplashScreenProgress(80);
|
// Preload function depends on an initialized sfx application!
|
||||||
|
SetSplashScreenProgress(75);
|
||||||
|
|
||||||
if ( !bTerminateRequested && !pCmdLineArgs->IsInvisible() &&
|
// use system window dialogs
|
||||||
!pCmdLineArgs->IsNoQuickstart() )
|
Application::SetSystemWindowMode( SYSTEMWINDOW_MODE_DIALOG );
|
||||||
InitializeQuickstartMode( xSMgr );
|
|
||||||
|
|
||||||
RTL_LOGFILE_CONTEXT( aLog2, "desktop (cd100003) createInstance com.sun.star.frame.Desktop" );
|
// SetSplashScreenProgress(80);
|
||||||
try
|
|
||||||
{
|
|
||||||
Reference< XDesktop > xDesktop( xSMgr->createInstance(
|
|
||||||
OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" ))), UNO_QUERY );
|
|
||||||
if ( xDesktop.is() )
|
|
||||||
xDesktop->addTerminateListener( new OfficeIPCThreadController );
|
|
||||||
SetSplashScreenProgress(100);
|
|
||||||
}
|
|
||||||
catch ( com::sun::star::uno::Exception& e )
|
|
||||||
{
|
|
||||||
FatalError( MakeStartupErrorMessage(e.Message) );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
catch ( ... )
|
|
||||||
{
|
|
||||||
FatalError( MakeStartupErrorMessage(
|
|
||||||
OUString::createFromAscii(
|
|
||||||
"Unknown error during startup (TD/Desktop service).\nInstallation could be damaged.")));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Release solar mutex just before we wait for our client to connect
|
if ( !bTerminateRequested && !pCmdLineArgs->IsInvisible() &&
|
||||||
int nAcquireCount = 0;
|
!pCmdLineArgs->IsNoQuickstart() )
|
||||||
::vos::IMutex& rMutex = Application::GetSolarMutex();
|
InitializeQuickstartMode( xSMgr );
|
||||||
if ( rMutex.tryToAcquire() )
|
|
||||||
nAcquireCount = Application::ReleaseSolarMutex() - 1;
|
|
||||||
|
|
||||||
// Post user event to startup first application component window
|
RTL_LOGFILE_CONTEXT( aLog2, "desktop (cd100003) createInstance com.sun.star.frame.Desktop" );
|
||||||
// We have to send this OpenClients message short before execute() to
|
try
|
||||||
// minimize the risk that this message overtakes type detection contruction!!
|
{
|
||||||
Application::PostUserEvent( LINK( this, Desktop, OpenClients_Impl ) );
|
Reference< XDesktop > xDesktop( xSMgr->createInstance(
|
||||||
|
OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" ))), UNO_QUERY );
|
||||||
|
if ( xDesktop.is() )
|
||||||
|
xDesktop->addTerminateListener( new OfficeIPCThreadController );
|
||||||
|
SetSplashScreenProgress(100);
|
||||||
|
}
|
||||||
|
catch ( com::sun::star::uno::Exception& e )
|
||||||
|
{
|
||||||
|
FatalError( MakeStartupErrorMessage(e.Message) );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
catch ( ... )
|
||||||
|
{
|
||||||
|
FatalError( MakeStartupErrorMessage(
|
||||||
|
OUString::createFromAscii(
|
||||||
|
"Unknown error during startup (TD/Desktop service).\nInstallation could be damaged.")));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// Post event to enable acceptors
|
// Post user event to startup first application component window
|
||||||
Application::PostUserEvent( LINK( this, Desktop, EnableAcceptors_Impl) );
|
// We have to send this OpenClients message short before execute() to
|
||||||
|
// minimize the risk that this message overtakes type detection contruction!!
|
||||||
|
Application::PostUserEvent( LINK( this, Desktop, OpenClients_Impl ) );
|
||||||
|
|
||||||
// The configuration error handler currently is only for startup
|
// Post event to enable acceptors
|
||||||
aConfigErrHandler.deactivate();
|
Application::PostUserEvent( LINK( this, Desktop, EnableAcceptors_Impl) );
|
||||||
|
|
||||||
// Acquire solar mutex just before we enter our message loop
|
// The configuration error handler currently is only for startup
|
||||||
if ( nAcquireCount )
|
aConfigErrHandler.deactivate();
|
||||||
Application::AcquireSolarMutex( nAcquireCount );
|
|
||||||
|
|
||||||
// call Application::Execute to process messages in vcl message loop
|
// call Application::Execute to process messages in vcl message loop
|
||||||
RTL_LOGFILE_PRODUCT_TRACE( "PERFORMANCE - enter Application::Execute()" );
|
RTL_LOGFILE_PRODUCT_TRACE( "PERFORMANCE - enter Application::Execute()" );
|
||||||
|
|
||||||
Reference< ::com::sun::star::task::XRestartManager > xRestartManager;
|
try
|
||||||
try
|
{
|
||||||
{
|
// The JavaContext contains an interaction handler which is used when
|
||||||
// The JavaContext contains an interaction handler which is used when
|
// the creation of a Java Virtual Machine fails
|
||||||
// the creation of a Java Virtual Machine fails
|
com::sun::star::uno::ContextLayer layer2(
|
||||||
com::sun::star::uno::ContextLayer layer2(
|
new svt::JavaContext( com::sun::star::uno::getCurrentContext() ) );
|
||||||
new svt::JavaContext( com::sun::star::uno::getCurrentContext() ) );
|
|
||||||
|
|
||||||
::comphelper::ComponentContext aContext( xSMgr );
|
|
||||||
xRestartManager.set( aContext.getSingleton( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.task.OfficeRestartManager" ) ) ), UNO_QUERY );
|
|
||||||
if ( !xRestartManager.is() || !xRestartManager->isRestartRequested( sal_True ) )
|
|
||||||
Execute();
|
Execute();
|
||||||
|
}
|
||||||
|
catch(const com::sun::star::document::CorruptedFilterConfigurationException& exFilterCfg)
|
||||||
|
{
|
||||||
|
OfficeIPCThread::SetDowning();
|
||||||
|
FatalError( MakeStartupErrorMessage(exFilterCfg.Message) );
|
||||||
|
}
|
||||||
|
catch(const com::sun::star::configuration::CorruptedConfigurationException& exAnyCfg)
|
||||||
|
{
|
||||||
|
OfficeIPCThread::SetDowning();
|
||||||
|
FatalError( MakeStartupErrorMessage(exAnyCfg.Message) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch(const com::sun::star::document::CorruptedFilterConfigurationException& exFilterCfg)
|
|
||||||
{
|
|
||||||
OfficeIPCThread::SetDowning();
|
|
||||||
FatalError( MakeStartupErrorMessage(exFilterCfg.Message) );
|
|
||||||
}
|
|
||||||
catch(const com::sun::star::configuration::CorruptedConfigurationException& exAnyCfg)
|
|
||||||
{
|
|
||||||
OfficeIPCThread::SetDowning();
|
|
||||||
FatalError( MakeStartupErrorMessage(exAnyCfg.Message) );
|
|
||||||
}
|
|
||||||
|
|
||||||
// check whether the shutdown is caused by restart
|
|
||||||
sal_Bool bRestartRequested = ( xRestartManager.is() && xRestartManager->isRestartRequested( sal_True ) );
|
|
||||||
|
|
||||||
if (xGlobalBroadcaster.is())
|
if (xGlobalBroadcaster.is())
|
||||||
{
|
{
|
||||||
@ -1709,9 +1980,7 @@ void Desktop::Main()
|
|||||||
RTL_LOGFILE_CONTEXT_TRACE( aLog, "FINISHED WITH Destop::Main" );
|
RTL_LOGFILE_CONTEXT_TRACE( aLog, "FINISHED WITH Destop::Main" );
|
||||||
if ( bRestartRequested )
|
if ( bRestartRequested )
|
||||||
{
|
{
|
||||||
#ifdef MACOSX
|
restartOnMac(true);
|
||||||
DoRestart();
|
|
||||||
#endif
|
|
||||||
// wouldn't the solution be more clean if SalMain returns the exit code to the system?
|
// wouldn't the solution be more clean if SalMain returns the exit code to the system?
|
||||||
_exit( ExitHelper::E_NORMAL_RESTART );
|
_exit( ExitHelper::E_NORMAL_RESTART );
|
||||||
}
|
}
|
||||||
|
12
desktop/source/deployment/gui/dp_gui_dialog2.cxx
Executable file → Normal file
12
desktop/source/deployment/gui/dp_gui_dialog2.cxx
Executable file → Normal file
@ -372,11 +372,13 @@ MENU_COMMAND ExtBoxWithBtns_Impl::ShowPopupMenu( const Point & rPos, const long
|
|||||||
|
|
||||||
if ( ! GetEntryData( nPos )->m_bLocked )
|
if ( ! GetEntryData( nPos )->m_bLocked )
|
||||||
{
|
{
|
||||||
if ( GetEntryData( nPos )->m_eState == REGISTERED )
|
if ( GetEntryData( nPos )->m_bUser )
|
||||||
aPopup.InsertItem( CMD_DISABLE, DialogHelper::getResourceString( RID_CTX_ITEM_DISABLE ) );
|
{
|
||||||
else if ( GetEntryData( nPos )->m_eState != NOT_AVAILABLE )
|
if ( GetEntryData( nPos )->m_eState == REGISTERED )
|
||||||
aPopup.InsertItem( CMD_ENABLE, DialogHelper::getResourceString( RID_CTX_ITEM_ENABLE ) );
|
aPopup.InsertItem( CMD_DISABLE, DialogHelper::getResourceString( RID_CTX_ITEM_DISABLE ) );
|
||||||
|
else if ( GetEntryData( nPos )->m_eState != NOT_AVAILABLE )
|
||||||
|
aPopup.InsertItem( CMD_ENABLE, DialogHelper::getResourceString( RID_CTX_ITEM_ENABLE ) );
|
||||||
|
}
|
||||||
aPopup.InsertItem( CMD_REMOVE, DialogHelper::getResourceString( RID_CTX_ITEM_REMOVE ) );
|
aPopup.InsertItem( CMD_REMOVE, DialogHelper::getResourceString( RID_CTX_ITEM_REMOVE ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1136,6 +1136,14 @@ sal_Bool ExtensionManager::synchronize(
|
|||||||
bModified |= m_bundledRepository->synchronize(xAbortChannel, xCmdEnv);
|
bModified |= m_bundledRepository->synchronize(xAbortChannel, xCmdEnv);
|
||||||
progressBundled.update(OUSTR("\n\n"));
|
progressBundled.update(OUSTR("\n\n"));
|
||||||
|
|
||||||
|
//Always determine the active extension. This is necessary for the
|
||||||
|
//first-start optimization. The setup creates the registration data for the
|
||||||
|
//bundled extensions (brand_layer/share/prereg/bundled), which is copied to the user
|
||||||
|
//installation (user_installation/extension/bundled) when a user starts OOo
|
||||||
|
//for the first time after running setup. All bundled extensions are registered
|
||||||
|
//at that moment. However, extensions with the same identifier can be in the
|
||||||
|
//shared or user repository, in which case the respective bundled extensions must
|
||||||
|
//be revoked.
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
const uno::Sequence<uno::Sequence<Reference<deploy::XPackage> > >
|
const uno::Sequence<uno::Sequence<Reference<deploy::XPackage> > >
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
*
|
*
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* Copyright 2008 by Sun Microsystems, Inc.
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
||||||
*
|
*
|
||||||
* OpenOffice.org - a multi-platform office productivity suite
|
* OpenOffice.org - a multi-platform office productivity suite
|
||||||
*
|
*
|
||||||
|
@ -2,13 +2,10 @@
|
|||||||
*
|
*
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* Copyright 2008 by Sun Microsystems, Inc.
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
||||||
*
|
*
|
||||||
* OpenOffice.org - a multi-platform office productivity suite
|
* OpenOffice.org - a multi-platform office productivity suite
|
||||||
*
|
*
|
||||||
* $RCSfile: dp_manager.h,v $
|
|
||||||
* $Revision: 1.17 $
|
|
||||||
*
|
|
||||||
* This file is part of OpenOffice.org.
|
* This file is part of OpenOffice.org.
|
||||||
*
|
*
|
||||||
* OpenOffice.org is free software: you can redistribute it and/or modify
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
||||||
|
@ -589,6 +589,11 @@ void TRACE(::rtl::OString const & sText)
|
|||||||
|
|
||||||
void syncRepositories(Reference<ucb::XCommandEnvironment> const & xCmdEnv)
|
void syncRepositories(Reference<ucb::XCommandEnvironment> const & xCmdEnv)
|
||||||
{
|
{
|
||||||
|
OUString sDisable;
|
||||||
|
::rtl::Bootstrap::get( OUSTR( "DISABLE_EXTENSION_SYNCHRONIZATION" ), sDisable, OUString() );
|
||||||
|
if (sDisable.getLength() > 0)
|
||||||
|
return;
|
||||||
|
|
||||||
Reference<deployment::XExtensionManager> xExtensionManager;
|
Reference<deployment::XExtensionManager> xExtensionManager;
|
||||||
//synchronize shared before bundled otherewise there are
|
//synchronize shared before bundled otherewise there are
|
||||||
//more revoke and registration calls.
|
//more revoke and registration calls.
|
||||||
|
@ -367,16 +367,11 @@ void BackendImpl::configmgrini_verify_init(
|
|||||||
do {
|
do {
|
||||||
OUString token( line.getToken( 0, ' ', index ).trim() );
|
OUString token( line.getToken( 0, ' ', index ).trim() );
|
||||||
if (token.getLength() > 0) {
|
if (token.getLength() > 0) {
|
||||||
// cleanup, check if existing:
|
//The file may not exist anymore if a shared or bundled
|
||||||
if (create_ucb_content(
|
//extension was removed, but it can still be in the configmgrini.
|
||||||
0, expandUnoRcTerm(token), xCmdEnv,
|
//After running XExtensionManager::synchronize, the configmgrini is
|
||||||
false /* no throw */ )) {
|
//cleaned up
|
||||||
//The file may not exist anymore if a shared or bundled
|
m_xcs_files.push_back( token );
|
||||||
//extension was removed, but it can still be in the configmgrini.
|
|
||||||
//After running XExtensionManager::synchronize, the configmgrini is
|
|
||||||
//cleaned up
|
|
||||||
m_xcs_files.push_back( token );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while (index >= 0);
|
while (index >= 0);
|
||||||
@ -386,31 +381,15 @@ void BackendImpl::configmgrini_verify_init(
|
|||||||
sal_Int32 index = sizeof ("DATA=") - 1;
|
sal_Int32 index = sizeof ("DATA=") - 1;
|
||||||
do {
|
do {
|
||||||
OUString token( line.getToken( 0, ' ', index ).trim() );
|
OUString token( line.getToken( 0, ' ', index ).trim() );
|
||||||
if (token.getLength() > 0) {
|
if (token.getLength() > 0)
|
||||||
|
{
|
||||||
if (token[ 0 ] == '?')
|
if (token[ 0 ] == '?')
|
||||||
token = token.copy( 1 );
|
token = token.copy( 1 );
|
||||||
// cleanup, check if existing:
|
//The file may not exist anymore if a shared or bundled
|
||||||
if (create_ucb_content(
|
//extension was removed, but it can still be in the configmgrini.
|
||||||
0, expandUnoRcTerm(token),
|
//After running XExtensionManager::synchronize, the configmgrini is
|
||||||
xCmdEnv, false /* no throw */ )) {
|
//cleaned up
|
||||||
//The file may not exist anymore if a shared or bundled
|
m_xcu_files.push_back( token );
|
||||||
//extension was removed, but it can still be in the configmgrini.
|
|
||||||
//After running XExtensionManager::synchronize, the configmgrini is
|
|
||||||
//cleaned up
|
|
||||||
m_xcu_files.push_back( token );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//Check if it was removed. Only when the file contained %origin, so that
|
|
||||||
//a new file was writen in the user installation (e.g. $BUNDLED_EXTENSIONS_USER)
|
|
||||||
//See also ConfigurationBackendDb.iniEntry
|
|
||||||
::std::list<OUString> iniEntries = getAllIniEntries();
|
|
||||||
if (::std::find(iniEntries.begin(), iniEntries.end(), token)
|
|
||||||
!= iniEntries.end())
|
|
||||||
m_xcu_files.push_back( token );
|
|
||||||
else
|
|
||||||
OSL_ENSURE(0, "Extension manager: Invalid configmgr.ini entry.");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while (index >= 0);
|
while (index >= 0);
|
||||||
@ -510,6 +489,8 @@ bool BackendImpl::removeFromConfigmgrIni(
|
|||||||
{
|
{
|
||||||
//in case the xcu contained %origin% then the configmr.ini contains the
|
//in case the xcu contained %origin% then the configmr.ini contains the
|
||||||
//url to the file in the user installation (e.g. $BUNDLED_EXTENSIONS_USER)
|
//url to the file in the user installation (e.g. $BUNDLED_EXTENSIONS_USER)
|
||||||
|
//However, m_url (getURL()) contains the URL for the file in the actual
|
||||||
|
//extension installatation.
|
||||||
::boost::optional<ConfigurationBackendDb::Data> data = readDataFromDb(url_);
|
::boost::optional<ConfigurationBackendDb::Data> data = readDataFromDb(url_);
|
||||||
if (data)
|
if (data)
|
||||||
i = std::find(rSet.begin(), rSet.end(), data->iniEntry);
|
i = std::find(rSet.begin(), rSet.end(), data->iniEntry);
|
||||||
@ -766,10 +747,17 @@ void BackendImpl::PackageImpl::processPackage_(
|
|||||||
}
|
}
|
||||||
that->m_registeredPackages->erase(i->first);
|
that->m_registeredPackages->erase(i->first);
|
||||||
}
|
}
|
||||||
::ucbhelper::Content(
|
try
|
||||||
makeURL( that->getCachePath(), OUSTR("registry") ),
|
{
|
||||||
xCmdEnv ).executeCommand(
|
::ucbhelper::Content(
|
||||||
OUSTR("delete"), Any( true /* delete physically */ ) );
|
makeURL( that->getCachePath(), OUSTR("registry") ),
|
||||||
|
xCmdEnv ).executeCommand(
|
||||||
|
OUSTR("delete"), Any( true /* delete physically */ ) );
|
||||||
|
}
|
||||||
|
catch(Exception&)
|
||||||
|
{
|
||||||
|
OSL_ASSERT(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
url = that->deleteDataFromDb(url);
|
url = that->deleteDataFromDb(url);
|
||||||
if (!m_isSchema) {
|
if (!m_isSchema) {
|
||||||
|
@ -2,13 +2,10 @@
|
|||||||
*
|
*
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* Copyright 2008 by Sun Microsystems, Inc.
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
||||||
*
|
*
|
||||||
* OpenOffice.org - a multi-platform office productivity suite
|
* OpenOffice.org - a multi-platform office productivity suite
|
||||||
*
|
*
|
||||||
* $RCSfile: dp_package.cxx,v $
|
|
||||||
* $Revision: 1.34.16.2 $
|
|
||||||
*
|
|
||||||
* This file is part of OpenOffice.org.
|
* This file is part of OpenOffice.org.
|
||||||
*
|
*
|
||||||
* OpenOffice.org is free software: you can redistribute it and/or modify
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
||||||
|
@ -2,13 +2,10 @@
|
|||||||
*
|
*
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* Copyright 2008 by Sun Microsystems, Inc.
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
||||||
*
|
*
|
||||||
* OpenOffice.org - a multi-platform office productivity suite
|
* OpenOffice.org - a multi-platform office productivity suite
|
||||||
*
|
*
|
||||||
* $RCSfile: dp_backend.h,v $
|
|
||||||
* $Revision: 1.18 $
|
|
||||||
*
|
|
||||||
* This file is part of OpenOffice.org.
|
* This file is part of OpenOffice.org.
|
||||||
*
|
*
|
||||||
* OpenOffice.org is free software: you can redistribute it and/or modify
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
||||||
|
@ -129,7 +129,9 @@ public:
|
|||||||
virtual Reference<deployment::XPackage> SAL_CALL bindPackage(
|
virtual Reference<deployment::XPackage> SAL_CALL bindPackage(
|
||||||
OUString const & url, OUString const & mediaType, sal_Bool bRemoved,
|
OUString const & url, OUString const & mediaType, sal_Bool bRemoved,
|
||||||
OUString const & identifier, Reference<XCommandEnvironment> const & xCmdEnv )
|
OUString const & identifier, Reference<XCommandEnvironment> const & xCmdEnv )
|
||||||
throw (deployment::DeploymentException, CommandFailedException,
|
throw (deployment::DeploymentException,
|
||||||
|
deployment::InvalidRemovedParameterException,
|
||||||
|
CommandFailedException,
|
||||||
lang::IllegalArgumentException, RuntimeException);
|
lang::IllegalArgumentException, RuntimeException);
|
||||||
virtual Sequence< Reference<deployment::XPackageTypeInfo> > SAL_CALL
|
virtual Sequence< Reference<deployment::XPackageTypeInfo> > SAL_CALL
|
||||||
getSupportedPackageTypes() throw (RuntimeException);
|
getSupportedPackageTypes() throw (RuntimeException);
|
||||||
@ -461,7 +463,8 @@ void PackageRegistryImpl::update() throw (RuntimeException)
|
|||||||
Reference<deployment::XPackage> PackageRegistryImpl::bindPackage(
|
Reference<deployment::XPackage> PackageRegistryImpl::bindPackage(
|
||||||
OUString const & url, OUString const & mediaType_, sal_Bool bRemoved,
|
OUString const & url, OUString const & mediaType_, sal_Bool bRemoved,
|
||||||
OUString const & identifier, Reference<XCommandEnvironment> const & xCmdEnv )
|
OUString const & identifier, Reference<XCommandEnvironment> const & xCmdEnv )
|
||||||
throw (deployment::DeploymentException, CommandFailedException,
|
throw (deployment::DeploymentException, deployment::InvalidRemovedParameterException,
|
||||||
|
CommandFailedException,
|
||||||
lang::IllegalArgumentException, RuntimeException)
|
lang::IllegalArgumentException, RuntimeException)
|
||||||
{
|
{
|
||||||
check();
|
check();
|
||||||
|
@ -2,13 +2,10 @@
|
|||||||
*
|
*
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* Copyright 2008 by Sun Microsystems, Inc.
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
||||||
*
|
*
|
||||||
* OpenOffice.org - a multi-platform office productivity suite
|
* OpenOffice.org - a multi-platform office productivity suite
|
||||||
*
|
*
|
||||||
* $RCSfile: dp_package.cxx,v $
|
|
||||||
* $Revision: 1.34.16.2 $
|
|
||||||
*
|
|
||||||
* This file is part of OpenOffice.org.
|
* This file is part of OpenOffice.org.
|
||||||
*
|
*
|
||||||
* OpenOffice.org is free software: you can redistribute it and/or modify
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
||||||
|
@ -2,13 +2,10 @@
|
|||||||
*
|
*
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* Copyright 2008 by Sun Microsystems, Inc.
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
||||||
*
|
*
|
||||||
* OpenOffice.org - a multi-platform office productivity suite
|
* OpenOffice.org - a multi-platform office productivity suite
|
||||||
*
|
*
|
||||||
* $RCSfile: dp_backend.h,v $
|
|
||||||
* $Revision: 1.18 $
|
|
||||||
*
|
|
||||||
* This file is part of OpenOffice.org.
|
* This file is part of OpenOffice.org.
|
||||||
*
|
*
|
||||||
* OpenOffice.org is free software: you can redistribute it and/or modify
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
||||||
|
@ -2,13 +2,10 @@
|
|||||||
*
|
*
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* Copyright 2008 by Sun Microsystems, Inc.
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
||||||
*
|
*
|
||||||
* OpenOffice.org - a multi-platform office productivity suite
|
* OpenOffice.org - a multi-platform office productivity suite
|
||||||
*
|
*
|
||||||
* $RCSfile: dp_package.cxx,v $
|
|
||||||
* $Revision: 1.34.16.2 $
|
|
||||||
*
|
|
||||||
* This file is part of OpenOffice.org.
|
* This file is part of OpenOffice.org.
|
||||||
*
|
*
|
||||||
* OpenOffice.org is free software: you can redistribute it and/or modify
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
||||||
|
@ -2,13 +2,10 @@
|
|||||||
*
|
*
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* Copyright 2008 by Sun Microsystems, Inc.
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
||||||
*
|
*
|
||||||
* OpenOffice.org - a multi-platform office productivity suite
|
* OpenOffice.org - a multi-platform office productivity suite
|
||||||
*
|
*
|
||||||
* $RCSfile: dp_backend.h,v $
|
|
||||||
* $Revision: 1.18 $
|
|
||||||
*
|
|
||||||
* This file is part of OpenOffice.org.
|
* This file is part of OpenOffice.org.
|
||||||
*
|
*
|
||||||
* OpenOffice.org is free software: you can redistribute it and/or modify
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
||||||
|
@ -866,14 +866,10 @@ void BackendImpl::PackageImpl::processPackage_(
|
|||||||
try {
|
try {
|
||||||
xPackage->registerPackage( startup, xSubAbortChannel, xCmdEnv );
|
xPackage->registerPackage( startup, xSubAbortChannel, xCmdEnv );
|
||||||
}
|
}
|
||||||
catch (RuntimeException &) {
|
catch (Exception &)
|
||||||
throw;
|
{
|
||||||
}
|
//We even try a rollback if the user cancelled the action (CommandAbortedException)
|
||||||
catch (ucb::CommandAbortedException &) {
|
//in order to prevent invalid database entries.
|
||||||
throw;
|
|
||||||
}
|
|
||||||
catch (Exception &) {
|
|
||||||
// CommandFailedException, DeploymentException:
|
|
||||||
Any exc( ::cppu::getCaughtException() );
|
Any exc( ::cppu::getCaughtException() );
|
||||||
// try to handle exception, notify:
|
// try to handle exception, notify:
|
||||||
bool approve = false, abort = false;
|
bool approve = false, abort = false;
|
||||||
@ -904,14 +900,8 @@ void BackendImpl::PackageImpl::processPackage_(
|
|||||||
bundle[ pos ]->revokePackage(
|
bundle[ pos ]->revokePackage(
|
||||||
xSubAbortChannel, xCmdEnv );
|
xSubAbortChannel, xCmdEnv );
|
||||||
}
|
}
|
||||||
catch (RuntimeException &) {
|
catch (Exception &)
|
||||||
throw;
|
{
|
||||||
}
|
|
||||||
catch (ucb::CommandAbortedException &) {
|
|
||||||
throw;
|
|
||||||
}
|
|
||||||
catch (Exception &) {
|
|
||||||
// bundle rollback error:
|
|
||||||
OSL_ENSURE( 0, ::rtl::OUStringToOString(
|
OSL_ENSURE( 0, ::rtl::OUStringToOString(
|
||||||
::comphelper::anyToString(
|
::comphelper::anyToString(
|
||||||
::cppu::getCaughtException() ),
|
::cppu::getCaughtException() ),
|
||||||
|
@ -2,13 +2,10 @@
|
|||||||
*
|
*
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* Copyright 2008 by Sun Microsystems, Inc.
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
||||||
*
|
*
|
||||||
* OpenOffice.org - a multi-platform office productivity suite
|
* OpenOffice.org - a multi-platform office productivity suite
|
||||||
*
|
*
|
||||||
* $RCSfile: dp_package.cxx,v $
|
|
||||||
* $Revision: 1.34.16.2 $
|
|
||||||
*
|
|
||||||
* This file is part of OpenOffice.org.
|
* This file is part of OpenOffice.org.
|
||||||
*
|
*
|
||||||
* OpenOffice.org is free software: you can redistribute it and/or modify
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
||||||
|
@ -2,13 +2,10 @@
|
|||||||
*
|
*
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* Copyright 2008 by Sun Microsystems, Inc.
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
||||||
*
|
*
|
||||||
* OpenOffice.org - a multi-platform office productivity suite
|
* OpenOffice.org - a multi-platform office productivity suite
|
||||||
*
|
*
|
||||||
* $RCSfile: dp_backend.h,v $
|
|
||||||
* $Revision: 1.18 $
|
|
||||||
*
|
|
||||||
* This file is part of OpenOffice.org.
|
* This file is part of OpenOffice.org.
|
||||||
*
|
*
|
||||||
* OpenOffice.org is free software: you can redistribute it and/or modify
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
||||||
|
5
desktop/source/migration/services/cexportsoo3.cxx
Executable file → Normal file
5
desktop/source/migration/services/cexportsoo3.cxx
Executable file → Normal file
@ -2,13 +2,10 @@
|
|||||||
*
|
*
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* Copyright 2008 by Sun Microsystems, Inc.
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
||||||
*
|
*
|
||||||
* OpenOffice.org - a multi-platform office productivity suite
|
* OpenOffice.org - a multi-platform office productivity suite
|
||||||
*
|
*
|
||||||
* $RCSfile: cexports.cxx,v $
|
|
||||||
* $Revision: 1.9 $
|
|
||||||
*
|
|
||||||
* This file is part of OpenOffice.org.
|
* This file is part of OpenOffice.org.
|
||||||
*
|
*
|
||||||
* OpenOffice.org is free software: you can redistribute it and/or modify
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
||||||
|
@ -2,13 +2,10 @@
|
|||||||
*
|
*
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* Copyright 2008 by Sun Microsystems, Inc.
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
||||||
*
|
*
|
||||||
* OpenOffice.org - a multi-platform office productivity suite
|
* OpenOffice.org - a multi-platform office productivity suite
|
||||||
*
|
*
|
||||||
* $RCSfile: extensionmigration.cxx,v $
|
|
||||||
* $Revision: 1.2 $
|
|
||||||
*
|
|
||||||
* This file is part of OpenOffice.org.
|
* This file is part of OpenOffice.org.
|
||||||
*
|
*
|
||||||
* OpenOffice.org is free software: you can redistribute it and/or modify
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
||||||
|
@ -2,13 +2,10 @@
|
|||||||
*
|
*
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* Copyright 2008 by Sun Microsystems, Inc.
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
||||||
*
|
*
|
||||||
* OpenOffice.org - a multi-platform office productivity suite
|
* OpenOffice.org - a multi-platform office productivity suite
|
||||||
*
|
*
|
||||||
* $RCSfile: extensionmigration.hxx,v $
|
|
||||||
* $Revision: 1.2 $
|
|
||||||
*
|
|
||||||
* This file is part of OpenOffice.org.
|
* This file is part of OpenOffice.org.
|
||||||
*
|
*
|
||||||
* OpenOffice.org is free software: you can redistribute it and/or modify
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
||||||
|
@ -39,6 +39,7 @@
|
|||||||
#include "osl/thread.h"
|
#include "osl/thread.h"
|
||||||
#include "osl/process.h"
|
#include "osl/process.h"
|
||||||
#include "osl/conditn.hxx"
|
#include "osl/conditn.hxx"
|
||||||
|
#include "osl/file.hxx"
|
||||||
#include "cppuhelper/implbase1.hxx"
|
#include "cppuhelper/implbase1.hxx"
|
||||||
#include "cppuhelper/exc_hlp.hxx"
|
#include "cppuhelper/exc_hlp.hxx"
|
||||||
#include "comphelper/anytostring.hxx"
|
#include "comphelper/anytostring.hxx"
|
||||||
@ -377,6 +378,29 @@ extern "C" int unopkg_main()
|
|||||||
if (e != osl_File_E_None && e != osl_File_E_NOENT)
|
if (e != osl_File_E_None && e != osl_File_E_NOENT)
|
||||||
throw Exception(OUSTR("Could not delete ") + extensionUnorc, 0);
|
throw Exception(OUSTR("Could not delete ") + extensionUnorc, 0);
|
||||||
}
|
}
|
||||||
|
else if (subCommand.equals(OUSTR("sync")))
|
||||||
|
{
|
||||||
|
//sync is private!!!! Only for bundled extensions!!!
|
||||||
|
//For performance reasons unopkg sync is called during the setup and
|
||||||
|
//creates the registration data for the repository of the bundled
|
||||||
|
//extensions. It is then copied to the user installation during
|
||||||
|
//startup of OOo (userdata/extensions/bundled). The registration
|
||||||
|
//data is in the brand installation and must be removed when
|
||||||
|
//uninstalling OOo. We do this here, before UNO is
|
||||||
|
//bootstrapped. Otherwies files could be locked by this process.
|
||||||
|
|
||||||
|
//If there is no folder left in
|
||||||
|
//$BRAND_BASE_DIR/share/extensions
|
||||||
|
//then we can delete the registration data at
|
||||||
|
//$BUNDLED_EXTENSIONS_USER
|
||||||
|
if (hasNoFolder(OUSTR("$BRAND_BASE_DIR/share/extensions")))
|
||||||
|
{
|
||||||
|
removeFolder(OUSTR("$BUNDLED_EXTENSIONS_USER"));
|
||||||
|
//return otherwise we create the registration data again
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
xComponentContext = getUNO(
|
xComponentContext = getUNO(
|
||||||
disposeGuard, option_verbose, option_shared, subcmd_gui,
|
disposeGuard, option_verbose, option_shared, subcmd_gui,
|
||||||
@ -587,6 +611,15 @@ extern "C" int unopkg_main()
|
|||||||
xDialog->startExecuteModal(xListener);
|
xDialog->startExecuteModal(xListener);
|
||||||
dialogEnded.wait();
|
dialogEnded.wait();
|
||||||
}
|
}
|
||||||
|
else if (subCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("sync")))
|
||||||
|
{
|
||||||
|
//This sub command may be removed later and is only there to have a
|
||||||
|
//possibility to start extension synching without any output.
|
||||||
|
//This is just here so we do not get an error, because of an unknown
|
||||||
|
//sub-command. We do synching before
|
||||||
|
//the sub-commands are processed.
|
||||||
|
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dp_misc::writeConsoleError(
|
dp_misc::writeConsoleError(
|
||||||
|
@ -528,5 +528,110 @@ Reference<XComponentContext> getUNO(
|
|||||||
return xComponentContext;
|
return xComponentContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Determines if a folder does not contains a folder.
|
||||||
|
//Return false may also mean that the status could not be determined
|
||||||
|
//because some error occurred.
|
||||||
|
bool hasNoFolder(OUString const & folderUrl)
|
||||||
|
{
|
||||||
|
bool ret = false;
|
||||||
|
OUString url = folderUrl;
|
||||||
|
::rtl::Bootstrap::expandMacros(url);
|
||||||
|
::osl::Directory dir(url);
|
||||||
|
osl::File::RC rc = dir.open();
|
||||||
|
if (rc == osl::File::E_None)
|
||||||
|
{
|
||||||
|
bool bFolderExist = false;
|
||||||
|
osl::DirectoryItem i;
|
||||||
|
osl::File::RC rcNext = osl::File::E_None;
|
||||||
|
while ( (rcNext = dir.getNextItem(i)) == osl::File::E_None)
|
||||||
|
{
|
||||||
|
osl::FileStatus stat(FileStatusMask_Type);
|
||||||
|
if (i.getFileStatus(stat) == osl::File::E_None)
|
||||||
|
{
|
||||||
|
if (stat.getFileType() == osl::FileStatus::Directory)
|
||||||
|
{
|
||||||
|
bFolderExist = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dp_misc::writeConsole(
|
||||||
|
OUSTR("unopkg: Error while investigating ") + url + OUSTR("\n"));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
i = osl::DirectoryItem();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (rcNext == osl::File::E_NOENT ||
|
||||||
|
rcNext == osl::File::E_None)
|
||||||
|
{
|
||||||
|
if (!bFolderExist)
|
||||||
|
ret = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dp_misc::writeConsole(
|
||||||
|
OUSTR("unopkg: Error while investigating ") + url + OUSTR("\n"));
|
||||||
|
}
|
||||||
|
|
||||||
|
dir.close();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dp_misc::writeConsole(
|
||||||
|
OUSTR("unopkg: Error while investigating ") + url + OUSTR("\n"));
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void removeFolder(OUString const & folderUrl)
|
||||||
|
{
|
||||||
|
OUString url = folderUrl;
|
||||||
|
::rtl::Bootstrap::expandMacros(url);
|
||||||
|
::osl::Directory dir(url);
|
||||||
|
::osl::File::RC rc = dir.open();
|
||||||
|
if (rc == osl::File::E_None)
|
||||||
|
{
|
||||||
|
::osl::DirectoryItem i;
|
||||||
|
::osl::File::RC rcNext = ::osl::File::E_None;
|
||||||
|
while ( (rcNext = dir.getNextItem(i)) == ::osl::File::E_None)
|
||||||
|
{
|
||||||
|
::osl::FileStatus stat(FileStatusMask_Type | FileStatusMask_FileURL);
|
||||||
|
if (i.getFileStatus(stat) == ::osl::File::E_None)
|
||||||
|
{
|
||||||
|
::osl::FileStatus::Type t = stat.getFileType();
|
||||||
|
if (t == ::osl::FileStatus::Directory)
|
||||||
|
{
|
||||||
|
//remove folder
|
||||||
|
removeFolder(stat.getFileURL());
|
||||||
|
}
|
||||||
|
else if (t == ::osl::FileStatus::Regular)
|
||||||
|
{
|
||||||
|
//remove file
|
||||||
|
::osl::File::remove(stat.getFileURL());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
OSL_ASSERT(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dp_misc::writeConsole(
|
||||||
|
OUSTR("unopkg: Error while investigating ") + url + OUSTR("\n"));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
i = ::osl::DirectoryItem();
|
||||||
|
}
|
||||||
|
dir.close();
|
||||||
|
::osl::Directory::remove(url);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dp_misc::writeConsole(
|
||||||
|
OUSTR("unopkg: Error while removing ") + url + OUSTR("\n"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
@ -178,5 +178,11 @@ css::uno::Reference<css::uno::XComponentContext> getUNO(
|
|||||||
DisposeGuard & disposeGuard, bool verbose, bool shared, bool bGui,
|
DisposeGuard & disposeGuard, bool verbose, bool shared, bool bGui,
|
||||||
css::uno::Reference<css::uno::XComponentContext> & out_LocalComponentContext);
|
css::uno::Reference<css::uno::XComponentContext> & out_LocalComponentContext);
|
||||||
|
|
||||||
|
bool hasNoFolder(::rtl::OUString const & folderUrl);
|
||||||
|
|
||||||
|
void removeFolder(::rtl::OUString const & folderUrl);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1458,7 +1458,11 @@ Reference< XSpellChecker1 > ImpEditEngine::GetSpeller()
|
|||||||
|
|
||||||
SpellInfo * ImpEditEngine::CreateSpellInfo( const EditSelection &rSel, bool bMultipleDocs )
|
SpellInfo * ImpEditEngine::CreateSpellInfo( const EditSelection &rSel, bool bMultipleDocs )
|
||||||
{
|
{
|
||||||
pSpellInfo = new SpellInfo;
|
if (!pSpellInfo)
|
||||||
|
pSpellInfo = new SpellInfo;
|
||||||
|
else
|
||||||
|
*pSpellInfo = SpellInfo(); // reset to default values
|
||||||
|
|
||||||
pSpellInfo->bMultipleDoc = bMultipleDocs;
|
pSpellInfo->bMultipleDoc = bMultipleDocs;
|
||||||
EditSelection aSentenceSel( SelectSentence( rSel ) );
|
EditSelection aSentenceSel( SelectSentence( rSel ) );
|
||||||
// pSpellInfo->aSpellStart = CreateEPaM( aSentenceSel.Min() );
|
// pSpellInfo->aSpellStart = CreateEPaM( aSentenceSel.Min() );
|
||||||
@ -2023,7 +2027,6 @@ bool ImpEditEngine::SpellSentence(EditView& rEditView,
|
|||||||
#else
|
#else
|
||||||
bool bRet = false;
|
bool bRet = false;
|
||||||
EditSelection aCurSel( rEditView.pImpEditView->GetEditSelection() );
|
EditSelection aCurSel( rEditView.pImpEditView->GetEditSelection() );
|
||||||
//the pSpellInfo has to be created on demand
|
|
||||||
if(!pSpellInfo)
|
if(!pSpellInfo)
|
||||||
pSpellInfo = CreateSpellInfo( aCurSel, true );
|
pSpellInfo = CreateSpellInfo( aCurSel, true );
|
||||||
pSpellInfo->aCurSentenceStart = aCurSel.Min();
|
pSpellInfo->aCurSentenceStart = aCurSel.Min();
|
||||||
@ -2191,8 +2194,12 @@ void ImpEditEngine::ApplyChangedSentence(EditView& rEditView,
|
|||||||
{
|
{
|
||||||
#ifdef SVX_LIGHT
|
#ifdef SVX_LIGHT
|
||||||
#else
|
#else
|
||||||
|
// Note: rNewPortions.size() == 0 is valid and happens when the whole
|
||||||
|
// sentence got removed in the dialog
|
||||||
|
|
||||||
DBG_ASSERT(pSpellInfo, "pSpellInfo not initialized");
|
DBG_ASSERT(pSpellInfo, "pSpellInfo not initialized");
|
||||||
if(pSpellInfo)
|
if (pSpellInfo &&
|
||||||
|
pSpellInfo->aLastSpellPortions.size() > 0) // no portions -> no text to be changed
|
||||||
{
|
{
|
||||||
// get current paragraph length to calculate later on how the sentence length changed,
|
// get current paragraph length to calculate later on how the sentence length changed,
|
||||||
// in order to place the cursor at the end of the sentence again
|
// in order to place the cursor at the end of the sentence again
|
||||||
@ -2202,6 +2209,10 @@ void ImpEditEngine::ApplyChangedSentence(EditView& rEditView,
|
|||||||
UndoActionStart( EDITUNDO_INSERT );
|
UndoActionStart( EDITUNDO_INSERT );
|
||||||
if(pSpellInfo->aLastSpellPortions.size() == rNewPortions.size())
|
if(pSpellInfo->aLastSpellPortions.size() == rNewPortions.size())
|
||||||
{
|
{
|
||||||
|
DBG_ASSERT( rNewPortions.size() > 0, "rNewPortions should not be empty here" );
|
||||||
|
DBG_ASSERT( pSpellInfo->aLastSpellPortions.size() == pSpellInfo->aLastSpellContentSelections.size(),
|
||||||
|
"aLastSpellPortions and aLastSpellContentSelections size mismatch" );
|
||||||
|
|
||||||
//the simple case: the same number of elements on both sides
|
//the simple case: the same number of elements on both sides
|
||||||
//each changed element has to be applied to the corresponding source element
|
//each changed element has to be applied to the corresponding source element
|
||||||
svx::SpellPortions::const_iterator aCurrentNewPortion = rNewPortions.end();
|
svx::SpellPortions::const_iterator aCurrentNewPortion = rNewPortions.end();
|
||||||
@ -2252,6 +2263,8 @@ void ImpEditEngine::ApplyChangedSentence(EditView& rEditView,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
DBG_ASSERT( pSpellInfo->aLastSpellContentSelections.size() > 0, "aLastSpellContentSelections should not be empty here" );
|
||||||
|
|
||||||
//select the complete sentence
|
//select the complete sentence
|
||||||
SpellContentSelections::const_iterator aCurrentEndPosition = pSpellInfo->aLastSpellContentSelections.end();
|
SpellContentSelections::const_iterator aCurrentEndPosition = pSpellInfo->aLastSpellContentSelections.end();
|
||||||
--aCurrentEndPosition;
|
--aCurrentEndPosition;
|
||||||
|
@ -96,6 +96,8 @@
|
|||||||
|
|
||||||
#include <svtools/acceleratorexecute.hxx>
|
#include <svtools/acceleratorexecute.hxx>
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
//_______________________________________________
|
//_______________________________________________
|
||||||
// const
|
// const
|
||||||
|
|
||||||
@ -1248,7 +1250,6 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::changesOccurred(const css::util:
|
|||||||
|
|
||||||
const sal_Int32 c = aEvent.Changes.getLength();
|
const sal_Int32 c = aEvent.Changes.getLength();
|
||||||
sal_Int32 i = 0;
|
sal_Int32 i = 0;
|
||||||
|
|
||||||
for (i=0; i<c; ++i)
|
for (i=0; i<c; ++i)
|
||||||
{
|
{
|
||||||
const css::util::ElementChange& aChange = aEvent.Changes[i];
|
const css::util::ElementChange& aChange = aEvent.Changes[i];
|
||||||
@ -1264,27 +1265,25 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::changesOccurred(const css::util:
|
|||||||
|
|
||||||
aChange.Accessor >>= sOrgPath;
|
aChange.Accessor >>= sOrgPath;
|
||||||
sPath = sOrgPath;
|
sPath = sOrgPath;
|
||||||
::rtl::OUString sPrimarySecondary = ::utl::extractFirstFromConfigurationPath(sPath);
|
::rtl::OUString sPrimarySecondary = ::utl::extractFirstFromConfigurationPath(sPath, &sPath);
|
||||||
sPath = ::utl::dropPrefixFromConfigurationPath(sPath, sPrimarySecondary);
|
::rtl::OUString sGlobalModules = ::utl::extractFirstFromConfigurationPath(sPath, &sPath);
|
||||||
|
|
||||||
::rtl::OUString sGlobalModules = ::utl::extractFirstFromConfigurationPath(sPath);
|
|
||||||
sPath = ::utl::dropPrefixFromConfigurationPath(sPath, sGlobalModules);
|
|
||||||
|
|
||||||
if ( sGlobalModules.equals(CFG_ENTRY_GLOBAL) )
|
if ( sGlobalModules.equals(CFG_ENTRY_GLOBAL) )
|
||||||
{
|
{
|
||||||
::rtl::OUString sModule;
|
::rtl::OUString sModule;
|
||||||
sKey = ::utl::extractFirstFromConfigurationPath(sPath);
|
sKey = ::utl::extractFirstFromConfigurationPath(sPath, &sPath);
|
||||||
if ( sKey.getLength() )
|
if (( sKey.getLength() > 0 ) && ( sPath.getLength() > 0 ))
|
||||||
reloadChanged(sPrimarySecondary, sGlobalModules, sModule, sKey);
|
reloadChanged(sPrimarySecondary, sGlobalModules, sModule, sKey);
|
||||||
}
|
}
|
||||||
else if ( sGlobalModules.equals(CFG_ENTRY_MODULES) )
|
else if ( sGlobalModules.equals(CFG_ENTRY_MODULES) )
|
||||||
{
|
{
|
||||||
::rtl::OUString sModule = ::utl::extractFirstFromConfigurationPath(sPath);
|
::rtl::OUString sModule = ::utl::extractFirstFromConfigurationPath(sPath, &sPath);
|
||||||
::rtl::OUString sDropModule = ::rtl::OUString::createFromAscii("Module['") + sModule + ::rtl::OUString::createFromAscii("']");
|
sKey = ::utl::extractFirstFromConfigurationPath(sPath, &sPath);
|
||||||
sPath = ::utl::dropPrefixFromConfigurationPath(sPath, sDropModule);
|
|
||||||
sKey = ::utl::extractFirstFromConfigurationPath(sPath);
|
if (( sKey.getLength() > 0 ) && ( sPath.getLength() > 0 ))
|
||||||
if ( sKey.getLength() )
|
{
|
||||||
reloadChanged(sPrimarySecondary, sGlobalModules, sModule, sKey);
|
reloadChanged(sPrimarySecondary, sGlobalModules, sModule, sKey);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1385,8 +1384,8 @@ void XCUBasedAcceleratorConfiguration::impl_ts_load( sal_Bool bPreferred, const
|
|||||||
aKeyEvent.Modifiers |= css::awt::KeyModifier::MOD1;
|
aKeyEvent.Modifiers |= css::awt::KeyModifier::MOD1;
|
||||||
else if (sToken[k].equalsAscii("MOD2"))
|
else if (sToken[k].equalsAscii("MOD2"))
|
||||||
aKeyEvent.Modifiers |= css::awt::KeyModifier::MOD2;
|
aKeyEvent.Modifiers |= css::awt::KeyModifier::MOD2;
|
||||||
else if (sToken[k].equalsAscii("MOD3"))
|
else if (sToken[k].equalsAscii("MOD3"))
|
||||||
aKeyEvent.Modifiers |= css::awt::KeyModifier::MOD3;
|
aKeyEvent.Modifiers |= css::awt::KeyModifier::MOD3;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bValid = sal_False;
|
bValid = sal_False;
|
||||||
|
5
officecfg/registry/data/org/openoffice/Office/Math.xcu
Normal file → Executable file
5
officecfg/registry/data/org/openoffice/Office/Math.xcu
Normal file → Executable file
@ -48,6 +48,8 @@
|
|||||||
<value>0</value>
|
<value>0</value>
|
||||||
</prop>
|
</prop>
|
||||||
</node>
|
</node>
|
||||||
|
|
||||||
|
<!-- only used for symbols with the 'Greek' symbol set name -->
|
||||||
<node oor:name="Id2" oor:op="replace">
|
<node oor:name="Id2" oor:op="replace">
|
||||||
<prop oor:name="Name">
|
<prop oor:name="Name">
|
||||||
<value>OpenSymbol</value>
|
<value>OpenSymbol</value>
|
||||||
@ -65,10 +67,11 @@
|
|||||||
<value>0</value>
|
<value>0</value>
|
||||||
</prop>
|
</prop>
|
||||||
<prop oor:name="Italic">
|
<prop oor:name="Italic">
|
||||||
<value>2</value>
|
<value>0</value>
|
||||||
</prop>
|
</prop>
|
||||||
</node>
|
</node>
|
||||||
</node>
|
</node>
|
||||||
|
|
||||||
<node oor:name="SymbolList">
|
<node oor:name="SymbolList">
|
||||||
<node oor:name="alpha" oor:op="replace">
|
<node oor:name="alpha" oor:op="replace">
|
||||||
<prop oor:name="Char">
|
<prop oor:name="Char">
|
||||||
|
@ -402,7 +402,28 @@
|
|||||||
</info>
|
</info>
|
||||||
<value>false</value>
|
<value>false</value>
|
||||||
</prop>
|
</prop>
|
||||||
<prop oor:name="ScaleNormalBracket" oor:type="xs:boolean">
|
<prop oor:name="GreekCharStyle" oor:type="xs:short">
|
||||||
|
<!-- UIHints: n/a yet -->
|
||||||
|
<info>
|
||||||
|
<author>TL</author>
|
||||||
|
<desc>Specifies the default layout for symbols from the 'Greek' symbol set.</desc>
|
||||||
|
<label>Greek character style</label>
|
||||||
|
</info>
|
||||||
|
<constraints>
|
||||||
|
<minInclusive oor:value="0">
|
||||||
|
<info>
|
||||||
|
<desc>Specifies the minimum value allowed</desc>
|
||||||
|
</info>
|
||||||
|
</minInclusive>
|
||||||
|
<maxInclusive oor:value="2">
|
||||||
|
<info>
|
||||||
|
<desc>Specifies the maximum value allowed</desc>
|
||||||
|
</info>
|
||||||
|
</maxInclusive>
|
||||||
|
</constraints>
|
||||||
|
<value>0</value>
|
||||||
|
</prop>
|
||||||
|
<prop oor:name="ScaleNormalBracket" oor:type="xs:boolean">
|
||||||
<!-- OldPath: Math/StandardFormat -->
|
<!-- OldPath: Math/StandardFormat -->
|
||||||
<!-- OldLocation: Soffice.cfg -->
|
<!-- OldLocation: Soffice.cfg -->
|
||||||
<!-- UIHints: Format - Spacing - Category - Brackets - Scale all brackets -->
|
<!-- UIHints: Format - Spacing - Category - Brackets - Scale all brackets -->
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
OpenOffice.org Improvement Program. If this is zero the user will get asked.
|
OpenOffice.org Improvement Program. If this is zero the user will get asked.
|
||||||
</desc>
|
</desc>
|
||||||
</info>
|
</info>
|
||||||
<value>2</value>
|
<value>1</value>
|
||||||
</prop>
|
</prop>
|
||||||
<prop oor:name="InvitationAccepted" oor:type="xs:boolean">
|
<prop oor:name="InvitationAccepted" oor:type="xs:boolean">
|
||||||
<info>
|
<info>
|
||||||
|
30
sfx2/source/dialog/securitypage.cxx
Executable file → Normal file
30
sfx2/source/dialog/securitypage.cxx
Executable file → Normal file
@ -245,6 +245,36 @@ SfxSecurityPage_Impl::SfxSecurityPage_Impl( SfxSecurityPage &rTabPage, const Sfx
|
|||||||
m_aRecordChangesCB.SetStyle( m_aRecordChangesCB.GetStyle() | WB_EARLYTOGGLE );
|
m_aRecordChangesCB.SetStyle( m_aRecordChangesCB.GetStyle() | WB_EARLYTOGGLE );
|
||||||
m_aRecordChangesCB.SetToggleHdl( LINK( this, SfxSecurityPage_Impl, RecordChangesCBToggleHdl ) );
|
m_aRecordChangesCB.SetToggleHdl( LINK( this, SfxSecurityPage_Impl, RecordChangesCBToggleHdl ) );
|
||||||
m_aChangeProtectionPB.SetClickHdl( LINK( this, SfxSecurityPage_Impl, ChangeProtectionPBHdl ) );
|
m_aChangeProtectionPB.SetClickHdl( LINK( this, SfxSecurityPage_Impl, ChangeProtectionPBHdl ) );
|
||||||
|
|
||||||
|
|
||||||
|
// #i112277: for the time being (OOO 3.3) the following options should not
|
||||||
|
// be available. In the long run however it is planned to implement the yet
|
||||||
|
// missing functionality. Thus now we hide them and move the remaining ones up.
|
||||||
|
m_aNewPasswordToOpenFL.Hide();
|
||||||
|
m_aNewPasswordToOpenFT.Hide();
|
||||||
|
m_aNewPasswordToOpenED.Hide();
|
||||||
|
m_aConfirmPasswordToOpenFT.Hide();
|
||||||
|
m_aConfirmPasswordToOpenED.Hide();
|
||||||
|
m_aNewPasswordInfoFT.Hide();
|
||||||
|
m_aNewPasswordToModifyFL.Hide();
|
||||||
|
m_aNewPasswordToModifyFT.Hide();
|
||||||
|
m_aNewPasswordToModifyED.Hide();
|
||||||
|
m_aConfirmPasswordToModifyFT.Hide();
|
||||||
|
m_aConfirmPasswordToModifyED.Hide();
|
||||||
|
const long nDelta = m_aOptionsFL.GetPosPixel().Y() - m_aNewPasswordToOpenFL.GetPosPixel().Y();
|
||||||
|
Point aPos;
|
||||||
|
aPos = m_aOptionsFL.GetPosPixel();
|
||||||
|
aPos.Y() -= nDelta;
|
||||||
|
m_aOptionsFL.SetPosPixel( aPos );
|
||||||
|
aPos = m_aOpenReadonlyCB.GetPosPixel();
|
||||||
|
aPos.Y() -= nDelta;
|
||||||
|
m_aOpenReadonlyCB.SetPosPixel( aPos );
|
||||||
|
aPos = m_aRecordChangesCB.GetPosPixel();
|
||||||
|
aPos.Y() -= nDelta;
|
||||||
|
m_aRecordChangesCB.SetPosPixel( aPos );
|
||||||
|
aPos = m_aChangeProtectionPB.GetPosPixel();
|
||||||
|
aPos.Y() -= nDelta;
|
||||||
|
m_aChangeProtectionPB.SetPosPixel( aPos );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
0
sfx2/source/dialog/securitypage.src
Executable file → Normal file
0
sfx2/source/dialog/securitypage.src
Executable file → Normal file
@ -977,6 +977,8 @@ sal_Bool SAL_CALL SfxBaseModel::attachResource( const ::rtl::OUString&
|
|||||||
aArgs.remove( "BreakMacroSignature" );
|
aArgs.remove( "BreakMacroSignature" );
|
||||||
aArgs.remove( "Stream" );
|
aArgs.remove( "Stream" );
|
||||||
aArgs.remove( "InputStream" );
|
aArgs.remove( "InputStream" );
|
||||||
|
aArgs.remove( "URL" );
|
||||||
|
aArgs.remove( "Frame" );
|
||||||
|
|
||||||
// TODO/LATER: all the parameters that are accepted by ItemSet of the DocShell must be removed here
|
// TODO/LATER: all the parameters that are accepted by ItemSet of the DocShell must be removed here
|
||||||
|
|
||||||
@ -988,6 +990,10 @@ sal_Bool SAL_CALL SfxBaseModel::attachResource( const ::rtl::OUString&
|
|||||||
SfxAllItemSet aSet( pObjectShell->GetPool() );
|
SfxAllItemSet aSet( pObjectShell->GetPool() );
|
||||||
TransformParameters( SID_OPENDOC, rArgs, aSet );
|
TransformParameters( SID_OPENDOC, rArgs, aSet );
|
||||||
|
|
||||||
|
// the arguments are not allowed to reach the medium
|
||||||
|
aSet.ClearItem( SID_FILE_NAME );
|
||||||
|
aSet.ClearItem( SID_FILLFRAME );
|
||||||
|
|
||||||
pMedium->GetItemSet()->Put( aSet );
|
pMedium->GetItemSet()->Put( aSet );
|
||||||
SFX_ITEMSET_ARG( &aSet, pItem, SfxStringItem, SID_FILTER_NAME, sal_False );
|
SFX_ITEMSET_ARG( &aSet, pItem, SfxStringItem, SID_FILTER_NAME, sal_False );
|
||||||
if ( pItem )
|
if ( pItem )
|
||||||
|
@ -813,6 +813,13 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
|
|||||||
xNewObj->SetModifyPasswordEntered( sal_False );
|
xNewObj->SetModifyPasswordEntered( sal_False );
|
||||||
xNewObj->SetReadOnly();
|
xNewObj->SetReadOnly();
|
||||||
}
|
}
|
||||||
|
else if ( rReq.GetSlot() == SID_EDITDOC && bForEdit && !xNewObj->IsReadOnlyMedium() )
|
||||||
|
{
|
||||||
|
// the filter might request setting of the document to readonly state
|
||||||
|
// but in case of SID_EDITDOC it should not happen if the document
|
||||||
|
// can be opened for editing
|
||||||
|
xNewObj->SetReadOnlyUI( sal_False );
|
||||||
|
}
|
||||||
|
|
||||||
if ( xNewObj->IsDocShared() )
|
if ( xNewObj->IsDocShared() )
|
||||||
{
|
{
|
||||||
@ -2144,6 +2151,8 @@ SfxViewShell* SfxViewFrame::LoadViewIntoFrame_Impl( const SfxObjectShell& i_rDoc
|
|||||||
aTransformLoadArgs.remove( "Hidden" );
|
aTransformLoadArgs.remove( "Hidden" );
|
||||||
|
|
||||||
::rtl::OUString sURL( RTL_CONSTASCII_USTRINGPARAM( "private:object" ) );
|
::rtl::OUString sURL( RTL_CONSTASCII_USTRINGPARAM( "private:object" ) );
|
||||||
|
if ( !sURL.getLength() )
|
||||||
|
sURL = i_rDoc.GetFactory().GetFactoryURL();
|
||||||
|
|
||||||
Reference< XComponentLoader > xLoader( i_rFrame, UNO_QUERY_THROW );
|
Reference< XComponentLoader > xLoader( i_rFrame, UNO_QUERY_THROW );
|
||||||
xLoader->loadComponentFromURL( sURL, ::rtl::OUString::createFromAscii( "_self" ), 0,
|
xLoader->loadComponentFromURL( sURL, ::rtl::OUString::createFromAscii( "_self" ), 0,
|
||||||
|
@ -1063,8 +1063,7 @@ void SdrMarkView::AddDragModeHdl(SdrDragMode eMode)
|
|||||||
/** handle mouse over effects for handles */
|
/** handle mouse over effects for handles */
|
||||||
BOOL SdrMarkView::MouseMove(const MouseEvent& rMEvt, Window* pWin)
|
BOOL SdrMarkView::MouseMove(const MouseEvent& rMEvt, Window* pWin)
|
||||||
{
|
{
|
||||||
const ULONG nHdlCount = aHdl.GetHdlCount();
|
if(aHdl.GetHdlCount())
|
||||||
if( nHdlCount )
|
|
||||||
{
|
{
|
||||||
SdrHdl* pMouseOverHdl = 0;
|
SdrHdl* pMouseOverHdl = 0;
|
||||||
if( !rMEvt.IsLeaveWindow() && pWin )
|
if( !rMEvt.IsLeaveWindow() && pWin )
|
||||||
@ -1074,6 +1073,8 @@ BOOL SdrMarkView::MouseMove(const MouseEvent& rMEvt, Window* pWin)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// notify last mouse over handle that he lost the mouse
|
// notify last mouse over handle that he lost the mouse
|
||||||
|
const ULONG nHdlCount = aHdl.GetHdlCount();
|
||||||
|
|
||||||
for(ULONG nHdl = 0; nHdl < nHdlCount; nHdl++ )
|
for(ULONG nHdl = 0; nHdl < nHdlCount; nHdl++ )
|
||||||
{
|
{
|
||||||
SdrHdl* pCurrentHdl = GetHdl(nHdl);
|
SdrHdl* pCurrentHdl = GetHdl(nHdl);
|
||||||
|
@ -68,6 +68,7 @@ SHL1IMPLIB=i$(TARGET)
|
|||||||
SHL1VERSIONMAP=$(SOLARENV)/src/component.map
|
SHL1VERSIONMAP=$(SOLARENV)/src/component.map
|
||||||
|
|
||||||
SHL1STDLIBS=\
|
SHL1STDLIBS=\
|
||||||
|
$(COMPHELPERLIB) \
|
||||||
$(CPPUHELPERLIB) \
|
$(CPPUHELPERLIB) \
|
||||||
$(CPPULIB) \
|
$(CPPULIB) \
|
||||||
$(SALLIB) \
|
$(SALLIB) \
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
|
|
||||||
#include "rtl/ustrbuf.hxx"
|
#include "rtl/ustrbuf.hxx"
|
||||||
#include "osl/diagnose.h"
|
#include "osl/diagnose.h"
|
||||||
|
#include "comphelper/storagehelper.hxx"
|
||||||
|
|
||||||
#include "../inc/urihelper.hxx"
|
#include "../inc/urihelper.hxx"
|
||||||
|
|
||||||
@ -85,7 +86,7 @@ void PackageUri::init() const
|
|||||||
if ( ( m_aUri.getLength() < PACKAGE_URL_SCHEME_LENGTH + 4 ) )
|
if ( ( m_aUri.getLength() < PACKAGE_URL_SCHEME_LENGTH + 4 ) )
|
||||||
{
|
{
|
||||||
// error, but remember that we did a init().
|
// error, but remember that we did a init().
|
||||||
m_aPath = rtl::OUString::createFromAscii( "/" );
|
m_aPath = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ) );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -100,7 +101,7 @@ void PackageUri::init() const
|
|||||||
!= sal_Unicode( '/' ) ) )
|
!= sal_Unicode( '/' ) ) )
|
||||||
{
|
{
|
||||||
// error, but remember that we did a init().
|
// error, but remember that we did a init().
|
||||||
m_aPath = rtl::OUString::createFromAscii( "/" );
|
m_aPath = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ) );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -128,8 +129,8 @@ void PackageUri::init() const
|
|||||||
{
|
{
|
||||||
m_aParam +=
|
m_aParam +=
|
||||||
( m_aParam.getLength()
|
( m_aParam.getLength()
|
||||||
? ::rtl::OUString::createFromAscii( "&purezip" )
|
? ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "&purezip" ) )
|
||||||
: ::rtl::OUString::createFromAscii( "?purezip" ) );
|
: ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "?purezip" ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
aPureUri = aPureUri.replaceAt( 0,
|
aPureUri = aPureUri.replaceAt( 0,
|
||||||
@ -143,7 +144,7 @@ void PackageUri::init() const
|
|||||||
// Only <scheme>:/// - Empty authority
|
// Only <scheme>:/// - Empty authority
|
||||||
|
|
||||||
// error, but remember that we did a init().
|
// error, but remember that we did a init().
|
||||||
m_aPath = rtl::OUString::createFromAscii( "/" );
|
m_aPath = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ) );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if ( nEnd == ( aPureUri.getLength() - 1 ) )
|
else if ( nEnd == ( aPureUri.getLength() - 1 ) )
|
||||||
@ -154,7 +155,7 @@ void PackageUri::init() const
|
|||||||
// Only <scheme>://// or <scheme>://<something>//
|
// Only <scheme>://// or <scheme>://<something>//
|
||||||
|
|
||||||
// error, but remember that we did a init().
|
// error, but remember that we did a init().
|
||||||
m_aPath = rtl::OUString::createFromAscii( "/" );
|
m_aPath = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ) );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -175,7 +176,7 @@ void PackageUri::init() const
|
|||||||
nStart, aPureUri.getLength() - nStart, aNormPackage );
|
nStart, aPureUri.getLength() - nStart, aNormPackage );
|
||||||
m_aPackage
|
m_aPackage
|
||||||
= ::ucb_impl::urihelper::decodeSegment( aNormPackage );
|
= ::ucb_impl::urihelper::decodeSegment( aNormPackage );
|
||||||
m_aPath = rtl::OUString::createFromAscii( "/" );
|
m_aPath = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ) );
|
||||||
m_aUri = m_aUri.replaceAt( 0,
|
m_aUri = m_aUri.replaceAt( 0,
|
||||||
( nParam >= 0 )
|
( nParam >= 0 )
|
||||||
? nParam
|
? nParam
|
||||||
@ -193,16 +194,19 @@ void PackageUri::init() const
|
|||||||
{
|
{
|
||||||
m_aPath = aPureUri.copy( nEnd + 1 );
|
m_aPath = aPureUri.copy( nEnd + 1 );
|
||||||
|
|
||||||
// Empty path segments or encoded slashes?
|
// Unexpected sequences of characters:
|
||||||
if ( m_aPath.indexOf(
|
// - empty path segments
|
||||||
rtl::OUString::createFromAscii( "//" ) ) != -1
|
// - encoded slashes
|
||||||
|| m_aPath.indexOf(
|
// - parent folder segments ".."
|
||||||
rtl::OUString::createFromAscii( "%2F" ) ) != -1
|
// - current folder segments "."
|
||||||
|| m_aPath.indexOf(
|
if ( m_aPath.indexOf( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "//" ) ) ) != -1
|
||||||
rtl::OUString::createFromAscii( "%2f" ) ) != -1 )
|
|| m_aPath.indexOf( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "%2F" ) ) ) != -1
|
||||||
|
|| m_aPath.indexOf( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "%2f" ) ) ) != -1
|
||||||
|
|| ::comphelper::OStorageHelper::PathHasSegment( m_aPath, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".." ) ) )
|
||||||
|
|| ::comphelper::OStorageHelper::PathHasSegment( m_aPath, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "." ) ) ) )
|
||||||
{
|
{
|
||||||
// error, but remember that we did a init().
|
// error, but remember that we did a init().
|
||||||
m_aPath = rtl::OUString::createFromAscii( "/" );
|
m_aPath = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ) );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -239,7 +243,7 @@ void PackageUri::init() const
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// error, but remember that we did a init().
|
// error, but remember that we did a init().
|
||||||
m_aPath = rtl::OUString::createFromAscii( "/" );
|
m_aPath = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user