include/sfx2/mgetempl.hxx       |    1 
 include/sfx2/styledlg.hxx       |   20 -------
 sfx2/source/dialog/mgetempl.cxx |    2 
 sfx2/source/dialog/styledlg.cxx |  104 ----------------------------------------
 4 files changed, 1 insertion(+), 126 deletions(-)

New commits:
commit 58fcd98bd0b66281c6c8a7b55054d8341c2da394
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Sat Nov 24 14:59:06 2018 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Mon Nov 26 09:51:54 2018 +0100

    SfxStyleDialog is now unused
    
    Change-Id: I2aa33c6bb53577b84373f7f920f7c6db22cd7cca
    Reviewed-on: https://gerrit.libreoffice.org/63987
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/include/sfx2/mgetempl.hxx b/include/sfx2/mgetempl.hxx
index bce77d1d5965..3d88a8a524b3 100644
--- a/include/sfx2/mgetempl.hxx
+++ b/include/sfx2/mgetempl.hxx
@@ -62,7 +62,6 @@ class SfxManageStyleSheetPage final : public SfxTabPage
     std::unique_ptr<weld::Label> m_xDescFt;
     std::unique_ptr<weld::Label> m_xNameFt;
 
-friend class SfxStyleDialog;
 friend class SfxStyleDialogController;
 
     DECL_LINK(GetFocusHdl, weld::Widget&, void);
diff --git a/include/sfx2/styledlg.hxx b/include/sfx2/styledlg.hxx
index e86c6450e355..eb91875c5702 100644
--- a/include/sfx2/styledlg.hxx
+++ b/include/sfx2/styledlg.hxx
@@ -26,26 +26,6 @@
 class SfxStyleSheetBase;
 class SfxStyleSheetBasePool;
 
-class SFX2_DLLPUBLIC SfxStyleDialog: public SfxTabDialog
-{
-private:
-    SfxStyleSheetBase*          pStyle;
-    DECL_DLLPRIVATE_LINK( CancelHdl, Button *, void );
-    sal_uInt16 m_nOrganizerId;
-
-public:
-    SfxStyleDialog(vcl::Window* pParent, const OUString& rID,
-        const OUString& rUIXMLDescription, SfxStyleSheetBase&);
-
-    virtual ~SfxStyleDialog() override;
-    virtual void dispose() override;
-
-    SfxStyleSheetBase&          GetStyleSheet() { return *pStyle; }
-    const SfxStyleSheetBase&    GetStyleSheet() const { return *pStyle; }
-
-    virtual short               Ok() override;
-};
-
 class SFX2_DLLPUBLIC SfxStyleDialogController : public SfxTabDialogController
 {
 private:
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.
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to