diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-12-22 13:19:27 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-12-23 08:05:21 +0100 |
commit | f90139cceeee60116c28140f1bfb1d88076d1591 (patch) | |
tree | 19ac79f953de976d25ce3b9badf74ffeaa29c57c /sc/source/ui/docshell/docsh4.cxx | |
parent | 2a1fb4401da16f6a18c0bd05fe4b460a3048f9b5 (diff) |
Revert "unused SID commands in sc"
This reverts commit 9c4350441191ccfd6af3d73e13b4eb59af7ed6d1.
Eike Rathke:
Odd, I don't even remember what these slots were used for..
Ugh.. now I think I know.. (very) old recorded Basic macros used slot:number with the dispatcher instead of the .uno:... commands, so removing/renumbering slots may actually break those.
I'm not sure if we already deprecated the slot number thing in an earlier release or maybe it was already done back in OOo times, I simply don't remember. Must be at least 1.5 decades since slot numbers were replaced with .uno commands, but old recorded macros are still supported.
However, our qaDevOOo tests and some other tests (in Java) still use slot:#### notation, git grep 'slot:[0-9]'
I think best is to revert this change and abandon the other SID removals.
Change-Id: I091cf71dd38772dac7491afd6f28951b54510eaf
Reviewed-on: https://gerrit.libreoffice.org/46963
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/docshell/docsh4.cxx')
-rw-r--r-- | sc/source/ui/docshell/docsh4.cxx | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 0c65b5ed52ca..4647f2675f3a 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -121,6 +121,51 @@ void ScDocShell::Execute( SfxRequest& rReq ) sal_uInt16 nSlot = rReq.GetSlot(); switch ( nSlot ) { + case SID_SC_SETTEXT: + { + const SfxPoolItem* pColItem; + const SfxPoolItem* pRowItem; + const SfxPoolItem* pTabItem; + const SfxPoolItem* pTextItem; + if( pReqArgs && pReqArgs->HasItem( FN_PARAM_1, &pColItem ) && + pReqArgs->HasItem( FN_PARAM_2, &pRowItem ) && + pReqArgs->HasItem( FN_PARAM_3, &pTabItem ) && + pReqArgs->HasItem( SID_SC_SETTEXT, &pTextItem ) ) + { + // parameters are 1-based !!! + SCCOL nCol = static_cast<const SfxInt16Item*>(pColItem)->GetValue() - 1; + SCROW nRow = static_cast<const SfxInt32Item*>(pRowItem)->GetValue() - 1; + SCTAB nTab = static_cast<const SfxInt16Item*>(pTabItem)->GetValue() - 1; + + SCTAB nTabCount = aDocument.GetTableCount(); + if ( ValidCol(nCol) && ValidRow(nRow) && ValidTab(nTab,nTabCount) ) + { + if ( aDocument.IsBlockEditable( nTab, nCol,nRow, nCol, nRow ) ) + { + OUString aVal = static_cast<const SfxStringItem*>(pTextItem)->GetValue(); + aDocument.SetString( nCol, nRow, nTab, aVal ); + + PostPaintCell( nCol, nRow, nTab ); + SetDocumentModified(); + + rReq.Done(); + break; + } + else // protected cell + { +#if HAVE_FEATURE_SCRIPTING + SbxBase::SetError( ERRCODE_BASIC_BAD_PARAMETER ); //! which error ? +#endif + break; + } + } + } +#if HAVE_FEATURE_SCRIPTING + SbxBase::SetError( ERRCODE_BASIC_NO_OBJECT ); +#endif + } + break; + case SID_SBA_IMPORT: { if (pReqArgs) @@ -511,6 +556,10 @@ void ScDocShell::Execute( SfxRequest& rReq ) } break; + case SID_AUTO_STYLE: + OSL_FAIL("use ScAutoStyleHint instead of SID_AUTO_STYLE"); + break; + case SID_GET_COLORLIST: { const SvxColorListItem* pColItem = static_cast<const SvxColorListItem*>(GetItem(SID_COLOR_TABLE)); |