summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2014-06-02 15:00:50 +0000
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-07-01 13:30:09 +0200
commit7d9bb549d498d6beed2c4050c402d09643febdfa (patch)
tree2caf67e36c9ccd058268b003cf2bc39b9b102b53 /sw/source/ui
parenta5e137eb1d37361c60175e8fba780fc46b377a23 (diff)
Related: #i124638# Second step of DrawingLayer FillAttributes...
for Writer objects, now added support for Paragraph and PageStyle (including Header and Footer) for direct attributes and style attributes (cherry picked from commit cc25c58f7052827bfebdc9fbeec668c8fa29ed1b) Conflicts: cui/source/factory/dlgfact.cxx cui/source/factory/dlgfact.hxx cui/source/inc/bbdlg.hxx cui/source/inc/cuires.hrc cui/source/tabpages/bbdlg.cxx cui/source/tabpages/bbdlg.src cui/source/tabpages/page.cxx cui/source/tabpages/tparea.cxx include/svx/pagectrl.hxx include/svx/svxdlg.hxx include/svx/svxids.hrc include/xmloff/PageMasterStyleMap.hxx include/xmloff/prstylei.hxx include/xmloff/txtprmap.hxx svx/Package_inc.mk svx/inc/svx/hdft.hxx svx/source/dialog/hdft.cxx svx/source/dialog/pagectrl.cxx svx/source/tbxctrls/tbxcolorupdate.cxx svx/source/unodraw/unobrushitemhelper.cxx sw/Library_sw.mk sw/inc/fillattributes.hxx sw/inc/format.hxx sw/inc/frmatr.hxx sw/inc/frmfmt.hxx sw/inc/hintids.hxx sw/inc/hints.hxx sw/inc/ndtxt.hxx sw/inc/node.hxx sw/inc/swunohelper.hxx sw/inc/unobrushitemhelper.hxx sw/inc/unoprnms.hxx sw/source/core/attr/format.cxx sw/source/core/attr/hints.cxx sw/source/core/doc/docdesc.cxx sw/source/core/doc/docdraw.cxx sw/source/core/doc/docfmt.cxx sw/source/core/doc/docnew.cxx sw/source/core/doc/docredln.cxx sw/source/core/doc/poolfmt.cxx sw/source/core/doc/visiturl.cxx sw/source/core/docnode/node.cxx sw/source/core/inc/frame.hxx sw/source/core/inc/frmtool.hxx sw/source/core/inc/rolbck.hxx sw/source/core/layout/atrfrm.cxx sw/source/core/layout/fillattributes.cxx sw/source/core/layout/findfrm.cxx sw/source/core/layout/paintfrm.cxx sw/source/core/txtnode/ndtxt.cxx sw/source/core/txtnode/thints.cxx sw/source/core/txtnode/txtedt.cxx sw/source/core/undo/rolbck.cxx sw/source/core/unocore/swunohelper.cxx sw/source/core/unocore/unoframe.cxx sw/source/core/unocore/unomap.cxx sw/source/core/unocore/unoparagraph.cxx sw/source/core/unocore/unoprnms.cxx sw/source/core/unocore/unostyle.cxx sw/source/ui/chrdlg/paradlg.src sw/source/ui/chrdlg/pardlg.cxx sw/source/ui/fmtui/tmpdlg.cxx sw/source/ui/fmtui/tmpdlg.src sw/source/uibase/app/docst.cxx sw/source/uibase/app/docstyle.cxx sw/source/uibase/frmdlg/colex.cxx sw/source/uibase/shells/basesh.cxx sw/source/uibase/shells/textsh1.cxx sw/source/uibase/uiview/viewstat.cxx sw/source/uibase/utlui/uitool.cxx xmloff/inc/PageMasterImportContext.hxx xmloff/inc/xmloff/XMLShapeStyleContext.hxx xmloff/source/draw/XMLShapeStyleContext.cxx xmloff/source/draw/sdpropls.hxx xmloff/source/style/PageMasterExportPropMapper.cxx xmloff/source/style/PageMasterImportContext.cxx xmloff/source/style/PageMasterPropHdlFactory.cxx xmloff/source/style/PageMasterStyleMap.cxx xmloff/source/style/prstylei.cxx xmloff/source/text/txtexppr.cxx xmloff/source/text/txtprhdl.cxx xmloff/source/text/txtprmap.cxx xmloff/source/text/txtstyli.cxx Conflicts: svx/source/dialog/hdft.cxx sw/source/core/doc/visiturl.cxx sw/source/core/txtnode/thints.cxx sw/source/core/txtnode/txtatr2.cxx sw/source/core/unocore/unostyle.cxx Change-Id: I7e8779db6c0cbd1e242b63eab888f468f2de509a
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/chrdlg/pardlg.cxx50
-rw-r--r--sw/source/ui/fmtui/tmpdlg.cxx58
2 files changed, 85 insertions, 23 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: */
diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx
index f63907a3322d..29b5103c13e0 100644
--- a/sw/source/ui/fmtui/tmpdlg.cxx
+++ b/sw/source/ui/fmtui/tmpdlg.cxx
@@ -194,10 +194,17 @@ SwTemplateDlg::SwTemplateDlg(Window* pParent,
m_nOutlineId = AddTabPage("outline", SwParagraphNumTabPage::Create,
SwParagraphNumTabPage::GetRanges);
m_nDropCapsId = AddTabPage("dropcaps", SwDropCapsPage::Create,
- SwDropCapsPage::GetRanges );
- 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 ) );
+ SwDropCapsPage::GetRanges );
+
+ //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 ) );
+
+ //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 ) );
@@ -242,8 +249,9 @@ SwTemplateDlg::SwTemplateDlg(Window* pParent,
SwFrmAddPage::GetRanges);
m_nWrapId = AddTabPage("wrap", SwWrapTabPage::Create,
SwWrapTabPage::GetRanges);
- OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageCreatorFunc fail!");
- OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageRangesFunc fail!");
+ //UUUU remove?
+ //OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageCreatorFunc fail!");
+ //OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageRangesFunc fail!");
//UUUU remove?
//m_nBackgroundId = AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ) );
@@ -266,9 +274,15 @@ SwTemplateDlg::SwTemplateDlg(Window* pParent,
// page styles
case SFX_STYLE_FAMILY_PAGE:
{
- 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 ) );
+ //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 ) );
+
+ //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 ) );
+
m_nHeaderId = AddTabPage("header", SvxHeaderPage::Create, SvxHeaderPage::GetRanges);
m_nFooterId = AddTabPage("footer", SvxFooterPage::Create, SvxFooterPage::GetRanges);
@@ -501,7 +515,9 @@ void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
pFirstStyle = pStyleSheetPool->Next();
}
}
- aSet.Put (SfxStringListItem(SID_COLLECT_LIST, &aList));
+ //UUUU set DrawingLayer FillStyles active
+ aSet.Put(SfxBoolItem(SID_DRAWINGLAYER_FILLSTYLES, true));
+ aSet.Put(SfxStringListItem(SID_COLLECT_LIST, &aList));
rPage.PageCreated(aSet);
}
}
@@ -556,12 +572,24 @@ void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
else if (nId == m_nHeaderId)
{
if(0 == (nHtmlMode & HTMLMODE_ON ))
+ {
((SvxHeaderPage&)rPage).EnableDynamicSpacing();
+ }
+
+ //UUUU set DrawingLayer FillStyles active
+ aSet.Put(SfxBoolItem(SID_DRAWINGLAYER_FILLSTYLES, true));
+ rPage.PageCreated(aSet);
}
else if (nId == m_nFooterId)
{
if(0 == (nHtmlMode & HTMLMODE_ON ))
+ {
((SvxFooterPage&)rPage).EnableDynamicSpacing();
+ }
+
+ //UUUU set DrawingLayer FillStyles active
+ aSet.Put(SfxBoolItem(SID_DRAWINGLAYER_FILLSTYLES, true));
+ rPage.PageCreated(aSet);
}
else if (nId == m_nBorderId)
{
@@ -583,16 +611,12 @@ void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
// demand, but could also be directly added from the DrawModel.
else if (nId == m_nAreaId)
{
- SfxItemSet aNew(*aSet.GetPool(),
- SID_COLOR_TABLE, SID_BITMAP_LIST,
- SID_OFFER_IMPORT, SID_OFFER_IMPORT, 0, 0);
-
- aNew.Put(GetStyleSheet().GetItemSet());
+ aSet.Put(GetStyleSheet().GetItemSet());
// add flag for direct graphic content selection
- aNew.Put(SfxBoolItem(SID_OFFER_IMPORT, true));
+ aSet.Put(SfxBoolItem(SID_OFFER_IMPORT, true));
- rPage.PageCreated(aNew);
+ rPage.PageCreated(aSet);
}
else if (nId == m_nTransparenceId)
{