summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-07-27 19:47:01 +0200
committerStephan Bergmann <sbergman@redhat.com>2013-07-27 19:47:01 +0200
commit787940e0ac285aa1101ca8964d252faaab3ea8c1 (patch)
tree1f9dc8a0ae0693e31aa79d4e2d47586b5e603fde /desktop
parenta1c081a7c213a56321b0b60651a1dbd63bcaec80 (diff)
fdo#54264: Fix multi-argument ApplicationEvent::TYPE_OPEN/PRINT
...that had been broken when 5c22a03320f20ae9ac2c3c16025e7c5e3a7915d5> "Cleaned up CommandLineArgs" changed the representation of those multi-arguments from a single string with \n delimiters to vector<string> in desktop/soruce/app/cmdlineargs.hxx, but missed updating other producers of such ApplicationEvents. Change-Id: I527d620c60a87f3a01d970927c521163fb6df192
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/app/app.cxx24
1 files changed, 14 insertions, 10 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 137dbac24979..96e244dc208e 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -2616,7 +2616,7 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent )
case ApplicationEvent::TYPE_ACCEPT:
// every time an accept parameter is used we create an acceptor
// with the corresponding accept-string
- createAcceptor(rAppEvent.GetData());
+ createAcceptor(rAppEvent.GetStringData());
break;
case ApplicationEvent::TYPE_APPEAR:
if ( !GetCommandLineArgs().IsInvisible() )
@@ -2665,7 +2665,7 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent )
}
break;
case ApplicationEvent::TYPE_HELP:
- displayCmdlineHelp(rAppEvent.GetData());
+ displayCmdlineHelp(rAppEvent.GetStringData());
break;
case ApplicationEvent::TYPE_VERSION:
displayVersion();
@@ -2677,7 +2677,9 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent )
{
ProcessDocumentsRequest* pDocsRequest = new ProcessDocumentsRequest(
rCmdLine.getCwdUrl());
- pDocsRequest->aOpenList.push_back(rAppEvent.GetData());
+ std::vector<OUString> const & data(rAppEvent.GetStringsData());
+ pDocsRequest->aOpenList.insert(
+ pDocsRequest->aOpenList.end(), data.begin(), data.end());
pDocsRequest->pcProcessed = NULL;
OfficeIPCThread::ExecuteCmdLineRequests( *pDocsRequest );
@@ -2687,7 +2689,7 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent )
break;
case ApplicationEvent::TYPE_OPENHELPURL:
// start help for a specific URL
- Application::GetHelp()->Start(rAppEvent.GetData(), NULL);
+ Application::GetHelp()->Start(rAppEvent.GetStringData(), NULL);
break;
case ApplicationEvent::TYPE_PRINT:
{
@@ -2696,7 +2698,9 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent )
{
ProcessDocumentsRequest* pDocsRequest = new ProcessDocumentsRequest(
rCmdLine.getCwdUrl());
- pDocsRequest->aPrintList.push_back(rAppEvent.GetData());
+ std::vector<OUString> const & data(rAppEvent.GetStringsData());
+ pDocsRequest->aPrintList.insert(
+ pDocsRequest->aPrintList.end(), data.begin(), data.end());
pDocsRequest->pcProcessed = NULL;
OfficeIPCThread::ExecuteCmdLineRequests( *pDocsRequest );
@@ -2735,10 +2739,10 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent )
Reference< css::util::XURLTransformer > xParser = css::util::URLTransformer::create(xContext);
css::util::URL aCommand;
- if( rAppEvent.GetData() == OUString("PREFERENCES") )
- aCommand.Complete = OUString( ".uno:OptionsTreeDialog" );
- else if( rAppEvent.GetData() == OUString("ABOUT") )
- aCommand.Complete = OUString( ".uno:About" );
+ if( rAppEvent.GetStringData() == "PREFERENCES" )
+ aCommand.Complete = ".uno:OptionsTreeDialog";
+ else if( rAppEvent.GetStringData() == "ABOUT" )
+ aCommand.Complete = ".uno:About";
if( !aCommand.Complete.isEmpty() )
{
xParser->parseStrict(aCommand);
@@ -2753,7 +2757,7 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent )
break;
case ApplicationEvent::TYPE_UNACCEPT:
// try to remove corresponding acceptor
- destroyAcceptor(rAppEvent.GetData());
+ destroyAcceptor(rAppEvent.GetStringData());
break;
default:
SAL_WARN( "desktop.app", "this cannot happen");