summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/AllLangResTarget_sc.mk1
-rw-r--r--sc/UIConfig_scalc.mk1
-rw-r--r--sc/inc/sc.hrc2
-rw-r--r--sc/inc/scabstdlg.hxx3
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.cxx18
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.hxx3
-rw-r--r--sc/source/ui/dbgui/sortdlg.cxx32
-rw-r--r--sc/source/ui/dbgui/sortkeydlg.cxx1
-rw-r--r--sc/source/ui/dbgui/tpsort.cxx1
-rw-r--r--sc/source/ui/inc/sortdlg.hrc35
-rw-r--r--sc/source/ui/inc/sortdlg.hxx19
-rw-r--r--sc/source/ui/inc/sortkeydlg.hxx1
-rw-r--r--sc/source/ui/src/sortdlg.src77
-rw-r--r--sc/source/ui/view/cellsh2.cxx8
-rw-r--r--sc/uiconfig/scalc/ui/sortdialog.ui133
15 files changed, 157 insertions, 178 deletions
diff --git a/sc/AllLangResTarget_sc.mk b/sc/AllLangResTarget_sc.mk
index e2ddb93690ad..315ae34898c2 100644
--- a/sc/AllLangResTarget_sc.mk
+++ b/sc/AllLangResTarget_sc.mk
@@ -50,7 +50,6 @@ $(eval $(call gb_SrsTarget_add_files,sc/res,\
sc/source/ui/src/miscdlgs.src \
sc/source/ui/src/tabopdlg.src \
sc/source/ui/src/scstring.src \
- sc/source/ui/src/sortdlg.src \
sc/source/ui/src/filter.src \
sc/source/ui/src/condformatdlg.src \
sc/source/ui/src/condformatmgr.src \
diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk
index 8e1cb1386a6b..248e8b121c8d 100644
--- a/sc/UIConfig_scalc.mk
+++ b/sc/UIConfig_scalc.mk
@@ -129,6 +129,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
sc/uiconfig/scalc/ui/sidebarcellappearance \
sc/uiconfig/scalc/ui/solverdlg \
sc/uiconfig/scalc/ui/sortcriteriapage \
+ sc/uiconfig/scalc/ui/sortdialog \
sc/uiconfig/scalc/ui/sortkey \
sc/uiconfig/scalc/ui/sortoptionspage \
sc/uiconfig/scalc/ui/sortwarning \
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index dafcf69268f2..e7571856be36 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -988,8 +988,6 @@
#define BMP_END (BMP_START + 100)
#define SC_DIALOGS_START (BMP_END)
-#define RID_SCDLG_SORT (SC_DIALOGS_START + 5)
-#define RID_SCPAGE_SORT_FIELDS (SC_DIALOGS_START + 6)
#define RID_SCDLG_FILTER (SC_DIALOGS_START + 8)
diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index 84146181b299..70bf91578694 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -502,8 +502,7 @@ public:
virtual SfxAbstractTabDialog * CreateScValidationDlg( Window* pParent,
const SfxItemSet* pArgSet,int nId, ScTabViewShell *pTabVwSh ) = 0;
- virtual SfxAbstractTabDialog * CreateScSortDlg( Window* pParent,
- const SfxItemSet* pArgSet,int nId ) = 0;
+ virtual SfxAbstractTabDialog * CreateScSortDlg(Window* pParent, const SfxItemSet* pArgSet) = 0;
// for tabpage
virtual CreateTabPage GetTabPageCreatorFunc( sal_uInt16 nId ) = 0;
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index cf31147be055..931de9f0010d 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -1217,22 +1217,10 @@ SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScValidationDlg( Wind
return 0;
}
-SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScSortDlg( Window* pParent,
- const SfxItemSet* pArgSet,int nId )
+SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScSortDlg(Window* pParent, const SfxItemSet* pArgSet)
{
- SfxTabDialog* pDlg=NULL;
- switch ( nId )
- {
- case RID_SCDLG_SORT :
- pDlg = new ScSortDlg( pParent, pArgSet );
- break;
- default:
- break;
- }
-
- if ( pDlg )
- return new ScAbstractTabDialog_Impl( pDlg );
- return 0;
+ SfxTabDialog* pDlg = new ScSortDlg( pParent, pArgSet );
+ return new ScAbstractTabDialog_Impl( pDlg );
}
#undef SfxTabDialog
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index 55b8ab45de0b..4b5ae12f0b12 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -570,8 +570,7 @@ public:
virtual SfxAbstractTabDialog * CreateScValidationDlg( Window* pParent,
const SfxItemSet* pArgSet,int nId, ScTabViewShell *pTabVwSh );
- virtual SfxAbstractTabDialog * CreateScSortDlg( Window* pParent,
- const SfxItemSet* pArgSet,int nId );
+ virtual SfxAbstractTabDialog * CreateScSortDlg(Window* pParent, const SfxItemSet* pArgSet);
// For TabPage
virtual CreateTabPage GetTabPageCreatorFunc( sal_uInt16 nId );
diff --git a/sc/source/ui/dbgui/sortdlg.cxx b/sc/source/ui/dbgui/sortdlg.cxx
index 683c267394c6..10ba466b96f6 100644
--- a/sc/source/ui/dbgui/sortdlg.cxx
+++ b/sc/source/ui/dbgui/sortdlg.cxx
@@ -25,30 +25,20 @@
#include "tpsort.hxx"
#include "sortdlg.hxx"
#include "scresid.hxx"
-#include "sortdlg.hrc"
-ScSortDlg::ScSortDlg( Window* pParent,
- const SfxItemSet* pArgSet ) :
- SfxTabDialog( pParent,
- ScResId( RID_SCDLG_SORT ),
- pArgSet ),
- bIsHeaders ( false ),
- bIsByRows ( false )
-{
- AddTabPage( TP_FIELDS, ScTabPageSortFields::Create, 0 );
- AddTabPage( TP_OPTIONS, ScTabPageSortOptions::Create, 0 );
- FreeResource();
-}
-
-ScSortDlg::~ScSortDlg()
+ScSortDlg::ScSortDlg(Window* pParent, const SfxItemSet* pArgSet)
+ : SfxTabDialog(pParent, "SortDialog", "modules/scalc/ui/sortdialog.ui", pArgSet)
+ , bIsHeaders(false)
+ , bIsByRows(false)
{
+ AddTabPage("criteria", ScTabPageSortFields::Create, 0);
+ AddTabPage("options", ScTabPageSortOptions::Create, 0);
}
//==================================================================
-ScSortWarningDlg::ScSortWarningDlg( Window* pParent,
- const OUString& rExtendText,
- const OUString& rCurrentText ):
- ModalDialog ( pParent, "SortWarning", "modules/scalc/ui/sortwarning.ui" )
+ScSortWarningDlg::ScSortWarningDlg(Window* pParent,
+ const OUString& rExtendText, const OUString& rCurrentText)
+ : ModalDialog(pParent, "SortWarning", "modules/scalc/ui/sortwarning.ui")
{
get(aFtText, "sorttext" );
get( aBtnExtSort, "extend" );
@@ -63,10 +53,6 @@ ScSortWarningDlg::ScSortWarningDlg( Window* pParent,
aBtnCurSort->SetClickHdl( LINK( this, ScSortWarningDlg, BtnHdl ) );
}
-ScSortWarningDlg::~ScSortWarningDlg()
-{
-}
-
IMPL_LINK( ScSortWarningDlg, BtnHdl, PushButton*, pBtn )
{
if ( pBtn == aBtnExtSort )
diff --git a/sc/source/ui/dbgui/sortkeydlg.cxx b/sc/source/ui/dbgui/sortkeydlg.cxx
index b235b213894c..9b2bd5fb6ca6 100644
--- a/sc/source/ui/dbgui/sortkeydlg.cxx
+++ b/sc/source/ui/dbgui/sortkeydlg.cxx
@@ -9,7 +9,6 @@
#include "sortkeydlg.hxx"
#include "sortdlg.hxx"
-#include "sortdlg.hrc"
#include <vcl/layout.hxx>
// =======================================================================
diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index 16bf1793d818..db1ca03444a3 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -43,7 +43,6 @@
#include "sortkeydlg.hxx"
#include "sortdlg.hxx"
-#include "sortdlg.hrc"
#define _TPSORT_CXX
#include "tpsort.hxx"
diff --git a/sc/source/ui/inc/sortdlg.hrc b/sc/source/ui/inc/sortdlg.hrc
deleted file mode 100644
index 4b9186f2494a..000000000000
--- a/sc/source/ui/inc/sortdlg.hrc
+++ /dev/null
@@ -1,35 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-
-#include "sc.hrc"
- // -> RID_SCPAGE_SORT_FIELDS
- // -> SCSTR_NONAME
- // -> SCSTR_UNDEFINED
- // -> SCSTR_FIELD
-
-#define TP_FIELDS 1
-#define TP_OPTIONS 2
-
-// TP_SORT_FIELDS:
-#define CTRL_MANAGESORTKEY 1
-#define WIN_MANAGESORTKEY 2
-#define SB_SORT 3
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/sortdlg.hxx b/sc/source/ui/inc/sortdlg.hxx
index 5b46b5ff4536..f110b379b4b1 100644
--- a/sc/source/ui/inc/sortdlg.hxx
+++ b/sc/source/ui/inc/sortdlg.hxx
@@ -29,31 +29,22 @@
class ScSortDlg : public SfxTabDialog
{
public:
- ScSortDlg( Window* pParent,
- const SfxItemSet* pArgSet );
- virtual ~ScSortDlg();
-
- void SetHeaders( sal_Bool bHeaders );
- void SetByRows ( sal_Bool bByRows );
- sal_Bool GetHeaders() const;
- sal_Bool GetByRows () const;
+ ScSortDlg(Window* pParent, const SfxItemSet* pArgSet);
+ void SetHeaders( sal_Bool bHeaders ) { bIsHeaders = bHeaders; }
+ void SetByRows ( sal_Bool bByRows ) { bIsByRows = bByRows; }
+ sal_Bool GetHeaders() const { return bIsHeaders; }
+ sal_Bool GetByRows () const { return bIsByRows; }
private:
sal_Bool bIsHeaders;
sal_Bool bIsByRows;
};
-inline void ScSortDlg::SetHeaders( sal_Bool bHeaders ) { bIsHeaders = bHeaders; }
-inline void ScSortDlg::SetByRows ( sal_Bool bByRows ) { bIsByRows = bByRows; }
-inline sal_Bool ScSortDlg::GetHeaders() const { return bIsHeaders; }
-inline sal_Bool ScSortDlg::GetByRows () const { return bIsByRows; }
-
class ScSortWarningDlg : public ModalDialog
{
public:
ScSortWarningDlg( Window* pParent, const OUString& rExtendText,const OUString& rCurrentText );
- ~ScSortWarningDlg();
DECL_LINK( BtnHdl, PushButton* );
private:
FixedText* aFtText;
diff --git a/sc/source/ui/inc/sortkeydlg.hxx b/sc/source/ui/inc/sortkeydlg.hxx
index 88e6012cc1a9..849ee46e9b69 100644
--- a/sc/source/ui/inc/sortkeydlg.hxx
+++ b/sc/source/ui/inc/sortkeydlg.hxx
@@ -13,7 +13,6 @@
#include <boost/ptr_container/ptr_vector.hpp>
#include "anyrefdg.hxx"
-#include "sortdlg.hrc"
#include <vcl/edit.hxx>
#include <vcl/fixed.hxx>
diff --git a/sc/source/ui/src/sortdlg.src b/sc/source/ui/src/sortdlg.src
deleted file mode 100644
index cf8e351c7a79..000000000000
--- a/sc/source/ui/src/sortdlg.src
+++ /dev/null
@@ -1,77 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#include "sortdlg.hrc"
-
-TabDialog RID_SCDLG_SORT
-{
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 220 , 175 ) ;
- Text [ en-US ] = "Sort" ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = FALSE ;
- TabControl 1
- {
- OutputSize = TRUE ;
- Pos = MAP_APPFONT ( 0 , 0 ) ;
- Size = MAP_APPFONT ( 210 , 170 ) ;
- PageList =
- {
- PageItem
- {
- Identifier = TP_FIELDS ;
- PageResID = TP_FIELDS ;
- Text [ en-US ] = "Sort Criteria" ;
- };
- PageItem
- {
- Identifier = TP_OPTIONS ;
- PageResID = TP_OPTIONS ;
- Text [ en-US ] = "Options" ;
- };
- };
- };
- OKButton 1
- {
- Pos = MAP_APPFONT ( 3 , 157 ) ;
- Size = MAP_APPFONT ( 40 , 12 ) ;
- TabStop = TRUE ;
- };
- CancelButton 1
- {
- Pos = MAP_APPFONT ( 49 , 157 ) ;
- Size = MAP_APPFONT ( 40 , 12 ) ;
- TabStop = TRUE ;
- };
- PushButton 1
- {
- Pos = MAP_APPFONT ( 137 , 157 ) ;
- Size = MAP_APPFONT ( 40 , 12 ) ;
- TabStop = TRUE ;
- };
- HelpButton 1
- {
- Pos = MAP_APPFONT ( 94 , 157 ) ;
- Size = MAP_APPFONT ( 40 , 12 ) ;
- TabStop = TRUE ;
- };
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index 1b5aa69a8f8e..c408e2049a6b 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -475,11 +475,11 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
aArgSet.Put( ScSortItem( SCITEM_SORTDATA, GetViewData(), &aSortParam ) );
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
+ assert(pFact); //ScAbstractFactory create fail!
- pDlg = pFact->CreateScSortDlg( pTabViewShell->GetDialogParent(), &aArgSet, RID_SCDLG_SORT );
- OSL_ENSURE(pDlg, "Dialog create fail!");
- pDlg->SetCurPageId(1); // 1=sort field tab 2=sort options tab
+ pDlg = pFact->CreateScSortDlg(pTabViewShell->GetDialogParent(), &aArgSet);
+ assert(pDlg); //Dialog create fail!
+ pDlg->SetCurPageId("criteria"); // 1=sort field tab 2=sort options tab
if ( pDlg->Execute() == RET_OK )
{
diff --git a/sc/uiconfig/scalc/ui/sortdialog.ui b/sc/uiconfig/scalc/ui/sortdialog.ui
new file mode 100644
index 000000000000..ed4c764825d2
--- /dev/null
+++ b/sc/uiconfig/scalc/ui/sortdialog.ui
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkDialog" id="SortDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Sort</property>
+ <property name="type_hint">dialog</property>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="dialog-vbox1">
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="ok">
+ <property name="label">gtk-ok</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="cancel">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="help">
+ <property name="label">gtk-help</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="reset">
+ <property name="label">gtk-revert-to-saved</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkNotebook" id="tabcontrol">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="criteria">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Sort Criteria</property>
+ </object>
+ <packing>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="options">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Options</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">ok</action-widget>
+ <action-widget response="0">cancel</action-widget>
+ <action-widget response="0">help</action-widget>
+ <action-widget response="0">reset</action-widget>
+ </action-widgets>
+ </object>
+</interface>