LibreOffice Module sd (master) 1
sdpage2.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 <vector>
21#include <libxml/xmlwriter.h>
22#include <sfx2/docfile.hxx>
23#include <sfx2/linkmgr.hxx>
24#include <svx/svdundo.hxx>
25#include <editeng/outlobj.hxx>
26#include <editeng/xmlcnitm.hxx>
27#include <svx/svditer.hxx>
28#include <com/sun/star/text/XTextCopy.hpp>
29#include <tools/debug.hxx>
30#include <svx/svddef.hxx>
31#include <rtl/math.hxx>
32#include <svx/svdograf.hxx>
33
34#include <Annotation.hxx>
36#include <sdresid.hxx>
37#include <sdpage.hxx>
38#include <glob.hxx>
39#include <strings.hrc>
40#include <drawdoc.hxx>
41#include <stlpool.hxx>
42#include <pglink.hxx>
43
44#include <strings.hxx>
45#include <DrawDocShell.hxx>
46
47#include <svl/itemset.hxx>
48
49using namespace ::sd;
50using namespace ::com::sun::star;
51using namespace ::com::sun::star::uno;
52using namespace ::com::sun::star::office;
53
54/*************************************************************************
55|*
56|* Sets: names of layout, master page links and templates for presentation
57|* objects
58|*
59|* Preconditions: - The page has to know the correct model!
60|* - The corresponding master page has to be in the model.
61|* - The corresponding style sheets have to be in the style sheet
62|* pool.
63|*
64|* bReplaceStyleSheets = sal_True : Named style sheets are replaced
65|* sal_False: All style sheets are reassigned
66|*
67|* bSetMasterPage = sal_True : search and assign master page
68|*
69|* bReverseOrder = sal_False: search master page from head to tail
70|* sal_True : search master page from tail to head
71|* (for undo operations)
72|*
73\************************************************************************/
74
75void SdPage::SetPresentationLayout(std::u16string_view rLayoutName,
76 bool bReplaceStyleSheets,
77 bool bSetMasterPage,
78 bool bReverseOrder)
79{
80 /*********************************************************************
81 |* Name of the layout of the page
82 \********************************************************************/
83 OUString aOldLayoutName(maLayoutName); // memorize
84 maLayoutName = OUString::Concat(rLayoutName) + SD_LT_SEPARATOR + STR_LAYOUT_OUTLINE;
85
86 /*********************************************************************
87 |* search and replace master page if necessary
88 \********************************************************************/
89 if (bSetMasterPage && !IsMasterPage())
90 {
91 SdPage* pMaster;
92 SdPage* pFoundMaster = nullptr;
93 sal_uInt16 nMaster = 0;
94 sal_uInt16 nMasterCount = getSdrModelFromSdrPage().GetMasterPageCount();
95
96 if( !bReverseOrder )
97 {
98 for ( nMaster = 0; nMaster < nMasterCount; nMaster++ )
99 {
100 pMaster = static_cast<SdPage*>(getSdrModelFromSdrPage().GetMasterPage(nMaster));
101 if (pMaster->GetPageKind() == mePageKind && pMaster->GetLayoutName() == maLayoutName)
102 {
103 pFoundMaster = pMaster;
104 break;
105 }
106 }
107 }
108 else
109 {
110 for ( nMaster = nMasterCount; nMaster > 0; nMaster-- )
111 {
112 pMaster = static_cast<SdPage*>(getSdrModelFromSdrPage().GetMasterPage(nMaster - 1));
113 if (pMaster->GetPageKind() == mePageKind && pMaster->GetLayoutName() == maLayoutName)
114 {
115 pFoundMaster = pMaster;
116 break;
117 }
118 }
119 }
120
121 DBG_ASSERT(pFoundMaster, "Masterpage for presentation layout not found!");
122
123 // this should never happen, but we play failsafe here
124 if( pFoundMaster == nullptr )
125 pFoundMaster = static_cast< SdDrawDocument& >(getSdrModelFromSdrPage()).GetSdPage( 0, mePageKind );
126
127 if( pFoundMaster )
128 TRG_SetMasterPage(*pFoundMaster);
129 }
130
131 /*********************************************************************
132 |* templates for presentation objects
133 \********************************************************************/
134 // list with:
135 // - pointer to templates for outline text object (old and new templates)
136 // - replace-data for OutlinerParaObject
137 std::vector<SfxStyleSheetBase*> aOutlineStyles;
138 std::vector<SfxStyleSheetBase*> aOldOutlineStyles;
139 std::vector<StyleReplaceData> aReplList;
140 bool bListsFilled = false;
141
142 const size_t nObjCount = GetObjCount();
143
144 for (size_t nObj = 0; nObj < nObjCount; ++nObj)
145 {
146 auto pObj = GetObj(nObj);
147
148 if (pObj->GetObjInventor() == SdrInventor::Default &&
149 pObj->GetObjIdentifier() == SdrObjKind::OutlineText)
150 {
151 if (!bListsFilled || !bReplaceStyleSheets)
152 {
153 OUString aFullName;
154 OUString aOldFullName;
155 SfxStyleSheetBase* pSheet = nullptr;
157
158 for (sal_Int16 i = -1; i < 9; i++)
159 {
160 aOldFullName = aOldLayoutName + " " +
161 OUString::number( (i <= 0 ) ? 1 : i + 1 );
162 aFullName = maLayoutName + " " +
163 OUString::number( (i <= 0 ) ? 1 : i + 1);
164 pSheet = pStShPool->Find(aOldFullName, SfxStyleFamily::Page);
165 DBG_ASSERT(pSheet, "Old outline style sheet not found");
166 aOldOutlineStyles.push_back(pSheet);
167
168 pSheet = pStShPool->Find(aFullName, SfxStyleFamily::Page);
169 DBG_ASSERT(pSheet, "New outline style sheet not found");
170 aOutlineStyles.push_back(pSheet);
171
172 if (bReplaceStyleSheets && pSheet)
173 {
174 // Replace instead Set
175 StyleReplaceData aReplData;
176 aReplData.nNewFamily = pSheet->GetFamily();
177 aReplData.nFamily = pSheet->GetFamily();
178 aReplData.aNewName = aFullName;
179 aReplData.aName = aOldFullName;
180 aReplList.push_back(aReplData);
181 }
182 else
183 {
184 OutlinerParaObject* pOPO = pObj->GetOutlinerParaObject();
185
186 if( pOPO )
187 pOPO->SetStyleSheets( i, aFullName, SfxStyleFamily::Page );
188 }
189 }
190
191 bListsFilled = true;
192 }
193
194
195 std::vector<SfxStyleSheetBase*>::iterator iterOldOut = aOldOutlineStyles.begin();
196
197 for (const auto& rpOut : aOutlineStyles)
198 {
199 SfxStyleSheet* pSheet = static_cast<SfxStyleSheet*>(rpOut);
200 SfxStyleSheet* pOldSheet = static_cast<SfxStyleSheet*>(*iterOldOut);
201
202 if (pSheet != pOldSheet)
203 {
204 if (pOldSheet)
205 pObj->EndListening(*pOldSheet);
206
207 if (pSheet && !pObj->IsListening(*pSheet))
208 pObj->StartListening(*pSheet);
209 }
210
211 ++iterOldOut;
212 }
213
214 OutlinerParaObject* pOPO = pObj->GetOutlinerParaObject();
215 if ( bReplaceStyleSheets && pOPO )
216 {
217 for (const auto& rRepl : aReplList)
218 {
219 pOPO->ChangeStyleSheets( rRepl.aName, rRepl.nFamily, rRepl.aNewName, rRepl.nNewFamily );
220 }
221 }
222 }
223 else if (pObj->GetObjInventor() == SdrInventor::Default &&
224 pObj->GetObjIdentifier() == SdrObjKind::TitleText)
225 {
226 // We do not get PresObjKind via GetPresObjKind() since there are
227 // only PresObjListe considered. But we want to consider all "Title
228 // objects" here (paste from clipboard etc.)
230
231 if (pSheet)
232 pObj->SetStyleSheet(pSheet, true);
233 }
234 else
235 {
237
238 if (pSheet)
239 pObj->SetStyleSheet(pSheet, true);
240 }
241 }
242}
243
244/*************************************************************************
245|*
246|* disconnect outline text object from templates for outline levels
247|*
248\************************************************************************/
249
251{
252 SdrObject* pOutlineTextObj = GetPresObj(PresObjKind::Outline);
253
254 if (!pOutlineTextObj)
255 return;
256
258 DBG_ASSERT(pSPool, "StyleSheetPool missing");
259 OUString aTrueLayoutName(maLayoutName);
260 sal_Int32 nIndex = aTrueLayoutName.indexOf( SD_LT_SEPARATOR );
261 if( nIndex != -1 )
262 aTrueLayoutName = aTrueLayoutName.copy(0, nIndex);
263
264 std::vector<SfxStyleSheetBase*> aOutlineStyles;
265 pSPool->CreateOutlineSheetList(aTrueLayoutName,aOutlineStyles);
266
267 for (const auto& rpStyle : aOutlineStyles)
268 {
269 SfxStyleSheet *pSheet = static_cast<SfxStyleSheet*>(rpStyle);
270 pOutlineTextObj->EndListening(*pSheet);
271 }
272}
273
274/*************************************************************************
275|*
276|* Is this page read-only?
277|*
278\************************************************************************/
279
281{
282 return false;
283}
284
285/*************************************************************************
286|*
287|* Connect to sfx2::LinkManager
288|*
289\************************************************************************/
290
292{
293 sfx2::LinkManager* pLinkManager(getSdrModelFromSdrPage().GetLinkManager());
294
295 if (!(pLinkManager && !mpPageLink && !maFileName.isEmpty() && !maBookmarkName.isEmpty() &&
297 static_cast< SdDrawDocument& >(getSdrModelFromSdrPage()).IsNewOrLoadCompleted()))
298 return;
299
300 /**********************************************************************
301 * Connect
302 * Only standard pages are allowed to be linked
303 **********************************************************************/
304 ::sd::DrawDocShell* pDocSh = static_cast< SdDrawDocument& >(getSdrModelFromSdrPage()).GetDocSh();
305
306 if (!pDocSh || pDocSh->GetMedium()->GetOrigURL() != maFileName)
307 {
308 // No links to document owned pages!
310 OUString aFilterName(SdResId(STR_IMPRESS));
312 maFileName, &aFilterName, &maBookmarkName);
314 }
315}
316
317/*************************************************************************
318|*
319|* Disconnect from sfx2::LinkManager
320|*
321\************************************************************************/
322
324{
325 sfx2::LinkManager* pLinkManager(getSdrModelFromSdrPage().GetLinkManager());
326
327 if (pLinkManager && mpPageLink)
328 {
329 /**********************************************************************
330 * Disconnect
331 * (remove deletes *pGraphicLink implicit)
332 **********************************************************************/
333 pLinkManager->Remove(mpPageLink);
334 mpPageLink=nullptr;
335 }
336}
337
338void SdPage::lateInit(const SdPage& rSrcPage)
339{
340 // call parent
341 FmFormPage::lateInit(rSrcPage);
342
343 // copy local variables (former stuff from copy constructor)
344 mePageKind = rSrcPage.mePageKind;
345 meAutoLayout = rSrcPage.meAutoLayout;
346 mbSelected = false;
352 mePresChange = rSrcPage.mePresChange;
353 mfTime = rSrcPage.mfTime;
354 mbSoundOn = rSrcPage.mbSoundOn;
355 mbExcluded = rSrcPage.mbExcluded;
356 maLayoutName = rSrcPage.maLayoutName;
357 maSoundFile = rSrcPage.maSoundFile;
358 mbLoopSound = rSrcPage.mbLoopSound;
359 mbStopSound = rSrcPage.mbStopSound;
360 maCreatedPageName.clear();
361 maFileName = rSrcPage.maFileName;
364 meCharSet = rSrcPage.meCharSet;
365 mnPaperBin = rSrcPage.mnPaperBin;
366 mpPageLink = nullptr; // is set when inserting via ConnectLink()
367 mbIsPrecious = false;
368
369 // use shape list directly to preserve constness of rSrcPage
370 const std::list< SdrObject* >& rShapeList = rSrcPage.maPresentationShapeList.getList();
371 const size_t nObjCount = GetObjCount();
372 for( SdrObject* pObj : rShapeList )
373 {
374 size_t nOrdNum = pObj->GetOrdNum();
375 InsertPresObj(nOrdNum < nObjCount ? GetObj(nOrdNum) : nullptr, rSrcPage.GetPresObjKind(pObj));
376 }
377
378 // header footer
380
381 // animations
382 rSrcPage.cloneAnimations(*this);
383
384 // annotations
385 for(const Reference< XAnnotation >& srcAnnotation : rSrcPage.maAnnotations)
386 {
387 Reference< XAnnotation > ref;
388 createAnnotation(ref);
389 ref->setPosition(srcAnnotation->getPosition());
390 ref->setSize(srcAnnotation->getSize());
391 ref->setAuthor(srcAnnotation->getAuthor());
392 ref->setInitials(srcAnnotation->getInitials());
393 ref->setDateTime(srcAnnotation->getDateTime());
394 Reference< ::css::text::XTextCopy > srcRange ( srcAnnotation->getTextRange(), uno::UNO_QUERY);
395 Reference< ::css::text::XTextCopy > range ( ref->getTextRange(), uno::UNO_QUERY);
396 if(srcRange.is() && range.is())
397 range->copyText( srcRange );
398 }
399
400 // fix user calls for duplicated slide
401 SdrObjListIter aSourceIter( &rSrcPage, SdrIterMode::DeepWithGroups );
402 SdrObjListIter aTargetIter( this, SdrIterMode::DeepWithGroups );
403
404 while( aSourceIter.IsMore() && aTargetIter.IsMore() )
405 {
406 SdrObject* pSource = aSourceIter.Next();
407 SdrObject* pTarget = aTargetIter.Next();
408
409 if( pSource->GetUserCall() )
410 pTarget->SetUserCall(this);
411 }
412}
413
414/*************************************************************************
415|*
416|* Clone
417|*
418\************************************************************************/
419
421{
422 SdDrawDocument& rSdDrawDocument(static_cast< SdDrawDocument& >(rTargetModel));
423 rtl::Reference<SdPage> pClonedSdPage(
424 new SdPage(
425 rSdDrawDocument,
426 IsMasterPage()));
427 pClonedSdPage->lateInit(*this);
428 return pClonedSdPage;
429}
430
431/*************************************************************************
432|*
433|* GetTextStyleSheetForObject
434|*
435\************************************************************************/
436
438{
439 const PresObjKind eKind = GetPresObjKind(pObj);
440 if( eKind != PresObjKind::NONE )
441 {
442 return GetStyleSheetForPresObj(eKind);
443 }
444
446}
447
449{
450 if( mpItems == nullptr )
451 mpItems = std::make_unique<SfxItemSetFixed<SDRATTR_XMLATTRIBUTES, SDRATTR_XMLATTRIBUTES>>( getSdrModelFromSdrPage().GetItemPool());
452
453 return mpItems.get();
454}
455
456bool SdPage::setAlienAttributes( const css::uno::Any& rAttributes )
457{
459
461 if( aAlienAttributes.PutValue( rAttributes, 0 ) )
462 {
463 pSet->Put( aAlienAttributes );
464 return true;
465 }
466
467 return false;
468}
469
470void SdPage::getAlienAttributes( css::uno::Any& rAttributes )
471{
472 const SvXMLAttrContainerItem* pItem;
473
474 if( (mpItems == nullptr) || !( pItem = mpItems->GetItemIfSet( SDRATTR_XMLATTRIBUTES, false ) ) )
475 {
476 SvXMLAttrContainerItem aAlienAttributes;
477 aAlienAttributes.QueryValue( rAttributes );
478 }
479 else
480 {
481 pItem->QueryValue( rAttributes );
482 }
483}
484
486{
487 SdrObjListIter aShapeIter( this, SdrIterMode::DeepWithGroups );
488
489 for (SdrObject* pShape = aShapeIter.Next(); pShape; pShape = aShapeIter.Next())
490 {
491 if (pShape->IsEmptyPresObj())
492 {
493 RemoveObject( pShape->GetOrdNum() );
494 }
495 }
496}
497
498void SdPage::setTransitionType( sal_Int16 nTransitionType )
499{
500 mnTransitionType = nTransitionType;
502}
503
504void SdPage::setTransitionSubtype ( sal_Int16 nTransitionSubtype )
505{
506 mnTransitionSubtype = nTransitionSubtype;
508}
509
510void SdPage::setTransitionDirection ( bool bTransitionbDirection )
511{
512 mbTransitionDirection = bTransitionbDirection;
514}
515
516void SdPage::setTransitionFadeColor ( sal_Int32 nTransitionFadeColor )
517{
518 mnTransitionFadeColor = nTransitionFadeColor;
520}
521
522void SdPage::setTransitionDuration ( double fTransitionDuration )
523{
524 mfTransitionDuration = fTransitionDuration;
526}
527
528bool SdPage::Equals(const SdPage& rOtherPage) const
529{
530 if (GetObjCount() != rOtherPage.GetObjCount() ||
531 mePageKind != rOtherPage.mePageKind ||
532 meAutoLayout != rOtherPage.meAutoLayout ||
533 mePresChange != rOtherPage.mePresChange ||
534 !rtl::math::approxEqual(mfTime, rOtherPage.mfTime) ||
535 mbSoundOn != rOtherPage.mbSoundOn ||
536 mbExcluded != rOtherPage.mbExcluded ||
537 maLayoutName != rOtherPage.maLayoutName ||
538 maSoundFile != rOtherPage.maSoundFile ||
539 mbLoopSound != rOtherPage.mbLoopSound ||
540 mbStopSound != rOtherPage.mbStopSound ||
541 maBookmarkName != rOtherPage.maBookmarkName ||
542 mbScaleObjects != rOtherPage.mbScaleObjects ||
543 IsBackgroundFullSize() != rOtherPage.IsBackgroundFullSize() || // ???
544 meCharSet != rOtherPage.meCharSet ||
545 mnPaperBin != rOtherPage.mnPaperBin ||
546 mnTransitionType != rOtherPage.mnTransitionType ||
550 !rtl::math::approxEqual(mfTransitionDuration, rOtherPage.mfTransitionDuration))
551 return false;
552
553 for(size_t i = 0; i < GetObjCount(); ++i)
554 if (!GetObj(i)->Equals(*(rOtherPage.GetObj(i))))
555 return false;
556
557 return true;
558 }
559
560void SdPage::createAnnotation( css::uno::Reference< css::office::XAnnotation >& xAnnotation )
561{
562 sd::createAnnotation( xAnnotation, this );
563}
564
565void SdPage::addAnnotation( const Reference< XAnnotation >& xAnnotation, int nIndex )
566{
567 if( (nIndex == -1) || (nIndex > static_cast<int>(maAnnotations.size())) )
568 {
569 maAnnotations.push_back( xAnnotation );
570 }
571 else
572 {
573 maAnnotations.insert( maAnnotations.begin() + nIndex, xAnnotation );
574 }
575
576 if( getSdrModelFromSdrPage().IsUndoEnabled() )
577 {
578 std::unique_ptr<SdrUndoAction> pAction = CreateUndoInsertOrRemoveAnnotation( xAnnotation, true );
579 if( pAction )
580 getSdrModelFromSdrPage().AddUndo( std::move(pAction) );
581 }
582
583 SetChanged();
586 static_cast< SdDrawDocument& >(getSdrModelFromSdrPage()),
587 "OnAnnotationInserted",
588 Reference<XInterface>(xAnnotation, UNO_QUERY));
589}
590
591void SdPage::removeAnnotation( const Reference< XAnnotation >& xAnnotation )
592{
593 if( getSdrModelFromSdrPage().IsUndoEnabled() )
594 {
595 std::unique_ptr<SdrUndoAction> pAction = CreateUndoInsertOrRemoveAnnotation( xAnnotation, false );
596 if( pAction )
597 getSdrModelFromSdrPage().AddUndo( std::move(pAction) );
598 }
599
600 AnnotationVector::iterator iter = std::find( maAnnotations.begin(), maAnnotations.end(), xAnnotation );
601 if( iter != maAnnotations.end() )
602 maAnnotations.erase( iter );
603
606 static_cast< SdDrawDocument& >( getSdrModelFromSdrPage() ),
607 "OnAnnotationRemoved",
608 Reference<XInterface>( xAnnotation, UNO_QUERY ) );
609}
610
611void SdPage::getGraphicsForPrefetch(std::vector<Graphic*>& graphics) const
612{
613 for( size_t i = 0; i < GetObjCount(); ++i)
614 {
615 SdrObject* obj = GetObj(i);
616 if( SdrGrafObj* grafObj = dynamic_cast<SdrGrafObj*>(obj))
617 if(!grafObj->GetGraphic().isAvailable())
618 graphics.push_back( const_cast<Graphic*>(&grafObj->GetGraphic()));
619 if( const Graphic* fillGraphic = obj->getFillGraphic())
620 if(!fillGraphic->isAvailable())
621 graphics.push_back( const_cast<Graphic*>(fillGraphic));
622 }
623}
624
626{
627 (void)xmlTextWriterStartElement(pWriter, BAD_CAST("SdPage"));
628
629 const char* pPageKind = nullptr;
630 switch (mePageKind)
631 {
633 pPageKind = "PageKind::Standard";
634 break;
635 case PageKind::Notes:
636 pPageKind = "PageKind::Notes";
637 break;
639 pPageKind = "PageKind::Handout";
640 break;
641 }
642 if (pPageKind)
643 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("mePageKind"), BAD_CAST(pPageKind));
644
645
646 FmFormPage::dumpAsXml(pWriter);
647 (void)xmlTextWriterEndElement(pWriter);
648}
649
650/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void lateInit(const FmFormPage &rPage)
bool ChangeStyleSheets(std::u16string_view rOldName, SfxStyleFamily eOldFamily, const OUString &rNewName, SfxStyleFamily eNewFamily)
void SetStyleSheets(sal_uInt16 nLevel, const OUString &rNewName, const SfxStyleFamily &rNewFamily)
SdrObject * GetPresObj(PresObjKind eObjKind, int nIndex=1, bool bFuzzySearch=false)
returns the nIndex'th object from the given PresObjKind, index starts with 1
Definition: sdpage.cxx:203
double mfTime
Display time in seconds.
Definition: sdpage.hxx:111
void setTransitionFadeColor(sal_Int32 nTransitionFadeColor)
Definition: sdpage2.cxx:516
void cloneAnimations(SdPage &rTargetPage) const
clone the animations from this and set them to rTargetPage TTTT: Order is strange,...
AutoLayout meAutoLayout
AutoLayout.
Definition: sdpage.hxx:106
rtl_TextEncoding meCharSet
Text encoding.
Definition: sdpage.hxx:122
virtual rtl::Reference< SdrObject > RemoveObject(size_t nObjNum) override
Definition: sdpage.cxx:1706
bool mbScaleObjects
Objects should be scaled.
Definition: sdpage.hxx:121
void ConnectLink()
Definition: sdpage2.cxx:291
PageKind GetPageKind() const
Definition: sdpage.hxx:205
OUString maLayoutName
Name of the layout.
Definition: sdpage.hxx:114
void removeAnnotation(const css::uno::Reference< css::office::XAnnotation > &xAnnotation)
Definition: sdpage2.cxx:591
virtual SfxStyleSheet * GetTextStyleSheetForObject(SdrObject *pObj) const override
Definition: sdpage2.cxx:437
OUString maSoundFile
Path to sound file (MS-DOS notation).
Definition: sdpage.hxx:115
sd::AnnotationVector maAnnotations
Definition: sdpage.hxx:126
bool mbStopSound
Definition: sdpage.hxx:117
SdPageLink * mpPageLink
Page link (at left sides only)
Definition: sdpage.hxx:124
void lateInit(const SdPage &rSrcPage)
Definition: sdpage2.cxx:338
const sd::HeaderFooterSettings & getHeaderFooterSettings() const
Definition: sdpage.cxx:2711
bool mbLoopSound
Definition: sdpage.hxx:116
SfxStyleSheet * GetStyleSheetForPresObj(PresObjKind eObjKind) const
Definition: sdpage.cxx:625
std::unique_ptr< SfxItemSet > mpItems
Definition: sdpage.hxx:136
PageKind mePageKind
page type
Definition: sdpage.hxx:105
sal_uInt16 mnPaperBin
PaperBin.
Definition: sdpage.hxx:123
void createAnnotation(css::uno::Reference< css::office::XAnnotation > &xAnnotation)
Definition: sdpage2.cxx:560
void setTransitionDirection(bool bTransitionbDirection)
Definition: sdpage2.cxx:510
OUString maCreatedPageName
generated page name by GetPageName.
Definition: sdpage.hxx:118
bool mbSelected
selection identifier
Definition: sdpage.hxx:109
double mfTransitionDuration
Definition: sdpage.hxx:147
void RemoveEmptyPresentationObjects()
removes all empty presentation objects from this slide
Definition: sdpage2.cxx:485
PresObjKind GetPresObjKind(SdrObject *pObj) const
Definition: sdpage.cxx:2309
SfxItemSet * getOrCreateItems()
Definition: sdpage2.cxx:448
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override
Definition: sdpage2.cxx:625
void DisconnectLink()
Definition: sdpage2.cxx:323
void setTransitionSubtype(sal_Int16 nTransitionSubtype)
Definition: sdpage2.cxx:504
bool Equals(const SdPage &) const
Definition: sdpage2.cxx:528
bool setAlienAttributes(const css::uno::Any &rAttributes)
Definition: sdpage2.cxx:456
void EndListenOutlineText()
Definition: sdpage2.cxx:250
bool mbTransitionDirection
Definition: sdpage.hxx:145
bool mbExcluded
will (not) be displayed during show.
Definition: sdpage.hxx:113
void addAnnotation(const css::uno::Reference< css::office::XAnnotation > &xAnnotation, int nIndex)
Definition: sdpage2.cxx:565
SdPage(const SdPage &)=delete
void InsertPresObj(SdrObject *pObj, PresObjKind eKind)
inserts the given SdrObject into the presentation object list
Definition: sdpage.cxx:2338
OUString maBookmarkName
Bookmark name.
Definition: sdpage.hxx:120
sal_Int32 mnTransitionFadeColor
Definition: sdpage.hxx:146
virtual bool IsReadOnly() const override
Definition: sdpage2.cxx:280
virtual OUString GetLayoutName() const override
Definition: sdpage.hxx:255
sal_Int16 mnTransitionSubtype
Definition: sdpage.hxx:144
void setHeaderFooterSettings(const sd::HeaderFooterSettings &rNewSettings)
Definition: sdpage.cxx:2723
void setTransitionType(sal_Int16 nTransitionType)
Definition: sdpage2.cxx:498
PresChange mePresChange
manual / automatic / semi automatic
Definition: sdpage.hxx:110
void SetPresentationLayout(std::u16string_view rLayoutName, bool bReplaceStyleSheets=true, bool bSetMasterPage=true, bool bReverseOrder=false)
Definition: sdpage2.cxx:75
sal_Int16 mnTransitionType
Definition: sdpage.hxx:143
void getAlienAttributes(css::uno::Any &rAttributes)
Definition: sdpage2.cxx:470
OUString maFileName
file name.
Definition: sdpage.hxx:119
bool mbIsPrecious
Definition: sdpage.hxx:387
void getGraphicsForPrefetch(std::vector< Graphic * > &graphics) const
Returns graphics objects from the page that can be prefetched before it's painted.
Definition: sdpage2.cxx:611
void setTransitionDuration(double fTransitionDuration)
Definition: sdpage2.cxx:522
virtual rtl::Reference< SdrPage > CloneSdrPage(SdrModel &rTargetModel) const override
Definition: sdpage2.cxx:420
sd::ShapeList maPresentationShapeList
presentation objects
Definition: sdpage.hxx:107
bool mbSoundOn
with / without sound.
Definition: sdpage.hxx:112
void CreateOutlineSheetList(std::u16string_view rLayoutName, std::vector< SfxStyleSheetBase * > &rOutlineStyles)
Definition: stlpool.cxx:152
virtual void SetChanged(bool bFlg=true)
const SdrPage * GetMasterPage(sal_uInt16 nPgNum) const
void AddUndo(std::unique_ptr< SdrUndoAction > pUndo)
sal_uInt16 GetMasterPageCount() const
const SfxItemPool & GetItemPool() const
SfxStyleSheetBasePool * GetStyleSheetPool() const
SdrObject * Next()
bool IsMore() const
SdrObject * GetObj(size_t nNum) const
size_t GetObjCount() const
SdrObjUserCall * GetUserCall() const
void SetUserCall(SdrObjUserCall *pUser)
const Graphic * getFillGraphic() const
bool Equals(const SdrObject &) const
void TRG_SetMasterPage(SdrPage &rNew)
void ActionChanged()
void dumpAsXml(xmlTextWriterPtr pWriter) const override
bool IsMasterPage() const
void SetChanged()
bool IsBackgroundFullSize() const
SdrModel & getSdrModelFromSdrPage() const
virtual SfxStyleSheet * GetTextStyleSheetForObject(SdrObject *pObj) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
bool IsListening(SfxBroadcaster &rBroadcaster) const
void EndListening(SfxBroadcaster &rBroadcaster, bool bRemoveAllDuplicates=false)
const OUString & GetOrigURL() const
SfxMedium * GetMedium() const
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
SfxStyleFamily GetFamily() const
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const override
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId) override
const std::list< SdrObject * > & getList() const
Definition: shapelist.hxx:60
void InsertFileLink(sfx2::SvBaseLink &, SvBaseLinkObjectType nFileType, std::u16string_view rFileNm, const OUString *pFilterNm=nullptr, const OUString *pRange=nullptr)
void Remove(SvBaseLink const *pLink)
#define DBG_ASSERT(sCon, aError)
struct _xmlTextWriter * xmlTextWriterPtr
constexpr OUStringLiteral SD_LT_SEPARATOR
Definition: glob.hxx:49
sal_Int32 nIndex
int i
void createAnnotation(uno::Reference< office::XAnnotation > &xAnnotation, SdPage *pPage)
Definition: Annotation.cxx:111
std::unique_ptr< SdrUndoAction > CreateUndoInsertOrRemoveAnnotation(const uno::Reference< office::XAnnotation > &xAnnotation, bool bInsert)
Definition: Annotation.cxx:306
PresObjKind
Definition: pres.hxx:22
OUString SdResId(TranslateId aId)
Definition: sdmod.cxx:83
constexpr OUStringLiteral STR_LAYOUT_OUTLINE
Definition: strings.hxx:16
OUString aName
Definition: drawdoc.hxx:85
OUString aNewName
Definition: drawdoc.hxx:86
SfxStyleFamily nNewFamily
Definition: drawdoc.hxx:84
SfxStyleFamily nFamily
Definition: drawdoc.hxx:83
constexpr TypedWhichId< SvXMLAttrContainerItem > SDRATTR_XMLATTRIBUTES(SDRATTR_MISC_FIRST+22)
void NotifyDocumentEvent(SdDrawDocument const &rDocument, const OUString &rEventName)
Definition: unomodel.cxx:3754