diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-11-24 14:59:06 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-11-25 15:39:43 +0100 |
commit | 3a713e78a03f8200668ce146b153e12384de5bee (patch) | |
tree | 2950679f7bfbbd425f60523f8f81bbbff8d58720 /sfx2 | |
parent | 18547e80610f426c30390408e3fcd1d9e45b67e3 (diff) |
SfxStyleDialog is now unused
Change-Id: I2aa33c6bb53577b84373f7f920f7c6db22cd7cca
Reviewed-on: https://gerrit.libreoffice.org/63975
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/dialog/mgetempl.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/styledlg.cxx | 104 |
2 files changed, 1 insertions, 105 deletions
diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index 22cec980a06a..73dd20d49cf6 100644 --- a/sfx2/source/dialog/mgetempl.cxx +++ b/sfx2/source/dialog/mgetempl.cxx @@ -48,7 +48,7 @@ */ SfxManageStyleSheetPage::SfxManageStyleSheetPage(TabPageParent pParent, const SfxItemSet& rAttrSet) : SfxTabPage(pParent, "sfx/ui/managestylepage.ui", "ManageStylePage", &rAttrSet) - , pStyle(pParent.pPage ? &static_cast<SfxStyleDialogController*>(pParent.pController)->GetStyleSheet() : &static_cast<SfxStyleDialog*>(GetParentDialog())->GetStyleSheet()) + , pStyle(&static_cast<SfxStyleDialogController*>(pParent.pController)->GetStyleSheet()) , pItem(nullptr) , bModified(false) , aName(pStyle->GetName()) diff --git a/sfx2/source/dialog/styledlg.cxx b/sfx2/source/dialog/styledlg.cxx index 00ccaff9a7c2..f4b5acd01601 100644 --- a/sfx2/source/dialog/styledlg.cxx +++ b/sfx2/source/dialog/styledlg.cxx @@ -27,110 +27,6 @@ #include <sfx2/strings.hrc> -// class SfxStyleDialog -------------------------------------------------- - -SfxStyleDialog::SfxStyleDialog -( - vcl::Window* pParent, // Parent - const OUString& rID, const OUString& rUIXMLDescription, - SfxStyleSheetBase& rStyle // stylesheet to be processed -) - -/* [Description] - - Constructor: Add Manage TabPage, set ExampleSet from style. -*/ - - : SfxTabDialog(pParent, rID, rUIXMLDescription, - &rStyle.GetItemSet(), true) - , pStyle( &rStyle ) - -{ - // without ParentSupport suppress the standardButton - if (!rStyle.HasParentSupport()) - RemoveStandardButton(); - - m_nOrganizerId = AddTabPage("organizer", SfxManageStyleSheetPage::Create, nullptr); - - // With new template always set the management page as the current page - - if( rStyle.GetName().isEmpty() ) - SetCurPageId(m_nOrganizerId); - else - { - OUString sTxt = GetText() + ": " + rStyle.GetName(); - SetText( sTxt ); - } - delete m_pExampleSet; // in SfxTabDialog::Ctor() already created - m_pExampleSet = &pStyle->GetItemSet(); - - GetCancelButton().SetClickHdl( LINK(this, SfxStyleDialog, CancelHdl) ); -} - - -SfxStyleDialog::~SfxStyleDialog() -{ - disposeOnce(); -} - -/* [Description] - - Destructor: set ExampleSet to NULL, so that SfxTabDialog does not delete - the Set from Style. -*/ - -void SfxStyleDialog::dispose() -{ - m_pExampleSet = nullptr; - pStyle = nullptr; - SfxTabDialog::dispose(); -} - - -short SfxStyleDialog::Ok() - -/* [Description] - - Override so that always RET_OK is returned. -*/ - -{ - SfxTabDialog::Ok(); - return RET_OK; -} - - -IMPL_LINK_NOARG( SfxStyleDialog, CancelHdl, Button *, void ) - -/* [Description] - - If the dialogue was canceled, then all selected attributes must be reset - again. -*/ - -{ - SfxTabPage* pPage = GetTabPage(m_nOrganizerId); - - const SfxItemSet* pInSet = GetInputSetImpl(); - SfxWhichIter aIter( *pInSet ); - sal_uInt16 nWhich = aIter.FirstWhich(); - - while ( nWhich ) - { - SfxItemState eState = pInSet->GetItemState( nWhich, false ); - - if ( SfxItemState::DEFAULT == eState ) - m_pExampleSet->ClearItem( nWhich ); - else - m_pExampleSet->Put( pInSet->Get( nWhich ) ); - nWhich = aIter.NextWhich(); - } - - if ( pPage ) - pPage->Reset( GetInputSetImpl() ); - EndDialog(); -} - /* [Description] Constructor: Add Manage TabPage, set ExampleSet from style. |