diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-11-05 20:28:27 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-11-07 21:04:50 +0000 |
commit | 64a708cba9b954afe3331f63c58218eb53b3d0ce (patch) | |
tree | ddc1bea3b63f32a1c6d377c1d1dd7aee0803fb70 /sw/source/uibase | |
parent | f01c49c4a89ecad2376fd0023625186e5cac642e (diff) |
Revert "Reverts a commit series that cripple windows ci."
with addition of...
- svxlo-SvxColorListBox
+ svxcorelo-SvxColorListBox
This reverts commit db380aab1063e8a5e40111c40ee9f7921aa82601.
Change-Id: I3af7aa0abb1a430bce64188244404fcbd480b128
Reviewed-on: https://gerrit.libreoffice.org/30598
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/uibase')
-rw-r--r-- | sw/source/uibase/app/swmodul1.cxx | 1 | ||||
-rw-r--r-- | sw/source/uibase/inc/column.hxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/inc/optpage.hxx | 16 | ||||
-rw-r--r-- | sw/source/uibase/inc/pgfnote.hxx | 5 | ||||
-rw-r--r-- | sw/source/uibase/inc/pggrid.hxx | 7 | ||||
-rw-r--r-- | sw/source/uibase/shells/drawsh.cxx | 13 | ||||
-rw-r--r-- | sw/source/uibase/shells/drwtxtsh.cxx | 13 | ||||
-rw-r--r-- | sw/source/uibase/sidebar/PageStylesPanel.cxx | 62 | ||||
-rw-r--r-- | sw/source/uibase/sidebar/PageStylesPanel.hxx | 8 |
9 files changed, 48 insertions, 81 deletions
diff --git a/sw/source/uibase/app/swmodul1.cxx b/sw/source/uibase/app/swmodul1.cxx index 6d0030bee543..d3e4374ec5b5 100644 --- a/sw/source/uibase/app/swmodul1.cxx +++ b/sw/source/uibase/app/swmodul1.cxx @@ -28,6 +28,7 @@ #include <cppuhelper/weak.hxx> #include <com/sun/star/frame/FrameSearchFlag.hpp> #include <com/sun/star/view/XSelectionSupplier.hpp> +#include <svx/colorwindow.hxx> #include <svx/dataaccessdescriptor.hxx> #include <editeng/wghtitem.hxx> #include <editeng/postitem.hxx> diff --git a/sw/source/uibase/inc/column.hxx b/sw/source/uibase/inc/column.hxx index bbaaef6cad08..d52d9a7cbbbd 100644 --- a/sw/source/uibase/inc/column.hxx +++ b/sw/source/uibase/inc/column.hxx @@ -31,6 +31,7 @@ #include <svtools/valueset.hxx> #include <sfx2/basedlgs.hxx> #include <sfx2/tabdlg.hxx> +#include <svx/colorbox.hxx> #include <fmtclbl.hxx> #include <colex.hxx> #include <prcntfld.hxx> @@ -105,7 +106,7 @@ class SwColumnPage : public SfxTabPage VclPtr<FixedText> m_pLineWidthLbl; VclPtr<MetricField> m_pLineWidthEdit; VclPtr<FixedText> m_pLineColorLbl; - VclPtr<ColorListBox> m_pLineColorDLB; + VclPtr<SvxColorListBox> m_pLineColorDLB; VclPtr<FixedText> m_pLineHeightLbl; VclPtr<MetricField> m_pLineHeightEdit; VclPtr<FixedText> m_pLinePosLbl; @@ -146,6 +147,7 @@ class SwColumnPage : public SfxTabPage DECL_LINK( Down, Button *, void ); DECL_LINK( UpdateColMgr, Edit&, void ); DECL_LINK( UpdateColMgrListBox, ListBox&, void ); + DECL_LINK( UpdateColMgrColorBox, SvxColorListBox&, void ); void Timeout(); void Update(MetricField *pInteractiveField); diff --git a/sw/source/uibase/inc/optpage.hxx b/sw/source/uibase/inc/optpage.hxx index 5f768e2d27a5..cfc6bf16ecbd 100644 --- a/sw/source/uibase/inc/optpage.hxx +++ b/sw/source/uibase/inc/optpage.hxx @@ -30,6 +30,7 @@ #include <vcl/fixed.hxx> #include <svtools/ctrlbox.hxx> +#include <svx/colorbox.hxx> #include <svx/fntctrl.hxx> #include <fontcfg.hxx> class SfxPrinter; @@ -312,27 +313,26 @@ public: class SwRedlineOptionsTabPage : public SfxTabPage { VclPtr<ListBox> pInsertLB; - VclPtr<ColorListBox> pInsertColorLB; + VclPtr<SvxColorListBox> pInsertColorLB; VclPtr<SvxFontPrevWindow> pInsertedPreviewWN; VclPtr<ListBox> pDeletedLB; - VclPtr<ColorListBox> pDeletedColorLB; + VclPtr<SvxColorListBox> pDeletedColorLB; VclPtr<SvxFontPrevWindow> pDeletedPreviewWN; VclPtr<ListBox> pChangedLB; - VclPtr<ColorListBox> pChangedColorLB; + VclPtr<SvxColorListBox> pChangedColorLB; VclPtr<SvxFontPrevWindow> pChangedPreviewWN; VclPtr<ListBox> pMarkPosLB; - VclPtr<ColorListBox> pMarkColorLB; + VclPtr<SvxColorListBox> pMarkColorLB; VclPtr<SwMarkPreview> pMarkPreviewWN; - OUString sAuthor; - OUString sNone; - DECL_LINK(AttribHdl, ListBox&, void); + void ChangedMaskPrev(); DECL_LINK(ChangedMaskPrevHdl, ListBox&, void); - DECL_LINK(ColorHdl, ListBox&, void); + DECL_LINK(ChangedMaskColorPrevHdl, SvxColorListBox&, void); + DECL_LINK(ColorHdl, SvxColorListBox&, void); static void InitFontStyle(SvxFontPrevWindow& rExampleWin); diff --git a/sw/source/uibase/inc/pgfnote.hxx b/sw/source/uibase/inc/pgfnote.hxx index 4ca6e8d8edc1..81a69ab2bc90 100644 --- a/sw/source/uibase/inc/pgfnote.hxx +++ b/sw/source/uibase/inc/pgfnote.hxx @@ -27,6 +27,7 @@ #include <vcl/group.hxx> #include <svtools/ctrlbox.hxx> +#include <svx/colorbox.hxx> // footnote settings TabPage class SwFootNotePage: public SfxTabPage @@ -53,7 +54,7 @@ private: VclPtr<ListBox> m_pLinePosBox; VclPtr<LineListBox> m_pLineTypeBox; VclPtr<MetricField> m_pLineWidthEdit; - VclPtr<ColorListBox> m_pLineColorBox; + VclPtr<SvxColorListBox> m_pLineColorBox; VclPtr<MetricField> m_pLineLengthEdit; VclPtr<MetricField> m_pLineDistEdit; @@ -61,7 +62,7 @@ private: DECL_LINK( HeightMetric, Button*, void ); DECL_LINK( HeightModify, Control&, void ); DECL_LINK( LineWidthChanged_Impl, Edit&, void ); - DECL_LINK( LineColorSelected_Impl, ListBox&, void ); + DECL_LINK( LineColorSelected_Impl, SvxColorListBox&, void ); long lMaxHeight; diff --git a/sw/source/uibase/inc/pggrid.hxx b/sw/source/uibase/inc/pggrid.hxx index be73daec9483..ab560a6baa31 100644 --- a/sw/source/uibase/inc/pggrid.hxx +++ b/sw/source/uibase/inc/pggrid.hxx @@ -24,6 +24,7 @@ #include <vcl/field.hxx> #include <vcl/fixed.hxx> #include <svtools/ctrlbox.hxx> +#include <svx/colorbox.hxx> // TabPage Format/(Styles/)Page/Text grid class SwTextGridPage: public SfxTabPage @@ -57,7 +58,7 @@ class SwTextGridPage: public SfxTabPage VclPtr<CheckBox> m_pDisplayCB; VclPtr<CheckBox> m_pPrintCB; - VclPtr<ColorListBox> m_pColorLB; + VclPtr<SvxColorListBox> m_pColorLB; sal_Int32 m_nRubyUserValue; bool m_bRubyUserValue; @@ -71,12 +72,14 @@ class SwTextGridPage: public SfxTabPage void PutGridItem(SfxItemSet& rSet); static void SetLinesOrCharsRanges(FixedText & rField, const sal_Int32 nValue ); + void GridModifyHdl(); + DECL_LINK(GridTypeHdl, Button*, void); DECL_LINK(CharorLineChangedHdl, SpinField&, void); DECL_LINK(CharorLineLoseFocusdHdl, Control&, void); DECL_LINK(TextSizeChangedHdl, SpinField&, void); DECL_LINK(TextSizeLoseFocusHdl, Control&, void); - DECL_LINK(GridModifyHdl, ListBox&, void); + DECL_LINK(ColorModifyHdl, SvxColorListBox&, void); DECL_LINK(GridModifyClickHdl, Button*, void); DECL_LINK(DisplayGridHdl, Button*, void); diff --git a/sw/source/uibase/shells/drawsh.cxx b/sw/source/uibase/shells/drawsh.cxx index a0b3b3504613..d9aad7fb1c7a 100644 --- a/sw/source/uibase/shells/drawsh.cxx +++ b/sw/source/uibase/shells/drawsh.cxx @@ -579,16 +579,6 @@ void SwDrawShell::GetFormTextState(SfxItemSet& rSet) SdrView* pDrView = rSh.GetDrawView(); const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList(); const SdrObject* pObj = nullptr; - SvxFontWorkDialog* pDlg = nullptr; - - const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId(); - - SfxViewFrame* pVFrame = GetView().GetViewFrame(); - if ( pVFrame->HasChildWindow(nId) ) - { - SfxChildWindow *pChildWindow = pVFrame->GetChildWindow(nId); - pDlg = pChildWindow ? static_cast<SvxFontWorkDialog*>(pChildWindow->GetWindow()) : nullptr; - } if ( rMarkList.GetMarkCount() == 1 ) pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); @@ -616,9 +606,6 @@ void SwDrawShell::GetFormTextState(SfxItemSet& rSet) } else { - if ( pDlg ) - pDlg->SetColorList(XColorList::GetStdColorList()); - pDrView->GetAttributes( rSet ); } } diff --git a/sw/source/uibase/shells/drwtxtsh.cxx b/sw/source/uibase/shells/drwtxtsh.cxx index c159843cb73c..2dde2604376f 100644 --- a/sw/source/uibase/shells/drwtxtsh.cxx +++ b/sw/source/uibase/shells/drwtxtsh.cxx @@ -239,16 +239,6 @@ void SwDrawTextShell::GetFormTextState(SfxItemSet& rSet) SdrView* pDrView = rSh.GetDrawView(); const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList(); const SdrObject* pObj = nullptr; - SvxFontWorkDialog* pDlg = nullptr; - - const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId(); - - SfxViewFrame* pVFrame = GetView().GetViewFrame(); - if (pVFrame->HasChildWindow(nId)) - { - SfxChildWindow* pWnd = pVFrame->GetChildWindow(nId); - pDlg = pWnd ? static_cast<SvxFontWorkDialog*>(pWnd->GetWindow()) : nullptr; - } if ( rMarkList.GetMarkCount() == 1 ) pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); @@ -276,9 +266,6 @@ void SwDrawTextShell::GetFormTextState(SfxItemSet& rSet) } else { - if ( pDlg ) - pDlg->SetColorList(XColorList::GetStdColorList()); - pDrView->GetAttributes( rSet ); } } diff --git a/sw/source/uibase/sidebar/PageStylesPanel.cxx b/sw/source/uibase/sidebar/PageStylesPanel.cxx index 95985af7ed5a..cde9ae9b5612 100644 --- a/sw/source/uibase/sidebar/PageStylesPanel.cxx +++ b/sw/source/uibase/sidebar/PageStylesPanel.cxx @@ -22,6 +22,7 @@ #include <editeng/sizeitem.hxx> #include <editeng/paperinf.hxx> #include <svx/svxids.hrc> +#include <svx/colorbox.hxx> #include <svx/dlgutil.hxx> #include <svx/rulritem.hxx> #include "svx/drawitem.hxx" @@ -142,22 +143,20 @@ void PageStylesPanel::dispose() void PageStylesPanel::Initialize() { aCustomEntry = mpCustomEntry->GetText(); - mpColumnCount->SetSelectHdl( LINK(this, PageStylesPanel, ModifyColumnCountHdl) ); + mpBindings->Invalidate(SID_ATTR_PAGE_COLUMN); + mpBindings->Invalidate(SID_ATTR_PAGE); + mpBindings->Invalidate(SID_ATTR_PAGE_FILLSTYLE); + Update(); + mpColumnCount->SetSelectHdl( LINK(this, PageStylesPanel, ModifyColumnCountHdl) ); SvxNumOptionsTabPageHelper::GetI18nNumbering( *mpNumberSelectLB, ::std::numeric_limits<sal_uInt16>::max()); mpNumberSelectLB->SetSelectHdl( LINK(this, PageStylesPanel, ModifyNumberingHdl) ); - mpLayoutSelectLB->SetSelectHdl( LINK(this, PageStylesPanel, ModifyLayoutHdl) ); mpBgFillType->SetSelectHdl( LINK(this, PageStylesPanel, ModifyFillStyleHdl)); - mpBgColorLB->SetSelectHdl( LINK(this, PageStylesPanel, ModifyFillColorHdl)); - mpBgGradientLB->SetSelectHdl( LINK(this, PageStylesPanel, ModifyFillColorHdl)); + mpBgColorLB->SetSelectHdl( LINK(this, PageStylesPanel, ModifyFillColorListHdl)); + mpBgGradientLB->SetSelectHdl( LINK(this, PageStylesPanel, ModifyFillColorListHdl)); mpBgHatchingLB->SetSelectHdl( LINK(this, PageStylesPanel, ModifyFillColorHdl)); mpBgBitmapLB->SetSelectHdl( LINK(this, PageStylesPanel, ModifyFillColorHdl)); - - mpBindings->Invalidate(SID_ATTR_PAGE_COLUMN); - mpBindings->Invalidate(SID_ATTR_PAGE); - mpBindings->Invalidate(SID_ATTR_PAGE_FILLSTYLE); - Update(); } void PageStylesPanel::Update() @@ -180,49 +179,22 @@ void PageStylesPanel::Update() mpBgGradientLB->Hide(); mpBgHatchingLB->Hide(); mpBgColorLB->Show(); - mpBgColorLB->Clear(); - const SvxColorListItem aItem( *static_cast<const SvxColorListItem*>(pSh->GetItem(SID_COLOR_TABLE))); - mpBgColorLB->Fill(aItem.GetColorList()); - const Color aColor = GetColorSetOrDefault(); - mpBgColorLB->SelectEntry( aColor ); - - if(mpBgColorLB->GetSelectEntryCount() == 0) - { - mpBgColorLB->InsertEntry(aColor, OUString()); - mpBgColorLB->SelectEntry(aColor); - } + mpBgColorLB->SelectEntry(aColor); } break; case drawing::FillStyle_GRADIENT: { - const SvxColorListItem aItem(*static_cast<const SvxColorListItem*>(pSh->GetItem(SID_COLOR_TABLE))); mpBgBitmapLB->Hide(); mpBgHatchingLB->Hide(); mpBgColorLB->Show(); mpBgGradientLB->Show(); - mpBgColorLB->Clear(); - mpBgGradientLB->Clear(); - mpBgColorLB->Fill(aItem.GetColorList()); - mpBgGradientLB->Fill(aItem.GetColorList()); const XGradient xGradient = GetGradientSetOrDefault(); const Color aStartColor = xGradient.GetStartColor(); + mpBgColorLB->SelectEntry(aStartColor); const Color aEndColor = xGradient.GetEndColor(); - mpBgColorLB->SelectEntry( aStartColor ); - mpBgGradientLB->SelectEntry( aEndColor ); - - if(mpBgColorLB->GetSelectEntryCount() == 0) - { - mpBgColorLB->InsertEntry(aStartColor, OUString()); - mpBgColorLB->SelectEntry(aStartColor); - } - - if(mpBgGradientLB->GetSelectEntryCount() == 0) - { - mpBgGradientLB->InsertEntry(aEndColor, OUString()); - mpBgGradientLB->SelectEntry(aEndColor); - } + mpBgGradientLB->SelectEntry(aEndColor); } break; @@ -514,7 +486,7 @@ IMPL_LINK_NOARG(PageStylesPanel, ModifyFillStyleHdl, ListBox&, void) mpBgFillType->Selected(); } -IMPL_LINK_NOARG(PageStylesPanel, ModifyFillColorHdl, ListBox&, void) +void PageStylesPanel::ModifyFillColor() { const drawing::FillStyle eXFS = (drawing::FillStyle)mpBgFillType->GetSelectEntryPos(); SfxObjectShell* pSh = SfxObjectShell::Current(); @@ -564,6 +536,16 @@ IMPL_LINK_NOARG(PageStylesPanel, ModifyFillColorHdl, ListBox&, void) } } +IMPL_LINK_NOARG(PageStylesPanel, ModifyFillColorHdl, ListBox&, void) +{ + ModifyFillColor(); +} + +IMPL_LINK_NOARG(PageStylesPanel, ModifyFillColorListHdl, SvxColorListBox&, void) +{ + ModifyFillColor(); +} + } } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/sidebar/PageStylesPanel.hxx b/sw/source/uibase/sidebar/PageStylesPanel.hxx index c0dacdbfb10f..558b74e73a67 100644 --- a/sw/source/uibase/sidebar/PageStylesPanel.hxx +++ b/sw/source/uibase/sidebar/PageStylesPanel.hxx @@ -49,6 +49,7 @@ #include <svx/pagenumberlistbox.hxx> class List; +class SvxColorListBox; namespace sw { namespace sidebar { class PageStylesPanel: @@ -94,9 +95,9 @@ private: ::sfx2::sidebar::ControllerItem maBgBitmapControl; ::sfx2::sidebar::ControllerItem maBgFillStyleControl; - VclPtr<ColorLB> mpBgColorLB; + VclPtr<SvxColorListBox> mpBgColorLB; VclPtr<SvxFillAttrBox> mpBgHatchingLB; - VclPtr<ColorLB> mpBgGradientLB; + VclPtr<SvxColorListBox> mpBgGradientLB; VclPtr<SvxFillAttrBox> mpBgBitmapLB; VclPtr<ListBox> mpLayoutSelectLB; VclPtr<ListBox> mpColumnCount; @@ -112,11 +113,14 @@ private: const OUString GetHatchingSetOrDefault(); const OUString GetBitmapSetOrDefault(); + void ModifyFillColor(); + DECL_LINK( ModifyColumnCountHdl, ListBox&, void ); DECL_LINK( ModifyNumberingHdl, ListBox&, void ); DECL_LINK( ModifyLayoutHdl, ListBox&, void ); DECL_LINK( ModifyFillStyleHdl, ListBox&, void ); DECL_LINK( ModifyFillColorHdl, ListBox&, void ); + DECL_LINK( ModifyFillColorListHdl, SvxColorListBox&, void ); }; } } //end of namespace sw::sidebar |