LibreOffice Module sc (master) 1
documen9.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#include <editeng/eeitem.hxx>
22
24#include <editeng/fontitem.hxx>
25#include <editeng/langitem.hxx>
27#include <osl/thread.h>
28#include <osl/diagnose.h>
29#include <svl/asiancfg.hxx>
30#include <svx/svditer.hxx>
31#include <svx/svdograf.hxx>
32#include <svx/svdoole2.hxx>
33#include <svx/svdpage.hxx>
34#include <svx/svdundo.hxx>
35#include <svx/xtable.hxx>
36#include <sfx2/objsh.hxx>
37#include <sfx2/printer.hxx>
38
39#include <document.hxx>
40#include <docoptio.hxx>
41#include <table.hxx>
42#include <drwlayer.hxx>
43#include <markdata.hxx>
44#include <patattr.hxx>
45#include <rechead.hxx>
46#include <poolhelp.hxx>
47#include <docpool.hxx>
48#include <stlpool.hxx>
49#include <editutil.hxx>
50#include <charthelper.hxx>
51#include <conditio.hxx>
52#include <documentlinkmgr.hxx>
53
54using namespace ::com::sun::star;
55
57{
58 return mpDrawLayer.get();
59}
60
62{
63 if (mpDrawLayer)
64 mpDrawLayer->BeginCalcUndo(false);
65}
66
67void ScDocument::TransferDrawPage(const ScDocument& rSrcDoc, SCTAB nSrcPos, SCTAB nDestPos)
68{
69 if (mpDrawLayer && rSrcDoc.mpDrawLayer)
70 {
71 SdrPage* pOldPage = rSrcDoc.mpDrawLayer->GetPage(static_cast<sal_uInt16>(nSrcPos));
72 SdrPage* pNewPage = mpDrawLayer->GetPage(static_cast<sal_uInt16>(nDestPos));
73
74 if (pOldPage && pNewPage)
75 {
76 SdrObjListIter aIter( pOldPage, SdrIterMode::Flat );
77 SdrObject* pOldObject = aIter.Next();
78 while (pOldObject)
79 {
80 // Copy style sheet
81 auto pStyleSheet = pOldObject->GetStyleSheet();
82 if (pStyleSheet)
84 pStyleSheet->GetName(), pStyleSheet->GetFamily(), true);
85
86 // Clone to target SdrModel
88 pNewObject->NbcMove(Size(0,0));
89 pNewPage->InsertObject( pNewObject.get() );
90
91 if (mpDrawLayer->IsRecording())
92 mpDrawLayer->AddCalcUndo( std::make_unique<SdrUndoInsertObj>( *pNewObject ) );
93
94 pOldObject = aIter.Next();
95 }
96 }
97 }
98
99 // make sure the data references of charts are adapted
100 // (this must be after InsertObject!)
101 ScChartHelper::AdjustRangesOfChartsOnDestinationPage( rSrcDoc, *this, nSrcPos, nDestPos );
103}
104
106{
107 if (pDocShell && !mpShell)
108 {
110 mpShell = pDocShell;
111 }
112
113 if (mpDrawLayer)
114 return;
115
117 OUString aName;
118 if ( mpShell && !mpShell->IsLoading() ) // don't call GetTitle while loading
120 mpDrawLayer.reset(new ScDrawLayer( this, aName ));
121
123 if (pMgr)
124 mpDrawLayer->SetLinkManager(pMgr);
125
126 // set DrawingLayer's SfxItemPool at Calc's SfxItemPool as
127 // secondary pool to support DrawingLayer FillStyle ranges (and similar)
128 // in SfxItemSets using the Calc SfxItemPool. This is e.g. needed when
129 // the PageStyle using SvxBrushItem is visualized and will be potentially
130 // used more intense in the future
131 if (mxPoolHelper.is() && !IsClipOrUndo()) //Using IsClipOrUndo as a proxy for SharePooledResources called
132 {
133 ScDocumentPool* pLocalPool = mxPoolHelper->GetDocPool();
134
135 if (pLocalPool)
136 {
137 OSL_ENSURE(!pLocalPool->GetSecondaryPool(), "OOps, already a secondary pool set where the DrawingLayer ItemPool is to be placed (!)");
138 pLocalPool->SetSecondaryPool(&mpDrawLayer->GetItemPool());
139 }
140 mpDrawLayer->CreateDefaultStyles();
141 }
142
143 // Drawing pages are accessed by table number, so they must also be present
144 // for preceding table numbers, even if the tables aren't allocated
145 // (important for clipboard documents).
146
147 SCTAB nDrawPages = 0;
148 SCTAB nTab;
149 for (nTab=0; nTab < static_cast<SCTAB>(maTabs.size()); nTab++)
150 if (maTabs[nTab])
151 nDrawPages = nTab + 1; // needed number of pages
152
153 for (nTab=0; nTab<nDrawPages && nTab < static_cast<SCTAB>(maTabs.size()); nTab++)
154 {
155 mpDrawLayer->ScAddPage( nTab ); // always add page, with or without the table
156 if (maTabs[nTab])
157 {
158 OUString aTabName = maTabs[nTab]->GetName();
159 mpDrawLayer->ScRenamePage( nTab, aTabName );
160
161 maTabs[nTab]->SetDrawPageSize(false,false); // set the right size immediately
162 }
163 }
164
165 mpDrawLayer->SetDefaultTabulator( GetDocOptions().GetTabDistance() );
166
168
169 // set draw defaults directly
170 SfxItemPool& rDrawPool = mpDrawLayer->GetItemPool();
172
174 if (bImportingXML)
175 mpDrawLayer->EnableAdjust(false);
176
177 mpDrawLayer->SetForbiddenCharsTable( xForbiddenCharacters );
178 mpDrawLayer->SetCharCompressType( GetAsianCompression() );
179 mpDrawLayer->SetKernAsianPunctuation( GetAsianKerning() );
180}
181
183{
184 if (mpDrawLayer)
185 {
186 SfxItemPool& rDrawPool = mpDrawLayer->GetItemPool();
190 }
191}
192
194{
195 if (mpDrawLayer)
196 {
197 // use the printer even if IsValid is false
198 // Application::GetDefaultDevice causes trouble with changing MapModes
199 mpDrawLayer->SetRefDevice(GetRefDevice());
200 }
201}
202
204{
205 if (!ValidTab(nTab) || nTab >= static_cast<SCTAB>(maTabs.size()) || !maTabs[nTab])
206 return;
207
208 maTabs[nTab]->SetDrawPageSize();
209}
210
211bool ScDocument::IsChart( const SdrObject* pObject )
212{
213 // IsChart() implementation moved to svx drawinglayer
214 if(pObject && SdrObjKind::OLE2 == pObject->GetObjIdentifier())
215 {
216 return static_cast<const SdrOle2Obj*>(pObject)->IsChart();
217 }
218
219 return false;
220}
221
222IMPL_LINK( ScDocument, GetUserDefinedColor, sal_uInt16, nColorIndex, Color* )
223{
225 if (mpDrawLayer)
226 xColorList = mpDrawLayer->GetColorList();
227 else
228 {
230 if (!pColorList.is())
231 pColorList = XColorList::CreateStdColorList();
232 xColorList = pColorList;
233 }
234 return const_cast<Color*>(&(xColorList->GetColor(nColorIndex)->GetColor()));
235}
236
237bool ScDocument::DrawGetPrintArea( ScRange& rRange, bool bSetHor, bool bSetVer ) const
238{
239 return mpDrawLayer->GetPrintArea( rRange, bSetHor, bSetVer );
240}
241
242void ScDocument::DeleteObjectsInArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
243 const ScMarkData& rMark, bool bAnchored)
244{
245 if (!mpDrawLayer)
246 return;
247
248 SCTAB nTabCount = GetTableCount();
249 for (const auto& rTab : rMark)
250 {
251 if (rTab >= nTabCount)
252 break;
253 if (maTabs[rTab])
254 mpDrawLayer->DeleteObjectsInArea( rTab, nCol1, nRow1, nCol2, nRow2, bAnchored);
255 }
256}
257
259{
260 if (!mpDrawLayer)
261 return;
262
263 mpDrawLayer->DeleteObjectsInSelection( rMark );
264}
265
266bool ScDocument::HasOLEObjectsInArea( const ScRange& rRange, const ScMarkData* pTabMark )
267{
268 // pTabMark is used only for selected tables. If pTabMark is 0, all tables of rRange are used.
269
270 if (!mpDrawLayer)
271 return false;
272
273 SCTAB nStartTab = 0;
274 SCTAB nEndTab = static_cast<SCTAB>(maTabs.size());
275 if ( !pTabMark )
276 {
277 nStartTab = rRange.aStart.Tab();
278 nEndTab = rRange.aEnd.Tab();
279 }
280
281 for (SCTAB nTab = nStartTab; nTab <= nEndTab; nTab++)
282 {
283 if ( !pTabMark || pTabMark->GetTableSelect(nTab) )
284 {
285 tools::Rectangle aMMRect = GetMMRect( rRange.aStart.Col(), rRange.aStart.Row(),
286 rRange.aEnd.Col(), rRange.aEnd.Row(), nTab );
287
288 SdrPage* pPage = mpDrawLayer->GetPage(static_cast<sal_uInt16>(nTab));
289 OSL_ENSURE(pPage,"Page ?");
290 if (pPage)
291 {
292 SdrObjListIter aIter( pPage, SdrIterMode::Flat );
293 SdrObject* pObject = aIter.Next();
294 while (pObject)
295 {
296 if ( pObject->GetObjIdentifier() == SdrObjKind::OLE2 &&
297 aMMRect.Contains( pObject->GetCurrentBoundRect() ) )
298 return true;
299
300 pObject = aIter.Next();
301 }
302 }
303 }
304 }
305
306 return false;
307}
308
310{
311 if (!mpDrawLayer)
312 return;
313 SdrPage* pPage = mpDrawLayer->GetPage(static_cast<sal_uInt16>(nTab));
314 OSL_ENSURE(pPage,"Page ?");
315 if (!pPage)
316 return;
317
318 SdrObjListIter aIter( pPage, SdrIterMode::Flat );
319 SdrObject* pObject = aIter.Next();
320 while (pObject)
321 {
322 if (SdrGrafObj* pGrafObj = dynamic_cast<SdrGrafObj*>(pObject))
323 {
324 if ( pGrafObj->IsAnimated() )
325 {
326 pGrafObj->StartAnimation();
327 }
328 }
329 pObject = aIter.Next();
330 }
331}
332
333bool ScDocument::HasBackgroundDraw( SCTAB nTab, const tools::Rectangle& rMMRect ) const
334{
335 // Are there objects in the background layer who are (partly) affected by rMMRect
336 // (for Drawing optimization, no deletion in front of the background
337 if (!mpDrawLayer)
338 return false;
339 SdrPage* pPage = mpDrawLayer->GetPage(static_cast<sal_uInt16>(nTab));
340 OSL_ENSURE(pPage,"Page ?");
341 if (!pPage)
342 return false;
343
344 bool bFound = false;
345
346 SdrObjListIter aIter( pPage, SdrIterMode::Flat );
347 SdrObject* pObject = aIter.Next();
348 while (pObject && !bFound)
349 {
350 if ( pObject->GetLayer() == SC_LAYER_BACK && pObject->GetCurrentBoundRect().Overlaps( rMMRect ) )
351 bFound = true;
352 pObject = aIter.Next();
353 }
354
355 return bFound;
356}
357
358bool ScDocument::HasAnyDraw( SCTAB nTab, const tools::Rectangle& rMMRect ) const
359{
360 // Are there any objects at all who are (partly) affected by rMMRect?
361 // (To detect blank pages when printing)
362 if (!mpDrawLayer)
363 return false;
364 SdrPage* pPage = mpDrawLayer->GetPage(static_cast<sal_uInt16>(nTab));
365 OSL_ENSURE(pPage,"Page ?");
366 if (!pPage)
367 return false;
368
369 bool bFound = false;
370
371 SdrObjListIter aIter( pPage, SdrIterMode::Flat );
372 SdrObject* pObject = aIter.Next();
373 while (pObject && !bFound)
374 {
375 if ( pObject->GetCurrentBoundRect().Overlaps( rMMRect ) )
376 bFound = true;
377 pObject = aIter.Next();
378 }
379
380 return bFound;
381}
382
384{
385 if (mpDrawLayer)
386 mpDrawLayer->EnsureGraphicNames();
387}
388
390{
391 // for Drag&Drop on draw object
392 SdrObject* pFound = nullptr;
393 if (mpDrawLayer && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
394 {
395 SdrPage* pPage = mpDrawLayer->GetPage(static_cast<sal_uInt16>(nTab));
396 OSL_ENSURE(pPage,"Page ?");
397 if (pPage)
398 {
399 SdrObjListIter aIter( pPage, SdrIterMode::Flat );
400 SdrObject* pObject = aIter.Next();
401 while (pObject)
402 {
403 if ( pObject->GetCurrentBoundRect().Contains(rPos) )
404 {
405 // Intern is of no interest
406 // Only object form background layer, when no object form another layer is found
407 SdrLayerID nLayer = pObject->GetLayer();
408 if ( (nLayer != SC_LAYER_INTERN) && (nLayer != SC_LAYER_HIDDEN) )
409 {
410 if ( nLayer != SC_LAYER_BACK ||
411 !pFound || pFound->GetLayer() == SC_LAYER_BACK )
412 {
413 pFound = pObject;
414 }
415 }
416 }
417 // Continue search -> take last (on top) found object
418 pObject = aIter.Next();
419 }
420 }
421 }
422 return pFound;
423}
424
425bool ScDocument::IsPrintEmpty( SCCOL nStartCol, SCROW nStartRow,
426 SCCOL nEndCol, SCROW nEndRow,
427 SCTAB nTab, bool bLeftIsEmpty,
428 ScRange* pLastRange, tools::Rectangle* pLastMM ) const
429{
430 if (!IsBlockEmpty( nStartCol, nStartRow, nEndCol, nEndRow, nTab ))
431 return false;
432
433 if (HasAttrib(ScRange(nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab), HasAttrFlags::Lines))
434 // We want to print sheets with borders even if there is no cell content.
435 return false;
436
437 tools::Rectangle aMMRect;
438 if ( pLastRange && pLastMM && nTab == pLastRange->aStart.Tab() &&
439 nStartRow == pLastRange->aStart.Row() && nEndRow == pLastRange->aEnd.Row() )
440 {
441 // keep vertical part of aMMRect, only update horizontal position
442 aMMRect = *pLastMM;
443
444 tools::Long nLeft = 0;
445 SCCOL i;
446 for (i=0; i<nStartCol; i++)
447 nLeft += GetColWidth(i,nTab);
448 tools::Long nRight = nLeft;
449 for (i=nStartCol; i<=nEndCol; i++)
450 nRight += GetColWidth(i,nTab);
451
454 }
455 else
456 aMMRect = GetMMRect( nStartCol, nStartRow, nEndCol, nEndRow, nTab );
457
458 if ( pLastRange && pLastMM )
459 {
460 *pLastRange = ScRange( nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab );
461 *pLastMM = aMMRect;
462 }
463
464 if ( HasAnyDraw( nTab, aMMRect ))
465 return false;
466
467 if ( nStartCol > 0 && !bLeftIsEmpty )
468 {
469 // similar to in ScPrintFunc::AdjustPrintArea
470 // ExtendPrintArea starting only from the start column of the print area
471
472 SCCOL nExtendCol = nStartCol - 1;
473 SCROW nTmpRow = nEndRow;
474
475 // ExtendMerge() is non-const, but called without refresh. GetPrinter()
476 // might create and assign a printer.
477 ScDocument* pThis = const_cast<ScDocument*>(this);
478
479 pThis->ExtendMerge( 0,nStartRow, nExtendCol,nTmpRow, nTab ); // no Refresh, incl. Attrs
480
481 OutputDevice* pDev = pThis->GetPrinter();
482 pDev->SetMapMode(MapMode(MapUnit::MapPixel)); // Important for GetNeededSize
483 ExtendPrintArea( pDev, nTab, 0, nStartRow, nExtendCol, nEndRow );
484 if ( nExtendCol >= nStartCol )
485 return false;
486 }
487
488 return true;
489}
490
491void ScDocument::Clear( bool bFromDestructor )
492{
493 for (auto& rxTab : maTabs)
494 if (rxTab)
495 rxTab->GetCondFormList()->clear();
496
497 maTabs.clear();
498 pSelectionAttr.reset();
499
500 if (mpDrawLayer)
501 {
502 mpDrawLayer->ClearModel( bFromDestructor );
503 }
504}
505
507{
508 // looks for detective objects, annotations don't count
509 // (used to adjust scale so detective objects hit their cells better)
510
511 bool bFound = false;
512
513 if (mpDrawLayer)
514 {
515 SdrPage* pPage = mpDrawLayer->GetPage(static_cast<sal_uInt16>(nTab));
516 OSL_ENSURE(pPage,"Page ?");
517 if (pPage)
518 {
519 SdrObjListIter aIter( pPage, SdrIterMode::DeepNoGroups );
520 SdrObject* pObject = aIter.Next();
521 while (pObject && !bFound)
522 {
523 // anything on the internal layer except captions (annotations)
524 if ( (pObject->GetLayer() == SC_LAYER_INTERN) && !ScDrawLayer::IsNoteCaption( pObject ) )
525 bFound = true;
526
527 pObject = aIter.Next();
528 }
529 }
530 }
531
532 return bFound;
533}
534
536{
537 // In old versions (until 4.0 without SP), when switching between systems,
538 // the Font attribute was not adjusted.
539 // This has to be redone for Documents until SP2:
540 // Everything that is not SYMBOL is set to system CharSet.
541 // CharSet should be correct for new documents (version SC_FONTCHARSET)
542
543 bool bUpdateOld = ( nSrcVer < SC_FONTCHARSET );
544
545 rtl_TextEncoding eSysSet = osl_getThreadTextEncoding();
546 if ( !(eSrcSet != eSysSet || bUpdateOld) )
547 return;
548
549 ScDocumentPool* pPool = mxPoolHelper->GetDocPool();
550 for (const SfxPoolItem* pItem : pPool->GetItemSurrogates(ATTR_FONT))
551 {
552 auto pFontItem = const_cast<SvxFontItem*>(dynamic_cast<const SvxFontItem*>(pItem));
553 if ( pFontItem && ( pFontItem->GetCharSet() == eSrcSet ||
554 ( bUpdateOld && pFontItem->GetCharSet() != RTL_TEXTENCODING_SYMBOL ) ) )
555 pFontItem->SetCharSet(eSysSet);
556 }
557
558 if ( mpDrawLayer )
559 {
560 SfxItemPool& rDrawPool = mpDrawLayer->GetItemPool();
561 for (const SfxPoolItem* pItem : rDrawPool.GetItemSurrogates(EE_CHAR_FONTINFO))
562 {
563 SvxFontItem* pFontItem = const_cast<SvxFontItem*>(dynamic_cast<const SvxFontItem*>(pItem));
564 if ( pFontItem && ( pFontItem->GetCharSet() == eSrcSet ||
565 ( bUpdateOld && pFontItem->GetCharSet() != RTL_TEXTENCODING_SYMBOL ) ) )
566 pFontItem->SetCharSet( eSysSet );
567 }
568 }
569}
570
572{
573 bLoadingMedium = bVal;
574 for (auto& rxTab : maTabs)
575 {
576 if (!rxTab)
577 return;
578
579 rxTab->SetLoadingMedium(bVal);
580 }
581}
582
584{
585 bImportingXML = bVal;
586 if (mpDrawLayer)
587 mpDrawLayer->EnableAdjust(!bImportingXML);
588
589 if ( !bVal )
590 {
591 // #i57869# after loading, do the real RTL mirroring for the sheets that have the LoadingRTL flag set
592
593 for ( SCTAB nTab=0; nTab< static_cast<SCTAB>(maTabs.size()) && maTabs[nTab]; nTab++ )
594 if ( maTabs[nTab]->IsLoadingRTL() )
595 {
596 // SetLayoutRTL => SetDrawPageSize => ScDrawLayer::SetPageSize, includes RTL-mirroring;
597 // bImportingXML must be cleared first
598 maTabs[nTab]->SetLoadingRTL( false );
600 }
601 }
602
603 SetLoadingMedium(bVal);
604}
605
606const std::shared_ptr<SvxForbiddenCharactersTable>& ScDocument::GetForbiddenCharacters() const
607{
609}
610
611void ScDocument::SetForbiddenCharacters(const std::shared_ptr<SvxForbiddenCharactersTable>& rNew)
612{
614 if ( mpEditEngine )
616 if ( mpDrawLayer )
617 mpDrawLayer->SetForbiddenCharsTable( xForbiddenCharacters );
618}
619
621{
622 return nAsianCompression != CharCompressType::Invalid;
623}
624
626{
627 if ( nAsianCompression == CharCompressType::Invalid )
628 return CharCompressType::NONE;
629 else
630 return nAsianCompression;
631}
632
634{
635 nAsianCompression = nNew;
636 if ( mpEditEngine )
637 mpEditEngine->SetAsianCompressionMode( nAsianCompression );
638 if ( mpDrawLayer )
639 mpDrawLayer->SetCharCompressType( nAsianCompression );
640}
641
643{
645}
646
648{
650 return false;
651 else
652 return static_cast<bool>(nAsianKerning);
653}
654
656{
657 nAsianKerning = static_cast<sal_uInt8>(bNew);
658 if ( mpEditEngine )
659 mpEditEngine->SetKernAsianPunctuation( static_cast<bool>( nAsianKerning ) );
660 if ( mpDrawLayer )
661 mpDrawLayer->SetKernAsianPunctuation( static_cast<bool>( nAsianKerning ) );
662}
663
665{
669}
670
671/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool ValidTab(SCTAB nTab)
Definition: address.hxx:111
CharCompressType
void SetKernAsianPunctuation(bool bEnabled)
void SetAsianCompressionMode(CharCompressType nCompression)
static void SetForbiddenCharsTable(const std::shared_ptr< SvxForbiddenCharactersTable > &xForbiddenChars)
void SetMapMode()
SCTAB Tab() const
Definition: address.hxx:283
SCROW Row() const
Definition: address.hxx:274
SCCOL Col() const
Definition: address.hxx:279
static void UpdateChartsOnDestinationPage(ScDocument &rDestDoc, const SCTAB nDestTab)
static void AdjustRangesOfChartsOnDestinationPage(const ScDocument &rSrcDoc, ScDocument &rDestDoc, const SCTAB nSrcTab, const SCTAB nDestTab)
sal_uInt16 GetTabDistance() const
Definition: docoptio.hxx:70
bool IsValidAsianKerning() const
Definition: documen9.cxx:642
bool bAutoCalc
Definition: document.hxx:487
bool IsPrintEmpty(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, bool bLeftIsEmpty=false, ScRange *pLastRange=nullptr, tools::Rectangle *pLastMM=nullptr) const
Definition: documen9.cxx:425
bool GetAsianKerning() const
Definition: documen9.cxx:647
SC_DLLPUBLIC sal_uInt16 GetColWidth(SCCOL nCol, SCTAB nTab, bool bHiddenAsZero=true) const
Definition: document.cxx:4184
std::unique_ptr< ScFieldEditEngine > mpEditEngine
Definition: document.hxx:369
void UpdateDrawPrinter()
Definition: documen9.cxx:193
void Clear(bool bFromDestructor=false)
Definition: documen9.cxx:491
SC_DLLPUBLIC void SetLayoutRTL(SCTAB nTab, bool bRTL, ScObjectHandling eObjectHandling=ScObjectHandling::RecalcPosMode)
Definition: document.cxx:959
SC_DLLPUBLIC bool ExtendMerge(SCCOL nStartCol, SCROW nStartRow, SCCOL &rEndCol, SCROW &rEndRow, SCTAB nTab, bool bRefresh=false)
Definition: document.cxx:5671
void BeginDrawUndo()
Definition: documen9.cxx:61
SC_DLLPUBLIC void InitDrawLayer(SfxObjectShell *pDocShell=nullptr)
Definition: documen9.cxx:105
LanguageType eCtlLanguage
Definition: document.hxx:454
void EnsureGraphicNames()
Definition: documen9.cxx:383
static const sal_uInt16 nSrcVer
Definition: document.hxx:478
rtl::Reference< ScPoolHelper > mxPoolHelper
Definition: document.hxx:358
sal_uInt8 nAsianKerning
Definition: document.hxx:536
CharCompressType GetAsianCompression() const
Definition: documen9.cxx:625
std::unique_ptr< ScPatternAttr > pSelectionAttr
Definition: document.hxx:385
bool HasDetectiveObjects(SCTAB nTab) const
Definition: documen9.cxx:506
bool bImportingXML
Definition: document.hxx:505
SC_DLLPUBLIC OutputDevice * GetRefDevice()
Definition: documen8.cxx:199
bool HasOLEObjectsInArea(const ScRange &rRange, const ScMarkData *pTabMark=nullptr)
Definition: documen9.cxx:266
bool IsValidAsianCompression() const
Definition: documen9.cxx:620
bool bLoadingMedium
Definition: document.hxx:504
TableContainer maTabs
Definition: document.hxx:378
LanguageType eLanguage
Definition: document.hxx:452
void SetAsianKerning(bool bNew)
Definition: documen9.cxx:655
SC_DLLPUBLIC void SetDrawPageSize(SCTAB nTab)
Definition: documen9.cxx:203
void DeleteObjectsInSelection(const ScMarkData &rMark)
Definition: documen9.cxx:258
bool HasAnyDraw(SCTAB nTab, const tools::Rectangle &rMMRect) const
Definition: documen9.cxx:358
const std::shared_ptr< SvxForbiddenCharactersTable > & GetForbiddenCharacters() const
Definition: documen9.cxx:606
SC_DLLPUBLIC bool HasAttrib(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, HasAttrFlags nMask) const
Definition: document.cxx:5273
SfxBroadcaster * GetDrawBroadcaster()
Definition: documen9.cxx:56
bool IsClipOrUndo() const
Definition: document.hxx:1591
void DeleteObjectsInArea(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData &rMark, bool bAnchored=false)
Definition: documen9.cxx:242
SC_DLLPUBLIC void SetImportingXML(bool bVal)
Definition: documen9.cxx:583
SC_DLLPUBLIC void TransferDrawPage(const ScDocument &rSrcDoc, SCTAB nSrcPos, SCTAB nDestPos)
Definition: documen9.cxx:67
static bool IsChart(const SdrObject *pObject)
Definition: documen9.cxx:211
rtl_TextEncoding eSrcSet
Definition: document.hxx:455
SC_DLLPUBLIC ScStyleSheetPool * GetStyleSheetPool() const
Definition: document.cxx:6170
std::shared_ptr< SvxForbiddenCharactersTable > xForbiddenCharacters
Definition: document.hxx:401
void UpdateFontCharSet()
Definition: documen9.cxx:535
LanguageType eCjkLanguage
Definition: document.hxx:453
CharCompressType nAsianCompression
Definition: document.hxx:535
void ApplyAsianEditSettings(ScEditEngineDefaulter &rEngine)
Definition: documen9.cxx:664
SC_DLLPUBLIC bool DrawGetPrintArea(ScRange &rRange, bool bSetHor, bool bSetVer) const
Definition: documen9.cxx:237
sc::DocumentLinkManager & GetDocLinkManager()
Definition: documen2.cxx:241
bool HasBackgroundDraw(SCTAB nTab, const tools::Rectangle &rMMRect) const
Definition: documen9.cxx:333
void UpdateDrawLanguages()
Definition: documen9.cxx:182
bool IsBlockEmpty(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab) const
Definition: document.cxx:5400
SfxPrinter * GetPrinter(bool bCreateIfNotExist=true)
Definition: documen8.cxx:114
std::unique_ptr< ScDrawLayer > mpDrawLayer
Definition: document.hxx:374
SfxObjectShell * mpShell
Definition: document.hxx:371
void ExtendPrintArea(OutputDevice *pDev, SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL &rEndCol, SCROW nEndRow) const
Find the maximum column position that contains printable data for the specified row range.
Definition: documen3.cxx:2108
void SetForbiddenCharacters(const std::shared_ptr< SvxForbiddenCharactersTable > &rNew)
Definition: documen9.cxx:611
void SetAsianCompression(CharCompressType nNew)
Definition: documen9.cxx:633
void StartAnimations(SCTAB nTab)
Definition: documen9.cxx:309
SC_DLLPUBLIC const ScDocOptions & GetDocOptions() const
Definition: documen3.cxx:1948
SC_DLLPUBLIC tools::Rectangle GetMMRect(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, bool bHiddenAsZero=true) const
Definition: documen3.cxx:1998
void SetLoadingMedium(bool bVal)
Definition: documen9.cxx:571
SC_DLLPUBLIC SCTAB GetTableCount() const
Definition: document.cxx:316
SdrObject * GetObjectAtPoint(SCTAB nTab, const Point &rPos)
Definition: documen9.cxx:389
static bool IsNoteCaption(SdrObject *pObj)
Returns true, if the passed object is the caption of a cell note.
Definition: drwlayer.cxx:2901
todo: It should be possible to have MarkArrays for each table, in order to enable "search all" across...
Definition: markdata.hxx:43
bool GetTableSelect(SCTAB nTab) const
Definition: markdata.cxx:169
ScAddress aEnd
Definition: address.hxx:498
ScAddress aStart
Definition: address.hxx:497
void CopyStyleFrom(SfxStyleSheetBasePool *pSrcPool, const OUString &rName, SfxStyleFamily eFamily, bool bNewStyleHierarchy=false)
Definition: stlpool.cxx:128
SdrObject * Next()
virtual void InsertObject(SdrObject *pObj, size_t nPos=SAL_MAX_SIZE)
SfxStyleSheet * GetStyleSheet() const
virtual rtl::Reference< SdrObject > CloneSdrObject(SdrModel &rTargetModel) const=0
virtual SdrLayerID GetLayer() const
Item2Range GetItemSurrogates(sal_uInt16 nWhich) const
SfxItemPool * GetSecondaryPool() const
void SetPoolDefaultItem(const SfxPoolItem &)
void SetSecondaryPool(SfxItemPool *pPool)
bool IsLoading() const
OUString GetTitle(sal_uInt16 nMaxLen=0) const
rtl_TextEncoding GetCharSet() const
void SetCharSet(rtl_TextEncoding _eEncoding)
static XColorListRef CreateStdColorList()
sfx2::LinkManager * getLinkManager(bool bCreate=true)
bool Contains(const Point &rPOINT) const
constexpr void SetLeft(tools::Long v)
constexpr void SetRight(tools::Long v)
IMPL_LINK(ScDocument, GetUserDefinedColor, sal_uInt16, nColorIndex, Color *)
Definition: documen9.cxx:222
#define SC_ASIANKERNING_INVALID
Definition: document.hxx:252
@ CORE
Definition: document.hxx:317
constexpr TypedWhichId< SvxAutoKernItem > EE_CHAR_PAIRKERNING(EE_CHAR_START+11)
constexpr TypedWhichId< SvxLanguageItem > EE_CHAR_LANGUAGE_CTL(EE_CHAR_START+16)
constexpr TypedWhichId< SvxLanguageItem > EE_CHAR_LANGUAGE_CJK(EE_CHAR_START+15)
constexpr TypedWhichId< SvxLanguageItem > EE_CHAR_LANGUAGE(EE_CHAR_START+14)
constexpr TypedWhichId< SvxFontItem > EE_CHAR_FONTINFO(EE_CHAR_START+1)
EmbeddedObjectRef * pObject
constexpr SdrLayerID SC_LAYER_HIDDEN(4)
constexpr SdrLayerID SC_LAYER_INTERN(2)
constexpr SdrLayerID SC_LAYER_BACK(1)
OUString aName
int i
constexpr Point convert(const Point &rPoint, o3tl::Length eFrom, o3tl::Length eTo)
long Long
#define SC_FONTCHARSET
Definition: rechead.hxx:32
constexpr TypedWhichId< SvxFontItem > ATTR_FONT(100)
A pretty assertion that checks that the relevant bits in the @nFlags are not set on the document at e...
Definition: document.hxx:2761
unsigned char sal_uInt8
sal_Int16 SCTAB
Definition: types.hxx:22
sal_Int16 SCCOL
Definition: types.hxx:21
sal_Int32 SCROW
Definition: types.hxx:17