summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2013-04-17 10:51:39 +0000
committerMichael Meeks <michael.meeks@suse.com>2013-05-20 11:33:14 +0100
commit243b75e82ee845774e0ca8f18db5d28a0ccc7619 (patch)
tree78a2399abb6c703f647b4b7a4fb8549a4097ea50 /cui
parentca4a3f26f96843a8b48fdb10df901a102c2c9ca3 (diff)
Related: #i122042# corrected adding default values in LineStyleListBox
(cherry picked from commit 246d57106712df34b05c2522c145d244df2d31eb) Conflicts: cui/source/tabpages/tplnedef.cxx Change-Id: I6fde45b3e5a5d0a25a549ea03ec50302c8541195
Diffstat (limited to 'cui')
-rw-r--r--cui/source/tabpages/tplnedef.cxx16
1 files changed, 12 insertions, 4 deletions
diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx
index 563fa72493f4..44fe3f1a7394 100644
--- a/cui/source/tabpages/tplnedef.cxx
+++ b/cui/source/tabpages/tplnedef.cxx
@@ -141,6 +141,10 @@ SvxLineDefTabPage::SvxLineDefTabPage
aLbLineStyles.SetSelectHdl(
LINK( this, SvxLineDefTabPage, SelectLinestyleHdl_Impl ) );
+ // #i122042# switch off default adding of 'none' and 'solid' entries
+ // for this ListBox; we want to select only editable/dashed styles
+ aLbLineStyles.setAddStandardFields(false);
+
// absolute (in mm) or relative (in %)
aCbxSynchronize.SetClickHdl(
LINK( this, SvxLineDefTabPage, ChangeMetricHdl_Impl ) );
@@ -168,6 +172,7 @@ SvxLineDefTabPage::SvxLineDefTabPage
void SvxLineDefTabPage::Construct()
{
+ // Line style fill; do *not* add default fields here
aLbLineStyles.Fill( pDashList );
}
@@ -349,14 +354,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();