[Libreoffice-commits] core.git: cui/source cui/uiconfig
Katarina Behrens
Katarina.Behrens at cib.de
Sat Apr 7 15:07:51 UTC 2018
cui/source/tabpages/tpbitmap.cxx | 56 +--------------------------------------
cui/uiconfig/ui/bitmaptabpage.ui | 7 +---
2 files changed, 4 insertions(+), 59 deletions(-)
New commits:
commit 1a9bfdd8976d28fa3a56726bdcae9f2b294d6c6d
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date: Fri Mar 30 18:01:49 2018 +0200
Remove fill styles that are not implemented
Anyone is free to reintroduce those styles and implement them, but
as long as it doesn't work (in fact it never did) it just confuses
the users by presenting functionality that is not there
Change-Id: Ic4c866536a391c02e78969355c4c2fa8d20a9cec
Reviewed-on: https://gerrit.libreoffice.org/52363
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index b2ced9344e0b..aaf51917d776 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -48,12 +48,9 @@ using namespace com::sun::star;
enum BitmapStyle
{
- ORIGINAL,
- FILLED,
- STRETCHED,
- ZOOMED,
CUSTOM,
- TILED
+ TILED,
+ STRETCHED
};
enum TileOffset
@@ -221,15 +218,6 @@ bool SvxBitmapTabPage::FillItemSet( SfxItemSet* rAttrs )
Size aSetBitmapSize;
switch(eStylePos)
{
- case ORIGINAL:
- aSetBitmapSize = rBitmapSize;
- break;
- case FILLED:
- aSetBitmapSize = rFilledSize;
- break;
- case ZOOMED:
- aSetBitmapSize = rZoomedSize;
- break;
case CUSTOM:
case TILED:
{
@@ -373,16 +361,7 @@ void SvxBitmapTabPage::Reset( const SfxItemSet* rAttrs )
}
if(m_pBitmapStyleLB->GetSelectedEntryPos() == 0)
- {
- if( nWidth == rBitmapSize.Width() && nHeight == rBitmapSize.Height() )
- m_pBitmapStyleLB->SelectEntryPos( static_cast<sal_Int32>(ORIGINAL) );
- else if( nWidth == rFilledSize.Width() && nHeight == rFilledSize.Height() )
- m_pBitmapStyleLB->SelectEntryPos( static_cast<sal_Int32>(FILLED) );
- else if( nWidth == rZoomedSize.Width() && nHeight == rZoomedSize.Height() )
- m_pBitmapStyleLB->SelectEntryPos( static_cast<sal_Int32>(ZOOMED) );
- else
m_pBitmapStyleLB->SelectEntryPos( static_cast<sal_Int32>(CUSTOM) );
- }
if(rBitmapSize.Width() > 0 && rBitmapSize.Height() > 0)
{
@@ -623,12 +602,6 @@ IMPL_LINK_NOARG( SvxBitmapTabPage, ModifyBitmapSizeHdl, Edit&, void )
sal_Int64 nWidthPercent = m_pBitmapWidth->Denormalize( m_pBitmapWidth->GetValue() );
sal_Int64 nHeightPercent = m_pBitmapHeight->Denormalize( m_pBitmapHeight->GetValue() );
if( nWidthPercent == 100 && nHeightPercent == 100 )
- m_pBitmapStyleLB->SelectEntryPos( static_cast<sal_Int32>(ORIGINAL) );
- else if( nWidthPercent == nFilledWidthPercent && nHeightPercent == nFilledHeightPercent )
- m_pBitmapStyleLB->SelectEntryPos( static_cast<sal_Int32>(FILLED) );
- else if( nWidthPercent == nZoomedWidthPercent && nHeightPercent == nZoomedHeightPercent )
- m_pBitmapStyleLB->SelectEntryPos( static_cast<sal_Int32>(ZOOMED) );
- else
m_pBitmapStyleLB->SelectEntryPos( static_cast<sal_Int32>(CUSTOM) );
}
ModifyBitmapStyleHdl(*m_pBitmapStyleLB);
@@ -662,31 +635,6 @@ IMPL_LINK_NOARG( SvxBitmapTabPage, ModifyBitmapStyleHdl, ListBox&, void )
Size aSetBitmapSize;
switch(eStylePos)
{
- case ORIGINAL:
- {
- m_pBitmapWidth->SetValue(100);
- m_pBitmapHeight->SetValue(100);
- aSetBitmapSize = rBitmapSize;
- }
- break;
- case FILLED:
- {
- sal_Int64 nWidthPercent = m_pBitmapWidth->Normalize(nFilledWidthPercent);
- m_pBitmapWidth->SetValue(nWidthPercent);
- sal_Int64 nHeightPercent = m_pBitmapHeight->Normalize(nFilledHeightPercent);
- m_pBitmapHeight->SetValue(nHeightPercent);
- aSetBitmapSize = rFilledSize;
- }
- break;
- case ZOOMED:
- {
- sal_Int64 nWidthPercent = m_pBitmapWidth->Normalize(nZoomedWidthPercent);
- m_pBitmapWidth->SetValue(nWidthPercent);
- sal_Int64 nHeightPercent = m_pBitmapHeight->Normalize(nZoomedHeightPercent);
- m_pBitmapHeight->SetValue(nHeightPercent);
- aSetBitmapSize = rZoomedSize;
- }
- break;
case CUSTOM:
case TILED:
{
diff --git a/cui/uiconfig/ui/bitmaptabpage.ui b/cui/uiconfig/ui/bitmaptabpage.ui
index cb5e9e58b766..57377546db67 100644
--- a/cui/uiconfig/ui/bitmaptabpage.ui
+++ b/cui/uiconfig/ui/bitmaptabpage.ui
@@ -123,12 +123,9 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<items>
- <item translatable="yes" context="bitmaptabpage|bitmapstyle">Original</item>
- <item translatable="yes" context="bitmaptabpage|bitmapstyle">Filled</item>
- <item translatable="yes" context="bitmaptabpage|bitmapstyle">Stretched</item>
- <item translatable="yes" context="bitmaptabpage|bitmapstyle">Zoomed</item>
- <item translatable="yes" context="bitmaptabpage|bitmapstyle">Custom</item>
+ <item translatable="yes" context="bitmaptabpage|bitmapstyle">Custom position/size</item>
<item translatable="yes" context="bitmaptabpage|bitmapstyle">Tiled</item>
+ <item translatable="yes" context="bitmaptabpage|bitmapstyle">Stretched</item>
</items>
</object>
<packing>
More information about the Libreoffice-commits
mailing list