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(), long(0) ) );
89  if ( bNegativePage )
90  {
91  aNewPos.setX( std::min( aArea.Right(), long(0) ) );
92  lcl_SetTopRight( aArea, aNewPos );
93  }
94  else
95  {
96  aNewPos.setX( std::max( aArea.Left(), 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* pViewData, 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 
160  OSL_ENSURE(pViewData,"pViewData==0 at ScDocShell::UpdateOle");
161 
163  tools::Rectangle aNewArea = aOldArea;
164 
165  bool bEmbedded = m_aDocument.IsEmbedded();
166  if (bEmbedded)
167  aNewArea = m_aDocument.GetEmbeddedRect();
168  else
169  {
170  SCTAB nTab = pViewData->GetTabNo();
171  if ( nTab != m_aDocument.GetVisibleTab() )
172  m_aDocument.SetVisibleTab( nTab );
173 
174  bool bNegativePage = m_aDocument.IsNegativePage( nTab );
175  SCCOL nX = pViewData->GetPosX(SC_SPLIT_LEFT);
176  if ( nX != m_aDocument.GetPosLeft() )
177  m_aDocument.SetPosLeft( nX );
178  SCROW nY = pViewData->GetPosY(SC_SPLIT_BOTTOM);
179  if ( nY != m_aDocument.GetPosTop() )
180  m_aDocument.SetPosTop( nY );
181  tools::Rectangle aMMRect = m_aDocument.GetMMRect( nX,nY, nX,nY, nTab );
182  if (bNegativePage)
183  lcl_SetTopRight( aNewArea, aMMRect.TopRight() );
184  else
185  aNewArea.SetPos( aMMRect.TopLeft() );
186  if (bSnapSize)
187  SnapVisArea(aNewArea); // uses the new VisibleTab
188  }
189 
190  if (aNewArea != aOldArea)
191  SetVisAreaOrSize( aNewArea ); // the start must also be adjusted here
192 }
193 
194 // Style stuff for Organizer, etc.
195 
197 {
198  return static_cast<SfxStyleSheetBasePool*>(m_aDocument.GetStyleSheetPool());
199 }
200 
201 // After loading styles from another document (LoadStyles, Insert), the SetItems
202 // (ATTR_PAGE_HEADERSET, ATTR_PAGE_FOOTERSET) must be converted to the correct pool
203 // before the source pool is deleted.
204 
205 static void lcl_AdjustPool( SfxStyleSheetBasePool* pStylePool )
206 {
207  SfxStyleSheetBase *pStyle = pStylePool->First(SfxStyleFamily::Page);
208  while ( pStyle )
209  {
210  SfxItemSet& rStyleSet = pStyle->GetItemSet();
211 
212  const SfxPoolItem* pItem;
213  if (rStyleSet.GetItemState(ATTR_PAGE_HEADERSET,false,&pItem) == SfxItemState::SET)
214  {
215  const SfxItemSet& rSrcSet = static_cast<const SvxSetItem*>(pItem)->GetItemSet();
216  auto pDestSet = std::make_unique<SfxItemSet>(*rStyleSet.GetPool(),rSrcSet.GetRanges());
217  pDestSet->Put(rSrcSet);
218  rStyleSet.Put(SvxSetItem(ATTR_PAGE_HEADERSET,std::move(pDestSet)));
219  }
220  if (rStyleSet.GetItemState(ATTR_PAGE_FOOTERSET,false,&pItem) == SfxItemState::SET)
221  {
222  const SfxItemSet& rSrcSet = static_cast<const SvxSetItem*>(pItem)->GetItemSet();
223  auto pDestSet = std::make_unique<SfxItemSet>(*rStyleSet.GetPool(),rSrcSet.GetRanges());
224  pDestSet->Put(rSrcSet);
225  rStyleSet.Put(SvxSetItem(ATTR_PAGE_FOOTERSET,std::move(pDestSet)));
226  }
227 
228  pStyle = pStylePool->Next();
229  }
230 }
231 
233 {
235 
237  lcl_AdjustPool( GetStyleSheetPool() ); // adjust SetItems
238 
240 
242 
243  // Paint
244 
246 }
247 
248 void ScDocShell::LoadStylesArgs( ScDocShell& rSource, bool bReplace, bool bCellStyles, bool bPageStyles )
249 {
250  // similar to LoadStyles, but with selectable behavior for XStyleLoader::loadStylesFromURL call
251 
252  if ( !bCellStyles && !bPageStyles ) // nothing to do
253  return;
254 
255  ScStyleSheetPool* pSourcePool = rSource.GetDocument().GetStyleSheetPool();
257 
258  SfxStyleFamily eFamily = bCellStyles ?
259  ( bPageStyles ? SfxStyleFamily::All : SfxStyleFamily::Para ) :
260  SfxStyleFamily::Page;
261  SfxStyleSheetIterator aIter( pSourcePool, eFamily );
262  sal_uInt16 nSourceCount = aIter.Count();
263  if ( nSourceCount == 0 )
264  return; // no source styles
265 
266  std::unique_ptr<ScStylePair[]> pStyles(new ScStylePair[ nSourceCount ]);
267  sal_uInt16 nFound = 0;
268 
269  // first create all new styles
270 
271  SfxStyleSheetBase* pSourceStyle = aIter.First();
272  while (pSourceStyle)
273  {
274  OUString aName = pSourceStyle->GetName();
275  SfxStyleSheetBase* pDestStyle = pDestPool->Find( pSourceStyle->GetName(), pSourceStyle->GetFamily() );
276  if ( pDestStyle )
277  {
278  // touch existing styles only if replace flag is set
279  if ( bReplace )
280  {
281  pStyles[nFound].pSource = pSourceStyle;
282  pStyles[nFound].pDest = pDestStyle;
283  ++nFound;
284  }
285  }
286  else
287  {
288  pStyles[nFound].pSource = pSourceStyle;
289  pStyles[nFound].pDest = &pDestPool->Make( aName, pSourceStyle->GetFamily(), pSourceStyle->GetMask() );
290  ++nFound;
291  }
292 
293  pSourceStyle = aIter.Next();
294  }
295 
296  // then copy contents (after inserting all styles, for parent etc.)
297 
298  for ( sal_uInt16 i = 0; i < nFound; ++i )
299  {
300  pStyles[i].pDest->GetItemSet().PutExtended(
301  pStyles[i].pSource->GetItemSet(), SfxItemState::DONTCARE, SfxItemState::DEFAULT);
302  if(pStyles[i].pSource->HasParentSupport())
303  pStyles[i].pDest->SetParent(pStyles[i].pSource->GetParent());
304  // follow is never used
305  }
306 
307  lcl_AdjustPool( GetStyleSheetPool() ); // adjust SetItems
310 }
311 
313 {
315  if (!pLinkManager)
316  return;
317 
318  pLinkManager->ReconnectDdeLink(rServer);
319 }
320 
322 {
323  typedef std::unordered_set<OUString> StrSetType;
324 
325  sfx2::LinkManager* pLinkManager = m_aDocument.GetLinkManager();
326  StrSetType aNames;
327 
328  // out with the no longer used links
329 
330  size_t nCount = pLinkManager->GetLinks().size();
331  for (size_t k=nCount; k>0; )
332  {
333  --k;
334  ::sfx2::SvBaseLink* pBase = pLinkManager->GetLinks()[k].get();
335  if (ScTableLink* pTabLink = dynamic_cast<ScTableLink*>(pBase))
336  {
337  if (pTabLink->IsUsed())
338  aNames.insert(pTabLink->GetFileName());
339  else // no longer used -> delete
340  {
341  pTabLink->SetAddUndo(true);
342  pLinkManager->Remove(k);
343  }
344  }
345  }
346 
347  // enter new links
348 
349  SCTAB nTabCount = m_aDocument.GetTableCount();
350  for (SCTAB i = 0; i < nTabCount; ++i)
351  {
352  if (!m_aDocument.IsLinked(i))
353  continue;
354 
355  OUString aDocName = m_aDocument.GetLinkDoc(i);
356  OUString aFltName = m_aDocument.GetLinkFlt(i);
357  OUString aOptions = m_aDocument.GetLinkOpt(i);
359  bool bThere = false;
360  for (SCTAB j = 0; j < i && !bThere; ++j) // several times in the document?
361  {
362  if (m_aDocument.IsLinked(j)
363  && m_aDocument.GetLinkDoc(j) == aDocName
364  && m_aDocument.GetLinkFlt(j) == aFltName
365  && m_aDocument.GetLinkOpt(j) == aOptions)
366  // Ignore refresh delay in compare, it should be the
367  // same for identical links and we don't want dupes
368  // if it ain't.
369  bThere = true;
370  }
371 
372  if (!bThere) // already entered as filter?
373  {
374  if (!aNames.insert(aDocName).second)
375  bThere = true;
376  }
377 
378  if (!bThere)
379  {
380  ScTableLink* pLink = new ScTableLink( this, aDocName, aFltName, aOptions, nRefresh );
381  pLink->SetInCreate(true);
382  pLinkManager->InsertFileLink(*pLink, sfx2::SvBaseLinkObjectType::ClientFile, aDocName, &aFltName);
383  pLink->Update();
384  pLink->SetInCreate(false);
385  }
386  }
387 }
388 
390 {
391  sfx2::LinkManager* pLinkManager = m_aDocument.GetLinkManager();
392 
393  bool bAny = false;
394  size_t nCount = pLinkManager->GetLinks().size();
395  for (size_t i=0; i<nCount; i++ )
396  {
397  ::sfx2::SvBaseLink* pBase = pLinkManager->GetLinks()[i].get();
398  if (ScTableLink* pTabLink = dynamic_cast<ScTableLink*>(pBase))
399  {
400 // pTabLink->SetAddUndo(sal_False); //! merge Undos
401 
402  // Painting only after Update() makes no sense:
403  // ScTableLink::Refresh() will post a Paint only is bDoPaint is true
404  // pTabLink->SetPaint(false); // Paint only once at the end
405  pTabLink->Update();
406  //pTabLink->SetPaint(true);
407 // pTabLink->SetAddUndo(sal_True);
408  bAny = true;
409  }
410  }
411 
412  if ( bAny )
413  {
414  // Paint only once
417 
419  }
420 }
421 
422 void ScDocShell::SetFormulaOptions( const ScFormulaOptions& rOpt, bool bForLoading )
423 {
425 
426  // This is nasty because it resets module globals from within a docshell!
427  // For actual damage caused see fdo#82183 where an unconditional
428  // ScGlobal::ResetFunctionList() (without checking GetUseEnglishFuncName())
429  // lead to a crash because the function list was still used by the Formula
430  // Wizard when loading the second document.
431  // Do the stupid stuff only when we're not called while loading a document.
432 
433  /* TODO: bForLoading is a workaround, rather get rid of setting any
434  * globals from per document instances like ScDocShell. */
435 
436  /* XXX this is utter crap, we rely on the options being set here at least
437  * once, for the very first document, empty or loaded. */
438  static bool bInitOnce = true;
439 
440  if (!bForLoading || bInitOnce)
441  {
442  bool bForceInit = bInitOnce;
443  bInitOnce = false;
444  if (bForceInit || rOpt.GetUseEnglishFuncName() != SC_MOD()->GetFormulaOptions().GetUseEnglishFuncName())
445  {
446  // This needs to be called first since it may re-initialize the entire
447  // opcode map.
448  if (rOpt.GetUseEnglishFuncName())
449  {
450  // switch native symbols to English.
451  ScCompiler aComp(nullptr, ScAddress());
452  ScCompiler::OpCodeMapPtr xMap = aComp.GetOpCodeMap(css::sheet::FormulaLanguage::ENGLISH);
454  }
455  else
456  // re-initialize native symbols with localized function names.
458 
459  // Force re-population of function names for the function wizard, function tip etc.
461  }
462 
463  // Update the separators.
466 
467  // Global interpreter settings.
469  }
470 
471  // Per document interpreter settings.
473 }
474 
476 {
478  // no need to check repeatedly.
479  return;
480 
481  OUString aDecSep = ScGlobal::getLocaleDataPtr()->getNumDecimalSep();
482  OUString aDecSepAlt = ScGlobal::getLocaleDataPtr()->getNumDecimalSepAlt();
483 
484  ScModule* pScMod = SC_MOD();
485  const ScFormulaOptions& rOpt=pScMod->GetFormulaOptions();
486  const OUString& aSepArg = rOpt.GetFormulaSepArg();
487  const OUString& aSepArrRow = rOpt.GetFormulaSepArrayRow();
488  const OUString& aSepArrCol = rOpt.GetFormulaSepArrayCol();
489 
490  if (aDecSep == aSepArg || aDecSep == aSepArrRow || aDecSep == aSepArrCol ||
491  aDecSepAlt == aSepArg || aDecSepAlt == aSepArrRow || aDecSepAlt == aSepArrCol)
492  {
493  // One of arg separators conflicts with the current decimal
494  // separator. Reset them to default.
495  ScFormulaOptions aNew = rOpt;
496  aNew.ResetFormulaSeparators();
497  SetFormulaOptions(aNew);
498  pScMod->SetFormulaOptions(aNew);
499 
500  // Launch a nice warning dialog to let the users know of this change.
501  ScTabViewShell* pViewShell = GetBestViewShell();
502  if (pViewShell)
503  {
504  vcl::Window* pParent = pViewShell->GetFrameWin();
505  std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pParent ? pParent->GetFrameWeld() : nullptr,
506  VclMessageType::Info, VclButtonsType::Ok,
507  ScResId(STR_OPTIONS_WARN_SEPARATORS)));
508  xInfoBox->run();
509  }
510 
511  // For now, this is the only option setting that could launch info
512  // dialog. But in the future we may want to implement a nicer
513  // dialog to display a list of warnings in case we have several
514  // pieces of information to display.
515  }
516 
518 }
519 
520 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SC_DLLPUBLIC OUString GetLinkDoc(SCTAB nTab) const
Definition: documen3.cxx:492
Point TopLeft() const
OUString GetLinkOpt(SCTAB nTab) const
Definition: documen3.cxx:506
long Width() const
void SetPos(const Point &rPoint)
void UpdateLinks() override
Definition: docsh6.cxx:321
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:312
long Height() const
virtual SfxStyleSheetBasePool * GetStyleSheetPool() override
Definition: docsh6.cxx:196
sal_uIntPtr sal_uLong
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:1666
bool IsLinked(SCTAB nTab) const
Definition: documen3.cxx:466
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:1344
SfxStyleSearchBits GetMask() const
void UpdateAllRowHeights(const ScMarkData *pTabMark=nullptr)
Definition: docsh5.cxx:423
void SetFormulaOptions(const ScFormulaOptions &rOpt, bool bForLoading=false)
Definition: docsh6.cxx:422
weld::Window * GetFrameWeld() const
SC_DLLPUBLIC void SetGrammar(formula::FormulaGrammar::Grammar eGram)
Definition: documen3.cxx:480
long Right() const
const OUString & GetName() const
void UpdateOle(const ScViewData *pViewData, bool bSnapSize=false)
Definition: docsh6.cxx:152
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:1671
long Top() const
SfxStyleFamily
SfxObjectCreateMode GetCreateMode() const
SCROW GetPosY(ScVSplitPos eWhich, SCTAB nForTab=-1) const
Definition: viewdata.cxx:1358
ScViewData & GetViewData()
Definition: tabview.hxx:332
OpCodeMapPtr GetOpCodeMap(const sal_Int32 nLanguage) const
void StylesToNames()
Definition: document.cxx:6125
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:3871
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
void SetTop(long v)
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:205
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)
void SetRight(long v)
const SfxItemSet * GetItemSet(const SfxPoolItem &rAttr)
OUString ScResId(const char *pId)
Definition: scdll.cxx:95
virtual void LoadStyles(SfxObjectShell &rSource) override
Definition: docsh6.cxx:232
void PutExtended(const SfxItemSet &, SfxItemState eDontCareAs, SfxItemState eDefaultAs)
OUString GetLinkFlt(SCTAB nTab) const
Definition: documen3.cxx:499
SC_DLLPUBLIC tools::Rectangle GetMMRect(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, bool bHiddenAsZero=true) const
Definition: documen3.cxx:1953
const tools::Rectangle & GetVisArea() const
const SCTAB MAXTAB
Definition: address.hxx:71
SC_DLLPUBLIC void SetPosTop(SCROW nRow)
Definition: document.hxx:864
void UpdStlShtPtrsFrmNms()
Definition: document.cxx:6112
void ReloadTabLinks()
Definition: docsh6.cxx:389
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:1007
SCCOL GetPosLeft() const
Definition: document.hxx:861
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
void SetEmbedded(const ScRange &rRange)
Definition: documen3.cxx:1704
sal_Int32 SCROW
Definition: types.hxx:18
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:71
OUString aName
sal_uLong GetLinkRefreshDelay(SCTAB nTab) const
Definition: documen3.cxx:520
bool IsEmbedded() const
Definition: document.hxx:928
void SetBottom(long v)
const ScDocument & GetDocument() const
Definition: docsh.hxx:216
::formula::FormulaGrammar::Grammar GetFormulaSyntax() const
Definition: formulaopt.hxx:41
long Left() const
SC_DLLPUBLIC ScStyleSheetPool * GetStyleSheetPool() const
Definition: document.cxx:6069
ScDocument m_aDocument
Definition: docsh.hxx:80
const sal_uInt16 * GetRanges() const
void SetLeft(long v)
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:475
ScTabViewShell * GetBestViewShell(bool bOnlyVisible=true)
Definition: docsh4.cxx:2558
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:2283
SCROW GetPosTop() const
Definition: document.hxx:863
Point TopRight() const
static void ResetNativeSymbols()
SC_DLLPUBLIC void SetPosLeft(SCCOL nCol)
Definition: document.hxx:862
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:635
sal_Int16 SCTAB
Definition: types.hxx:23
void LoadStylesArgs(ScDocShell &rSource, bool bReplace, bool bCellStyles, bool bPageStyles)
Definition: docsh6.cxx:248