merge the formfield patch from ooo-build
[ooovba.git] / applied_patches / 0585-pptx-autoplay-fix.diff
blobc42bf344c995fe15b0074946150af1f934efa3ee
1 Make .pps/.ppsx files behave like in ppt
3 From: Thorsten Behrens <thb@openoffice.org>
6 ---
8 filter/source/config/cache/constant.hxx | 2
9 filter/source/config/cache/filtercache.cxx | 6
10 filter/source/config/fragments/fcfg_impress.mk | 4
11 .../filters/MS_PowerPoint_97_AutoPlay.xcu | 13
12 .../impress_MS_PowerPoint_2007_XML_AutoPlay.xcu | 10
13 .../types/MS_PowerPoint_2007_XML_AutoPlay.xcu | 10
14 .../fragments/types/impress_MS_PowerPoint_97.xcu | 2
15 .../types/impress_MS_PowerPoint_97_AutoPlay.xcu | 12
16 framework/inc/filterflags.h | 3
17 framework/source/constant/filter.cxx | 2
18 framework/source/inc/constant/filter.hxx | 2
19 oox/source/core/filterdetect.cxx | 4
20 sd/inc/strmname.h | 1
21 sd/source/ui/docshell/docshel4.cxx | 35
22 sd/source/ui/inc/DrawDocShell.hxx | 1
23 sd/source/ui/slideshow/slideshow.cxx | 25
24 sd/source/ui/unoidl/sddetect.cxx | 8
25 sd/source/ui/view/ViewShellBase.cxx | 1
26 sfx2/inc/sfx2/docfilt.hxx | 1
27 sfx2/inc/sfx2/objsh.hxx | 2
28 sfx2/source/doc/objstor.cxx | 3
31 diff --git filter/source/config/cache/constant.hxx filter/source/config/cache/constant.hxx
32 index cb1f601..d999be2 100644
33 --- filter/source/config/cache/constant.hxx
34 +++ filter/source/config/cache/constant.hxx
35 @@ -133,6 +133,7 @@ extern rtl::OUString pFilterStrings[];
36 #define FLAGNAME_OWN _FILTER_CONFIG_FROM_ASCII_("OWN" )
37 #define FLAGNAME_PACKED _FILTER_CONFIG_FROM_ASCII_("PACKED" )
38 #define FLAGNAME_PREFERRED _FILTER_CONFIG_FROM_ASCII_("PREFERRED" )
39 +#define FLAGNAME_STARTPRESENTATION _FILTER_CONFIG_FROM_ASCII_("STARTPRESENTATION")
40 #define FLAGNAME_READONLY _FILTER_CONFIG_FROM_ASCII_("READONLY" )
41 #define FLAGNAME_SILENTEXPORT _FILTER_CONFIG_FROM_ASCII_("SILENTEXPORT" )
42 #define FLAGNAME_SUPPORTSSELECTION _FILTER_CONFIG_FROM_ASCII_("SUPPORTSSELECTION")
43 @@ -158,6 +159,7 @@ extern rtl::OUString pFilterStrings[];
44 #define FLAGVAL_OWN 0x00000020 // 32
45 #define FLAGVAL_PACKED 0x00100000 // 1048576
46 #define FLAGVAL_PREFERRED 0x10000000 // 268435456
47 +#define FLAGVAL_STARTPRESENTATION 0x20000000 // 268435456
48 #define FLAGVAL_READONLY 0x00010000 // 65536
49 #define FLAGVAL_SILENTEXPORT 0x00200000 // 2097152
50 #define FLAGVAL_SUPPORTSSELECTION 0x00000400 // 1024
51 diff --git filter/source/config/cache/filtercache.cxx filter/source/config/cache/filtercache.cxx
52 index 395b321..dc4a927 100644
53 --- filter/source/config/cache/filtercache.cxx
54 +++ filter/source/config/cache/filtercache.cxx
55 @@ -2112,6 +2112,7 @@ css::uno::Sequence< ::rtl::OUString > FilterCache::impl_convertFlagField2FlagNam
56 if ((nFlags & FLAGVAL_OWN ) == FLAGVAL_OWN ) lFlagNames.push_back(FLAGNAME_OWN );
57 if ((nFlags & FLAGVAL_PACKED ) == FLAGVAL_PACKED ) lFlagNames.push_back(FLAGNAME_PACKED );
58 if ((nFlags & FLAGVAL_PREFERRED ) == FLAGVAL_PREFERRED ) lFlagNames.push_back(FLAGNAME_PREFERRED );
59 + if ((nFlags & FLAGVAL_STARTPRESENTATION) == FLAGVAL_STARTPRESENTATION) lFlagNames.push_back(FLAGNAME_STARTPRESENTATION);
60 if ((nFlags & FLAGVAL_READONLY ) == FLAGVAL_READONLY ) lFlagNames.push_back(FLAGNAME_READONLY );
61 if ((nFlags & FLAGVAL_SILENTEXPORT ) == FLAGVAL_SILENTEXPORT ) lFlagNames.push_back(FLAGNAME_SILENTEXPORT );
62 if ((nFlags & FLAGVAL_SUPPORTSSELECTION) == FLAGVAL_SUPPORTSSELECTION) lFlagNames.push_back(FLAGNAME_SUPPORTSSELECTION);
63 @@ -2210,6 +2211,11 @@ sal_Int32 FilterCache::impl_convertFlagNames2FlagField(const css::uno::Sequence<
64 nField |= FLAGVAL_PREFERRED;
65 continue;
67 + if (pNames[i].equals(FLAGNAME_STARTPRESENTATION))
68 + {
69 + nField |= FLAGVAL_STARTPRESENTATION;
70 + continue;
71 + }
72 if (pNames[i].equals(FLAGNAME_READONLY))
74 nField |= FLAGVAL_READONLY;
75 diff --git filter/source/config/fragments/fcfg_impress.mk filter/source/config/fragments/fcfg_impress.mk
76 index f5c1c7d..2e354c8 100644
77 --- filter/source/config/fragments/fcfg_impress.mk
78 +++ filter/source/config/fragments/fcfg_impress.mk
79 @@ -5,6 +5,7 @@ all_fragments+=impress
80 T4_IMPRESS = \
81 draw_StarOffice_XML_Draw \
82 impress_MS_PowerPoint_97 \
83 + impress_MS_PowerPoint_97_AutoPlay \
84 impress_MS_PowerPoint_97_Vorlage \
85 impress_StarOffice_XML_Impress \
86 impress_StarOffice_XML_Impress_Template \
87 @@ -14,12 +15,14 @@ T4_IMPRESS = \
88 impress8_template\
89 draw8\
90 MS_PowerPoint_2007_XML\
91 + MS_PowerPoint_2007_XML_AutoPlay\
92 MS_PowerPoint_2007_XML_Template
94 # -----------------------------------------------
95 # count = 20
96 F4_IMPRESS = \
97 MS_PowerPoint_97 \
98 + MS_PowerPoint_97_AutoPlay \
99 MS_PowerPoint_97_Vorlage \
100 impress_StarOffice_XML_Draw \
101 StarOffice_XML__Impress_ \
102 @@ -30,6 +33,7 @@ F4_IMPRESS = \
103 impress8_template\
104 impress8_draw\
105 impress_MS_PowerPoint_2007_XML\
106 + impress_MS_PowerPoint_2007_XML_AutoPlay\
107 impress_MS_PowerPoint_2007_XML_Template
109 # -----------------------------------------------
110 diff --git filter/source/config/fragments/filters/MS_PowerPoint_97_AutoPlay.xcu filter/source/config/fragments/filters/MS_PowerPoint_97_AutoPlay.xcu
111 new file mode 100644
112 index 0000000..61bd19f
113 --- /dev/null
114 +++ filter/source/config/fragments/filters/MS_PowerPoint_97_AutoPlay.xcu
115 @@ -0,0 +1,13 @@
116 + <node oor:name="MS PowerPoint 97 AutoPlay" oor:op="replace">
117 + <prop oor:name="Flags"><value>IMPORT EXPORT ALIEN STARTPRESENTATION</value></prop>
118 + <prop oor:name="UIComponent"/>
119 + <prop oor:name="FilterService"/>
120 + <prop oor:name="UserData"><value>sdfilt</value></prop>
121 + <prop oor:name="UIName">
122 + <value xml:lang="x-default">Microsoft PowerPoint 97/2000/XP</value>
123 + </prop>
124 + <prop oor:name="FileFormatVersion"><value>0</value></prop>
125 + <prop oor:name="Type"><value>impress_MS_PowerPoint_97_AutoPlay</value></prop>
126 + <prop oor:name="TemplateName"/>
127 + <prop oor:name="DocumentService"><value>com.sun.star.presentation.PresentationDocument</value></prop>
128 + </node>
129 diff --git filter/source/config/fragments/filters/impress_MS_PowerPoint_2007_XML_AutoPlay.xcu filter/source/config/fragments/filters/impress_MS_PowerPoint_2007_XML_AutoPlay.xcu
130 new file mode 100644
131 index 0000000..c93de4d
132 --- /dev/null
133 +++ filter/source/config/fragments/filters/impress_MS_PowerPoint_2007_XML_AutoPlay.xcu
134 @@ -0,0 +1,10 @@
135 +<node oor:name="Impress MS PowerPoint 2007 XML AutoPlay" oor:op="replace">
136 + <prop oor:name="Flags"><value>IMPORT EXPORT ALIEN 3RDPARTYFILTER PREFERRED STARTPRESENTATION</value></prop>
137 + <prop oor:name="UIComponent"/>
138 + <prop oor:name="FilterService"><value>com.sun.star.comp.Impress.oox.PowerPointImport</value></prop>
139 + <prop oor:name="UserData"/>
140 + <prop oor:name="FileFormatVersion"/>
141 + <prop oor:name="Type"><value>MS PowerPoint 2007 XML AutoPlay</value></prop>
142 + <prop oor:name="TemplateName"/>
143 + <prop oor:name="DocumentService"><value>com.sun.star.presentation.PresentationDocument</value></prop>
144 +</node>
145 diff --git filter/source/config/fragments/types/MS_PowerPoint_2007_XML_AutoPlay.xcu filter/source/config/fragments/types/MS_PowerPoint_2007_XML_AutoPlay.xcu
146 new file mode 100644
147 index 0000000..8b192b9
148 --- /dev/null
149 +++ filter/source/config/fragments/types/MS_PowerPoint_2007_XML_AutoPlay.xcu
150 @@ -0,0 +1,10 @@
151 +<node oor:name="MS PowerPoint 2007 XML AutoPlay" oor:op="replace" >
152 + <prop oor:name="DetectService"><value>com.sun.star.comp.oox.FormatDetector</value></prop>
153 + <prop oor:name="URLPattern"/>
154 + <prop oor:name="Extensions"><value>ppsx</value></prop>
155 + <prop oor:name="MediaType"/>
156 + <prop oor:name="Preferred"><value>true</value></prop>
157 + <prop oor:name="PreferredFilter"><value>Impress MS PowerPoint 2007 XML AutoPlay</value></prop>
158 + <prop oor:name="UIName"><value xml:lang="x-default">Microsoft PowerPoint 2007 XML</value></prop>
159 + <prop oor:name="ClipboardFormat"/>
160 +</node>
161 diff --git filter/source/config/fragments/types/impress_MS_PowerPoint_97.xcu filter/source/config/fragments/types/impress_MS_PowerPoint_97.xcu
162 index 66c1803..4f0781a 100644
163 --- filter/source/config/fragments/types/impress_MS_PowerPoint_97.xcu
164 +++ filter/source/config/fragments/types/impress_MS_PowerPoint_97.xcu
165 @@ -1,7 +1,7 @@
166 <node oor:name="impress_MS_PowerPoint_97" oor:op="replace" >
167 <prop oor:name="DetectService"><value>com.sun.star.comp.draw.FormatDetector</value></prop>
168 <prop oor:name="URLPattern"/>
169 - <prop oor:name="Extensions"><value>ppt pps</value></prop>
170 + <prop oor:name="Extensions"><value>ppt</value></prop>
171 <prop oor:name="MediaType"><value>application/vnd.ms-powerpoint</value></prop>
172 <prop oor:name="Preferred"><value>false</value></prop>
173 <prop oor:name="PreferredFilter"><value>MS PowerPoint 97</value></prop>
174 diff --git filter/source/config/fragments/types/impress_MS_PowerPoint_97_AutoPlay.xcu filter/source/config/fragments/types/impress_MS_PowerPoint_97_AutoPlay.xcu
175 new file mode 100644
176 index 0000000..637e425
177 --- /dev/null
178 +++ filter/source/config/fragments/types/impress_MS_PowerPoint_97_AutoPlay.xcu
179 @@ -0,0 +1,12 @@
180 + <node oor:name="impress_MS_PowerPoint_97_AutoPlay" oor:op="replace" >
181 + <prop oor:name="DetectService"><value>com.sun.star.comp.draw.FormatDetector</value></prop>
182 + <prop oor:name="URLPattern"/>
183 + <prop oor:name="Extensions"><value>pps</value></prop>
184 + <prop oor:name="MediaType"><value>application/vnd.ms-powerpoint</value></prop>
185 + <prop oor:name="Preferred"><value>false</value></prop>
186 + <prop oor:name="PreferredFilter"><value>MS PowerPoint 97 AutoPlay</value></prop>
187 + <prop oor:name="UIName">
188 + <value>Microsoft PowerPoint 97/2000/XP</value>
189 + </prop>
190 + <prop oor:name="ClipboardFormat"/>
191 + </node>
192 diff --git framework/inc/filterflags.h framework/inc/filterflags.h
193 index 32d275d..8fd15af 100644
194 --- framework/inc/filterflags.h
195 +++ framework/inc/filterflags.h
196 @@ -63,6 +63,7 @@ namespace framework{
197 #define FILTERFLAGNAME_SILENTEXPORT DECLARE_ASCII("SilentExport" ) // x
198 #define FILTERFLAGNAME_BROWSERPREFERED DECLARE_ASCII("BrowserPrefered" ) // deprecated
199 #define FILTERFLAGNAME_PREFERED DECLARE_ASCII("Prefered" ) // x
200 +#define FILTERFLAGNAME_STARTPRESENTATION DECLARE_ASCII("StartPresentation") // x
202 #define FILTERFLAG_IMPORT 0x00000001L // 1
203 #define FILTERFLAG_EXPORT 0x00000002L // 2
204 @@ -89,6 +90,7 @@ namespace framework{
205 #define FILTERFLAG_BROWSERPREFERED 0x00400000L // 4194304
206 //FREE! ... 0x00800000L
207 #define FILTERFLAG_PREFERED 0x10000000L // 268435456
208 +#define FILTERFLAG_STARTPRESENTATION 0x20000000L
210 class FlagCheck
212 @@ -146,6 +148,7 @@ class FlagCheck
213 nCheck &= ~FILTERFLAG_SILENTEXPORT;
214 nCheck &= ~FILTERFLAG_BROWSERPREFERED;
215 nCheck &= ~FILTERFLAG_PREFERED;
216 + nCheck &= ~FILTERFLAG_STARTPRESENTATION;
217 return(nCheck == 0);
220 diff --git framework/source/constant/filter.cxx framework/source/constant/filter.cxx
221 index 6ba2bf5..bbd46e8 100644
222 --- framework/source/constant/filter.cxx
223 +++ framework/source/constant/filter.cxx
224 @@ -92,6 +92,7 @@ const ::rtl::OUString Filter::FLAGNAME_PACKED = ::rtl
225 const ::rtl::OUString Filter::FLAGNAME_SILENTEXPORT = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SilentExport" ));
226 const ::rtl::OUString Filter::FLAGNAME_BROWSERPREFERED = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BrowserPrefered" ));
227 const ::rtl::OUString Filter::FLAGNAME_PREFERED = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Prefered" ));
228 +const ::rtl::OUString Filter::FLAGNAME_STARTPRESENTATION = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StartPresentation"));
230 const sal_Int32 Filter::FLAGVALUE_IMPORT = 0x00000001L; // 1
231 const sal_Int32 Filter::FLAGVALUE_EXPORT = 0x00000002L; // 2
232 @@ -117,6 +118,7 @@ const sal_Int32 Filter::FLAGVALUE_PACKED = 0x001
233 const sal_Int32 Filter::FLAGVALUE_SILENTEXPORT = 0x00200000L; // 2097152
234 const sal_Int32 Filter::FLAGVALUE_BROWSERPREFERED = 0x00400000L; // 4194304
235 const sal_Int32 Filter::FLAGVALUE_PREFERED = 0x10000000L; // 268435456
236 +const sal_Int32 Filter::FLAGVALUE_STARTPRESENTATION = 0x20000000L;
238 } // namespace constant
239 } // namespace framework
240 diff --git framework/source/inc/constant/filter.hxx framework/source/inc/constant/filter.hxx
241 index 80696a2..fc50085 100644
242 --- framework/source/inc/constant/filter.hxx
243 +++ framework/source/inc/constant/filter.hxx
244 @@ -94,6 +94,7 @@ struct Filter
245 static const ::rtl::OUString FLAGNAME_SILENTEXPORT;
246 static const ::rtl::OUString FLAGNAME_BROWSERPREFERED;
247 static const ::rtl::OUString FLAGNAME_PREFERED;
248 + static const ::rtl::OUString FLAGNAME_STARTPRESENTATION;
250 static const sal_Int32 FLAGVALUE_IMPORT;
251 static const sal_Int32 FLAGVALUE_EXPORT;
252 @@ -120,6 +121,7 @@ struct Filter
253 static const sal_Int32 FLAGVALUE_BROWSERPREFERED;
254 //FREE! ... 0x00800000L
255 static const sal_Int32 FLAGVALUE_PREFERED;
256 + static const sal_Int32 FLAGVALUE_STARTPRESENTATION;
260 diff --git oox/source/core/filterdetect.cxx oox/source/core/filterdetect.cxx
261 index 57cab69..66d7612 100644
262 --- oox/source/core/filterdetect.cxx
263 +++ oox/source/core/filterdetect.cxx
264 @@ -247,6 +247,10 @@ OUString FilterDetectDocHandler::getFilterNameFromContentType( const OUString& r
265 rContentType.equalsAscii( "application/vnd.ms-powerpoint.presentation.macroEnabled.main+xml" ) )
266 return CREATE_OUSTRING( "MS PowerPoint 2007 XML" );
268 + if( rContentType.equalsAscii( "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml" ) ||
269 + rContentType.equalsAscii( "application/vnd.ms-powerpoint.slideshow.macroEnabled.main+xml" ) )
270 + return CREATE_OUSTRING( "MS PowerPoint 2007 XML AutoPlay" );
272 if( rContentType.equalsAscii( "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml" ) ||
273 rContentType.equalsAscii( "application/vnd.ms-powerpoint.template.macroEnabled.main+xml" ) )
274 return CREATE_OUSTRING( "MS PowerPoint 2007 XML Template" );
275 diff --git sd/inc/strmname.h sd/inc/strmname.h
276 index bc561a4..41fbd88 100644
277 --- sd/inc/strmname.h
278 +++ sd/inc/strmname.h
279 @@ -45,6 +45,7 @@ static const String pPreviewName( RTL_CONSTASCII_USTRINGPARAM( "StarDrawTemplate
280 // PowerPoint-Filter
281 static const String pFilterPowerPoint97( RTL_CONSTASCII_USTRINGPARAM( "MS PowerPoint 97" ));
282 static const String pFilterPowerPoint97Template( RTL_CONSTASCII_USTRINGPARAM( "MS PowerPoint 97 Vorlage" ));
283 +static const String pFilterPowerPoint97AutoPlay( RTL_CONSTASCII_USTRINGPARAM( "MS PowerPoint 97 AutoPlay" ));
285 // XML content stream
286 static const String pStarDrawXMLContent( RTL_CONSTASCII_USTRINGPARAM( "content.xml" ));
287 diff --git sd/source/ui/docshell/docshel4.cxx sd/source/ui/docshell/docshel4.cxx
288 index 6e91127..5f44d3e 100644
289 --- sd/source/ui/docshell/docshel4.cxx
290 +++ sd/source/ui/docshell/docshel4.cxx
291 @@ -469,6 +469,37 @@ BOOL DrawDocShell::LoadFrom( SfxMedium& rMedium )
293 /*************************************************************************
295 +|* ImportFrom: load from 3rd party format
297 +\************************************************************************/
299 +sal_Bool DrawDocShell::ImportFrom( SfxMedium &rMedium )
301 + const sal_Bool bRet=SfxObjectShell::ImportFrom(rMedium);
303 + SfxItemSet* pSet = rMedium.GetItemSet();
304 + if( pSet )
306 + if( SFX_ITEM_SET == pSet->GetItemState(SID_DOC_STARTPRESENTATION)&&
307 + ( (SfxBoolItem&) ( pSet->Get( SID_DOC_STARTPRESENTATION ) ) ).GetValue() )
309 + mpDoc->SetStartWithPresentation( true );
311 + // tell SFX to change viewshell when in preview mode
312 + if( IsPreview() )
314 + SfxItemSet *pMediumSet = GetMedium()->GetItemSet();
315 + if( pMediumSet )
316 + pMediumSet->Put( SfxUInt16Item( SID_VIEW_ID, 1 ) );
321 + return bRet;
324 +/*************************************************************************
326 |* ConvertFrom: aus Fremdformat laden
328 \************************************************************************/
329 @@ -499,7 +530,9 @@ BOOL DrawDocShell::ConvertFrom( SfxMedium& rMedium )
333 - if( aFilterName == pFilterPowerPoint97 || aFilterName == pFilterPowerPoint97Template)
334 + if( aFilterName == pFilterPowerPoint97
335 + || aFilterName == pFilterPowerPoint97Template
336 + || aFilterName == pFilterPowerPoint97AutoPlay)
338 mpDoc->StopWorkStartupDelay();
339 bRet = SdPPTFilter( rMedium, *this, sal_True ).Import();
340 diff --git sd/source/ui/inc/DrawDocShell.hxx sd/source/ui/inc/DrawDocShell.hxx
341 index af8cd2a..a716747 100644
342 --- sd/source/ui/inc/DrawDocShell.hxx
343 +++ sd/source/ui/inc/DrawDocShell.hxx
344 @@ -88,6 +88,7 @@ public:
345 virtual void Activate( BOOL bMDI );
346 virtual void Deactivate( BOOL bMDI );
347 virtual BOOL InitNew( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage );
348 + virtual sal_Bool ImportFrom( SfxMedium &rMedium );
349 virtual BOOL ConvertFrom( SfxMedium &rMedium );
350 virtual BOOL Save();
351 virtual BOOL SaveAsOwnFormat( SfxMedium& rMedium );
352 diff --git sd/source/ui/slideshow/slideshow.cxx sd/source/ui/slideshow/slideshow.cxx
353 index 1adbac7..161435e 100644
354 --- sd/source/ui/slideshow/slideshow.cxx
355 +++ sd/source/ui/slideshow/slideshow.cxx
356 @@ -35,6 +35,8 @@
357 #include <com/sun/star/beans/PropertyAttribute.hpp>
358 #include <com/sun/star/drawing/framework/XControllerManager.hpp>
359 #include <com/sun/star/container/XIndexAccess.hpp>
360 +#include <com/sun/star/frame/XDispatchProvider.hpp>
361 +#include <com/sun/star/util/URL.hpp>
363 #include <cppuhelper/bootstrap.hxx>
365 @@ -72,6 +74,7 @@ using ::com::sun::star::awt::XWindow;
366 using namespace ::sd;
367 using namespace ::cppu;
368 using namespace ::vos;
369 +using namespace ::com::sun::star;
370 using namespace ::com::sun::star::uno;
371 using namespace ::com::sun::star::presentation;
372 using namespace ::com::sun::star::drawing;
373 @@ -777,6 +780,28 @@ void SAL_CALL SlideShow::end() throw(RuntimeException)
374 if( pDrawViewShell )
375 pDrawViewShell->SwitchPage( (USHORT)xController->getRestoreSlide() );
378 + if( pViewShell->GetDoc()->IsStartWithPresentation() )
380 + pViewShell->GetDoc()->SetStartWithPresentation( false );
382 + Reference<frame::XDispatchProvider> xProvider(pViewShell->GetViewShellBase().GetController()->getFrame(),
383 + UNO_QUERY);
384 + if( xProvider.is() )
386 + util::URL aURL;
387 + aURL.Complete = ::rtl::OUString::createFromAscii(".uno:CloseFrame");
389 + uno::Reference< frame::XDispatch > xDispatch(
390 + xProvider->queryDispatch(
391 + aURL, ::rtl::OUString(), 0));
392 + if( xDispatch.is() )
394 + xDispatch->dispatch(aURL,
395 + uno::Sequence< beans::PropertyValue >());
401 mpCurrentViewShellBase = 0;
402 diff --git sd/source/ui/unoidl/sddetect.cxx sd/source/ui/unoidl/sddetect.cxx
403 index 00d43c3..e4511bb 100644
404 --- sd/source/ui/unoidl/sddetect.cxx
405 +++ sd/source/ui/unoidl/sddetect.cxx
406 @@ -365,10 +365,12 @@ SdFilterDetect::~SdFilterDetect()
407 String aFileName(aMedium.GetName());
408 aFileName.ToUpperAscii();
410 - if( aFileName.SearchAscii( ".POT" ) == STRING_NOTFOUND )
411 - pFilter = SfxFilter::GetFilterByName( pFilterPowerPoint97);
412 - else
413 + if( aFileName.SearchAscii( ".POT" ) != STRING_NOTFOUND )
414 pFilter = SfxFilter::GetFilterByName( pFilterPowerPoint97Template );
415 + else if( aFileName.SearchAscii( ".PPS" ) != STRING_NOTFOUND )
416 + pFilter = SfxFilter::GetFilterByName( pFilterPowerPoint97AutoPlay );
417 + else
418 + pFilter = SfxFilter::GetFilterByName( pFilterPowerPoint97);
421 else
422 diff --git sd/source/ui/view/ViewShellBase.cxx sd/source/ui/view/ViewShellBase.cxx
423 index 7545925..78d5092 100644
424 --- sd/source/ui/view/ViewShellBase.cxx
425 +++ sd/source/ui/view/ViewShellBase.cxx
426 @@ -492,7 +492,6 @@ void ViewShellBase::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
428 if( GetViewFrame() )
430 - GetDocument()->SetStartWithPresentation( false );
431 GetViewFrame()->GetDispatcher()->Execute(
432 SID_PRESENTATION, SFX_CALLMODE_ASYNCHRON );
434 diff --git sfx2/inc/sfx2/docfilt.hxx sfx2/inc/sfx2/docfilt.hxx
435 index 93264d6..096278d 100644
436 --- sfx2/inc/sfx2/docfilt.hxx
437 +++ sfx2/inc/sfx2/docfilt.hxx
438 @@ -68,6 +68,7 @@
440 #define SFX_FILTER_BROWSERPREFERED 0x00400000L
441 #define SFX_FILTER_PREFERED 0x10000000L
442 +#define SFX_FILTER_STARTPRESENTATION 0x20000000L
444 #define SFX_FILTER_VERSION_NONE 0
445 #define SFX_FILTER_NOTINSTALLED SFX_FILTER_MUSTINSTALL | SFX_FILTER_CONSULTSERVICE
446 diff --git sfx2/inc/sfx2/objsh.hxx sfx2/inc/sfx2/objsh.hxx
447 index c65280b..d3b1b42 100644
448 --- sfx2/inc/sfx2/objsh.hxx
449 +++ sfx2/inc/sfx2/objsh.hxx
450 @@ -364,7 +364,7 @@ public:
451 sal_Bool SaveCompletedChildren( sal_Bool bSuccess );
453 sal_Bool InsertFrom( SfxMedium &rMedium );
454 - sal_Bool ImportFrom( SfxMedium &rMedium );
455 + virtual sal_Bool ImportFrom( SfxMedium &rMedium );
456 sal_Bool ExportTo( SfxMedium &rMedium );
458 // xmlsec05, check with SFX team
459 --- sfx2/source/doc/objstor.cxx
460 +++ sfx2/source/doc/objstor.cxx
461 @@ -756,6 +756,9 @@ sal_Bool SfxObjectShell::DoLoad( SfxMedium *pMed )
462 sal_uInt32 nError = HandleFilter( pMedium, this );
463 if ( nError != ERRCODE_NONE )
464 SetError( nError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
466 + if (pMedium->GetFilter()->GetFilterFlags() & SFX_FILTER_STARTPRESENTATION)
467 + pSet->Put( SfxBoolItem( SID_DOC_STARTPRESENTATION, TRUE) );
470 EnableSetModified( sal_False );