LibreOffice Module sc (master)  1
docsh6.cxx
Go to the documentation of this file.
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 #include <scitems.hxx>
21 
22 #include <svx/pageitem.hxx>
23 #include <sfx2/linkmgr.hxx>
24 
25 #include <docsh.hxx>
26 
27 #include <stlpool.hxx>
28 #include <global.hxx>
29 #include <viewdata.hxx>
30 #include <tabvwsh.hxx>
31 #include <tablink.hxx>
32 #include <globstr.hrc>
33 #include <scresid.hxx>
34 #include <scmod.hxx>
35 #include <compiler.hxx>
36 #include <interpre.hxx>
37 #include <formulaopt.hxx>
38 
39 #include <vcl/svapp.hxx>
40 #include <vcl/weld.hxx>
41 
42 #include <memory>
43 #include <utility>
44 
45 namespace {
46 
47 struct ScStylePair
48 {
49  SfxStyleSheetBase *pSource;
50  SfxStyleSheetBase *pDest;
51 };
52 
53 }
54 
55 // Ole
56 
57 void ScDocShell::SetVisArea( const tools::Rectangle & rVisArea )
58 {
59  // with the SnapVisArea call in SetVisAreaOrSize, it's safe to always
60  // use both the size and position of the VisArea
61  SetVisAreaOrSize( rVisArea );
62 }
63 
64 static void lcl_SetTopRight( tools::Rectangle& rRect, const Point& rPos )
65 {
66  Size aSize = rRect.GetSize();
67  rRect.SetRight( rPos.X() );
68  rRect.SetLeft( rPos.X() - aSize.Width() + 1 );
69  rRect.SetTop( rPos.Y() );
70  rRect.SetBottom( rPos.Y() + aSize.Height() - 1 );
71 }
72 
74 {
75  bool bNegativePage = m_pDocument->IsNegativePage( m_pDocument->GetVisibleTab() );
76 
77  tools::Rectangle aArea = rVisArea;
78  // when loading, don't check for negative values, because the sheet orientation
79  // might be set later
80  if ( !m_pDocument->IsImportingXML() )
81  {
82  if ( ( bNegativePage ? (aArea.Right() > 0) : (aArea.Left() < 0) ) || aArea.Top() < 0 )
83  {
84  // VisArea start position can't be negative.
85  // Move the VisArea, otherwise only the upper left position would
86  // be changed in SnapVisArea, and the size would be wrong.
87 
88  Point aNewPos( 0, std::max( aArea.Top(), tools::Long(0) ) );
89  if ( bNegativePage )
90  {
91  aNewPos.setX( std::min( aArea.Right(), tools::Long(0) ) );
92  lcl_SetTopRight( aArea, aNewPos );
93  }
94  else
95  {
96  aNewPos.setX( std::max( aArea.Left(), tools::Long(0) ) );
97  aArea.SetPos( aNewPos );
98  }
99  }
100  }
101 
102  // adjust position here!
103 
104  // when loading an ole object, the VisArea is set from the document's
105  // view settings and must be used as-is (document content may not be complete yet).
106  if ( !m_pDocument->IsImportingXML() )
107  SnapVisArea( aArea );
108 
109  //TODO/LATER: it's unclear which IPEnv is used here
110  /*
111  SvInPlaceEnvironment* pEnv = GetIPEnv();
112  if (pEnv)
113  {
114  vcl::Window* pWin = pEnv->GetEditWin();
115  pEnv->MakeScale( aArea.GetSize(), MapUnit::Map100thMM,
116  pWin->LogicToPixel( aArea.GetSize() ) );
117  } */
118 
119  //TODO/LATER: formerly in SvInplaceObject
121 
122  if (m_bIsInplace) // adjust zoom in the InPlace View
123  {
125  if (pViewSh)
126  {
127  if (pViewSh->GetViewData().GetDocShell() == this)
128  pViewSh->UpdateOleZoom();
129  }
130  }
131 
132  if (!m_pDocument->IsEmbedded())
133  return;
134 
135  ScRange aOld;
136  m_pDocument->GetEmbedded( aOld);
137  m_pDocument->SetEmbedded( m_pDocument->GetVisibleTab(), aArea );
138  ScRange aNew;
139  m_pDocument->GetEmbedded( aNew);
140  if (aOld != aNew)
141  PostPaint(0,0,0,m_pDocument->MaxCol(),m_pDocument->MaxRow(),MAXTAB,PaintPartFlags::Grid);
142 
143  //TODO/LATER: currently not implemented
144  //ViewChanged( ASPECT_CONTENT ); // show in the container as well
145 }
146 
147 bool ScDocShell::IsOle() const
148 {
149  return (GetCreateMode() == SfxObjectCreateMode::EMBEDDED);
150 }
151 
152 void ScDocShell::UpdateOle(const ScViewData& rViewData, bool bSnapSize)
153 {
154  // if it isn't Ole at all, one can be spared the calculations
155  // (VisArea will then be reset at the save)
156 
157  if (GetCreateMode() == SfxObjectCreateMode::STANDARD)
158  return;
159 
161  tools::Rectangle aNewArea = aOldArea;
162 
163  bool bEmbedded = m_pDocument->IsEmbedded();
164  if (bEmbedded)
165  aNewArea = m_pDocument->GetEmbeddedRect();
166  else
167  {
168  SCTAB nTab = rViewData.GetTabNo();
169  if ( nTab != m_pDocument->GetVisibleTab() )
170  m_pDocument->SetVisibleTab( nTab );
171 
172  bool bNegativePage = m_pDocument->IsNegativePage( nTab );
173  SCCOL nX = rViewData.GetPosX(SC_SPLIT_LEFT);
174  if ( nX != m_pDocument->GetPosLeft() )
175  m_pDocument->SetPosLeft( nX );
176  SCROW nY = rViewData.GetPosY(SC_SPLIT_BOTTOM);
177  if ( nY != m_pDocument->GetPosTop() )
178  m_pDocument->SetPosTop( nY );
179  tools::Rectangle aMMRect = m_pDocument->GetMMRect( nX,nY, nX,nY, nTab );
180  if (bNegativePage)
181  lcl_SetTopRight( aNewArea, aMMRect.TopRight() );
182  else
183  aNewArea.SetPos( aMMRect.TopLeft() );
184  if (bSnapSize)
185  SnapVisArea(aNewArea); // uses the new VisibleTab
186  }
187 
188  if (aNewArea != aOldArea)
189  SetVisAreaOrSize( aNewArea ); // the start must also be adjusted here
190 }
191 
192 // Style stuff for Organizer, etc.
193 
195 {
196  return static_cast<SfxStyleSheetBasePool*>(m_pDocument->GetStyleSheetPool());
197 }
198 
199 // After loading styles from another document (LoadStyles, Insert), the SetItems
200 // (ATTR_PAGE_HEADERSET, ATTR_PAGE_FOOTERSET) must be converted to the correct pool
201 // before the source pool is deleted.
202 
203 static void lcl_AdjustPool( SfxStyleSheetBasePool* pStylePool )
204 {
205  SfxStyleSheetBase *pStyle = pStylePool->First(SfxStyleFamily::Page);
206  while ( pStyle )
207  {
208  SfxItemSet& rStyleSet = pStyle->GetItemSet();
209 
210  if (const SvxSetItem* pItem = rStyleSet.GetItemIfSet(ATTR_PAGE_HEADERSET,false))
211  {
212  const SfxItemSet& rSrcSet = pItem->GetItemSet();
213  SfxItemSet aDestSet(*rStyleSet.GetPool(),rSrcSet.GetRanges());
214  aDestSet.Put(rSrcSet);
215  rStyleSet.Put(SvxSetItem(ATTR_PAGE_HEADERSET, std::move(aDestSet)));
216  }
217  if (const SvxSetItem* pItem = rStyleSet.GetItemIfSet(ATTR_PAGE_FOOTERSET,false))
218  {
219  const SfxItemSet& rSrcSet = pItem->GetItemSet();
220  SfxItemSet aDestSet(*rStyleSet.GetPool(),rSrcSet.GetRanges());
221  aDestSet.Put(rSrcSet);
222  rStyleSet.Put(SvxSetItem(ATTR_PAGE_FOOTERSET, std::move(aDestSet)));
223  }
224 
225  pStyle = pStylePool->Next();
226  }
227 }
228 
230 {
231  m_pDocument->StylesToNames();
232 
234  lcl_AdjustPool( GetStyleSheetPool() ); // adjust SetItems
235 
236  m_pDocument->UpdStlShtPtrsFrmNms();
237 
239 
240  // Paint
241 
243 }
244 
245 void ScDocShell::LoadStylesArgs( ScDocShell& rSource, bool bReplace, bool bCellStyles, bool bPageStyles )
246 {
247  // similar to LoadStyles, but with selectable behavior for XStyleLoader::loadStylesFromURL call
248 
249  if ( !bCellStyles && !bPageStyles ) // nothing to do
250  return;
251 
252  ScStyleSheetPool* pSourcePool = rSource.GetDocument().GetStyleSheetPool();
253  ScStyleSheetPool* pDestPool = m_pDocument->GetStyleSheetPool();
254 
255  SfxStyleFamily eFamily = bCellStyles ?
256  ( bPageStyles ? SfxStyleFamily::All : SfxStyleFamily::Para ) :
257  SfxStyleFamily::Page;
258  SfxStyleSheetIterator aIter( pSourcePool, eFamily );
259  sal_uInt16 nSourceCount = aIter.Count();
260  if ( nSourceCount == 0 )
261  return; // no source styles
262 
263  std::unique_ptr<ScStylePair[]> pStyles(new ScStylePair[ nSourceCount ]);
264  sal_uInt16 nFound = 0;
265 
266  // first create all new styles
267 
268  SfxStyleSheetBase* pSourceStyle = aIter.First();
269  while (pSourceStyle)
270  {
271  OUString aName = pSourceStyle->GetName();
272  SfxStyleSheetBase* pDestStyle = pDestPool->Find( pSourceStyle->GetName(), pSourceStyle->GetFamily() );
273  if ( pDestStyle )
274  {
275  // touch existing styles only if replace flag is set
276  if ( bReplace )
277  {
278  pStyles[nFound].pSource = pSourceStyle;
279  pStyles[nFound].pDest = pDestStyle;
280  ++nFound;
281  }
282  }
283  else
284  {
285  pStyles[nFound].pSource = pSourceStyle;
286  pStyles[nFound].pDest = &pDestPool->Make( aName, pSourceStyle->GetFamily(), pSourceStyle->GetMask() );
287  ++nFound;
288  }
289 
290  pSourceStyle = aIter.Next();
291  }
292 
293  // then copy contents (after inserting all styles, for parent etc.)
294 
295  for ( sal_uInt16 i = 0; i < nFound; ++i )
296  {
297  pStyles[i].pDest->GetItemSet().PutExtended(
298  pStyles[i].pSource->GetItemSet(), SfxItemState::DONTCARE, SfxItemState::DEFAULT);
299  if(pStyles[i].pSource->HasParentSupport())
300  pStyles[i].pDest->SetParent(pStyles[i].pSource->GetParent());
301  // follow is never used
302  }
303 
304  lcl_AdjustPool( GetStyleSheetPool() ); // adjust SetItems
306  PostPaint( 0,0,0, m_pDocument->MaxCol(),m_pDocument->MaxRow(),MAXTAB, PaintPartFlags::Grid | PaintPartFlags::Left ); // Paint
307 }
308 
310 {
311  ::sfx2::LinkManager* pLinkManager = m_pDocument->GetLinkManager();
312  if (!pLinkManager)
313  return;
314 
315  pLinkManager->ReconnectDdeLink(rServer);
316 }
317 
319 {
320  typedef std::unordered_set<OUString> StrSetType;
321 
322  sfx2::LinkManager* pLinkManager = m_pDocument->GetLinkManager();
323  StrSetType aNames;
324 
325  // out with the no longer used links
326 
327  size_t nCount = pLinkManager->GetLinks().size();
328  for (size_t k=nCount; k>0; )
329  {
330  --k;
331  ::sfx2::SvBaseLink* pBase = pLinkManager->GetLinks()[k].get();
332  if (ScTableLink* pTabLink = dynamic_cast<ScTableLink*>(pBase))
333  {
334  if (pTabLink->IsUsed())
335  aNames.insert(pTabLink->GetFileName());
336  else // no longer used -> delete
337  {
338  pTabLink->SetAddUndo(true);
339  pLinkManager->Remove(k);
340  }
341  }
342  }
343 
344  // enter new links
345 
346  SCTAB nTabCount = m_pDocument->GetTableCount();
347  for (SCTAB i = 0; i < nTabCount; ++i)
348  {
349  if (!m_pDocument->IsLinked(i))
350  continue;
351 
352  OUString aDocName = m_pDocument->GetLinkDoc(i);
353  OUString aFltName = m_pDocument->GetLinkFlt(i);
354  OUString aOptions = m_pDocument->GetLinkOpt(i);
355  sal_uLong nRefresh = m_pDocument->GetLinkRefreshDelay(i);
356  bool bThere = false;
357  for (SCTAB j = 0; j < i && !bThere; ++j) // several times in the document?
358  {
359  if (m_pDocument->IsLinked(j)
360  && m_pDocument->GetLinkDoc(j) == aDocName
361  && m_pDocument->GetLinkFlt(j) == aFltName
362  && m_pDocument->GetLinkOpt(j) == aOptions)
363  // Ignore refresh delay in compare, it should be the
364  // same for identical links and we don't want dupes
365  // if it ain't.
366  bThere = true;
367  }
368 
369  if (!bThere) // already entered as filter?
370  {
371  if (!aNames.insert(aDocName).second)
372  bThere = true;
373  }
374 
375  if (!bThere)
376  {
377  ScTableLink* pLink = new ScTableLink( this, aDocName, aFltName, aOptions, nRefresh );
378  pLink->SetInCreate(true);
379  pLinkManager->InsertFileLink(*pLink, sfx2::SvBaseLinkObjectType::ClientFile, aDocName, &aFltName);
380  pLink->Update();
381  pLink->SetInCreate(false);
382  }
383  }
384 }
385 
387 {
388  sfx2::LinkManager* pLinkManager = m_pDocument->GetLinkManager();
389 
390  bool bAny = false;
391  size_t nCount = pLinkManager->GetLinks().size();
392  for (size_t i=0; i<nCount; i++ )
393  {
394  ::sfx2::SvBaseLink* pBase = pLinkManager->GetLinks()[i].get();
395  if (ScTableLink* pTabLink = dynamic_cast<ScTableLink*>(pBase))
396  {
397 // pTabLink->SetAddUndo(sal_False); //! merge Undos
398 
399  // Painting only after Update() makes no sense:
400  // ScTableLink::Refresh() will post a Paint only is bDoPaint is true
401  // pTabLink->SetPaint(false); // Paint only once at the end
402  pTabLink->Update();
403  //pTabLink->SetPaint(true);
404 // pTabLink->SetAddUndo(sal_True);
405  bAny = true;
406  }
407  }
408 
409  if ( bAny )
410  {
411  // Paint only once
412  PostPaint( ScRange(0,0,0,m_pDocument->MaxCol(),m_pDocument->MaxRow(),MAXTAB),
414 
416  }
417 }
418 
419 void ScDocShell::SetFormulaOptions( const ScFormulaOptions& rOpt, bool bForLoading )
420 {
421  m_pDocument->SetGrammar( rOpt.GetFormulaSyntax() );
422 
423  // This is nasty because it resets module globals from within a docshell!
424  // For actual damage caused see fdo#82183 where an unconditional
425  // ScGlobal::ResetFunctionList() (without checking GetUseEnglishFuncName())
426  // lead to a crash because the function list was still used by the Formula
427  // Wizard when loading the second document.
428  // Do the stupid stuff only when we're not called while loading a document.
429 
430  /* TODO: bForLoading is a workaround, rather get rid of setting any
431  * globals from per document instances like ScDocShell. */
432 
433  /* XXX this is utter crap, we rely on the options being set here at least
434  * once, for the very first document, empty or loaded. */
435  static bool bInitOnce = true;
436 
437  if (!bForLoading || bInitOnce)
438  {
439  bool bForceInit = bInitOnce;
440  bInitOnce = false;
441  if (bForceInit || rOpt.GetUseEnglishFuncName() != SC_MOD()->GetFormulaOptions().GetUseEnglishFuncName())
442  {
443  // This needs to be called first since it may re-initialize the entire
444  // opcode map.
445  if (rOpt.GetUseEnglishFuncName())
446  {
447  // switch native symbols to English.
449  ScCompiler::OpCodeMapPtr xMap = aComp.GetOpCodeMap(css::sheet::FormulaLanguage::ENGLISH);
451  }
452  else
453  // re-initialize native symbols with localized function names.
455 
456  // Force re-population of function names for the function wizard, function tip etc.
458  }
459 
460  // Update the separators.
463 
464  // Global interpreter settings.
466  }
467 
468  // Per document interpreter settings.
469  m_pDocument->SetCalcConfig( rOpt.GetCalcConfig() );
470 }
471 
473 {
475  // no need to check repeatedly.
476  return;
477 
478  OUString aDecSep = ScGlobal::getLocaleData().getNumDecimalSep();
479  OUString aDecSepAlt = ScGlobal::getLocaleData().getNumDecimalSepAlt();
480 
481  ScModule* pScMod = SC_MOD();
482  const ScFormulaOptions& rOpt=pScMod->GetFormulaOptions();
483  const OUString& aSepArg = rOpt.GetFormulaSepArg();
484  const OUString& aSepArrRow = rOpt.GetFormulaSepArrayRow();
485  const OUString& aSepArrCol = rOpt.GetFormulaSepArrayCol();
486 
487  if (aDecSep == aSepArg || aDecSep == aSepArrRow || aDecSep == aSepArrCol ||
488  aDecSepAlt == aSepArg || aDecSepAlt == aSepArrRow || aDecSepAlt == aSepArrCol)
489  {
490  // One of arg separators conflicts with the current decimal
491  // separator. Reset them to default.
492  ScFormulaOptions aNew = rOpt;
493  aNew.ResetFormulaSeparators();
494  SetFormulaOptions(aNew);
495  pScMod->SetFormulaOptions(aNew);
496 
497  // Launch a nice warning dialog to let the users know of this change.
498  ScTabViewShell* pViewShell = GetBestViewShell();
499  if (pViewShell)
500  {
501  std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pViewShell->GetFrameWeld(),
502  VclMessageType::Info, VclButtonsType::Ok,
503  ScResId(STR_OPTIONS_WARN_SEPARATORS)));
504  xInfoBox->run();
505  }
506 
507  // For now, this is the only option setting that could launch info
508  // dialog. But in the future we may want to implement a nicer
509  // dialog to display a list of warnings in case we have several
510  // pieces of information to display.
511  }
512 
514 }
515 
516 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void SetPos(const Point &rPoint)
void UpdateLinks() override
Definition: docsh6.cxx:318
SfxStyleSheetBase * First(SfxStyleFamily eFamily, SfxStyleSearchBits eMask=SfxStyleSearchBits::All)
virtual void SetVisArea(const tools::Rectangle &rVisArea)
ScDocShell * GetDocShell() const
Definition: viewdata.hxx:354
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
OUString ScResId(TranslateId aId)
Definition: scdll.cxx:90
void UpdateOleZoom()
Definition: tabvwsh4.cxx:323
virtual void ReconnectDdeLink(SfxObjectShell &rServer) override
Definition: docsh6.cxx:309
constexpr tools::Long Left() const
virtual SfxStyleSheetBasePool * GetStyleSheetPool() override
Definition: docsh6.cxx:194
void InsertFileLink(sfx2::SvBaseLink &, SvBaseLinkObjectType nFileType, std::u16string_view rFileNm, const OUString *pFilterNm=nullptr, const OUString *pRange=nullptr)
sal_uIntPtr sal_uLong
long Long
const WhichRangesContainer & GetRanges() const
bool GetUseEnglishFuncName() const
Definition: formulaopt.hxx:47
void SetDocumentModified()
Definition: docsh.cxx:2959
SCTAB GetTabNo() const
Definition: viewdata.hxx:395
static void SetNativeSymbols(const OpCodeMapPtr &xMap)
virtual SfxItemSet & GetItemSet()
SfxStyleFamily GetFamily() const
void SetVisAreaOrSize(const tools::Rectangle &rVisArea)
Definition: docsh6.cxx:73
const OUString & GetFormulaSepArrayRow() const
Definition: formulaopt.hxx:56
SCCOL GetPosX(ScHSplitPos eWhich, SCTAB nForTab=-1) const
Definition: viewdata.cxx:1402
SfxStyleSearchBits GetMask() const
void UpdateAllRowHeights(const ScMarkData *pTabMark=nullptr)
Definition: docsh5.cxx:422
void SetFormulaOptions(const ScFormulaOptions &rOpt, bool bForLoading=false)
Definition: docsh6.cxx:419
constexpr tools::Long Width() const
static SC_DLLPUBLIC const LocaleDataWrapper & getLocaleData()
Definition: global.cxx:1015
const OUString & GetName() const
int nCount
bool IsConfigOptionsChecked() const
SfxStyleFamily
SfxObjectCreateMode GetCreateMode() const
SCROW GetPosY(ScVSplitPos eWhich, SCTAB nForTab=-1) const
Definition: viewdata.cxx:1416
ScViewData & GetViewData()
Definition: tabview.hxx:333
OpCodeMapPtr GetOpCodeMap(const sal_Int32 nLanguage) const
constexpr void SetLeft(tools::Long v)
static void SetGlobalConfig(const ScCalcConfig &rConfig)
Definition: interpr4.cxx:3885
const OUString & getNumDecimalSep() const
ScCalcConfig & GetCalcConfig()
Definition: formulaopt.hxx:42
static void lcl_AdjustPool(SfxStyleSheetBasePool *pStylePool)
Definition: docsh6.cxx:203
const SvBaseLinks & GetLinks() const
int i
constexpr TypedWhichId< SvxSetItem > ATTR_PAGE_HEADERSET(184)
void Remove(SvBaseLink const *pLink)
sal_Int16 SCCOL
Definition: types.hxx:21
SC_DLLPUBLIC const ScFormulaOptions & GetFormulaOptions()
Definition: scmod.cxx:806
void ReconnectDdeLink(SfxObjectShell &rServer)
#define SC_MOD()
Definition: scmod.hxx:249
static void UpdateSeparatorsNative(const OUString &rSep, const OUString &rArrayColSep, const OUString &rArrayRowSep)
constexpr tools::Long Right() const
virtual void LoadStyles(SfxObjectShell &rSource) override
Definition: docsh6.cxx:229
void PutExtended(const SfxItemSet &, SfxItemState eDontCareAs, SfxItemState eDefaultAs)
constexpr tools::Long Top() const
std::shared_ptr< ScDocument > m_pDocument
Definition: docsh.hxx:82
constexpr void SetRight(tools::Long v)
constexpr void SetBottom(tools::Long v)
const tools::Rectangle & GetVisArea() const
const SCTAB MAXTAB
Definition: address.hxx:70
void ReloadTabLinks()
Definition: docsh6.cxx:386
void PostPaint(SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, PaintPartFlags nPart, sal_uInt16 nExtFlags=0)
Definition: docsh3.cxx:101
SfxItemPool * GetPool() const
constexpr void SetTop(tools::Long v)
virtual void LoadStyles(SfxObjectShell &rSource)
constexpr Point TopLeft() const
const OUString & GetFormulaSepArg() const
Definition: formulaopt.hxx:53
const OUString & GetFormulaSepArrayCol() const
Definition: formulaopt.hxx:59
const OUString & getNumDecimalSepAlt() const
SC_DLLPUBLIC void SetFormulaOptions(const ScFormulaOptions &rOpt)
Definition: scmod.cxx:798
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
sal_Int32 SCROW
Definition: types.hxx:17
void UpdateOle(const ScViewData &rViewData, bool bSnapSize=false)
Definition: docsh6.cxx:152
constexpr Size GetSize() const
static ScTabViewShell * GetActiveViewShell()
Definition: tabvwsh4.cxx:1075
weld::Window * GetFrameWeld() const
SvBaseLink * pLink
constexpr tools::Long Height() const
bool IsOle() const
Definition: docsh6.cxx:147
void SetConfigOptionsChecked(bool bChecked)
SfxStyleSheetBase * Next()
virtual SfxStyleSheetBase & Make(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits nMask=SfxStyleSearchBits::All) override
Definition: stlpool.cxx:72
OUString aName
constexpr Point TopRight() const
const ScDocument & GetDocument() const
Definition: docsh.hxx:220
::formula::FormulaGrammar::Grammar GetFormulaSyntax() const
Definition: formulaopt.hxx:40
SC_DLLPUBLIC ScStyleSheetPool * GetStyleSheetPool() const
Definition: document.cxx:6161
void CheckConfigOptions()
Called when the Options dialog is dismissed with the OK button, to handle potentially conflicting opt...
Definition: docsh6.cxx:472
ScTabViewShell * GetBestViewShell(bool bOnlyVisible=true)
Definition: docsh4.cxx:2608
virtual void SetVisArea(const tools::Rectangle &rVisArea) override
Definition: docsh6.cxx:57
bool m_bIsInplace
Definition: docsh.hxx:92
std::shared_ptr< const OpCodeMap > OpCodeMapPtr
void ResetFormulaSeparators()
Definition: formulaopt.cxx:44
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
constexpr TypedWhichId< SvxSetItem > ATTR_PAGE_FOOTERSET(185)
void SnapVisArea(tools::Rectangle &rRect) const
Definition: docsh4.cxx:2333
static void ResetNativeSymbols()
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, bool bMobile=false)
static void lcl_SetTopRight(tools::Rectangle &rRect, const Point &rPos)
Definition: docsh6.cxx:64
static void ResetFunctionList()
Definition: global.cxx:638
sal_Int16 SCTAB
Definition: types.hxx:22
void LoadStylesArgs(ScDocShell &rSource, bool bReplace, bool bCellStyles, bool bPageStyles)
Definition: docsh6.cxx:245