summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.cxx20
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.hxx9
-rw-r--r--sc/source/ui/dbgui/sortdlg.cxx25
-rw-r--r--sc/source/ui/inc/sortdlg.hrc7
-rw-r--r--sc/source/ui/inc/sortdlg.hxx8
-rw-r--r--sc/source/ui/src/sortdlg.src48
-rw-r--r--sc/source/ui/view/cellsh2.cxx2
7 files changed, 27 insertions, 92 deletions
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index acf411bd3540..1283a3b0f290 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -109,6 +109,7 @@ IMPL_ABSTDLG_BASE(AbstractScDPDateGroupDlg_Impl);
IMPL_ABSTDLG_BASE(AbstractScDPShowDetailDlg_Impl);
IMPL_ABSTDLG_BASE(AbstractScNewScenarioDlg_Impl);
IMPL_ABSTDLG_BASE(AbstractScShowTabDlg_Impl);
+IMPL_ABSTDLG_BASE(AbstractScSortWarningDlg_Impl);
IMPL_ABSTDLG_BASE(AbstractScStringInputDlg_Impl);
IMPL_ABSTDLG_BASE(AbstractScTabBgColorDlg_Impl);
IMPL_ABSTDLG_BASE(AbstractScImportOptionsDlg_Impl);
@@ -729,23 +730,10 @@ VclAbstractDialog * ScAbstractDialogFactory_Impl::CreateScColOrRowDlg(Window*
return 0;
}
-
-
-VclAbstractDialog * ScAbstractDialogFactory_Impl::CreateScSortWarningDlg( Window* pParent, const String& rExtendText,
- const String& rCurrentText, int nId )
+AbstractScSortWarningDlg* ScAbstractDialogFactory_Impl::CreateScSortWarningDlg( Window* pParent, const String& rExtendText, const String& rCurrentText )
{
- Dialog * pDlg=NULL;
- switch ( nId )
- {
- case RID_SCDLG_SORT_WARNING:
- pDlg = new ScSortWarningDlg( pParent, rExtendText, rCurrentText );
- break;
- default:
- break;
- }
- if( pDlg )
- return new ScVclAbstractDialog_Impl( pDlg );
- return 0;
+ ScSortWarningDlg* pDlg = new ScSortWarningDlg(pParent, rExtendText, rCurrentText );
+ return new AbstractScSortWarningDlg_Impl( pDlg );
}
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index d4ea5ef2775b..14c263fe4f73 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -47,6 +47,7 @@ class ScDPSubtotalDlg;
class ScDPNumGroupDlg;
class ScDPDateGroupDlg;
class ScDPShowDetailDlg;
+class ScSortWarningDlg;
class ScNewScenarioDlg;
class ScShowTabDlg;
class ScStringInputDlg;
@@ -343,6 +344,12 @@ class AbstractScShowTabDlg_Impl : public AbstractScShowTabDlg //add for ScShowT
virtual sal_uInt16 GetSelectEntryPos(sal_uInt16 nPos) const;
};
+class AbstractScSortWarningDlg_Impl : public AbstractScSortWarningDlg
+{
+ DECL_ABSTDLG_BASE( AbstractScSortWarningDlg_Impl, ScSortWarningDlg )
+};
+
+
class AbstractScStringInputDlg_Impl : public AbstractScStringInputDlg //add for ScStringInputDlg
{
DECL_ABSTDLG_BASE( AbstractScStringInputDlg_Impl, ScStringInputDlg )
@@ -412,7 +419,7 @@ public:
int nId,
sal_Bool bColDefault = sal_True );
- virtual VclAbstractDialog * CreateScSortWarningDlg( Window* pParent, const String& rExtendText, const String& rCurrentText, int nId );
+ virtual AbstractScSortWarningDlg * CreateScSortWarningDlg(Window* pParent, const String& rExtendText, const String& rCurrentText );
virtual AbstractScCondFormatManagerDlg* CreateScCondFormatMgrDlg(Window* pParent, ScDocument* pDoc, const ScConditionalFormatList* pFormatList,
const ScAddress& rPos, int nId );
diff --git a/sc/source/ui/dbgui/sortdlg.cxx b/sc/source/ui/dbgui/sortdlg.cxx
index 171a78591008..d096e4e370b2 100644
--- a/sc/source/ui/dbgui/sortdlg.cxx
+++ b/sc/source/ui/dbgui/sortdlg.cxx
@@ -48,22 +48,19 @@ ScSortDlg::~ScSortDlg()
ScSortWarningDlg::ScSortWarningDlg( Window* pParent,
const String& rExtendText,
const String& rCurrentText ):
- ModalDialog ( pParent, ScResId( RID_SCDLG_SORT_WARNING ) ),
- aFtText ( this, ScResId( FT_TEXT ) ),
- aFtTip ( this, ScResId( FT_TIP ) ),
- aBtnExtSort ( this, ScResId( BTN_EXTSORT ) ),
- aBtnCurSort ( this, ScResId( BTN_CURSORT ) ),
- aBtnCancel ( this, ScResId( BTN_CANCEL ) )
+ ModalDialog ( pParent, "SortWarning", "modules/scalc/ui/sortwarning.ui" )
{
- String sTextName = aFtText.GetText();
+ get(aFtText, "sorttext" );
+ get( aBtnExtSort, "extend" );
+ get( aBtnCurSort, "current" );
+
+ String sTextName = aFtText->GetText();
sTextName.SearchAndReplaceAscii("%1", rExtendText);
sTextName.SearchAndReplaceAscii("%2", rCurrentText);
- aFtText.SetText( sTextName );
-
- aBtnExtSort .SetClickHdl( LINK( this, ScSortWarningDlg, BtnHdl ) );
- aBtnCurSort .SetClickHdl( LINK( this, ScSortWarningDlg, BtnHdl ) );
+ aFtText->SetText( sTextName );
- FreeResource();
+ aBtnExtSort->SetClickHdl( LINK( this, ScSortWarningDlg, BtnHdl ) );
+ aBtnCurSort->SetClickHdl( LINK( this, ScSortWarningDlg, BtnHdl ) );
}
ScSortWarningDlg::~ScSortWarningDlg()
@@ -72,11 +69,11 @@ ScSortWarningDlg::~ScSortWarningDlg()
IMPL_LINK( ScSortWarningDlg, BtnHdl, PushButton*, pBtn )
{
- if ( pBtn == &aBtnExtSort )
+ if ( pBtn == aBtnExtSort )
{
EndDialog( BTN_EXTEND_RANGE );
}
- else if( pBtn == &aBtnCurSort )
+ else if( pBtn == aBtnCurSort )
{
EndDialog( BTN_CURRENT_SELECTION );
}
diff --git a/sc/source/ui/inc/sortdlg.hrc b/sc/source/ui/inc/sortdlg.hrc
index 15e5de6e4a55..d97022fc7c74 100644
--- a/sc/source/ui/inc/sortdlg.hrc
+++ b/sc/source/ui/inc/sortdlg.hrc
@@ -20,7 +20,6 @@
#include "sc.hrc" // -> RID_SCDLG_SORT
// -> RID_SCPAGE_SORT_FIELDS
- // -> RID_SCDLG_SORT_WARNING
// -> SCSTR_NONAME
// -> SCSTR_UNDEFINED
// -> SCSTR_FIELD
@@ -33,10 +32,4 @@
#define WIN_MANAGESORTKEY 2
#define SB_SORT 3
-#define FT_TEXT 1
-#define FT_TIP 2
-#define BTN_EXTSORT 3
-#define BTN_CURSORT 4
-#define BTN_CANCEL 5
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/sortdlg.hxx b/sc/source/ui/inc/sortdlg.hxx
index d38e51c73ed6..1023e7c68287 100644
--- a/sc/source/ui/inc/sortdlg.hxx
+++ b/sc/source/ui/inc/sortdlg.hxx
@@ -56,11 +56,9 @@ public:
~ScSortWarningDlg();
DECL_LINK( BtnHdl, PushButton* );
private:
- FixedText aFtText;
- FixedText aFtTip;
- PushButton aBtnExtSort;
- PushButton aBtnCurSort;
- CancelButton aBtnCancel;
+ FixedText* aFtText;
+ PushButton* aBtnExtSort;
+ PushButton* aBtnCurSort;
};
#endif // SC_SORTDLG_HXX
diff --git a/sc/source/ui/src/sortdlg.src b/sc/source/ui/src/sortdlg.src
index 6dc6eb6761ec..cf8e351c7a79 100644
--- a/sc/source/ui/src/sortdlg.src
+++ b/sc/source/ui/src/sortdlg.src
@@ -74,52 +74,4 @@ TabDialog RID_SCDLG_SORT
};
};
-ModalDialog RID_SCDLG_SORT_WARNING
-{
- HelpID = "sc:ModalDialog:RID_SCDLG_SORT_WARNING";
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 180 , 91 ) ;
- Text [ en-US ] = "Sort Range" ;
- Moveable = TRUE ;
- Closeable = FALSE ;
- FixedText FT_TEXT
- {
- Pos = MAP_APPFONT ( 8 , 3 ) ;
- Size = MAP_APPFONT ( 170 , 33 ) ;
- WordBreak = TRUE;
- Text [ en-US ] = "The cells next to the current selection also contain data. Do you want to extend the sort range to %1, or sort the currently selected range, %2?";
- };
- FixedText FT_TIP
- {
- Pos = MAP_APPFONT ( 8 , 55 ) ;
- Size = MAP_APPFONT ( 170 , 33 ) ;
- WordBreak = TRUE ;
- Text [ en-US ] = "Tip: The sort range can be detected automatically. Place the cell cursor inside a list and execute sort. The whole range of neighboring non-empty cells will then be sorted.";
- };
- PushButton BTN_EXTSORT
- {
- HelpID = "sc:PushButton:RID_SCDLG_SORT_WARNING:BTN_EXTSORT";
- Pos = MAP_APPFONT ( 6 , 39 ) ;
- Size = MAP_APPFONT ( 60 , 14 ) ;
- TabStop = TRUE ;
- DefButton = TRUE ;
- Text [ en-US ] = "Extend selection";
- };
- PushButton BTN_CURSORT
- {
- HelpID = "sc:PushButton:RID_SCDLG_SORT_WARNING:BTN_CURSORT";
- Pos = MAP_APPFONT ( 70 , 39 ) ;
- Size = MAP_APPFONT ( 60 , 14 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "Current selection";
- };
- CancelButton BTN_CANCEL
- {
- Pos = MAP_APPFONT ( 134 , 39 ) ;
- Size = MAP_APPFONT ( 40 , 14 ) ;
- 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 8f30e18bd3c9..39892616fe8b 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -150,7 +150,7 @@ static sal_Bool lcl_GetSortParam( const ScViewData* pData, ScSortParam& rSortPar
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
- VclAbstractDialog* pWarningDlg = pFact->CreateScSortWarningDlg( pTabViewShell->GetDialogParent(),aExtendStr,aCurrentStr,RID_SCDLG_SORT_WARNING );
+ AbstractScSortWarningDlg* pWarningDlg = pFact->CreateScSortWarningDlg( pTabViewShell->GetDialogParent(), aExtendStr, aCurrentStr );
OSL_ENSURE(pWarningDlg, "Dialog create fail!");
short bResult = pWarningDlg->Execute();
if( bResult == BTN_EXTEND_RANGE || bResult == BTN_CURRENT_SELECTION )