20#include <com/sun/star/ui/dialogs/XSLTFilterDialog.hpp>
45#include <svx/dialogs.hrc>
55#include <com/sun/star/i18n/ScriptType.hpp>
56#include <com/sun/star/linguistic2/XThesaurus.hpp>
57#include <ooo/vba/XSinkCaller.hpp>
67#include <printopt.hxx>
76#include <scerrors.hrc>
77#include <scstyles.hrc>
80#include <bitmaps.hlst>
82#include <inputwin.hxx>
91#define ShellClass_ScModule
97#include <LibreOfficeKit/LibreOfficeKitEnums.h>
100#define SC_IDLE_MIN 150
101#define SC_IDLE_MAX 3000
102#define SC_IDLE_STEP 75
103#define SC_IDLE_COUNT 50
112 SfxVisibilityFlags::Standard | SfxVisibilityFlags::Client | SfxVisibilityFlags::Viewer,
113 ToolbarId::Objectbar_App);
115 GetStaticInterface()->RegisterStatusBar(StatusBarId::CalcStatusBar);
120 m_aIdleTimer(
"sc ScModule IdleTimer"),
122 m_pSelTransfer(
nullptr ),
123 m_pRefInputHandler(
nullptr ),
125 m_bIsWaterCan(
false ),
126 m_bIsInEditCommand(
false ),
127 m_bIsInExecuteDrop(
false ),
128 m_bIsInSharedDocLoading(
false ),
129 m_bIsInSharedDocSaving(
false )
147 m_aIdleTimer.SetInvokeHandler(
LINK(
this,
ScModule, IdleHandler ) );
148 m_aIdleTimer.Start();
152 SetPool( m_pMessagePool.get() );
163 OSL_ENSURE( !
m_pSelTransfer,
"Selection Transfer object not deleted" );
191 if ( bArrows || bComments )
199 if (
auto pDocSh =
dynamic_cast<ScDocShell *
>(pObjSh) )
239 pViewSh->PaintGrid();
241 pViewSh->PaintLeft();
242 pViewSh->PaintExtras();
248 else if (
dynamic_cast<const ScPreviewShell*
>( pViewShell) !=
nullptr )
263 if (
auto pDocSh =
dynamic_cast<ScDocShell *
>(pObjSh) )
269 pDocSh->CalcOutputFactor();
271 SCTAB nTabCount = pDocSh->GetDocument().GetTableCount();
272 for (
SCTAB nTab=0; nTab<nTabCount; nTab++)
273 pDocSh->AdjustRowHeight( 0, pDocSh->GetDocument().MaxRow(), nTab );
289 pViewSh->DigitLanguageChanged();
290 pViewSh->PaintGrid();
294 ScPreview* pPreview = pPreviewSh->GetPreview();
307 if ( rHint.
GetId() == SfxHintId::Deinitializing )
352 sal_uInt16 nSlot = rReq.
GetSlot();
356 case SID_CHOOSE_DESIGN:
359 case SID_EURO_CONVERTER:
362 case SID_AUTOSPELL_CHECK:
366 if (pReqArgs && SfxItemState::SET == pReqArgs->
GetItemState( FN_PARAM_1,
true, &pItem ))
368 else if ( pReqArgs && SfxItemState::SET == pReqArgs->
GetItemState( nSlot,
true, &pItem ) )
386 case SID_ATTR_METRIC:
389 if ( pReqArgs && SfxItemState::SET == pReqArgs->
GetItemState( nSlot,
true, &pItem ) )
396 case FieldUnit::INCH:
397 case FieldUnit::PICA:
398 case FieldUnit::POINT:
416 case FID_AUTOCOMPLETE:
428 case SID_DETECTIVE_AUTO:
445 case SID_PSZ_FUNCTION:
457 pBindings->
Update( SID_TABLE_CELL );
460 pBindings->
Update( SID_PSZ_FUNCTION );
466 case SID_ATTR_LANGUAGE:
467 case SID_ATTR_CHAR_CJK_LANGUAGE:
468 case SID_ATTR_CHAR_CTL_LANGUAGE:
480 LanguageType eOld = ( nSlot == SID_ATTR_CHAR_CJK_LANGUAGE ) ? eCjk :
481 ( ( nSlot == SID_ATTR_CHAR_CTL_LANGUAGE ) ? eCtl : eLatin );
482 if ( eNewLang != eOld )
484 if ( nSlot == SID_ATTR_CHAR_CJK_LANGUAGE )
486 else if ( nSlot == SID_ATTR_CHAR_CTL_LANGUAGE )
507 case FID_FOCUS_POSWND:
520 case SID_OPEN_XML_FILTERSETTINGS:
524 css::uno::Reference < css::ui::dialogs::XExecutableDialog > xDialog = css::ui::dialogs::XSLTFilterDialog::create( ::comphelper::getProcessComponentContext());
527 catch( css::uno::RuntimeException& )
535 OSL_FAIL(
"ScApplication: Unknown Message." );
546 for (sal_uInt16 nWhich = aIter.FirstWhich(); nWhich; nWhich = aIter.NextWhich())
557 case FID_AUTOCOMPLETE:
560 case SID_DETECTIVE_AUTO:
563 case SID_PSZ_FUNCTION:
566 case SID_ATTR_METRIC:
569 case SID_AUTOSPELL_CHECK:
572 case SID_ATTR_LANGUAGE:
652 const OUString& rDoc,
const OUString& rTab,
const OUString& rArea )
670 ScDocument* pLocalDoc,
const OUString& rTarget,
const OUString& rText )
693 css::uno::Reference<css::datatransfer::XTransferable2> xTransferable;
701 css::uno::Reference<css::datatransfer::clipboard::XClipboard> xClipboard =
703 xTransferable.set(xClipboard.is() ? xClipboard->getContents() :
nullptr, css::uno::UNO_QUERY);
710 assert((!pDoc || pDoc->
IsClipboard()) &&
"Document is not clipboard, how can that be?");
769 if (!bFound && (pLRUListIds[
n]== nFIndex))
772 aIdxList[
n ] = pLRUListIds[
n];
774 aIdxList[
n+1] = pLRUListIds[
n];
779 aIdxList[0] = nFIndex;
796 SC_MOD()->GetAppOptions();
928 OSL_ENSURE(
m_pAppCfg,
"AppOptions not initialised :-(" );
932 OSL_ENSURE(
m_pInputCfg,
"InputOptions not initialised :-(" );
940 bool bRepaint =
false;
941 bool bUpdateMarks =
false;
942 bool bUpdateRefDev =
false;
943 bool bCalcAll =
false;
944 bool bSaveAppOptions =
false;
945 bool bSaveInputOptions =
false;
946 bool bCompileErrorCells =
false;
957 bSaveAppOptions =
true;
963 bSaveAppOptions =
true;
969 bSaveAppOptions =
true;
974 sal_uInt16 nVal = pItem->GetValue();
980 bSaveAppOptions =
true;
1005 bCompileErrorCells =
true;
1048 if ( rOldOpt != rNewOpt )
1078 if ( rOldGridOpt != aNewGridOpt )
1107 bRepaint = ( bRepaint || ( rOldOpt != rNewOpt ) );
1108 bCalcAll = bRepaint &&
1130 sal_uInt16 nTabDist = pItem->GetValue();
1149 bool bDoAutoSpell = pItem->GetValue();
1167 if ( bOldAutoSpell != bDoAutoSpell )
1172 if ( pInputHandler )
1178 pBindings->
Invalidate( SID_AUTOSPELL_CHECK );
1185 aInputOptions.
SetMoveDir( pItem->GetValue() );
1186 bSaveInputOptions =
true;
1191 bSaveInputOptions =
true;
1196 bSaveInputOptions =
true;
1201 bSaveInputOptions =
true;
1206 bSaveInputOptions =
true;
1211 bSaveInputOptions =
true;
1216 bSaveInputOptions =
true;
1222 bSaveInputOptions =
true;
1223 bUpdateMarks =
true;
1227 bool bNew = pItem->GetValue();
1231 bSaveInputOptions =
true;
1232 bUpdateRefDev =
true;
1238 bSaveInputOptions =
true;
1244 bSaveInputOptions =
true;
1250 bSaveInputOptions =
true;
1263 if ( bSaveAppOptions )
1266 if ( bSaveInputOptions )
1270 if (pDoc && bCompileErrorCells)
1279 if ( pDoc && bCalcAll )
1291 if ( pViewSh && bUpdateMarks )
1295 if ( pViewSh && bRepaint )
1311 if ( !bUpdateRefDev )
1318 if (
auto pOneDocSh =
dynamic_cast<ScDocShell *
>(pObjSh) )
1320 pOneDocSh->CalcOutputFactor();
1321 SCTAB nTabCount = pOneDocSh->GetDocument().GetTableCount();
1322 for (
SCTAB nTab=0; nTab<nTabCount; nTab++)
1367 pViewSh = pCurViewSh;
1374 OSL_ENSURE( pHdl || !pViewSh,
"GetInputHdl: no InputHandler found!" );
1382 if ( pShell && pHdl )
1408 return pHdl && pHdl->
KeyInput( rKEvt, bStartEdit );
1563 pSfxApp->Broadcast(
SfxHint( SfxHintId::ScRefModeChanged ) );
1601 bool bIsModal =
false;
1610 IAnyRefDialog* pRefDlg =
dynamic_cast<IAnyRefDialog*
>(pChildWnd->
GetController().get());
1612 bIsModal = pChildWnd->
IsVisible() && pRefDlg &&
1613 !( pRefDlg->IsRefInputMode() && pRefDlg->IsDocAllowed(pDocSh) );
1639 bool bLocked =
false;
1649 IAnyRefDialog* pRefDlg =
dynamic_cast<IAnyRefDialog*
>(pChildWnd->
GetController().get());
1652 bLocked = pRefDlg->IsTableLocked();
1669 bool bIsOpen =
false;
1685 bool bIsFormula =
false;
1700 IAnyRefDialog* pRefDlg =
dynamic_cast<IAnyRefDialog*
>(pChildWnd->
GetController().get());
1702 bIsFormula = pChildWnd->
IsVisible() && pRefDlg && pRefDlg->IsRefInputMode();
1755 OSL_ENSURE( pChildWnd,
"NoChildWin" );
1769 IAnyRefDialog* pRefDlg =
dynamic_cast<IAnyRefDialog*
>(pChildWnd->
GetController().get());
1775 pRefDlg->HideReference(
false );
1776 pRefDlg->SetReference( aNew, rDoc );
1796 OSL_FAIL(
"SetReference without receiver");
1811 OSL_ENSURE( pChildWnd,
"NoChildWin" );
1816 IAnyRefDialog* pRefDlg =
dynamic_cast<IAnyRefDialog*
>(pChildWnd->
GetController().get());
1820 pRefDlg->AddRefEntry();
1851 OSL_ENSURE( pChildWnd,
"NoChildWin" );
1856 IAnyRefDialog* pRefDlg =
dynamic_cast<IAnyRefDialog*
>(pChildWnd->
GetController().get());
1860 pRefDlg->SetActive();
1895 m_aIdleTimer.Start();
1909 bMore = bLinks || bWidth;
1918 sal_uInt64 nOldTime = m_aIdleTimer.GetTimeout();
1919 sal_uInt64 nNewTime = nOldTime;
1937 if ( nNewTime != nOldTime )
1938 m_aIdleTimer.SetTimeout( nNewTime );
1941 m_aIdleTimer.Start();
1949 std::optional<SfxItemSet> pRet;
1950 if(SID_SC_EDITOPTIONS ==
nId)
1958 SID_ATTR_GRID_OPTIONS, SID_ATTR_GRID_OPTIONS,
1959 SID_ATTR_METRIC, SID_ATTR_METRIC,
1960 SID_ATTR_DEFTABSTOP, SID_ATTR_DEFTABSTOP,
1962 SID_SC_INPUT_LEGACY_CELL_SELECTION, SID_SC_OPT_SORT_REF_UPDATE,
1964 SID_SCFORMULAOPTIONS, SID_SCDEFAULTSOPTIONS,
1966 SID_SCVIEWOPTIONS, SID_SCDOCOPTIONS,
1968 SID_SC_INPUT_ENTER_PASTE_MODE, SID_SC_INPUT_ENTER_PASTE_MODE,
1970 SID_SCPRINTOPTIONS, SID_SCPRINTOPTIONS,
1972 SID_SC_INPUT_SELECTION, SID_SC_INPUT_MARK_HEADER,
1973 SID_SC_INPUT_TEXTWYSIWYG, SID_SC_INPUT_TEXTWYSIWYG,
1974 SID_SC_INPUT_REPLCELLSWARN, SID_SC_INPUT_REPLCELLSWARN,
1976 SID_SC_OPT_SYNCZOOM, SID_SC_OPT_KEY_BINDING_COMPAT>);
1996 sal::static_int_cast<sal_uInt16>(rAppOpt.
GetAppMetric()) ) );
2001 pRet->Put(
ScTpCalcItem( SID_SCDOCOPTIONS, aCalcOpt ) );
2026 pRet->Put(
SfxBoolItem( SID_SC_INPUT_REPLCELLSWARN,
2028 pRet->Put(
SfxBoolItem( SID_SC_INPUT_LEGACY_CELL_SELECTION,
2030 pRet->Put(
SfxBoolItem( SID_SC_INPUT_ENTER_PASTE_MODE,
2068 if(SID_SC_EDITOPTIONS ==
nId)
2076 std::unique_ptr<SfxTabPage> xRet;
2080 case SID_SC_TP_LAYOUT:
2083 if (ScTpLayoutOptionsCreate)
2084 xRet = (*ScTpLayoutOptionsCreate)(pPage, pController, &
rSet);
2087 case SID_SC_TP_CONTENT:
2090 if (ScTpContentOptionsCreate)
2091 xRet = (*ScTpContentOptionsCreate)(pPage, pController, &
rSet);
2094 case SID_SC_TP_GRID:
2097 case SID_SC_TP_USERLISTS:
2100 if (ScTpUserListsCreate)
2101 xRet = (*ScTpUserListsCreate)(pPage, pController, &
rSet);
2104 case SID_SC_TP_CALC:
2107 if (ScTpCalcOptionsCreate)
2108 xRet = (*ScTpCalcOptionsCreate)(pPage, pController, &
rSet);
2111 case SID_SC_TP_FORMULA:
2114 if (ScTpFormulaOptionsCreate)
2115 xRet = (*ScTpFormulaOptionsCreate)(pPage, pController, &
rSet);
2118 case SID_SC_TP_COMPATIBILITY:
2121 if (ScTpCompatOptionsCreate)
2122 xRet = (*ScTpCompatOptionsCreate)(pPage, pController, &
rSet);
2125 case SID_SC_TP_CHANGES:
2128 if (ScRedlineOptionsTabPageCreate)
2129 xRet =(*ScRedlineOptionsTabPageCreate)(pPage, pController, &
rSet);
2132 case RID_SC_TP_PRINT:
2135 if (ScTpPrintOptionsCreate)
2136 xRet = (*ScTpPrintOptionsCreate)(pPage, pController, &
rSet);
2139 case RID_SC_TP_DEFAULTS:
2142 if (ScTpDefaultsOptionsCreate)
2143 xRet = (*ScTpDefaultsOptionsCreate)(pPage, pController, &
rSet);
2148 OSL_ENSURE( xRet,
"ScModule::CreateTabPage(): no valid ID for TabPage!" );
2165 const OUString&
aURL = pURLField->GetURL();
2167 switch ( pURLField->GetFormat() )
2169 case SvxURLFormat::AppDefault:
2170 case SvxURLFormat::Repr:
2172 pInfo->SetRepresentation( pURLField->GetRepresentation() );
2176 case SvxURLFormat::Url:
2178 pInfo->SetRepresentation(
aURL );
2185 pInfo->SetTextColor( GetColorConfig().GetColorValue(eEntry).nColor );
2189 OSL_FAIL(
"Unknown Field");
2190 pInfo->SetRepresentation(OUString(
'?'));
2198 if (std::none_of(rlRefWindow.begin(), rlRefWindow.end(),
2199 [rWnd](
const std::pair<std::shared_ptr<SfxDialogController>,
weld::Window*>& rCandidate)
2201 return rCandidate.first.get() == rWnd.get();
2204 rlRefWindow.emplace_back(rWnd, pWndAncestor);
2215 std::vector<std::pair<std::shared_ptr<SfxDialogController>,
weld::Window*>> & rlRefWindow = iSlot->second;
2217 auto i = std::find_if(rlRefWindow.begin(), rlRefWindow.end(),
2218 [rWnd](
const std::pair<std::shared_ptr<SfxDialogController>,
weld::Window*>& rCandidate)
2220 return rCandidate.first.get() == rWnd.get();
2223 if(
i == rlRefWindow.end() )
2226 rlRefWindow.erase(
i );
2228 if( rlRefWindow.empty() )
2242 std::vector<std::pair<std::shared_ptr<SfxDialogController>,
weld::Window*>> & rlRefWindow = iSlot->second;
2244 for (
auto const& refWindow : rlRefWindow)
2245 if ( refWindow.second == pWndAncestor )
2246 return refWindow.first;
2285 bool bHasLang =
false;
2292 catch( uno::Exception& )
2294 OSL_FAIL(
"Error in Thesaurus");
2305 ScResId(STR_STYLE_FAMILY_CELL),
2306 BMP_STYLES_FAMILY_CELL,
2310 ScResId(STR_STYLE_FAMILY_PAGE),
2311 BMP_STYLES_FAMILY_PAGE,
2315 ScResId(STR_STYLE_FAMILY_GRAPHICS),
2316 BMP_STYLES_FAMILY_GRAPHICS,
2319 return aStyleFamilies;
SfxApplication * SfxGetpApp()
static bool AnyInput(VclInputFlags nType=VCL_INPUT_ANY)
sal_uInt32 GetValue() const
OUString AsRGBHexString() const
static INetURLHistory * GetOrCreate()
bool QueryUrl(const INetURLObject &rUrl) const
static css::lang::Locale convertToLocale(LanguageType nLangID, bool bResolveSystem=true)
static css::uno::Reference< css::linguistic2::XThesaurus > GetThesaurus()
static LanguageType resolveSystemLanguageByScriptType(LanguageType nLang, sal_Int16 nType)
void SetDigitLanguage(LanguageType)
virtual CreateTabPage GetTabPageCreatorFunc(sal_uInt16 nId)=0
static SC_DLLPUBLIC ScAbstractDialogFactory * Create()
void SetStatusFunc(sal_uInt32 nNew)
sal_uInt16 GetLRUFuncListCount() const
void SetKeyBindingType(ScOptionsUtil::KeyBindingType e)
FieldUnit GetAppMetric() const
void SetLRUFuncList(const sal_uInt16 *pList, const sal_uInt16 nCount)
void SetDetectiveAuto(bool bNew)
void SetAutoComplete(bool bNew)
bool GetSynchronizeZoom() const
void SetAppMetric(FieldUnit eUnit)
sal_uInt16 * GetLRUFuncList() const
bool GetAutoComplete() const
ScOptionsUtil::KeyBindingType GetKeyBindingType() const
bool GetDetectiveAuto() const
void SetSynchronizeZoom(bool bNew)
static sal_uInt16 DoUpdateCharts(const ScAddress &rPos, ScDocument &rDoc, bool bAllCharts)
void UpdateCharts(bool bAllCharts)
static void InitializeColors()
static void UpdateAllComments(ScDocument &rDoc)
on all tables
static Color GetArrowColor()
static bool IsColorsInitialized()
void UpdateAllArrowColors()
on all tables
static Color GetErrorColor()
static Color GetCommentColor()
sal_uInt16 GetYear2000() const
bool IsFormulaWildcardsEnabled() const
bool IsIgnoreCase() const
void SetTabDistance(sal_uInt16 nTabDist)
sal_uInt16 GetIterCount() const
void SetAutoSpell(bool bVal)
sal_uInt16 GetTabDistance() const
sal_uInt16 GetStdPrecision() const
bool IsMatchWholeCell() const
bool IsFormulaRegexEnabled() const
bool IsCalcAsShown() const
double GetIterEps() const
static weld::Window * GetActiveDialogParent()
void SetDocumentModified()
const ScDocument & GetDocument() const
ScTabViewShell * GetBestViewShell(bool bOnlyVisible=true)
void SetFormulaOptions(const ScFormulaOptions &rOpt, bool bForLoading=false)
static void ResetKeyBindings(ScOptionsUtil::KeyBindingType eType)
const ScCalcConfig & GetCalcConfig() const
bool CompileErrorCells(FormulaError nErrCode)
Re-compile formula cells with error.
SC_DLLPUBLIC SCROW MaxRow() const
SC_DLLPUBLIC void SetDocOptions(const ScDocOptions &rOpt)
void SetLanguage(LanguageType eLatin, LanguageType eCjk, LanguageType eCtl)
SC_DLLPUBLIC void SetViewOptions(const ScViewOptions &rOpt)
SC_DLLPUBLIC ScDrawLayer * GetDrawLayer()
SC_DLLPUBLIC void GetLanguage(LanguageType &rLatin, LanguageType &rCjk, LanguageType &rCtl) const
sc::DocumentLinkManager & GetDocLinkManager()
SC_DLLPUBLIC void CalcAll()
SC_DLLPUBLIC const ScDocOptions & GetDocOptions() const
static void InitTextHeight(const SfxItemPool *pPool)
static void SetUserList(const ScUserList *pNewList)
static SC_DLLPUBLIC ScUserList * GetUserList()
static SC_DLLPUBLIC void Clear()
todo: It should be possible to have MarkArrays for each table, in order to enable "search all" across...
SCTAB GetFirstSelected() const
SCTAB GetLastSelected() const
SCTAB GetSelectCount() const
void SetDragLink(const OUString &rDoc, const OUString &rTab, const OUString &rArea)
SC_DLLPUBLIC void SetDocOptions(const ScDocOptions &rOpt)
SC_DLLPUBLIC std::shared_ptr< SfxDialogController > Find1RefWindow(sal_uInt16 nSlotId, const weld::Window *pWndAncestor)
SC_DLLPUBLIC void UnregisterRefController(sal_uInt16 nSlotId, const std::shared_ptr< SfxDialogController > &rWnd)
void InputSetSelection(sal_Int32 nStart, sal_Int32 nEnd)
ScAddInCfg & GetAddInCfg()
ScNavipiCfg & GetNavipiCfg()
svtools::ColorConfig & GetColorConfig()
sal_uInt16 m_nCurRefDlgId
void SetRefInputHdl(ScInputHandler *pNew)
void ViewShellGone(const ScTabViewShell *pViewSh)
SC_DLLPUBLIC SvtUserOptions & GetUserOptions()
std::unique_ptr< ScNavipiCfg > m_pNavipiCfg
virtual std::optional< SfxItemSet > CreateItemSet(sal_uInt16 nId) override
Virtual methods for the OptionsDialog.
SC_DLLPUBLIC void RegisterAutomationApplicationEventsCaller(css::uno::Reference< ooo::vba::XSinkCaller > const &xCaller)
css::uno::Reference< ooo::vba::XSinkCaller > mxAutomationApplicationEventsCaller
void SetReference(const ScRange &rRef, ScDocument &rDoc, const ScMarkData *pMarkData=nullptr)
SC_DLLPUBLIC void RegisterRefController(sal_uInt16 nSlotId, std::shared_ptr< SfxDialogController > &rWnd, weld::Window *pWndAncestor)
ScInputHandler * GetInputHdl(ScTabViewShell *pViewSh=nullptr, bool bUseRef=true)
Input-Handler.
SC_DLLPUBLIC void SetRefDialog(sal_uInt16 nId, bool bVis, SfxViewFrame *pViewFrm=nullptr)
Reference dialogs.
void InputTurnOffWinEngine()
bool InputKeyEvent(const KeyEvent &rKEvt, bool bStartEdit=false)
SC_DLLPUBLIC const ScFormulaOptions & GetFormulaOptions()
std::map< sal_uInt16, std::vector< std::pair< std::shared_ptr< SfxDialogController >, weld::Window * > > > m_mapRefController
std::unique_ptr< svtools::ColorConfig > m_pColorConfig
std::unique_ptr< SvtCTLOptions > m_pCTLOptions
bool IsModalMode(SfxObjectShell *pDocSh=nullptr)
SC_DLLPUBLIC const ScPrintOptions & GetPrintOptions()
std::unique_ptr< ScInputCfg > m_pInputCfg
void SetViewOptions(const ScViewOptions &rOpt)
std::unique_ptr< SvtUserOptions > m_pUserOptions
void SetPrintOptions(const ScPrintOptions &rOpt)
virtual void ConfigurationChanged(utl::ConfigurationBroadcaster *, ConfigurationHints) override
ScSelectionTransferObj * m_pSelTransfer
std::unique_ptr< ScFormulaCfg > m_pFormulaCfg
std::unique_ptr< ScViewCfg, o3tl::default_delete< ScViewCfg > > m_pViewCfg
virtual ~ScModule() override
void SetInputMode(ScInputMode eMode, const OUString *pInitText=nullptr)
virtual std::optional< SfxStyleFamilies > CreateStyleFamilies() override
void InputGetSelection(sal_Int32 &rStart, sal_Int32 &rEnd)
rtl::Reference< ScMessagePool > m_pMessagePool
void ActivateInputWindow(const OUString *pStr=nullptr, bool bMatrix=false)
ScModule(SfxObjectFactory *pFact)
SC_DLLPUBLIC const ScDocOptions & GetDocOptions()
void InputReplaceSelection(std::u16string_view aStr)
SC_DLLPUBLIC const ScInputOptions & GetInputOptions()
void ViewShellChanged(bool bStopEditing)
std::unique_ptr< SvtAccessibilityOptions > m_pAccessOptions
void InputChanged(const EditView *pView)
const ScDragData & GetDragData() const
SC_DLLPUBLIC const ScAppOptions & GetAppOptions()
ScInputHandler * m_pRefInputHandler
SC_DLLPUBLIC void CallAutomationApplicationEventSinks(const OUString &Method, css::uno::Sequence< css::uno::Any > &Arguments)
static bool HasThesaurusLanguage(LanguageType nLang)
virtual std::unique_ptr< SfxTabPage > CreateTabPage(sal_uInt16 nId, weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet) override
std::unique_ptr< SfxErrorHandler > m_pErrorHdl
void SetSelectionTransfer(ScSelectionTransferObj *pNew)
SC_DLLPUBLIC void SetAppOptions(const ScAppOptions &rOpt)
static void GetSpellSettings(LanguageType &rDefLang, LanguageType &rCjkLang, LanguageType &rCtlLang, bool &rAutoSpell)
static void SetAutoSpellProperty(bool bSet)
std::unique_ptr< ScDefaultsCfg > m_pDefaultsCfg
std::unique_ptr< ScDragData > m_pDragData
void AddRefEntry()
Multiple selection.
void SetDragJump(ScDocument *pLocalDoc, const OUString &rTarget, const OUString &rText)
SC_DLLPUBLIC void SetFormulaOptions(const ScFormulaOptions &rOpt)
SC_DLLPUBLIC void InputEnterHandler(ScEnterMode nBlockMode=ScEnterMode::NORMAL, bool bBeforeSavingInLOK=false)
std::unique_ptr< ScAppCfg, o3tl::default_delete< ScAppCfg > > m_pAppCfg
void Execute(SfxRequest &rReq)
std::unique_ptr< ScPrintCfg > m_pPrintCfg
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
void ModifyOptions(const SfxItemSet &rOptSet)
Options.
void InsertEntryToLRUList(sal_uInt16 nFIndex)
std::unique_ptr< ScDocCfg, o3tl::default_delete< ScDocCfg > > m_pDocCfg
void InputCancelHandler()
static ScDocument * GetClipDoc()
SC_DLLPUBLIC const ScDefaultsOptions & GetDefaultsOptions()
void GetState(SfxItemSet &rSet)
void InputSelection(const EditView *pView)
void SetDragObject(ScTransferObj *pCellObj, ScDrawTransferObj *pDrawObj)
static void HideDisabledSlots(SfxItemSet &rSet)
const ScViewOptions & GetViewOptions()
virtual void ApplyItemSet(sal_uInt16 nId, const SfxItemSet &rSet) override
SC_DLLPUBLIC void SetInputOptions(const ScInputOptions &rOpt)
SC_DLLPUBLIC void SetDefaultsOptions(const ScDefaultsOptions &rOpt)
void AnythingChanged()
Idle/OnlineSpelling.
static LanguageType GetOptDigitLanguage()
std::unique_ptr< ScAddInCfg > m_pAddInCfg
const ScDragData & GetDragData() const
static css::uno::Reference< css::datatransfer::XTransferable2 > GetClipData(vcl::Window *pWin)
void UpdateInputHandler(bool bForce=false, bool bStopEditing=true)
void SetDragObject(ScTransferObj *pCellObj, ScDrawTransferObj *pDrawObj)
static ScTabViewShell * GetActiveViewShell()
const ScInputHandler * GetInputHandler() const
void SetDragJump(ScDocument *pLocalDoc, const OUString &rTarget, const OUString &rText)
void SetDragLink(const OUString &rDoc, const OUString &rTab, const OUString &rArea)
void UpdateAutoFillMark(bool bFromPaste=false)
void EnableAutoSpell(bool bEnable)
void UpdateDrawTextOutliner()
void UpdateAnchorHandles()
ScViewData & GetViewData()
void SetZoom(const Fraction &rNewX, const Fraction &rNewY, bool bAll)
ScDocument * GetDocument() const
static SC_DLLPUBLIC ScTransferObj * GetOwnClipboard(const css::uno::Reference< css::datatransfer::XTransferable2 > &)
void SetUserList(const ScUserList &rUserList)
Collection of user-defined sort lists.
void SetOptions(const ScViewOptions &rOpt)
const ScViewOptions & GetOptions() const
const Fraction & GetZoomY() const
ScDocument & GetDocument() const
ScGridWindow * GetActiveWin()
const Fraction & GetZoomX() const
std::unique_ptr< SvxGridItem > CreateGridItem() const
void SetColorSchemeName(const OUString &rName)
const ScGridOptions & GetGridOptions() const
bool GetOption(ScViewOption eOpt) const
void SetDocColor(const Color &rDocColor)
void SetGridOptions(const ScGridOptions &rNew)
static void HideDisabledSlot(SfxItemSet &rSet, SfxBindings &rBindings, sal_uInt16 nSlotId)
void SetDefaultTabulator(sal_uInt16 nVal)
static ErrCode CallAppBasic(const OUString &i_macroName)
void Update(sal_uInt16 nId)
void Invalidate(sal_uInt16 nId)
std::shared_ptr< SfxDialogController > & GetController()
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
void DisableItem(sal_uInt16 nWhich)
static void notifyViewRenderState(SfxViewShell const *pViewShell, vcl::ITiledRenderable *pDoc)
std::locale GetResLocale() const
static SAL_WARN_UNUSED_RESULT SfxObjectShell * GetNext(const SfxObjectShell &rPrev, const std::function< bool(const SfxObjectShell *)> &isObjectShell=nullptr, bool bOnlyVisible=true)
static SAL_WARN_UNUSED_RESULT SfxObjectShell * GetFirst(const std::function< bool(const SfxObjectShell *)> &isObjectShell=nullptr, bool bOnlyVisible=true)
static SAL_WARN_UNUSED_RESULT SfxObjectShell * Current()
sal_uInt16 GetSlot() const
const SfxItemSet * GetArgs() const
const T * GetArg(sal_uInt16 nSlotId) const
void AppendItem(const SfxPoolItem &)
void Done(bool bRemove=false)
void PutItem(const SfxPoolItem &rItem)
SfxItemPool & GetPool() const
SfxViewShell * GetViewShell() const
static SAL_WARN_UNUSED_RESULT SfxViewFrame * Current()
vcl::Window & GetWindow() const
SfxBindings & GetBindings()
void SetChildWindow(sal_uInt16 nId, bool bVisible, bool bSetFocus=true)
static SAL_WARN_UNUSED_RESULT SfxViewFrame * GetNext(const SfxViewFrame &rPrev, const SfxObjectShell *pDoc=nullptr, bool bOnlyVisible=true)
SfxChildWindow * GetChildWindow(sal_uInt16)
static SAL_WARN_UNUSED_RESULT SfxViewFrame * GetFirst(const SfxObjectShell *pDoc=nullptr, bool bOnlyVisible=true)
SfxInPlaceClient * GetUIActiveClient() const
virtual void libreOfficeKitViewCallback(int nType, const OString &pPayload) const override
static SAL_WARN_UNUSED_RESULT SfxViewShell * GetNext(const SfxViewShell &rPrev, bool bOnlyVisible=true, const std::function< bool(const SfxViewShell *)> &isViewShell=nullptr)
static SAL_WARN_UNUSED_RESULT SfxViewShell * GetFirst(bool bOnlyVisible=true, const std::function< bool(const SfxViewShell *)> &isViewShell=nullptr)
static SAL_WARN_UNUSED_RESULT SfxViewShell * Current()
vcl::Window * GetWindow() const
static TextNumerals GetCTLTextNumerals()
void GetOptions(SvtLinguOptions &rOptions) const
bool SetProperty(std::u16string_view rPropertyName, const css::uno::Any &rValue)
const SvxFieldData * GetField() const
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rAttrSet)
void SetTimeout(sal_uInt64 nTimeoutMs)
sal_uInt64 GetTimeout() const
::OutputDevice const * GetOutDev() const
void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
css::uno::Reference< css::datatransfer::clipboard::XClipboard > GetClipboard()
#define DBG_UNHANDLED_EXCEPTION(...)
@ StartListening
If set, cloned formula cells will start to listen to the document.
#define LANGUAGE_ARABIC_SAUDI_ARABIA
#define LANGUAGE_ENGLISH_US
#define LINK(Instance, Class, Member)
LanguageType GetLanguage(SfxItemSet const &aSet, sal_uInt16 nLangWhichId)
static constexpr auto Items
#define SFX_OBJECTBAR_APPLICATION
OUString ScResId(TranslateId aId)
constexpr TypedWhichId< SvxLanguageItem > ATTR_CTL_FONT_LANGUAGE(120)
constexpr TypedWhichId< SvxLanguageItem > ATTR_CJK_FONT_LANGUAGE(115)
static SfxChildWindow * lcl_GetChildWinFromAnyView(sal_uInt16 nId)
void global_InitAppOptions()
static SfxChildWindow * lcl_GetChildWinFromCurrentView(sal_uInt16 nId)
static sal_uInt16 nIdleCount
IMPL_LINK(ScModule, CalcFieldValueHdl, EditFieldInfo *, pInfo, void)
static void lcl_CheckNeedsRepaint(const ScDocShell *pDocShell)
IMPL_LINK_NOARG(ScModule, IdleHandler, Timer *, void)
static void lcl_MarkedTabs(const ScMarkData &rMark, SCTAB &rStartTab, SCTAB &rEndTab)
constexpr OUStringLiteral LINGUPROP_AUTOSPELL
#define SFX_IMPL_INTERFACE(Class, SuperClass)
Configuration options for formula interpreter.
void MergeDocumentSpecific(const ScCalcConfig &r)
LanguageType nDefaultLanguage
LanguageType nDefaultLanguage_CTL
LanguageType nDefaultLanguage_CJK
std::vector< SfxStyleFamilyItem > SfxStyleFamilies