summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2013-10-29 17:40:43 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-11-05 12:37:15 +0000
commit36f21914b31a28f75ec2195c266424a18408f747 (patch)
treefae33ceb49e725416a2e154862d3dd83c534d8dc /cui
parent7098f83ec3121f2fb8d077795575c600744ed85a (diff)
Resolves: i123564 corrected some aspects when working with bitmaps...
with low color depth or small size (cherry picked from commit ba54ce4fc788605fc96235f432b455311faee406) Conflicts: cui/source/tabpages/tpbitmap.cxx Change-Id: I10677414ab7d1904dbb29cd395a0c0334e0faa03
Diffstat (limited to 'cui')
-rw-r--r--cui/source/tabpages/tpbitmap.cxx33
1 files changed, 22 insertions, 11 deletions
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index 17e89cbba57a..89a51a8b26f2 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -354,29 +354,40 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ChangeBitmapHdl_Impl)
Color aPixelColor = aFront;
Color aBackColor = aBack;
- m_pBitmapCtl->SetPixelColor( aPixelColor );
- m_pBitmapCtl->SetBackgroundColor( aBackColor );
+ // #i123564# This causes the wrong color to be selected
+ // as foreground color when the 1st bitmap in the bitmap
+ // list is selected. I see no reason why this is done,
+ // thus I will take it out
+ //
+ //if( 0 == m_pLbBitmaps->GetSelectEntryPos() )
+ //{
+ // m_pLbColor->SelectEntry( Color( COL_BLACK ) );
+ // ChangePixelColorHdl_Impl( this );
+ //}
+ //else
+
+ m_pLbColor->SelectEntry( aPixelColor );
- // if the entry is not in the listbox,
- // the color is added temporarily
- if( 0 == m_pLbBitmaps->GetSelectEntryPos() )
- {
- m_pLbColor->SelectEntry( Color( COL_BLACK ) );
- ChangePixelColorHdl_Impl( this );
- }
- else
- m_pLbColor->SelectEntry( aPixelColor );
if( m_pLbColor->GetSelectEntryCount() == 0 )
{
m_pLbColor->InsertEntry( aPixelColor, OUString() );
m_pLbColor->SelectEntry( aPixelColor );
}
+
m_pLbBackgroundColor->SelectEntry( aBackColor );
+
if( m_pLbBackgroundColor->GetSelectEntryCount() == 0 )
{
m_pLbBackgroundColor->InsertEntry( aBackColor, OUString() );
m_pLbBackgroundColor->SelectEntry( aBackColor );
}
+
+ // update m_pBitmapCtl, rXFSet and m_pCtlPreview
+ m_pBitmapCtl->SetPixelColor( aPixelColor );
+ m_pBitmapCtl->SetBackgroundColor( aBackColor );
+ rXFSet.Put(XFillBitmapItem(OUString(), Graphic(m_pBitmapCtl->GetBitmapEx())));
+ m_pCtlPreview->SetAttributes( aXFillAttr.GetItemSet() );
+ m_pCtlPreview->Invalidate();
}
else
{