Kaydet (Commit) 177dbe96 authored tarafından Katarina Behrens's avatar Katarina Behrens

Correctly recognize tiled/stretched/other bitmap fill

Change-Id: Ib50dbfb937a6631429902592ae9bae08e58738d8
Reviewed-on: https://gerrit.libreoffice.org/52365Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarKatarina Behrens <Katarina.Behrens@cib.de>
üst b8569199
...@@ -309,21 +309,19 @@ void SvxBitmapTabPage::Reset( const SfxItemSet* rAttrs ) ...@@ -309,21 +309,19 @@ void SvxBitmapTabPage::Reset( const SfxItemSet* rAttrs )
CalculateBitmapPresetSize(); CalculateBitmapPresetSize();
} }
bool bTiled = false; bool bStretched = false;
if(rAttrs->GetItemState( XATTR_FILLBMP_TILE ) != SfxItemState::DONTCARE) if(rAttrs->GetItemState( XATTR_FILLBMP_TILE ) != SfxItemState::DONTCARE)
{ bTiled = rAttrs->Get( XATTR_FILLBMP_TILE ).GetValue();
if( rAttrs->Get( XATTR_FILLBMP_TILE ).GetValue() )
{
m_pBitmapStyleLB->SelectEntryPos(static_cast<sal_Int32>(TILED));
}
}
if( m_pBitmapStyleLB->GetSelectedEntryPos() == 0 && rAttrs->GetItemState( XATTR_FILLBMP_STRETCH ) != SfxItemState::DONTCARE) if(rAttrs->GetItemState( XATTR_FILLBMP_STRETCH ) != SfxItemState::DONTCARE)
{ bStretched = rAttrs->Get( XATTR_FILLBMP_STRETCH ).GetValue();
if( rAttrs->Get( XATTR_FILLBMP_STRETCH ).GetValue() )
{ if (bTiled)
m_pBitmapStyleLB->SelectEntryPos( static_cast<sal_Int32>(STRETCHED) ); 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 nWidth = 0;
long nHeight = 0; long nHeight = 0;
...@@ -360,9 +358,6 @@ void SvxBitmapTabPage::Reset( const SfxItemSet* rAttrs ) ...@@ -360,9 +358,6 @@ void SvxBitmapTabPage::Reset( const SfxItemSet* rAttrs )
nHeight = (OutputDevice::LogicToLogic(nHeight, mePoolUnit, MapUnit::Map100thMM )) / fUIScale; 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(rBitmapSize.Width() > 0 && rBitmapSize.Height() > 0)
{ {
if(eRelative == TRISTATE_TRUE) if(eRelative == TRISTATE_TRUE)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment