/src/libreoffice/sc/source/ui/inc/tabvwsh.hxx
Line | Count | Source |
1 | | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
2 | | /* |
3 | | * This file is part of the LibreOffice project. |
4 | | * |
5 | | * This Source Code Form is subject to the terms of the Mozilla Public |
6 | | * License, v. 2.0. If a copy of the MPL was not distributed with this |
7 | | * file, You can obtain one at http://mozilla.org/MPL/2.0/. |
8 | | * |
9 | | * This file incorporates work covered by the following license notice: |
10 | | * |
11 | | * Licensed to the Apache Software Foundation (ASF) under one or more |
12 | | * contributor license agreements. See the NOTICE file distributed |
13 | | * with this work for additional information regarding copyright |
14 | | * ownership. The ASF licenses this file to you under the Apache |
15 | | * License, Version 2.0 (the "License"); you may not use this file |
16 | | * except in compliance with the License. You may obtain a copy of |
17 | | * the License at http://www.apache.org/licenses/LICENSE-2.0 . |
18 | | */ |
19 | | |
20 | | #pragma once |
21 | | |
22 | | #include <formula/errorcodes.hxx> |
23 | | #include <formula/opcode.hxx> |
24 | | #include <svx/fmshell.hxx> |
25 | | #include <sfx2/viewsh.hxx> |
26 | | #include <editeng/svxenum.hxx> |
27 | | #include <o3tl/deleter.hxx> |
28 | | #include <scdllapi.h> |
29 | | #include "dbfunc.hxx" |
30 | | #include "target.hxx" |
31 | | #include <shellids.hxx> |
32 | | #include <tabprotection.hxx> |
33 | | #include <com/sun/star/ui/dialogs/DialogClosedEvent.hpp> |
34 | | #include <com/sun/star/sheet/XSpreadsheet.hpp> |
35 | | #include <dragdata.hxx> |
36 | | |
37 | | #include <memory> |
38 | | #include <map> |
39 | | |
40 | | class SdrOle2Obj; |
41 | | class SfxAbstractTabDialog; |
42 | | class SfxBindings; |
43 | | class SfxChildWindow; |
44 | | class SvxNumberInfoItem; |
45 | | struct SfxChildWinInfo; |
46 | | class AbstractScInsertTableDlg; |
47 | | class AbstractScMoveTableDlg; |
48 | | class AbstractScTabBgColorDlg; |
49 | | class AbstractScStringInputDlg; |
50 | | class ScStyleSaveData; |
51 | | class ScAuditingShell; |
52 | | class ScDrawShell; |
53 | | class ScDrawTextObjectBar; |
54 | | class ScEditShell; |
55 | | class ScInputHandler; |
56 | | class ScPivotShell; |
57 | | class ScDrawFormShell; |
58 | | class ScCellShell; |
59 | | class ScOleObjectShell; |
60 | | class ScGraphicShell; |
61 | | class ScMediaShell; |
62 | | class ScChartShell; |
63 | | class ScPageBreakShell; |
64 | | class ScDPObject; |
65 | | class ScNavigatorSettings; |
66 | | class ScDrawTransferObj; |
67 | | class ScCondFormatDlgData; |
68 | | class ScDispatchProviderInterceptor; |
69 | | class ScTableShell; |
70 | | |
71 | | namespace sc { |
72 | | class SparklineShell; |
73 | | } |
74 | | |
75 | | struct ScHeaderFieldData; |
76 | | |
77 | | namespace editeng { class SvxBorderLine; } |
78 | | |
79 | | namespace svx { |
80 | | class ExtrusionBar; |
81 | | class FontworkBar; |
82 | | } |
83 | | |
84 | | enum ObjectSelectionType |
85 | | { |
86 | | OST_NONE, |
87 | | OST_Cell, |
88 | | OST_Editing, |
89 | | OST_DrawText, |
90 | | OST_Drawing, |
91 | | OST_DrawForm, |
92 | | OST_Pivot, |
93 | | OST_Auditing, |
94 | | OST_OleObject, |
95 | | OST_Chart, |
96 | | OST_Graphic, |
97 | | OST_Media, |
98 | | OST_Sparkline, |
99 | | OST_Table, |
100 | | }; |
101 | | |
102 | | class ScFormEditData; |
103 | | class ScViewOptiChangesListener; |
104 | | class SAL_DLLPUBLIC_RTTI ScTabViewShell : public SfxViewShell, public ScDBFunc |
105 | | { |
106 | | private: |
107 | | rtl::Reference<ScViewOptiChangesListener> mChangesListener; |
108 | | struct SendFormulabarUpdate |
109 | | { |
110 | | OUString m_aText; |
111 | | OUString m_aSelection; |
112 | | sal_uInt64 m_nShellId; |
113 | | OUString m_separator; |
114 | | std::chrono::steady_clock::time_point m_nTimeStamp; |
115 | | |
116 | | SendFormulabarUpdate() |
117 | 0 | : m_nShellId(0) |
118 | 0 | { |
119 | 0 | } |
120 | | |
121 | | void Send(); |
122 | | }; |
123 | | |
124 | | SendFormulabarUpdate maSendFormulabarUpdate; |
125 | | |
126 | | ObjectSelectionType eCurOST; |
127 | | sal_uInt16 nDrawSfxId; |
128 | | SdrObjKind eFormObjKind; |
129 | | OUString sDrawCustom; // current custom shape type |
130 | | std::unique_ptr<ScDrawShell> pDrawShell; |
131 | | std::unique_ptr<ScDrawTextObjectBar> pDrawTextShell; |
132 | | std::unique_ptr<ScEditShell> pEditShell; |
133 | | std::unique_ptr<ScPivotShell> pPivotShell; |
134 | | std::unique_ptr<sc::SparklineShell> m_pSparklineShell; |
135 | | std::unique_ptr<ScTableShell> m_pTableShell; |
136 | | std::unique_ptr<ScAuditingShell> pAuditingShell; |
137 | | std::unique_ptr<ScDrawFormShell> pDrawFormShell; |
138 | | std::unique_ptr<ScCellShell> pCellShell; |
139 | | std::unique_ptr<ScOleObjectShell> pOleObjectShell; |
140 | | std::unique_ptr<ScChartShell> pChartShell; |
141 | | std::unique_ptr<ScGraphicShell> pGraphicShell; |
142 | | std::unique_ptr<ScMediaShell> pMediaShell; |
143 | | std::unique_ptr<ScPageBreakShell> pPageBreakShell; |
144 | | std::unique_ptr<svx::ExtrusionBar> pExtrusionBarShell; |
145 | | std::unique_ptr<svx::FontworkBar> pFontworkBarShell; |
146 | | |
147 | | std::unique_ptr<FmFormShell> pFormShell; |
148 | | |
149 | | std::unique_ptr<ScFormEditData> mpFormEditData; |
150 | | std::unique_ptr<ScInputHandler, o3tl::default_delete<ScInputHandler>> mpInputHandler; // for OLE input cell |
151 | | |
152 | | std::unique_ptr<::editeng::SvxBorderLine> pCurFrameLine; |
153 | | |
154 | | rtl::Reference<ScDispatchProviderInterceptor> xDisProvInterceptor; |
155 | | |
156 | | Point aWinPos; |
157 | | |
158 | | ScTabViewTarget aTarget; |
159 | | std::unique_ptr<ScDPObject> pDialogDPObject; |
160 | | |
161 | | std::unique_ptr<ScNavigatorSettings> pNavSettings; |
162 | | |
163 | | // used in first Activate |
164 | | bool bFirstActivate; |
165 | | |
166 | | bool bActiveDrawSh; |
167 | | bool bActiveDrawTextSh; |
168 | | bool bActiveDrawFormSh; |
169 | | bool bActiveOleObjectSh; |
170 | | bool bActiveChartSh; |
171 | | bool bActiveGraphicSh; |
172 | | bool bActiveMediaSh; |
173 | | bool bActiveEditSh; |
174 | | |
175 | | bool bFormShellAtTop; // does the FormShell need to be on top? |
176 | | |
177 | | bool bDontSwitch; // Don't turn off EditShell |
178 | | bool bInFormatDialog; // for GetSelectionText |
179 | | |
180 | | bool bReadOnly; // to detect status changes |
181 | | |
182 | | bool bIsActive; |
183 | | |
184 | | bool bForceFocusOnCurCell; // #i123629# |
185 | | |
186 | | bool bInPrepareClose; |
187 | | bool bInDispose; |
188 | | |
189 | | bool bMoveKeepEdit; |
190 | | |
191 | | sal_uInt16 nCurRefDlgId; |
192 | | |
193 | | bool bIsTabChangeInProgress; |
194 | | |
195 | | std::unique_ptr<SfxBroadcaster> pAccessibilityBroadcaster; |
196 | | |
197 | | // ugly hack for Add button in ScNameDlg |
198 | | std::map<OUString, ScRangeName> m_RangeMap; |
199 | | bool mbInSwitch; |
200 | | OUString maName; |
201 | | OUString maScope; |
202 | | |
203 | | std::unique_ptr<ScDragData> m_pDragData; |
204 | | // temporary data for exchange in the used multi-dialog structure |
205 | | std::shared_ptr<ScCondFormatDlgData> m_pScCondFormatDlgData; |
206 | | |
207 | | // Chart insert wizard's mark to make sure it undoes the correct thing in LOK case |
208 | | UndoStackMark m_InsertWizardUndoMark = MARK_INVALID; |
209 | | |
210 | | private: |
211 | | void Construct( TriState nForceDesignMode ); |
212 | | |
213 | | SfxShell* GetMySubShell() const; |
214 | | |
215 | | void DoReadUserData( std::u16string_view rData ); |
216 | | void DoReadUserDataSequence( const css::uno::Sequence< css::beans::PropertyValue >& rSettings ); |
217 | | bool IsSignatureLineSelected(); |
218 | | bool IsSignatureLineSigned(); |
219 | | bool IsQRCodeSelected(); |
220 | | |
221 | | DECL_LINK( SimpleRefClose, const OUString*, void ); |
222 | | DECL_LINK( SimpleRefDone, const OUString&, void ); |
223 | | DECL_LINK( SimpleRefAborted, const OUString&, void ); |
224 | | DECL_LINK( SimpleRefChange, const OUString&, void ); |
225 | | DECL_LINK( FormControlActivated, LinkParamNone*, void ); |
226 | | DECL_LINK( DialogClosedHdl, css::ui::dialogs::DialogClosedEvent*, void ); |
227 | | |
228 | | protected: |
229 | | virtual void Activate(bool bMDI) override; |
230 | | virtual void Deactivate(bool bMDI) override; |
231 | | virtual bool PrepareClose( bool bUI = true ) override; |
232 | | |
233 | | virtual void ShowCursor(bool bOn) override; |
234 | | |
235 | | virtual void Move() override; // notification |
236 | | |
237 | | virtual void InnerResizePixel( const Point &rOfs, const Size &rSize, bool inplaceEditModeChange ) override; // new |
238 | | virtual void OuterResizePixel( const Point &rOfs, const Size &rSize ) override; |
239 | | virtual void SetZoomFactor( double fZoomX, double fZoomY ) override; |
240 | | |
241 | | virtual void QueryObjAreaPixel( tools::Rectangle& rRect ) const override; |
242 | | |
243 | | virtual OUString GetSelectionText( bool bWholeWord = false, bool bOnlyASample = false ) override; |
244 | | virtual bool HasSelection( bool bText = true ) const override; |
245 | | |
246 | | virtual void WriteUserData(OUString &, bool bBrowse = false) override; |
247 | | virtual void ReadUserData(const OUString &, bool bBrowse = false) override; |
248 | | virtual void WriteUserDataSequence (css::uno::Sequence < css::beans::PropertyValue >& ) override; |
249 | | virtual void ReadUserDataSequence (const css::uno::Sequence < css::beans::PropertyValue >& ) override; |
250 | | |
251 | | virtual void UIDeactivated( SfxInPlaceClient* pClient ) override; |
252 | | |
253 | | virtual bool KeyInput( const KeyEvent &rKeyEvent ) override; |
254 | | virtual SdrView* GetDrawView() const override; |
255 | | |
256 | | public: |
257 | | SFX_DECL_INTERFACE(SCID_TABVIEW_SHELL) |
258 | | SFX_DECL_VIEWFACTORY(ScTabViewShell); |
259 | | |
260 | | private: |
261 | | /// SfxInterface initializer. |
262 | | static void InitInterface_Impl(); |
263 | | |
264 | | public: |
265 | | /** -> Clone Method for Factory |
266 | | Created from a general shell and inherit as much as possible */ |
267 | | ScTabViewShell(SfxViewFrame& rViewFrame, SfxViewShell* pOldSh); |
268 | | |
269 | | virtual ~ScTabViewShell() override; |
270 | | |
271 | | weld::Window* GetDialogParent(); |
272 | | |
273 | | SC_DLLPUBLIC bool IsRefInputMode() const; |
274 | | void ExecuteInputDirect(); |
275 | | |
276 | | void HandleDuplicateRecordsHighlight(const rtl::Reference<ScTableSheetObj>& ActiveSheet, |
277 | | const css::table::CellRangeAddress& aRange, |
278 | | bool bIncludesHeaders, bool bDuplicateRows, |
279 | | const std::vector<int>& rSelectedEntries); |
280 | | void HandleDuplicateRecordsRemove(const rtl::Reference<ScTableSheetObj>& ActiveSheet, |
281 | | const css::table::CellRangeAddress& aRange, |
282 | | bool bIncludesHeaders, bool bDuplicateRows, |
283 | | const std::vector<int>& rSelectedEntries); |
284 | | rtl::Reference<ScTableSheetObj> GetRangeWithSheet(css::table::CellRangeAddress& rRangeData, bool& bHasData, bool bHasUnoArguments); |
285 | | void ExtendSingleSelection(css::table::CellRangeAddress& rRangeData); |
286 | | |
287 | 0 | const ScInputHandler* GetInputHandler() const { return mpInputHandler.get(); } |
288 | 0 | ScInputHandler* GetInputHandler() { return mpInputHandler.get(); } |
289 | | SC_DLLPUBLIC const OUString* GetEditString() const; |
290 | | void UpdateInputHandler( bool bForce = false, bool bStopEditing = true ); |
291 | | void UpdateInputHandlerCellAdjust( SvxCellHorJustify eJust ); |
292 | | bool TabKeyInput(const KeyEvent& rKEvt); |
293 | | bool SfxKeyInput(const KeyEvent& rKEvt); |
294 | | |
295 | | void SetActive(); |
296 | | |
297 | 0 | void SetTabChangeInProgress(bool bState) { bIsTabChangeInProgress = bState; } |
298 | 0 | bool IsTabChangeInProgress() { return bIsTabChangeInProgress; } |
299 | | |
300 | 0 | ::editeng::SvxBorderLine* GetDefaultFrameLine() const { return pCurFrameLine.get(); } |
301 | | void SetDefaultFrameLine(const ::editeng::SvxBorderLine* pLine ); |
302 | | |
303 | | SC_DLLPUBLIC void Execute( SfxRequest& rReq ); |
304 | | SC_DLLPUBLIC void GetState( SfxItemSet& rSet ); |
305 | | |
306 | | void ExecuteTable( SfxRequest& rReq ); |
307 | | void GetStateTable( SfxItemSet& rSet ); |
308 | | |
309 | | void WindowChanged(); |
310 | | SC_DLLPUBLIC void ExecDraw(SfxRequest&); |
311 | | void ExecDrawIns(SfxRequest& rReq); |
312 | | void GetDrawState(SfxItemSet &rSet); |
313 | | void GetDrawInsState(SfxItemSet &rSet); |
314 | | void ExecGallery(const SfxRequest& rReq); |
315 | | void ExecNavigatorWin(const SfxRequest& rReq); |
316 | | |
317 | | void ExecChildWin(const SfxRequest& rReq); |
318 | | |
319 | | void ExecImageMap( SfxRequest& rReq ); |
320 | | void GetImageMapState( SfxItemSet& rSet ); |
321 | | |
322 | | void ExecuteSave( SfxRequest& rReq ); |
323 | | void GetSaveState( SfxItemSet& rSet ); |
324 | | void ExecSearch( SfxRequest& rReq ); |
325 | | |
326 | | void ExecuteUndo(SfxRequest& rReq); |
327 | | void GetUndoState(SfxItemSet &rSet); |
328 | | |
329 | | void ExecuteObject(const SfxRequest& rReq); |
330 | | void GetObjectState(SfxItemSet &rSet); |
331 | | |
332 | | void ExecDrawOpt(const SfxRequest& rReq); |
333 | | void GetDrawOptState(SfxItemSet &rSet); |
334 | | |
335 | | void ExecStyle(SfxRequest& rReq); |
336 | | void GetStyleState(SfxItemSet &rSet); |
337 | | |
338 | | void UpdateDrawShell(); |
339 | | SC_DLLPUBLIC void SetDrawShell( bool bActive ); |
340 | | void SetDrawTextShell( bool bActive ); |
341 | | |
342 | | void SetPivotShell( bool bActive ); |
343 | | void SetSparklineShell(bool bActive); |
344 | | void SetTableShell(bool bActive); |
345 | | void UpdateContextShells(); |
346 | | void SetDialogDPObject( std::unique_ptr<ScDPObject> pObj ); |
347 | 0 | const ScDPObject* GetDialogDPObject() const { return pDialogDPObject.get(); } |
348 | | |
349 | 0 | void SetDontSwitch(bool bFlag){bDontSwitch=bFlag;} |
350 | | |
351 | | void SetAuditShell( bool bActive ); |
352 | | void SetDrawFormShell( bool bActive ); |
353 | | void SetEditShell(EditView* pView, bool bActive ); |
354 | | void SetOleObjectShell( bool bActive ); |
355 | | void SetChartShell( bool bActive ); |
356 | | void SetGraphicShell( bool bActive ); |
357 | | void SetMediaShell( bool bActive ); |
358 | | |
359 | | void SetDrawShellOrSub(); |
360 | | void SetCurSubShell( ObjectSelectionType eOST, bool bForce = false ); |
361 | | |
362 | | void SetFormShellAtTop( bool bSet ); |
363 | | |
364 | 0 | ObjectSelectionType GetCurObjectSelectionType() const { return eCurOST; } |
365 | | |
366 | | virtual ErrCode DoVerb(sal_Int32 nVerb) override; |
367 | | |
368 | | void StopEditShell(); |
369 | | bool IsDrawTextShell() const; |
370 | | bool IsAuditShell() const; |
371 | | |
372 | | void SetDrawTextUndo( SfxUndoManager* pUndoMgr ); |
373 | | |
374 | | void FillFieldData( ScHeaderFieldData& rData ); |
375 | | |
376 | | virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override; |
377 | | |
378 | | ScNavigatorSettings* GetNavigatorSettings(); |
379 | | |
380 | | // Drucken: |
381 | | virtual SfxPrinter* GetPrinter( bool bCreate = false ) override; |
382 | | virtual sal_uInt16 SetPrinter( SfxPrinter* pNewPrinter, |
383 | | SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL ) override; |
384 | | |
385 | | virtual bool HasPrintOptionsPage() const override; |
386 | | virtual std::unique_ptr<SfxTabPage> CreatePrintOptionsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet &rOptions) override; |
387 | | |
388 | | void ConnectObject( const SdrOle2Obj* pObj ); |
389 | | void ActivateObject(SdrOle2Obj* pObj, sal_Int32 nVerb); |
390 | | |
391 | | void DeactivateOle(); |
392 | | |
393 | | SAL_RET_MAYBENULL SC_DLLPUBLIC static ScTabViewShell* GetActiveViewShell(); |
394 | | |
395 | | std::shared_ptr<SfxModelessDialogController> CreateRefDialogController(SfxBindings* pB, SfxChildWindow* pCW, |
396 | | SfxChildWinInfo* pInfo, |
397 | | weld::Window* pParent, sal_uInt16 nSlotId); |
398 | | |
399 | | void UpdateOleZoom(); |
400 | | |
401 | 0 | virtual const FmFormShell* GetFormShell() const override { return pFormShell.get(); } |
402 | 0 | virtual FmFormShell* GetFormShell() override { return pFormShell.get(); } |
403 | | |
404 | | void InsertURL( const OUString& rName, const OUString& rURL, const OUString& rTarget, |
405 | | sal_uInt16 nMode ); |
406 | | void InsertURLButton( const OUString& rName, const OUString& rURL, const OUString& rTarget, |
407 | | const Point* pInsPos ); |
408 | | void InsertURLField( const OUString& rName, const OUString& rURL, const OUString& rTarget ); |
409 | | |
410 | | SC_DLLPUBLIC bool SelectObject( std::u16string_view rName ); |
411 | | |
412 | 0 | void SetInFormatDialog(bool bFlag) {bInFormatDialog=bFlag;} |
413 | | |
414 | 0 | void ForceMove() { Move(); } |
415 | | |
416 | | SC_DLLPUBLIC static std::unique_ptr<SvxNumberInfoItem> MakeNumberInfoItem( ScDocument& rDoc, const ScViewData& rViewData ); |
417 | | |
418 | | static void UpdateNumberFormatter( const SvxNumberInfoItem& rInfoItem ); |
419 | | |
420 | | void ExecuteCellFormatDlg( SfxRequest& rReq, const OUString &rTabPage); |
421 | | |
422 | | bool GetFunction( OUString& rFuncStr, FormulaError nErrCode ); |
423 | | |
424 | | void StartSimpleRefDialog( const OUString& rTitle, const OUString& rInitVal, |
425 | | bool bCloseOnButtonUp, bool bSingleCell, bool bMultiSelection ); |
426 | | void StopSimpleRefDialog(); |
427 | | |
428 | | void SetCurRefDlgId( sal_uInt16 nNew ); |
429 | | |
430 | | void AddAccessibilityObject( SfxListener& rObject ); |
431 | | void RemoveAccessibilityObject( SfxListener& rObject ); |
432 | | void BroadcastAccessibility( const SfxHint &rHint ); |
433 | | bool HasAccessibilityObjects() const; |
434 | | |
435 | | bool ExecuteRetypePassDlg(ScPasswordHash eDesiredHash); |
436 | | void ExecuteOnlyActiveSheetSavedDlg(); |
437 | | |
438 | | void FinishProtectTable(); |
439 | | void ExecProtectTable( SfxRequest& rReq ); |
440 | | |
441 | | void ExecGoToTab( SfxRequest& rReq, SfxBindings& rBindings ); |
442 | | |
443 | | using ScTabView::ShowCursor; |
444 | | |
445 | 0 | bool IsActive() const { return bIsActive; } |
446 | | OUString GetFormula(const ScAddress& rAddress); |
447 | | bool UseSubTotal(ScRangeList* pRangeList); |
448 | | OUString DoAutoSum(bool& rRangeFinder, bool& rSubTotal, const OpCode eCode); |
449 | | |
450 | | // ugly hack to call Define Names from Manage Names |
451 | | void SwitchBetweenRefDialogs(SfxModelessDialogController* pDialog); |
452 | | // #i123629# |
453 | 0 | bool GetForceFocusOnCurCell() const { return bForceFocusOnCurCell; } |
454 | 0 | void SetForceFocusOnCurCell(bool bFlag) { bForceFocusOnCurCell=bFlag; } |
455 | | /// See SfxViewShell::getPart(). |
456 | | int getPart() const override; |
457 | | /// See SfxViewShell::afterCallbackRegistered(). |
458 | | void afterCallbackRegistered() override; |
459 | | /// See SfxViewShell::NotifyCursor(). |
460 | | void NotifyCursor(SfxViewShell* pViewShell) const override; |
461 | | /// See SfxViewShell::GetColorConfigColor(). |
462 | | ::Color GetColorConfigColor(svtools::ColorConfigEntry nColorType) const override; |
463 | | /// Emits a LOK_CALLBACK_INVALIDATE_HEADER for all views whose current tab is equal to nCurrentTabIndex |
464 | | static void notifyAllViewsHeaderInvalidation(const SfxViewShell* pForViewShell, HeaderType eHeaderType, SCTAB nCurrentTabIndex); |
465 | | static bool isAnyEditViewInRange(const SfxViewShell* pForViewShell, bool bColumns, SCCOLROW nStart, SCCOLROW nEnd); |
466 | | /// Emits a LOK_CALLBACK_INVALIDATE_SHEET_GEOMETRY for all views whose current tab |
467 | | /// is equal to nCurrentTabIndex |
468 | | static void notifyAllViewsSheetGeomInvalidation(const SfxViewShell* pForViewShell, bool bColumns, bool bRows, bool bSizes, |
469 | | bool bHidden, bool bFiltered, bool bGroups, SCTAB nCurrentTabIndex); |
470 | | void LOKSendFormulabarUpdate(const EditView* pEditView, const OUString& rText, const ESelection& rSelection); |
471 | | css::uno::Reference<css::drawing::XShapes> getSelectedXShapes(); |
472 | | SC_DLLPUBLIC static css::uno::Reference<css::datatransfer::XTransferable2> GetClipData(vcl::Window* pWin); |
473 | | |
474 | | void InitFormEditData(ScDocShell& rShell); |
475 | | void ClearFormEditData(); |
476 | 0 | ScFormEditData* GetFormEditData() { return mpFormEditData.get(); } |
477 | | |
478 | | virtual tools::Rectangle getLOKVisibleArea() const override; |
479 | | |
480 | 0 | const ScDragData& GetDragData() const { return *m_pDragData; } |
481 | | void SetDragObject(ScTransferObj* pCellObj, ScDrawTransferObj* pDrawObj); |
482 | | void ResetDragObject(); |
483 | | void SetDragLink(const OUString& rDoc, const OUString& rTab, const OUString& rArea); |
484 | | void SetDragJump(ScDocument* pLocalDoc, const OUString& rTarget, const OUString& rText); |
485 | | |
486 | 0 | void SetMoveKeepEdit(bool value) { bMoveKeepEdit = value; }; |
487 | 0 | bool GetMoveKeepEdit() { return bMoveKeepEdit; }; |
488 | | |
489 | 0 | void setScCondFormatDlgData(const std::shared_ptr<ScCondFormatDlgData>& rItem) { m_pScCondFormatDlgData = rItem; } |
490 | 0 | const std::shared_ptr<ScCondFormatDlgData>& getScCondFormatDlgData() const { return m_pScCondFormatDlgData; } |
491 | | |
492 | | void SetInsertWizardUndoMark(); |
493 | | |
494 | | private: |
495 | | void ExecuteMoveTable( SfxRequest& rReq ); |
496 | | void DoMoveTableFromDialog( SfxRequest& rReq, const VclPtr<AbstractScMoveTableDlg>& pDlg ); |
497 | | void ExecuteInsertTable( SfxRequest& rReq ); |
498 | | void DoInsertTableFromDialog( SfxRequest& rReq, const VclPtr<AbstractScInsertTableDlg>& pDlg ); |
499 | | void ExecuteAppendOrRenameTable( SfxRequest& rReq ); |
500 | | void ExecuteAppendOrRenameTableDialog( const VclPtr<AbstractScStringInputDlg>& pDlg, const std::shared_ptr<SfxRequest>& xReq, sal_uInt16 nSlot ); |
501 | | bool DoAppendOrRenameTableDialog( sal_Int32 nResult, const VclPtr<AbstractScStringInputDlg>& pDlg, const std::shared_ptr<SfxRequest>& xReq, sal_uInt16 nSlot ); |
502 | | void ExecuteSetTableBackgroundCol( SfxRequest& rReq ); |
503 | | void ExecuteTableBackgroundDialog( const VclPtr<AbstractScTabBgColorDlg>& pDlg, const std::shared_ptr<SfxRequest>& xReq, Color aOldTabBgColor, sal_uInt16 nSlot ); |
504 | | bool DoTableBackgroundDialog( sal_Int32 nResult, const VclPtr<AbstractScTabBgColorDlg>& pDlg, const std::shared_ptr<SfxRequest>& xReq, Color aOldTabBgColor, sal_uInt16 nSlot ); |
505 | | void ExecuteApplyStyle(SfxRequest& rReq, SfxStyleSheetBasePool* pStylePool, SfxStyleSheetBase* pStyleSheet, |
506 | | sal_uInt16 nSlotId, const OUString& aStyleName, |
507 | | const std::shared_ptr<ScStyleSaveData>& rOldData, |
508 | | const std::shared_ptr<ScStyleSaveData>& rNewData, SfxStyleFamily eFamily); |
509 | | void ExecuteStyleEdit(SfxRequest& rReq, SfxStyleSheetBase* pStyleSheet, sal_uInt16 nRetMask, sal_uInt16 nSlotId, |
510 | | bool bAddUndo, bool bUndo, |
511 | | const std::shared_ptr<ScStyleSaveData>& rOldData, |
512 | | const std::shared_ptr<ScStyleSaveData>& rNewData, |
513 | | SfxStyleFamily eFamily, bool bStyleToMarked, bool bListAction, |
514 | | SdrObject* pEditObject, ESelection aSelection); |
515 | | void ExecuteStyleEditDialog(VclPtr<SfxAbstractTabDialog> pDlg, |
516 | | SfxStyleSheetBase* pStyleSheet, sal_uInt16 nResult, sal_uInt16& rnRetMask, |
517 | | std::shared_ptr<SfxItemSet> xOldSet, sal_uInt16 nSlotId, |
518 | | bool& rbAddUndo, |
519 | | ScStyleSaveData& rNewData, std::u16string_view aOldName); |
520 | | void ExecuteStyleEditPost(SfxRequest& rReq, SfxStyleSheetBase* pStyleSheet, sal_uInt16 nSlotId, |
521 | | sal_uInt16 nRetMask, bool bAddUndo, bool bUndo, SfxStyleFamily eFamily, |
522 | | ScStyleSaveData& rOldData, ScStyleSaveData& rNewData, |
523 | | bool bStyleToMarked, bool bListAction, |
524 | | SdrObject* pEditObject, ESelection aSelection); |
525 | | }; |
526 | | |
527 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |