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 // MARKER(update_precomp.py): autogen include statement, do not remove 25 #include "precompiled_scui.hxx" 26 27 #if ! ENABLE_LAYOUT_EXPERIMENTAL 28 #undef ENABLE_LAYOUT 29 #endif 30 31 32 #include "scdlgfact.hxx" 33 34 #include "sc.hrc" //CHINA001 35 #include "scuiasciiopt.hxx" //add for ScImportAsciiDlg 36 #include "scuiautofmt.hxx" //add for ScAutoFormatDlg 37 #include "corodlg.hxx" //add for ScColRowLabelDlg 38 #include "crdlg.hxx" //add for ScColOrRowDlg 39 #include "dapidata.hxx" //add for ScDataPilotDatabaseDlg 40 #include "dapitype.hxx" //add for ScDataPilotSourceTypeDlg, ScDataPilotServiceDlg 41 #include "delcldlg.hxx" //add for ScDeleteCellDlg 42 #include "delcodlg.hxx" //add for ScDeleteContentsDlg 43 #include "filldlg.hxx" //add for ScFillSeriesDlg 44 #include "groupdlg.hxx" //add for ScGroupDlg 45 #include "inscldlg.hxx" //add for ScInsertCellDlg 46 #include "inscodlg.hxx" //add for ScInsertContentsDlg 47 #include "instbdlg.hxx" //add for ScInsertTableDlg 48 #include "lbseldlg.hxx" //add for ScSelEntryDlg 49 #include "linkarea.hxx" //add for ScLinkedAreaDlg 50 #include "mtrindlg.hxx" //add for ScMetricInputDlg 51 #include "mvtabdlg.hxx" //add for ScMoveTableDlg 52 #include "namecrea.hxx" //add for ScNameCreateDlg 53 #include "namepast.hxx" //add for ScNamePasteDlg 54 #include "pfiltdlg.hxx" //add for ScPivotFilterDlg 55 #include "pvfundlg.hxx" //add for ScDPFunctionDlg 56 #include "dpgroupdlg.hxx" 57 #include "scendlg.hxx" //add for ScNewScenarioDlg 58 #include "shtabdlg.hxx" //add for ScShowTabDlg 59 #include "strindlg.hxx" //add for ScStringInputDlg 60 #include "tabbgcolordlg.hxx"//add for ScTabBgColorDlg 61 #include "scuiimoptdlg.hxx" //add for ScImportOptionsDlg 62 #include "attrdlg.hxx" //add for ScAttrDlg 63 #include "hfedtdlg.hxx" //add for ScHFEditDlg 64 #include "styledlg.hxx" //add for ScStyleDlg 65 #include "subtdlg.hxx" //add for ScSubTotalDlg 66 #include "textdlgs.hxx" //add for ScCharDlg, ScParagraphDlg 67 #include "validate.hxx" //add for ScValidationDlg 68 #include "validate.hrc" //add for ScValidationDlg 69 #include "sortdlg.hxx" //add for ScSortDlg 70 #include "textimportoptions.hxx" 71 #include "opredlin.hxx" //add for ScRedlineOptionsTabPage 72 #include "tpcalc.hxx" //add for ScTpCalcOptions 73 #include "tpprint.hxx" //add for ScTpPrintOptions 74 #include "tpstat.hxx" //add for ScDocStatPage 75 #include "tpusrlst.hxx" //add for ScTpUserLists 76 #include "tpview.hxx" //add for ScTpContentOptions 77 78 // ause 79 #include "editutil.hxx" 80 #include <sfx2/layout.hxx> 81 82 IMPL_ABSTDLG_BASE(VclAbstractDialog_Impl); //add for ScColOrRowDlg 83 IMPL_ABSTDLG_BASE(AbstractScImportAsciiDlg_Impl);//CHINA001 add for ScImportAsciiDlg 84 IMPL_ABSTDLG_BASE(AbstractScAutoFormatDlg_Impl); //CHINA001 add for ScAutoFormatDlg 85 IMPL_ABSTDLG_BASE(AbstractScColRowLabelDlg_Impl); //add for ScColRowLabelDlg 86 IMPL_ABSTDLG_BASE(AbstractScDataPilotDatabaseDlg_Impl); //add for ScDataPilotDatabaseDlg 87 IMPL_ABSTDLG_BASE(AbstractScDataPilotSourceTypeDlg_Impl); //add for ScDataPilotSourceTypeDlg 88 IMPL_ABSTDLG_BASE(AbstractScDataPilotServiceDlg_Impl); //add for ScDataPilotServiceDlg 89 IMPL_ABSTDLG_BASE(AbstractScDeleteCellDlg_Impl); //add for ScDeleteCellDlg 90 IMPL_ABSTDLG_BASE(AbstractScDeleteContentsDlg_Impl); //add for ScDeleteContentsDlg 91 IMPL_ABSTDLG_BASE(AbstractScFillSeriesDlg_Impl); //add for ScFillSeriesDlg 92 IMPL_ABSTDLG_BASE(AbstractScGroupDlg_Impl); //add for ScGroupDlg 93 IMPL_ABSTDLG_BASE(AbstractScInsertCellDlg_Impl); //add for ScInsertCellDlg 94 IMPL_ABSTDLG_BASE(AbstractScInsertContentsDlg_Impl); //add for ScInsertContentsDlg 95 IMPL_ABSTDLG_BASE(AbstractScInsertTableDlg_Impl); //add for ScInsertTableDlg 96 IMPL_ABSTDLG_BASE(AbstractScSelEntryDlg_Impl); //add for ScSelEntryDlg 97 IMPL_ABSTDLG2_BASE(AbstractScLinkedAreaDlg_Impl); //add for ScLinkedAreaDlg 98 IMPL_ABSTDLG_BASE(AbstractScMetricInputDlg_Impl); //add for ScMetricInputDlg 99 IMPL_ABSTDLG_BASE(AbstractScMoveTableDlg_Impl); //add for ScMoveTableDlg 100 IMPL_ABSTDLG_BASE(AbstractScNameCreateDlg_Impl); //add for ScNameCreateDlg 101 IMPL_ABSTDLG_BASE(AbstractScNamePasteDlg_Impl); //add for ScNamePasteDlg 102 IMPL_ABSTDLG_BASE(AbstractScPivotFilterDlg_Impl); //add for ScPivotFilterDlg 103 IMPL_ABSTDLG_BASE(AbstractScDPFunctionDlg_Impl); //add for ScDPFunctionDlg 104 IMPL_ABSTDLG_BASE(AbstractScDPSubtotalDlg_Impl); //add for ScDPSubtotalDlg 105 IMPL_ABSTDLG_BASE(AbstractScDPNumGroupDlg_Impl); 106 IMPL_ABSTDLG_BASE(AbstractScDPDateGroupDlg_Impl); 107 IMPL_ABSTDLG_BASE(AbstractScDPShowDetailDlg_Impl); //add for ScDPShowDetailDlg 108 IMPL_ABSTDLG_BASE(AbstractScNewScenarioDlg_Impl); //add for ScNewScenarioDlg 109 IMPL_ABSTDLG_BASE(AbstractScShowTabDlg_Impl); //add for ScShowTabDlg 110 IMPL_ABSTDLG_BASE(AbstractScStringInputDlg_Impl); //add for ScStringInputDlg 111 IMPL_ABSTDLG_BASE(AbstractScTabBgColorDlg_Impl); //add for ScTabBgColorDlg 112 IMPL_ABSTDLG_BASE(AbstractScImportOptionsDlg_Impl); //add for ScImportOptionsDlg 113 IMPL_ABSTDLG_BASE(AbstractScTextImportOptionsDlg_Impl); 114 IMPL_ABSTDLG_BASE(AbstractTabDialog_Impl); //add for ScAttrDlg, ScHFEditDlg, ScStyleDlg, ScSubTotalDlg,ScCharDlg, ScParagraphDlg, ScValidationDlg, ScSortDlg 115 116 // AbstractTabDialog_Impl begin 117 void AbstractTabDialog_Impl::SetCurPageId( sal_uInt16 nId ) 118 { 119 pDlg->SetCurPageId( nId ); 120 } 121 122 const SfxItemSet* AbstractTabDialog_Impl::GetOutputItemSet() const 123 { 124 return pDlg->GetOutputItemSet(); 125 } 126 //add by CHINA001 127 const sal_uInt16* AbstractTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem ) 128 { 129 return pDlg->GetInputRanges( pItem ); 130 } 131 //add by CHINA001 132 void AbstractTabDialog_Impl::SetInputSet( const SfxItemSet* pInSet ) 133 { 134 pDlg->SetInputSet( pInSet ); 135 } 136 //From class Window. 137 void AbstractTabDialog_Impl::SetText( const XubString& rStr ) 138 { 139 pDlg->SetText( rStr ); 140 } 141 String AbstractTabDialog_Impl::GetText() const 142 { 143 return pDlg->GetText(); 144 } 145 146 #if ENABLE_LAYOUT 147 namespace layout 148 { 149 IMPL_ABSTDLG_BASE(AbstractTabDialog_Impl); //add for ScAttrDlg, ScHFEditDlg, ScStyleDlg, ScSubTotalDlg,ScCharDlg, ScParagraphDlg, ScValidationDlg, ScSortDlg 150 151 // AbstractTabDialog_Impl begin 152 void AbstractTabDialog_Impl::SetCurPageId( sal_uInt16 nId ) 153 { 154 pDlg->SetCurPageId( nId ); 155 } 156 157 const SfxItemSet* AbstractTabDialog_Impl::GetOutputItemSet() const 158 { 159 return pDlg->GetOutputItemSet(); 160 } 161 //add by CHINA001 162 const sal_uInt16* AbstractTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem ) 163 { 164 return pDlg->GetInputRanges( pItem ); 165 } 166 //add by CHINA001 167 void AbstractTabDialog_Impl::SetInputSet( const SfxItemSet* pInSet ) 168 { 169 pDlg->SetInputSet( pInSet ); 170 } 171 //From class Window. 172 void AbstractTabDialog_Impl::SetText( const XubString& rStr ) 173 { 174 pDlg->SetText( rStr ); 175 } 176 String AbstractTabDialog_Impl::GetText() const 177 { 178 return pDlg->GetText(); 179 } 180 } 181 #endif /* ENABLE_LAYOUT */ 182 183 //add for AbstractTabDialog_Impl end 184 // AbstractScImportAsciiDlg_Impl begin 185 void AbstractScImportAsciiDlg_Impl::GetOptions( ScAsciiOptions& rOpt ) 186 { 187 pDlg->GetOptions( rOpt ); 188 } 189 190 void AbstractScImportAsciiDlg_Impl::SetTextToColumnsMode() 191 { 192 pDlg->SetTextToColumnsMode(); 193 } 194 195 void AbstractScImportAsciiDlg_Impl::SaveParameters() 196 { 197 pDlg->SaveParameters(); 198 } 199 200 // AbstractScImportAsciiDlg_Impl end 201 202 //AbstractScAutoFormatDlg_Impl begin 203 sal_uInt16 AbstractScAutoFormatDlg_Impl::GetIndex() const 204 { 205 return pDlg->GetIndex(); 206 } 207 208 String AbstractScAutoFormatDlg_Impl::GetCurrFormatName() 209 { 210 return pDlg->GetCurrFormatName(); 211 } 212 213 //AbstractScAutoFormatDlg_Impl end 214 215 216 217 //AbstractScColRowLabelDlg_Impl begin 218 sal_Bool AbstractScColRowLabelDlg_Impl::IsCol() 219 { 220 return pDlg->IsCol(); 221 } 222 sal_Bool AbstractScColRowLabelDlg_Impl::IsRow() 223 { 224 return pDlg->IsRow(); 225 } 226 227 //AbstractScColRowLabelDlg_Impl end 228 229 230 //AbstractScDataPilotDatabaseDlg_Impl begin 231 232 233 void AbstractScDataPilotDatabaseDlg_Impl::GetValues( ScImportSourceDesc& rDesc ) 234 { 235 pDlg->GetValues(rDesc); 236 } 237 238 //AbstractScDataPilotDatabaseDlg_Impl end 239 240 //AbstractScDataPilotSourceTypeDlg_Impl begin 241 242 sal_Bool AbstractScDataPilotSourceTypeDlg_Impl::IsDatabase() const 243 { 244 return pDlg->IsDatabase(); 245 } 246 247 sal_Bool AbstractScDataPilotSourceTypeDlg_Impl::IsExternal() const 248 { 249 return pDlg->IsExternal(); 250 } 251 252 //AbstractScDataPilotSourceTypeDlg_Impl end 253 254 255 // AbstractScDataPilotServiceDlg_Impl begin 256 String AbstractScDataPilotServiceDlg_Impl::GetServiceName() const 257 { 258 return pDlg->GetServiceName(); 259 } 260 261 String AbstractScDataPilotServiceDlg_Impl::GetParSource() const 262 { 263 return pDlg->GetParSource(); 264 } 265 String AbstractScDataPilotServiceDlg_Impl::GetParName() const 266 { 267 return pDlg->GetParName(); 268 } 269 String AbstractScDataPilotServiceDlg_Impl::GetParUser() const 270 { 271 return pDlg->GetParUser(); 272 } 273 String AbstractScDataPilotServiceDlg_Impl::GetParPass() const 274 { 275 return pDlg->GetParPass(); 276 } 277 278 //AbstractScDataPilotServiceDlg_Impl end 279 280 //AbstractScDeleteCellDlg_Impl begin 281 DelCellCmd AbstractScDeleteCellDlg_Impl::GetDelCellCmd() const //add for ScDeleteCellDlg 282 { 283 return pDlg->GetDelCellCmd(); 284 } 285 //AbstractScDeleteCellDlg_Impl end 286 287 //add for AbstractScDeleteContentsDlg_Impl begin 288 void AbstractScDeleteContentsDlg_Impl::DisableObjects() 289 { 290 pDlg->DisableObjects(); 291 } 292 sal_uInt16 AbstractScDeleteContentsDlg_Impl::GetDelContentsCmdBits() const 293 { 294 return pDlg->GetDelContentsCmdBits(); 295 } 296 //add for AbstractScDeleteContentsDlg_Impl end 297 298 //add for AbstractScFillSeriesDlg_Impl begin 299 FillDir AbstractScFillSeriesDlg_Impl::GetFillDir() const 300 { 301 return pDlg->GetFillDir(); 302 } 303 304 FillCmd AbstractScFillSeriesDlg_Impl::GetFillCmd() const 305 { 306 return pDlg->GetFillCmd(); 307 } 308 309 FillDateCmd AbstractScFillSeriesDlg_Impl::GetFillDateCmd() const 310 { 311 return pDlg->GetFillDateCmd(); 312 } 313 314 double AbstractScFillSeriesDlg_Impl::GetStart() const 315 { 316 return pDlg->GetStart(); 317 } 318 double AbstractScFillSeriesDlg_Impl::GetStep() const 319 { 320 return pDlg->GetStep(); 321 } 322 double AbstractScFillSeriesDlg_Impl::GetMax() const 323 { 324 return pDlg->GetMax(); 325 } 326 String AbstractScFillSeriesDlg_Impl::GetStartStr() const 327 { 328 return pDlg->GetStartStr(); 329 } 330 void AbstractScFillSeriesDlg_Impl::SetEdStartValEnabled(sal_Bool bFlag) 331 { 332 pDlg->SetEdStartValEnabled(bFlag); 333 } 334 //add for AbstractScFillSeriesDlg_Impl end 335 336 //add for AbstractScGroupDlg_Impl begin 337 sal_Bool AbstractScGroupDlg_Impl::GetColsChecked() const 338 { 339 return pDlg->GetColsChecked(); 340 } 341 //add for AbstractScGroupDlg_Impl end 342 343 344 //add for AbstractScInsertCellDlg_Impl begin 345 InsCellCmd AbstractScInsertCellDlg_Impl::GetInsCellCmd() const 346 { 347 return pDlg->GetInsCellCmd(); 348 } 349 350 //add for AbstractScInsertCellDlg_Impl end 351 352 353 //add for AbstractScInsertContentsDlg_Impl begin 354 sal_uInt16 AbstractScInsertContentsDlg_Impl::GetInsContentsCmdBits() const 355 { 356 return pDlg->GetInsContentsCmdBits(); 357 } 358 359 360 sal_uInt16 AbstractScInsertContentsDlg_Impl::GetFormulaCmdBits() const 361 { 362 return pDlg->GetFormulaCmdBits(); 363 } 364 sal_Bool AbstractScInsertContentsDlg_Impl::IsSkipEmptyCells() const 365 { 366 return pDlg->IsSkipEmptyCells(); 367 } 368 sal_Bool AbstractScInsertContentsDlg_Impl::IsLink() const 369 { 370 return pDlg->IsLink(); 371 } 372 void AbstractScInsertContentsDlg_Impl::SetFillMode( sal_Bool bSet ) 373 { 374 pDlg->SetFillMode( bSet ); 375 } 376 377 void AbstractScInsertContentsDlg_Impl::SetOtherDoc( sal_Bool bSet ) 378 { 379 pDlg->SetOtherDoc( bSet ); 380 } 381 382 sal_Bool AbstractScInsertContentsDlg_Impl::IsTranspose() const 383 { 384 return pDlg->IsTranspose(); 385 } 386 void AbstractScInsertContentsDlg_Impl::SetChangeTrack( sal_Bool bSet ) 387 { 388 pDlg->SetChangeTrack( bSet ); 389 } 390 void AbstractScInsertContentsDlg_Impl::SetCellShiftDisabled( int nDisable ) 391 { 392 pDlg->SetCellShiftDisabled( nDisable ); 393 } 394 395 InsCellCmd AbstractScInsertContentsDlg_Impl::GetMoveMode() 396 { 397 return pDlg->GetMoveMode(); 398 } 399 //add for AbstractScInsertContentsDlg_Impl end 400 401 402 //add for AbstractScInsertTableDlg_Impl begin 403 sal_Bool AbstractScInsertTableDlg_Impl::GetTablesFromFile() 404 { 405 return pDlg->GetTablesFromFile(); 406 } 407 408 sal_Bool AbstractScInsertTableDlg_Impl::GetTablesAsLink() 409 { 410 return pDlg->GetTablesAsLink(); 411 } 412 const String* AbstractScInsertTableDlg_Impl::GetFirstTable( sal_uInt16* pN ) 413 { 414 return pDlg->GetFirstTable( pN ); 415 } 416 ScDocShell* AbstractScInsertTableDlg_Impl::GetDocShellTables() 417 { 418 return pDlg->GetDocShellTables(); 419 } 420 sal_Bool AbstractScInsertTableDlg_Impl::IsTableBefore() 421 { 422 return pDlg->IsTableBefore(); 423 } 424 sal_uInt16 AbstractScInsertTableDlg_Impl::GetTableCount() 425 { 426 return pDlg->GetTableCount(); 427 } 428 const String* AbstractScInsertTableDlg_Impl::GetNextTable( sal_uInt16* pN ) 429 { 430 return pDlg->GetNextTable( pN ); 431 } 432 //add for AbstractScInsertTableDlg_Impl end 433 434 //add for AbstractScSelEntryDlg_Impl begin 435 String AbstractScSelEntryDlg_Impl::GetSelectEntry() const 436 { 437 return pDlg->GetSelectEntry(); 438 } 439 //add for AbstractScSelEntryDlg_Impl end 440 441 //add for AbstractScLinkedAreaDlg_Impl begin 442 void AbstractScLinkedAreaDlg_Impl::InitFromOldLink( const String& rFile, const String& rFilter, 443 const String& rOptions, const String& rSource, 444 sal_uLong nRefresh ) 445 { 446 pDlg->InitFromOldLink( rFile, rFilter, rOptions, rSource, nRefresh); 447 } 448 449 String AbstractScLinkedAreaDlg_Impl::GetURL() 450 { 451 return pDlg->GetURL(); 452 } 453 String AbstractScLinkedAreaDlg_Impl::GetFilter() 454 { 455 return pDlg->GetFilter(); 456 } 457 String AbstractScLinkedAreaDlg_Impl::GetOptions() 458 { 459 return pDlg->GetOptions(); 460 } 461 String AbstractScLinkedAreaDlg_Impl::GetSource() 462 { 463 return pDlg->GetSource(); 464 } 465 sal_uLong AbstractScLinkedAreaDlg_Impl::GetRefresh() 466 { 467 return pDlg->GetRefresh(); 468 } 469 //add for AbstractScLinkedAreaDlg_Impl end 470 471 472 //add for AbstractScMetricInputDlg_Impl begin 473 long AbstractScMetricInputDlg_Impl::GetInputValue( FieldUnit eUnit ) const 474 { 475 476 return pDlg->GetInputValue( eUnit ); 477 } 478 //add for AbstractScMetricInputDlg_Impl end 479 480 //add for AbstractScMoveTableDlg_Impl begin 481 sal_uInt16 AbstractScMoveTableDlg_Impl::GetSelectedDocument() const //add for ScMoveTableDlg 482 { 483 return pDlg->GetSelectedDocument(); 484 } 485 486 sal_uInt16 AbstractScMoveTableDlg_Impl::GetSelectedTable() const 487 { 488 return pDlg->GetSelectedTable(); 489 } 490 sal_Bool AbstractScMoveTableDlg_Impl::GetCopyTable() const 491 { 492 return pDlg->GetCopyTable(); 493 } 494 void AbstractScMoveTableDlg_Impl::SetCopyTable(sal_Bool bFla) 495 { 496 return pDlg->SetCopyTable( bFla ); 497 } 498 void AbstractScMoveTableDlg_Impl::EnableCopyTable(sal_Bool bFlag) 499 { 500 return pDlg->EnableCopyTable( bFlag); 501 } 502 //add for AbstractScMoveTableDlg_Impl end 503 504 //add for AbstractScNameCreateDlg_Impl begin 505 sal_uInt16 AbstractScNameCreateDlg_Impl::GetFlags() const //add for ScNameCreateDlg 506 { 507 return pDlg->GetFlags(); 508 } 509 //add for AbstractScNameCreateDlg_Impl end 510 511 //add for AbstractScNamePasteDlg_Impl begin 512 String AbstractScNamePasteDlg_Impl::GetSelectedName() const //add for ScNamePasteDlg 513 { 514 return pDlg->GetSelectedName(); 515 } 516 517 //add for AbstractScNamePasteDlg_Impl end 518 519 //add for AbstractScPivotFilterDlg_Impl begin 520 const ScQueryItem& AbstractScPivotFilterDlg_Impl::GetOutputItem() //add for ScPivotFilterDlg 521 { 522 return pDlg->GetOutputItem(); 523 } 524 //add for AbstractScPivotFilterDlg_Impl end 525 526 //add for AbstractScDPFunctionDlg_Impl begin 527 sal_uInt16 AbstractScDPFunctionDlg_Impl::GetFuncMask() const //add for ScDPFunctionDlg 528 { 529 return pDlg->GetFuncMask(); 530 } 531 ::com::sun::star::sheet::DataPilotFieldReference AbstractScDPFunctionDlg_Impl::GetFieldRef() const 532 { 533 return pDlg->GetFieldRef(); 534 } 535 //add for AbstractScDPFunctionDlg_Impl end 536 537 //add for AbstractScDPSubtotalDlg_Impl begin 538 sal_uInt16 AbstractScDPSubtotalDlg_Impl::GetFuncMask() const //add for ScDPSubtotalDlg 539 { 540 return pDlg->GetFuncMask(); 541 } 542 void AbstractScDPSubtotalDlg_Impl::FillLabelData( ScDPLabelData& rLabelData ) const 543 { 544 pDlg->FillLabelData( rLabelData ); 545 } 546 //add for AbstractScDPSubtotalDlg_Impl end 547 548 ScDPNumGroupInfo AbstractScDPNumGroupDlg_Impl::GetGroupInfo() const 549 { 550 return pDlg->GetGroupInfo(); 551 } 552 553 ScDPNumGroupInfo AbstractScDPDateGroupDlg_Impl::GetGroupInfo() const 554 { 555 return pDlg->GetGroupInfo(); 556 } 557 558 sal_Int32 AbstractScDPDateGroupDlg_Impl::GetDatePart() const 559 { 560 return pDlg->GetDatePart(); 561 } 562 563 //add for AbstractScDPShowDetailDlg_Impl begin 564 String AbstractScDPShowDetailDlg_Impl::GetDimensionName() const 565 { 566 return pDlg->GetDimensionName(); 567 } 568 //add for AbstractScDPShowDetailDlg_Impl end 569 570 //add for AbstractScNewScenarioDlg_Impl begin 571 void AbstractScNewScenarioDlg_Impl::SetScenarioData( const String& rName, const String& rComment, 572 const Color& rColor, sal_uInt16 nFlags ) 573 { 574 pDlg->SetScenarioData(rName,rComment, rColor,nFlags); 575 } 576 577 void AbstractScNewScenarioDlg_Impl::GetScenarioData( String& rName, String& rComment, 578 Color& rColor, sal_uInt16& rFlags ) const 579 { 580 pDlg->GetScenarioData( rName,rComment,rColor,rFlags); 581 } 582 583 //add for AbstractScNewScenarioDlg_Impl end 584 585 //add for AbstractScShowTabDlg_Impl begin 586 void AbstractScShowTabDlg_Impl::Insert( const String& rString, sal_Bool bSelected ) //add for ScShowTabDlg 587 { 588 pDlg->Insert( rString, bSelected); 589 } 590 591 sal_uInt16 AbstractScShowTabDlg_Impl::GetSelectEntryCount() const 592 { 593 return pDlg->GetSelectEntryCount(); 594 } 595 void AbstractScShowTabDlg_Impl::SetDescription( 596 const String& rTitle, const String& rFixedText, 597 const rtl::OString& sDlgHelpId, const rtl::OString& sLbHelpId ) 598 { 599 pDlg->SetDescription( rTitle, rFixedText, sDlgHelpId, sLbHelpId ); 600 } 601 sal_uInt16 AbstractScShowTabDlg_Impl::GetSelectEntryPos(sal_uInt16 nPos) const 602 { 603 return pDlg->GetSelectEntryPos( nPos); 604 } 605 String AbstractScShowTabDlg_Impl::GetSelectEntry(sal_uInt16 nPos) const 606 { 607 return pDlg->GetSelectEntry(nPos); 608 } 609 //add for AbstractScShowTabDlg_Impl end 610 611 //add for AbstractScStringInputDlg_Impl begin 612 void AbstractScStringInputDlg_Impl::GetInputString( String& rString ) const //add for ScStringInputDlg 613 { 614 pDlg->GetInputString( rString ); 615 } 616 //add for AbstractScStringInputDlg_Impl end 617 618 //add for AbstractScTabBgColorDlg_Impl begin 619 void AbstractScTabBgColorDlg_Impl::GetSelectedColor( Color& rColor ) const //add for ScTabBgColorDlg 620 { 621 pDlg->GetSelectedColor( rColor ); 622 } 623 //add for AbstractScTabBgColorDlg_Impl end 624 625 626 //add for AbstractScImportOptionsDlg_Impl begin 627 void AbstractScImportOptionsDlg_Impl::GetImportOptions( ScImportOptions& rOptions ) const //add for ScImportOptionsDlg 628 { 629 pDlg->GetImportOptions(rOptions); 630 } 631 // add for AbstractScImportOptionsDlg_Impl end 632 633 //add for AbstractScLangChooserDlg_Impl begin 634 LanguageType AbstractScTextImportOptionsDlg_Impl::GetLanguageType() const 635 { 636 return pDlg->getLanguageType(); 637 } 638 639 bool AbstractScTextImportOptionsDlg_Impl::IsDateConversionSet() const 640 { 641 return pDlg->isDateConversionSet(); 642 } 643 644 //add for AbstractScLangChooserDlg_Impl end 645 646 // =========================Factories for createdialog =================== 647 648 //add for ScImportAsciiDlg begin 649 AbstractScImportAsciiDlg * ScAbstractDialogFactory_Impl::CreateScImportAsciiDlg ( Window* pParent, String aDatName, 650 SvStream* pInStream, int nId, sal_Unicode cSep ) 651 { 652 ScImportAsciiDlg* pDlg=NULL; 653 switch ( nId ) 654 { 655 case RID_SCDLG_ASCII : 656 pDlg = new ScImportAsciiDlg( pParent, aDatName,pInStream, cSep ); 657 break; 658 default: 659 break; 660 } 661 662 if ( pDlg ) 663 return new AbstractScImportAsciiDlg_Impl( pDlg ); 664 return 0; 665 } 666 // ScImportAsciiDlg end 667 668 AbstractScTextImportOptionsDlg * ScAbstractDialogFactory_Impl::CreateScTextImportOptionsDlg( Window* pParent, int nId ) 669 { 670 ScTextImportOptionsDlg* pDlg = NULL; 671 switch (nId) 672 { 673 case RID_SCDLG_TEXT_IMPORT_OPTIONS: 674 pDlg = new ScTextImportOptionsDlg(pParent); 675 break; 676 default: 677 ; 678 } 679 680 return pDlg ? new AbstractScTextImportOptionsDlg_Impl(pDlg) : NULL; 681 } 682 683 //add for ScAutoFormatDlg begin 684 685 AbstractScAutoFormatDlg * ScAbstractDialogFactory_Impl::CreateScAutoFormatDlg( Window* pParent, //add for ScAutoFormatDlg 686 ScAutoFormat* pAutoFormat, 687 const ScAutoFormatData* pSelFormatData, 688 ScDocument* pDoc, 689 int nId) 690 { 691 ScAutoFormatDlg* pDlg=NULL; 692 switch ( nId ) 693 { 694 case RID_SCDLG_AUTOFORMAT : 695 pDlg = new ScAutoFormatDlg( pParent, pAutoFormat,pSelFormatData, pDoc ); 696 break; 697 default: 698 break; 699 } 700 701 if ( pDlg ) 702 return new AbstractScAutoFormatDlg_Impl( pDlg ); 703 return 0; 704 } 705 //add for ScAutoFormatDlg end 706 707 //add for ScColRowLabelDlg begin 708 709 AbstractScColRowLabelDlg * ScAbstractDialogFactory_Impl::CreateScColRowLabelDlg(Window* pParent, //add for ScColRowLabelDlg 710 int nId, 711 sal_Bool bCol , 712 sal_Bool bRow) 713 { 714 ScColRowLabelDlg* pDlg=NULL; 715 switch ( nId ) 716 { 717 case RID_SCDLG_CHARTCOLROW : 718 pDlg = new ScColRowLabelDlg( pParent, bCol,bRow ); 719 break; 720 default: 721 break; 722 } 723 724 if ( pDlg ) 725 return new AbstractScColRowLabelDlg_Impl( pDlg ); 726 return 0; 727 } 728 //add for ScColRowLabelDlg end 729 730 731 //add for ScColOrRowDlg begin 732 733 VclAbstractDialog * ScAbstractDialogFactory_Impl::CreateScColOrRowDlg(Window* pParent, 734 const String& rStrTitle, 735 const String& rStrLabel, 736 int nId, 737 sal_Bool bColDefault) 738 { 739 Dialog * pDlg=NULL; 740 switch ( nId ) 741 { 742 case RID_SCDLG_COLORROW : 743 pDlg = new ScColOrRowDlg( pParent, rStrTitle,rStrLabel,bColDefault ); 744 break; 745 default: 746 break; 747 } 748 749 if ( pDlg ) 750 return new VclAbstractDialog_Impl( pDlg ); 751 return 0; 752 } 753 //add for ScColOrRowDlg end 754 755 //add for ScSortWarningDlg begin 756 VclAbstractDialog * ScAbstractDialogFactory_Impl::CreateScSortWarningDlg( Window* pParent, const String& rExtendText, 757 const String& rCurrentText, int nId ) 758 { 759 Dialog * pDlg=NULL; 760 switch ( nId ) 761 { 762 case RID_SCDLG_SORT_WARNING: 763 pDlg = new ScSortWarningDlg( pParent, rExtendText, rCurrentText ); 764 break; 765 default: 766 break; 767 } 768 if( pDlg ) 769 return new VclAbstractDialog_Impl( pDlg ); 770 return 0; 771 } 772 //add for ScSortWarningDlg end 773 774 //add for ScDataPilotDatabaseDlg begin 775 776 AbstractScDataPilotDatabaseDlg * ScAbstractDialogFactory_Impl::CreateScDataPilotDatabaseDlg (Window* pParent , 777 int nId ) //add for ScDataPilotDatabaseDlg 778 { 779 ScDataPilotDatabaseDlg * pDlg=NULL; 780 switch ( nId ) 781 { 782 case RID_SCDLG_DAPIDATA : 783 pDlg = new ScDataPilotDatabaseDlg( pParent ); 784 break; 785 default: 786 break; 787 } 788 789 if ( pDlg ) 790 return new AbstractScDataPilotDatabaseDlg_Impl( pDlg ); 791 return 0; 792 } 793 //add for ScDataPilotDatabaseDlg end 794 795 //add for ScDataPilotSourceTypeDlg begin 796 AbstractScDataPilotSourceTypeDlg* ScAbstractDialogFactory_Impl::CreateScDataPilotSourceTypeDlg( Window* pParent, 797 sal_Bool bEnableExternal, 798 int nId ) 799 { 800 ScDataPilotSourceTypeDlg * pDlg=NULL; 801 switch ( nId ) 802 { 803 case RID_SCDLG_DAPITYPE : 804 pDlg = new ScDataPilotSourceTypeDlg( pParent, bEnableExternal ); 805 break; 806 default: 807 break; 808 } 809 810 if ( pDlg ) 811 return new AbstractScDataPilotSourceTypeDlg_Impl( pDlg ); 812 return 0; 813 } 814 815 // add for ScDataPilotSourceTypeDlg end 816 817 818 //add for ScDataPilotServiceDlg begin 819 AbstractScDataPilotServiceDlg* ScAbstractDialogFactory_Impl::CreateScDataPilotServiceDlg( Window* pParent, 820 const com::sun::star::uno::Sequence<rtl::OUString>& rServices, 821 int nId ) 822 { 823 ScDataPilotServiceDlg * pDlg=NULL; 824 switch ( nId ) 825 { 826 case RID_SCDLG_DAPISERVICE : 827 pDlg = new ScDataPilotServiceDlg( pParent, rServices ); 828 break; 829 default: 830 break; 831 } 832 833 if ( pDlg ) 834 return new AbstractScDataPilotServiceDlg_Impl( pDlg ); 835 return 0; 836 } 837 838 // add for ScDataPilotServiceDlg end 839 840 //add for ScDeleteCellDlg begin 841 AbstractScDeleteCellDlg* ScAbstractDialogFactory_Impl::CreateScDeleteCellDlg( Window* pParent, int nId, 842 sal_Bool bDisallowCellMove ) 843 { 844 ScDeleteCellDlg * pDlg=NULL; 845 switch ( nId ) 846 { 847 case RID_SCDLG_DELCELL : 848 pDlg = new ScDeleteCellDlg( pParent, bDisallowCellMove ); 849 break; 850 default: 851 break; 852 } 853 854 if ( pDlg ) 855 return new AbstractScDeleteCellDlg_Impl( pDlg ); 856 return 0; 857 } 858 859 //add for ScDeleteCellDlg end 860 861 //add for ScDeleteContentsDlg begin 862 AbstractScDeleteContentsDlg* ScAbstractDialogFactory_Impl::CreateScDeleteContentsDlg(Window* pParent,int nId, //add for ScDeleteContentsDlg 863 sal_uInt16 nCheckDefaults ) 864 { 865 ScDeleteContentsDlg * pDlg=NULL; 866 switch ( nId ) 867 { 868 case RID_SCDLG_DELCONT : 869 pDlg = new ScDeleteContentsDlg( pParent, nCheckDefaults ); 870 break; 871 default: 872 break; 873 } 874 875 if ( pDlg ) 876 return new AbstractScDeleteContentsDlg_Impl( pDlg ); 877 return 0; 878 } 879 880 //add for ScDeleteContentsDlg end 881 882 //add for ScFillSeriesDlg begin 883 AbstractScFillSeriesDlg* ScAbstractDialogFactory_Impl::CreateScFillSeriesDlg( Window* pParent, //add for ScFillSeriesDlg 884 ScDocument& rDocument, 885 FillDir eFillDir, 886 FillCmd eFillCmd, 887 FillDateCmd eFillDateCmd, 888 String aStartStr, 889 double fStep, 890 double fMax, 891 sal_uInt16 nPossDir, 892 int nId) 893 { 894 ScFillSeriesDlg * pDlg=NULL; 895 switch ( nId ) 896 { 897 case RID_SCDLG_FILLSERIES : 898 pDlg = new ScFillSeriesDlg( pParent, rDocument,eFillDir, eFillCmd,eFillDateCmd, aStartStr,fStep,fMax,nPossDir); 899 break; 900 default: 901 break; 902 } 903 904 if ( pDlg ) 905 return new AbstractScFillSeriesDlg_Impl( pDlg ); 906 return 0; 907 } 908 909 //add for ScFillSeriesDlg end 910 911 //add for ScGroupDlg begin 912 AbstractScGroupDlg* ScAbstractDialogFactory_Impl::CreateAbstractScGroupDlg( Window* pParent, 913 sal_uInt16 nResId, 914 int nId, 915 sal_Bool bUnGroup , 916 sal_Bool bRows ) 917 { 918 ScGroupDlg * pDlg=NULL; 919 switch ( nId ) 920 { 921 case RID_SCDLG_GRP_KILL : 922 case RID_SCDLG_GRP_MAKE : 923 pDlg = new ScGroupDlg( pParent, nResId,bUnGroup, bRows); 924 break; 925 default: 926 break; 927 } 928 929 if ( pDlg ) 930 return new AbstractScGroupDlg_Impl( pDlg ); 931 return 0; 932 } 933 934 //add for ScGroupDlg end 935 936 937 //add for ScInsertCellDlg begin 938 AbstractScInsertCellDlg * ScAbstractDialogFactory_Impl::CreateScInsertCellDlg( Window* pParent, //add for ScInsertCellDlg 939 int nId, 940 sal_Bool bDisallowCellMove ) 941 { 942 ScInsertCellDlg * pDlg=NULL; 943 switch ( nId ) 944 { 945 case RID_SCDLG_INSCELL : 946 pDlg = new ScInsertCellDlg( pParent, bDisallowCellMove); 947 break; 948 default: 949 break; 950 } 951 952 if ( pDlg ) 953 return new AbstractScInsertCellDlg_Impl( pDlg ); 954 return 0; 955 } 956 957 //add for ScInsertCellDlg end 958 959 //add for ScInsertContentsDlg begin 960 AbstractScInsertContentsDlg * ScAbstractDialogFactory_Impl::CreateScInsertContentsDlg( Window* pParent, 961 int nId, 962 sal_uInt16 nCheckDefaults, 963 const String* pStrTitle ) 964 { 965 ScInsertContentsDlg * pDlg=NULL; 966 switch ( nId ) 967 { 968 case RID_SCDLG_INSCONT : 969 pDlg = new ScInsertContentsDlg( pParent, nCheckDefaults,pStrTitle ); 970 break; 971 default: 972 break; 973 } 974 975 if ( pDlg ) 976 return new AbstractScInsertContentsDlg_Impl( pDlg ); 977 return 0; 978 } 979 //add for ScInsertContentsDlg end 980 981 //add for ScInsertTableDlg begin 982 AbstractScInsertTableDlg * ScAbstractDialogFactory_Impl::CreateScInsertTableDlg ( Window* pParent, ScViewData& rViewData, 983 SCTAB nTabCount, bool bFromFile, int nId) 984 { 985 ScInsertTableDlg * pDlg=NULL; 986 switch ( nId ) 987 { 988 case RID_SCDLG_INSERT_TABLE : 989 pDlg = new ScInsertTableDlg( pParent, rViewData,nTabCount, bFromFile ); 990 break; 991 default: 992 break; 993 } 994 995 if ( pDlg ) 996 return new AbstractScInsertTableDlg_Impl( pDlg ); 997 return 0; 998 } 999 //add for ScInsertTableDlg end 1000 1001 // add for ScSelEntryDlg begin 1002 AbstractScSelEntryDlg * ScAbstractDialogFactory_Impl::CreateScSelEntryDlg ( Window* pParent, 1003 sal_uInt16 nResId, 1004 const String& aTitle, 1005 const String& aLbTitle, 1006 List& aEntryList, 1007 int nId ) 1008 { 1009 ScSelEntryDlg * pDlg=NULL; 1010 switch ( nId ) 1011 { 1012 case RID_SCDLG_SELECTDB : 1013 pDlg = new ScSelEntryDlg( pParent, nResId,aTitle, aLbTitle, aEntryList ); 1014 break; 1015 default: 1016 break; 1017 } 1018 1019 if ( pDlg ) 1020 return new AbstractScSelEntryDlg_Impl( pDlg ); 1021 return 0; 1022 } 1023 // add for ScSelEntryDlg end 1024 1025 //add for ScLinkedAreaDlg begin 1026 AbstractScLinkedAreaDlg * ScAbstractDialogFactory_Impl::CreateScLinkedAreaDlg ( Window* pParent, 1027 int nId) 1028 { 1029 ScLinkedAreaDlg * pDlg=NULL; 1030 switch ( nId ) 1031 { 1032 case RID_SCDLG_LINKAREA : 1033 pDlg = new ScLinkedAreaDlg( pParent ); 1034 break; 1035 default: 1036 break; 1037 } 1038 1039 if ( pDlg ) 1040 return new AbstractScLinkedAreaDlg_Impl( pDlg ); 1041 return 0; 1042 } 1043 //add for ScLinkedAreaDlg end 1044 1045 //add for ScMetricInputDlg begin 1046 AbstractScMetricInputDlg * ScAbstractDialogFactory_Impl::CreateScMetricInputDlg ( Window* pParent, 1047 sal_uInt16 nResId, // Ableitung fuer jeden Dialog! 1048 long nCurrent, 1049 long nDefault, 1050 int nId , 1051 FieldUnit eFUnit, 1052 sal_uInt16 nDecimals, 1053 long nMaximum , 1054 long nMinimum, 1055 long nFirst, 1056 long nLast ) 1057 { 1058 ScMetricInputDlg * pDlg=NULL; 1059 switch ( nId ) 1060 { 1061 case RID_SCDLG_ROW_MAN : 1062 case RID_SCDLG_ROW_OPT : 1063 case RID_SCDLG_COL_MAN : 1064 case RID_SCDLG_COL_OPT : 1065 pDlg = new ScMetricInputDlg( pParent , nResId,nCurrent ,nDefault, eFUnit, 1066 nDecimals, nMaximum , nMinimum , nFirst, nLast); 1067 break; 1068 default: 1069 break; 1070 } 1071 1072 if ( pDlg ) 1073 return new AbstractScMetricInputDlg_Impl( pDlg ); 1074 return 0; 1075 } 1076 //add for ScMetricInputDlg end 1077 1078 1079 //add for ScMoveTableDlg begin 1080 AbstractScMoveTableDlg * ScAbstractDialogFactory_Impl::CreateScMoveTableDlg( Window* pParent, int nId ) 1081 { 1082 ScMoveTableDlg * pDlg=NULL; 1083 switch ( nId ) 1084 { 1085 case RID_SCDLG_MOVETAB : 1086 pDlg = new ScMoveTableDlg( pParent ); 1087 break; 1088 default: 1089 break; 1090 } 1091 1092 if ( pDlg ) 1093 return new AbstractScMoveTableDlg_Impl( pDlg ); 1094 return 0; 1095 } 1096 //add for ScMoveTableDlg end 1097 1098 1099 //add for ScNameCreateDlg begin 1100 AbstractScNameCreateDlg * ScAbstractDialogFactory_Impl::CreateScNameCreateDlg ( Window * pParent, sal_uInt16 nFlags, int nId ) 1101 { 1102 ScNameCreateDlg * pDlg=NULL; 1103 switch ( nId ) 1104 { 1105 case RID_SCDLG_NAMES_CREATE : 1106 pDlg = new ScNameCreateDlg( pParent, nFlags ); 1107 break; 1108 default: 1109 break; 1110 } 1111 1112 if ( pDlg ) 1113 return new AbstractScNameCreateDlg_Impl( pDlg ); 1114 return 0; 1115 } 1116 //add for ScNameCreateDlg end 1117 1118 1119 //add for ScNamePasteDlg begin 1120 AbstractScNamePasteDlg * ScAbstractDialogFactory_Impl::CreateScNamePasteDlg ( Window * pParent, const ScRangeName* pList, 1121 int nId , sal_Bool bInsList ) 1122 { 1123 ScNamePasteDlg * pDlg=NULL; 1124 switch ( nId ) 1125 { 1126 case RID_SCDLG_NAMES_PASTE : 1127 pDlg = new ScNamePasteDlg( pParent, pList, bInsList ); 1128 break; 1129 default: 1130 break; 1131 } 1132 1133 if ( pDlg ) 1134 return new AbstractScNamePasteDlg_Impl( pDlg ); 1135 return 0; 1136 } 1137 //add for ScNamePasteDlg end 1138 1139 //add for ScPivotFilterDlg begin 1140 AbstractScPivotFilterDlg * ScAbstractDialogFactory_Impl::CreateScPivotFilterDlg ( Window* pParent, 1141 const SfxItemSet& rArgSet, sal_uInt16 nSourceTab , int nId ) 1142 { 1143 ScPivotFilterDlg * pDlg=NULL; 1144 switch ( nId ) 1145 { 1146 case RID_SCDLG_PIVOTFILTER : 1147 pDlg = new ScPivotFilterDlg( pParent, rArgSet, nSourceTab ); 1148 break; 1149 default: 1150 break; 1151 } 1152 1153 if ( pDlg ) 1154 return new AbstractScPivotFilterDlg_Impl( pDlg ); 1155 return 0; 1156 } 1157 //add for ScPivotFilterDlg end 1158 1159 1160 //add for ScDPFunctionDlg begin 1161 AbstractScDPFunctionDlg * ScAbstractDialogFactory_Impl::CreateScDPFunctionDlg ( Window* pParent, 1162 int nId, 1163 const ScDPLabelDataVector& rLabelVec, 1164 const ScDPLabelData& rLabelData, 1165 const ScPivotFuncData& rFuncData ) 1166 { 1167 ScDPFunctionDlg * pDlg=NULL; 1168 switch ( nId ) 1169 { 1170 case RID_SCDLG_DPDATAFIELD : 1171 pDlg = new ScDPFunctionDlg( pParent, rLabelVec, rLabelData, rFuncData ); 1172 break; 1173 default: 1174 break; 1175 } 1176 1177 if ( pDlg ) 1178 return new AbstractScDPFunctionDlg_Impl( pDlg ); 1179 return 0; 1180 } 1181 //add for ScDPFunctionDlg end 1182 1183 //add for ScDPSubtotalDlg begin 1184 AbstractScDPSubtotalDlg * ScAbstractDialogFactory_Impl::CreateScDPSubtotalDlg ( Window* pParent, 1185 int nId, 1186 ScDPObject& rDPObj, 1187 const ScDPLabelData& rLabelData, 1188 const ScPivotFuncData& rFuncData, 1189 const ScDPNameVec& rDataFields, 1190 bool bEnableLayout ) 1191 { 1192 ScDPSubtotalDlg * pDlg=NULL; 1193 switch ( nId ) 1194 { 1195 case RID_SCDLG_PIVOTSUBT : 1196 pDlg = new ScDPSubtotalDlg( pParent, rDPObj, rLabelData, rFuncData, rDataFields, bEnableLayout ); 1197 break; 1198 default: 1199 break; 1200 } 1201 1202 if ( pDlg ) 1203 return new AbstractScDPSubtotalDlg_Impl( pDlg ); 1204 return 0; 1205 } 1206 //add for ScDPSubtotalDlg end 1207 1208 AbstractScDPNumGroupDlg * ScAbstractDialogFactory_Impl::CreateScDPNumGroupDlg( 1209 Window* pParent, int nId, const ScDPNumGroupInfo& rInfo ) 1210 { 1211 if( nId == RID_SCDLG_DPNUMGROUP ) 1212 return new AbstractScDPNumGroupDlg_Impl( new ScDPNumGroupDlg( pParent, rInfo ) ); 1213 return 0; 1214 } 1215 1216 AbstractScDPDateGroupDlg * ScAbstractDialogFactory_Impl::CreateScDPDateGroupDlg( 1217 Window* pParent, int nId, 1218 const ScDPNumGroupInfo& rInfo, sal_Int32 nDatePart, const Date& rNullDate ) 1219 { 1220 if( nId == RID_SCDLG_DPDATEGROUP ) 1221 return new AbstractScDPDateGroupDlg_Impl( new ScDPDateGroupDlg( pParent, rInfo, nDatePart, rNullDate ) ); 1222 return 0; 1223 } 1224 1225 //add for ScDPShowDetailDlg begin 1226 AbstractScDPShowDetailDlg * ScAbstractDialogFactory_Impl::CreateScDPShowDetailDlg ( 1227 Window* pParent, int nId, ScDPObject& rDPObj, sal_uInt16 nOrient ) 1228 { 1229 if( nId == RID_SCDLG_DPSHOWDETAIL ) 1230 return new AbstractScDPShowDetailDlg_Impl( new ScDPShowDetailDlg( pParent, rDPObj, nOrient ) ); 1231 return 0; 1232 } 1233 //add for ScDPShowDetailDlg end 1234 1235 //add for ScNewScenarioDlg begin 1236 AbstractScNewScenarioDlg * ScAbstractDialogFactory_Impl::CreateScNewScenarioDlg ( Window* pParent, const String& rName, 1237 int nId, 1238 sal_Bool bEdit , sal_Bool bSheetProtected ) 1239 { 1240 ScNewScenarioDlg * pDlg=NULL; 1241 switch ( nId ) 1242 { 1243 case RID_SCDLG_NEWSCENARIO : 1244 pDlg = new ScNewScenarioDlg( pParent, rName, bEdit,bSheetProtected ); 1245 break; 1246 default: 1247 break; 1248 } 1249 1250 if ( pDlg ) 1251 return new AbstractScNewScenarioDlg_Impl( pDlg ); 1252 return 0; 1253 } 1254 //add for ScNewScenarioDlg end 1255 1256 //add for ScShowTabDlg begin 1257 AbstractScShowTabDlg * ScAbstractDialogFactory_Impl::CreateScShowTabDlg ( Window* pParent, int nId ) 1258 { 1259 ScShowTabDlg * pDlg=NULL; 1260 switch ( nId ) 1261 { 1262 case RID_SCDLG_SHOW_TAB : 1263 pDlg = new ScShowTabDlg( pParent); 1264 break; 1265 default: 1266 break; 1267 } 1268 1269 if ( pDlg ) 1270 return new AbstractScShowTabDlg_Impl( pDlg ); 1271 return 0; 1272 } 1273 1274 //add for ScShowTabDlg end 1275 1276 1277 //add for ScStringInputDlg begin 1278 AbstractScStringInputDlg * ScAbstractDialogFactory_Impl::CreateScStringInputDlg ( Window* pParent, 1279 const String& rTitle, 1280 const String& rEditTitle, 1281 const String& rDefault, 1282 const rtl::OString& sHelpId, const rtl::OString& sEditHelpId, 1283 int nId ) 1284 { 1285 ScStringInputDlg * pDlg=NULL; 1286 switch ( nId ) 1287 { 1288 case RID_SCDLG_STRINPUT : 1289 pDlg = new ScStringInputDlg( pParent, rTitle, rEditTitle, rDefault, sHelpId, sEditHelpId ); 1290 break; 1291 default: 1292 break; 1293 } 1294 1295 if ( pDlg ) 1296 return new AbstractScStringInputDlg_Impl( pDlg ); 1297 return 0; 1298 } 1299 //add for ScStringInputDlg end 1300 1301 //add for ScTabBgColorDlg begin 1302 AbstractScTabBgColorDlg * ScAbstractDialogFactory_Impl::CreateScTabBgColorDlg ( 1303 Window* pParent, 1304 const String& rTitle, 1305 const String& rTabBgColorNoColorText, 1306 const Color& rDefaultColor, 1307 const rtl::OString& sHelpId , 1308 int nId ) 1309 { 1310 ScTabBgColorDlg * pDlg=NULL; 1311 switch ( nId ) 1312 { 1313 case RID_SCDLG_TAB_BG_COLOR : 1314 pDlg = new ScTabBgColorDlg( pParent, rTitle, rTabBgColorNoColorText, rDefaultColor, sHelpId ); 1315 break; 1316 default: 1317 break; 1318 } 1319 1320 if ( pDlg ) 1321 return new AbstractScTabBgColorDlg_Impl( pDlg ); 1322 return 0; 1323 } 1324 //add for ScTabBgColorDlg end 1325 1326 //add for ScImportOptionsDlg begin 1327 AbstractScImportOptionsDlg * ScAbstractDialogFactory_Impl::CreateScImportOptionsDlg ( Window* pParent, 1328 int nId, 1329 sal_Bool bAscii, 1330 const ScImportOptions* pOptions, 1331 const String* pStrTitle, 1332 sal_Bool bMultiByte, 1333 sal_Bool bOnlyDbtoolsEncodings, 1334 sal_Bool bImport ) 1335 { 1336 ScImportOptionsDlg * pDlg=NULL; 1337 switch ( nId ) 1338 { 1339 case RID_SCDLG_IMPORTOPT : 1340 pDlg = new ScImportOptionsDlg( pParent, bAscii, pOptions,pStrTitle, bMultiByte,bOnlyDbtoolsEncodings, bImport ); 1341 break; 1342 default: 1343 break; 1344 } 1345 1346 if ( pDlg ) 1347 return new AbstractScImportOptionsDlg_Impl( pDlg ); 1348 return 0; 1349 } 1350 //add for ScImportOptionsDlg end 1351 1352 #if ENABLE_LAYOUT && !LAYOUT_SFX_TABDIALOG_BROKEN 1353 #define SfxTabDialog layout::SfxTabDialog 1354 #define AbstractTabDialog_Impl layout::AbstractTabDialog_Impl 1355 #endif /* ENABLE_LAYOUT */ 1356 //add for ScAttrDlg begin 1357 SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScAttrDlg( SfxViewFrame* pFrame, 1358 Window* pParent, 1359 const SfxItemSet* pCellAttrs, 1360 int nId) 1361 { 1362 SfxTabDialog* pDlg=NULL; 1363 switch ( nId ) 1364 { 1365 case RID_SCDLG_ATTR : 1366 pDlg = new ScAttrDlg( pFrame, pParent, pCellAttrs ); 1367 break; 1368 default: 1369 break; 1370 } 1371 1372 if ( pDlg ) 1373 return new AbstractTabDialog_Impl( pDlg ); 1374 return 0; 1375 1376 } 1377 //add for ScAttrDlg end 1378 #undef SfxTabDialog 1379 #undef AbstractTabDialog_Impl 1380 1381 //add for ScHFEditDlg begin 1382 SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScHFEditDlg( SfxViewFrame* pFrame, 1383 Window* pParent, 1384 const SfxItemSet& rCoreSet, 1385 const String& rPageStyle, 1386 int nId, 1387 sal_uInt16 nResId ) 1388 { 1389 SfxTabDialog* pDlg=NULL; 1390 switch ( nId ) 1391 { 1392 case RID_SCDLG_HFEDIT : 1393 pDlg = new ScHFEditDlg( pFrame, pParent, rCoreSet,rPageStyle, nResId ); 1394 break; 1395 default: 1396 break; 1397 } 1398 1399 if ( pDlg ) 1400 return new AbstractTabDialog_Impl( pDlg ); 1401 return 0; 1402 } 1403 //add for ScHFEditDlg end 1404 1405 //add for ScStyleDlg begin 1406 SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScStyleDlg( Window* pParent, 1407 SfxStyleSheetBase& rStyleBase, 1408 sal_uInt16 nRscId, 1409 int nId) 1410 { 1411 SfxTabDialog* pDlg=NULL; 1412 switch ( nId ) 1413 { 1414 case RID_SCDLG_STYLES_PAGE : 1415 case RID_SCDLG_STYLES_PAR : 1416 pDlg = new ScStyleDlg( pParent, rStyleBase, nRscId ); 1417 break; 1418 default: 1419 break; 1420 } 1421 1422 if ( pDlg ) 1423 return new AbstractTabDialog_Impl( pDlg ); 1424 return 0; 1425 } 1426 //add for ScStyleDlg end 1427 1428 //add for ScSubTotalDlg begin 1429 SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScSubTotalDlg( Window* pParent, 1430 const SfxItemSet* pArgSet, 1431 int nId) 1432 { 1433 SfxTabDialog* pDlg=NULL; 1434 switch ( nId ) 1435 { 1436 case RID_SCDLG_SUBTOTALS : 1437 pDlg = new ScSubTotalDlg( pParent, pArgSet ); 1438 break; 1439 default: 1440 break; 1441 } 1442 1443 if ( pDlg ) 1444 return new AbstractTabDialog_Impl( pDlg ); 1445 return 0; 1446 } 1447 //add for ScSubTotalDlg end 1448 1449 //add for ScCharDlg begin 1450 SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScCharDlg( Window* pParent, const SfxItemSet* pAttr, 1451 const SfxObjectShell* pDocShell, int nId ) 1452 { 1453 SfxTabDialog* pDlg=NULL; 1454 switch ( nId ) 1455 { 1456 case RID_SCDLG_CHAR : 1457 pDlg = new ScCharDlg( pParent, pAttr, pDocShell ); 1458 break; 1459 default: 1460 break; 1461 } 1462 1463 if ( pDlg ) 1464 return new AbstractTabDialog_Impl( pDlg ); 1465 return 0; 1466 } 1467 //add for ScCharDlg end 1468 1469 //add for ScParagraphDlg begin 1470 SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScParagraphDlg( Window* pParent, const SfxItemSet* pAttr , 1471 int nId ) 1472 { 1473 SfxTabDialog* pDlg=NULL; 1474 switch ( nId ) 1475 { 1476 case RID_SCDLG_PARAGRAPH : 1477 pDlg = new ScParagraphDlg( pParent, pAttr ); 1478 break; 1479 default: 1480 break; 1481 } 1482 1483 if ( pDlg ) 1484 return new AbstractTabDialog_Impl( pDlg ); 1485 return 0; 1486 } 1487 //add for ScParagraphDlg end 1488 1489 //add for ScValidationDlg begin 1490 SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScValidationDlg( Window* pParent, 1491 //<!--Modified by PengYunQuan for Validity Cell Range Picker 1492 // const SfxItemSet* pArgSet,int nId ) 1493 const SfxItemSet* pArgSet,int nId, ScTabViewShell *pTabVwSh ) 1494 //-->Modified by PengYunQuan for Validity Cell Range Picke 1495 { 1496 SfxTabDialog* pDlg=NULL; 1497 switch ( nId ) 1498 { 1499 case TAB_DLG_VALIDATION : 1500 //<!--Modified by PengYunQuan for Validity Cell Range Picker 1501 //pDlg = new ScValidationDlg( pParent, pArgSet ); 1502 pDlg = new ScValidationDlg( pParent, pArgSet, pTabVwSh ); 1503 //-->Modified by PengYunQuan for Validity Cell Range Picker 1504 break; 1505 default: 1506 break; 1507 } 1508 1509 if ( pDlg ) 1510 return new AbstractTabDialog_Impl( pDlg ); 1511 return 0; 1512 } 1513 //add for ScValidationDlg end 1514 1515 #if ENABLE_LAYOUT && !LAYOUT_SFX_TABDIALOG_BROKEN 1516 #define SfxTabDialog layout::SfxTabDialog 1517 #define AbstractTabDialog_Impl layout::AbstractTabDialog_Impl 1518 #endif /* ENABLE_LAYOUT */ 1519 //add for ScSortDlg begin 1520 SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScSortDlg( Window* pParent, 1521 const SfxItemSet* pArgSet,int nId ) 1522 { 1523 SfxTabDialog* pDlg=NULL; 1524 switch ( nId ) 1525 { 1526 case RID_SCDLG_SORT : 1527 pDlg = new ScSortDlg( pParent, pArgSet ); 1528 break; 1529 default: 1530 break; 1531 } 1532 1533 if ( pDlg ) 1534 return new AbstractTabDialog_Impl( pDlg ); 1535 return 0; 1536 } 1537 #undef SfxTabDialog 1538 #undef AbstractTabDialog_Impl 1539 1540 //add for ScSortDlg end 1541 //------------------ Factories for TabPages-------------------- 1542 CreateTabPage ScAbstractDialogFactory_Impl::GetTabPageCreatorFunc( sal_uInt16 nId ) 1543 { 1544 switch ( nId ) 1545 { 1546 case RID_SCPAGE_OPREDLINE : 1547 return ScRedlineOptionsTabPage::Create; 1548 //break; 1549 case RID_SCPAGE_CALC : 1550 return ScTpCalcOptions::Create; 1551 //break; 1552 case RID_SCPAGE_PRINT : 1553 return ScTpPrintOptions::Create; 1554 //break; 1555 case RID_SCPAGE_STAT : 1556 return ScDocStatPage::Create; 1557 //break; 1558 case RID_SCPAGE_USERLISTS : 1559 return ScTpUserLists::Create; 1560 //break; 1561 case RID_SCPAGE_CONTENT : 1562 return ScTpContentOptions::Create; 1563 //break; 1564 case RID_SCPAGE_LAYOUT : 1565 return ScTpLayoutOptions::Create; 1566 //break; 1567 1568 default: 1569 break; 1570 } 1571 1572 return 0; 1573 } 1574 1575 GetTabPageRanges ScAbstractDialogFactory_Impl::GetTabPageRangesFunc( sal_uInt16 nId ) 1576 { 1577 switch ( nId ) 1578 { 1579 case TP_VALIDATION_VALUES : 1580 return ScTPValidationValue::GetRanges; 1581 //break; 1582 default: 1583 break; 1584 } 1585 1586 return 0; 1587 } 1588 1589 void ScDPFunctionDlg_Dummy() 1590 { 1591 // use ScDPListBoxWrapper to avoid warning (this isn't called) 1592 ListBox* pListBox = NULL; 1593 ScDPListBoxWrapper aWrapper( *pListBox ); 1594 } 1595