20#include <com/sun/star/embed/EmbedMisc.hpp>
21#include <com/sun/star/embed/XEmbeddedObject.hpp>
41#include <drawview.hxx>
45#include <document.hxx>
52#include <LibreOfficeKit/LibreOfficeKitEnums.h>
55#include <com/sun/star/chart2/XChartDocument.hpp>
67 GetFrame()->GetFrame().GetController(),
101 bool bDisableAnchor =
false;
108 bDisableAnchor =
true;
115 if ( bDisableAnchor )
170 if ( nMarkCount <= 1 || !pView->IsGroupPossible() )
179 if ( nMarkCount <= 1 )
218 bool bCanRename =
false;
219 if ( nMarkCount > 1 )
229 else if ( nMarkCount == 1 )
245 if ( nObjType == SdrObjKind::OLE2 )
249 (pOleObj->
GetObjRef()->getStatus( pOleObj->
GetAspect() ) & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE) )
253 else if ( nObjType == SdrObjKind::Caption )
330 const css::uno::Reference<::css::embed::XEmbeddedObject>& xEmbObj = pIPClient->
GetObject();
334 ::css::uno::Reference<::css::chart2::XChartDocument> xChart( xEmbObj->getComponent(), uno::UNO_QUERY );
338 css::uno::Reference<css::beans::XPropertySet> xPropSet = xChart->getPageBackground();
342 css::uno::Reference<css::beans::XPropertySetInfo> xInfo(xPropSet->getPropertySetInfo());
346 if (xInfo->hasPropertyByName(
"FillColor"))
348 sal_uInt32 nFillColor = 0;
349 xPropSet->getPropertyValue(
"FillColor") >>= nFillColor;
356 (
".uno:FillColor=" + OString::number(nFillColor)));
362 OUString aGradientName;
363 xPropSet->getPropertyValue(
"FillGradientName") >>= aGradientName;
365 ::css::uno::Reference< ::css::frame::XController > xChartController = xChart->getCurrentController();
366 if( !xChartController.is() )
369 css::uno::Reference<css::lang::XMultiServiceFactory> xFact(xChartController->getModel(), css::uno::UNO_QUERY);
374 css::uno::Reference<css::container::XNameAccess> xNameAccess(
375 xFact->createInstance(
"com.sun.star.drawing.GradientTable"), css::uno::UNO_QUERY);
377 if (xNameAccess.is() && xNameAccess->hasByName(aGradientName))
379 css::uno::Any aAny = xNameAccess->getByName(aGradientName);
406 aSet.
Put(pItem->CloneSetWhich(SID_ATTR_TEXTCOLUMNS_NUMBER));
412 aSet.
Put(pItem->CloneSetWhich(SID_ATTR_TEXTCOLUMNS_SPACING));
433 bool bActionItem =
false;
478 bool bShowArea =
true, bShowMeasure =
true;
480 for (
size_t i = 0;
i < nMarkCount &&
i < 50; ++
i )
485 if ( nObjType != SdrObjKind::Measure )
486 bShowMeasure =
false;
489 if ( nObjType == SdrObjKind::PolyLine ||
490 nObjType == SdrObjKind::Line ||
491 nObjType == SdrObjKind::PathLine ||
492 nObjType == SdrObjKind::FreehandLine ||
493 nObjType == SdrObjKind::Edge ||
494 nObjType == SdrObjKind::CircleArc ||
498 if ( !bShowArea && !bShowMeasure )
525 if (
dynamic_cast<const SdrUnoObj*
>( pObj) ==
nullptr )
542 if( rMarkList.
GetMark(0) !=
nullptr )
static void NotifyContextChange(const css::uno::Reference< css::frame::XController > &rxController, const vcl::EnumContext::Context eContext)
void SetName(const OUString &rName)
bool IsUndoEnabled() const
static bool IsNoteCaption(SdrObject *pObj)
Returns true, if the passed object is the caption of a cell note.
OUString const & GetSidebarContextName()
void GetAttrFuncState(SfxItemSet &rSet)
virtual void Activate(bool bMDI) override
ScDrawShell(ScViewData &rData)
void GetDrawAttrStateForIFBX(SfxItemSet &rSet)
ScDrawView * GetDrawView()
void GetState(SfxItemSet &rSet)
static bool AreAllObjectsOnLayer(SdrLayerID nLayerNo, const SdrMarkList &rMark)
void GetDrawAttrState(SfxItemSet &rSet)
::rtl::Reference< svx::sidebar::SelectionChangeHandler > mpSelectionChangeHandler
void GetDrawFuncState(SfxItemSet &rSet)
virtual ~ScDrawShell() override
SfxViewShell * GetSfxViewShell() const override
See SdrMarkView::GetSfxViewShell().
bool HasMarkedInternal() const
bool HasMarkedControl() const
ScAnchorType GetAnchorType() const
ScDocument & GetDocument() const
ScGridWindow * GetActiveWin()
ScTabViewShell * GetViewShell() const
SfxObjectShell * GetSfxDocShell() const
ScDrawView * GetScDrawView()
virtual bool IsAction() const override
virtual void TakeActionRect(tools::Rectangle &rRect) const override
SfxItemSet GetAttrFromMarked(bool bOnlyHardAttr) const
bool IsUnGroupPossible() const
bool IsGroupEnterPossible() const
SfxItemSet GetGeoAttrFromMarked() const
bool IsMirrorAllowed(bool b45Deg=false, bool b90Deg=false) const
size_t GetMarkCount() const
SdrMark * GetMark(size_t nNum) const
bool IsFrameDragSingles() const
const SdrMarkList & GetMarkedObjectList() const
bool AreObjectsMarked() const
SdrDragMode GetDragMode() const
const tools::Rectangle & GetAllMarkedRect() const
SdrObject * GetMarkedSdrObj() const
const SfxItemPool & GetItemPool() const
const OUString & getHyperlink() const
virtual SdrObjKind GetObjIdentifier() const
virtual SdrLayerID GetLayer() const
sal_Int64 GetAspect() const
css::uno::Reference< css::embed::XEmbeddedObject > const & GetObjRef() const
void LogicToPagePos(Point &rPnt) const
bool IsGroupEntered() const
SdrPageView * GetSdrPageView() const
SdrModel & GetModel() const
void GetAttributes(SfxItemSet &rTargetSet, bool bOnlyHardAttr=false) const
const css::uno::Reference< css::embed::XEmbeddedObject > & GetObject() const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
void DisableItem(sal_uInt16 nWhich)
void SetUndoManager(SfxUndoManager *pNewUndoMgr)
SfxViewFrame * GetFrame() const
virtual SfxObjectShell * GetObjectShell()
virtual SfxUndoManager * GetUndoManager()
void SetPool(SfxItemPool *pNewPool)
void SetName(const OUString &rName)
void SetMaxUndoActionCount(size_t nMaxUndoActionCount)
bool HasChildWindow(sal_uInt16)
virtual void libreOfficeKitViewCallback(int nType, const OString &pPayload) const override
SfxViewFrame & GetViewFrame() const
SfxInPlaceClient * GetIPClient() const
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId) override
static void getState(SdrView const *pSdrView, SfxItemSet &rSet)
static void getState(SdrView const *pSdrView, SfxItemSet &rSet)
static const OUString & GetContextName(const Context eContext)
static Context GetContextEnum(const OUString &rsContextName)
Point PixelToLogic(const Point &rDevicePt) const
virtual std::shared_ptr< SfxDialogController > GetController() override
static void setupFillColorForChart(const SfxViewShell *pShell, SfxItemSet &rSet)
sal_uInt16 ScGetFontWorkId()
constexpr TypedWhichId< SfxBoolItem > EE_PARA_HYPHENATE(EE_PARA_START+6)
constexpr SdrLayerID SC_LAYER_FRONT(0)
constexpr SdrLayerID SC_LAYER_INTERN(2)
constexpr SdrLayerID SC_LAYER_BACK(1)
constexpr TypedWhichId< SfxInt16Item > SDRATTR_TEXTCOLUMNS_NUMBER(SDRATTR_TEXTCOLUMNS_FIRST+0)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXTCOLUMNS_SPACING(SDRATTR_TEXTCOLUMNS_FIRST+1)
constexpr TypedWhichId< XLineStyleItem > XATTR_LINESTYLE(XATTR_LINE_FIRST)
constexpr TypedWhichId< XFillStyleItem > XATTR_FILLSTYLE(XATTR_FILL_FIRST)