LibreOffice Module sd (master) 1
animobjs.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 <time.h>
21#include <svl/eitem.hxx>
22#include <svl/intitem.hxx>
23#include <svx/svdograf.hxx>
24#include <svx/svdogrp.hxx>
25#include <svx/svdpagv.hxx>
26#include <sfx2/dispatch.hxx>
27#include <sfx2/progress.hxx>
28#include <vcl/help.hxx>
29#include <vcl/svapp.hxx>
30#include <vcl/weld.hxx>
31#include <vcl/virdev.hxx>
32
33#include <anminfo.hxx>
34#include <animobjs.hxx>
35#include <app.hrc>
36#include <strings.hrc>
37#include <sdresid.hxx>
38#include <View.hxx>
39#include <drawdoc.hxx>
40#include <sdpage.hxx>
41
42#include <ViewShell.hxx>
43
44#include <vcl/settings.hxx>
45
46#include <EffectMigration.hxx>
47
48#include <algorithm>
49
50using namespace ::com::sun::star;
51
52namespace sd {
53
58 : aScale(1, 1)
59{
60}
61
63{
64}
65
66void SdDisplay::SetBitmapEx( BitmapEx const * pBmpEx )
67{
68 if( pBmpEx )
69 {
70 aBitmapEx = *pBmpEx;
71 }
72 else
73 {
75 const Color aFillColor = rStyles.GetFieldColor();
76 aBitmapEx.Erase(aFillColor);
77 }
78}
79
80void SdDisplay::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle&)
81{
82 rRenderContext.Push(vcl::PushFlags::MAPMODE);
83
84 rRenderContext.SetMapMode(MapMode(MapUnit::MapPixel));
86 rRenderContext.SetBackground( Wallpaper( rStyles.GetFieldColor() ) );
87 rRenderContext.Erase();
88
89 Point aPt;
90 Size aSize = GetOutputSizePixel();
91
92 Size aBmpSize = aBitmapEx.GetBitmap().GetSizePixel();
93 aBmpSize.setWidth( static_cast<::tools::Long>( static_cast<double>(aBmpSize.Width()) * static_cast<double>(aScale) ) );
94 aBmpSize.setHeight( static_cast<::tools::Long>( static_cast<double>(aBmpSize.Height()) * static_cast<double>(aScale) ) );
95
96 if( aBmpSize.Width() < aSize.Width() )
97 aPt.setX( ( aSize.Width() - aBmpSize.Width() ) / 2 );
98 if( aBmpSize.Height() < aSize.Height() )
99 aPt.setY( ( aSize.Height() - aBmpSize.Height() ) / 2 );
100
101 aBitmapEx.Draw(&rRenderContext, aPt, aBmpSize);
102
103 rRenderContext.Pop();
104}
105
106void SdDisplay::SetScale( const Fraction& rFrac )
107{
108 aScale = rFrac;
109}
110
112{
113 CustomWidgetController::SetDrawingArea(pDrawingArea);
114 Size aSize(pDrawingArea->get_ref_device().LogicToPixel(Size(147, 87), MapMode(MapUnit::MapAppFont)));
115 pDrawingArea->set_size_request(aSize.Width(), aSize.Height());
116 SetOutputSizePixel(aSize);
117}
118
119const size_t AnimationWindow::EMPTY_FRAMELIST = std::numeric_limits<size_t>::max();
120
125 : SfxDockingWindow(pInBindings, pCW, pParent,
126 "DockingAnimation", "modules/simpress/ui/dockinganimation.ui")
127 , m_xCtlDisplay(new SdDisplay)
128 , m_xCtlDisplayWin(new weld::CustomWeld(*m_xBuilder, "preview", *m_xCtlDisplay))
129 , m_xBtnFirst(m_xBuilder->weld_button("first"))
130 , m_xBtnReverse(m_xBuilder->weld_button("prev"))
131 , m_xBtnStop(m_xBuilder->weld_button("stop"))
132 , m_xBtnPlay(m_xBuilder->weld_button("next"))
133 , m_xBtnLast(m_xBuilder->weld_button("last"))
134 , m_xNumFldBitmap(m_xBuilder->weld_spin_button("numbitmap"))
135 , m_xTimeField(m_xBuilder->weld_formatted_spin_button("duration"))
136 , m_xFormatter(new weld::TimeFormatter(*m_xTimeField))
137 , m_xLbLoopCount(m_xBuilder->weld_combo_box("loopcount"))
138 , m_xBtnGetOneObject(m_xBuilder->weld_button("getone"))
139 , m_xBtnGetAllObjects(m_xBuilder->weld_button("getall"))
140 , m_xBtnRemoveBitmap(m_xBuilder->weld_button("delone"))
141 , m_xBtnRemoveAll(m_xBuilder->weld_button("delall"))
142 , m_xFiCount(m_xBuilder->weld_label("count"))
143 , m_xRbtGroup(m_xBuilder->weld_radio_button("group"))
144 , m_xRbtBitmap(m_xBuilder->weld_radio_button("bitmap"))
145 , m_xFtAdjustment(m_xBuilder->weld_label("alignmentft"))
146 , m_xLbAdjustment(m_xBuilder->weld_combo_box("alignment"))
147 , m_xBtnCreateGroup(m_xBuilder->weld_button("create"))
148 , m_xBtnHelp(m_xBuilder->weld_button("help"))
149 , m_nCurrentFrame(EMPTY_FRAMELIST)
150 , bMovie(false)
151 , bAllObjects(false)
152{
153 SetText(SdResId(STR_ANIMATION_DIALOG_TITLE));
154
155 m_xFormatter->SetDuration(true);
156 m_xFormatter->SetTimeFormat(TimeFieldFormat::F_SEC_CS);
157 m_xFormatter->EnableEmptyField(false);
158
159 // create new document with page
160 pMyDoc.reset( new SdDrawDocument(DocumentType::Impress, nullptr) );
161 rtl::Reference<SdPage> pPage = pMyDoc->AllocSdPage(false);
162 pMyDoc->InsertPage(pPage.get());
163
164 pControllerItem.reset( new AnimationControllerItem( SID_ANIMATOR_STATE, this, pInBindings ) );
165
166 m_xBtnFirst->connect_clicked( LINK( this, AnimationWindow, ClickFirstHdl ) );
167 m_xBtnReverse->connect_clicked( LINK( this, AnimationWindow, ClickPlayHdl ) );
168 m_xBtnStop->connect_clicked( LINK( this, AnimationWindow, ClickStopHdl ) );
169 m_xBtnPlay->connect_clicked( LINK( this, AnimationWindow, ClickPlayHdl ) );
170 m_xBtnLast->connect_clicked( LINK( this, AnimationWindow, ClickLastHdl ) );
171
172 m_xBtnGetOneObject->connect_clicked( LINK( this, AnimationWindow, ClickGetObjectHdl ) );
173 m_xBtnGetAllObjects->connect_clicked( LINK( this, AnimationWindow, ClickGetObjectHdl ) );
174 m_xBtnRemoveBitmap->connect_clicked( LINK( this, AnimationWindow, ClickRemoveBitmapHdl ) );
175 m_xBtnRemoveAll->connect_clicked( LINK( this, AnimationWindow, ClickRemoveBitmapHdl ) );
176
177 m_xRbtGroup->connect_toggled( LINK( this, AnimationWindow, ClickRbtHdl ) );
178 m_xRbtBitmap->connect_toggled( LINK( this, AnimationWindow, ClickRbtHdl ) );
179 m_xBtnCreateGroup->connect_clicked( LINK( this, AnimationWindow, ClickCreateGroupHdl ) );
180 m_xBtnHelp->connect_clicked( LINK( this, AnimationWindow, ClickHelpHdl ) );
181 m_xNumFldBitmap->connect_value_changed( LINK( this, AnimationWindow, ModifyBitmapHdl ) );
182 m_xTimeField->connect_value_changed( LINK( this, AnimationWindow, ModifyTimeHdl ) );
183
184 SetMinOutputSizePixel(GetOptimalSize());
185
186 ResetAttrs();
187
188 // the animator is empty; no animation group can be created
189 m_xBtnCreateGroup->set_sensitive(false);
190}
191
193{
194 disposeOnce();
195}
196
198{
199 pControllerItem.reset();
200
201 m_FrameList.clear();
203
204 // delete the clones
205 pMyDoc.reset();
206
207 m_xCtlDisplayWin.reset();
208 m_xCtlDisplay.reset();
209 m_xBtnFirst.reset();
210 m_xBtnReverse.reset();
211 m_xBtnStop.reset();
212 m_xBtnPlay.reset();
213 m_xBtnLast.reset();
214 m_xNumFldBitmap.reset();
215 m_xFormatter.reset();
216 m_xTimeField.reset();
217 m_xLbLoopCount.reset();
218 m_xBtnGetOneObject.reset();
219 m_xBtnGetAllObjects.reset();
220 m_xBtnRemoveBitmap.reset();
221 m_xBtnRemoveAll.reset();
222 m_xFiCount.reset();
223 m_xRbtGroup.reset();
224 m_xRbtBitmap.reset();
225 m_xFtAdjustment.reset();
226 m_xLbAdjustment.reset();
227 m_xBtnCreateGroup.reset();
228 m_xBtnHelp.reset();
230}
231
233{
234 m_nCurrentFrame = (m_FrameList.empty()) ? EMPTY_FRAMELIST : 0;
235 UpdateControl();
236}
237
239{
240 bMovie = false;
241}
242
243IMPL_LINK( AnimationWindow, ClickPlayHdl, weld::Button&, rButton, void )
244{
245 ScopeLockGuard aGuard( maPlayLock );
246
247 bMovie = true;
248 bool bDisableCtrls = false;
249 size_t const nCount = m_FrameList.size();
250 bool bReverse = &rButton == m_xBtnReverse.get();
251
252 // it is difficult to find it later on
253 bool bRbtGroupEnabled = m_xRbtGroup->get_sensitive();
254 bool bBtnGetAllObjectsEnabled = m_xBtnGetAllObjects->get_sensitive();
255 bool bBtnGetOneObjectEnabled = m_xBtnGetOneObject->get_sensitive();
256
257 // calculate overall time
258 ::tools::Time aTime( 0 );
259 ::tools::Long nFullTime;
260 if( m_xRbtBitmap->get_active() )
261 {
262 for (size_t i = 0; i < nCount; ++i)
263 {
264 aTime += m_FrameList[i].second;
265 }
266 nFullTime = aTime.GetMSFromTime();
267 }
268 else
269 {
270 nFullTime = nCount * 100;
271 aTime.MakeTimeFromMS( nFullTime );
272 }
273
274 // StatusBarManager from 1 second
275 std::unique_ptr<SfxProgress> pProgress;
276 if( nFullTime >= 1000 )
277 {
278 bDisableCtrls = true;
279 m_xBtnStop->set_sensitive(true);
280 pProgress.reset(new SfxProgress( nullptr, "Animator:", nFullTime )); // "Animator:" here we should think about something smart
281 }
282
283 sal_uLong nTmpTime = 0;
284 size_t i = 0;
285 bool bCount = i < nCount;
286 if( bReverse )
287 {
288 i = nCount - 1;
289 }
290 while( bCount && bMovie )
291 {
292 // make list and view consistent
293 assert(i < m_FrameList.size());
294 m_nCurrentFrame = i;
295
296 UpdateControl(bDisableCtrls);
297
298 if( m_xRbtBitmap->get_active() )
299 {
300 ::tools::Time const & rTime = m_FrameList[i].second;
301
302 m_xFormatter->SetTime( rTime );
303 sal_uLong nTime = rTime.GetMSFromTime();
304
305 WaitInEffect( nTime, nTmpTime, pProgress.get() );
306 nTmpTime += nTime;
307 }
308 else
309 {
310 WaitInEffect( 100, nTmpTime, pProgress.get() );
311 nTmpTime += 100;
312 }
313 if( bReverse )
314 {
315 if (i == 0)
316 {
317 // Terminate loop.
318 bCount = false;
319 }
320 else
321 {
322 --i;
323 }
324 }
325 else
326 {
327 i++;
328 if (i >= nCount)
329 {
330 // Terminate loop.
331 bCount = false;
332 // Move i back into valid range.
333 i = nCount - 1;
334 }
335 }
336 }
337
338 // to re-enable the controls
339 bMovie = false;
340 if (nCount > 0)
341 {
342 assert(i == m_nCurrentFrame);
343 UpdateControl();
344 }
345
346 if( pProgress )
347 {
348 pProgress.reset();
349 m_xBtnStop->set_sensitive(false);
350 }
351
352 m_xRbtGroup->set_sensitive( bRbtGroupEnabled );
353 m_xBtnGetAllObjects->set_sensitive( bBtnGetAllObjectsEnabled );
354 m_xBtnGetOneObject->set_sensitive( bBtnGetOneObjectEnabled );
355}
356
358{
359 m_nCurrentFrame =
360 (m_FrameList.empty()) ? EMPTY_FRAMELIST : m_FrameList.size() - 1 ;
361 UpdateControl();
362}
363
365{
366 if (m_FrameList.empty() || m_xRbtGroup->get_active())
367 {
368 m_xTimeField->set_text( OUString() );
369 m_xTimeField->set_sensitive( false );
370 m_xLbLoopCount->set_sensitive( false );
371 }
372 else if (m_xRbtBitmap->get_active())
373 {
374 sal_uLong n = m_xNumFldBitmap->get_value();
375 if( n > 0 )
376 {
377 ::tools::Time const & rTime = m_FrameList[n - 1].second;
378 m_xFormatter->SetTime( rTime );
379 m_xFormatter->ReFormat();
380 }
381 m_xTimeField->set_sensitive(true);
382 m_xLbLoopCount->set_sensitive(true);
383 }
384}
385
386IMPL_LINK(AnimationWindow, ClickHelpHdl, weld::Button&, rButton, void)
387{
388 if (Help* pHelp = Application::GetHelp())
389 pHelp->Start(m_xContainer->get_help_id(), &rButton);
390}
391
392IMPL_LINK( AnimationWindow, ClickGetObjectHdl, weld::Button&, rBtn, void )
393{
394 bAllObjects = &rBtn == m_xBtnGetAllObjects.get();
395
396 // Code now in AddObj()
397 SfxBoolItem aItem( SID_ANIMATOR_ADD, true );
398
400 SID_ANIMATOR_ADD, SfxCallMode::SLOT | SfxCallMode::RECORD, { &aItem });
401}
402
403IMPL_LINK( AnimationWindow, ClickRemoveBitmapHdl, weld::Button&, rBtn, void )
404{
405 SdPage* pPage = pMyDoc->GetSdPage(0, PageKind::Standard);
407
408 // tdf#95298 check m_nCurrentFrame for EMPTY_FRAMELIST to avoid out-of-bound array access
409 if (&rBtn == m_xBtnRemoveBitmap.get() && EMPTY_FRAMELIST != m_nCurrentFrame)
410 {
411 m_FrameList.erase(m_FrameList.begin() + m_nCurrentFrame);
412
413 pObject = pPage->GetObj(m_nCurrentFrame);
414 // Through acquisition of the AnimatedGIFs, objects does not need to
415 // exist.
416 if( pObject )
417 {
418 pObject = pPage->RemoveObject(m_nCurrentFrame);
419 DBG_ASSERT(pObject, "Clone not found during deletion");
420 pObject.clear();
421 pPage->RecalcObjOrdNums();
422 }
423
424 if (m_nCurrentFrame >= m_FrameList.size())
425 {
426 // tdf#95298 last frame was deleted, try to use the one before it or go on empty state
427 m_nCurrentFrame = m_FrameList.empty() ? EMPTY_FRAMELIST : m_FrameList.size() - 1;
428 }
429 }
430 else // delete everything
431 {
432 std::unique_ptr<weld::MessageDialog> xWarn(Application::CreateMessageDialog(GetFrameWeld(),
433 VclMessageType::Warning, VclButtonsType::YesNo,
434 SdResId(STR_ASK_DELETE_ALL_PICTURES)));
435 short nReturn = xWarn->run();
436
437 if( nReturn == RET_YES )
438 {
439 // clear frame list
440 for (size_t i = m_FrameList.size(); i > 0; )
441 {
442 --i;
443 pObject = pPage->GetObj( i );
444 if( pObject )
445 {
446 pObject = pPage->RemoveObject( i );
447 DBG_ASSERT(pObject, "Clone not found during deletion");
448 pObject.clear();
449 //pPage->RecalcObjOrdNums();
450 }
451 }
452 m_FrameList.clear();
453 m_nCurrentFrame = EMPTY_FRAMELIST;
454 }
455 }
456
457 // can we create an animation group
458 if (m_FrameList.empty())
459 {
460 m_xBtnCreateGroup->set_sensitive(false);
461 // if previous disabled by acquisition of AnimatedGIFs:
462 //m_xRbtBitmap->set_sensitive(true);
463 m_xRbtGroup->set_sensitive(true);
464 }
465
466 // calculate and set zoom for DisplayWin
467 Fraction aFrac(GetScale());
468 m_xCtlDisplay->SetScale(aFrac);
469
470 UpdateControl();
471}
472
473IMPL_LINK_NOARG(AnimationWindow, ClickCreateGroupHdl, weld::Button&, void)
474{
475 // Code now in CreatePresObj()
476 SfxBoolItem aItem( SID_ANIMATOR_CREATE, true );
477
478 GetBindings().GetDispatcher()->ExecuteList(SID_ANIMATOR_CREATE,
479 SfxCallMode::SLOT | SfxCallMode::RECORD, { &aItem });
480}
481
483{
484 sal_uLong nBmp = m_xNumFldBitmap->get_value();
485
486 if (nBmp > m_FrameList.size())
487 {
488 nBmp = m_FrameList.size();
489 }
490
491 m_nCurrentFrame = nBmp - 1;
492
493 UpdateControl();
494}
495
497{
498 sal_uLong nPos = m_xNumFldBitmap->get_value() - 1;
499
500 ::tools::Time & rTime = m_FrameList[nPos].second;
501
502 rTime = m_xFormatter->GetTime();
503}
504
505void AnimationWindow::UpdateControl(bool const bDisableCtrls)
506{
507 // tdf#95298 check m_nCurrentFrame for EMPTY_FRAMELIST to avoid out-of-bound array access
509 {
511
512 SdPage* pPage = pMyDoc->GetSdPage(0, PageKind::Standard);
513 SdrObject *const pObject = pPage->GetObj(m_nCurrentFrame);
514 if( pObject )
515 {
517 ::tools::Rectangle aObjRect( pObject->GetCurrentBoundRect() );
518 Size aObjSize( aObjRect.GetSize() );
519 Point aOrigin( -aObjRect.Left(), -aObjRect.Top() );
520 MapMode aMap( pVD->GetMapMode() );
521 aMap.SetMapUnit( MapUnit::Map100thMM );
522 aMap.SetOrigin( aOrigin );
523 pVD->SetMapMode( aMap );
524 pVD->SetOutputSize( aObjSize );
526 pVD->SetBackground( Wallpaper( rStyles.GetFieldColor() ) );
527 pVD->SetDrawMode( rStyles.GetHighContrastMode()
530 pVD->Erase();
531 pObject->SingleObjectPainter( *pVD );
532 aBmp = pVD->GetBitmapEx( aObjRect.TopLeft(), aObjSize );
533 }
534
535 m_xCtlDisplay->SetBitmapEx(&aBmp);
536 }
537 else
538 {
539 m_xCtlDisplay->SetBitmapEx(nullptr);
540 }
541
542 m_xCtlDisplay->Invalidate();
543
544 m_xFiCount->set_label(OUString::number(
545 m_FrameList.size()));
546
547 if (!m_FrameList.empty() && !bMovie)
548 {
549 size_t nIndex = m_nCurrentFrame + 1;
550 m_xNumFldBitmap->set_value(nIndex);
551
552 // if there is at least 1 object in the list
553 m_xBtnFirst->set_sensitive(true);
554 m_xBtnReverse->set_sensitive(true);
555 m_xBtnPlay->set_sensitive(true);
556 m_xBtnLast->set_sensitive(true);
557 m_xNumFldBitmap->set_sensitive(true);
558 m_xTimeField->set_sensitive(true);
559 m_xLbLoopCount->set_sensitive(true);
560 m_xBtnRemoveBitmap->set_sensitive(true);
561 m_xBtnRemoveAll->set_sensitive(true);
562 }
563 else
564 {
565 // if no object is in the list
566 m_xBtnFirst->set_sensitive( false );
567 m_xBtnReverse->set_sensitive( false );
568 m_xBtnPlay->set_sensitive( false );
569 m_xBtnLast->set_sensitive( false );
570 m_xNumFldBitmap->set_sensitive( false );
571 m_xTimeField->set_sensitive( false );
572 m_xLbLoopCount->set_sensitive( false );
573 m_xBtnRemoveBitmap->set_sensitive( false );
574 m_xBtnRemoveAll->set_sensitive( false );
575 }
576
577 if( bMovie && bDisableCtrls )
578 {
579 m_xBtnGetOneObject->set_sensitive( false );
580 m_xBtnGetAllObjects->set_sensitive( false );
581 m_xRbtGroup->set_sensitive( false );
582 m_xRbtBitmap->set_sensitive( false );
583 m_xBtnCreateGroup->set_sensitive( false );
584 m_xFtAdjustment->set_sensitive( false );
585 m_xLbAdjustment->set_sensitive( false );
586 }
587 else
588 {
589 // enable 'group object' only if it is not an Animated GIF
590 if (m_FrameList.empty())
591 {
592 m_xRbtGroup->set_sensitive(true);
593 }
594
595 m_xRbtBitmap->set_sensitive(true);
596 m_xBtnCreateGroup->set_sensitive(!m_FrameList.empty());
597 m_xFtAdjustment->set_sensitive(true);
598 m_xLbAdjustment->set_sensitive(true);
599 }
600
601 ClickRbtHdl(*m_xRbtGroup);
602}
603
605{
606 m_xRbtGroup->set_active(true);
607 m_xLbAdjustment->set_active( BA_CENTER );
608 // LoopCount
609 m_xLbLoopCount->set_active( m_xLbLoopCount->get_count() - 1);
610
612}
613
615 SfxProgress* pProgress ) const
616{
617 sal_uInt64 aEnd = ::tools::Time::GetSystemTicks() + nMilliSeconds;
618 sal_uInt64 aCurrent = ::tools::Time::GetSystemTicks();
619 while (aCurrent < aEnd)
620 {
622
623 if( pProgress )
624 pProgress->SetState( nTime + nMilliSeconds + aCurrent - aEnd );
625
627
628 if( !bMovie )
629 return;
630 }
631}
632
634{
635 Fraction aFrac;
636 size_t const nCount = m_FrameList.size();
637 if (nCount > 0)
638 {
639 Size aBmpSize(0, 0);
640 for (size_t i = 0; i < nCount; i++)
641 {
642 BitmapEx const & rBitmap = m_FrameList[i].first;
643 Size aTempSize( rBitmap.GetBitmap().GetSizePixel() );
644 aBmpSize.setWidth( std::max( aBmpSize.Width(), aTempSize.Width() ) );
645 aBmpSize.setHeight( std::max( aBmpSize.Height(), aTempSize.Height() ) );
646 }
647
648 aBmpSize.AdjustWidth(10 );
649 aBmpSize.AdjustHeight(10 );
650
651 Size aDisplaySize(m_xCtlDisplay->GetOutputSizePixel());
652
653 aFrac = Fraction( std::min( static_cast<double>(aDisplaySize.Width()) / static_cast<double>(aBmpSize.Width()),
654 static_cast<double>(aDisplaySize.Height()) / static_cast<double>(aBmpSize.Height()) ) );
655 }
656 return aFrac;
657}
658
660{
662 Fraction aFrac(GetScale());
663 m_xCtlDisplay->SetScale(aFrac);
664}
665
667{
668 if( maPlayLock.isLocked() )
669 {
670 return false;
671 }
672 else
673 {
674 SfxBoolItem aItem( SID_ANIMATION_OBJECTS, false );
675
677 SID_ANIMATION_OBJECTS, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD,
678 { &aItem });
679
681
682 return true;
683 }
684}
685
687{
688 // finish text entry mode to ensure that bitmap is identical with object
689 if( rView.IsTextEdit() )
690 rView.SdrEndTextEdit();
691
692 // clone object(s) and insert the clone(s) into the list
693 const SdrMarkList& rMarkList = rView.GetMarkedObjectList();
694 const size_t nMarkCount = rMarkList.GetMarkCount();
695 SdPage* pPage = pMyDoc->GetSdPage(0, PageKind::Standard);
696 const size_t nCloneCount = pPage->GetObjCount();
697
698 if (nMarkCount <= 0)
699 return;
700
701 // If it is ONE animation object or one group object, which was
702 // 'individually taken', we insert the objects separately
703 bool bAnimObj = false;
704 if( nMarkCount == 1 )
705 {
706 SdrMark* pMark = rMarkList.GetMark(0);
709 SdrInventor nInv = pObject->GetObjInventor();
710 SdrObjKind nId = pObject->GetObjIdentifier();
711
712 // Animated Bitmap (GIF)
713 if( nInv == SdrInventor::Default && nId == SdrObjKind::Graphic && static_cast<SdrGrafObj*>( pObject )->IsAnimated() )
714 {
715 const SdrGrafObj* pGrafObj = static_cast<SdrGrafObj*>(pObject);
716 Graphic aGraphic( pGrafObj->GetTransformedGraphic() );
717 sal_uInt16 nCount = 0;
718
719 if( aGraphic.IsAnimated() )
720 nCount = aGraphic.GetAnimation().Count();
721
722 if( nCount > 0 )
723 {
724 const Animation aAnimation( aGraphic.GetAnimation() );
725
726 for( sal_uInt16 i = 0; i < nCount; i++ )
727 {
728 const AnimationFrame& rAnimationFrame = aAnimation.Get( i );
729
730 // LoopCount
731 if( i == 0 )
732 {
733 sal_uInt32 nLoopCount = aAnimation.GetLoopCount();
734
735 if( !nLoopCount ) // endless
736 m_xLbLoopCount->set_active( m_xLbLoopCount->get_count() - 1);
737 else
738 m_xLbLoopCount->set_active_text(OUString::number( nLoopCount ) );
739 }
740
741 ::tools::Long nTime = rAnimationFrame.mnWait;
742 ::tools::Time aTime( 0, 0, nTime / 100, nTime % 100 );
743 size_t nIndex = m_nCurrentFrame + 1;
744 m_FrameList.insert(
745 m_FrameList.begin() + nIndex,
746 ::std::make_pair(rAnimationFrame.maBitmapEx, aTime));
747
748 // increment => next one inserted after this one
750 }
751 // if an animated GIF is taken, only such one can be created
752 m_xRbtBitmap->set_active(true);
753 m_xRbtGroup->set_sensitive( false );
754 bAnimObj = true;
755 }
756 }
757 else if( bAllObjects || ( pAnimInfo && pAnimInfo->mbIsMovie ) )
758 {
759 // several objects
760 SdrObjList* pObjList = static_cast<SdrObjGroup*>(pObject)->GetSubList();
761
762 for( size_t nObject = 0; nObject < pObjList->GetObjCount(); ++nObject )
763 {
764 SdrObject* pSnapShot(pObjList->GetObj(nObject));
765 BitmapEx aBitmapEx(SdrExchangeView::GetObjGraphic(*pSnapShot).GetBitmapEx());
766 size_t nIndex = m_nCurrentFrame + 1;
767 m_FrameList.insert(
768 m_FrameList.begin() + nIndex,
769 ::std::make_pair(aBitmapEx, m_xFormatter->GetTime()));
770
771 // increment => next one inserted after this one
773
774 // Clone
775 pPage->InsertObject(
776 pSnapShot->CloneSdrObject(pPage->getSdrModelFromSdrPage()).get(),
778 }
779 bAnimObj = true;
780 }
781 }
782 // also one single animated object
783 if( !bAnimObj && !( bAllObjects && nMarkCount > 1 ) )
784 {
785 BitmapEx aBitmapEx(rView.GetAllMarkedGraphic().GetBitmapEx());
786
787 ::tools::Time aTime( m_xFormatter->GetTime() );
788
789 size_t nIndex = m_nCurrentFrame + 1;
790 m_FrameList.insert(
791 m_FrameList.begin() + nIndex,
792 ::std::make_pair(aBitmapEx, aTime));
793 }
794
795 // one single object
796 if( nMarkCount == 1 && !bAnimObj )
797 {
798 SdrMark* pMark = rMarkList.GetMark(0);
800 rtl::Reference<SdrObject> pClone(pObject->CloneSdrObject(pPage->getSdrModelFromSdrPage()));
801 size_t nIndex = m_nCurrentFrame + 1;
802 pPage->InsertObject(pClone.get(), nIndex);
803 }
804 // several objects: group the clones
805 else if (nMarkCount > 1)
806 {
807 // take objects separately
808 if( bAllObjects )
809 {
810 for( size_t nObject= 0; nObject < nMarkCount; ++nObject )
811 {
812 // Clone
813 SdrObject* pObject(rMarkList.GetMark(nObject)->GetMarkedSdrObj());
815 size_t nIndex = m_nCurrentFrame + 1;
816 m_FrameList.insert(
817 m_FrameList.begin() + nIndex,
818 ::std::make_pair(aBitmapEx, m_xFormatter->GetTime()));
819
820 // increment => next one inserted after this one
822
823 pPage->InsertObject(
824 pObject->CloneSdrObject(pPage->getSdrModelFromSdrPage()).get(),
826 }
827 bAnimObj = true; // that we don't change again
828 }
829 else
830 {
832 SdrObjList* pObjList = pCloneGroup->GetSubList();
833
834 for (size_t nObject= 0; nObject < nMarkCount; ++nObject)
835 {
836 pObjList->InsertObject(
837 rMarkList.GetMark(nObject)->GetMarkedSdrObj()->CloneSdrObject(
838 pPage->getSdrModelFromSdrPage()).get());
839 }
840
841 size_t nIndex = m_nCurrentFrame + 1;
842 pPage->InsertObject(pCloneGroup.get(), nIndex);
843 }
844 }
845
846 if( !bAnimObj )
847 {
849 }
850
851 // if there was nothing in the animator before but now is something
852 // there, we can create an animation group
853 if (nCloneCount == 0 && !m_FrameList.empty())
854 {
855 m_xBtnCreateGroup->set_sensitive(true);
856 }
857
858 // calculate and set zoom for DisplayWin
859 Fraction aFrac( GetScale() );
860 m_xCtlDisplay->SetScale(aFrac);
861
863}
864
866{
867 vcl::Window* pOutWin = rView.GetFirstOutputDevice()->GetOwnerWindow(); // GetWin( 0 );
868 DBG_ASSERT( pOutWin, "Window does not exist!" );
869
870 // find window center
871 const MapMode aMap100( MapUnit::Map100thMM );
872 Size aMaxSizeLog;
873 Size aMaxSizePix;
874 Size aTemp( pOutWin->GetOutputSizePixel() );
875 const Point aWindowCenter( pOutWin->PixelToLogic( Point( aTemp.Width() >> 1, aTemp.Height() >> 1 ) ) );
877 const size_t nCount = m_FrameList.size();
878 BitmapAdjustment eBA = static_cast<BitmapAdjustment>(m_xLbAdjustment->get_active());
879
880 // find biggest bitmap
881 for (size_t i = 0; i < nCount; ++i)
882 {
883 const BitmapEx& rBmpEx = m_FrameList[i].first;
884 const Graphic aGraphic( rBmpEx );
885 Size aTmpSizeLog;
886 const Size aTmpSizePix( rBmpEx.GetSizePixel() );
887
888 if ( aGraphic.GetPrefMapMode().GetMapUnit() == MapUnit::MapPixel )
889 aTmpSizeLog = pDefDev->PixelToLogic( aGraphic.GetPrefSize(), aMap100 );
890 else
891 aTmpSizeLog = OutputDevice::LogicToLogic( aGraphic.GetPrefSize(), aGraphic.GetPrefMapMode(), aMap100 );
892
893 aMaxSizeLog.setWidth( std::max( aMaxSizeLog.Width(), aTmpSizeLog.Width() ) );
894 aMaxSizeLog.setHeight( std::max( aMaxSizeLog.Height(), aTmpSizeLog.Height() ) );
895
896 aMaxSizePix.setWidth( std::max( aMaxSizePix.Width(), aTmpSizePix.Width() ) );
897 aMaxSizePix.setHeight( std::max( aMaxSizePix.Height(), aTmpSizePix.Height() ) );
898 }
899
900 SdrPageView* pPV = rView.GetSdrPageView();
901
902 if( m_xRbtBitmap->get_active() )
903 {
904 // create bitmap group (Animated GIF)
905 Animation aAnimation;
906 Point aPt;
907
908 for (size_t i = 0; i < nCount; ++i)
909 {
910 ::tools::Time const & rTime = m_FrameList[i].second;
911 ::tools::Long nTime = rTime.GetNanoSec();
912 nTime += rTime.GetSec() * 100;
913
914 BitmapEx const & rBitmapEx = m_FrameList[i].first;
915
916 // calculate offset for the specified direction
917 const Size aBitmapSize( rBitmapEx.GetSizePixel() );
918
919 switch( eBA )
920 {
921 case BA_LEFT_UP:
922 break;
923
924 case BA_LEFT:
925 aPt.setY( (aMaxSizePix.Height() - aBitmapSize.Height()) >> 1 );
926 break;
927
928 case BA_LEFT_DOWN:
929 aPt.setY( aMaxSizePix.Height() - aBitmapSize.Height() );
930 break;
931
932 case BA_UP:
933 aPt.setX( (aMaxSizePix.Width() - aBitmapSize.Width()) >> 1 );
934 break;
935
936 case BA_CENTER:
937 aPt.setX( (aMaxSizePix.Width() - aBitmapSize.Width()) >> 1 );
938 aPt.setY( (aMaxSizePix.Height() - aBitmapSize.Height()) >> 1 );
939 break;
940
941 case BA_DOWN:
942 aPt.setX( (aMaxSizePix.Width() - aBitmapSize.Width()) >> 1 );
943 aPt.setY( aMaxSizePix.Height() - aBitmapSize.Height() );
944 break;
945
946 case BA_RIGHT_UP:
947 aPt.setX( aMaxSizePix.Width() - aBitmapSize.Width() );
948 break;
949
950 case BA_RIGHT:
951 aPt.setX( aMaxSizePix.Width() - aBitmapSize.Width() );
952 aPt.setY( (aMaxSizePix.Height() - aBitmapSize.Height()) >> 1 );
953 break;
954
955 case BA_RIGHT_DOWN:
956 aPt.setX( aMaxSizePix.Width() - aBitmapSize.Width() );
957 aPt.setY( aMaxSizePix.Height() - aBitmapSize.Height() );
958 break;
959
960 }
961
962 // find LoopCount (number of passes)
963 AnimationFrame aAnimationFrame;
964 sal_uInt32 nLoopCount = 0;
965 sal_Int32 nPos = m_xLbLoopCount->get_active();
966
967 if( nPos != -1 && nPos != m_xLbLoopCount->get_count() - 1 ) // endless
968 nLoopCount = m_xLbLoopCount->get_active_text().toUInt32();
969
970 aAnimationFrame.maBitmapEx = rBitmapEx;
971 aAnimationFrame.maPositionPixel = aPt;
972 aAnimationFrame.maSizePixel = aBitmapSize;
973 aAnimationFrame.mnWait = nTime;
974 aAnimationFrame.meDisposal = Disposal::Back;
975 aAnimationFrame.mbUserInput = false;
976
977 aAnimation.Insert( aAnimationFrame );
978 aAnimation.SetDisplaySizePixel( aMaxSizePix );
979 aAnimation.SetLoopCount( nLoopCount );
980 }
981
984 Graphic(aAnimation));
985 const Point aOrg( aWindowCenter.X() - ( aMaxSizeLog.Width() >> 1 ), aWindowCenter.Y() - ( aMaxSizeLog.Height() >> 1 ) );
986
987 pGrafObj->SetLogicRect( ::tools::Rectangle( aOrg, aMaxSizeLog ) );
988 rView.InsertObjectAtView( pGrafObj.get(), *pPV, SdrInsertFlags::SETDEFLAYER);
989 }
990 else
991 {
992 // calculate offset for the specified direction
993 Size aOffset;
994 SdrObject * pClone = nullptr;
995 SdPage* pPage = pMyDoc->GetSdPage(0, PageKind::Standard);
996
997 for (size_t i = 0; i < nCount; ++i)
998 {
999 pClone = pPage->GetObj(i);
1000 ::tools::Rectangle aRect( pClone->GetSnapRect() );
1001
1002 switch( eBA )
1003 {
1004 case BA_LEFT_UP:
1005 break;
1006
1007 case BA_LEFT:
1008 aOffset.setHeight( (aMaxSizeLog.Height() - aRect.GetHeight()) / 2 );
1009 break;
1010
1011 case BA_LEFT_DOWN:
1012 aOffset.setHeight( aMaxSizeLog.Height() - aRect.GetHeight() );
1013 break;
1014
1015 case BA_UP:
1016 aOffset.setWidth( (aMaxSizeLog.Width() - aRect.GetWidth()) / 2 );
1017 break;
1018
1019 case BA_CENTER:
1020 aOffset.setWidth( (aMaxSizeLog.Width() - aRect.GetWidth()) / 2 );
1021 aOffset.setHeight( (aMaxSizeLog.Height() - aRect.GetHeight()) / 2 );
1022 break;
1023
1024 case BA_DOWN:
1025 aOffset.setWidth( (aMaxSizeLog.Width() - aRect.GetWidth()) / 2 );
1026 aOffset.setHeight( aMaxSizeLog.Height() - aRect.GetHeight() );
1027 break;
1028
1029 case BA_RIGHT_UP:
1030 aOffset.setWidth( aMaxSizeLog.Width() - aRect.GetWidth() );
1031 break;
1032
1033 case BA_RIGHT:
1034 aOffset.setWidth( aMaxSizeLog.Width() - aRect.GetWidth() );
1035 aOffset.setHeight( (aMaxSizeLog.Height() - aRect.GetHeight()) / 2 );
1036 break;
1037
1038 case BA_RIGHT_DOWN:
1039 aOffset.setWidth( aMaxSizeLog.Width() - aRect.GetWidth() );
1040 aOffset.setHeight( aMaxSizeLog.Height() - aRect.GetHeight() );
1041 break;
1042
1043 }
1044 // Unfortunately, SetSnapRect is not implemented for ellipses !!!
1045 Point aMovePt( aWindowCenter + Point( aOffset.Width(), aOffset.Height() ) - aRect.TopLeft() );
1046 Size aMoveSize( aMovePt.X(), aMovePt.Y() );
1047 pClone->NbcMove( aMoveSize );
1048 }
1049
1050 // #i42894# Caution(!) variable pPage looks right, but it is a page from the local
1051 // document the dialog is using (!), so get the target page from the target view
1052 SdPage* pTargetSdPage = dynamic_cast< SdPage* >(rView.GetSdrPageView() ? rView.GetSdrPageView()->GetPage() : nullptr);
1053
1054 if(pTargetSdPage)
1055 {
1056 // create animation group
1058 SdrObjList* pObjList = pGroup->GetSubList();
1059
1060 for (size_t i = 0; i < nCount; ++i)
1061 {
1062 // the clone remains in the animation; we insert a clone of the
1063 // clone into the group
1064 pClone = pPage->GetObj(i);
1065 rtl::Reference<SdrObject> pCloneOfClone(pClone->CloneSdrObject(pTargetSdPage->getSdrModelFromSdrPage()));
1066 //SdrObject* pCloneOfClone = pPage->GetObj(i)->Clone();
1067 pObjList->InsertObject(pCloneOfClone.get());
1068 }
1069
1070 // until now the top left corner of the group is in the window center;
1071 // correct the position by half of the size of the group
1072 aTemp = aMaxSizeLog;
1073 aTemp.setHeight( - aTemp.Height() / 2 );
1074 aTemp.setWidth( - aTemp.Width() / 2 );
1075 pGroup->NbcMove(aTemp);
1076
1077 // #i42894# create needed SMIL stuff and move child objects to page directly (see
1078 // comments at EffectMigration::CreateAnimatedGroup why this has to be done).
1079 EffectMigration::CreateAnimatedGroup(*pGroup, *pTargetSdPage);
1080 }
1081 }
1082
1083 ClickFirstHdl(*m_xBtnFirst);
1084}
1085
1087{
1088 SfxDockingWindow::DataChanged( rDCEvt );
1089
1090 if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) )
1091 {
1092 UpdateControl();
1093 }
1094}
1095
1100 sal_uInt16 _nId,
1101 AnimationWindow* pAnimWin,
1102 SfxBindings* _pBindings)
1103 : SfxControllerItem( _nId, *_pBindings ),
1104 pAnimationWin( pAnimWin )
1105{
1106}
1107
1109 SfxItemState eState, const SfxPoolItem* pItem )
1110{
1111 if( eState >= SfxItemState::DEFAULT && nSId == SID_ANIMATOR_STATE )
1112 {
1113 const SfxUInt16Item* pStateItem = dynamic_cast< const SfxUInt16Item*>( pItem );
1114 assert(pStateItem); //SfxUInt16Item expected
1115 if (pStateItem)
1116 {
1117 sal_uInt16 nState = pStateItem->GetValue();
1118 pAnimationWin->m_xBtnGetOneObject->set_sensitive( nState & 1 );
1119 pAnimationWin->m_xBtnGetAllObjects->set_sensitive( nState & 2 );
1120 }
1121 }
1122}
1123
1124} // end of namespace sd
1125
1126/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const StyleSettings & GetStyleSettings() const
size_t Count() const
void SetLoopCount(const sal_uInt32 nLoopCount)
const AnimationFrame & Get(sal_uInt16 nAnimation) const
sal_uInt32 GetLoopCount() const
void SetDisplaySizePixel(const Size &rSize)
bool Insert(const AnimationFrame &rAnimationFrame)
static OutputDevice * GetDefaultDevice()
static const AllSettings & GetSettings()
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, const ILibreOfficeKitNotifier *pNotifier=nullptr)
static bool Reschedule(bool bHandleAllCurrentEvents=false)
static Help * GetHelp()
bool Erase(const Color &rFillColor)
Bitmap GetBitmap(Color aTransparentReplaceColor) const
void Draw(OutputDevice *pOutDev, const Point &rDestPt) const
const Size & GetSizePixel() const
Size GetSizePixel() const
sal_uInt16 GetValue() const
DataChangedEventType GetType() const
AllSettingsFlags GetFlags() const
virtual void InsertObject(SdrObject *pObj, size_t nPos=SAL_MAX_SIZE) override
Size GetPrefSize() const
Animation GetAnimation() const
bool IsAnimated() const
BitmapEx GetBitmapEx(const GraphicConversionParameters &rParameters=GraphicConversionParameters()) const
MapMode GetPrefMapMode() const
MapUnit GetMapUnit() const
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
SAL_WARN_UNUSED_RESULT Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
void SetMapMode()
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
void SetBackground()
virtual vcl::Window * GetOwnerWindow() const
constexpr tools::Long Y() const
void setX(tools::Long nX)
void setY(tools::Long nY)
constexpr tools::Long X() const
bool mbIsMovie
if group object than it is a sequence of them.
Definition: anminfo.hxx:41
static SAL_DLLPRIVATE SdAnimationInfo * GetAnimationInfo(SdrObject *pObject)
deprecated
Definition: drawdoc2.cxx:950
virtual rtl::Reference< SdrObject > RemoveObject(size_t nObjNum) override
Definition: sdpage.cxx:1706
bool InsertObjectAtView(SdrObject *pObj, SdrPageView &rPV, SdrInsertFlags nOptions=SdrInsertFlags::NONE)
Graphic GetAllMarkedGraphic() const
static Graphic GetObjGraphic(const SdrObject &rSdrObject, bool bSVG=false)
Graphic GetTransformedGraphic(SdrGrafObjTransformsAttrs nTransformFlags=SdrGrafObjTransformsAttrs::ALL) const
size_t GetMarkCount() const
SdrMark * GetMark(size_t nNum) const
const SdrMarkList & GetMarkedObjectList() const
SdrObject * GetMarkedSdrObj() const
virtual bool IsTextEdit() const final override
virtual void InsertObject(SdrObject *pObj, size_t nPos=SAL_MAX_SIZE)
SdrObject * GetObj(size_t nNum) const
size_t GetObjCount() const
void RecalcObjOrdNums()
virtual const tools::Rectangle & GetSnapRect() const
virtual rtl::Reference< SdrObject > CloneSdrObject(SdrModel &rTargetModel) const=0
virtual void NbcMove(const Size &rSiz)
SdrPage * GetPage() const
SdrModel & getSdrModelFromSdrPage() const
OutputDevice * GetFirstOutputDevice() const
SdrModel & getSdrModelFromSdrView() const
SdrPageView * GetSdrPageView() const
SfxDispatcher * GetDispatcher() const
const SfxPoolItem * ExecuteList(sal_uInt16 nSlot, SfxCallMode nCall, std::initializer_list< SfxPoolItem const * > args, std::initializer_list< SfxPoolItem const * > internalargs=std::initializer_list< SfxPoolItem const * >())
virtual void Resize() override
SfxBindings & GetBindings() const
virtual bool Close() override
virtual void dispose() override
void SetMinOutputSizePixel(const Size &rSize)
void SetState(sal_uInt32 nVal, sal_uInt32 nNewRange=0)
constexpr tools::Long Height() const
tools::Long AdjustHeight(tools::Long n)
void setWidth(tools::Long nWidth)
tools::Long AdjustWidth(tools::Long n)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
bool GetHighContrastMode() const
const Color & GetFieldColor() const
AnimationControllerItem(sal_uInt16, AnimationWindow *, SfxBindings *)
ControllerItem for Animator.
Definition: animobjs.cxx:1099
virtual void StateChangedAtToolBoxControl(sal_uInt16 nSId, SfxItemState eState, const SfxPoolItem *pState) override
Definition: animobjs.cxx:1108
VclPtr< AnimationWindow > pAnimationWin
Definition: animobjs.hxx:158
std::unique_ptr< weld::RadioButton > m_xRbtBitmap
Definition: animobjs.hxx:108
std::unique_ptr< weld::ComboBox > m_xLbLoopCount
Definition: animobjs.hxx:100
void WaitInEffect(sal_uLong nMilliSeconds, sal_uLong nTime, SfxProgress *pStbMgr) const
Definition: animobjs.cxx:614
virtual bool Close() override
Definition: animobjs.cxx:666
void CreateAnimObj(::sd::View &rView)
Definition: animobjs.cxx:865
std::unique_ptr< weld::Button > m_xBtnStop
Definition: animobjs.hxx:94
std::unique_ptr< weld::Button > m_xBtnRemoveAll
Definition: animobjs.hxx:104
std::unique_ptr< AnimationControllerItem > pControllerItem
Definition: animobjs.hxx:122
virtual void Resize() override
Definition: animobjs.cxx:659
void UpdateControl(bool bDisableCtrls=false)
Definition: animobjs.cxx:505
std::unique_ptr< weld::SpinButton > m_xNumFldBitmap
Definition: animobjs.hxx:97
friend class AnimationControllerItem
Definition: animobjs.hxx:73
std::unique_ptr< weld::ComboBox > m_xLbAdjustment
Definition: animobjs.hxx:110
std::unique_ptr< SdDrawDocument > pMyDoc
Definition: animobjs.hxx:117
std::unique_ptr< weld::Button > m_xBtnFirst
Definition: animobjs.hxx:92
std::unique_ptr< SdDisplay > m_xCtlDisplay
Definition: animobjs.hxx:90
std::unique_ptr< weld::RadioButton > m_xRbtGroup
Definition: animobjs.hxx:107
std::unique_ptr< weld::Button > m_xBtnRemoveBitmap
Definition: animobjs.hxx:103
std::unique_ptr< weld::TimeFormatter > m_xFormatter
Definition: animobjs.hxx:99
std::unique_ptr< weld::Button > m_xBtnReverse
Definition: animobjs.hxx:93
std::unique_ptr< weld::Label > m_xFiCount
Definition: animobjs.hxx:105
virtual void dispose() override
Definition: animobjs.cxx:197
::std::vector< ::std::pair< BitmapEx, ::tools::Time > > m_FrameList
Definition: animobjs.hxx:114
virtual void DataChanged(const DataChangedEvent &rDCEvt) override
Definition: animobjs.cxx:1086
void AddObj(::sd::View &rView)
Definition: animobjs.cxx:686
std::unique_ptr< weld::FormattedSpinButton > m_xTimeField
Definition: animobjs.hxx:98
std::unique_ptr< weld::Button > m_xBtnPlay
Definition: animobjs.hxx:95
std::unique_ptr< weld::Button > m_xBtnGetAllObjects
Definition: animobjs.hxx:102
AnimationWindow(SfxBindings *pBindings, SfxChildWindow *pCW, vcl::Window *pParent)
AnimationWindow - FloatingWindow.
Definition: animobjs.cxx:124
std::unique_ptr< weld::Button > m_xBtnCreateGroup
Definition: animobjs.hxx:111
std::unique_ptr< weld::Button > m_xBtnGetOneObject
Definition: animobjs.hxx:101
virtual ~AnimationWindow() override
Definition: animobjs.cxx:192
std::unique_ptr< weld::Button > m_xBtnLast
Definition: animobjs.hxx:96
ScopeLock maPlayLock
Definition: animobjs.hxx:124
Fraction GetScale()
Definition: animobjs.cxx:633
std::unique_ptr< weld::Label > m_xFtAdjustment
Definition: animobjs.hxx:109
static const size_t EMPTY_FRAMELIST
Definition: animobjs.hxx:115
std::unique_ptr< weld::CustomWeld > m_xCtlDisplayWin
Definition: animobjs.hxx:91
std::unique_ptr< weld::Button > m_xBtnHelp
Definition: animobjs.hxx:112
static void CreateAnimatedGroup(SdrObjGroup const &rGroupObj, SdPage &rPage)
bool isLocked() const
Definition: scopelock.hxx:32
void SetBitmapEx(BitmapEx const *pBmpEx)
Definition: animobjs.cxx:66
void SetScale(const Fraction &rFrac)
Definition: animobjs.cxx:106
SdDisplay()
SdDisplay - Control.
Definition: animobjs.cxx:57
virtual ~SdDisplay() override
Definition: animobjs.cxx:62
virtual void Paint(vcl::RenderContext &rRenderContext, const ::tools::Rectangle &rRect) override
Definition: animobjs.cxx:80
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
Definition: animobjs.cxx:111
BitmapEx aBitmapEx
Definition: animobjs.hxx:55
Fraction aScale
Definition: animobjs.hxx:56
virtual SdrEndTextEditKind SdrEndTextEdit(bool bDontDeleteReally=false) override
ends current text editing
Definition: sdview.cxx:772
constexpr tools::Long GetWidth() const
constexpr tools::Long Top() const
constexpr Point TopLeft() const
constexpr Size GetSize() const
constexpr tools::Long GetHeight() const
constexpr tools::Long Left() const
sal_uInt16 GetSec() const
sal_Int64 GetTime() const
sal_Int32 GetMSFromTime() const
static sal_uInt64 GetSystemTicks()
sal_uInt32 GetNanoSec() const
void SetTime(sal_Int64 nNewTime)
void MakeTimeFromMS(sal_Int32 nMS)
Point PixelToLogic(const Point &rDevicePt) const
Size GetOutputSizePixel() const
void SetOutputSizePixel(const Size &rSize)
Size const & GetOutputSizePixel() const
virtual OutputDevice & get_ref_device()=0
virtual void set_size_request(int nWidth, int nHeight)=0
int nCount
#define DBG_ASSERT(sCon, aError)
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
virtual void SetText(const OUString &rStr) override
virtual SfxBindings & GetBindings() override
EmbeddedObjectRef * pObject
sal_Int32 nState
sal_Int32 nIndex
sal_Int64 n
sal_uInt16 nPos
int i
constexpr OUStringLiteral first
const DrawModeFlags OUTPUT_DRAWMODE_CONTRAST
Definition: ViewShell.hxx:72
IMPL_LINK_NOARG(MainSequence, onTimerHdl, Timer *, void)
BitmapAdjustment
Definition: animobjs.hxx:40
@ BA_LEFT
Definition: animobjs.hxx:42
@ BA_UP
Definition: animobjs.hxx:44
@ BA_RIGHT_DOWN
Definition: animobjs.hxx:49
@ BA_RIGHT
Definition: animobjs.hxx:48
@ BA_RIGHT_UP
Definition: animobjs.hxx:47
@ BA_LEFT_DOWN
Definition: animobjs.hxx:43
@ BA_DOWN
Definition: animobjs.hxx:46
@ BA_CENTER
Definition: animobjs.hxx:45
@ BA_LEFT_UP
Definition: animobjs.hxx:41
IMPL_LINK(SdCharHeightPropertyBox, implMenuSelectHdl, const OUString &, rIdent, void)
const DrawModeFlags OUTPUT_DRAWMODE_COLOR
Definition: ViewShell.hxx:62
long Long
HashMap_OWString_Interface aMap
Reference< XNameAccess > m_xContainer
sal_Int16 nId
SfxItemState
OUString SdResId(TranslateId aId)
Definition: sdmod.cxx:83
sal_uIntPtr sal_uLong
tools::Long mnWait
Point maPositionPixel
BitmapEx maBitmapEx
Disposal meDisposal
SdrInventor
SdrObjKind
RET_YES