summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZolnai Tamás <zolnaitamas2000@gmail.com>2015-06-14 20:25:26 +0200
committerZolnai Tamás <zolnaitamas2000@gmail.com>2015-06-14 21:49:50 +0200
commite030422305590084263b7490301c3b7ea356d424 (patch)
treef8a96f0de858fb453915738d34218b4859400645
parent16d202f29cafbdc8d0648b830d2209f5c61c878f (diff)
Paragraph related part of Background Tab is unused now
For paragraphs Area Tab is used for setting background. Change-Id: I83859a1b2125374b81c084cfa45487a42adcd5a6
-rw-r--r--cui/source/inc/backgrnd.hxx6
-rw-r--r--cui/source/tabpages/backgrnd.cxx215
-rw-r--r--cui/uiconfig/ui/backgroundpage.ui15
-rw-r--r--include/svx/flagsdef.hxx1
-rw-r--r--include/svx/svxids.hrc1
-rw-r--r--svx/source/dialog/srchdlg.cxx3
-rw-r--r--sw/source/ui/fmtui/tmpdlg.cxx7
-rw-r--r--sw/source/uibase/app/docst.cxx2
-rw-r--r--sw/source/uibase/app/docstyle.cxx3
9 files changed, 2 insertions, 251 deletions
diff --git a/cui/source/inc/backgrnd.hxx b/cui/source/inc/backgrnd.hxx
index 2aefa5d2e22f..98933c9bdf5d 100644
--- a/cui/source/inc/backgrnd.hxx
+++ b/cui/source/inc/backgrnd.hxx
@@ -30,7 +30,6 @@
class BackgroundPreviewImpl;
class SvxOpenGraphicDialog;
struct SvxBackgroundTable_Impl;
-struct SvxBackgroundPara_Impl;
struct SvxBackgroundPage_Impl;
class SvxBrushItem;
@@ -62,8 +61,6 @@ public:
void ShowSelector();
/// for the Writer (cells/rows/tables)
void ShowTblControl();
- /// for the Writer (paragraph/characters)
- void ShowParaControl(bool bCharOnly = false);
virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE;
protected:
@@ -79,7 +76,6 @@ private:
VclPtr<ListBox> m_pLbSelect;
VclPtr<FixedText> m_pTblDesc;
VclPtr<ListBox> m_pTblLBox;
- VclPtr<ListBox> m_pParaLBox;
VclPtr<FixedText> m_pBackGroundColorLabelFT;
VclPtr<VclFrame> m_pBackGroundColorFrame;
@@ -120,7 +116,6 @@ private:
SvxOpenGraphicDialog* pImportDlg;
SvxBackgroundTable_Impl* pTableBck_Impl;///< Items for Sw-Table must be corrected
- SvxBackgroundPara_Impl* pParaBck_Impl;///< also for the paragraph style
std::unique_ptr<SvxBrushItem> pHighlighting;
void FillColorValueSets_Impl();
@@ -144,7 +139,6 @@ private:
DECL_LINK( FileClickHdl_Impl, CheckBox* );
DECL_LINK(BackgroundColorHdl_Impl, void *);
DECL_LINK( TblDestinationHdl_Impl, ListBox* );
- DECL_LINK( ParaDestinationHdl_Impl, ListBox* );
};
#endif // INCLUDED_CUI_SOURCE_INC_BACKGRND_HXX
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 2e066a35b7db..0a8e453ed4fb 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -89,21 +89,6 @@ struct SvxBackgroundTable_Impl
{}
};
-struct SvxBackgroundPara_Impl
-{
- SvxBrushItem* pParaBrush;
- SvxBrushItem* pCharBrush;
-
- sal_Int32 nActPos;
-
- SvxBackgroundPara_Impl()
- : pParaBrush(NULL)
- , pCharBrush(NULL)
- , nActPos(LISTBOX_ENTRY_NOTFOUND)
- {}
-
-};
-
struct SvxBackgroundPage_Impl
{
Idle* pLoadIdle;
@@ -349,7 +334,6 @@ SvxBackgroundTabPage::SvxBackgroundTabPage(vcl::Window* pParent, const SfxItemSe
, pPageImpl(new SvxBackgroundPage_Impl)
, pImportDlg(NULL)
, pTableBck_Impl(NULL)
- , pParaBck_Impl(NULL)
, pHighlighting(nullptr)
{
get(m_pAsGrid, "asgrid");
@@ -357,7 +341,6 @@ SvxBackgroundTabPage::SvxBackgroundTabPage(vcl::Window* pParent, const SfxItemSe
get(m_pLbSelect, "selectlb");
get(m_pTblDesc, "forft");
get(m_pTblLBox, "tablelb");
- get(m_pParaLBox, "paralb");
get(m_pBackGroundColorLabelFT, "background_label");
get(m_pBackGroundColorFrame, "backgroundcolorframe");
@@ -428,20 +411,11 @@ void SvxBackgroundTabPage::dispose()
pTableBck_Impl = NULL;
}
- if(pParaBck_Impl)
- {
- delete pParaBck_Impl->pParaBrush;
- delete pParaBck_Impl->pCharBrush;
- delete pParaBck_Impl;
- pParaBck_Impl = NULL;
- }
-
m_pAsGrid.clear();
m_pSelectTxt.clear();
m_pLbSelect.clear();
m_pTblDesc.clear();
m_pTblLBox.clear();
- m_pParaLBox.clear();
m_pBackGroundColorFrame.clear();
m_pBackgroundColorSet.clear();
m_pPreviewWin1.clear();
@@ -511,35 +485,12 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet )
break;
}
}
- else if( SfxItemState::SET == rSet->GetItemState(
- SID_PARA_BACKGRND_DESTINATION, false, &pItem ) )
- {
- nDestValue = static_cast<const SfxUInt16Item*>(pItem)->GetValue();
- // character activated?
- sal_Int32 nParaSel = m_pParaLBox->GetSelectEntryPos();
- if(1 == nParaSel)
- {
- // then it was a "standard"-call
- nDestValue = nParaSel;
- }
- m_pParaLBox->SelectEntryPos(nDestValue);
-
- switch ( nDestValue )
- {
- case PARA_DEST_PARA:
- nSlot = SID_ATTR_BRUSH;
- break;
- case PARA_DEST_CHAR:
- nSlot = SID_ATTR_BRUSH_CHAR;
- break;
- }
- }
else if( bHighlighting )
{
nSlot = SID_ATTR_BRUSH_CHAR;
}
//#111173# the destination item is missing when the parent style has been changed
- if(USHRT_MAX == nDestValue && (m_pParaLBox->IsVisible()||m_pTblLBox->IsVisible()))
+ if(USHRT_MAX == nDestValue && m_pTblLBox->IsVisible())
nDestValue = 0;
sal_uInt16 nWhich = GetWhich( nSlot );
@@ -608,41 +559,6 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet )
TblDestinationHdl_Impl(m_pTblLBox);
m_pTblLBox->SaveValue();
}
- else if (m_pParaLBox->GetData() == m_pParaLBox)
- {
- sal_Int32 nValue = m_pParaLBox->GetSelectEntryPos();
-
- if ( pParaBck_Impl )
- {
- delete pParaBck_Impl->pParaBrush;
- delete pParaBck_Impl->pCharBrush;
- }
- else
- pParaBck_Impl = new SvxBackgroundPara_Impl();
-
- pParaBck_Impl->nActPos = nValue;
-
- nWhich = GetWhich( SID_ATTR_BRUSH );
- if ( rSet->GetItemState( nWhich, false ) >= SfxItemState::DEFAULT )
- {
- pBgdAttr = static_cast<const SvxBrushItem*>(&( rSet->Get( nWhich ) ));
- pParaBck_Impl->pParaBrush = new SvxBrushItem(*pBgdAttr);
- }
-
- nWhich = GetWhich( SID_ATTR_BRUSH_CHAR );
- rSet->GetItemState( nWhich, true );
- rSet->GetItemState( nWhich, false );
- if ( rSet->GetItemState( nWhich, true ) > SfxItemState::DEFAULT )
- {
- pBgdAttr = static_cast<const SvxBrushItem*>(&( rSet->Get( nWhich ) ));
- pParaBck_Impl->pCharBrush = new SvxBrushItem(*pBgdAttr);
- }
- else
- pParaBck_Impl->pCharBrush = new SvxBrushItem(SID_ATTR_BRUSH_CHAR);
-
- ParaDestinationHdl_Impl(m_pParaLBox);
- m_pParaLBox->SaveValue();
- }
else if( bHighlighting )
{
nWhich = GetWhich( SID_ATTR_BRUSH_CHAR );
@@ -751,18 +667,6 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet )
break;
}
}
- else if (m_pParaLBox->GetData() == m_pParaLBox)
- {
- switch(m_pParaLBox->GetSelectEntryPos())
- {
- case PARA_DEST_PARA:
- nSlot = SID_ATTR_BRUSH;
- break;
- case PARA_DEST_CHAR:
- nSlot = SID_ATTR_BRUSH_CHAR;
- break;
- }
- }
else if( bHighlighting )
{
nSlot = SID_ATTR_BRUSH_CHAR;
@@ -923,44 +827,6 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet )
bModified |= true;
}
}
- else if (m_pParaLBox->GetData() == m_pParaLBox)
- {
- // the current condition has already been put
- if( nSlot != SID_ATTR_BRUSH && m_pParaLBox->IsVisible()) // not in search format dialog
- {
- const SfxPoolItem* pOldPara =
- GetOldItem( *rCoreSet, SID_ATTR_BRUSH );
-
- if ( *pParaBck_Impl->pParaBrush != *pOldPara )
- {
- rCoreSet->Put( *pParaBck_Impl->pParaBrush );
- bModified |= true;
- }
- }
-
- if( nSlot != SID_ATTR_BRUSH_CHAR )
- {
- const SfxPoolItem* pOldChar =
- GetOldItem( *rCoreSet, SID_ATTR_BRUSH_CHAR );
- DBG_ASSERT(pParaBck_Impl, "pParaBck_Impl == NULL ?");
- if ( pOldChar &&
- //#111173# crash report shows that pParaBck_Impl can be NULL, the cause is unknown
- pParaBck_Impl &&
- (*pParaBck_Impl->pCharBrush != *pOldChar ||
- *pParaBck_Impl->pCharBrush != SvxBrushItem(SID_ATTR_BRUSH_CHAR)))
- {
- rCoreSet->Put( *pParaBck_Impl->pCharBrush );
- bModified |= true;
- }
- }
-
- if( m_pParaLBox->IsValueChangedFromSaved() )
- {
- rCoreSet->Put( SfxUInt16Item( SID_BACKGRND_DESTINATION,
- m_pParaLBox->GetSelectEntryPos() ) );
- bModified |= true;
- }
- }
else if( bHighlighting )
{
if( nSlot != SID_ATTR_BRUSH_CHAR )
@@ -1284,12 +1150,10 @@ IMPL_LINK_NOARG(SvxBackgroundTabPage, SelectHdl_Impl)
if ( drawing::FillStyle_SOLID == lcl_getFillStyle(m_pLbSelect) )
{
ShowColorUI_Impl();
- m_pParaLBox->Enable(); // drawing background can't be a bitmap
}
else
{
ShowBitmapUI_Impl();
- m_pParaLBox->Enable(false); // drawing background can't be a bitmap
}
return 0;
}
@@ -1458,19 +1322,6 @@ void SvxBackgroundTabPage::ShowTblControl()
m_pAsGrid->Show();
}
-void SvxBackgroundTabPage::ShowParaControl(bool bCharOnly)
-{
- m_pParaLBox->SetSelectHdl(HDL(ParaDestinationHdl_Impl));
- m_pParaLBox->SelectEntryPos(0);
- if (!bCharOnly)
- {
- m_pTblDesc->Show();
- m_pParaLBox->Show();
- m_pAsGrid->Show();
- }
- m_pParaLBox->SetData(m_pParaLBox); // here it can be recognized that this mode is turned on
-}
-
IMPL_LINK( SvxBackgroundTabPage, TblDestinationHdl_Impl, ListBox*, pBox )
{
sal_Int32 nSelPos = pBox->GetSelectEntryPos();
@@ -1559,68 +1410,6 @@ IMPL_LINK( SvxBackgroundTabPage, TblDestinationHdl_Impl, ListBox*, pBox )
return 0;
}
-IMPL_LINK( SvxBackgroundTabPage, ParaDestinationHdl_Impl, ListBox*, pBox )
-{
- sal_Int32 nSelPos = pBox->GetSelectEntryPos();
- if( pParaBck_Impl && pParaBck_Impl->nActPos != nSelPos)
- {
- SvxBrushItem* pActItem = NULL;
- switch(pParaBck_Impl->nActPos)
- {
- case PARA_DEST_PARA:
- pActItem = pParaBck_Impl->pParaBrush;
- break;
- case PARA_DEST_CHAR:
- pActItem = pParaBck_Impl->pCharBrush;
- break;
- default:
- /* we assert here because the rest of the code expect pActItem to be non NULL */
- assert(false);
- return 0;
- }
- pParaBck_Impl->nActPos = nSelPos;
- if(drawing::FillStyle_SOLID == lcl_getFillStyle(m_pLbSelect)) // brush selected
- {
- sal_uInt16 nWhich = pActItem->Which();
- *pActItem = SvxBrushItem( aBgdColor, nWhich );
- }
- else
- {
- SvxGraphicPosition eNewPos = GetGraphicPosition_Impl();
- const bool bIsLink = m_pBtnLink->IsChecked();
-
- if ( !bIsLink && !bIsGraphicValid )
- bIsGraphicValid = LoadLinkedGraphic_Impl();
-
- if ( bIsLink )
- *pActItem = SvxBrushItem( aBgdGraphicPath,
- aBgdGraphicFilter,
- eNewPos,
- pActItem->Which() );
- else
- *pActItem = SvxBrushItem( aBgdGraphic,
- eNewPos,
- pActItem->Which() );
- }
- switch(nSelPos)
- {
- case PARA_DEST_PARA:
- pActItem = pParaBck_Impl->pParaBrush;
- m_pLbSelect->Enable();
- break;
- case PARA_DEST_CHAR:
- {
- pActItem = pParaBck_Impl->pCharBrush;
- m_pLbSelect->Enable(false);
- }
- break;
- }
- OUString aUserData = GetUserData();
- FillControls_Impl(*pActItem, aUserData);
- }
- return 0;
-}
-
void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr,
const OUString& rUserData )
{
@@ -1738,8 +1527,6 @@ void SvxBackgroundTabPage::PageCreated(const SfxAllItemSet& aSet)
SvxBackgroundTabFlags nFlags = static_cast<SvxBackgroundTabFlags>(pFlagItem->GetValue());
if (nFlags & SvxBackgroundTabFlags::SHOW_TBLCTL )
ShowTblControl();
- if ( nFlags & SvxBackgroundTabFlags::SHOW_PARACTL )
- ShowParaControl();
if ( nFlags & SvxBackgroundTabFlags::SHOW_SELECTOR )
{
ShowSelector();
diff --git a/cui/uiconfig/ui/backgroundpage.ui b/cui/uiconfig/ui/backgroundpage.ui
index 91c5cb8420cd..bd31f228a8f0 100644
--- a/cui/uiconfig/ui/backgroundpage.ui
+++ b/cui/uiconfig/ui/backgroundpage.ui
@@ -97,21 +97,6 @@
<property name="position">0</property>
</packing>
</child>
- <child>
- <object class="GtkComboBoxText" id="paralb">
- <property name="can_focus">False</property>
- <property name="no_show_all">True</property>
- <items>
- <item translatable="yes">Paragraph</item>
- <item translatable="yes">Character</item>
- </items>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
</object>
<packing>
<property name="left_attach">3</property>
diff --git a/include/svx/flagsdef.hxx b/include/svx/flagsdef.hxx
index c3795de7d66c..d6fca53252d3 100644
--- a/include/svx/flagsdef.hxx
+++ b/include/svx/flagsdef.hxx
@@ -42,7 +42,6 @@ enum class SvxBackgroundTabFlags
{
NONE = 0x00,
SHOW_SELECTOR = 0x01,
- SHOW_PARACTL = 0x02,
SHOW_TBLCTL = 0x08,
SHOW_HIGHLIGHTING = 0x10,
};
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index ed45af082a20..5b8efbc204b9 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -584,7 +584,6 @@
// CAUTION! Range <587 .. 587> used by EditEngine (!)
-#define SID_PARA_BACKGRND_DESTINATION ( SID_SVX_START + 590 )
// CAUTION! Range <591 .. 591> used by EditEngine (!)
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index 76c43e5054a8..64bd0bf7af39 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -1911,8 +1911,6 @@ IMPL_LINK_NOARG(SvxSearchDialog, FormatHdl_Impl)
sal_uInt16 nBrushWhich = pSh->GetPool().GetWhich(SID_ATTR_BRUSH);
pWhRanges[nPos++] = nBrushWhich;
pWhRanges[nPos++] = nBrushWhich;
- pWhRanges[nPos++] = SID_PARA_BACKGRND_DESTINATION;
- pWhRanges[nPos++] = SID_PARA_BACKGRND_DESTINATION;
pWhRanges[nPos] = 0;
SfxItemPool& rPool = pSh->GetPool();
SfxItemSet aSet( rPool, pWhRanges.get() );
@@ -1920,7 +1918,6 @@ IMPL_LINK_NOARG(SvxSearchDialog, FormatHdl_Impl)
aSet.InvalidateAllItems();
aSet.Put(SvxBrushItem(nBrushWhich));
- aSet.Put(SfxUInt16Item(SID_PARA_BACKGRND_DESTINATION, PARA_DEST_CHAR));
if ( bSearch )
{
diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx
index 468b9fec1f39..e29858a40d71 100644
--- a/sw/source/ui/fmtui/tmpdlg.cxx
+++ b/sw/source/ui/fmtui/tmpdlg.cxx
@@ -200,11 +200,6 @@ SwTemplateDlg::SwTemplateDlg(vcl::Window* pParent,
m_nAreaId = AddTabPage("area", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_AREA ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_AREA ));
m_nTransparenceId = AddTabPage("transparence", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TRANSPARENCE ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_TRANSPARENCE ) );
- //UUUU remove?
- //OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageCreatorFunc fail!");
- //OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageRangesFunc fail!");
- //m_nBackgroundId = AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ) );
-
OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), "GetTabPageCreatorFunc fail!");
OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ), "GetTabPageRangesFunc fail!");
m_nBorderId = AddTabPage("borders", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ) );
@@ -472,8 +467,6 @@ void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
else if (nId == m_nBackgroundId)
{
SvxBackgroundTabFlags nFlagType = SvxBackgroundTabFlags::NONE;
- if( SFX_STYLE_FAMILY_PARA == nType )
- nFlagType |= SvxBackgroundTabFlags::SHOW_PARACTL;
if( SFX_STYLE_FAMILY_CHAR != nType )
nFlagType |= SvxBackgroundTabFlags::SHOW_SELECTOR;
if( SFX_STYLE_FAMILY_CHAR == nType )
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index 77e79afc13a8..3c76f2564644 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -751,8 +751,6 @@ sal_uInt16 SwDocShell::Edit(
{
SfxItemSet& rSet = xTmp->GetItemSet();
::SwToSfxPageDescAttr( rSet );
- // firstly only a Zero
- rSet.Put(SwBackgroundDestinationItem(SID_PARA_BACKGRND_DESTINATION, 0));
// merge list level indent attributes into the item set if needed
xTmp->MergeIndentAttrsOfListStyle( rSet );
}
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx
index 578445b7779d..6aeb0fbfb5f5 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -407,7 +407,7 @@ SwDocStyleSheet::SwDocStyleSheet( SwDoc& rDocument,
SID_SWREGISTER_COLLECTION, SID_SWREGISTER_COLLECTION, // [10451
SID_ATTR_PARA_PAGENUM, SID_ATTR_PARA_PAGENUM, // [10457
SID_SWREGISTER_MODE, SID_SWREGISTER_MODE, // [10467
- SID_PARA_BACKGRND_DESTINATION, SID_ATTR_BRUSH_CHAR, // [10590
+ SID_ATTR_BRUSH_CHAR, SID_ATTR_BRUSH_CHAR, // [10590
SID_ATTR_NUMBERING_RULE, SID_ATTR_NUMBERING_RULE, // [10855
SID_ATTR_AUTO_STYLE_UPDATE, SID_ATTR_AUTO_STYLE_UPDATE, // [12065
FN_PARAM_FTN_INFO, FN_PARAM_FTN_INFO, // [21123
@@ -803,7 +803,6 @@ OUString SwDocStyleSheet::GetDescription(SfxMapUnit eUnit)
switch ( pItem->Which() )
{
case SID_ATTR_AUTO_STYLE_UPDATE:
- case SID_PARA_BACKGRND_DESTINATION:
case RES_PAGEDESC:
//CTL not yet supported
case RES_CHRATR_CTL_FONT: