summaryrefslogtreecommitdiff
path: root/sw/source/ui/chrdlg/pardlg.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/chrdlg/pardlg.cxx')
-rw-r--r--sw/source/ui/chrdlg/pardlg.cxx50
1 files changed, 44 insertions, 6 deletions
diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx
index 215426c194e6..c805b8bd0347 100644
--- a/sw/source/ui/chrdlg/pardlg.cxx
+++ b/sw/source/ui/chrdlg/pardlg.cxx
@@ -65,6 +65,8 @@ SwParaDlg::SwParaDlg(Window *pParent,
, m_nParaDrpCps(0)
, m_nParaBckGrnd(0)
, m_nParaBorder(0)
+ , m_nAreaId(0)
+ , m_nTransparenceId(0)
{
nHtmlMode = ::GetHtmlMode(rVw.GetDocShell());
bool bHtmlMode = (nHtmlMode & HTMLMODE_ON) == HTMLMODE_ON;
@@ -139,13 +141,20 @@ SwParaDlg::SwParaDlg(Window *pParent,
if(!bHtmlMode || (nHtmlMode & (HTMLMODE_SOME_STYLES|HTMLMODE_FULL_STYLES)))
{
- OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageCreatorFunc fail!");
- OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageRangesFunc fail!");
- m_nParaBckGrnd = AddTabPage("labelTP_BACKGROUND", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ) );
+ //UUUU remove?
+ //OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageCreatorFunc fail!");
+ //OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageRangesFunc fail!");
+ //m_nParaBckGrnd = AddTabPage("labelTP_BACKGROUND", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ) );
+ //
+ //UUUU add Area and Transparence TabPages
+ 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 ) );
}
else
{
- RemoveTabPage("labelTP_BACKGROUND");
+ //UUUU RemoveTabPage("labelTP_BACKGROUND");
+ RemoveTabPage("area");
+ RemoveTabPage("transparence");
}
OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), "GetTabPageCreatorFunc fail!");
@@ -214,8 +223,15 @@ void SwParaDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
if(!( nHtmlMode & HTMLMODE_ON ) ||
nHtmlMode & HTMLMODE_SOME_STYLES)
{
- aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, SVX_SHOW_SELECTOR));
- rPage.PageCreated(aSet);
+ // Seitenumbruch nur, wenn der Cursor im Body-Bereich und nicht in
+ // einer Tabelle steht
+ const sal_uInt16 eType = rSh.GetFrmType(0,sal_True);
+ if(!(FRMTYPE_BODY & eType) ||
+ rSh.GetSelectionType() & nsSelectionType::SEL_TBL)
+ {
+ aSet.Put(SfxBoolItem(SID_DISABLE_SVXEXTPARAGRAPHTABPAGE_PAGEBREAK,sal_True));
+ rPage.PageCreated(aSet);
+ }
}
}
else if( m_nParaNumPara == nId)
@@ -240,7 +256,29 @@ void SwParaDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
for(std::set<OUString>::const_iterator it = aNames.begin(); it != aNames.end(); ++it)
rBox.InsertEntry(*it);
}
+ //UUUU inits for Area and Transparency TabPages
+ // The selection attribute lists (XPropertyList derivates, e.g. XColorList for
+ // the color table) need to be added as items (e.g. SvxColorTableItem) to make
+ // these pages find the needed attributes for fill style suggestions.
+ // These are added in SwDocStyleSheet::GetItemSet() for the SFX_STYLE_FAMILY_PARA on
+ // demand, but could also be directly added from the DrawModel.
+ else if (m_nAreaId == nId)
+ {
+ SfxItemSet aNew(*aSet.GetPool(),
+ SID_COLOR_TABLE, SID_BITMAP_LIST,
+ SID_OFFER_IMPORT, SID_OFFER_IMPORT, 0, 0);
+
+ aNew.Put(*GetInputSetImpl());
+
+ // add flag for direct graphic content selection
+ aNew.Put(SfxBoolItem(SID_OFFER_IMPORT, true));
+ rPage.PageCreated(aNew);
+ }
+ else if (m_nTransparenceId == nId)
+ {
+ rPage.PageCreated(*GetInputSetImpl());
+ }
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */