summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-11-24 14:59:06 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-11-26 09:51:54 +0100
commit58fcd98bd0b66281c6c8a7b55054d8341c2da394 (patch)
treec26f0cde99036363c9ea1fdc1ebab988e1479f97 /sfx2
parentf96642075d22ff77d00dddce50e8dd3861a61fdc (diff)
SfxStyleDialog is now unused
Change-Id: I2aa33c6bb53577b84373f7f920f7c6db22cd7cca Reviewed-on: https://gerrit.libreoffice.org/63987 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.cxx2
-rw-r--r--sfx2/source/dialog/styledlg.cxx104
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.