diff options
Diffstat (limited to 'sc')
-rw-r--r-- | sc/CppunitTest_sc_ucalc.mk | 4 | ||||
-rw-r--r-- | sc/CustomTarget_uiconfig.mk | 19 | ||||
-rw-r--r-- | sc/Library_sc.mk | 9 | ||||
-rw-r--r-- | sc/Module_sc.mk | 8 | ||||
-rw-r--r-- | sc/UIConfig_scalc.mk | 6 | ||||
-rw-r--r-- | sc/inc/sc.hrc | 1 | ||||
-rw-r--r-- | sc/sdi/cellsh.sdi | 1 | ||||
-rw-r--r-- | sc/sdi/scalc.sdi | 18 | ||||
-rw-r--r-- | sc/source/ui/collab/sccollaboration.cxx | 90 | ||||
-rw-r--r-- | sc/source/ui/collab/sendfunc.cxx | 470 | ||||
-rw-r--r-- | sc/source/ui/collab/sendfunc.hxx | 59 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh.cxx | 24 | ||||
-rw-r--r-- | sc/source/ui/inc/docsh.hxx | 14 | ||||
-rw-r--r-- | sc/source/ui/inc/sccollaboration.hxx | 37 | ||||
-rw-r--r-- | sc/source/ui/view/cellsh3.cxx | 12 | ||||
-rw-r--r-- | sc/uiconfig/scalc/menubar/menubar.xml | 1 |
16 files changed, 0 insertions, 773 deletions
diff --git a/sc/CppunitTest_sc_ucalc.mk b/sc/CppunitTest_sc_ucalc.mk index 207cfba57484..247279bf46ce 100644 --- a/sc/CppunitTest_sc_ucalc.mk +++ b/sc/CppunitTest_sc_ucalc.mk @@ -26,10 +26,6 @@ $(eval $(call gb_CppunitTest_use_library_objects,sc_ucalc, \ scqahelper \ )) -ifeq ($(ENABLE_TELEPATHY),TRUE) -$(eval $(call gb_CppunitTest_use_libraries,sc_ucalc,tubes)) -endif - $(eval $(call gb_CppunitTest_use_externals,sc_ucalc,\ boost_headers \ $(call gb_Helper_optional,OPENCL, \ diff --git a/sc/CustomTarget_uiconfig.mk b/sc/CustomTarget_uiconfig.mk deleted file mode 100644 index 24d2cf322825..000000000000 --- a/sc/CustomTarget_uiconfig.mk +++ /dev/null @@ -1,19 +0,0 @@ -# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- -# -# This file is part of the LibreOffice project. -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# - -$(eval $(call gb_CustomTarget_CustomTarget,sc/uiconfig)) - -$(eval $(call gb_CustomTarget_register_targets,sc/uiconfig,\ - scalc/menubar/menubar.xml \ -)) - -$(call gb_CustomTarget_get_workdir,sc/uiconfig)/scalc/menubar/menubar.xml : $(SRCDIR)/sc/uiconfig/scalc/menubar/menubar.xml - sed 's/.*.uno:Collaborate.*/ <menu:menuseparator\/>\n <menu:menuitem menu:id=".uno:Collaborate"\/>/' $< > $@ - -# vim: set noet sw=4 ts=4: diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk index c8fe0316e679..c9e1d0a13f11 100644 --- a/sc/Library_sc.mk +++ b/sc/Library_sc.mk @@ -52,15 +52,6 @@ else $(eval $(call gb_Library_use_externals,sc,orcus-parser)) endif -ifeq ($(ENABLE_TELEPATHY),TRUE) -$(eval $(call gb_Library_use_libraries,sc,tubes)) - -$(eval $(call gb_Library_add_exception_objects,sc,\ - sc/source/ui/collab/sccollaboration \ - sc/source/ui/collab/sendfunc \ -)) -endif - $(eval $(call gb_Library_use_libraries,sc,\ $(call gb_Helper_optional,AVMEDIA,avmedia) \ basegfx \ diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk index 312cbce4daa8..ef82147d781b 100644 --- a/sc/Module_sc.mk +++ b/sc/Module_sc.mk @@ -24,14 +24,6 @@ $(eval $(call gb_Module_add_l10n_targets,sc,\ UIConfig_scalc \ )) -ifeq ($(ENABLE_TELEPATHY),TRUE) - -$(eval $(call gb_Module_add_targets,sc,\ - CustomTarget_uiconfig \ -)) - -endif - ifneq ($(filter SCRIPTING,$(BUILD_TYPE)),) $(eval $(call gb_Module_add_targets,sc,\ diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk index d6dccd0ef937..92d408709022 100644 --- a/sc/UIConfig_scalc.mk +++ b/sc/UIConfig_scalc.mk @@ -9,15 +9,9 @@ $(eval $(call gb_UIConfig_UIConfig,modules/scalc)) -ifeq ($(ENABLE_TELEPATHY),TRUE) -$(eval $(call gb_UIConfig_add_generated_menubarfiles,modules/scalc,\ - CustomTarget/sc/uiconfig/scalc/menubar/menubar \ -)) -else $(eval $(call gb_UIConfig_add_menubarfiles,modules/scalc,\ sc/uiconfig/scalc/menubar/menubar \ )) -endif $(eval $(call gb_UIConfig_add_popupmenufiles,modules/scalc,\ sc/uiconfig/scalc/popupmenu/anchor \ diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc index b6f24ae319c0..659309974fb7 100644 --- a/sc/inc/sc.hrc +++ b/sc/inc/sc.hrc @@ -127,7 +127,6 @@ #define SID_NUMBER_DECDEC (SC_VIEW_START + 58) // misc: -#define SID_COLLABORATION (SC_VIEW_START + 59) #define SID_LINKS (SC_VIEW_START + 60) #define SID_INSERT_SMATH (SC_VIEW_START + 63) #define SID_MIRROR_VERTICAL (SC_VIEW_START + 65) diff --git a/sc/sdi/cellsh.sdi b/sc/sdi/cellsh.sdi index 0ec5226d746b..96186e65fe15 100644 --- a/sc/sdi/cellsh.sdi +++ b/sc/sdi/cellsh.sdi @@ -191,7 +191,6 @@ interface CellSelection SID_INSERT_POSTIT [ ExecMethod = ExecuteEdit; StateMethod = GetCellState; ] SID_EDIT_POSTIT [ ExecMethod = ExecuteEdit; StateMethod = GetCellState; ] - SID_COLLABORATION [ ExecMethod = Execute; ] SID_TABOP [ ExecMethod = ExecuteEdit; StateMethod = GetState; ] SID_CONSOLIDATE [ ExecMethod = ExecuteEdit; StateMethod = GetState; ] FID_INSERT_NAME [ ExecMethod = ExecuteEdit; StateMethod = GetState; ] diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi index e57338fdd315..1b3f90105ae6 100644 --- a/sc/sdi/scalc.sdi +++ b/sc/sdi/scalc.sdi @@ -1932,24 +1932,6 @@ SfxVoidItem FocusCellAddress FID_FOCUS_POSWND ] -SfxVoidItem Collaborate SID_COLLABORATION -() -[ - AutoUpdate = FALSE, - FastCall = FALSE, - ReadOnlyDoc = TRUE, - Toggle = FALSE, - Container = FALSE, - RecordAbsolute = FALSE, - RecordPerSet; - - AccelConfig = TRUE, - MenuConfig = TRUE, - ToolBoxConfig = TRUE, - GroupId = GID_FORMAT; -] - - SfxVoidItem FormatCellDialog FID_CELL_FORMAT () [ diff --git a/sc/source/ui/collab/sccollaboration.cxx b/sc/source/ui/collab/sccollaboration.cxx deleted file mode 100644 index d19c04738019..000000000000 --- a/sc/source/ui/collab/sccollaboration.cxx +++ /dev/null @@ -1,90 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#include "sccollaboration.hxx" - -#include "docsh.hxx" -#include "sendfunc.hxx" -#include <com/sun/star/document/XDocumentRecovery.hpp> -#include <osl/file.hxx> -#include <unotools/mediadescriptor.hxx> -#include <unotools/tempfile.hxx> - -ScCollaboration::ScCollaboration( ScDocShell* pScDocShell ) : - mpScDocShell( pScDocShell ) -{ -} - -ScCollaboration::~ScCollaboration() -{ -} - -void ScCollaboration::EndCollaboration() const -{ - ScDocFuncSend* pSender = GetScDocFuncSend(); - if (pSender) - { - delete pSender; - mpScDocShell->SetDocFunc( new ScDocFuncDirect( *mpScDocShell ) ); - } -} - -void ScCollaboration::PacketReceived( const OString& rPacket ) const -{ - ScDocFuncSend* pSender = GetScDocFuncSend(); - if (pSender) - return pSender->RecvMessage( rPacket ); -} - -void ScCollaboration::SaveAndSendFile( TpContact* pContact ) const -{ - OUString aTmpPath = utl::TempFile::CreateTempName(); - aTmpPath += ".ods"; - - OUString aFileURL; - osl::FileBase::getFileURLFromSystemPath( aTmpPath, aFileURL ); - - utl::MediaDescriptor aDescriptor; - // some issue with hyperlinks: - aDescriptor[utl::MediaDescriptor::PROP_DOCUMENTBASEURL()] <<= OUString(); - try { - css::uno::Reference< css::document::XDocumentRecovery > xDocRecovery( - mpScDocShell->GetBaseModel(), css::uno::UNO_QUERY_THROW); - - xDocRecovery->storeToRecoveryFile( aFileURL, aDescriptor.getAsConstPropertyValueList() ); - } catch (const css::uno::Exception &ex) { - SAL_WARN( "sc.tubes", "Exception when saving file " << aFileURL ); - } - - SendFile( pContact, aFileURL ); - - // FIXME: unlink the file after send ... -} - -void ScCollaboration::StartCollaboration( TeleConference* pConference ) -{ - SetConference( pConference ); - ScDocFunc* pDocFunc = &mpScDocShell->GetDocFunc(); - ScDocFuncSend* pSender = dynamic_cast<ScDocFuncSend*> (pDocFunc); - if (!pSender) - { - // This means pDocFunc has to be ScDocFuncDirect* and we are not collaborating yet. - pSender = new ScDocFuncSend( *mpScDocShell, dynamic_cast<ScDocFuncDirect*> (pDocFunc), this ); - mpScDocShell->SetDocFunc( pSender ); - } -} - -// --- private --- - -ScDocFuncSend* ScCollaboration::GetScDocFuncSend() const -{ - return dynamic_cast<ScDocFuncSend*> (&mpScDocShell->GetDocFunc()); -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/collab/sendfunc.cxx b/sc/source/ui/collab/sendfunc.cxx deleted file mode 100644 index 8b28962ccee8..000000000000 --- a/sc/source/ui/collab/sendfunc.cxx +++ /dev/null @@ -1,470 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#include "sendfunc.hxx" - -#include "formulacell.hxx" -#include "docsh.hxx" -#include "docfunc.hxx" -#include "sccollaboration.hxx" -#include <editeng/editeng.hxx> -#include <editeng/editobj.hxx> -#include <tubes/manager.hxx> - -namespace { - -OUString formulaCellToString( ScFormulaCell *pCell ) -{ - (void)pCell; // FIXME: implement me - return OUString(); -} - -OUString editToString( const EditTextObject& /*rEditText*/ ) -{ - // FIXME: implement me. - return OUString(); -} - -EditTextObject stringToEdit( const OUString& /* rStr */ ) -{ - // FIXME: implement me. - // The code here only serves to make this file compilable. - EditEngine aEditEngine(nullptr); - return *aEditEngine.CreateTextObject(); -} - -ScFormulaCell* stringToFormulaCell( const OUString &rString ) -{ - (void)rString; // FIXME: implement me - return nullptr; -} - -struct ProtocolError { - const char *message; -}; - -class ScChangeOpReader { - std::vector< OUString > maArgs; - -public: - explicit ScChangeOpReader(const OUString &rString) - { - // will need to handle escaping etc. - // Surely someone else wrote this before ! [!?] - enum { - IN_TEXT, CHECK_QUOTE, FIND_LAST_QUOTE, SKIP_SEMI - } eState = CHECK_QUOTE; - - sal_Int32 nStart = 0; - for (sal_Int32 n = 0; n < rString.getLength(); n++) - { - if (rString[n] == '\\') - { - n++; // skip next char - continue; - } - switch (eState) { - case CHECK_QUOTE: - if (rString[n] == '"') - { - nStart = n + 1; - eState = FIND_LAST_QUOTE; - break; - } - SAL_FALLTHROUGH; - case IN_TEXT: - if (rString[n] == ';') - { - maArgs.push_back( rString.copy( nStart, n - nStart ) ); - nStart = n + 1; - eState = CHECK_QUOTE; - } - break; - case FIND_LAST_QUOTE: - if (rString[n] == '"') - { - maArgs.push_back( rString.copy( nStart, n - nStart ) ); - eState = SKIP_SEMI; - break; - } - break; - case SKIP_SEMI: - if (rString[n] == ';') - { - nStart = n + 1; - eState = CHECK_QUOTE; - } - break; - } - } - if ( nStart < rString.getLength()) - maArgs.push_back( rString.copy( nStart, rString.getLength() - nStart ) ); - } - ~ScChangeOpReader() {} - - OUString getMethod() - { - return maArgs[0]; - } - - size_t getArgCount() { return maArgs.size(); } - - OUString getString( sal_Int32 n ) - { - if (n > 0 && (size_t)n < getArgCount() ) - { - OUString aUStr( maArgs[ n ] ); - ScGlobal::EraseQuotes( aUStr, '\'' ); - return aUStr; - } else - return OUString(); - } - - ScAddress getAddress( sal_Int32 n ) - { - ScAddress aAddr; - OUString aToken( getString( n ) ); - aAddr.Parse( aToken ); - return aAddr; - } - - sal_Int32 getInt( sal_Int32 n ) - { - return getString( n ).toInt32(); - } - - bool getBool( sal_Int32 n ) - { - return getString( n ).equalsIgnoreAsciiCase( "true" ); - } - - ScFormulaCell* getFormulaCell( sal_Int32 n ) - { - return stringToFormulaCell( getString( n ) ); - } - - double getDouble( sal_Int32 n ) - { - return getString(n).toDouble(); - } - - EditTextObject getEdit( sal_Int32 n ) - { - return stringToEdit(getString(n)); - } - -}; - -} // anonymous namespace - -// Ye noddy mangling - needs improvement ... -// method name ';' then arguments ; separated -class ScChangeOpWriter -{ - OUStringBuffer aMessage; - void appendSeparator() - { - aMessage.append( ';' ); - } - -public: - explicit ScChangeOpWriter( const char *pName ) - { - aMessage.appendAscii( pName ); - appendSeparator(); - } - - void appendString( const OUString &rStr ) - { - if ( rStr.indexOf( '"' ) >= 0 || - rStr.indexOf( ';' ) >= 0 ) - { - OUString aQuoted( rStr ); - ScGlobal::AddQuotes( aQuoted, '"' ); - aMessage.append( aQuoted ); - } - else - aMessage.append( rStr ); - appendSeparator(); - } - - void appendAddress( const ScAddress &rPos ) - { - aMessage.append( rPos.Format( ScRefFlags::VALID ) ); - appendSeparator(); - } - - void appendInt( sal_Int32 i ) - { - aMessage.append( i ); - appendSeparator(); - } - - void appendBool( bool b ) - { - aMessage.appendAscii( b ? "true" : "false" ); - appendSeparator(); - } - - void appendFormulaCell( ScFormulaCell *pCell ) - { - appendString( formulaCellToString( pCell ) ); - } - - void appendEditText( const EditTextObject& rStr ) - { - appendString( editToString(rStr) ); - } - - void appendDouble( double fVal ) - { - aMessage.append(fVal); - appendSeparator(); - } - - OString toString() - { - return OUStringToOString( aMessage.toString(), RTL_TEXTENCODING_UTF8 ); - } -}; - -void ScDocFuncSend::RecvMessage( const OString &rString ) -{ - try { - ScChangeOpReader aReader( OUString( rString.getStr(), - rString.getLength(), - RTL_TEXTENCODING_UTF8 ) ); - // FIXME: have some hash to enumeration mapping here - if ( aReader.getMethod() == "setNormalString" ) - { - bool bNumFmtSet = false; - mpDirect->SetNormalString( bNumFmtSet, aReader.getAddress( 1 ), aReader.getString( 2 ), - aReader.getBool( 3 ) ); - } - else if (aReader.getMethod() == "setValueCell") - { - mpDirect->SetValueCell( - aReader.getAddress(1), aReader.getDouble(2), aReader.getBool(3)); - } - else if (aReader.getMethod() == "setStringCell") - { - mpDirect->SetStringCell( - aReader.getAddress(1), aReader.getString(2), aReader.getBool(3)); - } - else if (aReader.getMethod() == "setEditCell") - { - mpDirect->SetEditCell( - aReader.getAddress(1), aReader.getEdit(2), aReader.getBool(3)); - } - else if (aReader.getMethod() == "setFormulaCell") - { - mpDirect->SetFormulaCell( - aReader.getAddress(1), aReader.getFormulaCell(2), aReader.getBool(3)); - } - else if ( aReader.getMethod() == "enterListAction" ) - mpDirect->EnterListAction( aReader.getInt( 1 ) ); - else if ( aReader.getMethod() == "endListAction" ) - mpDirect->EndListAction(); - else if ( aReader.getMethod() == "showNote" ) - mpDirect->ShowNote( aReader.getAddress( 1 ), aReader.getBool( 2 ) ); - else if ( aReader.getMethod() == "setNoteText" ) - mpDirect->SetNoteText( aReader.getAddress( 1 ), aReader.getString( 2 ), - aReader.getBool( 3 ) ); - else if ( aReader.getMethod() == "renameTable" ) - mpDirect->RenameTable( aReader.getInt( 1 ), aReader.getString( 2 ), - aReader.getBool( 3 ), aReader.getBool( 4 ) ); - else - SAL_WARN( "sc.tubes", "Error: unknown message '" << rString.getStr() - << "' (" << aReader.getArgCount() << ")" ); - } catch (const ProtocolError &e) { - SAL_WARN( "sc.tubes", "Error: protocol twisting: " << e.message ); - } -} - -void ScDocFuncSend::SendMessage( ScChangeOpWriter &rOp ) -{ - mpCollaboration->SendPacket( rOp.toString() ); -} - -// FIXME: really ScDocFunc should be an abstract base, so -// we don't need the rDocSh hack/pointer -ScDocFuncSend::ScDocFuncSend( ScDocShell& rDocSh, ScDocFuncDirect *pDirect, ScCollaboration* pCollaboration ) - : ScDocFunc( rDocSh ), - mpDirect( pDirect ), - mpCollaboration( pCollaboration ) -{ -} - -ScDocFuncSend::~ScDocFuncSend() -{ - delete mpDirect; -} - -void ScDocFuncSend::EnterListAction( sal_uInt16 nNameResId ) -{ - // Want to group these operations for the other side ... - ScChangeOpWriter aOp( "enterListAction" ); - aOp.appendInt( nNameResId ); // nasty but translate-able ... - SendMessage( aOp ); -} - -void ScDocFuncSend::EndListAction() -{ - ScChangeOpWriter aOp( "endListAction" ); - SendMessage( aOp ); -} - -bool ScDocFuncSend::SetNormalString( bool& o_rbNumFmtSet, const ScAddress& rPos, const OUString& rText, bool bApi ) -{ - ScChangeOpWriter aOp( "setNormalString" ); - aOp.appendAddress( rPos ); - aOp.appendString( rText ); - aOp.appendBool( bApi ); - SendMessage( aOp ); - - o_rbNumFmtSet = false; - - if ( OUString( rText ) == "saveme" ) - mpCollaboration->SaveAndSendFile( nullptr ); - - if ( OUString( rText ) == "contacts" ) - mpCollaboration->DisplayContacts(); - - return true; // needs some code auditing action -} - -bool ScDocFuncSend::SetValueCell( const ScAddress& rPos, double fVal, bool bInteraction ) -{ - ScChangeOpWriter aOp("setValueCell"); - aOp.appendAddress( rPos ); - aOp.appendDouble( fVal ); - aOp.appendBool( bInteraction ); - SendMessage( aOp ); - return true; // needs some code auditing action -} - -bool ScDocFuncSend::SetValueCells( - const ScAddress& /*rPos*/, const std::vector<double>& /*aVals*/, bool /*bInteraction*/ ) -{ - // TODO : Implement this. - return true; -} - -bool ScDocFuncSend::SetStringCell( const ScAddress& rPos, const OUString& rStr, bool bInteraction ) -{ - ScChangeOpWriter aOp("setStringCell"); - aOp.appendAddress( rPos ); - aOp.appendString( rStr ); - aOp.appendBool( bInteraction ); - SendMessage( aOp ); - return true; // needs some code auditing action -} - -bool ScDocFuncSend::SetEditCell( const ScAddress& rPos, const EditTextObject& rStr, bool bInteraction ) -{ - ScChangeOpWriter aOp("setEditCell"); - aOp.appendAddress( rPos ); - aOp.appendEditText( rStr ); - aOp.appendBool( bInteraction ); - SendMessage( aOp ); - return true; // needs some code auditing action -} - -bool ScDocFuncSend::SetFormulaCell( const ScAddress& rPos, ScFormulaCell* pCell, bool bInteraction ) -{ - ScChangeOpWriter aOp("setFormulaCell"); - aOp.appendAddress( rPos ); - aOp.appendFormulaCell( pCell ); - aOp.appendBool( bInteraction ); - SendMessage( aOp ); - delete pCell; - return true; // needs some code auditing action -} - -void ScDocFuncSend::PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine, bool bApi ) -{ - SAL_INFO( "sc.tubes", "PutData not implemented!" ); - ScDocFunc::PutData( rPos, rEngine, bApi ); -} - -bool ScDocFuncSend::SetCellText( - const ScAddress& rPos, const OUString& rText, bool bInterpret, bool bEnglish, bool bApi, - const formula::FormulaGrammar::Grammar eGrammar ) -{ - SAL_INFO( "sc.tubes", "SetCellText not implemented!" ); - return ScDocFunc::SetCellText( rPos, rText, bInterpret, bEnglish, bApi, eGrammar ); -} - -bool ScDocFuncSend::ShowNote( const ScAddress& rPos, bool bShow ) -{ - ScChangeOpWriter aOp( "showNote" ); - aOp.appendAddress( rPos ); - aOp.appendBool( bShow ); - SendMessage( aOp ); - return true; // needs some code auditing action -} - -bool ScDocFuncSend::SetNoteText( const ScAddress& rPos, const OUString& rNoteText, bool bApi ) -{ - ScChangeOpWriter aOp( "setNoteText" ); - aOp.appendAddress( rPos ); - aOp.appendString( rNoteText ); - aOp.appendBool( bApi ); - SendMessage( aOp ); - return true; // needs some code auditing action -} - -bool ScDocFuncSend::RenameTable( SCTAB nTab, const OUString& rName, - bool bRecord, bool bApi ) -{ - ScChangeOpWriter aOp( "renameTable" ); - aOp.appendInt( nTab ); - aOp.appendString( rName ); - aOp.appendBool( bRecord ); - aOp.appendBool( bApi ); - SendMessage( aOp ); - return true; // needs some code auditing action -} - -bool ScDocFuncSend::ApplyAttributes( const ScMarkData& rMark, const ScPatternAttr& rPattern, - bool bApi ) -{ - SAL_INFO( "sc.tubes", "ApplyAttributes not implemented!" ); - return ScDocFunc::ApplyAttributes( rMark, rPattern, bApi ); -} - -bool ScDocFuncSend::ApplyStyle( const ScMarkData& rMark, const OUString& rStyleName, - bool bApi ) -{ - SAL_INFO( "sc.tubes", "ApplyStyle not implemented!" ); - return ScDocFunc::ApplyStyle( rMark, rStyleName, bApi ); -} - -bool ScDocFuncSend::MergeCells( const ScCellMergeOption& rOption, bool bContents, - bool bRecord, bool bApi ) -{ - SAL_INFO( "sc.tubes", "MergeCells not implemented!" ); - return ScDocFunc::MergeCells( rOption, bContents, bRecord, bApi ); -} - -ScDocFunc *ScDocShell::CreateDocFunc() -{ - if (TeleManager::hasWaitingConference()) - { - TeleConference* pConference = TeleManager::getConference(); - if (pConference) - { - mpCollaboration->SetConference( pConference ); - return new ScDocFuncSend( *this, new ScDocFuncDirect( *this ), mpCollaboration ); - } - } - return new ScDocFuncDirect( *this ); -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/collab/sendfunc.hxx b/sc/source/ui/collab/sendfunc.hxx deleted file mode 100644 index b0bfc80d2bf3..000000000000 --- a/sc/source/ui/collab/sendfunc.hxx +++ /dev/null @@ -1,59 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#ifndef INCLUDED_SC_SOURCE_UI_COLLAB_SENDFUNC_HXX -#define INCLUDED_SC_SOURCE_UI_COLLAB_SENDFUNC_HXX - -#include <sal/config.h> - -#include "docfunc.hxx" -class ScCollaboration; -class ScChangeOpWriter; - -class ScDocFuncSend : public ScDocFunc -{ - ScDocFuncDirect* mpDirect; - ScCollaboration* mpCollaboration; - - friend class ScCollaboration; - void RecvMessage( const OString &rString ); - void SendMessage( ScChangeOpWriter &rOp ); -public: - // FIXME: really ScDocFunc should be an abstract base, so - // we don't need the rDocSh hack/pointer - ScDocFuncSend( ScDocShell& rDocSh, ScDocFuncDirect* pDirect, ScCollaboration* pCollaboration ); - virtual ~ScDocFuncSend() override; - - virtual void EnterListAction( sal_uInt16 nNameResId ); - virtual void EndListAction(); - - virtual bool SetNormalString( bool& o_rbNumFmtSet, const ScAddress& rPos, const OUString& rText, bool bApi ); - virtual bool SetValueCell( const ScAddress& rPos, double fVal, bool bInteraction ); - virtual bool SetValueCells( const ScAddress& rPos, const std::vector<double>& aVals, bool bInteraction ); - virtual bool SetStringCell( const ScAddress& rPos, const OUString& rStr, bool bInteraction ); - virtual bool SetEditCell( const ScAddress& rPos, const EditTextObject& rStr, bool bInteraction ); - virtual bool SetFormulaCell( const ScAddress& rPos, ScFormulaCell* pCell, bool bInteraction ); - virtual void PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine, bool bApi ); - virtual bool SetCellText( - const ScAddress& rPos, const OUString& rText, bool bInterpret, bool bEnglish, - bool bApi, const formula::FormulaGrammar::Grammar eGrammar ); - virtual bool ShowNote( const ScAddress& rPos, bool bShow = true ); - virtual bool SetNoteText( const ScAddress& rPos, const OUString& rNoteText, bool bApi ); - virtual bool RenameTable( SCTAB nTab, const OUString& rName, bool bRecord, bool bApi ); - virtual bool ApplyAttributes( const ScMarkData& rMark, const ScPatternAttr& rPattern, - bool bApi ); - virtual bool ApplyStyle( const ScMarkData& rMark, const OUString& rStyleName, - bool bApi ); - virtual bool MergeCells( const ScCellMergeOption& rOption, bool bContents, - bool bRecord, bool bApi ); -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 226032910265..16d128a2882b 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -17,8 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <config_features.h> - #include "docsh.hxx" #include "scitems.hxx" @@ -131,12 +129,6 @@ #include <documentlinkmgr.hxx> #include <refupdatecontext.hxx> -#include <config_telepathy.h> - -#if ENABLE_TELEPATHY -#include "sccollaboration.hxx" -#endif - #include <memory> #include <vector> @@ -2643,17 +2635,10 @@ bool ScDocShell::HasAutomaticTableName( const OUString& rFilter ) || rFilter == pFilterRtf; } -#if ! ENABLE_TELEPATHY ScDocFunc *ScDocShell::CreateDocFunc() { return new ScDocFuncDirect( *this ); } -#else -ScCollaboration* ScDocShell::GetCollaboration() -{ - return mpCollaboration; -} -#endif ScDocShell::ScDocShell( const ScDocShell& rShell ) : SvRefBase(), @@ -2680,9 +2665,6 @@ ScDocShell::ScDocShell( const ScDocShell& rShell ) : pSheetSaveData ( nullptr ), mpFormatSaveData( nullptr ), pModificator ( nullptr ) -#if ENABLE_TELEPATHY - , mpCollaboration( new ScCollaboration( this ) ) -#endif { SetPool( &SC_MOD()->GetPool() ); @@ -2725,9 +2707,6 @@ ScDocShell::ScDocShell( const SfxModelFlags i_nSfxCreationFlags ) : pSheetSaveData ( nullptr ), mpFormatSaveData( nullptr ), pModificator ( nullptr ) -#if ENABLE_TELEPATHY - , mpCollaboration( new ScCollaboration( this ) ) -#endif { SetPool( &SC_MOD()->GetPool() ); @@ -2782,9 +2761,6 @@ ScDocShell::~ScDocShell() OSL_FAIL("The Modificator should not exist"); delete pModificator; } -#if ENABLE_TELEPATHY - delete mpCollaboration; -#endif } ::svl::IUndoManager* ScDocShell::GetUndoManager() diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx index d61ebac6e45a..161979d89a68 100644 --- a/sc/source/ui/inc/docsh.hxx +++ b/sc/source/ui/inc/docsh.hxx @@ -35,7 +35,6 @@ #include "optutil.hxx" #include "docuno.hxx" -#include <config_telepathy.h> #include <memory> #include <unordered_map> @@ -64,9 +63,6 @@ class ScSheetSaveData; class ScFlatBoolRowSegments; class HelperModelObj; struct ScColWidthParam; -#if ENABLE_TELEPATHY -class ScCollaboration; -#endif namespace sfx2 { class FileDialogHelper; } struct DocShell_Impl; @@ -112,9 +108,6 @@ class SC_DLLPUBLIC ScDocShell final: public SfxObjectShell, public SfxListener ScFormatSaveData* mpFormatSaveData; ScDocShellModificator* pModificator; // #109979#; is used to load XML (created in BeforeXMLLoading and destroyed in AfterXMLLoading) -#if ENABLE_TELEPATHY - ScCollaboration* mpCollaboration; -#endif SAL_DLLPRIVATE void InitItems(); SAL_DLLPRIVATE void DoEnterHandler(); @@ -174,10 +167,6 @@ public: explicit ScDocShell( const SfxModelFlags i_nSfxCreationFlags = SfxModelFlags::EMBEDDED_OBJECT ); virtual ~ScDocShell() override; -#if ENABLE_TELEPATHY - SAL_DLLPRIVATE ScCollaboration* GetCollaboration(); -#endif - virtual ::svl::IUndoManager* GetUndoManager() override; @@ -226,9 +215,6 @@ public: ScDocument& GetDocument() { return aDocument; } ScDocFunc& GetDocFunc() { return *pDocFunc; } -#if ENABLE_TELEPATHY - void SetDocFunc( ScDocFunc *pDF ) { pDocFunc = pDF; } -#endif SfxPrinter* GetPrinter( bool bCreateIfNotExist = true ); sal_uInt16 SetPrinter( VclPtr<SfxPrinter> const & pNewPrinter, SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL ); diff --git a/sc/source/ui/inc/sccollaboration.hxx b/sc/source/ui/inc/sccollaboration.hxx deleted file mode 100644 index b3639233eab0..000000000000 --- a/sc/source/ui/inc/sccollaboration.hxx +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#ifndef INCLUDED_SC_SOURCE_UI_INC_SCCOLLABORATION_HXX -#define INCLUDED_SC_SOURCE_UI_INC_SCCOLLABORATION_HXX - -#include <sal/config.h> - -#include <tubes/collaboration.hxx> -class ScDocFuncSend; -class ScDocShell; - -class ScCollaboration : public Collaboration -{ - ScDocShell* mpScDocShell; -public: - ScCollaboration( ScDocShell* pScDocShell ); - virtual ~ScCollaboration() override; - - virtual void EndCollaboration() const override; - virtual void PacketReceived( const OString& rPacket ) const override; - virtual void SaveAndSendFile( TpContact* pContact ) const override; - virtual void StartCollaboration( TeleConference* pConference ) override; -private: - friend class ScDocShell; - ScDocFuncSend* GetScDocFuncSend() const; -}; - -#endif // INCLUDED_SC_SOURCE_UI_INC_SCCOLLABORATION_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx index 374f5f5a5a5a..fdcfe1cad437 100644 --- a/sc/source/ui/view/cellsh3.cxx +++ b/sc/source/ui/view/cellsh3.cxx @@ -45,12 +45,6 @@ #include "scabstdlg.hxx" #include "columnspanset.hxx" -#include <config_telepathy.h> - -#if ENABLE_TELEPATHY -#include "sccollaboration.hxx" -#endif - #include <memory> #define IS_EDITMODE() GetViewData()->HasEditView( GetViewData()->GetActivePart() ) @@ -103,12 +97,6 @@ void ScCellShell::Execute( SfxRequest& rReq ) switch ( nSlot ) { - case SID_COLLABORATION: -#if ENABLE_TELEPATHY - GetViewData()->GetDocShell()->GetCollaboration()->DisplayContacts(); -#endif - break; - case SID_STATUS_SELMODE: if ( pReqArgs ) { diff --git a/sc/uiconfig/scalc/menubar/menubar.xml b/sc/uiconfig/scalc/menubar/menubar.xml index e2405cc8a3c4..647c87db3c8f 100644 --- a/sc/uiconfig/scalc/menubar/menubar.xml +++ b/sc/uiconfig/scalc/menubar/menubar.xml @@ -37,7 +37,6 @@ <menu:menuseparator/> <menu:menuitem menu:id=".uno:Reload"/> <menu:menuitem menu:id=".uno:VersionDialog"/> - <!-- .uno:Collaborate menuitem, see CustomTarget_uiconfig.mk --> <menu:menuseparator/> <menu:menuitem menu:id=".uno:Save"/> <menu:menuitem menu:id=".uno:SaveAsRemote"/> |