summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2016-11-05 13:28:17 -0500
committerNorbert Thiebaud <nthiebaud@gmail.com>2016-11-05 13:42:40 -0500
commitdb380aab1063e8a5e40111c40ee9f7921aa82601 (patch)
treef5057dfb205a7d7409251742888dfeaf4bfbee61 /sd/source
parentee2144aafc5b4be14630f723be9a2bb674671412 (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 'sd/source')
-rw-r--r--sd/source/ui/animations/CustomAnimationDialog.cxx82
-rw-r--r--sd/source/ui/dlg/copydlg.cxx35
-rw-r--r--sd/source/ui/dlg/sddlgfact.cxx3
-rw-r--r--sd/source/ui/dlg/sddlgfact.hxx2
-rw-r--r--sd/source/ui/func/fucopy.cxx2
-rw-r--r--sd/source/ui/inc/copydlg.hxx12
-rw-r--r--sd/source/ui/sidebar/SlideBackground.cxx36
-rw-r--r--sd/source/ui/sidebar/SlideBackground.hxx8
-rw-r--r--sd/source/ui/view/drviews6.cxx21
-rw-r--r--sd/source/ui/view/drviewsi.cxx2
10 files changed, 160 insertions, 43 deletions
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx
index 6726317d95ba..2ba3459164ee 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -62,7 +62,6 @@
#include <editeng/flstitem.hxx>
#include <svx/drawitem.hxx>
-#include <svx/colorbox.hxx>
#include <svx/xtable.hxx>
#include <svx/gallery.hxx>
@@ -192,24 +191,43 @@ public:
virtual Control* getControl() override;
private:
- VclPtr<SvxColorListBox> mpControl;
- DECL_LINK(OnSelect, SvxColorListBox&, void);
+ VclPtr<ColorListBox> mpControl;
+ DECL_LINK(OnSelect, ListBox&, void);
Link<LinkParamNone*,void> maModifyLink;
};
ColorPropertyBox::ColorPropertyBox( sal_Int32 nControlType, vcl::Window* pParent, const Any& rValue, const Link<LinkParamNone*,void>& rModifyHdl )
: PropertySubControl( nControlType ), maModifyLink(rModifyHdl)
{
- mpControl = VclPtr<SvxColorListBox>::Create(pParent);
+ mpControl = VclPtr<ColorListBox>::Create( pParent, WB_BORDER|WB_TABSTOP|WB_DROPDOWN );
+ mpControl->SetDropDownLineCount( 10 );
mpControl->SetSelectHdl( LINK(this, ColorPropertyBox, OnSelect) );
mpControl->SetHelpId( HID_SD_CUSTOMANIMATIONPANE_COLORPROPERTYBOX );
+ SfxObjectShell* pDocSh = SfxObjectShell::Current();
+ DBG_ASSERT( pDocSh, "DocShell not found!" );
+ XColorListRef pColorList;
+ const SfxPoolItem* pItem = nullptr;
+
+ if ( pDocSh && ( ( pItem = pDocSh->GetItem( SID_COLOR_TABLE ) ) != nullptr) )
+ pColorList = static_cast<const SvxColorListItem*>(pItem)->GetColorList();
+
+ if ( !pColorList.is() )
+ pColorList = XColorList::CreateStdColorList();
+
sal_Int32 nColor = 0;
rValue >>= nColor;
- mpControl->SelectEntry(static_cast<Color>(nColor));
+
+ for ( long i = 0; i < pColorList->Count(); i++ )
+ {
+ const XColorEntry* pEntry = pColorList->GetColor(i);
+ sal_Int32 nPos = mpControl->InsertEntry( pEntry->GetColor(), pEntry->GetName() );
+ if( pEntry->GetColor().GetRGBColor() == (sal_uInt32)nColor )
+ mpControl->SelectEntryPos( nPos );
+ }
}
-IMPL_LINK_NOARG(ColorPropertyBox, OnSelect, SvxColorListBox&, void)
+IMPL_LINK_NOARG(ColorPropertyBox, OnSelect, ListBox&, void)
{
maModifyLink.Call(nullptr);
}
@@ -227,7 +245,7 @@ void ColorPropertyBox::setValue( const Any& rValue, const OUString& )
rValue >>= nColor;
mpControl->SetNoSelection();
- mpControl->SelectEntry(static_cast<Color>(nColor));
+ mpControl->SelectEntryPos( mpControl->GetEntryPos( static_cast<Color>(nColor) ) );
}
}
@@ -1022,7 +1040,7 @@ private:
VclPtr<FixedText> mpFTAfterEffect;
VclPtr<ListBox> mpLBAfterEffect;
VclPtr<FixedText> mpFTDimColor;
- VclPtr<SvxColorListBox> mpCLBDimColor;
+ VclPtr<ColorListBox> mpCLBDimColor;
VclPtr<FixedText> mpFTTextAnim;
VclPtr<ListBox> mpLBTextAnim;
VclPtr<MetricField> mpMFTextDelay;
@@ -1047,7 +1065,6 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage( vcl::Window* pParent
get(mpLBAfterEffect, "aeffect_list" );
get(mpFTDimColor, "dim_color_label" );
get(mpCLBDimColor, "dim_color_list" );
- mpCLBDimColor->SelectEntry(Color(COL_BLACK));
get(mpFTTextAnim, "text_animation_label" );
get(mpLBTextAnim, "text_animation_list" );
get(mpMFTextDelay,"text_delay" );
@@ -1060,6 +1077,28 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage( vcl::Window* pParent
mpPBSoundPreview->SetClickHdl( LINK( this, CustomAnimationEffectTabPage, implClickHdl ) );
+ // fill the color box
+ SfxObjectShell* pDocSh = SfxObjectShell::Current();
+ DBG_ASSERT( pDocSh, "DocShell not found!" );
+ XColorListRef pColorList;
+ const SfxPoolItem* pItem = nullptr;
+
+ if ( pDocSh && ( (pItem = pDocSh->GetItem( SID_COLOR_TABLE ) ) != nullptr ) )
+ pColorList = static_cast<const SvxColorListItem*>(pItem)->GetColorList();
+
+ if ( !pColorList.is() )
+ pColorList = XColorList::CreateStdColorList();
+
+ mpCLBDimColor->SetUpdateMode( false );
+
+ for ( long i = 0; i < pColorList->Count(); i++ )
+ {
+ const XColorEntry* pEntry = pColorList->GetColor(i);
+ mpCLBDimColor->InsertEntry( pEntry->GetColor(), pEntry->GetName() );
+ }
+
+ mpCLBDimColor->SetUpdateMode( true );
+
// only show settings if all selected effects have the same preset-id
if( pSet->getPropertyState( nHandlePresetId ) != STLPropertyState::Ambiguous )
{
@@ -1135,8 +1174,13 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage( vcl::Window* pParent
{
sal_Int32 nColor = 0;
aDimColor >>= nColor;
- Color aColor(nColor);
- mpCLBDimColor->SelectEntry(aColor);
+ Color aColor( nColor );
+ sal_Int32 nColorPos = mpCLBDimColor->GetEntryPos( aColor );
+ if ( LISTBOX_ENTRY_NOTFOUND != nColorPos )
+ mpCLBDimColor->SelectEntryPos( nColorPos );
+ else
+ mpCLBDimColor->SelectEntryPos(
+ mpCLBDimColor->InsertEntry( aColor, SVX_RESSTR(RID_SVXSTR_COLOR_USER) ) );
}
else
{
@@ -1288,7 +1332,16 @@ IMPL_LINK( CustomAnimationEffectTabPage, implSelectHdl, ListBox&, rListBox, void
void CustomAnimationEffectTabPage::implHdl(Control* pControl )
{
- if( pControl == mpLBTextAnim )
+ if( pControl == mpLBAfterEffect )
+ {
+ sal_Int32 nPos = static_cast<ListBox*>( mpLBAfterEffect )->GetSelectEntryPos();
+ if( nPos == 1 )
+ {
+ if( mpCLBDimColor->GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND )
+ mpCLBDimColor->SelectEntryPos(0);
+ }
+ }
+ else if( pControl == mpLBTextAnim )
{
if( mpMFTextDelay->GetValue() == 0 )
mpMFTextDelay->SetValue( 100 );
@@ -1367,7 +1420,10 @@ void CustomAnimationEffectTabPage::update( STLPropertySet* pSet )
Any aDimColor;
if( nPos == 1 )
{
- Color aSelectedColor = mpCLBDimColor->GetSelectEntryColor();
+ Color aSelectedColor;
+ if ( mpCLBDimColor->GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND )
+ aSelectedColor = mpCLBDimColor->GetSelectEntryColor();
+
aDimColor = makeAny( (sal_Int32)aSelectedColor.GetRGBColor() );
}
diff --git a/sd/source/ui/dlg/copydlg.cxx b/sd/source/ui/dlg/copydlg.cxx
index efcebc1442f1..f68e06c38293 100644
--- a/sd/source/ui/dlg/copydlg.cxx
+++ b/sd/source/ui/dlg/copydlg.cxx
@@ -19,7 +19,6 @@
#include "copydlg.hxx"
#include <comphelper/string.hxx>
-#include <svx/colorbox.hxx>
#include <svx/dlgutil.hxx>
#include <sfx2/module.hxx>
#include <svx/xcolit.hxx>
@@ -41,9 +40,11 @@ namespace sd {
#define TOKEN ';'
-CopyDlg::CopyDlg(vcl::Window* pWindow, const SfxItemSet& rInAttrs, ::sd::View* pInView)
+CopyDlg::CopyDlg(vcl::Window* pWindow, const SfxItemSet& rInAttrs,
+ const XColorListRef &pColList, ::sd::View* pInView)
: SfxModalDialog(pWindow, "DuplicateDialog", "modules/sdraw/ui/copydlg.ui")
, mrOutAttrs(rInAttrs)
+ , mpColorList(pColList)
, maUIScale(pInView->GetDoc().GetUIScale())
, mpView(pInView)
{
@@ -59,6 +60,11 @@ CopyDlg::CopyDlg(vcl::Window* pWindow, const SfxItemSet& rInAttrs, ::sd::View* p
get(m_pLbEndColor, "end");
get(m_pBtnSetDefault, "default");
+ // color tables
+ DBG_ASSERT( mpColorList.is(), "No colortable available !" );
+ m_pLbStartColor->Fill( mpColorList );
+ m_pLbEndColor->CopyEntries( *m_pLbStartColor );
+
m_pLbStartColor->SetSelectHdl( LINK( this, CopyDlg, SelectColorHdl ) );
m_pBtnSetViewData->SetClickHdl( LINK( this, CopyDlg, SetViewData ) );
m_pBtnSetDefault->SetClickHdl( LINK( this, CopyDlg, SetDefault ) );
@@ -195,22 +201,31 @@ void CopyDlg::GetAttr( SfxItemSet& rOutAttrs )
rOutAttrs.Put( SfxInt32Item( ATTR_COPY_WIDTH, nWidth ) );
rOutAttrs.Put( SfxInt32Item( ATTR_COPY_HEIGHT, nHeight ) );
- NamedColor aColor = m_pLbStartColor->GetSelectEntry();
- rOutAttrs.Put(XColorItem(ATTR_COPY_START_COLOR, aColor.second, aColor.first));
- aColor = m_pLbEndColor->GetSelectEntry();
- rOutAttrs.Put(XColorItem(ATTR_COPY_END_COLOR, aColor.second, aColor.first));
+ if( m_pLbStartColor->GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND )
+ {
+ XColorItem aXColorItem( ATTR_COPY_START_COLOR, m_pLbStartColor->GetSelectEntry(),
+ m_pLbStartColor->GetSelectEntryColor() );
+ rOutAttrs.Put( aXColorItem );
+ }
+ if( m_pLbEndColor->GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND )
+ {
+ XColorItem aXColorItem( ATTR_COPY_END_COLOR, m_pLbEndColor->GetSelectEntry(),
+ m_pLbEndColor->GetSelectEntryColor() );
+ rOutAttrs.Put( aXColorItem );
+ }
}
/**
* enables and selects end color LB
*/
-IMPL_LINK_NOARG(CopyDlg, SelectColorHdl, SvxColorListBox&, void)
+IMPL_LINK_NOARG(CopyDlg, SelectColorHdl, ListBox&, void)
{
- const Color aColor = m_pLbStartColor->GetSelectEntryColor();
+ sal_Int32 nPos = m_pLbStartColor->GetSelectEntryPos();
- if (!m_pLbEndColor->IsEnabled())
+ if( nPos != LISTBOX_ENTRY_NOTFOUND &&
+ !m_pLbEndColor->IsEnabled() )
{
- m_pLbEndColor->SelectEntry(aColor);
+ m_pLbEndColor->SelectEntryPos( nPos );
m_pLbEndColor->Enable();
m_pFtEndColor->Enable();
}
diff --git a/sd/source/ui/dlg/sddlgfact.cxx b/sd/source/ui/dlg/sddlgfact.cxx
index 23289ab93810..d2041f2c7554 100644
--- a/sd/source/ui/dlg/sddlgfact.cxx
+++ b/sd/source/ui/dlg/sddlgfact.cxx
@@ -315,9 +315,10 @@ VclPtr<VclAbstractDialog> SdAbstractDialogFactory_Impl::CreateBreakDlg(
VclPtr<AbstractCopyDlg> SdAbstractDialogFactory_Impl::CreateCopyDlg(vcl::Window* pParent,
const SfxItemSet& rInAttrs,
+ const rtl::Reference<XColorList> &pColTab,
::sd::View* pView )
{
- return VclPtr<AbstractCopyDlg_Impl>::Create( VclPtr<::sd::CopyDlg>::Create( pParent, rInAttrs, pView ) );
+ return VclPtr<AbstractCopyDlg_Impl>::Create( VclPtr<::sd::CopyDlg>::Create( pParent, rInAttrs, pColTab, pView ) );
}
VclPtr<AbstractSdCustomShowDlg> SdAbstractDialogFactory_Impl::CreateSdCustomShowDlg(vcl::Window* pParent, SdDrawDocument& rDrawDoc )
diff --git a/sd/source/ui/dlg/sddlgfact.hxx b/sd/source/ui/dlg/sddlgfact.hxx
index 5eb076b09b11..f014c8763e27 100644
--- a/sd/source/ui/dlg/sddlgfact.hxx
+++ b/sd/source/ui/dlg/sddlgfact.hxx
@@ -215,7 +215,7 @@ public:
virtual ~SdAbstractDialogFactory_Impl() {}
virtual VclPtr<VclAbstractDialog> CreateBreakDlg(vcl::Window* pWindow, ::sd::DrawView* pDrView, ::sd::DrawDocShell* pShell, sal_uLong nSumActionCount, sal_uLong nObjCount) override;
- virtual VclPtr<AbstractCopyDlg> CreateCopyDlg(vcl::Window* pParent, const SfxItemSet& rInAttrs, ::sd::View* pView) override;
+ virtual VclPtr<AbstractCopyDlg> CreateCopyDlg(vcl::Window* pParent, const SfxItemSet& rInAttrs, const rtl::Reference<XColorList> &pColTab, ::sd::View* pView) override;
virtual VclPtr<AbstractSdCustomShowDlg> CreateSdCustomShowDlg(vcl::Window* pParent, SdDrawDocument& rDrawDoc) override;
virtual VclPtr<SfxAbstractTabDialog> CreateSdTabCharDialog(vcl::Window* pWindow, const SfxItemSet* pAttr, SfxObjectShell* pDocShell) override;
virtual VclPtr<SfxAbstractTabDialog> CreateSdTabPageDialog(vcl::Window* pWindow, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, bool bAreaPage) override;
diff --git a/sd/source/ui/func/fucopy.cxx b/sd/source/ui/func/fucopy.cxx
index 3fb2dc929646..a834258b78d2 100644
--- a/sd/source/ui/func/fucopy.cxx
+++ b/sd/source/ui/func/fucopy.cxx
@@ -102,7 +102,7 @@ void FuCopy::DoExecute( SfxRequest& rReq )
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
if( pFact )
{
- ScopedVclPtr<AbstractCopyDlg> pDlg(pFact->CreateCopyDlg(mpViewShell->GetActiveWindow(), aSet, mpView ));
+ ScopedVclPtr<AbstractCopyDlg> pDlg(pFact->CreateCopyDlg(mpViewShell->GetActiveWindow(), aSet, mpDoc->GetColorList(), mpView ));
if (!pDlg)
return;
diff --git a/sd/source/ui/inc/copydlg.hxx b/sd/source/ui/inc/copydlg.hxx
index 33a97c589943..98ac00ab7318 100644
--- a/sd/source/ui/inc/copydlg.hxx
+++ b/sd/source/ui/inc/copydlg.hxx
@@ -28,8 +28,6 @@
#include <sfx2/basedlgs.hxx>
#include <tools/fract.hxx>
-class SvxColorListBox;
-
namespace sd {
class View;
@@ -41,7 +39,8 @@ class CopyDlg
: public SfxModalDialog
{
public:
- CopyDlg(vcl::Window* pWindow, const SfxItemSet& rInAttrs, ::sd::View* pView);
+ CopyDlg( vcl::Window* pWindow, const SfxItemSet& rInAttrs,
+ const XColorListRef &pColList, ::sd::View* pView );
virtual ~CopyDlg() override;
virtual void dispose() override;
@@ -59,17 +58,18 @@ private:
VclPtr<MetricField> m_pMtrFldWidth;
VclPtr<MetricField> m_pMtrFldHeight;
- VclPtr<SvxColorListBox> m_pLbStartColor;
+ VclPtr<ColorLB> m_pLbStartColor;
VclPtr<FixedText> m_pFtEndColor;
- VclPtr<SvxColorListBox> m_pLbEndColor;
+ VclPtr<ColorLB> m_pLbEndColor;
VclPtr<PushButton> m_pBtnSetDefault;
const SfxItemSet& mrOutAttrs;
+ XColorListRef mpColorList;
Fraction maUIScale;
::sd::View* mpView;
- DECL_LINK( SelectColorHdl, SvxColorListBox&, void );
+ DECL_LINK( SelectColorHdl, ListBox&, void );
DECL_LINK( SetViewData, Button*, void );
DECL_LINK( SetDefault, Button*, void );
};
diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx
index 3957fbafbd0d..89587c52282d 100644
--- a/sd/source/ui/sidebar/SlideBackground.cxx
+++ b/sd/source/ui/sidebar/SlideBackground.cxx
@@ -38,7 +38,6 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include "sdresid.hxx"
#include <svtools/controldims.hrc>
-#include <svx/colorbox.hxx>
#include <svx/gallery.hxx>
#include <svx/drawitem.hxx>
#include <unotools/pathoptions.hxx>
@@ -212,21 +211,48 @@ void SlideBackground::Update()
mpFillAttr->Hide();
mpFillGrad->Hide();
mpFillLB->Show();
+ mpFillLB->Clear();
+ const SvxColorListItem aItem( *static_cast<const SvxColorListItem*>(pSh->GetItem(SID_COLOR_TABLE)));
+ mpFillLB->Fill(aItem.GetColorList());
+
const Color aColor = GetColorSetOrDefault();
- mpFillLB->SelectEntry(aColor);
+ mpFillLB->SelectEntry( aColor );
+
+ if(mpFillLB->GetSelectEntryCount() == 0)
+ {
+ mpFillLB->InsertEntry(aColor, OUString());
+ mpFillLB->SelectEntry(aColor);
+ }
}
break;
case GRADIENT:
{
mpFillLB->Show();
+ const SvxColorListItem aItem(*static_cast<const SvxColorListItem*>(pSh->GetItem(SID_COLOR_TABLE)));
mpFillAttr->Hide();
mpFillGrad->Show();
+ mpFillLB->Clear();
+ mpFillGrad->Clear();
+ mpFillLB->Fill(aItem.GetColorList());
+ mpFillGrad->Fill(aItem.GetColorList());
const XGradient xGradient = GetGradientSetOrDefault();
const Color aStartColor = xGradient.GetStartColor();
- mpFillLB->SelectEntry(aStartColor);
const Color aEndColor = xGradient.GetEndColor();
- mpFillGrad->SelectEntry(aEndColor);
+ mpFillLB->SelectEntry( aStartColor );
+ mpFillGrad->SelectEntry( aEndColor );
+
+ if(mpFillLB->GetSelectEntryCount() == 0)
+ {
+ mpFillLB->InsertEntry(aStartColor, OUString());
+ mpFillLB->SelectEntry(aStartColor);
+ }
+
+ if(mpFillGrad->GetSelectEntryCount() == 0)
+ {
+ mpFillGrad->InsertEntry(aEndColor, OUString());
+ mpFillGrad->SelectEntry(aEndColor);
+ }
}
break;
@@ -805,7 +831,7 @@ IMPL_LINK_NOARG(SlideBackground, PaperSizeModifyHdl, ListBox&, void)
GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_PAGE_SIZE, SfxCallMode::RECORD, { &aSizeItem, mpPageItem.get() });
}
-IMPL_LINK_NOARG(SlideBackground, FillColorHdl, SvxColorListBox&, void)
+IMPL_LINK_NOARG(SlideBackground, FillColorHdl, ListBox&, void)
{
const drawing::FillStyle eXFS = (drawing::FillStyle)mpFillStyle->GetSelectEntryPos();
switch(eXFS)
diff --git a/sd/source/ui/sidebar/SlideBackground.hxx b/sd/source/ui/sidebar/SlideBackground.hxx
index fbbe7016b8aa..deb9a3b8118a 100644
--- a/sd/source/ui/sidebar/SlideBackground.hxx
+++ b/sd/source/ui/sidebar/SlideBackground.hxx
@@ -45,8 +45,6 @@
#include "EventMultiplexer.hxx"
#include <sfx2/sidebar/IContextChangeReceiver.hxx>
-class SvxColorListBox;
-
namespace sd { namespace sidebar {
class SlideBackground :
@@ -81,9 +79,9 @@ private:
VclPtr<ListBox> mpPaperOrientation;
VclPtr<ListBox> mpMasterSlide;
VclPtr<SvxFillTypeBox> mpFillStyle;
- VclPtr<SvxColorListBox> mpFillLB;
+ VclPtr<ColorLB> mpFillLB;
VclPtr<SvxFillAttrBox> mpFillAttr;
- VclPtr<SvxColorListBox> mpFillGrad;
+ VclPtr<ColorLB> mpFillGrad;
VclPtr<CheckBox> mpDspMasterBackground;
VclPtr<CheckBox> mpDspMasterObjects;
VclPtr<Button> mpCloseMaster;
@@ -122,7 +120,7 @@ private:
DECL_LINK(FillBackgroundHdl, ListBox&, void);
DECL_LINK(FillStyleModifyHdl, ListBox&, void);
DECL_LINK(PaperSizeModifyHdl, ListBox&, void);
- DECL_LINK(FillColorHdl, SvxColorListBox&, void);
+ DECL_LINK(FillColorHdl, ListBox&, void);
DECL_LINK(AssignMasterPage, ListBox&, void);
DECL_LINK(DspBackground, Button*, void);
DECL_LINK(DspObjects, Button*, void);
diff --git a/sd/source/ui/view/drviews6.cxx b/sd/source/ui/view/drviews6.cxx
index 7fa40d53e97e..d34b08ffb694 100644
--- a/sd/source/ui/view/drviews6.cxx
+++ b/sd/source/ui/view/drviews6.cxx
@@ -87,6 +87,15 @@ void DrawViewShell::GetFormTextState(SfxItemSet& rSet)
{
const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
const SdrObject* pObj = nullptr;
+ SvxFontWorkDialog* pDlg = nullptr;
+
+ sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
+
+ if (GetViewFrame()->HasChildWindow(nId))
+ {
+ SfxChildWindow* pWnd = GetViewFrame()->GetChildWindow(nId);
+ pDlg = pWnd ? static_cast<SvxFontWorkDialog*>(pWnd->GetWindow()) : nullptr;
+ }
if ( rMarkList.GetMarkCount() == 1 )
pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
@@ -116,6 +125,9 @@ void DrawViewShell::GetFormTextState(SfxItemSet& rSet)
}
else
{
+ if ( pDlg )
+ pDlg->SetColorList(GetDoc()->GetColorList());
+
SfxItemSet aSet( GetDoc()->GetPool() );
mpDrawView->GetAttributes( aSet );
rSet.Set( aSet );
@@ -329,8 +341,17 @@ void DrawViewShell::GetBmpMaskState( SfxItemSet& rSet )
{
const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
const SdrObject* pObj = nullptr;
+ sal_uInt16 nId = SvxBmpMaskChildWindow::GetChildWindowId();
bool bEnable = false;
+ if ( GetViewFrame()->HasChildWindow( nId ) )
+ {
+ SfxChildWindow* pWnd = GetViewFrame()->GetChildWindow(nId);
+ SvxBmpMask* pDlg = pWnd ? static_cast<SvxBmpMask*>(pWnd->GetWindow()) : nullptr;
+ if (pDlg && pDlg->NeedsColorList())
+ pDlg->SetColorList(GetDoc()->GetColorList());
+ }
+
if ( rMarkList.GetMarkCount() == 1 )
pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
diff --git a/sd/source/ui/view/drviewsi.cxx b/sd/source/ui/view/drviewsi.cxx
index 4236050fe3b3..a2fe62bb2d36 100644
--- a/sd/source/ui/view/drviewsi.cxx
+++ b/sd/source/ui/view/drviewsi.cxx
@@ -72,7 +72,7 @@ void DrawViewShell::ExecEffectWin( SfxRequest& rReq )
{
Svx3DWin* p3DWin = static_cast<Svx3DWin*>( pWindow->GetWindow() );
if( p3DWin )
- p3DWin->InitColorLB();
+ p3DWin->InitColorLB( GetDoc() );
}
}
break;