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