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_aDocument.IsNegativePage( m_aDocument.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_aDocument.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_aDocument.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_aDocument.IsEmbedded())
133  return;
134 
135  ScRange aOld;
136  m_aDocument.GetEmbedded( aOld);
138  ScRange aNew;
139  m_aDocument.GetEmbedded( aNew);
140  if (aOld != aNew)
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_aDocument.IsEmbedded();
164  if (bEmbedded)
165  aNewArea = m_aDocument.GetEmbeddedRect();
166  else
167  {
168  SCTAB nTab = rViewData.GetTabNo();
169  if ( nTab != m_aDocument.GetVisibleTab() )
170  m_aDocument.SetVisibleTab( nTab );
171 
172  bool bNegativePage = m_aDocument.IsNegativePage( nTab );
173  SCCOL nX = rViewData.GetPosX(SC_SPLIT_LEFT);
174  if ( nX != m_aDocument.GetPosLeft() )
175  m_aDocument.SetPosLeft( nX );
176  SCROW nY = rViewData.GetPosY(SC_SPLIT_BOTTOM);
177  if ( nY != m_aDocument.GetPosTop() )
178  m_aDocument.SetPosTop( nY );
179  tools::Rectangle aMMRect = m_aDocument.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_aDocument.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  const SfxPoolItem* pItem;
211  if (rStyleSet.GetItemState(ATTR_PAGE_HEADERSET,false,&pItem) == SfxItemState::SET)
212  {
213  const SfxItemSet& rSrcSet = static_cast<const SvxSetItem*>(pItem)->GetItemSet();
214  auto pDestSet = std::make_unique<SfxItemSet>(*rStyleSet.GetPool(),rSrcSet.GetRanges());
215  pDestSet->Put(rSrcSet);
216  rStyleSet.Put(SvxSetItem(ATTR_PAGE_HEADERSET,std::move(pDestSet)));
217  }
218  if (rStyleSet.GetItemState(ATTR_PAGE_FOOTERSET,false,&pItem) == SfxItemState::SET)
219  {
220  const SfxItemSet& rSrcSet = static_cast<const SvxSetItem*>(pItem)->GetItemSet();
221  auto pDestSet = std::make_unique<SfxItemSet>(*rStyleSet.GetPool(),rSrcSet.GetRanges());
222  pDestSet->Put(rSrcSet);
223  rStyleSet.Put(SvxSetItem(ATTR_PAGE_FOOTERSET,std::move(pDestSet)));
224  }
225 
226  pStyle = pStylePool->Next();
227  }
228 }
229 
231 {
233 
235  lcl_AdjustPool( GetStyleSheetPool() ); // adjust SetItems
236 
238 
240 
241  // Paint
242 
244 }
245 
246 void ScDocShell::LoadStylesArgs( ScDocShell& rSource, bool bReplace, bool bCellStyles, bool bPageStyles )
247 {
248  // similar to LoadStyles, but with selectable behavior for XStyleLoader::loadStylesFromURL call
249 
250  if ( !bCellStyles && !bPageStyles ) // nothing to do
251  return;
252 
253  ScStyleSheetPool* pSourcePool = rSource.GetDocument().GetStyleSheetPool();
255 
256  SfxStyleFamily eFamily = bCellStyles ?
257  ( bPageStyles ? SfxStyleFamily::All : SfxStyleFamily::Para ) :
258  SfxStyleFamily::Page;
259  SfxStyleSheetIterator aIter( pSourcePool, eFamily );
260  sal_uInt16 nSourceCount = aIter.Count();
261  if ( nSourceCount == 0 )
262  return; // no source styles
263 
264  std::unique_ptr<ScStylePair[]> pStyles(new ScStylePair[ nSourceCount ]);
265  sal_uInt16 nFound = 0;
266 
267  // first create all new styles
268 
269  SfxStyleSheetBase* pSourceStyle = aIter.First();
270  while (pSourceStyle)
271  {
272  OUString aName = pSourceStyle->GetName();
273  SfxStyleSheetBase* pDestStyle = pDestPool->Find( pSourceStyle->GetName(), pSourceStyle->GetFamily() );
274  if ( pDestStyle )
275  {
276  // touch existing styles only if replace flag is set
277  if ( bReplace )
278  {
279  pStyles[nFound].pSource = pSourceStyle;
280  pStyles[nFound].pDest = pDestStyle;
281  ++nFound;
282  }
283  }
284  else
285  {
286  pStyles[nFound].pSource = pSourceStyle;
287  pStyles[nFound].pDest = &pDestPool->Make( aName, pSourceStyle->GetFamily(), pSourceStyle->GetMask() );
288  ++nFound;
289  }
290 
291  pSourceStyle = aIter.Next();
292  }
293 
294  // then copy contents (after inserting all styles, for parent etc.)
295 
296  for ( sal_uInt16 i = 0; i < nFound; ++i )
297  {
298  pStyles[i].pDest->GetItemSet().PutExtended(
299  pStyles[i].pSource->GetItemSet(), SfxItemState::DONTCARE, SfxItemState::DEFAULT);
300  if(pStyles[i].pSource->HasParentSupport())
301  pStyles[i].pDest->SetParent(pStyles[i].pSource->GetParent());
302  // follow is never used
303  }
304 
305  lcl_AdjustPool( GetStyleSheetPool() ); // adjust SetItems
308 }
309 
311 {
313  if (!pLinkManager)
314  return;
315 
316  pLinkManager->ReconnectDdeLink(rServer);
317 }
318 
320 {
321  typedef std::unordered_set<OUString> StrSetType;
322 
323  sfx2::LinkManager* pLinkManager = m_aDocument.GetLinkManager();
324  StrSetType aNames;
325 
326  // out with the no longer used links
327 
328  size_t nCount = pLinkManager->GetLinks().size();
329  for (size_t k=nCount; k>0; )
330  {
331  --k;
332  ::sfx2::SvBaseLink* pBase = pLinkManager->GetLinks()[k].get();
333  if (ScTableLink* pTabLink = dynamic_cast<ScTableLink*>(pBase))
334  {
335  if (pTabLink->IsUsed())
336  aNames.insert(pTabLink->GetFileName());
337  else // no longer used -> delete
338  {
339  pTabLink->SetAddUndo(true);
340  pLinkManager->Remove(k);
341  }
342  }
343  }
344 
345  // enter new links
346 
347  SCTAB nTabCount = m_aDocument.GetTableCount();
348  for (SCTAB i = 0; i < nTabCount; ++i)
349  {
350  if (!m_aDocument.IsLinked(i))
351  continue;
352 
353  OUString aDocName = m_aDocument.GetLinkDoc(i);
354  OUString aFltName = m_aDocument.GetLinkFlt(i);
355  OUString aOptions = m_aDocument.GetLinkOpt(i);
357  bool bThere = false;
358  for (SCTAB j = 0; j < i && !bThere; ++j) // several times in the document?
359  {
360  if (m_aDocument.IsLinked(j)
361  && m_aDocument.GetLinkDoc(j) == aDocName
362  && m_aDocument.GetLinkFlt(j) == aFltName
363  && m_aDocument.GetLinkOpt(j) == aOptions)
364  // Ignore refresh delay in compare, it should be the
365  // same for identical links and we don't want dupes
366  // if it ain't.
367  bThere = true;
368  }
369 
370  if (!bThere) // already entered as filter?
371  {
372  if (!aNames.insert(aDocName).second)
373  bThere = true;
374  }
375 
376  if (!bThere)
377  {
378  ScTableLink* pLink = new ScTableLink( this, aDocName, aFltName, aOptions, nRefresh );
379  pLink->SetInCreate(true);
380  pLinkManager->InsertFileLink(*pLink, sfx2::SvBaseLinkObjectType::ClientFile, aDocName, &aFltName);
381  pLink->Update();
382  pLink->SetInCreate(false);
383  }
384  }
385 }
386 
388 {
389  sfx2::LinkManager* pLinkManager = m_aDocument.GetLinkManager();
390 
391  bool bAny = false;
392  size_t nCount = pLinkManager->GetLinks().size();
393  for (size_t i=0; i<nCount; i++ )
394  {
395  ::sfx2::SvBaseLink* pBase = pLinkManager->GetLinks()[i].get();
396  if (ScTableLink* pTabLink = dynamic_cast<ScTableLink*>(pBase))
397  {
398 // pTabLink->SetAddUndo(sal_False); //! merge Undos
399 
400  // Painting only after Update() makes no sense:
401  // ScTableLink::Refresh() will post a Paint only is bDoPaint is true
402  // pTabLink->SetPaint(false); // Paint only once at the end
403  pTabLink->Update();
404  //pTabLink->SetPaint(true);
405 // pTabLink->SetAddUndo(sal_True);
406  bAny = true;
407  }
408  }
409 
410  if ( bAny )
411  {
412  // Paint only once
415 
417  }
418 }
419 
420 void ScDocShell::SetFormulaOptions( const ScFormulaOptions& rOpt, bool bForLoading )
421 {
423 
424  // This is nasty because it resets module globals from within a docshell!
425  // For actual damage caused see fdo#82183 where an unconditional
426  // ScGlobal::ResetFunctionList() (without checking GetUseEnglishFuncName())
427  // lead to a crash because the function list was still used by the Formula
428  // Wizard when loading the second document.
429  // Do the stupid stuff only when we're not called while loading a document.
430 
431  /* TODO: bForLoading is a workaround, rather get rid of setting any
432  * globals from per document instances like ScDocShell. */
433 
434  /* XXX this is utter crap, we rely on the options being set here at least
435  * once, for the very first document, empty or loaded. */
436  static bool bInitOnce = true;
437 
438  if (!bForLoading || bInitOnce)
439  {
440  bool bForceInit = bInitOnce;
441  bInitOnce = false;
442  if (bForceInit || rOpt.GetUseEnglishFuncName() != SC_MOD()->GetFormulaOptions().GetUseEnglishFuncName())
443  {
444  // This needs to be called first since it may re-initialize the entire
445  // opcode map.
446  if (rOpt.GetUseEnglishFuncName())
447  {
448  // switch native symbols to English.
450  ScCompiler::OpCodeMapPtr xMap = aComp.GetOpCodeMap(css::sheet::FormulaLanguage::ENGLISH);
452  }
453  else
454  // re-initialize native symbols with localized function names.
456 
457  // Force re-population of function names for the function wizard, function tip etc.
459  }
460 
461  // Update the separators.
464 
465  // Global interpreter settings.
467  }
468 
469  // Per document interpreter settings.
471 }
472 
474 {
476  // no need to check repeatedly.
477  return;
478 
479  OUString aDecSep = ScGlobal::getLocaleDataPtr()->getNumDecimalSep();
480  OUString aDecSepAlt = ScGlobal::getLocaleDataPtr()->getNumDecimalSepAlt();
481 
482  ScModule* pScMod = SC_MOD();
483  const ScFormulaOptions& rOpt=pScMod->GetFormulaOptions();
484  const OUString& aSepArg = rOpt.GetFormulaSepArg();
485  const OUString& aSepArrRow = rOpt.GetFormulaSepArrayRow();
486  const OUString& aSepArrCol = rOpt.GetFormulaSepArrayCol();
487 
488  if (aDecSep == aSepArg || aDecSep == aSepArrRow || aDecSep == aSepArrCol ||
489  aDecSepAlt == aSepArg || aDecSepAlt == aSepArrRow || aDecSepAlt == aSepArrCol)
490  {
491  // One of arg separators conflicts with the current decimal
492  // separator. Reset them to default.
493  ScFormulaOptions aNew = rOpt;
494  aNew.ResetFormulaSeparators();
495  SetFormulaOptions(aNew);
496  pScMod->SetFormulaOptions(aNew);
497 
498  // Launch a nice warning dialog to let the users know of this change.
499  ScTabViewShell* pViewShell = GetBestViewShell();
500  if (pViewShell)
501  {
502  vcl::Window* pParent = pViewShell->GetFrameWin();
503  std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pParent ? pParent->GetFrameWeld() : nullptr,
504  VclMessageType::Info, VclButtonsType::Ok,
505  ScResId(STR_OPTIONS_WARN_SEPARATORS)));
506  xInfoBox->run();
507  }
508 
509  // For now, this is the only option setting that could launch info
510  // dialog. But in the future we may want to implement a nicer
511  // dialog to display a list of warnings in case we have several
512  // pieces of information to display.
513  }
514 
516 }
517 
518 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SC_DLLPUBLIC OUString GetLinkDoc(SCTAB nTab) const
Definition: documen3.cxx:506
Point TopLeft() const
OUString GetLinkOpt(SCTAB nTab) const
Definition: documen3.cxx:520
void SetPos(const Point &rPoint)
void UpdateLinks() override
Definition: docsh6.cxx:319
SfxStyleSheetBase * First(SfxStyleFamily eFamily, SfxStyleSearchBits eMask=SfxStyleSearchBits::All)
virtual void SetVisArea(const tools::Rectangle &rVisArea)
ScDocShell * GetDocShell() const
Definition: viewdata.hxx:354
SC_DLLPUBLIC bool IsNegativePage(SCTAB nTab) const
Definition: document.cxx:1002
void UpdateOleZoom()
Definition: tabvwsh4.cxx:307
virtual void ReconnectDdeLink(SfxObjectShell &rServer) override
Definition: docsh6.cxx:310
virtual SfxStyleSheetBasePool * GetStyleSheetPool() override
Definition: docsh6.cxx:194
sal_uIntPtr sal_uLong
long Long
vcl::Window * GetFrameWin() const
Definition: tabview.hxx:582
bool GetUseEnglishFuncName() const
Definition: formulaopt.hxx:48
void SetDocumentModified()
Definition: docsh.cxx:2819
SCTAB GetTabNo() const
Definition: viewdata.hxx:395
static void SetNativeSymbols(const OpCodeMapPtr &xMap)
virtual SfxItemSet & GetItemSet()
void GetEmbedded(ScRange &rRange) const
Definition: documen3.cxx:1685
bool IsLinked(SCTAB nTab) const
Definition: documen3.cxx:480
SfxStyleFamily GetFamily() const
void SetVisAreaOrSize(const tools::Rectangle &rVisArea)
Definition: docsh6.cxx:73
const OUString & GetFormulaSepArrayRow() const
Definition: formulaopt.hxx:57
SCCOL GetPosX(ScHSplitPos eWhich, SCTAB nForTab=-1) const
Definition: viewdata.cxx:1341
SfxStyleSearchBits GetMask() const
void SetRight(tools::Long v)
void UpdateAllRowHeights(const ScMarkData *pTabMark=nullptr)
Definition: docsh5.cxx:423
void SetFormulaOptions(const ScFormulaOptions &rOpt, bool bForLoading=false)
Definition: docsh6.cxx:420
weld::Window * GetFrameWeld() const
SC_DLLPUBLIC void SetGrammar(formula::FormulaGrammar::Grammar eGram)
Definition: documen3.cxx:494
const OUString & GetName() const
tools::Long Left() const
void SetLeft(tools::Long v)
SC_DLLPUBLIC SCROW MaxRow() const
Definition: document.hxx:873
SC_DLLPUBLIC SCTAB GetTableCount() const
Definition: document.cxx:314
int nCount
bool IsConfigOptionsChecked() const
tools::Rectangle GetEmbeddedRect() const
Definition: documen3.cxx:1690
SfxStyleFamily
SfxObjectCreateMode GetCreateMode() const
SCROW GetPosY(ScVSplitPos eWhich, SCTAB nForTab=-1) const
Definition: viewdata.cxx:1355
ScViewData & GetViewData()
Definition: tabview.hxx:332
OpCodeMapPtr GetOpCodeMap(const sal_Int32 nLanguage) const
void StylesToNames()
Definition: document.cxx:6122
void InsertFileLink(sfx2::SvBaseLink &, SvBaseLinkObjectType nFileType, const OUString &rFileNm, const OUString *pFilterNm=nullptr, const OUString *pRange=nullptr)
static void SetGlobalConfig(const ScCalcConfig &rConfig)
Definition: interpr4.cxx:3870
SC_DLLPUBLIC void SetVisibleTab(SCTAB nTab)
Definition: document.hxx:860
const OUString & getNumDecimalSep() const
SC_DLLPUBLIC SCCOL MaxCol() const
Definition: document.hxx:872
ScCalcConfig & GetCalcConfig()
Definition: formulaopt.hxx:43
bool IsImportingXML() const
Definition: document.hxx:2137
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
static void lcl_AdjustPool(SfxStyleSheetBasePool *pStylePool)
Definition: docsh6.cxx:203
const SvBaseLinks & GetLinks() const
int i
void Remove(SvBaseLink const *pLink)
constexpr TypedWhichId< SvxSetItem > ATTR_PAGE_FOOTERSET(182)
sal_Int16 SCCOL
Definition: types.hxx:22
SC_DLLPUBLIC const ScFormulaOptions & GetFormulaOptions()
Definition: scmod.cxx:764
void ReconnectDdeLink(SfxObjectShell &rServer)
#define SC_MOD()
Definition: scmod.hxx:253
static void UpdateSeparatorsNative(const OUString &rSep, const OUString &rArrayColSep, const OUString &rArrayRowSep)
tools::Long Width() const
const SfxItemSet * GetItemSet(const SfxPoolItem &rAttr)
OUString ScResId(const char *pId)
Definition: scdll.cxx:95
virtual void LoadStyles(SfxObjectShell &rSource) override
Definition: docsh6.cxx:230
void PutExtended(const SfxItemSet &, SfxItemState eDontCareAs, SfxItemState eDefaultAs)
OUString GetLinkFlt(SCTAB nTab) const
Definition: documen3.cxx:513
void SetTop(tools::Long v)
void SetBottom(tools::Long v)
SC_DLLPUBLIC tools::Rectangle GetMMRect(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, bool bHiddenAsZero=true) const
Definition: documen3.cxx:1972
const tools::Rectangle & GetVisArea() const
const SCTAB MAXTAB
Definition: address.hxx:71
tools::Long Top() const
SC_DLLPUBLIC void SetPosTop(SCROW nRow)
Definition: document.hxx:864
void UpdStlShtPtrsFrmNms()
Definition: document.cxx:6109
void ReloadTabLinks()
Definition: docsh6.cxx:387
void PostPaint(SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, PaintPartFlags nPart, sal_uInt16 nExtFlags=0)
Definition: docsh3.cxx:99
SfxItemPool * GetPool() const
virtual void LoadStyles(SfxObjectShell &rSource)
Size GetSize() const
const OUString & GetFormulaSepArg() const
Definition: formulaopt.hxx:54
const OUString & GetFormulaSepArrayCol() const
Definition: formulaopt.hxx:60
const OUString & getNumDecimalSepAlt() const
SC_DLLPUBLIC void SetFormulaOptions(const ScFormulaOptions &rOpt)
Definition: scmod.cxx:756
static SC_DLLPUBLIC const LocaleDataWrapper * getLocaleDataPtr()
Definition: global.cxx:1001
SCCOL GetPosLeft() const
Definition: document.hxx:861
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
void SetEmbedded(const ScRange &rRange)
Definition: documen3.cxx:1723
sal_Int32 SCROW
Definition: types.hxx:18
void UpdateOle(const ScViewData &rViewData, bool bSnapSize=false)
Definition: docsh6.cxx:152
static ScTabViewShell * GetActiveViewShell()
Definition: tabvwsh4.cxx:1023
SvBaseLink * pLink
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
sal_uLong GetLinkRefreshDelay(SCTAB nTab) const
Definition: documen3.cxx:534
bool IsEmbedded() const
Definition: document.hxx:928
tools::Long Height() const
const ScDocument & GetDocument() const
Definition: docsh.hxx:216
::formula::FormulaGrammar::Grammar GetFormulaSyntax() const
Definition: formulaopt.hxx:41
SC_DLLPUBLIC ScStyleSheetPool * GetStyleSheetPool() const
Definition: document.cxx:6066
ScDocument m_aDocument
Definition: docsh.hxx:80
const sal_uInt16 * GetRanges() const
constexpr TypedWhichId< SvxSetItem > ATTR_PAGE_HEADERSET(181)
void CheckConfigOptions()
Called when the Options dialog is dismissed with the OK button, to handle potentially conflicting opt...
Definition: docsh6.cxx:473
ScTabViewShell * GetBestViewShell(bool bOnlyVisible=true)
Definition: docsh4.cxx:2556
virtual void SetVisArea(const tools::Rectangle &rVisArea) override
Definition: docsh6.cxx:57
bool m_bIsInplace
Definition: docsh.hxx:90
std::shared_ptr< const OpCodeMap > OpCodeMapPtr
void ResetFormulaSeparators()
Definition: formulaopt.cxx:45
SCTAB GetVisibleTab() const
Definition: document.hxx:859
SC_DLLPUBLIC sfx2::LinkManager * GetLinkManager()
Definition: documen2.cxx:215
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
SC_DLLPUBLIC void SetCalcConfig(const ScCalcConfig &rConfig)
Definition: document10.cxx:200
void SnapVisArea(tools::Rectangle &rRect) const
Definition: docsh4.cxx:2281
SCROW GetPosTop() const
Definition: document.hxx:863
Point TopRight() const
static void ResetNativeSymbols()
SC_DLLPUBLIC void SetPosLeft(SCCOL nCol)
Definition: document.hxx:862
tools::Long Right() const
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:629
sal_Int16 SCTAB
Definition: types.hxx:23
void LoadStylesArgs(ScDocShell &rSource, bool bReplace, bool bCellStyles, bool bPageStyles)
Definition: docsh6.cxx:246