Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
b870f142
Kaydet (Commit)
b870f142
authored
Agu 07, 2012
tarafından
Matúš Kukan
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
tubes: make contacts dialog a member of Collaboration class
Change-Id: Ib50b550f9486bc1abfeefd5d1aac57c0d712ec04
üst
34c6421b
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
41 additions
and
76 deletions
+41
-76
sendfunc.cxx
sc/source/ui/collab/sendfunc.cxx
+1
-4
cellsh3.cxx
sc/source/ui/view/cellsh3.cxx
+1
-2
Package_inc.mk
tubes/Package_inc.mk
+0
-1
collaboration.hxx
tubes/inc/tubes/collaboration.hxx
+3
-0
contacts.hxx
tubes/inc/tubes/contacts.hxx
+0
-38
manager.hxx
tubes/inc/tubes/manager.hxx
+6
-0
collaboration.cxx
tubes/source/collaboration.cxx
+6
-1
contact-list.cxx
tubes/source/contact-list.cxx
+1
-4
contacts.cxx
tubes/source/contacts.cxx
+4
-26
manager.cxx
tubes/source/manager.cxx
+19
-0
No files found.
sc/source/ui/collab/sendfunc.cxx
Dosyayı görüntüle @
b870f142
...
...
@@ -32,11 +32,8 @@
#include "docsh.hxx"
#include "docfunc.hxx"
#include "sccollaboration.hxx"
#include <tubes/contacts.hxx>
#include <tubes/manager.hxx>
#include <vector>
void
ScDocFuncSend
::
RecvMessage
(
const
rtl
::
OString
&
rString
)
{
try
{
...
...
@@ -127,7 +124,7 @@ sal_Bool ScDocFuncSend::SetNormalString( bool& o_rbNumFmtSet, const ScAddress& r
mpCollaboration
->
SaveAndSendFile
(
NULL
,
rText
);
if
(
rtl
::
OUString
(
rText
)
==
"contacts"
)
tubes
::
createContacts
(
rDocShell
.
GetCollaboration
()
);
mpCollaboration
->
DisplayContacts
(
);
return
true
;
// needs some code auditing action
}
...
...
sc/source/ui/view/cellsh3.cxx
Dosyayı görüntüle @
b870f142
...
...
@@ -54,7 +54,6 @@
#ifdef ENABLE_TELEPATHY
#include "sccollaboration.hxx"
#include <tubes/contacts.hxx>
#endif
#define IS_EDITMODE() GetViewData()->HasEditView( GetViewData()->GetActivePart() )
...
...
@@ -118,7 +117,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
case
SID_COLLABORATION
:
#ifdef ENABLE_TELEPATHY
tubes
::
createContacts
(
GetViewData
()
->
GetDocShell
()
->
GetCollaboration
()
);
GetViewData
()
->
GetDocShell
()
->
GetCollaboration
()
->
DisplayContacts
(
);
#endif
break
;
...
...
tubes/Package_inc.mk
Dosyayı görüntüle @
b870f142
...
...
@@ -27,7 +27,6 @@
$(eval $(call gb_Package_Package,tubes_inc,$(SRCDIR)/tubes/inc))
$(eval $(call gb_Package_add_file,tubes_inc,inc/tubes/collaboration.hxx,tubes/collaboration.hxx))
$(eval $(call gb_Package_add_file,tubes_inc,inc/tubes/contacts.hxx,tubes/contacts.hxx))
$(eval $(call gb_Package_add_file,tubes_inc,inc/tubes/manager.hxx,tubes/manager.hxx))
$(eval $(call gb_Package_add_file,tubes_inc,inc/tubes/tubesdllapi.h,tubes/tubesdllapi.h))
...
...
tubes/inc/tubes/collaboration.hxx
Dosyayı görüntüle @
b870f142
...
...
@@ -21,6 +21,8 @@ typedef struct _TpContact TpContact;
class
TUBES_DLLPUBLIC
Collaboration
{
TeleConference
*
mpConference
;
// This is in fact of type TubeContacts* from anonymous namespace
void
*
mpContacts
;
public
:
Collaboration
();
virtual
~
Collaboration
();
...
...
@@ -33,6 +35,7 @@ public:
TUBES_DLLPRIVATE
TeleConference
*
GetConference
()
const
;
TUBES_DLLPRIVATE
sal_uInt64
GetId
()
const
;
void
DisplayContacts
();
void
SendFile
(
TpContact
*
pContact
,
const
OUString
&
rURL
)
const
;
void
SendPacket
(
const
OString
&
rPacket
)
const
;
void
SetConference
(
TeleConference
*
pConference
);
...
...
tubes/inc/tubes/contacts.hxx
deleted
100644 → 0
Dosyayı görüntüle @
34c6421b
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* Version: MPL 1.1 / GPLv3+ / LGPLv3+
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License or as specified alternatively below. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* Major Contributor(s):
* Copyright (C) 2012 Michael Meeks <michael.meeks@suse.com> (initial developer)
*
* All Rights Reserved.
*
* For minor contributions see the git repository.
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 3 or later (the "GPLv3+"), or
* the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
* in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
* instead of those above.
*/
#include "sal/config.h"
#include <tubes/tubesdllapi.h>
class
Collaboration
;
namespace
tubes
{
void
TUBES_DLLPUBLIC
createContacts
(
Collaboration
*
pCollaboration
);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
tubes/inc/tubes/manager.hxx
Dosyayı görüntüle @
b870f142
...
...
@@ -39,6 +39,7 @@
#define LIBO_TUBES_DBUS_PATH "/org/libreoffice/calc"
namespace
osl
{
class
Mutex
;
}
class
Collaboration
;
class
ContactList
;
class
TeleConference
;
class
TeleManagerImpl
;
...
...
@@ -128,6 +129,11 @@ public:
/** Get a conference with current UUID to set a session. */
TUBES_DLLPUBLIC
static
TeleConference
*
getConference
();
static
void
registerCollaboration
(
Collaboration
*
pCollaboration
);
static
void
unregisterCollaboration
(
Collaboration
*
pCollaboration
);
/** Display contact list dialog for all documents. */
static
void
displayAllContacts
();
static
void
registerDemoConference
(
TeleConference
*
pConference
);
static
void
unregisterDemoConference
(
TeleConference
*
pConference
);
/** Broadcast packet to all conferences. Used for demo mode. */
...
...
tubes/source/collaboration.cxx
Dosyayı görüntüle @
b870f142
...
...
@@ -10,13 +10,18 @@
#include <tubes/collaboration.hxx>
#include <tubes/conference.hxx>
#include <tubes/manager.hxx>
Collaboration
::
Collaboration
()
Collaboration
::
Collaboration
()
:
mpConference
(
NULL
),
mpContacts
(
NULL
)
{
TeleManager
::
registerCollaboration
(
this
);
}
Collaboration
::~
Collaboration
()
{
TeleManager
::
unregisterCollaboration
(
this
);
if
(
mpConference
)
mpConference
->
close
();
}
...
...
tubes/source/contact-list.cxx
Dosyayı görüntüle @
b870f142
...
...
@@ -101,16 +101,13 @@ bool tb_contact_is_online( TpContact *contact )
return
tb_presence_is_online
(
tp_contact_get_presence_type
(
contact
));
}
namespace
tubes
{
void
reDrawAllContacts
();
}
static
void
presence_changed_cb
(
TpContact
*
/* contact */
,
guint
/* type */
,
gchar
*
/* status */
,
gchar
*
/* message */
,
gpointer
/* pContactList*/
)
{
tubes
::
reDraw
AllContacts
();
TeleManager
::
display
AllContacts
();
}
AccountContactPairV
ContactList
::
getContacts
()
...
...
tubes/source/contacts.cxx
Dosyayı görüntüle @
b870f142
...
...
@@ -35,7 +35,6 @@
#include <tubes/conference.hxx>
#include <tubes/collaboration.hxx>
#include <tubes/contact-list.hxx>
#include <tubes/contacts.hxx>
#include <tubes/manager.hxx>
#include <unotools/confignode.hxx>
#include <vcl/fixed.hxx>
...
...
@@ -282,34 +281,13 @@ IMPL_LINK_NOARG( TubeContacts, BtnListenHdl )
return
0
;
}
// Mapping contacts dialog instance for each document
typedef
std
::
map
<
sal_uInt64
,
TubeContacts
*
>
DialogsMap
;
static
DialogsMap
aDialogsMap
;
TubeContacts
*
ContactsFactory
(
Collaboration
*
pCollaboration
)
{
sal_uInt64
Id
=
pCollaboration
->
GetId
();
if
(
aDialogsMap
.
find
(
Id
)
==
aDialogsMap
.
end
())
aDialogsMap
[
Id
]
=
new
TubeContacts
(
pCollaboration
);
return
aDialogsMap
[
Id
];
}
}
// anonymous namespace
namespace
tubes
{
void
createContacts
(
Collaboration
*
pCollaboration
)
void
Collaboration
::
DisplayContacts
()
{
TubeContacts
*
pContacts
=
ContactsFactory
(
pCollaboration
);
pContacts
->
Populate
();
}
void
reDrawAllContacts
()
{
for
(
DialogsMap
::
const_iterator
it
=
aDialogsMap
.
begin
();
it
!=
aDialogsMap
.
end
();
++
it
)
it
->
second
->
Populate
();
}
if
(
!
mpContacts
)
mpContacts
=
new
TubeContacts
(
this
);
reinterpret_cast
<
TubeContacts
*>
(
mpContacts
)
->
Populate
();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
tubes/source/manager.cxx
Dosyayı görüntüle @
b870f142
...
...
@@ -103,6 +103,8 @@ public:
MapStringConference
maAcceptedConferences
;
typedef
std
::
set
<
TeleConference
*
>
DemoConferences
;
DemoConferences
maDemoConferences
;
typedef
std
::
set
<
Collaboration
*
>
Collaborations
;
Collaborations
maCollaborations
;
TeleManagerImpl
();
~
TeleManagerImpl
();
...
...
@@ -225,6 +227,23 @@ TeleConference* TeleManager::getConference()
return
pConference
;
}
void
TeleManager
::
registerCollaboration
(
Collaboration
*
pCollaboration
)
{
pImpl
->
maCollaborations
.
insert
(
pCollaboration
);
}
void
TeleManager
::
unregisterCollaboration
(
Collaboration
*
pCollaboration
)
{
pImpl
->
maCollaborations
.
erase
(
pCollaboration
);
}
void
TeleManager
::
displayAllContacts
()
{
for
(
TeleManagerImpl
::
Collaborations
::
iterator
it
=
pImpl
->
maCollaborations
.
begin
();
it
!=
pImpl
->
maCollaborations
.
end
();
++
it
)
(
*
it
)
->
DisplayContacts
();
}
void
TeleManager
::
registerDemoConference
(
TeleConference
*
pConference
)
{
pImpl
->
maDemoConferences
.
insert
(
pConference
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment