LCOV - code coverage report
Current view: top level - sd/source/ui/func - fuoaprms.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 440 0.0 %
Date: 2012-08-25 Functions: 0 8 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 824 0.0 %

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : 
      29                 :            : #include "fuoaprms.hxx"
      30                 :            : 
      31                 :            : #include "sdattr.hxx"
      32                 :            : #include <svx/svdpagv.hxx>
      33                 :            : #include <editeng/colritem.hxx>
      34                 :            : #include <svx/svdundo.hxx>
      35                 :            : #include <vcl/group.hxx>
      36                 :            : #include <vcl/fixed.hxx>
      37                 :            : #include <sfx2/objsh.hxx>
      38                 :            : #include <sfx2/request.hxx>
      39                 :            : #include <sfx2/viewfrm.hxx>
      40                 :            : #include <vcl/msgbox.hxx>
      41                 :            : #include <svl/aeitem.hxx>
      42                 :            : #include "svx/xtable.hxx"
      43                 :            : 
      44                 :            : #include "strings.hrc"
      45                 :            : #include "glob.hrc"
      46                 :            : #include "drawdoc.hxx"
      47                 :            : #include "ViewShell.hxx"
      48                 :            : #include "anminfo.hxx"
      49                 :            : #include "unoaprms.hxx"                 // Undo-Action
      50                 :            : #include "sdundogr.hxx"                 // Undo Group
      51                 :            : #include "View.hxx"
      52                 :            : #include "sdabstdlg.hxx"
      53                 :            : #include "sdresid.hxx"
      54                 :            : #include <tools/helpers.hxx>
      55                 :            : #include <basegfx/polygon/b2dpolygon.hxx>
      56                 :            : 
      57                 :            : using namespace ::com::sun::star;
      58                 :            : 
      59                 :            : namespace sd {
      60                 :            : 
      61 [ #  # ][ #  # ]:          0 : TYPEINIT1( FuObjectAnimationParameters, FuPoor );
      62                 :            : 
      63                 :            : #define ATTR_MISSING    0       // Attribut nicht verfuegbar
      64                 :            : #define ATTR_MIXED      1       // Attribut uneindeutig (bei Mehrfachselektion)
      65                 :            : #define ATTR_SET        2       // Attribut eindeutig
      66                 :            : 
      67                 :            : /*************************************************************************
      68                 :            : |*
      69                 :            : |* Konstruktor
      70                 :            : |*
      71                 :            : \************************************************************************/
      72                 :            : 
      73                 :          0 : FuObjectAnimationParameters::FuObjectAnimationParameters (
      74                 :            :     ViewShell*   pViewSh,
      75                 :            :     ::sd::Window*        pWin,
      76                 :            :     ::sd::View*      pView,
      77                 :            :     SdDrawDocument* pDoc,
      78                 :            :     SfxRequest&  rReq)
      79                 :          0 :     : FuPoor(pViewSh, pWin, pView, pDoc, rReq)
      80                 :            : {
      81                 :          0 : }
      82                 :            : 
      83                 :          0 : FunctionReference FuObjectAnimationParameters::Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq )
      84                 :            : {
      85 [ #  # ][ #  # ]:          0 :     FunctionReference xFunc( new FuObjectAnimationParameters( pViewSh, pWin, pView, pDoc, rReq ) );
      86         [ #  # ]:          0 :     xFunc->DoExecute(rReq);
      87                 :          0 :     return xFunc;
      88                 :            : }
      89                 :            : 
      90                 :          0 : void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq )
      91                 :            : {
      92 [ #  # ][ #  # ]:          0 :     ::svl::IUndoManager* pUndoMgr = mpViewShell->GetViewFrame()->GetObjectShell()->GetUndoManager();
                 [ #  # ]
      93                 :            : 
      94                 :          0 :     const SdrMarkList& rMarkList  = mpView->GetMarkedObjectList();
      95                 :          0 :     sal_uLong        nCount     = rMarkList.GetMarkCount();
      96                 :          0 :     sal_uLong        nObject    = 0;
      97                 :            : 
      98                 :          0 :     short nAnimationSet     = ATTR_MISSING;
      99                 :          0 :     short nEffectSet        = ATTR_MISSING;
     100                 :          0 :     short nTextEffectSet    = ATTR_MISSING;
     101                 :          0 :     short nSpeedSet         = ATTR_MISSING;
     102                 :          0 :     short nFadeColorSet     = ATTR_MISSING;
     103                 :          0 :     short nFadeOutSet       = ATTR_MISSING;
     104                 :          0 :     short nInvisibleSet     = ATTR_MISSING;
     105                 :          0 :     short nSoundOnSet       = ATTR_MISSING;
     106                 :          0 :     short nSoundFileSet     = ATTR_MISSING;
     107                 :          0 :     short nPlayFullSet      = ATTR_MISSING;
     108                 :          0 :     short nClickActionSet   = ATTR_MISSING;
     109                 :          0 :     short nBookmarkSet      = ATTR_MISSING;
     110                 :            : 
     111                 :          0 :     short nSecondEffectSet      = ATTR_MISSING;
     112                 :          0 :     short nSecondSpeedSet       = ATTR_MISSING;
     113                 :          0 :     short nSecondSoundOnSet     = ATTR_MISSING;
     114                 :          0 :     short nSecondPlayFullSet    = ATTR_MISSING;
     115                 :            : 
     116                 :            :     // defaults (for Undo-Action)
     117                 :          0 :     presentation::AnimationEffect eEffect         = presentation::AnimationEffect_NONE;
     118                 :          0 :     presentation::AnimationEffect eTextEffect     = presentation::AnimationEffect_NONE;
     119                 :          0 :     presentation::AnimationSpeed  eSpeed          = presentation::AnimationSpeed_MEDIUM;
     120                 :          0 :     sal_Bool            bActive         = sal_False;
     121                 :          0 :     sal_Bool            bFadeOut        = sal_False;
     122                 :          0 :     Color           aFadeColor      = COL_LIGHTGRAY;
     123                 :          0 :     sal_Bool            bInvisible      = sal_False;
     124                 :          0 :     sal_Bool            bSoundOn        = sal_False;
     125         [ #  # ]:          0 :     String          aSound;
     126                 :          0 :     sal_Bool            bPlayFull       = sal_False;
     127                 :          0 :     presentation::ClickAction     eClickAction    = presentation::ClickAction_NONE;
     128         [ #  # ]:          0 :     String          aBookmark;
     129                 :            : 
     130                 :          0 :     presentation::AnimationEffect eSecondEffect   = presentation::AnimationEffect_NONE;
     131                 :          0 :     presentation::AnimationSpeed  eSecondSpeed    = presentation::AnimationSpeed_MEDIUM;
     132                 :          0 :     sal_Bool            bSecondSoundOn  = sal_False;
     133                 :          0 :     sal_Bool            bSecondPlayFull = sal_False;
     134                 :            : 
     135                 :            : 
     136                 :            :     SdAnimationInfo* pInfo;
     137                 :            :     SdrMark* pMark;
     138                 :            : 
     139                 :            :     // das erste Objekt untersuchen
     140         [ #  # ]:          0 :     pMark = rMarkList.GetMark(0);
     141 [ #  # ][ #  # ]:          0 :     pInfo = mpDoc->GetAnimationInfo(pMark->GetMarkedSdrObj());
     142         [ #  # ]:          0 :     if( pInfo )
     143                 :            :     {
     144                 :          0 :         bActive             = pInfo->mbActive;
     145                 :          0 :         nAnimationSet       = ATTR_SET;
     146                 :            : 
     147                 :          0 :         eEffect             = pInfo->meEffect;
     148                 :          0 :         nEffectSet          = ATTR_SET;
     149                 :            : 
     150                 :          0 :         eTextEffect         = pInfo->meTextEffect;
     151                 :          0 :         nTextEffectSet      = ATTR_SET;
     152                 :            : 
     153                 :          0 :         eSpeed              = pInfo->meSpeed;
     154                 :          0 :         nSpeedSet           = ATTR_SET;
     155                 :            : 
     156                 :          0 :         bFadeOut            = pInfo->mbDimPrevious;
     157                 :          0 :         nFadeOutSet         = ATTR_SET;
     158                 :            : 
     159                 :          0 :         aFadeColor          = pInfo->maDimColor;
     160                 :          0 :         nFadeColorSet       = ATTR_SET;
     161                 :            : 
     162                 :          0 :         bInvisible          = pInfo->mbDimHide;
     163                 :          0 :         nInvisibleSet       = ATTR_SET;
     164                 :            : 
     165                 :          0 :         bSoundOn            = pInfo->mbSoundOn;
     166                 :          0 :         nSoundOnSet         = ATTR_SET;
     167                 :            : 
     168         [ #  # ]:          0 :         aSound              = pInfo->maSoundFile;
     169                 :          0 :         nSoundFileSet       = ATTR_SET;
     170                 :            : 
     171                 :          0 :         bPlayFull           = pInfo->mbPlayFull;
     172                 :          0 :         nPlayFullSet        = ATTR_SET;
     173                 :            : 
     174                 :          0 :         eClickAction        = pInfo->meClickAction;
     175                 :          0 :         nClickActionSet     = ATTR_SET;
     176                 :            : 
     177 [ #  # ][ #  # ]:          0 :         aBookmark           = pInfo->GetBookmark();
                 [ #  # ]
     178                 :          0 :         nBookmarkSet        = ATTR_SET;
     179                 :            : 
     180                 :          0 :         eSecondEffect       = pInfo->meSecondEffect;
     181                 :          0 :         nSecondEffectSet    = ATTR_SET;
     182                 :            : 
     183                 :          0 :         eSecondSpeed        = pInfo->meSecondSpeed;
     184                 :          0 :         nSecondSpeedSet     = ATTR_SET;
     185                 :            : 
     186                 :          0 :         bSecondSoundOn      = pInfo->mbSecondSoundOn;
     187                 :          0 :         nSecondSoundOnSet   = ATTR_SET;
     188                 :            : 
     189                 :          0 :         bSecondPlayFull     = pInfo->mbSecondPlayFull;
     190                 :          0 :         nSecondPlayFullSet  = ATTR_SET;
     191                 :            :     }
     192                 :            : 
     193                 :            :     // ggfs. weitere Objekte untersuchen
     194         [ #  # ]:          0 :     for( nObject = 1; nObject < nCount; nObject++ )
     195                 :            :     {
     196         [ #  # ]:          0 :         pMark = rMarkList.GetMark( nObject );
     197         [ #  # ]:          0 :         SdrObject* pObject = pMark->GetMarkedSdrObj();
     198         [ #  # ]:          0 :         pInfo = mpDoc->GetAnimationInfo(pObject);
     199         [ #  # ]:          0 :         if( pInfo )
     200                 :            :         {
     201         [ #  # ]:          0 :             if( bActive != pInfo->mbActive )
     202                 :          0 :                 nAnimationSet = ATTR_MIXED;
     203                 :            : 
     204         [ #  # ]:          0 :             if( eEffect != pInfo->meEffect )
     205                 :          0 :                 nEffectSet = ATTR_MIXED;
     206                 :            : 
     207         [ #  # ]:          0 :             if( eTextEffect != pInfo->meTextEffect )
     208                 :          0 :                 nTextEffectSet = ATTR_MIXED;
     209                 :            : 
     210         [ #  # ]:          0 :             if( eSpeed != pInfo->meSpeed )
     211                 :          0 :                 nSpeedSet = ATTR_MIXED;
     212                 :            : 
     213         [ #  # ]:          0 :             if( bFadeOut != pInfo->mbDimPrevious )
     214                 :          0 :                 nFadeOutSet = ATTR_MIXED;
     215                 :            : 
     216         [ #  # ]:          0 :             if( aFadeColor != pInfo->maDimColor )
     217                 :          0 :                 nFadeColorSet = ATTR_MIXED;
     218                 :            : 
     219         [ #  # ]:          0 :             if( bInvisible != pInfo->mbDimHide )
     220                 :          0 :                 nInvisibleSet = ATTR_MIXED;
     221                 :            : 
     222         [ #  # ]:          0 :             if( bSoundOn != pInfo->mbSoundOn )
     223                 :          0 :                 nSoundOnSet = ATTR_MIXED;
     224                 :            : 
     225 [ #  # ][ #  # ]:          0 :             if( aSound != pInfo->maSoundFile )
     226                 :          0 :                 nSoundFileSet = ATTR_MIXED;
     227                 :            : 
     228         [ #  # ]:          0 :             if( bPlayFull != pInfo->mbPlayFull )
     229                 :          0 :                 nPlayFullSet = ATTR_MIXED;
     230                 :            : 
     231         [ #  # ]:          0 :             if( eClickAction != pInfo->meClickAction )
     232                 :          0 :                 nClickActionSet = ATTR_MIXED;
     233                 :            : 
     234 [ #  # ][ #  # ]:          0 :             if( aBookmark != pInfo->GetBookmark() )
         [ #  # ][ #  # ]
     235                 :          0 :                 nBookmarkSet = ATTR_MIXED;
     236                 :            : 
     237         [ #  # ]:          0 :             if( eSecondEffect != pInfo->meSecondEffect )
     238                 :          0 :                 nSecondEffectSet = ATTR_MIXED;
     239                 :            : 
     240         [ #  # ]:          0 :             if( eSecondSpeed != pInfo->meSecondSpeed )
     241                 :          0 :                 nSecondSpeedSet = ATTR_MIXED;
     242                 :            : 
     243         [ #  # ]:          0 :             if( bSecondSoundOn != pInfo->mbSecondSoundOn )
     244                 :          0 :                 nSecondSoundOnSet = ATTR_MIXED;
     245                 :            : 
     246         [ #  # ]:          0 :             if( bSecondPlayFull != pInfo->mbSecondPlayFull )
     247                 :          0 :                 nSecondPlayFullSet = ATTR_MIXED;
     248                 :            :         }
     249                 :            :         else
     250                 :            :         {
     251 [ #  # ][ #  # ]:          0 :             if (nAnimationSet == ATTR_SET && bActive == sal_True)
     252                 :          0 :                 nAnimationSet = ATTR_MIXED;
     253                 :            : 
     254 [ #  # ][ #  # ]:          0 :             if (nEffectSet == ATTR_SET && eEffect != presentation::AnimationEffect_NONE)
     255                 :          0 :                 nEffectSet = ATTR_MIXED;
     256                 :            : 
     257 [ #  # ][ #  # ]:          0 :             if (nTextEffectSet == ATTR_SET && eTextEffect != presentation::AnimationEffect_NONE)
     258                 :          0 :                 nTextEffectSet = ATTR_MIXED;
     259                 :            : 
     260         [ #  # ]:          0 :             if (nSpeedSet == ATTR_SET)
     261                 :          0 :                 nSpeedSet = ATTR_MIXED;
     262                 :            : 
     263 [ #  # ][ #  # ]:          0 :             if (nFadeOutSet == ATTR_SET && bFadeOut == sal_True)
     264                 :          0 :                 nFadeOutSet = ATTR_MIXED;
     265                 :            : 
     266         [ #  # ]:          0 :             if (nFadeColorSet == ATTR_SET)
     267                 :          0 :                 nFadeColorSet = ATTR_MIXED;
     268                 :            : 
     269 [ #  # ][ #  # ]:          0 :             if (nInvisibleSet == ATTR_SET && bInvisible == sal_True)
     270                 :          0 :                 nInvisibleSet = ATTR_MIXED;
     271                 :            : 
     272 [ #  # ][ #  # ]:          0 :             if (nSoundOnSet == ATTR_SET && bSoundOn == sal_True)
     273                 :          0 :                 nSoundOnSet = ATTR_MIXED;
     274                 :            : 
     275         [ #  # ]:          0 :             if (nSoundFileSet == ATTR_SET)
     276                 :          0 :                 nSoundFileSet = ATTR_MIXED;
     277                 :            : 
     278 [ #  # ][ #  # ]:          0 :             if (nPlayFullSet == ATTR_SET && bPlayFull == sal_True)
     279                 :          0 :                 nPlayFullSet = ATTR_MIXED;
     280                 :            : 
     281 [ #  # ][ #  # ]:          0 :             if (nClickActionSet == ATTR_SET && eClickAction != presentation::ClickAction_NONE)
     282                 :          0 :                 nClickActionSet = ATTR_MIXED;
     283                 :            : 
     284         [ #  # ]:          0 :             if (nBookmarkSet == ATTR_SET)
     285                 :          0 :                 nBookmarkSet = ATTR_MIXED;
     286                 :            : 
     287 [ #  # ][ #  # ]:          0 :             if (nSecondEffectSet == ATTR_SET && eSecondEffect != presentation::AnimationEffect_NONE)
     288                 :          0 :                 nSecondEffectSet = ATTR_MIXED;
     289                 :            : 
     290         [ #  # ]:          0 :             if (nSecondSpeedSet == ATTR_SET)
     291                 :          0 :                 nSecondSpeedSet = ATTR_MIXED;
     292                 :            : 
     293 [ #  # ][ #  # ]:          0 :             if (nSecondSoundOnSet == ATTR_SET && bSecondSoundOn == sal_True)
     294                 :          0 :                 nSecondSoundOnSet = ATTR_MIXED;
     295                 :            : 
     296 [ #  # ][ #  # ]:          0 :             if (nSecondPlayFullSet == ATTR_SET && bSecondPlayFull == sal_True)
     297                 :          0 :                 nSecondPlayFullSet = ATTR_MIXED;
     298                 :            :         }
     299                 :            :     }
     300                 :            : 
     301                 :            :     // Genau zwei Objekte mit Pfadeffekt? Dann gilt nur die Animationsinfo
     302                 :            :     // am bewegten Objekt.
     303         [ #  # ]:          0 :     if (nCount == 2)
     304                 :            :     {
     305 [ #  # ][ #  # ]:          0 :         SdrObject* pObject1 = rMarkList.GetMark(0)->GetMarkedSdrObj();
     306 [ #  # ][ #  # ]:          0 :         SdrObject* pObject2 = rMarkList.GetMark(1)->GetMarkedSdrObj();
     307         [ #  # ]:          0 :         SdrObjKind eKind1   = (SdrObjKind)pObject1->GetObjIdentifier();
     308         [ #  # ]:          0 :         SdrObjKind eKind2   = (SdrObjKind)pObject2->GetObjIdentifier();
     309         [ #  # ]:          0 :         SdAnimationInfo* pInfo1 = mpDoc->GetAnimationInfo(pObject1);
     310         [ #  # ]:          0 :         SdAnimationInfo* pInfo2 = mpDoc->GetAnimationInfo(pObject2);
     311                 :          0 :         pInfo  = NULL;
     312                 :            : 
     313 [ #  # ][ #  # ]:          0 :         if (pObject1->GetObjInventor() == SdrInventor &&
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     314                 :            :             ((eKind1 == OBJ_LINE) ||                        // 2-Punkt-Linie
     315                 :            :              (eKind1 == OBJ_PLIN) ||                        // Polygon
     316                 :            :              (eKind1 == OBJ_PATHLINE))                &&    // Bezier-Kurve
     317                 :            :              (pInfo2 && pInfo2->meEffect == presentation::AnimationEffect_PATH))
     318                 :            :         {
     319                 :          0 :             pInfo = pInfo2;
     320                 :            :         }
     321                 :            : 
     322 [ #  # ][ #  # ]:          0 :         if (pObject2->GetObjInventor() == SdrInventor &&
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     323                 :            :             ((eKind2 == OBJ_LINE) ||                        // 2-Punkt-Linie
     324                 :            :              (eKind2 == OBJ_PLIN) ||                        // Polygon
     325                 :            :              (eKind2 == OBJ_PATHLINE))                &&    // Bezier-Kurve
     326                 :            :             (pInfo1 && pInfo1->meEffect == presentation::AnimationEffect_PATH))
     327                 :            :         {
     328                 :          0 :             pInfo = pInfo1;
     329                 :            :         }
     330                 :            : 
     331         [ #  # ]:          0 :         if (pInfo)
     332                 :            :         {
     333                 :          0 :             bActive         = pInfo->mbActive;          nAnimationSet       = ATTR_SET;
     334                 :          0 :             eEffect         = pInfo->meEffect;          nEffectSet          = ATTR_SET;
     335                 :          0 :             eTextEffect     = pInfo->meTextEffect;      nTextEffectSet      = ATTR_SET;
     336                 :          0 :             eSpeed          = pInfo->meSpeed;           nSpeedSet           = ATTR_SET;
     337                 :          0 :             bFadeOut        = pInfo->mbDimPrevious;     nFadeOutSet         = ATTR_SET;
     338                 :          0 :             aFadeColor      = pInfo->maDimColor;        nFadeColorSet       = ATTR_SET;
     339                 :          0 :             bInvisible      = pInfo->mbDimHide;         nInvisibleSet       = ATTR_SET;
     340                 :          0 :             bSoundOn        = pInfo->mbSoundOn;         nSoundOnSet         = ATTR_SET;
     341         [ #  # ]:          0 :             aSound          = pInfo->maSoundFile;       nSoundFileSet       = ATTR_SET;
     342                 :          0 :             bPlayFull       = pInfo->mbPlayFull;        nPlayFullSet        = ATTR_SET;
     343                 :          0 :             eClickAction    = pInfo->meClickAction;     nClickActionSet     = ATTR_SET;
     344 [ #  # ][ #  # ]:          0 :             aBookmark       = pInfo->GetBookmark();     nBookmarkSet        = ATTR_SET;
                 [ #  # ]
     345                 :          0 :             eSecondEffect   = pInfo->meSecondEffect;    nSecondEffectSet    = ATTR_SET;
     346                 :          0 :             eSecondSpeed    = pInfo->meSecondSpeed;     nSecondSpeedSet     = ATTR_SET;
     347                 :          0 :             bSecondSoundOn  = pInfo->mbSecondSoundOn;   nSecondSoundOnSet   = ATTR_SET;
     348                 :          0 :             bSecondPlayFull = pInfo->mbSecondPlayFull;  nSecondPlayFullSet  = ATTR_SET;
     349                 :            :         }
     350                 :            :     }
     351                 :            : 
     352                 :          0 :     const SfxItemSet* pArgs = rReq.GetArgs();
     353                 :            : 
     354         [ #  # ]:          0 :     if(!pArgs)
     355                 :            :     {
     356                 :            :         // ItemSet fuer Dialog fuellen
     357         [ #  # ]:          0 :         SfxItemSet aSet(mpDoc->GetPool(), ATTR_ANIMATION_START, ATTR_ACTION_END);
     358                 :            : 
     359                 :            :         // das Set besetzen
     360         [ #  # ]:          0 :         if (nAnimationSet == ATTR_SET)
     361 [ #  # ][ #  # ]:          0 :             aSet.Put( SfxBoolItem( ATTR_ANIMATION_ACTIVE, bActive));
                 [ #  # ]
     362         [ #  # ]:          0 :         else if (nAnimationSet == ATTR_MIXED)
     363         [ #  # ]:          0 :             aSet.InvalidateItem(ATTR_ANIMATION_ACTIVE);
     364                 :            :         else
     365 [ #  # ][ #  # ]:          0 :             aSet.Put(SfxBoolItem(ATTR_ANIMATION_ACTIVE, sal_False));
                 [ #  # ]
     366                 :            : 
     367         [ #  # ]:          0 :         if (nEffectSet == ATTR_SET)
     368 [ #  # ][ #  # ]:          0 :             aSet.Put(SfxAllEnumItem(ATTR_ANIMATION_EFFECT, (sal_uInt16)eEffect));
                 [ #  # ]
     369         [ #  # ]:          0 :         else if (nEffectSet == ATTR_MIXED)
     370         [ #  # ]:          0 :             aSet.InvalidateItem( ATTR_ANIMATION_EFFECT );
     371                 :            :         else
     372 [ #  # ][ #  # ]:          0 :             aSet.Put(SfxAllEnumItem(ATTR_ANIMATION_EFFECT, presentation::AnimationEffect_NONE));
                 [ #  # ]
     373                 :            : 
     374         [ #  # ]:          0 :         if (nTextEffectSet == ATTR_SET)
     375 [ #  # ][ #  # ]:          0 :             aSet.Put(SfxAllEnumItem(ATTR_ANIMATION_TEXTEFFECT, (sal_uInt16)eTextEffect));
                 [ #  # ]
     376         [ #  # ]:          0 :         else if (nTextEffectSet == ATTR_MIXED)
     377         [ #  # ]:          0 :             aSet.InvalidateItem( ATTR_ANIMATION_TEXTEFFECT );
     378                 :            :         else
     379 [ #  # ][ #  # ]:          0 :             aSet.Put(SfxAllEnumItem(ATTR_ANIMATION_TEXTEFFECT, presentation::AnimationEffect_NONE));
                 [ #  # ]
     380                 :            : 
     381         [ #  # ]:          0 :         if (nSpeedSet == ATTR_SET)
     382 [ #  # ][ #  # ]:          0 :             aSet.Put(SfxAllEnumItem(ATTR_ANIMATION_SPEED, (sal_uInt16)eSpeed));
                 [ #  # ]
     383                 :            :         else
     384         [ #  # ]:          0 :             aSet.InvalidateItem(ATTR_ANIMATION_SPEED);
     385                 :            : 
     386         [ #  # ]:          0 :         if (nFadeOutSet == ATTR_SET)
     387 [ #  # ][ #  # ]:          0 :             aSet.Put(SfxBoolItem(ATTR_ANIMATION_FADEOUT, bFadeOut));
                 [ #  # ]
     388         [ #  # ]:          0 :         else if (nFadeOutSet == ATTR_MIXED)
     389         [ #  # ]:          0 :             aSet.InvalidateItem(ATTR_ANIMATION_FADEOUT);
     390                 :            :         else
     391 [ #  # ][ #  # ]:          0 :             aSet.Put(SfxBoolItem(ATTR_ANIMATION_FADEOUT, sal_False));
                 [ #  # ]
     392                 :            : 
     393         [ #  # ]:          0 :         if (nFadeColorSet == ATTR_SET)
     394 [ #  # ][ #  # ]:          0 :             aSet.Put(SvxColorItem(aFadeColor, ATTR_ANIMATION_COLOR));
                 [ #  # ]
     395         [ #  # ]:          0 :         else if (nFadeColorSet == ATTR_MIXED)
     396         [ #  # ]:          0 :             aSet.InvalidateItem(ATTR_ANIMATION_COLOR);
     397                 :            :         else
     398 [ #  # ][ #  # ]:          0 :             aSet.Put(SvxColorItem(RGB_Color(COL_LIGHTGRAY), ATTR_ANIMATION_COLOR));
         [ #  # ][ #  # ]
     399                 :            : 
     400         [ #  # ]:          0 :         if (nInvisibleSet == ATTR_SET)
     401 [ #  # ][ #  # ]:          0 :             aSet.Put(SfxBoolItem(ATTR_ANIMATION_INVISIBLE, bInvisible));
                 [ #  # ]
     402         [ #  # ]:          0 :         else if (nInvisibleSet == ATTR_MIXED)
     403         [ #  # ]:          0 :             aSet.InvalidateItem(ATTR_ANIMATION_INVISIBLE);
     404                 :            :         else
     405 [ #  # ][ #  # ]:          0 :             aSet.Put(SfxBoolItem(ATTR_ANIMATION_INVISIBLE, sal_False));
                 [ #  # ]
     406                 :            : 
     407         [ #  # ]:          0 :         if (nSoundOnSet == ATTR_SET)
     408 [ #  # ][ #  # ]:          0 :             aSet.Put(SfxBoolItem(ATTR_ANIMATION_SOUNDON, bSoundOn));
                 [ #  # ]
     409         [ #  # ]:          0 :         else if (nSoundOnSet == ATTR_MIXED)
     410         [ #  # ]:          0 :             aSet.InvalidateItem(ATTR_ANIMATION_SOUNDON);
     411                 :            :         else
     412 [ #  # ][ #  # ]:          0 :             aSet.Put(SfxBoolItem(ATTR_ANIMATION_SOUNDON, sal_False));
                 [ #  # ]
     413                 :            : 
     414         [ #  # ]:          0 :         if (nSoundFileSet == ATTR_SET)
     415 [ #  # ][ #  # ]:          0 :             aSet.Put(SfxStringItem(ATTR_ANIMATION_SOUNDFILE, aSound));
                 [ #  # ]
     416                 :            :         else
     417         [ #  # ]:          0 :             aSet.InvalidateItem(ATTR_ANIMATION_SOUNDFILE);
     418                 :            : 
     419         [ #  # ]:          0 :         if (nPlayFullSet == ATTR_SET)
     420 [ #  # ][ #  # ]:          0 :             aSet.Put(SfxBoolItem(ATTR_ANIMATION_PLAYFULL, bPlayFull));
                 [ #  # ]
     421         [ #  # ]:          0 :         else if (nPlayFullSet == ATTR_MIXED)
     422         [ #  # ]:          0 :             aSet.InvalidateItem(ATTR_ANIMATION_PLAYFULL);
     423                 :            :         else
     424 [ #  # ][ #  # ]:          0 :             aSet.Put(SfxBoolItem(ATTR_ANIMATION_PLAYFULL, sal_False));
                 [ #  # ]
     425                 :            : 
     426         [ #  # ]:          0 :         if (nClickActionSet == ATTR_SET)
     427 [ #  # ][ #  # ]:          0 :             aSet.Put(SfxAllEnumItem(ATTR_ACTION, (sal_uInt16)eClickAction));
                 [ #  # ]
     428         [ #  # ]:          0 :         else if (nClickActionSet == ATTR_MIXED)
     429         [ #  # ]:          0 :             aSet.InvalidateItem(ATTR_ACTION);
     430                 :            :         else
     431 [ #  # ][ #  # ]:          0 :             aSet.Put(SfxAllEnumItem(ATTR_ACTION, presentation::ClickAction_NONE));
                 [ #  # ]
     432                 :            : 
     433         [ #  # ]:          0 :         if (nBookmarkSet == ATTR_SET)
     434 [ #  # ][ #  # ]:          0 :             aSet.Put(SfxStringItem(ATTR_ACTION_FILENAME, aBookmark));
                 [ #  # ]
     435                 :            :         else
     436         [ #  # ]:          0 :             aSet.InvalidateItem(ATTR_ACTION_FILENAME);
     437                 :            : 
     438         [ #  # ]:          0 :         if (nSecondEffectSet == ATTR_SET)
     439 [ #  # ][ #  # ]:          0 :             aSet.Put(SfxAllEnumItem(ATTR_ACTION_EFFECT, (sal_uInt16)eSecondEffect));
                 [ #  # ]
     440         [ #  # ]:          0 :         else if (nSecondEffectSet == ATTR_MIXED)
     441         [ #  # ]:          0 :             aSet.InvalidateItem( ATTR_ACTION_EFFECT );
     442                 :            :         else
     443 [ #  # ][ #  # ]:          0 :             aSet.Put(SfxAllEnumItem(ATTR_ACTION_EFFECT, presentation::AnimationEffect_NONE));
                 [ #  # ]
     444                 :            : 
     445         [ #  # ]:          0 :         if (nSecondSpeedSet == ATTR_SET)
     446 [ #  # ][ #  # ]:          0 :             aSet.Put(SfxAllEnumItem(ATTR_ACTION_EFFECTSPEED, (sal_uInt16)eSecondSpeed));
                 [ #  # ]
     447                 :            :         else
     448         [ #  # ]:          0 :             aSet.InvalidateItem(ATTR_ACTION_EFFECTSPEED);
     449                 :            : 
     450         [ #  # ]:          0 :         if (nSecondSoundOnSet == ATTR_SET)
     451 [ #  # ][ #  # ]:          0 :             aSet.Put(SfxBoolItem(ATTR_ACTION_SOUNDON, bSecondSoundOn));
                 [ #  # ]
     452         [ #  # ]:          0 :         else if (nSecondSoundOnSet == ATTR_MIXED)
     453         [ #  # ]:          0 :             aSet.InvalidateItem(ATTR_ACTION_SOUNDON);
     454                 :            :         else
     455 [ #  # ][ #  # ]:          0 :             aSet.Put(SfxBoolItem(ATTR_ACTION_SOUNDON, sal_False));
                 [ #  # ]
     456                 :            : 
     457         [ #  # ]:          0 :         if (nSecondPlayFullSet == ATTR_SET)
     458 [ #  # ][ #  # ]:          0 :             aSet.Put(SfxBoolItem(ATTR_ACTION_PLAYFULL, bSecondPlayFull));
                 [ #  # ]
     459         [ #  # ]:          0 :         else if (nPlayFullSet == ATTR_MIXED)
     460         [ #  # ]:          0 :             aSet.InvalidateItem(ATTR_ACTION_PLAYFULL);
     461                 :            :         else
     462 [ #  # ][ #  # ]:          0 :             aSet.Put(SfxBoolItem(ATTR_ACTION_PLAYFULL, sal_False));
                 [ #  # ]
     463                 :            : 
     464         [ #  # ]:          0 :         SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
     465 [ #  # ][ #  # ]:          0 :         SfxAbstractDialog* pDlg = pFact ? pFact->CreatSdActionDialog( NULL, &aSet, mpView ) : 0;
     466                 :            : 
     467 [ #  # ][ #  # ]:          0 :         sal_uInt16 nResult = pDlg ? pDlg->Execute() : RET_CANCEL;
     468                 :            : 
     469         [ #  # ]:          0 :         if( nResult == RET_OK )
     470                 :            :         {
     471 [ #  # ][ #  # ]:          0 :             rReq.Done( *( pDlg->GetOutputItemSet() ) );
     472                 :          0 :             pArgs = rReq.GetArgs();
     473                 :            :         }
     474                 :            : 
     475 [ #  # ][ #  # ]:          0 :         delete pDlg;
     476                 :            : 
     477         [ #  # ]:          0 :         if( nResult != RET_OK )
     478 [ #  # ][ #  # ]:          0 :             return;
     479                 :            :     }
     480                 :            : 
     481                 :            :     // Auswertung des ItemSets
     482 [ #  # ][ #  # ]:          0 :     if (pArgs->GetItemState(ATTR_ANIMATION_ACTIVE) == SFX_ITEM_SET)
     483                 :            :     {
     484         [ #  # ]:          0 :         bActive = ((SfxBoolItem&)pArgs->Get(ATTR_ANIMATION_ACTIVE)).GetValue();
     485                 :          0 :         nAnimationSet = ATTR_SET;
     486                 :            :     }
     487                 :            :     else
     488                 :          0 :         nAnimationSet = ATTR_MISSING;
     489                 :            : 
     490 [ #  # ][ #  # ]:          0 :     if (pArgs->GetItemState(ATTR_ANIMATION_EFFECT) == SFX_ITEM_SET)
     491                 :            :     {
     492                 :            :         eEffect = (presentation::AnimationEffect)((SfxAllEnumItem&) pArgs->
     493         [ #  # ]:          0 :                     Get(ATTR_ANIMATION_EFFECT)).GetValue();
     494                 :          0 :         nEffectSet = ATTR_SET;
     495                 :            :     }
     496                 :            :     else
     497                 :          0 :         nEffectSet = ATTR_MISSING;
     498                 :            : 
     499 [ #  # ][ #  # ]:          0 :     if (pArgs->GetItemState(ATTR_ANIMATION_TEXTEFFECT) == SFX_ITEM_SET)
     500                 :            :     {
     501                 :            :         eTextEffect = (presentation::AnimationEffect)((SfxAllEnumItem&) pArgs->
     502         [ #  # ]:          0 :                         Get(ATTR_ANIMATION_TEXTEFFECT)).GetValue();
     503                 :          0 :         nTextEffectSet = ATTR_SET;
     504                 :            :     }
     505                 :            :     else
     506                 :          0 :         nTextEffectSet = ATTR_MISSING;
     507                 :            : 
     508 [ #  # ][ #  # ]:          0 :     if (pArgs->GetItemState(ATTR_ANIMATION_SPEED) == SFX_ITEM_SET)
     509                 :            :     {
     510                 :            :         eSpeed  = (presentation::AnimationSpeed)((SfxAllEnumItem&) pArgs->
     511         [ #  # ]:          0 :                     Get(ATTR_ANIMATION_SPEED)).GetValue();
     512                 :          0 :         nSpeedSet = ATTR_SET;
     513                 :            :     }
     514                 :            :     else
     515                 :          0 :         nSpeedSet = ATTR_MISSING;
     516                 :            : 
     517 [ #  # ][ #  # ]:          0 :     if (pArgs->GetItemState(ATTR_ANIMATION_FADEOUT) == SFX_ITEM_SET)
     518                 :            :     {
     519         [ #  # ]:          0 :         bFadeOut = ((SfxBoolItem&)pArgs->Get(ATTR_ANIMATION_FADEOUT)).GetValue();
     520                 :          0 :         nFadeOutSet = ATTR_SET;
     521                 :            :     }
     522                 :            :     else
     523                 :          0 :         nFadeOutSet = ATTR_MISSING;
     524                 :            : 
     525 [ #  # ][ #  # ]:          0 :     if (pArgs->GetItemState(ATTR_ANIMATION_INVISIBLE) == SFX_ITEM_SET)
     526                 :            :     {
     527         [ #  # ]:          0 :         bInvisible = ((SfxBoolItem&)pArgs->Get(ATTR_ANIMATION_INVISIBLE)).GetValue();
     528                 :          0 :         nInvisibleSet = ATTR_SET;
     529                 :            :     }
     530                 :            :     else
     531                 :          0 :         nInvisibleSet = ATTR_MISSING;
     532                 :            : 
     533 [ #  # ][ #  # ]:          0 :     if (pArgs->GetItemState(ATTR_ANIMATION_SOUNDON) == SFX_ITEM_SET)
     534                 :            :     {
     535         [ #  # ]:          0 :         bSoundOn = ((SfxBoolItem&)pArgs->Get(ATTR_ANIMATION_SOUNDON)).GetValue();
     536                 :          0 :         nSoundOnSet = ATTR_SET;
     537                 :            :     }
     538                 :            :     else
     539                 :          0 :         nSoundOnSet = ATTR_MISSING;
     540                 :            : 
     541 [ #  # ][ #  # ]:          0 :     if (pArgs->GetItemState(ATTR_ANIMATION_SOUNDFILE) == SFX_ITEM_SET)
     542                 :            :     {
     543 [ #  # ][ #  # ]:          0 :         aSound =  ((SfxStringItem&)pArgs->Get(ATTR_ANIMATION_SOUNDFILE)).GetValue();
     544                 :          0 :         nSoundFileSet = ATTR_SET;
     545                 :            :     }
     546                 :            :     else
     547                 :          0 :         nSoundFileSet = ATTR_MISSING;
     548                 :            : 
     549 [ #  # ][ #  # ]:          0 :     if (pArgs->GetItemState(ATTR_ANIMATION_COLOR) == SFX_ITEM_SET)
     550                 :            :     {
     551         [ #  # ]:          0 :         aFadeColor = ((SvxColorItem&)pArgs->Get(ATTR_ANIMATION_COLOR)).GetValue();
     552                 :          0 :         nFadeColorSet = ATTR_SET;
     553                 :            :     }
     554                 :            :     else
     555                 :          0 :         nFadeColorSet = ATTR_MISSING;
     556                 :            : 
     557 [ #  # ][ #  # ]:          0 :     if (pArgs->GetItemState(ATTR_ANIMATION_PLAYFULL) == SFX_ITEM_SET)
     558                 :            :     {
     559         [ #  # ]:          0 :         bPlayFull = ((SfxBoolItem&)pArgs->Get(ATTR_ANIMATION_PLAYFULL)).GetValue();
     560                 :          0 :         nPlayFullSet = ATTR_SET;
     561                 :            :     }
     562                 :            :     else
     563                 :          0 :         nPlayFullSet = ATTR_MISSING;
     564                 :            : 
     565 [ #  # ][ #  # ]:          0 :     if (pArgs->GetItemState(ATTR_ACTION) == SFX_ITEM_SET)
     566                 :            :     {
     567                 :            :         eClickAction = (presentation::ClickAction)((SfxAllEnumItem&)pArgs->
     568         [ #  # ]:          0 :                     Get(ATTR_ACTION)).GetValue();
     569                 :          0 :         nClickActionSet = ATTR_SET;
     570                 :            :     }
     571                 :            :     else
     572                 :          0 :         nClickActionSet = ATTR_MISSING;
     573                 :            : 
     574 [ #  # ][ #  # ]:          0 :     if (pArgs->GetItemState(ATTR_ACTION_FILENAME) == SFX_ITEM_SET)
     575                 :            :     {
     576                 :            :         aBookmark = ((SfxStringItem&)pArgs->
     577 [ #  # ][ #  # ]:          0 :                         Get(ATTR_ACTION_FILENAME)).GetValue();
     578                 :          0 :         nBookmarkSet = ATTR_SET;
     579                 :            :     }
     580                 :            :     else
     581                 :          0 :         nBookmarkSet = ATTR_MISSING;
     582                 :            : 
     583 [ #  # ][ #  # ]:          0 :     if (pArgs->GetItemState(ATTR_ACTION_EFFECT) == SFX_ITEM_SET)
     584                 :            :     {
     585                 :            :         eSecondEffect = (presentation::AnimationEffect)((SfxAllEnumItem&) pArgs->
     586         [ #  # ]:          0 :                     Get(ATTR_ACTION_EFFECT)).GetValue();
     587                 :          0 :         nSecondEffectSet = ATTR_SET;
     588                 :            :     }
     589                 :            :     else
     590                 :          0 :         nSecondEffectSet = ATTR_MISSING;
     591                 :            : 
     592 [ #  # ][ #  # ]:          0 :     if (pArgs->GetItemState(ATTR_ACTION_EFFECTSPEED) == SFX_ITEM_SET)
     593                 :            :     {
     594                 :            :         eSecondSpeed  = (presentation::AnimationSpeed)((SfxAllEnumItem&) pArgs->
     595         [ #  # ]:          0 :                     Get(ATTR_ACTION_EFFECTSPEED)).GetValue();
     596                 :          0 :         nSecondSpeedSet = ATTR_SET;
     597                 :            :     }
     598                 :            :     else
     599                 :          0 :         nSecondSpeedSet = ATTR_MISSING;
     600                 :            : 
     601 [ #  # ][ #  # ]:          0 :     if (pArgs->GetItemState(ATTR_ACTION_SOUNDON) == SFX_ITEM_SET)
     602                 :            :     {
     603         [ #  # ]:          0 :         bSecondSoundOn = ((SfxBoolItem&)pArgs->Get(ATTR_ACTION_SOUNDON)).GetValue();
     604                 :          0 :         nSecondSoundOnSet = ATTR_SET;
     605                 :            :     }
     606                 :            :     else
     607                 :          0 :         nSecondSoundOnSet = ATTR_MISSING;
     608                 :            : 
     609 [ #  # ][ #  # ]:          0 :     if (pArgs->GetItemState(ATTR_ACTION_PLAYFULL) == SFX_ITEM_SET)
     610                 :            :     {
     611         [ #  # ]:          0 :         bSecondPlayFull = ((SfxBoolItem&)pArgs->Get(ATTR_ACTION_PLAYFULL)).GetValue();
     612                 :          0 :         nSecondPlayFullSet = ATTR_SET;
     613                 :            :     }
     614                 :            :     else
     615                 :          0 :         nSecondPlayFullSet = ATTR_MISSING;
     616                 :            : 
     617                 :            :     // Wenn irgendwelche Attribute ausgewaehlt wurden
     618 [ #  # ][ #  # ]:          0 :     if (nEffectSet         == ATTR_SET  ||
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     619                 :            :         nTextEffectSet     == ATTR_SET  ||
     620                 :            :         nSpeedSet          == ATTR_SET  ||
     621                 :            :         nAnimationSet      == ATTR_SET  ||
     622                 :            :         nFadeOutSet        == ATTR_SET  ||
     623                 :            :         nFadeColorSet      == ATTR_SET  ||
     624                 :            :         nInvisibleSet      == ATTR_SET  ||
     625                 :            :         nSoundOnSet        == ATTR_SET  ||
     626                 :            :         nSoundFileSet      == ATTR_SET  ||
     627                 :            :         nPlayFullSet       == ATTR_SET  ||
     628                 :            :         nClickActionSet    == ATTR_SET  ||
     629                 :            :         nBookmarkSet       == ATTR_SET  ||
     630                 :            :         nSecondEffectSet   == ATTR_SET  ||
     631                 :            :         nSecondSpeedSet    == ATTR_SET  ||
     632                 :            :         nSecondSoundOnSet  == ATTR_SET  ||
     633                 :            :         nSecondPlayFullSet == ATTR_SET)
     634                 :            :     {
     635                 :            :         // String fuer Undo-Group und List-Action
     636 [ #  # ][ #  # ]:          0 :         String aComment(SdResId(STR_UNDO_ANIMATION));
     637                 :            : 
     638                 :            :         // bei 'an Kurve entlang' gibt's noch eine extra UndoAction, darum
     639                 :            :         // hier klammern
     640         [ #  # ]:          0 :         pUndoMgr->EnterListAction(aComment, aComment);
     641                 :            : 
     642                 :            :         // Undo Gruppe erzeugen
     643 [ #  # ][ #  # ]:          0 :         SdUndoGroup* pUndoGroup = new SdUndoGroup(mpDoc);
     644         [ #  # ]:          0 :         pUndoGroup->SetComment(aComment);
     645                 :            : 
     646                 :            : 
     647                 :            :         // fuer den Pfad-Effekt einige Dinge merken
     648                 :          0 :         SdrObject*  pRunningObj = NULL;
     649                 :          0 :         SdrPathObj* pPath       = NULL;
     650 [ #  # ][ #  # ]:          0 :         if (eEffect == presentation::AnimationEffect_PATH && nEffectSet == ATTR_SET)
     651                 :            :         {
     652                 :            :             DBG_ASSERT(nCount == 2, "dieser Effekt braucht genau 2 selektierte Objekte");
     653 [ #  # ][ #  # ]:          0 :             SdrObject* pObject1 = rMarkList.GetMark(0)->GetMarkedSdrObj();
     654 [ #  # ][ #  # ]:          0 :             SdrObject* pObject2 = rMarkList.GetMark(1)->GetMarkedSdrObj();
     655         [ #  # ]:          0 :             SdrObjKind eKind1   = (SdrObjKind)pObject1->GetObjIdentifier();
     656         [ #  # ]:          0 :             SdrObjKind eKind2   = (SdrObjKind)pObject2->GetObjIdentifier();
     657                 :            : 
     658 [ #  # ][ #  # ]:          0 :             if (pObject1->GetObjInventor() == SdrInventor &&
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     659                 :            :                 ((eKind1 == OBJ_LINE) ||        // 2-Punkt-Linie
     660                 :            :                  (eKind1 == OBJ_PLIN) ||        // Polygon
     661                 :            :                  (eKind1 == OBJ_PATHLINE)))     // Bezier-Kurve
     662                 :            :             {
     663                 :          0 :                 pPath = (SdrPathObj*)pObject1;
     664                 :          0 :                 pRunningObj = pObject2;
     665                 :            :             }
     666                 :            : 
     667 [ #  # ][ #  # ]:          0 :             if (pObject2->GetObjInventor() == SdrInventor &&
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     668                 :            :                 ((eKind2 == OBJ_LINE) ||        // 2-Punkt-Linie
     669                 :            :                  (eKind2 == OBJ_PLIN) ||        // Polygon
     670                 :            :                  (eKind2 == OBJ_PATHLINE)))     // Bezier-Kurve
     671                 :            :             {
     672                 :          0 :                 pPath = (SdrPathObj*)pObject2;
     673                 :          0 :                 pRunningObj = pObject1;
     674                 :            :             }
     675                 :            : 
     676                 :            :             DBG_ASSERT(pPath, "keine Kurve gefunden");
     677                 :            : 
     678                 :            : 
     679                 :            :             // das laufende Objekt auf das Kurvenende schieben
     680         [ #  # ]:          0 :             Rectangle aCurRect(pRunningObj->GetLogicRect());
     681         [ #  # ]:          0 :             Point     aCurCenter(aCurRect.Center());
     682                 :          0 :             const ::basegfx::B2DPolyPolygon& rPolyPolygon = pPath->GetPathPoly();
     683         [ #  # ]:          0 :             sal_uInt32 nNoOfPolygons(rPolyPolygon.count());
     684         [ #  # ]:          0 :             const ::basegfx::B2DPolygon aPolygon(rPolyPolygon.getB2DPolygon(nNoOfPolygons - 1L));
     685         [ #  # ]:          0 :             sal_uInt32 nPoints(aPolygon.count());
     686         [ #  # ]:          0 :             const ::basegfx::B2DPoint aNewB2DCenter(aPolygon.getB2DPoint(nPoints - 1L));
     687                 :          0 :             const Point aNewCenter(FRound(aNewB2DCenter.getX()), FRound(aNewB2DCenter.getY()));
     688                 :          0 :             Size aDistance(aNewCenter.X() - aCurCenter.X(), aNewCenter.Y() - aCurCenter.Y());
     689         [ #  # ]:          0 :             pRunningObj->Move(aDistance);
     690                 :            : 
     691 [ #  # ][ #  # ]:          0 :             pUndoMgr->AddUndoAction(mpDoc->GetSdrUndoFactory().CreateUndoMoveObject( *pRunningObj, aDistance));
         [ #  # ][ #  # ]
     692                 :            :         }
     693                 :            : 
     694         [ #  # ]:          0 :         for (nObject = 0; nObject < nCount; nObject++)
     695                 :            :         {
     696 [ #  # ][ #  # ]:          0 :             SdrObject* pObject = rMarkList.GetMark(nObject)->GetMarkedSdrObj();
     697                 :            : 
     698         [ #  # ]:          0 :             pInfo = mpDoc->GetAnimationInfo(pObject);
     699                 :            : 
     700                 :          0 :             sal_Bool bCreated = sal_False;
     701         [ #  # ]:          0 :             if( !pInfo )
     702                 :            :             {
     703         [ #  # ]:          0 :                 pInfo = SdDrawDocument::GetShapeUserData(*pObject,true);
     704                 :          0 :                 bCreated = sal_True;
     705                 :            :             }
     706                 :            : 
     707                 :            :             // das Pfadobjekt fuer 'an Kurve entlang'?
     708 [ #  # ][ #  # ]:          0 :             if (eEffect == presentation::AnimationEffect_PATH && pObject == pPath)
     709                 :            :             {
     710                 :            :                 SdAnimationPrmsUndoAction* pAction = new SdAnimationPrmsUndoAction
     711 [ #  # ][ #  # ]:          0 :                                                 (mpDoc, pObject, bCreated);
     712                 :          0 :                 pAction->SetActive(pInfo->mbActive, pInfo->mbActive);
     713                 :          0 :                 pAction->SetEffect(pInfo->meEffect, pInfo->meEffect);
     714                 :          0 :                 pAction->SetTextEffect(pInfo->meTextEffect, pInfo->meTextEffect);
     715                 :          0 :                 pAction->SetSpeed(pInfo->meSpeed, pInfo->meSpeed);
     716                 :          0 :                 pAction->SetDim(pInfo->mbDimPrevious, pInfo->mbDimPrevious);
     717                 :          0 :                 pAction->SetDimColor(pInfo->maDimColor, pInfo->maDimColor);
     718                 :          0 :                 pAction->SetDimHide(pInfo->mbDimHide, pInfo->mbDimHide);
     719                 :          0 :                 pAction->SetSoundOn(pInfo->mbSoundOn, pInfo->mbSoundOn);
     720 [ #  # ][ #  # ]:          0 :                 pAction->SetSound(pInfo->maSoundFile, pInfo->maSoundFile);
         [ #  # ][ #  # ]
                 [ #  # ]
     721                 :          0 :                 pAction->SetPlayFull(pInfo->mbPlayFull, pInfo->mbPlayFull);
     722                 :          0 :                 pAction->SetClickAction(pInfo->meClickAction, pInfo->meClickAction);
     723 [ #  # ][ #  # ]:          0 :                 pAction->SetBookmark(pInfo->GetBookmark(), pInfo->GetBookmark());
         [ #  # ][ #  # ]
                 [ #  # ]
     724                 :          0 :                 pAction->SetVerb(pInfo->mnVerb, pInfo->mnVerb);
     725                 :          0 :                 pAction->SetSecondEffect(pInfo->meSecondEffect, pInfo->meSecondEffect);
     726                 :          0 :                 pAction->SetSecondSpeed(pInfo->meSecondSpeed, pInfo->meSecondSpeed);
     727                 :          0 :                 pAction->SetSecondSoundOn(pInfo->mbSecondSoundOn, pInfo->mbSecondSoundOn);
     728                 :          0 :                 pAction->SetSecondPlayFull(pInfo->mbSecondPlayFull, pInfo->mbSecondPlayFull);
     729         [ #  # ]:          0 :                 pUndoGroup->AddAction(pAction);
     730                 :            : 
     731                 :            :             }
     732                 :            :             else
     733                 :            :             {
     734                 :            : 
     735                 :            :                 // Undo-Action mit alten und neuen Groessen erzeugen
     736                 :            :                 SdAnimationPrmsUndoAction* pAction = new SdAnimationPrmsUndoAction
     737 [ #  # ][ #  # ]:          0 :                                                 (mpDoc, pObject, bCreated);
     738                 :          0 :                 pAction->SetActive(pInfo->mbActive, bActive);
     739                 :          0 :                 pAction->SetEffect(pInfo->meEffect, eEffect);
     740                 :          0 :                 pAction->SetTextEffect(pInfo->meTextEffect, eTextEffect);
     741                 :          0 :                 pAction->SetSpeed(pInfo->meSpeed, eSpeed);
     742                 :          0 :                 pAction->SetDim(pInfo->mbDimPrevious, bFadeOut);
     743                 :          0 :                 pAction->SetDimColor(pInfo->maDimColor, aFadeColor);
     744                 :          0 :                 pAction->SetDimHide(pInfo->mbDimHide, bInvisible);
     745                 :          0 :                 pAction->SetSoundOn(pInfo->mbSoundOn, bSoundOn);
     746 [ #  # ][ #  # ]:          0 :                 pAction->SetSound(pInfo->maSoundFile, aSound);
         [ #  # ][ #  # ]
                 [ #  # ]
     747                 :          0 :                 pAction->SetPlayFull(pInfo->mbPlayFull, bPlayFull);
     748                 :          0 :                 pAction->SetPathObj(pInfo->mpPathObj, pPath);
     749                 :          0 :                 pAction->SetClickAction(pInfo->meClickAction, eClickAction);
     750 [ #  # ][ #  # ]:          0 :                 pAction->SetBookmark(pInfo->GetBookmark(), aBookmark);
         [ #  # ][ #  # ]
                 [ #  # ]
     751 [ #  # ][ #  # ]:          0 :                 pAction->SetVerb(pInfo->mnVerb, (sal_uInt16)pInfo->GetBookmark().ToInt32() );
                 [ #  # ]
     752                 :          0 :                 pAction->SetSecondEffect(pInfo->meSecondEffect, eSecondEffect);
     753                 :          0 :                 pAction->SetSecondSpeed(pInfo->meSecondSpeed, eSecondSpeed);
     754                 :          0 :                 pAction->SetSecondSoundOn(pInfo->mbSecondSoundOn, bSecondSoundOn);
     755                 :          0 :                 pAction->SetSecondPlayFull(pInfo->mbSecondPlayFull,bSecondPlayFull);
     756         [ #  # ]:          0 :                 pUndoGroup->AddAction(pAction);
     757                 :            : 
     758                 :            :                 // neue Werte am Infoblock des Objekts eintragen
     759         [ #  # ]:          0 :                 if (nAnimationSet == ATTR_SET)
     760                 :          0 :                     pInfo->mbActive = bActive;
     761                 :            : 
     762         [ #  # ]:          0 :                 if (nEffectSet == ATTR_SET)
     763                 :          0 :                     pInfo->meEffect = eEffect;
     764                 :            : 
     765         [ #  # ]:          0 :                 if (nTextEffectSet == ATTR_SET)
     766                 :          0 :                     pInfo->meTextEffect = eTextEffect;
     767                 :            : 
     768         [ #  # ]:          0 :                 if (nSpeedSet == ATTR_SET)
     769                 :          0 :                     pInfo->meSpeed = eSpeed;
     770                 :            : 
     771         [ #  # ]:          0 :                 if (nFadeOutSet == ATTR_SET)
     772                 :          0 :                     pInfo->mbDimPrevious = bFadeOut;
     773                 :            : 
     774         [ #  # ]:          0 :                 if (nFadeColorSet == ATTR_SET)
     775                 :          0 :                     pInfo->maDimColor = aFadeColor;
     776                 :            : 
     777         [ #  # ]:          0 :                 if (nInvisibleSet == ATTR_SET)
     778                 :          0 :                     pInfo->mbDimHide = bInvisible;
     779                 :            : 
     780         [ #  # ]:          0 :                 if (nSoundOnSet == ATTR_SET)
     781                 :          0 :                     pInfo->mbSoundOn = bSoundOn;
     782                 :            : 
     783         [ #  # ]:          0 :                 if (nSoundFileSet == ATTR_SET)
     784         [ #  # ]:          0 :                     pInfo->maSoundFile = aSound;
     785                 :            : 
     786         [ #  # ]:          0 :                 if (nPlayFullSet == ATTR_SET)
     787                 :          0 :                     pInfo->mbPlayFull = bPlayFull;
     788                 :            : 
     789         [ #  # ]:          0 :                 if (nClickActionSet == ATTR_SET)
     790                 :          0 :                     pInfo->meClickAction = eClickAction;
     791                 :            : 
     792         [ #  # ]:          0 :                 if (nBookmarkSet == ATTR_SET)
     793         [ #  # ]:          0 :                     pInfo->SetBookmark( aBookmark );
     794                 :            : 
     795         [ #  # ]:          0 :                 if (nSecondEffectSet == ATTR_SET)
     796                 :          0 :                     pInfo->meSecondEffect = eSecondEffect;
     797                 :            : 
     798         [ #  # ]:          0 :                 if (nSecondSpeedSet == ATTR_SET)
     799                 :          0 :                     pInfo->meSecondSpeed = eSecondSpeed;
     800                 :            : 
     801         [ #  # ]:          0 :                 if (nSecondSoundOnSet == ATTR_SET)
     802                 :          0 :                     pInfo->mbSecondSoundOn = bSecondSoundOn;
     803                 :            : 
     804         [ #  # ]:          0 :                 if (nSecondPlayFullSet == ATTR_SET)
     805                 :          0 :                     pInfo->mbSecondPlayFull = bSecondPlayFull;
     806                 :            : 
     807         [ #  # ]:          0 :                 if (eClickAction == presentation::ClickAction_VERB)
     808         [ #  # ]:          0 :                     pInfo->mnVerb = (sal_uInt16)aBookmark.ToInt32();
     809                 :            :             }
     810                 :            :         }
     811                 :            :         // Set the Undo Group in of the Undo Manager
     812         [ #  # ]:          0 :         pUndoMgr->AddUndoAction(pUndoGroup);
     813         [ #  # ]:          0 :         pUndoMgr->LeaveListAction();
     814                 :            : 
     815                 :            :         // Model changed
     816 [ #  # ][ #  # ]:          0 :         mpDoc->SetChanged();
     817 [ #  # ][ #  # ]:          0 :     }
         [ #  # ][ #  # ]
     818                 :            :     // sieht man nicht, also muss an den Bindings nicht invalidiert werden
     819                 :            : }
     820                 :            : 
     821                 :            : } // end of namespace sd
     822                 :            : 
     823                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10