1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 29*cdf0e10cSrcweir #include "precompiled_sd.hxx" 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir #include <com/sun/star/style/XStyle.hpp> 32*cdf0e10cSrcweir #include <com/sun/star/presentation/ClickAction.hpp> 33*cdf0e10cSrcweir #include <com/sun/star/beans/PropertyAttribute.hpp> 34*cdf0e10cSrcweir #include <com/sun/star/text/XText.hpp> 35*cdf0e10cSrcweir #include <com/sun/star/beans/PropertyState.hpp> 36*cdf0e10cSrcweir #include <com/sun/star/beans/PropertyValues.hpp> 37*cdf0e10cSrcweir #include <rtl/ustrbuf.hxx> 38*cdf0e10cSrcweir #include <comphelper/stl_types.hxx> 39*cdf0e10cSrcweir #include <vos/mutex.hxx> 40*cdf0e10cSrcweir #include <svl/itemprop.hxx> 41*cdf0e10cSrcweir #include <svl/style.hxx> 42*cdf0e10cSrcweir #include <svx/svdpool.hxx> 43*cdf0e10cSrcweir #include <sfx2/viewfrm.hxx> 44*cdf0e10cSrcweir #include <sfx2/app.hxx> 45*cdf0e10cSrcweir #include <svtools/unoimap.hxx> 46*cdf0e10cSrcweir #include <svtools/unoevent.hxx> 47*cdf0e10cSrcweir #include <sfx2/bindings.hxx> 48*cdf0e10cSrcweir #include <sfx2/sfxsids.hrc> 49*cdf0e10cSrcweir #include <comphelper/extract.hxx> 50*cdf0e10cSrcweir #include <svx/unoprov.hxx> 51*cdf0e10cSrcweir #include <svx/unoshape.hxx> 52*cdf0e10cSrcweir #include <svx/svditer.hxx> 53*cdf0e10cSrcweir #include <svx/svdotext.hxx> 54*cdf0e10cSrcweir #include <svx/unoapi.hxx> 55*cdf0e10cSrcweir #include <svx/svdopath.hxx> 56*cdf0e10cSrcweir #include <svx/svdoole2.hxx> 57*cdf0e10cSrcweir #include <svx/svdograf.hxx> 58*cdf0e10cSrcweir #include <editeng/outlobj.hxx> 59*cdf0e10cSrcweir #include "CustomAnimationPreset.hxx" 60*cdf0e10cSrcweir #include "Outliner.hxx" 61*cdf0e10cSrcweir #include "sdresid.hxx" 62*cdf0e10cSrcweir #include <comphelper/serviceinfohelper.hxx> 63*cdf0e10cSrcweir 64*cdf0e10cSrcweir #include "anminfo.hxx" 65*cdf0e10cSrcweir #include "unohelp.hxx" 66*cdf0e10cSrcweir #include "unoobj.hxx" 67*cdf0e10cSrcweir #include "unoprnms.hxx" 68*cdf0e10cSrcweir #include "unomodel.hxx" 69*cdf0e10cSrcweir #include "drawdoc.hxx" 70*cdf0e10cSrcweir #include "sdpage.hxx" 71*cdf0e10cSrcweir #include "ViewShell.hxx" 72*cdf0e10cSrcweir #include "unokywds.hxx" 73*cdf0e10cSrcweir #include "unopage.hxx" 74*cdf0e10cSrcweir #ifndef SVX_LIGHT 75*cdf0e10cSrcweir #ifndef SD_DRAW_DOC_SHELL_HXX 76*cdf0e10cSrcweir #include "DrawDocShell.hxx" 77*cdf0e10cSrcweir #endif 78*cdf0e10cSrcweir #endif 79*cdf0e10cSrcweir #include "helpids.h" 80*cdf0e10cSrcweir #include "glob.hxx" 81*cdf0e10cSrcweir #include "glob.hrc" 82*cdf0e10cSrcweir #include "unolayer.hxx" 83*cdf0e10cSrcweir #include "imapinfo.hxx" 84*cdf0e10cSrcweir #include "EffectMigration.hxx" 85*cdf0e10cSrcweir 86*cdf0e10cSrcweir #ifndef SEQTYPE 87*cdf0e10cSrcweir #if defined(__SUNPRO_CC) && (__SUNPRO_CC == 0x500) 88*cdf0e10cSrcweir #define SEQTYPE(x) (new ::com::sun::star::uno::Type( x )) 89*cdf0e10cSrcweir #else 90*cdf0e10cSrcweir #define SEQTYPE(x) &(x) 91*cdf0e10cSrcweir #endif 92*cdf0e10cSrcweir #endif 93*cdf0e10cSrcweir 94*cdf0e10cSrcweir using ::rtl::OUString; 95*cdf0e10cSrcweir using ::rtl::OUStringBuffer; 96*cdf0e10cSrcweir using namespace ::vos; 97*cdf0e10cSrcweir using namespace ::sd; 98*cdf0e10cSrcweir using namespace ::com::sun::star; 99*cdf0e10cSrcweir using namespace ::com::sun::star::presentation; 100*cdf0e10cSrcweir using namespace ::com::sun::star::animations; 101*cdf0e10cSrcweir 102*cdf0e10cSrcweir using ::com::sun::star::uno::makeAny; 103*cdf0e10cSrcweir using ::com::sun::star::uno::Any; 104*cdf0e10cSrcweir using ::com::sun::star::uno::Reference; 105*cdf0e10cSrcweir using ::com::sun::star::drawing::XShape; 106*cdf0e10cSrcweir 107*cdf0e10cSrcweir extern OUString getPageApiNameFromUiName( const String& rUIName ); 108*cdf0e10cSrcweir extern String getUiNameFromPageApiNameImpl( const ::rtl::OUString& rApiName ); 109*cdf0e10cSrcweir 110*cdf0e10cSrcweir /////////////////////////////////////////////////////////////////////// 111*cdf0e10cSrcweir 112*cdf0e10cSrcweir DECLARE_STL_STDKEY_MAP(sal_uIntPtr, SfxExtItemPropertySetInfo*, SdExtPropertySetInfoCache); 113*cdf0e10cSrcweir static SdExtPropertySetInfoCache gImplImpressPropertySetInfoCache; 114*cdf0e10cSrcweir static SdExtPropertySetInfoCache gImplDrawPropertySetInfoCache; 115*cdf0e10cSrcweir 116*cdf0e10cSrcweir DECLARE_STL_STDKEY_MAP(sal_uInt32, uno::Sequence< uno::Type >*, SdTypesCache); 117*cdf0e10cSrcweir static SdTypesCache gImplTypesCache; 118*cdf0e10cSrcweir 119*cdf0e10cSrcweir /////////////////////////////////////////////////////////////////////// 120*cdf0e10cSrcweir 121*cdf0e10cSrcweir 122*cdf0e10cSrcweir #define WID_EFFECT 1 123*cdf0e10cSrcweir #define WID_SPEED 2 124*cdf0e10cSrcweir #define WID_TEXTEFFECT 3 125*cdf0e10cSrcweir #define WID_BOOKMARK 4 126*cdf0e10cSrcweir #define WID_CLICKACTION 5 127*cdf0e10cSrcweir #define WID_PLAYFULL 6 128*cdf0e10cSrcweir #define WID_SOUNDFILE 7 129*cdf0e10cSrcweir #define WID_SOUNDON 8 130*cdf0e10cSrcweir #define WID_BLUESCREEN 9 131*cdf0e10cSrcweir #define WID_VERB 10 132*cdf0e10cSrcweir #define WID_DIMCOLOR 11 133*cdf0e10cSrcweir #define WID_DIMHIDE 12 134*cdf0e10cSrcweir #define WID_DIMPREV 13 135*cdf0e10cSrcweir #define WID_PRESORDER 14 136*cdf0e10cSrcweir #define WID_STYLE 15 137*cdf0e10cSrcweir #define WID_ANIMPATH 16 138*cdf0e10cSrcweir #define WID_IMAGEMAP 17 139*cdf0e10cSrcweir #define WID_ISANIMATION 18 140*cdf0e10cSrcweir 141*cdf0e10cSrcweir #define WID_ISEMPTYPRESOBJ 20 142*cdf0e10cSrcweir #define WID_ISPRESOBJ 21 143*cdf0e10cSrcweir #define WID_MASTERDEPEND 22 144*cdf0e10cSrcweir 145*cdf0e10cSrcweir #define WID_NAVORDER 23 146*cdf0e10cSrcweir 147*cdf0e10cSrcweir #define WID_THAT_NEED_ANIMINFO 19 148*cdf0e10cSrcweir 149*cdf0e10cSrcweir 150*cdf0e10cSrcweir 151*cdf0e10cSrcweir #define IMPRESS_MAP_ENTRIES \ 152*cdf0e10cSrcweir { MAP_CHAR_LEN(UNO_NAME_OBJ_ANIMATIONPATH), WID_ANIMPATH, &ITYPE(drawing::XShape), 0, 0},\ 153*cdf0e10cSrcweir { MAP_CHAR_LEN(UNO_NAME_OBJ_BOOKMARK), WID_BOOKMARK, &::getCppuType((const OUString*)0), 0, 0},\ 154*cdf0e10cSrcweir { MAP_CHAR_LEN(UNO_NAME_OBJ_DIMCOLOR), WID_DIMCOLOR, &::getCppuType((const sal_Int32*)0), 0, 0},\ 155*cdf0e10cSrcweir { MAP_CHAR_LEN(UNO_NAME_OBJ_DIMHIDE), WID_DIMHIDE, &::getBooleanCppuType(), 0, 0},\ 156*cdf0e10cSrcweir { MAP_CHAR_LEN(UNO_NAME_OBJ_DIMPREV), WID_DIMPREV, &::getBooleanCppuType(), 0, 0},\ 157*cdf0e10cSrcweir { MAP_CHAR_LEN(UNO_NAME_OBJ_EFFECT), WID_EFFECT, &::getCppuType((const presentation::AnimationEffect*)0), 0, 0},\ 158*cdf0e10cSrcweir { MAP_CHAR_LEN(UNO_NAME_OBJ_ISEMPTYPRESOBJ),WID_ISEMPTYPRESOBJ, &::getBooleanCppuType(), 0, 0},\ 159*cdf0e10cSrcweir { MAP_CHAR_LEN(UNO_NAME_OBJ_ISPRESOBJ), WID_ISPRESOBJ, &::getBooleanCppuType(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},\ 160*cdf0e10cSrcweir { MAP_CHAR_LEN(UNO_NAME_OBJ_MASTERDEPENDENT),WID_MASTERDEPEND, &::getBooleanCppuType(), 0, 0},\ 161*cdf0e10cSrcweir { MAP_CHAR_LEN(UNO_NAME_OBJ_CLICKACTION), WID_CLICKACTION, &::getCppuType((const presentation::ClickAction*)0), 0, 0},\ 162*cdf0e10cSrcweir { MAP_CHAR_LEN(UNO_NAME_OBJ_PLAYFULL), WID_PLAYFULL, &::getBooleanCppuType(), 0, 0},\ 163*cdf0e10cSrcweir { MAP_CHAR_LEN(UNO_NAME_OBJ_PRESORDER), WID_PRESORDER, &::getCppuType((const sal_Int32*)0), 0, 0},\ 164*cdf0e10cSrcweir { MAP_CHAR_LEN(UNO_NAME_OBJ_STYLE), WID_STYLE, &ITYPE( style::XStyle), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0},\ 165*cdf0e10cSrcweir { MAP_CHAR_LEN(UNO_NAME_OBJ_SOUNDFILE), WID_SOUNDFILE, &::getCppuType((const OUString*)0), 0, 0},\ 166*cdf0e10cSrcweir { MAP_CHAR_LEN(UNO_NAME_OBJ_SOUNDON), WID_SOUNDON, &::getBooleanCppuType(), 0, 0},\ 167*cdf0e10cSrcweir { MAP_CHAR_LEN(UNO_NAME_OBJ_SPEED), WID_SPEED, &::getCppuType((const presentation::AnimationSpeed*)0), 0, 0},\ 168*cdf0e10cSrcweir { MAP_CHAR_LEN(UNO_NAME_OBJ_TEXTEFFECT), WID_TEXTEFFECT, &::getCppuType((const presentation::AnimationEffect*)0), 0, 0},\ 169*cdf0e10cSrcweir { MAP_CHAR_LEN(UNO_NAME_OBJ_BLUESCREEN), WID_BLUESCREEN, &::getCppuType((const sal_Int32*)0), 0, 0},\ 170*cdf0e10cSrcweir { MAP_CHAR_LEN(UNO_NAME_OBJ_VERB), WID_VERB, &::getCppuType((const sal_Int32*)0), 0, 0},\ 171*cdf0e10cSrcweir { MAP_CHAR_LEN("IsAnimation"), WID_ISANIMATION, &::getBooleanCppuType(), 0, 0},\ 172*cdf0e10cSrcweir { MAP_CHAR_LEN("NavigationOrder"), WID_NAVORDER, &::getCppuType((const sal_Int32*)0), 0, 0},\ 173*cdf0e10cSrcweir { 0,0,0,0,0,0} 174*cdf0e10cSrcweir 175*cdf0e10cSrcweir 176*cdf0e10cSrcweir const SfxItemPropertyMapEntry* lcl_GetImpress_SdXShapePropertyGraphicMap_Impl() 177*cdf0e10cSrcweir { 178*cdf0e10cSrcweir 179*cdf0e10cSrcweir static const SfxItemPropertyMapEntry aImpress_SdXShapePropertyGraphicMap_Impl[] = 180*cdf0e10cSrcweir { 181*cdf0e10cSrcweir { MAP_CHAR_LEN("ImageMap"), WID_IMAGEMAP, &::getCppuType((const uno::Reference< container::XIndexContainer >*)0), 0, 0 }, 182*cdf0e10cSrcweir IMPRESS_MAP_ENTRIES 183*cdf0e10cSrcweir }; 184*cdf0e10cSrcweir return aImpress_SdXShapePropertyGraphicMap_Impl; 185*cdf0e10cSrcweir } 186*cdf0e10cSrcweir 187*cdf0e10cSrcweir const SfxItemPropertyMapEntry* lcl_GetImpress_SdXShapePropertySimpleMap_Impl() 188*cdf0e10cSrcweir { 189*cdf0e10cSrcweir 190*cdf0e10cSrcweir static const SfxItemPropertyMapEntry aImpress_SdXShapePropertySimpleMap_Impl[] = 191*cdf0e10cSrcweir { 192*cdf0e10cSrcweir IMPRESS_MAP_ENTRIES 193*cdf0e10cSrcweir }; 194*cdf0e10cSrcweir return aImpress_SdXShapePropertySimpleMap_Impl; 195*cdf0e10cSrcweir } 196*cdf0e10cSrcweir 197*cdf0e10cSrcweir #define DRAW_MAP_ENTRIES\ 198*cdf0e10cSrcweir { MAP_CHAR_LEN(UNO_NAME_OBJ_BOOKMARK), WID_BOOKMARK, &::getCppuType((const OUString*)0), 0, 0},\ 199*cdf0e10cSrcweir { MAP_CHAR_LEN(UNO_NAME_OBJ_CLICKACTION), WID_CLICKACTION, &::getCppuType((const presentation::ClickAction*)0),0, 0},\ 200*cdf0e10cSrcweir { MAP_CHAR_LEN(UNO_NAME_OBJ_STYLE), WID_STYLE, &ITYPE(style::XStyle), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0},\ 201*cdf0e10cSrcweir { MAP_CHAR_LEN("NavigationOrder"), WID_NAVORDER, &::getCppuType((const sal_Int32*)0), 0, 0},\ 202*cdf0e10cSrcweir { 0,0,0,0,0,0} 203*cdf0e10cSrcweir 204*cdf0e10cSrcweir const SfxItemPropertyMapEntry* lcl_GetDraw_SdXShapePropertySimpleMap_Impl() 205*cdf0e10cSrcweir { 206*cdf0e10cSrcweir static const SfxItemPropertyMapEntry aDraw_SdXShapePropertyMap_Impl[] = 207*cdf0e10cSrcweir { 208*cdf0e10cSrcweir DRAW_MAP_ENTRIES 209*cdf0e10cSrcweir }; 210*cdf0e10cSrcweir return aDraw_SdXShapePropertyMap_Impl; 211*cdf0e10cSrcweir } 212*cdf0e10cSrcweir const SfxItemPropertyMapEntry* lcl_GetDraw_SdXShapePropertyGraphicMap_Impl() 213*cdf0e10cSrcweir { 214*cdf0e10cSrcweir static const SfxItemPropertyMapEntry aDraw_SdXShapePropertyGraphicMap_Impl[] = 215*cdf0e10cSrcweir { 216*cdf0e10cSrcweir { MAP_CHAR_LEN("ImageMap"), WID_IMAGEMAP, &::getCppuType((const uno::Reference< container::XIndexContainer >*)0), 0, 0 }, 217*cdf0e10cSrcweir DRAW_MAP_ENTRIES 218*cdf0e10cSrcweir }; 219*cdf0e10cSrcweir return aDraw_SdXShapePropertyGraphicMap_Impl; 220*cdf0e10cSrcweir } 221*cdf0e10cSrcweir const SfxItemPropertyMapEntry* lcl_ImplGetShapePropertyMap( sal_Bool bImpress, sal_Bool bGraphicObj ) 222*cdf0e10cSrcweir { 223*cdf0e10cSrcweir const SfxItemPropertyMapEntry* pRet = 0; 224*cdf0e10cSrcweir if( bImpress ) 225*cdf0e10cSrcweir { 226*cdf0e10cSrcweir if( bGraphicObj ) 227*cdf0e10cSrcweir pRet = lcl_GetImpress_SdXShapePropertyGraphicMap_Impl(); 228*cdf0e10cSrcweir else 229*cdf0e10cSrcweir pRet = lcl_GetImpress_SdXShapePropertySimpleMap_Impl(); 230*cdf0e10cSrcweir } 231*cdf0e10cSrcweir else 232*cdf0e10cSrcweir { 233*cdf0e10cSrcweir if( bGraphicObj ) 234*cdf0e10cSrcweir pRet = lcl_GetDraw_SdXShapePropertyGraphicMap_Impl(); 235*cdf0e10cSrcweir else 236*cdf0e10cSrcweir pRet = lcl_GetDraw_SdXShapePropertySimpleMap_Impl(); 237*cdf0e10cSrcweir } 238*cdf0e10cSrcweir return pRet; 239*cdf0e10cSrcweir 240*cdf0e10cSrcweir } 241*cdf0e10cSrcweir const SvxItemPropertySet* lcl_ImplGetShapePropertySet( sal_Bool bImpress, sal_Bool bGraphicObj ) 242*cdf0e10cSrcweir { 243*cdf0e10cSrcweir const SvxItemPropertySet* pRet = 0; 244*cdf0e10cSrcweir if( bImpress ) 245*cdf0e10cSrcweir { 246*cdf0e10cSrcweir if( bGraphicObj ) 247*cdf0e10cSrcweir { 248*cdf0e10cSrcweir static SvxItemPropertySet aImpress_SdXShapePropertyGraphicSet_Impl( lcl_GetImpress_SdXShapePropertyGraphicMap_Impl(), SdrObject::GetGlobalDrawObjectItemPool()); 249*cdf0e10cSrcweir pRet = &aImpress_SdXShapePropertyGraphicSet_Impl; 250*cdf0e10cSrcweir } 251*cdf0e10cSrcweir else 252*cdf0e10cSrcweir { 253*cdf0e10cSrcweir static SvxItemPropertySet aImpress_SdXShapePropertySet_Impl(lcl_GetImpress_SdXShapePropertySimpleMap_Impl(), SdrObject::GetGlobalDrawObjectItemPool()); 254*cdf0e10cSrcweir pRet = &aImpress_SdXShapePropertySet_Impl; 255*cdf0e10cSrcweir } 256*cdf0e10cSrcweir } 257*cdf0e10cSrcweir else 258*cdf0e10cSrcweir { 259*cdf0e10cSrcweir if( bGraphicObj ) 260*cdf0e10cSrcweir { 261*cdf0e10cSrcweir static SvxItemPropertySet aDraw_SdXShapePropertyGraphicSet_Impl(lcl_GetDraw_SdXShapePropertyGraphicMap_Impl(), SdrObject::GetGlobalDrawObjectItemPool()); 262*cdf0e10cSrcweir pRet = &aDraw_SdXShapePropertyGraphicSet_Impl; 263*cdf0e10cSrcweir } 264*cdf0e10cSrcweir else 265*cdf0e10cSrcweir { 266*cdf0e10cSrcweir static SvxItemPropertySet aDraw_SdXShapePropertySet_Impl( lcl_GetDraw_SdXShapePropertySimpleMap_Impl(), SdrObject::GetGlobalDrawObjectItemPool()); 267*cdf0e10cSrcweir pRet = &aDraw_SdXShapePropertySet_Impl; 268*cdf0e10cSrcweir } 269*cdf0e10cSrcweir } 270*cdf0e10cSrcweir return pRet; 271*cdf0e10cSrcweir } 272*cdf0e10cSrcweir const SfxItemPropertyMapEntry* lcl_GetEmpty_SdXShapePropertyMap_Impl() 273*cdf0e10cSrcweir { 274*cdf0e10cSrcweir static SfxItemPropertyMapEntry aEmpty_SdXShapePropertyMap_Impl[] = 275*cdf0e10cSrcweir { 276*cdf0e10cSrcweir { 0,0,0,0,0,0} 277*cdf0e10cSrcweir }; 278*cdf0e10cSrcweir return aEmpty_SdXShapePropertyMap_Impl; 279*cdf0e10cSrcweir } 280*cdf0e10cSrcweir 281*cdf0e10cSrcweir static const SvxItemPropertySet* lcl_GetEmpty_SdXShapePropertySet_Impl() 282*cdf0e10cSrcweir { 283*cdf0e10cSrcweir static SvxItemPropertySet aEmptyPropSet( lcl_GetEmpty_SdXShapePropertyMap_Impl(), SdrObject::GetGlobalDrawObjectItemPool() ); 284*cdf0e10cSrcweir return &aEmptyPropSet; 285*cdf0e10cSrcweir } 286*cdf0e10cSrcweir const SvEventDescription* ImplGetSupportedMacroItems() 287*cdf0e10cSrcweir { 288*cdf0e10cSrcweir static const SvEventDescription aMacroDescriptionsImpl[] = 289*cdf0e10cSrcweir { 290*cdf0e10cSrcweir { SFX_EVENT_MOUSEOVER_OBJECT, "OnMouseOver" }, 291*cdf0e10cSrcweir { SFX_EVENT_MOUSEOUT_OBJECT, "OnMouseOut" }, 292*cdf0e10cSrcweir { 0, NULL } 293*cdf0e10cSrcweir }; 294*cdf0e10cSrcweir 295*cdf0e10cSrcweir return aMacroDescriptionsImpl; 296*cdf0e10cSrcweir } 297*cdf0e10cSrcweir 298*cdf0e10cSrcweir /************************************************************************* 299*cdf0e10cSrcweir |* 300*cdf0e10cSrcweir |* Vergleichsfkt. fuer QSort 301*cdf0e10cSrcweir |* 302*cdf0e10cSrcweir \************************************************************************/ 303*cdf0e10cSrcweir struct SortStruct 304*cdf0e10cSrcweir { 305*cdf0e10cSrcweir SdrObject* pObj; 306*cdf0e10cSrcweir sal_uInt32 nOrder; 307*cdf0e10cSrcweir }; 308*cdf0e10cSrcweir 309*cdf0e10cSrcweir typedef SortStruct SORT; 310*cdf0e10cSrcweir typedef SORT* PSORT; 311*cdf0e10cSrcweir 312*cdf0e10cSrcweir extern "C" int __LOADONCALLAPI SortFunc( const void* p1, const void* p2 ); 313*cdf0e10cSrcweir 314*cdf0e10cSrcweir SdXShape::SdXShape( SvxShape* pShape, SdXImpressDocument* pModel) throw() 315*cdf0e10cSrcweir : mpShape( pShape ), 316*cdf0e10cSrcweir mpPropSet( pModel? 317*cdf0e10cSrcweir lcl_ImplGetShapePropertySet(pModel->IsImpressDocument(), pShape->getShapeKind() == OBJ_GRAF ) 318*cdf0e10cSrcweir : lcl_GetEmpty_SdXShapePropertySet_Impl() ), 319*cdf0e10cSrcweir mpMap( pModel? 320*cdf0e10cSrcweir lcl_ImplGetShapePropertyMap(pModel->IsImpressDocument(), pShape->getShapeKind() == OBJ_GRAF ) 321*cdf0e10cSrcweir : lcl_GetEmpty_SdXShapePropertyMap_Impl() ), 322*cdf0e10cSrcweir mpModel(pModel), 323*cdf0e10cSrcweir mpImplementationId( NULL ) 324*cdf0e10cSrcweir 325*cdf0e10cSrcweir { 326*cdf0e10cSrcweir 327*cdf0e10cSrcweir pShape->setMaster( this ); 328*cdf0e10cSrcweir } 329*cdf0e10cSrcweir 330*cdf0e10cSrcweir SdXShape::~SdXShape() throw() 331*cdf0e10cSrcweir { 332*cdf0e10cSrcweir } 333*cdf0e10cSrcweir 334*cdf0e10cSrcweir void SdXShape::dispose() 335*cdf0e10cSrcweir { 336*cdf0e10cSrcweir mpShape->setMaster( NULL ); 337*cdf0e10cSrcweir delete this; 338*cdf0e10cSrcweir } 339*cdf0e10cSrcweir 340*cdf0e10cSrcweir // XInterface 341*cdf0e10cSrcweir uno::Any SAL_CALL SdXShape::queryAggregation( const uno::Type & rType ) 342*cdf0e10cSrcweir throw(uno::RuntimeException) 343*cdf0e10cSrcweir { 344*cdf0e10cSrcweir return mpShape->queryAggregation( rType ); 345*cdf0e10cSrcweir } 346*cdf0e10cSrcweir 347*cdf0e10cSrcweir uno::Any SAL_CALL SdXShape::queryInterface( const uno::Type & rType ) 348*cdf0e10cSrcweir throw(uno::RuntimeException) 349*cdf0e10cSrcweir { 350*cdf0e10cSrcweir return mpShape->queryInterface( rType ); 351*cdf0e10cSrcweir } 352*cdf0e10cSrcweir 353*cdf0e10cSrcweir void SAL_CALL SdXShape::acquire() throw() 354*cdf0e10cSrcweir { 355*cdf0e10cSrcweir mpShape->acquire(); 356*cdf0e10cSrcweir } 357*cdf0e10cSrcweir 358*cdf0e10cSrcweir void SAL_CALL SdXShape::release() throw() 359*cdf0e10cSrcweir { 360*cdf0e10cSrcweir mpShape->release(); 361*cdf0e10cSrcweir } 362*cdf0e10cSrcweir 363*cdf0e10cSrcweir sal_Bool SdXShape::queryAggregation( const com::sun::star::uno::Type & rType, com::sun::star::uno::Any& aAny ) 364*cdf0e10cSrcweir { 365*cdf0e10cSrcweir if( mpModel && mpModel ->IsImpressDocument() ) 366*cdf0e10cSrcweir { 367*cdf0e10cSrcweir if( rType == ::getCppuType(( const uno::Reference< document::XEventsSupplier >*)0) ) 368*cdf0e10cSrcweir { 369*cdf0e10cSrcweir aAny <<= uno::Reference< document::XEventsSupplier >(this); 370*cdf0e10cSrcweir return sal_True; 371*cdf0e10cSrcweir } 372*cdf0e10cSrcweir } 373*cdf0e10cSrcweir 374*cdf0e10cSrcweir return sal_False; 375*cdf0e10cSrcweir } 376*cdf0e10cSrcweir 377*cdf0e10cSrcweir uno::Sequence< uno::Type > SAL_CALL SdXShape::getTypes() 378*cdf0e10cSrcweir throw (uno::RuntimeException) 379*cdf0e10cSrcweir { 380*cdf0e10cSrcweir if( mpModel && !mpModel->IsImpressDocument() ) 381*cdf0e10cSrcweir { 382*cdf0e10cSrcweir return mpShape->_getTypes(); 383*cdf0e10cSrcweir } 384*cdf0e10cSrcweir else 385*cdf0e10cSrcweir { 386*cdf0e10cSrcweir const sal_uInt32 nObjId = mpShape->getShapeKind(); 387*cdf0e10cSrcweir uno::Sequence< uno::Type >* pTypes; 388*cdf0e10cSrcweir SdTypesCache::iterator aIter( gImplTypesCache.find( nObjId ) ); 389*cdf0e10cSrcweir if( aIter == gImplTypesCache.end() ) 390*cdf0e10cSrcweir { 391*cdf0e10cSrcweir pTypes = new uno::Sequence< uno::Type >( mpShape->_getTypes() ); 392*cdf0e10cSrcweir sal_uInt32 nCount = pTypes->getLength(); 393*cdf0e10cSrcweir pTypes->realloc( nCount+1 ); 394*cdf0e10cSrcweir (*pTypes)[nCount] = ::getCppuType((const uno::Reference< lang::XTypeProvider>*)0); 395*cdf0e10cSrcweir 396*cdf0e10cSrcweir gImplTypesCache[ nObjId ] = pTypes; 397*cdf0e10cSrcweir } 398*cdf0e10cSrcweir else 399*cdf0e10cSrcweir { 400*cdf0e10cSrcweir // use the already computed implementation id 401*cdf0e10cSrcweir pTypes = (*aIter).second; 402*cdf0e10cSrcweir } 403*cdf0e10cSrcweir return *pTypes; 404*cdf0e10cSrcweir } 405*cdf0e10cSrcweir } 406*cdf0e10cSrcweir 407*cdf0e10cSrcweir // XPropertyState 408*cdf0e10cSrcweir beans::PropertyState SAL_CALL SdXShape::getPropertyState( const OUString& PropertyName ) throw( beans::UnknownPropertyException, uno::RuntimeException) 409*cdf0e10cSrcweir { 410*cdf0e10cSrcweir OGuard aGuard( Application::GetSolarMutex() ); 411*cdf0e10cSrcweir 412*cdf0e10cSrcweir if( mpPropSet->getPropertyMapEntry(PropertyName) ) 413*cdf0e10cSrcweir { 414*cdf0e10cSrcweir return beans::PropertyState_DIRECT_VALUE; 415*cdf0e10cSrcweir } 416*cdf0e10cSrcweir else 417*cdf0e10cSrcweir { 418*cdf0e10cSrcweir SdrObject* pObj = mpShape->GetSdrObject(); 419*cdf0e10cSrcweir if( pObj == NULL || ( pObj->GetPage()->IsMasterPage() && pObj->IsEmptyPresObj() ) ) 420*cdf0e10cSrcweir return beans::PropertyState_DEFAULT_VALUE; 421*cdf0e10cSrcweir 422*cdf0e10cSrcweir return mpShape->_getPropertyState( PropertyName ); 423*cdf0e10cSrcweir } 424*cdf0e10cSrcweir } 425*cdf0e10cSrcweir 426*cdf0e10cSrcweir void SAL_CALL SdXShape::setPropertyToDefault( const OUString& PropertyName ) throw( beans::UnknownPropertyException, uno::RuntimeException) 427*cdf0e10cSrcweir { 428*cdf0e10cSrcweir OGuard aGuard( Application::GetSolarMutex() ); 429*cdf0e10cSrcweir 430*cdf0e10cSrcweir if( mpPropSet->getPropertyMapEntry(PropertyName) ) 431*cdf0e10cSrcweir { 432*cdf0e10cSrcweir return; 433*cdf0e10cSrcweir } 434*cdf0e10cSrcweir else 435*cdf0e10cSrcweir { 436*cdf0e10cSrcweir mpShape->_setPropertyToDefault(PropertyName); 437*cdf0e10cSrcweir } 438*cdf0e10cSrcweir } 439*cdf0e10cSrcweir 440*cdf0e10cSrcweir uno::Any SAL_CALL SdXShape::getPropertyDefault( const OUString& aPropertyName ) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) 441*cdf0e10cSrcweir { 442*cdf0e10cSrcweir OGuard aGuard( Application::GetSolarMutex() ); 443*cdf0e10cSrcweir 444*cdf0e10cSrcweir if( mpPropSet->getPropertyMapEntry(aPropertyName) ) 445*cdf0e10cSrcweir { 446*cdf0e10cSrcweir return getPropertyValue( aPropertyName ); 447*cdf0e10cSrcweir } 448*cdf0e10cSrcweir else 449*cdf0e10cSrcweir { 450*cdf0e10cSrcweir uno::Any aRet( mpShape->_getPropertyDefault(aPropertyName) ); 451*cdf0e10cSrcweir 452*cdf0e10cSrcweir if( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_shape_layername ) ) ) 453*cdf0e10cSrcweir { 454*cdf0e10cSrcweir OUString aName; 455*cdf0e10cSrcweir if( aRet >>= aName ) 456*cdf0e10cSrcweir { 457*cdf0e10cSrcweir aName = SdLayer::convertToExternalName( aName ); 458*cdf0e10cSrcweir aRet <<= aName; 459*cdf0e10cSrcweir } 460*cdf0e10cSrcweir } 461*cdf0e10cSrcweir return aRet; 462*cdf0e10cSrcweir } 463*cdf0e10cSrcweir } 464*cdf0e10cSrcweir 465*cdf0e10cSrcweir //XPropertySet 466*cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL SdXShape::getPropertySetInfo() 467*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException) 468*cdf0e10cSrcweir { 469*cdf0e10cSrcweir sal_uIntPtr nObjId = (sal_uIntPtr)mpShape->getPropertyMapEntries(); 470*cdf0e10cSrcweir SfxExtItemPropertySetInfo* pInfo = NULL; 471*cdf0e10cSrcweir 472*cdf0e10cSrcweir SdExtPropertySetInfoCache* pCache = (mpModel && mpModel->IsImpressDocument()) ? 473*cdf0e10cSrcweir &gImplImpressPropertySetInfoCache : &gImplDrawPropertySetInfoCache; 474*cdf0e10cSrcweir 475*cdf0e10cSrcweir SdExtPropertySetInfoCache::iterator aIter( pCache->find( nObjId ) ); 476*cdf0e10cSrcweir if( aIter == pCache->end() ) 477*cdf0e10cSrcweir { 478*cdf0e10cSrcweir uno::Reference< beans::XPropertySetInfo > xInfo( mpShape->_getPropertySetInfo() ); 479*cdf0e10cSrcweir pInfo = new SfxExtItemPropertySetInfo( mpMap, xInfo->getProperties() ); 480*cdf0e10cSrcweir pInfo->acquire(); 481*cdf0e10cSrcweir 482*cdf0e10cSrcweir (*pCache)[ nObjId ] = pInfo; 483*cdf0e10cSrcweir } 484*cdf0e10cSrcweir else 485*cdf0e10cSrcweir { 486*cdf0e10cSrcweir // use the already computed implementation id 487*cdf0e10cSrcweir pInfo = (*aIter).second; 488*cdf0e10cSrcweir } 489*cdf0e10cSrcweir 490*cdf0e10cSrcweir uno::Reference< beans::XPropertySetInfo > xInfo( pInfo ); 491*cdf0e10cSrcweir return pInfo; 492*cdf0e10cSrcweir } 493*cdf0e10cSrcweir 494*cdf0e10cSrcweir void SAL_CALL SdXShape::setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) 495*cdf0e10cSrcweir throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) 496*cdf0e10cSrcweir { 497*cdf0e10cSrcweir OGuard aGuard( Application::GetSolarMutex() ); 498*cdf0e10cSrcweir 499*cdf0e10cSrcweir const SfxItemPropertySimpleEntry* pEntry = mpPropSet->getPropertyMapEntry(aPropertyName); 500*cdf0e10cSrcweir 501*cdf0e10cSrcweir if( pEntry ) 502*cdf0e10cSrcweir { 503*cdf0e10cSrcweir SdrObject* pObj = mpShape->GetSdrObject(); 504*cdf0e10cSrcweir if( pObj ) 505*cdf0e10cSrcweir { 506*cdf0e10cSrcweir SdAnimationInfo* pInfo = GetAnimationInfo((pEntry->nWID <= WID_THAT_NEED_ANIMINFO)?sal_True:sal_False); 507*cdf0e10cSrcweir 508*cdf0e10cSrcweir switch(pEntry->nWID) 509*cdf0e10cSrcweir { 510*cdf0e10cSrcweir case WID_NAVORDER: 511*cdf0e10cSrcweir { 512*cdf0e10cSrcweir sal_Int32 nNavOrder = 0; 513*cdf0e10cSrcweir if(!(aValue >>= nNavOrder)) 514*cdf0e10cSrcweir throw lang::IllegalArgumentException(); 515*cdf0e10cSrcweir 516*cdf0e10cSrcweir SdrObjList* pObjList = pObj->GetObjList(); 517*cdf0e10cSrcweir if( pObjList ) 518*cdf0e10cSrcweir pObjList->SetObjectNavigationPosition( *pObj, (nNavOrder < 0) ? SAL_MAX_UINT32 : static_cast< sal_uInt32 >( nNavOrder ) ); 519*cdf0e10cSrcweir break; 520*cdf0e10cSrcweir } 521*cdf0e10cSrcweir 522*cdf0e10cSrcweir case WID_EFFECT: 523*cdf0e10cSrcweir { 524*cdf0e10cSrcweir AnimationEffect eEffect; 525*cdf0e10cSrcweir if(!(aValue >>= eEffect)) 526*cdf0e10cSrcweir throw lang::IllegalArgumentException(); 527*cdf0e10cSrcweir 528*cdf0e10cSrcweir EffectMigration::SetAnimationEffect( mpShape, eEffect ); 529*cdf0e10cSrcweir break; 530*cdf0e10cSrcweir } 531*cdf0e10cSrcweir case WID_TEXTEFFECT: 532*cdf0e10cSrcweir { 533*cdf0e10cSrcweir AnimationEffect eEffect; 534*cdf0e10cSrcweir if(!(aValue >>= eEffect)) 535*cdf0e10cSrcweir throw lang::IllegalArgumentException(); 536*cdf0e10cSrcweir 537*cdf0e10cSrcweir EffectMigration::SetTextAnimationEffect( mpShape, eEffect ); 538*cdf0e10cSrcweir break; 539*cdf0e10cSrcweir } 540*cdf0e10cSrcweir case WID_SPEED: 541*cdf0e10cSrcweir { 542*cdf0e10cSrcweir AnimationSpeed eSpeed; 543*cdf0e10cSrcweir if(!(aValue>>=eSpeed)) 544*cdf0e10cSrcweir throw lang::IllegalArgumentException(); 545*cdf0e10cSrcweir 546*cdf0e10cSrcweir EffectMigration::SetAnimationSpeed( mpShape, eSpeed ); 547*cdf0e10cSrcweir break; 548*cdf0e10cSrcweir } 549*cdf0e10cSrcweir /* TODO?? case WID_ISANIMATION: 550*cdf0e10cSrcweir { 551*cdf0e10cSrcweir 552*cdf0e10cSrcweir sal_Bool bIsAnimation; 553*cdf0e10cSrcweir if(!(aValue >>= bIsAnimation)) 554*cdf0e10cSrcweir throw lang::IllegalArgumentException(); 555*cdf0e10cSrcweir 556*cdf0e10cSrcweir pInfo->mbIsMovie = bIsAnimation; 557*cdf0e10cSrcweir break; 558*cdf0e10cSrcweir } 559*cdf0e10cSrcweir */ 560*cdf0e10cSrcweir case WID_BOOKMARK: 561*cdf0e10cSrcweir { 562*cdf0e10cSrcweir OUString aString; 563*cdf0e10cSrcweir if(!(aValue >>= aString)) 564*cdf0e10cSrcweir throw lang::IllegalArgumentException(); 565*cdf0e10cSrcweir 566*cdf0e10cSrcweir pInfo->SetBookmark( SdDrawPage::getUiNameFromPageApiName( aString ) ); 567*cdf0e10cSrcweir break; 568*cdf0e10cSrcweir } 569*cdf0e10cSrcweir case WID_CLICKACTION: 570*cdf0e10cSrcweir ::cppu::any2enum< presentation::ClickAction >( pInfo->meClickAction, aValue); 571*cdf0e10cSrcweir break; 572*cdf0e10cSrcweir 573*cdf0e10cSrcweir /* todo? 574*cdf0e10cSrcweir case WID_PLAYFULL: 575*cdf0e10cSrcweir pInfo->mbPlayFull = ::cppu::any2bool(aValue); 576*cdf0e10cSrcweir break; 577*cdf0e10cSrcweir */ 578*cdf0e10cSrcweir case WID_SOUNDFILE: 579*cdf0e10cSrcweir { 580*cdf0e10cSrcweir OUString aString; 581*cdf0e10cSrcweir if(!(aValue >>= aString)) 582*cdf0e10cSrcweir throw lang::IllegalArgumentException(); 583*cdf0e10cSrcweir pInfo->maSoundFile = aString; 584*cdf0e10cSrcweir EffectMigration::UpdateSoundEffect( mpShape, pInfo ); 585*cdf0e10cSrcweir break; 586*cdf0e10cSrcweir } 587*cdf0e10cSrcweir 588*cdf0e10cSrcweir case WID_SOUNDON: 589*cdf0e10cSrcweir { 590*cdf0e10cSrcweir if( !(aValue >>= pInfo->mbSoundOn) ) 591*cdf0e10cSrcweir throw lang::IllegalArgumentException(); 592*cdf0e10cSrcweir EffectMigration::UpdateSoundEffect( mpShape, pInfo ); 593*cdf0e10cSrcweir break; 594*cdf0e10cSrcweir } 595*cdf0e10cSrcweir /* 596*cdf0e10cSrcweir case WID_BLUESCREEN: 597*cdf0e10cSrcweir { 598*cdf0e10cSrcweir sal_Int32 nColor; 599*cdf0e10cSrcweir if(!(aValue >>= nColor)) 600*cdf0e10cSrcweir throw lang::IllegalArgumentException(); 601*cdf0e10cSrcweir 602*cdf0e10cSrcweir pInfo->maBlueScreen.SetColor( nColor ); 603*cdf0e10cSrcweir break; 604*cdf0e10cSrcweir } 605*cdf0e10cSrcweir */ 606*cdf0e10cSrcweir case WID_VERB: 607*cdf0e10cSrcweir { 608*cdf0e10cSrcweir sal_Int32 nVerb = 0; 609*cdf0e10cSrcweir if(!(aValue >>= nVerb)) 610*cdf0e10cSrcweir throw lang::IllegalArgumentException(); 611*cdf0e10cSrcweir 612*cdf0e10cSrcweir pInfo->mnVerb = (sal_uInt16)nVerb; 613*cdf0e10cSrcweir break; 614*cdf0e10cSrcweir } 615*cdf0e10cSrcweir case WID_DIMCOLOR: 616*cdf0e10cSrcweir { 617*cdf0e10cSrcweir sal_Int32 nColor = 0; 618*cdf0e10cSrcweir 619*cdf0e10cSrcweir if( !(aValue >>= nColor) ) 620*cdf0e10cSrcweir throw lang::IllegalArgumentException(); 621*cdf0e10cSrcweir 622*cdf0e10cSrcweir EffectMigration::SetDimColor( mpShape, nColor ); 623*cdf0e10cSrcweir break; 624*cdf0e10cSrcweir } 625*cdf0e10cSrcweir case WID_DIMHIDE: 626*cdf0e10cSrcweir { 627*cdf0e10cSrcweir sal_Bool bDimHide = sal_False; 628*cdf0e10cSrcweir if( !(aValue >>= bDimHide) ) 629*cdf0e10cSrcweir lang::IllegalArgumentException(); 630*cdf0e10cSrcweir 631*cdf0e10cSrcweir EffectMigration::SetDimHide( mpShape, bDimHide ); 632*cdf0e10cSrcweir break; 633*cdf0e10cSrcweir } 634*cdf0e10cSrcweir case WID_DIMPREV: 635*cdf0e10cSrcweir { 636*cdf0e10cSrcweir sal_Bool bDimPrevious = sal_False; 637*cdf0e10cSrcweir if( !(aValue >>= bDimPrevious) ) 638*cdf0e10cSrcweir lang::IllegalArgumentException(); 639*cdf0e10cSrcweir 640*cdf0e10cSrcweir EffectMigration::SetDimPrevious( mpShape, bDimPrevious ); 641*cdf0e10cSrcweir break; 642*cdf0e10cSrcweir } 643*cdf0e10cSrcweir case WID_PRESORDER: 644*cdf0e10cSrcweir { 645*cdf0e10cSrcweir sal_Int32 nNewPos = 0; 646*cdf0e10cSrcweir if( !(aValue >>= nNewPos) ) 647*cdf0e10cSrcweir lang::IllegalArgumentException(); 648*cdf0e10cSrcweir 649*cdf0e10cSrcweir EffectMigration::SetPresentationOrder( mpShape, nNewPos ); 650*cdf0e10cSrcweir break; 651*cdf0e10cSrcweir } 652*cdf0e10cSrcweir case WID_STYLE: 653*cdf0e10cSrcweir SetStyleSheet( aValue ); 654*cdf0e10cSrcweir break; 655*cdf0e10cSrcweir case WID_ISEMPTYPRESOBJ: 656*cdf0e10cSrcweir SetEmptyPresObj( ::cppu::any2bool(aValue) ); 657*cdf0e10cSrcweir break; 658*cdf0e10cSrcweir case WID_MASTERDEPEND: 659*cdf0e10cSrcweir SetMasterDepend( ::cppu::any2bool(aValue) ); 660*cdf0e10cSrcweir break; 661*cdf0e10cSrcweir case WID_ANIMPATH: 662*cdf0e10cSrcweir { 663*cdf0e10cSrcweir uno::Reference< drawing::XShape > xShape( aValue, uno::UNO_QUERY ); 664*cdf0e10cSrcweir SdrPathObj* pObj2 = xShape.is() ? dynamic_cast< SdrPathObj* >( GetSdrObjectFromXShape( xShape ) ) : NULL; 665*cdf0e10cSrcweir 666*cdf0e10cSrcweir if( pObj2 == NULL ) 667*cdf0e10cSrcweir throw lang::IllegalArgumentException(); 668*cdf0e10cSrcweir 669*cdf0e10cSrcweir EffectMigration::SetAnimationPath( mpShape, pObj2 ); 670*cdf0e10cSrcweir break; 671*cdf0e10cSrcweir } 672*cdf0e10cSrcweir case WID_IMAGEMAP: 673*cdf0e10cSrcweir { 674*cdf0e10cSrcweir SdDrawDocument* pDoc = mpModel?mpModel->GetDoc():NULL; 675*cdf0e10cSrcweir if( pDoc ) 676*cdf0e10cSrcweir { 677*cdf0e10cSrcweir ImageMap aImageMap; 678*cdf0e10cSrcweir uno::Reference< uno::XInterface > xImageMap; 679*cdf0e10cSrcweir aValue >>= xImageMap; 680*cdf0e10cSrcweir 681*cdf0e10cSrcweir if( !xImageMap.is() || !SvUnoImageMap_fillImageMap( xImageMap, aImageMap ) ) 682*cdf0e10cSrcweir throw lang::IllegalArgumentException(); 683*cdf0e10cSrcweir 684*cdf0e10cSrcweir SdIMapInfo* pIMapInfo = pDoc->GetIMapInfo(pObj); 685*cdf0e10cSrcweir if( pIMapInfo ) 686*cdf0e10cSrcweir { 687*cdf0e10cSrcweir // replace existing image map 688*cdf0e10cSrcweir pIMapInfo->SetImageMap( aImageMap ); 689*cdf0e10cSrcweir } 690*cdf0e10cSrcweir else 691*cdf0e10cSrcweir { 692*cdf0e10cSrcweir // insert new user data with image map 693*cdf0e10cSrcweir pObj->InsertUserData(new SdIMapInfo(aImageMap) ); 694*cdf0e10cSrcweir } 695*cdf0e10cSrcweir } 696*cdf0e10cSrcweir } 697*cdf0e10cSrcweir } 698*cdf0e10cSrcweir } 699*cdf0e10cSrcweir } 700*cdf0e10cSrcweir else 701*cdf0e10cSrcweir { 702*cdf0e10cSrcweir uno::Any aAny( aValue ); 703*cdf0e10cSrcweir 704*cdf0e10cSrcweir if( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_shape_layername ) ) ) 705*cdf0e10cSrcweir { 706*cdf0e10cSrcweir OUString aName; 707*cdf0e10cSrcweir if( aAny >>= aName ) 708*cdf0e10cSrcweir { 709*cdf0e10cSrcweir aName = SdLayer::convertToInternalName( aName ); 710*cdf0e10cSrcweir aAny <<= aName; 711*cdf0e10cSrcweir } 712*cdf0e10cSrcweir } 713*cdf0e10cSrcweir 714*cdf0e10cSrcweir mpShape->_setPropertyValue(aPropertyName, aAny); 715*cdf0e10cSrcweir } 716*cdf0e10cSrcweir 717*cdf0e10cSrcweir if( mpModel ) 718*cdf0e10cSrcweir mpModel->SetModified(); 719*cdf0e10cSrcweir } 720*cdf0e10cSrcweir 721*cdf0e10cSrcweir ::com::sun::star::uno::Any SAL_CALL SdXShape::getPropertyValue( const ::rtl::OUString& PropertyName ) 722*cdf0e10cSrcweir throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) 723*cdf0e10cSrcweir { 724*cdf0e10cSrcweir OGuard aGuard( Application::GetSolarMutex() ); 725*cdf0e10cSrcweir 726*cdf0e10cSrcweir uno::Any aRet; 727*cdf0e10cSrcweir 728*cdf0e10cSrcweir const SfxItemPropertySimpleEntry* pEntry = mpPropSet->getPropertyMapEntry(PropertyName); 729*cdf0e10cSrcweir 730*cdf0e10cSrcweir if( pEntry && mpShape->GetSdrObject() ) 731*cdf0e10cSrcweir { 732*cdf0e10cSrcweir SdAnimationInfo* pInfo = GetAnimationInfo(sal_False); 733*cdf0e10cSrcweir 734*cdf0e10cSrcweir switch(pEntry->nWID) 735*cdf0e10cSrcweir { 736*cdf0e10cSrcweir case WID_NAVORDER: 737*cdf0e10cSrcweir { 738*cdf0e10cSrcweir const sal_uInt32 nNavOrder = mpShape->GetSdrObject()->GetNavigationPosition(); 739*cdf0e10cSrcweir aRet <<= nNavOrder == SAL_MAX_UINT32 ? static_cast<sal_Int32>(-1) : static_cast< sal_Int32 >(nNavOrder); 740*cdf0e10cSrcweir } 741*cdf0e10cSrcweir break; 742*cdf0e10cSrcweir case WID_EFFECT: 743*cdf0e10cSrcweir aRet <<= EffectMigration::GetAnimationEffect( mpShape ); 744*cdf0e10cSrcweir break; 745*cdf0e10cSrcweir case WID_TEXTEFFECT: 746*cdf0e10cSrcweir aRet <<= EffectMigration::GetTextAnimationEffect( mpShape ); 747*cdf0e10cSrcweir break; 748*cdf0e10cSrcweir case WID_ISPRESOBJ: 749*cdf0e10cSrcweir aRet <<= (sal_Bool)IsPresObj(); 750*cdf0e10cSrcweir break; 751*cdf0e10cSrcweir case WID_ISEMPTYPRESOBJ: 752*cdf0e10cSrcweir aRet <<= (sal_Bool)IsEmptyPresObj(); 753*cdf0e10cSrcweir break; 754*cdf0e10cSrcweir case WID_MASTERDEPEND: 755*cdf0e10cSrcweir aRet <<= (sal_Bool)IsMasterDepend(); 756*cdf0e10cSrcweir break; 757*cdf0e10cSrcweir case WID_SPEED: 758*cdf0e10cSrcweir aRet <<= EffectMigration::GetAnimationSpeed( mpShape ); 759*cdf0e10cSrcweir break; 760*cdf0e10cSrcweir case WID_ISANIMATION: 761*cdf0e10cSrcweir aRet <<= (sal_Bool)( pInfo && pInfo->mbIsMovie); 762*cdf0e10cSrcweir break; 763*cdf0e10cSrcweir case WID_BOOKMARK: 764*cdf0e10cSrcweir { 765*cdf0e10cSrcweir OUString aString; 766*cdf0e10cSrcweir if( pInfo ) 767*cdf0e10cSrcweir { 768*cdf0e10cSrcweir SdDrawDocument* pDoc = mpModel?mpModel->GetDoc():NULL; 769*cdf0e10cSrcweir // is the bookmark a page? 770*cdf0e10cSrcweir sal_Bool bIsMasterPage; 771*cdf0e10cSrcweir if(pDoc->GetPageByName( pInfo->GetBookmark(), bIsMasterPage ) != SDRPAGE_NOTFOUND) 772*cdf0e10cSrcweir { 773*cdf0e10cSrcweir aString = SdDrawPage::getPageApiNameFromUiName( pInfo->GetBookmark() ); 774*cdf0e10cSrcweir } 775*cdf0e10cSrcweir else 776*cdf0e10cSrcweir { 777*cdf0e10cSrcweir aString = pInfo->GetBookmark() ; 778*cdf0e10cSrcweir sal_Int32 nPos = aString.lastIndexOf( sal_Unicode('#') ); 779*cdf0e10cSrcweir if( nPos >= 0 ) 780*cdf0e10cSrcweir { 781*cdf0e10cSrcweir OUString aURL( aString.copy( 0, nPos+1 ) ); 782*cdf0e10cSrcweir OUString aName( aString.copy( nPos+1 ) ); 783*cdf0e10cSrcweir if(pDoc->GetPageByName( aName, bIsMasterPage ) != SDRPAGE_NOTFOUND) 784*cdf0e10cSrcweir { 785*cdf0e10cSrcweir aURL += SdDrawPage::getPageApiNameFromUiName( aName ); 786*cdf0e10cSrcweir aString = aURL; 787*cdf0e10cSrcweir } 788*cdf0e10cSrcweir } 789*cdf0e10cSrcweir } 790*cdf0e10cSrcweir } 791*cdf0e10cSrcweir 792*cdf0e10cSrcweir aRet <<= aString; 793*cdf0e10cSrcweir break; 794*cdf0e10cSrcweir } 795*cdf0e10cSrcweir case WID_CLICKACTION: 796*cdf0e10cSrcweir aRet = ::cppu::enum2any< presentation::ClickAction >( pInfo?pInfo->meClickAction:presentation::ClickAction_NONE ); 797*cdf0e10cSrcweir break; 798*cdf0e10cSrcweir case WID_PLAYFULL: 799*cdf0e10cSrcweir aRet <<= (sal_Bool)( pInfo && pInfo->mbPlayFull ); 800*cdf0e10cSrcweir break; 801*cdf0e10cSrcweir case WID_SOUNDFILE: 802*cdf0e10cSrcweir aRet <<= EffectMigration::GetSoundFile( mpShape ); 803*cdf0e10cSrcweir break; 804*cdf0e10cSrcweir case WID_SOUNDON: 805*cdf0e10cSrcweir aRet <<= EffectMigration::GetSoundOn( mpShape ); 806*cdf0e10cSrcweir break; 807*cdf0e10cSrcweir case WID_BLUESCREEN: 808*cdf0e10cSrcweir aRet <<= (sal_Int32)( pInfo?pInfo->maBlueScreen.GetColor():0x00ffffff ); 809*cdf0e10cSrcweir break; 810*cdf0e10cSrcweir case WID_VERB: 811*cdf0e10cSrcweir aRet <<= (sal_Int32)( pInfo?pInfo->mnVerb:0 ); 812*cdf0e10cSrcweir break; 813*cdf0e10cSrcweir case WID_DIMCOLOR: 814*cdf0e10cSrcweir aRet <<= EffectMigration::GetDimColor( mpShape ); 815*cdf0e10cSrcweir break; 816*cdf0e10cSrcweir case WID_DIMHIDE: 817*cdf0e10cSrcweir aRet <<= EffectMigration::GetDimHide( mpShape ); 818*cdf0e10cSrcweir break; 819*cdf0e10cSrcweir case WID_DIMPREV: 820*cdf0e10cSrcweir aRet <<= EffectMigration::GetDimPrevious( mpShape ); 821*cdf0e10cSrcweir break; 822*cdf0e10cSrcweir case WID_PRESORDER: 823*cdf0e10cSrcweir aRet <<= EffectMigration::GetPresentationOrder( mpShape ); 824*cdf0e10cSrcweir break; 825*cdf0e10cSrcweir case WID_STYLE: 826*cdf0e10cSrcweir aRet = GetStyleSheet(); 827*cdf0e10cSrcweir break; 828*cdf0e10cSrcweir case WID_ANIMPATH: 829*cdf0e10cSrcweir if( pInfo && pInfo->mpPathObj ) 830*cdf0e10cSrcweir aRet <<= pInfo->mpPathObj->getUnoShape(); 831*cdf0e10cSrcweir break; 832*cdf0e10cSrcweir case WID_IMAGEMAP: 833*cdf0e10cSrcweir { 834*cdf0e10cSrcweir uno::Reference< uno::XInterface > xImageMap; 835*cdf0e10cSrcweir 836*cdf0e10cSrcweir SdDrawDocument* pDoc = mpModel?mpModel->GetDoc():NULL; 837*cdf0e10cSrcweir if( pDoc ) 838*cdf0e10cSrcweir { 839*cdf0e10cSrcweir 840*cdf0e10cSrcweir SdIMapInfo* pIMapInfo = pDoc->GetIMapInfo(mpShape->GetSdrObject()); 841*cdf0e10cSrcweir if( pIMapInfo ) 842*cdf0e10cSrcweir { 843*cdf0e10cSrcweir const ImageMap& rIMap = pIMapInfo->GetImageMap(); 844*cdf0e10cSrcweir xImageMap = SvUnoImageMap_createInstance( rIMap, ImplGetSupportedMacroItems() ); 845*cdf0e10cSrcweir } 846*cdf0e10cSrcweir else 847*cdf0e10cSrcweir { 848*cdf0e10cSrcweir xImageMap = SvUnoImageMap_createInstance(ImplGetSupportedMacroItems() ); 849*cdf0e10cSrcweir } 850*cdf0e10cSrcweir } 851*cdf0e10cSrcweir 852*cdf0e10cSrcweir aRet <<= uno::Reference< container::XIndexContainer >::query( xImageMap ); 853*cdf0e10cSrcweir break; 854*cdf0e10cSrcweir } 855*cdf0e10cSrcweir } 856*cdf0e10cSrcweir } 857*cdf0e10cSrcweir else 858*cdf0e10cSrcweir { 859*cdf0e10cSrcweir aRet = mpShape->_getPropertyValue(PropertyName); 860*cdf0e10cSrcweir 861*cdf0e10cSrcweir if( PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_shape_layername ) ) ) 862*cdf0e10cSrcweir { 863*cdf0e10cSrcweir OUString aName; 864*cdf0e10cSrcweir if( aRet >>= aName ) 865*cdf0e10cSrcweir { 866*cdf0e10cSrcweir aName = SdLayer::convertToExternalName( aName ); 867*cdf0e10cSrcweir aRet <<= aName; 868*cdf0e10cSrcweir } 869*cdf0e10cSrcweir } 870*cdf0e10cSrcweir } 871*cdf0e10cSrcweir 872*cdf0e10cSrcweir return aRet; 873*cdf0e10cSrcweir } 874*cdf0e10cSrcweir 875*cdf0e10cSrcweir /** */ 876*cdf0e10cSrcweir SdAnimationInfo* SdXShape::GetAnimationInfo( sal_Bool bCreate ) const throw() 877*cdf0e10cSrcweir { 878*cdf0e10cSrcweir SdAnimationInfo* pInfo = NULL; 879*cdf0e10cSrcweir 880*cdf0e10cSrcweir SdrObject* pObj = mpShape->GetSdrObject(); 881*cdf0e10cSrcweir if(pObj) 882*cdf0e10cSrcweir pInfo = SdDrawDocument::GetShapeUserData(*pObj, bCreate ? true : false); 883*cdf0e10cSrcweir 884*cdf0e10cSrcweir return pInfo; 885*cdf0e10cSrcweir } 886*cdf0e10cSrcweir 887*cdf0e10cSrcweir uno::Sequence< ::rtl::OUString > SAL_CALL SdXShape::getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException) 888*cdf0e10cSrcweir { 889*cdf0e10cSrcweir uno::Sequence< OUString > aSeq( mpShape->_getSupportedServiceNames() ); 890*cdf0e10cSrcweir 891*cdf0e10cSrcweir comphelper::ServiceInfoHelper::addToSequence( aSeq, 2, "com.sun.star.presentation.Shape", 892*cdf0e10cSrcweir "com.sun.star.document.LinkTarget" ); 893*cdf0e10cSrcweir 894*cdf0e10cSrcweir SdrObject* pObj = mpShape->GetSdrObject(); 895*cdf0e10cSrcweir if(pObj && pObj->GetObjInventor() == SdrInventor ) 896*cdf0e10cSrcweir { 897*cdf0e10cSrcweir sal_uInt32 nInventor = pObj->GetObjIdentifier(); 898*cdf0e10cSrcweir switch( nInventor ) 899*cdf0e10cSrcweir { 900*cdf0e10cSrcweir case OBJ_TITLETEXT: 901*cdf0e10cSrcweir comphelper::ServiceInfoHelper::addToSequence( aSeq, 1, "com.sun.star.presentation.TitleTextShape" ); 902*cdf0e10cSrcweir break; 903*cdf0e10cSrcweir case OBJ_OUTLINETEXT: 904*cdf0e10cSrcweir comphelper::ServiceInfoHelper::addToSequence( aSeq, 1, "com.sun.star.presentation.OutlinerShape" ); 905*cdf0e10cSrcweir break; 906*cdf0e10cSrcweir } 907*cdf0e10cSrcweir } 908*cdf0e10cSrcweir return aSeq; 909*cdf0e10cSrcweir } 910*cdf0e10cSrcweir 911*cdf0e10cSrcweir /** checks if this is a presentation object 912*cdf0e10cSrcweir */ 913*cdf0e10cSrcweir sal_Bool SdXShape::IsPresObj() const throw() 914*cdf0e10cSrcweir { 915*cdf0e10cSrcweir SdrObject* pObj = mpShape->GetSdrObject(); 916*cdf0e10cSrcweir if(pObj) 917*cdf0e10cSrcweir { 918*cdf0e10cSrcweir SdPage* pPage = PTR_CAST(SdPage,pObj->GetPage()); 919*cdf0e10cSrcweir if(pPage) 920*cdf0e10cSrcweir return pPage->GetPresObjKind(pObj) != PRESOBJ_NONE; 921*cdf0e10cSrcweir } 922*cdf0e10cSrcweir return sal_False; 923*cdf0e10cSrcweir } 924*cdf0e10cSrcweir 925*cdf0e10cSrcweir /** checks if this presentation object is empty 926*cdf0e10cSrcweir */ 927*cdf0e10cSrcweir sal_Bool SdXShape::IsEmptyPresObj() const throw() 928*cdf0e10cSrcweir { 929*cdf0e10cSrcweir SdrObject* pObj = mpShape->GetSdrObject(); 930*cdf0e10cSrcweir if( (pObj != NULL) && pObj->IsEmptyPresObj() ) 931*cdf0e10cSrcweir { 932*cdf0e10cSrcweir // check if the object is in edit, than its temporarely not empty 933*cdf0e10cSrcweir SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >( pObj ); 934*cdf0e10cSrcweir if( pTextObj == 0 ) 935*cdf0e10cSrcweir return sal_True; 936*cdf0e10cSrcweir 937*cdf0e10cSrcweir OutlinerParaObject* pParaObj = pTextObj->GetEditOutlinerParaObject(); 938*cdf0e10cSrcweir if( pParaObj ) 939*cdf0e10cSrcweir { 940*cdf0e10cSrcweir delete pParaObj; 941*cdf0e10cSrcweir } 942*cdf0e10cSrcweir else 943*cdf0e10cSrcweir { 944*cdf0e10cSrcweir return sal_True; 945*cdf0e10cSrcweir } 946*cdf0e10cSrcweir } 947*cdf0e10cSrcweir 948*cdf0e10cSrcweir return sal_False; 949*cdf0e10cSrcweir } 950*cdf0e10cSrcweir 951*cdf0e10cSrcweir /** sets/reset the empty status of a presentation object 952*cdf0e10cSrcweir */ 953*cdf0e10cSrcweir void SdXShape::SetEmptyPresObj( sal_Bool bEmpty ) throw() 954*cdf0e10cSrcweir { 955*cdf0e10cSrcweir // only possible if this actually *is* a presentation object 956*cdf0e10cSrcweir if( !IsPresObj() ) 957*cdf0e10cSrcweir return; 958*cdf0e10cSrcweir 959*cdf0e10cSrcweir SdrObject* pObj = mpShape->GetSdrObject(); 960*cdf0e10cSrcweir if( pObj == NULL ) 961*cdf0e10cSrcweir return; 962*cdf0e10cSrcweir 963*cdf0e10cSrcweir if( pObj->IsEmptyPresObj() != bEmpty ) 964*cdf0e10cSrcweir { 965*cdf0e10cSrcweir if(!bEmpty) 966*cdf0e10cSrcweir { 967*cdf0e10cSrcweir OutlinerParaObject* pOutlinerParaObject = pObj->GetOutlinerParaObject(); 968*cdf0e10cSrcweir const sal_Bool bVertical = pOutlinerParaObject ? pOutlinerParaObject->IsVertical() : sal_False; 969*cdf0e10cSrcweir 970*cdf0e10cSrcweir // really delete SdrOutlinerObj at pObj 971*cdf0e10cSrcweir pObj->NbcSetOutlinerParaObject(0L); 972*cdf0e10cSrcweir if( bVertical && PTR_CAST( SdrTextObj, pObj ) ) 973*cdf0e10cSrcweir ((SdrTextObj*)pObj)->SetVerticalWriting( sal_True ); 974*cdf0e10cSrcweir 975*cdf0e10cSrcweir SdrGrafObj* pGraphicObj = PTR_CAST( SdrGrafObj, pObj ); 976*cdf0e10cSrcweir if( pGraphicObj ) 977*cdf0e10cSrcweir { 978*cdf0e10cSrcweir Graphic aEmpty; 979*cdf0e10cSrcweir pGraphicObj->SetGraphic(aEmpty); 980*cdf0e10cSrcweir } 981*cdf0e10cSrcweir else 982*cdf0e10cSrcweir { 983*cdf0e10cSrcweir SdrOle2Obj* pOleObj = PTR_CAST( SdrOle2Obj, pObj ); 984*cdf0e10cSrcweir if( pOleObj ) 985*cdf0e10cSrcweir { 986*cdf0e10cSrcweir pOleObj->SetGraphic( NULL ); 987*cdf0e10cSrcweir } 988*cdf0e10cSrcweir } 989*cdf0e10cSrcweir } 990*cdf0e10cSrcweir else 991*cdf0e10cSrcweir { 992*cdf0e10cSrcweir // now set an empty OutlinerParaObject at pObj without 993*cdf0e10cSrcweir // any content but with the style of the old OutlinerParaObjects 994*cdf0e10cSrcweir // first paragraph 995*cdf0e10cSrcweir do 996*cdf0e10cSrcweir { 997*cdf0e10cSrcweir SdDrawDocument* pDoc = mpModel?mpModel->GetDoc():NULL; 998*cdf0e10cSrcweir DBG_ASSERT( pDoc, "no document?" ); 999*cdf0e10cSrcweir if( pDoc == NULL) 1000*cdf0e10cSrcweir break; 1001*cdf0e10cSrcweir 1002*cdf0e10cSrcweir ::sd::Outliner* pOutliner = pDoc->GetInternalOutliner(); 1003*cdf0e10cSrcweir DBG_ASSERT( pOutliner, "no outliner?" ); 1004*cdf0e10cSrcweir if( pOutliner == NULL ) 1005*cdf0e10cSrcweir break; 1006*cdf0e10cSrcweir 1007*cdf0e10cSrcweir SdPage* pPage = PTR_CAST(SdPage,pObj->GetPage()); 1008*cdf0e10cSrcweir DBG_ASSERT( pPage, "no page?" ); 1009*cdf0e10cSrcweir if( pPage == NULL ) 1010*cdf0e10cSrcweir break; 1011*cdf0e10cSrcweir 1012*cdf0e10cSrcweir OutlinerParaObject* pOutlinerParaObject = pObj->GetOutlinerParaObject(); 1013*cdf0e10cSrcweir pOutliner->SetText( *pOutlinerParaObject ); 1014*cdf0e10cSrcweir const sal_Bool bVertical = pOutliner->IsVertical(); 1015*cdf0e10cSrcweir 1016*cdf0e10cSrcweir pOutliner->Clear(); 1017*cdf0e10cSrcweir pOutliner->SetVertical( bVertical ); 1018*cdf0e10cSrcweir pOutliner->SetStyleSheetPool( (SfxStyleSheetPool*)pDoc->GetStyleSheetPool() ); 1019*cdf0e10cSrcweir pOutliner->SetStyleSheet( 0, pPage->GetTextStyleSheetForObject( pObj ) ); 1020*cdf0e10cSrcweir pOutliner->Insert( pPage->GetPresObjText( pPage->GetPresObjKind(pObj) ) ); 1021*cdf0e10cSrcweir pObj->SetOutlinerParaObject( pOutliner->CreateParaObject() ); 1022*cdf0e10cSrcweir pOutliner->Clear(); 1023*cdf0e10cSrcweir } 1024*cdf0e10cSrcweir while(0); 1025*cdf0e10cSrcweir } 1026*cdf0e10cSrcweir 1027*cdf0e10cSrcweir pObj->SetEmptyPresObj(bEmpty); 1028*cdf0e10cSrcweir } 1029*cdf0e10cSrcweir } 1030*cdf0e10cSrcweir 1031*cdf0e10cSrcweir sal_Bool SdXShape::IsMasterDepend() const throw() 1032*cdf0e10cSrcweir { 1033*cdf0e10cSrcweir SdrObject* pObj = mpShape->GetSdrObject(); 1034*cdf0e10cSrcweir return pObj && pObj->GetUserCall() != NULL; 1035*cdf0e10cSrcweir } 1036*cdf0e10cSrcweir 1037*cdf0e10cSrcweir void SdXShape::SetMasterDepend( sal_Bool bDepend ) throw() 1038*cdf0e10cSrcweir { 1039*cdf0e10cSrcweir if( IsMasterDepend() != bDepend ) 1040*cdf0e10cSrcweir { 1041*cdf0e10cSrcweir SdrObject* pObj = mpShape->GetSdrObject(); 1042*cdf0e10cSrcweir if( pObj ) 1043*cdf0e10cSrcweir { 1044*cdf0e10cSrcweir if( bDepend ) 1045*cdf0e10cSrcweir { 1046*cdf0e10cSrcweir SdPage* pPage = PTR_CAST(SdPage,pObj->GetPage()); 1047*cdf0e10cSrcweir pObj->SetUserCall( pPage ); 1048*cdf0e10cSrcweir } 1049*cdf0e10cSrcweir else 1050*cdf0e10cSrcweir { 1051*cdf0e10cSrcweir pObj->SetUserCall( NULL ); 1052*cdf0e10cSrcweir } 1053*cdf0e10cSrcweir } 1054*cdf0e10cSrcweir } 1055*cdf0e10cSrcweir } 1056*cdf0e10cSrcweir 1057*cdf0e10cSrcweir void SdXShape::SetStyleSheet( const uno::Any& rAny ) throw( lang::IllegalArgumentException ) 1058*cdf0e10cSrcweir { 1059*cdf0e10cSrcweir SdrObject* pObj = mpShape->GetSdrObject(); 1060*cdf0e10cSrcweir if( pObj == NULL ) 1061*cdf0e10cSrcweir throw beans::UnknownPropertyException(); 1062*cdf0e10cSrcweir 1063*cdf0e10cSrcweir uno::Reference< style::XStyle > xStyle( rAny, uno::UNO_QUERY ); 1064*cdf0e10cSrcweir SfxStyleSheet* pStyleSheet = SfxUnoStyleSheet::getUnoStyleSheet( xStyle ); 1065*cdf0e10cSrcweir 1066*cdf0e10cSrcweir const SfxStyleSheet* pOldStyleSheet = pObj->GetStyleSheet(); 1067*cdf0e10cSrcweir if( pOldStyleSheet != pStyleSheet ) 1068*cdf0e10cSrcweir { 1069*cdf0e10cSrcweir if( pStyleSheet == 0 || (pStyleSheet->GetFamily() != SD_STYLE_FAMILY_GRAPHICS && pStyleSheet->GetFamily() != SD_STYLE_FAMILY_MASTERPAGE) ) 1070*cdf0e10cSrcweir throw lang::IllegalArgumentException(); 1071*cdf0e10cSrcweir 1072*cdf0e10cSrcweir pObj->SetStyleSheet( pStyleSheet, sal_False ); 1073*cdf0e10cSrcweir 1074*cdf0e10cSrcweir SdDrawDocument* pDoc = mpModel? mpModel->GetDoc() : NULL; 1075*cdf0e10cSrcweir if( pDoc ) 1076*cdf0e10cSrcweir { 1077*cdf0e10cSrcweir ::sd::DrawDocShell* pDocSh = pDoc->GetDocSh(); 1078*cdf0e10cSrcweir ::sd::ViewShell* pViewSh = pDocSh ? pDocSh->GetViewShell() : NULL; 1079*cdf0e10cSrcweir 1080*cdf0e10cSrcweir if( pViewSh ) 1081*cdf0e10cSrcweir pViewSh->GetViewFrame()->GetBindings().Invalidate( SID_STYLE_FAMILY2 ); 1082*cdf0e10cSrcweir } 1083*cdf0e10cSrcweir } 1084*cdf0e10cSrcweir } 1085*cdf0e10cSrcweir 1086*cdf0e10cSrcweir uno::Any SdXShape::GetStyleSheet() const throw( beans::UnknownPropertyException ) 1087*cdf0e10cSrcweir { 1088*cdf0e10cSrcweir SdrObject* pObj = mpShape->GetSdrObject(); 1089*cdf0e10cSrcweir if( pObj == NULL ) 1090*cdf0e10cSrcweir throw beans::UnknownPropertyException(); 1091*cdf0e10cSrcweir 1092*cdf0e10cSrcweir SfxStyleSheet* pStyleSheet = pObj->GetStyleSheet(); 1093*cdf0e10cSrcweir // it is possible for shapes inside a draw to have a presentation style 1094*cdf0e10cSrcweir // but we don't want this for the api 1095*cdf0e10cSrcweir if( (pStyleSheet == NULL) || ((pStyleSheet->GetFamily() != SD_STYLE_FAMILY_GRAPHICS) && !mpModel->IsImpressDocument()) ) 1096*cdf0e10cSrcweir return Any(); 1097*cdf0e10cSrcweir 1098*cdf0e10cSrcweir return Any( uno::Reference< style::XStyle >( dynamic_cast< SfxUnoStyleSheet* >( pStyleSheet ) ) ); 1099*cdf0e10cSrcweir } 1100*cdf0e10cSrcweir 1101*cdf0e10cSrcweir class SdUnoEventsAccess : public cppu::WeakImplHelper2< com::sun::star::container::XNameReplace, com::sun::star::lang::XServiceInfo > 1102*cdf0e10cSrcweir { 1103*cdf0e10cSrcweir private: 1104*cdf0e10cSrcweir const OUString maStrOnClick; 1105*cdf0e10cSrcweir const OUString maStrServiceName; 1106*cdf0e10cSrcweir const OUString maStrEventType; 1107*cdf0e10cSrcweir const OUString maStrPresentation; 1108*cdf0e10cSrcweir const OUString maStrLibrary; 1109*cdf0e10cSrcweir const OUString maStrMacroName; 1110*cdf0e10cSrcweir const OUString maStrClickAction; 1111*cdf0e10cSrcweir const OUString maStrBookmark; 1112*cdf0e10cSrcweir const OUString maStrEffect; 1113*cdf0e10cSrcweir const OUString maStrPlayFull; 1114*cdf0e10cSrcweir const OUString maStrVerb; 1115*cdf0e10cSrcweir const OUString maStrSoundURL; 1116*cdf0e10cSrcweir const OUString maStrSpeed; 1117*cdf0e10cSrcweir const OUString maStrStarBasic; 1118*cdf0e10cSrcweir const OUString maStrScript; 1119*cdf0e10cSrcweir 1120*cdf0e10cSrcweir SdXShape* mpShape; 1121*cdf0e10cSrcweir uno::Reference< document::XEventsSupplier > mxShape; 1122*cdf0e10cSrcweir 1123*cdf0e10cSrcweir public: 1124*cdf0e10cSrcweir SdUnoEventsAccess( SdXShape* pShape ) throw(); 1125*cdf0e10cSrcweir 1126*cdf0e10cSrcweir // XNameReplace 1127*cdf0e10cSrcweir virtual void SAL_CALL replaceByName( const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); 1128*cdf0e10cSrcweir 1129*cdf0e10cSrcweir // XNameAccess 1130*cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); 1131*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( ) throw(::com::sun::star::uno::RuntimeException); 1132*cdf0e10cSrcweir virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw(::com::sun::star::uno::RuntimeException); 1133*cdf0e10cSrcweir 1134*cdf0e10cSrcweir // XElementAccess 1135*cdf0e10cSrcweir virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); 1136*cdf0e10cSrcweir virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); 1137*cdf0e10cSrcweir 1138*cdf0e10cSrcweir // XServiceInfo 1139*cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException); 1140*cdf0e10cSrcweir virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException); 1141*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException); 1142*cdf0e10cSrcweir }; 1143*cdf0e10cSrcweir 1144*cdf0e10cSrcweir // XEventsSupplier 1145*cdf0e10cSrcweir uno::Reference< container::XNameReplace > SAL_CALL SdXShape::getEvents( ) throw(::com::sun::star::uno::RuntimeException) 1146*cdf0e10cSrcweir { 1147*cdf0e10cSrcweir return new SdUnoEventsAccess( this ); 1148*cdf0e10cSrcweir } 1149*cdf0e10cSrcweir 1150*cdf0e10cSrcweir SdUnoEventsAccess::SdUnoEventsAccess( SdXShape* pShape ) throw() 1151*cdf0e10cSrcweir : maStrOnClick( RTL_CONSTASCII_USTRINGPARAM("OnClick") ), 1152*cdf0e10cSrcweir maStrServiceName( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.documents.Events") ), 1153*cdf0e10cSrcweir maStrEventType( RTL_CONSTASCII_USTRINGPARAM("EventType") ), 1154*cdf0e10cSrcweir maStrPresentation( RTL_CONSTASCII_USTRINGPARAM("Presentation") ), 1155*cdf0e10cSrcweir maStrLibrary(RTL_CONSTASCII_USTRINGPARAM("Library")), 1156*cdf0e10cSrcweir maStrMacroName(RTL_CONSTASCII_USTRINGPARAM("MacroName")), 1157*cdf0e10cSrcweir maStrClickAction( RTL_CONSTASCII_USTRINGPARAM("ClickAction") ), 1158*cdf0e10cSrcweir maStrBookmark( RTL_CONSTASCII_USTRINGPARAM("Bookmark") ), 1159*cdf0e10cSrcweir maStrEffect( RTL_CONSTASCII_USTRINGPARAM("Effect") ), 1160*cdf0e10cSrcweir maStrPlayFull( RTL_CONSTASCII_USTRINGPARAM("PlayFull") ), 1161*cdf0e10cSrcweir maStrVerb( RTL_CONSTASCII_USTRINGPARAM("Verb") ), 1162*cdf0e10cSrcweir maStrSoundURL( RTL_CONSTASCII_USTRINGPARAM("SoundURL") ), 1163*cdf0e10cSrcweir maStrSpeed( RTL_CONSTASCII_USTRINGPARAM("Speed") ), 1164*cdf0e10cSrcweir maStrStarBasic( RTL_CONSTASCII_USTRINGPARAM("StarBasic") ), 1165*cdf0e10cSrcweir maStrScript( RTL_CONSTASCII_USTRINGPARAM("Script") ), 1166*cdf0e10cSrcweir mpShape( pShape ), mxShape( pShape ) 1167*cdf0e10cSrcweir { 1168*cdf0e10cSrcweir } 1169*cdf0e10cSrcweir 1170*cdf0e10cSrcweir #define FOUND_CLICKACTION 0x0001 1171*cdf0e10cSrcweir #define FOUND_BOOKMARK 0x0002 1172*cdf0e10cSrcweir #define FOUND_EFFECT 0x0004 1173*cdf0e10cSrcweir #define FOUND_PLAYFULL 0x0008 1174*cdf0e10cSrcweir #define FOUND_VERB 0x0010 1175*cdf0e10cSrcweir #define FOUND_SOUNDURL 0x0020 1176*cdf0e10cSrcweir #define FOUND_SPEED 0x0040 1177*cdf0e10cSrcweir #define FOUND_EVENTTYPE 0x0080 1178*cdf0e10cSrcweir #define FOUND_MACRO 0x0100 1179*cdf0e10cSrcweir #define FOUND_LIBRARY 0x0200 1180*cdf0e10cSrcweir 1181*cdf0e10cSrcweir static void clearEventsInAnimationInfo( SdAnimationInfo* pInfo ) 1182*cdf0e10cSrcweir { 1183*cdf0e10cSrcweir const String aEmpty; 1184*cdf0e10cSrcweir pInfo->SetBookmark( aEmpty ); 1185*cdf0e10cSrcweir pInfo->mbSecondSoundOn = sal_False; 1186*cdf0e10cSrcweir pInfo->mbSecondPlayFull = sal_False; 1187*cdf0e10cSrcweir pInfo->meClickAction = presentation::ClickAction_NONE; 1188*cdf0e10cSrcweir pInfo->meSecondEffect = presentation::AnimationEffect_NONE; 1189*cdf0e10cSrcweir pInfo->meSecondSpeed = presentation::AnimationSpeed_MEDIUM; 1190*cdf0e10cSrcweir pInfo->mnVerb = 0; 1191*cdf0e10cSrcweir } 1192*cdf0e10cSrcweir 1193*cdf0e10cSrcweir // XNameReplace 1194*cdf0e10cSrcweir void SAL_CALL SdUnoEventsAccess::replaceByName( const OUString& aName, const uno::Any& aElement ) 1195*cdf0e10cSrcweir throw(lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) 1196*cdf0e10cSrcweir { 1197*cdf0e10cSrcweir if( mpShape == NULL || aName != maStrOnClick ) 1198*cdf0e10cSrcweir throw container::NoSuchElementException(); 1199*cdf0e10cSrcweir 1200*cdf0e10cSrcweir uno::Sequence< beans::PropertyValue > aProperties; 1201*cdf0e10cSrcweir if( !aElement.hasValue() || aElement.getValueType() != getElementType() || !(aElement >>= aProperties) ) 1202*cdf0e10cSrcweir throw lang::IllegalArgumentException(); 1203*cdf0e10cSrcweir 1204*cdf0e10cSrcweir sal_Int32 nFound = 0; 1205*cdf0e10cSrcweir const beans::PropertyValue* pProperties = aProperties.getConstArray(); 1206*cdf0e10cSrcweir 1207*cdf0e10cSrcweir OUString aStrEventType; 1208*cdf0e10cSrcweir presentation::ClickAction eClickAction = presentation::ClickAction_NONE; 1209*cdf0e10cSrcweir presentation::AnimationEffect eEffect = presentation::AnimationEffect_NONE; 1210*cdf0e10cSrcweir presentation::AnimationSpeed eSpeed = presentation::AnimationSpeed_MEDIUM; 1211*cdf0e10cSrcweir OUString aStrSoundURL; 1212*cdf0e10cSrcweir sal_Bool bPlayFull = sal_False; 1213*cdf0e10cSrcweir sal_Int32 nVerb = 0; 1214*cdf0e10cSrcweir OUString aStrMacro; 1215*cdf0e10cSrcweir OUString aStrLibrary; 1216*cdf0e10cSrcweir OUString aStrBookmark; 1217*cdf0e10cSrcweir 1218*cdf0e10cSrcweir const sal_Int32 nCount = aProperties.getLength(); 1219*cdf0e10cSrcweir sal_Int32 nIndex; 1220*cdf0e10cSrcweir for( nIndex = 0; nIndex < nCount; nIndex++, pProperties++ ) 1221*cdf0e10cSrcweir { 1222*cdf0e10cSrcweir if( ( ( nFound & FOUND_EVENTTYPE ) == 0 ) && pProperties->Name == maStrEventType ) 1223*cdf0e10cSrcweir { 1224*cdf0e10cSrcweir if( pProperties->Value >>= aStrEventType ) 1225*cdf0e10cSrcweir { 1226*cdf0e10cSrcweir nFound |= FOUND_EVENTTYPE; 1227*cdf0e10cSrcweir continue; 1228*cdf0e10cSrcweir } 1229*cdf0e10cSrcweir } 1230*cdf0e10cSrcweir else if( ( ( nFound & FOUND_CLICKACTION ) == 0 ) && pProperties->Name == maStrClickAction ) 1231*cdf0e10cSrcweir { 1232*cdf0e10cSrcweir if( pProperties->Value >>= eClickAction ) 1233*cdf0e10cSrcweir { 1234*cdf0e10cSrcweir nFound |= FOUND_CLICKACTION; 1235*cdf0e10cSrcweir continue; 1236*cdf0e10cSrcweir } 1237*cdf0e10cSrcweir } 1238*cdf0e10cSrcweir else if( ( ( nFound & FOUND_MACRO ) == 0 ) && ( pProperties->Name == maStrMacroName || pProperties->Name == maStrScript ) ) 1239*cdf0e10cSrcweir { 1240*cdf0e10cSrcweir if( pProperties->Value >>= aStrMacro ) 1241*cdf0e10cSrcweir { 1242*cdf0e10cSrcweir nFound |= FOUND_MACRO; 1243*cdf0e10cSrcweir continue; 1244*cdf0e10cSrcweir } 1245*cdf0e10cSrcweir } 1246*cdf0e10cSrcweir else if( ( ( nFound & FOUND_LIBRARY ) == 0 ) && pProperties->Name == maStrLibrary ) 1247*cdf0e10cSrcweir { 1248*cdf0e10cSrcweir if( pProperties->Value >>= aStrLibrary ) 1249*cdf0e10cSrcweir { 1250*cdf0e10cSrcweir nFound |= FOUND_LIBRARY; 1251*cdf0e10cSrcweir continue; 1252*cdf0e10cSrcweir } 1253*cdf0e10cSrcweir } 1254*cdf0e10cSrcweir else if( ( ( nFound & FOUND_EFFECT ) == 0 ) && pProperties->Name == maStrEffect ) 1255*cdf0e10cSrcweir { 1256*cdf0e10cSrcweir if( pProperties->Value >>= eEffect ) 1257*cdf0e10cSrcweir { 1258*cdf0e10cSrcweir nFound |= FOUND_EFFECT; 1259*cdf0e10cSrcweir continue; 1260*cdf0e10cSrcweir } 1261*cdf0e10cSrcweir } 1262*cdf0e10cSrcweir else if( ( ( nFound & FOUND_BOOKMARK ) == 0 ) && pProperties->Name == maStrBookmark ) 1263*cdf0e10cSrcweir { 1264*cdf0e10cSrcweir if( pProperties->Value >>= aStrBookmark ) 1265*cdf0e10cSrcweir { 1266*cdf0e10cSrcweir nFound |= FOUND_BOOKMARK; 1267*cdf0e10cSrcweir continue; 1268*cdf0e10cSrcweir } 1269*cdf0e10cSrcweir } 1270*cdf0e10cSrcweir else if( ( ( nFound & FOUND_SPEED ) == 0 ) && pProperties->Name == maStrSpeed ) 1271*cdf0e10cSrcweir { 1272*cdf0e10cSrcweir if( pProperties->Value >>= eSpeed ) 1273*cdf0e10cSrcweir { 1274*cdf0e10cSrcweir nFound |= FOUND_SPEED; 1275*cdf0e10cSrcweir continue; 1276*cdf0e10cSrcweir } 1277*cdf0e10cSrcweir } 1278*cdf0e10cSrcweir else if( ( ( nFound & FOUND_SOUNDURL ) == 0 ) && pProperties->Name == maStrSoundURL ) 1279*cdf0e10cSrcweir { 1280*cdf0e10cSrcweir if( pProperties->Value >>= aStrSoundURL ) 1281*cdf0e10cSrcweir { 1282*cdf0e10cSrcweir nFound |= FOUND_SOUNDURL; 1283*cdf0e10cSrcweir continue; 1284*cdf0e10cSrcweir } 1285*cdf0e10cSrcweir } 1286*cdf0e10cSrcweir else if( ( ( nFound & FOUND_PLAYFULL ) == 0 ) && pProperties->Name == maStrPlayFull ) 1287*cdf0e10cSrcweir { 1288*cdf0e10cSrcweir if( pProperties->Value >>= bPlayFull ) 1289*cdf0e10cSrcweir { 1290*cdf0e10cSrcweir nFound |= FOUND_PLAYFULL; 1291*cdf0e10cSrcweir continue; 1292*cdf0e10cSrcweir } 1293*cdf0e10cSrcweir } 1294*cdf0e10cSrcweir else if( ( ( nFound & FOUND_VERB ) == 0 ) && pProperties->Name == maStrVerb ) 1295*cdf0e10cSrcweir { 1296*cdf0e10cSrcweir if( pProperties->Value >>= nVerb ) 1297*cdf0e10cSrcweir { 1298*cdf0e10cSrcweir nFound |= FOUND_VERB; 1299*cdf0e10cSrcweir continue; 1300*cdf0e10cSrcweir } 1301*cdf0e10cSrcweir } 1302*cdf0e10cSrcweir 1303*cdf0e10cSrcweir throw lang::IllegalArgumentException(); 1304*cdf0e10cSrcweir } 1305*cdf0e10cSrcweir 1306*cdf0e10cSrcweir sal_Bool bOk = sal_False; 1307*cdf0e10cSrcweir do 1308*cdf0e10cSrcweir { 1309*cdf0e10cSrcweir if( ( nFound & FOUND_EVENTTYPE ) == 0 ) 1310*cdf0e10cSrcweir break; 1311*cdf0e10cSrcweir 1312*cdf0e10cSrcweir if( aStrEventType == maStrPresentation ) 1313*cdf0e10cSrcweir { 1314*cdf0e10cSrcweir if( ( nFound & FOUND_CLICKACTION ) == 0 ) 1315*cdf0e10cSrcweir break; 1316*cdf0e10cSrcweir 1317*cdf0e10cSrcweir SdAnimationInfo* pInfo = mpShape->GetAnimationInfo( sal_False ); 1318*cdf0e10cSrcweir if( presentation::ClickAction_NONE == eClickAction && NULL == pInfo ) 1319*cdf0e10cSrcweir { 1320*cdf0e10cSrcweir bOk = sal_True; 1321*cdf0e10cSrcweir break; 1322*cdf0e10cSrcweir } 1323*cdf0e10cSrcweir 1324*cdf0e10cSrcweir if( NULL == pInfo ) 1325*cdf0e10cSrcweir pInfo = mpShape->GetAnimationInfo( sal_True ); 1326*cdf0e10cSrcweir 1327*cdf0e10cSrcweir DBG_ASSERT( pInfo, "shape animation info could not be created!" ); 1328*cdf0e10cSrcweir if( NULL == pInfo ) 1329*cdf0e10cSrcweir break; 1330*cdf0e10cSrcweir 1331*cdf0e10cSrcweir clearEventsInAnimationInfo( pInfo ); 1332*cdf0e10cSrcweir pInfo->meClickAction = eClickAction; 1333*cdf0e10cSrcweir 1334*cdf0e10cSrcweir switch( eClickAction ) 1335*cdf0e10cSrcweir { 1336*cdf0e10cSrcweir case presentation::ClickAction_NONE: 1337*cdf0e10cSrcweir case presentation::ClickAction_PREVPAGE: 1338*cdf0e10cSrcweir case presentation::ClickAction_NEXTPAGE: 1339*cdf0e10cSrcweir case presentation::ClickAction_FIRSTPAGE: 1340*cdf0e10cSrcweir case presentation::ClickAction_LASTPAGE: 1341*cdf0e10cSrcweir case presentation::ClickAction_INVISIBLE: 1342*cdf0e10cSrcweir case presentation::ClickAction_STOPPRESENTATION: 1343*cdf0e10cSrcweir { 1344*cdf0e10cSrcweir bOk = sal_True; 1345*cdf0e10cSrcweir } 1346*cdf0e10cSrcweir break; 1347*cdf0e10cSrcweir 1348*cdf0e10cSrcweir case presentation::ClickAction_PROGRAM: 1349*cdf0e10cSrcweir case presentation::ClickAction_BOOKMARK: 1350*cdf0e10cSrcweir case presentation::ClickAction_DOCUMENT: 1351*cdf0e10cSrcweir if( nFound & FOUND_BOOKMARK ) 1352*cdf0e10cSrcweir { 1353*cdf0e10cSrcweir if( eClickAction == presentation::ClickAction_BOOKMARK ) 1354*cdf0e10cSrcweir { 1355*cdf0e10cSrcweir aStrBookmark = getUiNameFromPageApiNameImpl( aStrBookmark ); 1356*cdf0e10cSrcweir } 1357*cdf0e10cSrcweir else if( eClickAction == presentation::ClickAction_DOCUMENT ) 1358*cdf0e10cSrcweir { 1359*cdf0e10cSrcweir sal_Int32 nPos = aStrBookmark.lastIndexOf( sal_Unicode('#') ); 1360*cdf0e10cSrcweir if( nPos >= 0 ) 1361*cdf0e10cSrcweir { 1362*cdf0e10cSrcweir OUString aURL( aStrBookmark.copy( 0, nPos+1 ) ); 1363*cdf0e10cSrcweir aURL += getUiNameFromPageApiNameImpl( aStrBookmark.copy( nPos+1 ) ); 1364*cdf0e10cSrcweir aStrBookmark = aURL; 1365*cdf0e10cSrcweir } 1366*cdf0e10cSrcweir } 1367*cdf0e10cSrcweir 1368*cdf0e10cSrcweir pInfo->SetBookmark( aStrBookmark ); 1369*cdf0e10cSrcweir bOk = sal_True; 1370*cdf0e10cSrcweir } 1371*cdf0e10cSrcweir break; 1372*cdf0e10cSrcweir 1373*cdf0e10cSrcweir case presentation::ClickAction_MACRO: 1374*cdf0e10cSrcweir if( nFound & FOUND_MACRO ) 1375*cdf0e10cSrcweir { 1376*cdf0e10cSrcweir pInfo->SetBookmark( aStrMacro ); 1377*cdf0e10cSrcweir bOk = sal_True; 1378*cdf0e10cSrcweir } 1379*cdf0e10cSrcweir break; 1380*cdf0e10cSrcweir 1381*cdf0e10cSrcweir case presentation::ClickAction_VERB: 1382*cdf0e10cSrcweir if( nFound & FOUND_VERB ) 1383*cdf0e10cSrcweir { 1384*cdf0e10cSrcweir pInfo->mnVerb = (sal_uInt16)nVerb; 1385*cdf0e10cSrcweir bOk = sal_True; 1386*cdf0e10cSrcweir } 1387*cdf0e10cSrcweir break; 1388*cdf0e10cSrcweir 1389*cdf0e10cSrcweir case presentation::ClickAction_VANISH: 1390*cdf0e10cSrcweir if( ( nFound & FOUND_EFFECT ) == 0 ) 1391*cdf0e10cSrcweir break; 1392*cdf0e10cSrcweir 1393*cdf0e10cSrcweir pInfo->meSecondEffect = eEffect; 1394*cdf0e10cSrcweir pInfo->meSecondSpeed = nFound & FOUND_SPEED ? eSpeed : presentation::AnimationSpeed_MEDIUM; 1395*cdf0e10cSrcweir 1396*cdf0e10cSrcweir bOk = sal_True; 1397*cdf0e10cSrcweir 1398*cdf0e10cSrcweir // NOTE: No break here!!! 1399*cdf0e10cSrcweir 1400*cdf0e10cSrcweir case presentation::ClickAction_SOUND: 1401*cdf0e10cSrcweir if( nFound & FOUND_SOUNDURL ) 1402*cdf0e10cSrcweir { 1403*cdf0e10cSrcweir pInfo->SetBookmark( aStrSoundURL ); 1404*cdf0e10cSrcweir if( eClickAction != presentation::ClickAction_SOUND ) 1405*cdf0e10cSrcweir pInfo->mbSecondSoundOn = aStrSoundURL.getLength() != 0; 1406*cdf0e10cSrcweir pInfo->mbSecondPlayFull = nFound & FOUND_PLAYFULL ? bPlayFull : sal_False; 1407*cdf0e10cSrcweir 1408*cdf0e10cSrcweir bOk = sal_True; 1409*cdf0e10cSrcweir } 1410*cdf0e10cSrcweir break; 1411*cdf0e10cSrcweir case presentation::ClickAction_MAKE_FIXED_SIZE: 1412*cdf0e10cSrcweir break; 1413*cdf0e10cSrcweir } 1414*cdf0e10cSrcweir } 1415*cdf0e10cSrcweir else 1416*cdf0e10cSrcweir { 1417*cdf0e10cSrcweir SdAnimationInfo* pInfo = mpShape->GetAnimationInfo( sal_True ); 1418*cdf0e10cSrcweir 1419*cdf0e10cSrcweir DBG_ASSERT( pInfo, "shape animation info could not be created!" ); 1420*cdf0e10cSrcweir if( NULL == pInfo ) 1421*cdf0e10cSrcweir break; 1422*cdf0e10cSrcweir 1423*cdf0e10cSrcweir clearEventsInAnimationInfo( pInfo ); 1424*cdf0e10cSrcweir pInfo->meClickAction = presentation::ClickAction_MACRO; 1425*cdf0e10cSrcweir 1426*cdf0e10cSrcweir if ( SfxApplication::IsXScriptURL( aStrMacro ) ) 1427*cdf0e10cSrcweir { 1428*cdf0e10cSrcweir pInfo->SetBookmark( aStrMacro ); 1429*cdf0e10cSrcweir } 1430*cdf0e10cSrcweir else 1431*cdf0e10cSrcweir { 1432*cdf0e10cSrcweir String aMacro = aStrMacro; 1433*cdf0e10cSrcweir 1434*cdf0e10cSrcweir String aLibName = aMacro.GetToken(0, sal_Unicode('.')); 1435*cdf0e10cSrcweir String aModulName = aMacro.GetToken(1, sal_Unicode('.')); 1436*cdf0e10cSrcweir String aMacroName = aMacro.GetToken(2, sal_Unicode('.')); 1437*cdf0e10cSrcweir 1438*cdf0e10cSrcweir OUStringBuffer sBuffer; 1439*cdf0e10cSrcweir sBuffer.append( aMacroName ); 1440*cdf0e10cSrcweir sBuffer.append( sal_Unicode('.') ); 1441*cdf0e10cSrcweir sBuffer.append( aModulName ); 1442*cdf0e10cSrcweir sBuffer.append( sal_Unicode('.') ); 1443*cdf0e10cSrcweir sBuffer.append( aLibName ); 1444*cdf0e10cSrcweir sBuffer.append( sal_Unicode('.') ); 1445*cdf0e10cSrcweir 1446*cdf0e10cSrcweir if( aStrLibrary.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "StarOffice" ) ) ) 1447*cdf0e10cSrcweir { 1448*cdf0e10cSrcweir sBuffer.append( OUString( RTL_CONSTASCII_USTRINGPARAM( "BASIC" ) ) ); 1449*cdf0e10cSrcweir } 1450*cdf0e10cSrcweir else 1451*cdf0e10cSrcweir { 1452*cdf0e10cSrcweir sBuffer.append( aStrLibrary ); 1453*cdf0e10cSrcweir } 1454*cdf0e10cSrcweir 1455*cdf0e10cSrcweir pInfo->SetBookmark( sBuffer.makeStringAndClear() ); 1456*cdf0e10cSrcweir } 1457*cdf0e10cSrcweir bOk = sal_True; 1458*cdf0e10cSrcweir } 1459*cdf0e10cSrcweir } 1460*cdf0e10cSrcweir while(0); 1461*cdf0e10cSrcweir 1462*cdf0e10cSrcweir if( !bOk ) 1463*cdf0e10cSrcweir throw lang::IllegalArgumentException(); 1464*cdf0e10cSrcweir } 1465*cdf0e10cSrcweir 1466*cdf0e10cSrcweir // XNameAccess 1467*cdf0e10cSrcweir uno::Any SAL_CALL SdUnoEventsAccess::getByName( const OUString& aName ) 1468*cdf0e10cSrcweir throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) 1469*cdf0e10cSrcweir { 1470*cdf0e10cSrcweir if( mpShape == NULL || aName != maStrOnClick ) 1471*cdf0e10cSrcweir throw container::NoSuchElementException(); 1472*cdf0e10cSrcweir 1473*cdf0e10cSrcweir SdAnimationInfo* pInfo = mpShape->GetAnimationInfo( sal_False ); 1474*cdf0e10cSrcweir 1475*cdf0e10cSrcweir presentation::ClickAction eClickAction = presentation::ClickAction_NONE; 1476*cdf0e10cSrcweir if( pInfo ) 1477*cdf0e10cSrcweir eClickAction = pInfo->meClickAction; 1478*cdf0e10cSrcweir 1479*cdf0e10cSrcweir sal_Int32 nPropertyCount = 2; 1480*cdf0e10cSrcweir switch( eClickAction ) 1481*cdf0e10cSrcweir { 1482*cdf0e10cSrcweir case presentation::ClickAction_NONE: 1483*cdf0e10cSrcweir case presentation::ClickAction_PREVPAGE: 1484*cdf0e10cSrcweir case presentation::ClickAction_NEXTPAGE: 1485*cdf0e10cSrcweir case presentation::ClickAction_FIRSTPAGE: 1486*cdf0e10cSrcweir case presentation::ClickAction_LASTPAGE: 1487*cdf0e10cSrcweir case presentation::ClickAction_INVISIBLE: 1488*cdf0e10cSrcweir case presentation::ClickAction_STOPPRESENTATION: 1489*cdf0e10cSrcweir break; 1490*cdf0e10cSrcweir case presentation::ClickAction_PROGRAM: 1491*cdf0e10cSrcweir case presentation::ClickAction_VERB: 1492*cdf0e10cSrcweir case presentation::ClickAction_BOOKMARK: 1493*cdf0e10cSrcweir case presentation::ClickAction_DOCUMENT: 1494*cdf0e10cSrcweir case presentation::ClickAction_MACRO: 1495*cdf0e10cSrcweir if ( !SfxApplication::IsXScriptURL( pInfo->GetBookmark() ) ) 1496*cdf0e10cSrcweir nPropertyCount += 1; 1497*cdf0e10cSrcweir break; 1498*cdf0e10cSrcweir 1499*cdf0e10cSrcweir case presentation::ClickAction_SOUND: 1500*cdf0e10cSrcweir nPropertyCount += 2; 1501*cdf0e10cSrcweir break; 1502*cdf0e10cSrcweir 1503*cdf0e10cSrcweir case presentation::ClickAction_VANISH: 1504*cdf0e10cSrcweir nPropertyCount += 4; 1505*cdf0e10cSrcweir break; 1506*cdf0e10cSrcweir default: 1507*cdf0e10cSrcweir break; 1508*cdf0e10cSrcweir } 1509*cdf0e10cSrcweir 1510*cdf0e10cSrcweir uno::Sequence< beans::PropertyValue > aProperties( nPropertyCount ); 1511*cdf0e10cSrcweir beans::PropertyValue* pProperties = aProperties.getArray(); 1512*cdf0e10cSrcweir 1513*cdf0e10cSrcweir uno::Any aAny; 1514*cdf0e10cSrcweir 1515*cdf0e10cSrcweir if( eClickAction == presentation::ClickAction_MACRO ) 1516*cdf0e10cSrcweir { 1517*cdf0e10cSrcweir if ( SfxApplication::IsXScriptURL( pInfo->GetBookmark() ) ) 1518*cdf0e10cSrcweir { 1519*cdf0e10cSrcweir // Scripting Framework URL 1520*cdf0e10cSrcweir aAny <<= maStrScript;; 1521*cdf0e10cSrcweir pProperties->Name = maStrEventType; 1522*cdf0e10cSrcweir pProperties->Handle = -1; 1523*cdf0e10cSrcweir pProperties->Value = aAny; 1524*cdf0e10cSrcweir pProperties->State = beans::PropertyState_DIRECT_VALUE; 1525*cdf0e10cSrcweir pProperties++; 1526*cdf0e10cSrcweir 1527*cdf0e10cSrcweir aAny <<= OUString( pInfo->GetBookmark() ); 1528*cdf0e10cSrcweir pProperties->Name = maStrScript; 1529*cdf0e10cSrcweir pProperties->Handle = -1; 1530*cdf0e10cSrcweir pProperties->Value = aAny; 1531*cdf0e10cSrcweir pProperties->State = beans::PropertyState_DIRECT_VALUE; 1532*cdf0e10cSrcweir pProperties++; 1533*cdf0e10cSrcweir } 1534*cdf0e10cSrcweir else 1535*cdf0e10cSrcweir { 1536*cdf0e10cSrcweir // Old Basic macro URL 1537*cdf0e10cSrcweir aAny <<= maStrStarBasic;; 1538*cdf0e10cSrcweir pProperties->Name = maStrEventType; 1539*cdf0e10cSrcweir pProperties->Handle = -1; 1540*cdf0e10cSrcweir pProperties->Value = aAny; 1541*cdf0e10cSrcweir pProperties->State = beans::PropertyState_DIRECT_VALUE; 1542*cdf0e10cSrcweir pProperties++; 1543*cdf0e10cSrcweir 1544*cdf0e10cSrcweir String aMacro = pInfo->GetBookmark(); 1545*cdf0e10cSrcweir 1546*cdf0e10cSrcweir // aMacro has got following format: 1547*cdf0e10cSrcweir // "Macroname.Modulname.Libname.Documentname" or 1548*cdf0e10cSrcweir // "Macroname.Modulname.Libname.Applicationsname" 1549*cdf0e10cSrcweir String aMacroName = aMacro.GetToken(0, sal_Unicode('.')); 1550*cdf0e10cSrcweir String aModulName = aMacro.GetToken(1, sal_Unicode('.')); 1551*cdf0e10cSrcweir String aLibName = aMacro.GetToken(2, sal_Unicode('.')); 1552*cdf0e10cSrcweir String aDocName = aMacro.GetToken(3, sal_Unicode('.')); 1553*cdf0e10cSrcweir 1554*cdf0e10cSrcweir OUStringBuffer sBuffer; 1555*cdf0e10cSrcweir sBuffer.append( aLibName ); 1556*cdf0e10cSrcweir sBuffer.append( sal_Unicode('.') ); 1557*cdf0e10cSrcweir sBuffer.append( aModulName ); 1558*cdf0e10cSrcweir sBuffer.append( sal_Unicode('.') ); 1559*cdf0e10cSrcweir sBuffer.append( aMacroName ); 1560*cdf0e10cSrcweir 1561*cdf0e10cSrcweir aAny <<= OUString( sBuffer.makeStringAndClear() ); 1562*cdf0e10cSrcweir pProperties->Name = maStrMacroName; 1563*cdf0e10cSrcweir pProperties->Handle = -1; 1564*cdf0e10cSrcweir pProperties->Value = aAny; 1565*cdf0e10cSrcweir pProperties->State = beans::PropertyState_DIRECT_VALUE; 1566*cdf0e10cSrcweir pProperties++; 1567*cdf0e10cSrcweir 1568*cdf0e10cSrcweir aAny <<= OUString( RTL_CONSTASCII_USTRINGPARAM( "StarOffice" ) ); 1569*cdf0e10cSrcweir pProperties->Name = maStrLibrary; 1570*cdf0e10cSrcweir pProperties->Handle = -1; 1571*cdf0e10cSrcweir pProperties->Value = aAny; 1572*cdf0e10cSrcweir pProperties->State = beans::PropertyState_DIRECT_VALUE; 1573*cdf0e10cSrcweir } 1574*cdf0e10cSrcweir } 1575*cdf0e10cSrcweir else 1576*cdf0e10cSrcweir { 1577*cdf0e10cSrcweir aAny <<= maStrPresentation; 1578*cdf0e10cSrcweir pProperties->Name = maStrEventType; 1579*cdf0e10cSrcweir pProperties->Handle = -1; 1580*cdf0e10cSrcweir pProperties->Value = aAny; 1581*cdf0e10cSrcweir pProperties->State = beans::PropertyState_DIRECT_VALUE; 1582*cdf0e10cSrcweir pProperties++; 1583*cdf0e10cSrcweir 1584*cdf0e10cSrcweir aAny <<= eClickAction; 1585*cdf0e10cSrcweir pProperties->Name = maStrClickAction; 1586*cdf0e10cSrcweir pProperties->Handle = -1; 1587*cdf0e10cSrcweir pProperties->Value = aAny; 1588*cdf0e10cSrcweir pProperties->State = beans::PropertyState_DIRECT_VALUE; 1589*cdf0e10cSrcweir pProperties++; 1590*cdf0e10cSrcweir 1591*cdf0e10cSrcweir switch( eClickAction ) 1592*cdf0e10cSrcweir { 1593*cdf0e10cSrcweir case presentation::ClickAction_NONE: 1594*cdf0e10cSrcweir case presentation::ClickAction_PREVPAGE: 1595*cdf0e10cSrcweir case presentation::ClickAction_NEXTPAGE: 1596*cdf0e10cSrcweir case presentation::ClickAction_FIRSTPAGE: 1597*cdf0e10cSrcweir case presentation::ClickAction_LASTPAGE: 1598*cdf0e10cSrcweir case presentation::ClickAction_INVISIBLE: 1599*cdf0e10cSrcweir case presentation::ClickAction_STOPPRESENTATION: 1600*cdf0e10cSrcweir break; 1601*cdf0e10cSrcweir case presentation::ClickAction_BOOKMARK: 1602*cdf0e10cSrcweir { 1603*cdf0e10cSrcweir const OUString aStrBookmark( getPageApiNameFromUiName( pInfo->GetBookmark()) ); 1604*cdf0e10cSrcweir pProperties->Name = maStrBookmark; 1605*cdf0e10cSrcweir pProperties->Handle = -1; 1606*cdf0e10cSrcweir pProperties->Value <<= aStrBookmark; 1607*cdf0e10cSrcweir pProperties->State = beans::PropertyState_DIRECT_VALUE; 1608*cdf0e10cSrcweir } 1609*cdf0e10cSrcweir break; 1610*cdf0e10cSrcweir 1611*cdf0e10cSrcweir case presentation::ClickAction_DOCUMENT: 1612*cdf0e10cSrcweir case presentation::ClickAction_PROGRAM: 1613*cdf0e10cSrcweir { 1614*cdf0e10cSrcweir OUString aString( pInfo->GetBookmark()); 1615*cdf0e10cSrcweir sal_Int32 nPos = aString.lastIndexOf( sal_Unicode('#') ); 1616*cdf0e10cSrcweir if( nPos >= 0 ) 1617*cdf0e10cSrcweir { 1618*cdf0e10cSrcweir OUString aURL( aString.copy( 0, nPos+1 ) ); 1619*cdf0e10cSrcweir aURL += getPageApiNameFromUiName( aString.copy( nPos+1 ) ); 1620*cdf0e10cSrcweir aString = aURL; 1621*cdf0e10cSrcweir } 1622*cdf0e10cSrcweir pProperties->Name = maStrBookmark; 1623*cdf0e10cSrcweir pProperties->Handle = -1; 1624*cdf0e10cSrcweir pProperties->Value <<= aString; 1625*cdf0e10cSrcweir pProperties->State = beans::PropertyState_DIRECT_VALUE; 1626*cdf0e10cSrcweir } 1627*cdf0e10cSrcweir break; 1628*cdf0e10cSrcweir 1629*cdf0e10cSrcweir case presentation::ClickAction_VANISH: 1630*cdf0e10cSrcweir aAny <<= pInfo->meSecondEffect; 1631*cdf0e10cSrcweir pProperties->Name = maStrEffect; 1632*cdf0e10cSrcweir pProperties->Handle = -1; 1633*cdf0e10cSrcweir pProperties->Value = aAny; 1634*cdf0e10cSrcweir pProperties->State = beans::PropertyState_DIRECT_VALUE; 1635*cdf0e10cSrcweir pProperties++; 1636*cdf0e10cSrcweir 1637*cdf0e10cSrcweir aAny <<= pInfo->meSecondSpeed; 1638*cdf0e10cSrcweir pProperties->Name = maStrSpeed; 1639*cdf0e10cSrcweir pProperties->Handle = -1; 1640*cdf0e10cSrcweir pProperties->Value = aAny; 1641*cdf0e10cSrcweir pProperties->State = beans::PropertyState_DIRECT_VALUE; 1642*cdf0e10cSrcweir pProperties++; 1643*cdf0e10cSrcweir 1644*cdf0e10cSrcweir // NOTE: no break here!!! 1645*cdf0e10cSrcweir 1646*cdf0e10cSrcweir case presentation::ClickAction_SOUND: 1647*cdf0e10cSrcweir if( eClickAction == presentation::ClickAction_SOUND || pInfo->mbSecondSoundOn ) 1648*cdf0e10cSrcweir { 1649*cdf0e10cSrcweir aAny <<= OUString( pInfo->GetBookmark()); 1650*cdf0e10cSrcweir pProperties->Name = maStrSoundURL; 1651*cdf0e10cSrcweir pProperties->Handle = -1; 1652*cdf0e10cSrcweir pProperties->Value = aAny; 1653*cdf0e10cSrcweir pProperties->State = beans::PropertyState_DIRECT_VALUE; 1654*cdf0e10cSrcweir pProperties++; 1655*cdf0e10cSrcweir 1656*cdf0e10cSrcweir pProperties->Name = maStrPlayFull; 1657*cdf0e10cSrcweir pProperties->Handle = -1; 1658*cdf0e10cSrcweir pProperties->Value = ::cppu::bool2any(pInfo->mbSecondPlayFull); 1659*cdf0e10cSrcweir pProperties->State = beans::PropertyState_DIRECT_VALUE; 1660*cdf0e10cSrcweir } 1661*cdf0e10cSrcweir break; 1662*cdf0e10cSrcweir 1663*cdf0e10cSrcweir case presentation::ClickAction_VERB: 1664*cdf0e10cSrcweir aAny <<= (sal_Int32)pInfo->mnVerb; 1665*cdf0e10cSrcweir pProperties->Name = maStrVerb; 1666*cdf0e10cSrcweir pProperties->Handle = -1; 1667*cdf0e10cSrcweir pProperties->Value = aAny; 1668*cdf0e10cSrcweir pProperties->State = beans::PropertyState_DIRECT_VALUE; 1669*cdf0e10cSrcweir break; 1670*cdf0e10cSrcweir default: 1671*cdf0e10cSrcweir break; 1672*cdf0e10cSrcweir } 1673*cdf0e10cSrcweir } 1674*cdf0e10cSrcweir 1675*cdf0e10cSrcweir aAny <<= aProperties; 1676*cdf0e10cSrcweir return aAny; 1677*cdf0e10cSrcweir } 1678*cdf0e10cSrcweir 1679*cdf0e10cSrcweir uno::Sequence< OUString > SAL_CALL SdUnoEventsAccess::getElementNames( ) 1680*cdf0e10cSrcweir throw(uno::RuntimeException) 1681*cdf0e10cSrcweir { 1682*cdf0e10cSrcweir uno::Sequence< OUString > aStr( &maStrOnClick, 1 ); 1683*cdf0e10cSrcweir return aStr; 1684*cdf0e10cSrcweir } 1685*cdf0e10cSrcweir 1686*cdf0e10cSrcweir sal_Bool SAL_CALL SdUnoEventsAccess::hasByName( const OUString& aName ) 1687*cdf0e10cSrcweir throw(uno::RuntimeException) 1688*cdf0e10cSrcweir { 1689*cdf0e10cSrcweir return aName == maStrOnClick; 1690*cdf0e10cSrcweir } 1691*cdf0e10cSrcweir 1692*cdf0e10cSrcweir // XElementAccess 1693*cdf0e10cSrcweir uno::Type SAL_CALL SdUnoEventsAccess::getElementType( ) 1694*cdf0e10cSrcweir throw(uno::RuntimeException) 1695*cdf0e10cSrcweir { 1696*cdf0e10cSrcweir return *SEQTYPE(::getCppuType((const uno::Sequence< beans::PropertyValue >*)0)); 1697*cdf0e10cSrcweir } 1698*cdf0e10cSrcweir 1699*cdf0e10cSrcweir sal_Bool SAL_CALL SdUnoEventsAccess::hasElements( ) throw(uno::RuntimeException) 1700*cdf0e10cSrcweir { 1701*cdf0e10cSrcweir return sal_True; 1702*cdf0e10cSrcweir } 1703*cdf0e10cSrcweir 1704*cdf0e10cSrcweir // XServiceInfo 1705*cdf0e10cSrcweir OUString SAL_CALL SdUnoEventsAccess::getImplementationName( ) 1706*cdf0e10cSrcweir throw(uno::RuntimeException) 1707*cdf0e10cSrcweir { 1708*cdf0e10cSrcweir return OUString( RTL_CONSTASCII_USTRINGPARAM( "SdUnoEventsAccess" ) ); 1709*cdf0e10cSrcweir } 1710*cdf0e10cSrcweir 1711*cdf0e10cSrcweir sal_Bool SAL_CALL SdUnoEventsAccess::supportsService( const OUString& ServiceName ) 1712*cdf0e10cSrcweir throw(uno::RuntimeException) 1713*cdf0e10cSrcweir { 1714*cdf0e10cSrcweir return ServiceName == maStrServiceName; 1715*cdf0e10cSrcweir } 1716*cdf0e10cSrcweir 1717*cdf0e10cSrcweir uno::Sequence< OUString > SAL_CALL SdUnoEventsAccess::getSupportedServiceNames( ) 1718*cdf0e10cSrcweir throw(uno::RuntimeException) 1719*cdf0e10cSrcweir { 1720*cdf0e10cSrcweir uno::Sequence< OUString > aStr( &maStrServiceName, 1 ); 1721*cdf0e10cSrcweir return aStr; 1722*cdf0e10cSrcweir } 1723*cdf0e10cSrcweir 1724*cdf0e10cSrcweir void SdXShape::modelChanged( SdrModel* pNewModel ) 1725*cdf0e10cSrcweir { 1726*cdf0e10cSrcweir if( pNewModel ) 1727*cdf0e10cSrcweir { 1728*cdf0e10cSrcweir uno::Reference< uno::XInterface > xModel( pNewModel->getUnoModel() ); 1729*cdf0e10cSrcweir mpModel = SdXImpressDocument::getImplementation( xModel ); 1730*cdf0e10cSrcweir } 1731*cdf0e10cSrcweir else 1732*cdf0e10cSrcweir { 1733*cdf0e10cSrcweir mpModel = 0; 1734*cdf0e10cSrcweir } 1735*cdf0e10cSrcweir } 1736*cdf0e10cSrcweir 1737*cdf0e10cSrcweir void SdXShape::pageChanged( SdrPage* ) 1738*cdf0e10cSrcweir { 1739*cdf0e10cSrcweir } 1740*cdf0e10cSrcweir 1741*cdf0e10cSrcweir void SdXShape::objectChanged( SdrObject* ) 1742*cdf0e10cSrcweir { 1743*cdf0e10cSrcweir } 1744*cdf0e10cSrcweir 1745