optimizerdialogcontrols.cxx (880c69c6) | optimizerdialogcontrols.cxx (597a4c59) |
---|---|
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 --- 11 unchanged lines hidden (view full) --- 20 *************************************************************/ 21 22 23 24// MARKER(update_precomp.py): autogen include statement, do not remove 25#include "precompiled_sdext.hxx" 26 27#include "optimizerdialog.hxx" | 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 --- 11 unchanged lines hidden (view full) --- 20 *************************************************************/ 21 22 23 24// MARKER(update_precomp.py): autogen include statement, do not remove 25#include "precompiled_sdext.hxx" 26 27#include "optimizerdialog.hxx" |
28#include "minimizer.hrc" 29#include "helpid.hrc" |
|
28 29// ------------------- 30// - OptimizerDialog - 31// ------------------- 32#include "pppoptimizer.hxx" 33#include "graphiccollector.hxx" 34#include "pagecollector.hxx" 35#include <com/sun/star/presentation/XCustomPresentationSupplier.hpp> 36#include <com/sun/star/drawing/XMasterPagesSupplier.hpp> 37#include <com/sun/star/drawing/XDrawPagesSupplier.hpp> 38#include <com/sun/star/awt/FontDescriptor.hpp> 39#ifndef _COM_SUN_STAR_AWT_XFONTWEIGHT_HPP_ 40#include <com/sun/star/awt/FontWeight.hpp> 41#endif 42#include <rtl/ustrbuf.hxx> 43 | 30 31// ------------------- 32// - OptimizerDialog - 33// ------------------- 34#include "pppoptimizer.hxx" 35#include "graphiccollector.hxx" 36#include "pagecollector.hxx" 37#include <com/sun/star/presentation/XCustomPresentationSupplier.hpp> 38#include <com/sun/star/drawing/XMasterPagesSupplier.hpp> 39#include <com/sun/star/drawing/XDrawPagesSupplier.hpp> 40#include <com/sun/star/awt/FontDescriptor.hpp> 41#ifndef _COM_SUN_STAR_AWT_XFONTWEIGHT_HPP_ 42#include <com/sun/star/awt/FontWeight.hpp> 43#endif 44#include <rtl/ustrbuf.hxx> 45 |
44using namespace ::rtl; | |
45using namespace ::com::sun::star::awt; 46using namespace ::com::sun::star::uno; 47using namespace ::com::sun::star::util; 48using namespace ::com::sun::star::lang; 49using namespace ::com::sun::star::frame; 50using namespace ::com::sun::star::beans; 51using namespace ::com::sun::star::script; 52using namespace ::com::sun::star::drawing; 53using namespace ::com::sun::star::container; 54using namespace ::com::sun::star::presentation; 55 | 46using namespace ::com::sun::star::awt; 47using namespace ::com::sun::star::uno; 48using namespace ::com::sun::star::util; 49using namespace ::com::sun::star::lang; 50using namespace ::com::sun::star::frame; 51using namespace ::com::sun::star::beans; 52using namespace ::com::sun::star::script; 53using namespace ::com::sun::star::drawing; 54using namespace ::com::sun::star::container; 55using namespace ::com::sun::star::presentation; 56 |
57using ::rtl::OUString; 58using ::rtl::OUStringBuffer; |
|
56// ----------------------------------------------------------------------------- 57 | 59// ----------------------------------------------------------------------------- 60 |
58void SetBold( OptimizerDialog& rOptimizerDialog, const rtl::OUString& rControl ) | 61void OptimizerDialog::ImplSetBold( const rtl::OUString& rControl ) |
59{ 60 FontDescriptor aFontDescriptor; | 62{ 63 FontDescriptor aFontDescriptor; |
61 if ( rOptimizerDialog.getControlProperty( rControl, TKGet( TK_FontDescriptor ) ) >>= aFontDescriptor ) | 64 if ( getControlProperty( rControl, TKGet( TK_FontDescriptor ) ) >>= aFontDescriptor ) |
62 { 63 aFontDescriptor.Weight = FontWeight::BOLD; | 65 { 66 aFontDescriptor.Weight = FontWeight::BOLD; |
64 rOptimizerDialog.setControlProperty( rControl, TKGet( TK_FontDescriptor ), Any( aFontDescriptor ) ); | 67 setControlProperty( rControl, TKGet( TK_FontDescriptor ), Any( aFontDescriptor ) ); |
65 } 66} 67 68// ----------------------------------------------------------------------------- 69 | 68 } 69} 70 71// ----------------------------------------------------------------------------- 72 |
70rtl::OUString InsertSeparator( OptimizerDialog& rOptimizerDialog, const OUString& rControlName, sal_Int32 nOrientation, 71 sal_Int32 nPosX, sal_Int32 nPosY, sal_Int32 nWidth, sal_Int32 nHeight ) | 73rtl::OUString OptimizerDialog::ImplInsertSeparator( 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{ 73 OUString pNames[] = { 74 TKGet( TK_Height ), 75 TKGet( TK_Orientation ), 76 TKGet( TK_PositionX ), 77 TKGet( TK_PositionY ), 78 TKGet( TK_Step ), 79 TKGet( TK_Width ) }; --- 6 unchanged lines hidden (view full) --- 86 Any( sal_Int16( 0 ) ), 87 Any( nWidth ) }; 88 89 sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString ); 90 91 Sequence< rtl::OUString > aNames( pNames, nCount ); 92 Sequence< Any > aValues( pValues, nCount ); 93 | 80{ 81 OUString pNames[] = { 82 TKGet( TK_Height ), 83 TKGet( TK_Orientation ), 84 TKGet( TK_PositionX ), 85 TKGet( TK_PositionY ), 86 TKGet( TK_Step ), 87 TKGet( TK_Width ) }; --- 6 unchanged lines hidden (view full) --- 94 Any( sal_Int16( 0 ) ), 95 Any( nWidth ) }; 96 97 sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString ); 98 99 Sequence< rtl::OUString > aNames( pNames, nCount ); 100 Sequence< Any > aValues( pValues, nCount ); 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 ); 96 return rControlName; 97} 98 99// ----------------------------------------------------------------------------- 100 | 103 rControlName, aNames, aValues ); 104 return rControlName; 105} 106 107// ----------------------------------------------------------------------------- 108 |
101rtl::OUString InsertButton( OptimizerDialog& rOptimizerDialog, const OUString& rControlName, Reference< XActionListener >& xActionListener, 102 sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int16 nTabIndex, sal_Bool bEnabled, PPPOptimizerTokenEnum nResID, sal_Int16 nPushButtonType ) | 109rtl::OUString OptimizerDialog::ImplInsertButton( 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{ 104 OUString pNames[] = { 105 TKGet( TK_Enabled ), 106 TKGet( TK_Height ), | 120{ 121 OUString pNames[] = { 122 TKGet( TK_Enabled ), 123 TKGet( TK_Height ), |
124 TKGet( TK_HelpURL ), |
|
107 TKGet( TK_Label ), 108 TKGet( TK_PositionX ), 109 TKGet( TK_PositionY ), 110 TKGet( TK_PushButtonType ), 111 TKGet( TK_Step ), 112 TKGet( TK_TabIndex ), 113 TKGet( TK_Width ) }; 114 115 Any pValues[] = { 116 Any( bEnabled ), 117 Any( nHeight ), | 125 TKGet( TK_Label ), 126 TKGet( TK_PositionX ), 127 TKGet( TK_PositionY ), 128 TKGet( TK_PushButtonType ), 129 TKGet( TK_Step ), 130 TKGet( TK_TabIndex ), 131 TKGet( TK_Width ) }; 132 133 Any pValues[] = { 134 Any( bEnabled ), 135 Any( nHeight ), |
118 Any( rOptimizerDialog.getString( nResID ) ), | 136 Any( rHelpURL ), 137 Any( getString( nResID ) ), |
119 Any( nXPos ), 120 Any( nYPos ), 121 Any( nPushButtonType ), 122 Any( (sal_Int16)0 ), 123 Any( nTabIndex ), 124 Any( nWidth ) }; 125 126 127 sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString ); 128 129 Sequence< rtl::OUString > aNames( pNames, nCount ); 130 Sequence< Any > aValues( pValues, nCount ); 131 | 138 Any( nXPos ), 139 Any( nYPos ), 140 Any( nPushButtonType ), 141 Any( (sal_Int16)0 ), 142 Any( nTabIndex ), 143 Any( nWidth ) }; 144 145 146 sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString ); 147 148 Sequence< rtl::OUString > aNames( pNames, nCount ); 149 Sequence< Any > aValues( pValues, nCount ); 150 |
132 rOptimizerDialog.insertButton( rControlName, xActionListener, aNames, aValues ); | 151 insertButton( rControlName, this, aNames, aValues ); |
133 return rControlName; 134} 135 136// ----------------------------------------------------------------------------- 137 | 152 return rControlName; 153} 154 155// ----------------------------------------------------------------------------- 156 |
138rtl::OUString InsertFixedText( OptimizerDialog& rOptimizerDialog, const rtl::OUString& rControlName, const OUString& rLabel, 139 sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth, sal_Int32 nHeight, sal_Bool bMultiLine, sal_Bool bBold, sal_Int16 nTabIndex ) | 157rtl::OUString OptimizerDialog::ImplInsertFixedText( 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{ 141 OUString pNames[] = { 142 TKGet( TK_Height ), 143 TKGet( TK_Label ), 144 TKGet( TK_MultiLine ), 145 TKGet( TK_PositionX ), 146 TKGet( TK_PositionY ), 147 TKGet( TK_Step ), --- 10 unchanged lines hidden (view full) --- 158 Any( nTabIndex ), 159 Any( nWidth ) }; 160 161 sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString ); 162 163 Sequence< rtl::OUString > aNames( pNames, nCount ); 164 Sequence< Any > aValues( pValues, nCount ); 165 | 167{ 168 OUString pNames[] = { 169 TKGet( TK_Height ), 170 TKGet( TK_Label ), 171 TKGet( TK_MultiLine ), 172 TKGet( TK_PositionX ), 173 TKGet( TK_PositionY ), 174 TKGet( TK_Step ), --- 10 unchanged lines hidden (view full) --- 185 Any( nTabIndex ), 186 Any( nWidth ) }; 187 188 sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString ); 189 190 Sequence< rtl::OUString > aNames( pNames, nCount ); 191 Sequence< Any > aValues( pValues, nCount ); 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; 170} 171 172// ----------------------------------------------------------------------------- 173 | 196 return rControlName; 197} 198 199// ----------------------------------------------------------------------------- 200 |
174rtl::OUString InsertCheckBox( OptimizerDialog& rOptimizerDialog, const OUString& rControlName, 175 const Reference< XItemListener > xItemListener, const OUString& rLabel, 176 sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int16 nTabIndex ) | 201rtl::OUString OptimizerDialog::ImplInsertCheckBox( 202 const OUString& rControlName, 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{ 178 OUString pNames[] = { 179 TKGet( TK_Enabled ), 180 TKGet( TK_Height ), | 210{ 211 OUString pNames[] = { 212 TKGet( TK_Enabled ), 213 TKGet( TK_Height ), |
214 TKGet( TK_HelpURL ), |
|
181 TKGet( TK_Label ), 182 TKGet( TK_PositionX ), 183 TKGet( TK_PositionY ), 184 TKGet( TK_Step ), 185 TKGet( TK_TabIndex ), 186 TKGet( TK_Width ) }; 187 188 Any pValues[] = { 189 Any( sal_True ), 190 Any( nHeight ), | 215 TKGet( TK_Label ), 216 TKGet( TK_PositionX ), 217 TKGet( TK_PositionY ), 218 TKGet( TK_Step ), 219 TKGet( TK_TabIndex ), 220 TKGet( TK_Width ) }; 221 222 Any pValues[] = { 223 Any( sal_True ), 224 Any( nHeight ), |
225 Any( rHelpURL ), |
|
191 Any( rLabel ), 192 Any( nXPos ), 193 Any( nYPos ), 194 Any( (sal_Int16)0 ), 195 Any( nTabIndex ), 196 Any( nWidth ) }; 197 198 sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString ); 199 200 Sequence< rtl::OUString > aNames( pNames, nCount ); 201 Sequence< Any > aValues( pValues, nCount ); 202 | 226 Any( rLabel ), 227 Any( nXPos ), 228 Any( nYPos ), 229 Any( (sal_Int16)0 ), 230 Any( nTabIndex ), 231 Any( nWidth ) }; 232 233 sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString ); 234 235 Sequence< rtl::OUString > aNames( pNames, nCount ); 236 Sequence< Any > aValues( pValues, nCount ); 237 |
203 Reference< XCheckBox > xCheckBox( rOptimizerDialog.insertCheckBox( rControlName, aNames, aValues ) ); 204 if ( xItemListener.is() ) 205 xCheckBox->addItemListener( xItemListener ); | 238 Reference< XCheckBox > xCheckBox( insertCheckBox( rControlName, aNames, aValues ) ); 239 xCheckBox->addItemListener( this ); |
206 return rControlName; 207} 208 209// ----------------------------------------------------------------------------- 210 | 240 return rControlName; 241} 242 243// ----------------------------------------------------------------------------- 244 |
211rtl::OUString InsertFormattedField( OptimizerDialog& rOptimizerDialog, const OUString& rControlName, 212 const Reference< XTextListener > xTextListener, const Reference< XSpinListener > xSpinListener, sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth, 213 double fEffectiveMin, double fEffectiveMax, sal_Int16 nTabIndex ) | 245rtl::OUString OptimizerDialog::ImplInsertFormattedField( 246 const OUString& rControlName, 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{ 215 OUString pNames[] = { 216 TKGet( TK_EffectiveMax ), 217 TKGet( TK_EffectiveMin ), 218 TKGet( TK_Enabled ), 219 TKGet( TK_Height ), | 254{ 255 OUString pNames[] = { 256 TKGet( TK_EffectiveMax ), 257 TKGet( TK_EffectiveMin ), 258 TKGet( TK_Enabled ), 259 TKGet( TK_Height ), |
260 TKGet( TK_HelpURL ), |
|
220 TKGet( TK_PositionX ), 221 TKGet( TK_PositionY ), 222 TKGet( TK_Repeat ), 223 TKGet( TK_Spin ), 224 TKGet( TK_Step ), 225 TKGet( TK_TabIndex ), 226 TKGet( TK_Width ) }; 227 228 Any pValues[] = { 229 Any( fEffectiveMax ), 230 Any( fEffectiveMin ), 231 Any( sal_True ), 232 Any( (sal_Int32)12 ), | 261 TKGet( TK_PositionX ), 262 TKGet( TK_PositionY ), 263 TKGet( TK_Repeat ), 264 TKGet( TK_Spin ), 265 TKGet( TK_Step ), 266 TKGet( TK_TabIndex ), 267 TKGet( TK_Width ) }; 268 269 Any pValues[] = { 270 Any( fEffectiveMax ), 271 Any( fEffectiveMin ), 272 Any( sal_True ), 273 Any( (sal_Int32)12 ), |
274 Any( rHelpURL ), |
|
233 Any( nXPos ), 234 Any( nYPos ), 235 Any( (sal_Bool)sal_True ), 236 Any( (sal_Bool)sal_True ), 237 Any( (sal_Int16)0 ), 238 Any( nTabIndex ), 239 Any( nWidth ) }; 240 241 sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString ); 242 243 Sequence< rtl::OUString > aNames( pNames, nCount ); 244 Sequence< Any > aValues( pValues, nCount ); 245 | 275 Any( nXPos ), 276 Any( nYPos ), 277 Any( (sal_Bool)sal_True ), 278 Any( (sal_Bool)sal_True ), 279 Any( (sal_Int16)0 ), 280 Any( nTabIndex ), 281 Any( nWidth ) }; 282 283 sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString ); 284 285 Sequence< rtl::OUString > aNames( pNames, nCount ); 286 Sequence< Any > aValues( pValues, nCount ); 287 |
246 Reference< XTextComponent > xTextComponent( rOptimizerDialog.insertFormattedField( rControlName, aNames, aValues ), UNO_QUERY_THROW ); 247 if ( xTextListener.is() ) 248 xTextComponent->addTextListener( xTextListener ); 249 if ( xSpinListener.is() ) 250 { 251 Reference< XSpinField > xSpinField( xTextComponent, UNO_QUERY_THROW ); 252 xSpinField->addSpinListener( xSpinListener ); 253 } | 288 Reference< XTextComponent > xTextComponent( insertFormattedField( rControlName, aNames, aValues ), UNO_QUERY_THROW ); 289 xTextComponent->addTextListener( this ); 290 Reference< XSpinField > xSpinField( xTextComponent, UNO_QUERY_THROW ); 291 xSpinField->addSpinListener( this ); 292 |
254 return rControlName; 255} 256 257// ----------------------------------------------------------------------------- 258 | 293 return rControlName; 294} 295 296// ----------------------------------------------------------------------------- 297 |
259rtl::OUString InsertComboBox( OptimizerDialog& rOptimizerDialog, const OUString& rControlName, 260 const Reference< XTextListener > xTextListener, const sal_Bool bEnabled, const Sequence< OUString >& rItemList, 261 sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int16 nTabIndex ) | 298rtl::OUString OptimizerDialog::ImplInsertComboBox( 299 const OUString& rControlName, 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{ 263 OUString pNames[] = { 264 TKGet( TK_Dropdown ), 265 TKGet( TK_Enabled ), 266 TKGet( TK_Height ), | 309{ 310 OUString pNames[] = { 311 TKGet( TK_Dropdown ), 312 TKGet( TK_Enabled ), 313 TKGet( TK_Height ), |
314 TKGet( TK_HelpURL ), |
|
267 TKGet( TK_LineCount ), 268 TKGet( TK_PositionX ), 269 TKGet( TK_PositionY ), 270 TKGet( TK_Step ), 271 TKGet( TK_StringItemList ), 272 TKGet( TK_TabIndex ), 273 TKGet( TK_Width ) }; 274 275 Any pValues[] = { 276 Any( sal_True ), 277 Any( bEnabled ), 278 Any( nHeight ), | 315 TKGet( TK_LineCount ), 316 TKGet( TK_PositionX ), 317 TKGet( TK_PositionY ), 318 TKGet( TK_Step ), 319 TKGet( TK_StringItemList ), 320 TKGet( TK_TabIndex ), 321 TKGet( TK_Width ) }; 322 323 Any pValues[] = { 324 Any( sal_True ), 325 Any( bEnabled ), 326 Any( nHeight ), |
327 Any( rHelpURL ), |
|
279 Any( (sal_Int16)8), 280 Any( nXPos ), 281 Any( nYPos ), 282 Any( (sal_Int16)0 ), 283 Any( rItemList ), 284 Any( nTabIndex ), 285 Any( nWidth ) }; 286 287 sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString ); 288 289 Sequence< rtl::OUString > aNames( pNames, nCount ); 290 Sequence< Any > aValues( pValues, nCount ); 291 | 328 Any( (sal_Int16)8), 329 Any( nXPos ), 330 Any( nYPos ), 331 Any( (sal_Int16)0 ), 332 Any( rItemList ), 333 Any( nTabIndex ), 334 Any( nWidth ) }; 335 336 sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString ); 337 338 Sequence< rtl::OUString > aNames( pNames, nCount ); 339 Sequence< Any > aValues( pValues, nCount ); 340 |
292 Reference< XTextComponent > xTextComponent( rOptimizerDialog.insertComboBox( rControlName, aNames, aValues ), UNO_QUERY_THROW ); 293 if ( xTextListener.is() ) 294 xTextComponent->addTextListener( xTextListener ); | 341 Reference< XTextComponent > xTextComponent( insertComboBox( rControlName, aNames, aValues ), UNO_QUERY_THROW ); 342 if ( bListen ) 343 xTextComponent->addTextListener( this ); |
295 return rControlName; 296} 297 298// ----------------------------------------------------------------------------- 299 | 344 return rControlName; 345} 346 347// ----------------------------------------------------------------------------- 348 |
300rtl::OUString InsertRadioButton( OptimizerDialog& rOptimizerDialog, const rtl::OUString& rControlName, const Reference< XItemListener > xItemListener, 301 const OUString& rLabel, sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth, sal_Int32 nHeight, sal_Bool bMultiLine, sal_Int16 nTabIndex ) | 349rtl::OUString OptimizerDialog::ImplInsertRadioButton( 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{ 303 OUString pNames[] = { 304 TKGet( TK_Height ), | 359{ 360 OUString pNames[] = { 361 TKGet( TK_Height ), |
362 TKGet( TK_HelpURL ), |
|
305 TKGet( TK_Label ), 306 TKGet( TK_MultiLine ), 307 TKGet( TK_PositionX ), 308 TKGet( TK_PositionY ), 309 TKGet( TK_Step ), 310 TKGet( TK_TabIndex ), 311 TKGet( TK_Width ) }; 312 313 Any pValues[] = { 314 Any( nHeight ), | 363 TKGet( TK_Label ), 364 TKGet( TK_MultiLine ), 365 TKGet( TK_PositionX ), 366 TKGet( TK_PositionY ), 367 TKGet( TK_Step ), 368 TKGet( TK_TabIndex ), 369 TKGet( TK_Width ) }; 370 371 Any pValues[] = { 372 Any( nHeight ), |
373 Any( rHelpURL ), |
|
315 Any( rLabel ), 316 Any( bMultiLine ), 317 Any( nXPos ), 318 Any( nYPos ), 319 Any( (sal_Int16)0 ), 320 Any( nTabIndex ), 321 Any( nWidth ) }; 322 323 sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString ); 324 325 Sequence< rtl::OUString > aNames( pNames, nCount ); 326 Sequence< Any > aValues( pValues, nCount ); 327 | 374 Any( rLabel ), 375 Any( bMultiLine ), 376 Any( nXPos ), 377 Any( nYPos ), 378 Any( (sal_Int16)0 ), 379 Any( nTabIndex ), 380 Any( nWidth ) }; 381 382 sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString ); 383 384 Sequence< rtl::OUString > aNames( pNames, nCount ); 385 Sequence< Any > aValues( pValues, nCount ); 386 |
328 Reference< XRadioButton > xRadioButton( rOptimizerDialog.insertRadioButton( rControlName, aNames, aValues ) ); 329 if ( xItemListener.is() ) 330 xRadioButton->addItemListener( xItemListener ); | 387 Reference< XRadioButton > xRadioButton( insertRadioButton( rControlName, aNames, aValues ) ); 388 xRadioButton->addItemListener( this ); |
331 return rControlName; 332} 333 334// ----------------------------------------------------------------------------- 335 | 389 return rControlName; 390} 391 392// ----------------------------------------------------------------------------- 393 |
336rtl::OUString InsertListBox( OptimizerDialog& rOptimizerDialog, const OUString& rControlName, 337 const Reference< XActionListener > xActionListener, const sal_Bool bEnabled, const Sequence< OUString >& rItemList, 338 sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int16 nTabIndex ) | 394rtl::OUString OptimizerDialog::ImplInsertListBox( 395 const OUString& rControlName, 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{ 340 OUString pNames[] = { 341 TKGet( TK_Dropdown ), 342 TKGet( TK_Enabled ), 343 TKGet( TK_Height ), | 404{ 405 OUString pNames[] = { 406 TKGet( TK_Dropdown ), 407 TKGet( TK_Enabled ), 408 TKGet( TK_Height ), |
409 TKGet( TK_HelpURL ), |
|
344 TKGet( TK_LineCount ), 345 TKGet( TK_MultiSelection ), 346 TKGet( TK_PositionX ), 347 TKGet( TK_PositionY ), 348 TKGet( TK_Step ), 349 TKGet( TK_StringItemList ), 350 TKGet( TK_TabIndex ), 351 TKGet( TK_Width ) }; 352 353 Any pValues[] = { 354 Any( sal_True ), 355 Any( bEnabled ), 356 Any( nHeight ), | 410 TKGet( TK_LineCount ), 411 TKGet( TK_MultiSelection ), 412 TKGet( TK_PositionX ), 413 TKGet( TK_PositionY ), 414 TKGet( TK_Step ), 415 TKGet( TK_StringItemList ), 416 TKGet( TK_TabIndex ), 417 TKGet( TK_Width ) }; 418 419 Any pValues[] = { 420 Any( sal_True ), 421 Any( bEnabled ), 422 Any( nHeight ), |
423 Any( rHelpURL ), |
|
357 Any( (sal_Int16)8), 358 Any( sal_False ), 359 Any( nXPos ), 360 Any( nYPos ), 361 Any( (sal_Int16)0 ), 362 Any( rItemList ), 363 Any( nTabIndex ), 364 Any( nWidth ) }; 365 366 sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString ); 367 368 Sequence< rtl::OUString > aNames( pNames, nCount ); 369 Sequence< Any > aValues( pValues, nCount ); 370 | 424 Any( (sal_Int16)8), 425 Any( sal_False ), 426 Any( nXPos ), 427 Any( nYPos ), 428 Any( (sal_Int16)0 ), 429 Any( rItemList ), 430 Any( nTabIndex ), 431 Any( nWidth ) }; 432 433 sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString ); 434 435 Sequence< rtl::OUString > aNames( pNames, nCount ); 436 Sequence< Any > aValues( pValues, nCount ); 437 |
371 Reference< XListBox > xListBox( rOptimizerDialog.insertListBox( rControlName, aNames, aValues ) ); 372 if ( xListBox.is() ) 373 xListBox->addActionListener( xActionListener ); | 438 Reference< XListBox > xListBox( insertListBox( rControlName, aNames, aValues ) ); 439 xListBox->addActionListener( this ); |
374 return rControlName; 375} 376 377// ----------------------------------------------------------------------------- 378 379void OptimizerDialog::InitNavigationBar() 380{ 381 sal_Int32 nCancelPosX = OD_DIALOG_WIDTH - BUTTON_WIDTH - 6; 382 sal_Int32 nFinishPosX = nCancelPosX - 6 - BUTTON_WIDTH; 383 sal_Int32 nNextPosX = nFinishPosX - 6 - BUTTON_WIDTH; 384 sal_Int32 nBackPosX = nNextPosX - 3 - BUTTON_WIDTH; 385 | 440 return rControlName; 441} 442 443// ----------------------------------------------------------------------------- 444 445void OptimizerDialog::InitNavigationBar() 446{ 447 sal_Int32 nCancelPosX = OD_DIALOG_WIDTH - BUTTON_WIDTH - 6; 448 sal_Int32 nFinishPosX = nCancelPosX - 6 - BUTTON_WIDTH; 449 sal_Int32 nNextPosX = nFinishPosX - 6 - BUTTON_WIDTH; 450 sal_Int32 nBackPosX = nNextPosX - 3 - BUTTON_WIDTH; 451 |
386 InsertSeparator( *this, 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 ); | 452 ImplInsertSeparator( TKGet( TK_lnNavSep1 ), 0, 0, DIALOG_HEIGHT - 26, OD_DIALOG_WIDTH, 1 ); 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 ); 390 InsertButton( *this, TKGet( TK_btnNavBack ), mxActionListener, 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 ); 392 InsertButton( *this, TKGet( TK_btnNavFinish ), mxActionListener, 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 ); | 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 ); 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 ); 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 ); 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 ); 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 395 setControlProperty( TKGet( TK_btnNavNext ), TKGet( TK_DefaultButton ), Any( sal_True ) ); 396} 397 398// ----------------------------------------------------------------------------- 399 400void OptimizerDialog::UpdateControlStatesPage0() 401{ --- 26 unchanged lines hidden (view full) --- 428 setControlProperty( TKGet( TK_ListBox0Pg0 ), TKGet( TK_StringItemList ), Any( aItemList ) ); 429 setControlProperty( TKGet( TK_ListBox0Pg0 ), TKGet( TK_SelectedItems ), Any( aSelectedItems ) ); 430 setControlProperty( TKGet( TK_Button0Pg0 ), TKGet( TK_Enabled ), Any( bRemoveButtonEnabled ) ); 431} 432void OptimizerDialog::InitPage0() 433{ 434 Sequence< OUString > aItemList; 435 std::vector< rtl::OUString > aControlList; | 460 461 setControlProperty( TKGet( TK_btnNavNext ), TKGet( TK_DefaultButton ), Any( sal_True ) ); 462} 463 464// ----------------------------------------------------------------------------- 465 466void OptimizerDialog::UpdateControlStatesPage0() 467{ --- 26 unchanged lines hidden (view full) --- 494 setControlProperty( TKGet( TK_ListBox0Pg0 ), TKGet( TK_StringItemList ), Any( aItemList ) ); 495 setControlProperty( TKGet( TK_ListBox0Pg0 ), TKGet( TK_SelectedItems ), Any( aSelectedItems ) ); 496 setControlProperty( TKGet( TK_Button0Pg0 ), TKGet( TK_Enabled ), Any( bRemoveButtonEnabled ) ); 497} 498void OptimizerDialog::InitPage0() 499{ 500 Sequence< OUString > aItemList; 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++ ) ); 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++ ) ); 438 aControlList.push_back( InsertSeparator( *this, 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++ ) ); 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++ ) ); 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 ) ); | 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++ ) ); 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++ ) ); 504 aControlList.push_back( ImplInsertSeparator( TKGet( TK_Separator1Pg0 ), 0, PAGE_POS_X + 6, DIALOG_HEIGHT - 66, PAGE_WIDTH - 12, 1 ) ); 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++ ) ); 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++ ) ); 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 ); 443 DeactivatePage( 0 ); 444 UpdateControlStatesPage0(); 445} 446 447// ----------------------------------------------------------------------------- 448 449void OptimizerDialog::UpdateControlStatesPage1() --- 4 unchanged lines hidden (view full) --- 454 455 setControlProperty( TKGet( TK_CheckBox0Pg3 ), TKGet( TK_State ), Any( (sal_Int16)bDeleteUnusedMasterPages ) ); 456 setControlProperty( TKGet( TK_CheckBox1Pg3 ), TKGet( TK_State ), Any( (sal_Int16)bDeleteNotesPages ) ); 457 setControlProperty( TKGet( TK_CheckBox2Pg3 ), TKGet( TK_State ), Any( (sal_Int16)bDeleteHiddenSlides ) ); 458} 459void OptimizerDialog::InitPage1() 460{ 461 Sequence< OUString > aCustomShowList; | 508 maControlPages.push_back( aControlList ); 509 DeactivatePage( 0 ); 510 UpdateControlStatesPage0(); 511} 512 513// ----------------------------------------------------------------------------- 514 515void OptimizerDialog::UpdateControlStatesPage1() --- 4 unchanged lines hidden (view full) --- 520 521 setControlProperty( TKGet( TK_CheckBox0Pg3 ), TKGet( TK_State ), Any( (sal_Int16)bDeleteUnusedMasterPages ) ); 522 setControlProperty( TKGet( TK_CheckBox1Pg3 ), TKGet( TK_State ), Any( (sal_Int16)bDeleteNotesPages ) ); 523 setControlProperty( TKGet( TK_CheckBox2Pg3 ), TKGet( TK_State ), Any( (sal_Int16)bDeleteHiddenSlides ) ); 524} 525void OptimizerDialog::InitPage1() 526{ 527 Sequence< OUString > aCustomShowList; |
462 Reference< XModel > xModel( mxController->getModel() ); | 528 Reference< XModel > xModel( mxModel ); |
463 if ( xModel.is() ) 464 { 465 Reference< XCustomPresentationSupplier > aXCPSup( xModel, UNO_QUERY_THROW ); 466 Reference< XNameContainer > aXCont( aXCPSup->getCustomPresentations() ); 467 if ( aXCont.is() ) 468 aCustomShowList = aXCont->getElementNames(); 469 } 470 std::vector< rtl::OUString > aControlList; | 529 if ( xModel.is() ) 530 { 531 Reference< XCustomPresentationSupplier > aXCPSup( xModel, UNO_QUERY_THROW ); 532 Reference< XNameContainer > aXCont( aXCPSup->getCustomPresentations() ); 533 if ( aXCont.is() ) 534 aCustomShowList = aXCont->getElementNames(); 535 } 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++ ) ); 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++ ) ); 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++ ) ); 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++ ) ); 475 aControlList.push_back( InsertListBox( *this, TKGet( TK_ListBox0Pg3 ), mxActionListener, 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++ ) ); | 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++ ) ); 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++ ) ); 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++ ) ); 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++ ) ); 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++ ) ); 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 ); 478 DeactivatePage( 1 ); 479 480 setControlProperty( TKGet( TK_CheckBox3Pg3 ), TKGet( TK_State ), Any( sal_False ) ); 481 setControlProperty( TKGet( TK_CheckBox3Pg3 ), TKGet( TK_Enabled ), Any( aCustomShowList.getLength() != 0 ) ); 482 setControlProperty( TKGet( TK_ListBox0Pg3 ), TKGet( TK_Enabled ), Any( sal_False ) ); 483 484 UpdateControlStatesPage1(); --- 45 unchanged lines hidden (view full) --- 530 nI0 = nI1 = nI2 = nI3 = 0; 531 Sequence< OUString > aResolutionItemList( 4 ); 532 aResolutionItemList[ 0 ] = getString( STR_IMAGE_RESOLUTION_0 ).getToken( 1, ';', nI0 ); 533 aResolutionItemList[ 1 ] = getString( STR_IMAGE_RESOLUTION_1 ).getToken( 1, ';', nI1 ); 534 aResolutionItemList[ 2 ] = getString( STR_IMAGE_RESOLUTION_2 ).getToken( 1, ';', nI2 ); 535 aResolutionItemList[ 3 ] = getString( STR_IMAGE_RESOLUTION_3 ).getToken( 1, ';', nI3 ); 536 537 std::vector< rtl::OUString > aControlList; | 543 maControlPages.push_back( aControlList ); 544 DeactivatePage( 1 ); 545 546 setControlProperty( TKGet( TK_CheckBox3Pg3 ), TKGet( TK_State ), Any( sal_False ) ); 547 setControlProperty( TKGet( TK_CheckBox3Pg3 ), TKGet( TK_Enabled ), Any( aCustomShowList.getLength() != 0 ) ); 548 setControlProperty( TKGet( TK_ListBox0Pg3 ), TKGet( TK_Enabled ), Any( sal_False ) ); 549 550 UpdateControlStatesPage1(); --- 45 unchanged lines hidden (view full) --- 596 nI0 = nI1 = nI2 = nI3 = 0; 597 Sequence< OUString > aResolutionItemList( 4 ); 598 aResolutionItemList[ 0 ] = getString( STR_IMAGE_RESOLUTION_0 ).getToken( 1, ';', nI0 ); 599 aResolutionItemList[ 1 ] = getString( STR_IMAGE_RESOLUTION_1 ).getToken( 1, ';', nI1 ); 600 aResolutionItemList[ 2 ] = getString( STR_IMAGE_RESOLUTION_2 ).getToken( 1, ';', nI2 ); 601 aResolutionItemList[ 3 ] = getString( STR_IMAGE_RESOLUTION_3 ).getToken( 1, ';', nI3 ); 602 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++ ) ); 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++ ) ); 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++ ) ); 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++ ) ); 542 aControlList.push_back( InsertFormattedField( *this, TKGet( TK_FormattedField0Pg1 ), mxTextListenerFormattedField0Pg1, mxSpinListenerFormattedField0Pg1, 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++ ) ); 544 aControlList.push_back( InsertComboBox( *this, TKGet( TK_ComboBox0Pg1 ), mxTextListenerComboBox0Pg1, 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++ ) ); 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++ ) ); | 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++ ) ); 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++ ) ); 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++ ) ); 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++ ) ); 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++ ) ); 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++ ) ); 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++ ) ); 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++ ) ); 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 ); 548 DeactivatePage( 2 ); 549 UpdateControlStatesPage2(); 550} 551 552// ----------------------------------------------------------------------------- 553 554void OptimizerDialog::UpdateControlStatesPage3() --- 5 unchanged lines hidden (view full) --- 560 setControlProperty( TKGet( TK_RadioButton0Pg2 ), TKGet( TK_Enabled ), Any( bConvertOLEObjects ) ); 561 setControlProperty( TKGet( TK_RadioButton0Pg2 ), TKGet( TK_State ), Any( (sal_Int16)( nOLEOptimizationType == 0 ) ) ); 562 setControlProperty( TKGet( TK_RadioButton1Pg2 ), TKGet( TK_Enabled ), Any( bConvertOLEObjects ) ); 563 setControlProperty( TKGet( TK_RadioButton1Pg2 ), TKGet( TK_State ), Any( (sal_Int16)( nOLEOptimizationType == 1 ) ) ); 564} 565void OptimizerDialog::InitPage3() 566{ 567 int nOLECount = 0; | 613 maControlPages.push_back( aControlList ); 614 DeactivatePage( 2 ); 615 UpdateControlStatesPage2(); 616} 617 618// ----------------------------------------------------------------------------- 619 620void OptimizerDialog::UpdateControlStatesPage3() --- 5 unchanged lines hidden (view full) --- 626 setControlProperty( TKGet( TK_RadioButton0Pg2 ), TKGet( TK_Enabled ), Any( bConvertOLEObjects ) ); 627 setControlProperty( TKGet( TK_RadioButton0Pg2 ), TKGet( TK_State ), Any( (sal_Int16)( nOLEOptimizationType == 0 ) ) ); 628 setControlProperty( TKGet( TK_RadioButton1Pg2 ), TKGet( TK_Enabled ), Any( bConvertOLEObjects ) ); 629 setControlProperty( TKGet( TK_RadioButton1Pg2 ), TKGet( TK_State ), Any( (sal_Int16)( nOLEOptimizationType == 1 ) ) ); 630} 631void OptimizerDialog::InitPage3() 632{ 633 int nOLECount = 0; |
568 Reference< XModel > xModel( mxController->getModel() ); | 634 Reference< XModel > xModel( mxModel ); |
569 Reference< XDrawPagesSupplier > xDrawPagesSupplier( xModel, UNO_QUERY_THROW ); 570 Reference< XDrawPages > xDrawPages( xDrawPagesSupplier->getDrawPages(), UNO_QUERY_THROW ); 571 for ( sal_Int32 i = 0; i < xDrawPages->getCount(); i++ ) 572 { 573 Reference< XShapes > xShapes( xDrawPages->getByIndex( i ), UNO_QUERY_THROW ); 574 for ( sal_Int32 j = 0; j < xShapes->getCount(); j++ ) 575 { 576 const OUString sOLE2Shape( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.OLE2Shape" ) ); 577 Reference< XShape > xShape( xShapes->getByIndex( j ), UNO_QUERY_THROW ); 578 if ( xShape->getShapeType() == sOLE2Shape ) 579 nOLECount++; 580 } 581 } 582 583 std::vector< rtl::OUString > aControlList; | 635 Reference< XDrawPagesSupplier > xDrawPagesSupplier( xModel, UNO_QUERY_THROW ); 636 Reference< XDrawPages > xDrawPages( xDrawPagesSupplier->getDrawPages(), UNO_QUERY_THROW ); 637 for ( sal_Int32 i = 0; i < xDrawPages->getCount(); i++ ) 638 { 639 Reference< XShapes > xShapes( xDrawPages->getByIndex( i ), UNO_QUERY_THROW ); 640 for ( sal_Int32 j = 0; j < xShapes->getCount(); j++ ) 641 { 642 const OUString sOLE2Shape( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.OLE2Shape" ) ); 643 Reference< XShape > xShape( xShapes->getByIndex( j ), UNO_QUERY_THROW ); 644 if ( xShape->getShapeType() == sOLE2Shape ) 645 nOLECount++; 646 } 647 } 648 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++ ) ); 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++ ) ); 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++ ) ); 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++ ) ); 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++ ) ); | 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++ ) ); 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++ ) ); 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++ ) ); 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++ ) ); 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 ); 590 DeactivatePage( 3 ); 591 UpdateControlStatesPage3(); 592} 593 594// ----------------------------------------------------------------------------- 595 596static OUString ImpValueOfInMB( const sal_Int64& rVal, sal_Unicode nSeparator = '.' ) --- 81 unchanged lines hidden (view full) --- 678 } 679 } 680 } 681 } 682 } 683 if ( aCustomShowName.getLength() ) 684 { 685 std::vector< Reference< XDrawPage > > vNonUsedPageList; | 655 maControlPages.push_back( aControlList ); 656 DeactivatePage( 3 ); 657 UpdateControlStatesPage3(); 658} 659 660// ----------------------------------------------------------------------------- 661 662static OUString ImpValueOfInMB( const sal_Int64& rVal, sal_Unicode nSeparator = '.' ) --- 81 unchanged lines hidden (view full) --- 744 } 745 } 746 } 747 } 748 } 749 if ( aCustomShowName.getLength() ) 750 { 751 std::vector< Reference< XDrawPage > > vNonUsedPageList; |
686 PageCollector::CollectNonCustomShowPages( mxController->getModel(), aCustomShowName, vNonUsedPageList ); | 752 PageCollector::CollectNonCustomShowPages( mxModel, aCustomShowName, vNonUsedPageList ); |
687 nDeletedSlides += vNonUsedPageList.size(); 688 } 689 if ( GetConfigProperty( TK_DeleteHiddenSlides, sal_False ) ) 690 { 691 if ( aCustomShowName.getLength() ) 692 { 693 std::vector< Reference< XDrawPage > > vUsedPageList; | 753 nDeletedSlides += vNonUsedPageList.size(); 754 } 755 if ( GetConfigProperty( TK_DeleteHiddenSlides, sal_False ) ) 756 { 757 if ( aCustomShowName.getLength() ) 758 { 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() ); 696 while( aIter != vUsedPageList.end() ) 697 { 698 Reference< XPropertySet > xPropSet( *aIter, UNO_QUERY_THROW ); 699 sal_Bool bVisible = sal_True; 700 const OUString sVisible( RTL_CONSTASCII_USTRINGPARAM( "Visible" ) ); 701 if ( xPropSet->getPropertyValue( sVisible ) >>= bVisible ) 702 { 703 if (!bVisible ) 704 nDeletedSlides++; 705 } 706 aIter++; 707 } 708 } 709 else 710 { | 761 std::vector< Reference< XDrawPage > >::iterator aIter( vUsedPageList.begin() ); 762 while( aIter != vUsedPageList.end() ) 763 { 764 Reference< XPropertySet > xPropSet( *aIter, UNO_QUERY_THROW ); 765 sal_Bool bVisible = sal_True; 766 const OUString sVisible( RTL_CONSTASCII_USTRINGPARAM( "Visible" ) ); 767 if ( xPropSet->getPropertyValue( sVisible ) >>= bVisible ) 768 { 769 if (!bVisible ) 770 nDeletedSlides++; 771 } 772 aIter++; 773 } 774 } 775 else 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 ); 713 for( sal_Int32 i = 0; i < xDrawPages->getCount(); i++ ) 714 { 715 Reference< XDrawPage > xDrawPage( xDrawPages->getByIndex( i ), UNO_QUERY_THROW ); 716 Reference< XPropertySet > xPropSet( xDrawPage, UNO_QUERY_THROW ); 717 718 sal_Bool bVisible = sal_True; 719 const OUString sVisible( RTL_CONSTASCII_USTRINGPARAM( "Visible" ) ); 720 if ( xPropSet->getPropertyValue( sVisible ) >>= bVisible ) 721 { 722 if (!bVisible ) 723 nDeletedSlides++; 724 } 725 } 726 } 727 } 728 if ( GetConfigProperty( TK_DeleteUnusedMasterPages, sal_False ) ) 729 { 730 std::vector< PageCollector::MasterPageEntity > aMasterPageList; | 778 Reference< XDrawPages > xDrawPages( xDrawPagesSupplier->getDrawPages(), UNO_QUERY_THROW ); 779 for( sal_Int32 i = 0; i < xDrawPages->getCount(); i++ ) 780 { 781 Reference< XDrawPage > xDrawPage( xDrawPages->getByIndex( i ), UNO_QUERY_THROW ); 782 Reference< XPropertySet > xPropSet( xDrawPage, UNO_QUERY_THROW ); 783 784 sal_Bool bVisible = sal_True; 785 const OUString sVisible( RTL_CONSTASCII_USTRINGPARAM( "Visible" ) ); 786 if ( xPropSet->getPropertyValue( sVisible ) >>= bVisible ) 787 { 788 if (!bVisible ) 789 nDeletedSlides++; 790 } 791 } 792 } 793 } 794 if ( GetConfigProperty( TK_DeleteUnusedMasterPages, sal_False ) ) 795 { 796 std::vector< PageCollector::MasterPageEntity > aMasterPageList; |
731 PageCollector::CollectMasterPages( mxController->getModel(), aMasterPageList ); 732 Reference< XMasterPagesSupplier > xMasterPagesSupplier( mxController->getModel(), UNO_QUERY_THROW ); | 797 PageCollector::CollectMasterPages( mxModel, aMasterPageList ); 798 Reference< XMasterPagesSupplier > xMasterPagesSupplier( mxModel, UNO_QUERY_THROW ); |
733 Reference< XDrawPages > xMasterPages( xMasterPagesSupplier->getMasterPages(), UNO_QUERY_THROW ); 734 std::vector< PageCollector::MasterPageEntity >::iterator aIter( aMasterPageList.begin() ); 735 while( aIter != aMasterPageList.end() ) 736 { 737 if ( !aIter->bUsed ) 738 nDeletedSlides++; 739 aIter++; 740 } --- 10 unchanged lines hidden (view full) --- 751 752// generating graphic compression info 753 sal_Int32 nGraphics = 0; 754 sal_Bool bJPEGCompression( GetConfigProperty( TK_JPEGCompression, sal_False ) ); 755 sal_Int32 nJPEGQuality( GetConfigProperty( TK_JPEGQuality, (sal_Int32)90 ) ); 756 sal_Int32 nImageResolution( GetConfigProperty( TK_ImageResolution, (sal_Int32)0 ) ); 757 GraphicSettings aGraphicSettings( bJPEGCompression, nJPEGQuality, GetConfigProperty( TK_RemoveCropArea, sal_False ), 758 nImageResolution, GetConfigProperty( TK_EmbedLinkedGraphics, sal_True ) ); | 799 Reference< XDrawPages > xMasterPages( xMasterPagesSupplier->getMasterPages(), UNO_QUERY_THROW ); 800 std::vector< PageCollector::MasterPageEntity >::iterator aIter( aMasterPageList.begin() ); 801 while( aIter != aMasterPageList.end() ) 802 { 803 if ( !aIter->bUsed ) 804 nDeletedSlides++; 805 aIter++; 806 } --- 10 unchanged lines hidden (view full) --- 817 818// generating graphic compression info 819 sal_Int32 nGraphics = 0; 820 sal_Bool bJPEGCompression( GetConfigProperty( TK_JPEGCompression, sal_False ) ); 821 sal_Int32 nJPEGQuality( GetConfigProperty( TK_JPEGQuality, (sal_Int32)90 ) ); 822 sal_Int32 nImageResolution( GetConfigProperty( TK_ImageResolution, (sal_Int32)0 ) ); 823 GraphicSettings aGraphicSettings( bJPEGCompression, nJPEGQuality, GetConfigProperty( TK_RemoveCropArea, sal_False ), 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 ) 761 { 762 OUString aStr( getString( STR_OPTIMIZE_IMAGES ) ); 763 OUString aImagePlaceholder( RTL_CONSTASCII_USTRINGPARAM( "%IMAGES" ) ); 764 OUString aQualityPlaceholder( RTL_CONSTASCII_USTRINGPARAM( "%QUALITY" ) ); 765 OUString aResolutionPlaceholder( RTL_CONSTASCII_USTRINGPARAM( "%RESOLUTION" ) ); 766 sal_Int32 i = aStr.indexOf( aImagePlaceholder, 0 ); 767 if ( i >= 0 ) --- 8 unchanged lines hidden (view full) --- 776 aStr = aStr.replaceAt( k, aResolutionPlaceholder.getLength(), OUString::valueOf( nImageResolution ) ); 777 778 aSummaryStrings.push_back( aStr ); 779 } 780 781 if ( GetConfigProperty( TK_OLEOptimization, sal_False ) ) 782 { 783 sal_Int32 nOLEReplacements = 0; | 826 if ( nGraphics > 1 ) 827 { 828 OUString aStr( getString( STR_OPTIMIZE_IMAGES ) ); 829 OUString aImagePlaceholder( RTL_CONSTASCII_USTRINGPARAM( "%IMAGES" ) ); 830 OUString aQualityPlaceholder( RTL_CONSTASCII_USTRINGPARAM( "%QUALITY" ) ); 831 OUString aResolutionPlaceholder( RTL_CONSTASCII_USTRINGPARAM( "%RESOLUTION" ) ); 832 sal_Int32 i = aStr.indexOf( aImagePlaceholder, 0 ); 833 if ( i >= 0 ) --- 8 unchanged lines hidden (view full) --- 842 aStr = aStr.replaceAt( k, aResolutionPlaceholder.getLength(), OUString::valueOf( nImageResolution ) ); 843 844 aSummaryStrings.push_back( aStr ); 845 } 846 847 if ( GetConfigProperty( TK_OLEOptimization, sal_False ) ) 848 { 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 ); 786 for ( sal_Int32 i = 0; i < xDrawPages->getCount(); i++ ) 787 { 788 Reference< XShapes > xShapes( xDrawPages->getByIndex( i ), UNO_QUERY_THROW ); 789 for ( sal_Int32 j = 0; j < xShapes->getCount(); j++ ) 790 { 791 const OUString sOLE2Shape( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.OLE2Shape" ) ); 792 Reference< XShape > xShape( xShapes->getByIndex( j ), UNO_QUERY_THROW ); --- 14 unchanged lines hidden (view full) --- 807 while( aSummaryStrings.size() < 3 ) 808 aSummaryStrings.push_back( OUString() ); 809 setControlProperty( TKGet( TK_FixedText4Pg4 ), TKGet( TK_Label ), Any( aSummaryStrings[ 0 ] ) ); 810 setControlProperty( TKGet( TK_FixedText5Pg4 ), TKGet( TK_Label ), Any( aSummaryStrings[ 1 ] ) ); 811 setControlProperty( TKGet( TK_FixedText6Pg4 ), TKGet( TK_Label ), Any( aSummaryStrings[ 2 ] ) ); 812 813 sal_Int64 nCurrentFileSize = 0; 814 sal_Int64 nEstimatedFileSize = 0; | 851 Reference< XDrawPages > xDrawPages( xDrawPagesSupplier->getDrawPages(), UNO_QUERY_THROW ); 852 for ( sal_Int32 i = 0; i < xDrawPages->getCount(); i++ ) 853 { 854 Reference< XShapes > xShapes( xDrawPages->getByIndex( i ), UNO_QUERY_THROW ); 855 for ( sal_Int32 j = 0; j < xShapes->getCount(); j++ ) 856 { 857 const OUString sOLE2Shape( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.OLE2Shape" ) ); 858 Reference< XShape > xShape( xShapes->getByIndex( j ), UNO_QUERY_THROW ); --- 14 unchanged lines hidden (view full) --- 873 while( aSummaryStrings.size() < 3 ) 874 aSummaryStrings.push_back( OUString() ); 875 setControlProperty( TKGet( TK_FixedText4Pg4 ), TKGet( TK_Label ), Any( aSummaryStrings[ 0 ] ) ); 876 setControlProperty( TKGet( TK_FixedText5Pg4 ), TKGet( TK_Label ), Any( aSummaryStrings[ 1 ] ) ); 877 setControlProperty( TKGet( TK_FixedText6Pg4 ), TKGet( TK_Label ), Any( aSummaryStrings[ 2 ] ) ); 878 879 sal_Int64 nCurrentFileSize = 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() ) 817 nCurrentFileSize = PPPOptimizer::GetFileSize( xStorable->getLocation() ); 818 819 if ( nCurrentFileSize ) 820 { 821 double fE = static_cast< double >( nCurrentFileSize ); 822 if ( nImageResolution ) 823 { --- 27 unchanged lines hidden (view full) --- 851 TKGet( TK_PositionY ), 852 TKGet( TK_ProgressValue ), 853 TKGet( TK_ProgressValueMax ), 854 TKGet( TK_ProgressValueMin ), 855 TKGet( TK_Width ) }; 856 857 Any pValues[] = { 858 Any( (sal_Int32)12 ), | 882 if ( xStorable.is() && xStorable->hasLocation() ) 883 nCurrentFileSize = PPPOptimizer::GetFileSize( xStorable->getLocation() ); 884 885 if ( nCurrentFileSize ) 886 { 887 double fE = static_cast< double >( nCurrentFileSize ); 888 if ( nImageResolution ) 889 { --- 27 unchanged lines hidden (view full) --- 917 TKGet( TK_PositionY ), 918 TKGet( TK_ProgressValue ), 919 TKGet( TK_ProgressValueMax ), 920 TKGet( TK_ProgressValueMin ), 921 TKGet( TK_Width ) }; 922 923 Any pValues[] = { 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 ) ), 861 Any( (sal_Int32)( DIALOG_HEIGHT - 75 ) ), 862 Any( (sal_Int32)( 0 ) ), 863 Any( (sal_Int32)( 100 ) ), 864 Any( (sal_Int32)( 0 ) ), 865 Any( (sal_Int32)( PAGE_WIDTH - 12 ) ) }; 866 867 sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString ); 868 869 Sequence< rtl::OUString > aNames( pNames, nCount ); 870 Sequence< Any > aValues( pValues, nCount ); 871 872 Reference< XMultiPropertySet > xMultiPropertySet( insertControlModel( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlProgressBarModel" ) ), 873 TKGet( TK_Progress ), aNames, aValues ), UNO_QUERY ); 874 } | 926 Any( (sal_Int32)( PAGE_POS_X + 6 ) ), 927 Any( (sal_Int32)( DIALOG_HEIGHT - 75 ) ), 928 Any( (sal_Int32)( 0 ) ), 929 Any( (sal_Int32)( 100 ) ), 930 Any( (sal_Int32)( 0 ) ), 931 Any( (sal_Int32)( PAGE_WIDTH - 12 ) ) }; 932 933 sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString ); 934 935 Sequence< rtl::OUString > aNames( pNames, nCount ); 936 Sequence< Any > aValues( pValues, nCount ); 937 938 Reference< XMultiPropertySet > xMultiPropertySet( insertControlModel( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlProgressBarModel" ) ), 939 TKGet( TK_Progress ), aNames, aValues ), UNO_QUERY ); 940 } |
875 Reference< XTextListener > xTextListener; | 941 |
876 Sequence< OUString > aItemList; 877 std::vector< rtl::OUString > aControlList; | 942 Sequence< OUString > aItemList; 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++ ) ); 879// aControlList.push_back( InsertSeparator( *this, TKGet( TK_Separator0Pg4 ), 0, PAGE_POS_X + 6, PAGE_POS_Y + 90, PAGE_WIDTH - 12, 1 ) ); | 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++ ) ); 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++ ) ); 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++ ) ); 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++ ) ); | 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++ ) ); 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++ ) ); 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++ ) ); 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++ ) ); | 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++ ) ); 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++ ) ); 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++ ) ); | 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++ ) ); 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 ) ) ); 891 | 956 setControlProperty( TKGet( TK_FixedText8Pg4 ), TKGet( TK_Align ), Any( static_cast< short >( 2 ) ) ); 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++ ) ); 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++ ) ); 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++ ) ); | 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++ ) ); 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++ ) ); 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 ) ); 897 aControlList.push_back( InsertCheckBox( *this, TKGet( TK_CheckBox1Pg4 ), mxItemListener, getString( STR_SAVE_SETTINGS ), 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++ ) ); | 962 aControlList.push_back( ImplInsertSeparator( TKGet( TK_Separator1Pg4 ), 0, PAGE_POS_X + 6, DIALOG_HEIGHT - 58, PAGE_WIDTH - 12, 1 ) ); 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++ ) ); 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 ); 900 DeactivatePage( 4 ); 901 902 // creating a default session name that hasn't been used yet 903 OUString aSettingsName; 904 OUString aDefault( getString( STR_MY_SETTINGS ) ); 905 sal_Int32 nSession = 1; 906 sal_uInt32 i; --- 50 unchanged lines hidden --- | 970 maControlPages.push_back( aControlList ); 971 DeactivatePage( 4 ); 972 973 // creating a default session name that hasn't been used yet 974 OUString aSettingsName; 975 OUString aDefault( getString( STR_MY_SETTINGS ) ); 976 sal_Int32 nSession = 1; 977 sal_uInt32 i; --- 50 unchanged lines hidden --- |