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