1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 // MARKER(update_precomp.py): autogen include statement, do not remove 29 #include "precompiled_cui.hxx" 30 31 #include "align.hxx" //add for SvxAlignmentTabPage 32 #include "dlgfact.hxx" 33 34 #include <tools/rc.hxx> 35 #include <sfx2/basedlgs.hxx> 36 #include <sfx2/app.hxx> 37 #include <sfx2/request.hxx> 38 #include <cuires.hrc> 39 #include <svx/dialogs.hrc> 40 #include "numfmt.hxx" 41 #include "optimprove.hxx" 42 #include "splitcelldlg.hxx" 43 #include "gallery.hrc" 44 #include "dstribut.hxx" 45 #include "cuigaldlg.hxx" 46 #include "cuiimapwnd.hxx" 47 #include "hlmarkwn.hxx" 48 #include "cuicharmap.hxx" 49 #include "srchxtra.hxx" 50 #include "textanim.hxx" 51 #include "autocdlg.hxx" 52 #include "treeopt.hxx" 53 #include "internationaloptions.hxx" 54 #include "labdlg.hxx" 55 #include "hangulhanjadlg.hxx" //add for HangulHanjaConversionDialog 56 #include "showcols.hxx" //add for FmShowColsDialog 57 #include "zoom.hxx" //add for SvxZoomDialog 58 #include "cuigaldlg.hxx" //add for Gallery 6 Dialogs and 1 TabPage 59 #include "cuiimapwnd.hxx" //add for URLDlg 60 #include "hlmarkwn.hxx" //add for SvxHlinkDlgMarkWnd 61 #include "srchxtra.hxx" //add for SvxSearchFormatDialog 62 #include "transfrm.hxx" //add for SvxTransformTabDialog 63 #include "bbdlg.hxx" //add for SvxBorderBackgroundDlg 64 #include "cuisrchdlg.hxx" //add for SvxJSearchOptionsDialog 65 #include "cuitbxform.hxx" //add for FmInputRecordNoDialog 66 #include "optdict.hxx" //add for SvxNewDictionaryDialog 67 #include "dlgname.hxx" //add for SvxNameDialog & SvxMessDialog 68 #include "multipat.hxx" //add for SvxMultiPathDialog 69 #include "multifil.hxx" //add for SvxMultiFileDialog 70 #include "cuihyperdlg.hxx" //add for SvxHpLinkDlg 71 #include "cuifmsearch.hxx" //add for FmSearchDialog 72 #include "cuigrfflt.hxx" //add for GraphicFilterDialog 73 #include "cuitabarea.hxx" //add for SvxAreaTabDialog 74 #include "cuitabline.hxx" //add for SvxLineTabDialog 75 #include "measure.hxx" //add for SvxMeasureDialog 76 #include "connect.hxx" //add for SvxConnectionDialog 77 #include "dbregister.hxx" // add for DatabaseRegistrationDialog 78 #include "cuioptgenrl.hxx" //add for SvxGeneralTabPage 79 #include "optasian.hxx" 80 #include "insdlg.hxx" 81 #include "pastedlg.hxx" 82 #include "linkdlg.hxx" 83 #include "SpellDialog.hxx" 84 #include "cfg.hxx" //add for SvxConfigDialog 85 #include "numpages.hxx" // add for 86 #include "paragrph.hxx" //add for 87 #include "tabstpge.hxx" // add for 88 #include "textattr.hxx" // add for SvxTextAttrPage 89 #include "backgrnd.hxx" //add for SvxBackgroundTabPage 90 #include "border.hxx" //add for SvxBorderTabPage 91 #include "chardlg.hxx" //add for SvxCharNamePage,SvxCharEffectsPage,SvxCharPositionPage,SvxCharTwoLinesPage 92 #include "page.hxx" //add for SvxPageDescPage 93 #include "postdlg.hxx" //add for SvxPostItDialog 94 #include "grfpage.hxx" //add for SvxGrfCropPage 95 #include "scriptdlg.hxx" // for ScriptOrgDialog 96 #include "selector.hxx" // for SvxScriptSelectorDialog 97 #include "macropg.hxx" // for SvxMacroAssignDlg 98 #include "sdrcelldlg.hxx" 99 #include "newtabledlg.hxx" 100 #include "macroass.hxx" 101 #include "acccfg.hxx" 102 #include "insrc.hxx" 103 #include "passwdomdlg.hxx" 104 #include "hyphen.hxx" 105 #include "thesdlg.hxx" 106 #include "about.hxx" 107 #include "dialmgr.hxx" 108 109 using namespace ::com::sun::star; 110 using namespace ::com::sun::star::frame; 111 using namespace ::com::sun::star::container; 112 113 using ::com::sun::star::uno::Reference; 114 115 using namespace svx; 116 // AbstractTabDialog implementations just forwards everything to the dialog 117 IMPL_ABSTDLG_BASE(AbstractSfxDialog_Impl) 118 IMPL_ABSTDLG_BASE(VclAbstractDialog_Impl) 119 IMPL_ABSTDLG_BASE(VclAbstractRefreshableDialog_Impl); 120 IMPL_ABSTDLG_BASE(AbstractTabDialog_Impl); 121 IMPL_ABSTDLG_BASE(AbstractSvxDistributeDialog_Impl); 122 IMPL_ABSTDLG_BASE(AbstractHangulHanjaConversionDialog_Impl); 123 IMPL_ABSTDLG_BASE(AbstractFmShowColsDialog_Impl); 124 IMPL_ABSTDLG_BASE(AbstractHyphenWordDialog_Impl) 125 IMPL_ABSTDLG_BASE(AbstractThesaurusDialog_Impl) 126 127 AbstractSvxZoomDialog_Impl::~AbstractSvxZoomDialog_Impl() \ 128 { 129 delete pDlg; 130 } 131 short AbstractSvxZoomDialog_Impl::Execute() 132 { 133 return pDlg->Execute(); 134 } 135 136 //IMPL_ABSTDLG_BASE(AbstractSvxZoomDialog_Impl); 137 IMPL_ABSTDLG_BASE(AbstractSearchProgress_Impl); 138 IMPL_ABSTDLG_BASE(AbstractTakeProgress_Impl); 139 IMPL_ABSTDLG_BASE(AbstractTitleDialog_Impl); 140 IMPL_ABSTDLG_BASE(AbstractScriptSelectorDialog_Impl); 141 IMPL_ABSTDLG_BASE(AbstractGalleryIdDialog_Impl); 142 IMPL_ABSTDLG_BASE(AbstractURLDlg_Impl); 143 IMPL_ABSTDLG_BASE(AbstractSvxHlinkDlgMarkWnd_Impl); 144 IMPL_ABSTDLG_BASE(AbstractSvxSearchSimilarityDialog_Impl); 145 IMPL_ABSTDLG_BASE(AbstractSvxTransformTabDialog_Impl); 146 IMPL_ABSTDLG_BASE(AbstractSvxCaptionDialog_Impl); 147 IMPL_ABSTDLG_BASE(AbstractSvxJSearchOptionsDialog_Impl); 148 IMPL_ABSTDLG_BASE(AbstractFmInputRecordNoDialog_Impl); 149 IMPL_ABSTDLG_BASE(AbstractSvxNewDictionaryDialog_Impl); 150 IMPL_ABSTDLG_BASE(AbstractSvxNameDialog_Impl); 151 152 // #i68101# 153 IMPL_ABSTDLG_BASE(AbstractSvxObjectNameDialog_Impl); 154 IMPL_ABSTDLG_BASE(AbstractSvxObjectTitleDescDialog_Impl); 155 156 IMPL_ABSTDLG_BASE(AbstractSvxMessDialog_Impl); 157 IMPL_ABSTDLG_BASE(AbstractSvxMultiPathDialog_Impl); 158 IMPL_ABSTDLG_BASE(AbstractSvxMultiFileDialog_Impl); 159 IMPL_ABSTDLG_BASE(AbstractSvxHpLinkDlg_Impl); 160 IMPL_ABSTDLG_BASE(AbstractFmSearchDialog_Impl); 161 IMPL_ABSTDLG_BASE(AbstractGraphicFilterDialog_Impl); 162 IMPL_ABSTDLG_BASE(AbstractSvxAreaTabDialog_Impl); 163 IMPL_ABSTDLG_BASE(AbstractPasteDialog_Impl); 164 IMPL_ABSTDLG_BASE(AbstractInsertObjectDialog_Impl); 165 IMPL_ABSTDLG_BASE(AbstractLinksDialog_Impl); 166 IMPL_ABSTDLG_BASE(AbstractSpellDialog_Impl); 167 IMPL_ABSTDLG_BASE(AbstractSvxPostItDialog_Impl); 168 IMPL_ABSTDLG_BASE(AbstractPasswordToOpenModifyDialog_Impl); 169 170 ////////////////////////////////////////////////////////////////////////// 171 // VclAbstractDialog2_Impl 172 ////////////////////////////////////////////////////////////////////////// 173 174 // virtual 175 VclAbstractDialog2_Impl::~VclAbstractDialog2_Impl() 176 { 177 delete m_pDlg; 178 } 179 180 // virtual 181 void VclAbstractDialog2_Impl::StartExecuteModal( const Link& rEndDialogHdl ) 182 { 183 m_aEndDlgHdl = rEndDialogHdl; 184 m_pDlg->StartExecuteModal( 185 LINK( this, VclAbstractDialog2_Impl, EndDialogHdl ) ); 186 } 187 188 // virtual 189 long VclAbstractDialog2_Impl::GetResult() 190 { 191 return m_pDlg->GetResult(); 192 } 193 194 IMPL_LINK( VclAbstractDialog2_Impl, EndDialogHdl, Dialog*, pDlg ) 195 { 196 if ( pDlg != m_pDlg ) 197 { 198 DBG_ERRORFILE( "VclAbstractDialog2_Impl::EndDialogHdl(): wrong dialog" ); 199 } 200 201 m_aEndDlgHdl.Call( this ); 202 m_aEndDlgHdl = Link(); 203 204 return 0L; 205 } 206 207 ////////////////////////////////////////////////////////////////////////// 208 209 void AbstractTabDialog_Impl::SetCurPageId( sal_uInt16 nId ) 210 { 211 pDlg->SetCurPageId( nId ); 212 } 213 214 const SfxItemSet* AbstractTabDialog_Impl::GetOutputItemSet() const 215 { 216 return pDlg->GetOutputItemSet(); 217 } 218 219 const sal_uInt16* AbstractTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem ) 220 { 221 return pDlg->GetInputRanges( pItem ); 222 } 223 224 void AbstractTabDialog_Impl::SetInputSet( const SfxItemSet* pInSet ) 225 { 226 pDlg->SetInputSet( pInSet ); 227 } 228 //From class Window. 229 void AbstractTabDialog_Impl::SetText( const XubString& rStr ) 230 { 231 pDlg->SetText( rStr ); 232 } 233 String AbstractTabDialog_Impl::GetText() const 234 { 235 return pDlg->GetText(); 236 } 237 238 239 const SfxItemSet* AbstractSfxDialog_Impl::GetOutputItemSet() const 240 { 241 return pDlg->GetOutputItemSet(); 242 } 243 244 void AbstractSfxDialog_Impl::SetText( const XubString& rStr ) 245 { 246 pDlg->SetText( rStr ); 247 } 248 249 String AbstractSfxDialog_Impl::GetText() const 250 { 251 return pDlg->GetText(); 252 } 253 254 SvxDistributeHorizontal AbstractSvxDistributeDialog_Impl::GetDistributeHor()const 255 { 256 return pDlg->GetDistributeHor(); 257 } 258 SvxDistributeVertical AbstractSvxDistributeDialog_Impl::GetDistributeVer()const 259 { 260 return pDlg->GetDistributeVer(); 261 } 262 263 void AbstractHangulHanjaConversionDialog_Impl::EndDialog(long nResult) 264 { 265 pDlg->EndDialog(nResult); 266 } 267 268 void AbstractHangulHanjaConversionDialog_Impl::EnableRubySupport( sal_Bool _bVal ) 269 { 270 pDlg->EnableRubySupport(_bVal); 271 } 272 273 void AbstractHangulHanjaConversionDialog_Impl::SetByCharacter( sal_Bool _bByCharacter ) 274 { 275 pDlg->SetByCharacter(_bByCharacter); 276 } 277 278 void AbstractHangulHanjaConversionDialog_Impl::SetConversionDirectionState( sal_Bool _bTryBothDirections, editeng::HangulHanjaConversion::ConversionDirection _ePrimaryConversionDirection ) 279 { 280 pDlg->SetConversionDirectionState(_bTryBothDirections, _ePrimaryConversionDirection); 281 } 282 283 void AbstractHangulHanjaConversionDialog_Impl::SetConversionFormat( editeng::HangulHanjaConversion::ConversionFormat _eType ) 284 { 285 pDlg->SetConversionFormat(_eType); 286 } 287 288 void AbstractHangulHanjaConversionDialog_Impl::SetOptionsChangedHdl( const Link& _rHdl ) 289 { 290 pDlg->SetOptionsChangedHdl(_rHdl ); 291 } 292 293 void AbstractHangulHanjaConversionDialog_Impl::SetIgnoreHdl( const Link& _rHdl ) 294 { 295 pDlg->SetIgnoreHdl(_rHdl ); 296 } 297 298 void AbstractHangulHanjaConversionDialog_Impl::SetIgnoreAllHdl( const Link& _rHdl ) 299 { 300 pDlg->SetIgnoreAllHdl(_rHdl ); 301 } 302 303 void AbstractHangulHanjaConversionDialog_Impl::SetChangeHdl( const Link& _rHdl ) 304 { 305 pDlg->SetChangeHdl(_rHdl ); 306 } 307 308 void AbstractHangulHanjaConversionDialog_Impl::SetChangeAllHdl( const Link& _rHdl ) 309 { 310 pDlg->SetChangeAllHdl(_rHdl ); 311 } 312 313 void AbstractHangulHanjaConversionDialog_Impl::SetClickByCharacterHdl( const Link& _rHdl ) 314 { 315 pDlg->SetClickByCharacterHdl(_rHdl ); 316 } 317 318 void AbstractHangulHanjaConversionDialog_Impl::SetConversionFormatChangedHdl( const Link& _rHdl ) 319 { 320 pDlg->SetConversionFormatChangedHdl(_rHdl ); 321 } 322 void AbstractHangulHanjaConversionDialog_Impl::SetFindHdl( const Link& _rHdl ) 323 { 324 pDlg->SetFindHdl(_rHdl ); 325 } 326 327 sal_Bool AbstractHangulHanjaConversionDialog_Impl::GetUseBothDirections( ) const 328 { 329 return pDlg->GetUseBothDirections(); 330 } 331 332 editeng::HangulHanjaConversion::ConversionDirection AbstractHangulHanjaConversionDialog_Impl::GetDirection( editeng::HangulHanjaConversion::ConversionDirection _eDefaultDirection ) const 333 { 334 return pDlg->GetDirection( _eDefaultDirection ); 335 } 336 337 void AbstractHangulHanjaConversionDialog_Impl::SetCurrentString( 338 const String& _rNewString, 339 const ::com::sun::star::uno::Sequence< ::rtl::OUString >& _rSuggestions, 340 bool _bOriginatesFromDocument 341 ) 342 { 343 pDlg->SetCurrentString(_rNewString,_rSuggestions,_bOriginatesFromDocument); 344 } 345 String AbstractHangulHanjaConversionDialog_Impl::GetCurrentString( ) const 346 { 347 return pDlg->GetCurrentString(); 348 } 349 editeng::HangulHanjaConversion::ConversionFormat AbstractHangulHanjaConversionDialog_Impl::GetConversionFormat( ) const 350 { 351 return pDlg->GetConversionFormat(); 352 } 353 354 void AbstractHangulHanjaConversionDialog_Impl::FocusSuggestion( ) 355 { 356 pDlg->FocusSuggestion(); 357 } 358 359 String AbstractHangulHanjaConversionDialog_Impl::GetCurrentSuggestion( ) const 360 { 361 return pDlg->GetCurrentSuggestion(); 362 } 363 364 String AbstractThesaurusDialog_Impl::GetWord() 365 { 366 return pDlg->GetWord(); 367 }; 368 369 sal_uInt16 AbstractThesaurusDialog_Impl::GetLanguage() const 370 { 371 return pDlg->GetLanguage(); 372 }; 373 374 Window* AbstractThesaurusDialog_Impl::GetWindow() 375 { 376 return pDlg; 377 } 378 379 void AbstractHyphenWordDialog_Impl::SelLeft() 380 { 381 pDlg->SelLeft(); 382 } 383 384 void AbstractHyphenWordDialog_Impl::SelRight() 385 { 386 pDlg->SelRight(); 387 } 388 389 Window* AbstractHyphenWordDialog_Impl::GetWindow() 390 { 391 return pDlg; 392 } 393 394 Reference < com::sun::star::embed::XEmbeddedObject > AbstractInsertObjectDialog_Impl::GetObject() 395 { 396 return pDlg->GetObject(); 397 } 398 399 sal_Bool AbstractInsertObjectDialog_Impl::IsCreateNew() 400 { 401 return pDlg->IsCreateNew(); 402 } 403 404 ::Reference< ::com::sun::star::io::XInputStream > AbstractInsertObjectDialog_Impl::GetIconIfIconified( ::rtl::OUString* pGraphicMediaType ) 405 { 406 return pDlg->GetIconIfIconified( pGraphicMediaType ); 407 } 408 409 void AbstractPasteDialog_Impl::Insert( SotFormatStringId nFormat, const String & rFormatName ) 410 { 411 pDlg->Insert( nFormat, rFormatName ); 412 } 413 414 void AbstractPasteDialog_Impl::SetObjName( const SvGlobalName & rClass, const String & rObjName ) 415 { 416 pDlg->SetObjName( rClass, rObjName ); 417 } 418 419 sal_uLong AbstractPasteDialog_Impl::GetFormat( const TransferableDataHelper& aHelper, 420 const DataFlavorExVector* pFormats, 421 const TransferableObjectDescriptor* pDesc ) 422 { 423 return pDlg->GetFormat( aHelper, pFormats, pDesc ); 424 } 425 426 void AbstractFmShowColsDialog_Impl::SetColumns(const ::Reference< ::com::sun::star::container::XIndexContainer>& xCols) 427 { 428 pDlg->SetColumns(xCols); 429 } 430 431 void AbstractSvxZoomDialog_Impl::SetLimits( sal_uInt16 nMin, sal_uInt16 nMax ) 432 { 433 pDlg->SetLimits( nMin, nMax ); 434 } 435 436 void AbstractSvxZoomDialog_Impl::HideButton( sal_uInt16 nBtnId ) 437 { 438 pDlg->HideButton( nBtnId ); 439 } 440 441 const SfxItemSet* AbstractSvxZoomDialog_Impl::GetOutputItemSet() const 442 { 443 return pDlg->GetOutputItemSet(); 444 } 445 446 void AbstractSpellDialog_Impl::SetLanguage( sal_uInt16 nLang ) 447 { 448 pDlg->SetLanguage(nLang); 449 } 450 451 sal_Bool AbstractSpellDialog_Impl::Close() 452 { 453 return pDlg->Close(); 454 } 455 456 void AbstractSpellDialog_Impl::Invalidate() 457 { 458 pDlg->InvalidateDialog(); 459 } 460 461 Window* AbstractSpellDialog_Impl::GetWindow() 462 { 463 return pDlg; 464 } 465 466 SfxBindings& AbstractSpellDialog_Impl::GetBindings() 467 { 468 return pDlg->GetBindings(); 469 } 470 471 void AbstractSearchProgress_Impl::Update() 472 { 473 pDlg->Update(); 474 } 475 476 void AbstractSearchProgress_Impl::Sync() 477 { 478 pDlg-> Sync(); 479 } 480 481 void AbstractSearchProgress_Impl::SetFileType( const String& rType ) 482 { 483 pDlg->SetFileType( rType ); 484 } 485 486 void AbstractSearchProgress_Impl::SetDirectory( const INetURLObject& rURL ) 487 { 488 pDlg->SetDirectory( rURL ); 489 } 490 PLinkStub AbstractSearchProgress_Impl::GetLinkStubCleanUpHdl() 491 { 492 return SearchProgress::LinkStubCleanUpHdl; 493 } 494 495 void AbstractTakeProgress_Impl::Update() 496 { 497 pDlg->Update(); 498 } 499 500 void AbstractTakeProgress_Impl::Sync() 501 { 502 pDlg-> Sync(); 503 } 504 505 void AbstractTakeProgress_Impl::SetFile( const INetURLObject& rURL ) 506 { 507 pDlg->SetFile( rURL ); 508 } 509 510 PLinkStub AbstractTakeProgress_Impl::GetLinkStubCleanUpHdl() 511 { 512 return TakeProgress::LinkStubCleanUpHdl; 513 } 514 515 String AbstractTitleDialog_Impl::GetTitle() const 516 { 517 return pDlg->GetTitle(); 518 } 519 520 sal_uLong AbstractGalleryIdDialog_Impl::GetId() const 521 { 522 return pDlg->GetId(); 523 } 524 525 void VclAbstractRefreshableDialog_Impl::Update() 526 { 527 pDlg->Update(); 528 } 529 530 void VclAbstractRefreshableDialog_Impl::Sync() 531 { 532 pDlg-> Sync(); 533 } 534 535 String AbstractURLDlg_Impl::GetURL() const 536 { 537 return pDlg->GetURL(); 538 } 539 540 String AbstractURLDlg_Impl::GetAltText() const 541 { 542 return pDlg->GetAltText(); 543 } 544 545 String AbstractURLDlg_Impl::GetDesc() const 546 { 547 return pDlg->GetDesc(); 548 } 549 550 String AbstractURLDlg_Impl::GetTarget() const 551 { 552 return pDlg->GetTarget(); 553 } 554 555 String AbstractURLDlg_Impl::GetName() const 556 { 557 return pDlg->GetName(); 558 } 559 560 void AbstractSvxHlinkDlgMarkWnd_Impl::Hide( sal_uInt16 nFlags ) 561 { 562 ((Window*)pDlg)->Hide( nFlags ); 563 } 564 565 void AbstractSvxHlinkDlgMarkWnd_Impl::SetSizePixel( const Size& rNewSize ) 566 { 567 pDlg->SetSizePixel( rNewSize ); 568 } 569 570 Size AbstractSvxHlinkDlgMarkWnd_Impl::GetSizePixel() const 571 { 572 return pDlg->GetSizePixel(); 573 } 574 575 sal_Bool AbstractSvxHlinkDlgMarkWnd_Impl::IsVisible( ) const 576 { 577 return (( Window* )pDlg)->IsVisible(); 578 } 579 580 void AbstractSvxHlinkDlgMarkWnd_Impl::Invalidate( sal_uInt16 nFlags ) 581 { 582 (( Window* )pDlg)->Invalidate(nFlags); 583 } 584 585 sal_Bool AbstractSvxHlinkDlgMarkWnd_Impl::MoveTo( Point aNewPos )const 586 { 587 return pDlg->MoveTo(aNewPos); 588 } 589 590 sal_Bool AbstractSvxHlinkDlgMarkWnd_Impl::ConnectToDialog( sal_Bool bDoit )const 591 { 592 return pDlg->ConnectToDialog(bDoit); 593 } 594 595 void AbstractSvxHlinkDlgMarkWnd_Impl::RefreshTree ( String aStrURL ) 596 { 597 pDlg->RefreshTree(aStrURL); 598 } 599 600 void AbstractSvxHlinkDlgMarkWnd_Impl::SelectEntry ( String aStrMark ) 601 { 602 pDlg->SelectEntry(aStrMark); 603 } 604 605 sal_uInt16 AbstractSvxHlinkDlgMarkWnd_Impl::SetError( sal_uInt16 nError) 606 { 607 return pDlg->SetError(nError); 608 } 609 610 sal_uInt16 AbstractSvxSearchSimilarityDialog_Impl::GetOther() 611 { 612 return pDlg->GetOther(); 613 } 614 615 sal_uInt16 AbstractSvxSearchSimilarityDialog_Impl::GetShorter() 616 { 617 return pDlg->GetShorter(); 618 } 619 620 sal_uInt16 AbstractSvxSearchSimilarityDialog_Impl::GetLonger() 621 { 622 return pDlg-> GetLonger(); 623 } 624 625 sal_Bool AbstractSvxSearchSimilarityDialog_Impl::IsRelaxed() 626 { 627 return pDlg-> IsRelaxed(); 628 } 629 630 // AbstractSvxTransformTabDialog implementations just forwards everything to the dialog 631 void AbstractSvxTransformTabDialog_Impl::SetCurPageId( sal_uInt16 nId ) 632 { 633 pDlg->SetCurPageId( nId ); 634 } 635 const SfxItemSet* AbstractSvxTransformTabDialog_Impl::GetOutputItemSet() const 636 { 637 return pDlg->GetOutputItemSet(); 638 } 639 // 640 const sal_uInt16* AbstractSvxTransformTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem ) 641 { 642 return pDlg->GetInputRanges( pItem ); 643 } 644 // 645 void AbstractSvxTransformTabDialog_Impl::SetInputSet( const SfxItemSet* pInSet ) 646 { 647 pDlg->SetInputSet( pInSet ); 648 } 649 //From class Window. 650 void AbstractSvxTransformTabDialog_Impl::SetText( const XubString& rStr ) 651 { 652 pDlg->SetText( rStr ); 653 } 654 String AbstractSvxTransformTabDialog_Impl::GetText() const 655 { 656 return pDlg->GetText(); 657 } 658 void AbstractSvxTransformTabDialog_Impl::SetValidateFramePosLink( const Link& rLink ) 659 { 660 pDlg->SetValidateFramePosLink( rLink ); 661 } 662 663 // AbstractSvxCaptionDialog implementations just forwards everything to the dialog 664 void AbstractSvxCaptionDialog_Impl::SetCurPageId( sal_uInt16 nId ) 665 { 666 pDlg->SetCurPageId( nId ); 667 } 668 const SfxItemSet* AbstractSvxCaptionDialog_Impl::GetOutputItemSet() const 669 { 670 return pDlg->GetOutputItemSet(); 671 } 672 // 673 const sal_uInt16* AbstractSvxCaptionDialog_Impl::GetInputRanges(const SfxItemPool& pItem ) 674 { 675 return pDlg->GetInputRanges( pItem ); 676 } 677 // 678 void AbstractSvxCaptionDialog_Impl::SetInputSet( const SfxItemSet* pInSet ) 679 { 680 pDlg->SetInputSet( pInSet ); 681 } 682 //From class Window. 683 void AbstractSvxCaptionDialog_Impl::SetText( const XubString& rStr ) 684 { 685 pDlg->SetText( rStr ); 686 } 687 String AbstractSvxCaptionDialog_Impl::GetText() const 688 { 689 return pDlg->GetText(); 690 } 691 void AbstractSvxCaptionDialog_Impl::SetValidateFramePosLink( const Link& rLink ) 692 { 693 pDlg->SetValidateFramePosLink( rLink ); 694 } 695 696 sal_Int32 AbstractSvxJSearchOptionsDialog_Impl::GetTransliterationFlags() const 697 { 698 return pDlg->GetTransliterationFlags(); 699 } 700 701 void AbstractFmInputRecordNoDialog_Impl::SetValue(long nNew) 702 { 703 pDlg->SetValue(nNew); 704 } 705 706 long AbstractFmInputRecordNoDialog_Impl::GetValue() const 707 { 708 return pDlg->GetValue(); 709 } 710 711 ::Reference< 712 ::com::sun::star::linguistic2::XDictionary > AbstractSvxNewDictionaryDialog_Impl::GetNewDictionary() 713 { 714 return pDlg->GetNewDictionary(); 715 } 716 717 void AbstractSvxNameDialog_Impl::GetName( String& rName ) 718 { 719 pDlg->GetName( rName ); 720 } 721 722 void AbstractSvxNameDialog_Impl::SetCheckNameHdl( const Link& rLink, bool bCheckImmediately ) 723 { 724 aCheckNameHdl = rLink; 725 if( rLink.IsSet() ) 726 pDlg->SetCheckNameHdl( LINK(this, AbstractSvxNameDialog_Impl, CheckNameHdl), bCheckImmediately ); 727 else 728 pDlg->SetCheckNameHdl( Link(), bCheckImmediately ); 729 } 730 void AbstractSvxNameDialog_Impl::SetEditHelpId(const rtl::OString& aHelpId) 731 { 732 pDlg->SetEditHelpId( aHelpId ); 733 } 734 void AbstractSvxNameDialog_Impl::SetHelpId( const rtl::OString& aHelpId ) 735 { 736 pDlg->SetHelpId( aHelpId ); 737 } 738 void AbstractSvxNameDialog_Impl::SetText( const XubString& rStr ) 739 { 740 pDlg->SetText( rStr ); 741 } 742 IMPL_LINK( AbstractSvxNameDialog_Impl, CheckNameHdl, Window*, EMPTYARG ) 743 { 744 if( aCheckNameHdl.IsSet() ) 745 return aCheckNameHdl.Call(this); 746 return 0; 747 } 748 749 void AbstractSvxObjectNameDialog_Impl::GetName(String& rName) 750 { 751 pDlg->GetName(rName); 752 } 753 754 void AbstractSvxObjectNameDialog_Impl::SetCheckNameHdl(const Link& rLink, bool bCheckImmediately) 755 { 756 aCheckNameHdl = rLink; 757 758 if(rLink.IsSet()) 759 { 760 pDlg->SetCheckNameHdl(LINK(this, AbstractSvxObjectNameDialog_Impl, CheckNameHdl), bCheckImmediately); 761 } 762 else 763 { 764 pDlg->SetCheckNameHdl(Link(), bCheckImmediately); 765 } 766 } 767 768 IMPL_LINK(AbstractSvxObjectNameDialog_Impl, CheckNameHdl, Window*, EMPTYARG) 769 { 770 if(aCheckNameHdl.IsSet()) 771 { 772 return aCheckNameHdl.Call(this); 773 } 774 775 return 0; 776 } 777 778 void AbstractSvxObjectTitleDescDialog_Impl::GetTitle(String& rTitle) 779 { 780 pDlg->GetTitle(rTitle); 781 } 782 783 void AbstractSvxObjectTitleDescDialog_Impl::GetDescription(String& rDescription) 784 { 785 pDlg->GetDescription(rDescription); 786 } 787 788 void AbstractSvxMessDialog_Impl::SetButtonText( sal_uInt16 nBtnId, const String& rNewTxt ) 789 { 790 pDlg->SetButtonText( nBtnId, rNewTxt ); 791 } 792 793 String AbstractSvxMultiPathDialog_Impl::GetPath() const 794 { 795 return pDlg->GetPath(); 796 } 797 798 void AbstractSvxMultiPathDialog_Impl::SetPath( const String& rPath ) 799 { 800 pDlg->SetPath( rPath ); 801 } 802 803 void AbstractSvxMultiPathDialog_Impl::EnableRadioButtonMode() 804 { 805 pDlg->EnableRadioButtonMode(); 806 } 807 808 void AbstractSvxMultiPathDialog_Impl::SetTitle( const String& rNewTitle ) 809 { 810 pDlg->SetText( rNewTitle ); 811 } 812 813 String AbstractSvxMultiFileDialog_Impl::GetPath() const 814 { 815 return pDlg->GetPath(); 816 } 817 818 void AbstractSvxMultiFileDialog_Impl::SetPath( const String& rPath ) 819 { 820 pDlg->SetPath( rPath ); 821 } 822 823 String AbstractSvxMultiFileDialog_Impl::GetFiles() const 824 { 825 return pDlg->GetFiles(); 826 } 827 828 void AbstractSvxMultiFileDialog_Impl::SetFiles( const String& rPath ) 829 { 830 pDlg->SetFiles( rPath ); 831 } 832 833 void AbstractSvxMultiFileDialog_Impl::SetClassPathMode() 834 { 835 pDlg->SetClassPathMode(); 836 } 837 838 void AbstractSvxMultiFileDialog_Impl::EnableRadioButtonMode() 839 { 840 pDlg->EnableRadioButtonMode(); 841 } 842 843 void AbstractSvxMultiFileDialog_Impl::SetTitle( const String& rNewTitle ) 844 { 845 pDlg->SetText( rNewTitle ); 846 } 847 848 void AbstractSvxMultiFileDialog_Impl::SetHelpId( const rtl::OString& aHelpId ) 849 { 850 pDlg->SetHelpId( aHelpId ); 851 } 852 853 Window * AbstractSvxHpLinkDlg_Impl::GetWindow() 854 { 855 return (Window *)pDlg; 856 } 857 858 sal_Bool AbstractSvxHpLinkDlg_Impl::QueryClose() 859 { 860 return pDlg->QueryClose(); 861 } 862 863 864 void AbstractFmSearchDialog_Impl::SetFoundHandler(const Link& lnk) 865 { 866 pDlg->SetFoundHandler(lnk); 867 } 868 void AbstractFmSearchDialog_Impl::SetCanceledNotFoundHdl(const Link& lnk) 869 { 870 pDlg->SetCanceledNotFoundHdl(lnk); 871 } 872 void AbstractFmSearchDialog_Impl::SetActiveField(const String& strField) 873 { 874 pDlg->SetActiveField(strField); 875 } 876 877 Graphic AbstractGraphicFilterDialog_Impl::GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ) 878 { 879 return pDlg->GetFilteredGraphic( rGraphic, fScaleX, fScaleY ); 880 } 881 882 // AbstractSvxAreaTabDialog implementations just forwards everything to the dialog 883 void AbstractSvxAreaTabDialog_Impl::SetCurPageId( sal_uInt16 nId ) 884 { 885 pDlg->SetCurPageId( nId ); 886 } 887 888 const SfxItemSet* AbstractSvxAreaTabDialog_Impl::GetOutputItemSet() const 889 { 890 return pDlg->GetOutputItemSet(); 891 } 892 893 const sal_uInt16* AbstractSvxAreaTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem ) 894 { 895 return pDlg->GetInputRanges( pItem ); 896 } 897 898 void AbstractSvxAreaTabDialog_Impl::SetInputSet( const SfxItemSet* pInSet ) 899 { 900 pDlg->SetInputSet( pInSet ); 901 } 902 //From class Window. 903 void AbstractSvxAreaTabDialog_Impl::SetText( const XubString& rStr ) 904 { 905 pDlg->SetText( rStr ); 906 } 907 String AbstractSvxAreaTabDialog_Impl::GetText() const 908 { 909 return pDlg->GetText(); 910 } 911 912 void AbstractSvxAreaTabDialog_Impl::DontDeleteColorTable() 913 { 914 return pDlg->DontDeleteColorTable(); 915 } 916 917 void AbstractSvxPostItDialog_Impl::SetText( const XubString& rStr ) 918 { 919 pDlg->SetText( rStr ); 920 } 921 const SfxItemSet* AbstractSvxPostItDialog_Impl::GetOutputItemSet() const 922 { 923 return pDlg->GetOutputItemSet(); 924 } 925 void AbstractSvxPostItDialog_Impl::EnableTravel(sal_Bool bNext, sal_Bool bPrev) 926 { 927 pDlg->EnableTravel( bNext, bPrev ); 928 } 929 String AbstractSvxPostItDialog_Impl::GetNote() 930 { 931 return pDlg->GetNote(); 932 } 933 void AbstractSvxPostItDialog_Impl::SetNote(const String& rTxt) 934 { 935 pDlg->SetNote( rTxt ); 936 } 937 void AbstractSvxPostItDialog_Impl::ShowLastAuthor(const String& rAuthor, const String& rDate) 938 { 939 pDlg->ShowLastAuthor( rAuthor, rDate ); 940 } 941 void AbstractSvxPostItDialog_Impl::DontChangeAuthor() 942 { 943 pDlg->DontChangeAuthor(); 944 } 945 void AbstractSvxPostItDialog_Impl::HideAuthor() 946 { 947 pDlg->HideAuthor(); 948 } 949 void AbstractSvxPostItDialog_Impl::SetReadonlyPostIt(sal_Bool bDisable) 950 { 951 pDlg->SetReadonlyPostIt( bDisable ); 952 } 953 sal_Bool AbstractSvxPostItDialog_Impl::IsOkEnabled() const 954 { 955 return pDlg->IsOkEnabled(); 956 } 957 void AbstractSvxPostItDialog_Impl::SetNextHdl( const Link& rLink ) 958 { 959 aNextHdl = rLink; 960 if( rLink.IsSet() ) 961 pDlg->SetNextHdl( LINK(this, AbstractSvxPostItDialog_Impl, NextHdl ) ); 962 else 963 pDlg->SetNextHdl( Link() ); 964 } 965 void AbstractSvxPostItDialog_Impl::SetPrevHdl( const Link& rLink ) 966 { 967 aPrevHdl = rLink; 968 if( rLink.IsSet() ) 969 pDlg->SetPrevHdl( LINK(this, AbstractSvxPostItDialog_Impl, PrevHdl ) ); 970 else 971 pDlg->SetPrevHdl( Link() ); 972 } 973 IMPL_LINK( AbstractSvxPostItDialog_Impl, NextHdl, Window*, EMPTYARG ) 974 { 975 if( aNextHdl.IsSet() ) 976 aNextHdl.Call(this); 977 return 0; 978 } 979 IMPL_LINK( AbstractSvxPostItDialog_Impl, PrevHdl, Window*, EMPTYARG ) 980 { 981 if( aPrevHdl.IsSet() ) 982 aPrevHdl.Call(this); 983 return 0; 984 } 985 Window * AbstractSvxPostItDialog_Impl::GetWindow() 986 { 987 return (Window *)pDlg; 988 } 989 990 String AbstractPasswordToOpenModifyDialog_Impl::GetPasswordToOpen() const 991 { 992 return pDlg->GetPasswordToOpen(); 993 } 994 String AbstractPasswordToOpenModifyDialog_Impl::GetPasswordToModify() const 995 { 996 return pDlg->GetPasswordToModify(); 997 } 998 bool AbstractPasswordToOpenModifyDialog_Impl::IsRecommendToOpenReadonly() const 999 { 1000 return pDlg->IsRecommendToOpenReadonly(); 1001 } 1002 1003 // Create dialogs with simplest interface 1004 VclAbstractDialog* AbstractDialogFactory_Impl::CreateVclDialog( Window* pParent, sal_uInt32 nResId ) 1005 { 1006 Dialog* pDlg=NULL; 1007 switch ( nResId ) 1008 { 1009 case RID_DEFAULTABOUT: 1010 { 1011 pDlg = new AboutDialog( pParent, CUI_RES( (sal_uInt16) nResId ) ); 1012 break; 1013 } 1014 case SID_OPTIONS_TREEDIALOG : 1015 case SID_OPTIONS_DATABASES : 1016 case SID_LANGUAGE_OPTIONS : 1017 { 1018 bool bActivateLastSelection = false; 1019 if (nResId == SID_OPTIONS_TREEDIALOG) 1020 bActivateLastSelection = true; 1021 Reference< frame::XFrame > xFrame; 1022 OfaTreeOptionsDialog* pOptDlg = new OfaTreeOptionsDialog( pParent, xFrame, bActivateLastSelection ); 1023 if (nResId == SID_OPTIONS_DATABASES) 1024 { 1025 pOptDlg->ActivatePage(SID_SB_DBREGISTEROPTIONS); 1026 } 1027 else if (nResId == SID_LANGUAGE_OPTIONS) 1028 { 1029 //open the tab page "tools/options/languages" 1030 pOptDlg->ActivatePage(OFA_TP_LANGUAGES_FOR_SET_DOCUMENT_LANGUAGE); 1031 } 1032 pDlg = pOptDlg; 1033 } 1034 break; 1035 default: 1036 break; 1037 } 1038 1039 if ( pDlg ) 1040 return new VclAbstractDialog_Impl( pDlg ); 1041 return 0; 1042 } 1043 1044 // dialogs that use SfxBindings 1045 VclAbstractDialog* AbstractDialogFactory_Impl::CreateSfxDialog( Window* /*pParent*/, const SfxBindings&, sal_uInt32 ) 1046 { 1047 return 0; 1048 } 1049 1050 VclAbstractDialog* AbstractDialogFactory_Impl::CreateFrameDialog( 1051 Window* pParent, const Reference< frame::XFrame >& rxFrame, 1052 sal_uInt32 nResId, const String& rParameter ) 1053 { 1054 Dialog* pDlg = NULL; 1055 if ( SID_OPTIONS_TREEDIALOG == nResId || SID_OPTIONS_DATABASES == nResId ) 1056 { 1057 // only activate last page if we dont want to activate a special page 1058 bool bActivateLastSelection = ( nResId != SID_OPTIONS_DATABASES && rParameter.Len() == 0 ); 1059 OfaTreeOptionsDialog* pOptDlg = new OfaTreeOptionsDialog( pParent, rxFrame, bActivateLastSelection ); 1060 if ( nResId == SID_OPTIONS_DATABASES ) 1061 pOptDlg->ActivatePage(SID_SB_DBREGISTEROPTIONS); 1062 else if ( rParameter.Len() > 0 ) 1063 pOptDlg->ActivatePage( rParameter ); 1064 pDlg = pOptDlg; 1065 } 1066 1067 if ( pDlg ) 1068 return new VclAbstractDialog_Impl( pDlg ); 1069 else 1070 return NULL; 1071 } 1072 1073 // TabDialog outside the drawing layer 1074 SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateTabDialog( sal_uInt32 nResId, 1075 Window* pParent, 1076 const SfxItemSet* pAttrSet, 1077 SfxViewFrame* , 1078 bool /*bEditFmt*/, 1079 const String * ) 1080 { 1081 SfxTabDialog* pDlg=NULL; 1082 switch ( nResId ) 1083 { 1084 case RID_OFA_AUTOCORR_DLG : 1085 pDlg = new OfaAutoCorrDlg( pParent, pAttrSet ); 1086 break; 1087 case RID_SVXDLG_CUSTOMIZE : 1088 pDlg = new SvxConfigDialog( pParent, pAttrSet ); 1089 break; 1090 default: 1091 break; 1092 } 1093 1094 if ( pDlg ) 1095 return new AbstractTabDialog_Impl( pDlg ); 1096 return 0; 1097 } 1098 1099 SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateTabDialog( sal_uInt32 nResId, 1100 Window* pParent, 1101 const SfxItemSet* pAttrSet, 1102 const Reference< frame::XFrame >& xViewFrame, 1103 bool /*bEditFmt*/, 1104 const String * ) 1105 { 1106 SfxTabDialog* pDlg=NULL; 1107 switch ( nResId ) 1108 { 1109 case RID_OFA_AUTOCORR_DLG : 1110 pDlg = new OfaAutoCorrDlg( pParent, pAttrSet ); 1111 break; 1112 case RID_SVXDLG_CUSTOMIZE : 1113 { 1114 SvxConfigDialog* pDlg1 = new SvxConfigDialog( pParent, pAttrSet ); 1115 pDlg1->SetFrame(xViewFrame); 1116 pDlg = (SfxTabDialog*)pDlg1; 1117 } 1118 break; 1119 default: 1120 break; 1121 } 1122 1123 if ( pDlg ) 1124 return new AbstractTabDialog_Impl( pDlg ); 1125 return 0; 1126 } 1127 1128 // TabDialog that use functionality of the drawing layer 1129 SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateTextTabDialog( Window* pParent, 1130 const SfxItemSet* pAttrSet, 1131 SdrView* pView, 1132 SdrModel* ) 1133 { 1134 SfxTabDialog* pDlg = new SvxTextTabDialog( pParent, pAttrSet, pView ); 1135 return new AbstractTabDialog_Impl( pDlg ); 1136 } 1137 1138 //TabDialog that use functionality of the drawing layer and add AnchorTypes -- for SvxCaptionTabDialog CHINA001 1139 AbstractSvxCaptionDialog* AbstractDialogFactory_Impl::CreateCaptionDialog( Window* pParent, 1140 const SdrView* pView, 1141 sal_uInt16 nAnchorTypes ) 1142 { 1143 SvxCaptionTabDialog* pDlg = new SvxCaptionTabDialog( pParent, pView, nAnchorTypes ); 1144 return new AbstractSvxCaptionDialog_Impl( pDlg ); 1145 } 1146 1147 AbstractSvxDistributeDialog* AbstractDialogFactory_Impl::CreateSvxDistributeDialog(Window* pParent, 1148 const SfxItemSet& rAttr, 1149 SvxDistributeHorizontal eHor , 1150 SvxDistributeVertical eVer) 1151 { 1152 SvxDistributeDialog* pDlg = new SvxDistributeDialog( pParent, rAttr, eHor, eVer); 1153 return new AbstractSvxDistributeDialog_Impl( pDlg ); 1154 } 1155 1156 AbstractHangulHanjaConversionDialog* AbstractDialogFactory_Impl::CreateHangulHanjaConversionDialog(Window* pParent, 1157 editeng::HangulHanjaConversion::ConversionDirection _ePrimaryDirection ) 1158 { 1159 HangulHanjaConversionDialog* pDlg = new HangulHanjaConversionDialog( pParent, _ePrimaryDirection); 1160 return new AbstractHangulHanjaConversionDialog_Impl( pDlg ); 1161 } 1162 1163 AbstractThesaurusDialog* AbstractDialogFactory_Impl::CreateThesaurusDialog( Window* pParent, 1164 ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XThesaurus > xThesaurus, 1165 const String &rWord, sal_Int16 nLanguage ) 1166 { 1167 SvxThesaurusDialog* pDlg = new SvxThesaurusDialog( pParent, xThesaurus, rWord, nLanguage ); 1168 return new AbstractThesaurusDialog_Impl( pDlg ); 1169 } 1170 1171 AbstractHyphenWordDialog* AbstractDialogFactory_Impl::CreateHyphenWordDialog( Window* pParent, 1172 const String &rWord, LanguageType nLang, 1173 ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XHyphenator > &xHyphen, 1174 SvxSpellWrapper* pWrapper ) 1175 { 1176 SvxHyphenWordDialog* pDlg = new SvxHyphenWordDialog( rWord, nLang, pParent, xHyphen, pWrapper ); 1177 return new AbstractHyphenWordDialog_Impl( pDlg ); 1178 } 1179 1180 AbstractFmShowColsDialog * AbstractDialogFactory_Impl::CreateFmShowColsDialog( Window* pParent ) 1181 { 1182 FmShowColsDialog* pDlg = new FmShowColsDialog( pParent); 1183 return new AbstractFmShowColsDialog_Impl( pDlg ); 1184 } 1185 AbstractSvxZoomDialog * AbstractDialogFactory_Impl::CreateSvxZoomDialog( Window* pParent, //add for SvxZoomDialog 1186 const SfxItemSet& rCoreSet) 1187 { 1188 SvxZoomDialog* pDlg = new SvxZoomDialog( pParent, rCoreSet); 1189 return new AbstractSvxZoomDialog_Impl( pDlg ); 1190 } 1191 1192 AbstractSpellDialog * AbstractDialogFactory_Impl::CreateSvxSpellDialog( 1193 Window* pParent, 1194 SfxBindings* pBindings, 1195 svx::SpellDialogChildWindow* pSpellChildWindow ) 1196 { 1197 svx::SpellDialog* pDlg = new svx::SpellDialog(pSpellChildWindow, pParent, pBindings); 1198 return new AbstractSpellDialog_Impl(pDlg); 1199 } 1200 1201 VclAbstractRefreshableDialog * AbstractDialogFactory_Impl::CreateActualizeProgressDialog( Window* pParent, GalleryTheme* pThm ) 1202 { 1203 Dialog* pDlg = new ActualizeProgress( pParent, pThm); 1204 return new VclAbstractRefreshableDialog_Impl( pDlg ); 1205 } 1206 1207 AbstractSearchProgress * AbstractDialogFactory_Impl::CreateSearchProgressDialog( Window* pParent, //add for SearchProgress 1208 const INetURLObject& rStartURL ) 1209 { 1210 SearchProgress* pDlg = new SearchProgress( pParent, rStartURL); 1211 return new AbstractSearchProgress_Impl( pDlg ); 1212 } 1213 1214 AbstractTakeProgress * AbstractDialogFactory_Impl::CreateTakeProgressDialog( Window* pParent ) 1215 { 1216 TakeProgress* pDlg = new TakeProgress( pParent ); 1217 return new AbstractTakeProgress_Impl( pDlg ); 1218 } 1219 1220 VclAbstractDialog* 1221 AbstractDialogFactory_Impl::CreateScriptErrorDialog( 1222 Window* pParent, ::com::sun::star::uno::Any aException ) 1223 { 1224 return new SvxScriptErrorDialog( pParent, aException ); 1225 } 1226 1227 AbstractScriptSelectorDialog* 1228 AbstractDialogFactory_Impl::CreateScriptSelectorDialog( 1229 Window* pParent, sal_Bool bShowSlots, const Reference< frame::XFrame >& _rxFrame ) 1230 { 1231 SvxScriptSelectorDialog* pDlg = NULL; 1232 1233 pDlg = new SvxScriptSelectorDialog( pParent, bShowSlots, _rxFrame ); 1234 1235 if (pDlg) 1236 { 1237 return new AbstractScriptSelectorDialog_Impl( pDlg ); 1238 } 1239 return 0; 1240 } 1241 1242 String AbstractScriptSelectorDialog_Impl::GetScriptURL() const 1243 { 1244 if (pDlg) 1245 return pDlg->GetScriptURL(); 1246 return String(); 1247 } 1248 1249 void AbstractScriptSelectorDialog_Impl::SetRunLabel() 1250 { 1251 if (pDlg) 1252 pDlg->SetRunLabel(); 1253 return; 1254 } 1255 1256 VclAbstractDialog * AbstractDialogFactory_Impl::CreateSvxScriptOrgDialog( Window* pParent, //add for SvxScriptOrgDialog 1257 const String& rLanguage) 1258 { 1259 Dialog* pDlg=NULL; 1260 1261 pDlg = new SvxScriptOrgDialog( pParent, rLanguage); 1262 1263 if ( pDlg ) 1264 return new VclAbstractDialog_Impl( pDlg ); 1265 return 0; 1266 } 1267 1268 AbstractTitleDialog * AbstractDialogFactory_Impl::CreateTitleDialog( Window* pParent, //add for TitleDialog 1269 const String& rOldText) 1270 { 1271 TitleDialog* pDlg = new TitleDialog( pParent, rOldText); 1272 return new AbstractTitleDialog_Impl( pDlg ); 1273 } 1274 1275 AbstractGalleryIdDialog * AbstractDialogFactory_Impl::CreateGalleryIdDialog( Window* pParent, //add for SvxZoomDialog 1276 GalleryTheme* pThm ) 1277 { 1278 GalleryIdDialog* pDlg = new GalleryIdDialog( pParent, pThm); 1279 return new AbstractGalleryIdDialog_Impl( pDlg ); 1280 } 1281 1282 VclAbstractDialog2 * AbstractDialogFactory_Impl::CreateGalleryThemePropertiesDialog( Window* pParent, //add for GalleryThemeProperties 1283 ExchangeData* pData, 1284 SfxItemSet* pItemSet) 1285 { 1286 Dialog* pDlg = new GalleryThemeProperties( pParent, pData, pItemSet); 1287 return new VclAbstractDialog2_Impl( pDlg ); 1288 } 1289 1290 AbstractURLDlg * AbstractDialogFactory_Impl::CreateURLDialog( Window* pParent, //add for URLDlg 1291 const String& rURL, const String& rAltText, const String& rDescription, 1292 const String& rTarget, const String& rName, 1293 TargetList& rTargetList ) 1294 { 1295 URLDlg* pDlg = new URLDlg( pParent, rURL, rAltText, rDescription, rTarget, rName, rTargetList); 1296 return new AbstractURLDlg_Impl( pDlg ); 1297 } 1298 1299 AbstractSvxHlinkDlgMarkWnd* AbstractDialogFactory_Impl::CreateSvxHlinkDlgMarkWndDialog( SvxHyperlinkTabPageBase* pParent, sal_uInt32 nResId ) 1300 { 1301 SvxHlinkDlgMarkWnd* pDlg=NULL; 1302 switch ( nResId ) 1303 { 1304 case RID_SVXFLOAT_HYPERLINK_MARKWND : 1305 pDlg = new SvxHlinkDlgMarkWnd( pParent ); 1306 break; 1307 default: 1308 break; 1309 } 1310 1311 if ( pDlg ) 1312 return new AbstractSvxHlinkDlgMarkWnd_Impl( pDlg ); 1313 return 0; 1314 } 1315 1316 SfxAbstractDialog* AbstractDialogFactory_Impl::CreateSfxDialog( sal_uInt32 nResId, 1317 Window* pParent, 1318 const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& , 1319 const SfxItemSet* pAttrSet ) 1320 { 1321 SfxModalDialog* pDlg=NULL; 1322 switch ( nResId ) 1323 { 1324 case RID_SVXDLG_CHARMAP : 1325 pDlg = new SvxCharacterMap( pParent, sal_True, pAttrSet ); 1326 break; 1327 default: 1328 break; 1329 } 1330 1331 if ( pDlg ) 1332 return new AbstractSfxDialog_Impl( pDlg ); 1333 return 0; 1334 } 1335 1336 SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateTabItemDialog( Window* pParent, 1337 const SfxItemSet& rSet, 1338 sal_uInt32 nResId) 1339 { 1340 SfxTabDialog* pDlg=NULL; 1341 switch ( nResId ) 1342 { 1343 case RID_SVXDLG_SEARCHFORMAT : 1344 pDlg = new SvxSearchFormatDialog( pParent, rSet ); 1345 break; 1346 default: 1347 break; 1348 } 1349 1350 if ( pDlg ) 1351 return new AbstractTabDialog_Impl( pDlg ); 1352 return 0; 1353 } 1354 1355 VclAbstractDialog* AbstractDialogFactory_Impl::CreateSvxSearchAttributeDialog( Window* pParent, 1356 SearchAttrItemList& rLst, 1357 const sal_uInt16* pWhRanges ) 1358 { 1359 Dialog* pDlg = new SvxSearchAttributeDialog( pParent, rLst, pWhRanges); 1360 return new VclAbstractDialog_Impl( pDlg ); 1361 } 1362 1363 AbstractSvxSearchSimilarityDialog * AbstractDialogFactory_Impl::CreateSvxSearchSimilarityDialog( Window* pParent, 1364 sal_Bool bRelax, 1365 sal_uInt16 nOther, 1366 sal_uInt16 nShorter, 1367 sal_uInt16 nLonger) 1368 { 1369 SvxSearchSimilarityDialog* pDlg = new SvxSearchSimilarityDialog( pParent, bRelax, nOther, nShorter, nLonger ); 1370 if ( pDlg ) 1371 return new AbstractSvxSearchSimilarityDialog_Impl( pDlg ); 1372 return NULL; 1373 } 1374 1375 SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateSvxBorderBackgroundDlg( Window* pParent, 1376 const SfxItemSet& rCoreSet, 1377 sal_Bool bEnableSelector) 1378 { 1379 SfxTabDialog* pDlg = new SvxBorderBackgroundDlg( pParent, rCoreSet, bEnableSelector); 1380 return new AbstractTabDialog_Impl( pDlg ); 1381 } 1382 1383 AbstractSvxTransformTabDialog* AbstractDialogFactory_Impl::CreateSvxTransformTabDialog( Window* pParent, 1384 const SfxItemSet* pAttr, 1385 const SdrView* pView, 1386 sal_uInt16 nAnchorTypes ) 1387 { 1388 SvxTransformTabDialog* pDlg = new SvxTransformTabDialog( pParent, pAttr,pView, nAnchorTypes); 1389 return new AbstractSvxTransformTabDialog_Impl( pDlg ); 1390 } 1391 1392 SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateSchTransformTabDialog( Window* pParent, 1393 const SfxItemSet* pAttr, 1394 const SdrView* pSdrView, 1395 sal_uInt32 nResId, 1396 bool bSizeTabPage 1397 ) 1398 { 1399 SfxTabDialog* pDlg=NULL; 1400 switch ( nResId ) 1401 { 1402 case RID_SCH_TransformTabDLG_SVXPAGE_ANGLE : 1403 { 1404 pDlg = new SvxTransformTabDialog( pParent, pAttr,pSdrView, bSizeTabPage ? SVX_OBJ_NOPROTECT : SVX_OBJ_NOPROTECT|SVX_OBJ_NORESIZE); 1405 pDlg->RemoveTabPage( RID_SVXPAGE_ANGLE ); 1406 pDlg->RemoveTabPage( RID_SVXPAGE_SLANT ); 1407 } 1408 break; 1409 case RID_SCH_TransformTabDLG_SVXPAGE_SLANT: 1410 { 1411 pDlg = new SvxTransformTabDialog( pParent, pAttr,pSdrView, bSizeTabPage ? SVX_OBJ_NOPROTECT : SVX_OBJ_NOPROTECT|SVX_OBJ_NORESIZE); 1412 pDlg->RemoveTabPage( RID_SVXPAGE_SLANT ); 1413 } 1414 break; 1415 default: 1416 break; 1417 } 1418 1419 if ( pDlg ) 1420 return new AbstractTabDialog_Impl( pDlg ); 1421 return 0; 1422 } 1423 1424 AbstractSvxJSearchOptionsDialog * AbstractDialogFactory_Impl::CreateSvxJSearchOptionsDialog( Window* pParent, 1425 const SfxItemSet& rOptionsSet, 1426 sal_Int32 nInitialFlags) 1427 { 1428 SvxJSearchOptionsDialog* pDlg = new SvxJSearchOptionsDialog( pParent, rOptionsSet, nInitialFlags ); 1429 return new AbstractSvxJSearchOptionsDialog_Impl( pDlg ); 1430 } 1431 1432 AbstractFmInputRecordNoDialog * AbstractDialogFactory_Impl::CreateFmInputRecordNoDialog( Window* pParent ) 1433 { 1434 FmInputRecordNoDialog* pDlg = new FmInputRecordNoDialog( pParent ); 1435 return new AbstractFmInputRecordNoDialog_Impl( pDlg ); 1436 } 1437 1438 AbstractSvxNewDictionaryDialog * AbstractDialogFactory_Impl::CreateSvxNewDictionaryDialog( Window* pParent, 1439 ::Reference< ::com::sun::star::linguistic2::XSpellChecker1 > &xSpl, 1440 sal_uInt32 nResId ) 1441 { 1442 SvxNewDictionaryDialog* pDlg=NULL; 1443 switch ( nResId ) 1444 { 1445 case RID_SFXDLG_NEWDICT : 1446 pDlg = new SvxNewDictionaryDialog( pParent, xSpl ); 1447 break; 1448 default: 1449 break; 1450 } 1451 1452 if ( pDlg ) 1453 return new AbstractSvxNewDictionaryDialog_Impl( pDlg ); 1454 return 0; 1455 } 1456 1457 VclAbstractDialog* AbstractDialogFactory_Impl::CreateSvxEditDictionaryDialog( Window* pParent, 1458 const String& rName, 1459 ::Reference< ::com::sun::star::linguistic2::XSpellChecker1> &xSpl, 1460 sal_uInt32 nResId ) 1461 { 1462 Dialog* pDlg=NULL; 1463 switch ( nResId ) 1464 { 1465 case RID_SFXDLG_EDITDICT : 1466 pDlg = new SvxEditDictionaryDialog( pParent, rName, xSpl ); 1467 break; 1468 default: 1469 break; 1470 } 1471 1472 if ( pDlg ) 1473 return new VclAbstractDialog_Impl( pDlg ); 1474 return 0; 1475 } 1476 1477 AbstractSvxNameDialog * AbstractDialogFactory_Impl::CreateSvxNameDialog( Window* pParent, 1478 const String& rName, const String& rDesc ) 1479 { 1480 SvxNameDialog* pDlg = new SvxNameDialog( pParent, rName, rDesc ); 1481 return new AbstractSvxNameDialog_Impl( pDlg ); 1482 } 1483 1484 AbstractSvxObjectNameDialog* AbstractDialogFactory_Impl::CreateSvxObjectNameDialog(Window* pParent, const String& rName ) 1485 { 1486 return new AbstractSvxObjectNameDialog_Impl(new SvxObjectNameDialog(pParent, rName)); 1487 } 1488 1489 AbstractSvxObjectTitleDescDialog* AbstractDialogFactory_Impl::CreateSvxObjectTitleDescDialog(Window* pParent, const String& rTitle, const String& rDescription) 1490 { 1491 return new AbstractSvxObjectTitleDescDialog_Impl(new SvxObjectTitleDescDialog(pParent, rTitle, rDescription)); 1492 } 1493 1494 AbstractSvxMessDialog * AbstractDialogFactory_Impl::CreateSvxMessDialog( Window* pParent, sal_uInt32 nResId, 1495 const String& rText, const String& rDesc, Image* pImg ) 1496 { 1497 SvxMessDialog* pDlg=NULL; 1498 switch ( nResId ) 1499 { 1500 case RID_SVXDLG_MESSBOX : 1501 pDlg = new SvxMessDialog( pParent, rText, rDesc, pImg ); 1502 break; 1503 default: 1504 break; 1505 } 1506 1507 if ( pDlg ) 1508 return new AbstractSvxMessDialog_Impl( pDlg ); 1509 return 0; 1510 } 1511 1512 AbstractSvxMultiPathDialog * AbstractDialogFactory_Impl::CreateSvxMultiPathDialog( Window* pParent, sal_Bool bEmptyAllowed ) 1513 { 1514 SvxMultiPathDialog* pDlg = new SvxMultiPathDialog( pParent, bEmptyAllowed ); 1515 return new AbstractSvxMultiPathDialog_Impl( pDlg ); 1516 } 1517 1518 AbstractSvxMultiFileDialog * AbstractDialogFactory_Impl::CreateSvxMultiFileDialog( Window* pParent, sal_Bool bEmptyAllowed ) 1519 { 1520 SvxMultiFileDialog* pDlg = new SvxMultiFileDialog( pParent, bEmptyAllowed ); 1521 return new AbstractSvxMultiFileDialog_Impl( pDlg ); 1522 } 1523 1524 AbstractSvxHpLinkDlg * AbstractDialogFactory_Impl::CreateSvxHpLinkDlg (Window* pParent, //add for SvxMultiFileDialog 1525 SfxBindings* pBindings, 1526 sal_uInt32 nResId) 1527 { 1528 SvxHpLinkDlg* pDlg=NULL; 1529 switch ( nResId ) 1530 { 1531 case SID_HYPERLINK_DIALOG : 1532 pDlg = new SvxHpLinkDlg( pParent, pBindings ); 1533 break; 1534 default: 1535 break; 1536 } 1537 1538 if ( pDlg ) 1539 return new AbstractSvxHpLinkDlg_Impl( pDlg ); 1540 return 0; 1541 } 1542 1543 AbstractFmSearchDialog* AbstractDialogFactory_Impl::CreateFmSearchDialog(Window* pParent, //add for FmSearchDialog 1544 const String& strInitialText, 1545 const ::std::vector< String >& _rContexts, 1546 sal_Int16 nInitialContext, 1547 const Link& lnkContextSupplier) 1548 { 1549 FmSearchDialog* pDlg = new FmSearchDialog( pParent, strInitialText, _rContexts, nInitialContext, lnkContextSupplier ); 1550 if ( pDlg ) 1551 return new AbstractFmSearchDialog_Impl( pDlg ); 1552 return 0; 1553 } 1554 1555 AbstractGraphicFilterDialog * AbstractDialogFactory_Impl::CreateGraphicFilterEmboss (Window* pParent, //add for GraphicFilterEmboss 1556 const Graphic& rGraphic, 1557 RECT_POINT eLightSource, 1558 sal_uInt32) 1559 { 1560 GraphicFilterDialog* pDlg = new GraphicFilterEmboss( pParent, rGraphic, eLightSource ); 1561 return new AbstractGraphicFilterDialog_Impl( pDlg ); 1562 } 1563 1564 AbstractGraphicFilterDialog * AbstractDialogFactory_Impl::CreateGraphicFilterPosterSepia (Window* pParent, 1565 const Graphic& rGraphic, 1566 sal_uInt16 nCount, 1567 sal_uInt32 nResId) 1568 { 1569 GraphicFilterDialog* pDlg=NULL; 1570 switch ( nResId ) 1571 { 1572 case RID_SVX_GRFFILTER_DLG_POSTER : 1573 pDlg = new GraphicFilterPoster( pParent, rGraphic, nCount ); 1574 break; 1575 case RID_SVX_GRFFILTER_DLG_SEPIA : 1576 pDlg = new GraphicFilterSepia( pParent, rGraphic, nCount ); 1577 break; 1578 1579 default: 1580 break; 1581 } 1582 1583 if ( pDlg ) 1584 return new AbstractGraphicFilterDialog_Impl( pDlg ); 1585 return 0; 1586 } 1587 1588 AbstractGraphicFilterDialog * AbstractDialogFactory_Impl::CreateGraphicFilterSolarize (Window* pParent, //add for GraphicFilterSolarize 1589 const Graphic& rGraphic, 1590 sal_uInt8 nGreyThreshold, sal_Bool bInvert, sal_uInt32 ) 1591 { 1592 GraphicFilterDialog* pDlg = new GraphicFilterSolarize( pParent, rGraphic, nGreyThreshold, bInvert ); 1593 return new AbstractGraphicFilterDialog_Impl( pDlg ); 1594 } 1595 1596 AbstractGraphicFilterDialog * AbstractDialogFactory_Impl::CreateGraphicFilterMosaic (Window* pParent, //add for GraphicFilterMosaic 1597 const Graphic& rGraphic, 1598 sal_uInt16 nTileWidth, sal_uInt16 nTileHeight, sal_Bool bEnhanceEdges, 1599 sal_uInt32 nResId) 1600 { 1601 GraphicFilterDialog* pDlg=NULL; 1602 switch ( nResId ) 1603 { 1604 case RID_SVX_GRFFILTER_DLG_MOSAIC : 1605 pDlg = new GraphicFilterMosaic( pParent, rGraphic, nTileWidth, nTileHeight, bEnhanceEdges ); 1606 break; 1607 default: 1608 break; 1609 } 1610 1611 if ( pDlg ) 1612 return new AbstractGraphicFilterDialog_Impl( pDlg ); 1613 return 0; 1614 } 1615 1616 AbstractSvxAreaTabDialog* AbstractDialogFactory_Impl::CreateSvxAreaTabDialog( Window* pParent, 1617 const SfxItemSet* pAttr, 1618 SdrModel* pModel, 1619 const SdrView* pSdrView ) 1620 { 1621 SvxAreaTabDialog* pDlg = new SvxAreaTabDialog( pParent, pAttr, pModel,pSdrView ); 1622 return new AbstractSvxAreaTabDialog_Impl( pDlg ); 1623 } 1624 1625 SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateSvxLineTabDialog( Window* pParent, const SfxItemSet* pAttr, //add forSvxLineTabDialog 1626 SdrModel* pModel, 1627 const SdrObject* pObj , 1628 sal_Bool bHasObj) 1629 { 1630 SfxTabDialog* pDlg = new SvxLineTabDialog( pParent, pAttr, pModel,pObj,bHasObj ); 1631 return new AbstractTabDialog_Impl( pDlg ); 1632 } 1633 1634 SfxAbstractDialog* AbstractDialogFactory_Impl::CreateSfxDialog( Window* pParent, 1635 const SfxItemSet& rAttr, 1636 const Reference< XFrame >& _rxDocumentFrame, 1637 sal_uInt32 nResId 1638 ) 1639 { 1640 SfxModalDialog* pDlg=NULL; 1641 switch ( nResId ) 1642 { 1643 case SID_EVENTCONFIG : 1644 pDlg = new SfxMacroAssignDlg( pParent, _rxDocumentFrame, rAttr ); 1645 break; 1646 case RID_SVXPAGE_MACROASSIGN : 1647 pDlg = new SvxShortcutAssignDlg( pParent, _rxDocumentFrame, rAttr ); 1648 break; 1649 case RID_SVXDLG_CHARMAP : 1650 pDlg = new SvxCharacterMap( pParent, sal_True, &rAttr ); 1651 break; 1652 default: 1653 break; 1654 } 1655 1656 if ( pDlg ) 1657 return new AbstractSfxDialog_Impl( pDlg ); 1658 return 0; 1659 } 1660 1661 SfxAbstractDialog* AbstractDialogFactory_Impl::CreateSfxDialog( Window* pParent, 1662 const SfxItemSet& rAttr, 1663 const SdrView* pView, 1664 sal_uInt32 nResId 1665 ) 1666 { 1667 SfxSingleTabDialog* pDlg=NULL; 1668 switch ( nResId ) 1669 { 1670 case RID_SVXPAGE_MEASURE : 1671 pDlg = new SvxMeasureDialog( pParent, rAttr, pView ); 1672 break; 1673 case RID_SVXPAGE_CONNECTION : 1674 pDlg = new SvxConnectionDialog( pParent, rAttr, pView ); 1675 break; 1676 case RID_SFXPAGE_DBREGISTER : 1677 pDlg = new DatabaseRegistrationDialog( pParent, rAttr ); 1678 break; 1679 case RID_SVXPAGE_IMPROVEMENT : 1680 { 1681 String help_url; 1682 SFX_ITEMSET_ARG( &rAttr, pItem, SfxStringItem, SID_CURRENT_URL, sal_False ); 1683 if ( pItem ) 1684 help_url = pItem->GetValue(); 1685 pDlg = new SvxImprovementDialog( pParent, help_url); 1686 } 1687 default: 1688 break; 1689 } 1690 1691 if ( pDlg ) 1692 return new AbstractSfxDialog_Impl( pDlg ); 1693 return 0; 1694 } 1695 1696 AbstractSvxPostItDialog* AbstractDialogFactory_Impl::CreateSvxPostItDialog( Window* pParent, 1697 const SfxItemSet& rCoreSet, 1698 sal_Bool bPrevNext, sal_Bool bRedline ) 1699 { 1700 SvxPostItDialog* pDlg = new SvxPostItDialog( pParent, rCoreSet, bPrevNext, bRedline ); 1701 return new AbstractSvxPostItDialog_Impl( pDlg ); 1702 } 1703 1704 class SvxMacroAssignDialog : public VclAbstractDialog 1705 { 1706 public: 1707 SvxMacroAssignDialog( Window* _pParent, const Reference< XFrame >& _rxDocumentFrame, const bool _bUnoDialogMode, 1708 const Reference< XNameReplace >& _rxEvents, const sal_uInt16 _nInitiallySelectedEvent ) 1709 :m_aItems( SFX_APP()->GetPool(), SID_ATTR_MACROITEM, SID_ATTR_MACROITEM ) 1710 { 1711 m_aItems.Put( SfxBoolItem( SID_ATTR_MACROITEM, _bUnoDialogMode ) ); 1712 m_pDialog.reset( new SvxMacroAssignDlg( _pParent, _rxDocumentFrame, m_aItems, _rxEvents, _nInitiallySelectedEvent ) ); 1713 } 1714 1715 virtual short Execute(); 1716 virtual ~SvxMacroAssignDialog(); 1717 1718 private: 1719 SfxItemSet m_aItems; 1720 ::std::auto_ptr< SvxMacroAssignDlg > m_pDialog; 1721 }; 1722 1723 short SvxMacroAssignDialog::Execute() 1724 { 1725 return m_pDialog->Execute(); 1726 } 1727 1728 SvxMacroAssignDialog::~SvxMacroAssignDialog() 1729 { 1730 } 1731 1732 VclAbstractDialog * AbstractDialogFactory_Impl::CreateSvxMacroAssignDlg( 1733 Window* _pParent, const Reference< XFrame >& _rxDocumentFrame, const bool _bUnoDialogMode, 1734 const Reference< XNameReplace >& _rxEvents, const sal_uInt16 _nInitiallySelectedEvent ) 1735 { 1736 return new SvxMacroAssignDialog( _pParent, _rxDocumentFrame, _bUnoDialogMode, _rxEvents, _nInitiallySelectedEvent ); 1737 } 1738 1739 // Factories for TabPages 1740 CreateTabPage AbstractDialogFactory_Impl::GetTabPageCreatorFunc( sal_uInt16 nId ) 1741 { 1742 switch ( nId ) 1743 { 1744 case RID_OFA_TP_INTERNATIONAL: 1745 return ::offapp::InternationalOptionsPage::CreateSc; 1746 case RID_OFA_TP_INTERNATIONAL_SD: 1747 case RID_OFA_TP_INTERNATIONAL_IMPR: 1748 return offapp::InternationalOptionsPage::CreateSd; 1749 case RID_SVXPAGE_TEXTANIMATION : 1750 return SvxTextAnimationPage::Create; 1751 case RID_SVXTABPAGE_GALLERY_GENERAL : 1752 return TPGalleryThemeGeneral::Create; 1753 case RID_SVXPAGE_TRANSPARENCE : 1754 return SvxTransparenceTabPage::Create; 1755 case RID_SVXPAGE_AREA : 1756 return SvxAreaTabPage::Create; 1757 case RID_SVXPAGE_SHADOW : 1758 return SvxShadowTabPage::Create; 1759 case RID_SVXPAGE_LINE : 1760 return SvxLineTabPage::Create; 1761 case RID_SVXPAGE_CONNECTION : 1762 return SvxConnectionPage::Create; 1763 case RID_SVXPAGE_MEASURE : 1764 return SvxMeasurePage::Create; 1765 case RID_SFXPAGE_GENERAL : 1766 return SvxGeneralTabPage::Create; 1767 case RID_SVXPAGE_PICK_SINGLE_NUM : 1768 return SvxSingleNumPickTabPage::Create; 1769 case RID_SVXPAGE_PICK_BMP : 1770 return SvxBitmapPickTabPage::Create; 1771 case RID_SVXPAGE_PICK_BULLET : 1772 return SvxBulletPickTabPage::Create; 1773 case RID_SVXPAGE_NUM_OPTIONS : 1774 return SvxNumOptionsTabPage::Create; 1775 case RID_SVXPAGE_PICK_NUM : 1776 return SvxNumPickTabPage::Create; 1777 case RID_SVXPAGE_NUM_POSITION : 1778 return SvxNumPositionTabPage::Create; 1779 case RID_SVXPAGE_PARA_ASIAN : 1780 return SvxAsianTabPage::Create; 1781 case RID_SVXPAGE_EXT_PARAGRAPH : 1782 return SvxExtParagraphTabPage::Create; 1783 case RID_SVXPAGE_ALIGN_PARAGRAPH : 1784 return SvxParaAlignTabPage::Create; 1785 case RID_SVXPAGE_STD_PARAGRAPH : 1786 return SvxStdParagraphTabPage::Create; 1787 case RID_SVXPAGE_TABULATOR : 1788 return SvxTabulatorTabPage::Create; 1789 case RID_SVXPAGE_TEXTATTR : 1790 return SvxTextAttrPage::Create; 1791 case RID_SVXPAGE_ALIGNMENT : 1792 return svx::AlignmentTabPage::Create; 1793 case RID_SW_TP_BACKGROUND : 1794 case RID_SVXPAGE_BACKGROUND : 1795 return SvxBackgroundTabPage::Create; 1796 case RID_SVXPAGE_BORDER : 1797 return SvxBorderTabPage::Create; 1798 case RID_SVXPAGE_CHAR_NAME : 1799 return SvxCharNamePage::Create; 1800 case RID_SVXPAGE_CHAR_EFFECTS : 1801 return SvxCharEffectsPage::Create; 1802 case RID_SVXPAGE_CHAR_POSITION : 1803 return SvxCharPositionPage::Create; 1804 case RID_SVXPAGE_CHAR_TWOLINES : 1805 return SvxCharTwoLinesPage::Create; 1806 case RID_SVXPAGE_NUMBERFORMAT : 1807 return SvxNumberFormatTabPage::Create; 1808 case RID_SVXPAGE_PAGE : 1809 return SvxPageDescPage::Create; 1810 case RID_SVXPAGE_GRFCROP : 1811 return SvxGrfCropPage::Create; 1812 case RID_SVXPAGE_MACROASSIGN : 1813 return SfxMacroTabPage::Create; 1814 default: 1815 break; 1816 } 1817 1818 return 0; 1819 } 1820 1821 CreateSvxDistributePage AbstractDialogFactory_Impl::GetSvxDistributePageCreatorFunc() 1822 { 1823 return SvxDistributePage::Create; 1824 } 1825 1826 DialogGetRanges AbstractDialogFactory_Impl::GetDialogGetRangesFunc( sal_uInt16 nId ) 1827 { 1828 switch ( nId ) 1829 { 1830 case RID_SVXDLG_POSTIT: 1831 return SvxPostItDialog::GetRanges; //add for SvxPostItDialog 1832 default: 1833 break; 1834 } 1835 1836 return 0; 1837 } 1838 GetTabPageRanges AbstractDialogFactory_Impl::GetTabPageRangesFunc( sal_uInt16 nId ) 1839 { 1840 switch ( nId ) 1841 { 1842 case RID_SVXPAGE_TEXTANIMATION : 1843 return SvxTextAnimationPage::GetRanges; 1844 case RID_SVXPAGE_DISTRIBUTE: 1845 return SvxDistributePage::GetRanges; 1846 case RID_SVXPAGE_TRANSPARENCE : 1847 return SvxTransparenceTabPage::GetRanges; 1848 case RID_SVXPAGE_AREA : 1849 return SvxAreaTabPage::GetRanges; 1850 case RID_SVXPAGE_SHADOW : 1851 return SvxShadowTabPage::GetRanges; 1852 case RID_SVXPAGE_LINE : 1853 return SvxLineTabPage::GetRanges; 1854 case RID_SVXPAGE_CONNECTION : 1855 return SvxConnectionPage::GetRanges; 1856 case RID_SVXPAGE_MEASURE : 1857 return SvxMeasurePage::GetRanges; 1858 case RID_SVXPAGE_PARA_ASIAN : 1859 return SvxAsianTabPage::GetRanges; 1860 case RID_SVXPAGE_EXT_PARAGRAPH : 1861 return SvxExtParagraphTabPage::GetRanges; 1862 case RID_SVXPAGE_ALIGN_PARAGRAPH : 1863 return SvxParaAlignTabPage::GetRanges; 1864 case RID_SVXPAGE_STD_PARAGRAPH : 1865 return SvxStdParagraphTabPage::GetRanges; 1866 case RID_SVXPAGE_TABULATOR : 1867 return SvxTabulatorTabPage::GetRanges; 1868 case RID_SVXPAGE_TEXTATTR : 1869 return SvxTextAttrPage::GetRanges; 1870 case RID_SVXPAGE_ALIGNMENT : 1871 return svx::AlignmentTabPage::GetRanges; 1872 case RID_SW_TP_BACKGROUND : 1873 case RID_SVXPAGE_BACKGROUND : 1874 return SvxBackgroundTabPage::GetRanges; 1875 case RID_SVXPAGE_BORDER : 1876 return SvxBorderTabPage::GetRanges; 1877 case RID_SVXPAGE_CHAR_NAME : 1878 return SvxCharNamePage::GetRanges; 1879 case RID_SVXPAGE_CHAR_EFFECTS : 1880 return SvxCharEffectsPage::GetRanges; 1881 case RID_SVXPAGE_CHAR_POSITION : 1882 return SvxCharPositionPage::GetRanges; 1883 case RID_SVXPAGE_CHAR_TWOLINES : 1884 return SvxCharTwoLinesPage::GetRanges; 1885 case RID_SVXPAGE_NUMBERFORMAT : 1886 return SvxNumberFormatTabPage::GetRanges; 1887 case RID_SVXPAGE_PAGE : 1888 return SvxPageDescPage::GetRanges; 1889 case RID_SVXPAGE_ASIAN_LAYOUT: 1890 return SvxAsianLayoutPage::GetRanges; 1891 default: 1892 break; 1893 } 1894 1895 return 0; 1896 } 1897 1898 SfxAbstractInsertObjectDialog* AbstractDialogFactory_Impl::CreateInsertObjectDialog( Window* pParent, const rtl::OUString& rCommand, 1899 const Reference < com::sun::star::embed::XStorage >& xStor, 1900 const SvObjectServerList* pList ) 1901 { 1902 InsertObjectDialog_Impl* pDlg=0; 1903 if ( rCommand.equalsAscii(".uno:InsertObject" ) ) 1904 pDlg = new SvInsertOleDlg( pParent, xStor, pList ); 1905 else if ( rCommand.equalsAscii(".uno:InsertPlugin" ) ) 1906 pDlg = new SvInsertPlugInDialog( pParent, xStor ); 1907 else if ( rCommand.equalsAscii(".uno:InsertObjectFloatingFrame" ) ) 1908 pDlg = new SfxInsertFloatingFrameDialog( pParent, xStor ); 1909 1910 if ( pDlg ) 1911 { 1912 pDlg->SetHelpId( rtl::OString( rCommand, rCommand.getLength(), RTL_TEXTENCODING_UTF8 ) ); 1913 return new AbstractInsertObjectDialog_Impl( pDlg ); 1914 } 1915 return 0; 1916 } 1917 1918 VclAbstractDialog* AbstractDialogFactory_Impl::CreateEditObjectDialog( Window* pParent, const rtl::OUString& rCommand, 1919 const Reference < com::sun::star::embed::XEmbeddedObject >& xObj ) 1920 { 1921 InsertObjectDialog_Impl* pDlg=0; 1922 if ( rCommand.equalsAscii(".uno:InsertObjectFloatingFrame" ) ) 1923 { 1924 pDlg = new SfxInsertFloatingFrameDialog( pParent, xObj ); 1925 pDlg->SetHelpId( rtl::OString( rCommand, rCommand.getLength(), RTL_TEXTENCODING_UTF8 ) ); 1926 return new VclAbstractDialog_Impl( pDlg ); 1927 } 1928 return 0; 1929 } 1930 1931 1932 1933 SfxAbstractPasteDialog* AbstractDialogFactory_Impl::CreatePasteDialog( Window* pParent ) 1934 { 1935 return new AbstractPasteDialog_Impl( new SvPasteObjectDialog( pParent ) ); 1936 } 1937 1938 SfxAbstractLinksDialog* AbstractDialogFactory_Impl::CreateLinksDialog( Window* pParent, sfx2::LinkManager* pMgr, sal_Bool bHTML, sfx2::SvBaseLink* p) 1939 { 1940 SvBaseLinksDlg* pLinkDlg = new SvBaseLinksDlg( pParent, pMgr, bHTML ); 1941 if ( p ) 1942 pLinkDlg->SetActLink(p); 1943 return new AbstractLinksDialog_Impl( pLinkDlg ); 1944 } 1945 1946 SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateSvxFormatCellsDialog( Window* pParent, const SfxItemSet* pAttr, SdrModel* pModel, const SdrObject* /*pObj*/ ) 1947 { 1948 return new AbstractTabDialog_Impl( new SvxFormatCellsDialog( pParent, pAttr, pModel ) ); 1949 } 1950 1951 SvxAbstractSplittTableDialog* AbstractDialogFactory_Impl::CreateSvxSplittTableDialog( Window* pParent, bool bIsTableVertical, long nMaxVertical, long nMaxHorizontal ) 1952 { 1953 return new SvxSplitTableDlg( pParent, bIsTableVertical, nMaxVertical, nMaxHorizontal ); 1954 } 1955 1956 SvxAbstractNewTableDialog* AbstractDialogFactory_Impl::CreateSvxNewTableDialog( Window* pParent ) 1957 { 1958 return new SvxNewTableDialog( pParent ); 1959 } 1960 1961 VclAbstractDialog* AbstractDialogFactory_Impl::CreateOptionsDialog( 1962 Window* pParent, const rtl::OUString& rExtensionId, const rtl::OUString& /*rApplicationContext*/ ) 1963 { 1964 return new VclAbstractDialog_Impl( new OfaTreeOptionsDialog( pParent, rExtensionId ) ); 1965 } 1966 1967 SvxAbstractInsRowColDlg* AbstractDialogFactory_Impl::CreateSvxInsRowColDlg( Window* pParent, bool bCol, const rtl::OString& sHelpId ) 1968 { 1969 return new SvxInsRowColDlg( pParent, bCol, sHelpId ); 1970 } 1971 1972 AbstractPasswordToOpenModifyDialog * AbstractDialogFactory_Impl::CreatePasswordToOpenModifyDialog( 1973 Window * pParent, 1974 sal_uInt16 nMinPasswdLen, sal_uInt16 nMaxPasswdLen, bool bIsPasswordToModify ) 1975 { 1976 PasswordToOpenModifyDialog * pDlg = new PasswordToOpenModifyDialog( pParent, nMinPasswdLen, nMaxPasswdLen, bIsPasswordToModify ); 1977 return new AbstractPasswordToOpenModifyDialog_Impl( pDlg ); 1978 } 1979 1980 1981