summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2013-06-17 12:51:08 +0200
committerJan Holesovsky <kendy@suse.cz>2013-06-18 12:15:36 +0200
commit24ae770205eef6f0dd2dd86f6723f049004bfc9b (patch)
tree97726ecce89305cd86169dd28efa5340a2a1196f
parentdd11bf883b49ca38de44c5cd7f888678a418c0a1 (diff)
Convert Sort lists tabpage to .ui and adapt code.
Change-Id: I6251d764385ce76deb79606dcada9842544867b2
-rw-r--r--sc/UIConfig_scalc.mk1
-rw-r--r--sc/inc/globstr.hrc8
-rw-r--r--sc/source/ui/inc/optdlg.hrc20
-rw-r--r--sc/source/ui/inc/tpusrlst.hxx26
-rw-r--r--sc/source/ui/optdlg/tpusrlst.cxx312
-rw-r--r--sc/source/ui/src/globstr.src20
-rw-r--r--sc/source/ui/src/optdlg.src99
-rw-r--r--sc/uiconfig/scalc/ui/optsortlists.ui231
8 files changed, 428 insertions, 289 deletions
diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk
index 4c36b575f12d..708203d6be3e 100644
--- a/sc/UIConfig_scalc.mk
+++ b/sc/UIConfig_scalc.mk
@@ -85,6 +85,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
sc/uiconfig/scalc/ui/optcompatibilitypage \
sc/uiconfig/scalc/ui/optdefaultpage \
sc/uiconfig/scalc/ui/optdlg \
+ sc/uiconfig/scalc/ui/optsortlists \
sc/uiconfig/scalc/ui/printeroptions \
sc/uiconfig/scalc/ui/protectsheetdlg \
sc/uiconfig/scalc/ui/rightfooterdialog \
diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index 7dc6cd64837e..41b6c47dda28 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -673,7 +673,13 @@
#define STR_FUN_TEXT_SELECTION_COUNT 546
-#define STR_COUNT 547
+#define STR_DISMISS 547
+#define STR_QUERYREMOVE 548
+#define STR_COPYLIST 549
+#define STR_COPYFROM 550
+#define STR_COPYERR 551
+
+#define STR_COUNT 552
#endif
diff --git a/sc/source/ui/inc/optdlg.hrc b/sc/source/ui/inc/optdlg.hrc
index d815de149750..7b0d234813b6 100644
--- a/sc/source/ui/inc/optdlg.hrc
+++ b/sc/source/ui/inc/optdlg.hrc
@@ -37,26 +37,6 @@
#define BTN_NULLVALS 21
#define BTN_NOTES 22
-
-// TP_USERLISTS:
-#define FT_LISTS 1
-#define LB_LISTS 1
-#define FT_ENTRIES 2
-#define ED_ENTRIES 2
-#define FT_COPYFROM 3
-#define ED_COPYFROM 3
-#define BTN_NEW 1
-#define BTN_ADD 2
-#define BTN_REMOVE 3
-#define BTN_COPY 4
-#define STR_QUERYREMOVE 5
-#define STR_DISMISS 6
-#define STR_COPYLIST 7
-#define STR_COPYFROM 8
-#define STR_COPYERR 9
-
-// TP_PRINT:
-
// TP_LCONTENT
#define GB_DISPLAY 20
diff --git a/sc/source/ui/inc/tpusrlst.hxx b/sc/source/ui/inc/tpusrlst.hxx
index e40af4a1addd..331c1a40b43d 100644
--- a/sc/source/ui/inc/tpusrlst.hxx
+++ b/sc/source/ui/inc/tpusrlst.hxx
@@ -23,7 +23,7 @@
#include <sfx2/tabdlg.hxx>
#include <vcl/fixed.hxx>
#include <vcl/lstbox.hxx>
-#include <svtools/svmedit.hxx>
+#include <vcl/vclmedit.hxx>
//========================================================================
@@ -48,19 +48,19 @@ private:
~ScTpUserLists();
private:
- FixedText aFtLists;
- ListBox aLbLists;
- FixedText aFtEntries;
- MultiLineEdit aEdEntries;
- FixedText aFtCopyFrom;
- Edit aEdCopyFrom;
- PushButton aBtnNew;
- PushButton aBtnAdd;
- PushButton aBtnRemove;
- PushButton aBtnCopy;
+ FixedText* mpFtLists;
+ ListBox* mpLbLists;
+ FixedText* mpFtEntries;
+ VclMultiLineEdit* mpEdEntries;
+ FixedText* mpFtCopyFrom;
+ Edit* mpEdCopyFrom;
+ PushButton* mpBtnNew;
+ PushButton* mpBtnAdd;
+ PushButton* mpBtnRemove;
+ PushButton* mpBtnCopy;
const String aStrQueryRemove;
- const String aStrNew;
+ String aStrNew;
const String aStrCancel;
const String aStrAdd;
const String aStrModify;
@@ -97,7 +97,7 @@ private:
// Handler:
DECL_LINK( LbSelectHdl, ListBox* );
DECL_LINK( BtnClickHdl, PushButton* );
- DECL_LINK( EdEntriesModHdl, MultiLineEdit* );
+ DECL_LINK( EdEntriesModHdl, VclMultiLineEdit* );
#endif
};
diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx
index 35675b5ad0e9..b0e92ca85f10 100644
--- a/sc/source/ui/optdlg/tpusrlst.cxx
+++ b/sc/source/ui/optdlg/tpusrlst.cxx
@@ -55,26 +55,15 @@ ScTpUserLists::ScTpUserLists( Window* pParent,
const SfxItemSet& rCoreAttrs )
: SfxTabPage ( pParent,
- ScResId( RID_SCPAGE_USERLISTS ),
+ "OptSortLists", "modules/scalc/ui/optsortlists.ui",
rCoreAttrs ),
- aFtLists ( this, ScResId( FT_LISTS ) ),
- aLbLists ( this, ScResId( LB_LISTS ) ),
- aFtEntries ( this, ScResId( FT_ENTRIES ) ),
- aEdEntries ( this, ScResId( ED_ENTRIES ) ),
- aFtCopyFrom ( this, ScResId( FT_COPYFROM ) ),
- aEdCopyFrom ( this, ScResId( ED_COPYFROM ) ),
- aBtnNew ( this, ScResId( BTN_NEW ) ),
- aBtnAdd ( this, ScResId( BTN_ADD ) ),
- aBtnRemove ( this, ScResId( BTN_REMOVE ) ),
- aBtnCopy ( this, ScResId( BTN_COPY ) ),
- aStrQueryRemove ( ScResId( STR_QUERYREMOVE ) ),
- aStrNew ( aBtnNew.GetText() ),
- aStrCancel ( ScResId( STR_DISMISS ) ),
+ aStrQueryRemove ( ScGlobal::GetRscString( STR_QUERYREMOVE ) ),
+ aStrCancel ( ScGlobal::GetRscString( STR_DISMISS ) ),
aStrAdd ( ScResId( SCSTR_ADD ) ),
aStrModify ( ScResId( SCSTR_MODIFY ) ),
- aStrCopyList ( ScResId( STR_COPYLIST ) ),
- aStrCopyFrom ( ScResId( STR_COPYFROM ) ),
- aStrCopyErr ( ScResId( STR_COPYERR ) ),
+ aStrCopyList ( ScGlobal::GetRscString( STR_COPYLIST ) ),
+ aStrCopyFrom ( ScGlobal::GetRscString( STR_COPYFROM ) ),
+ aStrCopyErr ( ScGlobal::GetRscString( STR_COPYERR ) ),
nWhichUserLists ( GetWhich( SID_SCUSERLISTS ) ),
pUserLists ( NULL ),
pDoc ( NULL ),
@@ -85,10 +74,22 @@ ScTpUserLists::ScTpUserLists( Window* pParent,
bCopyDone ( false ),
nCancelPos ( 0 )
{
+ get(mpFtLists, "listslabel");
+ get(mpLbLists, "lists");
+ get(mpFtEntries, "entrieslabel");
+ get(mpEdEntries, "entries");
+ get(mpFtCopyFrom, "copyfromlabel");
+ get(mpEdCopyFrom, "copyfrom");
+ get(mpBtnNew, "new");
+ get(mpBtnAdd, "add");
+ get(mpBtnRemove, "delete");
+ get(mpBtnCopy, "copy");
+
+ aStrNew = mpBtnNew->GetText();
+
SetExchangeSupport();
Init();
Reset(rCoreAttrs);
- FreeResource();
}
// -----------------------------------------------------------------------
@@ -106,13 +107,12 @@ void ScTpUserLists::Init()
SfxViewShell* pSh = SfxViewShell::Current();
ScTabViewShell* pViewSh = PTR_CAST(ScTabViewShell, pSh);
- aLbLists.SetSelectHdl ( LINK( this, ScTpUserLists, LbSelectHdl ) );
- aBtnNew.SetClickHdl ( LINK( this, ScTpUserLists, BtnClickHdl ) );
- aBtnNew.SetClickHdl ( LINK( this, ScTpUserLists, BtnClickHdl ) );
- aBtnAdd.SetClickHdl ( LINK( this, ScTpUserLists, BtnClickHdl ) );
- aBtnRemove.SetClickHdl ( LINK( this, ScTpUserLists, BtnClickHdl ) );
- aEdEntries.SetModifyHdl ( LINK( this, ScTpUserLists, EdEntriesModHdl ) );
-
+ mpLbLists->SetSelectHdl ( LINK( this, ScTpUserLists, LbSelectHdl ) );
+ mpBtnNew->SetClickHdl ( LINK( this, ScTpUserLists, BtnClickHdl ) );
+ mpBtnNew->SetClickHdl ( LINK( this, ScTpUserLists, BtnClickHdl ) );
+ mpBtnAdd->SetClickHdl ( LINK( this, ScTpUserLists, BtnClickHdl ) );
+ mpBtnRemove->SetClickHdl ( LINK( this, ScTpUserLists, BtnClickHdl ) );
+ mpEdEntries->SetModifyHdl ( LINK( this, ScTpUserLists, EdEntriesModHdl ) );
if ( pViewSh )
{
@@ -136,14 +136,14 @@ void ScTpUserLists::Init()
ScRange( nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nEndTab
).Format( aStrSelectedArea, SCR_ABS_3D, pDoc );
- aBtnCopy.SetClickHdl ( LINK( this, ScTpUserLists, BtnClickHdl ) );
- aBtnCopy.Enable();
+ mpBtnCopy->SetClickHdl ( LINK( this, ScTpUserLists, BtnClickHdl ) );
+ mpBtnCopy->Enable();
}
else
{
- aBtnCopy.Disable();
- aFtCopyFrom.Disable();
- aEdCopyFrom.Disable();
+ mpBtnCopy->Disable();
+ mpFtCopyFrom->Disable();
+ mpEdCopyFrom->Disable();
}
}
@@ -174,33 +174,33 @@ void ScTpUserLists::Reset( const SfxItemSet& rCoreAttrs )
if ( UpdateUserListBox() > 0 )
{
- aLbLists.SelectEntryPos( 0 );
+ mpLbLists->SelectEntryPos( 0 );
UpdateEntries( 0 );
}
}
else if ( !pUserLists )
pUserLists = new ScUserList;
- aEdCopyFrom.SetText( aStrSelectedArea );
+ mpEdCopyFrom->SetText( aStrSelectedArea );
- if ( aLbLists.GetEntryCount() == 0 )
+ if ( mpLbLists->GetEntryCount() == 0 )
{
- aFtLists .Disable();
- aLbLists .Disable();
- aFtEntries .Disable();
- aEdEntries .Disable();
- aBtnRemove .Disable();
+ mpFtLists->Disable();
+ mpLbLists->Disable();
+ mpFtEntries->Disable();
+ mpEdEntries->Disable();
+ mpBtnRemove->Disable();
}
- aBtnNew.SetText( aStrNew );
- aBtnAdd.SetText( aStrAdd );
- aBtnAdd.Disable();
+ mpBtnNew->SetText( aStrNew );
+ mpBtnAdd->SetText( aStrAdd );
+ mpBtnAdd->Disable();
if ( !bCopyDone && pViewData )
{
- aFtCopyFrom .Enable();
- aEdCopyFrom .Enable();
- aBtnCopy .Enable();
+ mpFtCopyFrom->Enable();
+ mpEdCopyFrom->Enable();
+ mpBtnCopy->Enable();
}
}
@@ -212,7 +212,7 @@ sal_Bool ScTpUserLists::FillItemSet( SfxItemSet& rCoreAttrs )
// -> Click auf Add-Button simulieren
if ( bModifyMode || bCancelMode )
- BtnClickHdl( &aBtnAdd );
+ BtnClickHdl( mpBtnAdd );
const ScUserListItem& rUserListItem = (const ScUserListItem&)
GetItemSet().Get( nWhichUserLists );
@@ -259,7 +259,7 @@ int ScTpUserLists::DeactivatePage( SfxItemSet* pSetP )
sal_uInt16 ScTpUserLists::UpdateUserListBox()
{
- aLbLists.Clear();
+ mpLbLists->Clear();
if ( !pUserLists ) return 0;
@@ -272,7 +272,7 @@ sal_uInt16 ScTpUserLists::UpdateUserListBox()
{
aEntry = (*pUserLists)[i]->GetString();
OSL_ENSURE( aEntry.Len() > 0, "Empty UserList-entry :-/" );
- aLbLists.InsertEntry( aEntry );
+ mpLbLists->InsertEntry( aEntry );
}
return nCount;
@@ -299,7 +299,7 @@ void ScTpUserLists::UpdateEntries( size_t nList )
aEntryListStr += String(pList->GetSubStr(i));
}
- aEdEntries.SetText(convertLineEnd(aEntryListStr, GetSystemLineEnd()));
+ mpEdEntries->SetText(convertLineEnd(aEntryListStr, GetSystemLineEnd()));
}
else
{
@@ -485,15 +485,15 @@ void ScTpUserLists::RemoveList( size_t nList )
IMPL_LINK( ScTpUserLists, LbSelectHdl, ListBox*, pLb )
{
- if ( pLb == &aLbLists )
+ if ( pLb == mpLbLists )
{
- sal_uInt16 nSelPos = aLbLists.GetSelectEntryPos();
+ sal_uInt16 nSelPos = mpLbLists->GetSelectEntryPos();
if ( nSelPos != LISTBOX_ENTRY_NOTFOUND )
{
- if ( !aFtEntries.IsEnabled() ) aFtEntries.Enable();
- if ( !aEdEntries.IsEnabled() ) aEdEntries.Enable();
- if ( !aBtnRemove.IsEnabled() ) aBtnRemove.Enable();
- if ( aBtnAdd.IsEnabled() ) aBtnAdd.Disable();
+ if ( !mpFtEntries->IsEnabled() ) mpFtEntries->Enable();
+ if ( !mpEdEntries->IsEnabled() ) mpEdEntries->Enable();
+ if ( !mpBtnRemove->IsEnabled() ) mpBtnRemove->Enable();
+ if ( mpBtnAdd->IsEnabled() ) mpBtnAdd->Disable();
UpdateEntries( nSelPos );
}
@@ -506,64 +506,64 @@ IMPL_LINK( ScTpUserLists, LbSelectHdl, ListBox*, pLb )
IMPL_LINK( ScTpUserLists, BtnClickHdl, PushButton*, pBtn )
{
- if ( pBtn == &aBtnNew )
+ if ( pBtn == mpBtnNew )
{
if ( !bCancelMode )
{
- nCancelPos = ( aLbLists.GetEntryCount() > 0 )
- ? aLbLists.GetSelectEntryPos()
+ nCancelPos = ( mpLbLists->GetEntryCount() > 0 )
+ ? mpLbLists->GetSelectEntryPos()
: 0;
- aLbLists.SetNoSelection();
- aFtLists.Disable();
- aLbLists.Disable();
- aFtEntries.Enable();
- aEdEntries.Enable();
- aEdEntries.SetText( EMPTY_STRING );
- aEdEntries.GrabFocus();
- aBtnAdd.Disable();
- aBtnRemove.Disable();
+ mpLbLists->SetNoSelection();
+ mpFtLists->Disable();
+ mpLbLists->Disable();
+ mpFtEntries->Enable();
+ mpEdEntries->Enable();
+ mpEdEntries->SetText( EMPTY_STRING );
+ mpEdEntries->GrabFocus();
+ mpBtnAdd->Disable();
+ mpBtnRemove->Disable();
//-----------------------------
- if ( aBtnCopy.IsEnabled() )
+ if ( mpBtnCopy->IsEnabled() )
{
- aBtnCopy.Disable();
- aFtCopyFrom.Disable();
- aEdCopyFrom.Disable();
+ mpBtnCopy->Disable();
+ mpFtCopyFrom->Disable();
+ mpEdCopyFrom->Disable();
}
- aBtnNew.SetText( aStrCancel );
+ mpBtnNew->SetText( aStrCancel );
bCancelMode = sal_True;
}
else // if ( bCancelMode )
{
- if ( aLbLists.GetEntryCount() > 0 )
+ if ( mpLbLists->GetEntryCount() > 0 )
{
- aLbLists.SelectEntryPos( nCancelPos );
- LbSelectHdl( &aLbLists );
- aFtLists.Enable();
- aLbLists.Enable();
+ mpLbLists->SelectEntryPos( nCancelPos );
+ LbSelectHdl( mpLbLists );
+ mpFtLists->Enable();
+ mpLbLists->Enable();
}
else
{
- aFtEntries.Disable();
- aEdEntries.Disable();
- aEdEntries.SetText( EMPTY_STRING );
- aBtnRemove.Disable();
+ mpFtEntries->Disable();
+ mpEdEntries->Disable();
+ mpEdEntries->SetText( EMPTY_STRING );
+ mpBtnRemove->Disable();
}
- aBtnAdd.Disable();
+ mpBtnAdd->Disable();
//-----------------------------
if ( pViewData && !bCopyDone )
{
- aBtnCopy.Enable();
- aFtCopyFrom.Enable();
- aEdCopyFrom.Enable();
+ mpBtnCopy->Enable();
+ mpFtCopyFrom->Enable();
+ mpEdCopyFrom->Enable();
}
- aBtnNew.SetText( aStrNew );
+ mpBtnNew->SetText( aStrNew );
bCancelMode = false;
bModifyMode = false;
}
}
- else if ( pBtn == &aBtnAdd )
+ else if ( pBtn == mpBtnAdd )
{
- String theEntriesStr( aEdEntries.GetText() );
+ String theEntriesStr( mpEdEntries->GetText() );
if ( !bModifyMode )
{
@@ -571,30 +571,30 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, PushButton*, pBtn )
{
AddNewList( theEntriesStr );
UpdateUserListBox();
- aLbLists.SelectEntryPos( aLbLists.GetEntryCount()-1 );
- LbSelectHdl( &aLbLists );
- aFtLists.Enable();
- aLbLists.Enable();
+ mpLbLists->SelectEntryPos( mpLbLists->GetEntryCount()-1 );
+ LbSelectHdl( mpLbLists );
+ mpFtLists->Enable();
+ mpLbLists->Enable();
}
else
{
- if ( aLbLists.GetEntryCount() > 0 )
+ if ( mpLbLists->GetEntryCount() > 0 )
{
- aLbLists.SelectEntryPos( nCancelPos );
- LbSelectHdl( &aLbLists );
- aLbLists.Enable();
- aLbLists.Enable();
+ mpLbLists->SelectEntryPos( nCancelPos );
+ LbSelectHdl( mpLbLists );
+ mpLbLists->Enable();
+ mpLbLists->Enable();
}
}
- aBtnAdd.Disable();
- aBtnRemove.Enable();
- aBtnNew.SetText( aStrNew );
+ mpBtnAdd->Disable();
+ mpBtnRemove->Enable();
+ mpBtnNew->SetText( aStrNew );
bCancelMode = false;
}
else // if ( bModifyMode )
{
- sal_uInt16 nSelList = aLbLists.GetSelectEntryPos();
+ sal_uInt16 nSelList = mpLbLists->GetSelectEntryPos();
OSL_ENSURE( nSelList != LISTBOX_ENTRY_NOTFOUND, "Modify without List :-/" );
@@ -602,37 +602,37 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, PushButton*, pBtn )
{
ModifyList( nSelList, theEntriesStr );
UpdateUserListBox();
- aLbLists.SelectEntryPos( nSelList );
+ mpLbLists->SelectEntryPos( nSelList );
}
else
{
- aLbLists.SelectEntryPos( 0 );
- LbSelectHdl( &aLbLists );
+ mpLbLists->SelectEntryPos( 0 );
+ LbSelectHdl( mpLbLists );
}
- aBtnNew.SetText( aStrNew ); bCancelMode = false;
- aBtnAdd.SetText( aStrAdd ); bModifyMode = false;
- aBtnAdd.Disable();
- aBtnRemove.Enable();
- aFtLists.Enable();
- aLbLists.Enable();
+ mpBtnNew->SetText( aStrNew ); bCancelMode = false;
+ mpBtnAdd->SetText( aStrAdd ); bModifyMode = false;
+ mpBtnAdd->Disable();
+ mpBtnRemove->Enable();
+ mpFtLists->Enable();
+ mpLbLists->Enable();
}
if ( pViewData && !bCopyDone )
{
- aBtnCopy.Enable();
- aFtCopyFrom.Enable();
- aEdCopyFrom.Enable();
+ mpBtnCopy->Enable();
+ mpFtCopyFrom->Enable();
+ mpEdCopyFrom->Enable();
}
}
- else if ( pBtn == &aBtnRemove )
+ else if ( pBtn == mpBtnRemove )
{
- if ( aLbLists.GetEntryCount() > 0 )
+ if ( mpLbLists->GetEntryCount() > 0 )
{
- sal_uInt16 nRemovePos = aLbLists.GetSelectEntryPos();
+ sal_uInt16 nRemovePos = mpLbLists->GetSelectEntryPos();
String aMsg ( aStrQueryRemove.GetToken( 0, '#' ) );
- aMsg += aLbLists.GetEntry( nRemovePos );
+ aMsg += mpLbLists->GetEntry( nRemovePos );
aMsg += aStrQueryRemove.GetToken( 1, '#' );
@@ -644,34 +644,34 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, PushButton*, pBtn )
RemoveList( nRemovePos );
UpdateUserListBox();
- if ( aLbLists.GetEntryCount() > 0 )
+ if ( mpLbLists->GetEntryCount() > 0 )
{
- aLbLists.SelectEntryPos(
- ( nRemovePos >= aLbLists.GetEntryCount() )
- ? aLbLists.GetEntryCount()-1
+ mpLbLists->SelectEntryPos(
+ ( nRemovePos >= mpLbLists->GetEntryCount() )
+ ? mpLbLists->GetEntryCount()-1
: nRemovePos );
- LbSelectHdl( &aLbLists );
+ LbSelectHdl( mpLbLists );
}
else
{
- aFtLists.Disable();
- aLbLists.Disable();
- aFtEntries.Disable();
- aEdEntries.Disable();
- aEdEntries.SetText( EMPTY_STRING );
- aBtnRemove.Disable();
+ mpFtLists->Disable();
+ mpLbLists->Disable();
+ mpFtEntries->Disable();
+ mpEdEntries->Disable();
+ mpEdEntries->SetText( EMPTY_STRING );
+ mpBtnRemove->Disable();
}
}
- if ( pViewData && !bCopyDone && !aBtnCopy.IsEnabled() )
+ if ( pViewData && !bCopyDone && !mpBtnCopy->IsEnabled() )
{
- aBtnCopy.Enable();
- aFtCopyFrom.Enable();
- aEdCopyFrom.Enable();
+ mpBtnCopy->Enable();
+ mpFtCopyFrom->Enable();
+ mpEdCopyFrom->Enable();
}
}
}
- else if ( pViewData && (pBtn == &aBtnCopy) )
+ else if ( pViewData && (pBtn == mpBtnCopy) )
{
if ( bCopyDone )
return 0;
@@ -680,7 +680,7 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, PushButton*, pBtn )
ScRefAddress theStartPos;
ScRefAddress theEndPos;
- String theAreaStr( aEdCopyFrom.GetText() );
+ String theAreaStr( mpEdCopyFrom->GetText() );
sal_Bool bAreaOk = false;
if ( theAreaStr.Len() > 0 )
@@ -708,20 +708,20 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, PushButton*, pBtn )
{
CopyListFromArea( theStartPos, theEndPos );
UpdateUserListBox();
- aLbLists.SelectEntryPos( aLbLists.GetEntryCount()-1 );
- LbSelectHdl( &aLbLists );
- aEdCopyFrom .SetText( theAreaStr );
- aEdCopyFrom .Disable();
- aBtnCopy .Disable();
- aFtCopyFrom .Disable();
+ mpLbLists->SelectEntryPos( mpLbLists->GetEntryCount()-1 );
+ LbSelectHdl( mpLbLists );
+ mpEdCopyFrom->SetText( theAreaStr );
+ mpEdCopyFrom->Disable();
+ mpBtnCopy->Disable();
+ mpFtCopyFrom->Disable();
}
else
{
ErrorBox( this, WinBits( WB_OK | WB_DEF_OK ),
ScGlobal::GetRscString( STR_INVALID_TABREF )
).Execute();
- aEdCopyFrom.GrabFocus();
- aEdCopyFrom.SetSelection( Selection( 0, SELECTION_MAX ) );
+ mpEdCopyFrom->GrabFocus();
+ mpEdCopyFrom->SetSelection( Selection( 0, SELECTION_MAX ) );
}
}
@@ -730,39 +730,39 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, PushButton*, pBtn )
// -----------------------------------------------------------------------
-IMPL_LINK( ScTpUserLists, EdEntriesModHdl, MultiLineEdit*, pEd )
+IMPL_LINK( ScTpUserLists, EdEntriesModHdl, VclMultiLineEdit*, pEd )
{
- if ( pEd != &aEdEntries )
+ if ( pEd != mpEdEntries )
return 0;
//-----------------------------------------------------------
- if ( aBtnCopy.IsEnabled() )
+ if ( mpBtnCopy->IsEnabled() )
{
- aBtnCopy .Disable();
- aFtCopyFrom .Disable();
- aEdCopyFrom .Disable();
+ mpBtnCopy->Disable();
+ mpFtCopyFrom->Disable();
+ mpEdCopyFrom->Disable();
}
- if ( !aEdEntries.GetText().isEmpty() )
+ if ( !mpEdEntries->GetText().isEmpty() )
{
if ( !bCancelMode && !bModifyMode )
{
- aBtnNew.SetText( aStrCancel ); bCancelMode = sal_True;
- aBtnAdd.SetText( aStrModify ); bModifyMode = sal_True;
- aBtnAdd.Enable();
- aBtnRemove.Disable();
- aFtLists.Disable();
- aLbLists.Disable();
+ mpBtnNew->SetText( aStrCancel ); bCancelMode = sal_True;
+ mpBtnAdd->SetText( aStrModify ); bModifyMode = sal_True;
+ mpBtnAdd->Enable();
+ mpBtnRemove->Disable();
+ mpFtLists->Disable();
+ mpLbLists->Disable();
}
else // if ( bCancelMode || bModifyMode )
{
- if ( !aBtnAdd.IsEnabled() ) aBtnAdd.Enable();
+ if ( !mpBtnAdd->IsEnabled() ) mpBtnAdd->Enable();
}
}
else
{
- if ( aBtnAdd.IsEnabled() ) aBtnAdd.Disable();
+ if ( mpBtnAdd->IsEnabled() ) mpBtnAdd->Disable();
}
return 0;
diff --git a/sc/source/ui/src/globstr.src b/sc/source/ui/src/globstr.src
index b9ffd2a79388..759d2956d351 100644
--- a/sc/source/ui/src/globstr.src
+++ b/sc/source/ui/src/globstr.src
@@ -2065,6 +2065,26 @@ Resource RID_GLOBSTR
{
Text [ en-US ] = "Invalid condition." ;
};
+ String STR_DISMISS
+ {
+ Text [ en-US ] = "~Discard" ;
+ };
+ String STR_QUERYREMOVE
+ {
+ Text [ en-US ] = "Should the entry\n#\nbe deleted?" ;
+ };
+ String STR_COPYLIST
+ {
+ Text [ en-US ] = "Copy List" ;
+ };
+ String STR_COPYFROM
+ {
+ Text [ en-US ] = "List from" ;
+ };
+ String STR_COPYERR
+ {
+ Text [ en-US ] = "Cells without text have been ignored." ;
+ };
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/src/optdlg.src b/sc/source/ui/src/optdlg.src
index 16fe5b95dc05..65e546701ace 100644
--- a/sc/source/ui/src/optdlg.src
+++ b/sc/source/ui/src/optdlg.src
@@ -189,105 +189,6 @@ TabPage RID_SCPAGE_FORMULA
};
};
-TabPage RID_SCPAGE_USERLISTS
-{
- HelpId = HID_SCPAGE_USERLISTS ;
- SVLook = TRUE ;
- Hide = TRUE ;
- Pos = MAP_APPFONT ( 0 , 0 ) ;
- Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
- FixedText FT_LISTS
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 93 , 8 ) ;
- Text [ en-US ] = "~Lists" ;
- };
- ListBox LB_LISTS
- {
- HelpID = "sc:ListBox:RID_SCPAGE_USERLISTS:LB_LISTS";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 6 , 15 ) ;
- Size = MAP_APPFONT ( 93 , 148 ) ;
- };
- FixedText FT_ENTRIES
- {
- Pos = MAP_APPFONT ( 105 , 3 ) ;
- Size = MAP_APPFONT ( 93 , 8 ) ;
- Text [ en-US ] = "~Entries" ;
- };
- MultiLineEdit ED_ENTRIES
- {
- HelpID = "sc:MultiLineEdit:RID_SCPAGE_USERLISTS:ED_ENTRIES";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 105 , 15 ) ;
- Size = MAP_APPFONT ( 93 , 148 ) ;
- VScroll = TRUE ;
- IgnoreTab = TRUE ;
- };
- Edit ED_COPYFROM
- {
- HelpID = "sc:Edit:RID_SCPAGE_USERLISTS:ED_COPYFROM";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 70 , 167 ) ;
- Size = MAP_APPFONT ( 128 , 12 ) ;
- };
- FixedText FT_COPYFROM
- {
- Pos = MAP_APPFONT ( 6 , 168 ) ;
- Size = MAP_APPFONT ( 62 , 8 ) ;
- Text [ en-US ] = "Copy list ~from" ;
- };
- PushButton BTN_NEW
- {
- HelpID = "sc:PushButton:RID_SCPAGE_USERLISTS:BTN_NEW";
- Pos = MAP_APPFONT ( 204 , 15 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- Text [ en-US ] = "~New" ;
- };
- PushButton BTN_ADD
- {
- HelpID = "sc:PushButton:RID_SCPAGE_USERLISTS:BTN_ADD";
- Pos = MAP_APPFONT ( 204 , 36 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- Text [ en-US ] = "~Add" ;
- Disable = TRUE ;
- };
- PushButton BTN_REMOVE
- {
- HelpID = "sc:PushButton:RID_SCPAGE_USERLISTS:BTN_REMOVE";
- Pos = MAP_APPFONT ( 204 , 54 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- Text [ en-US ] = "~Delete" ;
- };
- PushButton BTN_COPY
- {
- HelpID = "sc:PushButton:RID_SCPAGE_USERLISTS:BTN_COPY";
- Pos = MAP_APPFONT ( 204 , 166 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- Text [ en-US ] = "~Copy" ;
- };
- String STR_DISMISS
- {
- Text [ en-US ] = "~Discard" ;
- };
- String STR_QUERYREMOVE
- {
- Text [ en-US ] = "Should the entry\n#\nbe deleted?" ;
- };
- String STR_COPYLIST
- {
- Text [ en-US ] = "Copy List" ;
- };
- String STR_COPYFROM
- {
- Text [ en-US ] = "List from" ;
- };
- String STR_COPYERR
- {
- Text [ en-US ] = "Cells without text have been ignored." ;
- };
-};
-
TabPage RID_SCPAGE_CONTENT
{
HelpId = HID_SCPAGE_CONTENT ;
diff --git a/sc/uiconfig/scalc/ui/optsortlists.ui b/sc/uiconfig/scalc/ui/optsortlists.ui
new file mode 100644
index 000000000000..ce603c90b601
--- /dev/null
+++ b/sc/uiconfig/scalc/ui/optsortlists.ui
@@ -0,0 +1,231 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkAdjustment" id="adjustment1">
+ <property name="lower">1</property>
+ <property name="upper">32000</property>
+ <property name="value">1</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkBox" id="OptSortLists">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkGrid" id="grid1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="row_spacing">12</property>
+ <property name="column_spacing">12</property>
+ <child>
+ <object class="GtkBox" id="box1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkButton" id="new">
+ <property name="label" translatable="yes">_New</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">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="add">
+ <property name="label" translatable="yes">_Add</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">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="delete">
+ <property name="label" translatable="yes">_Delete</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="copy">
+ <property name="label" translatable="yes">_Copy</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="copyfromlabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Copy list _from:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">copyfrom</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="copyfrom">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="invisible_char">●</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkGrid" id="grid2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
+ <property name="column_homogeneous">True</property>
+ <child>
+ <object class="GtkLabel" id="listslabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Lists</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">lists</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="entrieslabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Entries</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">entries</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkTextView" id="entries">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkTreeView" id="lists">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="treeview-selection1"/>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+</interface>