summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@gmail.com>2012-07-26 17:56:12 +0200
committerMatúš Kukan <matus.kukan@gmail.com>2012-07-26 22:15:58 +0200
commitdf2369657ebe36c3888bb032e693bf1fcb49bb51 (patch)
tree9aaf358dde0a0b139cc8ea0738410fb144c1f772 /sc
parent4eed899c596fdcb777ccb0a59c72718c6b2c295d (diff)
tubes: send file when inviting contact to MUC collaboration
- add UUID info to TeleConference - let SendFile function take argument for contact instead of getting contact from the channel info, what couldn't work for MUC channel Change-Id: I4dc45c084966a030ff4b503e192d452797f0bfdd
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/collab/contacts.cxx4
-rw-r--r--sc/source/ui/collab/sendfunc.cxx8
-rw-r--r--sc/source/ui/collab/sendfunc.hxx3
3 files changed, 9 insertions, 6 deletions
diff --git a/sc/source/ui/collab/contacts.cxx b/sc/source/ui/collab/contacts.cxx
index 72c29a01ccc5..e6e2239c50a1 100644
--- a/sc/source/ui/collab/contacts.cxx
+++ b/sc/source/ui/collab/contacts.cxx
@@ -107,6 +107,8 @@ class TubeContacts : public ModelessDialog
{
TpContact* pContact = pAC->mpContact;
pSender->GetConference()->invite( pContact );
+ pSender->SendFile( pContact, OStringToOUString(
+ pSender->GetConference()->getUuid(), RTL_TEXTENCODING_UTF8 ) );
}
}
}
@@ -135,7 +137,7 @@ class TubeContacts : public ModelessDialog
{
ScDocFuncSend* pSender = EnsureScDocFuncSendInCurrentSfxObjectShell();
pSender->SetCollaboration( pConference );
- pSender->SendFile( OStringToOUString(
+ pSender->SendFile( pContact, OStringToOUString(
pConference->getUuid(), RTL_TEXTENCODING_UTF8 ) );
}
}
diff --git a/sc/source/ui/collab/sendfunc.cxx b/sc/source/ui/collab/sendfunc.cxx
index b78d34c1bb9e..58af1ba6b598 100644
--- a/sc/source/ui/collab/sendfunc.cxx
+++ b/sc/source/ui/collab/sendfunc.cxx
@@ -156,7 +156,7 @@ void ScDocFuncSend::SendMessage( ScChangeOpWriter &rOp )
mpDirect->RecvMessage( rOp.toString() );
}
-void ScDocFuncSend::SendFile( const rtl::OUString &sUuid )
+void ScDocFuncSend::SendFile( TpContact* pContact, const rtl::OUString &sUuid )
{
String aTmpPath = utl::TempFile::CreateTempName();
aTmpPath.Append( OUString("_") );
@@ -182,8 +182,8 @@ void ScDocFuncSend::SendFile( const rtl::OUString &sUuid )
fprintf( stderr, "Temp file is '%s'\n",
rtl::OUStringToOString( aFileURL, RTL_TEXTENCODING_UTF8 ).getStr() );
- if (mpConference)
- mpConference->sendFile( aFileURL, file_sent_cb, NULL );
+ if (pContact)
+ mpConference->sendFile( pContact, aFileURL, file_sent_cb, NULL );
else
TeleManager_fileReceived( aFileURL );
@@ -249,7 +249,7 @@ sal_Bool ScDocFuncSend::SetNormalString( bool& o_rbNumFmtSet, const ScAddress& r
o_rbNumFmtSet = false;
if ( rtl::OUString( rText ) == "saveme" )
- SendFile( rText );
+ SendFile( NULL, rText );
if ( rtl::OUString( rText ) == "contacts" )
tubes::createContacts();
diff --git a/sc/source/ui/collab/sendfunc.hxx b/sc/source/ui/collab/sendfunc.hxx
index 72999830618c..16f6e888ce65 100644
--- a/sc/source/ui/collab/sendfunc.hxx
+++ b/sc/source/ui/collab/sendfunc.hxx
@@ -15,6 +15,7 @@
#include "cell.hxx"
#include "docfunc.hxx"
class TeleConference;
+typedef struct _TpContact TpContact;
namespace {
@@ -236,7 +237,7 @@ public:
void SetCollaboration( TeleConference* pConference );
TeleConference* GetConference();
// TODO: I think this could be moved to TeleManager later.
- void SendFile( const rtl::OUString &rURL );
+ void SendFile( TpContact* pContact, const rtl::OUString &rURL );
virtual void EnterListAction( sal_uInt16 nNameResId );
virtual void EndListAction();