summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2013-04-17 10:51:39 +0000
committerArmin Le Grand <alg@apache.org>2013-04-17 10:51:39 +0000
commit246d57106712df34b05c2522c145d244df2d31eb (patch)
tree3d4a468aaa6daf87340080e3bb753bf612f337c4 /cui
parent33242bbc8350f2b253fae2d4261561796d848455 (diff)
i122042 corrected adding default values in LineStyleListBox
Notes
Diffstat (limited to 'cui')
-rw-r--r--cui/source/tabpages/tplnedef.cxx17
1 files changed, 12 insertions, 5 deletions
diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx
index 4a5adb6e2bea..147a0c7302b3 100644
--- a/cui/source/tabpages/tplnedef.cxx
+++ b/cui/source/tabpages/tplnedef.cxx
@@ -164,6 +164,10 @@ SvxLineDefTabPage::SvxLineDefTabPage
aLbLineStyles.SetSelectHdl(
LINK( this, SvxLineDefTabPage, SelectLinestyleHdl_Impl ) );
+ // #122042# switch off default adding of 'none' and 'solid' entries
+ // for this ListBox; we want to select only editable/dashed styles
+ aLbLineStyles.setAddStandardFields(false);
+
// Absolut (in mm) oder Relativ (in %)
aCbxSynchronize.SetClickHdl(
LINK( this, SvxLineDefTabPage, ChangeMetricHdl_Impl ) );
@@ -191,7 +195,7 @@ SvxLineDefTabPage::SvxLineDefTabPage
void SvxLineDefTabPage::Construct()
{
- // Linienstile
+ // Line style fill; do *not* add default fields here
aLbLineStyles.Fill( pDashList );
}
@@ -390,14 +394,17 @@ SfxTabPage* SvxLineDefTabPage::Create( Window* pWindow,
IMPL_LINK( SvxLineDefTabPage, SelectLinestyleHdl_Impl, void *, p )
{
- if( pDashList->Count() > 0 )
+ if(pDashList->Count())
{
int nTmp = aLbLineStyles.GetSelectEntryPos();
- if( nTmp == LISTBOX_ENTRY_NOTFOUND )
+
+ if(LISTBOX_ENTRY_NOTFOUND == nTmp)
{
+ OSL_ENSURE(false, "OOps, non-existent LineDash selected (!)");
+ nTmp = 1;
}
- else
- aDash = pDashList->GetDash( nTmp )->GetDash();
+
+ aDash = pDashList->GetDash( nTmp )->GetDash();
FillDialog_Impl();