23#include <svx/strings.hrc>
24#include <svx/svxids.hrc>
47#include <com/sun/star/beans/NamedValue.hpp>
54 uno::Sequence<beans::NamedValue>
m_Data;
57 virtual bool GetData(
const css::datatransfer::DataFlavor& rFlavor,
const OUString& rDestDoc)
override;
64 void SetData(
const uno::Sequence<beans::NamedValue>& rData)
92 SetAccessibleName(
SvxResId(STR_COLORTABLE));
161 drawing::FillStyle eStyle = ((1 ==
nPos)
162 ? drawing::FillStyle_NONE
163 : drawing::FillStyle_SOLID);
168 color.QueryValue(c, 0);
171 uno::Sequence<beans::NamedValue>
props{ {
"FillColor", std::move(c) },
172 {
"FillStyle", std::move(s) } };
183 "DockingColorWindow",
"svx/ui/dockingcolorwindow.ui")
185 , xColorSetWin(new
weld::CustomWeld(*m_xBuilder,
"valueset", *xColorSet))
188 SetQuickHelpText(
SvxResId(RID_SVXSTR_COLORBAR));
189 SetSizePixel(LogicToPixel(
Size(150, 22),
MapMode(MapUnit::MapAppFont)));
198 if (_pBindings !=
nullptr)
201 if (pDispatcher !=
nullptr)
204 if (pFrame !=
nullptr)
207 if (pViewShell !=
nullptr)
229 if (_pBindings !=
nullptr)
273 pVD->SetOutputSizePixel( aColorSize );
276 pVD->DrawLine(
Point(),
Point( nPtX, nPtY ) );
277 pVD->DrawLine(
Point( 0, nPtY ),
Point( nPtX, 0 ) );
288 SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, { &aItem });
296 sal_uInt16
nPos = xColorSet->GetSelectedItemId();
297 Color aColor( xColorSet->GetItemColor(
nPos ) );
298 OUString
aStr( xColorSet->GetItemText(
nPos ) );
300 if (xColorSet->IsLeftButton())
308 { &aXFillStyleItem });
322 SvxColorItem aTextColorItem( aColor, SID_ATTR_CHAR_COLOR );
324 SfxCallMode::RECORD, { &aTextColorItem });
333 { &aXFillColorItem, &aXFillStyleItem });
337 else if (
nPos != 1 )
341 { &aLeftColorItem });
352 { &aXLineStyleItem });
367 drawing::LineStyle eXLS =
369 if ( eXLS == drawing::LineStyle_NONE )
373 SfxCallMode::RECORD, { &aXLineStyleItem });
381 { &aXLineColorItem });
384 else if (
nPos != 1 )
388 { &aRightColorItem });
395 SfxDockingWindow::GetFocus();
407 if( rNEvt.
GetType() == NotifyEventType::KEYINPUT )
414 GrabFocusToDocument();
const vcl::KeyCode & GetKeyCode() const
MouseEventModifiers GetMode() const
sal_uInt16 GetModifier() const
sal_uInt16 GetClicks() const
const Point & GetPosPixel() const
const KeyEvent * GetKeyEvent() const
NotifyEventType GetType() const
const SfxItemPool & GetItemPool() const
virtual bool IsTextEdit() const final override
SdrModel & GetModel() const
void GetAttributes(SfxItemSet &rTargetSet, bool bOnlyHardAttr=false) const
SfxDispatcher * GetDispatcher() const
const SfxPoolItem * ExecuteList(sal_uInt16 nSlot, SfxCallMode nCall, std::initializer_list< SfxPoolItem const * > args, std::initializer_list< SfxPoolItem const * > internalargs=std::initializer_list< SfxPoolItem const * >())
SfxViewFrame * GetFrame() const
SfxBindings & GetBindings() const
virtual bool EventNotify(NotifyEvent &rNEvt) override
virtual bool Close() override
virtual void dispose() override
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
void StartListening(SfxBroadcaster &rBroadcaster, DuplicateHandling eDuplicateHanding=DuplicateHandling::Unexpected)
void EndListening(SfxBroadcaster &rBroadcaster, bool bRemoveAllDuplicates=false)
SfxPoolItem * GetObject() const
const SfxPoolItem * GetItem(sal_uInt16 nSlotId) const
SfxViewShell * GetViewShell() const
virtual SfxObjectShell * GetObjectShell() override
static SAL_WARN_UNUSED_RESULT SfxViewShell * Current()
virtual SdrView * GetDrawView() const
constexpr tools::Long Height() const
void setWidth(tools::Long nWidth)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
static SotClipboardFormatId GetFormat(const css::datatransfer::DataFlavor &rFlavor)
virtual bool EventNotify(NotifyEvent &rNEvt) override
virtual void dispose() override
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
std::unique_ptr< SvxColorValueSet_docking > xColorSet
std::unique_ptr< weld::CustomWeld > xColorSetWin
virtual void GetFocus() override
This function is called when the window gets the focus.
SvxColorDockingWindow(SfxBindings *pBindings, SfxChildWindow *pCW, vcl::Window *pParent)
virtual ~SvxColorDockingWindow() override
virtual bool Close() override
virtual void AddSupportedFormats() override
void SetData(const uno::Sequence< beans::NamedValue > &rData)
virtual bool GetData(const css::datatransfer::DataFlavor &rFlavor, const OUString &rDestDoc) override
uno::Sequence< beans::NamedValue > m_Data
SvxColorValueSet_docking(std::unique_ptr< weld::ScrolledWindow > pWindow)
virtual bool MouseButtonDown(const MouseEvent &rMEvt) override
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
virtual bool MouseButtonUp(const MouseEvent &rMEvt) override
rtl::Reference< SvxColorValueSetData > m_xHelper
virtual bool StartDrag() override
static sal_uInt32 getEntryEdgeLength()
bool SetAny(const css::uno::Any &rAny)
void AddFormat(SotClipboardFormatId nFormat)
OUString GetItemText(sal_uInt16 nItemId) const
void SetStyle(WinBits nStyle)
sal_uInt16 GetSelectedItemId() const
virtual bool MouseButtonUp(const MouseEvent &rMEvt) override
Color GetItemColor(sal_uInt16 nItemId) const
virtual bool MouseButtonDown(const MouseEvent &rMEvt) override
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const override
sal_uInt16 GetCode() const
constexpr ::Color COL_WHITE(0xFF, 0xFF, 0xFF)
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)
IMPL_LINK_NOARG(SvxColorDockingWindow, SelectHdl, ValueSet *, void)
constexpr sal_uInt16 gnRightSlot
constexpr sal_uInt16 gnLeftSlot
OUString SvxResId(TranslateId aId)
virtual void SetText(const OUString &rStr) override
virtual SfxBindings & GetBindings() override
virtual void SetHelpId(const OUString &) override
constexpr OUStringLiteral HID_CTRL_COLOR
constexpr OUStringLiteral HID_COLOR_CTL_COLORS
constexpr sal_uInt16 KEY_ESCAPE
#define LINK(Instance, Class, Member)
constexpr TypedWhichId< XLineStyleItem > XATTR_LINESTYLE(XATTR_LINE_FIRST)