[Libreoffice-commits] core.git: cui/source sw/source
Jim Raykowski (via logerrit)
logerrit at kemper.freedesktop.org
Thu Dec 12 15:59:37 UTC 2019
cui/source/factory/dlgfact.cxx | 4 +++-
cui/source/inc/backgrnd.hxx | 5 +++++
cui/source/tabpages/backgrnd.cxx | 7 +++++++
sw/source/ui/frmdlg/pattern.cxx | 9 +++++++--
sw/source/uibase/app/appopt.cxx | 4 +++-
sw/source/uibase/shells/basesh.cxx | 3 ++-
6 files changed, 27 insertions(+), 5 deletions(-)
New commits:
commit 03facb4bb75e4283c91de6f081ee96137ca4346c
Author: Jim Raykowski <raykowj at gmail.com>
AuthorDate: Fri Dec 7 17:41:54 2018 -0900
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Thu Dec 12 16:58:05 2019 +0100
tdf#105225 New UNO and Writer Web background tab pages
Change-Id: Id3e7d1c24d086624f053085e3134792b95188c23
Reviewed-on: https://gerrit.libreoffice.org/64991
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 039f713d2279..63a7e2a089dd 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -1424,6 +1424,7 @@ CreateTabPage AbstractDialogFactory_Impl::GetTabPageCreatorFunc( sal_uInt16 nId
{
switch ( nId )
{
+ case RID_SW_TP_BACKGROUND :
case RID_SVXPAGE_BKG :
return SvxBkgTabPage::Create;
case RID_SVXPAGE_TEXTANIMATION :
@@ -1468,7 +1469,6 @@ CreateTabPage AbstractDialogFactory_Impl::GetTabPageCreatorFunc( sal_uInt16 nId
return SvxTextAttrPage::Create;
case RID_SVXPAGE_ALIGNMENT :
return svx::AlignmentTabPage::Create;
- case RID_SW_TP_BACKGROUND :
case RID_SVXPAGE_BACKGROUND :
return SvxBackgroundTabPage::Create;
case RID_SVXPAGE_BORDER :
@@ -1534,6 +1534,8 @@ GetTabPageRanges AbstractDialogFactory_Impl::GetTabPageRangesFunc( sal_uInt16 nI
case RID_SVXPAGE_ALIGNMENT :
return svx::AlignmentTabPage::GetRanges;
case RID_SW_TP_BACKGROUND :
+ case RID_SVXPAGE_BKG:
+ return SvxBkgTabPage::GetRanges;
case RID_SVXPAGE_BACKGROUND :
return SvxBackgroundTabPage::GetRanges;
case RID_SVXPAGE_BORDER :
diff --git a/cui/source/inc/backgrnd.hxx b/cui/source/inc/backgrnd.hxx
index 782e56d9f811..2392faae129d 100644
--- a/cui/source/inc/backgrnd.hxx
+++ b/cui/source/inc/backgrnd.hxx
@@ -153,6 +153,8 @@ private:
class SvxBkgTabPage : public SvxAreaTabPage
{
+ static const sal_uInt16 pPageRanges[];
+
std::unique_ptr<weld::ComboBox> m_xTblLBox;
bool bHighlighting : 1;
bool bCharBackColor : 1;
@@ -166,6 +168,9 @@ public:
SvxBkgTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
virtual ~SvxBkgTabPage() override;
+ // returns the area of the which-values
+ static const sal_uInt16* GetRanges() { return pPageRanges; }
+
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void ActivatePage( const SfxItemSet& ) override;
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 17bc6e6b3411..18bcfc734689 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -63,6 +63,13 @@ const sal_uInt16 SvxBackgroundTabPage::pPageRanges[] =
0
};
+const sal_uInt16 SvxBkgTabPage::pPageRanges[] =
+{
+ SID_ATTR_BRUSH, SID_ATTR_BRUSH,
+ SID_ATTR_BRUSH_CHAR, SID_ATTR_BRUSH_CHAR,
+ 0
+};
+
/// Returns the fill style of the currently selected entry.
static drawing::FillStyle lcl_getFillStyle(const weld::ComboBox& rLbSelect)
{
diff --git a/sw/source/ui/frmdlg/pattern.cxx b/sw/source/ui/frmdlg/pattern.cxx
index 2fccc5172b32..9cc2e271d7a3 100644
--- a/sw/source/ui/frmdlg/pattern.cxx
+++ b/sw/source/ui/frmdlg/pattern.cxx
@@ -29,9 +29,14 @@ SwBackgroundDlg::SwBackgroundDlg(weld::Window* pParent, const SfxItemSet& rSet)
{
m_xDialog->set_title(SwResId(STR_FRMUI_PATTERN));
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- ::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND );
+ ::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BKG );
if ( fnCreatePage )
- SetTabPage((*fnCreatePage)(get_content_area(), this, &rSet));
+ {
+ std::unique_ptr<SfxTabPage> xRet = (*fnCreatePage)(get_content_area(), this, &rSet);
+ xRet->PageCreated(rSet);
+ xRet->ActivatePage(rSet);
+ SetTabPage(std::move(xRet));
+ }
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/app/appopt.cxx b/sw/source/uibase/app/appopt.cxx
index f071b85997fe..90c04f18ae59 100644
--- a/sw/source/uibase/app/appopt.cxx
+++ b/sw/source/uibase/app/appopt.cxx
@@ -101,6 +101,7 @@ std::unique_ptr<SfxItemSet> SwModule::CreateItemSet( sal_uInt16 nId )
GetPool(),
svl::Items<
RES_BACKGROUND, RES_BACKGROUND,
+ XATTR_FILL_FIRST, XATTR_FILL_LAST,
SID_PRINTPREVIEW, SID_PRINTPREVIEW,
SID_ATTR_GRID_OPTIONS, SID_ATTR_GRID_OPTIONS,
SID_HTML_MODE, SID_HTML_MODE,
@@ -490,8 +491,9 @@ std::unique_ptr<SfxTabPage> SwModule::CreateTabPage( sal_uInt16 nId, weld::Conta
case RID_SW_TP_BACKGROUND:
{
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- ::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND );
+ ::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BKG );
xRet = (*fnCreatePage)( pPage, pController, &rSet );
+ xRet->PageCreated( rSet );
break;
}
case RID_SW_TP_OPTCAPTION_PAGE:
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index e346600c0549..ff9598c84b37 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -2591,7 +2591,8 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
case FN_FORMAT_BACKGROUND_DLG:
{
SfxItemSet aSet( rSh.GetAttrPool(),
- svl::Items<RES_BACKGROUND, RES_BACKGROUND>{} );
+ svl::Items<RES_BACKGROUND, RES_BACKGROUND,
+ XATTR_FILL_FIRST, XATTR_FILL_LAST>{} );
ScopedVclPtr<SfxAbstractDialog> pDlg;
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
More information about the Libreoffice-commits
mailing list