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 < GetTableCount(); nTab++)
150 if (maTabs[nTab])
151 nDrawPages = nTab + 1; // needed number of pages
152
153 for (nTab = 0; nTab < nDrawPages && nTab < GetTableCount(); 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 (ScTable* pTable = FetchTable(nTab))
206 pTable->SetDrawPageSize();
207}
208
209bool ScDocument::IsChart( const SdrObject* pObject )
210{
211 // IsChart() implementation moved to svx drawinglayer
212 if(pObject && SdrObjKind::OLE2 == pObject->GetObjIdentifier())
213 {
214 return static_cast<const SdrOle2Obj*>(pObject)->IsChart();
215 }
216
217 return false;
218}
219
220IMPL_LINK( ScDocument, GetUserDefinedColor, sal_uInt16, nColorIndex, Color* )
221{
223 if (mpDrawLayer)
224 xColorList = mpDrawLayer->GetColorList();
225 else
226 {
228 if (!pColorList.is())
229 pColorList = XColorList::CreateStdColorList();
230 xColorList = pColorList;
231 }
232 return const_cast<Color*>(&(xColorList->GetColor(nColorIndex)->GetColor()));
233}
234
235bool ScDocument::DrawGetPrintArea( ScRange& rRange, bool bSetHor, bool bSetVer ) const
236{
237 return mpDrawLayer->GetPrintArea( rRange, bSetHor, bSetVer );
238}
239
240void ScDocument::DeleteObjectsInArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
241 const ScMarkData& rMark, bool bAnchored)
242{
243 if (!mpDrawLayer)
244 return;
245
246 SCTAB nTabCount = GetTableCount();
247 for (const auto& rTab : rMark)
248 {
249 if (rTab >= nTabCount)
250 break;
251 if (maTabs[rTab])
252 mpDrawLayer->DeleteObjectsInArea( rTab, nCol1, nRow1, nCol2, nRow2, bAnchored);
253 }
254}
255
257{
258 if (!mpDrawLayer)
259 return;
260
261 mpDrawLayer->DeleteObjectsInSelection( rMark );
262}
263
264bool ScDocument::HasOLEObjectsInArea( const ScRange& rRange, const ScMarkData* pTabMark )
265{
266 // pTabMark is used only for selected tables. If pTabMark is 0, all tables of rRange are used.
267
268 if (!mpDrawLayer)
269 return false;
270
271 SCTAB nStartTab = 0;
272 SCTAB nEndTab = GetTableCount();
273 if ( !pTabMark )
274 {
275 nStartTab = rRange.aStart.Tab();
276 nEndTab = rRange.aEnd.Tab();
277 }
278
279 for (SCTAB nTab = nStartTab; nTab <= nEndTab; nTab++)
280 {
281 if ( !pTabMark || pTabMark->GetTableSelect(nTab) )
282 {
283 tools::Rectangle aMMRect = GetMMRect( rRange.aStart.Col(), rRange.aStart.Row(),
284 rRange.aEnd.Col(), rRange.aEnd.Row(), nTab );
285
286 SdrPage* pPage = mpDrawLayer->GetPage(static_cast<sal_uInt16>(nTab));
287 OSL_ENSURE(pPage,"Page ?");
288 if (pPage)
289 {
290 SdrObjListIter aIter( pPage, SdrIterMode::Flat );
291 SdrObject* pObject = aIter.Next();
292 while (pObject)
293 {
294 if ( pObject->GetObjIdentifier() == SdrObjKind::OLE2 &&
295 aMMRect.Contains( pObject->GetCurrentBoundRect() ) )
296 return true;
297
298 pObject = aIter.Next();
299 }
300 }
301 }
302 }
303
304 return false;
305}
306
308{
309 if (!mpDrawLayer)
310 return;
311 SdrPage* pPage = mpDrawLayer->GetPage(static_cast<sal_uInt16>(nTab));
312 OSL_ENSURE(pPage,"Page ?");
313 if (!pPage)
314 return;
315
316 SdrObjListIter aIter( pPage, SdrIterMode::Flat );
317 SdrObject* pObject = aIter.Next();
318 while (pObject)
319 {
320 if (SdrGrafObj* pGrafObj = dynamic_cast<SdrGrafObj*>(pObject))
321 {
322 if ( pGrafObj->IsAnimated() )
323 {
324 pGrafObj->StartAnimation();
325 }
326 }
327 pObject = aIter.Next();
328 }
329}
330
331bool ScDocument::HasBackgroundDraw( SCTAB nTab, const tools::Rectangle& rMMRect ) const
332{
333 // Are there objects in the background layer who are (partly) affected by rMMRect
334 // (for Drawing optimization, no deletion in front of the background
335 if (!mpDrawLayer)
336 return false;
337 SdrPage* pPage = mpDrawLayer->GetPage(static_cast<sal_uInt16>(nTab));
338 OSL_ENSURE(pPage,"Page ?");
339 if (!pPage)
340 return false;
341
342 bool bFound = false;
343
344 SdrObjListIter aIter( pPage, SdrIterMode::Flat );
345 SdrObject* pObject = aIter.Next();
346 while (pObject && !bFound)
347 {
348 if ( pObject->GetLayer() == SC_LAYER_BACK && pObject->GetCurrentBoundRect().Overlaps( rMMRect ) )
349 bFound = true;
350 pObject = aIter.Next();
351 }
352
353 return bFound;
354}
355
356bool ScDocument::HasAnyDraw( SCTAB nTab, const tools::Rectangle& rMMRect ) const
357{
358 // Are there any objects at all who are (partly) affected by rMMRect?
359 // (To detect blank pages when printing)
360 if (!mpDrawLayer)
361 return false;
362 SdrPage* pPage = mpDrawLayer->GetPage(static_cast<sal_uInt16>(nTab));
363 OSL_ENSURE(pPage,"Page ?");
364 if (!pPage)
365 return false;
366
367 bool bFound = false;
368
369 SdrObjListIter aIter( pPage, SdrIterMode::Flat );
370 SdrObject* pObject = aIter.Next();
371 while (pObject && !bFound)
372 {
373 if ( pObject->GetCurrentBoundRect().Overlaps( rMMRect ) )
374 bFound = true;
375 pObject = aIter.Next();
376 }
377
378 return bFound;
379}
380
382{
383 if (mpDrawLayer)
384 mpDrawLayer->EnsureGraphicNames();
385}
386
388{
389 // for Drag&Drop on draw object
390 SdrObject* pFound = nullptr;
391 if (mpDrawLayer && nTab < GetTableCount() && maTabs[nTab])
392 {
393 SdrPage* pPage = mpDrawLayer->GetPage(static_cast<sal_uInt16>(nTab));
394 OSL_ENSURE(pPage,"Page ?");
395 if (pPage)
396 {
397 SdrObjListIter aIter( pPage, SdrIterMode::Flat );
398 SdrObject* pObject = aIter.Next();
399 while (pObject)
400 {
401 if ( pObject->GetCurrentBoundRect().Contains(rPos) )
402 {
403 // Intern is of no interest
404 // Only object form background layer, when no object form another layer is found
405 SdrLayerID nLayer = pObject->GetLayer();
406 if ( (nLayer != SC_LAYER_INTERN) && (nLayer != SC_LAYER_HIDDEN) )
407 {
408 if ( nLayer != SC_LAYER_BACK ||
409 !pFound || pFound->GetLayer() == SC_LAYER_BACK )
410 {
411 pFound = pObject;
412 }
413 }
414 }
415 // Continue search -> take last (on top) found object
416 pObject = aIter.Next();
417 }
418 }
419 }
420 return pFound;
421}
422
423bool ScDocument::IsPrintEmpty( SCCOL nStartCol, SCROW nStartRow,
424 SCCOL nEndCol, SCROW nEndRow,
425 SCTAB nTab, bool bLeftIsEmpty,
426 ScRange* pLastRange, tools::Rectangle* pLastMM ) const
427{
428 if (!IsBlockEmpty( nStartCol, nStartRow, nEndCol, nEndRow, nTab ))
429 return false;
430
431 if (HasAttrib(ScRange(nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab), HasAttrFlags::Lines))
432 // We want to print sheets with borders even if there is no cell content.
433 return false;
434
435 tools::Rectangle aMMRect;
436 if ( pLastRange && pLastMM && nTab == pLastRange->aStart.Tab() &&
437 nStartRow == pLastRange->aStart.Row() && nEndRow == pLastRange->aEnd.Row() )
438 {
439 // keep vertical part of aMMRect, only update horizontal position
440 aMMRect = *pLastMM;
441
442 tools::Long nLeft = 0;
443 SCCOL i;
444 for (i=0; i<nStartCol; i++)
445 nLeft += GetColWidth(i,nTab);
446 tools::Long nRight = nLeft;
447 for (i=nStartCol; i<=nEndCol; i++)
448 nRight += GetColWidth(i,nTab);
449
452 }
453 else
454 aMMRect = GetMMRect( nStartCol, nStartRow, nEndCol, nEndRow, nTab );
455
456 if ( pLastRange && pLastMM )
457 {
458 *pLastRange = ScRange( nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab );
459 *pLastMM = aMMRect;
460 }
461
462 if ( HasAnyDraw( nTab, aMMRect ))
463 return false;
464
465 if ( nStartCol > 0 && !bLeftIsEmpty )
466 {
467 // similar to in ScPrintFunc::AdjustPrintArea
468 // ExtendPrintArea starting only from the start column of the print area
469
470 SCCOL nExtendCol = nStartCol - 1;
471 SCROW nTmpRow = nEndRow;
472
473 // ExtendMerge() is non-const, but called without refresh. GetPrinter()
474 // might create and assign a printer.
475 ScDocument* pThis = const_cast<ScDocument*>(this);
476
477 pThis->ExtendMerge( 0,nStartRow, nExtendCol,nTmpRow, nTab ); // no Refresh, incl. Attrs
478
479 OutputDevice* pDev = pThis->GetPrinter();
480 pDev->SetMapMode(MapMode(MapUnit::MapPixel)); // Important for GetNeededSize
481 ExtendPrintArea( pDev, nTab, 0, nStartRow, nExtendCol, nEndRow );
482 if ( nExtendCol >= nStartCol )
483 return false;
484 }
485
486 return true;
487}
488
489void ScDocument::Clear( bool bFromDestructor )
490{
491 for (auto& rxTab : maTabs)
492 if (rxTab)
493 rxTab->GetCondFormList()->clear();
494
495 maTabs.clear();
496 pSelectionAttr.reset();
497
498 if (mpDrawLayer)
499 {
500 mpDrawLayer->ClearModel( bFromDestructor );
501 }
502}
503
505{
506 // looks for detective objects, annotations don't count
507 // (used to adjust scale so detective objects hit their cells better)
508
509 bool bFound = false;
510
511 if (mpDrawLayer)
512 {
513 SdrPage* pPage = mpDrawLayer->GetPage(static_cast<sal_uInt16>(nTab));
514 OSL_ENSURE(pPage,"Page ?");
515 if (pPage)
516 {
517 SdrObjListIter aIter( pPage, SdrIterMode::DeepNoGroups );
518 SdrObject* pObject = aIter.Next();
519 while (pObject && !bFound)
520 {
521 // anything on the internal layer except captions (annotations)
522 if ( (pObject->GetLayer() == SC_LAYER_INTERN) && !ScDrawLayer::IsNoteCaption( pObject ) )
523 bFound = true;
524
525 pObject = aIter.Next();
526 }
527 }
528 }
529
530 return bFound;
531}
532
534{
535 // In old versions (until 4.0 without SP), when switching between systems,
536 // the Font attribute was not adjusted.
537 // This has to be redone for Documents until SP2:
538 // Everything that is not SYMBOL is set to system CharSet.
539 // CharSet should be correct for new documents (version SC_FONTCHARSET)
540
541 bool bUpdateOld = ( nSrcVer < SC_FONTCHARSET );
542
543 rtl_TextEncoding eSysSet = osl_getThreadTextEncoding();
544 if ( !(eSrcSet != eSysSet || bUpdateOld) )
545 return;
546
547 ScDocumentPool* pPool = mxPoolHelper->GetDocPool();
548 for (const SfxPoolItem* pItem : pPool->GetItemSurrogates(ATTR_FONT))
549 {
550 auto pFontItem = const_cast<SvxFontItem*>(dynamic_cast<const SvxFontItem*>(pItem));
551 if ( pFontItem && ( pFontItem->GetCharSet() == eSrcSet ||
552 ( bUpdateOld && pFontItem->GetCharSet() != RTL_TEXTENCODING_SYMBOL ) ) )
553 pFontItem->SetCharSet(eSysSet);
554 }
555
556 if ( mpDrawLayer )
557 {
558 SfxItemPool& rDrawPool = mpDrawLayer->GetItemPool();
559 for (const SfxPoolItem* pItem : rDrawPool.GetItemSurrogates(EE_CHAR_FONTINFO))
560 {
561 SvxFontItem* pFontItem = const_cast<SvxFontItem*>(dynamic_cast<const SvxFontItem*>(pItem));
562 if ( pFontItem && ( pFontItem->GetCharSet() == eSrcSet ||
563 ( bUpdateOld && pFontItem->GetCharSet() != RTL_TEXTENCODING_SYMBOL ) ) )
564 pFontItem->SetCharSet( eSysSet );
565 }
566 }
567}
568
570{
571 bLoadingMedium = bVal;
572 for (auto& rxTab : maTabs)
573 {
574 if (!rxTab)
575 return;
576
577 rxTab->SetLoadingMedium(bVal);
578 }
579}
580
582{
583 bImportingXML = bVal;
584 if (mpDrawLayer)
585 mpDrawLayer->EnableAdjust(!bImportingXML);
586
587 if ( !bVal )
588 {
589 // #i57869# after loading, do the real RTL mirroring for the sheets that have the LoadingRTL flag set
590
591 for (SCTAB nTab = 0; nTab < GetTableCount() && maTabs[nTab]; nTab++)
592 if ( maTabs[nTab]->IsLoadingRTL() )
593 {
594 // SetLayoutRTL => SetDrawPageSize => ScDrawLayer::SetPageSize, includes RTL-mirroring;
595 // bImportingXML must be cleared first
596 maTabs[nTab]->SetLoadingRTL( false );
598 }
599 }
600
601 SetLoadingMedium(bVal);
602}
603
604const std::shared_ptr<SvxForbiddenCharactersTable>& ScDocument::GetForbiddenCharacters() const
605{
607}
608
609void ScDocument::SetForbiddenCharacters(const std::shared_ptr<SvxForbiddenCharactersTable>& rNew)
610{
612 if ( mpEditEngine )
614 if ( mpDrawLayer )
615 mpDrawLayer->SetForbiddenCharsTable( xForbiddenCharacters );
616}
617
619{
620 return nAsianCompression != CharCompressType::Invalid;
621}
622
624{
625 if ( nAsianCompression == CharCompressType::Invalid )
626 return CharCompressType::NONE;
627 else
628 return nAsianCompression;
629}
630
632{
633 nAsianCompression = nNew;
634 if ( mpEditEngine )
635 mpEditEngine->SetAsianCompressionMode( nAsianCompression );
636 if ( mpDrawLayer )
637 mpDrawLayer->SetCharCompressType( nAsianCompression );
638}
639
641{
643}
644
646{
648 return false;
649 else
650 return static_cast<bool>(nAsianKerning);
651}
652
654{
655 nAsianKerning = static_cast<sal_uInt8>(bNew);
656 if ( mpEditEngine )
657 mpEditEngine->SetKernAsianPunctuation( static_cast<bool>( nAsianKerning ) );
658 if ( mpDrawLayer )
659 mpDrawLayer->SetKernAsianPunctuation( static_cast<bool>( nAsianKerning ) );
660}
661
663{
667}
668
669/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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:640
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:423
bool GetAsianKerning() const
Definition: documen9.cxx:645
SC_DLLPUBLIC sal_uInt16 GetColWidth(SCCOL nCol, SCTAB nTab, bool bHiddenAsZero=true) const
Definition: document.cxx:4122
std::unique_ptr< ScFieldEditEngine > mpEditEngine
Definition: document.hxx:369
void UpdateDrawPrinter()
Definition: documen9.cxx:193
void Clear(bool bFromDestructor=false)
Definition: documen9.cxx:489
SC_DLLPUBLIC void SetLayoutRTL(SCTAB nTab, bool bRTL, ScObjectHandling eObjectHandling=ScObjectHandling::RecalcPosMode)
Definition: document.cxx:937
SC_DLLPUBLIC ScTable * FetchTable(SCTAB nTab)
Definition: document.cxx:2509
SC_DLLPUBLIC bool ExtendMerge(SCCOL nStartCol, SCROW nStartRow, SCCOL &rEndCol, SCROW &rEndRow, SCTAB nTab, bool bRefresh=false)
Definition: document.cxx:5556
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:381
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:623
std::unique_ptr< ScPatternAttr > pSelectionAttr
Definition: document.hxx:385
bool HasDetectiveObjects(SCTAB nTab) const
Definition: documen9.cxx:504
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:264
bool IsValidAsianCompression() const
Definition: documen9.cxx:618
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:653
SC_DLLPUBLIC void SetDrawPageSize(SCTAB nTab)
Definition: documen9.cxx:203
void DeleteObjectsInSelection(const ScMarkData &rMark)
Definition: documen9.cxx:256
bool HasAnyDraw(SCTAB nTab, const tools::Rectangle &rMMRect) const
Definition: documen9.cxx:356
const std::shared_ptr< SvxForbiddenCharactersTable > & GetForbiddenCharacters() const
Definition: documen9.cxx:604
SC_DLLPUBLIC bool HasAttrib(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, HasAttrFlags nMask) const
Definition: document.cxx:5161
SfxBroadcaster * GetDrawBroadcaster()
Definition: documen9.cxx:56
bool IsClipOrUndo() const
Definition: document.hxx:1592
void DeleteObjectsInArea(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData &rMark, bool bAnchored=false)
Definition: documen9.cxx:240
SC_DLLPUBLIC void SetImportingXML(bool bVal)
Definition: documen9.cxx:581
SC_DLLPUBLIC void TransferDrawPage(const ScDocument &rSrcDoc, SCTAB nSrcPos, SCTAB nDestPos)
Definition: documen9.cxx:67
static bool IsChart(const SdrObject *pObject)
Definition: documen9.cxx:209
rtl_TextEncoding eSrcSet
Definition: document.hxx:455
SC_DLLPUBLIC ScStyleSheetPool * GetStyleSheetPool() const
Definition: document.cxx:6055
std::shared_ptr< SvxForbiddenCharactersTable > xForbiddenCharacters
Definition: document.hxx:401
void UpdateFontCharSet()
Definition: documen9.cxx:533
LanguageType eCjkLanguage
Definition: document.hxx:453
CharCompressType nAsianCompression
Definition: document.hxx:535
void ApplyAsianEditSettings(ScEditEngineDefaulter &rEngine)
Definition: documen9.cxx:662
SC_DLLPUBLIC bool DrawGetPrintArea(ScRange &rRange, bool bSetHor, bool bSetVer) const
Definition: documen9.cxx:235
sc::DocumentLinkManager & GetDocLinkManager()
Definition: documen2.cxx:241
bool HasBackgroundDraw(SCTAB nTab, const tools::Rectangle &rMMRect) const
Definition: documen9.cxx:331
void UpdateDrawLanguages()
Definition: documen9.cxx:182
bool IsBlockEmpty(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab) const
Definition: document.cxx:5288
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:2096
void SetForbiddenCharacters(const std::shared_ptr< SvxForbiddenCharactersTable > &rNew)
Definition: documen9.cxx:609
void SetAsianCompression(CharCompressType nNew)
Definition: documen9.cxx:631
void StartAnimations(SCTAB nTab)
Definition: documen9.cxx:307
SC_DLLPUBLIC const ScDocOptions & GetDocOptions() const
Definition: documen3.cxx:1936
SC_DLLPUBLIC tools::Rectangle GetMMRect(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, bool bHiddenAsZero=true) const
Definition: documen3.cxx:1986
void SetLoadingMedium(bool bVal)
Definition: documen9.cxx:569
SC_DLLPUBLIC SCTAB GetTableCount() const
Definition: document.cxx:297
SdrObject * GetObjectAtPoint(SCTAB nTab, const Point &rPos)
Definition: documen9.cxx:387
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:220
#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