appuno.cxx (5ba24278) | appuno.cxx (60fbd120) |
---|---|
1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * --- 124 unchanged lines hidden (view full) --- 133#include "plugin.hxx" 134#include "iframe.hxx" 135#include <ownsubfilterservice.hxx> 136#include "SfxDocumentMetaData.hxx" 137 138#define FRAMELOADER_SERVICENAME "com.sun.star.frame.FrameLoader" 139#define PROTOCOLHANDLER_SERVICENAME "com.sun.star.frame.ProtocolHandler" 140 | 1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * --- 124 unchanged lines hidden (view full) --- 133#include "plugin.hxx" 134#include "iframe.hxx" 135#include <ownsubfilterservice.hxx> 136#include "SfxDocumentMetaData.hxx" 137 138#define FRAMELOADER_SERVICENAME "com.sun.star.frame.FrameLoader" 139#define PROTOCOLHANDLER_SERVICENAME "com.sun.star.frame.ProtocolHandler" 140 |
141#include <sfxslots.hxx> 142 143// needs to be converted to a better data structure 144SfxFormalArgument aArgs[] = 145{ 146 SFX_ARGUMENT(SID_DEFAULTFILENAME,"SuggestedSaveAsName",SfxStringItem), 147 SFX_ARGUMENT(SID_DEFAULTFILEPATH,"SuggestedSaveAsDir",SfxStringItem), 148 SFX_ARGUMENT(SID_DOCINFO_AUTHOR,"VersionAuthor",SfxStringItem), 149 SFX_ARGUMENT(SID_DOCINFO_COMMENTS,"VersionComment",SfxStringItem), 150 SFX_ARGUMENT(SID_FILE_FILTEROPTIONS,"FilterOptions",SfxStringItem), 151 SFX_ARGUMENT(SID_FILTER_NAME,"FilterName",SfxStringItem), 152// SFX_ARGUMENT(SID_FILE_NAME,"FileName",SfxStringItem), 153 SFX_ARGUMENT(SID_FILE_NAME,"URL",SfxStringItem), 154 SFX_ARGUMENT(SID_OPTIONS,"OpenFlags",SfxStringItem), 155 SFX_ARGUMENT(SID_OVERWRITE,"Overwrite",SfxBoolItem), 156 SFX_ARGUMENT(SID_PASSWORD,"Password",SfxStringItem), 157 SFX_ARGUMENT(SID_PASSWORDINTERACTION,"PasswordInteraction",SfxBoolItem), 158 SFX_ARGUMENT(SID_REFERER,"Referer",SfxStringItem), 159 SFX_ARGUMENT(SID_SAVETO,"SaveTo",SfxBoolItem), 160 SFX_ARGUMENT(SID_TEMPLATE_NAME,"TemplateName",SfxStringItem), 161 SFX_ARGUMENT(SID_TEMPLATE_REGIONNAME,"TemplateRegion",SfxStringItem), 162// SFX_ARGUMENT(SID_TEMPLATE_REGIONNAME,"Region",SfxStringItem), 163// SFX_ARGUMENT(SID_TEMPLATE_NAME,"Name",SfxStringItem), 164 SFX_ARGUMENT(SID_UNPACK,"Unpacked",SfxBoolItem), 165 SFX_ARGUMENT(SID_VERSION,"Version",SfxInt16Item), 166}; 167 168static sal_uInt16 nMediaArgsCount = sizeof(aArgs) / sizeof (SfxFormalArgument); 169 |
|
141static char const sTemplateRegionName[] = "TemplateRegionName"; 142static char const sTemplateName[] = "TemplateName"; 143static char const sAsTemplate[] = "AsTemplate"; 144static char const sOpenNewView[] = "OpenNewView"; 145static char const sViewId[] = "ViewId"; 146static char const sPluginMode[] = "PluginMode"; 147static char const sReadOnly[] = "ReadOnly"; 148static char const sStartPresentation[] = "StartPresentation"; --- 35 unchanged lines hidden (view full) --- 184static char const sFolderName[] = "FolderName"; 185static char const sUseSystemDialog[] = "UseSystemDialog"; 186static char const sStandardDir[] = "StandardDir"; 187static char const sBlackList[] = "BlackList"; 188static char const sModifyPasswordInfo[] = "ModifyPasswordInfo"; 189static char const sSuggestedSaveAsDir[] = "SuggestedSaveAsDir"; 190static char const sSuggestedSaveAsName[] = "SuggestedSaveAsName"; 191static char const sEncryptionData[] = "EncryptionData"; | 170static char const sTemplateRegionName[] = "TemplateRegionName"; 171static char const sTemplateName[] = "TemplateName"; 172static char const sAsTemplate[] = "AsTemplate"; 173static char const sOpenNewView[] = "OpenNewView"; 174static char const sViewId[] = "ViewId"; 175static char const sPluginMode[] = "PluginMode"; 176static char const sReadOnly[] = "ReadOnly"; 177static char const sStartPresentation[] = "StartPresentation"; --- 35 unchanged lines hidden (view full) --- 213static char const sFolderName[] = "FolderName"; 214static char const sUseSystemDialog[] = "UseSystemDialog"; 215static char const sStandardDir[] = "StandardDir"; 216static char const sBlackList[] = "BlackList"; 217static char const sModifyPasswordInfo[] = "ModifyPasswordInfo"; 218static char const sSuggestedSaveAsDir[] = "SuggestedSaveAsDir"; 219static char const sSuggestedSaveAsName[] = "SuggestedSaveAsName"; 220static char const sEncryptionData[] = "EncryptionData"; |
221static char const sFailOnWarning[] = "FailOnWarning"; |
|
192 | 222 |
223bool isMediaDescriptor( sal_uInt16 nSlotId ) 224{ 225 return ( nSlotId == SID_OPENDOC || nSlotId == SID_EXPORTDOC || nSlotId == SID_SAVEASDOC || nSlotId == SID_SAVEDOC || 226 nSlotId == SID_SAVETO || nSlotId == SID_EXPORTDOCASPDF || nSlotId == SID_DIRECTEXPORTDOCASPDF ); 227} |
|
193 194void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rArgs, SfxAllItemSet& rSet, const SfxSlot* pSlot ) 195{ 196 if ( !pSlot ) 197 pSlot = SFX_SLOTPOOL().GetSlot( nSlotId ); 198 199 if ( !pSlot ) 200 return; 201 202 if ( nSlotId == SID_OPENURL ) 203 nSlotId = SID_OPENDOC; 204 if ( nSlotId == SID_SAVEASURL ) 205 nSlotId = SID_SAVEASDOC; 206 207 sal_Int32 nCount = rArgs.getLength(); 208 if ( !nCount ) 209 return; 210 211 const ::com::sun::star::beans::PropertyValue* pPropsVal = rArgs.getConstArray(); | 228 229void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rArgs, SfxAllItemSet& rSet, const SfxSlot* pSlot ) 230{ 231 if ( !pSlot ) 232 pSlot = SFX_SLOTPOOL().GetSlot( nSlotId ); 233 234 if ( !pSlot ) 235 return; 236 237 if ( nSlotId == SID_OPENURL ) 238 nSlotId = SID_OPENDOC; 239 if ( nSlotId == SID_SAVEASURL ) 240 nSlotId = SID_SAVEASDOC; 241 242 sal_Int32 nCount = rArgs.getLength(); 243 if ( !nCount ) 244 return; 245 246 const ::com::sun::star::beans::PropertyValue* pPropsVal = rArgs.getConstArray(); |
212 if ( !pSlot->IsMode(SFX_SLOT_METHOD) ) | 247 if ( !pSlot->IsMode(SFX_SLOT_METHOD) ) |
213 { 214 // slot is a property 215 const SfxType* pType = pSlot->GetType(); 216 SfxPoolItem* pItem = pType->CreateItem(); 217 if ( !pItem ) 218 { 219#ifdef DBG_UTIL 220 ByteString aStr( "No creator method for item: "); --- 102 unchanged lines hidden (view full) --- 323 } 324 else if ( nCount ) 325 { 326#ifdef DBG_UTIL 327 // detect parameters that don't match to any formal argument or one of its members 328 sal_Int32 nFoundArgs = 0; 329#endif 330 // slot is a method | 248 { 249 // slot is a property 250 const SfxType* pType = pSlot->GetType(); 251 SfxPoolItem* pItem = pType->CreateItem(); 252 if ( !pItem ) 253 { 254#ifdef DBG_UTIL 255 ByteString aStr( "No creator method for item: "); --- 102 unchanged lines hidden (view full) --- 358 } 359 else if ( nCount ) 360 { 361#ifdef DBG_UTIL 362 // detect parameters that don't match to any formal argument or one of its members 363 sal_Int32 nFoundArgs = 0; 364#endif 365 // slot is a method |
331 for ( sal_uInt16 nArgs=0; nArgs<pSlot->nArgDefCount; nArgs++ ) | 366 bool bIsMediaDescriptor = isMediaDescriptor( nSlotId ); 367 sal_uInt16 nMaxArgs = bIsMediaDescriptor ? nMediaArgsCount : pSlot->nArgDefCount; 368 for ( sal_uInt16 nArgs=0; nArgs<nMaxArgs; nArgs++ ) |
332 { | 369 { |
333 const SfxFormalArgument &rArg = pSlot->GetFormalArgument( nArgs ); | 370 const SfxFormalArgument &rArg = bIsMediaDescriptor ? aArgs[nArgs] : pSlot->GetFormalArgument( nArgs ); |
334 SfxPoolItem* pItem = rArg.CreateItem(); 335 if ( !pItem ) 336 { 337#ifdef DBG_UTIL 338 ByteString aStr( "No creator method for argument: "); 339 aStr += rArg.pName; 340 DBG_ERROR( aStr.GetBuffer() ); 341#endif --- 133 unchanged lines hidden (view full) --- 475 if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sHidden)) ) 476 { 477 sal_Bool bVal = sal_False; 478 if (rProp.Value >>= bVal) 479 rSet.Put( SfxBoolItem( SID_HIDDEN, bVal ) ); 480 } 481 } 482 } | 371 SfxPoolItem* pItem = rArg.CreateItem(); 372 if ( !pItem ) 373 { 374#ifdef DBG_UTIL 375 ByteString aStr( "No creator method for argument: "); 376 aStr += rArg.pName; 377 DBG_ERROR( aStr.GetBuffer() ); 378#endif --- 133 unchanged lines hidden (view full) --- 512 if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sHidden)) ) 513 { 514 sal_Bool bVal = sal_False; 515 if (rProp.Value >>= bVal) 516 rSet.Put( SfxBoolItem( SID_HIDDEN, bVal ) ); 517 } 518 } 519 } |
483 else if ( nSlotId == SID_OPENDOC || nSlotId == SID_EXPORTDOC || nSlotId == SID_SAVEASDOC || nSlotId == SID_SAVEDOC || 484 nSlotId == SID_SAVETO || nSlotId == SID_EXPORTDOCASPDF || nSlotId == SID_DIRECTEXPORTDOCASPDF ) | 520 else if ( bIsMediaDescriptor ) |
485 { 486 for ( sal_uInt16 n=0; n<nCount; n++ ) 487 { 488#ifdef DBG_UTIL 489 ++nFoundArgs; 490#endif 491 const ::com::sun::star::beans::PropertyValue& rProp = pPropsVal[n]; 492 rtl::OUString aName = rProp.Name; --- 5 unchanged lines hidden (view full) --- 498 } 499 else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sComponentContext)) ) 500 { 501 rSet.Put( SfxUnoAnyItem( SID_COMPONENTCONTEXT, rProp.Value ) ); 502 } 503 else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sStatusInd)) ) 504 { 505 Reference< ::com::sun::star::task::XStatusIndicator > xVal; | 521 { 522 for ( sal_uInt16 n=0; n<nCount; n++ ) 523 { 524#ifdef DBG_UTIL 525 ++nFoundArgs; 526#endif 527 const ::com::sun::star::beans::PropertyValue& rProp = pPropsVal[n]; 528 rtl::OUString aName = rProp.Name; --- 5 unchanged lines hidden (view full) --- 534 } 535 else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sComponentContext)) ) 536 { 537 rSet.Put( SfxUnoAnyItem( SID_COMPONENTCONTEXT, rProp.Value ) ); 538 } 539 else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sStatusInd)) ) 540 { 541 Reference< ::com::sun::star::task::XStatusIndicator > xVal; |
506 sal_Bool bOK = ((rProp.Value >>= xVal) && xVal.is()); | 542 sal_Bool bOK = (rProp.Value >>= xVal); |
507 DBG_ASSERT( bOK, "invalid type for StatusIndicator" ); | 543 DBG_ASSERT( bOK, "invalid type for StatusIndicator" ); |
508 if (bOK) | 544 if (bOK && xVal.is()) |
509 rSet.Put( SfxUnoAnyItem( SID_PROGRESS_STATUSBAR_CONTROL, rProp.Value ) ); 510 } 511 else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sInteractionHdl)) ) 512 { 513 Reference< ::com::sun::star::task::XInteractionHandler > xVal; | 545 rSet.Put( SfxUnoAnyItem( SID_PROGRESS_STATUSBAR_CONTROL, rProp.Value ) ); 546 } 547 else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sInteractionHdl)) ) 548 { 549 Reference< ::com::sun::star::task::XInteractionHandler > xVal; |
514 sal_Bool bOK = ((rProp.Value >>= xVal) && xVal.is()); | 550 sal_Bool bOK = (rProp.Value >>= xVal); |
515 DBG_ASSERT( bOK, "invalid type for InteractionHandler" ); | 551 DBG_ASSERT( bOK, "invalid type for InteractionHandler" ); |
516 if (bOK) | 552 if (bOK && xVal.is()) |
517 rSet.Put( SfxUnoAnyItem( SID_INTERACTIONHANDLER, rProp.Value ) ); 518 } 519 else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sViewData)) ) 520 rSet.Put( SfxUnoAnyItem( SID_VIEW_DATA, rProp.Value ) ); 521 else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sFilterData)) ) 522 rSet.Put( SfxUnoAnyItem( SID_FILTER_DATA, rProp.Value ) ); 523 else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sInputStream)) ) 524 { --- 54 unchanged lines hidden (view full) --- 579 else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sOpenNewView)) ) 580 { 581 sal_Bool bVal = sal_False; 582 sal_Bool bOK = (rProp.Value >>= bVal); 583 DBG_ASSERT( bOK, "invalid type for OpenNewView" ); 584 if (bOK) 585 rSet.Put( SfxBoolItem( SID_OPEN_NEW_VIEW, bVal ) ); 586 } | 553 rSet.Put( SfxUnoAnyItem( SID_INTERACTIONHANDLER, rProp.Value ) ); 554 } 555 else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sViewData)) ) 556 rSet.Put( SfxUnoAnyItem( SID_VIEW_DATA, rProp.Value ) ); 557 else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sFilterData)) ) 558 rSet.Put( SfxUnoAnyItem( SID_FILTER_DATA, rProp.Value ) ); 559 else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sInputStream)) ) 560 { --- 54 unchanged lines hidden (view full) --- 615 else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sOpenNewView)) ) 616 { 617 sal_Bool bVal = sal_False; 618 sal_Bool bOK = (rProp.Value >>= bVal); 619 DBG_ASSERT( bOK, "invalid type for OpenNewView" ); 620 if (bOK) 621 rSet.Put( SfxBoolItem( SID_OPEN_NEW_VIEW, bVal ) ); 622 } |
623 else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sFailOnWarning)) ) 624 { 625 sal_Bool bVal = sal_False; 626 sal_Bool bOK = (rProp.Value >>= bVal); 627 DBG_ASSERT( bOK, "invalid type for FailOnWarning" ); 628 if (bOK) 629 rSet.Put( SfxBoolItem( SID_FAIL_ON_WARNING, bVal ) ); 630 } |
|
587 else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sViewId)) ) 588 { 589 sal_Int16 nVal = -1; 590 sal_Bool bOK = ((rProp.Value >>= nVal) && (nVal != -1)); 591 DBG_ASSERT( bOK, "invalid type for ViewId" ); 592 if (bOK) 593 rSet.Put( SfxUInt16Item( SID_VIEW_ID, nVal ) ); 594 } --- 364 unchanged lines hidden (view full) --- 959 960#ifdef DBG_UTIL 961 nItems++; 962#endif 963 } 964 else 965 { 966 // slot is a method | 631 else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sViewId)) ) 632 { 633 sal_Int16 nVal = -1; 634 sal_Bool bOK = ((rProp.Value >>= nVal) && (nVal != -1)); 635 DBG_ASSERT( bOK, "invalid type for ViewId" ); 636 if (bOK) 637 rSet.Put( SfxUInt16Item( SID_VIEW_ID, nVal ) ); 638 } --- 364 unchanged lines hidden (view full) --- 1003 1004#ifdef DBG_UTIL 1005 nItems++; 1006#endif 1007 } 1008 else 1009 { 1010 // slot is a method |
967 sal_uInt16 nFormalArgs = pSlot->GetFormalArgumentCount(); | 1011 bool bIsMediaDescriptor = isMediaDescriptor( nSlotId ); 1012 sal_uInt16 nFormalArgs = bIsMediaDescriptor ? nMediaArgsCount : pSlot->GetFormalArgumentCount(); |
968 for ( sal_uInt16 nArg=0; nArg<nFormalArgs; ++nArg ) 969 { 970 // check every formal argument of the method 971 const SfxFormalArgument &rArg = pSlot->GetFormalArgument( nArg ); | 1013 for ( sal_uInt16 nArg=0; nArg<nFormalArgs; ++nArg ) 1014 { 1015 // check every formal argument of the method 1016 const SfxFormalArgument &rArg = pSlot->GetFormalArgument( nArg ); |
1017 |
|
972 sal_uInt16 nWhich = rSet.GetPool()->GetWhich( rArg.nSlotId ); 973 if ( rSet.GetItemState( nWhich ) == SFX_ITEM_SET ) //??? 974 { 975 sal_uInt16 nSubCount = rArg.pType->nAttribs; 976 if ( nSubCount ) 977 // argument has a complex type, we want it split into simple types 978 // so for this argument we expect to get as many items as we have (sub) members 979 nProps += nSubCount; 980 else 981 // argument of simple type: we expect to get exactly one item for it 982 nProps++; 983#ifdef DBG_UTIL 984 nItems++; 985#endif 986 } 987 } 988 989 // special treatment for slots that are *not* meant to be recorded as slots (except SaveAs/To) | 1018 sal_uInt16 nWhich = rSet.GetPool()->GetWhich( rArg.nSlotId ); 1019 if ( rSet.GetItemState( nWhich ) == SFX_ITEM_SET ) //??? 1020 { 1021 sal_uInt16 nSubCount = rArg.pType->nAttribs; 1022 if ( nSubCount ) 1023 // argument has a complex type, we want it split into simple types 1024 // so for this argument we expect to get as many items as we have (sub) members 1025 nProps += nSubCount; 1026 else 1027 // argument of simple type: we expect to get exactly one item for it 1028 nProps++; 1029#ifdef DBG_UTIL 1030 nItems++; 1031#endif 1032 } 1033 } 1034 1035 // special treatment for slots that are *not* meant to be recorded as slots (except SaveAs/To) |
990 if ( nSlotId == SID_OPENDOC || nSlotId == SID_EXPORTDOC || nSlotId == SID_SAVEASDOC || nSlotId == SID_SAVEDOC || 991 nSlotId == SID_SAVETO || nSlotId == SID_EXPORTDOCASPDF || nSlotId == SID_DIRECTEXPORTDOCASPDF ) | 1036 if ( bIsMediaDescriptor ) |
992 { 993 sal_Int32 nAdditional=0; 994 if ( rSet.GetItemState( SID_PROGRESS_STATUSBAR_CONTROL ) == SFX_ITEM_SET ) 995 nAdditional++; 996 if ( rSet.GetItemState( SID_INTERACTIONHANDLER ) == SFX_ITEM_SET ) 997 nAdditional++; 998 if ( rSet.GetItemState( SID_DOC_SALVAGE ) == SFX_ITEM_SET ) 999 nAdditional++; --- 12 unchanged lines hidden (view full) --- 1012 if ( rSet.GetItemState( SID_STREAM ) == SFX_ITEM_SET ) 1013 nAdditional++; 1014 if ( rSet.GetItemState( SID_OUTPUTSTREAM ) == SFX_ITEM_SET ) 1015 nAdditional++; 1016 if ( rSet.GetItemState( SID_TEMPLATE ) == SFX_ITEM_SET ) 1017 nAdditional++; 1018 if ( rSet.GetItemState( SID_OPEN_NEW_VIEW ) == SFX_ITEM_SET ) 1019 nAdditional++; | 1037 { 1038 sal_Int32 nAdditional=0; 1039 if ( rSet.GetItemState( SID_PROGRESS_STATUSBAR_CONTROL ) == SFX_ITEM_SET ) 1040 nAdditional++; 1041 if ( rSet.GetItemState( SID_INTERACTIONHANDLER ) == SFX_ITEM_SET ) 1042 nAdditional++; 1043 if ( rSet.GetItemState( SID_DOC_SALVAGE ) == SFX_ITEM_SET ) 1044 nAdditional++; --- 12 unchanged lines hidden (view full) --- 1057 if ( rSet.GetItemState( SID_STREAM ) == SFX_ITEM_SET ) 1058 nAdditional++; 1059 if ( rSet.GetItemState( SID_OUTPUTSTREAM ) == SFX_ITEM_SET ) 1060 nAdditional++; 1061 if ( rSet.GetItemState( SID_TEMPLATE ) == SFX_ITEM_SET ) 1062 nAdditional++; 1063 if ( rSet.GetItemState( SID_OPEN_NEW_VIEW ) == SFX_ITEM_SET ) 1064 nAdditional++; |
1065 if ( rSet.GetItemState( SID_FAIL_ON_WARNING ) == SFX_ITEM_SET ) 1066 nAdditional++; |
|
1020 if ( rSet.GetItemState( SID_VIEW_ID ) == SFX_ITEM_SET ) 1021 nAdditional++; 1022 if ( rSet.GetItemState( SID_VIEW_DATA ) == SFX_ITEM_SET ) 1023 nAdditional++; 1024 if ( rSet.GetItemState( SID_FILTER_DATA ) == SFX_ITEM_SET ) 1025 nAdditional++; 1026 if ( rSet.GetItemState( SID_PLUGIN_MODE ) == SFX_ITEM_SET ) 1027 nAdditional++; --- 83 unchanged lines hidden (view full) --- 1111 { 1112 if ( rSet.GetItemState(nId) < SFX_ITEM_SET ) //??? 1113 // not really set 1114 continue; 1115 1116 if ( !pSlot->IsMode(SFX_SLOT_METHOD) && nId == rSet.GetPool()->GetWhich( pSlot->GetSlotId() ) ) 1117 continue; 1118 | 1067 if ( rSet.GetItemState( SID_VIEW_ID ) == SFX_ITEM_SET ) 1068 nAdditional++; 1069 if ( rSet.GetItemState( SID_VIEW_DATA ) == SFX_ITEM_SET ) 1070 nAdditional++; 1071 if ( rSet.GetItemState( SID_FILTER_DATA ) == SFX_ITEM_SET ) 1072 nAdditional++; 1073 if ( rSet.GetItemState( SID_PLUGIN_MODE ) == SFX_ITEM_SET ) 1074 nAdditional++; --- 83 unchanged lines hidden (view full) --- 1158 { 1159 if ( rSet.GetItemState(nId) < SFX_ITEM_SET ) //??? 1160 // not really set 1161 continue; 1162 1163 if ( !pSlot->IsMode(SFX_SLOT_METHOD) && nId == rSet.GetPool()->GetWhich( pSlot->GetSlotId() ) ) 1164 continue; 1165 |
1119 sal_uInt16 nFormalArgs = pSlot->GetFormalArgumentCount(); | 1166 bool bIsMediaDescriptor = isMediaDescriptor( nSlotId ); 1167 sal_uInt16 nFormalArgs = bIsMediaDescriptor ? nMediaArgsCount : pSlot->nArgDefCount; |
1120 sal_uInt16 nArg; 1121 for ( nArg=0; nArg<nFormalArgs; ++nArg ) 1122 { | 1168 sal_uInt16 nArg; 1169 for ( nArg=0; nArg<nFormalArgs; ++nArg ) 1170 { |
1123 const SfxFormalArgument &rArg = pSlot->GetFormalArgument( nArg ); | 1171 const SfxFormalArgument &rArg = bIsMediaDescriptor ? aArgs[nArg] : pSlot->GetFormalArgument( nArg ); |
1124 sal_uInt16 nWhich = rSet.GetPool()->GetWhich( rArg.nSlotId ); 1125 if ( nId == nWhich ) 1126 break; 1127 } 1128 1129 if ( nArg<nFormalArgs ) 1130 continue; 1131 | 1172 sal_uInt16 nWhich = rSet.GetPool()->GetWhich( rArg.nSlotId ); 1173 if ( nId == nWhich ) 1174 break; 1175 } 1176 1177 if ( nArg<nFormalArgs ) 1178 continue; 1179 |
1132 if ( nSlotId == SID_OPENDOC || nSlotId == SID_EXPORTDOC || nSlotId == SID_SAVEASDOC || nSlotId == SID_SAVEDOC || 1133 nSlotId == SID_SAVETO || nSlotId == SID_EXPORTDOCASPDF || nSlotId == SID_DIRECTEXPORTDOCASPDF ) | 1180 if ( bIsMediaDescriptor ) |
1134 { 1135 if ( nId == SID_DOCFRAME ) 1136 continue; 1137 if ( nId == SID_PROGRESS_STATUSBAR_CONTROL ) 1138 continue; 1139 if ( nId == SID_INTERACTIONHANDLER ) 1140 continue; 1141 if ( nId == SID_VIEW_DATA ) --- 293 unchanged lines hidden (view full) --- 1435 pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sAsTemplate)); 1436 pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); 1437 } 1438 if ( rSet.GetItemState( SID_OPEN_NEW_VIEW, sal_False, &pItem ) == SFX_ITEM_SET ) 1439 { 1440 pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sOpenNewView)); 1441 pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); 1442 } | 1181 { 1182 if ( nId == SID_DOCFRAME ) 1183 continue; 1184 if ( nId == SID_PROGRESS_STATUSBAR_CONTROL ) 1185 continue; 1186 if ( nId == SID_INTERACTIONHANDLER ) 1187 continue; 1188 if ( nId == SID_VIEW_DATA ) --- 293 unchanged lines hidden (view full) --- 1482 pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sAsTemplate)); 1483 pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); 1484 } 1485 if ( rSet.GetItemState( SID_OPEN_NEW_VIEW, sal_False, &pItem ) == SFX_ITEM_SET ) 1486 { 1487 pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sOpenNewView)); 1488 pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); 1489 } |
1490 if ( rSet.GetItemState( SID_FAIL_ON_WARNING, sal_False, &pItem ) == SFX_ITEM_SET ) 1491 { 1492 pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sFailOnWarning)); 1493 pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); 1494 } |
|
1443 if ( rSet.GetItemState( SID_VIEW_ID, sal_False, &pItem ) == SFX_ITEM_SET ) 1444 { 1445 pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sViewId)); 1446 pValue[nActProp++].Value <<= ( (sal_Int16) ((SfxUInt16Item*)pItem)->GetValue() ); 1447 } 1448 if ( rSet.GetItemState( SID_PLUGIN_MODE, sal_False, &pItem ) == SFX_ITEM_SET ) 1449 { 1450 pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sPluginMode)); --- 947 unchanged lines hidden --- | 1495 if ( rSet.GetItemState( SID_VIEW_ID, sal_False, &pItem ) == SFX_ITEM_SET ) 1496 { 1497 pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sViewId)); 1498 pValue[nActProp++].Value <<= ( (sal_Int16) ((SfxUInt16Item*)pItem)->GetValue() ); 1499 } 1500 if ( rSet.GetItemState( SID_PLUGIN_MODE, sal_False, &pItem ) == SFX_ITEM_SET ) 1501 { 1502 pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sPluginMode)); --- 947 unchanged lines hidden --- |