appuno.cxx (60fbd120) appuno.cxx (70d1a205)
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 *

--- 127 unchanged lines hidden (view full) ---

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
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 *

--- 127 unchanged lines hidden (view full) ---

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[] =
144SfxFormalArgument aFormalArgs[] =
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),

--- 7 unchanged lines hidden (view full) ---

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
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),

--- 7 unchanged lines hidden (view full) ---

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);
168static sal_uInt16 nMediaArgsCount = sizeof(aFormalArgs) / sizeof (SfxFormalArgument);
169
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";

--- 185 unchanged lines hidden (view full) ---

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
366 bool bIsMediaDescriptor = isMediaDescriptor( nSlotId );
367 sal_uInt16 nMaxArgs = bIsMediaDescriptor ? nMediaArgsCount : pSlot->nArgDefCount;
368 for ( sal_uInt16 nArgs=0; nArgs<nMaxArgs; nArgs++ )
369 {
169
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";

--- 185 unchanged lines hidden (view full) ---

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
366 bool bIsMediaDescriptor = isMediaDescriptor( nSlotId );
367 sal_uInt16 nMaxArgs = bIsMediaDescriptor ? nMediaArgsCount : pSlot->nArgDefCount;
368 for ( sal_uInt16 nArgs=0; nArgs<nMaxArgs; nArgs++ )
369 {
370 const SfxFormalArgument &rArg = bIsMediaDescriptor ? aArgs[nArgs] : pSlot->GetFormalArgument( nArgs );
370 const SfxFormalArgument &rArg = bIsMediaDescriptor ? aFormalArgs[nArgs] : pSlot->GetFormalArgument( nArgs );
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

--- 784 unchanged lines hidden (view full) ---

1163 if ( !pSlot->IsMode(SFX_SLOT_METHOD) && nId == rSet.GetPool()->GetWhich( pSlot->GetSlotId() ) )
1164 continue;
1165
1166 bool bIsMediaDescriptor = isMediaDescriptor( nSlotId );
1167 sal_uInt16 nFormalArgs = bIsMediaDescriptor ? nMediaArgsCount : pSlot->nArgDefCount;
1168 sal_uInt16 nArg;
1169 for ( nArg=0; nArg<nFormalArgs; ++nArg )
1170 {
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

--- 784 unchanged lines hidden (view full) ---

1163 if ( !pSlot->IsMode(SFX_SLOT_METHOD) && nId == rSet.GetPool()->GetWhich( pSlot->GetSlotId() ) )
1164 continue;
1165
1166 bool bIsMediaDescriptor = isMediaDescriptor( nSlotId );
1167 sal_uInt16 nFormalArgs = bIsMediaDescriptor ? nMediaArgsCount : pSlot->nArgDefCount;
1168 sal_uInt16 nArg;
1169 for ( nArg=0; nArg<nFormalArgs; ++nArg )
1170 {
1171 const SfxFormalArgument &rArg = bIsMediaDescriptor ? aArgs[nArg] : pSlot->GetFormalArgument( nArg );
1171 const SfxFormalArgument &rArg = bIsMediaDescriptor ? aFormalArgs[nArg] : pSlot->GetFormalArgument( nArg );
1172 sal_uInt16 nWhich = rSet.GetPool()->GetWhich( rArg.nSlotId );
1173 if ( nId == nWhich )
1174 break;
1175 }
1176
1177 if ( nArg<nFormalArgs )
1178 continue;
1179

--- 1270 unchanged lines hidden ---
1172 sal_uInt16 nWhich = rSet.GetPool()->GetWhich( rArg.nSlotId );
1173 if ( nId == nWhich )
1174 break;
1175 }
1176
1177 if ( nArg<nFormalArgs )
1178 continue;
1179

--- 1270 unchanged lines hidden ---