LibreOffice Module sd (master) 1
unopage.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 <sal/config.h>
21
22#include <initializer_list>
23#include <string_view>
24
25#include <com/sun/star/awt/XBitmap.hpp>
26#include <com/sun/star/lang/DisposedException.hpp>
27#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
28#include <com/sun/star/presentation/FadeEffect.hpp>
29#include <com/sun/star/presentation/AnimationSpeed.hpp>
30#include <com/sun/star/view/PaperOrientation.hpp>
31#include <com/sun/star/beans/PropertyAttribute.hpp>
32#include <com/sun/star/util/XTheme.hpp>
37#include <rtl/ustrbuf.hxx>
38#include <vcl/bitmapex.hxx>
40#include <vcl/metaact.hxx>
43#include <vcl/svapp.hxx>
45#include <createunopageimpl.hxx>
46#include <unomodel.hxx>
47#include <unopage.hxx>
48#include <svl/itemset.hxx>
49#include <svx/svdmodel.hxx>
50#include <sdresid.hxx>
51#include <strings.hrc>
52#include <sdpage.hxx>
53#include <unoprnms.hxx>
54#include <drawdoc.hxx>
55#include <svx/unoshape.hxx>
56#include <svl/style.hxx>
59#include <svx/svditer.hxx>
60#include <vcl/wmf.hxx>
61#include <svx/svdoole2.hxx>
62#include <svx/svdpool.hxx>
63#include <svx/svdview.hxx>
64#include <svx/xfillit0.hxx>
65#include <DrawDocShell.hxx>
66#include <ViewShell.hxx>
67#include <DrawViewShell.hxx>
68#include <editeng/unoprnms.hxx>
69#include "unoobj.hxx"
70
71#include <strings.hxx>
72#include <bitmaps.hlst>
73#include <unokywds.hxx>
74#include "unopback.hxx"
75#include <vcl/dibtools.hxx>
76#include <tools/debug.hxx>
77#include <tools/stream.hxx>
80#include <o3tl/string_view.hxx>
81
82using ::com::sun::star::animations::XAnimationNode;
83using ::com::sun::star::animations::XAnimationNodeSupplier;
84
85using namespace ::com::sun::star;
86using namespace ::com::sun::star::uno;
87using namespace ::com::sun::star::lang;
88using namespace ::com::sun::star::container;
89using namespace ::com::sun::star::drawing;
90using namespace ::com::sun::star::office;
91
92namespace {
93
94// this are the ids for page properties
95enum WID_PAGE
96{
98 WID_PAGE_HEIGHT, WID_PAGE_EFFECT, WID_PAGE_CHANGE, WID_PAGE_SPEED, WID_PAGE_NUMBER,
99 WID_PAGE_ORIENT, WID_PAGE_LAYOUT, WID_PAGE_DURATION, WID_PAGE_HIGHRESDURATION, WID_PAGE_LDNAME, WID_PAGE_LDBITMAP,
100 WID_PAGE_BACK, WID_PAGE_PREVIEW, WID_PAGE_PREVIEWBITMAP, WID_PAGE_VISIBLE, WID_PAGE_SOUNDFILE, WID_PAGE_BACKFULL,
101 WID_PAGE_BACKVIS, WID_PAGE_BACKOBJVIS, WID_PAGE_USERATTRIBS, WID_PAGE_BOOKMARK, WID_PAGE_ISDARK,
102 WID_PAGE_HEADERVISIBLE, WID_PAGE_HEADERTEXT, WID_PAGE_FOOTERVISIBLE, WID_PAGE_FOOTERTEXT,
103 WID_PAGE_PAGENUMBERVISIBLE, WID_PAGE_DATETIMEVISIBLE, WID_PAGE_DATETIMEFIXED,
104 WID_PAGE_DATETIMETEXT, WID_PAGE_DATETIMEFORMAT, WID_TRANSITION_TYPE, WID_TRANSITION_SUBTYPE,
105 WID_TRANSITION_DIRECTION, WID_TRANSITION_FADE_COLOR, WID_TRANSITION_DURATION, WID_LOOP_SOUND,
106 WID_NAVORDER, WID_PAGE_PREVIEWMETAFILE, WID_PAGE_THEME, WID_PAGE_THEME_UNO_REPRESENTATION
107};
108
109}
110
111constexpr OUStringLiteral sEmptyPageName = u"page";
112
113// this function stores the property maps for draw pages in impress and draw
114static const SvxItemPropertySet* ImplGetDrawPagePropertySet( bool bImpress, PageKind ePageKind )
115{
116 static const SfxItemPropertyMapEntry aDrawPagePropertyMap_Impl[] =
117 {
118 { u"" UNO_NAME_PAGE_BACKGROUND, WID_PAGE_BACK, cppu::UnoType<beans::XPropertySet>::get(), beans::PropertyAttribute::MAYBEVOID,0},
123 { u"" UNO_NAME_PAGE_CHANGE, WID_PAGE_CHANGE, ::cppu::UnoType<sal_Int32>::get(), 0, 0},
124 { u"" UNO_NAME_PAGE_DURATION, WID_PAGE_DURATION, ::cppu::UnoType<sal_Int32>::get(), 0, 0},
127 { u"" UNO_NAME_PAGE_LAYOUT, WID_PAGE_LAYOUT, ::cppu::UnoType<sal_Int16>::get(), 0, 0},
128 { UNO_NAME_LINKDISPLAYBITMAP, WID_PAGE_LDBITMAP, cppu::UnoType<awt::XBitmap>::get(), beans::PropertyAttribute::READONLY, 0},
129 { UNO_NAME_LINKDISPLAYNAME, WID_PAGE_LDNAME, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::READONLY, 0},
130 { u"" UNO_NAME_PAGE_NUMBER, WID_PAGE_NUMBER, ::cppu::UnoType<sal_Int16>::get(), beans::PropertyAttribute::READONLY, 0},
134 { u"" UNO_NAME_PAGE_PREVIEW, WID_PAGE_PREVIEW, cppu::UnoType<css::uno::Sequence<sal_Int8>>::get(), css::beans::PropertyAttribute::READONLY, 0},
135 { u"" UNO_NAME_PAGE_PREVIEWBITMAP, WID_PAGE_PREVIEWBITMAP, cppu::UnoType<css::uno::Sequence<sal_Int8>>::get(), css::beans::PropertyAttribute::READONLY, 0},
136 { u"" UNO_NAME_PAGE_PREVIEWMETAFILE, WID_PAGE_PREVIEWMETAFILE, cppu::UnoType<css::uno::Sequence<sal_Int8>>::get(), css::beans::PropertyAttribute::READONLY, 0},
137 { u"" UNO_NAME_PAGE_VISIBLE, WID_PAGE_VISIBLE, cppu::UnoType<bool>::get(), 0, 0},
138 { u"" UNO_NAME_OBJ_SOUNDFILE, WID_PAGE_SOUNDFILE, cppu::UnoType<Any>::get(), 0, 0},
139 { sUNO_Prop_IsBackgroundVisible, WID_PAGE_BACKVIS, cppu::UnoType<bool>::get(), 0, 0},
140 { sUNO_Prop_IsBackgroundObjectsVisible, WID_PAGE_BACKOBJVIS, cppu::UnoType<bool>::get(), 0, 0},
142 { sUNO_Prop_BookmarkURL, WID_PAGE_BOOKMARK, ::cppu::UnoType<OUString>::get(), 0, 0},
143 { u"HighResDuration", WID_PAGE_HIGHRESDURATION, ::cppu::UnoType<double>::get(), 0, 0},
144 { u"IsBackgroundDark" , WID_PAGE_ISDARK, cppu::UnoType<bool>::get(), beans::PropertyAttribute::READONLY, 0},
145 { u"IsFooterVisible", WID_PAGE_FOOTERVISIBLE, cppu::UnoType<bool>::get(), 0, 0},
146 { u"FooterText", WID_PAGE_FOOTERTEXT, ::cppu::UnoType<OUString>::get(), 0, 0},
147 { u"IsPageNumberVisible", WID_PAGE_PAGENUMBERVISIBLE, cppu::UnoType<bool>::get(), 0, 0},
148 { u"IsDateTimeVisible", WID_PAGE_DATETIMEVISIBLE, cppu::UnoType<bool>::get(), 0, 0},
149 { u"IsDateTimeFixed", WID_PAGE_DATETIMEFIXED, cppu::UnoType<bool>::get(), 0, 0},
150 { u"DateTimeText", WID_PAGE_DATETIMETEXT, ::cppu::UnoType<OUString>::get(), 0, 0},
151 { u"DateTimeFormat", WID_PAGE_DATETIMEFORMAT, ::cppu::UnoType<sal_Int32>::get(), 0, 0},
152 { u"TransitionType", WID_TRANSITION_TYPE, ::cppu::UnoType<sal_Int16>::get(), 0, 0},
153 { u"TransitionSubtype", WID_TRANSITION_SUBTYPE, ::cppu::UnoType<sal_Int16>::get(), 0, 0},
154 { u"TransitionDirection", WID_TRANSITION_DIRECTION, ::cppu::UnoType<sal_Bool>::get(), 0, 0},
155 { u"TransitionFadeColor", WID_TRANSITION_FADE_COLOR, ::cppu::UnoType<sal_Int32>::get(), 0, 0},
156 { u"" UNO_NAME_PAGE_TRANSITION_DURATION, WID_TRANSITION_DURATION, ::cppu::UnoType<double>::get(), 0, 0},
157 { u"LoopSound", WID_LOOP_SOUND, cppu::UnoType<bool>::get(), 0, 0},
159 };
160
161#define DRAW_PAGE_NOTES_PROPERTIES \
162 { u"" UNO_NAME_PAGE_BOTTOM, WID_PAGE_BOTTOM, ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
163 { u"" UNO_NAME_PAGE_LEFT, WID_PAGE_LEFT, ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
164 { u"" UNO_NAME_PAGE_RIGHT, WID_PAGE_RIGHT, ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
165 { u"" UNO_NAME_PAGE_TOP, WID_PAGE_TOP, ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
166 { u"" UNO_NAME_PAGE_HEIGHT, WID_PAGE_HEIGHT, ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
167 { u"" UNO_NAME_PAGE_LAYOUT, WID_PAGE_LAYOUT, ::cppu::UnoType<sal_Int16>::get(), 0, 0}, \
168 { UNO_NAME_LINKDISPLAYBITMAP, WID_PAGE_LDBITMAP, cppu::UnoType<awt::XBitmap>::get(), beans::PropertyAttribute::READONLY, 0}, \
169 { UNO_NAME_LINKDISPLAYNAME, WID_PAGE_LDNAME, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::READONLY, 0}, \
170 { u"" UNO_NAME_PAGE_NUMBER, WID_PAGE_NUMBER, ::cppu::UnoType<sal_Int16>::get(), beans::PropertyAttribute::READONLY, 0}, \
171 { u"" UNO_NAME_PAGE_ORIENTATION, WID_PAGE_ORIENT, ::cppu::UnoType<view::PaperOrientation>::get(),0, 0}, \
172 { u"" UNO_NAME_PAGE_WIDTH, WID_PAGE_WIDTH, ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
173 { sUNO_Prop_UserDefinedAttributes,WID_PAGE_USERATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},\
174 { u"IsHeaderVisible", WID_PAGE_HEADERVISIBLE, cppu::UnoType<bool>::get(), 0, 0}, \
175 { u"HeaderText", WID_PAGE_HEADERTEXT, ::cppu::UnoType<OUString>::get(), 0, 0}, \
176 { u"IsBackgroundDark", WID_PAGE_ISDARK, cppu::UnoType<bool>::get(), beans::PropertyAttribute::READONLY, 0}, \
177 { u"IsFooterVisible", WID_PAGE_FOOTERVISIBLE, cppu::UnoType<bool>::get(), 0, 0}, \
178 { u"FooterText", WID_PAGE_FOOTERTEXT, ::cppu::UnoType<OUString>::get(), 0, 0}, \
179 { u"IsPageNumberVisible", WID_PAGE_PAGENUMBERVISIBLE, cppu::UnoType<bool>::get(), 0, 0}, \
180 { u"IsDateTimeVisible", WID_PAGE_DATETIMEVISIBLE, cppu::UnoType<bool>::get(), 0, 0}, \
181 { u"IsDateTimeFixed", WID_PAGE_DATETIMEFIXED, cppu::UnoType<bool>::get(), 0, 0}, \
182 { u"DateTimeText", WID_PAGE_DATETIMETEXT, ::cppu::UnoType<OUString>::get(), 0, 0}, \
183 { u"DateTimeFormat", WID_PAGE_DATETIMEFORMAT, ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
184 { u"NavigationOrder", WID_NAVORDER, cppu::UnoType<css::container::XIndexAccess>::get(),0, 0}
185
186 static const SfxItemPropertyMapEntry aDrawPageNotesHandoutPropertyMap_Impl[] =
187 {
188 // this must be the first two entries so they can be excluded for PageKind::Standard
189 { u"" UNO_NAME_PAGE_BACKGROUND, WID_PAGE_BACK, cppu::UnoType<beans::XPropertySet>::get(), beans::PropertyAttribute::MAYBEVOID,0},
191 };
192 static const SfxItemPropertyMapEntry aDrawPageNotesHandoutPropertyNoBackMap_Impl[] =
193 {
195 };
196
197#define GRAPHIC_PAGE_PROPERTIES \
198 { u"" UNO_NAME_PAGE_BOTTOM, WID_PAGE_BOTTOM, ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
199 { u"" UNO_NAME_PAGE_LEFT, WID_PAGE_LEFT, ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
200 { u"" UNO_NAME_PAGE_RIGHT, WID_PAGE_RIGHT, ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
201 { u"" UNO_NAME_PAGE_TOP, WID_PAGE_TOP, ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
202 { u"" UNO_NAME_PAGE_HEIGHT, WID_PAGE_HEIGHT, ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
203 { UNO_NAME_LINKDISPLAYBITMAP, WID_PAGE_LDBITMAP, cppu::UnoType<awt::XBitmap>::get(), beans::PropertyAttribute::READONLY, 0}, \
204 { UNO_NAME_LINKDISPLAYNAME, WID_PAGE_LDNAME, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::READONLY, 0}, \
205 { u"" UNO_NAME_PAGE_NUMBER, WID_PAGE_NUMBER, ::cppu::UnoType<sal_Int16>::get(), beans::PropertyAttribute::READONLY, 0}, \
206 { u"" UNO_NAME_PAGE_ORIENTATION, WID_PAGE_ORIENT, ::cppu::UnoType<view::PaperOrientation>::get(),0, 0}, \
207 { u"" UNO_NAME_PAGE_WIDTH, WID_PAGE_WIDTH, ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
208 { u"" UNO_NAME_PAGE_PREVIEW, WID_PAGE_PREVIEW, cppu::UnoType<css::uno::Sequence<sal_Int8>>::get(), css::beans::PropertyAttribute::READONLY, 0}, \
209 { u"" UNO_NAME_PAGE_PREVIEWBITMAP, WID_PAGE_PREVIEWBITMAP, cppu::UnoType<css::uno::Sequence<sal_Int8>>::get(), css::beans::PropertyAttribute::READONLY, 0},\
210 { u"" UNO_NAME_PAGE_PREVIEWMETAFILE, WID_PAGE_PREVIEWMETAFILE, cppu::UnoType<css::uno::Sequence<sal_Int8>>::get(), css::beans::PropertyAttribute::READONLY, 0},\
211 { sUNO_Prop_UserDefinedAttributes,WID_PAGE_USERATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0}, \
212 { sUNO_Prop_BookmarkURL, WID_PAGE_BOOKMARK, ::cppu::UnoType<OUString>::get(), 0, 0}, \
213 { u"IsBackgroundDark", WID_PAGE_ISDARK, cppu::UnoType<bool>::get(), beans::PropertyAttribute::READONLY, 0}, \
214 { u"NavigationOrder", WID_NAVORDER, cppu::UnoType<css::container::XIndexAccess>::get(),0, 0}
215
216 static const SfxItemPropertyMapEntry aGraphicPagePropertyMap_Impl[] =
217 {
218 { u"" UNO_NAME_PAGE_BACKGROUND, WID_PAGE_BACK, cppu::UnoType<beans::XPropertySet>::get(), beans::PropertyAttribute::MAYBEVOID,0},
220 };
221 static const SfxItemPropertyMapEntry aGraphicPagePropertyNoBackMap_Impl[] =
222 {
224 };
225
226 bool bWithoutBackground = ePageKind != PageKind::Standard && ePageKind != PageKind::Handout;
227 const SvxItemPropertySet* pRet = nullptr;
228 if( bImpress )
229 {
230 if( ePageKind == PageKind::Standard )
231 {
232 //PageKind::Standard always has a background property
233 static SvxItemPropertySet aDrawPagePropertySet_Impl( aDrawPagePropertyMap_Impl, SdrObject::GetGlobalDrawObjectItemPool() );
234 pRet = &aDrawPagePropertySet_Impl;
235 }
236 else
237 {
238 if(bWithoutBackground)
239 {
240 static SvxItemPropertySet aDrawPageNotesHandoutPropertyNoBackSet_Impl( aDrawPageNotesHandoutPropertyNoBackMap_Impl, SdrObject::GetGlobalDrawObjectItemPool() );
241 pRet = &aDrawPageNotesHandoutPropertyNoBackSet_Impl;
242 }
243 else
244 {
245 static SvxItemPropertySet aDrawPageNotesHandoutPropertySet_Impl( aDrawPageNotesHandoutPropertyMap_Impl, SdrObject::GetGlobalDrawObjectItemPool() );
246 pRet = &aDrawPageNotesHandoutPropertySet_Impl;
247 }
248 }
249 }
250 else
251 {
252 if(bWithoutBackground)
253 {
254 static SvxItemPropertySet aGraphicPagePropertyNoBackSet_Impl( aGraphicPagePropertyNoBackMap_Impl, SdrObject::GetGlobalDrawObjectItemPool() );
255 pRet = &aGraphicPagePropertyNoBackSet_Impl;
256 }
257 else
258 {
259 static SvxItemPropertySet aGraphicPagePropertySet_Impl( aGraphicPagePropertyMap_Impl, SdrObject::GetGlobalDrawObjectItemPool() );
260 pRet = &aGraphicPagePropertySet_Impl;
261 }
262 }
263 return pRet;
264}
265
268{
269 static const SfxItemPropertyMapEntry aMasterPagePropertyMap_Impl[] =
270 {
277 { UNO_NAME_LINKDISPLAYBITMAP, WID_PAGE_LDBITMAP, cppu::UnoType<awt::XBitmap>::get(), beans::PropertyAttribute::READONLY, 0},
278 { UNO_NAME_LINKDISPLAYNAME, WID_PAGE_LDNAME, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::READONLY, 0},
279 { u"" UNO_NAME_PAGE_NUMBER, WID_PAGE_NUMBER, ::cppu::UnoType<sal_Int16>::get(), beans::PropertyAttribute::READONLY, 0},
282 { u"BackgroundFullSize", WID_PAGE_BACKFULL, cppu::UnoType<bool>::get(), 0, 0},
284 { u"IsBackgroundDark", WID_PAGE_ISDARK, cppu::UnoType<bool>::get(), beans::PropertyAttribute::READONLY, 0},
286 // backwards compatible view of the theme for use in tests
287 { u"ThemeUnoRepresentation", WID_PAGE_THEME_UNO_REPRESENTATION, cppu::UnoType<uno::Sequence<beans::PropertyValue>>::get(), 0, 0}
288 };
289
290 static const SfxItemPropertyMapEntry aHandoutMasterPagePropertyMap_Impl[] =
291 {
298 { u"" UNO_NAME_PAGE_NUMBER, WID_PAGE_NUMBER, ::cppu::UnoType<sal_Int16>::get(), beans::PropertyAttribute::READONLY, 0},
300 { u"" UNO_NAME_PAGE_LAYOUT, WID_PAGE_LAYOUT, ::cppu::UnoType<sal_Int16>::get(), 0, 0},
302 { u"IsBackgroundDark", WID_PAGE_ISDARK, cppu::UnoType<bool>::get(), beans::PropertyAttribute::READONLY, 0},
303 { u"IsHeaderVisible", WID_PAGE_HEADERVISIBLE, cppu::UnoType<bool>::get(), 0, 0},
304 { u"HeaderText", WID_PAGE_HEADERTEXT, ::cppu::UnoType<OUString>::get(), 0, 0},
305 { u"IsFooterVisible", WID_PAGE_FOOTERVISIBLE, cppu::UnoType<bool>::get(), 0, 0},
306 { u"FooterText", WID_PAGE_FOOTERTEXT, ::cppu::UnoType<OUString>::get(), 0, 0},
307 { u"IsPageNumberVisible", WID_PAGE_PAGENUMBERVISIBLE, cppu::UnoType<bool>::get(), 0, 0},
308 { u"IsDateTimeVisible", WID_PAGE_DATETIMEVISIBLE, cppu::UnoType<bool>::get(), 0, 0},
309 { u"IsDateTimeFixed", WID_PAGE_DATETIMEFIXED, cppu::UnoType<bool>::get(), 0, 0},
310 { u"DateTimeText", WID_PAGE_DATETIMETEXT, ::cppu::UnoType<OUString>::get(), 0, 0},
311 { u"DateTimeFormat", WID_PAGE_DATETIMEFORMAT, ::cppu::UnoType<sal_Int32>::get(), 0, 0}
312 };
313
314 const SvxItemPropertySet* pRet = nullptr;
315 if( ePageKind == PageKind::Handout )
316 {
317 static SvxItemPropertySet aHandoutMasterPagePropertySet_Impl( aHandoutMasterPagePropertyMap_Impl, SdrObject::GetGlobalDrawObjectItemPool() );
318 pRet = &aHandoutMasterPagePropertySet_Impl;
319 }
320 else
321 {
322 static SvxItemPropertySet aMasterPagePropertySet_Impl( aMasterPagePropertyMap_Impl, SdrObject::GetGlobalDrawObjectItemPool() );
323 pRet = &aMasterPagePropertySet_Impl;
324 }
325 return pRet;
326}
327
328const css::uno::Sequence< sal_Int8 > & SdGenericDrawPage::getUnoTunnelId() noexcept
329{
330 static const comphelper::UnoIdInit theSdGenericDrawPageUnoTunnelId;
331 return theSdGenericDrawPageUnoTunnelId.getSeq();
332}
333
334sal_Int64 SAL_CALL SdGenericDrawPage::getSomething( const css::uno::Sequence< sal_Int8 >& rId )
335{
336 return comphelper::getSomethingImpl(rId, this,
338}
339
341: SvxFmDrawPage( static_cast<SdrPage*>(pInPage) ),
343 mpDocModel( _pModel ),
344 mpSdrModel(nullptr),
345 mbIsImpressDocument(false),
346 mnTempPageNumber(0),
347 mpPropSet ( _pSet )
348{
350 if( mpDocModel )
352
353}
354
356{
357}
358
360{
361 if( (SvxFmDrawPage::mpModel == nullptr) || (mpDocModel == nullptr) || (SvxFmDrawPage::mpPage == nullptr) )
362 throw lang::DisposedException();
363}
364
366{
368 const_cast<SdGenericDrawPage*>(this)->UpdateModel();
369 return mpDocModel;
370}
371
373{
375 const_cast<SdGenericDrawPage*>(this)->UpdateModel();
376 return mbIsImpressDocument;
377}
378
379
381{
383 if( mpSdrModel )
384 {
385 uno::Reference< uno::XInterface > xModel( SvxFmDrawPage::mpModel->getUnoModel() );
386 mpDocModel = comphelper::getFromUnoTunnel<SdXImpressDocument>( xModel );
387 }
388 else
389 {
390 mpDocModel = nullptr;
391 }
393}
394
395// this is called whenever a SdrObject must be created for an empty api shape wrapper
396rtl::Reference<SdrObject> SdGenericDrawPage::CreateSdrObject_( const Reference< drawing::XShape >& xShape )
397{
398 if( nullptr == SvxFmDrawPage::mpPage || !xShape.is() )
399 return nullptr;
400
401 OUString aType( xShape->getShapeType() );
402 static constexpr OUStringLiteral aPrefix( u"com.sun.star.presentation." );
403 if( !aType.startsWith( aPrefix ) )
404 {
405 return SvxFmDrawPage::CreateSdrObject_( xShape );
406 }
407
408 aType = aType.copy( aPrefix.getLength() );
409
411
412 if( aType == "TitleTextShape" )
413 {
414 eObjKind = PresObjKind::Title;
415 }
416 else if( aType == "OutlinerShape" )
417 {
418 eObjKind = PresObjKind::Outline;
419 }
420 else if( aType == "SubtitleShape" )
421 {
422 eObjKind = PresObjKind::Text;
423 }
424 else if( aType == "OLE2Shape" )
425 {
426 eObjKind = PresObjKind::Object;
427 }
428 else if( aType == "ChartShape" )
429 {
430 eObjKind = PresObjKind::Chart;
431 }
432 else if( aType == "CalcShape" )
433 {
434 eObjKind = PresObjKind::Calc;
435 }
436 else if( aType == "TableShape" )
437 {
438 eObjKind = PresObjKind::Table;
439 }
440 else if( aType == "GraphicObjectShape" )
441 {
442 eObjKind = PresObjKind::Graphic;
443 }
444 else if( aType == "OrgChartShape" )
445 {
446 eObjKind = PresObjKind::OrgChart;
447 }
448 else if( aType == "PageShape" )
449 {
450 if( GetPage()->GetPageKind() == PageKind::Notes && GetPage()->IsMasterPage() )
451 eObjKind = PresObjKind::Title;
452 else
453 eObjKind = PresObjKind::Page;
454 }
455 else if( aType == "NotesShape" )
456 {
457 eObjKind = PresObjKind::Notes;
458 }
459 else if( aType == "HandoutShape" )
460 {
461 eObjKind = PresObjKind::Handout;
462 }
463 else if( aType == "FooterShape" )
464 {
465 eObjKind = PresObjKind::Footer;
466 }
467 else if( aType == "HeaderShape" )
468 {
469 eObjKind = PresObjKind::Header;
470 }
471 else if( aType == "SlideNumberShape" )
472 {
473 eObjKind = PresObjKind::SlideNumber;
474 }
475 else if( aType == "DateTimeShape" )
476 {
477 eObjKind = PresObjKind::DateTime;
478 }
479 else if( aType == "MediaShape" )
480 {
481 eObjKind = PresObjKind::Media;
482 }
483
484 ::tools::Rectangle aRect( eObjKind == PresObjKind::Title ? GetPage()->GetTitleRect() : GetPage()->GetLayoutRect() );
485
486 const awt::Point aPos( aRect.Left(), aRect.Top() );
487 xShape->setPosition( aPos );
488
489 const awt::Size aSize( aRect.GetWidth(), aRect.GetHeight() );
490 xShape->setSize( aSize );
491
493 if( (eObjKind == PresObjKind::Table) || (eObjKind == PresObjKind::Media) )
494 {
495 pPresObj = SvxFmDrawPage::CreateSdrObject_( xShape );
496 if( pPresObj )
497 {
498 SdDrawDocument& rDoc(static_cast< SdDrawDocument& >(GetPage()->getSdrModelFromSdrPage()));
499 pPresObj->NbcSetStyleSheet(rDoc.GetDefaultStyleSheet(), true);
500 GetPage()->InsertPresObj( pPresObj.get(), eObjKind );
501 }
502 }
503 else
504 {
505 pPresObj = GetPage()->CreatePresObj( eObjKind, false, aRect );
506 }
507
508 if( pPresObj )
509 pPresObj->SetUserCall( GetPage() );
510
511 return pPresObj;
512}
513
514// XInterface
516{
517 return SvxFmDrawPage::queryInterface(rType);
518}
519
520css::uno::Any SdGenericDrawPage::queryAggregation(css::uno::Type const & rType) {
521 Any aAny;
522
524 {
525 aAny <<= Reference<beans::XPropertySet>(this);
526 }
527 else if (rType == cppu::UnoType<container::XNamed>::get())
528 {
529 aAny <<= Reference<container::XNamed>(this);
530 }
531 else if (rType == cppu::UnoType<util::XReplaceable>::get())
532 {
533 aAny <<= Reference<util::XReplaceable>(this);
534 }
535 else if (rType == cppu::UnoType<util::XSearchable>::get())
536 {
537 aAny <<= Reference<util::XSearchable>(this);
538 }
540 {
541 aAny <<= Reference<document::XLinkTargetSupplier>(this);
542 }
544 {
545 aAny <<= Reference<drawing::XShapeCombiner>(this);
546 }
548 {
549 aAny <<= Reference<drawing::XShapeBinder>(this);
550 }
552 {
553 aAny <<= Reference<beans::XMultiPropertySet>(this);
554 }
556 {
557 aAny <<= Reference<office::XAnnotationAccess>(this);
558 }
560 {
561 const PageKind ePageKind = GetPage() ? GetPage()->GetPageKind() : PageKind::Standard;
562
563 if( ePageKind == PageKind::Standard )
564 return Any( Reference< XAnimationNodeSupplier >( this ) );
565 }
566 else
567 return SvxFmDrawPage::queryAggregation( rType );
568
569 return aAny;
570}
571
572// XPropertySet
573Reference< beans::XPropertySetInfo > SAL_CALL SdGenericDrawPage::getPropertySetInfo()
574{
575 ::SolarMutexGuard aGuard;
578}
579
580void SAL_CALL SdGenericDrawPage::setPropertyValue( const OUString& aPropertyName, const Any& aValue )
581{
582 ::SolarMutexGuard aGuard;
583
585
586 const SfxItemPropertyMapEntry* pEntry = mpPropSet->getPropertyMapEntry(aPropertyName);
587
588 switch( pEntry ? pEntry->nWID : -1 )
589 {
590 case WID_NAVORDER:
591 setNavigationOrder( aValue );
592 break;
593 case WID_PAGE_LEFT:
594 case WID_PAGE_RIGHT:
595 case WID_PAGE_TOP:
596 case WID_PAGE_BOTTOM:
597 case WID_PAGE_LAYOUT:
598 case WID_PAGE_DURATION:
599 case WID_PAGE_CHANGE:
600 {
601 sal_Int32 nValue = 0;
602 if(!(aValue >>= nValue))
603 throw lang::IllegalArgumentException();
604
605 switch( pEntry->nWID )
606 {
607 case WID_PAGE_LEFT:
609 break;
610 case WID_PAGE_RIGHT:
612 break;
613 case WID_PAGE_TOP:
615 break;
616 case WID_PAGE_BOTTOM:
618 break;
619 case WID_PAGE_CHANGE:
620 GetPage()->SetPresChange( static_cast<PresChange>(nValue) );
621 break;
622 case WID_PAGE_LAYOUT:
623 GetPage()->SetAutoLayout( static_cast<AutoLayout>(nValue), true );
624 break;
625 case WID_PAGE_DURATION:
627 break;
628 }
629 break;
630 }
631 case WID_PAGE_HIGHRESDURATION:
632 {
633 double fValue = 0;
634 if(!(aValue >>= fValue))
635 throw lang::IllegalArgumentException();
636
637 GetPage()->SetTime(fValue);
638 break;
639 }
640 case WID_PAGE_WIDTH:
641 {
642 sal_Int32 nWidth = 0;
643 if(!(aValue >>= nWidth))
644 throw lang::IllegalArgumentException();
645
646 SetWidth( nWidth );
647 break;
648 }
649 case WID_PAGE_HEIGHT:
650 {
651 sal_Int32 nHeight = 0;
652 if(!(aValue >>= nHeight))
653 throw lang::IllegalArgumentException();
654
655 SetHeight( nHeight );
656 break;
657 }
658 case WID_PAGE_ORIENT:
659 {
660 sal_Int32 nEnum = 0;
661 if(!::cppu::enum2int( nEnum, aValue ))
662 throw lang::IllegalArgumentException();
663
664 Orientation eOri = (static_cast<view::PaperOrientation>(nEnum) == view::PaperOrientation_PORTRAIT)?Orientation::Portrait:Orientation::Landscape;
665
666 if( eOri != GetPage()->GetOrientation() )
667 {
668 SdDrawDocument& rDoc(static_cast< SdDrawDocument& >(GetPage()->getSdrModelFromSdrPage()));
669 const PageKind ePageKind = GetPage()->GetPageKind();
670
671 sal_uInt16 i, nPageCnt = rDoc.GetMasterSdPageCount(ePageKind);
672 for (i = 0; i < nPageCnt; i++)
673 {
674 SdPage* pPage = rDoc.GetMasterSdPage(i, ePageKind);
675 pPage->SetOrientation( eOri );
676 }
677
678 nPageCnt = rDoc.GetSdPageCount(ePageKind);
679
680 for (i = 0; i < nPageCnt; i++)
681 {
682 SdPage* pPage = rDoc.GetSdPage(i, ePageKind);
683 pPage->SetOrientation( eOri );
684 }
685 }
686 break;
687 }
688 case WID_PAGE_EFFECT:
689 {
690 sal_Int32 nEnum = 0;
691 if(!::cppu::enum2int( nEnum, aValue ))
692 throw lang::IllegalArgumentException();
693
694 GetPage()->SetFadeEffect( static_cast<presentation::FadeEffect>(nEnum) );
695 break;
696 }
697 case WID_PAGE_BACK:
698 setBackground( aValue );
699 break;
700 case WID_PAGE_SPEED:
701 {
702 sal_Int32 nEnum = 0;
703 if(!::cppu::enum2int( nEnum, aValue ))
704 throw lang::IllegalArgumentException();
705
706 GetPage()->setTransitionDuration( nEnum == 0 ? 3.0 : (nEnum == 1 ? 2.0 : 1.0 ) );
707 break;
708 }
709 case WID_PAGE_VISIBLE :
710 {
711 bool bVisible = false;
712 if( ! ( aValue >>= bVisible ) )
713 throw lang::IllegalArgumentException();
715 break;
716 }
717 case WID_PAGE_SOUNDFILE :
718 {
719 OUString aURL;
720 if( aValue >>= aURL )
721 {
723 GetPage()->SetSound( !aURL.isEmpty() );
724 break;
725 }
726 else
727 {
728 bool bStopSound = false;
729 if( aValue >>= bStopSound )
730 {
731 GetPage()->SetStopSound( bStopSound );
732 break;
733 }
734 }
735
736 throw lang::IllegalArgumentException();
737 }
738 case WID_LOOP_SOUND:
739 {
740 bool bLoop = false;
741 if( ! (aValue >>= bLoop) )
742 throw lang::IllegalArgumentException();
743
744 GetPage()->SetLoopSound( bLoop );
745 break;
746 }
748 {
749 bool bFullSize = false;
750 if( ! ( aValue >>= bFullSize ) )
751 throw lang::IllegalArgumentException();
752 GetPage()->SetBackgroundFullSize( bFullSize );
753 break;
754 }
755 case WID_PAGE_BACKVIS:
756 {
757 bool bVisible = false;
758 if( ! ( aValue >>= bVisible ) )
759 throw lang::IllegalArgumentException();
760
761 SdrPage* pPage = GetPage();
762 if( pPage )
763 {
764 SdDrawDocument& rDoc(static_cast< SdDrawDocument& >(pPage->getSdrModelFromSdrPage()));
765 if( rDoc.GetMasterPageCount() )
766 {
767 SdrLayerAdmin& rLayerAdmin = rDoc.GetLayerAdmin();
768 SdrLayerIDSet aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers();
769 aVisibleLayers.Set(rLayerAdmin.GetLayerID(sUNO_LayerName_background), bVisible);
770 pPage->TRG_SetMasterPageVisibleLayers(aVisibleLayers);
771 }
772 }
773 break;
774 }
775 case WID_PAGE_BACKOBJVIS:
776 {
777 bool bVisible = false;
778 if( ! ( aValue >>= bVisible ) )
779 throw lang::IllegalArgumentException();
780
781 SdrPage* pPage = GetPage();
782 if( pPage )
783 {
784 SdDrawDocument& rDoc(static_cast< SdDrawDocument& >(pPage->getSdrModelFromSdrPage()));
785 if( rDoc.GetMasterPageCount() )
786 {
787 SdrLayerAdmin& rLayerAdmin = rDoc.GetLayerAdmin();
788 SdrLayerIDSet aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers();
789 aVisibleLayers.Set(rLayerAdmin.GetLayerID(sUNO_LayerName_background_objects), bVisible);
790 pPage->TRG_SetMasterPageVisibleLayers(aVisibleLayers);
791 }
792 }
793
794 break;
795 }
797 {
798 if( !GetPage()->setAlienAttributes( aValue ) )
799 throw lang::IllegalArgumentException();
800 break;
801 }
802 case WID_PAGE_BOOKMARK:
803 {
804 OUString aBookmarkURL;
805 if( ! ( aValue >>= aBookmarkURL ) )
806 throw lang::IllegalArgumentException();
807
808 setBookmarkURL( aBookmarkURL );
809 break;
810 }
811
812 case WID_PAGE_HEADERVISIBLE:
813 case WID_PAGE_HEADERTEXT:
814 case WID_PAGE_FOOTERVISIBLE:
815 case WID_PAGE_FOOTERTEXT:
816 case WID_PAGE_PAGENUMBERVISIBLE:
817 case WID_PAGE_DATETIMEVISIBLE:
818 case WID_PAGE_DATETIMEFIXED:
819 case WID_PAGE_DATETIMETEXT:
820 case WID_PAGE_DATETIMEFORMAT:
821 {
822 sd::HeaderFooterSettings aHeaderFooterSettings( GetPage()->getHeaderFooterSettings() );
823
824 switch( pEntry->nWID )
825 {
826 case WID_PAGE_HEADERVISIBLE:
827 {
828 bool bVisible = false;
829 if( ! ( aValue >>= bVisible ) )
830 throw lang::IllegalArgumentException();
831
832 aHeaderFooterSettings.mbHeaderVisible = bVisible;
833 break;
834 }
835 case WID_PAGE_HEADERTEXT:
836 {
837 OUString aText;
838 if( ! ( aValue >>= aText ) )
839 throw lang::IllegalArgumentException();
840
841 aHeaderFooterSettings.maHeaderText = aText;
842 break;
843 }
844 case WID_PAGE_FOOTERVISIBLE:
845 {
846 bool bVisible = false;
847 if( ! ( aValue >>= bVisible ) )
848 throw lang::IllegalArgumentException();
849
850 aHeaderFooterSettings.mbFooterVisible = bVisible;
851 break;
852 }
853 case WID_PAGE_FOOTERTEXT:
854 {
855 OUString aText;
856 if( ! ( aValue >>= aText ) )
857 throw lang::IllegalArgumentException();
858
859 aHeaderFooterSettings.maFooterText = aText;
860 break;
861 }
862 case WID_PAGE_PAGENUMBERVISIBLE:
863 {
864 bool bVisible = false;
865 if( ! ( aValue >>= bVisible ) )
866 throw lang::IllegalArgumentException();
867
868 aHeaderFooterSettings.mbSlideNumberVisible = bVisible;
869 break;
870 }
871 case WID_PAGE_DATETIMEVISIBLE:
872 {
873 bool bVisible = false;
874 if( ! ( aValue >>= bVisible ) )
875 throw lang::IllegalArgumentException();
876
877 aHeaderFooterSettings.mbDateTimeVisible = bVisible;
878 break;
879 }
880 case WID_PAGE_DATETIMEFIXED:
881 {
882 bool bVisible = false;
883 if( ! ( aValue >>= bVisible ) )
884 throw lang::IllegalArgumentException();
885
886 aHeaderFooterSettings.mbDateTimeIsFixed = bVisible;
887 break;
888 }
889 case WID_PAGE_DATETIMETEXT:
890 {
891 OUString aText;
892 if( ! ( aValue >>= aText ) )
893 throw lang::IllegalArgumentException();
894
895 aHeaderFooterSettings.maDateTimeText = aText;
896 break;
897 }
898 case WID_PAGE_DATETIMEFORMAT:
899 {
900 sal_Int32 nValue = 0;
901 if( ! ( aValue >>= nValue ) )
902 throw lang::IllegalArgumentException();
903
904 aHeaderFooterSettings.meDateFormat = static_cast<SvxDateFormat>(nValue & 0x0f);
905 aHeaderFooterSettings.meTimeFormat = static_cast<SvxTimeFormat>((nValue >> 4) & 0x0f);
906 break;
907 }
908 }
909
910 if( !(aHeaderFooterSettings == GetPage()->getHeaderFooterSettings()) )
911 GetPage()->setHeaderFooterSettings( aHeaderFooterSettings );
912
913 break;
914 }
915
916 case WID_PAGE_NUMBER:
917 if( (GetPage()->GetPageKind() == PageKind::Handout) && !GetPage()->IsMasterPage() )
918 {
919 if( !(aValue >>= mnTempPageNumber) )
920 throw lang::IllegalArgumentException();
921
922 break;
923 }
924 throw beans::PropertyVetoException();
925
926 case WID_PAGE_LDBITMAP:
927 case WID_PAGE_LDNAME:
928 case WID_PAGE_ISDARK:
929 throw beans::PropertyVetoException();
930
931 case WID_TRANSITION_TYPE:
932 {
933 sal_Int16 nValue = 0;
934 if( ! ( aValue >>= nValue ) )
935 throw lang::IllegalArgumentException();
936
938 break;
939 }
940
941 case WID_TRANSITION_SUBTYPE:
942 {
943 sal_Int16 nValue = 0;
944 if( ! ( aValue >>= nValue ) )
945 throw lang::IllegalArgumentException();
946
948 break;
949 }
950
951 case WID_TRANSITION_DIRECTION:
952 {
953 bool bValue = false;
954 if( ! ( aValue >>= bValue ) )
955 throw lang::IllegalArgumentException();
956
957 GetPage()->setTransitionDirection( bValue );
958 break;
959 }
960
961 case WID_TRANSITION_FADE_COLOR:
962 {
963 sal_Int32 nValue = 0;
964 if( ! ( aValue >>= nValue ) )
965 throw lang::IllegalArgumentException();
966
968 break;
969 }
970
971 case WID_TRANSITION_DURATION:
972 {
973 double fValue = 0.0;
974 if( ! ( aValue >>= fValue ) )
975 throw lang::IllegalArgumentException();
976
977 GetPage()->setTransitionDuration( fValue );
978 break;
979 }
980
981 case WID_PAGE_THEME:
982 {
983 SdrPage* pPage = GetPage();
984 uno::Reference<util::XTheme> xTheme;
985 if (aValue >>= xTheme)
986 {
987 auto& rUnoTheme = dynamic_cast<UnoTheme&>(*xTheme);
988 pPage->getSdrPageProperties().SetTheme(rUnoTheme.getTheme());
989 }
990 break;
991 }
992
993 case WID_PAGE_THEME_UNO_REPRESENTATION:
994 {
995 SdrPage* pPage = GetPage();
996 std::shared_ptr<model::Theme> pTheme = model::Theme::FromAny(aValue);
997 pPage->getSdrPageProperties().SetTheme(pTheme);
998 break;
999 }
1000
1001 default:
1002 throw beans::UnknownPropertyException( aPropertyName, static_cast<cppu::OWeakObject*>(this));
1003 }
1004
1005 GetModel()->SetModified();
1006}
1007
1008Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName )
1009{
1010 ::SolarMutexGuard aGuard;
1011
1013
1014 uno::Any aAny;
1015
1016 const SfxItemPropertyMapEntry* pEntry = mpPropSet->getPropertyMapEntry(PropertyName);
1017
1018 sal_Int16 nEntry = pEntry ? pEntry->nWID : -1;
1019 switch (nEntry)
1020 {
1021 case WID_NAVORDER:
1022 aAny = getNavigationOrder();
1023 break;
1024 case WID_PAGE_LEFT:
1025 aAny <<= GetPage()->GetLeftBorder();
1026 break;
1027 case WID_PAGE_RIGHT:
1028 aAny <<= GetPage()->GetRightBorder();
1029 break;
1030 case WID_PAGE_TOP:
1031 aAny <<= GetPage()->GetUpperBorder();
1032 break;
1033 case WID_PAGE_BOTTOM:
1034 aAny <<= GetPage()->GetLowerBorder();
1035 break;
1036 case WID_PAGE_WIDTH:
1037 aAny <<= static_cast<sal_Int32>( GetPage()->GetSize().getWidth() );
1038 break;
1039 case WID_PAGE_HEIGHT:
1040 aAny <<= static_cast<sal_Int32>( GetPage()->GetSize().getHeight() );
1041 break;
1042 case WID_PAGE_ORIENT:
1043 aAny <<=
1044 GetPage()->GetOrientation() == Orientation::Portrait
1045 ? view::PaperOrientation_PORTRAIT
1046 : view::PaperOrientation_LANDSCAPE;
1047 break;
1048 case WID_PAGE_EFFECT:
1049 aAny <<= GetPage()->GetFadeEffect();
1050 break;
1051 case WID_PAGE_CHANGE:
1052 aAny <<= static_cast<sal_Int32>( GetPage()->GetPresChange() );
1053 break;
1054 case WID_PAGE_SPEED:
1055 {
1056 const double fDuration = GetPage()->getTransitionDuration();
1057 aAny <<= presentation::AnimationSpeed(
1058 fDuration < 2.0 ? 2 : fDuration > 2.0 ? 0 : 1);
1059 }
1060 break;
1061 case WID_PAGE_LAYOUT:
1062 aAny <<= static_cast<sal_Int16>( GetPage()->GetAutoLayout() );
1063 break;
1064 case WID_PAGE_NUMBER:
1065 {
1066 const sal_uInt16 nPageNumber(GetPage()->GetPageNum());
1067
1068 if(nPageNumber > 0)
1069 {
1070 // for all other pages calculate the number
1071 aAny <<= static_cast<sal_Int16>(static_cast<sal_uInt16>((nPageNumber-1)>>1) + 1);
1072 }
1073 else
1074 {
1075 aAny <<= mnTempPageNumber;
1076 }
1077 }
1078 break;
1079 case WID_PAGE_DURATION:
1080 aAny <<= static_cast<sal_Int32>( GetPage()->GetTime() + .5 );
1081 break;
1082 case WID_PAGE_HIGHRESDURATION:
1083 aAny <<= GetPage()->GetTime();
1084 break;
1085 case WID_PAGE_LDNAME:
1086 {
1087 const OUString aName( GetPage()->GetName() );
1088 aAny <<= aName;
1089 break;
1090 }
1091 case WID_PAGE_LDBITMAP:
1092 {
1093 Reference< awt::XBitmap > xBitmap(VCLUnoHelper::CreateBitmap(BitmapEx(BMP_PAGE)));
1094 aAny <<= xBitmap;
1095 }
1096 break;
1097 case WID_PAGE_BACK:
1098 getBackground( aAny );
1099 break;
1100 case WID_PAGE_PREVIEW :
1101 case WID_PAGE_PREVIEWMETAFILE :
1102 {
1103 SdDrawDocument& rDoc(static_cast< SdDrawDocument& >(GetPage()->getSdrModelFromSdrPage()));
1104 ::sd::DrawDocShell* pDocShell = rDoc.GetDocSh();
1105 if ( pDocShell )
1106 {
1107 sal_uInt16 nPgNum = 0;
1108 sal_uInt16 nPageCount = rDoc.GetSdPageCount( PageKind::Standard );
1109 sal_uInt16 nPageNumber = static_cast<sal_uInt16>( ( GetPage()->GetPageNum() - 1 ) >> 1 );
1110 while( nPgNum < nPageCount )
1111 {
1112 rDoc.SetSelected( rDoc.GetSdPage( nPgNum, PageKind::Standard ), nPgNum == nPageNumber );
1113 nPgNum++;
1114 }
1115 std::shared_ptr<GDIMetaFile> xMetaFile = pDocShell->GetPreviewMetaFile();
1116 if (xMetaFile)
1117 {
1118 Size aSize( GetPage()->GetSize() );
1119 xMetaFile->AddAction( new MetaFillColorAction( COL_WHITE, true ), 0 );
1120 xMetaFile->AddAction( new MetaRectAction( ::tools::Rectangle( Point(), aSize ) ), 1 );
1121 xMetaFile->SetPrefMapMode(MapMode(MapUnit::Map100thMM));
1122 xMetaFile->SetPrefSize( aSize );
1123
1124 SvMemoryStream aDestStrm( 65535, 65535 );
1125 if (nEntry == WID_PAGE_PREVIEW)
1126 // Preview: WMF format.
1127 ConvertGDIMetaFileToWMF(*xMetaFile, aDestStrm, nullptr, false);
1128 else
1129 {
1130 // PreviewMetafile: SVM format.
1131 SvmWriter aWriter(aDestStrm);
1132 aWriter.Write(*xMetaFile);
1133 }
1134 Sequence<sal_Int8> aSeq( static_cast<sal_Int8 const *>(aDestStrm.GetData()), aDestStrm.Tell() );
1135 aAny <<= aSeq;
1136 }
1137 }
1138 }
1139 break;
1140
1141 case WID_PAGE_PREVIEWBITMAP :
1142 {
1143 SdDrawDocument& rDoc(static_cast< SdDrawDocument& >(GetPage()->getSdrModelFromSdrPage()));
1144 ::sd::DrawDocShell* pDocShell = rDoc.GetDocSh();
1145 if ( pDocShell )
1146 {
1147 sal_uInt16 nPgNum = 0;
1148 sal_uInt16 nPageCount = rDoc.GetSdPageCount( PageKind::Standard );
1149 sal_uInt16 nPageNumber = static_cast<sal_uInt16>( ( GetPage()->GetPageNum() - 1 ) >> 1 );
1150 while( nPgNum < nPageCount )
1151 {
1152 rDoc.SetSelected( rDoc.GetSdPage( nPgNum, PageKind::Standard ), nPgNum == nPageNumber );
1153 nPgNum++;
1154 }
1155 std::shared_ptr<GDIMetaFile> xMetaFile = pDocShell->GetPreviewMetaFile();
1156 BitmapEx aBitmap;
1157 if (xMetaFile && xMetaFile->CreateThumbnail(aBitmap))
1158 {
1159 SvMemoryStream aMemStream;
1160 WriteDIB(aBitmap.GetBitmap(), aMemStream, false, false);
1161 uno::Sequence<sal_Int8> aSeq( static_cast<sal_Int8 const *>(aMemStream.GetData()), aMemStream.Tell() );
1162 aAny <<= aSeq;
1163 }
1164 }
1165 }
1166 break;
1167
1168 case WID_PAGE_VISIBLE :
1169 {
1170 bool bVisible = !GetPage()->IsExcluded();
1171 aAny <<= bVisible;
1172 break;
1173 }
1174
1175 case WID_PAGE_SOUNDFILE :
1176 {
1177 if( GetPage()->IsStopSound() )
1178 {
1179 aAny <<= true;
1180 }
1181 else
1182 {
1183 OUString aURL;
1184 if( GetPage()->IsSoundOn() )
1185 aURL = GetPage()->GetSoundFile();
1186 aAny <<= aURL;
1187 }
1188 break;
1189 }
1190 case WID_LOOP_SOUND:
1191 {
1192 aAny <<= GetPage()->IsLoopSound();
1193 break;
1194 }
1195 case WID_PAGE_BACKFULL:
1196 {
1197 bool bFullSize = GetPage()->IsBackgroundFullSize();
1198 aAny <<= bFullSize;
1199 break;
1200 }
1201 case WID_PAGE_BACKVIS:
1202 {
1203 SdrPage* pPage = GetPage();
1204 if( pPage )
1205 {
1206 SdDrawDocument& rDoc(static_cast< SdDrawDocument& >(pPage->getSdrModelFromSdrPage()));
1207 if( rDoc.GetMasterPageCount() )
1208 {
1209 SdrLayerAdmin& rLayerAdmin = rDoc.GetLayerAdmin();
1210 SdrLayerIDSet aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers();
1211 aAny <<= aVisibleLayers.IsSet(rLayerAdmin.GetLayerID(sUNO_LayerName_background));
1212 }
1213 else
1214 {
1215 aAny <<= false;
1216 }
1217 }
1218 break;
1219 }
1220 case WID_PAGE_BACKOBJVIS:
1221 {
1222 SdrPage* pPage = GetPage();
1223 if( pPage )
1224 {
1225 SdDrawDocument& rDoc(static_cast< SdDrawDocument& >(pPage->getSdrModelFromSdrPage()));
1226 if( rDoc.GetMasterPageCount() )
1227 {
1228 SdrLayerAdmin& rLayerAdmin = rDoc.GetLayerAdmin();
1229 SdrLayerIDSet aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers();
1230 aAny <<= aVisibleLayers.IsSet(rLayerAdmin.GetLayerID(sUNO_LayerName_background_objects));
1231 }
1232 else
1233 {
1234 aAny <<= false;
1235 }
1236 }
1237 break;
1238 }
1240 {
1241 GetPage()->getAlienAttributes( aAny );
1242 break;
1243 }
1244 case WID_PAGE_BOOKMARK:
1245 {
1246 aAny <<= getBookmarkURL();
1247 break;
1248 }
1249 case WID_PAGE_ISDARK:
1250 {
1251 aAny <<= GetPage()->GetPageBackgroundColor().IsDark();
1252 break;
1253 }
1254 case WID_PAGE_HEADERVISIBLE:
1256 break;
1257 case WID_PAGE_HEADERTEXT:
1258 {
1259 const OUString aText( GetPage()->getHeaderFooterSettings().maHeaderText );
1260 aAny <<= aText;
1261 }
1262 break;
1263 case WID_PAGE_FOOTERVISIBLE:
1265 break;
1266 case WID_PAGE_FOOTERTEXT:
1267 {
1268 const OUString aText( GetPage()->getHeaderFooterSettings().maFooterText );
1269 aAny <<= aText;
1270 }
1271 break;
1272 case WID_PAGE_PAGENUMBERVISIBLE:
1274 break;
1275 case WID_PAGE_DATETIMEVISIBLE:
1277 break;
1278 case WID_PAGE_DATETIMEFIXED:
1280 break;
1281 case WID_PAGE_DATETIMETEXT:
1282 {
1283 const OUString aText( GetPage()->getHeaderFooterSettings().maDateTimeText );
1284 aAny <<= aText;
1285 }
1286 break;
1287 case WID_PAGE_DATETIMEFORMAT:
1288 {
1289 auto const & rSettings = GetPage()->getHeaderFooterSettings();
1290 sal_Int32 x = static_cast<sal_Int32>(rSettings.meDateFormat) | (static_cast<sal_Int32>(rSettings.meTimeFormat) << 4);
1291 aAny <<= x;
1292 }
1293 break;
1294
1295 case WID_TRANSITION_TYPE:
1296 aAny <<= GetPage()->getTransitionType();
1297 break;
1298
1299 case WID_TRANSITION_SUBTYPE:
1300 aAny <<= GetPage()->getTransitionSubtype();
1301 break;
1302
1303 case WID_TRANSITION_DIRECTION:
1304 aAny <<= GetPage()->getTransitionDirection();
1305 break;
1306
1307 case WID_TRANSITION_FADE_COLOR:
1308 aAny <<= GetPage()->getTransitionFadeColor();
1309 break;
1310
1311 case WID_TRANSITION_DURATION:
1312 aAny <<= GetPage()->getTransitionDuration();
1313 break;
1314
1315 case WID_PAGE_THEME:
1316 {
1317 SdrPage* pPage = GetPage();
1318 css::uno::Reference<css::util::XTheme> xTheme;
1319 auto pTheme = pPage->getSdrPageProperties().GetTheme();
1320 if (pTheme)
1321 xTheme = model::theme::createXTheme(pTheme);
1322 aAny <<= xTheme;
1323 break;
1324 }
1325
1326 case WID_PAGE_THEME_UNO_REPRESENTATION:
1327 {
1328 SdrPage* pPage = GetPage();
1329 auto pTheme = pPage->getSdrPageProperties().GetTheme();
1330 if (pTheme)
1331 pTheme->ToAny(aAny);
1332 else
1333 {
1334 beans::PropertyValues aValues;
1335 aAny <<= aValues;
1336 }
1337 break;
1338 }
1339
1340 default:
1341 throw beans::UnknownPropertyException( PropertyName, static_cast<cppu::OWeakObject*>(this));
1342 }
1343 return aAny;
1344}
1345
1346void SAL_CALL SdGenericDrawPage::addPropertyChangeListener( const OUString& , const Reference< beans::XPropertyChangeListener >& ) {}
1347void SAL_CALL SdGenericDrawPage::removePropertyChangeListener( const OUString& , const Reference< beans::XPropertyChangeListener >& ) {}
1348void SAL_CALL SdGenericDrawPage::addVetoableChangeListener( const OUString& , const Reference< beans::XVetoableChangeListener >& ) {}
1349void SAL_CALL SdGenericDrawPage::removeVetoableChangeListener( const OUString& , const Reference< beans::XVetoableChangeListener >& ) {}
1350
1351// XMultiPropertySet
1352void SAL_CALL SdGenericDrawPage::setPropertyValues( const Sequence< OUString >& aPropertyNames, const Sequence< Any >& aValues )
1353{
1354 if( aPropertyNames.getLength() != aValues.getLength() )
1355 throw lang::IllegalArgumentException();
1356
1357 const OUString* pNames = aPropertyNames.getConstArray();
1358 const Any* pValues = aValues.getConstArray();
1359 sal_uInt32 nCount = aValues.getLength();
1360 while( nCount-- )
1361 {
1362 try
1363 {
1364 setPropertyValue( *pNames++, *pValues++ );
1365 }
1366 catch( beans::UnknownPropertyException& )
1367 {
1368 // ignore for multi property set
1369 // todo: optimize this!
1370 }
1371 }
1372}
1373
1374Sequence< Any > SAL_CALL SdGenericDrawPage::getPropertyValues( const Sequence< OUString >& aPropertyNames )
1375{
1376 sal_Int32 nCount = aPropertyNames.getLength();
1377 Sequence< Any > aValues( nCount );
1378 std::transform(aPropertyNames.begin(), aPropertyNames.end(), aValues.getArray(),
1379 [this](const OUString& rName) -> Any {
1380 Any aValue;
1381 try
1382 {
1383 aValue = getPropertyValue(rName);
1384 }
1385 catch( beans::UnknownPropertyException& )
1386 {
1387 // ignore for multi property set
1388 // todo: optimize this!
1389 }
1390 return aValue;
1391 });
1392 return aValues;
1393}
1394
1395void SAL_CALL SdGenericDrawPage::addPropertiesChangeListener( const Sequence< OUString >& , const Reference< beans::XPropertiesChangeListener >& )
1396{
1397}
1398
1399void SAL_CALL SdGenericDrawPage::removePropertiesChangeListener( const Reference< beans::XPropertiesChangeListener >& )
1400{
1401}
1402
1403void SAL_CALL SdGenericDrawPage::firePropertiesChangeEvent( const Sequence< OUString >& , const Reference< beans::XPropertiesChangeListener >& )
1404{
1405}
1406
1407Reference< drawing::XShape > SdGenericDrawPage::CreateShape(SdrObject *pObj) const
1408{
1409 DBG_ASSERT( GetPage(), "SdGenericDrawPage::CreateShape(), can't create shape for disposed page!" );
1410 DBG_ASSERT( pObj, "SdGenericDrawPage::CreateShape(), invalid call with pObj == 0!" );
1411
1412 if (!pObj)
1413 return Reference< drawing::XShape >();
1414
1415 if (GetPage())
1416 {
1417 PresObjKind eKind = GetPage()->GetPresObjKind(pObj);
1418
1420
1421 if(pObj->GetObjInventor() == SdrInventor::Default)
1422 {
1423 SdrObjKind nInventor = pObj->GetObjIdentifier();
1424 switch( nInventor )
1425 {
1426 case SdrObjKind::TitleText:
1427 pShape = new SvxShapeText( pObj );
1428 if( GetPage()->GetPageKind() == PageKind::Notes && GetPage()->IsMasterPage() )
1429 {
1430 // fake an empty PageShape if it's a title shape on the master page
1431 pShape->SetShapeType("com.sun.star.presentation.PageShape");
1432 }
1433 else
1434 {
1435 pShape->SetShapeType("com.sun.star.presentation.TitleTextShape");
1436 }
1437 eKind = PresObjKind::NONE;
1438 break;
1439 case SdrObjKind::OutlineText:
1440 pShape = new SvxShapeText( pObj );
1441 pShape->SetShapeType("com.sun.star.presentation.OutlinerShape");
1442 eKind = PresObjKind::NONE;
1443 break;
1444 default: ;
1445 }
1446 }
1447
1448 Reference< drawing::XShape > xShape( pShape );
1449
1450 if(!xShape.is())
1451 xShape = SvxFmDrawPage::CreateShape( pObj );
1452
1453 if( eKind != PresObjKind::NONE )
1454 {
1455 OUString aShapeType("com.sun.star.presentation.");
1456
1457 switch( eKind )
1458 {
1459 case PresObjKind::Title:
1460 aShapeType += "TitleTextShape";
1461 break;
1463 aShapeType += "OutlinerShape";
1464 break;
1465 case PresObjKind::Text:
1466 aShapeType += "SubtitleShape";
1467 break;
1469 aShapeType += "GraphicObjectShape";
1470 break;
1472 aShapeType += "OLE2Shape";
1473 break;
1474 case PresObjKind::Chart:
1475 aShapeType += "ChartShape";
1476 break;
1478 aShapeType += "OrgChartShape";
1479 break;
1480 case PresObjKind::Calc:
1481 aShapeType += "CalcShape";
1482 break;
1483 case PresObjKind::Table:
1484 aShapeType += "TableShape";
1485 break;
1486 case PresObjKind::Media:
1487 aShapeType += "MediaShape";
1488 break;
1489 case PresObjKind::Page:
1490 aShapeType += "PageShape";
1491 break;
1493 aShapeType += "HandoutShape";
1494 break;
1495 case PresObjKind::Notes:
1496 aShapeType += "NotesShape";
1497 break;
1499 aShapeType += "FooterShape";
1500 break;
1502 aShapeType += "HeaderShape";
1503 break;
1505 aShapeType += "SlideNumberShape";
1506 break;
1508 aShapeType += "DateTimeShape";
1509 break;
1510 // coverity[dead_error_begin] - following conditions exist to avoid compiler warning
1511 case PresObjKind::NONE:
1512 break;
1513 }
1514
1515 if( !pShape )
1516 pShape = comphelper::getFromUnoTunnel<SvxShape>( xShape );
1517
1518 if( pShape )
1519 pShape->SetShapeType( aShapeType );
1520 }
1521
1522 SvxShape *pSdShape = comphelper::getFromUnoTunnel<SvxShape>(xShape);
1523 if (pSdShape)
1524 {
1525 // SdXShape aggregates SvxShape
1526 new SdXShape(pSdShape, GetModel());
1527 }
1528 return xShape;
1529 }
1530 else
1531 {
1532 return SvxFmDrawPage::CreateShape( pObj );
1533 }
1534
1535}
1536
1537// XServiceInfo
1538Sequence< OUString > SAL_CALL SdGenericDrawPage::getSupportedServiceNames()
1539{
1542 std::initializer_list<std::u16string_view>{ u"com.sun.star.drawing.GenericDrawPage",
1543 u"com.sun.star.document.LinkTarget",
1544 u"com.sun.star.document.LinkTargetSupplier" });
1545}
1546
1547// XLinkTargetSupplier
1548Reference< container::XNameAccess > SAL_CALL SdGenericDrawPage::getLinks( )
1549{
1550 return new SdPageLinkTargets( this );
1551}
1552
1554{
1555 OSL_FAIL( "Don't call me, I'm useless!" );
1556}
1557
1559{
1560 OSL_FAIL( "Don't call me, I'm useless!" );
1561}
1562
1564{
1565 OUString aRet;
1567 {
1568 OUString aFileName( static_cast<SdPage*>(SvxFmDrawPage::mpPage)->GetFileName() );
1569 if( !aFileName.isEmpty() )
1570 {
1571 const OUString aBookmarkName( SdDrawPage::getPageApiNameFromUiName( static_cast<SdPage*>(SvxFmDrawPage::mpPage)->GetBookmarkName() ) );
1572 aRet = aFileName + "#" + aBookmarkName;
1573 }
1574 }
1575
1576 return aRet;
1577}
1578
1579void SdGenericDrawPage::setBookmarkURL( std::u16string_view rURL )
1580{
1582 return;
1583
1584 size_t nIndex = rURL.find( '#' );
1585 if( nIndex == std::u16string_view::npos )
1586 return;
1587
1588 const OUString aFileName( rURL.substr( 0, nIndex ) );
1589 const OUString aBookmarkName( SdDrawPage::getUiNameFromPageApiName( OUString(rURL.substr( nIndex+1 )) ) );
1590
1591 if( !aFileName.isEmpty() && !aBookmarkName.isEmpty() )
1592 {
1593 static_cast<SdPage*>(SvxFmDrawPage::mpPage)->DisconnectLink();
1594 static_cast<SdPage*>(SvxFmDrawPage::mpPage)->SetFileName( aFileName );
1595 static_cast<SdPage*>(SvxFmDrawPage::mpPage)->SetBookmarkName( aBookmarkName );
1596 static_cast<SdPage*>(SvxFmDrawPage::mpPage)->ConnectLink();
1597 }
1598}
1599
1600Reference< drawing::XShape > SAL_CALL SdGenericDrawPage::combine( const Reference< drawing::XShapes >& xShapes )
1601{
1602 ::SolarMutexGuard aGuard;
1603
1605
1606 DBG_ASSERT(SvxFmDrawPage::mpPage,"SdrPage is NULL! [CL]");
1607 DBG_ASSERT(mpView, "SdrView is NULL! [CL]");
1608
1609 Reference< drawing::XShape > xShape;
1610 if(mpView==nullptr||!xShapes.is()||GetPage()==nullptr)
1611 return xShape;
1612
1613 SdrPageView* pPageView = mpView->ShowSdrPage( GetPage() );
1614
1615 SelectObjectsInView( xShapes, pPageView );
1616
1617 mpView->CombineMarkedObjects( false );
1618
1619 mpView->AdjustMarkHdl();
1620 const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
1621 if( rMarkList.GetMarkCount() == 1 )
1622 {
1623 SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
1624 if( pObj )
1625 xShape.set( pObj->getUnoShape(), UNO_QUERY );
1626 }
1627
1628 mpView->HideSdrPage();
1629
1630 GetModel()->SetModified();
1631
1632 return xShape;
1633}
1634
1635void SAL_CALL SdGenericDrawPage::split( const Reference< drawing::XShape >& xGroup )
1636{
1637 ::SolarMutexGuard aGuard;
1638
1640
1641 if(mpView==nullptr||!xGroup.is()||GetPage()==nullptr)
1642 return;
1643
1644 SdrPageView* pPageView = mpView->ShowSdrPage( GetPage() );
1645 SelectObjectInView( xGroup, pPageView );
1646 mpView->DismantleMarkedObjects();
1647 mpView->HideSdrPage();
1648
1649 GetModel()->SetModified();
1650}
1651
1652Reference< drawing::XShape > SAL_CALL SdGenericDrawPage::bind( const Reference< drawing::XShapes >& xShapes )
1653{
1654 ::SolarMutexGuard aGuard;
1655
1657
1658 uno::Reference< drawing::XShape > xShape;
1659 if(mpView==nullptr||!xShapes.is()||GetPage()==nullptr)
1660 return xShape;
1661
1662 SdrPageView* pPageView = mpView->ShowSdrPage( GetPage() );
1663
1664 SelectObjectsInView( xShapes, pPageView );
1665
1666 mpView->CombineMarkedObjects();
1667
1668 mpView->AdjustMarkHdl();
1669 const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
1670 if( rMarkList.GetMarkCount() == 1 )
1671 {
1672 SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
1673 if( pObj )
1674 xShape.set( pObj->getUnoShape(), UNO_QUERY );
1675 }
1676
1677 mpView->HideSdrPage();
1678
1679 GetModel()->SetModified();
1680
1681 return xShape;
1682}
1683
1684void SAL_CALL SdGenericDrawPage::unbind( const Reference< drawing::XShape >& xShape )
1685{
1686 ::SolarMutexGuard aGuard;
1687
1689
1690 if(mpView==nullptr||!xShape.is()||GetPage()==nullptr)
1691 return;
1692
1693 SdrPageView* pPageView = mpView->ShowSdrPage( GetPage() );
1694 SelectObjectInView( xShape, pPageView );
1695 mpView->DismantleMarkedObjects( true );
1696 mpView->HideSdrPage();
1697
1698 GetModel()->SetModified();
1699}
1700
1701void SdGenericDrawPage::SetLeftBorder( sal_Int32 nValue )
1702{
1703 if( nValue == GetPage()->GetLeftBorder() )
1704 return;
1705
1706 SdDrawDocument& rDoc(static_cast< SdDrawDocument& >(GetPage()->getSdrModelFromSdrPage()));
1707 const PageKind ePageKind = GetPage()->GetPageKind();
1708
1709 sal_uInt16 i, nPageCnt = rDoc.GetMasterSdPageCount(ePageKind);
1710 for (i = 0; i < nPageCnt; i++)
1711 {
1712 SdPage* pPage = rDoc.GetMasterSdPage(i, ePageKind);
1713 pPage->SetLeftBorder( nValue );
1714 }
1715
1716 nPageCnt = rDoc.GetSdPageCount(ePageKind);
1717
1718 for (i = 0; i < nPageCnt; i++)
1719 {
1720 SdPage* pPage = rDoc.GetSdPage(i, ePageKind);
1721 pPage->SetLeftBorder( nValue );
1722 }
1723}
1724
1726{
1727 if( nValue == GetPage()->GetRightBorder() )
1728 return;
1729
1730 SdDrawDocument& rDoc(static_cast< SdDrawDocument& >(GetPage()->getSdrModelFromSdrPage()));
1731 const PageKind ePageKind = GetPage()->GetPageKind();
1732
1733 sal_uInt16 i, nPageCnt = rDoc.GetMasterSdPageCount(ePageKind);
1734 for (i = 0; i < nPageCnt; i++)
1735 {
1736 SdPage* pPage = rDoc.GetMasterSdPage(i, ePageKind);
1737 pPage->SetRightBorder( nValue );
1738 }
1739
1740 nPageCnt = rDoc.GetSdPageCount(ePageKind);
1741
1742 for (i = 0; i < nPageCnt; i++)
1743 {
1744 SdPage* pPage = rDoc.GetSdPage(i, ePageKind);
1745 pPage->SetRightBorder( nValue );
1746 }
1747}
1748
1750{
1751 if( nValue == GetPage()->GetUpperBorder() )
1752 return;
1753
1754 SdDrawDocument& rDoc(static_cast< SdDrawDocument& >(GetPage()->getSdrModelFromSdrPage()));
1755 const PageKind ePageKind = GetPage()->GetPageKind();
1756
1757 sal_uInt16 i, nPageCnt = rDoc.GetMasterSdPageCount(ePageKind);
1758 for (i = 0; i < nPageCnt; i++)
1759 {
1760 SdPage* pPage = rDoc.GetMasterSdPage(i, ePageKind);
1761 pPage->SetUpperBorder( nValue );
1762 }
1763
1764 nPageCnt = rDoc.GetSdPageCount(ePageKind);
1765
1766 for (i = 0; i < nPageCnt; i++)
1767 {
1768 SdPage* pPage = rDoc.GetSdPage(i, ePageKind);
1769 pPage->SetUpperBorder( nValue );
1770 }
1771}
1772
1774{
1775 if( nValue == GetPage()->GetLowerBorder() )
1776 return;
1777
1778 SdDrawDocument& rDoc(static_cast< SdDrawDocument& >(GetPage()->getSdrModelFromSdrPage()));
1779 const PageKind ePageKind = GetPage()->GetPageKind();
1780
1781 sal_uInt16 i, nPageCnt = rDoc.GetMasterSdPageCount(ePageKind);
1782 for (i = 0; i < nPageCnt; i++)
1783 {
1784 SdPage* pPage = rDoc.GetMasterSdPage(i, ePageKind);
1785 pPage->SetLowerBorder( nValue );
1786 }
1787
1788 nPageCnt = rDoc.GetSdPageCount(ePageKind);
1789
1790 for (i = 0; i < nPageCnt; i++)
1791 {
1792 SdPage* pPage = rDoc.GetSdPage(i, ePageKind);
1793 pPage->SetLowerBorder( nValue );
1794 }
1795}
1796
1797static void refreshpage( SdDrawDocument* pDoc, const PageKind ePageKind )
1798{
1799 ::sd::DrawDocShell* pDocShell = pDoc->GetDocSh();
1800 if ( !pDocShell )
1801 return;
1802
1803 ::sd::ViewShell* pViewSh = pDocShell->GetViewShell();
1804
1805 if( !pViewSh )
1806 return;
1807
1808 if( auto pDrawViewShell = dynamic_cast<::sd::DrawViewShell* >(pViewSh) )
1809 pDrawViewShell->ResetActualPage();
1810
1811 Size aPageSize = pDoc->GetSdPage(0, ePageKind)->GetSize();
1812 const tools::Long nWidth = aPageSize.Width();
1813 const tools::Long nHeight = aPageSize.Height();
1814
1815 Point aPageOrg(nWidth, nHeight / 2);
1816 Size aViewSize(nWidth * 3, nHeight * 2);
1817
1818 pDoc->SetMaxObjSize(aViewSize);
1819
1820 pViewSh->InitWindows(aPageOrg, aViewSize, Point(-1, -1), true);
1821
1822 pViewSh->UpdateScrollBars();
1823}
1824
1825void SdGenericDrawPage::SetWidth( sal_Int32 nWidth )
1826{
1827 Size aSize( GetPage()->GetSize() );
1828 if( aSize.getWidth() == nWidth )
1829 return;
1830
1831 aSize.setWidth( nWidth );
1832
1833 SdDrawDocument& rDoc(static_cast< SdDrawDocument& >(GetPage()->getSdrModelFromSdrPage()));
1834 const PageKind ePageKind = GetPage()->GetPageKind();
1835
1836 sal_uInt16 i, nPageCnt = rDoc.GetMasterSdPageCount(ePageKind);
1837 for (i = 0; i < nPageCnt; i++)
1838 {
1839 SdPage* pPage = rDoc.GetMasterSdPage(i, ePageKind);
1840 pPage->SetSize(aSize);
1841 }
1842
1843 nPageCnt = rDoc.GetSdPageCount(ePageKind);
1844
1845 for (i = 0; i < nPageCnt; i++)
1846 {
1847 SdPage* pPage = rDoc.GetSdPage(i, ePageKind);
1848 pPage->SetSize(aSize);
1849 }
1850
1851 refreshpage( &rDoc, ePageKind );
1852}
1853
1854void SdGenericDrawPage::SetHeight( sal_Int32 nHeight )
1855{
1856 Size aSize( GetPage()->GetSize() );
1857 if( aSize.getHeight() == nHeight )
1858 return;
1859
1860 aSize.setHeight( nHeight );
1861
1862 SdDrawDocument& rDoc(static_cast< SdDrawDocument& >(GetPage()->getSdrModelFromSdrPage()));
1863 const PageKind ePageKind = GetPage()->GetPageKind();
1864
1865 sal_uInt16 i, nPageCnt = rDoc.GetMasterSdPageCount(ePageKind);
1866 for (i = 0; i < nPageCnt; i++)
1867 {
1868 SdPage* pPage = rDoc.GetMasterSdPage(i, ePageKind);
1869 pPage->SetSize(aSize);
1870 }
1871
1872 nPageCnt = rDoc.GetSdPageCount(ePageKind);
1873
1874 for (i = 0; i < nPageCnt; i++)
1875 {
1876 SdPage* pPage = rDoc.GetSdPage(i, ePageKind);
1877 pPage->SetSize(aSize);
1878 }
1879
1880 refreshpage( &rDoc, ePageKind );
1881}
1882
1883// XInterface
1885{
1886
1887 OWeakAggObject::release();
1888}
1889
1890// XComponent
1892{
1893 mpDocModel = nullptr;
1895}
1896
1897// XAnimationNodeSupplier
1898Reference< XAnimationNode > SAL_CALL SdGenericDrawPage::getAnimationNode()
1899{
1900 ::SolarMutexGuard aGuard;
1901
1903
1904 SdPage *pSdPage = static_cast<SdPage*>(SvxFmDrawPage::mpPage);
1905
1906 return pSdPage->getAnimationNode();
1907}
1908
1909// SdPageLinkTargets
1911{
1912 mxPage = pUnoPage;
1913 mpUnoPage = pUnoPage;
1914}
1915
1917{
1918}
1919
1920// XElementAccess
1922{
1924}
1925
1927{
1928 ::SolarMutexGuard aGuard;
1929
1930 SdPage* pPage = mpUnoPage->GetPage();
1931 if( pPage != nullptr )
1932 {
1933 SdrObjListIter aIter( pPage, SdrIterMode::DeepWithGroups );
1934
1935 while( aIter.IsMore() )
1936 {
1937 SdrObject* pObj = aIter.Next();
1938 OUString aStr( pObj->GetName() );
1939 if( aStr.isEmpty() )
1940 if (auto pOleObj = dynamic_cast< const SdrOle2Obj *>( pObj ))
1941 aStr = pOleObj->GetPersistName();
1942 if( !aStr.isEmpty() )
1943 return true;
1944 }
1945 }
1946
1947 return false;
1948}
1949
1950// container::XNameAccess
1951
1952// XNameAccess
1953Any SAL_CALL SdPageLinkTargets::getByName( const OUString& aName )
1954{
1955 ::SolarMutexGuard aGuard;
1956
1957 SdPage* pPage = mpUnoPage->GetPage();
1958 if( pPage != nullptr )
1959 {
1960 SdrObject* pObj = FindObject( aName );
1961 if( pObj )
1962 {
1963 Reference< beans::XPropertySet > aRef( pObj->getUnoShape(), uno::UNO_QUERY );
1964 return Any( aRef );
1965 }
1966 }
1967
1968 throw container::NoSuchElementException();
1969}
1970
1971Sequence< OUString > SAL_CALL SdPageLinkTargets::getElementNames()
1972{
1973 ::SolarMutexGuard aGuard;
1974
1975 sal_uInt32 nObjCount = 0;
1976
1977 SdPage* pPage = mpUnoPage->GetPage();
1978 if( pPage != nullptr )
1979 {
1980 SdrObjListIter aIter( pPage, SdrIterMode::DeepWithGroups );
1981 while( aIter.IsMore() )
1982 {
1983 SdrObject* pObj = aIter.Next();
1984 OUString aStr( pObj->GetName() );
1985 if( aStr.isEmpty() )
1986 if (auto pOleObj = dynamic_cast< const SdrOle2Obj *>( pObj ))
1987 aStr = pOleObj->GetPersistName();
1988 if( !aStr.isEmpty() )
1989 nObjCount++;
1990 }
1991 }
1992
1993 Sequence< OUString > aSeq( nObjCount );
1994 if( nObjCount > 0 )
1995 {
1996 OUString* pStr = aSeq.getArray();
1997
1998 SdrObjListIter aIter( pPage, SdrIterMode::DeepWithGroups );
1999 while( aIter.IsMore() )
2000 {
2001 SdrObject* pObj = aIter.Next();
2002 OUString aStr( pObj->GetName() );
2003 if( aStr.isEmpty() )
2004 if (auto pOleObj = dynamic_cast< const SdrOle2Obj *>( pObj ))
2005 aStr = pOleObj->GetPersistName();
2006 if( !aStr.isEmpty() )
2007 *pStr++ = aStr;
2008 }
2009 }
2010
2011 return aSeq;
2012}
2013
2014sal_Bool SAL_CALL SdPageLinkTargets::hasByName( const OUString& aName )
2015{
2016 ::SolarMutexGuard aGuard;
2017
2018 return FindObject( aName ) != nullptr;
2019}
2020
2021SdrObject* SdPageLinkTargets::FindObject( std::u16string_view rName ) const noexcept
2022{
2023 SdPage* pPage = mpUnoPage->GetPage();
2024 if( pPage == nullptr )
2025 return nullptr;
2026
2027 SdrObjListIter aIter( pPage, SdrIterMode::DeepWithGroups );
2028
2029 while( aIter.IsMore() )
2030 {
2031 SdrObject* pObj = aIter.Next();
2032 OUString aStr( pObj->GetName() );
2033 if( aStr.isEmpty() )
2034 if (auto pOleObj = dynamic_cast< const SdrOle2Obj *>( pObj ))
2035 aStr = pOleObj->GetPersistName();
2036 if( !aStr.isEmpty() && (aStr == rName) )
2037 return pObj;
2038 }
2039
2040 return nullptr;
2041}
2042
2043// XServiceInfo
2045{
2046 return "SdPageLinkTargets";
2047}
2048
2049sal_Bool SAL_CALL SdPageLinkTargets::supportsService( const OUString& ServiceName )
2050{
2051 return cppu::supportsService( this, ServiceName );
2052}
2053
2054Sequence< OUString > SAL_CALL SdPageLinkTargets::getSupportedServiceNames()
2055{
2056 return { "com.sun.star.document.LinkTargets" };
2057}
2058
2059// SdDrawPage
2061 : SdGenericDrawPage( pModel, pPage, ImplGetDrawPagePropertySet( pModel->IsImpressDocument(), pPage->GetPageKind() ) )
2062{
2063}
2064
2066{
2067}
2068
2069// XInterface
2071{
2073}
2074
2075css::uno::Any SdDrawPage::queryAggregation(css::uno::Type const & rType) {
2077 {
2078 return Any( Reference< drawing::XMasterPageTarget >( this ) );
2079 }
2080 else if( IsImpressDocument()
2082 {
2083 SdPage * p = dynamic_cast<SdPage *>(SvxDrawPage::mpPage);
2084 if( p == nullptr || p->GetPageKind() != PageKind::Handout )
2085 {
2086 return Any( Reference< presentation::XPresentationPage >( this ) );
2087 }
2088 }
2089
2091}
2092
2093void SAL_CALL SdDrawPage::acquire() noexcept
2094{
2095 SvxDrawPage::acquire();
2096}
2097
2098void SAL_CALL SdDrawPage::release() noexcept
2099{
2101}
2102
2104
2105// XTypeProvider
2106Sequence< uno::Type > SAL_CALL SdDrawPage::getTypes()
2107{
2108 ::SolarMutexGuard aGuard;
2109
2111
2112 if( !maTypeSequence.hasElements() )
2113 {
2114 const PageKind ePageKind = GetPage() ? GetPage()->GetPageKind() : PageKind::Standard;
2115 bool bPresPage = IsImpressDocument() && ePageKind != PageKind::Handout;
2116
2117 // Collect the types of this class.
2118 ::std::vector<uno::Type> aTypes;
2119 aTypes.reserve(13);
2131 if( bPresPage )
2133 if( bPresPage && ePageKind == PageKind::Standard )
2135
2136 // Get types of base class.
2137 // Join those types in a sequence.
2141 }
2142
2143 return maTypeSequence;
2144}
2145
2147{
2148 return css::uno::Sequence<sal_Int8>();
2149}
2150
2151OUString SdDrawPage::getPageApiName( SdPage const * pPage )
2152{
2153 return ::getPageApiName( pPage );
2154}
2155
2156OUString getPageApiName( SdPage const * pPage )
2157{
2158 OUString aPageName;
2159
2160 if(pPage)
2161 {
2162 aPageName = pPage->GetRealName();
2163
2164 if( aPageName.isEmpty() )
2165 {
2166 const sal_Int32 nPageNum = ( ( pPage->GetPageNum() - 1 ) >> 1 ) + 1;
2167 aPageName = sEmptyPageName + OUString::number( nPageNum );
2168 }
2169 }
2170
2171 return aPageName;
2172}
2173
2174OUString getPageApiNameFromUiName( const OUString& rUIName )
2175{
2176 OUString aApiName;
2177
2178 OUString aDefPageName(SdResId(STR_PAGE) + " ");
2179
2180 if( rUIName.startsWith( aDefPageName ) )
2181 {
2182 aApiName = OUString::Concat(sEmptyPageName) + rUIName.subView( aDefPageName.getLength() );
2183 }
2184 else
2185 {
2186 aApiName = rUIName;
2187 }
2188
2189 return aApiName;
2190}
2191
2192OUString SdDrawPage::getPageApiNameFromUiName( const OUString& rUIName )
2193{
2195}
2196
2197OUString getUiNameFromPageApiNameImpl( const OUString& rApiName )
2198{
2199 const OUString aDefPageName( sEmptyPageName );
2200 if( rApiName.startsWith( aDefPageName ) )
2201 {
2202 std::u16string_view aNumber( rApiName.subView( aDefPageName.getLength() ) );
2203
2204 // create the page number
2205 sal_Int32 nPageNumber = o3tl::toInt32(aNumber);
2206
2207 // check if there are non number characters in the number part
2208 const size_t nChars = aNumber.size();
2209 const sal_Unicode* pString = aNumber.data();
2210 for( size_t nChar = 0; nChar < nChars; nChar++, pString++ )
2211 {
2212 if((*pString < '0') || (*pString > '9'))
2213 {
2214 // found a non number character, so this is not the default
2215 // name for this page
2216 nPageNumber = -1;
2217 break;
2218 }
2219 }
2220
2221 if( nPageNumber != -1)
2222 {
2223 return SdResId(STR_PAGE) + " " + aNumber;
2224 }
2225 }
2226
2227 return rApiName;
2228}
2229
2230OUString SdDrawPage::getUiNameFromPageApiName( const OUString& rApiName )
2231{
2232 return getUiNameFromPageApiNameImpl( rApiName );
2233}
2234
2235// XServiceInfo
2237{
2238 return "SdDrawPage";
2239}
2240
2241Sequence< OUString > SAL_CALL SdDrawPage::getSupportedServiceNames()
2242{
2243 ::SolarMutexGuard aGuard;
2244
2246
2247 std::vector<std::u16string_view> aAdd{ u"com.sun.star.drawing.DrawPage" };
2248
2249 if( IsImpressDocument() )
2250 aAdd.emplace_back(u"com.sun.star.presentation.DrawPage");
2251
2253}
2254
2255sal_Bool SAL_CALL SdDrawPage::supportsService( const OUString& ServiceName )
2256{
2257 return cppu::supportsService( this, ServiceName );
2258}
2259
2260// XNamed
2261void SAL_CALL SdDrawPage::setName( const OUString& rName )
2262{
2263 ::SolarMutexGuard aGuard;
2264
2266
2267 DBG_ASSERT( GetPage() && !GetPage()->IsMasterPage(), "Don't call base implementation for masterpages!" );
2268
2269 OUString aName( rName );
2270
2271 if(!(GetPage() && GetPage()->GetPageKind() != PageKind::Notes))
2272 return;
2273
2274 // check if this is the default 'page1234' name
2275 std::u16string_view aNumber;
2276 if(o3tl::starts_with(aName, sEmptyPageName, &aNumber ))
2277 {
2278 // ok, it maybe is, aNumber is the number part after 'page'
2279
2280 // create the page number
2281 sal_Int32 nPageNumber = o3tl::toInt32(aNumber);
2282
2283 // check if there are non number characters in the number part
2284 const sal_Int32 nChars = aNumber.size();
2285 const sal_Unicode* pString = aNumber.data();
2286 sal_Int32 nChar;
2287 for( nChar = 0; nChar < nChars; nChar++, pString++ )
2288 {
2289 if((*pString < '0') || (*pString > '9'))
2290 {
2291 // found a non number character, so this is not the default
2292 // name for this page
2293 nPageNumber = -1;
2294 break;
2295 }
2296 }
2297
2298 if( nPageNumber == ( ( GetPage()->GetPageNum() - 1 ) >> 1 ) + 1 )
2299 aName.clear();
2300 }
2301 else
2302 {
2303 OUString aDefaultPageName( SdResId(STR_PAGE) + " " );
2304 if( aName.startsWith( aDefaultPageName ) )
2305 aName.clear();
2306 }
2307
2308 GetPage()->SetName( aName );
2309
2310 sal_uInt16 nNotesPageNum = (GetPage()->GetPageNum()-1)>>1;
2311 if( GetModel()->GetDoc()->GetSdPageCount( PageKind::Notes ) > nNotesPageNum )
2312 {
2313 SdPage* pNotesPage = GetModel()->GetDoc()->GetSdPage( nNotesPageNum, PageKind::Notes );
2314 if( pNotesPage )
2315 pNotesPage->SetName(aName);
2316 }
2317
2318 // fake a mode change to repaint the page tab bar
2320 ::sd::ViewShell* pViewSh = pDocSh ? pDocSh->GetViewShell() : nullptr;
2321 if( auto pDrawViewSh = dynamic_cast<::sd::DrawViewShell* >(pViewSh) )
2322 {
2323 EditMode eMode = pDrawViewSh->GetEditMode();
2324 if( eMode == EditMode::Page )
2325 {
2326 bool bLayer = pDrawViewSh->IsLayerModeActive();
2327
2328 pDrawViewSh->ChangeEditMode( eMode, !bLayer );
2329 pDrawViewSh->ChangeEditMode( eMode, bLayer );
2330 }
2331 }
2332
2333 GetModel()->SetModified();
2334}
2335
2336OUString SAL_CALL SdDrawPage::getName()
2337{
2338 ::SolarMutexGuard aGuard;
2339
2341
2342 return getPageApiName( GetPage() );
2343}
2344
2345// XMasterPageTarget
2346Reference< drawing::XDrawPage > SAL_CALL SdDrawPage::getMasterPage( )
2347{
2348 ::SolarMutexGuard aGuard;
2349
2351
2352 if(GetPage())
2353 {
2354 Reference< drawing::XDrawPage > xPage;
2355
2356 if(SvxFmDrawPage::mpPage->TRG_HasMasterPage())
2357 {
2359 xPage.set( rMasterPage.getUnoPage(), uno::UNO_QUERY );
2360 }
2361
2362 return xPage;
2363 }
2364 return nullptr;
2365}
2366
2367void SAL_CALL SdDrawPage::setMasterPage( const Reference< drawing::XDrawPage >& xMasterPage )
2368{
2369 ::SolarMutexGuard aGuard;
2370 comphelper::ProfileZone aZone("setMasterPage");
2371
2373
2375 return;
2376
2377 SdMasterPage* pMasterPage = comphelper::getFromUnoTunnel<SdMasterPage>( xMasterPage );
2378 if( !(pMasterPage && pMasterPage->isValid()) )
2379 return;
2380
2382
2383 SdPage* pSdPage = static_cast<SdPage*>(pMasterPage->GetSdrPage());
2385
2387 pSdPage->GetRightBorder(),pSdPage->GetLowerBorder() );
2388
2389 SvxFmDrawPage::mpPage->SetSize( pSdPage->GetSize() );
2391 static_cast<SdPage*>(SvxFmDrawPage::mpPage)->SetLayoutName( pSdPage->GetLayoutName() );
2392
2393 // set notes master also
2394 SdPage* pNotesPage = GetModel()->GetDoc()->GetSdPage( (SvxFmDrawPage::mpPage->GetPageNum()-1)>>1, PageKind::Notes );
2395
2396 pNotesPage->TRG_ClearMasterPage();
2397 sal_uInt16 nNum = SvxFmDrawPage::mpPage->TRG_GetMasterPage().GetPageNum() + 1;
2398 pNotesPage->TRG_SetMasterPage(*SvxFmDrawPage::mpPage->getSdrModelFromSdrPage().GetMasterPage(nNum));
2399 pNotesPage->SetLayoutName( pSdPage->GetLayoutName() );
2400
2401 GetModel()->SetModified();
2402}
2403
2404// XPresentationPage
2405Reference< drawing::XDrawPage > SAL_CALL SdDrawPage::getNotesPage()
2406{
2407 ::SolarMutexGuard aGuard;
2408
2410
2411 if(SvxFmDrawPage::mpPage && GetModel()->GetDoc() && SvxFmDrawPage::mpPage->GetPageNum() )
2412 {
2413 SdPage* pNotesPage = GetModel()->GetDoc()->GetSdPage( (SvxFmDrawPage::mpPage->GetPageNum()-1)>>1, PageKind::Notes );
2414 if( pNotesPage )
2415 {
2416 Reference< drawing::XDrawPage > xPage( pNotesPage->getUnoPage(), uno::UNO_QUERY );
2417 return xPage;
2418 }
2419 }
2420 return nullptr;
2421}
2422
2423// XIndexAccess
2424sal_Int32 SAL_CALL SdDrawPage::getCount()
2425{
2427}
2428
2429Any SAL_CALL SdDrawPage::getByIndex( sal_Int32 Index )
2430{
2432}
2433
2434// XElementAccess
2436{
2438}
2439
2441{
2443}
2444
2445// XShapes
2446void SAL_CALL SdDrawPage::add( const Reference< drawing::XShape >& xShape )
2447{
2448 SdGenericDrawPage::add( xShape );
2449}
2450
2451void SAL_CALL SdDrawPage::remove( const Reference< drawing::XShape >& xShape )
2452{
2453 ::SolarMutexGuard aGuard;
2454
2456
2458 if( pObj )
2459 {
2460 GetPage()->RemovePresObj(pObj);
2461 pObj->SetUserCall(nullptr);
2462 }
2463
2464 SdGenericDrawPage::remove( xShape );
2465}
2466
2467void SdDrawPage::setBackground( const Any& rValue )
2468{
2469 Reference< beans::XPropertySet > xSet;
2470
2471 if( !(rValue >>= xSet) && !rValue.hasValue() )
2472 throw lang::IllegalArgumentException();
2473
2474 if( !xSet.is() )
2475 {
2476 // the easy case, no background set. Set drawing::FillStyle_NONE to represent this
2477 GetPage()->getSdrPageProperties().PutItem(XFillStyleItem(drawing::FillStyle_NONE));
2478 return;
2479 }
2480
2481 // is it our own implementation?
2482 SdUnoPageBackground* pBack = dynamic_cast<SdUnoPageBackground*>( xSet.get() );
2483
2484 SfxItemSetFixed<XATTR_FILL_FIRST, XATTR_FILL_LAST> aSet( GetModel()->GetDoc()->GetPool() );
2485
2486 if( pBack )
2487 {
2488 pBack->fillItemSet( static_cast<SdDrawDocument*>(&GetPage()->getSdrModelFromSdrPage()), aSet );
2489 }
2490 else
2491 {
2493
2494 Reference< beans::XPropertySetInfo > xSetInfo( xSet->getPropertySetInfo() );
2495 Reference< beans::XPropertySetInfo > xDestSetInfo( pBackground->getPropertySetInfo() );
2496
2497 const Sequence< beans::Property > aProperties( xDestSetInfo->getProperties() );
2498
2499 for( const beans::Property& rProp : aProperties )
2500 {
2501 const OUString aPropName( rProp.Name );
2502 if( xSetInfo->hasPropertyByName( aPropName ) )
2503 pBackground->setPropertyValue( aPropName,
2504 xSet->getPropertyValue( aPropName ) );
2505 }
2506
2507 pBackground->fillItemSet( static_cast<SdDrawDocument*>(&GetPage()->getSdrModelFromSdrPage()), aSet );
2508 }
2509
2510 if( aSet.Count() == 0 )
2511 {
2512 // no background fill, represent by setting drawing::FillStyle_NONE
2513 GetPage()->getSdrPageProperties().PutItem(XFillStyleItem(drawing::FillStyle_NONE));
2514 }
2515 else
2516 {
2517 // background fill, set at page (not sure if ClearItem is needed)
2520 }
2521
2522 // repaint only
2524}
2525
2526// XAnnotationAccess:
2527Reference< XAnnotation > SAL_CALL SdGenericDrawPage::createAndInsertAnnotation()
2528{
2529 if( !GetPage() )
2530 throw DisposedException();
2531
2532 Reference< XAnnotation > xRet;
2533 GetPage()->createAnnotation(xRet);
2534 return xRet;
2535}
2536
2537void SAL_CALL SdGenericDrawPage::removeAnnotation(const Reference< XAnnotation > & annotation)
2538{
2539 GetPage()->removeAnnotation(annotation);
2540}
2541
2542Reference< XAnnotationEnumeration > SAL_CALL SdGenericDrawPage::createAnnotationEnumeration()
2543{
2544 return ::sd::createAnnotationEnumeration( std::vector(GetPage()->getAnnotations()) );
2545}
2546
2548{
2549 const SfxItemSet& rFillAttributes = GetPage()->getSdrPageProperties().GetItemSet();
2550
2551 if(drawing::FillStyle_NONE == rFillAttributes.Get(XATTR_FILLSTYLE).GetValue())
2552 {
2553 // no fill set (switched off by drawing::FillStyle_NONE), clear rValue to represent this
2554 rValue.clear();
2555 }
2556 else
2557 {
2558 // there is a fill set, export to rValue
2559 Reference< beans::XPropertySet > xSet(new SdUnoPageBackground(
2560 GetModel()->GetDoc(),
2561 &GetPage()->getSdrPageProperties().GetItemSet()));
2562 rValue <<= xSet;
2563 }
2564}
2565
2567{
2568 Reference< XIndexAccess > xIA( rValue, UNO_QUERY );
2569 if( xIA.is() )
2570 {
2571 if( dynamic_cast< SdDrawPage* >( xIA.get() ) == this )
2572 {
2573 if( GetPage()->HasObjectNavigationOrder() )
2575
2576 return;
2577 }
2578 else if( static_cast<size_t>(xIA->getCount()) == GetPage()->GetObjCount() )
2579 {
2581 return;
2582 }
2583 }
2584 throw IllegalArgumentException();
2585}
2586
2587namespace {
2588
2589class SdNavigationOrderAccess : public ::cppu::WeakImplHelper< XIndexAccess >
2590{
2591public:
2592 explicit SdNavigationOrderAccess(SdrPage const * pPage);
2593
2594 // XIndexAccess
2595 virtual sal_Int32 SAL_CALL getCount( ) override;
2596 virtual Any SAL_CALL getByIndex( sal_Int32 Index ) override;
2597
2598 // XElementAccess
2599 virtual Type SAL_CALL getElementType( ) override;
2600 virtual sal_Bool SAL_CALL hasElements( ) override;
2601
2602private:
2603 std::vector< Reference< XShape > > maShapes;
2604};
2605
2606}
2607
2608SdNavigationOrderAccess::SdNavigationOrderAccess( SdrPage const * pPage )
2609: maShapes( pPage ? pPage->GetObjCount() : 0 )
2610{
2611 if( pPage )
2612 {
2613 const size_t nCount = pPage->GetObjCount();
2614 for( size_t nIndex = 0; nIndex < nCount; ++nIndex )
2615 {
2616 SdrObject* pObj = pPage->GetObj( nIndex );
2617 sal_uInt32 nNavPos = pObj->GetNavigationPosition();
2618 DBG_ASSERT( !maShapes[nNavPos].is(), "sd::SdNavigationOrderAccess::SdNavigationOrderAccess(), duplicate navigation positions from core!" );
2619 maShapes[nNavPos].set( pObj->getUnoShape(), UNO_QUERY );
2620 }
2621 }
2622}
2623
2624// XIndexAccess
2625sal_Int32 SAL_CALL SdNavigationOrderAccess::getCount( )
2626{
2627 return static_cast< sal_Int32 >( maShapes.size() );
2628}
2629
2630Any SAL_CALL SdNavigationOrderAccess::getByIndex( sal_Int32 Index )
2631{
2632 if( (Index < 0) || (Index > getCount()) )
2633 throw IndexOutOfBoundsException();
2634
2635 return Any( maShapes[Index] );
2636}
2637
2638// XElementAccess
2639Type SAL_CALL SdNavigationOrderAccess::getElementType( )
2640{
2642}
2643
2644sal_Bool SAL_CALL SdNavigationOrderAccess::hasElements( )
2645{
2646 return !maShapes.empty();
2647}
2648
2650{
2651 if( GetPage()->HasObjectNavigationOrder() )
2652 {
2653 return Any( Reference< XIndexAccess >( new SdNavigationOrderAccess( GetPage() ) ) );
2654 }
2655 else
2656 {
2657 return Any( Reference< XIndexAccess >( this ) );
2658 }
2659}
2660
2662 : SdGenericDrawPage(pModel, pPage, ImplGetMasterPagePropertySet(pPage->GetPageKind()))
2663{
2664}
2665
2667{
2668}
2669
2670// XInterface
2672{
2674}
2675
2676css::uno::Any SdMasterPage::queryAggregation(css::uno::Type const & rType) {
2677 ::SolarMutexGuard aGuard;
2678
2680
2681 uno::Any aAny;
2682
2684 aAny <<= Reference< container::XIndexAccess >(static_cast<presentation::XPresentationPage*>(this));
2686 aAny <<= Reference< container::XElementAccess >(static_cast<presentation::XPresentationPage*>(this));
2687 else if( rType == cppu::UnoType<container::XNamed>::get() )
2688 aAny <<= Reference< container::XNamed >(this);
2690 ( IsImpressDocument() &&
2691 GetPage() && GetPage()->GetPageKind() != PageKind::Handout) )
2692 aAny <<= Reference< presentation::XPresentationPage >( this );
2693 else
2695
2696 return aAny;
2697}
2698
2699void SAL_CALL SdMasterPage::acquire() noexcept
2700{
2701 SvxDrawPage::acquire();
2702}
2703
2704void SAL_CALL SdMasterPage::release() noexcept
2705{
2707}
2708
2710
2711// XTypeProvider
2712Sequence< uno::Type > SAL_CALL SdMasterPage::getTypes()
2713{
2714 ::SolarMutexGuard aGuard;
2715
2717
2718 if( !maTypeSequence.hasElements() )
2719 {
2720 const PageKind ePageKind = GetPage() ? GetPage()->GetPageKind() : PageKind::Standard;
2721 bool bPresPage = IsImpressDocument() && SvxFmDrawPage::mpPage && ePageKind != PageKind::Handout;
2722
2723 // Collect the types of this class.
2724 ::std::vector<uno::Type> aTypes;
2725 aTypes.reserve(12);
2736 if( bPresPage )
2738 if( bPresPage && ePageKind == PageKind::Standard )
2740
2741 // Get types of base class.
2742 // Join those types in a sequence.
2746 }
2747
2748 return maTypeSequence;
2749}
2750
2752{
2753 return css::uno::Sequence<sal_Int8>();
2754}
2755
2756// XServiceInfo
2758{
2759 return "SdMasterPage";
2760}
2761
2762Sequence< OUString > SAL_CALL SdMasterPage::getSupportedServiceNames()
2763{
2764 ::SolarMutexGuard aGuard;
2765
2767
2768 std::vector<std::u16string_view> aAdd{ u"com.sun.star.drawing.MasterPage" };
2769
2770 if( SvxFmDrawPage::mpPage && static_cast<SdPage*>(SvxFmDrawPage::mpPage)->GetPageKind() == PageKind::Handout )
2771 aAdd.emplace_back(u"com.sun.star.presentation.HandoutMasterPage");
2772
2774}
2775
2776sal_Bool SAL_CALL SdMasterPage::supportsService( const OUString& ServiceName )
2777{
2778 return cppu::supportsService( this, ServiceName );
2779}
2780
2781// XElementAccess
2783{
2784 ::SolarMutexGuard aGuard;
2785
2787
2788 if( SvxFmDrawPage::mpPage == nullptr )
2789 return false;
2790
2791 return SvxFmDrawPage::mpPage->GetObjCount() > 0;
2792}
2793
2795{
2797}
2798
2799// XIndexAccess
2800sal_Int32 SAL_CALL SdMasterPage::getCount()
2801{
2802 ::SolarMutexGuard aGuard;
2803
2805
2807}
2808
2810{
2811 ::SolarMutexGuard aGuard;
2812
2814
2816}
2817
2818// internal
2819void SdMasterPage::setBackground( const Any& rValue )
2820{
2821 // we need at least a beans::XPropertySet
2822 Reference< beans::XPropertySet > xInputSet( rValue, UNO_QUERY );
2823 if( !xInputSet.is() )
2824 throw lang::IllegalArgumentException();
2825
2826 try
2827 {
2828 if( GetModel() && IsImpressDocument() )
2829 {
2830 Reference< container::XNameAccess > xFamilies( GetModel()->getStyleFamilies(), UNO_SET_THROW );
2831 Reference< container::XNameAccess > xFamily( xFamilies->getByName( getName() ), UNO_QUERY_THROW ) ;
2832
2833 Reference< beans::XPropertySet > xStyleSet( xFamily->getByName( sUNO_PseudoSheet_Background ), UNO_QUERY_THROW );
2834
2835 Reference< beans::XPropertySetInfo > xSetInfo( xInputSet->getPropertySetInfo(), UNO_SET_THROW );
2836 Reference< beans::XPropertyState > xSetStates( xInputSet, UNO_QUERY );
2837
2838 for( const auto pProp : ImplGetPageBackgroundPropertySet()->getPropertyMap().getPropertyEntries() )
2839 {
2840 const OUString& rPropName = pProp->aName;
2841 if( xSetInfo->hasPropertyByName( rPropName ) )
2842 {
2843 if( !xSetStates.is() || xSetStates->getPropertyState( rPropName ) == beans::PropertyState_DIRECT_VALUE )
2844 xStyleSet->setPropertyValue( rPropName, xInputSet->getPropertyValue( rPropName ) );
2845 else
2846 xSetStates->setPropertyToDefault( rPropName );
2847 }
2848 }
2849 }
2850 else
2851 {
2852 // first fill an item set
2853 // is it our own implementation?
2854 SdUnoPageBackground* pBack = dynamic_cast<SdUnoPageBackground*>( xInputSet.get() );
2855
2856 SfxItemSetFixed<XATTR_FILL_FIRST, XATTR_FILL_LAST> aSet( GetModel()->GetDoc()->GetPool() );
2857
2858 if( pBack )
2859 {
2860 pBack->fillItemSet( static_cast<SdDrawDocument*>(&GetPage()->getSdrModelFromSdrPage()), aSet );
2861 }
2862 else
2863 {
2865
2866 Reference< beans::XPropertySetInfo > xInputSetInfo( xInputSet->getPropertySetInfo(), UNO_SET_THROW );
2867 Reference< beans::XPropertySetInfo > xDestSetInfo( pBackground->getPropertySetInfo(), UNO_SET_THROW );
2868
2869 const uno::Sequence< beans::Property> aProperties( xDestSetInfo->getProperties() );
2870
2871 for( const beans::Property& rProp : aProperties )
2872 {
2873 const OUString aPropName( rProp.Name );
2874 if( xInputSetInfo->hasPropertyByName( aPropName ) )
2875 pBackground->setPropertyValue( aPropName, xInputSet->getPropertyValue( aPropName ) );
2876 }
2877
2878 pBackground->fillItemSet( static_cast<SdDrawDocument*>(&SvxFmDrawPage::mpPage->getSdrModelFromSdrPage()), aSet );
2879 }
2880
2881 // if we find the background style, copy the set to the background
2883 SfxStyleSheetBasePool* pSSPool = pDoc->GetStyleSheetPool();
2884 if(pSSPool)
2885 {
2886 OUString aLayoutName( static_cast< SdPage* >( SvxFmDrawPage::mpPage )->GetLayoutName() );
2887 aLayoutName = OUString::Concat(aLayoutName.subView(0, aLayoutName.indexOf(SD_LT_SEPARATOR)+4)) +
2889 SfxStyleSheetBase* pStyleSheet = pSSPool->Find( aLayoutName, SfxStyleFamily::Page );
2890
2891 if( pStyleSheet )
2892 {
2893 pStyleSheet->GetItemSet().Put( aSet );
2894
2895 // repaint only
2897 return;
2898 }
2899 }
2900
2901 // if no background style is available, set at page directly. This
2902 // is an error and should NOT happen (and will be asserted from the SdrPage)
2904 }
2905 }
2906 catch( Exception& )
2907 {
2908 TOOLS_WARN_EXCEPTION( "sd", "sd::SdMasterPage::setBackground()");
2909 }
2910}
2911
2913{
2914 if( !GetModel() )
2915 return;
2916
2917 try
2918 {
2919 if( IsImpressDocument() )
2920 {
2921 Reference< container::XNameAccess > xFamilies( GetModel()->getStyleFamilies(), UNO_SET_THROW );
2922 Reference< container::XNameAccess > xFamily( xFamilies->getByName( getName() ), UNO_QUERY_THROW );
2923
2924 rValue <<= Reference< beans::XPropertySet >( xFamily->getByName( sUNO_PseudoSheet_Background ), UNO_QUERY_THROW );
2925 }
2926 else
2927 {
2929 SfxStyleSheetBasePool* pSSPool = pDoc->GetStyleSheetPool();
2930 if(pSSPool)
2931 {
2932 OUString aLayoutName( static_cast< SdPage* >(SvxFmDrawPage::mpPage)->GetLayoutName() );
2933 aLayoutName = OUString::Concat(aLayoutName.subView(0, aLayoutName.indexOf(SD_LT_SEPARATOR)+4)) +
2935 SfxStyleSheetBase* pStyleSheet = pSSPool->Find( aLayoutName, SfxStyleFamily::Page );
2936
2937 if( pStyleSheet )
2938 {
2939 SfxItemSet aStyleSet( pStyleSheet->GetItemSet());
2940 if( aStyleSet.Count() )
2941 {
2942 rValue <<= Reference< beans::XPropertySet >( new SdUnoPageBackground( pDoc, &aStyleSet ) );
2943 return;
2944 }
2945 }
2946 }
2947
2948 // No style found, use fill attributes from page background. This
2949 // should NOT happen and is an error
2950 const SfxItemSet& rFallbackItemSet(SvxFmDrawPage::mpPage->getSdrPageProperties().GetItemSet());
2951
2952 if(drawing::FillStyle_NONE == rFallbackItemSet.Get(XATTR_FILLSTYLE).GetValue())
2953 {
2954 rValue <<= Reference< beans::XPropertySet >(
2955 new SdUnoPageBackground(GetModel()->GetDoc(), &rFallbackItemSet));
2956 }
2957 else
2958 {
2959 rValue.clear();
2960 }
2961 }
2962 }
2963 catch( Exception& )
2964 {
2965 TOOLS_WARN_EXCEPTION( "sd", "sd::SdMasterPage::getBackground()");
2966 rValue.clear();
2967 }
2968}
2969
2970// XNamed
2971void SAL_CALL SdMasterPage::setName( const OUString& rName )
2972{
2973 ::SolarMutexGuard aGuard;
2974
2976
2977 if(!(SvxFmDrawPage::mpPage && GetPage()->GetPageKind() != PageKind::Notes))
2978 return;
2979
2980 SdDrawDocument* pDoc = GetModel()->GetDoc();
2981 bool bOutDummy;
2982
2983 // Slide Name has to be unique
2984 if( pDoc && pDoc->GetPageByName( rName, bOutDummy ) != SDRPAGE_NOTFOUND )
2985 return; // throw Exception ?
2986
2987 GetPage()->SetName( rName );
2988
2989 if( pDoc )
2990 pDoc->RenameLayoutTemplate( GetPage()->GetLayoutName(), rName );
2991
2992 // fake a mode change to repaint the page tab bar
2994 ::sd::ViewShell* pViewSh = pDocSh ? pDocSh->GetViewShell() : nullptr;
2995 if( auto pDrawViewSh = dynamic_cast< ::sd::DrawViewShell* >(pViewSh) )
2996 {
2997 EditMode eMode = pDrawViewSh->GetEditMode();
2999 {
3000 bool bLayer = pDrawViewSh->IsLayerModeActive();
3001
3002 pDrawViewSh->ChangeEditMode( eMode, !bLayer );
3003 pDrawViewSh->ChangeEditMode( eMode, bLayer );
3004 }
3005 }
3006
3007 GetModel()->SetModified();
3008}
3009
3010OUString SAL_CALL SdMasterPage::getName( )
3011{
3012 ::SolarMutexGuard aGuard;
3013
3015
3017 {
3018 OUString aLayoutName( GetPage()->GetLayoutName() );
3019 return aLayoutName.copy(0, aLayoutName.indexOf(SD_LT_SEPARATOR));
3020 }
3021
3022 return OUString();
3023}
3024
3025// XPresentationPage
3026Reference< drawing::XDrawPage > SAL_CALL SdMasterPage::getNotesPage()
3027{
3028 ::SolarMutexGuard aGuard;
3029
3031
3032 if(SvxFmDrawPage::mpPage && GetModel()->GetDoc() )
3033 {
3034 SdPage* pNotesPage = GetModel()->GetDoc()->GetMasterSdPage( (SvxFmDrawPage::mpPage->GetPageNum()-1)>>1, PageKind::Notes );
3035 if( pNotesPage )
3036 {
3037 Reference< drawing::XDrawPage > xPage( pNotesPage->getUnoPage(), uno::UNO_QUERY );
3038 return xPage;
3039 }
3040 }
3041 return nullptr;
3042}
3043
3044// XShapes
3045void SAL_CALL SdMasterPage::add( const Reference< drawing::XShape >& xShape )
3046{
3047 SdGenericDrawPage::add( xShape );
3048}
3049
3050void SAL_CALL SdMasterPage::remove( const Reference< drawing::XShape >& xShape )
3051{
3052 ::SolarMutexGuard aGuard;
3053
3055
3057 if( pObj && GetPage()->IsPresObj( pObj ) )
3058 GetPage()->RemovePresObj(pObj);
3059
3060 SdGenericDrawPage::remove( xShape );
3061}
3062
3063Reference< uno::XInterface > createUnoPageImpl( SdPage* pPage )
3064{
3065 Reference< uno::XInterface > xPage;
3066
3067 if( pPage )
3068 {
3069 SdXImpressDocument* pModel = comphelper::getFromUnoTunnel<SdXImpressDocument>( pPage->getSdrModelFromSdrPage().getUnoModel() );
3070 if( pModel )
3071 {
3072 if( pPage->IsMasterPage() )
3073 {
3074 xPage = static_cast<cppu::OWeakObject*>(new SdMasterPage( pModel, pPage ));
3075 }
3076 else
3077 {
3078 xPage = static_cast<cppu::OWeakObject*>(new SdDrawPage( pModel, pPage ));
3079 }
3080 }
3081 }
3082
3083 return xPage;
3084}
3085
3086/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const PropertyValue * pValues
struct _ADOIndex Index
PropertiesInfo aProperties
AutoLayout
Bitmap GetBitmap(Color aTransparentReplaceColor) const
bool IsDark() const
sal_uInt16 GetMasterSdPageCount(PageKind ePgKind) const
Definition: drawdoc2.cxx:222
SdPage * GetSdPage(sal_uInt16 nPgNum, PageKind ePgKind) const
Definition: drawdoc2.cxx:207
SAL_DLLPRIVATE sal_uInt16 GetPageByName(std::u16string_view rPgName, bool &rbIsMasterPage) const
Return the first page that has the given name.
Definition: drawdoc2.cxx:126
SAL_DLLPRIVATE void RenameLayoutTemplate(const OUString &rOldLayoutName, const OUString &rNewName)
Definition: drawdoc4.cxx:1018
SdPage * GetMasterSdPage(sal_uInt16 nPgNum, PageKind ePgKind)
Definition: drawdoc2.cxx:217
SAL_DLLPRIVATE void SetSelected(SdPage *pPage, bool bSelect)
Definition: drawdoc2.cxx:461
SAL_DLLPRIVATE::sd::DrawDocShell * GetDocSh() const
Definition: drawdoc.hxx:242
sal_uInt16 GetSdPageCount(PageKind ePgKind) const
Definition: drawdoc2.cxx:212
virtual OUString SAL_CALL getImplementationName() override
Definition: unopage.cxx:2236
virtual void SAL_CALL acquire() noexcept override
Definition: unopage.cxx:2093
virtual void getBackground(css::uno::Any &rValue) override
Definition: unopage.cxx:2547
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
Definition: unopage.cxx:2070
virtual void SAL_CALL release() noexcept override
Definition: unopage.cxx:2098
virtual css::uno::Type SAL_CALL getElementType() override
Definition: unopage.cxx:2435
SdDrawPage(SdXImpressDocument *pModel, SdPage *pInPage)
Definition: unopage.cxx:2060
virtual OUString SAL_CALL getName() override
Definition: unopage.cxx:2336
virtual ~SdDrawPage() noexcept override
Definition: unopage.cxx:2065
css::uno::Sequence< css::uno::Type > maTypeSequence
Definition: unopage.hxx:165
virtual void SAL_CALL add(const css::uno::Reference< css::drawing::XShape > &xShape) override
Definition: unopage.cxx:2446
virtual sal_Bool SAL_CALL hasElements() override
Definition: unopage.cxx:2440
virtual sal_Int32 SAL_CALL getCount() override
Definition: unopage.cxx:2424
virtual void SAL_CALL remove(const css::uno::Reference< css::drawing::XShape > &xShape) override
Definition: unopage.cxx:2451
virtual void SAL_CALL setMasterPage(const css::uno::Reference< css::drawing::XDrawPage > &xMasterPage) override
Definition: unopage.cxx:2367
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: unopage.cxx:2146
css::uno::Any SAL_CALL queryAggregation(css::uno::Type const &rType) override
Definition: unopage.cxx:2075
virtual css::uno::Reference< css::drawing::XDrawPage > SAL_CALL getMasterPage() override
Definition: unopage.cxx:2346
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: unopage.cxx:2255
static OUString getPageApiName(SdPage const *pPage)
Definition: unopage.cxx:2151
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unopage.cxx:2241
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: unopage.cxx:2106
static OUString getPageApiNameFromUiName(const OUString &rUIName)
Definition: unopage.cxx:2192
virtual css::uno::Reference< css::drawing::XDrawPage > SAL_CALL getNotesPage() override
Definition: unopage.cxx:2405
virtual void setBackground(const css::uno::Any &rValue) override
Definition: unopage.cxx:2467
virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 Index) override
Definition: unopage.cxx:2429
virtual void SAL_CALL setName(const OUString &aName) override
Definition: unopage.cxx:2261
static OUString getUiNameFromPageApiName(const OUString &rApiName)
Definition: unopage.cxx:2230
virtual void SAL_CALL removePropertiesChangeListener(const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
Definition: unopage.cxx:1399
virtual void getBackground(css::uno::Any &rValue)
Definition: unopage.cxx:1558
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unopage.cxx:1538
sal_Int16 mnTempPageNumber
Definition: unopage.hxx:58
virtual void SAL_CALL unbind(const css::uno::Reference< css::drawing::XShape > &xShape) override
Definition: unopage.cxx:1684
css::uno::Any getNavigationOrder()
Definition: unopage.cxx:2649
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId() noexcept
Definition: unopage.cxx:328
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: unopage.cxx:580
void SetHeight(sal_Int32 nHeight)
Definition: unopage.cxx:1854
SdrModel * mpSdrModel
Definition: unopage.hxx:56
void SetWidth(sal_Int32 nWidth)
Definition: unopage.cxx:1825
void SetUpperBorder(sal_Int32 nValue)
Definition: unopage.cxx:1749
void SetRightBorder(sal_Int32 nValue)
Definition: unopage.cxx:1725
virtual void disposing() noexcept override
Definition: unopage.cxx:1891
void setNavigationOrder(const css::uno::Any &rValue)
Definition: unopage.cxx:2566
virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getLinks() override
Definition: unopage.cxx:1548
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
Definition: unopage.cxx:1008
virtual void SAL_CALL firePropertiesChangeEvent(const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
Definition: unopage.cxx:1403
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: unopage.cxx:1348
bool isValid() const
Definition: unopage.hxx:97
css::uno::Any SAL_CALL queryAggregation(css::uno::Type const &rType) override
Definition: unopage.cxx:520
SdPage * GetPage() const
Definition: unopage.hxx:99
void throwIfDisposed() const
Definition: unopage.cxx:359
virtual void SAL_CALL setPropertyValues(const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Sequence< css::uno::Any > &aValues) override
Definition: unopage.cxx:1352
bool mbIsImpressDocument
Definition: unopage.hxx:57
virtual ~SdGenericDrawPage() noexcept override
Definition: unopage.cxx:355
virtual void SAL_CALL split(const css::uno::Reference< css::drawing::XShape > &xGroup) override
Definition: unopage.cxx:1635
virtual css::uno::Reference< css::drawing::XShape > CreateShape(SdrObject *pObj) const override
Definition: unopage.cxx:1407
virtual css::uno::Reference< css::drawing::XShape > SAL_CALL bind(const css::uno::Reference< css::drawing::XShapes > &xShapes) override
Definition: unopage.cxx:1652
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: unopage.cxx:1346
virtual css::uno::Reference< css::office::XAnnotation > SAL_CALL createAndInsertAnnotation() override
Definition: unopage.cxx:2527
virtual css::uno::Reference< css::animations::XAnimationNode > SAL_CALL getAnimationNode() override
Definition: unopage.cxx:1898
const SvxItemPropertySet * mpPropSet
Definition: unopage.hxx:59
bool IsImpressDocument() const
Definition: unopage.cxx:372
void SetLeftBorder(sal_Int32 nValue)
Definition: unopage.cxx:1701
SdXImpressDocument * GetModel() const
Definition: unopage.cxx:365
virtual void SAL_CALL release() noexcept override
Definition: unopage.cxx:1884
virtual sal_Int64 SAL_CALL getSomething(const css::uno::Sequence< sal_Int8 > &aIdentifier) override
Definition: unopage.cxx:334
void SetLowerBorder(sal_Int32 nValue)
Definition: unopage.cxx:1773
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: unopage.cxx:1349
virtual css::uno::Reference< css::office::XAnnotationEnumeration > SAL_CALL createAnnotationEnumeration() override
Definition: unopage.cxx:2542
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyValues(const css::uno::Sequence< OUString > &aPropertyNames) override
Definition: unopage.cxx:1374
SdXImpressDocument * mpDocModel
Definition: unopage.hxx:55
virtual void setBackground(const css::uno::Any &rValue)
Definition: unopage.cxx:1553
virtual rtl::Reference< SdrObject > CreateSdrObject_(const css::uno::Reference< css::drawing::XShape > &xShape) override
Definition: unopage.cxx:396
void UpdateModel()
Definition: unopage.cxx:380
void setBookmarkURL(std::u16string_view rURL)
Definition: unopage.cxx:1579
virtual void SAL_CALL removeAnnotation(const css::uno::Reference< css::office::XAnnotation > &annotation) override
Definition: unopage.cxx:2537
OUString getBookmarkURL() const
Definition: unopage.cxx:1563
virtual void SAL_CALL addPropertiesChangeListener(const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
Definition: unopage.cxx:1395
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
Definition: unopage.cxx:515
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
Definition: unopage.cxx:1347
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: unopage.cxx:573
virtual css::uno::Reference< css::drawing::XShape > SAL_CALL combine(const css::uno::Reference< css::drawing::XShapes > &xShapes) override
Definition: unopage.cxx:1600
SdGenericDrawPage(SdXImpressDocument *pModel, SdPage *pInPage, const SvxItemPropertySet *pSet)
Definition: unopage.cxx:340
virtual sal_Bool SAL_CALL hasElements() override
Definition: unopage.cxx:2782
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: unopage.cxx:2776
virtual void SAL_CALL setName(const OUString &aName) override
Definition: unopage.cxx:2971
virtual css::uno::Type SAL_CALL getElementType() override
Definition: unopage.cxx:2794
virtual OUString SAL_CALL getName() override
Definition: unopage.cxx:3010
virtual OUString SAL_CALL getImplementationName() override
Definition: unopage.cxx:2757
virtual ~SdMasterPage() noexcept override
Definition: unopage.cxx:2666
virtual css::uno::Reference< css::drawing::XDrawPage > SAL_CALL getNotesPage() override
Definition: unopage.cxx:3026
virtual void getBackground(css::uno::Any &rValue) override
Definition: unopage.cxx:2912
css::uno::Sequence< css::uno::Type > maTypeSequence
Definition: unopage.hxx:227
virtual sal_Int32 SAL_CALL getCount() override
Definition: unopage.cxx:2800
css::uno::Any SAL_CALL queryAggregation(css::uno::Type const &rType) override
Definition: unopage.cxx:2676
virtual void SAL_CALL release() noexcept override
Definition: unopage.cxx:2704
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: unopage.cxx:2712
virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 Index) override
Definition: unopage.cxx:2809
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
Definition: unopage.cxx:2671
virtual void SAL_CALL add(const css::uno::Reference< css::drawing::XShape > &xShape) override
Definition: unopage.cxx:3045
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: unopage.cxx:2751
virtual void SAL_CALL remove(const css::uno::Reference< css::drawing::XShape > &xShape) override
Definition: unopage.cxx:3050
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unopage.cxx:2762
virtual void SAL_CALL acquire() noexcept override
Definition: unopage.cxx:2699
virtual void setBackground(const css::uno::Any &rValue) override
Definition: unopage.cxx:2819
SdMasterPage(SdXImpressDocument *pModel, SdPage *pInPage)
Definition: unopage.cxx:2661
virtual ~SdPageLinkTargets() noexcept override
Definition: unopage.cxx:1916
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unopage.cxx:2054
virtual css::uno::Type SAL_CALL getElementType() override
Definition: unopage.cxx:1921
SdrObject * FindObject(std::u16string_view rName) const noexcept
Definition: unopage.cxx:2021
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: unopage.cxx:2049
virtual sal_Bool SAL_CALL hasElements() override
Definition: unopage.cxx:1926
SdPageLinkTargets(SdGenericDrawPage *pUnoPage) noexcept
Definition: unopage.cxx:1910
virtual OUString SAL_CALL getImplementationName() override
Definition: unopage.cxx:2044
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override
Definition: unopage.cxx:1971
SdGenericDrawPage * mpUnoPage
Definition: unopage.hxx:283
virtual sal_Bool SAL_CALL hasByName(const OUString &aName) override
Definition: unopage.cxx:2014
virtual css::uno::Any SAL_CALL getByName(const OUString &aName) override
Definition: unopage.cxx:1953
void setTransitionFadeColor(sal_Int32 nTransitionFadeColor)
Definition: sdpage2.cxx:516
bool getTransitionDirection() const
Definition: sdpage.hxx:242
virtual void SetOrientation(Orientation eOrient) override
Definition: sdpage.cxx:2557
css::uno::Reference< css::animations::XAnimationNode > const & getAnimationNode()
returns the main animation node
virtual Orientation GetOrientation() const override
Definition: sdpage.cxx:2562
SdrObject * CreatePresObj(PresObjKind eObjKind, bool bVertical, const ::tools::Rectangle &rRect)
creates a presentation object with the given PresObjKind on this page.
Definition: sdpage.cxx:284
sal_Int16 getTransitionSubtype() const
Definition: sdpage.hxx:239
void RemovePresObj(const SdrObject *pObj)
removes the given SdrObject from the presentation object list
Definition: sdpage.cxx:2327
bool IsLoopSound() const
Definition: sdpage.hxx:231
PageKind GetPageKind() const
Definition: sdpage.hxx:205
void SetTime(double fNewTime)
Definition: sdpage.hxx:216
void removeAnnotation(const css::uno::Reference< css::office::XAnnotation > &xAnnotation)
Definition: sdpage2.cxx:591
sal_Int16 getTransitionType() const
Definition: sdpage.hxx:236
void SetExcluded(bool bNewExcluded)
Definition: sdpage.hxx:222
OUString const & GetRealName() const
Definition: sdpage.hxx:269
const sd::HeaderFooterSettings & getHeaderFooterSettings() const
Definition: sdpage.cxx:2711
double GetTime() const
Definition: sdpage.hxx:217
void SetFadeEffect(css::presentation::FadeEffect eNewEffect)
void createAnnotation(css::uno::Reference< css::office::XAnnotation > &xAnnotation)
Definition: sdpage2.cxx:560
double getTransitionDuration() const
Definition: sdpage.hxx:248
void setTransitionDirection(bool bTransitionbDirection)
Definition: sdpage2.cxx:510
virtual void SetUpperBorder(sal_Int32 nBorder) override
Definition: sdpage.cxx:1781
PresObjKind GetPresObjKind(SdrObject *pObj) const
Definition: sdpage.cxx:2309
const OUString & GetSoundFile() const
Definition: sdpage.hxx:228
void SetLoopSound(bool bLoopSound)
Definition: sdpage.hxx:230
bool IsExcluded() const
Definition: sdpage.hxx:223
void setTransitionSubtype(sal_Int16 nTransitionSubtype)
Definition: sdpage2.cxx:504
void SetLayoutName(const OUString &aName)
Definition: sdpage.cxx:2487
void SetAutoLayout(AutoLayout eLayout, bool bInit=false, bool bCreate=false)
Definition: sdpage.cxx:1610
void SetPresChange(PresChange eChange)
Definition: sdpage.hxx:213
void InsertPresObj(SdrObject *pObj, PresObjKind eKind)
inserts the given SdrObject into the presentation object list
Definition: sdpage.cxx:2338
virtual OUString GetLayoutName() const override
Definition: sdpage.hxx:255
void SetSoundFile(const OUString &rStr)
Definition: sdpage.hxx:227
void SetStopSound(bool bStopSound)
Definition: sdpage.hxx:233
virtual void SetRightBorder(sal_Int32 nBorder) override
Definition: sdpage.cxx:1773
virtual void SetLowerBorder(sal_Int32 nBorder) override
Definition: sdpage.cxx:1789
virtual void SetLeftBorder(sal_Int32 nBorder) override
Definition: sdpage.cxx:1765
void setHeaderFooterSettings(const sd::HeaderFooterSettings &rNewSettings)
Definition: sdpage.cxx:2723
void setTransitionType(sal_Int16 nTransitionType)
Definition: sdpage2.cxx:498
void SetName(const OUString &rName)
Set the name of the page and broadcast a model change.
Definition: sdpage.cxx:2703
sal_Int32 getTransitionFadeColor() const
Definition: sdpage.hxx:245
css::presentation::FadeEffect GetFadeEffect() const
void getAlienAttributes(css::uno::Any &rAttributes)
Definition: sdpage2.cxx:470
void SetSound(bool bNewSoundOn)
Definition: sdpage.hxx:219
virtual void SetSize(const Size &aSize) override
Definition: sdpage.cxx:1746
void setTransitionDuration(double fTransitionDuration)
Definition: sdpage2.cxx:522
void fillItemSet(SdDrawDocument *pDoc, SfxItemSet &rSet)
Definition: unopback.cxx:87
this class implements a search or replace operation on a given page or a given sdrobj
Definition: unosrch.hxx:40
::sd::DrawDocShell * GetDocShell() const
Definition: unomodel.hxx:140
SdDrawDocument * GetDoc() const
Definition: unomodel.hxx:141
void SetModified() noexcept
Definition: unomodel.cxx:593
bool IsImpressDocument() const
Definition: unomodel.hxx:142
SdrLayerID GetLayerID(const OUString &rName) const
void Set(SdrLayerID a)
bool IsSet(SdrLayerID a) const
size_t GetMarkCount() const
SdrMark * GetMark(size_t nNum) const
SdrObject * GetMarkedSdrObj() const
SfxStyleSheet * GetDefaultStyleSheet() const
void SetMaxObjSize(const Size &rSiz)
sal_uInt16 GetMasterPageCount() const
SfxStyleSheetBasePool * GetStyleSheetPool() const
css::uno::Reference< css::uno::XInterface > const & getUnoModel()
const SdrLayerAdmin & GetLayerAdmin() const
SdrObject * Next()
bool IsMore() const
SdrObject * GetObj(size_t nNum) const
size_t GetObjCount() const
void SetNavigationOrder(const css::uno::Reference< css::container::XIndexAccess > &rxOrder)
void ClearObjectNavigationOrder()
static SdrObject * getSdrObjectFromXShape(const css::uno::Reference< css::uno::XInterface > &xInt)
static SdrItemPool & GetGlobalDrawObjectItemPool()
void SetUserCall(SdrObjUserCall *pUser)
virtual SdrInventor GetObjInventor() const
virtual css::uno::Reference< css::drawing::XShape > getUnoShape()
virtual const OUString & GetName() const
virtual SdrObjKind GetObjIdentifier() const
sal_uInt32 GetNavigationPosition() const
const SfxItemSet & GetItemSet() const
void PutItemSet(const SfxItemSet &rSet)
void PutItem(const SfxPoolItem &rItem)
std::shared_ptr< model::Theme > const & GetTheme() const
void SetTheme(std::shared_ptr< model::Theme > const &pTheme)
void ClearItem(const sal_uInt16 nWhich=0)
void TRG_SetMasterPage(SdrPage &rNew)
void TRG_ClearMasterPage()
void ActionChanged()
css::uno::Reference< css::uno::XInterface > const & getUnoPage()
SdrPage & TRG_GetMasterPage() const
sal_uInt16 GetPageNum() const
virtual void SetBorder(sal_Int32 nLft, sal_Int32 nUpp, sal_Int32 nRgt, sal_Int32 Lwr)
bool IsMasterPage() const
void SetBackgroundFullSize(bool bIn)
Size GetSize() const
sal_Int32 GetUpperBorder() const
sal_Int32 GetRightBorder() const
void TRG_SetMasterPageVisibleLayers(const SdrLayerIDSet &rNew)
sal_Int32 GetLeftBorder() const
virtual void SetOrientation(Orientation eOri)
SdrPageProperties & getSdrPageProperties()
Color GetPageBackgroundColor() const
const SdrLayerIDSet & TRG_GetMasterPageVisibleLayers() const
bool IsBackgroundFullSize() const
SdrModel & getSdrModelFromSdrPage() const
sal_Int32 GetLowerBorder() const
virtual void SetSize(const Size &aSiz)
sal_uInt16 Count() const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
std::shared_ptr< GDIMetaFile > GetPreviewMetaFile(bool bFullContent=false) const
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
virtual SfxItemSet & GetItemSet()
constexpr tools::Long getHeight() const
constexpr tools::Long Height() const
constexpr tools::Long getWidth() const
void setWidth(tools::Long nWidth)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
const void * GetData()
sal_uInt64 Tell() const
SvStream & Write(const GDIMetaFile &rMetaFile)
std::unique_ptr< SdrView > mpView
SdrModel * mpModel
virtual void SAL_CALL add(const css::uno::Reference< css::drawing::XShape > &xShape) override
virtual sal_Int32 SAL_CALL getCount() override
virtual void SAL_CALL remove(const css::uno::Reference< css::drawing::XShape > &xShape) override
SdrPage * mpPage
virtual sal_Bool SAL_CALL hasElements() override
virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 Index) override
void SelectObjectsInView(const css::uno::Reference< css::drawing::XShapes > &aShapes, SdrPageView *pPageView) noexcept
virtual void SAL_CALL release() noexcept override
virtual void disposing() noexcept
SdrPage * GetSdrPage() const
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual css::uno::Type SAL_CALL getElementType() override
void SelectObjectInView(const css::uno::Reference< css::drawing::XShape > &xShape, SdrPageView *pPageView) noexcept
virtual css::uno::Reference< css::drawing::XShape > CreateShape(SdrObject *pObj) const override
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &aType) override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual rtl::Reference< SdrObject > CreateSdrObject_(const css::uno::Reference< css::drawing::XShape > &xShape) override
css::uno::Reference< css::beans::XPropertySetInfo > const & getPropertySetInfo() const
const SfxItemPropertyMapEntry * getPropertyMapEntry(std::u16string_view rName) const
static css::uno::Reference< css::awt::XBitmap > CreateBitmap(const BitmapEx &rBitmap)
const css::uno::Sequence< sal_Int8 > & getSeq() const
css::uno::Type const & get()
static std::unique_ptr< Theme > FromAny(const css::uno::Any &rVal)
sd::ViewShell * GetViewShell()
Base class of the stacked shells that provide graphical views to Draw and Impress documents and editi...
Base class of the stacked shell hierarchy.
Definition: ViewShell.hxx:92
virtual void UpdateScrollBars()
Set internal values of all scroll bars that determine thumb size and position.
Definition: viewshe2.cxx:71
void InitWindows(const Point &rViewOrigin, const Size &rViewSize, const Point &rWinPos, bool bUpdate=false)
Initialize imaging parameters for all split windows.
Definition: viewshe2.cxx:403
constexpr tools::Long GetWidth() const
constexpr tools::Long Top() const
constexpr tools::Long GetHeight() const
constexpr tools::Long Left() const
constexpr ::Color COL_WHITE(0xFF, 0xFF, 0xFF)
int nCount
#define DBG_ASSERT(sCon, aError)
PresChange
Definition: diadef.h:23
#define TOOLS_WARN_EXCEPTION(area, stream)
bool VCL_DLLPUBLIC WriteDIB(const Bitmap &rSource, SvStream &rOStm, bool bCompressed, bool bFileHeader)
URL aURL
virtual OUString GetName() const override
float u
float x
SvxTimeFormat
SvxDateFormat
sal_Int16 nValue
constexpr OUStringLiteral SD_LT_SEPARATOR
Definition: glob.hxx:49
sal_Int32 nIndex
OUString aName
Mode eMode
void * p
Sequence< sal_Int8 > aSeq
aStr
const SfxItemSet * GetItemSet(const SfxPoolItem &rAttr)
@ Exception
css::uno::Sequence< T > concatSequences(const css::uno::Sequence< T > &rS1, const Ss &... rSn)
sal_Int64 getSomethingImpl(const css::uno::Sequence< sal_Int8 > &rId, T *pThis, FallbackToGetSomethingOf< Base >={})
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
Type
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
int i
OUString aPropName
uno::Reference< util::XTheme > createXTheme(std::shared_ptr< model::Theme > const &pTheme)
sal_Int32 toInt32(std::u16string_view str, sal_Int16 radix=10)
constexpr bool starts_with(std::basic_string_view< charT, traits > sv, std::basic_string_view< charT, traits > x) noexcept
Any GetTime(const OUString &val)
Reference< XAnnotationEnumeration > createAnnotationEnumeration(sd::AnnotationVector &&rAnnotations)
long Long
PresObjKind
Definition: pres.hxx:22
EditMode
Definition: pres.hxx:53
PageKind
Definition: pres.hxx:45
Orientation
OUString SdResId(TranslateId aId)
Definition: sdmod.cxx:83
constexpr OUStringLiteral STR_LAYOUT_BACKGROUND
Definition: strings.hxx:17
SvxTimeFormat meTimeFormat
Definition: sdpage.hxx:75
SvxDateFormat meDateFormat
Definition: sdpage.hxx:74
Reference< XModel > xModel
SdrObjKind
#define SDRPAGE_NOTFOUND
bool bVisible
unsigned char sal_Bool
sal_uInt16 sal_Unicode
signed char sal_Int8
constexpr OUStringLiteral sUNO_Prop_IsBackgroundObjectsVisible
Definition: unokywds.hxx:57
constexpr OUStringLiteral sUNO_LayerName_background_objects
Definition: unokywds.hxx:30
constexpr OUStringLiteral sUNO_PseudoSheet_Background
Definition: unokywds.hxx:26
constexpr OUStringLiteral sUNO_Prop_IsBackgroundVisible
Definition: unokywds.hxx:55
constexpr OUStringLiteral sUNO_Prop_BookmarkURL
Definition: unokywds.hxx:59
constexpr OUStringLiteral sUNO_Prop_UserDefinedAttributes
Definition: unokywds.hxx:58
constexpr OUStringLiteral sUNO_LayerName_background
Definition: unokywds.hxx:29
#define WID_PAGE_BACKFULL
#define WID_PAGE_RIGHT
#define WID_PAGE_THEME
#define WID_PAGE_TOP
#define WID_PAGE_USERATTRIBS
#define WID_PAGE_WIDTH
#define WID_PAGE_HEIGHT
#define WID_PAGE_LEFT
#define WID_PAGE_ORIENT
#define WID_PAGE_BOTTOM
#define WID_PAGE_NUMBER
#define WID_PAGE_ISDARK
#define WID_NAVORDER
Definition: unoobj.cxx:103
static const SvxItemPropertySet * ImplGetDrawPagePropertySet(bool bImpress, PageKind ePageKind)
Definition: unopage.cxx:114
Reference< uno::XInterface > createUnoPageImpl(SdPage *pPage)
Definition: unopage.cxx:3063
UNO3_GETIMPLEMENTATION2_IMPL(SdDrawPage, SdGenericDrawPage)
OUString getPageApiNameFromUiName(const OUString &rUIName)
Definition: unopage.cxx:2174
#define DRAW_PAGE_NOTES_PROPERTIES
OUString getUiNameFromPageApiNameImpl(const OUString &rApiName)
Definition: unopage.cxx:2197
#define GRAPHIC_PAGE_PROPERTIES
constexpr OUStringLiteral sEmptyPageName
Definition: unopage.cxx:111
static void refreshpage(SdDrawDocument *pDoc, const PageKind ePageKind)
Definition: unopage.cxx:1797
static const SvxItemPropertySet * ImplGetMasterPagePropertySet(PageKind ePageKind)
this function stores the property map for master pages in impress and draw
Definition: unopage.cxx:267
OUString getPageApiName(SdPage const *pPage)
Definition: unopage.cxx:2156
const SvxItemPropertySet * ImplGetPageBackgroundPropertySet()
Definition: unopback.cxx:37
#define UNO_NAME_PAGE_LAYOUT
Definition: unoprnms.hxx:31
#define UNO_NAME_PAGE_NUMBER
Definition: unoprnms.hxx:32
#define UNO_NAME_PAGE_ORIENTATION
Definition: unoprnms.hxx:33
#define UNO_NAME_PAGE_BOTTOM
Definition: unoprnms.hxx:26
#define UNO_NAME_PAGE_HEIGHT
Definition: unoprnms.hxx:30
#define UNO_NAME_OBJ_SOUNDFILE
Definition: unoprnms.hxx:52
constexpr OUStringLiteral UNO_NAME_LINKDISPLAYNAME
#define UNO_NAME_PAGE_DURATION
Definition: unoprnms.hxx:28
#define UNO_NAME_PAGE_LEFT
Definition: unoprnms.hxx:23
#define UNO_NAME_PAGE_WIDTH
Definition: unoprnms.hxx:36
#define UNO_NAME_PAGE_BACKGROUND
Definition: unoprnms.hxx:22
#define UNO_NAME_PAGE_TOP
Definition: unoprnms.hxx:25
#define UNO_NAME_PAGE_PREVIEWMETAFILE
Definition: unoprnms.hxx:39
#define UNO_NAME_PAGE_PREVIEWBITMAP
Definition: unoprnms.hxx:38
#define UNO_NAME_PAGE_CHANGE
Definition: unoprnms.hxx:27
#define UNO_NAME_PAGE_RIGHT
Definition: unoprnms.hxx:24
constexpr OUStringLiteral UNO_NAME_LINKDISPLAYBITMAP
#define UNO_NAME_PAGE_SPEED
Definition: unoprnms.hxx:34
#define UNO_NAME_PAGE_TRANSITION_DURATION
Definition: unoprnms.hxx:35
#define UNO_NAME_PAGE_VISIBLE
Definition: unoprnms.hxx:40
#define UNO_NAME_PAGE_EFFECT
Definition: unoprnms.hxx:29
#define UNO_NAME_PAGE_PREVIEW
Definition: unoprnms.hxx:37
VCL_DLLPUBLIC bool ConvertGDIMetaFileToWMF(const GDIMetaFile &rMTF, SvStream &rTargetStream, FilterConfigItem const *pConfigItem, bool bPlaceable=true)
constexpr TypedWhichId< XFillStyleItem > XATTR_FILLSTYLE(XATTR_FILL_FIRST)
const SvXMLTokenMapEntry aTypes[]