summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/inc/sc.hrc23
-rw-r--r--sc/sdi/cellsh.sdi9
-rw-r--r--sc/sdi/docsh.sdi4
-rw-r--r--sc/sdi/scalc.sdi349
-rw-r--r--sc/sdi/tabvwsh.sdi8
-rw-r--r--sc/source/ui/docshell/docsh4.cxx49
-rw-r--r--sc/source/ui/view/cellsh.cxx52
-rw-r--r--sc/source/ui/view/cellsh1.cxx12
-rw-r--r--sc/source/ui/view/cellsh3.cxx18
-rw-r--r--sc/source/ui/view/tabvwsh3.cxx7
-rw-r--r--sc/source/ui/view/tabvwshh.cxx161
11 files changed, 690 insertions, 2 deletions
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 91f29cbaadd4..ee3caa1d7e7c 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -194,6 +194,8 @@
#define SID_CHART_NAME (SC_MESSAGE_START + 26)
#define SID_CHART_ADDSOURCE (SC_MESSAGE_START + 27)
+#define SID_AUTO_STYLE (SC_MESSAGE_START + 28)
+
#define FID_INPUTLINE_BLOCK (SC_MESSAGE_START + 29)
#define SID_STATUS_SUM (SC_MESSAGE_START + 30)
@@ -436,6 +438,7 @@
#define DETECTIVE_END (DETECTIVE_START+20)
#define SID_API_SLOTS (DETECTIVE_END)
+#define SID_INSERT_MATRIX (SID_API_SLOTS+1)
#define SID_DELETE_NOTE (SID_API_SLOTS+2)
@@ -491,6 +494,8 @@
#define SID_SETINPUTMODE (SID_KEYFUNC_START + 31)
#define SID_DELETE_CONTENTS (SID_KEYFUNC_START + 32)
+#define SID_MARKAREA (SID_KEYFUNC_START + 33)
+
#define FID_FILL_AUTO (SID_KEYFUNC_START + 35)
#define SID_CANCEL (SID_KEYFUNC_START + 36)
@@ -513,12 +518,20 @@
#define SID_RANGE_ROW (SID_NEW_SLOTS+20)
#define SID_RANGE_COL (SID_NEW_SLOTS+21)
+#define SID_RANGE_TABLE (SID_NEW_SLOTS+22)
+#define SID_RANGE_VALUE (SID_NEW_SLOTS+23)
+#define SID_RANGE_FORMULA (SID_NEW_SLOTS+24)
+#define SID_RANGE_TEXTVALUE (SID_NEW_SLOTS+26)
+#define SID_TABLE_ACTIVATE (SID_NEW_SLOTS+27)
#define SID_DEFINE_PRINTAREA (SID_NEW_SLOTS+31)
#define SID_DELETE_PRINTAREA (SID_NEW_SLOTS+32)
#define SID_CHANGE_PRINTAREA (SID_NEW_SLOTS+33)
#define SID_OPENDLG_EDIT_PRINTAREA (SID_NEW_SLOTS+34)
+#define SID_OLE_ACTIVATE (SID_NEW_SLOTS+36)
+#define SID_OLE_DEACTIVATE (SID_NEW_SLOTS+37)
+
#define SID_TOGGLE_REL (SID_NEW_SLOTS+38)
#define SID_DATA_SELECT (SID_NEW_SLOTS+39)
@@ -530,8 +543,13 @@
#define FID_REPLACE_ALL (SID_NEW_SLOTS+44)
#define FID_SEARCH_COUNT (SID_NEW_SLOTS+45)
+#define SID_SC_SETTEXT (SID_NEW_SLOTS+46)
+#define SID_RANGE_ADDRESS (SID_NEW_SLOTS+47)
#define SID_NUMBER_FORMAT (SID_NEW_SLOTS+49)
+#define SID_OLE_SELECT (SID_NEW_SLOTS+50)
+
+#define SID_RANGE_NOTETEXT (SID_NEW_SLOTS+52)
#define FID_INSERT_FILE (SID_NEW_SLOTS+53)
#define FID_VALIDATION (SID_NEW_SLOTS+54)
@@ -574,6 +592,11 @@
#define FID_RESET_PRINTZOOM (SID_NEW_SLOTS+82)
#define SID_TABLES_COUNT (SID_NEW_SLOTS+83)
+#define SID_ACTIVE_OBJ_NAME (SID_NEW_SLOTS+84)
+#define SID_OBJECT_LEFT (SID_NEW_SLOTS+85)
+#define SID_OBJECT_TOP (SID_NEW_SLOTS+86)
+#define SID_OBJECT_WIDTH (SID_NEW_SLOTS+87)
+#define SID_OBJECT_HEIGHT (SID_NEW_SLOTS+88)
#define SID_DELETE_SCENARIO (SID_NEW_SLOTS+95)
#define SID_EDIT_SCENARIO (SID_NEW_SLOTS+96)
diff --git a/sc/sdi/cellsh.sdi b/sc/sdi/cellsh.sdi
index ece262c3e276..decb76cfc659 100644
--- a/sc/sdi/cellsh.sdi
+++ b/sc/sdi/cellsh.sdi
@@ -65,14 +65,23 @@ interface CellSelection
// } database operations
+ SID_RANGE_ADDRESS [ StateMethod = GetState; ]
+
SID_HYPERLINK_SETLINK [ ExecMethod = ExecuteEdit; ]
SID_HYPERLINK_GETLINK [ StateMethod = GetHLinkState; ]
SID_UPDATECHART [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
SID_RANGE_ROW [ StateMethod = GetState; ]
SID_RANGE_COL [ StateMethod = GetState; ]
+ SID_RANGE_TABLE [ StateMethod = GetState; ]
+ SID_RANGE_VALUE [ StateMethod = GetState; ]
+ SID_RANGE_FORMULA [ StateMethod = GetState; ]
+ SID_RANGE_TEXTVALUE [ StateMethod = GetState; ]
+ SID_RANGE_NOTETEXT [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
SID_ENTER_STRING [ ExecMethod = Execute; StateMethod = GetState; ]
+ SID_INSERT_MATRIX [ ExecMethod = Execute; StateMethod = GetState; ]
+ SID_MARKAREA [ ExecMethod = Execute; ]
SID_SELECT_SCENARIO [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
FID_CELL_FORMAT [ ExecMethod = Execute; StateMethod = GetBlockState; ]
SID_ENABLE_HYPHENATION [ ExecMethod = Execute; StateMethod = GetBlockState; ]
diff --git a/sc/sdi/docsh.sdi b/sc/sdi/docsh.sdi
index 612d09e54006..fdb22acf3e0c 100644
--- a/sc/sdi/docsh.sdi
+++ b/sc/sdi/docsh.sdi
@@ -40,6 +40,8 @@ interface TableSelection
FID_TAB_RTL [ ExecMethod = ExecuteTable; StateMethod = GetStateTable; ]
FID_TAB_SET_TAB_BG_COLOR [ ExecMethod = ExecuteTable; StateMethod = GetStateTable; ]
FID_TAB_TOGGLE_GRID [ ExecMethod = ExecuteTable; StateMethod = GetStateTable; ]
+
+ SID_TABLE_ACTIVATE [ ExecMethod = Execute; ]
}
@@ -48,6 +50,7 @@ interface TableDocument
{
SID_OPEN_CALC [ ExecMethod = Execute; StateMethod = GetState; ]
SID_SBA_IMPORT [ ExecMethod = Execute; StateMethod = GetState; ]
+ SID_SC_SETTEXT [ ExecMethod = Execute; StateMethod = GetState; ]
SID_TABLES_COUNT [ StateMethod = GetState; ]
SID_ATTR_YEAR2000 [ StateMethod = GetState; ExecMethod = Execute; ]
SID_CHART_SOURCE [ ExecMethod = Execute; ]
@@ -57,6 +60,7 @@ interface TableDocument
FID_HARD_RECALC [ ExecMethod = Execute; StateMethod = GetState; ]
SID_UPDATETABLINKS [ ExecMethod = Execute; ]
SID_REIMPORT_AFTER_LOAD [ ExecMethod = Execute; ]
+ SID_AUTO_STYLE [ ExecMethod = Execute; ]
SID_GET_COLORLIST [ ExecMethod = Execute; ]
diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index fb047eef718e..e06f17bd4695 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -34,6 +34,42 @@ SfxVoidItem AcceptChanges FID_CHG_ACCEPT
]
+SfxVoidItem ActivateOLE SID_OLE_ACTIVATE
+()
+[
+ AutoUpdate = FALSE,
+ FastCall = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = SfxGroupId::Special;
+]
+
+
+SfxVoidItem ActivateTable SID_TABLE_ACTIVATE
+()
+[
+ AutoUpdate = FALSE,
+ FastCall = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = SfxGroupId::View;
+]
+
+
SfxVoidItem Add FID_TAB_APPEND
(SfxStringItem Name FID_TAB_APPEND)
[
@@ -86,6 +122,22 @@ SfxVoidItem AddPrintArea SID_ADD_PRINTAREA
]
+SfxStringItem Address SID_RANGE_ADDRESS
+[
+ AutoUpdate = FALSE,
+ FastCall = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+
SfxVoidItem AdjustPrintZoom FID_ADJUST_PRINTZOOM
()
[
@@ -359,6 +411,24 @@ SfxBoolItem AutoRefreshArrows SID_DETECTIVE_AUTO
]
+SfxVoidItem AutoStyle SID_AUTO_STYLE
+()
+[
+ AutoUpdate = FALSE,
+ FastCall = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = SfxGroupId::Intern;
+]
+
+
SfxVoidItem Calculate FID_RECALC
()
[
@@ -1042,6 +1112,24 @@ SfxVoidItem DataSubTotals SID_SUBTOTALS
]
+SfxVoidItem Deactivate SID_OLE_DEACTIVATE
+()
+[
+ AutoUpdate = FALSE,
+ FastCall = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = SfxGroupId::Special;
+]
+
+
SfxVoidItem DefineDBName SID_DEFINE_DBNAME
()
[
@@ -1734,6 +1822,25 @@ SfxVoidItem FormatCellDialog FID_CELL_FORMAT
]
+SfxStringItem Formula SID_RANGE_FORMULA
+
+[
+ AutoUpdate = FALSE,
+ FastCall = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+
+
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = SfxGroupId::Intern;
+]
+
+
SfxVoidItem FreezePanes SID_WINDOW_FIX
()
[
@@ -2854,6 +2961,24 @@ SfxVoidItem InsertFunction SID_INS_FUNCTION
]
+SfxVoidItem InsertMatrix SID_INSERT_MATRIX
+(SfxStringItem Formula SID_INSERT_MATRIX)
+[
+ AutoUpdate = FALSE,
+ FastCall = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = SfxGroupId::Intern;
+]
+
+
SfxVoidItem AddName FID_ADD_NAME
()
[
@@ -3270,6 +3395,25 @@ SfxVoidItem NextPage SID_PREVIEW_NEXT
]
+SfxStringItem NoteText SID_RANGE_NOTETEXT
+
+[
+ AutoUpdate = FALSE,
+ FastCall = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+
+
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = SfxGroupId::Intern;
+]
+
+
SfxBoolItem NoteVisible FID_NOTE_VISIBLE
[
@@ -3597,6 +3741,44 @@ SfxVoidItem NumberFormatThousands SID_NUMBER_THOUSANDS
]
+SfxInt32Item ObjectHeight SID_OBJECT_HEIGHT
+
+[
+ AutoUpdate = FALSE,
+ FastCall = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+
+
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = SfxGroupId::Intern;
+]
+
+
+SfxInt32Item ObjectLeft SID_OBJECT_LEFT
+
+[
+ AutoUpdate = FALSE,
+ FastCall = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+
+
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = SfxGroupId::Intern;
+]
+
+
SfxVoidItem ObjectMirrorHorizontal SID_MIRROR_HORIZONTAL
()
[
@@ -3633,6 +3815,44 @@ SfxVoidItem ObjectMirrorVertical SID_MIRROR_VERTICAL
]
+SfxInt32Item ObjectTop SID_OBJECT_TOP
+
+[
+ AutoUpdate = FALSE,
+ FastCall = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+
+
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = SfxGroupId::Intern;
+]
+
+
+SfxInt32Item ObjectWidth SID_OBJECT_WIDTH
+
+[
+ AutoUpdate = FALSE,
+ FastCall = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+
+
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = SfxGroupId::Intern;
+]
+
+
SfxVoidItem OriginalSize SID_ORIGINALSIZE
()
[
@@ -3761,6 +3981,24 @@ SfxVoidItem ProtectTraceChangeMode SID_CHG_PROTECT
]
+SfxVoidItem PutCell SID_SC_SETTEXT
+(SfxInt16Item Column FN_PARAM_1,SfxInt32Item Row FN_PARAM_2,SfxInt16Item Table FN_PARAM_3,SfxStringItem Text SID_SC_SETTEXT)
+[
+ AutoUpdate = FALSE,
+ FastCall = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = SfxGroupId::Intern;
+]
+
+
SfxVoidItem RecalcPivotTable SID_PIVOT_RECALC
()
[
@@ -4093,6 +4331,23 @@ SfxVoidItem SearchAll FID_SEARCH_ALL
]
+SfxVoidItem SelectArea SID_MARKAREA
+()
+[
+ AutoUpdate = FALSE,
+ FastCall = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = SfxGroupId::Intern;
+]
+
SfxVoidItem SelectUnprotectedCells SID_SELECT_UNPROTECTED_CELLS
()
[
@@ -4110,6 +4365,24 @@ SfxVoidItem SelectUnprotectedCells SID_SELECT_UNPROTECTED_CELLS
GroupId = SfxGroupId::Edit;
]
+SfxVoidItem SelectOLE SID_OLE_SELECT
+()
+[
+ AutoUpdate = FALSE,
+ FastCall = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = SfxGroupId::Special;
+]
+
+
SfxVoidItem SelectColumn SID_SELECT_COL
(SfxInt32Item Col FN_PARAM_1,SfxInt16Item Modifier FN_PARAM_2)
[
@@ -4263,6 +4536,25 @@ SfxVoidItem ManageXMLSource SID_MANAGE_XML_SOURCE
GroupId = SfxGroupId::Data;
]
+SfxStringItem SelectedObjectName SID_ACTIVE_OBJ_NAME
+
+[
+ AutoUpdate = FALSE,
+ FastCall = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+
+
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = SfxGroupId::Intern;
+]
+
+
SfxVoidItem SelectRow SID_SELECT_ROW
(SfxInt32Item Row FN_PARAM_1,SfxInt16Item Modifier FN_PARAM_2)
[
@@ -4903,6 +5195,25 @@ SfxUInt16Item StatusSelectionModeNorm SID_STATUS_SELMODE_NORM
]
+SfxInt16Item Table SID_RANGE_TABLE
+
+[
+ AutoUpdate = FALSE,
+ FastCall = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+
+
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = SfxGroupId::Intern;
+]
+
+
SfxInt16Item TableCount SID_TABLES_COUNT
[
@@ -5085,6 +5396,25 @@ SfxVoidItem TextToColumns SID_TEXT_TO_COLUMNS
]
+SfxStringItem TextValue SID_RANGE_TEXTVALUE
+
+[
+ AutoUpdate = FALSE,
+ FastCall = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+
+
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = SfxGroupId::Intern;
+]
+
+
SfxVoidItem ToggleAnchorType SID_ANCHOR_TOGGLE
()
[
@@ -5288,6 +5618,25 @@ SfxVoidItem Validation FID_VALIDATION
]
+ScDoubleItem Value SID_RANGE_VALUE
+
+[
+ AutoUpdate = FALSE,
+ FastCall = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+
+
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = SfxGroupId::Intern;
+]
+
+
SvxVerJustifyItem VerticalAlignment SID_V_ALIGNCELL
[
diff --git a/sc/sdi/tabvwsh.sdi b/sc/sdi/tabvwsh.sdi
index 6252fa07c51a..8df105eb28ec 100644
--- a/sc/sdi/tabvwsh.sdi
+++ b/sc/sdi/tabvwsh.sdi
@@ -20,6 +20,14 @@
interface TableOLEObject
{
+ SID_ACTIVE_OBJ_NAME [ StateMethod = GetObjectState; ]
+ SID_OLE_ACTIVATE [ ExecMethod = ExecuteObject; ]
+ SID_OLE_DEACTIVATE [ ExecMethod = ExecuteObject; ]
+ SID_OLE_SELECT [ ExecMethod = ExecuteObject; ] // api:
+ SID_OBJECT_LEFT [ ExecMethod = ExecuteObject; StateMethod = GetObjectState; ]
+ SID_OBJECT_TOP [ ExecMethod = ExecuteObject; StateMethod = GetObjectState; ]
+ SID_OBJECT_WIDTH [ ExecMethod = ExecuteObject; StateMethod = GetObjectState; ]
+ SID_OBJECT_HEIGHT [ ExecMethod = ExecuteObject; StateMethod = GetObjectState; ]
}
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));
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index c35cb1759726..92b389504b99 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -676,6 +676,27 @@ void ScCellShell::GetState(SfxItemSet &rSet)
rSet.DisableItem( nWhich );
break;
+ case SID_RANGE_ADDRESS:
+ {
+ ScRange aRange;
+ if ( pData->GetSimpleArea( aRange ) == SC_MARK_SIMPLE )
+ {
+ OUString aStr(aRange.Format(ScRefFlags::VALID | ScRefFlags::TAB_3D,pDoc));
+ rSet.Put( SfxStringItem( nWhich, aStr ) );
+ }
+ }
+ break;
+
+ case SID_RANGE_NOTETEXT:
+ {
+ // always take cursor position, do not use top-left cell of selection
+ OUString aNoteText;
+ if ( const ScPostIt* pNote = pDoc->GetNote(nPosX, nPosY, nTab) )
+ aNoteText = pNote->GetText();
+ rSet.Put( SfxStringItem( nWhich, aNoteText ) );
+ }
+ break;
+
case SID_RANGE_ROW:
rSet.Put( SfxInt32Item( nWhich, nPosY+1 ) );
break;
@@ -684,6 +705,37 @@ void ScCellShell::GetState(SfxItemSet &rSet)
rSet.Put( SfxInt16Item( nWhich, nPosX+1 ) );
break;
+ case SID_RANGE_TABLE:
+ rSet.Put( SfxInt16Item( nWhich, nTab+1 ) );
+ break;
+
+ case SID_RANGE_VALUE:
+ {
+ double nValue;
+ pDoc->GetValue( nPosX, nPosY, nTab, nValue );
+ rSet.Put( ScDoubleItem( nWhich, nValue ) );
+ }
+ break;
+
+ case SID_RANGE_FORMULA:
+ {
+ OUString aString;
+ pDoc->GetFormula( nPosX, nPosY, nTab, aString );
+ if( aString.isEmpty() )
+ {
+ pDoc->GetInputString( nPosX, nPosY, nTab, aString );
+ }
+ rSet.Put( SfxStringItem( nWhich, aString ) );
+ }
+ break;
+
+ case SID_RANGE_TEXTVALUE:
+ {
+ OUString aString = pDoc->GetString(nPosX, nPosY, nTab);
+ rSet.Put( SfxStringItem( nWhich, aString ) );
+ }
+ break;
+
case SID_STATUS_SELMODE:
{
/* 0: STD Click cancels Sel
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 89bda8c80c2e..0ee77d29ba6c 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -2179,6 +2179,18 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
}
break;
+ case SID_RANGE_NOTETEXT:
+ if (pReqArgs)
+ {
+ const SfxStringItem& rTextItem = static_cast<const SfxStringItem&>(pReqArgs->Get( SID_RANGE_NOTETEXT ));
+
+ // always cursor position
+ ScAddress aPos( GetViewData()->GetCurX(), GetViewData()->GetCurY(), GetViewData()->GetTabNo() );
+ pTabViewShell->SetNoteText( aPos, rTextItem.GetValue() );
+ rReq.Done();
+ }
+ break;
+
case SID_INSERT_POSTIT:
case SID_EDIT_POSTIT:
{
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index e40fb5f17fd3..f0a77deca879 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -210,6 +210,19 @@ void ScCellShell::Execute( SfxRequest& rReq )
}
break;
+ case SID_INSERT_MATRIX:
+ {
+ if ( pReqArgs )
+ {
+ OUString aStr = static_cast<const SfxStringItem&>(pReqArgs->
+ Get( SID_INSERT_MATRIX )).GetValue();
+ ScDocument* pDoc = GetViewData()->GetDocument();
+ pTabViewShell->EnterMatrix( aStr, pDoc->GetGrammar() );
+ rReq.Done();
+ }
+ }
+ break;
+
case FID_INPUTLINE_ENTER:
case FID_INPUTLINE_BLOCK:
case FID_INPUTLINE_MATRIX:
@@ -915,6 +928,11 @@ void ScCellShell::Execute( SfxRequest& rReq )
SID_NAVIGATOR, SfxCallMode::SYNCHRON|SfxCallMode::RECORD );
break;
+ case SID_MARKAREA:
+ // called from Basic at the hidden view to select a range in the visible view
+ OSL_FAIL("old slot SID_MARKAREA");
+ break;
+
default:
OSL_FAIL("ScCellShell::Execute: unknown slot");
break;
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index f3895ca0e84c..ddd1ef663525 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -567,6 +567,13 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
rReq.Done();
break;
+ // SID_TABLE_ACTIVATE and SID_MARKAREA are called by basic for the
+ // hidden View, to mark/switch on the visible View:
+
+ case SID_TABLE_ACTIVATE:
+ OSL_FAIL("old slot SID_TABLE_ACTIVATE");
+ break;
+
case SID_REPAINT:
PaintGrid();
PaintTop();
diff --git a/sc/source/ui/view/tabvwshh.cxx b/sc/source/ui/view/tabvwshh.cxx
index 1b45a21da434..c59e6dcc4e6c 100644
--- a/sc/source/ui/view/tabvwshh.cxx
+++ b/sc/source/ui/view/tabvwshh.cxx
@@ -41,12 +41,169 @@
using namespace com::sun::star;
-void ScTabViewShell::ExecuteObject( const SfxRequest& /*rReq*/ )
+void ScTabViewShell::ExecuteObject( const SfxRequest& rReq )
{
+ sal_uInt16 nSlotId = rReq.GetSlot();
+ const SfxItemSet* pReqArgs = rReq.GetArgs();
+
+ // Always activate/deactivate object in the visible View
+
+ ScTabViewShell* pVisibleSh = this;
+ if ( nSlotId == SID_OLE_SELECT || nSlotId == SID_OLE_ACTIVATE || nSlotId == SID_OLE_DEACTIVATE )
+ {
+ OSL_FAIL("old slot SID_OLE...");
+ }
+
+ switch (nSlotId)
+ {
+ case SID_OLE_SELECT:
+ case SID_OLE_ACTIVATE:
+ {
+ // In both cases, first select in the visible View
+
+ OUString aName;
+ SdrView* pDrView = GetSdrView();
+ if (pDrView)
+ {
+ const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList();
+ if (rMarkList.GetMarkCount() == 1)
+ aName = ScDrawLayer::GetVisibleName( rMarkList.GetMark(0)->GetMarkedSdrObj() );
+ }
+ pVisibleSh->SelectObject( aName );
+
+ // activate
+
+ if ( nSlotId == SID_OLE_ACTIVATE )
+ pVisibleSh->DoVerb( 0 );
+ }
+ break;
+ case SID_OLE_DEACTIVATE:
+ pVisibleSh->DeactivateOle();
+ break;
+
+ case SID_OBJECT_LEFT:
+ case SID_OBJECT_TOP:
+ case SID_OBJECT_WIDTH:
+ case SID_OBJECT_HEIGHT:
+ {
+ bool bDone = false;
+ const SfxPoolItem* pItem;
+ if ( pReqArgs && pReqArgs->GetItemState( nSlotId, true, &pItem ) == SfxItemState::SET )
+ {
+ long nNewVal = static_cast<const SfxInt32Item*>(pItem)->GetValue();
+ if ( nNewVal < 0 )
+ nNewVal = 0;
+
+ //! convert from something into 1/100mm ??????
+
+ SdrView* pDrView = GetSdrView();
+ if ( pDrView )
+ {
+ const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList();
+ if (rMarkList.GetMarkCount() == 1)
+ {
+ SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
+ tools::Rectangle aRect = pObj->GetLogicRect();
+
+ if ( nSlotId == SID_OBJECT_LEFT )
+ pDrView->MoveMarkedObj( Size( nNewVal - aRect.Left(), 0 ) );
+ else if ( nSlotId == SID_OBJECT_TOP )
+ pDrView->MoveMarkedObj( Size( 0, nNewVal - aRect.Top() ) );
+ else if ( nSlotId == SID_OBJECT_WIDTH )
+ pDrView->ResizeMarkedObj( aRect.TopLeft(),
+ Fraction( nNewVal, aRect.GetWidth() ),
+ Fraction( 1, 1 ) );
+ else // if ( nSlotId == SID_OBJECT_HEIGHT )
+ pDrView->ResizeMarkedObj( aRect.TopLeft(),
+ Fraction( 1, 1 ),
+ Fraction( nNewVal, aRect.GetHeight() ) );
+ bDone = true;
+ }
+ }
+ }
+#if HAVE_FEATURE_SCRIPTING
+ if (!bDone)
+ SbxBase::SetError( ERRCODE_BASIC_BAD_PARAMETER ); // basic error
+#endif
+ }
+ break;
+
+ }
}
-void ScTabViewShell::GetObjectState( SfxItemSet& /*rSet*/ )
+static uno::Reference < embed::XEmbeddedObject > lcl_GetSelectedObj( const SdrView* pDrView ) //! member of ScDrawView?
{
+ uno::Reference < embed::XEmbeddedObject > xRet;
+ if (pDrView)
+ {
+ const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList();
+ if (rMarkList.GetMarkCount() == 1)
+ {
+ SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
+ if (pObj->GetObjIdentifier() == OBJ_OLE2)
+ {
+ SdrOle2Obj* pOle2Obj = static_cast<SdrOle2Obj*>(pObj);
+ xRet = pOle2Obj->GetObjRef();
+ }
+ }
+ }
+
+ return xRet;
+}
+
+void ScTabViewShell::GetObjectState( SfxItemSet& rSet )
+{
+ SfxWhichIter aIter(rSet);
+ sal_uInt16 nWhich = aIter.FirstWhich();
+ while ( nWhich )
+ {
+ switch (nWhich)
+ {
+ case SID_ACTIVE_OBJ_NAME:
+ {
+ OUString aName;
+ uno::Reference < embed::XEmbeddedObject > xOLE = lcl_GetSelectedObj( GetSdrView() );
+ if (xOLE.is())
+ {
+ aName = GetViewData().GetSfxDocShell()->GetEmbeddedObjectContainer().GetEmbeddedObjectName( xOLE );
+ }
+ rSet.Put( SfxStringItem( nWhich, aName ) );
+ }
+ break;
+ case SID_OBJECT_LEFT:
+ case SID_OBJECT_TOP:
+ case SID_OBJECT_WIDTH:
+ case SID_OBJECT_HEIGHT:
+ {
+ SdrView* pDrView = GetSdrView();
+ if ( pDrView )
+ {
+ const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList();
+ if (rMarkList.GetMarkCount() == 1)
+ {
+ SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
+ tools::Rectangle aRect = pObj->GetLogicRect();
+
+ long nVal;
+ if ( nWhich == SID_OBJECT_LEFT )
+ nVal = aRect.Left();
+ else if ( nWhich == SID_OBJECT_TOP )
+ nVal = aRect.Top();
+ else if ( nWhich == SID_OBJECT_WIDTH )
+ nVal = aRect.GetWidth();
+ else // if ( nWhich == SID_OBJECT_HEIGHT )
+ nVal = aRect.GetHeight();
+
+ //! convert from 1/100mm to something else ??????
+
+ rSet.Put( SfxInt32Item( nWhich, nVal ) );
+ }
+ }
+ }
+ break;
+ }
+ nWhich = aIter.NextWhich();
+ }
}
void ScTabViewShell::AddAccessibilityObject( SfxListener& rObject )