summaryrefslogtreecommitdiff
path: root/cui/source/tabpages/tpbitmap.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'cui/source/tabpages/tpbitmap.cxx')
-rw-r--r--cui/source/tabpages/tpbitmap.cxx27
1 files changed, 11 insertions, 16 deletions
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index aaf51917d776..95f1b6d206e9 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -309,21 +309,19 @@ void SvxBitmapTabPage::Reset( const SfxItemSet* rAttrs )
CalculateBitmapPresetSize();
}
+ bool bTiled = false; bool bStretched = false;
if(rAttrs->GetItemState( XATTR_FILLBMP_TILE ) != SfxItemState::DONTCARE)
- {
- if( rAttrs->Get( XATTR_FILLBMP_TILE ).GetValue() )
- {
- m_pBitmapStyleLB->SelectEntryPos(static_cast<sal_Int32>(TILED));
- }
- }
+ bTiled = rAttrs->Get( XATTR_FILLBMP_TILE ).GetValue();
- if( m_pBitmapStyleLB->GetSelectedEntryPos() == 0 && rAttrs->GetItemState( XATTR_FILLBMP_STRETCH ) != SfxItemState::DONTCARE)
- {
- if( rAttrs->Get( XATTR_FILLBMP_STRETCH ).GetValue() )
- {
- m_pBitmapStyleLB->SelectEntryPos( static_cast<sal_Int32>(STRETCHED) );
- }
- }
+ if(rAttrs->GetItemState( XATTR_FILLBMP_STRETCH ) != SfxItemState::DONTCARE)
+ bStretched = rAttrs->Get( XATTR_FILLBMP_STRETCH ).GetValue();
+
+ if (bTiled)
+ m_pBitmapStyleLB->SelectEntryPos(static_cast<sal_Int32>(TILED));
+ else if (bStretched)
+ m_pBitmapStyleLB->SelectEntryPos( static_cast<sal_Int32>(STRETCHED) );
+ else
+ m_pBitmapStyleLB->SelectEntryPos( static_cast<sal_Int32>(CUSTOM) );
long nWidth = 0;
long nHeight = 0;
@@ -360,9 +358,6 @@ void SvxBitmapTabPage::Reset( const SfxItemSet* rAttrs )
nHeight = (OutputDevice::LogicToLogic(nHeight, mePoolUnit, MapUnit::Map100thMM )) / fUIScale;
}
- if(m_pBitmapStyleLB->GetSelectedEntryPos() == 0)
- m_pBitmapStyleLB->SelectEntryPos( static_cast<sal_Int32>(CUSTOM) );
-
if(rBitmapSize.Width() > 0 && rBitmapSize.Height() > 0)
{
if(eRelative == TRISTATE_TRUE)