Kaydet (Commit) 2b1f0d31 authored tarafından Tamás Zolnai's avatar Tamás Zolnai

tdf#111738: Duplicated numbering alignment option on numbering dialog

Change-Id: Ifb18d5da84cc47da59448549f3c617e8040c246c
Reviewed-on: https://gerrit.libreoffice.org/44636Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarTamás Zolnai <tamas.zolnai@collabora.com>
üst 019e6ae7
......@@ -262,8 +262,6 @@ class SvxNumOptionsTabPage : public SfxTabPage
VclPtr<NumericField> m_pStartED;
VclPtr<FixedText> m_pBulletFT;
VclPtr<PushButton> m_pBulletPB;
VclPtr<FixedText> m_pAlignFT;
VclPtr<ListBox> m_pAlignLB;
VclPtr<FixedText> m_pBitmapFT;
VclPtr<MenuButton> m_pBitmapMB;
sal_uInt16 m_nGalleryId;
......
......@@ -1120,10 +1120,6 @@ SvxNumOptionsTabPage::SvxNumOptionsTabPage(vcl::Window* pParent,
get(m_pBulletFT, "bulletft");
get(m_pBulletPB, "bullet");
get(m_pAlignFT, "numalignft");
get(m_pAlignLB, "numalign");
get(m_pBitmapFT, "bitmapft");
get(m_pBitmapMB, "bitmap");
......@@ -1220,8 +1216,6 @@ void SvxNumOptionsTabPage::dispose()
m_pStartED.clear();
m_pBulletFT.clear();
m_pBulletPB.clear();
m_pAlignFT.clear();
m_pAlignLB.clear();
m_pBitmapFT.clear();
m_pBitmapMB.clear();
m_pWidthFT.clear();
......@@ -1424,17 +1418,6 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet* rSet )
if(LISTBOX_ENTRY_NOTFOUND != nPos)
m_pFmtLB->RemoveEntry(nPos);
}
if(pActNum->IsFeatureSupported(SvxNumRuleFlags::SYMBOL_ALIGNMENT))
{
m_pAlignFT->Show();
m_pAlignLB->Show();
m_pAlignLB->SetSelectHdl(LINK(this, SvxNumOptionsTabPage, EditListBoxHdl_Impl));
}
else
{
m_pAlignFT->Hide();
m_pAlignLB->Hide();
}
// MegaHack: because of a not-fixable 'design mistake/error' in Impress
// delete all kinds of numeric enumerations
......@@ -1468,7 +1451,6 @@ void SvxNumOptionsTabPage::InitControls()
bool bSameSize = true;
bool bSameBulColor = true;
bool bSameBulRelSize= true;
bool bSameAdjust = true;
const SvxNumberFormat* aNumFmtArr[SVX_MAX_NUM];
OUString sFirstCharFmt;
......@@ -1509,7 +1491,6 @@ void SvxNumOptionsTabPage::InitControls()
bSameSize &= aNumFmtArr[i]->GetGraphicSize() == aFirstSize;
bSameBulColor &= aNumFmtArr[i]->GetBulletColor() == aNumFmtArr[nLvl]->GetBulletColor();
bSameBulRelSize &= aNumFmtArr[i]->GetBulletRelSize() == aNumFmtArr[nLvl]->GetBulletRelSize();
bSameAdjust &= aNumFmtArr[i]->GetNumAdjust() == aNumFmtArr[nLvl]->GetNumAdjust();
}
nHighestLevel = i;
}
......@@ -1527,7 +1508,6 @@ void SvxNumOptionsTabPage::InitControls()
{
nNumberingType = SVX_NUM_NUMBER_NONE;
bAllLevel = false;
bSameAdjust = false;
bSameBulRelSize = false;
bSameBulColor = false;
bSameStart = false;
......@@ -1576,19 +1556,6 @@ void SvxNumOptionsTabPage::InitControls()
{
m_pAllLevelNF->SetText("");
}
if(bSameAdjust)
{
sal_Int32 nPos = 1; // centered
if(aNumFmtArr[nLvl]->GetNumAdjust() == SvxAdjust::Left)
nPos = 0;
else if(aNumFmtArr[nLvl]->GetNumAdjust() == SvxAdjust::Right)
nPos = 2;
m_pAlignLB->SelectEntryPos(nPos);
}
else
{
m_pAlignLB->SetNoSelection();
}
if(bBullRelSize)
{
......@@ -2258,16 +2225,6 @@ void SvxNumOptionsTabPage::EditModifyHdl_Impl( Edit* pEdit )
aNumFmt.SetSuffix( m_pSuffixED->GetText() );
else if(bStart)
aNumFmt.SetStart( (sal_uInt16)m_pStartED->GetValue() );
else //align
{
sal_Int32 nPos = m_pAlignLB->GetSelectedEntryPos();
SvxAdjust eAdjust = SvxAdjust::Center;
if(nPos == 0)
eAdjust = SvxAdjust::Left;
else if(nPos == 2)
eAdjust = SvxAdjust::Right;
aNumFmt.SetNumAdjust( eAdjust );
}
pActNum->SetLevel(i, aNumFmt);
}
nMask <<= 1;
......
......@@ -328,21 +328,6 @@
<property name="top_attach">5</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="numalign">
<property name="visible">True</property>
<property name="can_focus">False</property>
<items>
<item translatable="yes" context="numberingoptionspage|numalign">Left</item>
<item translatable="yes" context="numberingoptionspage|numalign">Centered</item>
<item translatable="yes" context="numberingoptionspage|numalign">Right</item>
</items>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="bullet">
<property name="label" translatable="yes" context="numberingoptionspage|bullet">Select...</property>
......@@ -502,20 +487,6 @@
<property name="top_attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="numalignft">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="numberingoptionspage|numalignft">_Alignment:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">numalign</property>
<property name="xalign">1</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
</packing>
</child>
<child>
<placeholder/>
</child>
......
......@@ -4378,7 +4378,7 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& rSlideHd, SvStream& rIn, Sd
break;
}
SvxNumRule aRule( SvxNumRuleFlags::BULLET_REL_SIZE | SvxNumRuleFlags::BULLET_COLOR |
SvxNumRuleFlags::CHAR_TEXT_DISTANCE | SvxNumRuleFlags::SYMBOL_ALIGNMENT,
SvxNumRuleFlags::CHAR_TEXT_DISTANCE,
nLevels, false, eNumRuleType );
for ( sal_uInt16 nCount = 0; nDepth < nLevels; nCount++ )
{
......
......@@ -220,7 +220,6 @@ enum class SvxNumRuleFlags
CHAR_STYLE = 0x0004, // Character styles?
BULLET_REL_SIZE = 0x0008, // relative bullet size?
BULLET_COLOR = 0x0010, // Bullet color
SYMBOL_ALIGNMENT = 0x0040, // alignment to be shown in the options
NO_NUMBERS = 0x0080, // Numbering are not allowed
ENABLE_LINKED_BMP = 0x0100, // linked bitmaps are available
ENABLE_EMBEDDED_BMP = 0x0200 // embedded bitmaps are available
......
......@@ -1154,7 +1154,7 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
aNumberFormat.SetNumAdjust(SvxAdjust::Left);
SvxNumRule aNumRule( SvxNumRuleFlags::BULLET_REL_SIZE | SvxNumRuleFlags::BULLET_COLOR |
SvxNumRuleFlags::CHAR_TEXT_DISTANCE | SvxNumRuleFlags::SYMBOL_ALIGNMENT,
SvxNumRuleFlags::CHAR_TEXT_DISTANCE,
SVX_MAX_NUM, false );
for( sal_uInt16 i = 0; i < aNumRule.GetLevelCount(); i++ )
{
......
......@@ -230,7 +230,7 @@ void NBOTypeMgrBase::ImplStore(const OUString& filename)
for(sal_Int32 nItem = 0; nItem < DEFAULT_NUM_VALUSET_COUNT; nItem++ ) {
if (IsCustomized(nItem)) {
SvxNumRule aDefNumRule( SvxNumRuleFlags::BULLET_REL_SIZE | SvxNumRuleFlags::CONTINUOUS | SvxNumRuleFlags::BULLET_COLOR |
SvxNumRuleFlags::CHAR_TEXT_DISTANCE | SvxNumRuleFlags::SYMBOL_ALIGNMENT,
SvxNumRuleFlags::CHAR_TEXT_DISTANCE,
10, false,
SvxNumRuleType::NUMBERING, SvxNumberFormat::LABEL_ALIGNMENT);
xOStm->WriteInt32( nItem );
......@@ -595,7 +595,7 @@ void OutlineTypeMgr::Init()
aOutlineAccess = xDefNum->getDefaultOutlineNumberings( aLocale );
SvxNumRule aDefNumRule( SvxNumRuleFlags::BULLET_REL_SIZE | SvxNumRuleFlags::CONTINUOUS | SvxNumRuleFlags::BULLET_COLOR |
SvxNumRuleFlags::CHAR_TEXT_DISTANCE | SvxNumRuleFlags::SYMBOL_ALIGNMENT,
SvxNumRuleFlags::CHAR_TEXT_DISTANCE,
10, false,
SvxNumRuleType::NUMBERING, SvxNumberFormat::LABEL_ALIGNMENT);
......
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