diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2016-11-05 13:28:17 -0500 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2016-11-05 13:42:40 -0500 |
commit | db380aab1063e8a5e40111c40ee9f7921aa82601 (patch) | |
tree | f5057dfb205a7d7409251742888dfeaf4bfbee61 /sw/source/uibase | |
parent | ee2144aafc5b4be14630f723be9a2bb674671412 (diff) |
Reverts a commit series that cripple windows ci.
Revert "SvxShadowTabPage::Construct was removed"
f9a2c1c12ecad833c63b894c89d6008907477eb5.
Revert "replace OColorPopup with SvxColorWindow"
f300754bb1c6a347c92bb9548be7a65237176542.
Revert "drop AutoColorInvalid/SID_ATTR_AUTO_COLOR_INVALID"
347c2c334589b18cc62af292674bb3df1dd54b71.
Revert "replace last ColorLB use with a listbox of colors"
604b35bf55351751a396e34dcca3f85e75860fd5.
Revert "simplify, its just a vector of colors"
351a97ce6bda3075677b59fa1387ba3d1ab17d7a.
Revert "replace user draw with an Image of the color"
df738e0f8ceedb4bad756960be14d9c41adc165d.
Revert "strip down to the used pieces"
commit 08d6cd788f2584ce10ab8fa10665245e953c59d9.
Revert "move now combined ColorLB to location of last user"
a19b18ad7c9eb0197c10e6d7e451ec4542e4bc9e.
Revert "fold ColorListBox and ColorLB together"
a989a0b1f2b425f05b58d0e44ce2de31c842ed65.
Revert "move ColorListBox beside sole thing that uses it"
760a198e697f3070a5e0e029e4eff7be220eb9cd.
Revert "extensions leaks out details of Color Selector, patch it up"
8bea644d6117a49405e6426dc97214220fc869d1.
Revert "inherit FillAttrLB from ListBox not ColorListBox"
d2ce812f1d3a7a2aad89ca0bd11948b63d2db7b0.
Revert "unify color selectors"
43bc3031483d172eccd72c3804e2d4fc2ef37de4.
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, 81 insertions, 48 deletions
diff --git a/sw/source/uibase/app/swmodul1.cxx b/sw/source/uibase/app/swmodul1.cxx index d3e4374ec5b5..6d0030bee543 100644 --- a/sw/source/uibase/app/swmodul1.cxx +++ b/sw/source/uibase/app/swmodul1.cxx @@ -28,7 +28,6 @@ #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 d52d9a7cbbbd..bbaaef6cad08 100644 --- a/sw/source/uibase/inc/column.hxx +++ b/sw/source/uibase/inc/column.hxx @@ -31,7 +31,6 @@ #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> @@ -106,7 +105,7 @@ class SwColumnPage : public SfxTabPage VclPtr<FixedText> m_pLineWidthLbl; VclPtr<MetricField> m_pLineWidthEdit; VclPtr<FixedText> m_pLineColorLbl; - VclPtr<SvxColorListBox> m_pLineColorDLB; + VclPtr<ColorListBox> m_pLineColorDLB; VclPtr<FixedText> m_pLineHeightLbl; VclPtr<MetricField> m_pLineHeightEdit; VclPtr<FixedText> m_pLinePosLbl; @@ -147,7 +146,6 @@ 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 cfc6bf16ecbd..5f768e2d27a5 100644 --- a/sw/source/uibase/inc/optpage.hxx +++ b/sw/source/uibase/inc/optpage.hxx @@ -30,7 +30,6 @@ #include <vcl/fixed.hxx> #include <svtools/ctrlbox.hxx> -#include <svx/colorbox.hxx> #include <svx/fntctrl.hxx> #include <fontcfg.hxx> class SfxPrinter; @@ -313,26 +312,27 @@ public: class SwRedlineOptionsTabPage : public SfxTabPage { VclPtr<ListBox> pInsertLB; - VclPtr<SvxColorListBox> pInsertColorLB; + VclPtr<ColorListBox> pInsertColorLB; VclPtr<SvxFontPrevWindow> pInsertedPreviewWN; VclPtr<ListBox> pDeletedLB; - VclPtr<SvxColorListBox> pDeletedColorLB; + VclPtr<ColorListBox> pDeletedColorLB; VclPtr<SvxFontPrevWindow> pDeletedPreviewWN; VclPtr<ListBox> pChangedLB; - VclPtr<SvxColorListBox> pChangedColorLB; + VclPtr<ColorListBox> pChangedColorLB; VclPtr<SvxFontPrevWindow> pChangedPreviewWN; VclPtr<ListBox> pMarkPosLB; - VclPtr<SvxColorListBox> pMarkColorLB; + VclPtr<ColorListBox> pMarkColorLB; VclPtr<SwMarkPreview> pMarkPreviewWN; + OUString sAuthor; + OUString sNone; + DECL_LINK(AttribHdl, ListBox&, void); - void ChangedMaskPrev(); DECL_LINK(ChangedMaskPrevHdl, ListBox&, void); - DECL_LINK(ChangedMaskColorPrevHdl, SvxColorListBox&, void); - DECL_LINK(ColorHdl, SvxColorListBox&, void); + DECL_LINK(ColorHdl, ListBox&, void); static void InitFontStyle(SvxFontPrevWindow& rExampleWin); diff --git a/sw/source/uibase/inc/pgfnote.hxx b/sw/source/uibase/inc/pgfnote.hxx index 81a69ab2bc90..4ca6e8d8edc1 100644 --- a/sw/source/uibase/inc/pgfnote.hxx +++ b/sw/source/uibase/inc/pgfnote.hxx @@ -27,7 +27,6 @@ #include <vcl/group.hxx> #include <svtools/ctrlbox.hxx> -#include <svx/colorbox.hxx> // footnote settings TabPage class SwFootNotePage: public SfxTabPage @@ -54,7 +53,7 @@ private: VclPtr<ListBox> m_pLinePosBox; VclPtr<LineListBox> m_pLineTypeBox; VclPtr<MetricField> m_pLineWidthEdit; - VclPtr<SvxColorListBox> m_pLineColorBox; + VclPtr<ColorListBox> m_pLineColorBox; VclPtr<MetricField> m_pLineLengthEdit; VclPtr<MetricField> m_pLineDistEdit; @@ -62,7 +61,7 @@ private: DECL_LINK( HeightMetric, Button*, void ); DECL_LINK( HeightModify, Control&, void ); DECL_LINK( LineWidthChanged_Impl, Edit&, void ); - DECL_LINK( LineColorSelected_Impl, SvxColorListBox&, void ); + DECL_LINK( LineColorSelected_Impl, ListBox&, void ); long lMaxHeight; diff --git a/sw/source/uibase/inc/pggrid.hxx b/sw/source/uibase/inc/pggrid.hxx index ab560a6baa31..be73daec9483 100644 --- a/sw/source/uibase/inc/pggrid.hxx +++ b/sw/source/uibase/inc/pggrid.hxx @@ -24,7 +24,6 @@ #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 @@ -58,7 +57,7 @@ class SwTextGridPage: public SfxTabPage VclPtr<CheckBox> m_pDisplayCB; VclPtr<CheckBox> m_pPrintCB; - VclPtr<SvxColorListBox> m_pColorLB; + VclPtr<ColorListBox> m_pColorLB; sal_Int32 m_nRubyUserValue; bool m_bRubyUserValue; @@ -72,14 +71,12 @@ 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(ColorModifyHdl, SvxColorListBox&, void); + DECL_LINK(GridModifyHdl, ListBox&, 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 d9aad7fb1c7a..a0b3b3504613 100644 --- a/sw/source/uibase/shells/drawsh.cxx +++ b/sw/source/uibase/shells/drawsh.cxx @@ -579,6 +579,16 @@ 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(); @@ -606,6 +616,9 @@ 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 2dde2604376f..c159843cb73c 100644 --- a/sw/source/uibase/shells/drwtxtsh.cxx +++ b/sw/source/uibase/shells/drwtxtsh.cxx @@ -239,6 +239,16 @@ 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(); @@ -266,6 +276,9 @@ 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 cde9ae9b5612..95985af7ed5a 100644 --- a/sw/source/uibase/sidebar/PageStylesPanel.cxx +++ b/sw/source/uibase/sidebar/PageStylesPanel.cxx @@ -22,7 +22,6 @@ #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" @@ -143,20 +142,22 @@ void PageStylesPanel::dispose() void PageStylesPanel::Initialize() { aCustomEntry = mpCustomEntry->GetText(); - 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, ModifyFillColorListHdl)); - mpBgGradientLB->SetSelectHdl( LINK(this, PageStylesPanel, ModifyFillColorListHdl)); + mpBgColorLB->SetSelectHdl( LINK(this, PageStylesPanel, ModifyFillColorHdl)); + mpBgGradientLB->SetSelectHdl( LINK(this, PageStylesPanel, ModifyFillColorHdl)); 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() @@ -179,22 +180,49 @@ 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); + mpBgColorLB->SelectEntry( aColor ); + + if(mpBgColorLB->GetSelectEntryCount() == 0) + { + mpBgColorLB->InsertEntry(aColor, OUString()); + 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(); - mpBgGradientLB->SelectEntry(aEndColor); + 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); + } } break; @@ -486,7 +514,7 @@ IMPL_LINK_NOARG(PageStylesPanel, ModifyFillStyleHdl, ListBox&, void) mpBgFillType->Selected(); } -void PageStylesPanel::ModifyFillColor() +IMPL_LINK_NOARG(PageStylesPanel, ModifyFillColorHdl, ListBox&, void) { const drawing::FillStyle eXFS = (drawing::FillStyle)mpBgFillType->GetSelectEntryPos(); SfxObjectShell* pSh = SfxObjectShell::Current(); @@ -536,16 +564,6 @@ void PageStylesPanel::ModifyFillColor() } } -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 558b74e73a67..c0dacdbfb10f 100644 --- a/sw/source/uibase/sidebar/PageStylesPanel.hxx +++ b/sw/source/uibase/sidebar/PageStylesPanel.hxx @@ -49,7 +49,6 @@ #include <svx/pagenumberlistbox.hxx> class List; -class SvxColorListBox; namespace sw { namespace sidebar { class PageStylesPanel: @@ -95,9 +94,9 @@ private: ::sfx2::sidebar::ControllerItem maBgBitmapControl; ::sfx2::sidebar::ControllerItem maBgFillStyleControl; - VclPtr<SvxColorListBox> mpBgColorLB; + VclPtr<ColorLB> mpBgColorLB; VclPtr<SvxFillAttrBox> mpBgHatchingLB; - VclPtr<SvxColorListBox> mpBgGradientLB; + VclPtr<ColorLB> mpBgGradientLB; VclPtr<SvxFillAttrBox> mpBgBitmapLB; VclPtr<ListBox> mpLayoutSelectLB; VclPtr<ListBox> mpColumnCount; @@ -113,14 +112,11 @@ 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 |