summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/ui/collab/sccollaboration.cxx9
-rw-r--r--sc/source/ui/collab/sendfunc.cxx2
-rw-r--r--sc/source/ui/inc/sccollaboration.hxx2
-rw-r--r--tubes/inc/tubes/collaboration.hxx2
-rw-r--r--tubes/source/conference.cxx4
-rw-r--r--tubes/source/contacts.cxx9
-rw-r--r--tubes/source/manager.cxx25
7 files changed, 20 insertions, 33 deletions
diff --git a/sc/source/ui/collab/sccollaboration.cxx b/sc/source/ui/collab/sccollaboration.cxx
index 78e97217c482..74c067c611c4 100644
--- a/sc/source/ui/collab/sccollaboration.cxx
+++ b/sc/source/ui/collab/sccollaboration.cxx
@@ -45,13 +45,10 @@ void ScCollaboration::PacketReceived( const OString& rPacket ) const
return pSender->RecvMessage( rPacket );
}
-void ScCollaboration::SaveAndSendFile( TpContact* pContact, const OUString& sUuid ) const
+void ScCollaboration::SaveAndSendFile( TpContact* pContact ) const
{
- String aTmpPath = utl::TempFile::CreateTempName();
- aTmpPath.Append( OUString("_") );
- aTmpPath.Append( sUuid );
- aTmpPath.Append( OUString("_") );
- aTmpPath.Append( OUString(".ods") );
+ OUString aTmpPath = utl::TempFile::CreateTempName();
+ aTmpPath += ".ods";
rtl::OUString aFileURL;
::utl::LocalFileHelper::ConvertPhysicalNameToURL( aTmpPath, aFileURL );
diff --git a/sc/source/ui/collab/sendfunc.cxx b/sc/source/ui/collab/sendfunc.cxx
index d4b0253bed82..7a7c7414e000 100644
--- a/sc/source/ui/collab/sendfunc.cxx
+++ b/sc/source/ui/collab/sendfunc.cxx
@@ -121,7 +121,7 @@ sal_Bool ScDocFuncSend::SetNormalString( bool& o_rbNumFmtSet, const ScAddress& r
o_rbNumFmtSet = false;
if ( rtl::OUString( rText ) == "saveme" )
- mpCollaboration->SaveAndSendFile( NULL, rText );
+ mpCollaboration->SaveAndSendFile( NULL );
if ( rtl::OUString( rText ) == "contacts" )
mpCollaboration->DisplayContacts();
diff --git a/sc/source/ui/inc/sccollaboration.hxx b/sc/source/ui/inc/sccollaboration.hxx
index cc71fe959cef..ece2604b3bbd 100644
--- a/sc/source/ui/inc/sccollaboration.hxx
+++ b/sc/source/ui/inc/sccollaboration.hxx
@@ -25,7 +25,7 @@ public:
virtual void ContactLeft() const;
virtual void PacketReceived( const OString& rPacket ) const;
- virtual void SaveAndSendFile( TpContact* pContact, const OUString& rURL ) const;
+ virtual void SaveAndSendFile( TpContact* pContact ) const;
virtual void StartCollaboration( TeleConference* pConference );
private:
friend class ScDocShell;
diff --git a/tubes/inc/tubes/collaboration.hxx b/tubes/inc/tubes/collaboration.hxx
index 8378ddae6823..18a64f0c2708 100644
--- a/tubes/inc/tubes/collaboration.hxx
+++ b/tubes/inc/tubes/collaboration.hxx
@@ -29,7 +29,7 @@ public:
virtual void ContactLeft() const = 0;
virtual void PacketReceived( const OString& rPacket ) const = 0;
- virtual void SaveAndSendFile( TpContact* pContact, const OUString& rURL ) const = 0;
+ virtual void SaveAndSendFile( TpContact* pContact ) const = 0;
virtual void StartCollaboration( TeleConference* pConference ) = 0;
TUBES_DLLPRIVATE TeleConference* GetConference() const;
diff --git a/tubes/source/conference.cxx b/tubes/source/conference.cxx
index 4bfd51c63b2e..8be9cab727e9 100644
--- a/tubes/source/conference.cxx
+++ b/tubes/source/conference.cxx
@@ -535,7 +535,7 @@ static void TeleConference_FTReady( EmpathyFTHandler *handler, GError *error, gp
}
// TODO: move sending file to TeleManager
-extern void TeleManager_fileReceived( const OUString& );
+extern void TeleManager_fileReceived( const OUString&, const OString& );
void TeleConference::sendFile( TpContact* pContact, const OUString& localUri, FileSentCallback pCallback, void* pUserData)
{
INFO_LOGGER( "TeleConference::sendFile");
@@ -543,7 +543,7 @@ void TeleConference::sendFile( TpContact* pContact, const OUString& localUri, Fi
if (!pContact)
{
// used in demo mode
- TeleManager_fileReceived( localUri );
+ TeleManager_fileReceived( localUri, "demo" );
return;
}
diff --git a/tubes/source/contacts.cxx b/tubes/source/contacts.cxx
index ef772dee58db..1472773f1ec2 100644
--- a/tubes/source/contacts.cxx
+++ b/tubes/source/contacts.cxx
@@ -88,8 +88,7 @@ class TubeContacts : public ModelessDialog
{
TpContact* pContact = pAC->second;
mpCollaboration->GetConference()->invite( pContact );
- mpCollaboration->SaveAndSendFile( pContact, OStringToOUString(
- mpCollaboration->GetConference()->getUuid(), RTL_TEXTENCODING_UTF8 ) );
+ mpCollaboration->SaveAndSendFile( pContact );
}
}
}
@@ -108,8 +107,7 @@ class TubeContacts : public ModelessDialog
else
{
mpCollaboration->StartCollaboration( pConference );
- mpCollaboration->SaveAndSendFile( NULL, OStringToOUString(
- pConference->getUuid(), RTL_TEXTENCODING_UTF8 ) );
+ mpCollaboration->SaveAndSendFile( NULL );
}
}
@@ -130,8 +128,7 @@ class TubeContacts : public ModelessDialog
else
{
mpCollaboration->StartCollaboration( pConference );
- mpCollaboration->SaveAndSendFile( pContact, OStringToOUString(
- pConference->getUuid(), RTL_TEXTENCODING_UTF8 ) );
+ mpCollaboration->SaveAndSendFile( pContact );
}
}
}
diff --git a/tubes/source/manager.cxx b/tubes/source/manager.cxx
index e1311c827749..340c0023579f 100644
--- a/tubes/source/manager.cxx
+++ b/tubes/source/manager.cxx
@@ -285,26 +285,19 @@ void TeleManager::setCurrentUuid( const OString& rUuid )
}
// FIXME: should be static and not used in conference.cxx
-void TeleManager_fileReceived( const rtl::OUString &rStr )
+void TeleManager_fileReceived( const OUString& rStr, const OString& rUuid )
{
SAL_INFO( "tubes", "TeleManager_fileReceived: incoming file: " << rStr );
- sal_Int32 first = rStr.indexOf('_');
- sal_Int32 last = rStr.lastIndexOf('_');
- SAL_WARN_IF( first == last, "tubes", "No UUID to associate with the file!" );
- if (first != last)
+ OString sUuid( rUuid );
+ if (sUuid == "demo")
{
- OString sUuid( OUStringToOString( rStr.copy( first + 1, last - first - 1),
- RTL_TEXTENCODING_UTF8));
- if (sUuid == "demo")
- {
- sUuid = TeleManager::createUuid();
- TeleConference* pConference = new TeleConference( NULL, NULL, sUuid );
- TeleManager::addConference( pConference );
- TeleManager::registerDemoConference( pConference );
- }
- TeleManager::setCurrentUuid( sUuid );
+ sUuid = TeleManager::createUuid();
+ TeleConference* pConference = new TeleConference( NULL, NULL, sUuid );
+ TeleManager::addConference( pConference );
+ TeleManager::registerDemoConference( pConference );
}
+ TeleManager::setCurrentUuid( sUuid );
css::uno::Reference< css::lang::XMultiServiceFactory > rFactory =
::comphelper::getProcessServiceFactory();
@@ -334,7 +327,7 @@ static void TeleManager_TransferDone( EmpathyFTHandler *handler, TpFileTransferC
rtl::OUString aUri( OUString::createFromAscii( uri ) );
g_free( uri);
- TeleManager_fileReceived( aUri );
+ TeleManager_fileReceived( aUri, empathy_ft_handler_get_description( handler ) );
g_object_unref( handler);
}