xref: /aoo41x/main/sdext/source/minimizer/basic.txt (revision cdf0e10c)
1*cdf0e10cSrcweirSub Main
2*cdf0e10cSrcweir
3*cdf0e10cSrcweirDim oSettings(11) as new com.sun.star.beans.PropertyValue
4*cdf0e10cSrcweiroSettings(0).Name = "JPEGCompression"
5*cdf0e10cSrcweiroSettings(0).Value= True
6*cdf0e10cSrcweiroSettings(1).Name = "JPEGQuality"
7*cdf0e10cSrcweiroSettings(1).Value= 25
8*cdf0e10cSrcweiroSettings(2).Name = "RemoveCropArea"
9*cdf0e10cSrcweiroSettings(2).Value= True
10*cdf0e10cSrcweiroSettings(3).Name = "ImageResolution"
11*cdf0e10cSrcweiroSettings(3).Value= 90
12*cdf0e10cSrcweiroSettings(4).Name = "OLEOptimization"
13*cdf0e10cSrcweiroSettings(4).Value= False
14*cdf0e10cSrcweiroSettings(5).Name = "OLEOptimizationType"
15*cdf0e10cSrcweiroSettings(5).Value= 1
16*cdf0e10cSrcweiroSettings(6).Name = "DeleteUnusedMasterPages"
17*cdf0e10cSrcweiroSettings(6).Value= True
18*cdf0e10cSrcweiroSettings(7).Name = "DeleteHiddenSlides"
19*cdf0e10cSrcweiroSettings(7).Value= True
20*cdf0e10cSrcweiroSettings(8).Name = "DeleteNotesPages"
21*cdf0e10cSrcweiroSettings(8).Value= True
22*cdf0e10cSrcweiroSettings(9).Name = "SaveAs"
23*cdf0e10cSrcweiroSettings(9).Value= true
24*cdf0e10cSrcweiroSettings(10).Name = "EmbedLinkedGraphics"
25*cdf0e10cSrcweiroSettings(10).Value = false
26*cdf0e10cSrcweiroSettings(11).Name = "SaveAsURL"
27*cdf0e10cSrcweiroSettings(11).Value = ""
28*cdf0e10cSrcweiroSettings(12).Name = "FilterName"
29*cdf0e10cSrcweiroSettings(12).Value = "impress8"
30*cdf0e10cSrcweir
31*cdf0e10cSrcweir
32*cdf0e10cSrcweir
33*cdf0e10cSrcweirDim oArg(0) as new com.sun.star.beans.PropertyValue
34*cdf0e10cSrcweiroArg(0).Name = "Settings"
35*cdf0e10cSrcweiroArg(0).Value= oSettings
36*cdf0e10cSrcweir
37*cdf0e10cSrcweirDim url As String
38*cdf0e10cSrcweirDim oPresentations(17) as String
39*cdf0e10cSrcweiroPresentations( 0)="d:\data\sunpresentations\01-22-07SunIntelAnnouncementPresentation,01-22-2007.star_impress_8x.odp"
40*cdf0e10cSrcweiroPresentations( 1)="d:\data\sunpresentations\01_Schwartz_SAS_VF.odp"
41*cdf0e10cSrcweiroPresentations( 2)="d:\data\sunpresentations\CorporateSocialResponsibilityCustomerPresentation,02-12-2007.star_impress_8x.odp"
42*cdf0e10cSrcweiroPresentations( 3)="d:\data\sunpresentations\Current-ProjectBlackboxCustomerPresentation,03-07-2007.star_impress_8x.odp"
43*cdf0e10cSrcweiroPresentations( 4)="d:\data\sunpresentations\JavaSE6CustomerPresentation,12-11-2006(2).star_impress_8x.odp"
44*cdf0e10cSrcweiroPresentations( 5)="d:\data\sunpresentations\JavaSE6CustomerPresentation,12-11-2006.star_impress_8x.odp"
45*cdf0e10cSrcweiroPresentations( 6)="d:\data\sunpresentations\NetworkComputingLaunchPresentation,Q22006,Washington,DC,05-08-2006.star_impress_8x.odp"
46*cdf0e10cSrcweiroPresentations( 7)="d:\data\sunpresentations\ProjectBlackboxTechnicalPresentation-NDAONLY,11-09-2006.star_impress_8x.odp"
47*cdf0e10cSrcweiroPresentations( 8)="d:\data\sunpresentations\ScottMcNealy,IntlAssocofPrivacyProfessionals)ConferenceOpeningKeynote,'PlayingonSunday-GettingPrivacyRight',March,8,2007,Washington,DC,,03-08-2007.star_impress_8x.odp"
48*cdf0e10cSrcweiroPresentations( 9)="d:\data\sunpresentations\Sun'sStoragetekAcademy-JonathanSchwartzTheSky'sTheLimit!,February,292007,SanFrancisco,CA,02-28-2007.star_impress_8x.odp"
49*cdf0e10cSrcweiroPresentations(10)="d:\data\sunpresentations\SunAnalystSummit2007(SAS)-DonGranthamExecutingonStrategy,February,6,2007,SanFrancisco,CA,02-07-2007.star_impress_8x.odp"
50*cdf0e10cSrcweiroPresentations(11)="d:\data\sunpresentations\SunConsultingServicesPortfolio-Presentation,03-17-2006.star_impress_6x.sxi"
51*cdf0e10cSrcweiroPresentations(12)="d:\data\sunpresentations\SunFedOpenYourMindandSunFedTechDayatGTSI,ScottMcNealy,January23and24,2007,Washington,DC,01-23-2007.star_impress_8x.odp"
52*cdf0e10cSrcweiroPresentations(13)="d:\data\sunpresentations\SunFedTechDaysatAccenture,ScottMcNealy,January24,2007,Washington,DC,01-24-2007.star_impress_8x.odp"
53*cdf0e10cSrcweiroPresentations(14)="d:\data\sunpresentations\SunManagedServicesGoldenPitch,03-22-2007.star_impress_8x.odp"
54*cdf0e10cSrcweiroPresentations(15)="d:\data\sunpresentations\SunServicesEducationServicesGeneralPresentation,01-11-2006.star_impress_6x.sxi"
55*cdf0e10cSrcweiroPresentations(16)="d:\data\sunpresentations\SunSystemPacks-CustomerReadyPresentation,01-23-2007.star_impress_8x.odp"
56*cdf0e10cSrcweiroPresentations(17)="d:\data\sunpresentations\U.S.SalesMeetingCustomerPresentation(08-01-2006),08-01-2006.odp"
57*cdf0e10cSrcweir
58*cdf0e10cSrcweirFOR I = 0 TO 17
59*cdf0e10cSrcweirurl=oPresentations( I )
60*cdf0e10cSrcweiroSettings(11)=url+string( I, 2 )
61*cdf0e10cSrcweirurl=converttourl( url )
62*cdf0e10cSrcweiroptimize( url, oArg() )
63*cdf0e10cSrcweirNEXT I
64*cdf0e10cSrcweir
65*cdf0e10cSrcweirEnd Sub
66*cdf0e10cSrcweir
67*cdf0e10cSrcweirSub Optimize( url as String, oArg )
68*cdf0e10cSrcweir
69*cdf0e10cSrcweirDim oPPPOptimizerDialog as Object
70*cdf0e10cSrcweirDim oUrl as new com.sun.star.util.URL
71*cdf0e10cSrcweirDim oTrans as Object
72*cdf0e10cSrcweiroTrans = createUNOService("com.sun.star.util.URLTransformer")
73*cdf0e10cSrcweiroUrl.Complete = "vnd.com.sun.star.comp.PPPOptimizer:optimize"
74*cdf0e10cSrcweiroTrans.parsestrict(oUrl)
75*cdf0e10cSrcweir
76*cdf0e10cSrcweirDim oDoc As Object
77*cdf0e10cSrcweirDim FileProperties(0) As New com.sun.star.beans.PropertyValue
78*cdf0e10cSrcweiroSM = CreateObject("com.sun.star.ServiceManager")
79*cdf0e10cSrcweiroDesk = oSM.createInstance("com.sun.star.frame.Desktop")
80*cdf0e10cSrcweiroDoc = oDesk.loadComponentFromURL( url, "_blank", 0, FileProperties() )
81*cdf0e10cSrcweir
82*cdf0e10cSrcweirDim oInitialization( 0 ) as Object
83*cdf0e10cSrcweiroInitialization(0) = oDoc.getCurrentController.getFrame
84*cdf0e10cSrcweiroPPPOptimizerDialog = createUNOservice("com.sun.star.comp.PPPOptimizerImp")
85*cdf0e10cSrcweiroPPPOptimizerDialog.initialize( oInitialization )
86*cdf0e10cSrcweiroPPPOptimizerDialog.dispatch(oURL, oArg)
87*cdf0e10cSrcweirodoc.dispose
88*cdf0e10cSrcweirEnd Sub
89*cdf0e10cSrcweir
90