diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-06-05 03:08:09 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-06-05 03:08:59 +0200 |
commit | 57e35b0ed54a2e74c107493869e72ab7eb86222a (patch) | |
tree | 2b56d8fb9b79832b2b6979cb8e6521b1c7b8d82f | |
parent | 35b1d1a9b47abb8cb3b45d4c6351d1c2b86b379f (diff) |
fix some issues with sort dlg patch
Change-Id: Iba2839ec04a79b8fa49968aebb194f9dc6799d4d
-rw-r--r-- | sc/source/ui/dbgui/sortdlg.cxx | 1 | ||||
-rw-r--r-- | sc/source/ui/dbgui/sortkeydlg.cxx | 1 | ||||
-rw-r--r-- | sc/source/ui/dbgui/tpsort.cxx | 17 | ||||
-rw-r--r-- | sc/source/ui/inc/sortdlg.hxx | 6 | ||||
-rw-r--r-- | sc/source/ui/inc/tpsort.hxx | 12 |
5 files changed, 11 insertions, 26 deletions
diff --git a/sc/source/ui/dbgui/sortdlg.cxx b/sc/source/ui/dbgui/sortdlg.cxx index a057c195c888..3a4f4465afc7 100644 --- a/sc/source/ui/dbgui/sortdlg.cxx +++ b/sc/source/ui/dbgui/sortdlg.cxx @@ -43,7 +43,6 @@ ScSortDlg::ScSortDlg( Window* pParent, pArgSet ), bIsHeaders ( false ), bIsByRows ( false ) - { AddTabPage( TP_FIELDS, ScTabPageSortFields::Create, 0 ); AddTabPage( TP_OPTIONS, ScTabPageSortOptions::Create, 0 ); diff --git a/sc/source/ui/dbgui/sortkeydlg.cxx b/sc/source/ui/dbgui/sortkeydlg.cxx index 0801b8de789c..29e69d0c0858 100644 --- a/sc/source/ui/dbgui/sortkeydlg.cxx +++ b/sc/source/ui/dbgui/sortkeydlg.cxx @@ -86,6 +86,7 @@ ScSortKeyWindow::ScSortKeyWindow( Window* pParent, const ResId& rResId, ScSortKe ScSortKeyWindow::~ScSortKeyWindow() { + mrSortKeyItems.clear(); } // ----------------------------------------------------------------------- diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx index 1afe9bd04877..303d6c6b8efb 100644 --- a/sc/source/ui/dbgui/tpsort.cxx +++ b/sc/source/ui/dbgui/tpsort.cxx @@ -227,13 +227,6 @@ sal_Bool ScTabPageSortFields::FillItemSet( SfxItemSet& rArgSet ) { ScSortParam aNewSortData = aSortData; - if (pDlg) - { - const SfxItemSet* pExample = pDlg->GetExampleSet(); - const SfxPoolItem* pItem; - if ( pExample && pExample->GetItemState( nWhichSort, sal_True, &pItem ) == SFX_ITEM_SET ) - aNewSortData = static_cast<const ScSortItem*>(pItem)->GetSortData(); - } std::vector<sal_uInt16> nSortPos; for ( sal_uInt16 i=0; i<nSortKeyCount; i++ ) @@ -631,8 +624,7 @@ void ScTabPageSortOptions::Init() // ----------------------------------------------------------------------- -SfxTabPage* ScTabPageSortOptions::Create( - Window* pParent, +SfxTabPage* ScTabPageSortOptions::Create( Window* pParent, const SfxItemSet& rArgSet ) { return ( new ScTabPageSortOptions( pParent, rArgSet ) ); @@ -715,13 +707,6 @@ sal_Bool ScTabPageSortOptions::FillItemSet( SfxItemSet& rArgSet ) // Create local copy of ScParam ScSortParam aNewSortData = aSortData; - if (pDlg) - { - const SfxItemSet* pExample = pDlg->GetExampleSet(); - const SfxPoolItem* pItem; - if ( pExample && pExample->GetItemState( nWhichSort, sal_True, &pItem ) == SFX_ITEM_SET ) - aNewSortData = static_cast<const ScSortItem*>(pItem)->GetSortData(); - } aNewSortData.bByRow = aBtnTopDown.IsChecked(); aNewSortData.bHasHeader = aBtnHeader.IsChecked(); aNewSortData.bCaseSens = aBtnCase.IsChecked(); diff --git a/sc/source/ui/inc/sortdlg.hxx b/sc/source/ui/inc/sortdlg.hxx index 2ae6adb5c2c8..004c178f3e3c 100644 --- a/sc/source/ui/inc/sortdlg.hxx +++ b/sc/source/ui/inc/sortdlg.hxx @@ -38,9 +38,9 @@ class ScSortDlg : public SfxTabDialog { public: - ScSortDlg( Window* pParent, - const SfxItemSet* pArgSet ); - ~ScSortDlg(); + ScSortDlg( Window* pParent, + const SfxItemSet* pArgSet ); + virtual ~ScSortDlg(); void SetHeaders( sal_Bool bHeaders ); void SetByRows ( sal_Bool bByRows ); diff --git a/sc/source/ui/inc/tpsort.hxx b/sc/source/ui/inc/tpsort.hxx index 8930d16892dd..14fce4efb4d1 100644 --- a/sc/source/ui/inc/tpsort.hxx +++ b/sc/source/ui/inc/tpsort.hxx @@ -59,9 +59,9 @@ struct ScSortParam; class ScTabPageSortFields : public SfxTabPage { public: - ScTabPageSortFields( Window* pParent, - const SfxItemSet& rArgSet ); - ~ScTabPageSortFields(); + ScTabPageSortFields( Window* pParent, + const SfxItemSet& rArgSet ); + virtual ~ScTabPageSortFields(); static SfxTabPage* Create ( Window* pParent, const SfxItemSet& rArgSet ); @@ -120,9 +120,9 @@ class CollatorWrapper; class ScTabPageSortOptions : public SfxTabPage { public: - ScTabPageSortOptions( Window* pParent, - const SfxItemSet& rArgSet ); - ~ScTabPageSortOptions(); + ScTabPageSortOptions( Window* pParent, + const SfxItemSet& rArgSet ); + virtual ~ScTabPageSortOptions(); #undef SfxTabPage #define SfxTabPage ::SfxTabPage |