View | Details | Raw Unified | Return to issue 121872
Collapse All | Expand All

(-)a/main/configure.in (-13 / +1 lines)
Lines 519-527 AC_ARG_WITH(beanshell-jar, Link Here
519
[  --with-beanshell-jar=JARFILE   Specify path to jarfile manually ],
519
[  --with-beanshell-jar=JARFILE   Specify path to jarfile manually ],
520
[ BSH_JAR="$withval"
520
[ BSH_JAR="$withval"
521
])
521
])
522
AC_ARG_ENABLE(minimizer,
523
[  --enable-minimizer          enables the build of the Presentation Minimizer extension
524
],,)
525
AC_ARG_ENABLE(presenter-screen,
522
AC_ARG_ENABLE(presenter-screen,
526
[  --enable-presenter-screen           enables the build of the Presenter Screen extension
523
[  --enable-presenter-screen           enables the build of the Presenter Screen extension
527
],,)
524
],,)
Lines 6413-6427 fi Link Here
6413
6410
6414
AC_SUBST(ENABLE_OPENGL)
6411
AC_SUBST(ENABLE_OPENGL)
6415
6412
6416
AC_MSG_CHECKING([whether to build the Presentation Minimizer extension])
6417
if test -n "$enable_minimizer" -a "$enable_minimizer" != "no"; then
6418
   AC_MSG_RESULT([yes])
6419
   ENABLE_MINIMIZER=YES
6420
else
6421
   AC_MSG_RESULT([no])
6422
   ENABLE_MINIMIZER=NO
6423
fi
6424
AC_SUBST(ENABLE_MINIMIZER)
6425
6413
6426
AC_MSG_CHECKING([whether to build the Presenter Screen extension])
6414
AC_MSG_CHECKING([whether to build the Presenter Screen extension])
6427
if test -n "$enable_presenter_screen" -a "$enable_presenter_screen" != "no"; then
6415
if test -n "$enable_presenter_screen" -a "$enable_presenter_screen" != "no"; then
Lines 6461-6467 AC_SUBST(SYSTEM_POPPLER) Link Here
6461
AC_SUBST(POPPLER_CFLAGS)
6449
AC_SUBST(POPPLER_CFLAGS)
6462
AC_SUBST(POPPLER_LIBS)
6450
AC_SUBST(POPPLER_LIBS)
6463
6451
6464
if test "$ENABLE_PRESENTER_SCREEN" = "YES" -o "$ENABLE_MINIMIZER" = "YES" -o "$ENABLE_PDFIMPORT" = "YES"; then
6452
if test "$ENABLE_PRESENTER_SCREEN" = "YES" -o "$ENABLE_PDFIMPORT" = "YES"; then
6465
  AC_MSG_CHECKING([for sdext module])
6453
  AC_MSG_CHECKING([for sdext module])
6466
  if test -d ./sdext; then
6454
  if test -d ./sdext; then
6467
   AC_MSG_RESULT([OK])
6455
   AC_MSG_RESULT([OK])
(-)a/main/extensions.lst (-6 lines)
Lines 37-48 Link Here
37
[ language=all && ENABLE_PRESENTER_SCREEN=YES ]
37
[ language=all && ENABLE_PRESENTER_SCREEN=YES ]
38
    file://presenter/presenter-screen.oxt
38
    file://presenter/presenter-screen.oxt
39
39
40
# the presentation minimizer
41
[ language=all && ENABLE_MINIMIZER=YES ]
42
    file://minimizer/presentation-minimizer.oxt
43
44
45
46
# English dictionary
40
# English dictionary
47
[ language=en.* || language=de || language=it ]
41
[ language=en.* || language=de || language=it ]
48
    b7ce02d25eb302e5b23572cdccaea461 http://numbertext.org/tmp/dict-en.oxt
42
    b7ce02d25eb302e5b23572cdccaea461 http://numbertext.org/tmp/dict-en.oxt
(-)a/main/helpcontent2/prj/build.lst (-9 / +10 lines)
Lines 40-45 h2 helpcontent2\source\text\simpress\01 nmake - all helpconten Link Here
40
h2	helpcontent2\source\text\simpress\02                   nmake - all helpcontent2_simp_02 helpcontent2_aux NULL
40
h2	helpcontent2\source\text\simpress\02                   nmake - all helpcontent2_simp_02 helpcontent2_aux NULL
41
h2	helpcontent2\source\text\simpress\04                   nmake - all helpcontent2_simp_04 helpcontent2_aux NULL
41
h2	helpcontent2\source\text\simpress\04                   nmake - all helpcontent2_simp_04 helpcontent2_aux NULL
42
h2	helpcontent2\source\text\simpress\guide                nmake - all helpcontent2_simp_guid helpcontent2_aux NULL
42
h2	helpcontent2\source\text\simpress\guide                nmake - all helpcontent2_simp_guid helpcontent2_aux NULL
43
h2  helpcontent2\source\text\simpress\minimizer            nmake - all helpcontent2_simp_mini helpcontent2_aux NULL
43
h2	helpcontent2\source\text\smath                         nmake - all helpcontent2_smat helpcontent2_aux NULL
44
h2	helpcontent2\source\text\smath                         nmake - all helpcontent2_smat helpcontent2_aux NULL
44
h2	helpcontent2\source\text\smath\00                      nmake - all helpcontent2_smat_00 helpcontent2_aux NULL
45
h2	helpcontent2\source\text\smath\00                      nmake - all helpcontent2_smat_00 helpcontent2_aux NULL
45
h2	helpcontent2\source\text\smath\01                      nmake - all helpcontent2_smat_01 helpcontent2_aux NULL
46
h2	helpcontent2\source\text\smath\01                      nmake - all helpcontent2_smat_01 helpcontent2_aux NULL
Lines 52-64 h2 helpcontent2\source\text\swriter\01 nmake - all helpconten Link Here
52
h2	helpcontent2\source\text\swriter\02                    nmake - all helpcontent2_swri_02 helpcontent2_aux NULL
53
h2	helpcontent2\source\text\swriter\02                    nmake - all helpcontent2_swri_02 helpcontent2_aux NULL
53
h2	helpcontent2\source\text\swriter\04                    nmake - all helpcontent2_swri_04 helpcontent2_aux NULL
54
h2	helpcontent2\source\text\swriter\04                    nmake - all helpcontent2_swri_04 helpcontent2_aux NULL
54
h2	helpcontent2\source\text\swriter\guide                 nmake - all helpcontent2_swri_guid helpcontent2_aux NULL
55
h2	helpcontent2\source\text\swriter\guide                 nmake - all helpcontent2_swri_guid helpcontent2_aux NULL
55
h2	helpcontent2\util\sbasic                               nmake - all helpcontent2_ut_sbas helpcontent2_aux helpcontent2_sbas_guid helpcontent2_sbas_shar helpcontent2_sbas_shar_01 helpcontent2_sbas_shar_02 helpcontent2_scal helpcontent2_scal_00 helpcontent2_scal_01 helpcontent2_scal_02 helpcontent2_scal_04 helpcontent2_scal_05 helpcontent2_scal_guid helpcontent2_scha helpcontent2_scha_00 helpcontent2_scha_01 helpcontent2_scha_02 helpcontent2_scha_04 helpcontent2_sdra helpcontent2_sdra_00 helpcontent2_sdra_01 helpcontent2_sdra_04 helpcontent2_sdra_guid helpcontent2_shar helpcontent2_shar_00 helpcontent2_shar_01 helpcontent2_shar_02 helpcontent2_shar_04 helpcontent2_shar_05 helpcontent2_shar_07 helpcontent2_shar_auko helpcontent2_shar_aupi helpcontent2_shar_expl_data helpcontent2_shar_guid helpcontent2_shar_opti helpcontent2_simp helpcontent2_simp_00 helpcontent2_simp_01 helpcontent2_simp_02 helpcontent2_simp_04 helpcontent2_simp_guid helpcontent2_smat helpcontent2_smat_00 helpcontent2_smat_01 helpcontent2_smat_02 helpcontent2_smat_04 helpcontent2_smat_guid helpcontent2_swri helpcontent2_swri_00 helpcontent2_swri_01 helpcontent2_swri_02 helpcontent2_swri_04 helpcontent2_swri_guid NULL
56
h2	helpcontent2\util\sbasic                               nmake - all helpcontent2_ut_sbas helpcontent2_aux helpcontent2_sbas_guid helpcontent2_sbas_shar helpcontent2_sbas_shar_01 helpcontent2_sbas_shar_02 helpcontent2_scal helpcontent2_scal_00 helpcontent2_scal_01 helpcontent2_scal_02 helpcontent2_scal_04 helpcontent2_scal_05 helpcontent2_scal_guid helpcontent2_scha helpcontent2_scha_00 helpcontent2_scha_01 helpcontent2_scha_02 helpcontent2_scha_04 helpcontent2_sdra helpcontent2_sdra_00 helpcontent2_sdra_01 helpcontent2_sdra_04 helpcontent2_sdra_guid helpcontent2_shar helpcontent2_shar_00 helpcontent2_shar_01 helpcontent2_shar_02 helpcontent2_shar_04 helpcontent2_shar_05 helpcontent2_shar_07 helpcontent2_shar_auko helpcontent2_shar_aupi helpcontent2_shar_expl_data helpcontent2_shar_guid helpcontent2_shar_opti helpcontent2_simp helpcontent2_simp_00 helpcontent2_simp_01 helpcontent2_simp_02 helpcontent2_simp_04 helpcontent2_simp_guid helpcontent2_simp_mini helpcontent2_smat helpcontent2_smat_00 helpcontent2_smat_01 helpcontent2_smat_02 helpcontent2_smat_04 helpcontent2_smat_guid helpcontent2_swri helpcontent2_swri_00 helpcontent2_swri_01 helpcontent2_swri_02 helpcontent2_swri_04 helpcontent2_swri_guid NULL
56
h2	helpcontent2\util\schart                               nmake - all helpcontent2_ut_scha helpcontent2_aux helpcontent2_sbas_guid helpcontent2_sbas_shar helpcontent2_sbas_shar_01 helpcontent2_sbas_shar_02 helpcontent2_scal helpcontent2_scal_00 helpcontent2_scal_01 helpcontent2_scal_02 helpcontent2_scal_04 helpcontent2_scal_05 helpcontent2_scal_guid helpcontent2_scha helpcontent2_scha_00 helpcontent2_scha_01 helpcontent2_scha_02 helpcontent2_scha_04 helpcontent2_sdra helpcontent2_sdra_00 helpcontent2_sdra_01 helpcontent2_sdra_04 helpcontent2_sdra_guid helpcontent2_shar helpcontent2_shar_00 helpcontent2_shar_01 helpcontent2_shar_02 helpcontent2_shar_04 helpcontent2_shar_05 helpcontent2_shar_07 helpcontent2_shar_auko helpcontent2_shar_aupi helpcontent2_shar_expl_data helpcontent2_shar_guid helpcontent2_shar_opti helpcontent2_simp helpcontent2_simp_00 helpcontent2_simp_01 helpcontent2_simp_02 helpcontent2_simp_04 helpcontent2_simp_guid helpcontent2_smat helpcontent2_smat_00 helpcontent2_smat_01 helpcontent2_smat_02 helpcontent2_smat_04 helpcontent2_smat_guid helpcontent2_swri helpcontent2_swri_00 helpcontent2_swri_01 helpcontent2_swri_02 helpcontent2_swri_04 helpcontent2_swri_guid NULL
57
h2	helpcontent2\util\schart                               nmake - all helpcontent2_ut_scha helpcontent2_aux helpcontent2_sbas_guid helpcontent2_sbas_shar helpcontent2_sbas_shar_01 helpcontent2_sbas_shar_02 helpcontent2_scal helpcontent2_scal_00 helpcontent2_scal_01 helpcontent2_scal_02 helpcontent2_scal_04 helpcontent2_scal_05 helpcontent2_scal_guid helpcontent2_scha helpcontent2_scha_00 helpcontent2_scha_01 helpcontent2_scha_02 helpcontent2_scha_04 helpcontent2_sdra helpcontent2_sdra_00 helpcontent2_sdra_01 helpcontent2_sdra_04 helpcontent2_sdra_guid helpcontent2_shar helpcontent2_shar_00 helpcontent2_shar_01 helpcontent2_shar_02 helpcontent2_shar_04 helpcontent2_shar_05 helpcontent2_shar_07 helpcontent2_shar_auko helpcontent2_shar_aupi helpcontent2_shar_expl_data helpcontent2_shar_guid helpcontent2_shar_opti helpcontent2_simp helpcontent2_simp_00 helpcontent2_simp_01 helpcontent2_simp_02 helpcontent2_simp_04 helpcontent2_simp_guid helpcontent2_simp_mini helpcontent2_smat helpcontent2_smat_00 helpcontent2_smat_01 helpcontent2_smat_02 helpcontent2_smat_04 helpcontent2_smat_guid helpcontent2_swri helpcontent2_swri_00 helpcontent2_swri_01 helpcontent2_swri_02 helpcontent2_swri_04 helpcontent2_swri_guid NULL
57
h2	helpcontent2\util\scalc                                nmake - all helpcontent2_ut_scal helpcontent2_aux helpcontent2_sbas_guid helpcontent2_sbas_shar helpcontent2_sbas_shar_01 helpcontent2_sbas_shar_02 helpcontent2_scal helpcontent2_scal_00 helpcontent2_scal_01 helpcontent2_scal_02 helpcontent2_scal_04 helpcontent2_scal_05 helpcontent2_scal_guid helpcontent2_scha helpcontent2_scha_00 helpcontent2_scha_01 helpcontent2_scha_02 helpcontent2_scha_04 helpcontent2_sdra helpcontent2_sdra_00 helpcontent2_sdra_01 helpcontent2_sdra_04 helpcontent2_sdra_guid helpcontent2_shar helpcontent2_shar_00 helpcontent2_shar_01 helpcontent2_shar_02 helpcontent2_shar_04 helpcontent2_shar_05 helpcontent2_shar_07 helpcontent2_shar_auko helpcontent2_shar_aupi helpcontent2_shar_expl_data helpcontent2_shar_guid helpcontent2_shar_opti helpcontent2_simp helpcontent2_simp_00 helpcontent2_simp_01 helpcontent2_simp_02 helpcontent2_simp_04 helpcontent2_simp_guid helpcontent2_smat helpcontent2_smat_00 helpcontent2_smat_01 helpcontent2_smat_02 helpcontent2_smat_04 helpcontent2_smat_guid helpcontent2_swri helpcontent2_swri_00 helpcontent2_swri_01 helpcontent2_swri_02 helpcontent2_swri_04 helpcontent2_swri_guid NULL
58
h2	helpcontent2\util\scalc                                nmake - all helpcontent2_ut_scal helpcontent2_aux helpcontent2_sbas_guid helpcontent2_sbas_shar helpcontent2_sbas_shar_01 helpcontent2_sbas_shar_02 helpcontent2_scal helpcontent2_scal_00 helpcontent2_scal_01 helpcontent2_scal_02 helpcontent2_scal_04 helpcontent2_scal_05 helpcontent2_scal_guid helpcontent2_scha helpcontent2_scha_00 helpcontent2_scha_01 helpcontent2_scha_02 helpcontent2_scha_04 helpcontent2_sdra helpcontent2_sdra_00 helpcontent2_sdra_01 helpcontent2_sdra_04 helpcontent2_sdra_guid helpcontent2_shar helpcontent2_shar_00 helpcontent2_shar_01 helpcontent2_shar_02 helpcontent2_shar_04 helpcontent2_shar_05 helpcontent2_shar_07 helpcontent2_shar_auko helpcontent2_shar_aupi helpcontent2_shar_expl_data helpcontent2_shar_guid helpcontent2_shar_opti helpcontent2_simp helpcontent2_simp_00 helpcontent2_simp_01 helpcontent2_simp_02 helpcontent2_simp_04 helpcontent2_simp_guid helpcontent2_simp_mini helpcontent2_smat helpcontent2_smat_00 helpcontent2_smat_01 helpcontent2_smat_02 helpcontent2_smat_04 helpcontent2_smat_guid helpcontent2_swri helpcontent2_swri_00 helpcontent2_swri_01 helpcontent2_swri_02 helpcontent2_swri_04 helpcontent2_swri_guid NULL
58
h2	helpcontent2\util\sdraw                                nmake - all helpcontent2_ut_sdra helpcontent2_aux helpcontent2_sbas_guid helpcontent2_sbas_shar helpcontent2_sbas_shar_01 helpcontent2_sbas_shar_02 helpcontent2_scal helpcontent2_scal_00 helpcontent2_scal_01 helpcontent2_scal_02 helpcontent2_scal_04 helpcontent2_scal_05 helpcontent2_scal_guid helpcontent2_scha helpcontent2_scha_00 helpcontent2_scha_01 helpcontent2_scha_02 helpcontent2_scha_04 helpcontent2_sdra helpcontent2_sdra_00 helpcontent2_sdra_01 helpcontent2_sdra_04 helpcontent2_sdra_guid helpcontent2_shar helpcontent2_shar_00 helpcontent2_shar_01 helpcontent2_shar_02 helpcontent2_shar_04 helpcontent2_shar_05 helpcontent2_shar_07 helpcontent2_shar_auko helpcontent2_shar_aupi helpcontent2_shar_expl_data helpcontent2_shar_guid helpcontent2_shar_opti helpcontent2_simp helpcontent2_simp_00 helpcontent2_simp_01 helpcontent2_simp_02 helpcontent2_simp_04 helpcontent2_simp_guid helpcontent2_smat helpcontent2_smat_00 helpcontent2_smat_01 helpcontent2_smat_02 helpcontent2_smat_04 helpcontent2_smat_guid helpcontent2_swri helpcontent2_swri_00 helpcontent2_swri_01 helpcontent2_swri_02 helpcontent2_swri_04 helpcontent2_swri_guid NULL
59
h2	helpcontent2\util\sdraw                                nmake - all helpcontent2_ut_sdra helpcontent2_aux helpcontent2_sbas_guid helpcontent2_sbas_shar helpcontent2_sbas_shar_01 helpcontent2_sbas_shar_02 helpcontent2_scal helpcontent2_scal_00 helpcontent2_scal_01 helpcontent2_scal_02 helpcontent2_scal_04 helpcontent2_scal_05 helpcontent2_scal_guid helpcontent2_scha helpcontent2_scha_00 helpcontent2_scha_01 helpcontent2_scha_02 helpcontent2_scha_04 helpcontent2_sdra helpcontent2_sdra_00 helpcontent2_sdra_01 helpcontent2_sdra_04 helpcontent2_sdra_guid helpcontent2_shar helpcontent2_shar_00 helpcontent2_shar_01 helpcontent2_shar_02 helpcontent2_shar_04 helpcontent2_shar_05 helpcontent2_shar_07 helpcontent2_shar_auko helpcontent2_shar_aupi helpcontent2_shar_expl_data helpcontent2_shar_guid helpcontent2_shar_opti helpcontent2_simp helpcontent2_simp_00 helpcontent2_simp_01 helpcontent2_simp_02 helpcontent2_simp_04 helpcontent2_simp_guid helpcontent2_simp_mini helpcontent2_smat helpcontent2_smat_00 helpcontent2_smat_01 helpcontent2_smat_02 helpcontent2_smat_04 helpcontent2_smat_guid helpcontent2_swri helpcontent2_swri_00 helpcontent2_swri_01 helpcontent2_swri_02 helpcontent2_swri_04 helpcontent2_swri_guid NULL
59
h2	helpcontent2\util\sdatabase                            nmake - all helpcontent2_ut_sdat helpcontent2_aux helpcontent2_sbas_guid helpcontent2_sbas_shar helpcontent2_sbas_shar_01 helpcontent2_sbas_shar_02 helpcontent2_scal helpcontent2_scal_00 helpcontent2_scal_01 helpcontent2_scal_02 helpcontent2_scal_04 helpcontent2_scal_05 helpcontent2_scal_guid helpcontent2_scha helpcontent2_scha_00 helpcontent2_scha_01 helpcontent2_scha_02 helpcontent2_scha_04 helpcontent2_sdra helpcontent2_sdra_00 helpcontent2_sdra_01 helpcontent2_sdra_04 helpcontent2_sdra_guid helpcontent2_shar helpcontent2_shar_00 helpcontent2_shar_01 helpcontent2_shar_02 helpcontent2_shar_04 helpcontent2_shar_05 helpcontent2_shar_07 helpcontent2_shar_auko helpcontent2_shar_aupi helpcontent2_shar_expl_data helpcontent2_shar_guid helpcontent2_shar_opti helpcontent2_simp helpcontent2_simp_00 helpcontent2_simp_01 helpcontent2_simp_02 helpcontent2_simp_04 helpcontent2_simp_guid helpcontent2_smat helpcontent2_smat_00 helpcontent2_smat_01 helpcontent2_smat_02 helpcontent2_smat_04 helpcontent2_smat_guid helpcontent2_swri helpcontent2_swri_00 helpcontent2_swri_01 helpcontent2_swri_02 helpcontent2_swri_04 helpcontent2_swri_guid NULL
60
h2	helpcontent2\util\sdatabase                            nmake - all helpcontent2_ut_sdat helpcontent2_aux helpcontent2_sbas_guid helpcontent2_sbas_shar helpcontent2_sbas_shar_01 helpcontent2_sbas_shar_02 helpcontent2_scal helpcontent2_scal_00 helpcontent2_scal_01 helpcontent2_scal_02 helpcontent2_scal_04 helpcontent2_scal_05 helpcontent2_scal_guid helpcontent2_scha helpcontent2_scha_00 helpcontent2_scha_01 helpcontent2_scha_02 helpcontent2_scha_04 helpcontent2_sdra helpcontent2_sdra_00 helpcontent2_sdra_01 helpcontent2_sdra_04 helpcontent2_sdra_guid helpcontent2_shar helpcontent2_shar_00 helpcontent2_shar_01 helpcontent2_shar_02 helpcontent2_shar_04 helpcontent2_shar_05 helpcontent2_shar_07 helpcontent2_shar_auko helpcontent2_shar_aupi helpcontent2_shar_expl_data helpcontent2_shar_guid helpcontent2_shar_opti helpcontent2_simp helpcontent2_simp_00 helpcontent2_simp_01 helpcontent2_simp_02 helpcontent2_simp_04 helpcontent2_simp_guid helpcontent2_simp_mini helpcontent2_smat helpcontent2_smat_00 helpcontent2_smat_01 helpcontent2_smat_02 helpcontent2_smat_04 helpcontent2_smat_guid helpcontent2_swri helpcontent2_swri_00 helpcontent2_swri_01 helpcontent2_swri_02 helpcontent2_swri_04 helpcontent2_swri_guid NULL
60
h2	helpcontent2\util\shared                               nmake - all helpcontent2_ut_shar helpcontent2_aux helpcontent2_sbas_guid helpcontent2_sbas_shar helpcontent2_sbas_shar_01 helpcontent2_sbas_shar_02 helpcontent2_scal helpcontent2_scal_00 helpcontent2_scal_01 helpcontent2_scal_02 helpcontent2_scal_04 helpcontent2_scal_05 helpcontent2_scal_guid helpcontent2_scha helpcontent2_scha_00 helpcontent2_scha_01 helpcontent2_scha_02 helpcontent2_scha_04 helpcontent2_sdra helpcontent2_sdra_00 helpcontent2_sdra_01 helpcontent2_sdra_04 helpcontent2_sdra_guid helpcontent2_shar helpcontent2_shar_00 helpcontent2_shar_01 helpcontent2_shar_02 helpcontent2_shar_04 helpcontent2_shar_05 helpcontent2_shar_07 helpcontent2_shar_auko helpcontent2_shar_aupi helpcontent2_shar_expl_data helpcontent2_shar_guid helpcontent2_shar_opti helpcontent2_simp helpcontent2_simp_00 helpcontent2_simp_01 helpcontent2_simp_02 helpcontent2_simp_04 helpcontent2_simp_guid helpcontent2_smat helpcontent2_smat_00 helpcontent2_smat_01 helpcontent2_smat_02 helpcontent2_smat_04 helpcontent2_smat_guid helpcontent2_swri helpcontent2_swri_00 helpcontent2_swri_01 helpcontent2_swri_02 helpcontent2_swri_04 helpcontent2_swri_guid NULL
61
h2	helpcontent2\util\shared                               nmake - all helpcontent2_ut_shar helpcontent2_aux helpcontent2_sbas_guid helpcontent2_sbas_shar helpcontent2_sbas_shar_01 helpcontent2_sbas_shar_02 helpcontent2_scal helpcontent2_scal_00 helpcontent2_scal_01 helpcontent2_scal_02 helpcontent2_scal_04 helpcontent2_scal_05 helpcontent2_scal_guid helpcontent2_scha helpcontent2_scha_00 helpcontent2_scha_01 helpcontent2_scha_02 helpcontent2_scha_04 helpcontent2_sdra helpcontent2_sdra_00 helpcontent2_sdra_01 helpcontent2_sdra_04 helpcontent2_sdra_guid helpcontent2_shar helpcontent2_shar_00 helpcontent2_shar_01 helpcontent2_shar_02 helpcontent2_shar_04 helpcontent2_shar_05 helpcontent2_shar_07 helpcontent2_shar_auko helpcontent2_shar_aupi helpcontent2_shar_expl_data helpcontent2_shar_guid helpcontent2_shar_opti helpcontent2_simp helpcontent2_simp_00 helpcontent2_simp_01 helpcontent2_simp_02 helpcontent2_simp_04 helpcontent2_simp_guid helpcontent2_simp_mini helpcontent2_smat helpcontent2_smat_00 helpcontent2_smat_01 helpcontent2_smat_02 helpcontent2_smat_04 helpcontent2_smat_guid helpcontent2_swri helpcontent2_swri_00 helpcontent2_swri_01 helpcontent2_swri_02 helpcontent2_swri_04 helpcontent2_swri_guid NULL
61
h2	helpcontent2\util\simpress                             nmake - all helpcontent2_ut_simp helpcontent2_aux helpcontent2_sbas_guid helpcontent2_sbas_shar helpcontent2_sbas_shar_01 helpcontent2_sbas_shar_02 helpcontent2_scal helpcontent2_scal_00 helpcontent2_scal_01 helpcontent2_scal_02 helpcontent2_scal_04 helpcontent2_scal_05 helpcontent2_scal_guid helpcontent2_scha helpcontent2_scha_00 helpcontent2_scha_01 helpcontent2_scha_02 helpcontent2_scha_04 helpcontent2_sdra helpcontent2_sdra_00 helpcontent2_sdra_01 helpcontent2_sdra_04 helpcontent2_sdra_guid helpcontent2_shar helpcontent2_shar_00 helpcontent2_shar_01 helpcontent2_shar_02 helpcontent2_shar_04 helpcontent2_shar_05 helpcontent2_shar_07 helpcontent2_shar_auko helpcontent2_shar_aupi helpcontent2_shar_expl_data helpcontent2_shar_guid helpcontent2_shar_opti helpcontent2_simp helpcontent2_simp_00 helpcontent2_simp_01 helpcontent2_simp_02 helpcontent2_simp_04 helpcontent2_simp_guid helpcontent2_smat helpcontent2_smat_00 helpcontent2_smat_01 helpcontent2_smat_02 helpcontent2_smat_04 helpcontent2_smat_guid helpcontent2_swri helpcontent2_swri_00 helpcontent2_swri_01 helpcontent2_swri_02 helpcontent2_swri_04 helpcontent2_swri_guid NULL
62
h2	helpcontent2\util\simpress                             nmake - all helpcontent2_ut_simp helpcontent2_aux helpcontent2_sbas_guid helpcontent2_sbas_shar helpcontent2_sbas_shar_01 helpcontent2_sbas_shar_02 helpcontent2_scal helpcontent2_scal_00 helpcontent2_scal_01 helpcontent2_scal_02 helpcontent2_scal_04 helpcontent2_scal_05 helpcontent2_scal_guid helpcontent2_scha helpcontent2_scha_00 helpcontent2_scha_01 helpcontent2_scha_02 helpcontent2_scha_04 helpcontent2_sdra helpcontent2_sdra_00 helpcontent2_sdra_01 helpcontent2_sdra_04 helpcontent2_sdra_guid helpcontent2_shar helpcontent2_shar_00 helpcontent2_shar_01 helpcontent2_shar_02 helpcontent2_shar_04 helpcontent2_shar_05 helpcontent2_shar_07 helpcontent2_shar_auko helpcontent2_shar_aupi helpcontent2_shar_expl_data helpcontent2_shar_guid helpcontent2_shar_opti helpcontent2_simp helpcontent2_simp_00 helpcontent2_simp_01 helpcontent2_simp_02 helpcontent2_simp_04 helpcontent2_simp_guid helpcontent2_simp_mini helpcontent2_smat helpcontent2_smat_00 helpcontent2_smat_01 helpcontent2_smat_02 helpcontent2_smat_04 helpcontent2_smat_guid helpcontent2_swri helpcontent2_swri_00 helpcontent2_swri_01 helpcontent2_swri_02 helpcontent2_swri_04 helpcontent2_swri_guid NULL
62
h2	helpcontent2\util\smath                                nmake - all helpcontent2_ut_smat helpcontent2_aux helpcontent2_sbas_guid helpcontent2_sbas_shar helpcontent2_sbas_shar_01 helpcontent2_sbas_shar_02 helpcontent2_scal helpcontent2_scal_00 helpcontent2_scal_01 helpcontent2_scal_02 helpcontent2_scal_04 helpcontent2_scal_05 helpcontent2_scal_guid helpcontent2_scha helpcontent2_scha_00 helpcontent2_scha_01 helpcontent2_scha_02 helpcontent2_scha_04 helpcontent2_sdra helpcontent2_sdra_00 helpcontent2_sdra_01 helpcontent2_sdra_04 helpcontent2_sdra_guid helpcontent2_shar helpcontent2_shar_00 helpcontent2_shar_01 helpcontent2_shar_02 helpcontent2_shar_04 helpcontent2_shar_05 helpcontent2_shar_07 helpcontent2_shar_auko helpcontent2_shar_aupi helpcontent2_shar_expl_data helpcontent2_shar_guid helpcontent2_shar_opti helpcontent2_simp helpcontent2_simp_00 helpcontent2_simp_01 helpcontent2_simp_02 helpcontent2_simp_04 helpcontent2_simp_guid helpcontent2_smat helpcontent2_smat_00 helpcontent2_smat_01 helpcontent2_smat_02 helpcontent2_smat_04 helpcontent2_smat_guid helpcontent2_swri helpcontent2_swri_00 helpcontent2_swri_01 helpcontent2_swri_02 helpcontent2_swri_04 helpcontent2_swri_guid NULL
63
h2	helpcontent2\util\smath                                nmake - all helpcontent2_ut_smat helpcontent2_aux helpcontent2_sbas_guid helpcontent2_sbas_shar helpcontent2_sbas_shar_01 helpcontent2_sbas_shar_02 helpcontent2_scal helpcontent2_scal_00 helpcontent2_scal_01 helpcontent2_scal_02 helpcontent2_scal_04 helpcontent2_scal_05 helpcontent2_scal_guid helpcontent2_scha helpcontent2_scha_00 helpcontent2_scha_01 helpcontent2_scha_02 helpcontent2_scha_04 helpcontent2_sdra helpcontent2_sdra_00 helpcontent2_sdra_01 helpcontent2_sdra_04 helpcontent2_sdra_guid helpcontent2_shar helpcontent2_shar_00 helpcontent2_shar_01 helpcontent2_shar_02 helpcontent2_shar_04 helpcontent2_shar_05 helpcontent2_shar_07 helpcontent2_shar_auko helpcontent2_shar_aupi helpcontent2_shar_expl_data helpcontent2_shar_guid helpcontent2_shar_opti helpcontent2_simp helpcontent2_simp_00 helpcontent2_simp_01 helpcontent2_simp_02 helpcontent2_simp_04 helpcontent2_simp_guid helpcontent2_simp_mini helpcontent2_smat helpcontent2_smat_00 helpcontent2_smat_01 helpcontent2_smat_02 helpcontent2_smat_04 helpcontent2_smat_guid helpcontent2_swri helpcontent2_swri_00 helpcontent2_swri_01 helpcontent2_swri_02 helpcontent2_swri_04 helpcontent2_swri_guid NULL
63
h2	helpcontent2\util\swriter                              nmake - all helpcontent2_ut_swri helpcontent2_aux helpcontent2_sbas_guid helpcontent2_sbas_shar helpcontent2_sbas_shar_01 helpcontent2_sbas_shar_02 helpcontent2_scal helpcontent2_scal_00 helpcontent2_scal_01 helpcontent2_scal_02 helpcontent2_scal_04 helpcontent2_scal_05 helpcontent2_scal_guid helpcontent2_scha helpcontent2_scha_00 helpcontent2_scha_01 helpcontent2_scha_02 helpcontent2_scha_04 helpcontent2_sdra helpcontent2_sdra_00 helpcontent2_sdra_01 helpcontent2_sdra_04 helpcontent2_sdra_guid helpcontent2_shar helpcontent2_shar_00 helpcontent2_shar_01 helpcontent2_shar_02 helpcontent2_shar_04 helpcontent2_shar_05 helpcontent2_shar_07 helpcontent2_shar_auko helpcontent2_shar_aupi helpcontent2_shar_expl_data helpcontent2_shar_guid helpcontent2_shar_opti helpcontent2_simp helpcontent2_simp_00 helpcontent2_simp_01 helpcontent2_simp_02 helpcontent2_simp_04 helpcontent2_simp_guid helpcontent2_smat helpcontent2_smat_00 helpcontent2_smat_01 helpcontent2_smat_02 helpcontent2_smat_04 helpcontent2_smat_guid helpcontent2_swri helpcontent2_swri_00 helpcontent2_swri_01 helpcontent2_swri_02 helpcontent2_swri_04 helpcontent2_swri_guid NULL
64
h2	helpcontent2\util\swriter                              nmake - all helpcontent2_ut_swri helpcontent2_aux helpcontent2_sbas_guid helpcontent2_sbas_shar helpcontent2_sbas_shar_01 helpcontent2_sbas_shar_02 helpcontent2_scal helpcontent2_scal_00 helpcontent2_scal_01 helpcontent2_scal_02 helpcontent2_scal_04 helpcontent2_scal_05 helpcontent2_scal_guid helpcontent2_scha helpcontent2_scha_00 helpcontent2_scha_01 helpcontent2_scha_02 helpcontent2_scha_04 helpcontent2_sdra helpcontent2_sdra_00 helpcontent2_sdra_01 helpcontent2_sdra_04 helpcontent2_sdra_guid helpcontent2_shar helpcontent2_shar_00 helpcontent2_shar_01 helpcontent2_shar_02 helpcontent2_shar_04 helpcontent2_shar_05 helpcontent2_shar_07 helpcontent2_shar_auko helpcontent2_shar_aupi helpcontent2_shar_expl_data helpcontent2_shar_guid helpcontent2_shar_opti helpcontent2_simp helpcontent2_simp_00 helpcontent2_simp_01 helpcontent2_simp_02 helpcontent2_simp_04 helpcontent2_simp_guid helpcontent2_simp_mini helpcontent2_smat helpcontent2_smat_00 helpcontent2_smat_01 helpcontent2_smat_02 helpcontent2_smat_04 helpcontent2_smat_guid helpcontent2_swri helpcontent2_swri_00 helpcontent2_swri_01 helpcontent2_swri_02 helpcontent2_swri_04 helpcontent2_swri_guid NULL
64
h2	helpcontent2\source\auxiliary                          nmake - all helpcontent2_aux NULL
65
h2	helpcontent2\source\auxiliary                          nmake - all helpcontent2_aux NULL
(-)a/main/helpcontent2/source/text/simpress/makefile.mk (-1 / +1 lines)
Lines 62-68 XHPFILES = \ Link Here
62
   main0212.xhp \
62
   main0212.xhp \
63
   main0213.xhp \
63
   main0213.xhp \
64
   main0214.xhp \
64
   main0214.xhp \
65
   main0503.xhp 
65
   main0503.xhp
66
	
66
	
67
# --- Targets ------------------------------------------------------
67
# --- Targets ------------------------------------------------------
68
68
(-)a/main/helpcontent2/source/text/simpress/minimizer/infobox.xhp (+44 lines)
Line 0 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!--***********************************************************
3
 *
4
 * Licensed to the Apache Software Foundation (ASF) under one
5
 * or more contributor license agreements.  See the NOTICE file
6
 * distributed with this work for additional information
7
 * regarding copyright ownership.  The ASF licenses this file
8
 * to you under the Apache License, Version 2.0 (the
9
 * "License"); you may not use this file except in compliance
10
 * with the License.  You may obtain a copy of the License at
11
 *
12
 *   http://www.apache.org/licenses/LICENSE-2.0
13
 *
14
 * Unless required by applicable law or agreed to in writing,
15
 * software distributed under the License is distributed on an
16
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17
 * KIND, either express or implied.  See the License for the
18
 * specific language governing permissions and limitations
19
 * under the License.
20
 *
21
 ***********************************************************-->
22
<helpdocument version="1.0">
23
    <meta>
24
        <topic id="sdextPresentationMinimizerInfoBoxxhp" indexer="include">
25
            <title xml-lang="en-US" id="tit">Presentation Minimizer - Result</title>
26
            <filename>/text/simpress/minimizer/infobox.xhp</filename>
27
        </topic>
28
    </meta>
29
    <body>
30
        <section id="infobox">
31
            <!-- Result InfoBox  -->
32
            <bookmark xml-lang="en-US" branch="hid/sdext:Minimizer:InfoBox:Dialog" id="bm_id77665508" localize="false"/>
33
            <paragraph xml-lang="en-US" id="par_id77665511" role="heading" level="1" l10n="NEW"><link href="text/simpress/minimizer/infobox.xhp" name="Presentation Minimizer - Result">Presentation Minimizer - Result</link></paragraph>
34
            <paragraph xml-lang="en-US" id="par_id77665512" role="paragraph" l10n="NEW"><ahelp hid="hid/sdext:InfoBox:Dialog">Shows the result of the optimization process.</ahelp></paragraph>
35
        </section>
36
        <!-- Result - Checkbox open new presentation  -->
37
        <bookmark xml-lang="en-US" branch="hid/sdext:Minimizer:InfoBox:CBOpenNew" id="bm_id77665522" localize="false"/>
38
        <paragraph xml-lang="en-US" id="hd_id77665501" role="heading" level="2" l10n="NEW"></paragraph>
39
        <paragraph xml-lang="en-US" id="par_id77665503s" role="paragraph" l10n="NEW"><ahelp hid="sdext:Minimizer:InfoBox:CBOpenNew">Open the copy of this presentation where the changes where applied.</ahelp></paragraph>
40
        <paragraph role="paragraph" id="par_id3153087" xml-lang="en-US" l10n="NEW">
41
            <link href="text/simpress/minimizer/main.xhp" name="Go to Presentation Minimizer Wizard">Go to Presentation Minimizer Wizard</link>
42
        </paragraph>
43
    </body>
44
</helpdocument>
(-)a/main/helpcontent2/source/text/simpress/minimizer/main.xhp (+77 lines)
Line 0 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!--***********************************************************
3
 *
4
 * Licensed to the Apache Software Foundation (ASF) under one
5
 * or more contributor license agreements.  See the NOTICE file
6
 * distributed with this work for additional information
7
 * regarding copyright ownership.  The ASF licenses this file
8
 * to you under the Apache License, Version 2.0 (the
9
 * "License"); you may not use this file except in compliance
10
 * with the License.  You may obtain a copy of the License at
11
 *
12
 *   http://www.apache.org/licenses/LICENSE-2.0
13
 *
14
 * Unless required by applicable law or agreed to in writing,
15
 * software distributed under the License is distributed on an
16
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17
 * KIND, either express or implied.  See the License for the
18
 * specific language governing permissions and limitations
19
 * under the License.
20
 *
21
 ***********************************************************-->
22
<helpdocument version="1.0">
23
    <meta>
24
        <topic id="sdextPresentationMinimizerMainxhp" indexer="include">
25
            <title xml-lang="en-US" id="tit">Presentation Minimizer</title>
26
            <filename>/text/simpress/minimizer/main.xhp</filename>
27
        </topic>
28
    </meta>
29
    <body>
30
        <bookmark xml-lang="en-US" branch="hid/.uno:PresentationMinimizer" id="bm_id77665539" localize="false"/>
31
        <bookmark xml-lang="en-US" branch="index" id="bm_id77665500">
32
            <bookmark_value>presentations; optimize file size</bookmark_value>
33
            <bookmark_value>Presentation Minimizer</bookmark_value>
34
        </bookmark>
35
        <bookmark xml-lang="en-US" branch="hid/.uno:PresentationMinimizer" id="bm_id77665502" localize="false"/>
36
        <paragraph xml-lang="en-US" id="hd_id77665500" role="heading" level="1" l10n="NEW">Presentation Minimizer</paragraph>
37
        <paragraph xml-lang="en-US" id="par_id77665500" role="paragraph" l10n="NEW"><ahelp hid=".uno:PresentationMinimizer">Opens the Presentation Minimizer wizards, where you can  optimize the size of %PRODUCTNAME Impress files, by compresing large images, reducing cropped areas, removing unused master pages, etc.</ahelp></paragraph>
38
39
        <section id="howtoget">
40
            <embed href="text/simpress/minimizer/shared.xhp#main"/>
41
        </section>
42
43
        <paragraph xml-lang="en-US" id="par_id77665502" role="paragraph" l10n="NEW">The Presentation Minimizer is used to reduce the file size of the current presentation. Images will be compressed and data, that is no longer needed, will be removed.</paragraph>
44
        <paragraph xml-lang="en-US" id="par_id77665503" role="paragraph" l10n="NEW">At the last step of the wizard you can choose to apply the changes to the current presentation or to create an optimized new version of the presentation.</paragraph>
45
46
        <embed href="text/simpress/minimizer/step1.xhp#step1"/>
47
        <embed href="text/simpress/minimizer/step2.xhp#step2"/>
48
        <embed href="text/simpress/minimizer/step3.xhp#step3"/>
49
        <embed href="text/simpress/minimizer/step4.xhp#step4"/>
50
        <embed href="text/simpress/minimizer/step5.xhp#step5"/>
51
        <embed href="text/simpress/minimizer/infobox.xhp#infobox"/>
52
53
        <!-- Buttons -->
54
        <bookmark xml-lang="en-US" branch="hid/sdext:Minimizer:Wizard:PBHelp" id="bm_id77665503" localize="false"/>
55
        <paragraph role="heading" id="hd_id776655000" xml-lang="en-US" level="2" l10n="NEW">Help</paragraph>
56
        <paragraph role="paragraph" id="par_id776655000" xml-lang="en-US" l10n="NEW"><ahelp hid="hid/sdext:Minimizer:Wizard:PBHelp">Open the Online Help for this Wizard.</ahelp></paragraph>
57
58
        <bookmark xml-lang="en-US" branch="hid/sdext:Minimizer:Wizard:PBBack" id="bm_id77665502" localize="false"/>
59
        <paragraph role="heading" id="hd_id77665501" xml-lang="en-US" level="2" l10n="NEW">Back</paragraph>
60
        <paragraph role="paragraph" id="par_id77665501" xml-lang="en-US" l10n="NEW" oldref="6"><ahelp hid="hid/sdext:Minimizer:Wizard:PBBack">Returns to the selections made on the previous page. The current settings remain in effect. This button only becomes active after the first page.</ahelp></paragraph>
61
62
        <bookmark xml-lang="en-US" branch="hid/sdext:Minimizer:Wizard:PBNext" id="bm_id77665503" localize="false"/>
63
        <paragraph role="heading" id="hd_id77665502" xml-lang="en-US" level="2" l10n="NEW">Next</paragraph>
64
        <paragraph role="paragraph" id="par_id77665502b" xml-lang="en-US" l10n="NEW"><ahelp hid="hid/sdext:Minimizer:Wizard:PBNext">The wizard saves the current settings and goes to the next page. Once you reach the last page, this button will become inactive.</ahelp></paragraph>
65
66
        <bookmark xml-lang="en-US" branch="hid/sdext:Minimizer:Wizard:PBFinish" id="bm_id77665504" localize="false"/>
67
        <paragraph role="heading" id="hd_id77665503" xml-lang="en-US" level="2" l10n="CHG">Finish</paragraph>
68
        <paragraph role="paragraph" id="par_id7766550b" xml-lang="en-US" l10n="NEW"><ahelp hid="hid/sdext:Minimizer:Wizard:PBFinish">According to your selections, the wizard creates a document template and saves it on your hard disk. A new document based on the template appears in the work area, with the filename "UntitledX" (X stands for an automatic number).</ahelp></paragraph>
69
70
        <bookmark xml-lang="en-US" branch="hid/sdext:Minimizer:Wizard:PBCancel" id="bm_id77665505" localize="false"/>
71
        <embed href="text/shared/00/00000001.xhp#abbrechen"/>
72
        <paragraph role="note" id="par_id77665504" xml-lang="en-US" l10n="NEW">$[officename] saves the current settings in the wizard according to the selected document template. These will be used as the default settings the next time you activate the wizard.</paragraph>
73
74
        <bookmark xml-lang="en-US" branch="hid/sdext:Minimizer:Wizard:Dialog" id="bm_id77665501" localize="false"/>
75
        <comment>Dialog ID here, below any &lt;avis&gt; tags (else the tagged text will be shown on the buttons)</comment>
76
    </body>
77
</helpdocument>
(-)a/main/helpcontent2/source/text/simpress/minimizer/makefile.mk (+56 lines)
Line 0 Link Here
1
#**************************************************************
2
#
3
#  Licensed to the Apache Software Foundation (ASF) under one
4
#  or more contributor license agreements.  See the NOTICE file
5
#  distributed with this work for additional information
6
#  regarding copyright ownership.  The ASF licenses this file
7
#  to you under the Apache License, Version 2.0 (the
8
#  "License"); you may not use this file except in compliance
9
#  with the License.  You may obtain a copy of the License at
10
#
11
#    http://www.apache.org/licenses/LICENSE-2.0
12
#
13
#  Unless required by applicable law or agreed to in writing,
14
#  software distributed under the License is distributed on an
15
#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
#  KIND, either express or implied.  See the License for the
17
#  specific language governing permissions and limitations
18
#  under the License.
19
#
20
#**************************************************************
21
22
23
24
# edit to match directory level 
25
PRJ=..$/..$/..$/..
26
# same for all makefiles in "helpcontent2"
27
PRJNAME = helpcontent2
28
# edit to match the current package
29
PACKAGE = text/simpress/minimizer
30
# uniqe name (module wide);
31
# using a modified form of package should do here
32
TARGET  = text_simpress_minimizer
33
# edit to match the current module
34
MODULE  = simpress
35
36
# --- Settings -----------------------------------------------------
37
38
.INCLUDE : settings.mk
39
.INCLUDE : $(PRJ)$/settings.pmk
40
41
# this list matches the *.xhp files to process
42
XHPFILES = \
43
   main.xhp \
44
   step1.xhp \
45
   step2.xhp \
46
   step3.xhp \
47
   step4.xhp \
48
   step5.xhp \
49
   infobox.xhp \
50
   shared.xhp \
51
52
53
# --- Targets ------------------------------------------------------
54
55
.INCLUDE :  target.mk
56
.INCLUDE : tg_help.mk
(-)a/main/helpcontent2/source/text/simpress/minimizer/shared.xhp (+37 lines)
Line 0 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!--***********************************************************
3
 *
4
 * Licensed to the Apache Software Foundation (ASF) under one
5
 * or more contributor license agreements.  See the NOTICE file
6
 * distributed with this work for additional information
7
 * regarding copyright ownership.  The ASF licenses this file
8
 * to you under the Apache License, Version 2.0 (the
9
 * "License"); you may not use this file except in compliance
10
 * with the License.  You may obtain a copy of the License at
11
 *
12
 *   http://www.apache.org/licenses/LICENSE-2.0
13
 *
14
 * Unless required by applicable law or agreed to in writing,
15
 * software distributed under the License is distributed on an
16
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17
 * KIND, either express or implied.  See the License for the
18
 * specific language governing permissions and limitations
19
 * under the License.
20
 *
21
 ***********************************************************-->
22
<helpdocument version="1.0">
23
    <meta>
24
        <topic id="sdextPresentationMinimizerSharedXHP" indexer="exclude">
25
            <title id="tit" xml-lang="en-US">Shared content for the Presentation Minimizer Wizard</title>
26
            <filename>/text/simpress/minimizer/shared.xhp</filename>
27
        </topic>
28
    </meta>
29
    <body>
30
        <paragraph role="paragraph" id="par_id111110" xml-lang="en-US" l10n="NEW"><variable id="main">Choose <emph>Tools - Presentation Minimizer...</emph></variable></paragraph>
31
        <paragraph role="paragraph" id="par_id111111" xml-lang="en-US" l10n="NEW"><variable id="step1">Choose <emph>Tools - Presentation Minimizer... - Introduction</emph></variable></paragraph>
32
        <paragraph role="paragraph" id="par_id111112" xml-lang="en-US" l10n="NEW"><variable id="step2">Choose <emph>Tools - Presentation Minimizer... - Slides</emph></variable></paragraph>
33
        <paragraph role="paragraph" id="par_id111113" xml-lang="en-US" l10n="NEW"><variable id="step3">Choose <emph>Tools - Presentation Minimizer... - Graphics</emph></variable></paragraph>
34
        <paragraph role="paragraph" id="par_id111114" xml-lang="en-US" l10n="NEW"><variable id="step4">Choose <emph>Tools - Presentation Minimizer... - OLE Objects</emph></variable></paragraph>
35
        <paragraph role="paragraph" id="par_id111115" xml-lang="en-US" l10n="NEW"><variable id="step5">Choose <emph>Tools - Presentation Minimizer... - Summary</emph></variable></paragraph>
36
    </body>
37
</helpdocument>
(-)a/main/helpcontent2/source/text/simpress/minimizer/step1.xhp (+52 lines)
Line 0 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!--***********************************************************
3
 *
4
 * Licensed to the Apache Software Foundation (ASF) under one
5
 * or more contributor license agreements.  See the NOTICE file
6
 * distributed with this work for additional information
7
 * regarding copyright ownership.  The ASF licenses this file
8
 * to you under the Apache License, Version 2.0 (the
9
 * "License"); you may not use this file except in compliance
10
 * with the License.  You may obtain a copy of the License at
11
 *
12
 *   http://www.apache.org/licenses/LICENSE-2.0
13
 *
14
 * Unless required by applicable law or agreed to in writing,
15
 * software distributed under the License is distributed on an
16
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17
 * KIND, either express or implied.  See the License for the
18
 * specific language governing permissions and limitations
19
 * under the License.
20
 *
21
 ***********************************************************-->
22
<helpdocument version="1.0">
23
    <meta>
24
        <topic id="sdextPresentationMinimizerStep1xhp" indexer="include">
25
            <title xml-lang="en-US" id="tit">Presentation Minimizer - Introduction</title>
26
            <filename>/text/simpress/minimizer/step1.xhp</filename>
27
        </topic>
28
    </meta>
29
    <body>
30
        <section id="step1">
31
            <bookmark xml-lang="en-US" branch="hid/sdext:Minimizer:Wizard:Step1" id="bm_id77665503" localize="false"/>
32
            <paragraph xml-lang="en-US" id="hd_id77665500" role="heading" level="1" l10n="NEW"><link href="text/simpress/minimizer/step1.xhp" name="Presentation Minimizer - Introduction">Presentation Minimizer - Introduction</link></paragraph>
33
            <paragraph xml-lang="en-US" id="par_id77665500" role="paragraph" l10n="NEW"><ahelp hid="hid/sdext:Minimizer:Wizard:Step1">In this step you can select the settings of the wizard that you have stored previously.</ahelp></paragraph>
34
        </section>
35
        <section id="howtoget">
36
            <embed href="text/simpress/minimizer/shared.xhp#step1"/>
37
        </section>
38
        <!-- 1 Step Introduction -->
39
        <!-- 1 Step Settigs listbox  -->
40
        <bookmark xml-lang="en-US" branch="hid/sdext:Minimizer:Wizard:Step1:LBSettings" id="bm_id77665504" localize="false"/>
41
        <paragraph xml-lang="en-US" id="hd_id77665501" role="heading" level="2" l10n="NEW">Choose settings for Presentation Minimizer</paragraph>
42
        <paragraph xml-lang="en-US" id="par_id77665503a" role="paragraph" l10n="NEW"><ahelp hid="sdext:Minimizer:Wizard:Step1:LBSettings">This list box contains a list of all available wizard settings. Choose one to apply the settings to the wizard options.</ahelp></paragraph>
43
        <!-- 1 Step Delete push button  -->
44
        <bookmark xml-lang="en-US" branch="hid/sdext:Minimizer:Wizard:Step1:PBDelSetts" id="bm_id77665505" localize="false"/>
45
        <paragraph xml-lang="en-US" id="hd_id77665502" role="heading" level="2" l10n="NEW">Delete</paragraph>
46
        <paragraph xml-lang="en-US" id="par_id77665503b" role="paragraph" l10n="NEW"><ahelp hid="sdext:Minimizer:Wizard:Step1:PBDelSetts">Delete the wizard settings currently selected on the list box.</ahelp></paragraph>
47
48
        <paragraph role="paragraph" id="par_id3153087" xml-lang="en-US" l10n="NEW">
49
            <link href="text/simpress/minimizer/step2.xhp" name="Go to Presentation Minimizer - Slides">Go to Presentation Minimizer - Slides</link>
50
        </paragraph>
51
    </body>
52
</helpdocument>
(-)a/main/helpcontent2/source/text/simpress/minimizer/step2.xhp (+62 lines)
Line 0 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!--***********************************************************
3
 *
4
 * Licensed to the Apache Software Foundation (ASF) under one
5
 * or more contributor license agreements.  See the NOTICE file
6
 * distributed with this work for additional information
7
 * regarding copyright ownership.  The ASF licenses this file
8
 * to you under the Apache License, Version 2.0 (the
9
 * "License"); you may not use this file except in compliance
10
 * with the License.  You may obtain a copy of the License at
11
 *
12
 *   http://www.apache.org/licenses/LICENSE-2.0
13
 *
14
 * Unless required by applicable law or agreed to in writing,
15
 * software distributed under the License is distributed on an
16
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17
 * KIND, either express or implied.  See the License for the
18
 * specific language governing permissions and limitations
19
 * under the License.
20
 *
21
 ***********************************************************-->
22
<helpdocument version="1.0">
23
    <meta>
24
        <topic id="sdextPresentationMinimizerStep2xhp" indexer="include">
25
            <title xml-lang="en-US" id="tit">Presentation Minimizer - Slides</title>
26
            <filename>/text/simpress/minimizer/step2.xhp</filename>
27
        </topic>
28
    </meta>
29
    <body>
30
        <section id="step2">
31
            <!-- 2 Step  -->
32
            <bookmark xml-lang="en-US" branch="hid/sdext:Minimizer:Wizard:Step2" id="bm_id77665505" localize="false"/>
33
            <paragraph xml-lang="en-US" id="par_id77665504" role="heading" level="1" l10n="NEW"><link href="text/simpress/minimizer/step2.xhp" name="Presentation Minimizer - Introduction">Presentation Minimizer - Slides</link></paragraph>
34
            <paragraph xml-lang="en-US" id="par_id77665505" role="paragraph" l10n="NEW"><ahelp hid="hid/sdext:Minimizer:Wizard:Step2">Choose which slides to delete.</ahelp></paragraph>
35
        </section>
36
        <section id="howtoget">
37
            <embed href="text/simpress/minimizer/shared.xhp#step2"/>
38
        </section>
39
        <!-- 2 Step Delete unused master pages -->
40
        <bookmark xml-lang="en-US" branch="hid/sdext:Minimizer:Wizard:Step2:CBMasterPages" id="bm_id77665506" localize="false"/>
41
        <paragraph xml-lang="en-US" id="hd_id77665501" role="heading" level="2" l10n="NEW">Delete unused master pages</paragraph>
42
        <paragraph xml-lang="en-US" id="par_id77665503c" role="paragraph" l10n="NEW"><ahelp hid="sdext:Minimizer:Wizard:Step2:CBMasterPages">Delete unused master pages.</ahelp></paragraph>
43
        <!-- 2 Step Delete hidden slides -->
44
        <bookmark xml-lang="en-US" branch="hid/sdext:Minimizer:Wizard:Step2:CBHiddenSlides" id="bm_id77665507" localize="false"/>
45
        <paragraph xml-lang="en-US" id="hd_id77665502" role="heading" level="2" l10n="NEW">Delete hidden slides</paragraph>
46
        <paragraph xml-lang="en-US" id="par_id77665503d" role="paragraph" l10n="NEW"><ahelp hid="sdext:Minimizer:Wizard:Step2:CBHiddenSlides">Delete hidden slides.</ahelp></paragraph>
47
        <!-- 2 Step Delete slides not in custom slide show -->
48
        <bookmark xml-lang="en-US" branch="hid/sdext:Minimizer:Wizard:Step2:CBCustomShow" id="bm_id77665508" localize="false"/>
49
        <paragraph xml-lang="en-US" id="hd_id77665503" role="heading" level="2" l10n="NEW">Delete slides that are not used for the custom slide show</paragraph>
50
        <paragraph xml-lang="en-US" id="par_id77665503e" role="paragraph" l10n="NEW"><ahelp hid="sdext:Minimizer:Wizard:Step2:CBCustomShow">Delete slides that are not used for the custom slide show.</ahelp></paragraph>
51
        <!-- 2 Step Listbox - not in custom show -->
52
        <bookmark xml-lang="en-US" branch="hid/sdext:Minimizer:Wizard:Step2:LBCustomShow" id="bm_id77665509" localize="false"/>
53
        <paragraph xml-lang="en-US" id="par_id77665503f" role="paragraph" l10n="NEW"><ahelp hid="sdext:Minimizer:Wizard:Step2:LBCustomShow">This list box displays all slides that are not used in the custom slide show.</ahelp></paragraph>
54
        <!-- 2 Step Clear notes -->
55
        <bookmark xml-lang="en-US" branch="hid/sdext:Minimizer:Wizard:Step2:CBNotes" id="bm_id77665510" localize="false"/>
56
        <paragraph xml-lang="en-US" id="hd_id77665505" role="heading" level="2" l10n="NEW">Clear notes</paragraph>
57
        <paragraph xml-lang="en-US" id="par_id77665503g" role="paragraph" l10n="NEW"><ahelp hid="sdext:Minimizer:Wizard:Step2:CBNotes">Clear the contents of all notes.</ahelp></paragraph>
58
        <paragraph role="paragraph" id="par_id3153087" xml-lang="en-US" l10n="NEW">
59
            <link href="text/simpress/minimizer/step3.xhp" name="Go to Presentation Minimizer - Graphics">Go to Presentation Minimizer - Graphics</link>
60
        </paragraph>
61
    </body>
62
</helpdocument>
(-)a/main/helpcontent2/source/text/simpress/minimizer/step3.xhp (+67 lines)
Line 0 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!--***********************************************************
3
 *
4
 * Licensed to the Apache Software Foundation (ASF) under one
5
 * or more contributor license agreements.  See the NOTICE file
6
 * distributed with this work for additional information
7
 * regarding copyright ownership.  The ASF licenses this file
8
 * to you under the Apache License, Version 2.0 (the
9
 * "License"); you may not use this file except in compliance
10
 * with the License.  You may obtain a copy of the License at
11
 *
12
 *   http://www.apache.org/licenses/LICENSE-2.0
13
 *
14
 * Unless required by applicable law or agreed to in writing,
15
 * software distributed under the License is distributed on an
16
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17
 * KIND, either express or implied.  See the License for the
18
 * specific language governing permissions and limitations
19
 * under the License.
20
 *
21
 ***********************************************************-->
22
<helpdocument version="1.0">
23
    <meta>
24
        <topic id="sdextPresentationMinimizerStep3xhp" indexer="include">
25
            <title xml-lang="en-US" id="tit">Presentation Minimizer - Graphics</title>
26
            <filename>/text/simpress/minimizer/step3.xhp</filename>
27
        </topic>
28
    </meta>
29
    <body>
30
        <section id="step3">
31
        <!-- 3 Step  -->
32
            <bookmark xml-lang="en-US" branch="hid/sdext:Minimizer:Wizard:Step3" id="bm_id77665505" localize="false"/>
33
            <paragraph xml-lang="en-US" id="par_id77665505b" role="heading" level="1" l10n="NEW"><link href="text/simpress/minimizer/step3.xhp" name="Presentation Minimizer - Introduction">Presentation Minimizer - Graphics</link></paragraph>
34
            <paragraph xml-lang="en-US" id="par_id77665506" role="paragraph" l10n="NEW"><ahelp hid="hid/sdext:Minimizer:Wizard:Step3">Choose settings for optimizing pictures and graphics.</ahelp></paragraph>
35
        </section>
36
        <section id="howtoget">
37
            <embed href="text/simpress/minimizer/shared.xhp#step3"/>
38
        </section>
39
        <!-- 3 Step Lossless compression -->
40
        <bookmark xml-lang="en-US" branch="hid/sdext:Minimizer:Wizard:Step3:RBLossless" id="bm_id77665511" localize="false"/>
41
        <paragraph xml-lang="en-US" id="hd_id77665501" role="heading" level="2" l10n="NEW">Lossless compression</paragraph>
42
        <paragraph xml-lang="en-US" id="par_id77665503h" role="paragraph" l10n="NEW"><ahelp hid="sdext:Minimizer:Wizard:Step3:RBLossless">Lossless compression.</ahelp></paragraph>
43
        <!-- 3 Step JPEG compression -->
44
        <bookmark xml-lang="en-US" branch="hid/sdext:Minimizer:Wizard:Step3:RBJPEG" id="bm_id77665512" localize="false"/>
45
        <paragraph xml-lang="en-US" id="hd_id77665502" role="heading" level="2" l10n="NEW">JPEG compression</paragraph>
46
        <paragraph xml-lang="en-US" id="par_id77665503i" role="paragraph" l10n="NEW"><ahelp hid="sdext:Minimizer:Wizard:Step3:RBJPEG">Compress JPEG graphics.</ahelp></paragraph>
47
        <!-- 3 Step Quality metric field -->
48
        <bookmark xml-lang="en-US" branch="hid/sdext:Minimizer:Wizard:Step3:MFQuality" id="bm_id77665513" localize="false"/>
49
        <paragraph xml-lang="en-US" id="hd_id77665503" role="heading" level="2" l10n="NEW">Quality in percent</paragraph>
50
        <paragraph xml-lang="en-US" id="par_id77665503j" role="paragraph" l10n="NEW"><ahelp hid="sdext:Minimizer:Wizard:Step3:MFQuality">Specify the quality of the compression. A higher value means less compression.</ahelp></paragraph>
51
        <!-- 3 Step Image resolution combo box -->
52
        <bookmark xml-lang="en-US" branch="hid/sdext:Minimizer:Wizard:Step3:LBDPI" id="bm_id77665514" localize="false"/>
53
        <paragraph xml-lang="en-US" id="hd_id77665504" role="heading" level="2" l10n="NEW">Reduce image resolution</paragraph>
54
        <paragraph xml-lang="en-US" id="par_id77665503k" role="paragraph" l10n="NEW"><ahelp hid="sdext:Minimizer:Wizard:Step3:LBDPI">Specify the image resolution in DPI (dots per inch).</ahelp></paragraph>
55
        <!-- 3 Step Delete cropped graphic areas -->
56
        <bookmark xml-lang="en-US" branch="hid/sdext:Minimizer:Wizard:Step3:CBCrop" id="bm_id77665515" localize="false"/>
57
        <paragraph xml-lang="en-US" id="hd_id77665505" role="heading" level="2" l10n="NEW">Delete cropped graphic areas</paragraph>
58
        <paragraph xml-lang="en-US" id="par_id77665503l" role="paragraph" l10n="NEW"><ahelp hid="sdext:Minimizer:Wizard:Step3:CBCrop">Delete cropped graphic areas from the graphics.</ahelp></paragraph>
59
        <!-- 3 Step Break links to external graphics -->
60
        <bookmark xml-lang="en-US" branch="hid/sdext:Minimizer:Wizard:Step3:CBLinks" id="bm_id77665516" localize="false"/>
61
        <paragraph xml-lang="en-US" id="hd_id77665506" role="heading" level="2" l10n="NEW">Break links to external graphics</paragraph>
62
        <paragraph xml-lang="en-US" id="par_id77665503m" role="paragraph" l10n="NEW"><ahelp hid="sdext:Minimizer:Wizard:Step3:CBLinks">Break all links to external graphics.</ahelp></paragraph>
63
        <paragraph role="paragraph" id="par_id3153087" xml-lang="en-US" l10n="NEW">
64
            <link href="text/simpress/minimizer/step4.xhp" name="Go to Presentation Minimizer - OLE Objects">Go to Presentation Minimizer - OLE Objects</link>
65
        </paragraph>
66
    </body>
67
</helpdocument>
(-)a/main/helpcontent2/source/text/simpress/minimizer/step4.xhp (+55 lines)
Line 0 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!--***********************************************************
3
 *
4
 * Licensed to the Apache Software Foundation (ASF) under one
5
 * or more contributor license agreements.  See the NOTICE file
6
 * distributed with this work for additional information
7
 * regarding copyright ownership.  The ASF licenses this file
8
 * to you under the Apache License, Version 2.0 (the
9
 * "License"); you may not use this file except in compliance
10
 * with the License.  You may obtain a copy of the License at
11
 *
12
 *   http://www.apache.org/licenses/LICENSE-2.0
13
 *
14
 * Unless required by applicable law or agreed to in writing,
15
 * software distributed under the License is distributed on an
16
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17
 * KIND, either express or implied.  See the License for the
18
 * specific language governing permissions and limitations
19
 * under the License.
20
 *
21
 ***********************************************************-->
22
<helpdocument version="1.0">
23
    <meta>
24
        <topic id="sdextPresentationMinimizerStep4xhp" indexer="include">
25
            <title xml-lang="en-US" id="tit">Presentation Minimizer - OLE Objects</title>
26
            <filename>/text/simpress/minimizer/step4.xhp</filename>
27
        </topic>
28
    </meta>
29
    <body>
30
        <section id="step4">
31
            <!-- 4 Step  -->
32
            <bookmark xml-lang="en-US" branch="hid/sdext:Minimizer:Wizard:Step4" id="bm_id77665517" localize="false"/>
33
            <paragraph xml-lang="en-US" id="par_id77665507" role="heading" level="1" l10n="NEW"><link href="text/simpress/minimizer/step4.xhp" name="Presentation Minimizer - Introduction">Presentation Minimizer - OLE Objects</link></paragraph>
34
            <paragraph xml-lang="en-US" id="par_id77665508" role="paragraph" l10n="NEW"><ahelp hid="hid/sdext:Minimizer:Wizard:Step4">Choose settings for replacing OLE objects.</ahelp></paragraph>
35
        </section>
36
        <section id="howtoget">
37
            <embed href="text/simpress/minimizer/shared.xhp#step4"/>
38
        </section>
39
        <!-- 4 Step Checkbox - replace OLE with graphic -->
40
        <bookmark xml-lang="en-US" branch="hid/sdext:Minimizer:Wizard:Step4:CBOLE" id="bm_id77665518" localize="false"/>
41
        <paragraph xml-lang="en-US" id="hd_id77665501" role="heading" level="2" l10n="NEW">Create static replacement graphics for OLE objects</paragraph>
42
        <paragraph xml-lang="en-US" id="par_id77665503n" role="paragraph" l10n="NEW"><ahelp hid="sdext:Minimizer:Wizard:Step4:CBOLE">Replace OLE object with a static graphic.</ahelp></paragraph>
43
        <!-- 4 Step Radiobox - all objects -->
44
        <bookmark xml-lang="en-US" branch="hid/sdext:Minimizer:Wizard:Step4:RBAllOLE" id="bm_id77665519" localize="false"/>
45
        <paragraph xml-lang="en-US" id="hd_id77665502" role="heading" level="2" l10n="NEW">For all OLE objects</paragraph>
46
        <paragraph xml-lang="en-US" id="par_id77665503o" role="paragraph" l10n="NEW"><ahelp hid="sdext:Minimizer:Wizard:Step4:RBAllOLE">Replace all OLE objects with a static graphic.</ahelp></paragraph>
47
        <!-- 4 Step Radiobox - objects not based in ODF -->
48
        <bookmark xml-lang="en-US" branch="hid/sdext:Minimizer:Wizard:Step4:RBNotODF" id="bm_id77665520" localize="false"/>
49
        <paragraph xml-lang="en-US" id="hd_id77665503" role="heading" level="2" l10n="NEW">For OLE objects not based on OpenDocument format</paragraph>
50
        <paragraph xml-lang="en-US" id="par_id77665503p" role="paragraph" l10n="NEW"><ahelp hid="sdext:Minimizer:Wizard:Step4:RBNotODF">Replace only OLE objects not based on the Open Document Format used by %PRODUCTNAME.</ahelp></paragraph>
51
        <paragraph role="paragraph" id="par_id3153087" xml-lang="en-US" l10n="NEW">
52
            <link href="text/simpress/minimizer/step5.xhp" name="Go to Presentation Minimizer - Summary">Go to Presentation Minimizer - Summary</link>
53
        </paragraph>
54
    </body>
55
</helpdocument>
(-)a/main/helpcontent2/source/text/simpress/minimizer/step5.xhp (+56 lines)
Line 0 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!--***********************************************************
3
 *
4
 * Licensed to the Apache Software Foundation (ASF) under one
5
 * or more contributor license agreements.  See the NOTICE file
6
 * distributed with this work for additional information
7
 * regarding copyright ownership.  The ASF licenses this file
8
 * to you under the Apache License, Version 2.0 (the
9
 * "License"); you may not use this file except in compliance
10
 * with the License.  You may obtain a copy of the License at
11
 *
12
 *   http://www.apache.org/licenses/LICENSE-2.0
13
 *
14
 * Unless required by applicable law or agreed to in writing,
15
 * software distributed under the License is distributed on an
16
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17
 * KIND, either express or implied.  See the License for the
18
 * specific language governing permissions and limitations
19
 * under the License.
20
 *
21
 ***********************************************************-->
22
<helpdocument version="1.0">
23
    <meta>
24
        <topic id="sdextPresentationMinimizerStep5xhp" indexer="include">
25
            <title xml-lang="en-US" id="tit">Presentation Minimizer - Summary</title>
26
            <filename>/text/simpress/minimizer/step5.xhp</filename>
27
        </topic>
28
    </meta>
29
    <body>
30
        <section id="step5">
31
            <!-- 5 Step  -->
32
            <bookmark xml-lang="en-US" branch="hid/sdext:Minimizer:Wizard:Step5" id="bm_id77665507" localize="false"/>
33
            <paragraph xml-lang="en-US" id="par_id77665509" role="heading" level="1" l10n="NEW"><link href="text/simpress/minimizer/step5.xhp" name="Presentation Minimizer - Introduction">Presentation Minimizer - Summary</link></paragraph>
34
            <paragraph xml-lang="en-US" id="par_id77665510" role="paragraph" l10n="NEW"><ahelp hid="hid/sdext:Minimizer:Wizard:Step5">Choose where to apply the following changes.</ahelp></paragraph>
35
        </section>
36
        <section id="howtoget">
37
            <embed href="text/simpress/minimizer/shared.xhp#step5"/>
38
        </section>
39
        <!-- 5 Step Radiobox - current presentation -->
40
        <bookmark xml-lang="en-US" branch="hid/sdext:Minimizer:Wizard:Step5:RBCurDoc" id="bm_id77665521" localize="false"/>
41
        <paragraph xml-lang="en-US" id="hd_id77665501" role="heading" level="2" l10n="NEW">Apply changes to current presentation</paragraph>
42
        <paragraph xml-lang="en-US" id="par_id77665500" role="paragraph" l10n="NEW"><ahelp hid="sdext:Minimizer:Wizard:Step5:RBCurDoc">Apply the changes to the current presentation.</ahelp></paragraph>
43
        <!-- 5 Step Radiobox - duplicate presentation -->
44
        <bookmark xml-lang="en-US" branch="hid/sdext:Minimizer:Wizard:Step5:RBNewDoc" id="bm_id77665522" localize="false"/>
45
        <paragraph xml-lang="en-US" id="hd_id77665502" role="heading" level="2" l10n="NEW">Duplicate presentation before applying changes</paragraph>
46
        <paragraph xml-lang="en-US" id="par_id77665503r" role="paragraph" l10n="NEW"><ahelp hid="sdext:Minimizer:Wizard:Step5:RBNewDoc">Create a copy of the current presentation, and apply the changes only to this copy.</ahelp></paragraph>
47
        <!-- 5 Step Radiobox - save settings -->
48
        <bookmark xml-lang="en-US" branch="hid/sdext:Minimizer:Wizard:Step5:CBSaveSetts" id="bm_id77665523" localize="false"/>
49
        <paragraph xml-lang="en-US" id="hd_id77665503" role="heading" level="2" l10n="NEW">Save settings as</paragraph>
50
        <paragraph xml-lang="en-US" id="par_id77665502" role="paragraph" l10n="NEW"><ahelp hid="sdext:Minimizer:Wizard:Step5:CBSaveSetts">Apply the changes to the current presentation.</ahelp></paragraph>
51
        <!-- 5 Step Radiobox - setting name -->
52
        <bookmark xml-lang="en-US" branch="hid/sdext:Minimizer:Wizard:Step5:LBSettsName" id="bm_id77665524" localize="false"/>
53
        <paragraph xml-lang="en-US" id="par_id77665503" role="paragraph" l10n="NEW"><ahelp hid="sdext:Minimizer:Wizard:Step5:LBSettsName">Enter the name of the settings to be stored.</ahelp></paragraph>
54
        <paragraph role="paragraph" id="par_id3153087" xml-lang="en-US" l10n="NEW"><link href="text/simpress/minimizer/main.xhp" name="Go to Presentation Minimizer Wizard">Go to Presentation Minimizer Wizard</link></paragraph>
55
    </body>
56
</helpdocument>
(-)a/main/helpcontent2/util/simpress/makefile.mk (+7 lines)
Lines 269-274 LINKLINKFILES= \ Link Here
269
   text$/simpress$/guide$/table_insert.xhp \
269
   text$/simpress$/guide$/table_insert.xhp \
270
   text$/simpress$/guide$/text2curve.xhp \
270
   text$/simpress$/guide$/text2curve.xhp \
271
   text$/simpress$/guide$/vectorize.xhp \
271
   text$/simpress$/guide$/vectorize.xhp \
272
   text$/simpress$/minimizer$/main.xhp \
273
   text$/simpress$/minimizer$/step1.xhp \
274
   text$/simpress$/minimizer$/step2.xhp \
275
   text$/simpress$/minimizer$/step3.xhp \
276
   text$/simpress$/minimizer$/step4.xhp \
277
   text$/simpress$/minimizer$/step5.xhp \
278
   text$/simpress$/minimizer$/infobox.xhp \
272
   text$/simpress$/main0000.xhp \
279
   text$/simpress$/main0000.xhp \
273
   text$/simpress$/main0100.xhp \
280
   text$/simpress$/main0100.xhp \
274
   text$/simpress$/main0101.xhp \
281
   text$/simpress$/main0101.xhp \
(-)a/main/officecfg/registry/data/org/openoffice/Office/Impress.xcu (+170 lines)
Lines 159-162 Link Here
159
      <value oor:separator=";">vnd.sun.star.expand:$OOO_BASE_DIR/share/config/soffice.cfg/simpress/transitions.xml;vnd.sun.star.expand:$OOO_BASE_DIR/share/config/soffice.cfg/simpress/transitions-ogl.xml</value>
159
      <value oor:separator=";">vnd.sun.star.expand:$OOO_BASE_DIR/share/config/soffice.cfg/simpress/transitions.xml;vnd.sun.star.expand:$OOO_BASE_DIR/share/config/soffice.cfg/simpress/transitions-ogl.xml</value>
160
    </prop>
160
    </prop>
161
  </node>
161
  </node>
162
    <node oor:name="PresentationMinimizer">
163
        <node oor:name="LastUsedSettings">
164
            <prop oor:name="Name">
165
                <value xml:lang="en-US">Projector optimized</value>
166
            </prop>
167
            <prop oor:name="JPEGCompression">
168
                <value>true</value>
169
            </prop>
170
            <prop oor:name="JPEGQuality">
171
                <value>50</value>
172
            </prop>
173
            <prop oor:name="RemoveCropArea">
174
                <value>true</value>
175
            </prop>
176
            <prop oor:name="ImageResolution">
177
                <value>150</value>
178
            </prop>
179
            <prop oor:name="EmbedLinkedGraphics">
180
                <value>true</value>
181
            </prop>
182
            <prop oor:name="OLEOptimization">
183
                <value>true</value>
184
            </prop>
185
            <prop oor:name="OLEOptimizationType">
186
                <value>0</value>
187
            </prop>
188
            <prop oor:name="DeleteUnusedMasterPages">
189
                <value>true</value>
190
            </prop>
191
            <prop oor:name="DeleteHiddenSlides">
192
                <value>true</value>
193
            </prop>
194
            <prop oor:name="DeleteNotesPages">
195
                <value>false</value>
196
            </prop>
197
            <prop oor:name="SaveAs">
198
                <value>true</value>
199
            </prop>
200
            <prop oor:name="OpenNewDocument">
201
                <value>true</value>
202
            </prop>
203
        </node>
204
        <node oor:name="Settings">
205
            <node oor:name="Templates">
206
                <node oor:name="template1" oor:op="replace">
207
                    <prop oor:name="Name">
208
                        <value xml:lang="en-US">Screen optimized (smallest file size)</value>
209
                    </prop>
210
                    <prop oor:name="JPEGCompression">
211
                        <value>true</value>
212
                    </prop>
213
                    <prop oor:name="JPEGQuality">
214
                        <value>25</value>
215
                    </prop>
216
                    <prop oor:name="RemoveCropArea">
217
                        <value>true</value>
218
                    </prop>
219
                    <prop oor:name="ImageResolution">
220
                        <value>90</value>
221
                    </prop>
222
                    <prop oor:name="EmbedLinkedGraphics">
223
                        <value>true</value>
224
                    </prop>
225
                    <prop oor:name="OLEOptimization">
226
                        <value>true</value>
227
                    </prop>
228
                    <prop oor:name="OLEOptimizationType">
229
                        <value>0</value>
230
                    </prop>
231
                    <prop oor:name="DeleteUnusedMasterPages">
232
                        <value>true</value>
233
                    </prop>
234
                    <prop oor:name="DeleteHiddenSlides">
235
                        <value>true</value>
236
                    </prop>
237
                    <prop oor:name="DeleteNotesPages">
238
                        <value>false</value>
239
                    </prop>
240
                    <prop oor:name="SaveAs">
241
                        <value>true</value>
242
                    </prop>
243
                    <prop oor:name="OpenNewDocument">
244
                        <value>true</value>
245
                    </prop>
246
                </node>
247
                <node oor:name="template2" oor:op="replace">
248
                    <prop oor:name="Name">
249
                        <value xml:lang="en-US">Projector optimized</value>
250
                    </prop>
251
                    <prop oor:name="JPEGCompression">
252
                        <value>true</value>
253
                    </prop>
254
                    <prop oor:name="JPEGQuality">
255
                        <value>50</value>
256
                    </prop>
257
                    <prop oor:name="RemoveCropArea">
258
                        <value>true</value>
259
                    </prop>
260
                    <prop oor:name="ImageResolution">
261
                        <value>150</value>
262
                    </prop>
263
                    <prop oor:name="EmbedLinkedGraphics">
264
                        <value>true</value>
265
                    </prop>
266
                    <prop oor:name="OLEOptimization">
267
                        <value>true</value>
268
                    </prop>
269
                    <prop oor:name="OLEOptimizationType">
270
                        <value>0</value>
271
                    </prop>
272
                    <prop oor:name="DeleteUnusedMasterPages">
273
                        <value>true</value>
274
                    </prop>
275
                    <prop oor:name="DeleteHiddenSlides">
276
                        <value>true</value>
277
                    </prop>
278
                    <prop oor:name="DeleteNotesPages">
279
                        <value>false</value>
280
                    </prop>
281
                    <prop oor:name="SaveAs">
282
                        <value>true</value>
283
                    </prop>
284
                    <prop oor:name="OpenNewDocument">
285
                        <value>true</value>
286
                    </prop>
287
                </node>
288
                <node oor:name="template3" oor:op="replace">
289
                    <prop oor:name="Name">
290
                        <value xml:lang="en-US">Print optimized</value>
291
                    </prop>
292
                    <prop oor:name="JPEGCompression">
293
                        <value>true</value>
294
                    </prop>
295
                    <prop oor:name="JPEGQuality">
296
                        <value>75</value>
297
                    </prop>
298
                    <prop oor:name="RemoveCropArea">
299
                        <value>true</value>
300
                    </prop>
301
                    <prop oor:name="ImageResolution">
302
                        <value>300</value>
303
                    </prop>
304
                    <prop oor:name="EmbedLinkedGraphics">
305
                        <value>true</value>
306
                    </prop>
307
                    <prop oor:name="OLEOptimization">
308
                        <value>true</value>
309
                    </prop>
310
                    <prop oor:name="OLEOptimizationType">
311
                        <value>0</value>
312
                    </prop>
313
                    <prop oor:name="DeleteUnusedMasterPages">
314
                        <value>true</value>
315
                    </prop>
316
                    <prop oor:name="DeleteHiddenSlides">
317
                        <value>true</value>
318
                    </prop>
319
                    <prop oor:name="DeleteNotesPages">
320
                        <value>false</value>
321
                    </prop>
322
                    <prop oor:name="SaveAs">
323
                        <value>true</value>
324
                    </prop>
325
                    <prop oor:name="OpenNewDocument">
326
                        <value>true</value>
327
                    </prop>
328
                </node>
329
            </node>
330
        </node>
331
    </node>
162
</oor:component-data>
332
</oor:component-data>
(-)a/main/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu (+8 lines)
Lines 1279-1284 Link Here
1279
                    <value>1</value>
1279
                    <value>1</value>
1280
                </prop>
1280
                </prop>
1281
            </node>
1281
            </node>
1282
            <node oor:name=".uno:PresentationMinimizer" oor:op="replace">
1283
                <prop oor:name="Label" oor:type="xs:string">
1284
                    <value xml:lang="en-US">Minimize Presentation...</value>
1285
                </prop>
1286
                <prop oor:name="Properties" oor:type="xs:int">
1287
                    <value>1</value>
1288
                </prop>
1289
            </node>
1282
            <node oor:name=".uno:PreviewQualityBlackWhite" oor:op="replace">
1290
            <node oor:name=".uno:PreviewQualityBlackWhite" oor:op="replace">
1283
                <prop oor:name="Label" oor:type="xs:string">
1291
                <prop oor:name="Label" oor:type="xs:string">
1284
                    <value xml:lang="en-US">Black and White</value>
1292
                    <value xml:lang="en-US">Black and White</value>
(-)a/main/officecfg/registry/schema/org/openoffice/Office/Impress.xcs (+127 lines)
Lines 86-91 Link Here
86
        </info>
86
        </info>
87
      </prop>
87
      </prop>
88
    </group>
88
    </group>
89
        <group oor:name="PresentationMinimizerSettings">
90
            <info>
91
                <desc>Describes the Presentation Optimization Wizard settings of one session</desc>
92
            </info>
93
            <prop oor:name="Name" oor:type="xs:string" oor:localized="true">
94
                <info>
95
                    <desc>Specifies the name settings name</desc>
96
                </info>
97
                <value>Default</value>
98
            </prop>
99
            <prop oor:name="JPEGCompression" oor:type="xs:boolean">
100
                <info>
101
                    <desc>Specifies if JPEG compression is being used</desc>
102
                </info>
103
                <value>true</value>
104
            </prop>
105
            <prop oor:name="JPEGQuality" oor:type="xs:int">
106
                <info>
107
                    <desc>Specifies quality of the JPG export. A higher value results in higher quality and file size.</desc>
108
                </info>
109
                <constraints>
110
                    <minInclusive oor:value="1">
111
                        <info>
112
                            <desc>Represents lowest value that can be used. The lower the value, the less good is the compression quality and the bigger is be the file size.</desc>
113
                        </info>
114
                    </minInclusive>
115
                    <maxInclusive oor:value="100">
116
                        <info>
117
                            <desc>Represents highest value that can be used. The higher the value, the better is the compression quality and the smaller is the file size.</desc>
118
                        </info>
119
                    </maxInclusive>
120
                </constraints>
121
                <value>45</value>
122
            </prop>
123
            <prop oor:name="RemoveCropArea" oor:type="xs:boolean">
124
                <info>
125
                    <desc>Specifies if the crop area of a picture has to be removed</desc>
126
                </info>
127
                <value>true</value>
128
            </prop>
129
            <prop oor:name="ImageResolution" oor:type="xs:int">
130
                <info>
131
                    <desc>Specifies the Image Resolution that should be used in dpi. A value of zero determines that the image resolution should not be changed.</desc>
132
                </info>
133
                <value>150</value>
134
            </prop>
135
            <prop oor:name="EmbedLinkedGraphics" oor:type="xs:boolean">
136
                <info>
137
                    <desc>Specifies if linked graphics are to be embedded</desc>
138
                </info>
139
                <value>true</value>
140
            </prop>
141
            <prop oor:name="OLEOptimization" oor:type="xs:boolean">
142
                <info>
143
                    <desc>Specifies if OLE Objects are converted to Graphic objects at all</desc>
144
                </info>
145
                <value>true</value>
146
            </prop>
147
            <prop oor:name="OLEOptimizationType" oor:type="xs:short">
148
                <info>
149
                    <desc>Specifies the compression type that is being used,.</desc>
150
                </info>
151
                <constraints>
152
                    <enumeration oor:value="0">
153
                        <info>
154
                            <desc>Each</desc>
155
                        </info>
156
                    </enumeration>
157
                    <enumeration oor:value="1">
158
                        <info>
159
                            <desc>Alien</desc>
160
                        </info>
161
                    </enumeration>
162
                </constraints>
163
                <value>0</value>
164
            </prop>
165
            <prop oor:name="DeleteUnusedMasterPages" oor:type="xs:boolean">
166
                <info>
167
                    <desc>Specifies if unused Master Pages are being deleted</desc>
168
                </info>
169
                <value>true</value>
170
            </prop>
171
            <prop oor:name="DeleteHiddenSlides" oor:type="xs:boolean">
172
                <info>
173
                    <desc>Specifies if hidden Slides are being deleted</desc>
174
                </info>
175
                <value>true</value>
176
            </prop>
177
            <prop oor:name="DeleteNotesPages" oor:type="xs:boolean">
178
                <info>
179
                    <desc>Specifies if Notes Pages are being deleted</desc>
180
                </info>
181
                <value>false</value>
182
            </prop>
183
            <prop oor:name="SaveAs" oor:type="xs:boolean">
184
                <info>
185
                    <desc>Specifies if the optimization is done on a new document.</desc>
186
                </info>
187
                <value>true</value>
188
            </prop>
189
            <prop oor:name="OpenNewDocument" oor:type="xs:boolean">
190
                <info>
191
                    <desc>Specifies if the newly created document is opened automatically.</desc>
192
                </info>
193
                <value>true</value>
194
            </prop>
195
        </group>
89
  </templates>
196
  </templates>
90
  <component>
197
  <component>
91
    <group oor:name="Layout">
198
    <group oor:name="Layout">
Lines 1535-1539 Link Here
1535
        </group>
1642
        </group>
1536
      </group>
1643
      </group>
1537
    </group>
1644
    </group>
1645
    <group oor:name="PresentationMinimizer">
1646
        <info>
1647
            <desc>Contains configuration for the Presentation Minimizer.</desc>
1648
        </info>
1649
        <node-ref oor:name="LastUsedSettings" oor:node-type="PresentationMinimizerSettings">
1650
            <info>
1651
                <desc>describes the name of the last used settings</desc>
1652
            </info>
1653
        </node-ref>
1654
        <group oor:name="Settings">
1655
            <info>
1656
                <desc>The PresentationMinimizer settings</desc>
1657
            </info>
1658
            <set oor:name="Templates" oor:node-type="PresentationMinimizerSettings">
1659
                <info>
1660
                    <desc>List of the saved Presentation Minimizer Wizard settings</desc>
1661
                </info>
1662
            </set>
1663
        </group>
1664
    </group>
1538
  </component>
1665
  </component>
1539
</oor:component-schema>
1666
</oor:component-schema>
(-)a/main/postprocess/packcomponents/makefile.mk (-1 / +2 lines)
Lines 174-180 my_components = \ Link Here
174
    xmlfd \
174
    xmlfd \
175
    xmx \
175
    xmx \
176
    xsltdlg \
176
    xsltdlg \
177
    xstor
177
    xstor \
178
    PresentationMinimizer
178
179
179
.IF "$(OS)" == "MACOSX"
180
.IF "$(OS)" == "MACOSX"
180
my_components += component/vcl/vcl.macosx
181
my_components += component/vcl/vcl.macosx
(-)a/main/postprocess/prj/build.lst (-1 / +1 lines)
Lines 1-4 Link Here
1
po      postprocess     ::      svgio accessibility automation basctl bean BINFILTER:binfilter chart2 configmgr CRASHREP:crashrep COINMP:coinmp cui dbaccess desktop dtrans embeddedobj embedserv EPM:epm eventattacher extensions extras fileaccess filter forms fpicker helpcontent2 hwpfilter io JAVAINSTALLER2:javainstaller2 lingucomponent MATHMLDTD:MathMLDTD ODK:odk officecfg package padmin psprint_config remotebridges sc scaddins sccomp scp2 scripting sd setup_native slideshow starmath sw sysui testtools ucb UnoControls unoxml ure wizards xmerge xmlsecurity MORE_FONTS:more_fonts OOo:pyuno OOo:readlicense_oo SO:top unodevtools JFREEREPORT:jfreereport REPORTBUILDER:reportbuilder reportdesign SDEXT:sdext SWEXT:swext smoketestdoc uui writerfilter oox MYSQLC:mysqlc LIBXSLT:libxslt NULL
1
po      postprocess     ::      svgio accessibility automation basctl bean BINFILTER:binfilter chart2 configmgr CRASHREP:crashrep COINMP:coinmp cui dbaccess desktop dtrans embeddedobj embedserv EPM:epm eventattacher extensions extras fileaccess filter forms fpicker helpcontent2 hwpfilter io JAVAINSTALLER2:javainstaller2 lingucomponent MATHMLDTD:MathMLDTD ODK:odk officecfg package padmin psprint_config remotebridges sc scaddins sccomp scp2 scripting sd setup_native slideshow starmath sw sysui testtools ucb UnoControls unoxml ure wizards xmerge xmlsecurity MORE_FONTS:more_fonts OOo:pyuno OOo:readlicense_oo SO:top unodevtools JFREEREPORT:jfreereport REPORTBUILDER:reportbuilder reportdesign sdext SWEXT:swext smoketestdoc uui writerfilter oox MYSQLC:mysqlc LIBXSLT:libxslt NULL
2
po	postprocess			    	usr1	-	all	po_mkout NULL
2
po	postprocess			    	usr1	-	all	po_mkout NULL
3
po	postprocess\checkxml		nmake	-	all	po_checkxml NULL
3
po	postprocess\checkxml		nmake	-	all	po_checkxml NULL
4
po	postprocess\checkdeliver	nmake	-	all	po_checkdlv NULL
4
po	postprocess\checkdeliver	nmake	-	all	po_checkdlv NULL
(-)a/main/scp2/source/ooo/file_library_ooo.scp (+13 lines)
Lines 1337-1342 File gid_File_Lib_Slideshow Link Here
1337
  #endif
1337
  #endif
1338
End
1338
End
1339
1339
1340
File gid_File_Lib_PresentationMinimizer
1341
    TXT_FILE_BODY;
1342
    Styles = (PACKED);
1343
    Dir = SCP2_OOO_BIN_DIR;
1344
  #ifdef UNX
1345
    Name = STRING(CONCAT2(PresentationMinimizer.uno,UNXSUFFIX));
1346
  #elif defined OS2
1347
    Name = "PresentationMinimizer.dll";
1348
  #else
1349
    Name = "PresentationMinimizer.uno.dll";
1350
  #endif
1351
End
1352
1340
File gid_File_Lib_Sdbc_2
1353
File gid_File_Lib_Sdbc_2
1341
    TXT_FILE_BODY;
1354
    TXT_FILE_BODY;
1342
    Styles = (PACKED);
1355
    Styles = (PACKED);
(-)a/main/scp2/source/ooo/file_resource_ooo.scp (+2 lines)
Lines 126-128 STD_RES_FILE( gid_File_Res_T602Filter, t602filter ) Link Here
126
STD_RES_FILE( gid_File_Res_Forui, forui )
126
STD_RES_FILE( gid_File_Res_Forui, forui )
127
STD_RES_FILE( gid_File_Res_For, for )
127
STD_RES_FILE( gid_File_Res_For, for )
128
128
129
STD_RES_FILE( gid_File_Res_PresentationMinimizer, minimizer )
130
(-)a/main/scp2/source/ooo/module_hidden_ooo.scp (+1 lines)
Lines 338-343 Module gid_Module_Root_Files_5 Link Here
338
	gid_File_Lib_Sax_Uno,
338
	gid_File_Lib_Sax_Uno,
339
	gid_File_Lib_Fastsax_Uno,
339
	gid_File_Lib_Fastsax_Uno,
340
	gid_File_Lib_Slideshow,
340
	gid_File_Lib_Slideshow,
341
    gid_File_Lib_PresentationMinimizer
341
	gid_File_Lib_Recentfile,
342
	gid_File_Lib_Recentfile,
342
	gid_File_Lib_Scriptframe,
343
	gid_File_Lib_Scriptframe,
343
	gid_File_Lib_Sdbc_2,
344
	gid_File_Lib_Sdbc_2,
(-)a/main/scp2/source/ooo/module_lang_template.scp (-1 / +2 lines)
Lines 102-108 Module gid_Module_Langpack_Resource_Template Link Here
102
             gid_File_Res_Tfu,
102
             gid_File_Res_Tfu,
103
             gid_File_Res_Eps,
103
             gid_File_Res_Eps,
104
             gid_File_Res_UpdChk,
104
             gid_File_Res_UpdChk,
105
             gid_File_Res_Upd);
105
             gid_File_Res_Upd,
106
             gid_File_Res_PresentationMinimizer);
106
End
107
End
107
108
108
Module gid_Module_Langpack_Help_Template
109
Module gid_Module_Langpack_Help_Template
(-)a/main/sd/inc/app.hrc (+1 lines)
Lines 503-507 Link Here
503
503
504
#define SID_ADD_MOTION_PATH					(SID_SD_START+441)
504
#define SID_ADD_MOTION_PATH					(SID_SD_START+441)
505
#define SID_TABLE_TOOLBOX					(SID_SD_START+442)
505
#define SID_TABLE_TOOLBOX					(SID_SD_START+442)
506
#define SID_PRESENTATION_MINIMIZER          (SID_SD_START+442)
506
507
507
#endif
508
#endif
(-)a/main/sd/sdi/drviewsh.sdi (+5 lines)
Lines 75-80 interface ImpressEditView : DrawView Link Here
75
		ExecMethod = FuSupport ;
75
		ExecMethod = FuSupport ;
76
		StateMethod = GetMenuState ;
76
		StateMethod = GetMenuState ;
77
	]
77
	]
78
    SID_PRESENTATION_MINIMIZER
79
    [
80
        ExecMethod = FuSupport ;
81
        StateMethod = GetMenuState ;
82
    ]
78
	SID_CLEAR_UNDO_STACK // ole : no, status : ?
83
	SID_CLEAR_UNDO_STACK // ole : no, status : ?
79
	[
84
	[
80
		ExecMethod = FuSupport ;
85
		ExecMethod = FuSupport ;
(-)a/main/sd/sdi/sdraw.sdi (+25 lines)
Lines 5385-5390 SfxVoidItem PresentationDialog SID_PRESENTATION_DLG Link Here
5385
]
5385
]
5386
5386
5387
//--------------------------------------------------------------------------
5387
//--------------------------------------------------------------------------
5388
SfxVoidItem PresentationMinimizer SID_PRESENTATION_MINIMIZER
5389
()
5390
[
5391
    /* flags: */
5392
    AutoUpdate = FALSE,
5393
    Cachable = Cachable,
5394
    FastCall = FALSE,
5395
    HasCoreId = FALSE,
5396
    HasDialog = TRUE,
5397
    ReadOnlyDoc = TRUE,
5398
    Toggle = FALSE,
5399
    Container = FALSE,
5400
    RecordAbsolute = FALSE,
5401
    RecordPerSet;
5402
    Asynchron;
5403
5404
    /* config: */
5405
    AccelConfig = TRUE,
5406
    MenuConfig = TRUE,
5407
    StatusBarConfig = FALSE,
5408
    ToolBoxConfig = TRUE,
5409
    GroupId = GID_APPLICATION;
5410
]
5411
5412
//--------------------------------------------------------------------------
5388
SfxVoidItem PresentationEnd SID_PRESENTATION_END
5413
SfxVoidItem PresentationEnd SID_PRESENTATION_END
5389
()
5414
()
5390
[
5415
[
(-)a/main/sd/source/ui/view/drviewse.cxx (+30 lines)
Lines 29-34 Link Here
29
#include <com/sun/star/beans/XPropertySet.hpp>
29
#include <com/sun/star/beans/XPropertySet.hpp>
30
#include <com/sun/star/i18n/TransliterationModules.hpp>
30
#include <com/sun/star/i18n/TransliterationModules.hpp>
31
#include <com/sun/star/i18n/TransliterationModulesExtra.hpp>
31
#include <com/sun/star/i18n/TransliterationModulesExtra.hpp>
32
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
32
33
33
#include <comphelper/processfactory.hxx>
34
#include <comphelper/processfactory.hxx>
34
35
Lines 102-107 Link Here
102
#include "fuformatpaintbrush.hxx"
103
#include "fuformatpaintbrush.hxx"
103
104
104
using ::rtl::OUString;
105
using ::rtl::OUString;
106
using com::sun::star::ui::dialogs::XExecutableDialog;
105
using namespace ::com::sun::star;
107
using namespace ::com::sun::star;
106
using namespace ::com::sun::star::uno;
108
using namespace ::com::sun::star::uno;
107
using namespace ::com::sun::star::presentation;
109
using namespace ::com::sun::star::presentation;
Lines 1472-1477 void DrawViewShell::FuSupport(SfxRequest& rReq) Link Here
1472
		}
1474
		}
1473
		break;
1475
		break;
1474
1476
1477
        case SID_PRESENTATION_MINIMIZER:
1478
        {
1479
            if ( GetDoc()->GetDocumentType() == DOCUMENT_TYPE_IMPRESS &&
1480
                 GetViewShellBase().GetController() != NULL )
1481
            {
1482
                try
1483
                {
1484
                    uno::Reference< uno::XComponentContext > xContext(
1485
                        ::comphelper::getProcessComponentContext() );
1486
                    uno::Sequence< uno::Any > aArgs(1);
1487
                    aArgs[0] <<= GetViewShellBase().GetController();
1488
1489
                    uno::Reference< XExecutableDialog > xDialog(
1490
                        xContext->getServiceManager()->
1491
                            createInstanceWithArgumentsAndContext(
1492
                                rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
1493
                                    "com.sun.star.ui.dialogs.PresentationMinimizerDialog")),
1494
                                        aArgs, xContext), uno::UNO_QUERY_THROW );
1495
                    xDialog->execute();
1496
                }
1497
                catch (...)
1498
                {}
1499
            }
1500
1501
            rReq.Done();
1502
        }
1503
        break;
1504
1475
        default:
1505
        default:
1476
		break;
1506
		break;
1477
	}
1507
	}
(-)a/main/sd/uiconfig/simpress/menubar/menubar.xml (+1 lines)
Lines 270-275 Link Here
270
			<menu:menuitem menu:id=".uno:Gallery"/>
270
			<menu:menuitem menu:id=".uno:Gallery"/>
271
			<menu:menuitem menu:id=".uno:BmpMask"/>
271
			<menu:menuitem menu:id=".uno:BmpMask"/>
272
			<menu:menuitem menu:id=".uno:AVMediaPlayer"/>
272
			<menu:menuitem menu:id=".uno:AVMediaPlayer"/>
273
            <menu:menuitem menu:id=".uno:PresentationMinimizer"/>
273
			<menu:menuseparator/>
274
			<menu:menuseparator/>
274
            <menu:menu menu:id=".uno:MacrosMenu">
275
            <menu:menu menu:id=".uno:MacrosMenu">
275
                <menu:menupopup>
276
                <menu:menupopup>
(-)a/main/sdext/prj/build.lst (-3 / +1 lines)
Lines 1-9 Link Here
1
dx	sdext	:	L10N:l10n offuh comphelper unotools readlicense_oo cppu tools cppuhelper sal javaunohelper officecfg LIBXSLT:libxslt xmlhelp NULL
1
dx	sdext	:	L10N:l10n offuh comphelper unotools readlicense_oo cppu tools cppuhelper sal javaunohelper officecfg LIBXSLT:libxslt xmlhelp NULL
2
dx	sdext									usr1	-	all	sdext_mkout NULL
2
dx	sdext									usr1	-	all	sdext_mkout NULL
3
dx	sdext\prj								get		-	all	sdext_prj NULL
3
dx	sdext\prj								get		-	all	sdext_prj NULL
4
dx	sdext\source\minimizer					nmake	-	all sdext_minimizer sdext_minimizer_rdoooe sdext_minimizer_rdooo sdext_inc NULL
4
dx	sdext\source\minimizer					nmake	-	all sdext_minimizer sdext_inc NULL
5
dx	sdext\source\minimizer\registry\data\org\openoffice\Office\extension	nmake	-	all sdext_minimizer_rdoooe NULL
6
dx	sdext\source\minimizer\registry\data\org\openoffice\Office 		nmake	-	all sdext_minimizer_rdooo NULL
7
dx  sdext\source\presenter\registry\data\org\openoffice\Office\extension nmake   - all sdext_presenter_xcu  NULL
5
dx  sdext\source\presenter\registry\data\org\openoffice\Office\extension nmake   - all sdext_presenter_xcu  NULL
8
dx	sdext\source\presenter\help\en-US\com.sun.PresenterScreen					nmake	-	all sdext_presenter_help NULL
6
dx	sdext\source\presenter\help\en-US\com.sun.PresenterScreen					nmake	-	all sdext_presenter_help NULL
9
dx	sdext\source\presenter					nmake	-	all sdext_presenter sdext_inc sdext_presenter_xcu sdext_presenter_help NULL
7
dx	sdext\source\presenter					nmake	-	all sdext_presenter sdext_inc sdext_presenter_xcu sdext_presenter_help NULL
(-)a/main/sdext/prj/d.lst (-3 / +23 lines)
Lines 1-10 Link Here
1
mkdir: %_DEST%\bin%_EXT%\minimizer
2
mkdir: %_DEST%\bin%_EXT%\presenter
1
mkdir: %_DEST%\bin%_EXT%\presenter
3
mkdir: %_DEST%\bin%_EXT%\pdfimport
2
mkdir: %_DEST%\bin%_EXT%\pdfimport
4
..\%__SRC%\bin\pdf2xml.* %_DEST%\bin%_EXT%\pdf2xml.*
3
..\%__SRC%\bin\pdf2xml.* %_DEST%\bin%_EXT%\pdf2xml.*
5
..\%__SRC%\bin\pdfunzip.* %_DEST%\bin%_EXT%\pdfunzip.*
4
..\%__SRC%\bin\pdfunzip.* %_DEST%\bin%_EXT%\pdfunzip.*
6
..\%__SRC%\bin\pdfimport.oxt %_DEST%\bin%_EXT%\pdfimport\pdfimport.oxt
5
..\%__SRC%\bin\pdfimport.oxt %_DEST%\bin%_EXT%\pdfimport\pdfimport.oxt
7
..\%__SRC%\bin\presentation-minimizer.oxt %_DEST%\bin%_EXT%\minimizer\presentation-minimizer.oxt
8
..\%__SRC%\bin\presentation_minimizer_develop.zip %_DEST%\bin%_EXT%\minimizer\presentation_minimizer_develop.zip
9
..\%__SRC%\bin\presenter-screen.oxt %_DEST%\bin%_EXT%\presenter\presenter-screen.oxt
6
..\%__SRC%\bin\presenter-screen.oxt %_DEST%\bin%_EXT%\presenter\presenter-screen.oxt
10
..\%__SRC%\bin\presenter-screen_develop.zip %_DEST%\bin%_EXT%\presenter\presenter-screen_develop.zip
7
..\%__SRC%\bin\presenter-screen_develop.zip %_DEST%\bin%_EXT%\presenter\presenter-screen_develop.zip
8
9
10
11
mkdir: %COMMON_DEST%\res%_EXT%
12
..\%__SRC%\bin\*.res %_DEST%\bin%_EXT%\*.res
13
14
mkdir: %_DEST%\xml%_EXT%
15
mkdir: %_DEST%\xml%_EXT%\registry
16
mkdir: %_DEST%\xml%_EXT%\registry\spool
17
mkdir: %_DEST%\xml%_EXT%\registry\spool\org
18
mkdir: %_DEST%\xml%_EXT%\registry\spool\org\openoffice
19
mkdir: %_DEST%\xml%_EXT%\registry\spool\org\openoffice\Office
20
mkdir: %_DEST%\xml%_EXT%\registry\spool\org\openoffice\Office\Addons
21
mkdir: %_DEST%\xml%_EXT%\registry\spool\org\openoffice\Office\ProtocolHandler
22
23
..\%__SRC%\misc\registry\spool\org\openoffice\Office\Addons\*.xcu %_DEST%\xml%_EXT%\registry\spool\org\openoffice\Office\Addons
24
..\%__SRC%\misc\registry\spool\org\openoffice\Office\ProtocolHandler\*.xcu %_DEST%\xml%_EXT%\registry\spool\org\openoffice\Office\ProtocolHandler
25
26
mkdir: %_DEST%\xml%_EXT%
27
..\%__SRC%\misc\PresentationMinimizer.component %_DEST%\xml%_EXT%\PresentationMinimizer.component
28
29
..\%__SRC%\bin\PresentationMinimizer*.dll %_DEST%\bin%_EXT%\PresentationMinimizer*.dll
30
..\%__SRC%\lib\PresentationMinimizer*.so %_DEST%\lib%_EXT%
(-)a/main/sdext/source/minimizer/PresentationMinimizer.component (+30 lines)
Line 0 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!--***********************************************************
3
 *
4
 * Licensed to the Apache Software Foundation (ASF) under one
5
 * or more contributor license agreements.  See the NOTICE file
6
 * distributed with this work for additional information
7
 * regarding copyright ownership.  The ASF licenses this file
8
 * to you under the Apache License, Version 2.0 (the
9
 * "License"); you may not use this file except in compliance
10
 * with the License.  You may obtain a copy of the License at
11
 *
12
 *   http://www.apache.org/licenses/LICENSE-2.0
13
 *
14
 * Unless required by applicable law or agreed to in writing,
15
 * software distributed under the License is distributed on an
16
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17
 * KIND, either express or implied.  See the License for the
18
 * specific language governing permissions and limitations
19
 * under the License.
20
 *
21
 ***********************************************************-->
22
<component loader="com.sun.star.loader.SharedLibrary"
23
    xmlns="http://openoffice.org/2010/uno-components">
24
  <implementation name="com.sun.star.comp.PPPOptimizerImp">
25
    <service name="com.sun.star.comp.PPPOptimizer"/>
26
  </implementation>
27
  <implementation name="com.sun.star.comp.ui.dialogs.PresentationMinimizerDialog">
28
    <service name="com.sun.star.ui.dialogs.PresentationMinimizerDialog"/>
29
  </implementation>
30
</component>
(-)a/main/sdext/source/minimizer/configurationaccess.cxx (-58 / +140 lines)
Lines 31-43 Link Here
31
#include <com/sun/star/container/XNameContainer.hpp>
31
#include <com/sun/star/container/XNameContainer.hpp>
32
#include <com/sun/star/util/XMacroExpander.hpp>
32
#include <com/sun/star/util/XMacroExpander.hpp>
33
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
33
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
34
#include <com/sun/star/resource/XResourceBundleLoader.hpp>
35
36
#include <rtl/ustrbuf.hxx>
37
38
#include "minimizer.hrc"
34
39
35
using namespace ::rtl;
36
using namespace ::com::sun::star;
40
using namespace ::com::sun::star;
37
using namespace ::com::sun::star::uno;
41
using namespace ::com::sun::star::uno;
38
using namespace ::com::sun::star::beans;
42
using namespace ::com::sun::star::beans;
39
using namespace ::com::sun::star::container;
43
using namespace ::com::sun::star::container;
40
44
45
using rtl::OUString;
46
using rtl::OUStringBuffer;
47
48
49
#include <rtl/instance.hxx>
50
51
typedef std::map < sal_Int32, rtl::OUString > StringResourceMap;
52
53
struct StaticResourceMap
54
    : public rtl::StaticWithInit< StringResourceMap, StaticResourceMap  >
55
{
56
    StringResourceMap &
57
    operator()() const;
58
};
59
60
StringResourceMap &
61
StaticResourceMap::operator()() const
62
{
63
    static StringResourceMap aMap;
64
    return aMap;
65
}
66
41
static const OUString& GetConfigurationProviderServiceName (void)
67
static const OUString& GetConfigurationProviderServiceName (void)
42
{
68
{
43
    static const OUString sConfigurationProviderServiceName (
69
    static const OUString sConfigurationProviderServiceName (
Lines 48-57 static const OUString& GetConfigurationProviderServiceName (void) Link Here
48
static const OUString& GetPathToConfigurationRoot (void)
74
static const OUString& GetPathToConfigurationRoot (void)
49
{
75
{
50
    static const OUString sPathToConfigurationRoot (
76
    static const OUString sPathToConfigurationRoot (
51
        RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.extension.SunPresentationMinimizer"));
77
        RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Impress/PresentationMinimizer"));
52
    return sPathToConfigurationRoot;
78
    return sPathToConfigurationRoot;
53
}
79
}
54
80
81
static OUString lcl_loadString(
82
    const Reference< resource::XResourceBundle > xResourceBundle,
83
    sal_Int32 nResourceId )
84
{
85
    OUString sString;
86
    OUStringBuffer sKey;
87
    sKey.appendAscii( RTL_CONSTASCII_STRINGPARAM( "string:" ) );
88
    sKey.append( nResourceId );
89
90
    try
91
    {
92
        OSL_VERIFY( xResourceBundle->getByName( sKey.makeStringAndClear() ) >>= sString );
93
    }
94
    catch( const uno::Exception& )
95
    {
96
        OSL_ENSURE( false, "OptimizerSettings: missing resource!" );
97
    }
98
99
    return sString;
100
}
101
55
void OptimizerSettings::LoadSettingsFromConfiguration( const Reference< XNameAccess >& rSettings )
102
void OptimizerSettings::LoadSettingsFromConfiguration( const Reference< XNameAccess >& rSettings )
56
{
103
{
57
	if ( rSettings.is() )
104
	if ( rSettings.is() )
Lines 159-166 sal_Bool OptimizerSettings::operator==( const OptimizerSettings& rOptimizerSetti Link Here
159
}
206
}
160
207
161
208
162
ConfigurationAccess::ConfigurationAccess( const Reference< uno::XComponentContext >& rxMSF, OptimizerSettings* pDefaultSettings ) :
209
ConfigurationAccess::ConfigurationAccess( const Reference< uno::XComponentContext >& rxContext, OptimizerSettings* pDefaultSettings ) :
163
	mxMSF( rxMSF )
210
	m_xContext( rxContext )
164
{
211
{
165
	LoadStrings();
212
	LoadStrings();
166
	maSettings.push_back( pDefaultSettings ?
213
	maSettings.push_back( pDefaultSettings ?
Lines 174-239 ConfigurationAccess::~ConfigurationAccess() Link Here
174
{
221
{
175
}
222
}
176
223
177
rtl::OUString ConfigurationAccess::getPath( const PPPOptimizerTokenEnum eToken )
224
rtl::OUString ConfigurationAccess::getString( sal_Int32 nResId )
178
{
225
{
179
	rtl::OUString aPath;
226
    const StringResourceMap &aStrings = StaticResourceMap::get();
180
	try
227
	StringResourceMap::const_iterator aIter( aStrings.find( nResId ) );
181
	{
228
	return aIter != aStrings.end() ? ((*aIter).second) : rtl::OUString();
182
		static const OUString sProtocol( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.expand:" ) );
183
		static const OUString stheMacroExpander( RTL_CONSTASCII_USTRINGPARAM( "/singletons/com.sun.star.util.theMacroExpander" ) );
184
		Reference< container::XNameAccess > xSet( OpenConfiguration( true ), UNO_QUERY_THROW );
185
		if ( xSet->hasByName( TKGet( eToken ) ) )
186
			xSet->getByName( TKGet( eToken ) ) >>= aPath;
187
		if ( aPath.match( sProtocol, 0 ) )
188
		{
189
			rtl::OUString aTmp( aPath.copy( 20 ) );
190
			Reference< util::XMacroExpander > xExpander;
191
			if ( mxMSF->getValueByName( stheMacroExpander ) >>= xExpander )
192
			{
193
				aPath = xExpander->expandMacros( aTmp );
194
			}
195
		}
196
	}
197
	catch ( Exception& )
198
	{
199
	}
200
	return aPath;
201
}
202
203
rtl::OUString ConfigurationAccess::getString( const PPPOptimizerTokenEnum eToken ) const
204
{
205
	std::map< PPPOptimizerTokenEnum, rtl::OUString, Compare >::const_iterator aIter( maStrings.find( eToken ) );
206
	return aIter != maStrings.end() ? ((*aIter).second) : rtl::OUString();
207
}
229
}
208
230
209
void ConfigurationAccess::LoadStrings()
231
void ConfigurationAccess::LoadStrings()
210
{
232
{
233
    static bool bLoaded = false;
234
    if ( bLoaded )
235
        return;
236
    else
237
        bLoaded = true;
211
	try
238
	try
212
	{
239
	{
213
		do
240
214
		{
241
        Reference< resource::XResourceBundleLoader > xResourceBundleLoader(
215
			Reference< XInterface > xRoot( OpenConfiguration( true ) );
242
            m_xContext->getValueByName(
216
			if ( !xRoot.is() )
243
                OUString( RTL_CONSTASCII_USTRINGPARAM(
217
				break;
244
                    "/singletons/com.sun.star.resource.OfficeResourceLoader" ) ) ),
218
			Reference< container::XNameAccess > xSet( GetConfigurationNode( xRoot, TKGet( TK_Strings ) ), UNO_QUERY );
245
                        UNO_QUERY_THROW );
219
			if ( xSet.is() )
246
220
			{
247
        Reference< resource::XResourceBundle > xResourceBundle(
221
				const Sequence< OUString > aElements( xSet->getElementNames() );
248
            xResourceBundleLoader->loadBundle_Default(
222
				for ( int i = 0; i < aElements.getLength(); i++ )
249
                OUString( RTL_CONSTASCII_USTRINGPARAM( "minimizer" ) ) ), 
223
				{
250
                    UNO_SET_THROW );
224
					try
251
225
					{
252
        StringResourceMap &aStrings = StaticResourceMap::get();
226
						OUString aString, aPropertyName( aElements[ i ] );
253
        aStrings[ STR_PRESENTATION_MINIMIZER   ] = lcl_loadString( xResourceBundle, STR_PRESENTATION_MINIMIZER );
227
						if ( xSet->getByName( aPropertyName ) >>= aString )
254
        aStrings[ STR_STEPS                    ] = lcl_loadString( xResourceBundle, STR_STEPS );
228
							maStrings[ TKGet( aPropertyName ) ] = aString;
255
        aStrings[ STR_HELP                     ] = lcl_loadString( xResourceBundle, STR_HELP );
229
					}
256
        aStrings[ STR_BACK                     ] = lcl_loadString( xResourceBundle, STR_BACK );
230
					catch( Exception& )
257
        aStrings[ STR_NEXT                     ] = lcl_loadString( xResourceBundle, STR_NEXT );
231
					{
258
        aStrings[ STR_FINISH                   ] = lcl_loadString( xResourceBundle, STR_FINISH );
232
					}			
259
        aStrings[ STR_CANCEL                   ] = lcl_loadString( xResourceBundle, STR_CANCEL );
233
				}
260
        aStrings[ STR_INTRODUCTION             ] = lcl_loadString( xResourceBundle, STR_INTRODUCTION );
234
			}
261
        aStrings[ STR_INTRODUCTION_T           ] = lcl_loadString( xResourceBundle, STR_INTRODUCTION_T );
235
		}
262
        aStrings[ STR_CHOSE_SETTINGS           ] = lcl_loadString( xResourceBundle, STR_CHOSE_SETTINGS );
236
		while( false );
263
        aStrings[ STR_REMOVE                   ] = lcl_loadString( xResourceBundle, STR_REMOVE );
264
        aStrings[ STR_GRAPHIC_OPTIMIZATION     ] = lcl_loadString( xResourceBundle, STR_GRAPHIC_OPTIMIZATION );
265
        aStrings[ STR_IMAGE_OPTIMIZATION       ] = lcl_loadString( xResourceBundle, STR_IMAGE_OPTIMIZATION );
266
        aStrings[ STR_LOSSLESS_COMPRESSION     ] = lcl_loadString( xResourceBundle, STR_LOSSLESS_COMPRESSION );
267
        aStrings[ STR_JPEG_COMPRESSION         ] = lcl_loadString( xResourceBundle, STR_JPEG_COMPRESSION );
268
        aStrings[ STR_QUALITY                  ] = lcl_loadString( xResourceBundle, STR_QUALITY );
269
        aStrings[ STR_REMOVE_CROP_AREA         ] = lcl_loadString( xResourceBundle, STR_REMOVE_CROP_AREA );
270
        aStrings[ STR_IMAGE_RESOLUTION         ] = lcl_loadString( xResourceBundle, STR_IMAGE_RESOLUTION );
271
        aStrings[ STR_IMAGE_RESOLUTION_0       ] = lcl_loadString( xResourceBundle, STR_IMAGE_RESOLUTION_0 );
272
        aStrings[ STR_IMAGE_RESOLUTION_1       ] = lcl_loadString( xResourceBundle, STR_IMAGE_RESOLUTION_1 );
273
        aStrings[ STR_IMAGE_RESOLUTION_2       ] = lcl_loadString( xResourceBundle, STR_IMAGE_RESOLUTION_2 );
274
        aStrings[ STR_IMAGE_RESOLUTION_3       ] = lcl_loadString( xResourceBundle, STR_IMAGE_RESOLUTION_3 );
275
        aStrings[ STR_EMBED_LINKED_GRAPHICS    ] = lcl_loadString( xResourceBundle, STR_EMBED_LINKED_GRAPHICS );
276
        aStrings[ STR_OLE_OBJECTS              ] = lcl_loadString( xResourceBundle, STR_OLE_OBJECTS );
277
        aStrings[ STR_OLE_OPTIMIZATION         ] = lcl_loadString( xResourceBundle, STR_OLE_OPTIMIZATION );
278
        aStrings[ STR_OLE_REPLACE              ] = lcl_loadString( xResourceBundle, STR_OLE_REPLACE );
279
        aStrings[ STR_ALL_OLE_OBJECTS          ] = lcl_loadString( xResourceBundle, STR_ALL_OLE_OBJECTS );
280
        aStrings[ STR_ALIEN_OLE_OBJECTS_ONLY   ] = lcl_loadString( xResourceBundle, STR_ALIEN_OLE_OBJECTS_ONLY );
281
        aStrings[ STR_OLE_OBJECTS_DESC         ] = lcl_loadString( xResourceBundle, STR_OLE_OBJECTS_DESC );
282
        aStrings[ STR_NO_OLE_OBJECTS_DESC      ] = lcl_loadString( xResourceBundle, STR_NO_OLE_OBJECTS_DESC );
283
        aStrings[ STR_SLIDES                   ] = lcl_loadString( xResourceBundle, STR_SLIDES );
284
        aStrings[ STR_CHOOSE_SLIDES            ] = lcl_loadString( xResourceBundle, STR_CHOOSE_SLIDES );
285
        aStrings[ STR_MASTER_PAGES             ] = lcl_loadString( xResourceBundle, STR_MASTER_PAGES );
286
        aStrings[ STR_DELETE_MASTER_PAGES      ] = lcl_loadString( xResourceBundle, STR_DELETE_MASTER_PAGES );
287
        aStrings[ STR_DELETE_NOTES_PAGES       ] = lcl_loadString( xResourceBundle, STR_DELETE_NOTES_PAGES );
288
        aStrings[ STR_DELETE_HIDDEN_SLIDES     ] = lcl_loadString( xResourceBundle, STR_DELETE_HIDDEN_SLIDES );
289
        aStrings[ STR_CUSTOM_SHOW              ] = lcl_loadString( xResourceBundle, STR_CUSTOM_SHOW );
290
        aStrings[ STR_SUMMARY                  ] = lcl_loadString( xResourceBundle, STR_SUMMARY );
291
        aStrings[ STR_SUMMARY_TITLE            ] = lcl_loadString( xResourceBundle, STR_SUMMARY_TITLE );
292
        aStrings[ STR_PROGRESS                 ] = lcl_loadString( xResourceBundle, STR_PROGRESS );
293
        aStrings[ STR_OBJECTS_OPTIMIZED        ] = lcl_loadString( xResourceBundle, STR_OBJECTS_OPTIMIZED );
294
        aStrings[ STR_APPLY_TO_CURRENT         ] = lcl_loadString( xResourceBundle, STR_APPLY_TO_CURRENT );
295
        aStrings[ STR_AUTOMATICALLY_OPEN       ] = lcl_loadString( xResourceBundle, STR_AUTOMATICALLY_OPEN );
296
        aStrings[ STR_SAVE_SETTINGS            ] = lcl_loadString( xResourceBundle, STR_SAVE_SETTINGS );
297
        aStrings[ STR_SAVE_AS                  ] = lcl_loadString( xResourceBundle, STR_SAVE_AS );
298
        aStrings[ STR_DELETE_SLIDES            ] = lcl_loadString( xResourceBundle, STR_DELETE_SLIDES );
299
        aStrings[ STR_OPTIMIZE_IMAGES          ] = lcl_loadString( xResourceBundle, STR_OPTIMIZE_IMAGES );
300
        aStrings[ STR_CREATE_REPLACEMENT       ] = lcl_loadString( xResourceBundle, STR_CREATE_REPLACEMENT );
301
        aStrings[ STR_CURRENT_FILESIZE         ] = lcl_loadString( xResourceBundle, STR_CURRENT_FILESIZE );
302
        aStrings[ STR_ESTIMATED_FILESIZE       ] = lcl_loadString( xResourceBundle, STR_ESTIMATED_FILESIZE );
303
        aStrings[ STR_MB                       ] = lcl_loadString( xResourceBundle, STR_MB );
304
        aStrings[ STR_MY_SETTINGS              ] = lcl_loadString( xResourceBundle, STR_MY_SETTINGS );
305
        aStrings[ STR_DEFAULT_SESSION          ] = lcl_loadString( xResourceBundle, STR_DEFAULT_SESSION );
306
        aStrings[ STR_MODIFY_WARNING           ] = lcl_loadString( xResourceBundle, STR_MODIFY_WARNING );
307
        aStrings[ STR_YES                      ] = lcl_loadString( xResourceBundle, STR_YES );
308
        aStrings[ STR_OK                       ] = lcl_loadString( xResourceBundle, STR_OK );
309
        aStrings[ STR_INFO_1                   ] = lcl_loadString( xResourceBundle, STR_INFO_1 );
310
        aStrings[ STR_INFO_2                   ] = lcl_loadString( xResourceBundle, STR_INFO_2 );
311
        aStrings[ STR_INFO_3                   ] = lcl_loadString( xResourceBundle, STR_INFO_3 );
312
        aStrings[ STR_INFO_4                   ] = lcl_loadString( xResourceBundle, STR_INFO_4 );
313
        aStrings[ STR_DUPLICATING_PRESENTATION ] = lcl_loadString( xResourceBundle, STR_DUPLICATING_PRESENTATION );
314
        aStrings[ STR_DELETING_SLIDES          ] = lcl_loadString( xResourceBundle, STR_DELETING_SLIDES );
315
        aStrings[ STR_OPTIMIZING_GRAPHICS      ] = lcl_loadString( xResourceBundle, STR_OPTIMIZING_GRAPHICS );
316
        aStrings[ STR_CREATING_OLE_REPLACEMENTS] = lcl_loadString( xResourceBundle, STR_CREATING_OLE_REPLACEMENTS );
317
        aStrings[ STR_FILESIZESEPARATOR        ] = lcl_loadString( xResourceBundle, STR_FILESIZESEPARATOR );
318
        aStrings[ STR_INFO_DIALOG              ] = lcl_loadString( xResourceBundle, STR_INFO_DIALOG );
237
	}
319
	}
238
	catch( Exception& )
320
	catch( Exception& )
239
	{
321
	{
Lines 334-340 Reference< XInterface > ConfigurationAccess::OpenConfiguration( bool bReadOnly ) Link Here
334
	Reference< XInterface > xRoot;
416
	Reference< XInterface > xRoot;
335
	try
417
	try
336
	{
418
	{
337
        Reference< lang::XMultiServiceFactory > xProvider( mxMSF->getServiceManager()->createInstanceWithContext( GetConfigurationProviderServiceName(), mxMSF ), UNO_QUERY );
419
        Reference< lang::XMultiServiceFactory > xProvider( m_xContext->getServiceManager()->createInstanceWithContext( GetConfigurationProviderServiceName(), m_xContext ), UNO_QUERY );
338
        if ( xProvider.is() )
420
        if ( xProvider.is() )
339
        {
421
        {
340
            Sequence< Any > aCreationArguments( 2 );
422
            Sequence< Any > aCreationArguments( 2 );
(-)a/main/sdext/source/minimizer/configurationaccess.hxx (-14 / +4 lines)
Lines 40-45 Link Here
40
#include <com/sun/star/container/XNameReplace.hpp>
40
#include <com/sun/star/container/XNameReplace.hpp>
41
#include <map>
41
#include <map>
42
42
43
43
struct OptimizerSettings
44
struct OptimizerSettings
44
{
45
{
45
	rtl::OUString	maName;
46
	rtl::OUString	maName;
Lines 86-98 class ConfigurationAccess Link Here
86
{
87
{
87
	public :
88
	public :
88
89
89
		ConfigurationAccess( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rXFactory,
90
		ConfigurationAccess( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext,
90
								OptimizerSettings* pDefaultSettings = NULL );
91
								OptimizerSettings* pDefaultSettings = NULL );
91
		~ConfigurationAccess();
92
		~ConfigurationAccess();
92
		void SaveConfiguration();
93
		void SaveConfiguration();
93
94
94
		rtl::OUString getPath( const PPPOptimizerTokenEnum );
95
		static rtl::OUString getString( sal_Int32 nResId );
95
		rtl::OUString getString( const PPPOptimizerTokenEnum ) const;
96
96
97
		// access to current OptimizerSettings (stored in the first entry of maSettings)
97
		// access to current OptimizerSettings (stored in the first entry of maSettings)
98
		com::sun::star::uno::Any GetConfigProperty( const PPPOptimizerTokenEnum ) const;
98
		com::sun::star::uno::Any GetConfigProperty( const PPPOptimizerTokenEnum ) const;
Lines 110-129 class ConfigurationAccess Link Here
110
110
111
	private :
111
	private :
112
112
113
		struct Compare
113
        com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > m_xContext;
114
		{
115
			bool operator()( const PPPOptimizerTokenEnum s1, const PPPOptimizerTokenEnum s2 ) const
116
			{
117
				return s1 < s2;
118
			}
119
		};
120
		std::map < PPPOptimizerTokenEnum, rtl::OUString, Compare > maStrings;
121
122
		std::vector< OptimizerSettings > maSettings;
114
		std::vector< OptimizerSettings > maSettings;
123
		std::vector< OptimizerSettings > maInitialSettings;
115
		std::vector< OptimizerSettings > maInitialSettings;
124
116
125
		com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > mxMSF;
126
127
		void LoadStrings();
117
		void LoadStrings();
128
		void LoadConfiguration();
118
		void LoadConfiguration();
129
		com::sun::star::uno::Reference< com::sun::star::uno::XInterface > OpenConfiguration( bool bReadOnly );
119
		com::sun::star::uno::Reference< com::sun::star::uno::XInterface > OpenConfiguration( bool bReadOnly );
(-)a/main/sdext/source/minimizer/delzip (-1 lines)
Line 1 Link Here
1
(-)a/main/sdext/source/minimizer/description.xml (-58 lines)
Lines 1-58 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!--***********************************************************
3
 * 
4
 * Licensed to the Apache Software Foundation (ASF) under one
5
 * or more contributor license agreements.  See the NOTICE file
6
 * distributed with this work for additional information
7
 * regarding copyright ownership.  The ASF licenses this file
8
 * to you under the Apache License, Version 2.0 (the
9
 * "License"); you may not use this file except in compliance
10
 * with the License.  You may obtain a copy of the License at
11
 * 
12
 *   http://www.apache.org/licenses/LICENSE-2.0
13
 * 
14
 * Unless required by applicable law or agreed to in writing,
15
 * software distributed under the License is distributed on an
16
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17
 * KIND, either express or implied.  See the License for the
18
 * specific language governing permissions and limitations
19
 * under the License.
20
 * 
21
 ***********************************************************-->
22
<description
23
24
    xmlns="http://openoffice.org/extensions/description/2006"
25
    xmlns:xlink="http://www.w3.org/1999/xlink"
26
    xmlns:dep="http://openoffice.org/extensions/description/2006">
27
28
    <identifier value="UPDATED_IDENTIFIER"/>
29
30
    <dependencies>
31
        <OpenOffice.org-minimal-version value="4.0" dep:name="OpenOffice"/>
32
        <OpenOffice.org-maximal-version value="4.9" dep:name="OpenOffice"/>
33
    </dependencies>
34
35
    <registration>
36
        <simple-license accept-by="admin" default-license-id="lic-en-US" suppress-if-required="true" >
37
            <license-text xlink:href="licensefile" lang="isocode" license-id="lic-isocode"/>
38
        </simple-license>
39
    </registration>
40
41
    <version value="1.1.0"/>
42
43
    <platform value="UPDATED_SUPPORTED_PLATFORM"/>
44
45
    <publisher>
46
        <name xlink:href="http://www.openoffice.org" lang="en">Apache Software Foundation</name>
47
    </publisher>
48
49
    <display-name>
50
        <name lang="en-US">Presentation Minimizer</name>
51
    </display-name>
52
53
    <icon>
54
      <default xlink:href="bitmaps/extension_32.png" />
55
      <high-contrast xlink:href="bitmaps/extension_32_h.png" />
56
    </icon>
57
58
</description>
(-)a/main/sdext/source/minimizer/fileopendialog.cxx (-12 / +24 lines)
Lines 57-63 Link Here
57
57
58
#include <rtl/ustrbuf.hxx>
58
#include <rtl/ustrbuf.hxx>
59
59
60
using namespace ::rtl;
61
using namespace ::com::sun::star::uno;
60
using namespace ::com::sun::star::uno;
62
using namespace ::com::sun::star::lang;
61
using namespace ::com::sun::star::lang;
63
using namespace ::com::sun::star::beans;
62
using namespace ::com::sun::star::beans;
Lines 65-78 using namespace ::com::sun::star::container; Link Here
65
using namespace ::com::sun::star::view;
64
using namespace ::com::sun::star::view;
66
using namespace ::com::sun::star::ui::dialogs;
65
using namespace ::com::sun::star::ui::dialogs;
67
66
68
FileOpenDialog::FileOpenDialog( const Reference< XComponentContext >& rxMSF ) :
67
using ::com::sun::star::awt::XWindow;
69
    mxMSF( rxMSF )
68
using ::rtl::OUString;
69
70
FileOpenDialog::FileOpenDialog(
71
    const Reference< XComponentContext >& rxContext,
72
    const Reference< XWindow > &rxParent )
73
    : mxContext( rxContext )
70
{
74
{
71
	Sequence< Any > aInitPropSeq( 1 );
75
    Sequence< Any > aInitPropSeq( 2 );
72
	aInitPropSeq[ 0 ] <<= (sal_Int16)TemplateDescription::FILESAVE_AUTOEXTENSION;	// TemplateDescription.FILEOPEN_SIMPLE
76
    aInitPropSeq[ 0 ] <<= NamedValue(
77
        OUString(RTL_CONSTASCII_USTRINGPARAM("TemplateDescription")),
78
        makeAny( (sal_Int16)TemplateDescription::FILESAVE_AUTOEXTENSION));
79
    aInitPropSeq[ 1 ] <<= NamedValue(
80
        OUString(RTL_CONSTASCII_USTRINGPARAM("ParentWindow")),
81
        makeAny( rxParent ));
73
82
74
	mxFilePicker = Reference < XFilePicker >( mxMSF->getServiceManager()->createInstanceWithArgumentsAndContext(
83
	mxFilePicker = Reference < XFilePicker >(
75
		OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FilePicker" ) ), aInitPropSeq, rxMSF ),UNO_QUERY_THROW );
84
        mxContext->getServiceManager()->createInstanceWithArgumentsAndContext(
85
            OUString( RTL_CONSTASCII_USTRINGPARAM(
86
                "com.sun.star.ui.dialogs.FilePicker" ) ),
87
                    aInitPropSeq, rxContext ), UNO_QUERY_THROW );
76
	mxFilePicker->setMultiSelectionMode( sal_False );
88
	mxFilePicker->setMultiSelectionMode( sal_False );
77
89
78
	Reference< XFilePickerControlAccess > xAccess( mxFilePicker, UNO_QUERY );
90
	Reference< XFilePickerControlAccess > xAccess( mxFilePicker, UNO_QUERY );
Lines 88-95 FileOpenDialog::FileOpenDialog( const Reference< XComponentContext >& rxMSF ) : Link Here
88
	}
100
	}
89
101
90
	// collecting a list of impress filters
102
	// collecting a list of impress filters
91
	Reference< XNameAccess > xFilters( mxMSF->getServiceManager()->createInstanceWithContext(
103
	Reference< XNameAccess > xFilters( mxContext->getServiceManager()->createInstanceWithContext(
92
		OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.FilterFactory" ) ), rxMSF ), UNO_QUERY_THROW );
104
		OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.FilterFactory" ) ), rxContext ), UNO_QUERY_THROW );
93
	Sequence< OUString > aFilterList( xFilters->getElementNames() );
105
	Sequence< OUString > aFilterList( xFilters->getElementNames() );
94
	for ( int i = 0; i < aFilterList.getLength(); i++ )
106
	for ( int i = 0; i < aFilterList.getLength(); i++ )
95
	{
107
	{
Lines 133-146 FileOpenDialog::FileOpenDialog( const Reference< XComponentContext >& rxMSF ) : Link Here
133
		}
145
		}
134
	}
146
	}
135
147
136
	Reference< XNameAccess > xTypes( mxMSF->getServiceManager()->createInstanceWithContext(
148
	Reference< XNameAccess > xTypes( mxContext->getServiceManager()->createInstanceWithContext(
137
		OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.TypeDetection" ) ), rxMSF ), UNO_QUERY_THROW );
149
		OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.TypeDetection" ) ), rxContext ), UNO_QUERY_THROW );
138
	Sequence< OUString > aTypeList( xFilters->getElementNames() );
150
	Sequence< OUString > aTypeList( xFilters->getElementNames() );
139
151
140
//	mxFilePicker->setDefaultName( );
152
//	mxFilePicker->setDefaultName( );
141
153
142
    const char filter[] = "*.";
154
    const char filter[] = "*.";
143
    // the filter title must be formed in the same it is currently done
155
    // the filter title must be formed in the same way it is currently done
144
    // in the internal implementation: "UIName (.<extension>)"
156
    // in the internal implementation: "UIName (.<extension>)"
145
    rtl::OUStringBuffer aUIName;
157
    rtl::OUStringBuffer aUIName;
146
    // the filter must be in the form "*.<extension>"
158
    // the filter must be in the form "*.<extension>"
(-)a/main/sdext/source/minimizer/fileopendialog.hxx (-2 / +4 lines)
Lines 30-35 Link Here
30
#include <com/sun/star/container/XNameAccess.hpp>
30
#include <com/sun/star/container/XNameAccess.hpp>
31
#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
31
#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
32
#include <com/sun/star/uno/XComponentContext.hpp>
32
#include <com/sun/star/uno/XComponentContext.hpp>
33
#include <com/sun/star/awt/XWindow.hpp>
33
34
34
class FileOpenDialog
35
class FileOpenDialog
35
{
36
{
Lines 46-58 class FileOpenDialog Link Here
46
		FilterEntry() :
47
		FilterEntry() :
47
			maFlags( 0 ) {}
48
			maFlags( 0 ) {}
48
	};
49
	};
49
	com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > mxMSF;
50
	com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > mxContext;
50
	com::sun::star::uno::Reference < ::com::sun::star::ui::dialogs::XFilePicker > mxFilePicker;
51
	com::sun::star::uno::Reference < ::com::sun::star::ui::dialogs::XFilePicker > mxFilePicker;
51
52
52
	std::vector< FilterEntry > aFilterEntryList;
53
	std::vector< FilterEntry > aFilterEntryList;
53
54
54
public :
55
public :
55
		FileOpenDialog( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxMSF );
56
		FileOpenDialog( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext,
57
                        const com::sun::star::uno::Reference< com::sun::star::awt::XWindow > &rxParent );
56
		~FileOpenDialog();
58
		~FileOpenDialog();
57
59
58
		sal_Int16 execute();
60
		sal_Int16 execute();
(-)a/main/sdext/source/minimizer/graphiccollector.cxx (-30 / +31 lines)
Lines 35-41 Link Here
35
35
36
#include "impoptimizer.hxx"
36
#include "impoptimizer.hxx"
37
37
38
using namespace ::rtl;
39
using namespace ::com::sun::star;
38
using namespace ::com::sun::star;
40
using namespace ::com::sun::star::uno;
39
using namespace ::com::sun::star::uno;
41
using namespace ::com::sun::star::awt;
40
using namespace ::com::sun::star::awt;
Lines 45-50 using namespace ::com::sun::star::frame; Link Here
45
using namespace ::com::sun::star::beans;
44
using namespace ::com::sun::star::beans;
46
using namespace ::com::sun::star::presentation;
45
using namespace ::com::sun::star::presentation;
47
46
47
using ::rtl::OUString;
48
48
const DeviceInfo& GraphicCollector::GetDeviceInfo( const Reference< XComponentContext >& rxFact )
49
const DeviceInfo& GraphicCollector::GetDeviceInfo( const Reference< XComponentContext >& rxFact )
49
{
50
{
50
	static DeviceInfo aDeviceInfo;
51
	static DeviceInfo aDeviceInfo;
Lines 95-101 void ImpAddEntity( std::vector< GraphicCollector::GraphicEntity >& rGraphicEntit Link Here
95
	}
96
	}
96
}
97
}
97
98
98
void ImpAddGraphicEntity( const Reference< XComponentContext >& rxMSF, Reference< XShape >& rxShape, const GraphicSettings& rGraphicSettings, std::vector< GraphicCollector::GraphicEntity >& rGraphicEntities )
99
void ImpAddGraphicEntity( const Reference< XComponentContext >& rxContext, Reference< XShape >& rxShape, const GraphicSettings& rGraphicSettings, std::vector< GraphicCollector::GraphicEntity >& rGraphicEntities )
99
{
100
{
100
	Reference< XGraphic > xGraphic;
101
	Reference< XGraphic > xGraphic;
101
	Reference< XPropertySet > xShapePropertySet( rxShape, UNO_QUERY_THROW );
102
	Reference< XPropertySet > xShapePropertySet( rxShape, UNO_QUERY_THROW );
Lines 114-120 void ImpAddGraphicEntity( const Reference< XComponentContext >& rxMSF, Reference Link Here
114
		// calculating the logical size, as if there were no cropping
115
		// calculating the logical size, as if there were no cropping
115
		if ( aGraphicCropLogic.Left || aGraphicCropLogic.Right || aGraphicCropLogic.Top || aGraphicCropLogic.Bottom )
116
		if ( aGraphicCropLogic.Left || aGraphicCropLogic.Right || aGraphicCropLogic.Top || aGraphicCropLogic.Bottom )
116
		{
117
		{
117
			awt::Size aSize100thMM( GraphicCollector::GetOriginalSize( rxMSF, xGraphic ) );
118
			awt::Size aSize100thMM( GraphicCollector::GetOriginalSize( rxContext, xGraphic ) );
118
			if ( aSize100thMM.Width && aSize100thMM.Height )
119
			if ( aSize100thMM.Width && aSize100thMM.Height )
119
			{
120
			{
120
				awt::Size aCropSize( aSize100thMM.Width - ( aGraphicCropLogic.Left + aGraphicCropLogic.Right ),
121
				awt::Size aCropSize( aSize100thMM.Width - ( aGraphicCropLogic.Left + aGraphicCropLogic.Right ),
Lines 133-139 void ImpAddGraphicEntity( const Reference< XComponentContext >& rxMSF, Reference Link Here
133
	}
134
	}
134
}
135
}
135
136
136
void ImpAddFillBitmapEntity( const Reference< XComponentContext >& rxMSF, const Reference< XPropertySet >& rxPropertySet, const awt::Size& rLogicalSize,
137
void ImpAddFillBitmapEntity( const Reference< XComponentContext >& rxContext, const Reference< XPropertySet >& rxPropertySet, const awt::Size& rLogicalSize,
137
	std::vector< GraphicCollector::GraphicEntity >& rGraphicEntities, const GraphicSettings& rGraphicSettings, const Reference< XPropertySet >& rxPagePropertySet )
138
	std::vector< GraphicCollector::GraphicEntity >& rGraphicEntities, const GraphicSettings& rGraphicSettings, const Reference< XPropertySet >& rxPagePropertySet )
138
{
139
{
139
	try
140
	try
Lines 171-177 void ImpAddFillBitmapEntity( const Reference< XComponentContext >& rxMSF, const Link Here
171
											{
172
											{
172
												if ( !aSize.Width || !aSize.Height )
173
												if ( !aSize.Width || !aSize.Height )
173
												{
174
												{
174
													awt::Size aSize100thMM( GraphicCollector::GetOriginalSize( rxMSF, xGraphic ) );
175
													awt::Size aSize100thMM( GraphicCollector::GetOriginalSize( rxContext, xGraphic ) );
175
													if ( aSize100thMM.Width && aSize100thMM.Height )
176
													if ( aSize100thMM.Width && aSize100thMM.Height )
176
														aLogicalSize = aSize100thMM;
177
														aLogicalSize = aSize100thMM;
177
												}
178
												}
Lines 205-211 void ImpAddFillBitmapEntity( const Reference< XComponentContext >& rxMSF, const Link Here
205
	}
206
	}
206
}
207
}
207
208
208
void ImpCollectBackgroundGraphic( const Reference< XComponentContext >& rxMSF, const Reference< XDrawPage >& rxDrawPage, const GraphicSettings& rGraphicSettings, std::vector< GraphicCollector::GraphicEntity >& rGraphicEntities )
209
void ImpCollectBackgroundGraphic( const Reference< XComponentContext >& rxContext, const Reference< XDrawPage >& rxDrawPage, const GraphicSettings& rGraphicSettings, std::vector< GraphicCollector::GraphicEntity >& rGraphicEntities )
209
{
210
{
210
	try
211
	try
211
	{
212
	{
Lines 216-229 void ImpCollectBackgroundGraphic( const Reference< XComponentContext >& rxMSF, c Link Here
216
		
217
		
217
		Reference< XPropertySet > xBackgroundPropSet;
218
		Reference< XPropertySet > xBackgroundPropSet;
218
		if ( xPropertySet->getPropertyValue( TKGet( TK_Background ) ) >>= xBackgroundPropSet )
219
		if ( xPropertySet->getPropertyValue( TKGet( TK_Background ) ) >>= xBackgroundPropSet )
219
			ImpAddFillBitmapEntity( rxMSF, xBackgroundPropSet, aLogicalSize, rGraphicEntities, rGraphicSettings, xPropertySet );
220
			ImpAddFillBitmapEntity( rxContext, xBackgroundPropSet, aLogicalSize, rGraphicEntities, rGraphicSettings, xPropertySet );
220
	}
221
	}
221
	catch( Exception& )
222
	catch( Exception& )
222
	{
223
	{
223
	}
224
	}
224
}
225
}
225
226
226
void ImpCollectGraphicObjects( const Reference< XComponentContext >& rxMSF, const Reference< XShapes >& rxShapes, const GraphicSettings& rGraphicSettings, std::vector< GraphicCollector::GraphicEntity >& rGraphicEntities )
227
void ImpCollectGraphicObjects( const Reference< XComponentContext >& rxContext, const Reference< XShapes >& rxShapes, const GraphicSettings& rGraphicSettings, std::vector< GraphicCollector::GraphicEntity >& rGraphicEntities )
227
{
228
{
228
	for ( sal_Int32 i = 0; i < rxShapes->getCount(); i++ )
229
	for ( sal_Int32 i = 0; i < rxShapes->getCount(); i++ )
229
	{
230
	{
Lines 236-253 void ImpCollectGraphicObjects( const Reference< XComponentContext >& rxMSF, cons Link Here
236
			if ( sShapeType == sGroupShape )
237
			if ( sShapeType == sGroupShape )
237
			{
238
			{
238
				Reference< XShapes > xShapes( xShape, UNO_QUERY_THROW );
239
				Reference< XShapes > xShapes( xShape, UNO_QUERY_THROW );
239
				ImpCollectGraphicObjects( rxMSF, xShapes, rGraphicSettings, rGraphicEntities );
240
				ImpCollectGraphicObjects( rxContext, xShapes, rGraphicSettings, rGraphicEntities );
240
				continue;
241
				continue;
241
			}
242
			}
242
243
243
			if ( sShapeType == sGraphicObjectShape )
244
			if ( sShapeType == sGraphicObjectShape )
244
				ImpAddGraphicEntity( rxMSF, xShape, rGraphicSettings, rGraphicEntities );
245
				ImpAddGraphicEntity( rxContext, xShape, rGraphicSettings, rGraphicEntities );
245
246
246
			// now check for a fillstyle
247
			// now check for a fillstyle
247
			Reference< XPropertySet > xEmptyPagePropSet;
248
			Reference< XPropertySet > xEmptyPagePropSet;
248
			Reference< XPropertySet > xShapePropertySet( xShape, UNO_QUERY_THROW );
249
			Reference< XPropertySet > xShapePropertySet( xShape, UNO_QUERY_THROW );
249
			awt::Size aLogicalSize( xShape->getSize() );
250
			awt::Size aLogicalSize( xShape->getSize() );
250
			ImpAddFillBitmapEntity( rxMSF, xShapePropertySet, aLogicalSize, rGraphicEntities, rGraphicSettings, xEmptyPagePropSet );
251
			ImpAddFillBitmapEntity( rxContext, xShapePropertySet, aLogicalSize, rGraphicEntities, rGraphicSettings, xEmptyPagePropSet );
251
		}
252
		}
252
		catch( Exception& )
253
		catch( Exception& )
253
		{
254
		{
Lines 255-261 void ImpCollectGraphicObjects( const Reference< XComponentContext >& rxMSF, cons Link Here
255
	}
256
	}
256
}
257
}
257
258
258
awt::Size GraphicCollector::GetOriginalSize( const Reference< XComponentContext >& rxMSF, const Reference< XGraphic >& rxGraphic )
259
awt::Size GraphicCollector::GetOriginalSize( const Reference< XComponentContext >& rxContext, const Reference< XGraphic >& rxGraphic )
259
{
260
{
260
	awt::Size aSize100thMM( 0, 0 );
261
	awt::Size aSize100thMM( 0, 0 );
261
	Reference< XPropertySet > xGraphicPropertySet( rxGraphic, UNO_QUERY_THROW );
262
	Reference< XPropertySet > xGraphicPropertySet( rxGraphic, UNO_QUERY_THROW );
Lines 266-272 awt::Size GraphicCollector::GetOriginalSize( const Reference< XComponentContext Link Here
266
			awt::Size aSourceSizePixel( 0, 0 );
267
			awt::Size aSourceSizePixel( 0, 0 );
267
			if ( xGraphicPropertySet->getPropertyValue( TKGet( TK_SizePixel ) ) >>= aSourceSizePixel )
268
			if ( xGraphicPropertySet->getPropertyValue( TKGet( TK_SizePixel ) ) >>= aSourceSizePixel )
268
			{
269
			{
269
				const DeviceInfo& rDeviceInfo( GraphicCollector::GetDeviceInfo( rxMSF ) );
270
				const DeviceInfo& rDeviceInfo( GraphicCollector::GetDeviceInfo( rxContext ) );
270
				if ( rDeviceInfo.PixelPerMeterX && rDeviceInfo.PixelPerMeterY )
271
				if ( rDeviceInfo.PixelPerMeterX && rDeviceInfo.PixelPerMeterY )
271
				{
272
				{
272
					aSize100thMM.Width = static_cast< sal_Int32 >( ( aSourceSizePixel.Width * 100000.0 ) / rDeviceInfo.PixelPerMeterX );
273
					aSize100thMM.Width = static_cast< sal_Int32 >( ( aSourceSizePixel.Width * 100000.0 ) / rDeviceInfo.PixelPerMeterX );
Lines 278-284 awt::Size GraphicCollector::GetOriginalSize( const Reference< XComponentContext Link Here
278
	return aSize100thMM;
279
	return aSize100thMM;
279
}
280
}
280
281
281
void GraphicCollector::CollectGraphics( const Reference< XComponentContext >& rxMSF, const Reference< XModel >& rxModel,
282
void GraphicCollector::CollectGraphics( const Reference< XComponentContext >& rxContext, const Reference< XModel >& rxModel,
282
		const GraphicSettings& rGraphicSettings, std::vector< GraphicCollector::GraphicEntity >& rGraphicList )
283
		const GraphicSettings& rGraphicSettings, std::vector< GraphicCollector::GraphicEntity >& rGraphicList )
283
{
284
{
284
	try
285
	try
Lines 289-312 void GraphicCollector::CollectGraphics( const Reference< XComponentContext >& rx Link Here
289
		for ( i = 0; i < xDrawPages->getCount(); i++ )
290
		for ( i = 0; i < xDrawPages->getCount(); i++ )
290
		{
291
		{
291
			Reference< XDrawPage > xDrawPage( xDrawPages->getByIndex( i ), UNO_QUERY_THROW );
292
			Reference< XDrawPage > xDrawPage( xDrawPages->getByIndex( i ), UNO_QUERY_THROW );
292
			ImpCollectBackgroundGraphic( rxMSF, xDrawPage, rGraphicSettings, rGraphicList );
293
			ImpCollectBackgroundGraphic( rxContext, xDrawPage, rGraphicSettings, rGraphicList );
293
			Reference< XShapes > xDrawShapes( xDrawPage, UNO_QUERY_THROW );
294
			Reference< XShapes > xDrawShapes( xDrawPage, UNO_QUERY_THROW );
294
			ImpCollectGraphicObjects( rxMSF, xDrawShapes, rGraphicSettings, rGraphicList );
295
			ImpCollectGraphicObjects( rxContext, xDrawShapes, rGraphicSettings, rGraphicList );
295
296
296
			Reference< XPresentationPage > xPresentationPage( xDrawPage, UNO_QUERY_THROW );
297
			Reference< XPresentationPage > xPresentationPage( xDrawPage, UNO_QUERY_THROW );
297
			Reference< XDrawPage > xNotesPage( xPresentationPage->getNotesPage() );
298
			Reference< XDrawPage > xNotesPage( xPresentationPage->getNotesPage() );
298
			ImpCollectBackgroundGraphic( rxMSF, xNotesPage, rGraphicSettings, rGraphicList );
299
			ImpCollectBackgroundGraphic( rxContext, xNotesPage, rGraphicSettings, rGraphicList );
299
			Reference< XShapes > xNotesShapes( xNotesPage, UNO_QUERY_THROW );
300
			Reference< XShapes > xNotesShapes( xNotesPage, UNO_QUERY_THROW );
300
			ImpCollectGraphicObjects( rxMSF, xNotesShapes, rGraphicSettings, rGraphicList );
301
			ImpCollectGraphicObjects( rxContext, xNotesShapes, rGraphicSettings, rGraphicList );
301
		}
302
		}
302
		Reference< XMasterPagesSupplier > xMasterPagesSupplier( rxModel, UNO_QUERY_THROW );
303
		Reference< XMasterPagesSupplier > xMasterPagesSupplier( rxModel, UNO_QUERY_THROW );
303
		Reference< XDrawPages > xMasterPages( xMasterPagesSupplier->getMasterPages(), UNO_QUERY_THROW );
304
		Reference< XDrawPages > xMasterPages( xMasterPagesSupplier->getMasterPages(), UNO_QUERY_THROW );
304
		for ( i = 0; i < xMasterPages->getCount(); i++ )
305
		for ( i = 0; i < xMasterPages->getCount(); i++ )
305
		{
306
		{
306
			Reference< XDrawPage > xMasterPage( xMasterPages->getByIndex( i ), UNO_QUERY_THROW );
307
			Reference< XDrawPage > xMasterPage( xMasterPages->getByIndex( i ), UNO_QUERY_THROW );
307
			ImpCollectBackgroundGraphic( rxMSF, xMasterPage, rGraphicSettings, rGraphicList );
308
			ImpCollectBackgroundGraphic( rxContext, xMasterPage, rGraphicSettings, rGraphicList );
308
			Reference< XShapes > xMasterPageShapes( xMasterPage, UNO_QUERY_THROW );
309
			Reference< XShapes > xMasterPageShapes( xMasterPage, UNO_QUERY_THROW );
309
			ImpCollectGraphicObjects( rxMSF, xMasterPageShapes, rGraphicSettings, rGraphicList );
310
			ImpCollectGraphicObjects( rxContext, xMasterPageShapes, rGraphicSettings, rGraphicList );
310
		}
311
		}
311
312
312
		std::vector< GraphicCollector::GraphicEntity >::iterator aGraphicIter( rGraphicList.begin() );
313
		std::vector< GraphicCollector::GraphicEntity >::iterator aGraphicIter( rGraphicList.begin() );
Lines 348-354 void GraphicCollector::CollectGraphics( const Reference< XComponentContext >& rx Link Here
348
	}
349
	}
349
}
350
}
350
351
351
void ImpCountGraphicObjects( const Reference< XComponentContext >& rxMSF, const Reference< XShapes >& rxShapes, const GraphicSettings& rGraphicSettings, sal_Int32& rnGraphics )
352
void ImpCountGraphicObjects( const Reference< XComponentContext >& rxContext, const Reference< XShapes >& rxShapes, const GraphicSettings& rGraphicSettings, sal_Int32& rnGraphics )
352
{
353
{
353
	for ( sal_Int32 i = 0; i < rxShapes->getCount(); i++ )
354
	for ( sal_Int32 i = 0; i < rxShapes->getCount(); i++ )
354
	{
355
	{
Lines 361-367 void ImpCountGraphicObjects( const Reference< XComponentContext >& rxMSF, const Link Here
361
			if ( sShapeType == sGroupShape )
362
			if ( sShapeType == sGroupShape )
362
			{
363
			{
363
				Reference< XShapes > xShapes( xShape, UNO_QUERY_THROW );
364
				Reference< XShapes > xShapes( xShape, UNO_QUERY_THROW );
364
				ImpCountGraphicObjects( rxMSF, xShapes, rGraphicSettings, rnGraphics );
365
				ImpCountGraphicObjects( rxContext, xShapes, rGraphicSettings, rnGraphics );
365
				continue;
366
				continue;
366
			}
367
			}
367
368
Lines 390-396 void ImpCountGraphicObjects( const Reference< XComponentContext >& rxMSF, const Link Here
390
	}
391
	}
391
}
392
}
392
393
393
void ImpCountBackgroundGraphic( const Reference< XComponentContext >& /* rxMSF */, const Reference< XDrawPage >& rxDrawPage,
394
void ImpCountBackgroundGraphic( const Reference< XComponentContext >& /* rxContext */, const Reference< XDrawPage >& rxDrawPage,
394
							   const GraphicSettings& /* rGraphicSettings */, sal_Int32& rnGraphics )
395
							   const GraphicSettings& /* rGraphicSettings */, sal_Int32& rnGraphics )
395
{
396
{
396
	try
397
	try
Lines 418-424 void ImpCountBackgroundGraphic( const Reference< XComponentContext >& /* rxMSF * Link Here
418
	}
419
	}
419
}
420
}
420
421
421
void GraphicCollector::CountGraphics( const Reference< XComponentContext >& rxMSF, const Reference< XModel >& rxModel,
422
void GraphicCollector::CountGraphics( const Reference< XComponentContext >& rxContext, const Reference< XModel >& rxModel,
422
		const GraphicSettings& rGraphicSettings, sal_Int32& rnGraphics )
423
		const GraphicSettings& rGraphicSettings, sal_Int32& rnGraphics )
423
{
424
{
424
	try
425
	try
Lines 429-452 void GraphicCollector::CountGraphics( const Reference< XComponentContext >& rxMS Link Here
429
		for ( i = 0; i < xDrawPages->getCount(); i++ )
430
		for ( i = 0; i < xDrawPages->getCount(); i++ )
430
		{
431
		{
431
			Reference< XDrawPage > xDrawPage( xDrawPages->getByIndex( i ), UNO_QUERY_THROW );
432
			Reference< XDrawPage > xDrawPage( xDrawPages->getByIndex( i ), UNO_QUERY_THROW );
432
			ImpCountBackgroundGraphic( rxMSF, xDrawPage, rGraphicSettings, rnGraphics );
433
			ImpCountBackgroundGraphic( rxContext, xDrawPage, rGraphicSettings, rnGraphics );
433
			Reference< XShapes > xDrawShapes( xDrawPage, UNO_QUERY_THROW );
434
			Reference< XShapes > xDrawShapes( xDrawPage, UNO_QUERY_THROW );
434
			ImpCountGraphicObjects( rxMSF, xDrawShapes, rGraphicSettings, rnGraphics );
435
			ImpCountGraphicObjects( rxContext, xDrawShapes, rGraphicSettings, rnGraphics );
435
436
436
			Reference< XPresentationPage > xPresentationPage( xDrawPage, UNO_QUERY_THROW );
437
			Reference< XPresentationPage > xPresentationPage( xDrawPage, UNO_QUERY_THROW );
437
			Reference< XDrawPage > xNotesPage( xPresentationPage->getNotesPage() );
438
			Reference< XDrawPage > xNotesPage( xPresentationPage->getNotesPage() );
438
			ImpCountBackgroundGraphic( rxMSF, xNotesPage, rGraphicSettings, rnGraphics );
439
			ImpCountBackgroundGraphic( rxContext, xNotesPage, rGraphicSettings, rnGraphics );
439
			Reference< XShapes > xNotesShapes( xNotesPage, UNO_QUERY_THROW );
440
			Reference< XShapes > xNotesShapes( xNotesPage, UNO_QUERY_THROW );
440
			ImpCountGraphicObjects( rxMSF, xNotesShapes, rGraphicSettings, rnGraphics );
441
			ImpCountGraphicObjects( rxContext, xNotesShapes, rGraphicSettings, rnGraphics );
441
		}
442
		}
442
		Reference< XMasterPagesSupplier > xMasterPagesSupplier( rxModel, UNO_QUERY_THROW );
443
		Reference< XMasterPagesSupplier > xMasterPagesSupplier( rxModel, UNO_QUERY_THROW );
443
		Reference< XDrawPages > xMasterPages( xMasterPagesSupplier->getMasterPages(), UNO_QUERY_THROW );
444
		Reference< XDrawPages > xMasterPages( xMasterPagesSupplier->getMasterPages(), UNO_QUERY_THROW );
444
		for ( i = 0; i < xMasterPages->getCount(); i++ )
445
		for ( i = 0; i < xMasterPages->getCount(); i++ )
445
		{
446
		{
446
			Reference< XDrawPage > xMasterPage( xMasterPages->getByIndex( i ), UNO_QUERY_THROW );
447
			Reference< XDrawPage > xMasterPage( xMasterPages->getByIndex( i ), UNO_QUERY_THROW );
447
			ImpCountBackgroundGraphic( rxMSF, xMasterPage, rGraphicSettings, rnGraphics );
448
			ImpCountBackgroundGraphic( rxContext, xMasterPage, rGraphicSettings, rnGraphics );
448
			Reference< XShapes > xMasterPageShapes( xMasterPage, UNO_QUERY_THROW );
449
			Reference< XShapes > xMasterPageShapes( xMasterPage, UNO_QUERY_THROW );
449
			ImpCountGraphicObjects( rxMSF, xMasterPageShapes, rGraphicSettings, rnGraphics );
450
			ImpCountGraphicObjects( rxContext, xMasterPageShapes, rGraphicSettings, rnGraphics );
450
		}
451
		}
451
	}
452
	}
452
	catch ( Exception& )
453
	catch ( Exception& )
(-)a/main/sdext/source/minimizer/graphiccollector.hxx (-3 / +3 lines)
Lines 82-95 class GraphicCollector Link Here
82
	};
82
	};
83
83
84
	static const com::sun::star::awt::DeviceInfo& GetDeviceInfo( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxFact );
84
	static const com::sun::star::awt::DeviceInfo& GetDeviceInfo( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxFact );
85
	static com::sun::star::awt::Size GetOriginalSize( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxMSF,
85
	static com::sun::star::awt::Size GetOriginalSize( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext,
86
				const com::sun::star::uno::Reference< com::sun::star::graphic::XGraphic >& rxGraphic );
86
				const com::sun::star::uno::Reference< com::sun::star::graphic::XGraphic >& rxGraphic );
87
87
88
	// collecting graphic instances, the downside of this method is that every graphic is swapped in
88
	// collecting graphic instances, the downside of this method is that every graphic is swapped in
89
	static void CollectGraphics( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxMSF, const com::sun::star::uno::Reference< com::sun::star::frame::XModel >& rxModel,
89
	static void CollectGraphics( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext, const com::sun::star::uno::Reference< com::sun::star::frame::XModel >& rxModel,
90
		const GraphicSettings& rGraphicSettings, std::vector< GraphicEntity >& io_rGraphicList );
90
		const GraphicSettings& rGraphicSettings, std::vector< GraphicEntity >& io_rGraphicList );
91
	// counting graphics without swapping in graphics
91
	// counting graphics without swapping in graphics
92
	static void CountGraphics( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxMSF, const com::sun::star::uno::Reference< com::sun::star::frame::XModel >& rxModel,
92
	static void CountGraphics( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext, const com::sun::star::uno::Reference< com::sun::star::frame::XModel >& rxModel,
93
		const GraphicSettings& rGraphicSettings, sal_Int32& rGraphics );
93
		const GraphicSettings& rGraphicSettings, sal_Int32& rGraphics );
94
};
94
};
95
95
(-)a/main/sdext/source/minimizer/help/component.txt (-2 lines)
Lines 1-2 Link Here
1
The Presentation Minimizer is used to reduce the file size of the current presentation. Images will be compressed, and data that is no longer needed will be removed.
2
The Presentation Minimizer can optimize the image quality size. Presentations designed for screen or projector do not require the same high quality as presentations designed for print.
(-)a/main/sdext/source/minimizer/helpid.hrc (+57 lines)
Line 0 Link Here
1
/**************************************************************
2
 *
3
 * Licensed to the Apache Software Foundation (ASF) under one
4
 * or more contributor license agreements.  See the NOTICE file
5
 * distributed with this work for additional information
6
 * regarding copyright ownership.  The ASF licenses this file
7
 * to you under the Apache License, Version 2.0 (the
8
 * "License"); you may not use this file except in compliance
9
 * with the License.  You may obtain a copy of the License at
10
 *
11
 *   http://www.apache.org/licenses/LICENSE-2.0
12
 *
13
 * Unless required by applicable law or agreed to in writing,
14
 * software distributed under the License is distributed on an
15
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
 * KIND, either express or implied.  See the License for the
17
 * specific language governing permissions and limitations
18
 * under the License.
19
 *
20
 *************************************************************/
21
22
#define HID( helpid )  ( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( helpid ) ) )
23
24
#define HID_SDEXT_MINIMIZER_WIZ_DLG                     "sdext:Minimizer:Wizard:Dialog"
25
#define HID_SDEXT_MINIMIZER_WIZ_STEP1                   "sdext:Minimizer:Wizard:Step1"
26
#define HID_SDEXT_MINIMIZER_WIZ_STEP1_LB_SETTINGS       "sdext:Minimizer:Wizard:Step1:LBSettings"
27
#define HID_SDEXT_MINIMIZER_WIZ_STEP1_PB_DELSETTS       "sdext:Minimizer:Wizard:Step1:PBDelSetts"
28
#define HID_SDEXT_MINIMIZER_WIZ_STEP2                   "sdext:Minimizer:Wizard:Step2"
29
#define HID_SDEXT_MINIMIZER_WIZ_STEP2_CB_CUSTOMSHOW     "sdext:Minimizer:Wizard:Step2:CBCustomShow"
30
#define HID_SDEXT_MINIMIZER_WIZ_STEP2_CB_HIDDENSLIDES   "sdext:Minimizer:Wizard:Step2:CBHiddenSlides"
31
#define HID_SDEXT_MINIMIZER_WIZ_STEP2_CB_MASTERPAGES    "sdext:Minimizer:Wizard:Step2:CBMasterPages"
32
#define HID_SDEXT_MINIMIZER_WIZ_STEP2_CB_NOTES          "sdext:Minimizer:Wizard:Step2:CBNotes"
33
#define HID_SDEXT_MINIMIZER_WIZ_STEP2_LB_CUSTOMSHOW     "sdext:Minimizer:Wizard:Step2:LBCustomShow"
34
#define HID_SDEXT_MINIMIZER_WIZ_STEP3                   "sdext:Minimizer:Wizard:Step3"
35
#define HID_SDEXT_MINIMIZER_WIZ_STEP3_CB_CROP           "sdext:Minimizer:Wizard:Step3:CBCrop"
36
#define HID_SDEXT_MINIMIZER_WIZ_STEP3_LB_DPI            "sdext:Minimizer:Wizard:Step3:LBDPI"   // TODO change in help
37
#define HID_SDEXT_MINIMIZER_WIZ_STEP3_CB_LINKS          "sdext:Minimizer:Wizard:Step3:CBLinks"
38
#define HID_SDEXT_MINIMIZER_WIZ_STEP3_MF_QUALITY        "sdext:Minimizer:Wizard:Step3:MFQuality"
39
#define HID_SDEXT_MINIMIZER_WIZ_STEP3_RB_JPEG           "sdext:Minimizer:Wizard:Step3:RBJPEG"
40
#define HID_SDEXT_MINIMIZER_WIZ_STEP3_RB_LOSSLESS       "sdext:Minimizer:Wizard:Step3:RBLossless"
41
#define HID_SDEXT_MINIMIZER_WIZ_STEP4                   "sdext:Minimizer:Wizard:Step4"
42
#define HID_SDEXT_MINIMIZER_WIZ_STEP4_CB_OLE            "sdext:Minimizer:Wizard:Step4:CBOLE"
43
#define HID_SDEXT_MINIMIZER_WIZ_STEP4_RB_ALLOLE         "sdext:Minimizer:Wizard:Step4:RBAllOLE"
44
#define HID_SDEXT_MINIMIZER_WIZ_STEP4_RB_NOTODF         "sdext:Minimizer:Wizard:Step4:RBNotODF"
45
#define HID_SDEXT_MINIMIZER_WIZ_STEP5                   "sdext:Minimizer:Wizard:Step5"
46
#define HID_SDEXT_MINIMIZER_WIZ_STEP5_RB_CURDOC         "sdext:Minimizer:Wizard:Step5:RBCurDoc"
47
#define HID_SDEXT_MINIMIZER_WIZ_STEP5_RB_NEWDOC         "sdext:Minimizer:Wizard:Step5:RBNewDoc"
48
#define HID_SDEXT_MINIMIZER_WIZ_STEP5_CB_SAVESETTINGS   "sdext:Minimizer:Wizard:Step5:CBSaveSetts"  // TODO ADD to help
49
#define HID_SDEXT_MINIMIZER_WIZ_STEP5_LB_SETTINGSNAME   "sdext:Minimizer:Wizard:Step5:LBSettsName"  // TODO ADD to help
50
#define HID_SDEXT_MINIMIZER_WIZ_PB_HELP                 "sdext:Minimizer:Wizard:PBHelp"             // TODO ADD to help
51
#define HID_SDEXT_MINIMIZER_WIZ_PB_BACK                 "sdext:Minimizer:Wizard:PBBack"
52
#define HID_SDEXT_MINIMIZER_WIZ_PB_NEXT                 "sdext:Minimizer:Wizard:PBNext"
53
#define HID_SDEXT_MINIMIZER_WIZ_PB_FINISH               "sdext:Minimizer:Wizard:PBFinish"
54
#define HID_SDEXT_MINIMIZER_WIZ_PB_CANCEL               "sdext:Minimizer:Wizard:PBCancel"
55
#define HID_SDEXT_MINIMIZER_INFOBOX_DLG                 "sdext:Minimizer:InfoBox:Dialog"
56
#define HID_SDEXT_MINIMIZER_INFOBOX_CB_OPENNEW          "sdext:Minimizer:InfoBox:CBOpenNew"
57
(-)a/main/sdext/source/minimizer/impoptimizer.cxx (-44 / +49 lines)
Lines 30-37 Link Here
30
#include "pagecollector.hxx"
30
#include "pagecollector.hxx"
31
#include "informationdialog.hxx"
31
#include "informationdialog.hxx"
32
32
33
#include <unotools/localfilehelper.hxx>
33
#include "minimizer.hrc"
34
#include <unotools/processfactory.hxx>
34
35
#include <vector>
35
#include <vector>
36
#include "com/sun/star/util/URL.hpp"
36
#include "com/sun/star/util/URL.hpp"
37
#include "com/sun/star/util/XURLTransformer.hpp"
37
#include "com/sun/star/util/XURLTransformer.hpp"
Lines 43-54 Link Here
43
#include <com/sun/star/frame/XDesktop.hpp>
43
#include <com/sun/star/frame/XDesktop.hpp>
44
#include <com/sun/star/awt/XWindow.hpp>
44
#include <com/sun/star/awt/XWindow.hpp>
45
#include <com/sun/star/frame/XStorable.hpp>
45
#include <com/sun/star/frame/XStorable.hpp>
46
#ifndef _COM_SUN_STAR_FRAME_FrameSearchFlag_HPP_
47
#include <com/sun/star/frame/FrameSearchFlag.hpp>
46
#include <com/sun/star/frame/FrameSearchFlag.hpp>
48
#endif
49
#include <com/sun/star/frame/XDispatchProvider.hpp>
47
#include <com/sun/star/frame/XDispatchProvider.hpp>
50
#include <com/sun/star/graphic/XGraphicProvider.hpp>
48
#include <com/sun/star/graphic/XGraphicProvider.hpp>
51
#include <unotools/configmgr.hxx>
52
#include <com/sun/star/lang/XServiceInfo.hpp>
49
#include <com/sun/star/lang/XServiceInfo.hpp>
53
#include <com/sun/star/container/XNamed.hpp>
50
#include <com/sun/star/container/XNamed.hpp>
54
#include <com/sun/star/drawing/XShapes.hpp>
51
#include <com/sun/star/drawing/XShapes.hpp>
Lines 61-69 Link Here
61
#include <com/sun/star/presentation/XPresentationPage.hpp>
58
#include <com/sun/star/presentation/XPresentationPage.hpp>
62
#include <com/sun/star/document/XFilter.hpp>
59
#include <com/sun/star/document/XFilter.hpp>
63
#include <com/sun/star/document/XExporter.hpp>
60
#include <com/sun/star/document/XExporter.hpp>
64
#ifndef _COM_SUN_STAR_UNO_RUNTIME_EXCEPTION_HPP_
65
#include <com/sun/star/uno/RuntimeException.hpp>
61
#include <com/sun/star/uno/RuntimeException.hpp>
66
#endif
67
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
62
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
68
#include <com/sun/star/graphic/XGraphicProvider.hpp>
63
#include <com/sun/star/graphic/XGraphicProvider.hpp>
69
#include <com/sun/star/graphic/GraphicType.hpp>
64
#include <com/sun/star/graphic/GraphicType.hpp>
Lines 73-79 Link Here
73
#include <com/sun/star/util/URL.hpp>
68
#include <com/sun/star/util/URL.hpp>
74
69
75
using namespace ::std;
70
using namespace ::std;
76
using namespace ::rtl;
77
using namespace ::com::sun::star;
71
using namespace ::com::sun::star;
78
using namespace ::com::sun::star::io;
72
using namespace ::com::sun::star::io;
79
using namespace ::com::sun::star::awt;
73
using namespace ::com::sun::star::awt;
Lines 88-93 using namespace ::com::sun::star::document; Link Here
88
using namespace ::com::sun::star::container;
82
using namespace ::com::sun::star::container;
89
using namespace ::com::sun::star::presentation;
83
using namespace ::com::sun::star::presentation;
90
84
85
using ::rtl::OUString;
86
91
void ImpExtractCustomShow( const Reference< XModel >& rxModel, const OUString& rCustomShowName )
87
void ImpExtractCustomShow( const Reference< XModel >& rxModel, const OUString& rCustomShowName )
92
{
88
{
93
	vector< Reference< XDrawPage > > vNonUsedPageList;
89
	vector< Reference< XDrawPage > > vNonUsedPageList;
Lines 266-272 void ImpCompressGraphic( Reference< XGraphicProvider >& rxGraphicProvider, const Link Here
266
	}
262
	}
267
}
263
}
268
264
269
Reference< XGraphic > ImpCompressGraphic( const Reference< XComponentContext >& rxMSF,
265
Reference< XGraphic > ImpCompressGraphic( const Reference< XComponentContext >& rxContext,
270
	const Reference< XGraphic >& xGraphic, const awt::Size& aLogicalSize, const text::GraphicCrop& aGraphicCropLogic,
266
	const Reference< XGraphic >& xGraphic, const awt::Size& aLogicalSize, const text::GraphicCrop& aGraphicCropLogic,
271
		const GraphicSettings& rGraphicSettings )
267
		const GraphicSettings& rGraphicSettings )
272
{
268
{
Lines 301-307 Reference< XGraphic > ImpCompressGraphic( const Reference< XComponentContext >& Link Here
301
						// cropping has to be removed from SourceSizePixel
297
						// cropping has to be removed from SourceSizePixel
302
						if ( aGraphicCropLogic.Left || aGraphicCropLogic.Top || aGraphicCropLogic.Right || aGraphicCropLogic.Bottom )
298
						if ( aGraphicCropLogic.Left || aGraphicCropLogic.Top || aGraphicCropLogic.Right || aGraphicCropLogic.Bottom )
303
						{
299
						{
304
							const awt::Size aSize100thMM( GraphicCollector::GetOriginalSize( rxMSF, xGraphic ) );
300
							const awt::Size aSize100thMM( GraphicCollector::GetOriginalSize( rxContext, xGraphic ) );
305
301
306
							if ( bRemoveCropArea )
302
							if ( bRemoveCropArea )
307
								bNeedsOptimizing = sal_True;
303
								bNeedsOptimizing = sal_True;
Lines 350-358 Reference< XGraphic > ImpCompressGraphic( const Reference< XComponentContext >& Link Here
350
							}
346
							}
351
							if ( bNeedsOptimizing && aDestSizePixel.Width && aDestSizePixel.Height )
347
							if ( bNeedsOptimizing && aDestSizePixel.Width && aDestSizePixel.Height )
352
							{
348
							{
353
								Reference< XStream > xTempFile( rxMSF->getServiceManager()->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.io.TempFile" ), rxMSF ), UNO_QUERY_THROW );
349
								Reference< XStream > xTempFile( rxContext->getServiceManager()->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.io.TempFile" ), rxContext ), UNO_QUERY_THROW );
354
								Reference< XOutputStream > xOutputStream( xTempFile->getOutputStream() );
350
								Reference< XOutputStream > xOutputStream( xTempFile->getOutputStream() );
355
								Reference< XGraphicProvider > xGraphicProvider( rxMSF->getServiceManager()->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.graphic.GraphicProvider" ), rxMSF ), UNO_QUERY_THROW );
351
								Reference< XGraphicProvider > xGraphicProvider( rxContext->getServiceManager()->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.graphic.GraphicProvider" ), rxContext ), UNO_QUERY_THROW );
356
352
357
								ImpCompressGraphic( xGraphicProvider, xGraphic, xOutputStream, aDestMimeType, aLogicalSize, rGraphicSettings.mnJPEGQuality, rGraphicSettings.mnImageResolution, bRemoveCropArea, aGraphicCropLogic );
353
								ImpCompressGraphic( xGraphicProvider, xGraphic, xOutputStream, aDestMimeType, aLogicalSize, rGraphicSettings.mnJPEGQuality, rGraphicSettings.mnImageResolution, bRemoveCropArea, aGraphicCropLogic );
358
								Reference< XInputStream > xInputStream( xTempFile->getInputStream() );
354
								Reference< XInputStream > xInputStream( xTempFile->getInputStream() );
Lines 370-378 Reference< XGraphic > ImpCompressGraphic( const Reference< XComponentContext >& Link Here
370
			else // this is a metafile
366
			else // this is a metafile
371
			{
367
			{
372
				rtl::OUString aDestMimeType( aSourceMimeType );
368
				rtl::OUString aDestMimeType( aSourceMimeType );
373
				Reference< XStream > xTempFile( rxMSF->getServiceManager()->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.io.TempFile" ), rxMSF ), UNO_QUERY_THROW );
369
				Reference< XStream > xTempFile( rxContext->getServiceManager()->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.io.TempFile" ), rxContext ), UNO_QUERY_THROW );
374
				Reference< XOutputStream > xOutputStream( xTempFile->getOutputStream() );
370
				Reference< XOutputStream > xOutputStream( xTempFile->getOutputStream() );
375
				Reference< XGraphicProvider > xGraphicProvider( rxMSF->getServiceManager()->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.graphic.GraphicProvider" ), rxMSF ), UNO_QUERY_THROW );
371
				Reference< XGraphicProvider > xGraphicProvider( rxContext->getServiceManager()->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.graphic.GraphicProvider" ), rxContext ), UNO_QUERY_THROW );
376
				ImpCompressGraphic( xGraphicProvider, xGraphic, xOutputStream, aDestMimeType, aLogicalSize, rGraphicSettings.mnJPEGQuality, rGraphicSettings.mnImageResolution, sal_False, aGraphicCropLogic );
372
				ImpCompressGraphic( xGraphicProvider, xGraphic, xOutputStream, aDestMimeType, aLogicalSize, rGraphicSettings.mnJPEGQuality, rGraphicSettings.mnImageResolution, sal_False, aGraphicCropLogic );
377
				Reference< XInputStream > xInputStream( xTempFile->getInputStream() );
373
				Reference< XInputStream > xInputStream( xTempFile->getInputStream() );
378
				Reference< XSeekable > xSeekable( xInputStream, UNO_QUERY_THROW );
374
				Reference< XSeekable > xSeekable( xInputStream, UNO_QUERY_THROW );
Lines 390-396 Reference< XGraphic > ImpCompressGraphic( const Reference< XComponentContext >& Link Here
390
	return xNewGraphic;
386
	return xNewGraphic;
391
}
387
}
392
388
393
void CompressGraphics( ImpOptimizer& rOptimizer, const Reference< XComponentContext >& rxMSF, const GraphicSettings& rGraphicSettings,
389
void CompressGraphics( ImpOptimizer& rOptimizer, const Reference< XComponentContext >& rxContext, const GraphicSettings& rGraphicSettings,
394
	std::vector< GraphicCollector::GraphicEntity >& rGraphicList )
390
	std::vector< GraphicCollector::GraphicEntity >& rGraphicList )
395
{
391
{
396
	try
392
	try
Lines 425-432 void CompressGraphics( ImpOptimizer& rOptimizer, const Reference< XComponentCont Link Here
425
				if ( xGraphic.is() )
421
				if ( xGraphic.is() )
426
				{
422
				{
427
					Reference< XPropertySet > xNewGraphicPropertySet( xGraphic, UNO_QUERY_THROW );
423
					Reference< XPropertySet > xNewGraphicPropertySet( xGraphic, UNO_QUERY_THROW );
428
					awt::Size aSize100thMM( GraphicCollector::GetOriginalSize( rxMSF, xGraphic ) );
424
					awt::Size aSize100thMM( GraphicCollector::GetOriginalSize( rxContext, xGraphic ) );
429
					Reference< XGraphic > xNewGraphic( ImpCompressGraphic( rxMSF, xGraphic, aGraphicIter->maLogicalSize, aGraphicIter->maGraphicCropLogic, aGraphicSettings ) );
425
					Reference< XGraphic > xNewGraphic( ImpCompressGraphic( rxContext, xGraphic, aGraphicIter->maLogicalSize, aGraphicIter->maGraphicCropLogic, aGraphicSettings ) );
430
					if ( xNewGraphic.is() )
426
					if ( xNewGraphic.is() )
431
					{
427
					{
432
						// applying graphic to each user
428
						// applying graphic to each user
Lines 446-452 void CompressGraphics( ImpOptimizer& rOptimizer, const Reference< XComponentCont Link Here
446
									text::GraphicCrop aGraphicCropLogic( 0, 0, 0, 0 );
442
									text::GraphicCrop aGraphicCropLogic( 0, 0, 0, 0 );
447
									if ( !aGraphicSettings.mbRemoveCropArea )
443
									if ( !aGraphicSettings.mbRemoveCropArea )
448
									{
444
									{
449
										awt::Size aNewSize( GraphicCollector::GetOriginalSize( rxMSF, xNewGraphic ) );
445
										awt::Size aNewSize( GraphicCollector::GetOriginalSize( rxContext, xNewGraphic ) );
450
										aGraphicCropLogic.Left = (sal_Int32)((double)aGraphicUserIter->maGraphicCropLogic.Left * ((double)aNewSize.Width / (double)aSize100thMM.Width));
446
										aGraphicCropLogic.Left = (sal_Int32)((double)aGraphicUserIter->maGraphicCropLogic.Left * ((double)aNewSize.Width / (double)aSize100thMM.Width));
451
										aGraphicCropLogic.Top = (sal_Int32)((double)aGraphicUserIter->maGraphicCropLogic.Top * ((double)aNewSize.Height / (double)aSize100thMM.Height));
447
										aGraphicCropLogic.Top = (sal_Int32)((double)aGraphicUserIter->maGraphicCropLogic.Top * ((double)aNewSize.Height / (double)aSize100thMM.Height));
452
										aGraphicCropLogic.Right = (sal_Int32)((double)aGraphicUserIter->maGraphicCropLogic.Right * ((double)aNewSize.Width / (double)aSize100thMM.Width));
448
										aGraphicCropLogic.Right = (sal_Int32)((double)aGraphicUserIter->maGraphicCropLogic.Right * ((double)aNewSize.Width / (double)aSize100thMM.Width));
Lines 497-504 void CompressGraphics( ImpOptimizer& rOptimizer, const Reference< XComponentCont Link Here
497
// - ImpOptimizer -
493
// - ImpOptimizer -
498
// ----------------
494
// ----------------
499
495
500
ImpOptimizer::ImpOptimizer( const Reference< XComponentContext >& rxMSF, const Reference< XModel >& rxModel ) :
496
ImpOptimizer::ImpOptimizer( const Reference< XComponentContext >& rxContext, const Reference< XModel >& rxModel ) :
501
	mxMSF						( rxMSF ),
497
	mxContext						( rxContext ),
502
    mxModel						( rxModel ),
498
    mxModel						( rxModel ),
503
	mbJPEGCompression			( sal_False ),
499
	mbJPEGCompression			( sal_False ),
504
	mnJPEGQuality				( 90 ),
500
	mnJPEGQuality				( 90 ),
Lines 512-541 ImpOptimizer::ImpOptimizer( const Reference< XComponentContext >& rxMSF, const R Link Here
512
	mbDeleteNotesPages			( sal_False ),
508
	mbDeleteNotesPages			( sal_False ),
513
	mbOpenNewDocument			( sal_True )
509
	mbOpenNewDocument			( sal_True )
514
{
510
{
511
    OSL_TRACE("ImpOptimizer::ImpOptimizer");
512
    Reference< XController > xController( mxModel->getCurrentController() );
513
    if (xController.is() )
514
        mxFrame.set( xController->getFrame() );
515
}
515
}
516
516
517
// -----------------------------------------------------------------------------
517
// -----------------------------------------------------------------------------
518
518
519
ImpOptimizer::~ImpOptimizer()
519
ImpOptimizer::~ImpOptimizer()
520
{
520
{
521
    OSL_TRACE("ImpOptimizer::~ImpOptimizer");
521
}
522
}
522
523
523
// -----------------------------------------------------------------------------
524
// -----------------------------------------------------------------------------
524
525
525
void ImpOptimizer::DispatchStatus()
526
void ImpOptimizer::DispatchStatus()
526
{
527
{
527
	if ( mxStatusDispatcher.is() )
528
	if ( mxStatusListener.is() )
528
	{
529
	{
529
		URL aURL;
530
        FeatureStateEvent aState;
530
		aURL.Protocol = OUString( RTL_CONSTASCII_USTRINGPARAM( "vnd.com.sun.star.comp.SunPresentationMinimizer:" ) );
531
        aState.IsEnabled = sal_True;
531
		aURL.Path = OUString( RTL_CONSTASCII_USTRINGPARAM( "statusupdate" ) );
532
        aState.State <<= GetStatusSequence();
532
		mxStatusDispatcher->dispatch( aURL, GetStatusSequence() );
533
        mxStatusListener->statusChanged( aState );
533
	}
534
	}
534
}
535
}
535
536
536
// -----------------------------------------------------------------------------
537
// -----------------------------------------------------------------------------
537
538
538
sal_Bool ImpOptimizer::Optimize()
539
sal_Bool ImpOptimizer::ImplOptimize()
539
{
540
{
540
541
541
	if ( maCustomShowName.getLength() )
542
	if ( maCustomShowName.getLength() )
Lines 544-550 sal_Bool ImpOptimizer::Optimize() Link Here
544
	if ( mbDeleteUnusedMasterPages )
545
	if ( mbDeleteUnusedMasterPages )
545
	{
546
	{
546
		SetStatusValue( TK_Progress, Any( static_cast< sal_Int32 >( 40 ) ) );
547
		SetStatusValue( TK_Progress, Any( static_cast< sal_Int32 >( 40 ) ) );
547
		SetStatusValue( TK_Status, Any( TKGet( STR_DELETING_SLIDES ) ) );
548
		SetStatusValue( TK_Status, Any( ConfigurationAccess::getString( STR_DELETING_SLIDES ) ) );
548
		DispatchStatus();
549
		DispatchStatus();
549
		ImpDeleteUnusedMasterPages( mxModel );
550
		ImpDeleteUnusedMasterPages( mxModel );
550
	}
551
	}
Lines 552-565 sal_Bool ImpOptimizer::Optimize() Link Here
552
	if ( mbDeleteHiddenSlides )
553
	if ( mbDeleteHiddenSlides )
553
	{
554
	{
554
		SetStatusValue( TK_Progress, Any( static_cast< sal_Int32 >( 40 ) ) );
555
		SetStatusValue( TK_Progress, Any( static_cast< sal_Int32 >( 40 ) ) );
555
		SetStatusValue( TK_Status, Any( TKGet( STR_DELETING_SLIDES ) ) );
556
		SetStatusValue( TK_Status, Any( ConfigurationAccess::getString( STR_DELETING_SLIDES ) ) );
556
		DispatchStatus();
557
		DispatchStatus();
557
		ImpDeleteHiddenSlides( mxModel );
558
		ImpDeleteHiddenSlides( mxModel );
558
	}
559
	}
559
560
560
	if ( mbDeleteNotesPages )
561
	if ( mbDeleteNotesPages )
561
	{
562
	{
562
		SetStatusValue( TK_Status, Any( TKGet( STR_DELETING_SLIDES ) ) );
563
		SetStatusValue( TK_Status, Any( ConfigurationAccess::getString( STR_DELETING_SLIDES ) ) );
563
		DispatchStatus();
564
		DispatchStatus();
564
		ImpDeleteNotesPages( mxModel );
565
		ImpDeleteNotesPages( mxModel );
565
	}
566
	}
Lines 567-573 sal_Bool ImpOptimizer::Optimize() Link Here
567
	if ( mbOLEOptimization )
568
	if ( mbOLEOptimization )
568
	{
569
	{
569
		SetStatusValue( TK_Progress, Any( static_cast< sal_Int32 >( 45 ) ) );
570
		SetStatusValue( TK_Progress, Any( static_cast< sal_Int32 >( 45 ) ) );
570
		SetStatusValue( TK_Status, Any( TKGet( STR_CREATING_OLE_REPLACEMENTS ) ) );
571
		SetStatusValue( TK_Status, Any( ConfigurationAccess::getString( STR_CREATING_OLE_REPLACEMENTS ) ) );
571
		DispatchStatus();
572
		DispatchStatus();
572
		ImpConvertOLE( mxModel, mnOLEOptimizationType );
573
		ImpConvertOLE( mxModel, mnOLEOptimizationType );
573
	}
574
	}
Lines 575-587 sal_Bool ImpOptimizer::Optimize() Link Here
575
	if ( mbJPEGCompression || mbRemoveCropArea || mnImageResolution )
576
	if ( mbJPEGCompression || mbRemoveCropArea || mnImageResolution )
576
	{
577
	{
577
		SetStatusValue( TK_Progress, Any( static_cast< sal_Int32 >( 50 ) ) );
578
		SetStatusValue( TK_Progress, Any( static_cast< sal_Int32 >( 50 ) ) );
578
		SetStatusValue( TK_Status, Any( TKGet( STR_OPTIMIZING_GRAPHICS ) ) );
579
		SetStatusValue( TK_Status, Any( ConfigurationAccess::getString( STR_OPTIMIZING_GRAPHICS ) ) );
579
		DispatchStatus();
580
		DispatchStatus();
580
581
581
		std::vector< GraphicCollector::GraphicEntity > aGraphicList;
582
		std::vector< GraphicCollector::GraphicEntity > aGraphicList;
582
		GraphicSettings aGraphicSettings( mbJPEGCompression, mnJPEGQuality, mbRemoveCropArea, mnImageResolution, mbEmbedLinkedGraphics );
583
		GraphicSettings aGraphicSettings( mbJPEGCompression, mnJPEGQuality, mbRemoveCropArea, mnImageResolution, mbEmbedLinkedGraphics );
583
		GraphicCollector::CollectGraphics( mxMSF, mxModel, aGraphicSettings, aGraphicList );
584
		GraphicCollector::CollectGraphics( mxContext, mxModel, aGraphicSettings, aGraphicList );
584
		CompressGraphics( *this, mxMSF, aGraphicSettings, aGraphicList );
585
		CompressGraphics( *this, mxContext, aGraphicSettings, aGraphicList );
585
	}
586
	}
586
	SetStatusValue( TK_Progress, Any( static_cast< sal_Int32 >( 100 ) ) );
587
	SetStatusValue( TK_Progress, Any( static_cast< sal_Int32 >( 100 ) ) );
587
	DispatchStatus();
588
	DispatchStatus();
Lines 612-621 static void DispatchURL( Reference< XComponentContext > xMSF, OUString sURL, Ref Link Here
612
613
613
sal_Bool ImpOptimizer::Optimize( const Sequence< PropertyValue >& rArguments )
614
sal_Bool ImpOptimizer::Optimize( const Sequence< PropertyValue >& rArguments )
614
{
615
{
616
    OSL_TRACE("ImpOptimizer::Optimize");
615
	sal_Bool bRet = sal_True;
617
	sal_Bool bRet = sal_True;
616
618
617
	if ( mxModel.is() )
619
	if ( mxModel.is() )
618
	{
620
	{
621
        Reference< XWindowPeer > xParentWindow;
619
		sal_Int64 nEstimatedFileSize = 0;
622
		sal_Int64 nEstimatedFileSize = 0;
620
		SetStatusValue( TK_Progress, Any( static_cast< sal_Int32 >( 0 ) ) );
623
		SetStatusValue( TK_Progress, Any( static_cast< sal_Int32 >( 0 ) ) );
621
		DispatchStatus();
624
		DispatchStatus();
Lines 625-632 sal_Bool ImpOptimizer::Optimize( const Sequence< PropertyValue >& rArguments ) Link Here
625
		{
628
		{
626
			switch( TKGet( rArguments[ i ].Name ) )
629
			switch( TKGet( rArguments[ i ].Name ) )
627
			{
630
			{
628
				case TK_StatusDispatcher : rArguments[ i ].Value >>= mxStatusDispatcher; break;
631
				case TK_StatusListener : rArguments[ i ].Value >>= mxStatusListener; break;
629
				case TK_InformationDialog: rArguments[ i ].Value >>= mxInformationDialog; break;
632
				case TK_ParentWindow: rArguments[ i ].Value >>= xParentWindow; break;
630
				case TK_Settings :
633
				case TK_Settings :
631
				{
634
				{
632
					com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > aSettings;
635
					com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > aSettings;
Lines 668-674 sal_Bool ImpOptimizer::Optimize( const Sequence< PropertyValue >& rArguments ) Link Here
668
		{
671
		{
669
	
672
	
670
			SetStatusValue( TK_Progress, Any( static_cast< sal_Int32 >( 10 ) ) );
673
			SetStatusValue( TK_Progress, Any( static_cast< sal_Int32 >( 10 ) ) );
671
			SetStatusValue( TK_Status, Any( TKGet( STR_DUPLICATING_PRESENTATION ) ) );
674
			SetStatusValue( TK_Status, Any( ConfigurationAccess::getString( STR_DUPLICATING_PRESENTATION ) ) );
672
			DispatchStatus();
675
			DispatchStatus();
673
676
674
			Reference< XStorable >xStorable( mxModel, UNO_QUERY );
677
			Reference< XStorable >xStorable( mxModel, UNO_QUERY );
Lines 690-700 sal_Bool ImpOptimizer::Optimize( const Sequence< PropertyValue >& rArguments ) Link Here
690
					nSourceSize = PPPOptimizer::GetFileSize( maSaveAsURL );
693
					nSourceSize = PPPOptimizer::GetFileSize( maSaveAsURL );
691
694
692
				SetStatusValue( TK_Progress, Any( static_cast< sal_Int32 >( 30 ) ) );
695
				SetStatusValue( TK_Progress, Any( static_cast< sal_Int32 >( 30 ) ) );
693
				SetStatusValue( TK_Status, Any( TKGet( STR_DUPLICATING_PRESENTATION ) ) );
696
				SetStatusValue( TK_Status, Any( ConfigurationAccess::getString( STR_DUPLICATING_PRESENTATION ) ) );
694
				DispatchStatus();
697
				DispatchStatus();
695
698
696
				Reference< XDesktop > xDesktop( mxMSF->getServiceManager()->createInstanceWithContext(
699
				Reference< XDesktop > xDesktop( mxContext->getServiceManager()->createInstanceWithContext(
697
						OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" ) ), mxMSF ), UNO_QUERY );
700
						OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" ) ), mxContext ), UNO_QUERY );
698
				Reference< XFrame > xFrame( xDesktop, UNO_QUERY );
701
				Reference< XFrame > xFrame( xDesktop, UNO_QUERY );
699
				xSelf = xFrame->findFrame( TKGet( TK__blank ), FrameSearchFlag::CREATE );
702
				xSelf = xFrame->findFrame( TKGet( TK__blank ), FrameSearchFlag::CREATE );
700
				Reference< XComponentLoader > xComponentLoader( xSelf, UNO_QUERY );
703
				Reference< XComponentLoader > xComponentLoader( xSelf, UNO_QUERY );
Lines 712-726 sal_Bool ImpOptimizer::Optimize( const Sequence< PropertyValue >& rArguments ) Link Here
712
		if ( xStorable.is() && !xStorable->isReadonly() )
715
		if ( xStorable.is() && !xStorable->isReadonly() )
713
		{
716
		{
714
			mxModel->lockControllers();
717
			mxModel->lockControllers();
715
			bRet = Optimize();
718
			bRet = ImplOptimize();
716
			mxModel->unlockControllers();
719
			mxModel->unlockControllers();
717
	
720
	
718
			// clearing undo stack:
721
			// clearing undo stack:
719
			Reference< XFrame > xFrame( xSelf.is() ? xSelf : mxInformationDialog );
722
			Reference< XFrame > xFrame( mxFrame );
720
			if ( xFrame.is() )
723
			if ( xFrame.is() )
721
			{
724
			{
722
				const OUString sSlot( RTL_CONSTASCII_USTRINGPARAM( "slot:27115" ) );
725
				const OUString sSlot( RTL_CONSTASCII_USTRINGPARAM( "slot:27115" ) );
723
				DispatchURL( mxMSF, sSlot, xFrame );
726
				DispatchURL( mxContext, sSlot, xFrame );
724
			}
727
			}
725
		}
728
		}
726
729
Lines 733-741 sal_Bool ImpOptimizer::Optimize( const Sequence< PropertyValue >& rArguments ) Link Here
733
			}
736
			}
734
		}
737
		}
735
738
736
		if ( mxInformationDialog.is() )
739
		if ( xParentWindow.is() )
737
		{
740
		{
738
			InformationDialog aInformationDialog( mxMSF, mxInformationDialog, maSaveAsURL, mbOpenNewDocument, nSourceSize, nDestSize, nEstimatedFileSize );
741
			InformationDialog aInformationDialog(
742
                mxContext, xParentWindow,  maSaveAsURL, mbOpenNewDocument,
743
                nSourceSize, nDestSize, nEstimatedFileSize );
739
			aInformationDialog.execute();
744
			aInformationDialog.execute();
740
			SetStatusValue( TK_OpenNewDocument, Any( mbOpenNewDocument ) );
745
			SetStatusValue( TK_OpenNewDocument, Any( mbOpenNewDocument ) );
741
			DispatchStatus();
746
			DispatchStatus();
(-)a/main/sdext/source/minimizer/impoptimizer.hxx (-4 / +5 lines)
Lines 35-40 Link Here
35
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
35
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
36
#endif
36
#endif
37
#include <com/sun/star/uno/XComponentContext.hpp>
37
#include <com/sun/star/uno/XComponentContext.hpp>
38
#include <com/sun/star/awt/XWindowPeer.hpp>
38
39
39
class Point;
40
class Point;
40
class Size;
41
class Size;
Lines 47-55 class ImpOptimizer : public OptimizationStats Link Here
47
{
48
{
48
private:
49
private:
49
50
50
	com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >	mxMSF;
51
	com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >	mxContext;
51
	com::sun::star::uno::Reference< com::sun::star::frame::XModel >				mxModel;
52
	com::sun::star::uno::Reference< com::sun::star::frame::XModel >				mxModel;
52
	com::sun::star::uno::Reference< com::sun::star::frame::XDispatch >			mxStatusDispatcher;
53
	com::sun::star::uno::Reference< com::sun::star::frame::XStatusListener >	mxStatusListener;
53
54
54
	sal_Bool		mbJPEGCompression;
55
	sal_Bool		mbJPEGCompression;
55
	sal_Int32		mnJPEGQuality;
56
	sal_Int32		mnJPEGQuality;
Lines 66-74 private: Link Here
66
	rtl::OUString	maFilterName;
67
	rtl::OUString	maFilterName;
67
	sal_Bool		mbOpenNewDocument;
68
	sal_Bool		mbOpenNewDocument;
68
69
69
	com::sun::star::uno::Reference< com::sun::star::frame::XFrame > mxInformationDialog;
70
	com::sun::star::uno::Reference< com::sun::star::frame::XFrame > mxFrame;
70
	
71
	
71
	sal_Bool Optimize();
72
	sal_Bool ImplOptimize();
72
73
73
public:
74
public:
74
75
(-)a/main/sdext/source/minimizer/informationdialog.cxx (-75 / +150 lines)
Lines 1-5 Link Here
1
/**************************************************************
1
/**************************************************************
2
 * 
2
 *
3
 * Licensed to the Apache Software Foundation (ASF) under one
3
 * Licensed to the Apache Software Foundation (ASF) under one
4
 * or more contributor license agreements.  See the NOTICE file
4
 * or more contributor license agreements.  See the NOTICE file
5
 * distributed with this work for additional information
5
 * distributed with this work for additional information
Lines 7-37 Link Here
7
 * to you under the Apache License, Version 2.0 (the
7
 * to you under the Apache License, Version 2.0 (the
8
 * "License"); you may not use this file except in compliance
8
 * "License"); you may not use this file except in compliance
9
 * with the License.  You may obtain a copy of the License at
9
 * with the License.  You may obtain a copy of the License at
10
 * 
10
 *
11
 *   http://www.apache.org/licenses/LICENSE-2.0
11
 *   http://www.apache.org/licenses/LICENSE-2.0
12
 * 
12
 *
13
 * Unless required by applicable law or agreed to in writing,
13
 * Unless required by applicable law or agreed to in writing,
14
 * software distributed under the License is distributed on an
14
 * software distributed under the License is distributed on an
15
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
 * KIND, either express or implied.  See the License for the
16
 * KIND, either express or implied.  See the License for the
17
 * specific language governing permissions and limitations
17
 * specific language governing permissions and limitations
18
 * under the License.
18
 * under the License.
19
 * 
19
 *
20
 *************************************************************/
20
 *************************************************************/
21
21
22
 
22
23
23
24
// MARKER(update_precomp.py): autogen include statement, do not remove
24
// MARKER(update_precomp.py): autogen include statement, do not remove
25
#include "precompiled_sdext.hxx"
25
#include "precompiled_sdext.hxx"
26
26
27
#include "informationdialog.hxx"
27
#include "informationdialog.hxx"
28
#include "optimizationstats.hxx"
28
#include "optimizationstats.hxx"
29
#include "minimizer.hrc"
30
#include "helpid.hrc"
31
29
#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
32
#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
33
#include <com/sun/star/awt/XUnitConversion.hpp>
30
#include <com/sun/star/graphic/XGraphicProvider.hpp>
34
#include <com/sun/star/graphic/XGraphicProvider.hpp>
31
#include <com/sun/star/graphic/XGraphic.hpp>
35
#include <com/sun/star/graphic/XGraphic.hpp>
36
#include <com/sun/star/graphic/GraphicType.hpp>
32
#include <rtl/ustrbuf.hxx>
37
#include <rtl/ustrbuf.hxx>
33
#include "com/sun/star/util/URL.hpp"
38
#include "com/sun/star/util/URL.hpp"
34
#include "com/sun/star/util/XURLTransformer.hpp"
39
#include "com/sun/star/util/XURLTransformer.hpp"
40
#include <com/sun/star/util/MeasureUnit.hpp>
41
#include <com/sun/star/awt/PosSize.hpp>
35
42
36
#define DIALOG_WIDTH	240
43
#define DIALOG_WIDTH	240
37
#define DIALOG_HEIGHT	80
44
#define DIALOG_HEIGHT	80
Lines 43-49 Link Here
43
// - INFORMATIONDIALOG -
50
// - INFORMATIONDIALOG -
44
// ---------------------
51
// ---------------------
45
52
46
using namespace ::rtl;
47
using namespace ::com::sun::star;
53
using namespace ::com::sun::star;
48
using namespace ::com::sun::star::io;
54
using namespace ::com::sun::star::io;
49
using namespace ::com::sun::star::ui;
55
using namespace ::com::sun::star::ui;
Lines 56-67 using namespace ::com::sun::star::beans; Link Here
56
using namespace ::com::sun::star::script;
62
using namespace ::com::sun::star::script;
57
using namespace ::com::sun::star::container;
63
using namespace ::com::sun::star::container;
58
64
59
65
using ::rtl::OUString;
60
66
61
// -----------------------------------------------------------------------------
67
// -----------------------------------------------------------------------------
62
68
63
rtl::OUString InsertFixedText( InformationDialog& rInformationDialog, const rtl::OUString& rControlName, const OUString& rLabel,
69
Reference< XFixedText > InformationDialog::InsertFixedText(
64
								sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth, sal_Int32 nHeight, sal_Bool bMultiLine, sal_Int16 nTabIndex )
70
    const rtl::OUString& rControlName,
71
    const OUString& rLabel,
72
    sal_Int32 nXPos,
73
    sal_Int32 nYPos,
74
    sal_Int32 nWidth,
75
    sal_Int32 nHeight,
76
    sal_Bool bMultiLine,
77
    sal_Int16 nTabIndex )
65
{
78
{
66
	OUString pNames[] = {
79
	OUString pNames[] = {
67
		TKGet( TK_Height ),
80
		TKGet( TK_Height ),
Lines 88-99 rtl::OUString InsertFixedText( InformationDialog& rInformationDialog, const rtl: Link Here
88
	Sequence< rtl::OUString >	aNames( pNames, nCount );
101
	Sequence< rtl::OUString >	aNames( pNames, nCount );
89
	Sequence< Any >				aValues( pValues, nCount );
102
	Sequence< Any >				aValues( pValues, nCount );
90
103
91
	rInformationDialog.insertFixedText( rControlName, aNames, aValues );
104
    return insertFixedText( rControlName, aNames, aValues );
92
	return rControlName;
93
}
105
}
94
106
95
rtl::OUString InsertImage(
107
Reference< XControl > InformationDialog::InsertImage(
96
    InformationDialog& rInformationDialog,
97
    const OUString& rControlName,
108
    const OUString& rControlName,
98
    const OUString& rURL,
109
    const OUString& rURL,
99
    sal_Int32 nPosX,
110
    sal_Int32 nPosX,
Lines 124-140 rtl::OUString InsertImage( Link Here
124
	Sequence< rtl::OUString >	aNames( pNames, nCount );
135
	Sequence< rtl::OUString >	aNames( pNames, nCount );
125
	Sequence< Any >				aValues( pValues, nCount );
136
	Sequence< Any >				aValues( pValues, nCount );
126
137
127
	rInformationDialog.insertImage( rControlName, aNames, aValues );
138
	return insertImage( rControlName, aNames, aValues );
128
	return rControlName;
129
}
139
}
130
140
131
rtl::OUString InsertCheckBox( InformationDialog& rInformationDialog, const OUString& rControlName,
141
Reference< XCheckBox > InformationDialog::InsertCheckBox(
132
	const Reference< XItemListener > xItemListener, const OUString& rLabel,
142
    const OUString& rControlName,
133
		sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int16 nTabIndex )
143
    const OUString& rLabel,
144
    const OUString& rHelpURL,
145
    sal_Int32 nXPos,
146
    sal_Int32 nYPos,
147
    sal_Int32 nWidth,
148
    sal_Int32 nHeight,
149
    sal_Int16 nTabIndex )
134
{
150
{
135
	OUString pNames[] = {
151
	OUString pNames[] = {
136
		TKGet( TK_Enabled ),
152
		TKGet( TK_Enabled ),
137
		TKGet( TK_Height ),
153
		TKGet( TK_Height ),
154
        TKGet( TK_HelpURL ),
138
		TKGet( TK_Label ),
155
		TKGet( TK_Label ),
139
		TKGet( TK_PositionX ),
156
		TKGet( TK_PositionX ),
140
		TKGet( TK_PositionY ),
157
		TKGet( TK_PositionY ),
Lines 145-150 rtl::OUString InsertCheckBox( InformationDialog& rInformationDialog, const OUStr Link Here
145
	Any	pValues[] = {
162
	Any	pValues[] = {
146
		Any( sal_True ),
163
		Any( sal_True ),
147
		Any( nHeight ),
164
		Any( nHeight ),
165
        Any( rHelpURL ),
148
		Any( rLabel ),
166
		Any( rLabel ),
149
		Any( nXPos ),
167
		Any( nXPos ),
150
		Any( nYPos ),
168
		Any( nYPos ),
Lines 157-170 rtl::OUString InsertCheckBox( InformationDialog& rInformationDialog, const OUStr Link Here
157
	Sequence< rtl::OUString >	aNames( pNames, nCount );
175
	Sequence< rtl::OUString >	aNames( pNames, nCount );
158
	Sequence< Any >				aValues( pValues, nCount );
176
	Sequence< Any >				aValues( pValues, nCount );
159
177
160
	Reference< XCheckBox > xCheckBox( rInformationDialog.insertCheckBox( rControlName, aNames, aValues ) );
178
	return insertCheckBox( rControlName, aNames, aValues );
161
	if ( xItemListener.is() )
162
		xCheckBox->addItemListener( xItemListener );
163
	return rControlName;
164
}
179
}
165
180
166
rtl::OUString InsertButton( InformationDialog& rInformationDialog, const OUString& rControlName, Reference< XActionListener >& xActionListener,
181
Reference< XButton > InformationDialog::InsertButton(
167
	sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int16 nTabIndex, PPPOptimizerTokenEnum nResID )
182
    const OUString& rControlName,
183
    sal_Int32 nXPos,
184
    sal_Int32 nYPos,
185
    sal_Int32 nWidth,
186
    sal_Int32 nHeight,
187
    sal_Int16 nTabIndex,
188
    sal_Int32 nResID )
168
{
189
{
169
	OUString pNames[] = {
190
	OUString pNames[] = {
170
		TKGet( TK_Enabled ),
191
		TKGet( TK_Enabled ),
Lines 180-186 rtl::OUString InsertButton( InformationDialog& rInformationDialog, const OUStrin Link Here
180
	Any	pValues[] = {
201
	Any	pValues[] = {
181
		Any( sal_True ),
202
		Any( sal_True ),
182
		Any( nHeight ),
203
		Any( nHeight ),
183
		Any( rInformationDialog.getString( nResID ) ),
204
		Any( getString( nResID ) ),
184
		Any( nXPos ),
205
		Any( nXPos ),
185
		Any( nYPos ),
206
		Any( nYPos ),
186
		Any( static_cast< sal_Int16 >( PushButtonType_OK ) ),
207
		Any( static_cast< sal_Int16 >( PushButtonType_OK ) ),
Lines 194-201 rtl::OUString InsertButton( InformationDialog& rInformationDialog, const OUStrin Link Here
194
	Sequence< rtl::OUString >	aNames( pNames, nCount );
215
	Sequence< rtl::OUString >	aNames( pNames, nCount );
195
	Sequence< Any >				aValues( pValues, nCount );
216
	Sequence< Any >				aValues( pValues, nCount );
196
217
197
	rInformationDialog.insertButton( rControlName, xActionListener, aNames, aValues );
218
	return insertButton( rControlName, Reference< XActionListener >(), aNames, aValues );
198
	return rControlName;
199
}
219
}
200
220
201
221
Lines 221-226 void InformationDialog::InitDialog() Link Here
221
	OUString pNames[] = {
241
	OUString pNames[] = {
222
		TKGet( TK_Closeable ),
242
		TKGet( TK_Closeable ),
223
		TKGet( TK_Height ),
243
		TKGet( TK_Height ),
244
        TKGet( TK_HelpURL ),
224
		TKGet( TK_Moveable ),
245
		TKGet( TK_Moveable ),
225
		TKGet( TK_PositionX ),
246
		TKGet( TK_PositionX ),
226
		TKGet( TK_PositionY ),
247
		TKGet( TK_PositionY ),
Lines 230-239 void InformationDialog::InitDialog() Link Here
230
	Any	pValues[] = {
251
	Any	pValues[] = {
231
		Any( sal_True ),
252
		Any( sal_True ),
232
		Any( nDialogHeight ),
253
		Any( nDialogHeight ),
254
		Any( HID( HID_SDEXT_MINIMIZER_INFOBOX_DLG ) ),
233
		Any( sal_True ),
255
		Any( sal_True ),
234
		Any( sal_Int32( 245 ) ),
256
		Any( sal_Int32( 245 ) ),
235
		Any( sal_Int32( 115 ) ),
257
		Any( sal_Int32( 115 ) ),
236
		Any( getString( STR_SUN_OPTIMIZATION_WIZARD2 ) ),
258
		Any( getString( STR_INFO_DIALOG ) ),
237
		Any( sal_Int32( DIALOG_WIDTH ) ) };
259
		Any( sal_Int32( DIALOG_WIDTH ) ) };
238
	
260
	
239
	sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString );
261
	sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString );
Lines 246-275 void InformationDialog::InitDialog() Link Here
246
	sal_Int64 nSource = mnSourceSize;
268
	sal_Int64 nSource = mnSourceSize;
247
	sal_Int64 nDest   = mnDestSize;
269
	sal_Int64 nDest   = mnDestSize;
248
270
249
	PPPOptimizerTokenEnum eInfoString( STR_INFO_1 );
271
	sal_Int32 nInfoStrResId( STR_INFO_1 );
250
	if ( mnSourceSize )
272
	if ( mnSourceSize )
251
	{
273
	{
252
		if ( mnDestSize )
274
		if ( mnDestSize )
253
			eInfoString = STR_INFO_1;
275
			nInfoStrResId = STR_INFO_1;
254
		else
276
		else
255
		{
277
		{
256
			eInfoString = STR_INFO_2;
278
			nInfoStrResId = STR_INFO_2;
257
			nDest = mnApproxSize;
279
			nDest = mnApproxSize;
258
		}
280
		}
259
	}
281
	}
260
	else if ( mnDestSize )
282
	else if ( mnDestSize )
261
		eInfoString = STR_INFO_3;
283
		nInfoStrResId = STR_INFO_3;
262
	else
284
	else
263
	{
285
	{
264
		eInfoString = STR_INFO_4;
286
		nInfoStrResId = STR_INFO_4;
265
		nDest = mnApproxSize;
287
		nDest = mnApproxSize;
266
	}
288
	}
267
289
268
	rtl::OUString aTitle;
290
	rtl::OUString aTitle;
269
	if ( maSaveAsURL.getLength() )
291
	if ( maSaveAsURL.getLength() )
270
	{
292
	{
271
		Reference< XURLTransformer > xURLTransformer( mxMSF->getServiceManager()->createInstanceWithContext(
293
		Reference< XURLTransformer > xURLTransformer( mxContext->getServiceManager()->createInstanceWithContext(
272
				OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ) ), mxMSF ), UNO_QUERY );
294
				OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ) ), mxContext ), UNO_QUERY );
273
		if ( xURLTransformer.is() )
295
		if ( xURLTransformer.is() )
274
		{
296
		{
275
			util::URL aURL, aPresentationURL;
297
			util::URL aURL, aPresentationURL;
Lines 285-291 void InformationDialog::InitDialog() Link Here
285
		}
307
		}
286
	}
308
	}
287
309
288
	OUString aInfoString( getString( eInfoString ) );
310
	OUString aInfoString( getString( nInfoStrResId ) );
289
	const OUString aOldSizePlaceholder( RTL_CONSTASCII_USTRINGPARAM( "%OLDFILESIZE" ) );
311
	const OUString aOldSizePlaceholder( RTL_CONSTASCII_USTRINGPARAM( "%OLDFILESIZE" ) );
290
	const OUString aNewSizePlaceholder( RTL_CONSTASCII_USTRINGPARAM( "%NEWFILESIZE" ) );
312
	const OUString aNewSizePlaceholder( RTL_CONSTASCII_USTRINGPARAM( "%NEWFILESIZE" ) );
291
	const OUString aTitlePlaceholder( aTitle.getLength() ? OUString::createFromAscii( "%TITLE" ) : OUString::createFromAscii( "'%TITLE'" ) );
313
	const OUString aTitlePlaceholder( aTitle.getLength() ? OUString::createFromAscii( "%TITLE" ) : OUString::createFromAscii( "'%TITLE'" ) );
Lines 302-339 void InformationDialog::InitDialog() Link Here
302
	if ( k >= 0 )
324
	if ( k >= 0 )
303
		aInfoString = aInfoString.replaceAt( k, aTitlePlaceholder.getLength(), aTitle );
325
		aInfoString = aInfoString.replaceAt( k, aTitlePlaceholder.getLength(), aTitle );
304
326
305
    com::sun::star::uno::Reference< com::sun::star::awt::XItemListener > xItemListener;
327
306
    InsertImage( *this,
328
    Reference< XControl > xImageCtrl = InsertImage( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "aboutimage" ) ),
307
                 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "aboutimage" ) ),
308
                 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:standardimage/query" ) ),
329
                 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:standardimage/query" ) ),
309
                 5, 5, 25, 25, sal_False );
330
                 3, 3, 25, 25, sal_False );
310
	InsertFixedText( *this, rtl::OUString( rtl::OUString::createFromAscii( "fixedtext" ) ), aInfoString, PAGE_POS_X, 6, PAGE_WIDTH, 24, sal_True, 0 );
331
	Reference< XControl > xFixedText( InsertFixedText( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "fixedtext" ) ), aInfoString, PAGE_POS_X, 6, PAGE_WIDTH, 24, sal_True, 0 ), UNO_QUERY);
332
311
	if ( maSaveAsURL.getLength() )
333
	if ( maSaveAsURL.getLength() )
312
		InsertCheckBox(  *this, TKGet( TK_OpenNewDocument ), xItemListener, getString( STR_AUTOMATICALLY_OPEN ), PAGE_POS_X, 42, PAGE_WIDTH, 8, 1 );
334
        mxCheckBox = InsertCheckBox( TKGet( TK_OpenNewDocument ),
313
	InsertButton( *this, rtl::OUString( rtl::OUString::createFromAscii( "button" ) ), mxActionListener, DIALOG_WIDTH / 2 - 25, nDialogHeight - 20, 50, 14, 2, STR_OK );
335
                                     getString( STR_AUTOMATICALLY_OPEN ),
336
                                     HID( HID_SDEXT_MINIMIZER_INFOBOX_CB_OPENNEW ),
337
                                     PAGE_POS_X, 42,
338
                                     PAGE_WIDTH, 8, 1 );
339
    Reference< XControl> xButtonCtrl( InsertButton( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "button" ) ), DIALOG_WIDTH / 2 - 15, nDialogHeight - 20, 30, 14, 2, STR_OK ), UNO_QUERY );
314
340
315
	sal_Bool bOpenNewDocument = mrbOpenNewDocument;
341
	sal_Bool bOpenNewDocument = mrbOpenNewDocument;
316
	setControlProperty( TKGet( TK_OpenNewDocument ), TKGet( TK_State ), Any( (sal_Int16)bOpenNewDocument ) );
342
	setControlProperty( TKGet( TK_OpenNewDocument ), TKGet( TK_State ), Any( (sal_Int16)bOpenNewDocument ) );
343
344
    sal_Int32 nX, nY, nDlgWidth;
345
    Size aSize3( 3, 3 );
346
    Reference< XUnitConversion > xUnitConverter( mxDialogWindow, UNO_QUERY_THROW );
347
    aSize3 = xUnitConverter->convertSizeToPixel( aSize3, util::MeasureUnit::APPFONT );
348
    nX = nY = aSize3.Width;
349
350
    Reference< XPropertySet > xImageProps (xImageCtrl->getModel(), UNO_QUERY_THROW );
351
    Reference< graphic::XGraphic > xGraphic(
352
        xImageProps->getPropertyValue(
353
            OUString( RTL_CONSTASCII_USTRINGPARAM( "Graphic") ) ), UNO_QUERY_THROW );
354
    if ( xGraphic.is() && xGraphic->getType() != graphic::GraphicType::EMPTY )
355
    {
356
        Size aSizePixel;
357
        Rectangle aPosSizePixel;
358
        Reference< XPropertySet > xGraphicProps( xGraphic, UNO_QUERY_THROW );
359
        xGraphicProps->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("SizePixel"))) >>= aSizePixel;
360
        Reference< XWindow > xImage (xImageCtrl->getPeer(), UNO_QUERY_THROW );
361
362
        xImage->setPosSize( nX, nY,
363
                            aSizePixel.Width,
364
                            aSizePixel.Height,
365
                            awt::PosSize::POSSIZE );
366
367
        nX += aSizePixel.Width + aSize3.Width;
368
369
        Reference< XWindow > xLabel ( xFixedText->getPeer(), UNO_QUERY_THROW );
370
        aPosSizePixel = xLabel->getPosSize();
371
        xLabel->setPosSize( nX, nY,
372
                            aPosSizePixel.Width,
373
                            aPosSizePixel.Height,
374
                            awt::PosSize::POSSIZE );
375
376
        nDlgWidth = nX + aPosSizePixel.Width + aSize3.Width;
377
        nY += aPosSizePixel.Height + aSize3.Height;
378
379
        if ( mxCheckBox.is() )
380
        {
381
            Reference< XControl > xCheckBoxCtrl( mxCheckBox, UNO_QUERY_THROW );
382
            Reference< XWindow > xCheckBox( xCheckBoxCtrl->getPeer(), UNO_QUERY_THROW );
383
            Rectangle aCBSize = xCheckBox->getPosSize();
384
            xCheckBox->setPosSize( nX, nY,
385
                                   aPosSizePixel.Width,
386
                                   aCBSize.Height ,
387
                                   awt::PosSize::POSSIZE);
388
            nY += aCBSize.Height + aSize3.Height;
389
        }
390
391
        nY += aSize3.Height;
392
        Reference< XWindow > xButton ( xButtonCtrl->getPeer(), UNO_QUERY_THROW );
393
        aPosSizePixel = xButton->getPosSize();
394
        xButton->setPosSize( nDlgWidth / 2 - aPosSizePixel.Width / 2,
395
                             nY ,
396
                             aPosSizePixel.Width,
397
                             aPosSizePixel.Height,
398
                             awt::PosSize::POSSIZE );
399
        nY += aPosSizePixel.Height + aSize3.Height;
400
        mxDialogWindow->setPosSize( 0, 0, nDlgWidth, nY, awt::PosSize::SIZE );
401
    }
402
403
    centerDialog();
317
}
404
}
318
405
319
// -----------------------------------------------------------------------------
406
// -----------------------------------------------------------------------------
320
407
321
InformationDialog::InformationDialog( const Reference< XComponentContext > &rxMSF, Reference< XFrame >& rxFrame, const rtl::OUString& rSaveAsURL, sal_Bool& rbOpenNewDocument, const sal_Int64& rSourceSize, const sal_Int64& rDestSize, const sal_Int64& rApproxSize ) :
408
InformationDialog::InformationDialog(
322
	UnoDialog( rxMSF, rxFrame ),
409
    const Reference< XComponentContext > &rxContext,
323
	ConfigurationAccess( rxMSF, NULL ),
410
    const Reference< XWindowPeer>& rxParent,
324
	mxMSF( rxMSF ),
411
    const rtl::OUString& rSaveAsURL,
325
	mxFrame( rxFrame ),
412
    sal_Bool& rbOpenNewDocument,
326
	mxActionListener( new OKActionListener( *this ) ),
413
    const sal_Int64& rSourceSize,
414
    const sal_Int64& rDestSize,
415
    const sal_Int64& rApproxSize )
416
:   UnoDialog( rxContext, rxParent ),
417
	ConfigurationAccess( rxContext, NULL ),
418
	mxContext( rxContext ),
327
	mnSourceSize( rSourceSize ),
419
	mnSourceSize( rSourceSize ),
328
	mnDestSize( rDestSize ),
420
	mnDestSize( rDestSize ),
329
	mnApproxSize( rApproxSize ),
421
	mnApproxSize( rApproxSize ),
330
	mrbOpenNewDocument( rbOpenNewDocument ),
422
	mrbOpenNewDocument( rbOpenNewDocument ),
331
	maSaveAsURL( rSaveAsURL )
423
	maSaveAsURL( rSaveAsURL )
332
{
424
{
333
	Reference< XFrame > xFrame( mxController->getFrame() );
425
    OSL_TRACE( "InformationDialog::InformationDialog" );
334
	Reference< XWindow > xContainerWindow( xFrame->getContainerWindow() );
426
	createWindowPeer();
335
	Reference< XWindowPeer > xWindowPeer( xContainerWindow, UNO_QUERY_THROW );
336
	createWindowPeer( xWindowPeer );		
337
427
338
	InitDialog();
428
	InitDialog();
339
}
429
}
Lines 342-379 InformationDialog::InformationDialog( const Reference< XComponentContext > &rxMS Link Here
342
432
343
InformationDialog::~InformationDialog()
433
InformationDialog::~InformationDialog()
344
{
434
{
435
    OSL_TRACE( "InformationDialog::~InformationDialog" );
345
}
436
}
346
437
347
// -----------------------------------------------------------------------------
438
// -----------------------------------------------------------------------------
348
439
349
sal_Bool InformationDialog::execute()
440
sal_Bool InformationDialog::execute()
350
{
441
{
442
    OSL_TRACE( "InformationDialog::execute" );
351
	UnoDialog::execute();
443
	UnoDialog::execute();
352
444
353
	if ( maSaveAsURL.getLength() )
445
	if ( maSaveAsURL.getLength() && mxCheckBox.is() )
354
	{
446
	{
355
		sal_Int16 nInt16 = 0;
447
        sal_Bool bOpenNewDocument = static_cast< sal_Bool >( mxCheckBox->getState() );
356
		Any aAny( getControlProperty( TKGet( TK_OpenNewDocument ), TKGet( TK_State ) ) );
448
        mrbOpenNewDocument = bOpenNewDocument;
357
		if ( aAny >>= nInt16 )
358
		{
359
			sal_Bool bOpenNewDocument = static_cast< sal_Bool >( nInt16 );
360
			mrbOpenNewDocument = bOpenNewDocument;
361
		}
362
	}
449
	}
450
	
451
	endExecute( sal_True );
363
	return mbStatus;
452
	return mbStatus;
364
}
453
}
365
454
366
// -----------------------------------------------------------------------------
367
368
void OKActionListener::actionPerformed( const ActionEvent& rEvent )
369
	throw ( com::sun::star::uno::RuntimeException )
370
{
371
	if ( rEvent.ActionCommand == rtl::OUString( rtl::OUString::createFromAscii( "button" ) ) )
372
	{
373
		mrInformationDialog.endExecute( sal_True );
374
	}
375
}
376
void OKActionListener::disposing( const ::com::sun::star::lang::EventObject& /* Source */ )
377
	throw ( com::sun::star::uno::RuntimeException )
378
{
379
}
(-)a/main/sdext/source/minimizer/informationdialog.hxx (-32 / +51 lines)
Lines 46-94 Link Here
46
// ---------------------
46
// ---------------------
47
// - InformationDialog -
47
// - InformationDialog -
48
// ---------------------
48
// ---------------------
49
class InformationDialog : public UnoDialog, public ConfigurationAccess
49
50
class InformationDialog : public UnoDialog
51
                        , public ConfigurationAccess
50
{
52
{
51
public :
53
public :
52
54
53
	InformationDialog( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxMSF,
55
	InformationDialog( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext,
54
			com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rxFrame, const rtl::OUString& rSaveAsURL,
56
                       const com::sun::star::uno::Reference< com::sun::star::awt::XWindowPeer >& rxParent,
55
				sal_Bool& bOpenNewDocument, const sal_Int64& nSourceSize, const sal_Int64& nDestSize, const sal_Int64& nApproxDest );
57
                       const rtl::OUString& rSaveAsURL,
58
                       sal_Bool& bOpenNewDocument,
59
                       const sal_Int64& nSourceSize,
60
                       const sal_Int64& nDestSize,
61
                       const sal_Int64& nApproxDest );
56
    ~InformationDialog();
62
    ~InformationDialog();
57
63
58
	sal_Bool				execute();
64
	sal_Bool				execute();
59
60
private :
65
private :
61
66
62
	com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >mxMSF;
67
	com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > mxContext;
63
	com::sun::star::uno::Reference< com::sun::star::frame::XFrame >			mxFrame;
68
    sal_Int64 mnSourceSize;
64
	com::sun::star::uno::Reference< com::sun::star::io::XStream >			mxTempFile;
69
    sal_Int64 mnDestSize;
65
70
    sal_Int64 mnApproxSize;
66
	com::sun::star::uno::Reference< com::sun::star::awt::XActionListener >	mxActionListener;
71
    sal_Bool& mrbOpenNewDocument;
72
    const rtl::OUString& maSaveAsURL;
73
    com::sun::star::uno::Reference< com::sun::star::awt::XCheckBox > mxCheckBox;
67
74
68
	void InitDialog();
75
	void InitDialog();
76
    com::sun::star::uno::Reference< com::sun::star::awt::XFixedText > InsertFixedText(
77
        const rtl::OUString& rControlName,
78
        const rtl::OUString& rLabel,
79
        sal_Int32 nXPos,
80
        sal_Int32 nYPos,
81
        sal_Int32 nWidth,
82
        sal_Int32 nHeight,
83
        sal_Bool bMultiLine,
84
        sal_Int16 nTabIndex );
85
    com::sun::star::uno::Reference< com::sun::star::awt::XControl > InsertImage(
86
        const rtl::OUString& rControlName,
87
        const rtl::OUString& rURL,
88
        sal_Int32 nPosX,
89
        sal_Int32 nPosY,
90
        sal_Int32 nWidth,
91
        sal_Int32 nHeight,
92
        sal_Bool bScale );
93
    com::sun::star::uno::Reference< com::sun::star::awt::XCheckBox > InsertCheckBox(
94
        const rtl::OUString& rControlName,
95
        const rtl::OUString& rLabel,
96
        const rtl::OUString& rHelpURL,
97
        sal_Int32 nXPos,
98
        sal_Int32 nYPos,
99
        sal_Int32 nWidth,
100
        sal_Int32 nHeight,
101
        sal_Int16 nTabIndex );
102
    com::sun::star::uno::Reference< com::sun::star::awt::XButton > InsertButton(
103
        const rtl::OUString& rControlName,
104
        sal_Int32 nXPos,
105
        sal_Int32 nYPos,
106
        sal_Int32 nWidth,
107
        sal_Int32 nHeight,
108
        sal_Int16 nTabIndex,
109
        sal_Int32 nResID );
69
	
110
	
70
	sal_Int64 mnSourceSize;
71
	sal_Int64 mnDestSize;
72
	sal_Int64 mnApproxSize;
73
	sal_Bool& mrbOpenNewDocument;
74
	const rtl::OUString& maSaveAsURL;
75
76
public :
77
78
	com::sun::star::uno::Reference< com::sun::star::frame::XFrame>& GetFrame() { return mxFrame; };
79
	const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& GetComponentContext() { return mxMSF; };
80
};
81
82
class OKActionListener : public ::cppu::WeakImplHelper1< com::sun::star::awt::XActionListener >
83
{
84
public:
85
	OKActionListener( InformationDialog& rInformationDialog ) : mrInformationDialog( rInformationDialog ){};
86
87
    virtual void SAL_CALL actionPerformed( const ::com::sun::star::awt::ActionEvent& Event ) throw ( com::sun::star::uno::RuntimeException );
88
	virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw ( com::sun::star::uno::RuntimeException);
89
private:
90
	
91
	InformationDialog& mrInformationDialog;
92
};
111
};
93
112
94
#endif
113
#endif
(-)a/main/sdext/source/minimizer/makefile.mk (-105 / +53 lines)
Lines 1-5 Link Here
1
#**************************************************************
1
#**************************************************************
2
#  
2
#
3
#  Licensed to the Apache Software Foundation (ASF) under one
3
#  Licensed to the Apache Software Foundation (ASF) under one
4
#  or more contributor license agreements.  See the NOTICE file
4
#  or more contributor license agreements.  See the NOTICE file
5
#  distributed with this work for additional information
5
#  distributed with this work for additional information
Lines 7-149 Link Here
7
#  to you under the Apache License, Version 2.0 (the
7
#  to you under the Apache License, Version 2.0 (the
8
#  "License"); you may not use this file except in compliance
8
#  "License"); you may not use this file except in compliance
9
#  with the License.  You may obtain a copy of the License at
9
#  with the License.  You may obtain a copy of the License at
10
#  
10
#
11
#    http://www.apache.org/licenses/LICENSE-2.0
11
#    http://www.apache.org/licenses/LICENSE-2.0
12
#  
12
#
13
#  Unless required by applicable law or agreed to in writing,
13
#  Unless required by applicable law or agreed to in writing,
14
#  software distributed under the License is distributed on an
14
#  software distributed under the License is distributed on an
15
#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
#  KIND, either express or implied.  See the License for the
16
#  KIND, either express or implied.  See the License for the
17
#  specific language governing permissions and limitations
17
#  specific language governing permissions and limitations
18
#  under the License.
18
#  under the License.
19
#  
19
#
20
#**************************************************************
20
#**************************************************************
21
21
22
23
24
PRJ=..$/..
22
PRJ=..$/..
25
PRJNAME=sdext
23
PRJNAME=sdext
26
TARGET=SunPresentationMinimizer
24
TARGET=PresentationMinimizer
25
EXTENSIONNAME=$(TARGET)
26
27
GEN_HID=FALSE
27
GEN_HID=FALSE
28
ENABLE_EXCEPTIONS=TRUE
28
ENABLE_EXCEPTIONS=TRUE
29
29
30
# --- Settings ----------------------------------
30
# --- Settings ----------------------------------
31
.INCLUDE : settings.mk
31
.INCLUDE : settings.mk
32
.IF "$(L10N_framework)"==""
33
.INCLUDE :  $(PRJ)$/source$/minimizer$/minimizer.pmk
34
.INCLUDE :  $(PRJ)$/util$/makefile.pmk
35
32
36
# set in minimizer.pmk
33
.IF "$(L10N_framework)"==""
37
#EXTENSIONNAME:=PresentationMinimizer
38
EXTENSION_ZIPNAME:=presentation-minimizer
39
34
40
.IF "$(ENABLE_MINIMIZER)" != "YES"
41
@all:
42
	@echo "Presentation Minimizer build disabled."
43
.ENDIF
44
35
45
DLLPRE=
36
DLLPRE=
46
37
47
# --- Files -------------------------------------
38
# --- Files -------------------------------------
48
39
49
SLOFILES=	$(SLO)$/unodialog.obj				\
40
SLOFILES=\
50
			$(SLO)$/optimizerdialog.obj			\
41
	$(SLO)$/unodialog.obj \
51
			$(SLO)$/optimizerdialogcontrols.obj	\
42
	$(SLO)$/optimizerdialog.obj \
52
			$(SLO)$/configurationaccess.obj		\
43
	$(SLO)$/informationdialog.obj \
53
			$(SLO)$/impoptimizer.obj			\
44
	$(SLO)$/fileopendialog.obj \
54
			$(SLO)$/pppoptimizer.obj			\
45
	$(SLO)$/optimizerdialogcontrols.obj \
55
			$(SLO)$/pppoptimizeruno.obj			\
46
	$(SLO)$/configurationaccess.obj \
56
			$(SLO)$/pppoptimizertoken.obj		\
47
	$(SLO)$/impoptimizer.obj \
57
			$(SLO)$/pppoptimizerdialog.obj		\
48
	$(SLO)$/pppoptimizer.obj \
58
			$(SLO)$/fileopendialog.obj			\
49
	$(SLO)$/pppoptimizeruno.obj \
59
			$(SLO)$/optimizationstats.obj		\
50
	$(SLO)$/pppoptimizertoken.obj \
60
			$(SLO)$/graphiccollector.obj		\
51
	$(SLO)$/pppoptimizerdialog.obj \
61
			$(SLO)$/pagecollector.obj			\
52
	$(SLO)$/optimizationstats.obj \
62
			$(SLO)$/informationdialog.obj
53
	$(SLO)$/graphiccollector.obj \
54
	$(SLO)$/pagecollector.obj \
63
55
64
# --- Library -----------------------------------
56
# --- Library -----------------------------------
65
57
66
SHL1TARGET=		$(TARGET).uno
58
SHL1TARGET= $(TARGET).uno
67
59
68
SHL1STDLIBS=	$(CPPUHELPERLIB)	\
60
SHL1STDLIBS=\
69
				$(CPPULIB)			\
61
	$(CPPUHELPERLIB)\
70
				$(SALLIB)
62
	$(CPPULIB)\
63
	$(SALLIB)
71
SHL1DEPN=
64
SHL1DEPN=
72
SHL1IMPLIB=		i$(SHL1TARGET)
65
SHL1IMPLIB=i$(SHL1TARGET)
73
SHL1LIBS=		$(SLB)$/$(TARGET).lib
66
SHL1LIBS=$(SLB)$/$(TARGET).lib
74
SHL1DEF=		$(MISC)$/$(SHL1TARGET).def
67
SHL1DEF=$(MISC)$/$(SHL1TARGET).def
75
SHL1VERSIONMAP=$(SOLARENV)/src/reg-component.map
68
SHL1VERSIONMAP=$(SOLARENV)/src/component.map
76
SHL1RPATH=      OXT
69
SHL1RPATH=OXT
77
DEF1NAME=		$(SHL1TARGET)
70
DEF1NAME=$(SHL1TARGET)
78
79
COMPONENT_XCU_REPLACEMENT=s/@MINIMIZEREXTENSIONPRODUCTNAME@/Presentation Minimizer/g
80
81
COMPONENT_MERGED_XCU= \
82
    $(EXTENSIONDIR)$/registry$/data$/org$/openoffice$/Office$/Addons.xcu \
83
    $(EXTENSIONDIR)$/registry$/data$/org$/openoffice$/Office$/ProtocolHandler.xcu \
84
    $(EXTENSIONDIR)$/registry$/data$/org$/openoffice$/Office$/extension$/SunPresentationMinimizer.xcu
85
86
COMPONENT_FILES= \
87
    $(EXTENSIONDIR)$/registry$/schema$/org$/openoffice$/Office$/extension$/SunPresentationMinimizer.xcs
88
89
# native libraries
90
COMPONENT_LIBRARIES= \
91
    $(EXTENSIONDIR)$/SunPresentationMinimizer.uno$(DLLPOST)
92
93
# rather freestyle or common to all?
94
COMPONENT_BITMAPS= \
95
	$(EXTENSIONDIR)$/bitmaps$/opt_16.png \
96
	$(EXTENSIONDIR)$/bitmaps$/opt_26.png \
97
	$(EXTENSIONDIR)$/bitmaps$/opt_16_h.png \
98
	$(EXTENSIONDIR)$/bitmaps$/opt_26_h.png \
99
	$(EXTENSIONDIR)$/bitmaps$/minimizepresi_80.png \
100
	$(EXTENSIONDIR)$/bitmaps$/minimizepresi_80_h.png
101
102
COMPONENT_IMAGES=\
103
	$(EXTENSIONDIR)$/bitmaps$/extension_32.png \
104
	$(EXTENSIONDIR)$/bitmaps$/extension_32_h.png
105
106
# rather freestyle or common to all?
107
COMPONENT_HELP= \
108
    $(EXTENSIONDIR)$/help$/help_de.odt \
109
    $(EXTENSIONDIR)$/help$/help_en-US.odt \
110
    $(EXTENSIONDIR)$/help$/component.txt
111
112
# make sure to add your custom files here
113
EXTENSION_PACKDEPS=$(COMPONENT_BITMAPS) $(COMPONENT_IMAGES) $(COMPONENT_HELP)
114
115
ZIP2TARGET=     presentation_minimizer_develop
116
.IF "$(WITH_LANG)"!=""
117
ZIP2DIR=        $(MISC)/$(EXTENSIONNAME)_in/merge
118
.ELSE          # "$(WITH_LANG)"!=""
119
ZIP2DIR=        registry/data
120
.ENDIF          # "$(WITH_LANG)"!=""
121
ZIP2EXT=        .zip
122
ZIP2FLAGS=-r
123
ZIP2LIST= \
124
    org/openoffice/Office/Addons.xcu \
125
    org/openoffice/Office/extension/*.xcu
126
71
127
# --- Targets ----------------------------------
72
# ------------------------------------------------------------------------------
128
73
129
.INCLUDE : extension_pre.mk
74
# Resource files
130
75
131
.ENDIF # L10N_framework
76
SRS1NAME=minimizer
132
.INCLUDE : target.mk
77
SRC1FILES =  \
78
        minimizer.src \
133
79
134
.IF "$(L10N_framework)"==""
80
SRSFILELIST=\
135
.INCLUDE : extension_post.mk
81
        $(SRS)$/minimizer.srs \
136
137
$(COMPONENT_BITMAPS) : $(SOLARSRC)$/$(RSCDEFIMG)$/minimizer$/$$(@:f)
138
	@@-$(MKDIRHIER) $(@:d)
139
    $(COPY) $< $@
140
82
141
$(COMPONENT_IMAGES) : $(SOLARSRC)$/$(RSCDEFIMG)$/desktop$/res$/$$(@:f)
83
RESLIB1NAME=minimizer
142
	@@-$(MKDIRHIER) $(@:d)
84
RESLIB1SRSFILES= $(SRSFILELIST)
143
    $(COPY) $< $@
144
85
145
$(COMPONENT_HELP) : help$/$$(@:f)
86
# --- Targets ----------------------------------
146
	@@-$(MKDIRHIER) $(@:d)
147
    $(COPY) $< $@
148
87
149
.ENDIF # L10N_framework
88
.ENDIF # L10N_framework
89
.INCLUDE : target.mk
90
91
92
ALLTAR : $(MISC)/PresentationMinimizer.component
93
94
$(MISC)/PresentationMinimizer.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt PresentationMinimizer.component
95
	$(XSLTPROC) --nonet --stringparam uri \
96
		'$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
97
		$(SOLARENV)/bin/createcomponent.xslt PresentationMinimizer.component
(-)a/main/sdext/source/minimizer/manifest.xml (-36 lines)
Lines 1-36 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!DOCTYPE manifest:manifest PUBLIC "-//OpenOffice.org//DTD Manifest 1.0//EN" "Manifest.dtd">
3
<!--***********************************************************
4
 * 
5
 * Licensed to the Apache Software Foundation (ASF) under one
6
 * or more contributor license agreements.  See the NOTICE file
7
 * distributed with this work for additional information
8
 * regarding copyright ownership.  The ASF licenses this file
9
 * to you under the Apache License, Version 2.0 (the
10
 * "License"); you may not use this file except in compliance
11
 * with the License.  You may obtain a copy of the License at
12
 * 
13
 *   http://www.apache.org/licenses/LICENSE-2.0
14
 * 
15
 * Unless required by applicable law or agreed to in writing,
16
 * software distributed under the License is distributed on an
17
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18
 * KIND, either express or implied.  See the License for the
19
 * specific language governing permissions and limitations
20
 * under the License.
21
 * 
22
 ***********************************************************-->
23
<manifest:manifest xmlns:manifest="http://openoffice.org/2001/manifest">
24
  <manifest:file-entry manifest:media-type="application/vnd.sun.star.uno-component;type=native"
25
                       manifest:full-path="SunPresentationMinimizer.unoSHARED_EXTENSION"/>
26
  <manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-schema"
27
                       manifest:full-path="registry/schema/org/openoffice/Office/extension/SunPresentationMinimizer.xcs"/>
28
  <manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data"
29
                       manifest:full-path="registry/data/org/openoffice/Office/extension/SunPresentationMinimizer.xcu"/>
30
  <manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data"
31
                       manifest:full-path="registry/data/org/openoffice/Office/Addons.xcu"/>
32
  <manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data"
33
                       manifest:full-path="registry/data/org/openoffice/Office/ProtocolHandler.xcu"/>
34
  <manifest:file-entry manifest:media-type="application/vnd.sun.star.package-bundle-description"
35
                       manifest:full-path="help/component.txt"/>
36
</manifest:manifest>
(-)a/main/sdext/source/minimizer/minimizer.hrc (+95 lines)
Line 0 Link Here
1
/**************************************************************
2
 *
3
 * Licensed to the Apache Software Foundation (ASF) under one
4
 * or more contributor license agreements.  See the NOTICE file
5
 * distributed with this work for additional information
6
 * regarding copyright ownership.  The ASF licenses this file
7
 * to you under the Apache License, Version 2.0 (the
8
 * "License"); you may not use this file except in compliance
9
 * with the License.  You may obtain a copy of the License at
10
 *
11
 *   http://www.apache.org/licenses/LICENSE-2.0
12
 *
13
 * Unless required by applicable law or agreed to in writing,
14
 * software distributed under the License is distributed on an
15
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
 * KIND, either express or implied.  See the License for the
17
 * specific language governing permissions and limitations
18
 * under the License.
19
 *
20
 *************************************************************/
21
22
#define MINIMIZER_RES_START             255
23
24
#define IMAGE_MINIMIZER_ROADMAP         MINIMIZER_RES_START + 1
25
#define IMAGE_MINIMIZER_ROADMAP_HC      MINIMIZER_RES_START + 2
26
27
#define IMAGE_MINIMIZER_END             MINIMIZER_RES_START + 50
28
#define MINIMIZER_RES_STR_START         IMAGE_MINIMIZER_END
29
30
#define STR_PRESENTATION_MINIMIZER      MINIMIZER_RES_STR_START + 1
31
#define STR_STEPS                       MINIMIZER_RES_STR_START + 2
32
#define STR_HELP                        MINIMIZER_RES_STR_START + 3
33
#define STR_BACK                        MINIMIZER_RES_STR_START + 4
34
#define STR_NEXT                        MINIMIZER_RES_STR_START + 5
35
#define STR_FINISH                      MINIMIZER_RES_STR_START + 6
36
#define STR_CANCEL                      MINIMIZER_RES_STR_START + 7
37
#define STR_INTRODUCTION                MINIMIZER_RES_STR_START + 8
38
#define STR_INTRODUCTION_T              MINIMIZER_RES_STR_START + 9
39
#define STR_CHOSE_SETTINGS              MINIMIZER_RES_STR_START + 10
40
#define STR_REMOVE                      MINIMIZER_RES_STR_START + 11
41
#define STR_GRAPHIC_OPTIMIZATION        MINIMIZER_RES_STR_START + 12
42
#define STR_IMAGE_OPTIMIZATION          MINIMIZER_RES_STR_START + 13
43
#define STR_LOSSLESS_COMPRESSION        MINIMIZER_RES_STR_START + 14
44
#define STR_JPEG_COMPRESSION            MINIMIZER_RES_STR_START + 15
45
#define STR_QUALITY                     MINIMIZER_RES_STR_START + 16
46
#define STR_REMOVE_CROP_AREA            MINIMIZER_RES_STR_START + 17
47
#define STR_IMAGE_RESOLUTION            MINIMIZER_RES_STR_START + 18
48
#define STR_IMAGE_RESOLUTION_0          MINIMIZER_RES_STR_START + 19
49
#define STR_IMAGE_RESOLUTION_1          MINIMIZER_RES_STR_START + 20
50
#define STR_IMAGE_RESOLUTION_2          MINIMIZER_RES_STR_START + 21
51
#define STR_IMAGE_RESOLUTION_3          MINIMIZER_RES_STR_START + 22
52
#define STR_EMBED_LINKED_GRAPHICS       MINIMIZER_RES_STR_START + 23
53
#define STR_OLE_OBJECTS                 MINIMIZER_RES_STR_START + 24
54
#define STR_OLE_OPTIMIZATION            MINIMIZER_RES_STR_START + 25
55
#define STR_OLE_REPLACE                 MINIMIZER_RES_STR_START + 26
56
#define STR_ALL_OLE_OBJECTS             MINIMIZER_RES_STR_START + 27
57
#define STR_ALIEN_OLE_OBJECTS_ONLY      MINIMIZER_RES_STR_START + 28
58
#define STR_OLE_OBJECTS_DESC            MINIMIZER_RES_STR_START + 29
59
#define STR_NO_OLE_OBJECTS_DESC         MINIMIZER_RES_STR_START + 30
60
#define STR_SLIDES                      MINIMIZER_RES_STR_START + 31
61
#define STR_CHOOSE_SLIDES               MINIMIZER_RES_STR_START + 32
62
#define STR_MASTER_PAGES                MINIMIZER_RES_STR_START + 33
63
#define STR_DELETE_MASTER_PAGES         MINIMIZER_RES_STR_START + 34
64
#define STR_DELETE_NOTES_PAGES          MINIMIZER_RES_STR_START + 35
65
#define STR_DELETE_HIDDEN_SLIDES        MINIMIZER_RES_STR_START + 36
66
#define STR_CUSTOM_SHOW                 MINIMIZER_RES_STR_START + 37
67
#define STR_SUMMARY                     MINIMIZER_RES_STR_START + 38
68
#define STR_SUMMARY_TITLE               MINIMIZER_RES_STR_START + 39
69
#define STR_PROGRESS                    MINIMIZER_RES_STR_START + 40
70
#define STR_OBJECTS_OPTIMIZED           MINIMIZER_RES_STR_START + 41
71
#define STR_APPLY_TO_CURRENT            MINIMIZER_RES_STR_START + 42
72
#define STR_AUTOMATICALLY_OPEN          MINIMIZER_RES_STR_START + 43
73
#define STR_SAVE_SETTINGS               MINIMIZER_RES_STR_START + 44
74
#define STR_SAVE_AS                     MINIMIZER_RES_STR_START + 45
75
#define STR_DELETE_SLIDES               MINIMIZER_RES_STR_START + 46
76
#define STR_OPTIMIZE_IMAGES             MINIMIZER_RES_STR_START + 47
77
#define STR_CREATE_REPLACEMENT          MINIMIZER_RES_STR_START + 48
78
#define STR_CURRENT_FILESIZE            MINIMIZER_RES_STR_START + 49
79
#define STR_ESTIMATED_FILESIZE          MINIMIZER_RES_STR_START + 50
80
#define STR_MB                          MINIMIZER_RES_STR_START + 51
81
#define STR_MY_SETTINGS                 MINIMIZER_RES_STR_START + 52
82
#define STR_DEFAULT_SESSION             MINIMIZER_RES_STR_START + 53
83
#define STR_MODIFY_WARNING              MINIMIZER_RES_STR_START + 54
84
#define STR_YES                         MINIMIZER_RES_STR_START + 55
85
#define STR_OK                          MINIMIZER_RES_STR_START + 56
86
#define STR_INFO_1                      MINIMIZER_RES_STR_START + 57
87
#define STR_INFO_2                      MINIMIZER_RES_STR_START + 58
88
#define STR_INFO_3                      MINIMIZER_RES_STR_START + 59
89
#define STR_INFO_4                      MINIMIZER_RES_STR_START + 60
90
#define STR_DUPLICATING_PRESENTATION    MINIMIZER_RES_STR_START + 61
91
#define STR_DELETING_SLIDES             MINIMIZER_RES_STR_START + 62
92
#define STR_OPTIMIZING_GRAPHICS         MINIMIZER_RES_STR_START + 63
93
#define STR_CREATING_OLE_REPLACEMENTS   MINIMIZER_RES_STR_START + 64
94
#define STR_FILESIZESEPARATOR           MINIMIZER_RES_STR_START + 65
95
#define STR_INFO_DIALOG                 MINIMIZER_RES_STR_START + 66
(-)a/main/sdext/source/minimizer/minimizer.pmk (-24 lines)
Lines 1-24 Link Here
1
#**************************************************************
2
#  
3
#  Licensed to the Apache Software Foundation (ASF) under one
4
#  or more contributor license agreements.  See the NOTICE file
5
#  distributed with this work for additional information
6
#  regarding copyright ownership.  The ASF licenses this file
7
#  to you under the Apache License, Version 2.0 (the
8
#  "License"); you may not use this file except in compliance
9
#  with the License.  You may obtain a copy of the License at
10
#  
11
#    http://www.apache.org/licenses/LICENSE-2.0
12
#  
13
#  Unless required by applicable law or agreed to in writing,
14
#  software distributed under the License is distributed on an
15
#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
#  KIND, either express or implied.  See the License for the
17
#  specific language governing permissions and limitations
18
#  under the License.
19
#  
20
#**************************************************************
21
22
23
24
EXTENSIONNAME:=PresentationMinimizer
(-)a/main/sdext/source/minimizer/minimizer.src (+379 lines)
Line 0 Link Here
1
/**************************************************************
2
 *
3
 * Licensed to the Apache Software Foundation (ASF) under one
4
 * or more contributor license agreements.  See the NOTICE file
5
 * distributed with this work for additional information
6
 * regarding copyright ownership.  The ASF licenses this file
7
 * to you under the Apache License, Version 2.0 (the
8
 * "License"); you may not use this file except in compliance
9
 * with the License.  You may obtain a copy of the License at
10
 *
11
 *   http://www.apache.org/licenses/LICENSE-2.0
12
 *
13
 * Unless required by applicable law or agreed to in writing,
14
 * software distributed under the License is distributed on an
15
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
 * KIND, either express or implied.  See the License for the
17
 * specific language governing permissions and limitations
18
 * under the License.
19
 *
20
 *************************************************************/
21
22
#include "minimizer.hrc"
23
24
Bitmap IMAGE_MINIMIZER_ROADMAP
25
{
26
    File = "minimizer/minimizepresi_80.png";
27
};
28
29
Bitmap IMAGE_MINIMIZER_ROADMAP_HC
30
{
31
    File = "minimizer/minimizepresi_80_h.png";
32
};
33
34
String STR_PRESENTATION_MINIMIZER
35
{
36
   Text[ en-US ] = "Presentation Minimizer";
37
};
38
39
String STR_INFO_DIALOG
40
{
41
   Text[ en-US ] = "Presentation Minimizer - Result";
42
};
43
44
String STR_STEPS
45
{
46
   Text[ en-US ] = "Steps";
47
};
48
49
String STR_HELP
50
{
51
   Text[ en-US ] = "~Help";
52
};
53
54
String STR_BACK
55
{
56
   Text[ en-US ] = "< ~Back";
57
};
58
59
String STR_NEXT
60
{
61
   Text[ en-US ] = "~Next >";
62
};
63
64
String STR_FINISH
65
{
66
   Text[ en-US ] = "~Finish";
67
};
68
69
String STR_CANCEL
70
{
71
   Text[ en-US ] = "Cancel";
72
};
73
74
String STR_INTRODUCTION
75
{
76
   Text[ en-US ] = "Introduction";
77
};
78
79
String STR_INTRODUCTION_T
80
{
81
   Text[ en-US ] = "The Presentation Minimizer is used to reduce the "
82
        "file size of the current presentation. Images will be compressed and "
83
        "data, that is no longer needed, will be removed.\n"
84
        "At the last step of the wizard you can choose to apply the changes "
85
        "to the current presentation or to create an optimized new version of"
86
        " the presentation.";
87
};
88
89
String STR_CHOSE_SETTINGS
90
{
91
   Text[ en-US ] = "~Choose settings for Presentation Minimizer";
92
};
93
94
String STR_REMOVE
95
{
96
   Text[ en-US ] = "~Delete";
97
};
98
99
String STR_GRAPHIC_OPTIMIZATION
100
{
101
   Text[ en-US ] = "Choose settings for optimizing pictures and graphics";
102
};
103
104
String STR_IMAGE_OPTIMIZATION
105
{
106
   Text[ en-US ] = "Graphics";
107
};
108
109
String STR_LOSSLESS_COMPRESSION
110
{
111
   Text[ en-US ] = "~Lossless compression";
112
};
113
114
String STR_JPEG_COMPRESSION
115
{
116
   Text[ en-US ] = "~JPEG compression";
117
};
118
119
String STR_QUALITY
120
{
121
   Text[ en-US ] = "~Quality in %";
122
};
123
124
String STR_REMOVE_CROP_AREA
125
{
126
   Text[ en-US ] = "~Delete cropped graphic areas";
127
};
128
129
String STR_IMAGE_RESOLUTION
130
{
131
   Text[ en-US ] = "Reduce ~image resolution";
132
};
133
134
String STR_IMAGE_RESOLUTION_0
135
{
136
   Text[ en-US ] = "<no change>";
137
};
138
139
String STR_IMAGE_RESOLUTION_1
140
{
141
   Text[ en-US ] = "90;90 DPI (screen resolution)";
142
};
143
144
String STR_IMAGE_RESOLUTION_2
145
{
146
   Text[ en-US ] = "150;150 DPI (projector resolution)";
147
};
148
149
String STR_IMAGE_RESOLUTION_3
150
{
151
   Text[ en-US ] = "300;300 DPI (print resolution)";
152
};
153
154
String STR_EMBED_LINKED_GRAPHICS
155
{
156
   Text[ en-US ] = "~Break links to external graphics";
157
};
158
159
String STR_OLE_OBJECTS
160
{
161
   Text[ en-US ] = "OLE Objects";
162
};
163
164
String STR_OLE_OPTIMIZATION
165
{
166
   Text[ en-US ] = "Choose settings for replacing OLE objects";
167
};
168
169
String STR_OLE_REPLACE
170
{
171
   Text[ en-US ] = "Create static replacement graphics for OLE objects";
172
};
173
174
String STR_ALL_OLE_OBJECTS
175
{
176
   Text[ en-US ] = "For ~all OLE objects";
177
};
178
179
String STR_ALIEN_OLE_OBJECTS_ONLY
180
{
181
   Text[ en-US ] = "~For OLE objects not based on OpenDocument format";
182
};
183
184
String STR_OLE_OBJECTS_DESC
185
{
186
   Text[ en-US ] = "Object Linking and Embedding (OLE) is a technology that "
187
        "allows embedding and linking to documents and other objects.\n"
188
        "The current presentation contains OLE objects.";
189
};
190
191
String STR_NO_OLE_OBJECTS_DESC
192
{
193
   Text[ en-US ] = "Object Linking and Embedding (OLE) is a technology that "
194
        "allows embedding and linking to documents and other objects.\n"
195
        "The current presentation contains no OLE objects.";
196
};
197
198
String STR_SLIDES
199
{
200
   Text[ en-US ] = "Slides";
201
};
202
203
String STR_CHOOSE_SLIDES
204
{
205
   Text[ en-US ] = "Choose which slides to delete";
206
};
207
208
String STR_MASTER_PAGES
209
{
210
   Text[ en-US ] = "Master Pages";
211
};
212
213
String STR_DELETE_MASTER_PAGES
214
{
215
   Text[ en-US ] = "Delete unused ~master pages";
216
};
217
218
String STR_DELETE_NOTES_PAGES
219
{
220
   Text[ en-US ] = "~Clear notes";
221
};
222
223
String STR_DELETE_HIDDEN_SLIDES
224
{
225
   Text[ en-US ] = "Delete hidden ~slides";
226
};
227
228
String STR_CUSTOM_SHOW
229
{
230
   Text[ en-US ] = "Delete slides that are not used for the ~custom slide show";
231
};
232
233
String STR_SUMMARY
234
{
235
   Text[ en-US ] = "Summary";
236
};
237
238
String STR_SUMMARY_TITLE
239
{
240
   Text[ en-US ] = "Choose where to apply the following changes";
241
};
242
243
String STR_PROGRESS
244
{
245
   Text[ en-US ] = "Progress";
246
};
247
248
String STR_OBJECTS_OPTIMIZED
249
{
250
   Text[ en-US ] = "Objects optimized";
251
};
252
253
String STR_APPLY_TO_CURRENT
254
{
255
   Text[ en-US ] = "~Apply changes to current presentation";
256
};
257
258
String STR_AUTOMATICALLY_OPEN
259
{
260
   Text[ en-US ] = "~Open newly created presentation";
261
};
262
263
String STR_SAVE_SETTINGS
264
{
265
   Text[ en-US ] = "~Save settings as";
266
};
267
268
String STR_SAVE_AS
269
{
270
   Text[ en-US ] = "~Duplicate presentation before applying changes";
271
};
272
273
String STR_DELETE_SLIDES
274
{
275
   Text[ en-US ] = "Delete %SLIDES slides.";
276
};
277
278
String STR_OPTIMIZE_IMAGES
279
{
280
   Text[ en-US ] = "Optimize %IMAGES graphics to %QUALITY% JPEG quality at %RESOLUTION DPI.";
281
};
282
283
String STR_CREATE_REPLACEMENT
284
{
285
   Text[ en-US ] = "Create replacement graphics for %OLE objects.";
286
};
287
288
String STR_CURRENT_FILESIZE
289
{
290
   Text[ en-US ] = "Current file size:";
291
};
292
293
String STR_ESTIMATED_FILESIZE
294
{
295
   Text[ en-US ] = "Estimated new file size:";
296
};
297
298
String STR_MB
299
{
300
   Text[ en-US ] = "%1 MB";
301
};
302
303
String STR_MY_SETTINGS
304
{
305
   Text[ en-US ] = "My Settings ";
306
};
307
308
String STR_DEFAULT_SESSION
309
{
310
   Text[ en-US ] = "default session";
311
};
312
313
String STR_MODIFY_WARNING
314
{
315
   Text[ en-US ] = "The optimization will modify the current document. "
316
                    "Do you want to continue?";
317
};
318
319
String STR_YES
320
{
321
   Text[ en-US ] = "~Yes";
322
};
323
324
String STR_OK
325
{
326
   Text[ en-US ] = "OK";
327
};
328
329
String STR_INFO_1
330
{
331
   Text[ en-US ] = "The Presentation Minimizer has successfully updated the "
332
        "presentation '%TITLE'. The file size has changed "
333
        "from %OLDFILESIZE MB to %NEWFILESIZE MB.";
334
};
335
336
String STR_INFO_2
337
{
338
   Text[ en-US ] = "The Presentation Minimizer has successfully updated the "
339
        "presentation '%TITLE'. The file size has changed "
340
        "from %OLDFILESIZE MB to approximated %NEWFILESIZE MB.";
341
};
342
343
String STR_INFO_3
344
{
345
   Text[ en-US ] = "The Presentation Minimizer has successfully updated the "
346
        "presentation '%TITLE'. The file size has changed to %NEWFILESIZE MB.";
347
};
348
349
String STR_INFO_4
350
{
351
   Text[ en-US ] = "The Presentation Minimizer has successfully updated the "
352
        "presentation '%TITLE'. "
353
        "The file size has changed to approximated %NEWFILESIZE MB.";
354
};
355
356
String STR_DUPLICATING_PRESENTATION
357
{
358
   Text[ en-US ] = "Duplicating presentation...";
359
};
360
361
String STR_DELETING_SLIDES
362
{
363
   Text[ en-US ] = "Deleting slides...";
364
};
365
366
String STR_OPTIMIZING_GRAPHICS
367
{
368
   Text[ en-US ] = "Optimizing graphics...";
369
};
370
371
String STR_CREATING_OLE_REPLACEMENTS
372
{
373
   Text[ en-US ] = "Creating replacement graphics for OLE objects...";
374
};
375
376
String STR_FILESIZESEPARATOR
377
{
378
   Text[ en-US ] = ".";
379
};
(-)a/main/sdext/source/minimizer/optimizationstats.cxx (-1 / +2 lines)
Lines 31-43 Link Here
31
#include <com/sun/star/drawing/XMasterPagesSupplier.hpp>
31
#include <com/sun/star/drawing/XMasterPagesSupplier.hpp>
32
32
33
33
34
using namespace ::rtl;
35
using namespace ::com::sun::star;
34
using namespace ::com::sun::star;
36
using namespace ::com::sun::star::uno;
35
using namespace ::com::sun::star::uno;
37
using namespace ::com::sun::star::frame;
36
using namespace ::com::sun::star::frame;
38
using namespace ::com::sun::star::drawing;
37
using namespace ::com::sun::star::drawing;
39
using namespace ::com::sun::star::beans;
38
using namespace ::com::sun::star::beans;
40
39
40
using ::rtl::OUString;
41
41
// -----------------------------------------------------------------------------
42
// -----------------------------------------------------------------------------
42
43
43
OptimizationStats::OptimizationStats()
44
OptimizationStats::OptimizationStats()
(-)a/main/sdext/source/minimizer/optimizerdialog.cxx (-241 / +197 lines)
Lines 34-47 Link Here
34
#endif
34
#endif
35
#include <com/sun/star/frame/XComponentLoader.hpp>
35
#include <com/sun/star/frame/XComponentLoader.hpp>
36
#include <com/sun/star/frame/XLayoutManager.hpp>
36
#include <com/sun/star/frame/XLayoutManager.hpp>
37
#include <com/sun/star/graphic/XGraphicProvider.hpp>
37
#include <osl/time.h>
38
#include <osl/time.h>
38
39
40
#include "minimizer.hrc"
41
#include "helpid.hrc"
42
43
#define URL_GRAPHIC_REPO        "private:graphicrepository"
44
#define IMAGE_ROADMAP           URL_GRAPHIC_REPO "/minimizer/minimizepresi_80.png"
45
#define IMAGE_ROADMAP_HC        URL_GRAPHIC_REPO "/minimizer/minimizepresi_80.png"
46
39
// -------------------
47
// -------------------
40
// - OPTIMIZERDIALOG -
48
// - OPTIMIZERDIALOG -
41
// -------------------
49
// -------------------
42
50
43
using namespace ::rtl;
44
using namespace ::com::sun::star::io;
51
using namespace ::com::sun::star::io;
52
using namespace ::com::sun::star::graphic;
45
using namespace ::com::sun::star::ui;
53
using namespace ::com::sun::star::ui;
46
using namespace ::com::sun::star::awt;
54
using namespace ::com::sun::star::awt;
47
using namespace ::com::sun::star::ucb;
55
using namespace ::com::sun::star::ucb;
Lines 53-58 using namespace ::com::sun::star::beans; Link Here
53
using namespace ::com::sun::star::script;
61
using namespace ::com::sun::star::script;
54
using namespace ::com::sun::star::container;
62
using namespace ::com::sun::star::container;
55
63
64
using ::rtl::OUString;
56
65
57
// -----------------------------------------------------------------------------
66
// -----------------------------------------------------------------------------
58
67
Lines 62-67 void OptimizerDialog::InitDialog() Link Here
62
	OUString pNames[] = {
71
	OUString pNames[] = {
63
		TKGet( TK_Closeable ),
72
		TKGet( TK_Closeable ),
64
		TKGet( TK_Height ),
73
		TKGet( TK_Height ),
74
        TKGet( TK_HelpURL ),
65
		TKGet( TK_Moveable ),
75
		TKGet( TK_Moveable ),
66
		TKGet( TK_PositionX ),
76
		TKGet( TK_PositionX ),
67
		TKGet( TK_PositionY ),
77
		TKGet( TK_PositionY ),
Lines 71-80 void OptimizerDialog::InitDialog() Link Here
71
	Any	pValues[] = {
81
	Any	pValues[] = {
72
		Any( sal_True ),
82
		Any( sal_True ),
73
		Any( sal_Int32( DIALOG_HEIGHT ) ),
83
		Any( sal_Int32( DIALOG_HEIGHT ) ),
84
        Any( HID( HID_SDEXT_MINIMIZER_WIZ_DLG ) ),
74
		Any( sal_True ),
85
		Any( sal_True ),
75
		Any( sal_Int32( 200 ) ),
86
		Any( sal_Int32( 200 ) ),
76
		Any( sal_Int32( 52 ) ),
87
		Any( sal_Int32( 52 ) ),
77
		Any( getString( STR_SUN_OPTIMIZATION_WIZARD2 ) ),
88
		Any( getString( STR_PRESENTATION_MINIMIZER ) ),
78
		Any( sal_Int32( OD_DIALOG_WIDTH ) ) };
89
		Any( sal_Int32( OD_DIALOG_WIDTH ) ) };
79
	
90
	
80
	sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString );
91
	sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString );
Lines 124-135 void OptimizerDialog::InitRoadmap() Link Here
124
		InsertRoadmapItem( 3, sal_True, getString( STR_OLE_OBJECTS ), ITEM_ID_OLE_OPTIMIZATION );
135
		InsertRoadmapItem( 3, sal_True, getString( STR_OLE_OBJECTS ), ITEM_ID_OLE_OPTIMIZATION );
125
		InsertRoadmapItem( 4, sal_True, getString( STR_SUMMARY ), ITEM_ID_SUMMARY );
136
		InsertRoadmapItem( 4, sal_True, getString( STR_SUMMARY ), ITEM_ID_SUMMARY );
126
137
127
		rtl::OUString sBitmapPath( getPath( TK_BitmapPath ) );
138
		rtl::OUString sBitmap(
128
		rtl::OUString sBitmap( isHighContrast() ? rtl::OUString::createFromAscii( "/minimizepresi_80_h.png" )
139
            isHighContrast() ? 
129
												: rtl::OUString::createFromAscii( "/minimizepresi_80.png" ) );
140
            rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( IMAGE_ROADMAP_HC ) ) :
130
		rtl::OUString sURL( sBitmapPath += sBitmap );
141
            rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( IMAGE_ROADMAP ) ) );
131
142
132
		xPropertySet->setPropertyValue( TKGet( TK_ImageURL ), Any( sURL ) );
143
		xPropertySet->setPropertyValue( TKGet( TK_ImageURL ), Any( sBitmap ) );
133
		xPropertySet->setPropertyValue( TKGet( TK_Activated ), Any( (sal_Bool)sal_True ) );
144
		xPropertySet->setPropertyValue( TKGet( TK_Activated ), Any( (sal_Bool)sal_True ) );
134
		xPropertySet->setPropertyValue( TKGet( TK_Complete ), Any( (sal_Bool)sal_True ) );
145
		xPropertySet->setPropertyValue( TKGet( TK_Complete ), Any( (sal_Bool)sal_True ) );
135
		xPropertySet->setPropertyValue( TKGet( TK_CurrentItemID ), Any( (sal_Int16)ITEM_ID_INTRODUCTION ) );
146
		xPropertySet->setPropertyValue( TKGet( TK_CurrentItemID ), Any( (sal_Int16)ITEM_ID_INTRODUCTION ) );
Lines 213-234 void OptimizerDialog::UpdateConfiguration() Link Here
213
224
214
// -----------------------------------------------------------------------------
225
// -----------------------------------------------------------------------------
215
226
216
OptimizerDialog::OptimizerDialog( const Reference< XComponentContext > &rxMSF, Reference< XFrame >& rxFrame, Reference< XDispatch > rxStatusDispatcher ) :
227
OptimizerDialog::OptimizerDialog(
217
	UnoDialog( rxMSF, rxFrame ),
228
    const Reference< XComponentContext > &rxContext,
218
	ConfigurationAccess( rxMSF, NULL ),
229
    const Reference< XFrame > &rxFrame,
219
	mnCurrentStep( 0 ),
230
    const Reference< XWindowPeer >& rxParent )
220
	mnTabIndex( 0 ),
231
    : UnoDialog( rxContext, rxParent )
221
	mxMSF( rxMSF ),
232
	, ConfigurationAccess( rxContext, NULL )
222
	mxFrame( rxFrame ),
233
    , mxFrame( rxFrame )
223
	mxItemListener( new ItemListener( *this ) ),
234
    , mnCurrentStep( 0 )
224
	mxActionListener( new ActionListener( *this ) ),
235
    , mnTabIndex( 0 )
225
	mxActionListenerListBox0Pg0( new ActionListenerListBox0Pg0( *this ) ),
226
	mxTextListenerFormattedField0Pg1( new TextListenerFormattedField0Pg1( *this ) ),
227
	mxTextListenerComboBox0Pg1( new TextListenerComboBox0Pg1( *this ) ),
228
	mxSpinListenerFormattedField0Pg1( new SpinListenerFormattedField0Pg1( *this ) ),
229
	mxStatusDispatcher( rxStatusDispatcher )
230
{
236
{
231
	Reference< XStorable > xStorable( mxController->getModel(), UNO_QUERY_THROW );
237
    OSL_TRACE("OptimizerDialog::OptimizerDialog");
238
    OSL_ENSURE( mxFrame.is(), "OptimizerDialog: no XFrame!" );
239
    Reference< XController > xController( mxFrame->getController() );
240
    mxModel = xController->getModel();
241
	Reference< XStorable> xStorable( mxModel, UNO_QUERY_THROW );
232
	mbIsReadonly = xStorable->isReadonly();
242
	mbIsReadonly = xStorable->isReadonly();
233
243
234
	InitDialog();
244
	InitDialog();
Lines 242-270 OptimizerDialog::OptimizerDialog( const Reference< XComponentContext > &rxMSF, R Link Here
242
	ActivatePage( 0 );
252
	ActivatePage( 0 );
243
253
244
	OptimizationStats aStats;
254
	OptimizationStats aStats;
245
	aStats.InitializeStatusValuesFromDocument( mxController->getModel() );
255
	aStats.InitializeStatusValuesFromDocument( mxModel );
246
	Sequence< PropertyValue > aStatusSequence( aStats.GetStatusSequence() );
256
	Sequence< PropertyValue > aStatusSequence( aStats.GetStatusSequence() );
247
	UpdateStatus( aStatusSequence );
257
	UpdateStatus( aStatusSequence );
258
259
    centerDialog();
248
}
260
}
249
261
250
// -----------------------------------------------------------------------------
262
// -----------------------------------------------------------------------------
251
263
252
OptimizerDialog::~OptimizerDialog()
264
OptimizerDialog::~OptimizerDialog()
253
{
265
{
266
    OSL_TRACE("OptimizerDialog::~OptimizerDialog");
254
	// not saving configuration if the dialog has been finished via cancel or close window
267
	// not saving configuration if the dialog has been finished via cancel or close window
255
	if ( mbStatus )
268
	if ( mbStatus )
256
		SaveConfiguration();
269
		SaveConfiguration();
270
271
    Reference< XComponent > xComponent( mxDialog, UNO_QUERY );
272
    if ( xComponent.is() )
273
    {
274
        OSL_TRACE("OptimizerDialog::~OptimizerDialog - disposing dialog!");
275
        xComponent->dispose();
276
    }
257
}
277
}
258
278
279
280
void SAL_CALL OptimizerDialog::statusChanged(
281
    const ::com::sun::star::frame::FeatureStateEvent& aState )
282
throw (::com::sun::star::uno::RuntimeException)
283
{
284
    Sequence< PropertyValue > aArguments;
285
    if ( ( aState.State >>= aArguments ) && aArguments.getLength() )
286
        UpdateStatus( aArguments );
287
}
288
289
void SAL_CALL OptimizerDialog::disposing(
290
    const ::com::sun::star::lang::EventObject& /*aSource*/ )
291
throw (::com::sun::star::uno::RuntimeException)
292
{}
293
259
// -----------------------------------------------------------------------------
294
// -----------------------------------------------------------------------------
260
295
261
sal_Bool OptimizerDialog::execute()
296
sal_Bool OptimizerDialog::execute()
262
{
297
{
263
	Reference< XItemEventBroadcaster > maRoadmapBroadcaster( mxRoadmapControl, UNO_QUERY_THROW );
298
	Reference< XItemEventBroadcaster > maRoadmapBroadcaster( mxRoadmapControl, UNO_QUERY_THROW );
264
	maRoadmapBroadcaster->addItemListener( mxItemListener );
299
	maRoadmapBroadcaster->addItemListener( this );
265
	UnoDialog::execute();
300
	UnoDialog::execute();
266
	UpdateConfiguration();			// taking actual control settings for the configuration
301
	UpdateConfiguration();			// taking actual control settings for the configuration
267
	maRoadmapBroadcaster->removeItemListener( mxItemListener );
302
	maRoadmapBroadcaster->removeItemListener( this );
268
	return mbStatus;
303
	return mbStatus;
269
}
304
}
270
305
Lines 350-356 void OptimizerDialog::UpdateStatus( const com::sun::star::uno::Sequence< com::su Link Here
350
			if ( *pVal >>= sStatus )
385
			if ( *pVal >>= sStatus )
351
			{
386
			{
352
				setControlProperty( TKGet( TK_FixedText1Pg4 ), TKGet( TK_Enabled ), Any( sal_True ) );
387
				setControlProperty( TKGet( TK_FixedText1Pg4 ), TKGet( TK_Enabled ), Any( sal_True ) );
353
				setControlProperty( TKGet( TK_FixedText1Pg4 ), TKGet( TK_Label ), Any( getString( TKGet( sStatus ) ) ) );
388
				setControlProperty( TKGet( TK_FixedText1Pg4 ), TKGet( TK_Label ), Any( sStatus ) );
354
			}
389
			}
355
		}
390
		}
356
		pVal = maStats.GetStatusValue( TK_Progress );
391
		pVal = maStats.GetStatusValue( TK_Progress );
Lines 370-376 void OptimizerDialog::UpdateStatus( const com::sun::star::uno::Sequence< com::su Link Here
370
405
371
// -----------------------------------------------------------------------------
406
// -----------------------------------------------------------------------------
372
407
373
void ItemListener::itemStateChanged( const ItemEvent& Event )
408
void OptimizerDialog::itemStateChanged( const ItemEvent& Event )
374
	throw ( RuntimeException )
409
	throw ( RuntimeException )
375
{
410
{
376
	try
411
	try
Lines 388-415 void ItemListener::itemStateChanged( const ItemEvent& Event ) Link Here
388
			{
423
			{
389
				case TK_rdmNavi :
424
				case TK_rdmNavi :
390
				{
425
				{
391
					mrOptimizerDialog.SwitchPage( static_cast< sal_Int16 >( Event.ItemId ) );
426
					SwitchPage( static_cast< sal_Int16 >( Event.ItemId ) );
392
				}
427
				}
393
				break;
428
				break;
394
				case TK_CheckBox1Pg1 :
429
				case TK_CheckBox1Pg1 :
395
				{
430
				{
396
					if ( xPropertySet->getPropertyValue( TKGet( TK_State ) ) >>= nState )
431
					if ( xPropertySet->getPropertyValue( TKGet( TK_State ) ) >>= nState )
397
						mrOptimizerDialog.SetConfigProperty( TK_RemoveCropArea, Any( nState != 0 ) );
432
						SetConfigProperty( TK_RemoveCropArea, Any( nState != 0 ) );
398
				}
433
				}
399
				break;
434
				break;
400
				case TK_CheckBox2Pg1 :
435
				case TK_CheckBox2Pg1 :
401
				{
436
				{
402
					if ( xPropertySet->getPropertyValue( TKGet( TK_State ) ) >>= nState )
437
					if ( xPropertySet->getPropertyValue( TKGet( TK_State ) ) >>= nState )
403
						mrOptimizerDialog.SetConfigProperty( TK_EmbedLinkedGraphics, Any( nState != 0 ) );
438
						SetConfigProperty( TK_EmbedLinkedGraphics, Any( nState != 0 ) );
404
				}
439
				}
405
				break;
440
				break;
406
				case TK_CheckBox0Pg2 :
441
				case TK_CheckBox0Pg2 :
407
				{
442
				{
408
					if ( xPropertySet->getPropertyValue( TKGet( TK_State ) ) >>= nState )
443
					if ( xPropertySet->getPropertyValue( TKGet( TK_State ) ) >>= nState )
409
					{
444
					{
410
						mrOptimizerDialog.SetConfigProperty( TK_OLEOptimization, Any( nState != 0 ) );
445
						SetConfigProperty( TK_OLEOptimization, Any( nState != 0 ) );
411
						mrOptimizerDialog.setControlProperty( TKGet( TK_RadioButton0Pg2 ), TKGet( TK_Enabled ), Any( nState != 0 ) );
446
						setControlProperty( TKGet( TK_RadioButton0Pg2 ), TKGet( TK_Enabled ), Any( nState != 0 ) );
412
						mrOptimizerDialog.setControlProperty( TKGet( TK_RadioButton1Pg2 ), TKGet( TK_Enabled ), Any( nState != 0 ) );
447
						setControlProperty( TKGet( TK_RadioButton1Pg2 ), TKGet( TK_Enabled ), Any( nState != 0 ) );
413
					}
448
					}
414
				}
449
				}
415
				break;
450
				break;
Lines 419-427 void ItemListener::itemStateChanged( const ItemEvent& Event ) Link Here
419
					if ( xPropertySet->getPropertyValue( TKGet( TK_State ) ) >>= nInt16 )
454
					if ( xPropertySet->getPropertyValue( TKGet( TK_State ) ) >>= nInt16 )
420
					{
455
					{
421
						nInt16 ^= 1;
456
						nInt16 ^= 1;
422
						mrOptimizerDialog.SetConfigProperty( TK_JPEGCompression, Any( nInt16 != 0 ) );
457
						SetConfigProperty( TK_JPEGCompression, Any( nInt16 != 0 ) );
423
						mrOptimizerDialog.setControlProperty( TKGet( TK_FixedText1Pg1 ), TKGet( TK_Enabled ), Any( nInt16 != 0 ) );
458
						setControlProperty( TKGet( TK_FixedText1Pg1 ), TKGet( TK_Enabled ), Any( nInt16 != 0 ) );
424
						mrOptimizerDialog.setControlProperty( TKGet( TK_FormattedField0Pg1 ), TKGet( TK_Enabled ), Any( nInt16 != 0 ) );
459
						setControlProperty( TKGet( TK_FormattedField0Pg1 ), TKGet( TK_Enabled ), Any( nInt16 != 0 ) );
425
					}
460
					}
426
				}
461
				}
427
				break;
462
				break;
Lines 429-437 void ItemListener::itemStateChanged( const ItemEvent& Event ) Link Here
429
				{
464
				{
430
					if ( xPropertySet->getPropertyValue( TKGet( TK_State ) ) >>= nState )
465
					if ( xPropertySet->getPropertyValue( TKGet( TK_State ) ) >>= nState )
431
					{
466
					{
432
						mrOptimizerDialog.SetConfigProperty( TK_JPEGCompression, Any( nState != 0 ) );
467
						SetConfigProperty( TK_JPEGCompression, Any( nState != 0 ) );
433
						mrOptimizerDialog.setControlProperty( TKGet( TK_FixedText1Pg1 ), TKGet( TK_Enabled ), Any( nState != 0 ) );
468
						setControlProperty( TKGet( TK_FixedText1Pg1 ), TKGet( TK_Enabled ), Any( nState != 0 ) );
434
						mrOptimizerDialog.setControlProperty( TKGet( TK_FormattedField0Pg1 ), TKGet( TK_Enabled ), Any( nState != 0 ) );
469
						setControlProperty( TKGet( TK_FormattedField0Pg1 ), TKGet( TK_Enabled ), Any( nState != 0 ) );
435
					}
470
					}
436
				}
471
				}
437
				break;
472
				break;
Lines 441-491 void ItemListener::itemStateChanged( const ItemEvent& Event ) Link Here
441
					if ( xPropertySet->getPropertyValue( TKGet( TK_State ) ) >>= nInt16 )
476
					if ( xPropertySet->getPropertyValue( TKGet( TK_State ) ) >>= nInt16 )
442
					{
477
					{
443
						nInt16 ^= 1;
478
						nInt16 ^= 1;
444
						mrOptimizerDialog.SetConfigProperty( TK_OLEOptimizationType, Any( nInt16 ) );
479
						SetConfigProperty( TK_OLEOptimizationType, Any( nInt16 ) );
445
					}
480
					}
446
				}
481
				}
447
				break;
482
				break;
448
				case TK_RadioButton1Pg2 :
483
				case TK_RadioButton1Pg2 :
449
				{
484
				{
450
					if ( xPropertySet->getPropertyValue( TKGet( TK_State ) ) >>= nState )
485
					if ( xPropertySet->getPropertyValue( TKGet( TK_State ) ) >>= nState )
451
						mrOptimizerDialog.SetConfigProperty( TK_OLEOptimizationType, Any( nState ) );
486
						SetConfigProperty( TK_OLEOptimizationType, Any( nState ) );
452
				}
487
				}
453
				break;
488
				break;
454
				case TK_CheckBox0Pg3 :
489
				case TK_CheckBox0Pg3 :
455
				{
490
				{
456
					if ( xPropertySet->getPropertyValue( TKGet( TK_State ) ) >>= nState )
491
					if ( xPropertySet->getPropertyValue( TKGet( TK_State ) ) >>= nState )
457
						mrOptimizerDialog.SetConfigProperty( TK_DeleteUnusedMasterPages, Any( nState != 0 ) );
492
						SetConfigProperty( TK_DeleteUnusedMasterPages, Any( nState != 0 ) );
458
				}
493
				}
459
				break;
494
				break;
460
				case TK_CheckBox1Pg3 :
495
				case TK_CheckBox1Pg3 :
461
				{
496
				{
462
					if ( xPropertySet->getPropertyValue( TKGet( TK_State ) ) >>= nState )
497
					if ( xPropertySet->getPropertyValue( TKGet( TK_State ) ) >>= nState )
463
						mrOptimizerDialog.SetConfigProperty( TK_DeleteNotesPages, Any( nState != 0 ) );
498
						SetConfigProperty( TK_DeleteNotesPages, Any( nState != 0 ) );
464
				}
499
				}
465
				break;
500
				break;
466
				case TK_CheckBox2Pg3 :
501
				case TK_CheckBox2Pg3 :
467
				{
502
				{
468
					if ( xPropertySet->getPropertyValue( TKGet( TK_State ) ) >>= nState )
503
					if ( xPropertySet->getPropertyValue( TKGet( TK_State ) ) >>= nState )
469
						mrOptimizerDialog.SetConfigProperty( TK_DeleteHiddenSlides, Any( nState != 0 ) );
504
						SetConfigProperty( TK_DeleteHiddenSlides, Any( nState != 0 ) );
470
				}
505
				}
471
				break;
506
				break;
472
				case TK_CheckBox3Pg3 :
507
				case TK_CheckBox3Pg3 :
473
				{
508
				{
474
					if ( xPropertySet->getPropertyValue( TKGet( TK_State ) ) >>= nState )
509
					if ( xPropertySet->getPropertyValue( TKGet( TK_State ) ) >>= nState )
475
						mrOptimizerDialog.setControlProperty( TKGet( TK_ListBox0Pg3 ), TKGet( TK_Enabled ), Any( nState != 0 ) );
510
						setControlProperty( TKGet( TK_ListBox0Pg3 ), TKGet( TK_Enabled ), Any( nState != 0 ) );
476
				}
511
				}
477
				break;
512
				break;
478
				case TK_CheckBox1Pg4 :
513
				case TK_CheckBox1Pg4 :
479
				{
514
				{
480
					if ( xPropertySet->getPropertyValue( TKGet( TK_State ) ) >>= nState )
515
					if ( xPropertySet->getPropertyValue( TKGet( TK_State ) ) >>= nState )
481
						mrOptimizerDialog.setControlProperty( TKGet( TK_ComboBox0Pg4 ), TKGet( TK_Enabled ), Any( nState != 0 ) );
516
						setControlProperty( TKGet( TK_ComboBox0Pg4 ), TKGet( TK_Enabled ), Any( nState != 0 ) );
482
				}
517
				}
483
				break;
518
				break;
484
				case TK_RadioButton0Pg4 :
519
				case TK_RadioButton0Pg4 :
485
				case TK_RadioButton1Pg4 :
520
				case TK_RadioButton1Pg4 :
486
				{
521
				{
487
					if ( xPropertySet->getPropertyValue( TKGet( TK_State ) ) >>= nState )
522
					if ( xPropertySet->getPropertyValue( TKGet( TK_State ) ) >>= nState )
488
						mrOptimizerDialog.SetConfigProperty( TK_SaveAs, Any( eControl == TK_RadioButton1Pg4 ? nState != 0 : nState == 0 ) );
523
						SetConfigProperty( TK_SaveAs, Any( eControl == TK_RadioButton1Pg4 ? nState != 0 : nState == 0 ) );
489
				}
524
				}
490
				break;
525
				break;
491
				default:
526
				default:
Lines 495-587 void ItemListener::itemStateChanged( const ItemEvent& Event ) Link Here
495
	}
530
	}
496
	catch ( Exception& )
531
	catch ( Exception& )
497
	{
532
	{
498
499
	}
533
	}
500
}
534
}
501
void ItemListener::disposing( const ::com::sun::star::lang::EventObject& /* Source */ )
502
	throw ( com::sun::star::uno::RuntimeException )
503
{
504
}
505
535
506
// -----------------------------------------------------------------------------
536
// -----------------------------------------------------------------------------
507
537
508
void ActionListener::actionPerformed( const ActionEvent& rEvent )
538
void OptimizerDialog::actionPerformed( const ActionEvent& rEvent )
509
	throw ( com::sun::star::uno::RuntimeException )
539
	throw ( com::sun::star::uno::RuntimeException )
510
{
540
{
511
	switch( TKGet( rEvent.ActionCommand ) )
541
	switch( TKGet( rEvent.ActionCommand ) )
512
	{
542
	{
513
		case TK_btnNavHelp :
543
		case TK_btnNavBack :	SwitchPage( mnCurrentStep - 1 ); break;
514
		{
544
		case TK_btnNavNext :	SwitchPage( mnCurrentStep + 1 ); break;	
515
			try
516
			{
517
				static Reference< XFrame > xHelpFrame;
518
				if ( !xHelpFrame.is() )
519
				{
520
					rtl::OUString sHelpFile( mrOptimizerDialog.getPath( TK_HelpFile ) );
521
					Reference< XDesktop > desktop( mrOptimizerDialog.GetComponentContext()->getServiceManager()->createInstanceWithContext(
522
							OUString::createFromAscii( "com.sun.star.frame.Desktop" ), mrOptimizerDialog.GetComponentContext() ), UNO_QUERY_THROW );
523
					Reference< XSimpleFileAccess > xSimpleFileAccess( mrOptimizerDialog.GetComponentContext()->getServiceManager()->createInstanceWithContext(
524
							OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ), mrOptimizerDialog.GetComponentContext() ), UNO_QUERY_THROW );
525
					Reference< XInputStream > xInputStream( xSimpleFileAccess->openFileRead( sHelpFile ) );
526
					Reference< XDesktop > xDesktop( mrOptimizerDialog.GetComponentContext()->getServiceManager()->createInstanceWithContext(
527
							OUString::createFromAscii( "com.sun.star.frame.Desktop" ), mrOptimizerDialog.GetComponentContext() ), UNO_QUERY_THROW );
528
					Reference< XFrame > xDesktopFrame( xDesktop, UNO_QUERY_THROW );
529
					xHelpFrame = Reference< XFrame >( xDesktopFrame->findFrame( TKGet( TK__blank ), 0 ) );
530
					Reference< XCloseBroadcaster > xCloseBroadcaster( xHelpFrame, UNO_QUERY_THROW );
531
					xCloseBroadcaster->addCloseListener( new HelpCloseListener( xHelpFrame ) );
532
					Reference< XComponentLoader > xLoader( xHelpFrame, UNO_QUERY_THROW );
533
534
					Sequence< PropertyValue > aLoadProps( 2 );
535
					aLoadProps[ 0 ].Name = TKGet( TK_ReadOnly );
536
					aLoadProps[ 0 ].Value <<= (sal_Bool)( sal_True );
537
					aLoadProps[ 1 ].Name = TKGet( TK_InputStream );
538
					aLoadProps[ 1 ].Value <<= xInputStream;
539
540
					Reference< XComponent >( xLoader->loadComponentFromURL( OUString::createFromAscii( "private:stream" ),
541
						TKGet( TK__self ), 0, aLoadProps ) );
542
543
					Reference< XPropertySet > xPropSet( xHelpFrame, UNO_QUERY_THROW );
544
					Reference< XLayoutManager > xLayoutManager;
545
					if ( xPropSet->getPropertyValue( OUString::createFromAscii( "LayoutManager" ) ) >>= xLayoutManager )
546
					{
547
						xLayoutManager->setVisible( sal_False );                    
548
						xLayoutManager->hideElement( OUString::createFromAscii( "private:resource/menubar/menubar" ) );
549
						xLayoutManager->destroyElement( OUString::createFromAscii( "private:resource/statusbar/statusbar" ) );
550
					}
551
				}
552
			}
553
			catch( Exception& )
554
			{
555
556
			}
557
		}
558
		break;
559
		case TK_btnNavBack :	mrOptimizerDialog.SwitchPage( mrOptimizerDialog.mnCurrentStep - 1 ); break;
560
		case TK_btnNavNext :	mrOptimizerDialog.SwitchPage( mrOptimizerDialog.mnCurrentStep + 1 ); break;	
561
		case TK_btnNavFinish :
545
		case TK_btnNavFinish :
562
		{
546
		{
563
			mrOptimizerDialog.UpdateConfiguration();
547
			UpdateConfiguration();
564
548
565
			mrOptimizerDialog.SwitchPage( ITEM_ID_SUMMARY );
549
			SwitchPage( ITEM_ID_SUMMARY );
566
			mrOptimizerDialog.DisablePage( ITEM_ID_SUMMARY );
550
			DisablePage( ITEM_ID_SUMMARY );
567
			mrOptimizerDialog.setControlProperty( TKGet( TK_btnNavHelp ), TKGet( TK_Enabled ), Any( sal_False ) );
551
			setControlProperty( TKGet( TK_btnNavHelp ), TKGet( TK_Enabled ), Any( sal_False ) );
568
			mrOptimizerDialog.setControlProperty( TKGet( TK_btnNavBack ), TKGet( TK_Enabled ), Any( sal_False ) );
552
			setControlProperty( TKGet( TK_btnNavBack ), TKGet( TK_Enabled ), Any( sal_False ) );
569
			mrOptimizerDialog.setControlProperty( TKGet( TK_btnNavNext ), TKGet( TK_Enabled ), Any( sal_False ) );
553
			setControlProperty( TKGet( TK_btnNavNext ), TKGet( TK_Enabled ), Any( sal_False ) );
570
			mrOptimizerDialog.setControlProperty( TKGet( TK_btnNavFinish ), TKGet( TK_Enabled ), Any( sal_False ) );
554
			setControlProperty( TKGet( TK_btnNavFinish ), TKGet( TK_Enabled ), Any( sal_False ) );
571
			mrOptimizerDialog.setControlProperty( TKGet( TK_btnNavCancel ), TKGet( TK_Enabled ), Any( sal_False ) );
555
			setControlProperty( TKGet( TK_btnNavCancel ), TKGet( TK_Enabled ), Any( sal_False ) );
572
			mrOptimizerDialog.setControlProperty( TKGet( TK_FixedText0Pg4 ), TKGet( TK_Enabled ), Any( sal_True ) );
556
			setControlProperty( TKGet( TK_FixedText0Pg4 ), TKGet( TK_Enabled ), Any( sal_True ) );
573
557
574
			// check if we have to open the FileDialog 
558
			// check if we have to open the FileDialog 
575
			sal_Bool	bSuccessfullyExecuted = sal_True;
559
			sal_Bool	bSuccessfullyExecuted = sal_True;
576
			sal_Int16	nInt16 = 0;
560
			sal_Int16	nInt16 = 0;
577
			mrOptimizerDialog.getControlProperty( TKGet( TK_RadioButton1Pg4 ), TKGet( TK_State ) ) >>= nInt16;
561
			getControlProperty( TKGet( TK_RadioButton1Pg4 ), TKGet( TK_State ) ) >>= nInt16;
578
			if ( nInt16 )
562
			if ( nInt16 )
579
			{
563
			{
580
				rtl::OUString aSaveAsURL;
564
				rtl::OUString aSaveAsURL;
581
				FileOpenDialog aFileOpenDialog( ((UnoDialog&)mrOptimizerDialog).mxMSF );
565
				FileOpenDialog aFileOpenDialog( mxContext, Reference< XWindow >( mxParent, UNO_QUERY ) );
582
566
583
				// generating default file name
567
				// generating default file name
584
				Reference< XStorable > xStorable( mrOptimizerDialog.mxController->getModel(), UNO_QUERY );
568
				Reference< XStorable > xStorable( mxModel, UNO_QUERY );
585
				if ( xStorable.is() && xStorable->hasLocation() )
569
				if ( xStorable.is() && xStorable->hasLocation() )
586
				{
570
				{
587
					rtl::OUString aLocation( xStorable->getLocation() );
571
					rtl::OUString aLocation( xStorable->getLocation() );
Lines 608-615 void ActionListener::actionPerformed( const ActionEvent& rEvent ) Link Here
608
				if ( bDialogExecuted )
592
				if ( bDialogExecuted )
609
				{
593
				{
610
					aSaveAsURL = aFileOpenDialog.getURL();
594
					aSaveAsURL = aFileOpenDialog.getURL();
611
					mrOptimizerDialog.SetConfigProperty( TK_SaveAsURL, Any( aSaveAsURL ) );
595
					SetConfigProperty( TK_SaveAsURL, Any( aSaveAsURL ) );
612
					mrOptimizerDialog.SetConfigProperty( TK_FilterName, Any( aFileOpenDialog.getFilterName() ) );
596
					SetConfigProperty( TK_FilterName, Any( aFileOpenDialog.getFilterName() ) );
613
				}
597
				}
614
				if ( !aSaveAsURL.getLength() )
598
				if ( !aSaveAsURL.getLength() )
615
				{
599
				{
Lines 618-640 void ActionListener::actionPerformed( const ActionEvent& rEvent ) Link Here
618
				}
602
				}
619
603
620
				// waiting for 500ms
604
				// waiting for 500ms
621
				if ( mrOptimizerDialog.mxReschedule.is() )
605
				if ( mxReschedule.is() )
622
				{
606
				{
623
					mrOptimizerDialog.mxReschedule->reschedule();
607
					mxReschedule->reschedule();
624
					for ( sal_uInt32 i = osl_getGlobalTimer(); ( i + 500 ) > ( osl_getGlobalTimer() ); )
608
					for ( sal_uInt32 i = osl_getGlobalTimer(); ( i + 500 ) > ( osl_getGlobalTimer() ); )
625
					mrOptimizerDialog.mxReschedule->reschedule();
609
					mxReschedule->reschedule();
626
				}
610
				}
627
			}
611
			}
628
			if ( bSuccessfullyExecuted )
612
			if ( bSuccessfullyExecuted )
629
			{	// now check if we have to store a session template
613
			{	// now check if we have to store a session template
630
				nInt16 = 0;
614
				nInt16 = 0;
631
				OUString aSettingsName;
615
				OUString aSettingsName;
632
				mrOptimizerDialog.getControlProperty( TKGet( TK_CheckBox1Pg4 ), TKGet( TK_State ) ) >>= nInt16;
616
				getControlProperty( TKGet( TK_CheckBox1Pg4 ), TKGet( TK_State ) ) >>= nInt16;
633
				mrOptimizerDialog.getControlProperty( TKGet( TK_ComboBox0Pg4 ), TKGet( TK_Text ) ) >>= aSettingsName;
617
				getControlProperty( TKGet( TK_ComboBox0Pg4 ), TKGet( TK_Text ) ) >>= aSettingsName;
634
				if ( nInt16 && aSettingsName.getLength() )
618
				if ( nInt16 && aSettingsName.getLength() )
635
				{
619
				{
636
					std::vector< OptimizerSettings >::iterator aIter( mrOptimizerDialog.GetOptimizerSettingsByName( aSettingsName ) );
620
					std::vector< OptimizerSettings >::iterator aIter( GetOptimizerSettingsByName( aSettingsName ) );
637
					std::vector< OptimizerSettings >& rSettings( mrOptimizerDialog.GetOptimizerSettings() );
621
					std::vector< OptimizerSettings >& rSettings( GetOptimizerSettings() );
638
					OptimizerSettings aNewSettings( rSettings[ 0 ] );
622
					OptimizerSettings aNewSettings( rSettings[ 0 ] );
639
					aNewSettings.maName = aSettingsName;
623
					aNewSettings.maName = aSettingsName;
640
					if ( aIter == rSettings.end() )
624
					if ( aIter == rSettings.end() )
Lines 646-655 void ActionListener::actionPerformed( const ActionEvent& rEvent ) Link Here
646
			if ( bSuccessfullyExecuted )
630
			if ( bSuccessfullyExecuted )
647
			{
631
			{
648
				Sequence< Any > aArgs( 1 );
632
				Sequence< Any > aArgs( 1 );
649
				aArgs[ 0 ] <<= mrOptimizerDialog.GetFrame();
633
				aArgs[ 0 ] <<= mxFrame;
650
634
651
				Reference < XDispatch > xDispatch( mrOptimizerDialog.GetComponentContext()->getServiceManager()->createInstanceWithArgumentsAndContext(
635
				Reference < XDispatch > xDispatch( mxContext->getServiceManager()->createInstanceWithArgumentsAndContext(
652
					OUString::createFromAscii( "com.sun.star.comp.PPPOptimizer" ), aArgs, mrOptimizerDialog.GetComponentContext() ), UNO_QUERY );
636
					OUString::createFromAscii( "com.sun.star.comp.PPPOptimizer" ), aArgs, mxContext ), UNO_QUERY );
653
637
654
				URL aURL;
638
				URL aURL;
655
				aURL.Protocol = OUString( RTL_CONSTASCII_USTRINGPARAM( "vnd.com.sun.star.comp.PPPOptimizer:" ) );
639
				aURL.Protocol = OUString( RTL_CONSTASCII_USTRINGPARAM( "vnd.com.sun.star.comp.PPPOptimizer:" ) );
Lines 657-835 void ActionListener::actionPerformed( const ActionEvent& rEvent ) Link Here
657
641
658
				Sequence< PropertyValue > lArguments( 3 );
642
				Sequence< PropertyValue > lArguments( 3 );
659
				lArguments[ 0 ].Name = TKGet( TK_Settings );
643
				lArguments[ 0 ].Name = TKGet( TK_Settings );
660
				lArguments[ 0 ].Value <<= mrOptimizerDialog.GetConfigurationSequence();
644
				lArguments[ 0 ].Value <<= GetConfigurationSequence();
661
				lArguments[ 1 ].Name = TKGet( TK_StatusDispatcher );
645
				lArguments[ 1 ].Name = TKGet( TK_StatusListener );
662
				lArguments[ 1 ].Value <<= mrOptimizerDialog.GetStatusDispatcher();
646
				lArguments[ 1 ].Value <<= Reference< XStatusListener >( this );
663
				lArguments[ 2 ].Name = TKGet( TK_InformationDialog );
647
				lArguments[ 2 ].Name = TKGet( TK_ParentWindow );
664
				lArguments[ 2 ].Value <<= mrOptimizerDialog.GetFrame();
648
				lArguments[ 2 ].Value <<= mxDialogWindowPeer;
665
649
666
				if( xDispatch.is() )
650
				if( xDispatch.is() )
667
					xDispatch->dispatch( aURL, lArguments );
651
					xDispatch->dispatch( aURL, lArguments );
668
652
669
				mrOptimizerDialog.endExecute( bSuccessfullyExecuted );
653
				endExecute( bSuccessfullyExecuted );
670
			}
654
			}
671
			else
655
			else
672
			{
656
			{
673
				mrOptimizerDialog.setControlProperty( TKGet( TK_btnNavHelp ), TKGet( TK_Enabled ), Any( sal_True ) );
657
				setControlProperty( TKGet( TK_btnNavHelp ), TKGet( TK_Enabled ), Any( sal_True ) );
674
				mrOptimizerDialog.setControlProperty( TKGet( TK_btnNavBack ), TKGet( TK_Enabled ), Any( sal_True ) );
658
				setControlProperty( TKGet( TK_btnNavBack ), TKGet( TK_Enabled ), Any( sal_True ) );
675
				mrOptimizerDialog.setControlProperty( TKGet( TK_btnNavNext ), TKGet( TK_Enabled ), Any( sal_False ) );
659
				setControlProperty( TKGet( TK_btnNavNext ), TKGet( TK_Enabled ), Any( sal_False ) );
676
				mrOptimizerDialog.setControlProperty( TKGet( TK_btnNavFinish ), TKGet( TK_Enabled ), Any( sal_True ) );
660
				setControlProperty( TKGet( TK_btnNavFinish ), TKGet( TK_Enabled ), Any( sal_True ) );
677
				mrOptimizerDialog.setControlProperty( TKGet( TK_btnNavCancel ), TKGet( TK_Enabled ), Any( sal_True ) );
661
				setControlProperty( TKGet( TK_btnNavCancel ), TKGet( TK_Enabled ), Any( sal_True ) );
678
				mrOptimizerDialog.EnablePage( ITEM_ID_SUMMARY );
662
				EnablePage( ITEM_ID_SUMMARY );
679
			}
663
			}
680
		}
664
		}
681
		break;
665
		break;
682
		case TK_btnNavCancel :	mrOptimizerDialog.endExecute( sal_False ); break;
666
		case TK_btnNavCancel :	endExecute( sal_False ); break;
683
		case TK_Button0Pg0 :	// delete configuration
667
		case TK_Button0Pg0 :	// delete configuration
684
		{
668
		{
685
			OUString aSelectedItem( mrOptimizerDialog.GetSelectedString( TK_ListBox0Pg0 ) );
669
			OUString aSelectedItem( GetSelectedString( TK_ListBox0Pg0 ) );
686
			if ( aSelectedItem.getLength() )
670
			if ( aSelectedItem.getLength() )
687
			{
671
			{
688
				std::vector< OptimizerSettings >::iterator aIter( mrOptimizerDialog.GetOptimizerSettingsByName( aSelectedItem ) );
672
				std::vector< OptimizerSettings >::iterator aIter( GetOptimizerSettingsByName( aSelectedItem ) );
689
				std::vector< OptimizerSettings >& rList( mrOptimizerDialog.GetOptimizerSettings() );
673
				std::vector< OptimizerSettings >& rList( GetOptimizerSettings() );
690
				if ( aIter != rList.end() )
674
				if ( aIter != rList.end() )
691
				{
675
				{
692
					rList.erase( aIter );
676
					rList.erase( aIter );
693
					mrOptimizerDialog.UpdateControlStates();
677
					UpdateControlStates();
694
				}
678
				}
695
			}
679
			}
696
		}
680
		}
697
		break;
681
		break;
698
		default: break;
682
		default:
683
        {
684
            Reference< XControl > xControl( rEvent.Source, UNO_QUERY );
685
            if ( xControl.is() )
686
            {
687
                OUString aName;
688
                Reference< XPropertySet > xProps( xControl->getModel(), UNO_QUERY );
689
                xProps->getPropertyValue( TKGet( TK_Name ) ) >>= aName;
690
                if ( TKGet( aName ) == TK_ListBox0Pg0 )
691
                {
692
                    if ( rEvent.ActionCommand.getLength() )
693
                    {
694
                        std::vector< OptimizerSettings >::iterator aIter( GetOptimizerSettingsByName( rEvent.ActionCommand ) );
695
                        std::vector< OptimizerSettings >& rList( GetOptimizerSettings() );
696
                        if ( aIter != rList.end() )
697
                            rList[ 0 ] = *aIter;
698
                    }
699
                    UpdateControlStates();
700
                }
701
            }
702
        }
703
            break;
699
	}
704
	}
700
}
705
}
701
void ActionListener::disposing( const ::com::sun::star::lang::EventObject& /* Source */ )
702
	throw ( com::sun::star::uno::RuntimeException )
703
{
704
}
705
706
706
// -----------------------------------------------------------------------------
707
// -----------------------------------------------------------------------------
707
708
708
void ActionListenerListBox0Pg0::actionPerformed( const ActionEvent& rEvent )
709
void OptimizerDialog::textChanged( const TextEvent& rEvent )
709
	throw ( com::sun::star::uno::RuntimeException )
710
	throw ( com::sun::star::uno::RuntimeException )
710
{
711
{
711
	if ( rEvent.ActionCommand.getLength() )
712
    Reference< XSpinField > xFormattedField( rEvent.Source, UNO_QUERY );
712
	{
713
    if ( xFormattedField.is() )
713
		std::vector< OptimizerSettings >::iterator aIter( mrOptimizerDialog.GetOptimizerSettingsByName( rEvent.ActionCommand ) );
714
    {
714
		std::vector< OptimizerSettings >& rList( mrOptimizerDialog.GetOptimizerSettings() );
715
        double fDouble = 0;
715
		if ( aIter != rList.end() )
716
        Any aAny = getControlProperty( TKGet( TK_FormattedField0Pg1 ), TKGet( TK_EffectiveValue ) );
716
			rList[ 0 ] = *aIter;
717
        if ( aAny >>= fDouble )
717
	}
718
            SetConfigProperty( TK_JPEGQuality, Any( (sal_Int32)fDouble ) );
718
	mrOptimizerDialog.UpdateControlStates();
719
        return;
719
}
720
    }
720
void ActionListenerListBox0Pg0::disposing( const ::com::sun::star::lang::EventObject& /* Source */ )
721
	throw ( com::sun::star::uno::RuntimeException )
722
{
723
}
724
725
// -----------------------------------------------------------------------------
726
727
void TextListenerFormattedField0Pg1::textChanged( const TextEvent& /* rEvent */ )
728
	throw ( com::sun::star::uno::RuntimeException )
729
{
730
	double fDouble = 0;
731
	Any aAny = mrOptimizerDialog.getControlProperty( TKGet( TK_FormattedField0Pg1 ), TKGet( TK_EffectiveValue ) );
732
	if ( aAny >>= fDouble )
733
		mrOptimizerDialog.SetConfigProperty( TK_JPEGQuality, Any( (sal_Int32)fDouble ) );
734
}
735
void TextListenerFormattedField0Pg1::disposing( const ::com::sun::star::lang::EventObject& /* Source */ )
736
	throw ( com::sun::star::uno::RuntimeException )
737
{
738
}
739
740
// -----------------------------------------------------------------------------
741
721
742
void TextListenerComboBox0Pg1::textChanged( const TextEvent& /* rEvent */ )
722
    Reference< XComboBox > xComboBox( rEvent.Source, UNO_QUERY );
743
	throw ( com::sun::star::uno::RuntimeException )
723
    if ( xComboBox.is() )
744
{
724
    {
745
	rtl::OUString aString;
725
        rtl::OUString aString;
746
	Any aAny = mrOptimizerDialog.getControlProperty( TKGet( TK_ComboBox0Pg1 ), TKGet( TK_Text ) );
726
        Any aAny = getControlProperty( TKGet( TK_ComboBox0Pg1 ), TKGet( TK_Text ) );
747
	if ( aAny >>= aString )
727
        if ( aAny >>= aString )
748
	{
728
        {
749
		sal_Int32 nI0, nI1, nI2, nI3, nI4;
729
            sal_Int32 nI0, nI1, nI2, nI3, nI4;
750
		nI0 = nI1 = nI2 = nI3 = nI4 = 0;
730
            nI0 = nI1 = nI2 = nI3 = nI4 = 0;
751
731
752
		if ( mrOptimizerDialog.getString( STR_IMAGE_RESOLUTION_0 ).getToken( 1, ';', nI0 ) == aString )
732
            if ( getString( STR_IMAGE_RESOLUTION_0 ).getToken( 1, ';', nI0 ) == aString )
753
			aString = mrOptimizerDialog.getString( STR_IMAGE_RESOLUTION_0 ).getToken( 0, ';', nI4 );
733
                aString = getString( STR_IMAGE_RESOLUTION_0 ).getToken( 0, ';', nI4 );
754
		else if ( mrOptimizerDialog.getString( STR_IMAGE_RESOLUTION_1 ).getToken( 1, ';', nI1 ) == aString )
734
            else if ( getString( STR_IMAGE_RESOLUTION_1 ).getToken( 1, ';', nI1 ) == aString )
755
			aString = mrOptimizerDialog.getString( STR_IMAGE_RESOLUTION_1 ).getToken( 0, ';', nI4 );
735
                aString = getString( STR_IMAGE_RESOLUTION_1 ).getToken( 0, ';', nI4 );
756
		else if ( mrOptimizerDialog.getString( STR_IMAGE_RESOLUTION_2 ).getToken( 1, ';', nI2 ) == aString )
736
            else if ( getString( STR_IMAGE_RESOLUTION_2 ).getToken( 1, ';', nI2 ) == aString )
757
			aString = mrOptimizerDialog.getString( STR_IMAGE_RESOLUTION_2 ).getToken( 0, ';', nI4 );
737
                aString = getString( STR_IMAGE_RESOLUTION_2 ).getToken( 0, ';', nI4 );
758
		else if ( mrOptimizerDialog.getString( STR_IMAGE_RESOLUTION_3 ).getToken( 1, ';', nI3 ) == aString )
738
            else if ( getString( STR_IMAGE_RESOLUTION_3 ).getToken( 1, ';', nI3 ) == aString )
759
			aString = mrOptimizerDialog.getString( STR_IMAGE_RESOLUTION_3 ).getToken( 0, ';', nI4 );
739
                aString = getString( STR_IMAGE_RESOLUTION_3 ).getToken( 0, ';', nI4 );
760
740
761
		mrOptimizerDialog.SetConfigProperty( TK_ImageResolution, Any( aString.toInt32() ) );
741
            SetConfigProperty( TK_ImageResolution, Any( aString.toInt32() ) );
762
	}
742
        }
763
}
743
    }
764
void TextListenerComboBox0Pg1::disposing( const ::com::sun::star::lang::EventObject& /* Source */ )
765
	throw ( com::sun::star::uno::RuntimeException )
766
{
767
}
744
}
768
745
769
// -----------------------------------------------------------------------------
746
// -----------------------------------------------------------------------------
770
747
771
void SpinListenerFormattedField0Pg1::up( const SpinEvent& /* rEvent */ )
748
void OptimizerDialog::up( const SpinEvent& /* rEvent */ )
772
	throw ( com::sun::star::uno::RuntimeException )
749
	throw ( com::sun::star::uno::RuntimeException )
773
{
750
{
774
	double fDouble;
751
	double fDouble;
775
	Any aAny = mrOptimizerDialog.getControlProperty( TKGet( TK_FormattedField0Pg1 ), TKGet( TK_EffectiveValue ) );
752
	Any aAny = getControlProperty( TKGet( TK_FormattedField0Pg1 ), TKGet( TK_EffectiveValue ) );
776
	if ( aAny >>= fDouble )
753
	if ( aAny >>= fDouble )
777
	{
754
	{
778
		fDouble += 9;
755
		fDouble += 9;
779
		if ( fDouble > 100 )
756
		if ( fDouble > 100 )
780
			fDouble = 100;
757
			fDouble = 100;
781
		mrOptimizerDialog.setControlProperty( TKGet( TK_FormattedField0Pg1 ), TKGet( TK_EffectiveValue ), Any( fDouble ) );	
758
		setControlProperty( TKGet( TK_FormattedField0Pg1 ), TKGet( TK_EffectiveValue ), Any( fDouble ) );	
782
		mrOptimizerDialog.SetConfigProperty( TK_JPEGQuality, Any( (sal_Int32)fDouble ) );
759
		SetConfigProperty( TK_JPEGQuality, Any( (sal_Int32)fDouble ) );
783
	}
760
	}
784
}
761
}
785
void SpinListenerFormattedField0Pg1::down( const SpinEvent& /* rEvent */ )
762
763
void OptimizerDialog::down( const SpinEvent& /* rEvent */ )
786
	throw ( com::sun::star::uno::RuntimeException )
764
	throw ( com::sun::star::uno::RuntimeException )
787
{
765
{
788
	double fDouble;
766
	double fDouble;
789
	Any aAny = mrOptimizerDialog.getControlProperty( TKGet( TK_FormattedField0Pg1 ), TKGet( TK_EffectiveValue ) );
767
	Any aAny = getControlProperty( TKGet( TK_FormattedField0Pg1 ), TKGet( TK_EffectiveValue ) );
790
	if ( aAny >>= fDouble )
768
	if ( aAny >>= fDouble )
791
	{
769
	{
792
		fDouble -= 9;
770
		fDouble -= 9;
793
		if ( fDouble < 0 )
771
		if ( fDouble < 0 )
794
			fDouble = 0;
772
			fDouble = 0;
795
		mrOptimizerDialog.setControlProperty( TKGet( TK_FormattedField0Pg1 ), TKGet( TK_EffectiveValue ), Any( fDouble ) );	
773
		setControlProperty( TKGet( TK_FormattedField0Pg1 ), TKGet( TK_EffectiveValue ), Any( fDouble ) );	
796
		mrOptimizerDialog.SetConfigProperty( TK_JPEGQuality, Any( (sal_Int32)fDouble ) );
774
		SetConfigProperty( TK_JPEGQuality, Any( (sal_Int32)fDouble ) );
797
	}
775
	}
798
}
776
}
799
void SpinListenerFormattedField0Pg1::first( const SpinEvent& /* rEvent */ )
777
800
	throw ( com::sun::star::uno::RuntimeException )
778
void OptimizerDialog::first( const SpinEvent& /* rEvent */ )
801
{
802
	mrOptimizerDialog.setControlProperty( TKGet( TK_FormattedField0Pg1 ), TKGet( TK_EffectiveValue ), Any( static_cast< double >( 0 ) ) );	
803
	mrOptimizerDialog.SetConfigProperty( TK_JPEGQuality, Any( (sal_Int32)0 ) );
804
}
805
void SpinListenerFormattedField0Pg1::last( const SpinEvent& /* rEvent */ )
806
	throw ( com::sun::star::uno::RuntimeException )
779
	throw ( com::sun::star::uno::RuntimeException )
807
{
780
{
808
	mrOptimizerDialog.setControlProperty( TKGet( TK_FormattedField0Pg1 ), TKGet( TK_EffectiveValue ), Any( static_cast< double >( 100 ) ) );	
781
	setControlProperty( TKGet( TK_FormattedField0Pg1 ), TKGet( TK_EffectiveValue ), Any( static_cast< double >( 0 ) ) );	
809
	mrOptimizerDialog.SetConfigProperty( TK_JPEGQuality, Any( (sal_Int32)100 ) );
782
	SetConfigProperty( TK_JPEGQuality, Any( (sal_Int32)0 ) );
810
}
783
}
811
void SpinListenerFormattedField0Pg1::disposing( const ::com::sun::star::lang::EventObject& /* Source */ )
784
785
void OptimizerDialog::last( const SpinEvent& /* rEvent */ )
812
	throw ( com::sun::star::uno::RuntimeException )
786
	throw ( com::sun::star::uno::RuntimeException )
813
{
787
{
788
	setControlProperty( TKGet( TK_FormattedField0Pg1 ), TKGet( TK_EffectiveValue ), Any( static_cast< double >( 100 ) ) );	
789
	SetConfigProperty( TK_JPEGQuality, Any( (sal_Int32)100 ) );
814
}
790
}
815
791
816
// -----------------------------------------------------------------------------
817
818
void HelpCloseListener::addCloseListener( const Reference < XCloseListener >& ) throw( RuntimeException )
819
{
820
}
821
void HelpCloseListener::removeCloseListener( const Reference < XCloseListener >& ) throw( RuntimeException )
822
{
823
}
824
void HelpCloseListener::queryClosing( const EventObject&, sal_Bool /* bDeliverOwnership */ )
825
        throw ( RuntimeException, CloseVetoException )
826
{
827
}
828
void HelpCloseListener::notifyClosing( const EventObject& )
829
        throw ( RuntimeException )
830
{
831
}
832
void HelpCloseListener::disposing( const EventObject& ) throw ( RuntimeException )
833
{
834
    mrXFrame = NULL;
835
}
(-)a/main/sdext/source/minimizer/optimizerdialog.hxx (-145 / +115 lines)
Lines 51-56 Link Here
51
#include <com/sun/star/frame/XDispatch.hpp>
51
#include <com/sun/star/frame/XDispatch.hpp>
52
#include <com/sun/star/frame/XDesktop.hpp>
52
#include <com/sun/star/frame/XDesktop.hpp>
53
#include <com/sun/star/awt/PushButtonType.hpp>
53
#include <com/sun/star/awt/PushButtonType.hpp>
54
#include <cppuhelper/implbase5.hxx>
55
#include <cppuhelper/implbase1.hxx>
54
56
55
#define MAX_STEP		4
57
#define MAX_STEP		4
56
#define OD_DIALOG_WIDTH	330
58
#define OD_DIALOG_WIDTH	330
Lines 66-101 Link Here
66
// -------------------
68
// -------------------
67
// - OPTIMIZERDIALOG -
69
// - OPTIMIZERDIALOG -
68
// -------------------
70
// -------------------
69
class OptimizerDialog : public UnoDialog, public ConfigurationAccess
71
72
typedef ::cppu::WeakImplHelper5<
73
    com::sun::star::frame::XStatusListener,
74
    com::sun::star::awt::XSpinListener,
75
    com::sun::star::awt::XItemListener,
76
    com::sun::star::awt::XActionListener,
77
    com::sun::star::awt::XTextListener > OptimizerDialog_Base;
78
79
class OptimizerDialog : public UnoDialog, public ConfigurationAccess, public OptimizerDialog_Base
70
{
80
{
71
public :
81
public :
72
82
73
	OptimizerDialog( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxMSF, com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rxFrame,
83
    OptimizerDialog( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext,
74
		com::sun::star::uno::Reference< com::sun::star::frame::XDispatch > rxStatusDispatcher );
84
                     const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& xFrame,
85
                     const com::sun::star::uno::Reference< com::sun::star::awt::XWindowPeer >& rxParent );
75
    ~OptimizerDialog();
86
    ~OptimizerDialog();
76
87
77
	sal_Bool				execute();
88
    virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& aState ) throw (::com::sun::star::uno::RuntimeException);
89
    virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& aSource ) throw (::com::sun::star::uno::RuntimeException);
78
90
79
	sal_Int16				mnCurrentStep;
91
    virtual void SAL_CALL up( const ::com::sun::star::awt::SpinEvent& Event ) throw ( com::sun::star::uno::RuntimeException );
80
	sal_Int16				mnTabIndex;
92
    virtual void SAL_CALL down( const ::com::sun::star::awt::SpinEvent& Event ) throw ( com::sun::star::uno::RuntimeException );
81
	sal_Bool				mbIsReadonly;
93
    virtual void SAL_CALL first( const ::com::sun::star::awt::SpinEvent& Event ) throw ( com::sun::star::uno::RuntimeException );
94
    virtual void SAL_CALL last( const ::com::sun::star::awt::SpinEvent& Event ) throw ( com::sun::star::uno::RuntimeException );
95
    virtual void SAL_CALL itemStateChanged( const ::com::sun::star::awt::ItemEvent& Event ) throw ( com::sun::star::uno::RuntimeException );
96
    virtual void SAL_CALL actionPerformed( const ::com::sun::star::awt::ActionEvent& Event ) throw ( com::sun::star::uno::RuntimeException );
97
    virtual void SAL_CALL textChanged( const ::com::sun::star::awt::TextEvent& Event ) throw ( com::sun::star::uno::RuntimeException );
82
98
83
private :
99
	sal_Bool				execute();
84
	com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >mxMSF;
85
	com::sun::star::uno::Reference< com::sun::star::frame::XFrame >			mxFrame;
86
100
101
private :
102
    com::sun::star::uno::Reference< com::sun::star::frame::XFrame >         mxFrame;
103
    sal_Int16               mnCurrentStep;
104
    sal_Int16               mnTabIndex;
105
    sal_Bool                mbIsReadonly;
106
    com::sun::star::uno::Reference< com::sun::star::frame::XModel >         mxModel;
87
	com::sun::star::uno::Reference< com::sun::star::uno::XInterface >		mxRoadmapControl;
107
	com::sun::star::uno::Reference< com::sun::star::uno::XInterface >		mxRoadmapControl;
88
	com::sun::star::uno::Reference< com::sun::star::uno::XInterface >		mxRoadmapControlModel;
108
	com::sun::star::uno::Reference< com::sun::star::uno::XInterface >		mxRoadmapControlModel;
89
109
90
	com::sun::star::uno::Reference< com::sun::star::awt::XItemListener >	mxItemListener;
91
	com::sun::star::uno::Reference< com::sun::star::awt::XActionListener >	mxActionListener;
92
	com::sun::star::uno::Reference< com::sun::star::awt::XActionListener >	mxActionListenerListBox0Pg0;
93
	com::sun::star::uno::Reference< com::sun::star::awt::XTextListener >	mxTextListenerFormattedField0Pg1;
94
	com::sun::star::uno::Reference< com::sun::star::awt::XTextListener >	mxTextListenerComboBox0Pg1;
95
	com::sun::star::uno::Reference< com::sun::star::awt::XSpinListener >	mxSpinListenerFormattedField0Pg1;
96
	com::sun::star::uno::Reference< com::sun::star::frame::XDispatch >		mxStatusDispatcher;
97
98
	std::vector< std::vector< rtl::OUString > > maControlPages;
110
	std::vector< std::vector< rtl::OUString > > maControlPages;
111
    OptimizationStats maStats;
99
112
100
	void InitDialog();
113
	void InitDialog();
101
	void InitRoadmap();
114
	void InitRoadmap();
Lines 113-245 private : Link Here
113
126
114
	void ActivatePage( sal_Int16 nStep );
127
	void ActivatePage( sal_Int16 nStep );
115
	void DeactivatePage( sal_Int16 nStep );
128
	void DeactivatePage( sal_Int16 nStep );
116
	void InsertRoadmapItem( const sal_Int32 nIndex, const sal_Bool bEnabled, const rtl::OUString& rLabel, const sal_Int32 nItemID );
129
    void EnablePage( sal_Int16 nStep );
117
130
    void DisablePage( sal_Int16 nStep );
118
public :
131
    void SwitchPage( sal_Int16 nNewStep );
119
132
120
	OptimizationStats maStats;
133
    // the ConfigurationAccess is updated to actual control settings
121
134
    void UpdateConfiguration();
122
	void UpdateStatus( const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& rStatus );
135
    void UpdateStatus( const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& rStatus );
123
136
    void UpdateControlStates( sal_Int16 nStep = -1 );
124
	// the ConfigurationAccess is updated to actual control settings
137
125
	void UpdateConfiguration();
138
    rtl::OUString GetSelectedString( PPPOptimizerTokenEnum eListBox );
126
139
    void ImplSetBold( const rtl::OUString& rControl );
127
	void EnablePage( sal_Int16 nStep );
140
    void InsertRoadmapItem( const sal_Int32 nIndex,
128
	void DisablePage( sal_Int16 nStep );
141
                            const sal_Bool bEnabled,
129
142
                            const rtl::OUString& rLabel,
130
	void SwitchPage( sal_Int16 nNewStep );
143
                            const sal_Int32 nItemID );
131
	void UpdateControlStates( sal_Int16 nStep = -1 );
144
    rtl::OUString ImplInsertSeparator( const rtl::OUString& rControlName,
132
145
                                       sal_Int32 nOrientation,
133
	rtl::OUString GetSelectedString( PPPOptimizerTokenEnum eListBox );
146
                                       sal_Int32 nPosX,
134
	com::sun::star::uno::Reference< com::sun::star::frame::XDispatch >& GetStatusDispatcher() { return mxStatusDispatcher; };
147
                                       sal_Int32 nPosY,
135
	com::sun::star::uno::Reference< com::sun::star::frame::XFrame>& GetFrame() { return mxFrame; };
148
                                       sal_Int32 nWidth,
136
	const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& GetComponentContext() { return mxMSF; };
149
                                       sal_Int32 nHeight );
150
    rtl::OUString ImplInsertButton( const rtl::OUString& rControlName,
151
                                    const rtl::OUString& rHelpURL,
152
                                    sal_Int32 nXPos,
153
                                    sal_Int32 nYPos,
154
                                    sal_Int32 nWidth,
155
                                    sal_Int32 nHeight,
156
                                    sal_Int16 nTabIndex,
157
                                    sal_Bool bEnabled,
158
                                    sal_Int32 nResID,
159
                                    sal_Int16 nPushButtonType );
160
    rtl::OUString ImplInsertFixedText( const rtl::OUString& rControlName,
161
                                       const rtl::OUString& rLabel,
162
                                       sal_Int32 nXPos,
163
                                       sal_Int32 nYPos,
164
                                       sal_Int32 nWidth,
165
                                       sal_Int32 nHeight,
166
                                       sal_Bool bMultiLine,
167
                                       sal_Bool bBold,
168
                                       sal_Int16 nTabIndex );
169
    rtl::OUString ImplInsertCheckBox( const rtl::OUString& rControlName,
170
                                      const rtl::OUString& rLabel,
171
                                      const rtl::OUString& rHelpURL,
172
                                      sal_Int32 nXPos,
173
                                      sal_Int32 nYPos,
174
                                      sal_Int32 nWidth,
175
                                      sal_Int32 nHeight,
176
                                      sal_Int16 nTabIndex );
177
    rtl::OUString ImplInsertFormattedField( const rtl::OUString& rControlName,
178
                                            const rtl::OUString& rHelpURL,
179
                                            sal_Int32 nXPos,
180
                                            sal_Int32 nYPos,
181
                                            sal_Int32 nWidth,
182
                                            double fEffectiveMin,
183
                                            double fEffectiveMax,
184
                                            sal_Int16 nTabIndex );
185
    rtl::OUString ImplInsertComboBox( const rtl::OUString& rControlName,
186
                                      const rtl::OUString& rHelpURL,
187
                                      const sal_Bool bEnabled,
188
                                      const com::sun::star::uno::Sequence< rtl::OUString >& rItemList,
189
                                      sal_Int32 nXPos,
190
                                      sal_Int32 nYPos,
191
                                      sal_Int32 nWidth,
192
                                      sal_Int32 nHeight,
193
                                      sal_Int16 nTabIndex,
194
                                      bool bListen = true );
195
    rtl::OUString ImplInsertRadioButton( const rtl::OUString& rControlName,
196
                                         const rtl::OUString& rLabel,
197
                                         const rtl::OUString& rHelpURL,
198
                                         sal_Int32 nXPos,
199
                                         sal_Int32 nYPos,
200
                                         sal_Int32 nWidth,
201
                                         sal_Int32 nHeight,
202
                                         sal_Bool bMultiLine,
203
                                         sal_Int16 nTabIndex );
204
    rtl::OUString ImplInsertListBox( const rtl::OUString& rControlName,
205
                                     const rtl::OUString& rHelpURL,
206
                                     const sal_Bool bEnabled,
207
                                     const com::sun::star::uno::Sequence< rtl::OUString >& rItemList,
208
                                     sal_Int32 nXPos,
209
                                     sal_Int32 nYPos,
210
                                     sal_Int32 nWidth,
211
                                     sal_Int32 nHeight,
212
                                     sal_Int16 nTabIndex );
137
};
213
};
138
214
139
// -----------------------------------------------------------------------------
140
141
class ItemListener : public ::cppu::WeakImplHelper1< com::sun::star::awt::XItemListener >
142
{
143
public:
144
	ItemListener( OptimizerDialog& rOptimizerDialog ) : mrOptimizerDialog( rOptimizerDialog ){};
145
146
    virtual void SAL_CALL itemStateChanged( const ::com::sun::star::awt::ItemEvent& Event ) throw ( com::sun::star::uno::RuntimeException );
147
	virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw ( com::sun::star::uno::RuntimeException);
148
private:
149
150
	OptimizerDialog& mrOptimizerDialog;
151
};
152
153
// -----------------------------------------------------------------------------
154
155
class ActionListener : public ::cppu::WeakImplHelper1< com::sun::star::awt::XActionListener >
156
{
157
public:
158
	ActionListener( OptimizerDialog& rOptimizerDialog ) : mrOptimizerDialog( rOptimizerDialog ){};
159
160
    virtual void SAL_CALL actionPerformed( const ::com::sun::star::awt::ActionEvent& Event ) throw ( com::sun::star::uno::RuntimeException );
161
	virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw ( com::sun::star::uno::RuntimeException);
162
private:
163
	
164
	OptimizerDialog& mrOptimizerDialog;
165
};
166
167
// -----------------------------------------------------------------------------
168
169
class ActionListenerListBox0Pg0 : public ::cppu::WeakImplHelper1< com::sun::star::awt::XActionListener >
170
{
171
public:
172
	ActionListenerListBox0Pg0( OptimizerDialog& rOptimizerDialog ) : mrOptimizerDialog( rOptimizerDialog ){};
173
174
    virtual void SAL_CALL actionPerformed( const ::com::sun::star::awt::ActionEvent& Event ) throw ( com::sun::star::uno::RuntimeException );
175
	virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw ( com::sun::star::uno::RuntimeException);
176
private:
177
	
178
	OptimizerDialog& mrOptimizerDialog;
179
};
180
181
// -----------------------------------------------------------------------------
182
183
class TextListenerFormattedField0Pg1 : public ::cppu::WeakImplHelper1< com::sun::star::awt::XTextListener >
184
{
185
public:
186
	TextListenerFormattedField0Pg1( OptimizerDialog& rOptimizerDialog ) : mrOptimizerDialog( rOptimizerDialog ){};
187
188
    virtual void SAL_CALL textChanged( const ::com::sun::star::awt::TextEvent& Event ) throw ( com::sun::star::uno::RuntimeException );
189
	virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw ( com::sun::star::uno::RuntimeException);
190
private:
191
	
192
	OptimizerDialog& mrOptimizerDialog;
193
};
194
195
// -----------------------------------------------------------------------------
196
197
class TextListenerComboBox0Pg1 : public ::cppu::WeakImplHelper1< com::sun::star::awt::XTextListener >
198
{
199
public:
200
	TextListenerComboBox0Pg1( OptimizerDialog& rOptimizerDialog ) : mrOptimizerDialog( rOptimizerDialog ){};
201
202
    virtual void SAL_CALL textChanged( const ::com::sun::star::awt::TextEvent& Event ) throw ( com::sun::star::uno::RuntimeException );
203
	virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw ( com::sun::star::uno::RuntimeException);
204
private:
205
	
206
	OptimizerDialog& mrOptimizerDialog;
207
};
208
209
// -----------------------------------------------------------------------------
210
211
class SpinListenerFormattedField0Pg1 : public ::cppu::WeakImplHelper1< com::sun::star::awt::XSpinListener >
212
{
213
public:
214
	SpinListenerFormattedField0Pg1( OptimizerDialog& rOptimizerDialog ) : mrOptimizerDialog( rOptimizerDialog ){};
215
216
    virtual void SAL_CALL up( const ::com::sun::star::awt::SpinEvent& Event ) throw ( com::sun::star::uno::RuntimeException );
217
    virtual void SAL_CALL down( const ::com::sun::star::awt::SpinEvent& Event ) throw ( com::sun::star::uno::RuntimeException );
218
    virtual void SAL_CALL first( const ::com::sun::star::awt::SpinEvent& Event ) throw ( com::sun::star::uno::RuntimeException );
219
    virtual void SAL_CALL last( const ::com::sun::star::awt::SpinEvent& Event ) throw ( com::sun::star::uno::RuntimeException );
220
	virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw ( com::sun::star::uno::RuntimeException);
221
private:
222
	
223
	OptimizerDialog& mrOptimizerDialog;
224
};
225
226
// -----------------------------------------------------------------------------
227
228
class HelpCloseListener : public ::cppu::WeakImplHelper1< com::sun::star::util::XCloseListener >
229
{
230
public:
231
	HelpCloseListener( com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rXFrame ) : mrXFrame( rXFrame ){};
232
233
	virtual void SAL_CALL addCloseListener(const com::sun::star::uno::Reference < com::sun::star::util::XCloseListener >& ) throw( com::sun::star::uno::RuntimeException );
234
	virtual void SAL_CALL removeCloseListener( const com::sun::star::uno::Reference < com::sun::star::util::XCloseListener >& xListener ) throw( com::sun::star::uno::RuntimeException );
235
    virtual void SAL_CALL notifyClosing( const com::sun::star::lang::EventObject& aEvent ) throw (com::sun::star::uno::RuntimeException) ;
236
	virtual void SAL_CALL queryClosing( const com::sun::star::lang::EventObject& aEvent, sal_Bool bDeliverOwnership ) throw (com::sun::star::uno::RuntimeException, com::sun::star::util::CloseVetoException) ;
237
    virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& aEvent ) throw (com::sun::star::uno::RuntimeException) ;
238
239
private:
240
	
241
	com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& mrXFrame;
242
};
243
244
245
#endif // OPTIMIZERDIALOG_HXX
215
#endif // OPTIMIZERDIALOG_HXX
(-)a/main/sdext/source/minimizer/optimizerdialogcontrols.cxx (-109 / +180 lines)
Lines 25-30 Link Here
25
#include "precompiled_sdext.hxx"
25
#include "precompiled_sdext.hxx"
26
26
27
#include "optimizerdialog.hxx"
27
#include "optimizerdialog.hxx"
28
#include "minimizer.hrc"
29
#include "helpid.hrc"
28
30
29
// -------------------
31
// -------------------
30
// - OptimizerDialog -
32
// - OptimizerDialog -
Lines 41-47 Link Here
41
#endif
43
#endif
42
#include <rtl/ustrbuf.hxx>
44
#include <rtl/ustrbuf.hxx>
43
45
44
using namespace ::rtl;
45
using namespace ::com::sun::star::awt;
46
using namespace ::com::sun::star::awt;
46
using namespace ::com::sun::star::uno;
47
using namespace ::com::sun::star::uno;
47
using namespace ::com::sun::star::util;
48
using namespace ::com::sun::star::util;
Lines 53-74 using namespace ::com::sun::star::drawing; Link Here
53
using namespace ::com::sun::star::container;
54
using namespace ::com::sun::star::container;
54
using namespace ::com::sun::star::presentation;
55
using namespace ::com::sun::star::presentation;
55
56
57
using ::rtl::OUString;
58
using ::rtl::OUStringBuffer;
56
// -----------------------------------------------------------------------------
59
// -----------------------------------------------------------------------------
57
60
58
void SetBold( OptimizerDialog& rOptimizerDialog, const rtl::OUString& rControl )
61
void OptimizerDialog::ImplSetBold( const rtl::OUString& rControl )
59
{
62
{
60
	FontDescriptor aFontDescriptor;
63
	FontDescriptor aFontDescriptor;
61
	if ( rOptimizerDialog.getControlProperty( rControl, TKGet( TK_FontDescriptor ) ) >>= aFontDescriptor )
64
	if ( getControlProperty( rControl, TKGet( TK_FontDescriptor ) ) >>= aFontDescriptor )
62
	{
65
	{
63
		aFontDescriptor.Weight = FontWeight::BOLD;
66
		aFontDescriptor.Weight = FontWeight::BOLD;
64
		rOptimizerDialog.setControlProperty( rControl, TKGet( TK_FontDescriptor ), Any( aFontDescriptor ) );
67
		setControlProperty( rControl, TKGet( TK_FontDescriptor ), Any( aFontDescriptor ) );
65
	}
68
	}
66
}
69
}
67
70
68
// -----------------------------------------------------------------------------
71
// -----------------------------------------------------------------------------
69
72
70
rtl::OUString InsertSeparator( OptimizerDialog& rOptimizerDialog, const OUString& rControlName, sal_Int32 nOrientation,
73
rtl::OUString OptimizerDialog::ImplInsertSeparator(
71
						sal_Int32 nPosX, sal_Int32 nPosY, sal_Int32 nWidth, sal_Int32 nHeight )
74
    const OUString& rControlName,
75
    sal_Int32 nOrientation,
76
    sal_Int32 nPosX,
77
    sal_Int32 nPosY,
78
    sal_Int32 nWidth,
79
    sal_Int32 nHeight )
72
{
80
{
73
	OUString pNames[] = {
81
	OUString pNames[] = {
74
		TKGet( TK_Height ),
82
		TKGet( TK_Height ),
Lines 91-109 rtl::OUString InsertSeparator( OptimizerDialog& rOptimizerDialog, const OUString Link Here
91
	Sequence< rtl::OUString >	aNames( pNames, nCount );
99
	Sequence< rtl::OUString >	aNames( pNames, nCount );
92
	Sequence< Any >				aValues( pValues, nCount );
100
	Sequence< Any >				aValues( pValues, nCount );
93
101
94
	rOptimizerDialog.insertControlModel( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlFixedLineModel" ) ),
102
	insertControlModel( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlFixedLineModel" ) ),
95
		rControlName, aNames, aValues );
103
		rControlName, aNames, aValues );
96
	return rControlName;
104
	return rControlName;
97
}
105
}
98
106
99
// -----------------------------------------------------------------------------
107
// -----------------------------------------------------------------------------
100
108
101
rtl::OUString InsertButton( OptimizerDialog& rOptimizerDialog, const OUString& rControlName, Reference< XActionListener >& xActionListener,
109
rtl::OUString OptimizerDialog::ImplInsertButton(
102
	sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int16 nTabIndex, sal_Bool bEnabled, PPPOptimizerTokenEnum nResID, sal_Int16 nPushButtonType )
110
    const OUString& rControlName,
111
    const rtl::OUString& rHelpURL,
112
    sal_Int32 nXPos,
113
    sal_Int32 nYPos,
114
    sal_Int32 nWidth,
115
    sal_Int32 nHeight,
116
    sal_Int16 nTabIndex,
117
    sal_Bool bEnabled,
118
    sal_Int32 nResID,
119
    sal_Int16 nPushButtonType )
103
{
120
{
104
	OUString pNames[] = {
121
	OUString pNames[] = {
105
		TKGet( TK_Enabled ),
122
		TKGet( TK_Enabled ),
106
		TKGet( TK_Height ),
123
		TKGet( TK_Height ),
124
        TKGet( TK_HelpURL ),
107
		TKGet( TK_Label ),
125
		TKGet( TK_Label ),
108
		TKGet( TK_PositionX ),
126
		TKGet( TK_PositionX ),
109
		TKGet( TK_PositionY ),
127
		TKGet( TK_PositionY ),
Lines 115-121 rtl::OUString InsertButton( OptimizerDialog& rOptimizerDialog, const OUString& r Link Here
115
	Any	pValues[] = {
133
	Any	pValues[] = {
116
		Any( bEnabled  ),
134
		Any( bEnabled  ),
117
		Any( nHeight ),
135
		Any( nHeight ),
118
		Any( rOptimizerDialog.getString( nResID ) ),
136
        Any( rHelpURL ),
137
		Any( getString( nResID ) ),
119
		Any( nXPos ),
138
		Any( nXPos ),
120
		Any( nYPos ),
139
		Any( nYPos ),
121
		Any( nPushButtonType ),
140
		Any( nPushButtonType ),
Lines 129-142 rtl::OUString InsertButton( OptimizerDialog& rOptimizerDialog, const OUString& r Link Here
129
	Sequence< rtl::OUString >	aNames( pNames, nCount );
148
	Sequence< rtl::OUString >	aNames( pNames, nCount );
130
	Sequence< Any >				aValues( pValues, nCount );
149
	Sequence< Any >				aValues( pValues, nCount );
131
150
132
	rOptimizerDialog.insertButton( rControlName, xActionListener, aNames, aValues );
151
	insertButton( rControlName, this, aNames, aValues );
133
	return rControlName;
152
	return rControlName;
134
}
153
}
135
154
136
// -----------------------------------------------------------------------------
155
// -----------------------------------------------------------------------------
137
156
138
rtl::OUString InsertFixedText( OptimizerDialog& rOptimizerDialog, const rtl::OUString& rControlName, const OUString& rLabel,
157
rtl::OUString OptimizerDialog::ImplInsertFixedText(
139
								sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth, sal_Int32 nHeight, sal_Bool bMultiLine, sal_Bool bBold, sal_Int16 nTabIndex )
158
    const rtl::OUString& rControlName,
159
    const OUString& rLabel,
160
    sal_Int32 nXPos,
161
    sal_Int32 nYPos,
162
    sal_Int32 nWidth,
163
    sal_Int32 nHeight,
164
    sal_Bool bMultiLine,
165
    sal_Bool bBold,
166
    sal_Int16 nTabIndex )
140
{
167
{
141
	OUString pNames[] = {
168
	OUString pNames[] = {
142
		TKGet( TK_Height ),
169
		TKGet( TK_Height ),
Lines 163-183 rtl::OUString InsertFixedText( OptimizerDialog& rOptimizerDialog, const rtl::OUS Link Here
163
	Sequence< rtl::OUString >	aNames( pNames, nCount );
190
	Sequence< rtl::OUString >	aNames( pNames, nCount );
164
	Sequence< Any >				aValues( pValues, nCount );
191
	Sequence< Any >				aValues( pValues, nCount );
165
192
166
	rOptimizerDialog.insertFixedText( rControlName, aNames, aValues );
193
	insertFixedText( rControlName, aNames, aValues );
167
	if ( bBold )
194
	if ( bBold )
168
		SetBold( rOptimizerDialog, rControlName );
195
		ImplSetBold( rControlName );
169
	return rControlName;
196
	return rControlName;
170
}
197
}
171
198
172
// -----------------------------------------------------------------------------
199
// -----------------------------------------------------------------------------
173
200
174
rtl::OUString InsertCheckBox( OptimizerDialog& rOptimizerDialog, const OUString& rControlName,
201
rtl::OUString OptimizerDialog::ImplInsertCheckBox(
175
	const Reference< XItemListener > xItemListener, const OUString& rLabel,
202
    const OUString& rControlName,
176
		sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int16 nTabIndex )
203
    const OUString& rLabel,
204
    const rtl::OUString& rHelpURL,
205
    sal_Int32 nXPos,
206
    sal_Int32 nYPos,
207
    sal_Int32 nWidth,
208
    sal_Int32 nHeight,
209
    sal_Int16 nTabIndex )
177
{
210
{
178
	OUString pNames[] = {
211
	OUString pNames[] = {
179
		TKGet( TK_Enabled ),
212
		TKGet( TK_Enabled ),
180
		TKGet( TK_Height ),
213
		TKGet( TK_Height ),
214
        TKGet( TK_HelpURL ),
181
		TKGet( TK_Label ),
215
		TKGet( TK_Label ),
182
		TKGet( TK_PositionX ),
216
		TKGet( TK_PositionX ),
183
		TKGet( TK_PositionY ),
217
		TKGet( TK_PositionY ),
Lines 188-193 rtl::OUString InsertCheckBox( OptimizerDialog& rOptimizerDialog, const OUString& Link Here
188
	Any	pValues[] = {
222
	Any	pValues[] = {
189
		Any( sal_True ),
223
		Any( sal_True ),
190
		Any( nHeight ),
224
		Any( nHeight ),
225
        Any( rHelpURL ),
191
		Any( rLabel ),
226
		Any( rLabel ),
192
		Any( nXPos ),
227
		Any( nXPos ),
193
		Any( nYPos ),
228
		Any( nYPos ),
Lines 200-222 rtl::OUString InsertCheckBox( OptimizerDialog& rOptimizerDialog, const OUString& Link Here
200
	Sequence< rtl::OUString >	aNames( pNames, nCount );
235
	Sequence< rtl::OUString >	aNames( pNames, nCount );
201
	Sequence< Any >				aValues( pValues, nCount );
236
	Sequence< Any >				aValues( pValues, nCount );
202
237
203
	Reference< XCheckBox > xCheckBox( rOptimizerDialog.insertCheckBox( rControlName, aNames, aValues ) );
238
	Reference< XCheckBox > xCheckBox( insertCheckBox( rControlName, aNames, aValues ) );
204
	if ( xItemListener.is() )
239
    xCheckBox->addItemListener( this );
205
		xCheckBox->addItemListener( xItemListener );
206
	return rControlName;
240
	return rControlName;
207
}
241
}
208
242
209
// -----------------------------------------------------------------------------
243
// -----------------------------------------------------------------------------
210
244
211
rtl::OUString InsertFormattedField( OptimizerDialog& rOptimizerDialog, const OUString& rControlName,
245
rtl::OUString OptimizerDialog::ImplInsertFormattedField(
212
		const Reference< XTextListener > xTextListener, const Reference< XSpinListener > xSpinListener, sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth,
246
    const OUString& rControlName,
213
			double fEffectiveMin, double fEffectiveMax, sal_Int16 nTabIndex )
247
    const rtl::OUString& rHelpURL,
248
    sal_Int32 nXPos,
249
    sal_Int32 nYPos,
250
    sal_Int32 nWidth,
251
    double fEffectiveMin,
252
    double fEffectiveMax,
253
    sal_Int16 nTabIndex )
214
{
254
{
215
	OUString pNames[] = {
255
	OUString pNames[] = {
216
		TKGet( TK_EffectiveMax ),
256
		TKGet( TK_EffectiveMax ),
217
		TKGet( TK_EffectiveMin ),
257
		TKGet( TK_EffectiveMin ),
218
		TKGet( TK_Enabled ),
258
		TKGet( TK_Enabled ),
219
		TKGet( TK_Height ),
259
		TKGet( TK_Height ),
260
        TKGet( TK_HelpURL ),
220
		TKGet( TK_PositionX ),
261
		TKGet( TK_PositionX ),
221
		TKGet( TK_PositionY ),
262
		TKGet( TK_PositionY ),
222
		TKGet( TK_Repeat ),
263
		TKGet( TK_Repeat ),
Lines 230-235 rtl::OUString InsertFormattedField( OptimizerDialog& rOptimizerDialog, const OUS Link Here
230
		Any( fEffectiveMin ),
271
		Any( fEffectiveMin ),
231
		Any( sal_True ),
272
		Any( sal_True ),
232
		Any( (sal_Int32)12 ),
273
		Any( (sal_Int32)12 ),
274
        Any( rHelpURL ),
233
		Any( nXPos ),
275
		Any( nXPos ),
234
		Any( nYPos ),
276
		Any( nYPos ),
235
		Any( (sal_Bool)sal_True ),
277
		Any( (sal_Bool)sal_True ),
Lines 243-269 rtl::OUString InsertFormattedField( OptimizerDialog& rOptimizerDialog, const OUS Link Here
243
	Sequence< rtl::OUString >	aNames( pNames, nCount );
285
	Sequence< rtl::OUString >	aNames( pNames, nCount );
244
	Sequence< Any >				aValues( pValues, nCount );
286
	Sequence< Any >				aValues( pValues, nCount );
245
287
246
	Reference< XTextComponent > xTextComponent( rOptimizerDialog.insertFormattedField( rControlName, aNames, aValues ), UNO_QUERY_THROW );
288
	Reference< XTextComponent > xTextComponent( insertFormattedField( rControlName, aNames, aValues ), UNO_QUERY_THROW );
247
	if ( xTextListener.is() )
289
    xTextComponent->addTextListener( this );
248
		xTextComponent->addTextListener( xTextListener );
290
    Reference< XSpinField > xSpinField( xTextComponent, UNO_QUERY_THROW );
249
	if ( xSpinListener.is() )
291
    xSpinField->addSpinListener( this );
250
	{
292
251
		Reference< XSpinField > xSpinField( xTextComponent, UNO_QUERY_THROW );
252
		xSpinField->addSpinListener( xSpinListener );
253
	}
254
	return rControlName;
293
	return rControlName;
255
}
294
}
256
295
257
// -----------------------------------------------------------------------------
296
// -----------------------------------------------------------------------------
258
297
259
rtl::OUString InsertComboBox( OptimizerDialog& rOptimizerDialog, const OUString& rControlName,
298
rtl::OUString OptimizerDialog::ImplInsertComboBox(
260
	const Reference< XTextListener > xTextListener, const sal_Bool bEnabled, const Sequence< OUString >& rItemList,
299
    const OUString& rControlName,
261
		sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int16 nTabIndex )
300
    const rtl::OUString& rHelpURL,
301
    const sal_Bool bEnabled,
302
    const Sequence< OUString >& rItemList,
303
    sal_Int32 nXPos,
304
    sal_Int32 nYPos,
305
    sal_Int32 nWidth,
306
    sal_Int32 nHeight,
307
    sal_Int16 nTabIndex,
308
    bool bListen )
262
{
309
{
263
	OUString pNames[] = {
310
	OUString pNames[] = {
264
		TKGet( TK_Dropdown ),
311
		TKGet( TK_Dropdown ),
265
		TKGet( TK_Enabled ),
312
		TKGet( TK_Enabled ),
266
		TKGet( TK_Height ),
313
		TKGet( TK_Height ),
314
        TKGet( TK_HelpURL ),
267
		TKGet( TK_LineCount ),
315
		TKGet( TK_LineCount ),
268
		TKGet( TK_PositionX ),
316
		TKGet( TK_PositionX ),
269
		TKGet( TK_PositionY ),
317
		TKGet( TK_PositionY ),
Lines 276-281 rtl::OUString InsertComboBox( OptimizerDialog& rOptimizerDialog, const OUString& Link Here
276
		Any( sal_True ),
324
		Any( sal_True ),
277
		Any( bEnabled ),
325
		Any( bEnabled ),
278
		Any( nHeight ),
326
		Any( nHeight ),
327
        Any( rHelpURL ),
279
		Any( (sal_Int16)8),
328
		Any( (sal_Int16)8),
280
		Any( nXPos ),
329
		Any( nXPos ),
281
		Any( nYPos ),
330
		Any( nYPos ),
Lines 289-307 rtl::OUString InsertComboBox( OptimizerDialog& rOptimizerDialog, const OUString& Link Here
289
	Sequence< rtl::OUString >	aNames( pNames, nCount );
338
	Sequence< rtl::OUString >	aNames( pNames, nCount );
290
	Sequence< Any >				aValues( pValues, nCount );
339
	Sequence< Any >				aValues( pValues, nCount );
291
340
292
	Reference< XTextComponent > xTextComponent( rOptimizerDialog.insertComboBox( rControlName, aNames, aValues ), UNO_QUERY_THROW );
341
	Reference< XTextComponent > xTextComponent( insertComboBox( rControlName, aNames, aValues ), UNO_QUERY_THROW );
293
	if ( xTextListener.is() )
342
    if ( bListen )
294
		xTextComponent->addTextListener( xTextListener );
343
        xTextComponent->addTextListener( this );
295
	return rControlName;
344
	return rControlName;
296
}
345
}
297
346
298
// -----------------------------------------------------------------------------
347
// -----------------------------------------------------------------------------
299
348
300
rtl::OUString InsertRadioButton( OptimizerDialog& rOptimizerDialog, const rtl::OUString& rControlName, const Reference< XItemListener > xItemListener,
349
rtl::OUString OptimizerDialog::ImplInsertRadioButton(
301
	const OUString& rLabel, sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth, sal_Int32 nHeight, sal_Bool bMultiLine, sal_Int16 nTabIndex )
350
    const rtl::OUString& rControlName,
351
    const OUString& rLabel,
352
    const rtl::OUString& rHelpURL,
353
    sal_Int32 nXPos,
354
    sal_Int32 nYPos,
355
    sal_Int32 nWidth,
356
    sal_Int32 nHeight,
357
    sal_Bool bMultiLine,
358
    sal_Int16 nTabIndex )
302
{
359
{
303
	OUString pNames[] = {
360
	OUString pNames[] = {
304
		TKGet( TK_Height ),
361
		TKGet( TK_Height ),
362
        TKGet( TK_HelpURL ),
305
		TKGet( TK_Label ),
363
		TKGet( TK_Label ),
306
		TKGet( TK_MultiLine ),
364
		TKGet( TK_MultiLine ),
307
		TKGet( TK_PositionX ),
365
		TKGet( TK_PositionX ),
Lines 312-317 rtl::OUString InsertRadioButton( OptimizerDialog& rOptimizerDialog, const rtl::O Link Here
312
370
313
	Any	pValues[] = {
371
	Any	pValues[] = {
314
		Any( nHeight ),
372
		Any( nHeight ),
373
        Any( rHelpURL ),
315
		Any( rLabel ),
374
		Any( rLabel ),
316
		Any( bMultiLine ),
375
		Any( bMultiLine ),
317
		Any( nXPos ),
376
		Any( nXPos ),
Lines 325-346 rtl::OUString InsertRadioButton( OptimizerDialog& rOptimizerDialog, const rtl::O Link Here
325
	Sequence< rtl::OUString >	aNames( pNames, nCount );
384
	Sequence< rtl::OUString >	aNames( pNames, nCount );
326
	Sequence< Any >				aValues( pValues, nCount );
385
	Sequence< Any >				aValues( pValues, nCount );
327
386
328
	Reference< XRadioButton > xRadioButton( rOptimizerDialog.insertRadioButton( rControlName, aNames, aValues ) );
387
	Reference< XRadioButton > xRadioButton( insertRadioButton( rControlName, aNames, aValues ) );
329
	if ( xItemListener.is() )
388
    xRadioButton->addItemListener( this );
330
		xRadioButton->addItemListener( xItemListener );
331
	return rControlName;
389
	return rControlName;
332
}
390
}
333
391
334
// -----------------------------------------------------------------------------
392
// -----------------------------------------------------------------------------
335
393
336
rtl::OUString InsertListBox( OptimizerDialog& rOptimizerDialog, const OUString& rControlName,
394
rtl::OUString OptimizerDialog::ImplInsertListBox(
337
	const Reference< XActionListener > xActionListener, const sal_Bool bEnabled, const Sequence< OUString >& rItemList,
395
    const OUString& rControlName,
338
		sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int16 nTabIndex )
396
    const rtl::OUString& rHelpURL,
397
    const sal_Bool bEnabled,
398
    const Sequence< OUString >& rItemList,
399
    sal_Int32 nXPos,
400
    sal_Int32 nYPos,
401
    sal_Int32 nWidth,
402
    sal_Int32 nHeight,
403
    sal_Int16 nTabIndex )
339
{
404
{
340
	OUString pNames[] = {
405
	OUString pNames[] = {
341
		TKGet( TK_Dropdown ),
406
		TKGet( TK_Dropdown ),
342
		TKGet( TK_Enabled ),
407
		TKGet( TK_Enabled ),
343
		TKGet( TK_Height ),
408
		TKGet( TK_Height ),
409
        TKGet( TK_HelpURL ),
344
		TKGet( TK_LineCount ),
410
		TKGet( TK_LineCount ),
345
		TKGet( TK_MultiSelection ),
411
		TKGet( TK_MultiSelection ),
346
		TKGet( TK_PositionX ),
412
		TKGet( TK_PositionX ),
Lines 354-359 rtl::OUString InsertListBox( OptimizerDialog& rOptimizerDialog, const OUString& Link Here
354
		Any( sal_True ),
420
		Any( sal_True ),
355
		Any( bEnabled ),
421
		Any( bEnabled ),
356
		Any( nHeight ),
422
		Any( nHeight ),
423
        Any( rHelpURL ),
357
		Any( (sal_Int16)8),
424
		Any( (sal_Int16)8),
358
		Any( sal_False ),
425
		Any( sal_False ),
359
		Any( nXPos ),
426
		Any( nXPos ),
Lines 368-376 rtl::OUString InsertListBox( OptimizerDialog& rOptimizerDialog, const OUString& Link Here
368
	Sequence< rtl::OUString >	aNames( pNames, nCount );
435
	Sequence< rtl::OUString >	aNames( pNames, nCount );
369
	Sequence< Any >				aValues( pValues, nCount );
436
	Sequence< Any >				aValues( pValues, nCount );
370
437
371
	Reference< XListBox > xListBox( rOptimizerDialog.insertListBox( rControlName, aNames, aValues ) );
438
	Reference< XListBox > xListBox( insertListBox( rControlName, aNames, aValues ) );
372
	if ( xListBox.is() )
439
    xListBox->addActionListener( this );
373
		xListBox->addActionListener( xActionListener );
374
	return rControlName;
440
	return rControlName;
375
}
441
}
376
442
Lines 383-396 void OptimizerDialog::InitNavigationBar() Link Here
383
    sal_Int32	nNextPosX = nFinishPosX - 6 - BUTTON_WIDTH;
449
    sal_Int32	nNextPosX = nFinishPosX - 6 - BUTTON_WIDTH;
384
    sal_Int32	nBackPosX = nNextPosX - 3 - BUTTON_WIDTH;
450
    sal_Int32	nBackPosX = nNextPosX - 3 - BUTTON_WIDTH;
385
451
386
	InsertSeparator( *this, TKGet( TK_lnNavSep1 ), 0, 0, DIALOG_HEIGHT - 26, OD_DIALOG_WIDTH, 1 );
452
	ImplInsertSeparator( TKGet( TK_lnNavSep1 ), 0, 0, DIALOG_HEIGHT - 26, OD_DIALOG_WIDTH, 1 );
387
	InsertSeparator( *this, TKGet( TK_lnNavSep2 ), 1, 85, 0, 1, BUTTON_POS_Y - 6 );
453
	ImplInsertSeparator( TKGet( TK_lnNavSep2 ), 1, 85, 0, 1, BUTTON_POS_Y - 6 );
388
454
389
	InsertButton( *this, TKGet( TK_btnNavHelp ), mxActionListener, 8, BUTTON_POS_Y, BUTTON_WIDTH, BUTTON_HEIGHT, mnTabIndex++, sal_True, STR_HELP, PushButtonType_STANDARD );
455
	ImplInsertButton( TKGet( TK_btnNavHelp ), HID( HID_SDEXT_MINIMIZER_WIZ_PB_HELP ), 8, BUTTON_POS_Y, BUTTON_WIDTH, BUTTON_HEIGHT, mnTabIndex++, sal_True, STR_HELP, PushButtonType_HELP );
390
	InsertButton( *this, TKGet( TK_btnNavBack ), mxActionListener, nBackPosX, BUTTON_POS_Y, BUTTON_WIDTH, BUTTON_HEIGHT, mnTabIndex++, sal_False, STR_BACK, PushButtonType_STANDARD );
456
	ImplInsertButton( TKGet( TK_btnNavBack ), HID( HID_SDEXT_MINIMIZER_WIZ_PB_BACK ), nBackPosX, BUTTON_POS_Y, BUTTON_WIDTH, BUTTON_HEIGHT, mnTabIndex++, sal_False, STR_BACK, PushButtonType_STANDARD );
391
	InsertButton( *this, TKGet( TK_btnNavNext ), mxActionListener, nNextPosX, BUTTON_POS_Y, BUTTON_WIDTH, BUTTON_HEIGHT, mnTabIndex++, sal_True, STR_NEXT, PushButtonType_STANDARD );
457
	ImplInsertButton( TKGet( TK_btnNavNext ), HID( HID_SDEXT_MINIMIZER_WIZ_PB_NEXT ), nNextPosX, BUTTON_POS_Y, BUTTON_WIDTH, BUTTON_HEIGHT, mnTabIndex++, sal_True, STR_NEXT, PushButtonType_STANDARD );
392
	InsertButton( *this, TKGet( TK_btnNavFinish ), mxActionListener, nFinishPosX, BUTTON_POS_Y, BUTTON_WIDTH, BUTTON_HEIGHT, mnTabIndex++, sal_True, STR_FINISH, PushButtonType_STANDARD );
458
	ImplInsertButton( TKGet( TK_btnNavFinish ), HID( HID_SDEXT_MINIMIZER_WIZ_PB_FINISH ), nFinishPosX, BUTTON_POS_Y, BUTTON_WIDTH, BUTTON_HEIGHT, mnTabIndex++, sal_True, STR_FINISH, PushButtonType_STANDARD );
393
	InsertButton( *this, TKGet( TK_btnNavCancel ), mxActionListener, nCancelPosX, BUTTON_POS_Y, BUTTON_WIDTH, BUTTON_HEIGHT, mnTabIndex++, sal_True, STR_CANCEL, PushButtonType_STANDARD );
459
	ImplInsertButton( TKGet( TK_btnNavCancel ), HID( HID_SDEXT_MINIMIZER_WIZ_PB_CANCEL ), nCancelPosX, BUTTON_POS_Y, BUTTON_WIDTH, BUTTON_HEIGHT, mnTabIndex++, sal_True, STR_CANCEL, PushButtonType_STANDARD );
394
460
395
	setControlProperty( TKGet( TK_btnNavNext ), TKGet( TK_DefaultButton ), Any( sal_True ) );
461
	setControlProperty( TKGet( TK_btnNavNext ), TKGet( TK_DefaultButton ), Any( sal_True ) );
396
}
462
}
Lines 433-444 void OptimizerDialog::InitPage0() Link Here
433
{
499
{
434
	Sequence< OUString > aItemList;
500
	Sequence< OUString > aItemList;
435
	std::vector< rtl::OUString > aControlList;
501
	std::vector< rtl::OUString > aControlList;
436
	aControlList.push_back( InsertFixedText( *this, TKGet( TK_FixedText0Pg0 ), getString( STR_INTRODUCTION ), PAGE_POS_X, PAGE_POS_Y, PAGE_WIDTH, 8, sal_False, sal_True, mnTabIndex++ ) );
502
	aControlList.push_back( ImplInsertFixedText( TKGet( TK_FixedText0Pg0 ), getString( STR_INTRODUCTION ), PAGE_POS_X, PAGE_POS_Y, PAGE_WIDTH, 8, sal_False, sal_True, mnTabIndex++ ) );
437
	aControlList.push_back( InsertFixedText( *this, TKGet( TK_FixedText1Pg0 ), getString( STR_INTRODUCTION_T ), PAGE_POS_X + 6, PAGE_POS_Y + 14, PAGE_WIDTH - 12, 100, sal_True, sal_False, mnTabIndex++ ) );
503
	aControlList.push_back( ImplInsertFixedText( TKGet( TK_FixedText1Pg0 ), getString( STR_INTRODUCTION_T ), PAGE_POS_X + 6, PAGE_POS_Y + 14, PAGE_WIDTH - 12, 100, sal_True, sal_False, mnTabIndex++ ) );
438
	aControlList.push_back( InsertSeparator( *this, TKGet( TK_Separator1Pg0 ), 0, PAGE_POS_X + 6, DIALOG_HEIGHT - 66, PAGE_WIDTH - 12, 1 ) );
504
	aControlList.push_back( ImplInsertSeparator( TKGet( TK_Separator1Pg0 ), 0, PAGE_POS_X + 6, DIALOG_HEIGHT - 66, PAGE_WIDTH - 12, 1 ) );
439
	aControlList.push_back( InsertFixedText( *this, TKGet( TK_FixedText2Pg0 ), getString( STR_CHOSE_SETTINGS ), PAGE_POS_X + 6, DIALOG_HEIGHT - 60, PAGE_WIDTH - 12, 8, sal_True, sal_False, mnTabIndex++ ) );
505
	aControlList.push_back( ImplInsertFixedText( TKGet( TK_FixedText2Pg0 ), getString( STR_CHOSE_SETTINGS ), PAGE_POS_X + 6, DIALOG_HEIGHT - 60, PAGE_WIDTH - 12, 8, sal_True, sal_False, mnTabIndex++ ) );
440
	aControlList.push_back( InsertListBox(  *this, TKGet( TK_ListBox0Pg0 ), mxActionListenerListBox0Pg0, sal_True, aItemList, PAGE_POS_X + 6, DIALOG_HEIGHT - 48, ( OD_DIALOG_WIDTH - 50 ) - ( PAGE_POS_X + 6 ), 12, mnTabIndex++ ) );
506
	aControlList.push_back( ImplInsertListBox(  TKGet( TK_ListBox0Pg0 ), HID(HID_SDEXT_MINIMIZER_WIZ_STEP1_LB_SETTINGS),sal_True, aItemList, PAGE_POS_X + 6, DIALOG_HEIGHT - 48, ( OD_DIALOG_WIDTH - 50 ) - ( PAGE_POS_X + 6 ), 12, mnTabIndex++ ) );
441
	aControlList.push_back( InsertButton( *this, TKGet( TK_Button0Pg0 ), mxActionListener, OD_DIALOG_WIDTH - 46, DIALOG_HEIGHT - 49, 40, 14, mnTabIndex++, sal_True, STR_REMOVE, PushButtonType_STANDARD ) );
507
	aControlList.push_back( ImplInsertButton( TKGet( TK_Button0Pg0 ), HID( HID_SDEXT_MINIMIZER_WIZ_STEP1_PB_DELSETTS ),OD_DIALOG_WIDTH - 46, DIALOG_HEIGHT - 49, 40, 14, mnTabIndex++, sal_True, STR_REMOVE, PushButtonType_STANDARD ) );
442
	maControlPages.push_back( aControlList );
508
	maControlPages.push_back( aControlList );
443
	DeactivatePage( 0 );
509
	DeactivatePage( 0 );
444
	UpdateControlStatesPage0();
510
	UpdateControlStatesPage0();
Lines 459-465 void OptimizerDialog::UpdateControlStatesPage1() Link Here
459
void OptimizerDialog::InitPage1()
525
void OptimizerDialog::InitPage1()
460
{
526
{
461
	Sequence< OUString > aCustomShowList;
527
	Sequence< OUString > aCustomShowList;
462
	Reference< XModel > xModel( mxController->getModel() );
528
	Reference< XModel > xModel( mxModel );
463
	if ( xModel.is() )
529
	if ( xModel.is() )
464
	{
530
	{
465
		Reference< XCustomPresentationSupplier > aXCPSup( xModel, UNO_QUERY_THROW );
531
		Reference< XCustomPresentationSupplier > aXCPSup( xModel, UNO_QUERY_THROW );
Lines 468-479 void OptimizerDialog::InitPage1() Link Here
468
            aCustomShowList = aXCont->getElementNames();
534
            aCustomShowList = aXCont->getElementNames();
469
	}
535
	}
470
	std::vector< rtl::OUString > aControlList;
536
	std::vector< rtl::OUString > aControlList;
471
	aControlList.push_back( InsertFixedText( *this, TKGet( TK_FixedText0Pg3 ), getString( STR_CHOOSE_SLIDES ), PAGE_POS_X, PAGE_POS_Y, PAGE_WIDTH, 8, sal_False, sal_True, mnTabIndex++ ) );
537
	aControlList.push_back( ImplInsertFixedText( TKGet( TK_FixedText0Pg3 ), getString( STR_CHOOSE_SLIDES ), PAGE_POS_X, PAGE_POS_Y, PAGE_WIDTH, 8, sal_False, sal_True, mnTabIndex++ ) );
472
	aControlList.push_back( InsertCheckBox(  *this, TKGet( TK_CheckBox0Pg3 ), mxItemListener, getString( STR_DELETE_MASTER_PAGES ), PAGE_POS_X + 6, PAGE_POS_Y + 14, PAGE_WIDTH - 12, 8, mnTabIndex++ ) );
538
	aControlList.push_back( ImplInsertCheckBox(  TKGet( TK_CheckBox0Pg3 ), getString( STR_DELETE_MASTER_PAGES ), HID( HID_SDEXT_MINIMIZER_WIZ_STEP2_CB_MASTERPAGES ), PAGE_POS_X + 6, PAGE_POS_Y + 14, PAGE_WIDTH - 12, 8, mnTabIndex++ ) );
473
	aControlList.push_back( InsertCheckBox(  *this, TKGet( TK_CheckBox2Pg3 ), mxItemListener, getString( STR_DELETE_HIDDEN_SLIDES ), PAGE_POS_X + 6, PAGE_POS_Y + 28, PAGE_WIDTH - 12, 8, mnTabIndex++ ) );
539
	aControlList.push_back( ImplInsertCheckBox(  TKGet( TK_CheckBox2Pg3 ), getString( STR_DELETE_HIDDEN_SLIDES ), HID( HID_SDEXT_MINIMIZER_WIZ_STEP2_CB_HIDDENSLIDES ), PAGE_POS_X + 6, PAGE_POS_Y + 28, PAGE_WIDTH - 12, 8, mnTabIndex++ ) );
474
	aControlList.push_back( InsertCheckBox(  *this, TKGet( TK_CheckBox3Pg3 ), mxItemListener, getString( STR_CUSTOM_SHOW ), PAGE_POS_X + 6, PAGE_POS_Y + 42, PAGE_WIDTH - 12, 8, mnTabIndex++ ) );
540
	aControlList.push_back( ImplInsertCheckBox(  TKGet( TK_CheckBox3Pg3 ), getString( STR_CUSTOM_SHOW ), HID( HID_SDEXT_MINIMIZER_WIZ_STEP2_CB_CUSTOMSHOW ), PAGE_POS_X + 6, PAGE_POS_Y + 42, PAGE_WIDTH - 12, 8, mnTabIndex++ ) );
475
	aControlList.push_back( InsertListBox(  *this, TKGet( TK_ListBox0Pg3 ), mxActionListener, sal_True, aCustomShowList, PAGE_POS_X + 14, PAGE_POS_Y + 54, 150, 12, mnTabIndex++ ) );
541
	aControlList.push_back( ImplInsertListBox(  TKGet( TK_ListBox0Pg3 ), HID(HID_SDEXT_MINIMIZER_WIZ_STEP2_LB_CUSTOMSHOW),sal_True, aCustomShowList, PAGE_POS_X + 14, PAGE_POS_Y + 54, 150, 12, mnTabIndex++ ) );
476
	aControlList.push_back( InsertCheckBox(  *this, TKGet( TK_CheckBox1Pg3 ), mxItemListener, getString( STR_DELETE_NOTES_PAGES ), PAGE_POS_X + 6, PAGE_POS_Y + 70, PAGE_WIDTH - 12, 8, mnTabIndex++ ) );
542
	aControlList.push_back( ImplInsertCheckBox(  TKGet( TK_CheckBox1Pg3 ), getString( STR_DELETE_NOTES_PAGES ), HID( HID_SDEXT_MINIMIZER_WIZ_STEP2_CB_NOTES ), PAGE_POS_X + 6, PAGE_POS_Y + 70, PAGE_WIDTH - 12, 8, mnTabIndex++ ) );
477
	maControlPages.push_back( aControlList );
543
	maControlPages.push_back( aControlList );
478
	DeactivatePage( 1 );
544
	DeactivatePage( 1 );
479
545
Lines 535-549 void OptimizerDialog::InitPage2() Link Here
535
	aResolutionItemList[ 3 ] = getString( STR_IMAGE_RESOLUTION_3 ).getToken( 1, ';', nI3 );
601
	aResolutionItemList[ 3 ] = getString( STR_IMAGE_RESOLUTION_3 ).getToken( 1, ';', nI3 );
536
602
537
	std::vector< rtl::OUString > aControlList;
603
	std::vector< rtl::OUString > aControlList;
538
	aControlList.push_back( InsertFixedText( *this, TKGet( TK_FixedText0Pg1 ), getString( STR_GRAPHIC_OPTIMIZATION ), PAGE_POS_X, PAGE_POS_Y, PAGE_WIDTH, 8, sal_False, sal_True, mnTabIndex++ ) );
604
	aControlList.push_back( ImplInsertFixedText( TKGet( TK_FixedText0Pg1 ), getString( STR_GRAPHIC_OPTIMIZATION ), PAGE_POS_X, PAGE_POS_Y, PAGE_WIDTH, 8, sal_False, sal_True, mnTabIndex++ ) );
539
	aControlList.push_back( InsertRadioButton( *this, TKGet( TK_RadioButton0Pg1 ), mxItemListener, getString( STR_LOSSLESS_COMPRESSION ), PAGE_POS_X + 6, PAGE_POS_Y + 14, PAGE_WIDTH - 12, 8, sal_False, mnTabIndex++ ) );
605
	aControlList.push_back( ImplInsertRadioButton( TKGet( TK_RadioButton0Pg1 ), getString( STR_LOSSLESS_COMPRESSION ), HID( HID_SDEXT_MINIMIZER_WIZ_STEP3_RB_LOSSLESS ), PAGE_POS_X + 6, PAGE_POS_Y + 14, PAGE_WIDTH - 12, 8, sal_False, mnTabIndex++ ) );
540
	aControlList.push_back( InsertRadioButton( *this, TKGet( TK_RadioButton1Pg1 ), mxItemListener, getString( STR_JPEG_COMPRESSION ), PAGE_POS_X + 6, PAGE_POS_Y + 28, PAGE_WIDTH - 12, 8, sal_False, mnTabIndex++ ) );
606
	aControlList.push_back( ImplInsertRadioButton( TKGet( TK_RadioButton1Pg1 ), getString( STR_JPEG_COMPRESSION ), HID( HID_SDEXT_MINIMIZER_WIZ_STEP3_RB_JPEG ), PAGE_POS_X + 6, PAGE_POS_Y + 28, PAGE_WIDTH - 12, 8, sal_False, mnTabIndex++ ) );
541
	aControlList.push_back( InsertFixedText( *this, TKGet( TK_FixedText1Pg1 ), getString( STR_QUALITY ), PAGE_POS_X + 20, PAGE_POS_Y + 40, 72, 8, sal_False, sal_False, mnTabIndex++ ) );
607
	aControlList.push_back( ImplInsertFixedText( TKGet( TK_FixedText1Pg1 ), getString( STR_QUALITY ), PAGE_POS_X + 20, PAGE_POS_Y + 40, 72, 8, sal_False, sal_False, mnTabIndex++ ) );
542
	aControlList.push_back( InsertFormattedField( *this, TKGet( TK_FormattedField0Pg1 ), mxTextListenerFormattedField0Pg1, mxSpinListenerFormattedField0Pg1, PAGE_POS_X + 106, PAGE_POS_Y + 38, 50, 0, 100, mnTabIndex++ ) );
608
	aControlList.push_back( ImplInsertFormattedField( TKGet( TK_FormattedField0Pg1 ), HID( HID_SDEXT_MINIMIZER_WIZ_STEP3_MF_QUALITY ), PAGE_POS_X + 106, PAGE_POS_Y + 38, 50, 0, 100, mnTabIndex++ ) );
543
	aControlList.push_back( InsertFixedText( *this, TKGet( TK_FixedText2Pg1 ), getString( STR_IMAGE_RESOLUTION ), PAGE_POS_X + 6, PAGE_POS_Y + 54, 94, 8, sal_False, sal_False, mnTabIndex++ ) );
609
	aControlList.push_back( ImplInsertFixedText( TKGet( TK_FixedText2Pg1 ), getString( STR_IMAGE_RESOLUTION ), PAGE_POS_X + 6, PAGE_POS_Y + 54, 94, 8, sal_False, sal_False, mnTabIndex++ ) );
544
	aControlList.push_back( InsertComboBox(  *this, TKGet( TK_ComboBox0Pg1 ), mxTextListenerComboBox0Pg1, sal_True, aResolutionItemList, PAGE_POS_X + 106, PAGE_POS_Y + 52, 100, 12, mnTabIndex++ ) );
610
	aControlList.push_back( ImplInsertComboBox(  TKGet( TK_ComboBox0Pg1 ), HID( HID_SDEXT_MINIMIZER_WIZ_STEP3_LB_DPI ), sal_True, aResolutionItemList, PAGE_POS_X + 106, PAGE_POS_Y + 52, 100, 12, mnTabIndex++ ) );
545
	aControlList.push_back( InsertCheckBox(  *this, TKGet( TK_CheckBox1Pg1 ), mxItemListener, getString( STR_REMOVE_CROP_AREA ), PAGE_POS_X + 6, PAGE_POS_Y + 68, PAGE_WIDTH - 12, 8, mnTabIndex++ ) );
611
	aControlList.push_back( ImplInsertCheckBox(  TKGet( TK_CheckBox1Pg1 ), getString( STR_REMOVE_CROP_AREA ), HID( HID_SDEXT_MINIMIZER_WIZ_STEP3_CB_CROP ), PAGE_POS_X + 6, PAGE_POS_Y + 68, PAGE_WIDTH - 12, 8, mnTabIndex++ ) );
546
	aControlList.push_back( InsertCheckBox(  *this, TKGet( TK_CheckBox2Pg1 ), mxItemListener, getString( STR_EMBED_LINKED_GRAPHICS ), PAGE_POS_X + 6, PAGE_POS_Y + 82, PAGE_WIDTH - 12, 8, mnTabIndex++ ) );
612
	aControlList.push_back( ImplInsertCheckBox(  TKGet( TK_CheckBox2Pg1 ), getString( STR_EMBED_LINKED_GRAPHICS ), HID( HID_SDEXT_MINIMIZER_WIZ_STEP3_CB_LINKS ), PAGE_POS_X + 6, PAGE_POS_Y + 82, PAGE_WIDTH - 12, 8, mnTabIndex++ ) );
547
	maControlPages.push_back( aControlList );
613
	maControlPages.push_back( aControlList );
548
	DeactivatePage( 2 );
614
	DeactivatePage( 2 );
549
	UpdateControlStatesPage2();
615
	UpdateControlStatesPage2();
Lines 565-571 void OptimizerDialog::UpdateControlStatesPage3() Link Here
565
void OptimizerDialog::InitPage3()
631
void OptimizerDialog::InitPage3()
566
{
632
{
567
	int nOLECount = 0;
633
	int nOLECount = 0;
568
	Reference< XModel > xModel( mxController->getModel() );
634
	Reference< XModel > xModel( mxModel );
569
	Reference< XDrawPagesSupplier > xDrawPagesSupplier( xModel, UNO_QUERY_THROW );
635
	Reference< XDrawPagesSupplier > xDrawPagesSupplier( xModel, UNO_QUERY_THROW );
570
	Reference< XDrawPages > xDrawPages( xDrawPagesSupplier->getDrawPages(), UNO_QUERY_THROW );
636
	Reference< XDrawPages > xDrawPages( xDrawPagesSupplier->getDrawPages(), UNO_QUERY_THROW );
571
	for ( sal_Int32 i = 0; i < xDrawPages->getCount(); i++ )
637
	for ( sal_Int32 i = 0; i < xDrawPages->getCount(); i++ )
Lines 581-591 void OptimizerDialog::InitPage3() Link Here
581
	}
647
	}
582
648
583
	std::vector< rtl::OUString > aControlList;
649
	std::vector< rtl::OUString > aControlList;
584
	aControlList.push_back( InsertFixedText( *this, TKGet( TK_FixedText0Pg2 ), getString( STR_OLE_OPTIMIZATION ), PAGE_POS_X, PAGE_POS_Y, PAGE_WIDTH, 8, sal_False, sal_True, mnTabIndex++ ) );
650
	aControlList.push_back( ImplInsertFixedText( TKGet( TK_FixedText0Pg2 ), getString( STR_OLE_OPTIMIZATION ), PAGE_POS_X, PAGE_POS_Y, PAGE_WIDTH, 8, sal_False, sal_True, mnTabIndex++ ) );
585
	aControlList.push_back( InsertCheckBox(  *this, TKGet( TK_CheckBox0Pg2 ), mxItemListener, getString( STR_OLE_REPLACE ), PAGE_POS_X + 6, PAGE_POS_Y + 14, PAGE_WIDTH - 12, 8, mnTabIndex++ ) );
651
	aControlList.push_back( ImplInsertCheckBox(  TKGet( TK_CheckBox0Pg2 ), getString( STR_OLE_REPLACE ), HID( HID_SDEXT_MINIMIZER_WIZ_STEP4_CB_OLE ), PAGE_POS_X + 6, PAGE_POS_Y + 14, PAGE_WIDTH - 12, 8, mnTabIndex++ ) );
586
	aControlList.push_back( InsertRadioButton( *this, TKGet( TK_RadioButton0Pg2 ), mxItemListener, getString( STR_ALL_OLE_OBJECTS ), PAGE_POS_X + 14, PAGE_POS_Y + 28, PAGE_WIDTH - 22, 8, sal_False, mnTabIndex++ ) );
652
	aControlList.push_back( ImplInsertRadioButton( TKGet( TK_RadioButton0Pg2 ), getString( STR_ALL_OLE_OBJECTS ), HID(HID_SDEXT_MINIMIZER_WIZ_STEP4_RB_ALLOLE), PAGE_POS_X + 14, PAGE_POS_Y + 28, PAGE_WIDTH - 22, 8, sal_False, mnTabIndex++ ) );
587
	aControlList.push_back( InsertRadioButton( *this, TKGet( TK_RadioButton1Pg2 ), mxItemListener, getString( STR_ALIEN_OLE_OBJECTS_ONLY ), PAGE_POS_X + 14, PAGE_POS_Y + 40, PAGE_WIDTH - 22, 8, sal_False, mnTabIndex++ ) );
653
	aControlList.push_back( ImplInsertRadioButton( TKGet( TK_RadioButton1Pg2 ), getString( STR_ALIEN_OLE_OBJECTS_ONLY ), HID(HID_SDEXT_MINIMIZER_WIZ_STEP4_RB_NOTODF),PAGE_POS_X + 14, PAGE_POS_Y + 40, PAGE_WIDTH - 22, 8, sal_False, mnTabIndex++ ) );
588
	aControlList.push_back( InsertFixedText( *this, TKGet( TK_FixedText1Pg2 ), nOLECount ? getString( STR_OLE_OBJECTS_DESC ) : getString( STR_NO_OLE_OBJECTS_DESC ), PAGE_POS_X + 6, PAGE_POS_Y + 64, PAGE_WIDTH - 22, 50, sal_True, sal_False, mnTabIndex++ ) );
654
	aControlList.push_back( ImplInsertFixedText( TKGet( TK_FixedText1Pg2 ), nOLECount ? getString( STR_OLE_OBJECTS_DESC ) : getString( STR_NO_OLE_OBJECTS_DESC ), PAGE_POS_X + 6, PAGE_POS_Y + 64, PAGE_WIDTH - 22, 50, sal_True, sal_False, mnTabIndex++ ) );
589
	maControlPages.push_back( aControlList );
655
	maControlPages.push_back( aControlList );
590
	DeactivatePage( 3 );
656
	DeactivatePage( 3 );
591
	UpdateControlStatesPage3();
657
	UpdateControlStatesPage3();
Lines 683-689 void OptimizerDialog::UpdateControlStatesPage4() Link Here
683
	if ( aCustomShowName.getLength() )
749
	if ( aCustomShowName.getLength() )
684
	{
750
	{
685
		std::vector< Reference< XDrawPage > > vNonUsedPageList;
751
		std::vector< Reference< XDrawPage > > vNonUsedPageList;
686
		PageCollector::CollectNonCustomShowPages( mxController->getModel(), aCustomShowName, vNonUsedPageList );
752
		PageCollector::CollectNonCustomShowPages( mxModel, aCustomShowName, vNonUsedPageList );
687
		nDeletedSlides += vNonUsedPageList.size();
753
		nDeletedSlides += vNonUsedPageList.size();
688
	}
754
	}
689
	if ( GetConfigProperty( TK_DeleteHiddenSlides, sal_False ) )
755
	if ( GetConfigProperty( TK_DeleteHiddenSlides, sal_False ) )
Lines 691-697 void OptimizerDialog::UpdateControlStatesPage4() Link Here
691
		if ( aCustomShowName.getLength() )
757
		if ( aCustomShowName.getLength() )
692
		{
758
		{
693
			std::vector< Reference< XDrawPage > > vUsedPageList;
759
			std::vector< Reference< XDrawPage > > vUsedPageList;
694
			PageCollector::CollectCustomShowPages( mxController->getModel(), aCustomShowName, vUsedPageList );
760
			PageCollector::CollectCustomShowPages( mxModel, aCustomShowName, vUsedPageList );
695
			std::vector< Reference< XDrawPage > >::iterator aIter( vUsedPageList.begin() );
761
			std::vector< Reference< XDrawPage > >::iterator aIter( vUsedPageList.begin() );
696
			while( aIter != vUsedPageList.end() )
762
			while( aIter != vUsedPageList.end() )
697
			{
763
			{
Lines 708-714 void OptimizerDialog::UpdateControlStatesPage4() Link Here
708
		}
774
		}
709
		else
775
		else
710
		{
776
		{
711
			Reference< XDrawPagesSupplier > xDrawPagesSupplier( mxController->getModel(), UNO_QUERY_THROW );
777
			Reference< XDrawPagesSupplier > xDrawPagesSupplier( mxModel, UNO_QUERY_THROW );
712
			Reference< XDrawPages > xDrawPages( xDrawPagesSupplier->getDrawPages(), UNO_QUERY_THROW );
778
			Reference< XDrawPages > xDrawPages( xDrawPagesSupplier->getDrawPages(), UNO_QUERY_THROW );
713
			for( sal_Int32 i = 0; i < xDrawPages->getCount(); i++ )
779
			for( sal_Int32 i = 0; i < xDrawPages->getCount(); i++ )
714
			{
780
			{
Lines 728-735 void OptimizerDialog::UpdateControlStatesPage4() Link Here
728
	if ( GetConfigProperty( TK_DeleteUnusedMasterPages, sal_False ) )
794
	if ( GetConfigProperty( TK_DeleteUnusedMasterPages, sal_False ) )
729
	{
795
	{
730
		std::vector< PageCollector::MasterPageEntity > aMasterPageList;
796
		std::vector< PageCollector::MasterPageEntity > aMasterPageList;
731
		PageCollector::CollectMasterPages( mxController->getModel(), aMasterPageList );
797
		PageCollector::CollectMasterPages( mxModel, aMasterPageList );
732
		Reference< XMasterPagesSupplier > xMasterPagesSupplier( mxController->getModel(), UNO_QUERY_THROW );
798
		Reference< XMasterPagesSupplier > xMasterPagesSupplier( mxModel, UNO_QUERY_THROW );
733
		Reference< XDrawPages > xMasterPages( xMasterPagesSupplier->getMasterPages(), UNO_QUERY_THROW );
799
		Reference< XDrawPages > xMasterPages( xMasterPagesSupplier->getMasterPages(), UNO_QUERY_THROW );
734
		std::vector< PageCollector::MasterPageEntity >::iterator aIter( aMasterPageList.begin() );
800
		std::vector< PageCollector::MasterPageEntity >::iterator aIter( aMasterPageList.begin() );
735
		while( aIter != aMasterPageList.end() )
801
		while( aIter != aMasterPageList.end() )
Lines 756-762 void OptimizerDialog::UpdateControlStatesPage4() Link Here
756
	sal_Int32 nImageResolution( GetConfigProperty( TK_ImageResolution, (sal_Int32)0 ) );
822
	sal_Int32 nImageResolution( GetConfigProperty( TK_ImageResolution, (sal_Int32)0 ) );
757
	GraphicSettings aGraphicSettings( bJPEGCompression, nJPEGQuality, GetConfigProperty( TK_RemoveCropArea, sal_False ),
823
	GraphicSettings aGraphicSettings( bJPEGCompression, nJPEGQuality, GetConfigProperty( TK_RemoveCropArea, sal_False ),
758
										nImageResolution, GetConfigProperty( TK_EmbedLinkedGraphics, sal_True ) );
824
										nImageResolution, GetConfigProperty( TK_EmbedLinkedGraphics, sal_True ) );
759
	GraphicCollector::CountGraphics( mxMSF, mxController->getModel(), aGraphicSettings, nGraphics );
825
	GraphicCollector::CountGraphics( mxContext, mxModel, aGraphicSettings, nGraphics );
760
	if ( nGraphics > 1 )
826
	if ( nGraphics > 1 )
761
	{
827
	{
762
		OUString aStr( getString( STR_OPTIMIZE_IMAGES ) );
828
		OUString aStr( getString( STR_OPTIMIZE_IMAGES ) );
Lines 781-787 void OptimizerDialog::UpdateControlStatesPage4() Link Here
781
	if ( GetConfigProperty( TK_OLEOptimization, sal_False ) )
847
	if ( GetConfigProperty( TK_OLEOptimization, sal_False ) )
782
	{
848
	{
783
		sal_Int32 nOLEReplacements = 0;
849
		sal_Int32 nOLEReplacements = 0;
784
		Reference< XDrawPagesSupplier > xDrawPagesSupplier( mxController->getModel(), UNO_QUERY_THROW );
850
		Reference< XDrawPagesSupplier > xDrawPagesSupplier( mxModel, UNO_QUERY_THROW );
785
		Reference< XDrawPages > xDrawPages( xDrawPagesSupplier->getDrawPages(), UNO_QUERY_THROW );
851
		Reference< XDrawPages > xDrawPages( xDrawPagesSupplier->getDrawPages(), UNO_QUERY_THROW );
786
		for ( sal_Int32 i = 0; i < xDrawPages->getCount(); i++ )
852
		for ( sal_Int32 i = 0; i < xDrawPages->getCount(); i++ )
787
		{
853
		{
Lines 812-818 void OptimizerDialog::UpdateControlStatesPage4() Link Here
812
878
813
	sal_Int64 nCurrentFileSize = 0;
879
	sal_Int64 nCurrentFileSize = 0;
814
	sal_Int64 nEstimatedFileSize = 0;
880
	sal_Int64 nEstimatedFileSize = 0;
815
	Reference< XStorable > xStorable( mxController->getModel(), UNO_QUERY );
881
	Reference< XStorable > xStorable( mxModel, UNO_QUERY );
816
	if ( xStorable.is() && xStorable->hasLocation() )
882
	if ( xStorable.is() && xStorable->hasLocation() )
817
		nCurrentFileSize = PPPOptimizer::GetFileSize( xStorable->getLocation() );
883
		nCurrentFileSize = PPPOptimizer::GetFileSize( xStorable->getLocation() );
818
884
Lines 856-862 void OptimizerDialog::InitPage4() Link Here
856
922
857
		Any	pValues[] = {
923
		Any	pValues[] = {
858
			Any( (sal_Int32)12 ),
924
			Any( (sal_Int32)12 ),
859
			Any( TKGet( STR_SAVE_AS ) ),
925
			Any( OUString( RTL_CONSTASCII_USTRINGPARAM("STR_SAVE_AS") ) ),//TODO
860
			Any( (sal_Int32)( PAGE_POS_X + 6 ) ),
926
			Any( (sal_Int32)( PAGE_POS_X + 6 ) ),
861
			Any( (sal_Int32)( DIALOG_HEIGHT - 75 ) ),
927
			Any( (sal_Int32)( DIALOG_HEIGHT - 75 ) ),
862
			Any( (sal_Int32)( 0 ) ),
928
			Any( (sal_Int32)( 0 ) ),
Lines 872-901 void OptimizerDialog::InitPage4() Link Here
872
		Reference< XMultiPropertySet > xMultiPropertySet( insertControlModel( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlProgressBarModel" ) ),
938
		Reference< XMultiPropertySet > xMultiPropertySet( insertControlModel( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlProgressBarModel" ) ),
873
			TKGet( TK_Progress ), aNames, aValues ), UNO_QUERY );
939
			TKGet( TK_Progress ), aNames, aValues ), UNO_QUERY );
874
	}
940
	}
875
	Reference< XTextListener > xTextListener;
941
876
	Sequence< OUString > aItemList;
942
	Sequence< OUString > aItemList;
877
	std::vector< rtl::OUString > aControlList;
943
	std::vector< rtl::OUString > aControlList;
878
	aControlList.push_back( InsertFixedText( *this, TKGet( TK_FixedText0Pg4 ), getString( STR_SUMMARY_TITLE ), PAGE_POS_X, PAGE_POS_Y, PAGE_WIDTH, 8, sal_False, sal_True, mnTabIndex++ ) );
944
	aControlList.push_back( ImplInsertFixedText( TKGet( TK_FixedText0Pg4 ), getString( STR_SUMMARY_TITLE ), PAGE_POS_X, PAGE_POS_Y, PAGE_WIDTH, 8, sal_False, sal_True, mnTabIndex++ ) );
879
//	aControlList.push_back( InsertSeparator( *this, TKGet( TK_Separator0Pg4 ), 0, PAGE_POS_X + 6, PAGE_POS_Y + 90, PAGE_WIDTH - 12, 1 ) );
945
//	aControlList.push_back( ImplInsertSeparator( TKGet( TK_Separator0Pg4 ), 0, PAGE_POS_X + 6, PAGE_POS_Y + 90, PAGE_WIDTH - 12, 1 ) );
880
946
881
	aControlList.push_back( InsertFixedText( *this, TKGet( TK_FixedText4Pg4 ), OUString(), PAGE_POS_X + 6, PAGE_POS_Y + 14, PAGE_WIDTH - 12, 8, sal_False, sal_False, mnTabIndex++ ) );
947
	aControlList.push_back( ImplInsertFixedText( TKGet( TK_FixedText4Pg4 ), OUString(), PAGE_POS_X + 6, PAGE_POS_Y + 14, PAGE_WIDTH - 12, 8, sal_False, sal_False, mnTabIndex++ ) );
882
	aControlList.push_back( InsertFixedText( *this, TKGet( TK_FixedText5Pg4 ), OUString(), PAGE_POS_X + 6, PAGE_POS_Y + 22, PAGE_WIDTH - 12, 8, sal_False, sal_False, mnTabIndex++ ) );
948
	aControlList.push_back( ImplInsertFixedText( TKGet( TK_FixedText5Pg4 ), OUString(), PAGE_POS_X + 6, PAGE_POS_Y + 22, PAGE_WIDTH - 12, 8, sal_False, sal_False, mnTabIndex++ ) );
883
	aControlList.push_back( InsertFixedText( *this, TKGet( TK_FixedText6Pg4 ), OUString(), PAGE_POS_X + 6, PAGE_POS_Y + 30, PAGE_WIDTH - 12, 8, sal_False, sal_False, mnTabIndex++ ) );
949
	aControlList.push_back( ImplInsertFixedText( TKGet( TK_FixedText6Pg4 ), OUString(), PAGE_POS_X + 6, PAGE_POS_Y + 30, PAGE_WIDTH - 12, 8, sal_False, sal_False, mnTabIndex++ ) );
884
950
885
	aControlList.push_back( InsertFixedText( *this, TKGet( TK_FixedText2Pg4 ), getString( STR_CURRENT_FILESIZE ), PAGE_POS_X + 6, PAGE_POS_Y + 50, 88, 8, sal_False, sal_False, mnTabIndex++ ) );
951
	aControlList.push_back( ImplInsertFixedText( TKGet( TK_FixedText2Pg4 ), getString( STR_CURRENT_FILESIZE ), PAGE_POS_X + 6, PAGE_POS_Y + 50, 88, 8, sal_False, sal_False, mnTabIndex++ ) );
886
	aControlList.push_back( InsertFixedText( *this, TKGet( TK_FixedText7Pg4 ), OUString(), PAGE_POS_X + 100, PAGE_POS_Y + 50, 30, 8, sal_False, sal_False, mnTabIndex++ ) );
952
	aControlList.push_back( ImplInsertFixedText( TKGet( TK_FixedText7Pg4 ), OUString(), PAGE_POS_X + 100, PAGE_POS_Y + 50, 30, 8, sal_False, sal_False, mnTabIndex++ ) );
887
	setControlProperty( TKGet( TK_FixedText7Pg4 ), TKGet( TK_Align ), Any( static_cast< short >( 2 ) ) );
953
	setControlProperty( TKGet( TK_FixedText7Pg4 ), TKGet( TK_Align ), Any( static_cast< short >( 2 ) ) );
888
	aControlList.push_back( InsertFixedText( *this, TKGet( TK_FixedText3Pg4 ), getString( STR_ESTIMATED_FILESIZE ), PAGE_POS_X + 6, PAGE_POS_Y + 58, 88, 8, sal_False, sal_False, mnTabIndex++ ) );
954
	aControlList.push_back( ImplInsertFixedText( TKGet( TK_FixedText3Pg4 ), getString( STR_ESTIMATED_FILESIZE ), PAGE_POS_X + 6, PAGE_POS_Y + 58, 88, 8, sal_False, sal_False, mnTabIndex++ ) );
889
	aControlList.push_back( InsertFixedText( *this, TKGet( TK_FixedText8Pg4 ), OUString(), PAGE_POS_X + 100, PAGE_POS_Y + 58, 30, 8, sal_False, sal_False, mnTabIndex++ ) );
955
	aControlList.push_back( ImplInsertFixedText( TKGet( TK_FixedText8Pg4 ), OUString(), PAGE_POS_X + 100, PAGE_POS_Y + 58, 30, 8, sal_False, sal_False, mnTabIndex++ ) );
890
	setControlProperty( TKGet( TK_FixedText8Pg4 ), TKGet( TK_Align ), Any( static_cast< short >( 2 ) ) );
956
	setControlProperty( TKGet( TK_FixedText8Pg4 ), TKGet( TK_Align ), Any( static_cast< short >( 2 ) ) );
891
957
892
	aControlList.push_back( InsertRadioButton( *this, TKGet( TK_RadioButton0Pg4 ), mxItemListener, getString(  STR_APPLY_TO_CURRENT ), PAGE_POS_X + 6, PAGE_POS_Y + 78, PAGE_WIDTH - 12, 8, sal_False, mnTabIndex++ ) );
958
	aControlList.push_back( ImplInsertRadioButton( TKGet( TK_RadioButton0Pg4 ), getString(  STR_APPLY_TO_CURRENT ), HID(HID_SDEXT_MINIMIZER_WIZ_STEP5_RB_CURDOC),PAGE_POS_X + 6, PAGE_POS_Y + 78, PAGE_WIDTH - 12, 8, sal_False, mnTabIndex++ ) );
893
	aControlList.push_back( InsertRadioButton( *this, TKGet( TK_RadioButton1Pg4 ), mxItemListener, getString( STR_SAVE_AS ), PAGE_POS_X + 6, PAGE_POS_Y + 90, PAGE_WIDTH - 12, 8, sal_False, mnTabIndex++ ) );
959
	aControlList.push_back( ImplInsertRadioButton( TKGet( TK_RadioButton1Pg4 ), getString( STR_SAVE_AS ), HID(HID_SDEXT_MINIMIZER_WIZ_STEP5_RB_NEWDOC),PAGE_POS_X + 6, PAGE_POS_Y + 90, PAGE_WIDTH - 12, 8, sal_False, mnTabIndex++ ) );
894
	aControlList.push_back( InsertFixedText( *this, TKGet( TK_FixedText1Pg4 ), OUString(), PAGE_POS_X + 6, DIALOG_HEIGHT - 87, PAGE_WIDTH - 12, 8, sal_True, sal_False, mnTabIndex++ ) );
960
	aControlList.push_back( ImplInsertFixedText( TKGet( TK_FixedText1Pg4 ), OUString(), PAGE_POS_X + 6, DIALOG_HEIGHT - 87, PAGE_WIDTH - 12, 8, sal_True, sal_False, mnTabIndex++ ) );
895
	aControlList.push_back( TKGet( TK_Progress ) );
961
	aControlList.push_back( TKGet( TK_Progress ) );
896
	aControlList.push_back( InsertSeparator( *this, TKGet( TK_Separator1Pg4 ), 0, PAGE_POS_X + 6, DIALOG_HEIGHT - 58, PAGE_WIDTH - 12, 1 ) );
962
	aControlList.push_back( ImplInsertSeparator( TKGet( TK_Separator1Pg4 ), 0, PAGE_POS_X + 6, DIALOG_HEIGHT - 58, PAGE_WIDTH - 12, 1 ) );
897
	aControlList.push_back( InsertCheckBox(  *this, TKGet( TK_CheckBox1Pg4 ), mxItemListener, getString( STR_SAVE_SETTINGS ), PAGE_POS_X + 6, DIALOG_HEIGHT - 47, 100, 8, mnTabIndex++ ) );
963
	aControlList.push_back( ImplInsertCheckBox(  TKGet( TK_CheckBox1Pg4 ), getString( STR_SAVE_SETTINGS ), HID( HID_SDEXT_MINIMIZER_WIZ_STEP5_CB_SAVESETTINGS ), PAGE_POS_X + 6, DIALOG_HEIGHT - 47, 100, 8, mnTabIndex++ ) );
898
	aControlList.push_back( InsertComboBox(  *this, TKGet( TK_ComboBox0Pg4 ), xTextListener, sal_True, aItemList, PAGE_POS_X + 106, DIALOG_HEIGHT - 48, 100, 12, mnTabIndex++ ) );
964
    // don't listen to this
965
	aControlList.push_back(
966
        ImplInsertComboBox(
967
            TKGet( TK_ComboBox0Pg4 ),  HID( HID_SDEXT_MINIMIZER_WIZ_STEP5_LB_SETTINGSNAME ),sal_True, aItemList, 
968
            PAGE_POS_X + 106, DIALOG_HEIGHT - 48, 100, 12, mnTabIndex++ , 
969
            false) );
899
	maControlPages.push_back( aControlList );
970
	maControlPages.push_back( aControlList );
900
	DeactivatePage( 4 );
971
	DeactivatePage( 4 );
901
972
(-)a/main/sdext/source/minimizer/pagecollector.cxx (-1 / +2 lines)
Lines 33-39 Link Here
33
#include <com/sun/star/container/XNameContainer.hpp>
33
#include <com/sun/star/container/XNameContainer.hpp>
34
#include <com/sun/star/container/XIndexContainer.hpp>
34
#include <com/sun/star/container/XIndexContainer.hpp>
35
35
36
using namespace ::rtl;
37
using namespace ::com::sun::star;
36
using namespace ::com::sun::star;
38
using namespace ::com::sun::star::uno;
37
using namespace ::com::sun::star::uno;
39
using namespace ::com::sun::star::awt;
38
using namespace ::com::sun::star::awt;
Lines 43-48 using namespace ::com::sun::star::beans; Link Here
43
using namespace ::com::sun::star::container;
42
using namespace ::com::sun::star::container;
44
using namespace ::com::sun::star::presentation;
43
using namespace ::com::sun::star::presentation;
45
44
45
using ::rtl::OUString;
46
46
void PageCollector::CollectCustomShowPages( const com::sun::star::uno::Reference< com::sun::star::frame::XModel >& rxModel, const rtl::OUString& rCustomShowName, std::vector< Reference< XDrawPage > >& rUsedPageList )
47
void PageCollector::CollectCustomShowPages( const com::sun::star::uno::Reference< com::sun::star::frame::XModel >& rxModel, const rtl::OUString& rCustomShowName, std::vector< Reference< XDrawPage > >& rUsedPageList )
47
{
48
{
48
	try
49
	try
(-)a/main/sdext/source/minimizer/pppoptimizer.cxx (-5 / +11 lines)
Lines 30-57 Link Here
30
30
31
#include <com/sun/star/lang/IllegalArgumentException.hpp>
31
#include <com/sun/star/lang/IllegalArgumentException.hpp>
32
32
33
using namespace ::rtl;
33
#define SERVICE_NAME "com.sun.star.comp.PPPOptimizer"
34
35
34
using namespace ::com::sun::star::uno;
36
using namespace ::com::sun::star::uno;
35
using namespace ::com::sun::star::util;
37
using namespace ::com::sun::star::util;
36
using namespace ::com::sun::star::lang;
38
using namespace ::com::sun::star::lang;
37
using namespace ::com::sun::star::frame;
39
using namespace ::com::sun::star::frame;
38
using namespace ::com::sun::star::beans;
40
using namespace ::com::sun::star::beans;
39
41
40
#define SERVICE_NAME "com.sun.star.comp.PPPOptimizer"
42
using ::rtl::OUString;
41
43
42
// ----------------
44
// ----------------
43
// - PPPOptimizer -
45
// - PPPOptimizer -
44
// ----------------
46
// ----------------
45
47
46
PPPOptimizer::PPPOptimizer( const Reference< XComponentContext > &rxMSF ) :
48
PPPOptimizer::PPPOptimizer( const Reference< XComponentContext > &rxContext ) :
47
    mxMSF( rxMSF )
49
    mxContext( rxContext )
48
{
50
{
51
    OSL_TRACE("PPPOptimizer::PPPOptimizer");
49
}
52
}
50
53
51
// -----------------------------------------------------------------------------
54
// -----------------------------------------------------------------------------
52
55
53
PPPOptimizer::~PPPOptimizer()
56
PPPOptimizer::~PPPOptimizer()
54
{
57
{
58
    OSL_TRACE("PPPOptimizer::~PPPOptimizer");
55
}
59
}
56
60
57
// -----------------------------------------------------------------------------
61
// -----------------------------------------------------------------------------
Lines 61-66 PPPOptimizer::~PPPOptimizer() Link Here
61
void SAL_CALL PPPOptimizer::initialize( const Sequence< Any >& aArguments )
65
void SAL_CALL PPPOptimizer::initialize( const Sequence< Any >& aArguments )
62
	throw ( Exception, RuntimeException )
66
	throw ( Exception, RuntimeException )
63
{
67
{
68
    OSL_TRACE("PPPOptimizer::initialize");
64
	if( aArguments.getLength() != 1 )
69
	if( aArguments.getLength() != 1 )
65
		throw IllegalArgumentException();
70
		throw IllegalArgumentException();
66
71
Lines 130-135 Sequence< Reference< com::sun::star::frame::XDispatch > > SAL_CALL PPPOptimizer: Link Here
130
void SAL_CALL PPPOptimizer::dispatch( const URL& rURL, const Sequence< PropertyValue >& lArguments )
135
void SAL_CALL PPPOptimizer::dispatch( const URL& rURL, const Sequence< PropertyValue >& lArguments )
131
    throw( RuntimeException )
136
    throw( RuntimeException )
132
{
137
{
138
    OSL_TRACE("PPPOptimizer::dispatch");
133
	if ( mxController.is() && ( rURL.Protocol.compareToAscii( "vnd.com.sun.star.comp.PPPOptimizer:" ) == 0 ) )
139
	if ( mxController.is() && ( rURL.Protocol.compareToAscii( "vnd.com.sun.star.comp.PPPOptimizer:" ) == 0 ) )
134
	{
140
	{
135
		if ( rURL.Path.compareToAscii( "optimize" ) == 0 )
141
		if ( rURL.Path.compareToAscii( "optimize" ) == 0 )
Lines 139-145 void SAL_CALL PPPOptimizer::dispatch( const URL& rURL, const Sequence< PropertyV Link Here
139
			{
145
			{
140
				try
146
				try
141
				{
147
				{
142
					ImpOptimizer aOptimizer( mxMSF, xModel );
148
					ImpOptimizer aOptimizer( mxContext, xModel );
143
					aOptimizer.Optimize( lArguments );
149
					aOptimizer.Optimize( lArguments );
144
				}
150
				}
145
				catch( Exception& )
151
				catch( Exception& )
(-)a/main/sdext/source/minimizer/pppoptimizer.hxx (-2 / +2 lines)
Lines 43-54 class PPPOptimizer : public cppu::WeakImplHelper4< Link Here
43
									com::sun::star::frame::XDispatchProvider,
43
									com::sun::star::frame::XDispatchProvider,
44
									com::sun::star::frame::XDispatch >
44
									com::sun::star::frame::XDispatch >
45
{
45
{
46
	com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > mxMSF;
46
	com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > mxContext;
47
	com::sun::star::uno::Reference< com::sun::star::frame::XController > mxController;
47
	com::sun::star::uno::Reference< com::sun::star::frame::XController > mxController;
48
48
49
public:
49
public:
50
50
51
				PPPOptimizer( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxMSF );
51
				PPPOptimizer( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext );
52
	virtual		~PPPOptimizer();
52
	virtual		~PPPOptimizer();
53
53
54
	// XInitialization
54
	// XInitialization
(-)a/main/sdext/source/minimizer/pppoptimizerdialog.cxx (-104 / +100 lines)
Lines 27-56 Link Here
27
#include "pppoptimizerdialog.hxx" 
27
#include "pppoptimizerdialog.hxx" 
28
#include "optimizerdialog.hxx" 
28
#include "optimizerdialog.hxx" 
29
29
30
using namespace ::rtl;
30
#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
31
#include <rtl/strbuf.hxx>
32
#include <rtl/ref.hxx>
33
34
#define SERVICE_NAME "com.sun.star.ui.dialogs.PresentationMinimizerDialog"
35
#define IMPLEMENTATION_NAME "com.sun.star.comp.ui.dialogs.PresentationMinimizerDialog"
36
31
using namespace ::com::sun::star::uno;
37
using namespace ::com::sun::star::uno;
32
using namespace ::com::sun::star::util;
38
using namespace ::com::sun::star::util;
33
using namespace ::com::sun::star::lang;
39
using namespace ::com::sun::star::lang;
34
using namespace ::com::sun::star::frame;
40
using namespace ::com::sun::star::frame;
35
using namespace ::com::sun::star::beans;
41
using namespace ::com::sun::star::beans;
36
42
37
#define SERVICE_NAME "com.sun.star.comp.SunPresentationMinimizer"
43
using ::rtl::OUString;
38
#include <rtl/ustrbuf.hxx>
44
using ::com::sun::star::awt::XWindow;
45
using ::com::sun::star::awt::XWindowPeer;
39
46
40
// ----------------------
47
// ----------------------
41
// - PPPOptimizerDialog -
48
// - PPPOptimizerDialog -
42
// ----------------------
49
// ----------------------
43
50
44
PPPOptimizerDialog::PPPOptimizerDialog( const Reference< XComponentContext > &rxMSF ) :
51
PPPOptimizerDialog::PPPOptimizerDialog(
45
    mxMSF( rxMSF ),
52
    const Reference< XComponentContext > &rxContext ) 
46
	mpOptimizerDialog( NULL )
53
    : m_xContext( rxContext )
54
    , mbInitialized( false )
47
{
55
{
56
    OSL_TRACE("PPPOptimizerDialog::PPPOptimizerDialog");
48
}
57
}
49
58
50
// -----------------------------------------------------------------------------
59
// -----------------------------------------------------------------------------
51
60
52
PPPOptimizerDialog::~PPPOptimizerDialog()
61
PPPOptimizerDialog::~PPPOptimizerDialog()
53
{
62
{
63
    OSL_TRACE("PPPOptimizerDialog::~PPPOptimizerDialog");
54
}
64
}
55
65
56
// -----------------------------------------------------------------------------
66
// -----------------------------------------------------------------------------
Lines 60-71 PPPOptimizerDialog::~PPPOptimizerDialog() Link Here
60
void SAL_CALL PPPOptimizerDialog::initialize( const Sequence< Any >& aArguments )
70
void SAL_CALL PPPOptimizerDialog::initialize( const Sequence< Any >& aArguments )
61
	throw ( Exception, RuntimeException )
71
	throw ( Exception, RuntimeException )
62
{
72
{
63
	if( aArguments.getLength() != 1 ) 
73
    OSL_TRACE("PPPOptimizerDialog::initialize");
64
		throw IllegalArgumentException();
74
    osl::ResettableMutexGuard aGuard( m_aMutex );
65
75
    if ( mbInitialized )
66
	aArguments[ 0 ] >>= mxFrame;
76
        throw RuntimeException(
67
	if ( mxFrame.is() )
77
            OUString( RTL_CONSTASCII_USTRINGPARAM(
68
		mxController = mxFrame->getController();
78
                "PPPOptimizerDialog has already been initialized!") ), 
79
                    Reference< XInterface >() );
80
    aGuard.clear();
81
82
    Reference< XFrame > xFrame;
83
    Reference< XController > xController;
84
    Reference< XModel > xModel;
85
    Reference< XWindow > xWindow;
86
87
    const Any *pAny = aArguments.getConstArray();
88
    const Any *pEnd = pAny + aArguments.getLength();
89
    for ( ; pAny != pEnd && !xFrame.is() && !xWindow.is(); pAny++ )
90
    {
91
        if ( ( *pAny >>= xFrame ) && xFrame.is() )
92
        {
93
            xWindow = xFrame->getContainerWindow();
94
        }
95
        else if ( ( *pAny >>= xController ) && xController.is() )
96
        {
97
            xFrame = xController->getFrame();
98
            if ( xFrame.is() )
99
                xWindow = xFrame->getContainerWindow();
100
        }
101
        else if ( ( *pAny >>= xModel ) && xModel.is() )
102
        {
103
            xController = xModel->getCurrentController();
104
            if ( xController.is() )
105
            {
106
                xFrame = xController->getFrame();
107
                if ( xFrame.is() )
108
                    xWindow = xFrame->getContainerWindow();
109
            }
110
        }
111
        else
112
            *pAny >>= xWindow;
113
    }
114
115
    if ( !xFrame.is() )
116
        throw IllegalArgumentException(
117
            OUString( RTL_CONSTASCII_USTRINGPARAM(
118
                "PPPOptimizerDialog must be initialized with an "
119
                "XFrame, XController or XModel!") ), 
120
                    Reference< XInterface >(), 0 );
121
122
    aGuard.reset();
123
    mxFrame = xFrame;
124
    mxParentWindow.set( xWindow, UNO_QUERY );
125
    mbInitialized = true;
126
    aGuard.clear();
69
}
127
}
70
128
71
// -----------------------------------------------------------------------------
129
// -----------------------------------------------------------------------------
Lines 90-199 Sequence< OUString > SAL_CALL PPPOptimizerDialog::getSupportedServiceNames() Link Here
90
	return PPPOptimizerDialog_getSupportedServiceNames();
148
	return PPPOptimizerDialog_getSupportedServiceNames();
91
}
149
}
92
150
93
// -----------------------------------------------------------------------------
94
// XDispatchProvider
95
// -----------------------------------------------------------------------------
96
151
97
Reference< com::sun::star::frame::XDispatch > SAL_CALL PPPOptimizerDialog::queryDispatch(
152
void SAL_CALL PPPOptimizerDialog::setTitle( const ::rtl::OUString& aTitle )
98
	const URL& aURL, const ::rtl::OUString& /* aTargetFrameName */, sal_Int32 /* nSearchFlags */ ) throw( RuntimeException )
153
throw (::com::sun::star::uno::RuntimeException)
99
{
154
{
100
	Reference < XDispatch > xRet;
155
    osl::MutexGuard aGuard( m_aMutex );
101
    if ( aURL.Protocol.compareToAscii( "vnd.com.sun.star.comp.SunPresentationMinimizer:" ) == 0 )
156
    msTitle = aTitle;
102
		xRet = this;
103
104
	return xRet;
105
}
157
}
106
158
107
//------------------------------------------------------------------------------
159
::sal_Int16 SAL_CALL PPPOptimizerDialog::execute(  )
108
160
throw (::com::sun::star::uno::RuntimeException)
109
Sequence< Reference< com::sun::star::frame::XDispatch > > SAL_CALL PPPOptimizerDialog::queryDispatches(
110
	const Sequence< com::sun::star::frame::DispatchDescriptor >& aDescripts ) throw( RuntimeException )
111
{
161
{
112
	Sequence< Reference< com::sun::star::frame::XDispatch> > aReturn( aDescripts.getLength() );
162
    OSL_TRACE("PPPOptimizerDialog::execute");
113
	Reference< com::sun::star::frame::XDispatch>* pReturn = aReturn.getArray();
163
    sal_Int16 aRet = ::com::sun::star::ui::dialogs::ExecutableDialogResults::CANCEL;
114
	const com::sun::star::frame::DispatchDescriptor* pDescripts = aDescripts.getConstArray();
164
115
	for (sal_Int16 i = 0; i < aDescripts.getLength(); ++i, ++pReturn, ++pDescripts )
165
    osl::ClearableMutexGuard aGuard( m_aMutex );
116
	{
166
    bool bInit( mbInitialized );
117
		*pReturn = queryDispatch( pDescripts->FeatureURL, pDescripts->FrameName, pDescripts->SearchFlags );
167
    Reference< XFrame > xFrame( mxFrame );
118
	}
168
    Reference< XWindowPeer > xParent( mxParentWindow );
119
	return aReturn;
169
    aGuard.clear();
120
}
170
171
    if ( !bInit || !xFrame.is() || !xParent.is() )
172
        throw RuntimeException();
173
    try
174
    {
175
        OptimizerDialog *pDialog(
176
            new OptimizerDialog( m_xContext, xFrame, xParent ) );
177
        pDialog->setTitle( msTitle );
178
        aRet = pDialog->execute();
179
        delete pDialog;
180
    }
181
    catch( ... )
182
    {
183
    }
121
184
122
// -----------------------------------------------------------------------------
185
    return aRet;
123
// XDispatch
124
// -----------------------------------------------------------------------------
125
126
void SAL_CALL PPPOptimizerDialog::dispatch( const URL& rURL,
127
											const Sequence< PropertyValue >& rArguments )
128
    throw( RuntimeException )
129
{
130
	sal_Int64 nFileSizeSource = 0;
131
	sal_Int64 nFileSizeDest = 0;
132
133
	if ( mxController.is() && ( rURL.Protocol.compareToAscii( "vnd.com.sun.star.comp.SunPresentationMinimizer:" ) == 0 ) )
134
	{
135
		if ( rURL.Path.compareToAscii( "execute" ) == 0 )
136
		{
137
			sal_Bool bDialogExecuted = sal_False;
138
139
			try
140
			{
141
				mpOptimizerDialog = new OptimizerDialog( mxMSF, mxFrame, this );
142
				bDialogExecuted = mpOptimizerDialog->execute();
143
144
				const Any* pVal( mpOptimizerDialog->maStats.GetStatusValue( TK_FileSizeSource ) );
145
				if ( pVal )
146
					*pVal >>= nFileSizeSource;
147
				pVal = mpOptimizerDialog->maStats.GetStatusValue( TK_FileSizeDestination );
148
				if ( pVal )
149
					*pVal >>= nFileSizeDest;
150
151
				if ( nFileSizeSource && nFileSizeDest )
152
				{
153
					rtl::OUStringBuffer sBuf( rtl::OUString::createFromAscii( "Your Presentation has been minimized from:" ) );
154
					sBuf.append( rtl::OUString::valueOf( nFileSizeSource >> 10 ) );
155
					sBuf.append( rtl::OUString::createFromAscii( "KB to " ) );
156
					sBuf.append( rtl::OUString::valueOf( nFileSizeDest >> 10 ) );
157
					sBuf.append( rtl::OUString::createFromAscii( "KB." ) );
158
					OUString sResult( sBuf.makeStringAndClear() );
159
//					mpOptimizerDialog->showMessageBox( sResult, sResult, sal_False );
160
				}
161
				delete mpOptimizerDialog, mpOptimizerDialog = NULL;
162
			}
163
			catch( ... )
164
			{
165
166
			}
167
		}
168
		else if ( rURL.Path.compareToAscii( "statusupdate" ) == 0 )
169
		{
170
			if ( mpOptimizerDialog )
171
				mpOptimizerDialog->UpdateStatus( rArguments );
172
		}
173
	}
174
}
175
176
//===============================================
177
void SAL_CALL PPPOptimizerDialog::addStatusListener( const Reference< XStatusListener >&, const URL& )
178
	throw( RuntimeException )
179
{
180
    // TODO
181
	// OSL_ENSURE( sal_False, "PPPOptimizerDialog::addStatusListener()\nNot implemented yet!" );
182
}
183
184
//===============================================
185
void SAL_CALL PPPOptimizerDialog::removeStatusListener( const Reference< XStatusListener >&, const URL& )
186
    throw( RuntimeException )
187
{
188
    // TODO
189
    // OSL_ENSURE( sal_False, "PPPOptimizerDialog::removeStatusListener()\nNot implemented yet!" );
190
}
186
}
191
187
192
// -----------------------------------------------------------------------------
188
// -----------------------------------------------------------------------------
193
189
194
OUString PPPOptimizerDialog_getImplementationName()
190
OUString PPPOptimizerDialog_getImplementationName()
195
{
191
{
196
	return OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.comp.SunPresentationMinimizerImp" ) );
192
	return OUString ( RTL_CONSTASCII_USTRINGPARAM ( IMPLEMENTATION_NAME ) );
197
}
193
}
198
194
199
Sequence< OUString > PPPOptimizerDialog_getSupportedServiceNames() 
195
Sequence< OUString > PPPOptimizerDialog_getSupportedServiceNames() 
(-)a/main/sdext/source/minimizer/pppoptimizerdialog.hxx (-33 / +18 lines)
Lines 31-71 Link Here
31
#include <com/sun/star/beans/XPropertySetInfo.hpp>
31
#include <com/sun/star/beans/XPropertySetInfo.hpp>
32
#include <com/sun/star/lang/XServiceInfo.hpp>
32
#include <com/sun/star/lang/XServiceInfo.hpp>
33
#include <com/sun/star/uno/XComponentContext.hpp>
33
#include <com/sun/star/uno/XComponentContext.hpp>
34
#ifndef _COM_SUN_STAR_LANG_XMULTI_COMPONENT_FACTORY_HPP_
35
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
34
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
36
#endif
37
#include <com/sun/star/lang/XInitialization.hpp>
35
#include <com/sun/star/lang/XInitialization.hpp>
38
#include <com/sun/star/frame/XController.hpp>
36
#include <com/sun/star/frame/XController.hpp>
39
#include <com/sun/star/frame/XDispatch.hpp>
37
#include <com/sun/star/frame/XDispatch.hpp>
40
#include <com/sun/star/frame/XDispatchProvider.hpp>
38
#include <com/sun/star/frame/XDispatchProvider.hpp>
41
#include <cppuhelper/implbase4.hxx>
39
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
40
#include <com/sun/star/awt/XWindowPeer.hpp>
41
42
#include <cppuhelper/implbase3.hxx>
43
#include <cppuhelper/basemutex.hxx>
42
44
43
// ----------------------
45
// ----------------------
44
// - PPPOptimizerDialog -
46
// - PPPOptimizerDialog -
45
// ----------------------
47
// ----------------------
46
48
47
class OptimizerDialog;
49
class PPPOptimizerDialog :  protected ::cppu::BaseMutex,
48
class PPPOptimizerDialog : public	::cppu::WeakImplHelper4<
50
                            public	::cppu::WeakImplHelper3<
49
									com::sun::star::lang::XInitialization,
51
									com::sun::star::lang::XInitialization,
50
									com::sun::star::lang::XServiceInfo,
52
									com::sun::star::lang::XServiceInfo,
51
									com::sun::star::frame::XDispatchProvider,
53
                                    com::sun::star::ui::dialogs::XExecutableDialog >
52
									com::sun::star::frame::XDispatch >
53
{
54
{
54
	com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > mxMSF;
55
private:
55
	com::sun::star::uno::Reference< com::sun::star::frame::XFrame > mxFrame;
56
	com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > m_xContext;
56
	com::sun::star::uno::Reference< com::sun::star::frame::XController > mxController;
57
    bool mbInitialized;
57
58
    com::sun::star::uno::Reference< com::sun::star::frame::XFrame > mxFrame;
58
	OptimizerDialog*	mpOptimizerDialog;
59
	com::sun::star::uno::Reference< com::sun::star::awt::XWindowPeer > mxParentWindow;
60
    rtl::OUString msTitle;
59
61
60
public:
62
public:
61
63
62
	PPPOptimizerDialog( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxMSF );
64
	PPPOptimizerDialog( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext );
63
	virtual	~PPPOptimizerDialog();
65
	virtual	~PPPOptimizerDialog();
64
66
65
	// XInitialization
67
	// XInitialization
66
	void SAL_CALL initialize( const com::sun::star::uno::Sequence< com::sun::star::uno::Any >& aArguments )
68
	void SAL_CALL initialize( const com::sun::star::uno::Sequence< com::sun::star::uno::Any >& aArguments )
67
		throw( com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException );
69
		throw( com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException );
68
70
71
    virtual void SAL_CALL setTitle( const ::rtl::OUString& aTitle ) throw (::com::sun::star::uno::RuntimeException);
72
    virtual ::sal_Int16 SAL_CALL execute(  ) throw (::com::sun::star::uno::RuntimeException);
73
69
	// XServiceInfo
74
	// XServiceInfo
70
    virtual ::rtl::OUString SAL_CALL getImplementationName()
75
    virtual ::rtl::OUString SAL_CALL getImplementationName()
71
        throw( com::sun::star::uno::RuntimeException );
76
        throw( com::sun::star::uno::RuntimeException );
Lines 75-100 public: Link Here
75
80
76
	virtual com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
81
	virtual com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
77
        throw( com::sun::star::uno::RuntimeException );
82
        throw( com::sun::star::uno::RuntimeException );
78
79
	// XDispatchProvider
80
	virtual com::sun::star::uno::Reference< com::sun::star::frame::XDispatch > SAL_CALL queryDispatch(
81
		const com::sun::star::util::URL& aURL, const rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags )
82
			throw(com::sun::star::uno::RuntimeException);
83
84
	virtual com::sun::star::uno::Sequence< com::sun::star::uno::Reference< com::sun::star::frame::XDispatch > > SAL_CALL queryDispatches(
85
		const com::sun::star::uno::Sequence< com::sun::star::frame::DispatchDescriptor >& aDescripts ) throw( com::sun::star::uno::RuntimeException );
86
87
    // XDispatch
88
    virtual void SAL_CALL dispatch( const com::sun::star::util::URL& aURL,
89
										const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& lArguments )
90
        throw( com::sun::star::uno::RuntimeException );
91
92
    virtual void SAL_CALL addStatusListener( const com::sun::star::uno::Reference< com::sun::star::frame::XStatusListener >& xListener,
93
												const com::sun::star::util::URL& aURL )
94
        throw( com::sun::star::uno::RuntimeException );
95
    virtual void SAL_CALL removeStatusListener( const com::sun::star::uno::Reference< com::sun::star::frame::XStatusListener >& xListener,
96
												const com::sun::star::util::URL& aURL )
97
        throw( com::sun::star::uno::RuntimeException );
98
};
83
};
99
84
100
rtl::OUString PPPOptimizerDialog_getImplementationName();
85
rtl::OUString PPPOptimizerDialog_getImplementationName();
(-)a/main/sdext/source/minimizer/pppoptimizertoken.cxx (-8 / +7 lines)
Lines 49-55 struct TokenTable Link Here
49
	const char*						    pS;
49
	const char*						    pS;
50
	PPPOptimizerTokenEnum				pE;
50
	PPPOptimizerTokenEnum				pE;
51
};
51
};
52
																																																					
52
53
static const TokenTable pTokenTableArray[] = 
53
static const TokenTable pTokenTableArray[] = 
54
{
54
{
55
	{ "rdmNavi",			TK_rdmNavi },
55
	{ "rdmNavi",			TK_rdmNavi },
Lines 112-118 static const TokenTable pTokenTableArray[] = Link Here
112
	{ "Alpha",				TK_Alpha },
112
	{ "Alpha",				TK_Alpha },
113
	{ "Animated",			TK_Animated },
113
	{ "Animated",			TK_Animated },
114
	{ "Background",			TK_Background },
114
	{ "Background",			TK_Background },
115
	{ "BitmapPath",			TK_BitmapPath },
116
	{ "Border",				TK_Border },
115
	{ "Border",				TK_Border },
117
	{ "Closeable",			TK_Closeable },
116
	{ "Closeable",			TK_Closeable },
118
	{ "ColorMode",			TK_ColorMode },
117
	{ "ColorMode",			TK_ColorMode },
Lines 146-156 static const TokenTable pTokenTableArray[] = Link Here
146
	{ "GraphicURL",			TK_GraphicURL },
145
	{ "GraphicURL",			TK_GraphicURL },
147
	{ "GraphicStreamURL",	TK_GraphicStreamURL },
146
	{ "GraphicStreamURL",	TK_GraphicStreamURL },
148
	{ "Height",				TK_Height },
147
	{ "Height",				TK_Height },
149
	{ "HelpFile",			TK_HelpFile },
148
    { "HelpURL",            TK_HelpURL },
150
	{ "Hidden",				TK_Hidden },
149
	{ "Hidden",				TK_Hidden },
151
	{ "ID",					TK_ID },
150
	{ "ID",					TK_ID },
152
	{ "ImageURL",			TK_ImageURL },
151
	{ "ImageURL",			TK_ImageURL },
153
	{ "InformationDialog",	TK_InformationDialog },
152
	{ "ParentWindow",	    TK_ParentWindow },// TODO move it
154
	{ "InputStream",		TK_InputStream },
153
	{ "InputStream",		TK_InputStream },
155
	{ "Interlaced",			TK_Interlaced },
154
	{ "Interlaced",			TK_Interlaced },
156
	{ "IsInternal",			TK_IsInternal },
155
	{ "IsInternal",			TK_IsInternal },
Lines 186-192 static const TokenTable pTokenTableArray[] = Link Here
186
	{ "Spin",				TK_Spin },
185
	{ "Spin",				TK_Spin },
187
	{ "Step",				TK_Step },
186
	{ "Step",				TK_Step },
188
	{ "State",				TK_State },
187
	{ "State",				TK_State },
189
	{ "StatusDispatcher",	TK_StatusDispatcher },
188
	{ "StatusListener",	    TK_StatusListener },
190
	{ "StringItemList",		TK_StringItemList },
189
	{ "StringItemList",		TK_StringItemList },
191
	{ "Strings",			TK_Strings },
190
	{ "Strings",			TK_Strings },
192
	{ "TabIndex",			TK_TabIndex },
191
	{ "TabIndex",			TK_TabIndex },
Lines 226-233 static const TokenTable pTokenTableArray[] = Link Here
226
	{ "CurrentGraphicObject",TK_CurrentGraphicObject },
225
	{ "CurrentGraphicObject",TK_CurrentGraphicObject },
227
	{ "OLEObjects",			TK_OLEObjects },
226
	{ "OLEObjects",			TK_OLEObjects },
228
	{ "CurrentOLEObject",	TK_CurrentOLEObject },
227
	{ "CurrentOLEObject",	TK_CurrentOLEObject },
229
228
#if 0
230
	{ "STR_SUN_OPTIMIZATION_WIZARD2",STR_SUN_OPTIMIZATION_WIZARD2 },
229
	{ "STR_PRESENTATION_MINIMIZER",STR_PRESENTATION_MINIMIZER },
231
	{ "STR_STEPS",					STR_STEPS },
230
	{ "STR_STEPS",					STR_STEPS },
232
	{ "STR_HELP",					STR_HELP },
231
	{ "STR_HELP",					STR_HELP },
233
	{ "STR_BACK",					STR_BACK },
232
	{ "STR_BACK",					STR_BACK },
Lines 292-298 static const TokenTable pTokenTableArray[] = Link Here
292
	{ "STR_OPTIMIZING_GRAPHICS",	STR_OPTIMIZING_GRAPHICS },
291
	{ "STR_OPTIMIZING_GRAPHICS",	STR_OPTIMIZING_GRAPHICS },
293
	{ "STR_CREATING_OLE_REPLACEMENTS",STR_CREATING_OLE_REPLACEMENTS },
292
	{ "STR_CREATING_OLE_REPLACEMENTS",STR_CREATING_OLE_REPLACEMENTS },
294
	{ "STR_FileSizeSeparator",		STR_FILESIZESEPARATOR },
293
	{ "STR_FileSizeSeparator",		STR_FILESIZESEPARATOR },
295
	
294
#endif
296
	{ "Last",				TK_Last }, 
295
	{ "Last",				TK_Last }, 
297
	{ "NotFound",			TK_NotFound }
296
	{ "NotFound",			TK_NotFound }
298
};
297
};
(-)a/main/sdext/source/minimizer/pppoptimizertoken.hxx (-7 / +6 lines)
Lines 88-94 enum PPPOptimizerTokenEnum Link Here
88
	TK_Alpha,
88
	TK_Alpha,
89
	TK_Animated,
89
	TK_Animated,
90
	TK_Background,
90
	TK_Background,
91
	TK_BitmapPath,
92
	TK_Border,
91
	TK_Border,
93
	TK_Closeable,
92
	TK_Closeable,
94
	TK_ColorMode,
93
	TK_ColorMode,
Lines 122-132 enum PPPOptimizerTokenEnum Link Here
122
	TK_GraphicURL,
121
	TK_GraphicURL,
123
	TK_GraphicStreamURL,
122
	TK_GraphicStreamURL,
124
	TK_Height,
123
	TK_Height,
125
	TK_HelpFile,
124
    TK_HelpURL,
126
	TK_Hidden,
125
	TK_Hidden,
127
	TK_ID,
126
	TK_ID,
128
	TK_ImageURL,
127
	TK_ImageURL,
129
	TK_InformationDialog,
128
	TK_ParentWindow,
130
	TK_InputStream,
129
	TK_InputStream,
131
	TK_Interlaced,
130
	TK_Interlaced,
132
	TK_IsInternal,
131
	TK_IsInternal,
Lines 162-168 enum PPPOptimizerTokenEnum Link Here
162
	TK_Spin,
161
	TK_Spin,
163
	TK_Step,
162
	TK_Step,
164
	TK_State,
163
	TK_State,
165
	TK_StatusDispatcher,
164
	TK_StatusListener,
166
	TK_StringItemList,
165
	TK_StringItemList,
167
	TK_Strings,
166
	TK_Strings,
168
	TK_TabIndex,
167
	TK_TabIndex,
Lines 202-209 enum PPPOptimizerTokenEnum Link Here
202
	TK_CurrentGraphicObject,
201
	TK_CurrentGraphicObject,
203
	TK_OLEObjects,
202
	TK_OLEObjects,
204
	TK_CurrentOLEObject,
203
	TK_CurrentOLEObject,
205
204
#if 0
206
	STR_SUN_OPTIMIZATION_WIZARD2,
205
	STR_PRESENTATION_MINIMIZER,
207
	STR_STEPS,
206
	STR_STEPS,
208
	STR_HELP,
207
	STR_HELP,
209
	STR_BACK,
208
	STR_BACK,
Lines 268-274 enum PPPOptimizerTokenEnum Link Here
268
	STR_OPTIMIZING_GRAPHICS,
267
	STR_OPTIMIZING_GRAPHICS,
269
	STR_CREATING_OLE_REPLACEMENTS,
268
	STR_CREATING_OLE_REPLACEMENTS,
270
	STR_FILESIZESEPARATOR,
269
	STR_FILESIZESEPARATOR,
271
270
#endif
272
	TK_Last, 
271
	TK_Last, 
273
	TK_NotFound
272
	TK_NotFound
274
};
273
};
(-)a/main/sdext/source/minimizer/pppoptimizeruno.cxx (-84 / +40 lines)
Lines 1-5 Link Here
1
/**************************************************************
1
/**************************************************************
2
 * 
2
 *
3
 * Licensed to the Apache Software Foundation (ASF) under one
3
 * Licensed to the Apache Software Foundation (ASF) under one
4
 * or more contributor license agreements.  See the NOTICE file
4
 * or more contributor license agreements.  See the NOTICE file
5
 * distributed with this work for additional information
5
 * distributed with this work for additional information
Lines 7-116 Link Here
7
 * to you under the Apache License, Version 2.0 (the
7
 * to you under the Apache License, Version 2.0 (the
8
 * "License"); you may not use this file except in compliance
8
 * "License"); you may not use this file except in compliance
9
 * with the License.  You may obtain a copy of the License at
9
 * with the License.  You may obtain a copy of the License at
10
 * 
10
 *
11
 *   http://www.apache.org/licenses/LICENSE-2.0
11
 *   http://www.apache.org/licenses/LICENSE-2.0
12
 * 
12
 *
13
 * Unless required by applicable law or agreed to in writing,
13
 * Unless required by applicable law or agreed to in writing,
14
 * software distributed under the License is distributed on an
14
 * software distributed under the License is distributed on an
15
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
 * KIND, either express or implied.  See the License for the
16
 * KIND, either express or implied.  See the License for the
17
 * specific language governing permissions and limitations
17
 * specific language governing permissions and limitations
18
 * under the License.
18
 * under the License.
19
 * 
19
 *
20
 *************************************************************/
20
 *************************************************************/
21
21
22
23
24
// MARKER(update_precomp.py): autogen include statement, do not remove
22
// MARKER(update_precomp.py): autogen include statement, do not remove
25
#include "precompiled_sdext.hxx"
23
#include "precompiled_sdext.hxx"
26
24
27
#include <stdio.h>
25
#include "pppoptimizer.hxx"
28
#include <osl/mutex.hxx>
26
#include "pppoptimizerdialog.hxx"
29
#include <osl/thread.h>
27
30
#include <cppuhelper/factory.hxx>
28
#include <cppuhelper/factory.hxx>
31
#include <pppoptimizer.hxx>
29
#include <cppuhelper/implementationentry.hxx>
32
#include <pppoptimizerdialog.hxx>
33
30
34
using namespace ::rtl;
35
using namespace ::cppu;
36
using namespace ::com::sun::star::uno;
37
using namespace ::com::sun::star::lang;
38
using namespace ::com::sun::star::registry;
39
31
40
extern "C"
32
namespace sdext_presentation_minimizer
41
{
33
{
42
    void SAL_CALL component_getImplementationEnvironment(
34
    static struct cppu::ImplementationEntry g_entries[] =
43
	    const sal_Char ** ppEnvTypeName, uno_Environment ** )
44
    {
35
    {
45
	    *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
36
        {
46
    }
37
            PPPOptimizer_createInstance,
38
            PPPOptimizer_getImplementationName,
39
            PPPOptimizer_getSupportedServiceNames,
40
            cppu::createSingleComponentFactory,
41
            0,
42
            0
43
        },
44
        {
45
            PPPOptimizerDialog_createInstance,
46
            PPPOptimizerDialog_getImplementationName,
47
            PPPOptimizer_getSupportedServiceNames,
48
            cppu::createSingleComponentFactory,
49
            0,
50
            0
51
        },
52
        { 0, 0, 0, 0, 0, 0 }
53
    };
54
}
47
55
48
    // -------------------------------------------------------------------------
56
extern "C"
49
    
57
{
50
    sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, void* pRegistryKey )
58
    SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
59
        const sal_Char **ppEnvTypeName, uno_Environment **/*ppEnv*/ )
51
    {
60
    {
52
	    if (pRegistryKey)
61
        *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
53
	    {
54
		    try
55
		    {
56
                Reference< XRegistryKey >   xNewKey;
57
                sal_Int32                   nPos;
58
59
                xNewKey = reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( PPPOptimizer_getImplementationName() );
60
                xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) );
61
                const Sequence< OUString > & rSNL1 = PPPOptimizer_getSupportedServiceNames();
62
			    const OUString * pArray1 = rSNL1.getConstArray();
63
			    for ( nPos = rSNL1.getLength(); nPos--; )
64
				    xNewKey->createKey( pArray1[nPos] );
65
66
                xNewKey = reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( PPPOptimizerDialog_getImplementationName() ); 
67
                xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) );
68
			    const Sequence< OUString > & rSNL2 = PPPOptimizerDialog_getSupportedServiceNames();
69
			    const OUString * pArray2 = rSNL2.getConstArray();
70
			    for ( nPos = rSNL2.getLength(); nPos--; )
71
				    xNewKey->createKey( pArray2[nPos] );
72
73
			    return sal_True;
74
		    }
75
		    catch (InvalidRegistryException &)
76
		    {
77
			    OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
78
		    }
79
	    }
80
	    return sal_False;
81
    }
62
    }
82
63
83
    // -------------------------------------------------------------------------
64
    SAL_DLLPUBLIC_EXPORT void *SAL_CALL component_getFactory(
84
65
        const sal_Char *pImplName, void *pServiceManager, void *pRegistryKey )
85
    void* SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
86
    {
66
    {
87
        OUString    aImplName( OUString::createFromAscii( pImplName ) );
67
        return ::cppu::component_getFactoryHelper( pImplName,
88
	    void*       pRet = 0;
68
                pServiceManager,
89
69
                pRegistryKey ,
90
        if( pServiceManager )
70
                sdext_presentation_minimizer::g_entries );
91
        {
92
            Reference< XSingleComponentFactory > xFactory;
93
            if( aImplName.equals( PPPOptimizer_getImplementationName() ) )
94
	        {
95
		        xFactory = createSingleComponentFactory(
96
						PPPOptimizer_createInstance,
97
						OUString::createFromAscii( pImplName ), 
98
						PPPOptimizer_getSupportedServiceNames() );
99
100
	        }
101
            else if( aImplName.equals( PPPOptimizerDialog_getImplementationName() ) )
102
	        {
103
				xFactory = createSingleComponentFactory(
104
						PPPOptimizerDialog_createInstance,
105
                        OUString::createFromAscii( pImplName ),
106
						PPPOptimizerDialog_getSupportedServiceNames() );
107
	        }
108
            if( xFactory.is() )
109
            {
110
			    xFactory->acquire();
111
                pRet = xFactory.get();
112
            }
113
        }
114
	    return pRet;
115
    }
71
    }
116
}
72
}
(-)a/main/sdext/source/minimizer/registry/data/org/openoffice/Office/Addons.xcu (-86 lines)
Lines 1-86 Link Here
1
<?xml version='1.0' encoding='UTF-8'?>
2
<!--***********************************************************
3
 * 
4
 * Licensed to the Apache Software Foundation (ASF) under one
5
 * or more contributor license agreements.  See the NOTICE file
6
 * distributed with this work for additional information
7
 * regarding copyright ownership.  The ASF licenses this file
8
 * to you under the Apache License, Version 2.0 (the
9
 * "License"); you may not use this file except in compliance
10
 * with the License.  You may obtain a copy of the License at
11
 * 
12
 *   http://www.apache.org/licenses/LICENSE-2.0
13
 * 
14
 * Unless required by applicable law or agreed to in writing,
15
 * software distributed under the License is distributed on an
16
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17
 * KIND, either express or implied.  See the License for the
18
 * specific language governing permissions and limitations
19
 * under the License.
20
 * 
21
 ***********************************************************-->
22
23
<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:name="Addons" oor:package="org.openoffice.Office">
24
	<node oor:name="AddonUI">
25
		<node oor:name="Images">
26
			<node oor:name="opt-image" oor:op="replace">
27
				<prop oor:name="URL">
28
					<value>vnd.com.sun.star.comp.SunPresentationMinimizer:execute</value>
29
				</prop>
30
				<node oor:name="UserDefinedImages">
31
					<prop oor:name="ImageSmallURL" oor:type="xs:string">
32
						<value>%origin%/../../../../../bitmaps/opt_16.png</value>
33
					</prop>
34
					<prop oor:name="ImageBigURL" oor:type="xs:string">
35
						<value>%origin%/../../../../../bitmaps/opt_26.png</value>
36
					</prop>
37
					<prop oor:name="ImageSmallHCURL" oor:type="xs:string">
38
						<value>%origin%/../../../../../bitmaps/opt_16_h.png</value>
39
					</prop>
40
					<prop oor:name="ImageBigHCURL" oor:type="xs:string">
41
						<value>%origin%/../../../../../bitmaps/opt_26_h.png</value>
42
					</prop>
43
				</node>
44
			</node>
45
		</node>
46
		<node oor:name="OfficeMenuBarMerging">
47
			<node oor:name="SunPresentationMinimizer" oor:op="replace">
48
				<node oor:name="Command1" oor:op="replace">
49
					<prop oor:name="MergePoint">
50
						<value>.uno:ToolsMenu\.uno:AVMediaPlayer</value>
51
					</prop>
52
					<prop oor:name="MergeCommand">
53
						<value>AddAfter</value>
54
					</prop>
55
					<prop oor:name="MergeFallback">
56
						<value>AddPath</value>
57
					</prop>
58
					<prop oor:name="MergeContext">
59
						<value>com.sun.star.presentation.PresentationDocument</value>
60
					</prop>
61
					<node oor:name="MenuItems">
62
						<node oor:name="SunPresentationMinimizerExecute1" oor:op="replace">
63
							<prop oor:name="URL" oor:type="xs:string">
64
								<value>private:separator</value>
65
							</prop>
66
						</node>
67
						<node oor:name="SunPresentationMinimizerExecute2" oor:op="replace">
68
							<prop oor:name="URL" oor:type="xs:string">
69
								<value>vnd.com.sun.star.comp.SunPresentationMinimizer:execute</value>
70
							</prop>
71
							<prop oor:name="Title" oor:type="xs:string">
72
								<value xml:lang="en-US">~Minimize Presentation...</value>
73
							</prop>
74
							<prop oor:name="Target" oor:type="xs:string">
75
								<value>_self</value>
76
							</prop>
77
							<prop oor:name="Context" oor:type="xs:string">
78
								<value>com.sun.star.presentation.PresentationDocument</value>
79
							</prop>
80
						</node>
81
					</node>
82
				</node>
83
			</node>
84
		</node>
85
	</node>
86
</oor:component-data>
(-)a/main/sdext/source/minimizer/registry/data/org/openoffice/Office/ProtocolHandler.xcu (-31 lines)
Lines 1-31 Link Here
1
<?xml version='1.0' encoding='UTF-8'?>
2
<!--***********************************************************
3
 * 
4
 * Licensed to the Apache Software Foundation (ASF) under one
5
 * or more contributor license agreements.  See the NOTICE file
6
 * distributed with this work for additional information
7
 * regarding copyright ownership.  The ASF licenses this file
8
 * to you under the Apache License, Version 2.0 (the
9
 * "License"); you may not use this file except in compliance
10
 * with the License.  You may obtain a copy of the License at
11
 * 
12
 *   http://www.apache.org/licenses/LICENSE-2.0
13
 * 
14
 * Unless required by applicable law or agreed to in writing,
15
 * software distributed under the License is distributed on an
16
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17
 * KIND, either express or implied.  See the License for the
18
 * specific language governing permissions and limitations
19
 * under the License.
20
 * 
21
 ***********************************************************-->
22
23
<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:name="ProtocolHandler" oor:package="org.openoffice.Office">
24
	<node oor:name="HandlerSet">
25
		<node oor:name="com.sun.star.comp.SunPresentationMinimizerImp" oor:op="replace">
26
			<prop oor:name="Protocols" oor:type="oor:string-list">
27
				<value>vnd.com.sun.star.comp.SunPresentationMinimizer:*</value>
28
			</prop>
29
		</node>
30
	</node>
31
</oor:component-data>
(-)a/main/sdext/source/minimizer/registry/data/org/openoffice/Office/extension/SunPresentationMinimizer.xcu (-404 lines)
Lines 1-404 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!--***********************************************************
3
 * 
4
 * Licensed to the Apache Software Foundation (ASF) under one
5
 * or more contributor license agreements.  See the NOTICE file
6
 * distributed with this work for additional information
7
 * regarding copyright ownership.  The ASF licenses this file
8
 * to you under the Apache License, Version 2.0 (the
9
 * "License"); you may not use this file except in compliance
10
 * with the License.  You may obtain a copy of the License at
11
 * 
12
 *   http://www.apache.org/licenses/LICENSE-2.0
13
 * 
14
 * Unless required by applicable law or agreed to in writing,
15
 * software distributed under the License is distributed on an
16
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17
 * KIND, either express or implied.  See the License for the
18
 * specific language governing permissions and limitations
19
 * under the License.
20
 * 
21
 ***********************************************************-->
22
23
<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:name="SunPresentationMinimizer" oor:package="org.openoffice.Office.extension">
24
25
    <prop oor:name="BitmapPath" oor:type="xs:string">
26
        <value>%origin%/../../../../../../bitmaps</value>
27
    </prop>
28
29
    <prop oor:name="HelpFile" oor:type="xs:string">
30
		<value xml:lang="en-US">%origin%/../../../../../../help/help_en-US.odt</value>
31
    </prop>
32
33
	<node oor:name="Strings">
34
		<prop oor:name="STR_SUN_OPTIMIZATION_WIZARD2">
35
			<value xml:lang="en-US">@MINIMIZEREXTENSIONPRODUCTNAME@</value>
36
		</prop>
37
		<prop oor:name="STR_STEPS">
38
			<value xml:lang="en-US">Steps</value>
39
		</prop>
40
		<prop oor:name="STR_HELP">
41
			<value xml:lang="en-US">~Help</value>
42
		</prop>
43
		<prop oor:name="STR_BACK">
44
			<value xml:lang="en-US">&lt; ~Back</value>
45
		</prop>
46
		<prop oor:name="STR_NEXT">
47
			<value xml:lang="en-US">~Next &gt;</value>
48
		</prop>
49
		<prop oor:name="STR_FINISH">
50
			<value xml:lang="en-US">~Finish</value>
51
		</prop>
52
		<prop oor:name="STR_CANCEL">
53
			<value xml:lang="en-US">Cancel</value>
54
		</prop>
55
		<prop oor:name="STR_INTRODUCTION">
56
			<value xml:lang="en-US">Introduction</value>
57
		</prop>
58
		<prop oor:name="STR_INTRODUCTION_T">
59
			<value xml:lang="en-US">The @MINIMIZEREXTENSIONPRODUCTNAME@ is used to reduce the file size of the current presentation. Images will be compressed and data, that is no longer needed, will be removed.
60
61
        At the last step of the wizard you can choose to apply the changes to the current presentation or to create an optimized new version of the presentation.</value>
62
		</prop>
63
		<prop oor:name="STR_CHOSE_SETTINGS">
64
			<value xml:lang="en-US">~Choose settings for @MINIMIZEREXTENSIONPRODUCTNAME@</value>
65
		</prop>
66
		<prop oor:name="STR_REMOVE">
67
			<value xml:lang="en-US">~Delete</value>
68
		</prop>
69
		<prop oor:name="STR_GRAPHIC_OPTIMIZATION">
70
			<value xml:lang="en-US">Choose settings for optimizing pictures and graphics</value>
71
		</prop>
72
		<prop oor:name="STR_IMAGE_OPTIMIZATION">
73
			<value xml:lang="en-US">Graphics</value>
74
		</prop>
75
		<prop oor:name="STR_LOSSLESS_COMPRESSION">
76
			<value xml:lang="en-US">~Lossless compression</value>
77
		</prop>	
78
		<prop oor:name="STR_JPEG_COMPRESSION">
79
			<value xml:lang="en-US">~JPEG compression</value>
80
		</prop>
81
		<prop oor:name="STR_QUALITY">
82
			<value xml:lang="en-US">~Quality in %</value>
83
		</prop>
84
		<prop oor:name="STR_REMOVE_CROP_AREA">
85
			<value xml:lang="en-US">~Delete cropped graphic areas</value>
86
		</prop>
87
		<prop oor:name="STR_IMAGE_RESOLUTION">
88
			<value xml:lang="en-US">Reduce ~image resolution</value>
89
		</prop>
90
		<prop oor:name="STR_IMAGE_RESOLUTION_0">
91
			<value xml:lang="en-US">0;&lt;no change&gt;</value>
92
		</prop>
93
		<prop oor:name="STR_IMAGE_RESOLUTION_1">
94
			<value xml:lang="en-US">90;90 DPI (screen resolution)</value>
95
		</prop>
96
		<prop oor:name="STR_IMAGE_RESOLUTION_2">
97
			<value xml:lang="en-US">150;150 DPI (projector resolution)</value>
98
		</prop>
99
		<prop oor:name="STR_IMAGE_RESOLUTION_3">
100
			<value xml:lang="en-US">300;300 DPI (print resolution)</value>
101
		</prop>
102
		<prop oor:name="STR_EMBED_LINKED_GRAPHICS">
103
			<value xml:lang="en-US">~Break links to external graphics</value>
104
		</prop>	
105
		<prop oor:name="STR_OLE_OBJECTS">
106
			<value xml:lang="en-US">OLE Objects</value>
107
		</prop>
108
		<prop oor:name="STR_OLE_OPTIMIZATION">
109
			<value xml:lang="en-US">Choose settings for replacing OLE objects</value>
110
		</prop>
111
		<prop oor:name="STR_OLE_REPLACE">
112
			<value xml:lang="en-US">Create static replacement graphics for OLE objects</value>
113
		</prop>
114
		<prop oor:name="STR_ALL_OLE_OBJECTS">
115
			<value xml:lang="en-US">For ~all OLE objects</value>
116
		</prop>
117
		<prop oor:name="STR_ALIEN_OLE_OBJECTS_ONLY">
118
			<value xml:lang="en-US">~For OLE objects not based on OpenDocument format</value>
119
		</prop>
120
		<prop oor:name="STR_OLE_OBJECTS_DESC">
121
			<value xml:lang="en-US">Object Linking and Embedding (OLE) is a technology that allows embedding and linking to documents and other objects.
122
123
The current presentation contains OLE objects.</value>
124
		</prop>
125
		<prop oor:name="STR_NO_OLE_OBJECTS_DESC">
126
			<value xml:lang="en-US">Object Linking and Embedding (OLE) is a technology that allows embedding and linking to documents and other objects.
127
128
The current presentation contains no OLE objects.</value>
129
		</prop>	
130
		<prop oor:name="STR_SLIDES">
131
			<value xml:lang="en-US">Slides</value>
132
		</prop>
133
		<prop oor:name="STR_CHOOSE_SLIDES">
134
			<value xml:lang="en-US">Choose which slides to delete</value>
135
		</prop>
136
		<prop oor:name="STR_MASTER_PAGES">
137
			<value xml:lang="en-US">Master Pages</value>
138
		</prop>
139
		<prop oor:name="STR_DELETE_MASTER_PAGES">
140
			<value xml:lang="en-US">Delete unused ~master pages</value>
141
		</prop>
142
		<prop oor:name="STR_DELETE_NOTES_PAGES">
143
			<value xml:lang="en-US">~Clear notes</value>
144
		</prop>
145
		<prop oor:name="STR_DELETE_HIDDEN_SLIDES">
146
			<value xml:lang="en-US">Delete hidden ~slides</value>
147
		</prop>
148
		<prop oor:name="STR_CUSTOM_SHOW">
149
			<value xml:lang="en-US">Delete slides that are not used for the ~custom slide show</value>
150
		</prop>
151
		<prop oor:name="STR_SUMMARY">
152
			<value xml:lang="en-US">Summary</value>
153
		</prop>
154
		<prop oor:name="STR_SUMMARY_TITLE">
155
			<value xml:lang="en-US">Choose where to apply the following changes</value>
156
		</prop>
157
		<prop oor:name="STR_PROGRESS">
158
			<value xml:lang="en-US">Progress</value>
159
		</prop>
160
		<prop oor:name="STR_OBJECTS_OPTIMIZED">
161
			<value xml:lang="en-US">Objects optimized</value>
162
		</prop>
163
		<prop oor:name="STR_APPLY_TO_CURRENT">
164
			<value xml:lang="en-US">~Apply changes to current presentation</value>
165
		</prop>
166
		<prop oor:name="STR_AUTOMATICALLY_OPEN">
167
			<value xml:lang="en-US">~Open newly created presentation</value>
168
		</prop>
169
		<prop oor:name="STR_SAVE_SETTINGS">
170
			<value xml:lang="en-US">~Save settings as</value>
171
		</prop>
172
		<prop oor:name="STR_SAVE_AS">
173
			<value xml:lang="en-US">~Duplicate presentation before applying changes</value>
174
		</prop>
175
		<prop oor:name="STR_DELETE_SLIDES">
176
			<value xml:lang="en-US">Delete %SLIDES slides.</value>
177
		</prop>
178
		<prop oor:name="STR_OPTIMIZE_IMAGES">
179
			<value xml:lang="en-US">Optimize %IMAGES graphics to %QUALITY% JPEG quality at %RESOLUTION DPI.</value>
180
		</prop>
181
		<prop oor:name="STR_CREATE_REPLACEMENT">
182
			<value xml:lang="en-US">Create replacement graphics for %OLE objects.</value>
183
		</prop>
184
		<prop oor:name="STR_CURRENT_FILESIZE">
185
			<value xml:lang="en-US">Current file size:</value>
186
		</prop>
187
		<prop oor:name="STR_ESTIMATED_FILESIZE">
188
			<value xml:lang="en-US">Estimated new file size:</value>
189
		</prop>
190
		<prop oor:name="STR_MB">
191
			<value xml:lang="en-US">%1 MB</value>
192
		</prop>
193
		<prop oor:name="MY_SETTINGS">
194
			<value xml:lang="en-US">My Settings </value>
195
		</prop>
196
		<prop oor:name="STR_DEFAULT_SESSION">
197
			<value xml:lang="en-US">default session</value>
198
		</prop>
199
		<prop oor:name="STR_MODIFY_WARNING">
200
			<value xml:lang="en-US">The optimization will modify the current document. Do you want to continue?</value>
201
		</prop>
202
		<prop oor:name="STR_YES">
203
			<value xml:lang="en-US">~Yes</value>
204
		</prop>			
205
		<prop oor:name="STR_OK">
206
			<value xml:lang="en-US">OK</value>
207
		</prop>		
208
		<prop oor:name="STR_INFO_1">
209
			<value xml:lang="en-US">The @MINIMIZEREXTENSIONPRODUCTNAME@ has successfully updated the presentation '%TITLE'. The file size has changed from %OLDFILESIZE MB to %NEWFILESIZE MB.</value>
210
		</prop>		
211
		<prop oor:name="STR_INFO_2">
212
			<value xml:lang="en-US">The @MINIMIZEREXTENSIONPRODUCTNAME@ has successfully updated the presentation '%TITLE'. The file size has changed from %OLDFILESIZE MB to approximated %NEWFILESIZE MB.</value>
213
		</prop>
214
		<prop oor:name="STR_INFO_3">
215
			<value xml:lang="en-US">The @MINIMIZEREXTENSIONPRODUCTNAME@ has successfully updated the presentation '%TITLE'. The file size has changed to %NEWFILESIZE MB.</value>
216
		</prop>
217
		<prop oor:name="STR_INFO_4">
218
			<value xml:lang="en-US">The @MINIMIZEREXTENSIONPRODUCTNAME@ has successfully updated the presentation '%TITLE'. The file size has changed to approximated %NEWFILESIZE MB.</value>
219
		</prop>
220
		<prop oor:name="STR_DUPLICATING_PRESENTATION">
221
			<value xml:lang="en-US">Duplicating presentation...</value>
222
		</prop>
223
		<prop oor:name="STR_DELETING_SLIDES">
224
			<value xml:lang="en-US">Deleting slides...</value>
225
		</prop>
226
		<prop oor:name="STR_OPTIMIZING_GRAPHICS">
227
			<value xml:lang="en-US">Optimizing graphics...</value>
228
		</prop>
229
		<prop oor:name="STR_CREATING_OLE_REPLACEMENTS">
230
			<value xml:lang="en-US">Creating replacement graphics for OLE objects...</value>
231
		</prop>
232
		<prop oor:name="STR_FILESIZESEPARATOR">
233
			<value xml:lang="en-US">.</value>
234
		</prop>
235
	</node>
236
	<node oor:name="LastUsedSettings">
237
		<prop oor:name="Name">
238
			<value xml:lang="en-US">Projector optimized</value>
239
		</prop>
240
		<prop oor:name="JPEGCompression">
241
			<value>true</value>
242
		</prop>
243
		<prop oor:name="JPEGQuality">
244
			<value>50</value>
245
		</prop>
246
		<prop oor:name="RemoveCropArea">
247
			<value>true</value>
248
		</prop>
249
		<prop oor:name="ImageResolution">
250
			<value>150</value>
251
		</prop>
252
		<prop oor:name="EmbedLinkedGraphics">
253
			<value>true</value>
254
		</prop>			
255
		<prop oor:name="OLEOptimization">
256
			<value>true</value>
257
		</prop>
258
		<prop oor:name="OLEOptimizationType">
259
			<value>0</value>
260
		</prop>
261
		<prop oor:name="DeleteUnusedMasterPages">
262
			<value>true</value>
263
		</prop>
264
		<prop oor:name="DeleteHiddenSlides">
265
			<value>true</value>
266
		</prop>
267
		<prop oor:name="DeleteNotesPages">
268
			<value>false</value>
269
		</prop>
270
		<prop oor:name="SaveAs">
271
			<value>true</value>
272
		</prop>
273
		<prop oor:name="OpenNewDocument">
274
			<value>true</value>
275
		</prop>	
276
	</node>
277
	<node oor:name="Settings">
278
		<node oor:name="Templates">
279
			<node oor:name="template1" oor:op="replace">		
280
				<prop oor:name="Name">
281
					<value xml:lang="en-US">Screen optimized (smallest file size)</value>
282
				</prop>
283
				<prop oor:name="JPEGCompression">
284
					<value>true</value>
285
				</prop>
286
				<prop oor:name="JPEGQuality">
287
					<value>25</value>
288
				</prop>
289
				<prop oor:name="RemoveCropArea">
290
					<value>true</value>
291
				</prop>
292
				<prop oor:name="ImageResolution">
293
					<value>90</value>
294
				</prop>
295
				<prop oor:name="EmbedLinkedGraphics">
296
					<value>true</value>
297
				</prop>
298
				<prop oor:name="OLEOptimization">
299
					<value>true</value>
300
				</prop>
301
				<prop oor:name="OLEOptimizationType">
302
					<value>0</value>
303
				</prop>
304
				<prop oor:name="DeleteUnusedMasterPages">
305
					<value>true</value>
306
				</prop>
307
				<prop oor:name="DeleteHiddenSlides">
308
					<value>true</value>
309
				</prop>
310
				<prop oor:name="DeleteNotesPages">
311
					<value>false</value>
312
				</prop>
313
				<prop oor:name="SaveAs">
314
					<value>true</value>
315
				</prop>
316
				<prop oor:name="OpenNewDocument">
317
					<value>true</value>
318
				</prop>	
319
			</node>
320
			<node oor:name="template2" oor:op="replace">
321
				<prop oor:name="Name">
322
					<value xml:lang="en-US">Projector optimized</value>
323
				</prop>
324
				<prop oor:name="JPEGCompression">
325
					<value>true</value>
326
				</prop>
327
				<prop oor:name="JPEGQuality">
328
					<value>50</value>
329
				</prop>
330
				<prop oor:name="RemoveCropArea">
331
					<value>true</value>
332
				</prop>
333
				<prop oor:name="ImageResolution">
334
					<value>150</value>
335
				</prop>
336
				<prop oor:name="EmbedLinkedGraphics">
337
					<value>true</value>
338
				</prop>			
339
				<prop oor:name="OLEOptimization">
340
					<value>true</value>
341
				</prop>
342
				<prop oor:name="OLEOptimizationType">
343
					<value>0</value>
344
				</prop>
345
				<prop oor:name="DeleteUnusedMasterPages">
346
					<value>true</value>
347
				</prop>
348
				<prop oor:name="DeleteHiddenSlides">
349
					<value>true</value>
350
				</prop>
351
				<prop oor:name="DeleteNotesPages">
352
					<value>false</value>
353
				</prop>
354
				<prop oor:name="SaveAs">
355
					<value>true</value>
356
				</prop>
357
				<prop oor:name="OpenNewDocument">
358
					<value>true</value>
359
				</prop>	
360
			</node>
361
			<node oor:name="template3" oor:op="replace">
362
				<prop oor:name="Name">
363
					<value xml:lang="en-US">Print optimized</value>
364
				</prop>
365
				<prop oor:name="JPEGCompression">
366
					<value>true</value>
367
				</prop>
368
				<prop oor:name="JPEGQuality">
369
					<value>75</value>
370
				</prop>
371
				<prop oor:name="RemoveCropArea">
372
					<value>true</value>
373
				</prop>
374
				<prop oor:name="ImageResolution">
375
					<value>300</value>
376
				</prop>
377
				<prop oor:name="EmbedLinkedGraphics">
378
					<value>true</value>
379
				</prop>			
380
				<prop oor:name="OLEOptimization">
381
					<value>true</value>
382
				</prop>
383
				<prop oor:name="OLEOptimizationType">
384
					<value>0</value>
385
				</prop>
386
				<prop oor:name="DeleteUnusedMasterPages">
387
					<value>true</value>
388
				</prop>
389
				<prop oor:name="DeleteHiddenSlides">
390
					<value>true</value>
391
				</prop>
392
				<prop oor:name="DeleteNotesPages">
393
					<value>false</value>
394
				</prop>
395
				<prop oor:name="SaveAs">
396
					<value>true</value>
397
				</prop>
398
				<prop oor:name="OpenNewDocument">
399
					<value>true</value>
400
				</prop>	
401
			</node>			
402
		</node>
403
	</node>
404
</oor:component-data>
(-)a/main/sdext/source/minimizer/registry/data/org/openoffice/Office/extension/makefile.mk (-46 lines)
Lines 1-46 Link Here
1
#**************************************************************
2
#  
3
#  Licensed to the Apache Software Foundation (ASF) under one
4
#  or more contributor license agreements.  See the NOTICE file
5
#  distributed with this work for additional information
6
#  regarding copyright ownership.  The ASF licenses this file
7
#  to you under the Apache License, Version 2.0 (the
8
#  "License"); you may not use this file except in compliance
9
#  with the License.  You may obtain a copy of the License at
10
#  
11
#    http://www.apache.org/licenses/LICENSE-2.0
12
#  
13
#  Unless required by applicable law or agreed to in writing,
14
#  software distributed under the License is distributed on an
15
#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
#  KIND, either express or implied.  See the License for the
17
#  specific language governing permissions and limitations
18
#  under the License.
19
#  
20
#**************************************************************
21
22
23
PRJ=..$/..$/..$/..$/..$/..$/..$/..
24
25
PRJNAME=sdext
26
TARGET=data_ooOfficeext
27
PACKAGE=org.openoffice.Office.extension
28
29
.INCLUDE :  settings.mk
30
.INCLUDE :  $(PRJ)$/source$/minimizer$/minimizer.pmk
31
.INCLUDE :  $(PRJ)$/util$/makefile.pmk
32
33
XCSROOT=$(PRJ)$/source$/minimizer
34
ABSXCSROOT=$(PWD)$/$(PRJ)$/source$/minimizer
35
36
# --- Targets ------------------------------------------------------
37
38
XCUFILES= \
39
    SunPresentationMinimizer.xcu
40
41
MODULEFILES=
42
43
LOCALIZEDFILES= \
44
    SunPresentationMinimizer.xcu
45
46
.INCLUDE :  target.mk
(-)a/main/sdext/source/minimizer/registry/data/org/openoffice/Office/makefile.mk (-44 lines)
Lines 1-44 Link Here
1
#**************************************************************
2
#  
3
#  Licensed to the Apache Software Foundation (ASF) under one
4
#  or more contributor license agreements.  See the NOTICE file
5
#  distributed with this work for additional information
6
#  regarding copyright ownership.  The ASF licenses this file
7
#  to you under the Apache License, Version 2.0 (the
8
#  "License"); you may not use this file except in compliance
9
#  with the License.  You may obtain a copy of the License at
10
#  
11
#    http://www.apache.org/licenses/LICENSE-2.0
12
#  
13
#  Unless required by applicable law or agreed to in writing,
14
#  software distributed under the License is distributed on an
15
#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
#  KIND, either express or implied.  See the License for the
17
#  specific language governing permissions and limitations
18
#  under the License.
19
#  
20
#**************************************************************
21
22
23
PRJ=..$/..$/..$/..$/..$/..$/..
24
25
PRJNAME=sdext
26
TARGET=data_ooOffice
27
PACKAGE=org.openoffice.Office
28
29
.INCLUDE :  settings.mk
30
.INCLUDE :  $(PRJ)$/source$/minimizer$/minimizer.pmk
31
.INCLUDE :  $(PRJ)$/util$/makefile.pmk
32
33
# --- Targets ------------------------------------------------------
34
35
XCUFILES= \
36
    Addons.xcu \
37
    ProtocolHandler.xcu
38
39
MODULEFILES=
40
41
LOCALIZEDFILES= \
42
    Addons.xcu
43
44
.INCLUDE :  target.mk
(-)a/main/sdext/source/minimizer/registry/schema/org/openoffice/Office/extension/SunPresentationMinimizer.xcs (-346 lines)
Lines 1-346 Link Here
1
<?xml version='1.0' encoding='UTF-8'?>
2
<!--***********************************************************
3
 * 
4
 * Licensed to the Apache Software Foundation (ASF) under one
5
 * or more contributor license agreements.  See the NOTICE file
6
 * distributed with this work for additional information
7
 * regarding copyright ownership.  The ASF licenses this file
8
 * to you under the Apache License, Version 2.0 (the
9
 * "License"); you may not use this file except in compliance
10
 * with the License.  You may obtain a copy of the License at
11
 * 
12
 *   http://www.apache.org/licenses/LICENSE-2.0
13
 * 
14
 * Unless required by applicable law or agreed to in writing,
15
 * software distributed under the License is distributed on an
16
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17
 * KIND, either express or implied.  See the License for the
18
 * specific language governing permissions and limitations
19
 * under the License.
20
 * 
21
 ***********************************************************-->
22
<oor:component-schema oor:name="SunPresentationMinimizer" oor:package="org.openoffice.Office.extension" xml:lang="en-US" xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
23
	<templates>
24
		<group oor:name="OptimizerSettings">
25
            <info>
26
				<desc>Describes the Presentation Optimization Wizard settings of one session</desc>
27
            </info>
28
			<prop oor:name="Name" oor:type="xs:string" oor:localized="true">
29
				<info>
30
					<desc>Specifies the name settings name</desc>
31
				</info>
32
				<value>Default</value>
33
			</prop>
34
			<prop oor:name="JPEGCompression" oor:type="xs:boolean">
35
				<info>
36
					<desc>Specifies if JPEG compression is being used</desc>
37
				</info>
38
				<value>true</value>
39
			</prop>
40
			<prop oor:name="JPEGQuality" oor:type="xs:int">
41
				<info>
42
					<desc>Specifies quality of the JPG export. A higher value results in higher quality and file size.</desc>
43
				</info>
44
				<constraints>
45
					<minInclusive oor:value="1">
46
						<info>
47
						<desc>Represents lowest value that can be used. The lower the value, the less good is the compression quality and the bigger is be the file size.</desc>
48
						</info>
49
					</minInclusive>
50
					<maxInclusive oor:value="100">
51
						<info>
52
						<desc>Represents highest value that can be used. The higher the value, the better is the compression quality and the smaller is the file size.</desc>
53
						</info>
54
					</maxInclusive>
55
				</constraints>
56
				<value>45</value>
57
			</prop>
58
			<prop oor:name="RemoveCropArea" oor:type="xs:boolean">
59
				<info>
60
					<desc>Specifies if the crop area of a picture has to be removed</desc>
61
				</info>
62
				<value>true</value>
63
			</prop>
64
			<prop oor:name="ImageResolution" oor:type="xs:int">
65
				<info>
66
					<desc>Specifies the Image Resolution that should be used in dpi. A value of zero determines that the image resolution should not be changed.</desc>
67
				</info>
68
				<value>150</value>
69
			</prop>
70
			<prop oor:name="EmbedLinkedGraphics" oor:type="xs:boolean">
71
				<info>
72
					<desc>Specifies if linked graphics are to be embedded</desc>
73
				</info>
74
				<value>true</value>
75
			</prop>	
76
			<prop oor:name="OLEOptimization" oor:type="xs:boolean">
77
				<info>
78
					<desc>Specifies if OLE Objects are converted to Graphic objects at all</desc>
79
				</info>
80
				<value>true</value>
81
			</prop>
82
			<prop oor:name="OLEOptimizationType" oor:type="xs:short">
83
				<info>
84
					<desc>Specifies the compression type that is being used,.</desc>
85
				</info>
86
				<constraints>
87
					<enumeration oor:value="0"><info><desc>Each</desc></info></enumeration>
88
					<enumeration oor:value="1"><info><desc>Alien</desc></info></enumeration>
89
				</constraints>
90
				<value>0</value>
91
			</prop>
92
			<prop oor:name="DeleteUnusedMasterPages" oor:type="xs:boolean">
93
				<info>
94
					<desc>Specifies if unused Master Pages are being deleted</desc>
95
				</info>
96
				<value>true</value>
97
			</prop>
98
			<prop oor:name="DeleteHiddenSlides" oor:type="xs:boolean">
99
				<info>
100
					<desc>Specifies if hidden Slides are being deleted</desc>
101
				</info>
102
				<value>true</value>
103
			</prop>
104
			<prop oor:name="DeleteNotesPages" oor:type="xs:boolean">
105
				<info>
106
					<desc>Specifies if Notes Pages are being deleted</desc>
107
				</info>
108
				<value>false</value>
109
			</prop>
110
			<prop oor:name="SaveAs" oor:type="xs:boolean">
111
				<info>
112
					<desc>Specifies if the optimization is done on a new document.</desc>
113
				</info>
114
				<value>true</value>
115
			</prop>
116
			<prop oor:name="OpenNewDocument" oor:type="xs:boolean">
117
				<info>
118
					<desc>Specifies if the newly created document is opened automatically.</desc>
119
				</info>
120
				<value>true</value>
121
			</prop>
122
		</group>
123
	</templates>
124
	<component>
125
        <prop oor:name="BitmapPath" oor:type="xs:string"/>
126
        <prop oor:name="HelpFile" oor:type="xs:string"/>
127
		<group oor:name="Strings">
128
			<prop oor:name="STR_SUN_OPTIMIZATION_WIZARD2" oor:type="xs:string" oor:localized="true">
129
				<value>Presentation Minimizer</value>
130
			</prop>
131
			<prop oor:name="STR_STEPS" oor:type="xs:string" oor:localized="true">
132
				<value>Steps</value>
133
			</prop>
134
			<prop oor:name="STR_HELP" oor:type="xs:string" oor:localized="true">
135
				<value>~Help</value>
136
			</prop>
137
			<prop oor:name="STR_BACK" oor:type="xs:string" oor:localized="true">
138
				<value>&lt; ~Back</value>
139
			</prop>
140
			<prop oor:name="STR_NEXT" oor:type="xs:string" oor:localized="true">
141
				<value>~Next &gt;</value>
142
			</prop>
143
			<prop oor:name="STR_FINISH" oor:type="xs:string" oor:localized="true">
144
				<value>~Finish</value>
145
			</prop>
146
			<prop oor:name="STR_CANCEL" oor:type="xs:string" oor:localized="true">
147
				<value>Cancel</value>
148
			</prop>
149
			<prop oor:name="STR_INTRODUCTION" oor:type="xs:string" oor:localized="true">
150
				<value>Introduction</value>
151
			</prop>
152
			<prop oor:name="STR_INTRODUCTION_T" oor:type="xs:string" oor:localized="true">
153
				<value>The Presentation Minimizer is used to reduce the file size of the current presentation. Images will be compressed and data, that is no longer needed, will be removed.
154
155
          At the last step of the wizard you can choose to apply the changes to the current presentation or to create an optimized new version of the presentation.</value>
156
			</prop>
157
			<prop oor:name="STR_CHOSE_SETTINGS" oor:type="xs:string" oor:localized="true">
158
				<value>~Choose settings for the Presentation Minimization Wizard</value>
159
			</prop>
160
			<prop oor:name="STR_REMOVE" oor:type="xs:string" oor:localized="true">
161
				<value>~Delete</value>
162
			</prop>
163
			<prop oor:name="STR_GRAPHIC_OPTIMIZATION" oor:type="xs:string" oor:localized="true">
164
				<value>Choose settings for optimizing pictures and graphics</value>
165
			</prop>
166
			<prop oor:name="STR_IMAGE_OPTIMIZATION" oor:type="xs:string" oor:localized="true">
167
				<value>Graphics</value>
168
			</prop>
169
			<prop oor:name="STR_LOSSLESS_COMPRESSION" oor:type="xs:string" oor:localized="true">
170
				<value>~Lossless compression</value>
171
			</prop>
172
			<prop oor:name="STR_JPEG_COMPRESSION" oor:type="xs:string" oor:localized="true">
173
				<value>~JPEG compression</value>
174
			</prop>
175
			<prop oor:name="STR_QUALITY" oor:type="xs:string" oor:localized="true">
176
				<value>~Quality</value>
177
			</prop>
178
			<prop oor:name="STR_REMOVE_CROP_AREA" oor:type="xs:string" oor:localized="true">
179
				<value>~Delete cropped graphic areas</value>
180
			</prop>
181
			<prop oor:name="STR_IMAGE_RESOLUTION" oor:type="xs:string" oor:localized="true">
182
				<value>~Image Resolution</value>
183
			</prop>
184
			<prop oor:name="STR_IMAGE_RESOLUTION_0" oor:type="xs:string" oor:localized="true">
185
				<value>0;&lt;no change&gt;</value>
186
			</prop>
187
			<prop oor:name="STR_IMAGE_RESOLUTION_1" oor:type="xs:string" oor:localized="true">
188
				<value>90;90 DPI (screen resolution)</value>
189
			</prop>
190
			<prop oor:name="STR_IMAGE_RESOLUTION_2" oor:type="xs:string" oor:localized="true">
191
				<value>150;150 DPI (projector resolution)</value>
192
			</prop>
193
			<prop oor:name="STR_IMAGE_RESOLUTION_3" oor:type="xs:string" oor:localized="true">
194
				<value>300;300 DPI (print resolution)</value>
195
			</prop>
196
			<prop oor:name="STR_EMBED_LINKED_GRAPHICS" oor:type="xs:string" oor:localized="true">
197
				<value>~Break links to external graphics</value>
198
			</prop>		
199
			<prop oor:name="STR_OLE_OBJECTS" oor:type="xs:string" oor:localized="true">
200
				<value>OLE Objects</value>
201
			</prop>
202
			<prop oor:name="STR_OLE_OPTIMIZATION" oor:type="xs:string" oor:localized="true">
203
				<value>Choose settings for replacing OLE objects</value>
204
			</prop>
205
			<prop oor:name="STR_OLE_REPLACE" oor:type="xs:string" oor:localized="true">
206
				<value>Create static replacement graphics for OLE objects</value>
207
			</prop>
208
			<prop oor:name="STR_ALL_OLE_OBJECTS" oor:type="xs:string" oor:localized="true">
209
				<value>For ~all OLE objects</value>
210
			</prop>
211
			<prop oor:name="STR_ALIEN_OLE_OBJECTS_ONLY" oor:type="xs:string" oor:localized="true">
212
				<value>~For OLE objects not based on OpenDocument format</value>
213
			</prop>
214
			<prop oor:name="STR_OLE_OBJECTS_DESC" oor:type="xs:string" oor:localized="true">
215
				<value>Object Linking and Embedding (OLE) is a technology that allows embedding and linking to documents and other objects.
216
217
The current presentation contains no OLE objects.</value>
218
			</prop>
219
			<prop oor:name="STR_NO_OLE_OBJECTS_DESC" oor:type="xs:string" oor:localized="true">
220
				<value>Object Linking and Embedding (OLE) is a technology that allows embedding and linking to documents and other objects.
221
222
The current presentation contains no OLE objects.</value>
223
			</prop>
224
			<prop oor:name="STR_SLIDES" oor:type="xs:string" oor:localized="true">
225
				<value>Slides</value>
226
			</prop>
227
			<prop oor:name="STR_CHOOSE_SLIDES" oor:type="xs:string" oor:localized="true">
228
				<value>Choose which slides to delete</value>
229
			</prop>
230
			<prop oor:name="STR_MASTER_PAGES" oor:type="xs:string" oor:localized="true">
231
				<value>Master Pages</value>
232
			</prop>
233
			<prop oor:name="STR_DELETE_MASTER_PAGES" oor:type="xs:string" oor:localized="true">
234
				<value>Delete unused ~master pages</value>
235
			</prop>
236
			<prop oor:name="STR_DELETE_NOTES_PAGES" oor:type="xs:string" oor:localized="true">
237
				<value>~Clear notes</value>
238
			</prop>
239
			<prop oor:name="STR_DELETE_HIDDEN_SLIDES" oor:type="xs:string" oor:localized="true">
240
				<value>Delete hidden ~slides</value>
241
			</prop>
242
			<prop oor:name="STR_CUSTOM_SHOW" oor:type="xs:string" oor:localized="true">
243
				<value>Delete slides that are not used for the ~custom slide show</value>
244
			</prop>
245
			<prop oor:name="STR_SUMMARY" oor:type="xs:string" oor:localized="true">
246
				<value>Summary</value>
247
			</prop>
248
			<prop oor:name="STR_SUMMARY_TITLE" oor:type="xs:string" oor:localized="true">
249
				<value>Choose where to apply the following changes</value>
250
			</prop>
251
			<prop oor:name="STR_PROGRESS" oor:type="xs:string" oor:localized="true">
252
				<value>Progress</value>
253
			</prop>
254
			<prop oor:name="STR_OBJECTS_OPTIMIZED" oor:type="xs:string" oor:localized="true">
255
				<value>Objects optimized</value>
256
			</prop>
257
			<prop oor:name="STR_APPLY_TO_CURRENT" oor:type="xs:string" oor:localized="true">
258
				<value>~Apply changes to current presentation</value>
259
			</prop>
260
			<prop oor:name="STR_AUTOMATICALLY_OPEN" oor:type="xs:string" oor:localized="true">
261
				<value>~Open newly created presentation</value>
262
			</prop>
263
			<prop oor:name="STR_SAVE_SETTINGS" oor:type="xs:string" oor:localized="true">
264
				<value>~Save settings as</value>
265
			</prop>
266
			<prop oor:name="STR_SAVE_AS" oor:type="xs:string" oor:localized="true">
267
				<value>~Duplicate presentation before applying changes</value>
268
			</prop>
269
			<prop oor:name="STR_DELETE_SLIDES" oor:type="xs:string" oor:localized="true">
270
				<value>Delete %SLIDES slides</value>
271
			</prop>
272
			<prop oor:name="STR_OPTIMIZE_IMAGES" oor:type="xs:string" oor:localized="true">
273
				<info>
274
					<desc>The following string is only used in plural.</desc>
275
				</info>
276
				<value>Optimize %IMAGES graphics to %QUALITY% JPEG quality at %RESOLUTION DPI.</value>
277
			</prop>
278
			<prop oor:name="STR_CREATE_REPLACEMENT" oor:type="xs:string" oor:localized="true">
279
				<value>Create replacement graphics for %OLE objects.</value>
280
			</prop>
281
			<prop oor:name="STR_CURRENT_FILESIZE" oor:type="xs:string" oor:localized="true">
282
				<value>Current file size:</value>
283
			</prop>
284
			<prop oor:name="STR_ESTIMATED_FILESIZE" oor:type="xs:string" oor:localized="true">
285
				<value>Estimated new file size:</value>
286
			</prop>
287
			<prop oor:name="STR_MB" oor:type="xs:string" oor:localized="true">
288
				<value>%1 MB</value>
289
			</prop>
290
			<prop oor:name="MY_SETTINGS" oor:type="xs:string" oor:localized="true">
291
				<value>My Settings</value>
292
			</prop>
293
			<prop oor:name="STR_DEFAULT_SESSION" oor:type="xs:string" oor:localized="true">
294
				<value>default session</value>
295
			</prop>
296
			<prop oor:name="STR_MODIFY_WARNING" oor:type="xs:string" oor:localized="true">
297
				<value>The optimization will modify the current document. Do you want to continue?</value>
298
			</prop>
299
			<prop oor:name="STR_YES" oor:type="xs:string" oor:localized="true">
300
				<value>~Yes</value>
301
			</prop>			
302
            <prop oor:name="STR_OK" oor:type="xs:string" oor:localized="true">
303
                <value>OK</value>
304
           </prop>
305
            <prop oor:name="STR_INFO_1" oor:type="xs:string" oor:localized="true">
306
                <value>The Presentation Minimizer has successfully updated the presentation '%TITLE'. The file size has changed from %OLDFILESIZE MB to %NEWFILESIZE MB.</value>
307
           </prop>
308
            <prop oor:name="STR_INFO_2" oor:type="xs:string" oor:localized="true">
309
                <value>The Presentation Minimizer has successfully updated the presentation '%TITLE'. The file size has changed from %OLDFILESIZE MB to approximated %NEWFILESIZE MB.</value>
310
           </prop>
311
            <prop oor:name="STR_INFO_3" oor:type="xs:string" oor:localized="true">
312
                <value>The Presentation Minimizer has successfully updated the presentation '%TITLE'. The file size has changed to %NEWFILESIZE MB.</value>
313
           </prop>
314
            <prop oor:name="STR_INFO_4" oor:type="xs:string" oor:localized="true">
315
                <value>The Presentation Minimizer has successfully updated the presentation '%TITLE'. The file size has changed to approximated %NEWFILESIZE MB.</value>
316
           </prop>
317
            <prop oor:name="STR_DUPLICATING_PRESENTATION" oor:type="xs:string" oor:localized="true">
318
                <value>Duplicating presentation...</value>
319
           </prop>
320
            <prop oor:name="STR_DELETING_SLIDES" oor:type="xs:string" oor:localized="true">
321
                <value>Deleting slides...</value>
322
           </prop>
323
            <prop oor:name="STR_OPTIMIZING_GRAPHICS" oor:type="xs:string" oor:localized="true">
324
                <value>Optimizing graphics...</value>
325
           </prop>
326
            <prop oor:name="STR_CREATING_OLE_REPLACEMENTS" oor:type="xs:string" oor:localized="true">
327
                <value>Creating replacement graphics for OLE objects...</value>
328
           </prop>
329
			<prop oor:name="STR_FILESIZESEPARATOR" oor:type="xs:string" oor:localized="true">
330
				<value>.</value>
331
			</prop>
332
		</group>
333
		<node-ref oor:name="LastUsedSettings" oor:node-type="OptimizerSettings">
334
			<info>
335
				<desc>describes the name of the last used settings</desc>
336
			</info>
337
		</node-ref>
338
		<group oor:name="Settings">
339
			<set oor:name="Templates" oor:node-type="OptimizerSettings">
340
				<info>
341
					<desc>List of the saved Presentation Optimization Wizard settings</desc>
342
				</info>
343
			</set>
344
		</group>
345
	</component>
346
</oor:component-schema>
(-)a/main/sdext/source/minimizer/unodialog.cxx (-37 / +82 lines)
Lines 25-44 Link Here
25
#include "precompiled_sdext.hxx"
25
#include "precompiled_sdext.hxx"
26
26
27
#include "unodialog.hxx"
27
#include "unodialog.hxx"
28
#include <com/sun/star/text/XTextRange.hpp>
28
29
#include <com/sun/star/drawing/XShapes.hpp>
29
#include <com/sun/star/awt/MessageBoxButtons.hpp>
30
#include <com/sun/star/awt/XVclWindowPeer.hpp>
31
#include <com/sun/star/awt/PosSize.hpp>
32
#include <com/sun/star/awt/XMessageBoxFactory.hpp>
33
#include <com/sun/star/awt/XStyleSettingsSupplier.hpp>
30
#include <com/sun/star/container/XIndexAccess.hpp>
34
#include <com/sun/star/container/XIndexAccess.hpp>
31
#include <com/sun/star/view/XSelectionSupplier.hpp>
35
#include <com/sun/star/drawing/XShapes.hpp>
32
#include <com/sun/star/view/XControlAccess.hpp>
33
#include <com/sun/star/frame/XDispatch.hpp>
36
#include <com/sun/star/frame/XDispatch.hpp>
34
#include <com/sun/star/awt/XMessageBoxFactory.hpp>
37
#include <com/sun/star/text/XTextRange.hpp>
35
#include <com/sun/star/awt/MessageBoxButtons.hpp>
38
#include <com/sun/star/view/XControlAccess.hpp>
39
#include <com/sun/star/view/XSelectionSupplier.hpp>
36
40
37
// -------------
41
// -------------
38
// - UnoDialog -
42
// - UnoDialog -
39
// -------------
43
// -------------
40
44
41
using namespace ::rtl;
42
using namespace ::com::sun::star::awt;
45
using namespace ::com::sun::star::awt;
43
using namespace ::com::sun::star::uno;
46
using namespace ::com::sun::star::uno;
44
using namespace ::com::sun::star::util;
47
using namespace ::com::sun::star::util;
Lines 48-91 using namespace ::com::sun::star::frame; Link Here
48
using namespace ::com::sun::star::beans;
51
using namespace ::com::sun::star::beans;
49
using namespace ::com::sun::star::script;
52
using namespace ::com::sun::star::script;
50
53
51
UnoDialog::UnoDialog( const Reference< XComponentContext > &rxMSF, Reference< XFrame >& rxFrame ) :
54
using ::rtl::OUString;
52
	mxMSF( rxMSF ),
55
53
	mxController( rxFrame->getController() ),
56
UnoDialog::UnoDialog(
54
	mxDialogModel( mxMSF->getServiceManager()->createInstanceWithContext( OUString( RTL_CONSTASCII_USTRINGPARAM(
57
    const Reference< XComponentContext > &rxContext,
55
		"com.sun.star.awt.UnoControlDialogModel" ) ), mxMSF ), UNO_QUERY_THROW ),
58
    const Reference< XWindowPeer >& rxParent ) :
59
	mxContext( rxContext ),
60
	mxParent( rxParent ),
61
	mxDialogModel( mxContext->getServiceManager()->createInstanceWithContext( OUString( RTL_CONSTASCII_USTRINGPARAM(
62
		"com.sun.star.awt.UnoControlDialogModel" ) ), mxContext ), UNO_QUERY_THROW ),
56
	mxDialogModelMultiPropertySet( mxDialogModel, UNO_QUERY_THROW ),
63
	mxDialogModelMultiPropertySet( mxDialogModel, UNO_QUERY_THROW ),
57
	mxDialogModelPropertySet( mxDialogModel, UNO_QUERY_THROW ),
64
	mxDialogModelPropertySet( mxDialogModel, UNO_QUERY_THROW ),
58
	mxDialogModelMSF( mxDialogModel, UNO_QUERY_THROW ),
65
	mxDialogModelMSF( mxDialogModel, UNO_QUERY_THROW ),
59
	mxDialogModelNameContainer( mxDialogModel, UNO_QUERY_THROW ),
66
	mxDialogModelNameContainer( mxDialogModel, UNO_QUERY_THROW ),
60
	mxDialogModelNameAccess( mxDialogModel, UNO_QUERY_THROW ),
67
	mxDialogModelNameAccess( mxDialogModel, UNO_QUERY_THROW ),
61
	mxControlModel( mxDialogModel, UNO_QUERY_THROW ),
68
	mxControlModel( mxDialogModel, UNO_QUERY_THROW ),
62
	mxDialog( mxMSF->getServiceManager()->createInstanceWithContext( OUString( RTL_CONSTASCII_USTRINGPARAM(
69
	mxDialog( mxContext->getServiceManager()->createInstanceWithContext( OUString( RTL_CONSTASCII_USTRINGPARAM(
63
		"com.sun.star.awt.UnoControlDialog" ) ), mxMSF ), UNO_QUERY_THROW ),
70
		"com.sun.star.awt.UnoControlDialog" ) ), mxContext ), UNO_QUERY_THROW ),
64
	mxControl( mxDialog, UNO_QUERY_THROW ),
71
	mxControl( mxDialog, UNO_QUERY_THROW ),
65
	mbStatus( sal_False )
72
	mbStatus( sal_False )
66
{
73
{
74
    OSL_TRACE("UnoDialog::UnoDialog");
67
	mxControl->setModel( mxControlModel );
75
	mxControl->setModel( mxControlModel );
68
	mxDialogControlContainer = Reference< XControlContainer >( mxDialog, UNO_QUERY_THROW );
76
	mxDialogControlContainer = Reference< XControlContainer >( mxDialog, UNO_QUERY_THROW );
69
	mxDialogComponent = Reference< XComponent >( mxDialog, UNO_QUERY_THROW );
77
    mxDialogWindow = Reference< XWindow >( mxDialog, UNO_QUERY );
70
	mxDialogWindow = Reference< XWindow >( mxDialog, UNO_QUERY_THROW );
78
	mxDialogWindowPeer = createWindowPeer();
71
72
	Reference< XFrame > xFrame( mxController->getFrame() );
73
	Reference< XWindow > xContainerWindow( xFrame->getContainerWindow() );
74
	mxWindowPeer = Reference< XWindowPeer >( xContainerWindow, UNO_QUERY_THROW );
75
	createWindowPeer( mxWindowPeer );		
76
}
79
}
77
80
78
// -----------------------------------------------------------------------------
81
// -----------------------------------------------------------------------------
79
82
80
UnoDialog::~UnoDialog()
83
UnoDialog::~UnoDialog()
81
{
84
{
82
85
    OSL_TRACE("UnoDialog::~UnoDialog");
86
    Reference< XComponent > xComponent( mxDialog, UNO_QUERY );
87
    if ( xComponent.is() )
88
    {
89
        xComponent->dispose();
90
    }
83
}
91
}
84
92
85
// -----------------------------------------------------------------------------
93
// -----------------------------------------------------------------------------
86
94
95
void UnoDialog::setTitle( const rtl::OUString &rTitle )
96
{
97
    if ( rTitle.getLength() )
98
    {
99
        mxDialog->setTitle( rTitle );
100
    }
101
}
102
87
void UnoDialog::execute()
103
void UnoDialog::execute()
88
{
104
{
105
    OSL_TRACE("UnoDialog::execute");
89
	mxDialogWindow->setEnable( sal_True );
106
	mxDialogWindow->setEnable( sal_True );
90
	mxDialogWindow->setVisible( sal_True );
107
	mxDialogWindow->setVisible( sal_True );
91
	mxDialog->execute();
108
	mxDialog->execute();
Lines 93-114 void UnoDialog::execute() Link Here
93
110
94
void UnoDialog::endExecute( sal_Bool bStatus )
111
void UnoDialog::endExecute( sal_Bool bStatus )
95
{
112
{
113
    OSL_TRACE("UnoDialog::endExecute");
96
	mbStatus = bStatus;
114
	mbStatus = bStatus;
97
	mxDialog->endExecute();
115
	mxDialog->endExecute();
98
}
116
}
99
117
118
void UnoDialog::centerDialog()
119
{
120
    Reference< XWindow > xParent( mxParent, UNO_QUERY );
121
    if ( !xParent.is() )
122
        return;
123
124
    Rectangle aParentPosSize = xParent->getPosSize();
125
    Rectangle aWinPosSize = mxDialogWindow->getPosSize();
126
    Point aWinPos((aParentPosSize.Width - aWinPosSize.Width) / 2,
127
                  (aParentPosSize.Height - aWinPosSize.Height) / 2);
128
129
    if ( ( aWinPos.X + aWinPosSize.Width ) > ( aParentPosSize.X + aParentPosSize.Width ) )
130
        aWinPos.X = aParentPosSize.X + aParentPosSize.Width - aWinPosSize.Width;
131
132
    if ( ( aWinPos.Y + aWinPosSize.Height ) > ( aParentPosSize.Y + aParentPosSize.Height ) )
133
        aWinPos.Y = aParentPosSize.Y + aParentPosSize.Height - aWinPosSize.Height;
134
135
    mxDialogWindow->setPosSize( aWinPos.X, aWinPos.Y,
136
                                aWinPosSize.Width,
137
                                aWinPosSize.Height,
138
                                PosSize::POS );
139
}
140
100
// -----------------------------------------------------------------------------
141
// -----------------------------------------------------------------------------
101
142
102
Reference< XWindowPeer > UnoDialog::createWindowPeer( Reference< XWindowPeer > xParentPeer )
143
Reference< XWindowPeer > UnoDialog::createWindowPeer()
103
	throw ( Exception )
144
	throw ( Exception )
104
{
145
{
105
	mxDialogWindow->setVisible( sal_False );
146
    mxDialogWindow->setVisible( sal_False );
106
	Reference< XToolkit > xToolkit( mxMSF->getServiceManager()->createInstanceWithContext( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.Toolkit" ) ), mxMSF ), UNO_QUERY_THROW  );
147
107
	if ( !xParentPeer.is() )
148
    // reuse the parent's toolkit
108
		xParentPeer = xToolkit->getDesktopWindow();
149
	Reference< XToolkit > xToolkit;
150
    if ( mxParent.is() )
151
        xToolkit.set( mxParent->getToolkit() );
152
153
    if ( !xToolkit.is() )
154
         xToolkit.set( mxContext->getServiceManager()->createInstanceWithContext(
155
             OUString( RTL_CONSTASCII_USTRINGPARAM(
156
                 "com.sun.star.awt.Toolkit" ) ), mxContext ),
157
                    UNO_QUERY_THROW  );
158
109
	mxReschedule = Reference< XReschedule >( xToolkit, UNO_QUERY );
159
	mxReschedule = Reference< XReschedule >( xToolkit, UNO_QUERY );
110
	mxControl->createPeer( xToolkit, xParentPeer );
160
	mxControl->createPeer( xToolkit, mxParent );
111
//	xWindowPeer = xControl.getPeer();
161
112
	return mxControl->getPeer();
162
	return mxControl->getPeer();
113
}
163
}
114
164
Lines 153-166 sal_Bool UnoDialog::isHighContrast() Link Here
153
	sal_Bool bHighContrast = sal_False;
203
	sal_Bool bHighContrast = sal_False;
154
	try
204
	try
155
	{
205
	{
156
		sal_Int32 nBackgroundColor = 0;
206
        Reference< XStyleSettingsSupplier > xStyleSettingsSuppl( mxDialogWindow, UNO_QUERY_THROW );
157
		if ( mxDialogModelPropertySet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "BackgroundColor" ) ) ) >>= nBackgroundColor )
207
        Reference< XStyleSettings > xStyleSettings( xStyleSettingsSuppl->getStyleSettings() );
158
		{
208
        bHighContrast = xStyleSettings->getHighContrastMode();
159
			sal_uInt8 nLum( static_cast< sal_uInt8 >( ( static_cast< sal_uInt8 >( nBackgroundColor >> 16 ) * 28 +
160
														static_cast< sal_uInt8 >( nBackgroundColor >> 8 ) * 151 +
161
														static_cast< sal_uInt8 >( nBackgroundColor ) * 77 ) >> 8 ) );
162
			bHighContrast = nLum <= 38;
163
		}
164
	}
209
	}
165
	catch( Exception& )
210
	catch( Exception& )
166
	{
211
	{
(-)a/main/sdext/source/minimizer/unodialog.hxx (-27 / +19 lines)
Lines 26-34 Link Here
26
26
27
#include <com/sun/star/uno/Sequence.h>
27
#include <com/sun/star/uno/Sequence.h>
28
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
28
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
29
#ifndef _COM_SUN_STAR_LANG_XMULTI_COMPONENT_FACTORY_HPP_
30
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
29
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
31
#endif
32
#include <com/sun/star/container/XIndexContainer.hpp>
30
#include <com/sun/star/container/XIndexContainer.hpp>
33
#include <com/sun/star/frame/XController.hpp>
31
#include <com/sun/star/frame/XController.hpp>
34
#include <com/sun/star/frame/XFrame.hpp>
32
#include <com/sun/star/frame/XFrame.hpp>
Lines 53-61 Link Here
53
#include <com/sun/star/awt/XReschedule.hpp>
51
#include <com/sun/star/awt/XReschedule.hpp>
54
#include <com/sun/star/awt/XDialog.hpp>
52
#include <com/sun/star/awt/XDialog.hpp>
55
#include <com/sun/star/awt/Size.hpp>
53
#include <com/sun/star/awt/Size.hpp>
56
#include <cppuhelper/implbase1.hxx>
57
#include <cppuhelper/implbase2.hxx>
58
#include <cppuhelper/implbase3.hxx>
59
54
60
// -------------
55
// -------------
61
// - UnoDialog -
56
// - UnoDialog -
Lines 67-89 class UnoDialog Link Here
67
{
62
{
68
public :
63
public :
69
64
70
	UnoDialog( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxMSF, com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rxFrame );
65
	UnoDialog( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext,
71
    ~UnoDialog();
66
               const com::sun::star::uno::Reference< com::sun::star::awt::XWindowPeer >& rxParent);
67
    virtual ~UnoDialog();
68
    void execute();
69
    void endExecute( sal_Bool bStatus );
70
    void setTitle( const rtl::OUString &rTitle);
72
71
73
	void execute();
72
protected:
74
	void endExecute( sal_Bool bStatus );
73
    void setVisible( const rtl::OUString& rName, sal_Bool bVisible );
74
    sal_Int32 getMapsFromPixels( sal_Int32 nPixels ) const;
75
    sal_Bool isHighContrast();
76
    void centerDialog();
75
77
76
	com::sun::star::uno::Reference< com::sun::star::awt::XWindowPeer > createWindowPeer( com::sun::star::uno::Reference< com::sun::star::awt::XWindowPeer > xParentPeer )
78
	com::sun::star::uno::Reference< com::sun::star::awt::XWindowPeer > createWindowPeer() throw ( com::sun::star::uno::Exception );
77
		throw ( com::sun::star::uno::Exception );
78
79
79
	com::sun::star::uno::Reference< com::sun::star::uno::XInterface > insertControlModel( const rtl::OUString& rServiceName, const rtl::OUString& rName,
80
	com::sun::star::uno::Reference< com::sun::star::uno::XInterface > insertControlModel( const rtl::OUString& rServiceName, const rtl::OUString& rName,
80
		const com::sun::star::uno::Sequence< rtl::OUString >& rPropertyNames, const com::sun::star::uno::Sequence< com::sun::star::uno::Any >& rPropertyValues );
81
		const com::sun::star::uno::Sequence< rtl::OUString >& rPropertyNames, const com::sun::star::uno::Sequence< com::sun::star::uno::Any >& rPropertyValues );
81
82
82
	void setVisible( const rtl::OUString& rName, sal_Bool bVisible );
83
84
	sal_Bool isHighContrast();
85
86
	sal_Int32 getMapsFromPixels( sal_Int32 nPixels ) const;
87
83
88
	com::sun::star::uno::Reference< com::sun::star::awt::XButton > insertButton( const rtl::OUString& rName,
84
	com::sun::star::uno::Reference< com::sun::star::awt::XButton > insertButton( const rtl::OUString& rName,
89
		com::sun::star::uno::Reference< com::sun::star::awt::XActionListener > xActionListener, const com::sun::star::uno::Sequence< rtl::OUString >& rPropertyNames,
85
		com::sun::star::uno::Reference< com::sun::star::awt::XActionListener > xActionListener, const com::sun::star::uno::Sequence< rtl::OUString >& rPropertyNames,
Lines 112-126 public : Link Here
112
108
113
	void setControlProperty( const rtl::OUString& rControlName, const rtl::OUString& rPropertyName, const com::sun::star::uno::Any& rPropertyValue );
109
	void setControlProperty( const rtl::OUString& rControlName, const rtl::OUString& rPropertyName, const com::sun::star::uno::Any& rPropertyValue );
114
	com::sun::star::uno::Any getControlProperty( const rtl::OUString& rControlName, const rtl::OUString& rPropertyName );
110
	com::sun::star::uno::Any getControlProperty( const rtl::OUString& rControlName, const rtl::OUString& rPropertyName );
115
#if 0
116
	void showMessageBox( const rtl::OUString& rTitle, const rtl::OUString& rMessage, sal_Bool bErrorBox ) const;
117
#endif
118
	void enableControl( const rtl::OUString& rControlName );
111
	void enableControl( const rtl::OUString& rControlName );
119
	void disableControl( const rtl::OUString& rControlName );
112
	void disableControl( const rtl::OUString& rControlName );
120
113
121
	com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >		mxMSF;
114
protected:
122
	com::sun::star::uno::Reference< com::sun::star::frame::XController >			mxController;
115
123
	com::sun::star::uno::Reference< com::sun::star::awt::XReschedule >				mxReschedule;
116
	com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >		mxContext;
117
    com::sun::star::uno::Reference< com::sun::star::awt::XWindowPeer >              mxParent;
124
118
125
	com::sun::star::uno::Reference< com::sun::star::uno::XInterface >				mxDialogModel;
119
	com::sun::star::uno::Reference< com::sun::star::uno::XInterface >				mxDialogModel;
126
	com::sun::star::uno::Reference< com::sun::star::beans::XMultiPropertySet >		mxDialogModelMultiPropertySet;
120
	com::sun::star::uno::Reference< com::sun::star::beans::XMultiPropertySet >		mxDialogModelMultiPropertySet;
Lines 128-145 public : Link Here
128
	com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >	mxDialogModelMSF;
122
	com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >	mxDialogModelMSF;
129
	com::sun::star::uno::Reference< com::sun::star::container::XNameContainer >		mxDialogModelNameContainer;
123
	com::sun::star::uno::Reference< com::sun::star::container::XNameContainer >		mxDialogModelNameContainer;
130
	com::sun::star::uno::Reference< com::sun::star::container::XNameAccess >		mxDialogModelNameAccess;
124
	com::sun::star::uno::Reference< com::sun::star::container::XNameAccess >		mxDialogModelNameAccess;
131
132
	com::sun::star::uno::Reference< com::sun::star::awt::XControlModel >			mxControlModel;
125
	com::sun::star::uno::Reference< com::sun::star::awt::XControlModel >			mxControlModel;
133
134
	com::sun::star::uno::Reference< com::sun::star::awt::XDialog >					mxDialog;
126
	com::sun::star::uno::Reference< com::sun::star::awt::XDialog >					mxDialog;
135
	com::sun::star::uno::Reference< com::sun::star::awt::XControl >					mxControl;
127
	com::sun::star::uno::Reference< com::sun::star::awt::XControl >					mxControl;
136
	com::sun::star::uno::Reference< com::sun::star::awt::XWindowPeer >				mxWindowPeer;
128
    sal_Bool                                                                        mbStatus;
137
129
138
	com::sun::star::uno::Reference< com::sun::star::awt::XControlContainer >		mxDialogControlContainer;
130
	com::sun::star::uno::Reference< com::sun::star::awt::XControlContainer >		mxDialogControlContainer;
139
	com::sun::star::uno::Reference< com::sun::star::lang::XComponent >				mxDialogComponent;
140
	com::sun::star::uno::Reference< com::sun::star::awt::XWindow >					mxDialogWindow;
131
	com::sun::star::uno::Reference< com::sun::star::awt::XWindow >					mxDialogWindow;
132
    com::sun::star::uno::Reference< com::sun::star::awt::XWindowPeer >              mxDialogWindowPeer;
141
133
142
	sal_Bool																		mbStatus;
134
    com::sun::star::uno::Reference< com::sun::star::awt::XReschedule >              mxReschedule;
143
};
135
};
144
136
145
#endif // UNODIALOG_HXX
137
#endif // UNODIALOG_HXX
(-)a/main/set_soenv.in (-2 lines)
Lines 1676-1682 ToFile( "ENABLE_CAIRO", "@ENABLE_CAIRO@", "e" ); Link Here
1676
ToFile( "ENABLE_CAIRO_CANVAS", "@ENABLE_CAIRO_CANVAS@",     "e" );
1676
ToFile( "ENABLE_CAIRO_CANVAS", "@ENABLE_CAIRO_CANVAS@",     "e" );
1677
ToFile( "ENABLE_OPENGL",     "@ENABLE_OPENGL@",    "e" );
1677
ToFile( "ENABLE_OPENGL",     "@ENABLE_OPENGL@",    "e" );
1678
ToFile( "ENABLE_PDFIMPORT",  "@ENABLE_PDFIMPORT@", "e" );
1678
ToFile( "ENABLE_PDFIMPORT",  "@ENABLE_PDFIMPORT@", "e" );
1679
ToFile( "ENABLE_MINIMIZER",   "@ENABLE_MINIMIZER@","e" );
1680
ToFile( "ENABLE_PRESENTER_SCREEN","@ENABLE_PRESENTER_SCREEN@","e" );
1679
ToFile( "ENABLE_PRESENTER_SCREEN","@ENABLE_PRESENTER_SCREEN@","e" );
1681
ToFile( "ENABLE_REPORTBUILDER","@ENABLE_REPORTBUILDER@","e" );
1680
ToFile( "ENABLE_REPORTBUILDER","@ENABLE_REPORTBUILDER@","e" );
1682
ToFile( "SYSTEM_JFREEREPORT","@SYSTEM_JFREEREPORT@","e" );
1681
ToFile( "SYSTEM_JFREEREPORT","@SYSTEM_JFREEREPORT@","e" );
1683
- 

Return to issue 121872