summaryrefslogtreecommitdiff
path: root/svx/source/fmcomp
diff options
context:
space:
mode:
authorOcke Janssen [oj] <Ocke.Janssen@oracle.com>2011-02-03 12:19:25 +0100
committerOcke Janssen [oj] <Ocke.Janssen@oracle.com>2011-02-03 12:19:25 +0100
commit7ce87234ca470fe1dc6668ff221300c703b535d8 (patch)
tree40c18479f7ca90514c779f6d1b2efa9a7ed87457 /svx/source/fmcomp
parent38bb869fa8db331b62853f2b2759ac4b8bedf781 (diff)
parenta1a2a5a68046e75aba3dfd6ba06083a314f12182 (diff)
merge from master
Diffstat (limited to 'svx/source/fmcomp')
-rw-r--r--svx/source/fmcomp/gridcell.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index f546a2cef0b8..33a7dde794b4 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -1653,11 +1653,14 @@ DbCheckBox::DbCheckBox( DbGridColumn& _rColumn )
namespace
{
- void setCheckBoxStyle( Window* _pWindow, USHORT nStyle )
+ void setCheckBoxStyle( Window* _pWindow, bool bMono )
{
AllSettings aSettings = _pWindow->GetSettings();
StyleSettings aStyleSettings = aSettings.GetStyleSettings();
- aStyleSettings.SetCheckBoxStyle( nStyle );
+ if( bMono )
+ aStyleSettings.SetOptions( aStyleSettings.GetOptions() | STYLE_OPTION_MONO );
+ else
+ aStyleSettings.SetOptions( aStyleSettings.GetOptions() & (~STYLE_OPTION_MONO) );
aSettings.SetStyleSettings( aStyleSettings );
_pWindow->SetSettings( aSettings );
}
@@ -1683,8 +1686,8 @@ void DbCheckBox::Init( Window& rParent, const Reference< XRowSet >& xCursor )
sal_Int16 nStyle = awt::VisualEffect::LOOK3D;
OSL_VERIFY( xModel->getPropertyValue( FM_PROP_VISUALEFFECT ) >>= nStyle );
- setCheckBoxStyle( m_pWindow, nStyle == awt::VisualEffect::FLAT ? STYLE_CHECKBOX_MONO : STYLE_CHECKBOX_WIN );
- setCheckBoxStyle( m_pPainter, nStyle == awt::VisualEffect::FLAT ? STYLE_CHECKBOX_MONO : STYLE_CHECKBOX_WIN );
+ setCheckBoxStyle( m_pWindow, nStyle == awt::VisualEffect::FLAT );
+ setCheckBoxStyle( m_pPainter, nStyle == awt::VisualEffect::FLAT );
sal_Bool bTristate = sal_True;
OSL_VERIFY( xModel->getPropertyValue( FM_PROP_TRISTATE ) >>= bTristate );