20 #include <com/sun/star/embed/EmbedMisc.hpp>
21 #include <com/sun/star/embed/XEmbeddedObject.hpp>
40 #include <drawview.hxx>
44 #include <document.hxx>
52 #include <LibreOfficeKit/LibreOfficeKitEnums.h>
55 #include <com/sun/star/chart2/XChartDocument.hpp>
67 GetFrame()->GetFrame().GetController(),
75 pMgr->SetMaxUndoActionCount( 0 );
92 rSet.
Put(
SfxBoolItem( SID_OBJECT_ROTATE, eMode == SdrDragMode::Rotate ) );
93 rSet.
Put(
SfxBoolItem( SID_OBJECT_MIRROR, eMode == SdrDragMode::Mirror ) );
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 )
228 else if ( nMarkCount == 1 )
232 if ( !pInfo || pInfo->
GetHlink().isEmpty() )
247 (pOleObj->
GetObjRef()->getStatus( pOleObj->
GetAspect() ) & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE) )
297 if ( rSet.
GetItemState( SID_ENABLE_HYPHENATION ) != SfxItemState::UNKNOWN )
321 const css::uno::Reference<::css::embed::XEmbeddedObject>& xEmbObj = pIPClient->
GetObject();
325 ::css::uno::Reference<::css::chart2::XChartDocument> xChart( xEmbObj->getComponent(), uno::UNO_QUERY );
329 css::uno::Reference<css::beans::XPropertySet> xPropSet = xChart->getPageBackground();
333 css::uno::Reference<css::beans::XPropertySetInfo> xInfo(xPropSet->getPropertySetInfo());
337 if (xInfo->hasPropertyByName(
"FillColor"))
339 sal_uInt32 nFillColor = 0;
340 xPropSet->getPropertyValue(
"FillColor") >>= nFillColor;
343 rSet.
Put(aFillColorItem);
347 (
".uno:FillColor=" + std::to_string(nFillColor)).c_str());
353 OUString aGradientName;
354 xPropSet->getPropertyValue(
"FillGradientName") >>= aGradientName;
356 ::css::uno::Reference< ::css::frame::XController > xChartController = xChart->getCurrentController();
357 if( !xChartController.is() )
360 css::uno::Reference<css::lang::XMultiServiceFactory> xFact(xChartController->getModel(), css::uno::UNO_QUERY);
365 css::uno::Reference<css::container::XNameAccess> xNameAccess(
366 xFact->createInstance(
"com.sun.star.drawing.GradientTable"), css::uno::UNO_QUERY);
368 if (xNameAccess.is() && xNameAccess->hasByName(aGradientName))
370 css::uno::Any aAny = xNameAccess->getByName(aGradientName);
411 bool bActionItem =
false;
456 bool bShowArea =
true, bShowMeasure =
true;
458 for (
size_t i = 0;
i < nMarkCount &&
i < 50; ++i )
464 bShowMeasure =
false;
476 if ( !bShowArea && !bShowMeasure )
500 for (
size_t i=0;
i<nCount; ++
i)
503 if ( dynamic_cast<const SdrUnoObj*>( pObj) ==
nullptr )
520 if( rMarkList.
GetMark(0) != nullptr )
523 rSet.
Put(aNewAttr,
false);
SfxViewFrame * GetViewFrame() const
void GetAttrFuncState(SfxItemSet &rSet)
size_t GetMarkCount() const
css::uno::Reference< css::embed::XEmbeddedObject > const & GetObjRef() const
SfxViewFrame * GetFrame() const
bool AreObjectsMarked() const
static Context GetContextEnum(const OUString &rsContextName)
void GetDrawAttrStateForIFBX(SfxItemSet &rSet)
static ScMacroInfo * GetMacroInfo(SdrObject *pObj, bool bCreate=false)
constexpr TypedWhichId< XFillStyleItem > XATTR_FILLSTYLE(XATTR_FILL_FIRST)
::rtl::Reference< svx::sidebar::SelectionChangeHandler > mpSelectionChangeHandler
bool HasMarkedInternal() const
constexpr SdrLayerID SC_LAYER_BACK(1)
constexpr TypedWhichId< XLineStyleItem > XATTR_LINESTYLE(XATTR_LINE_FIRST)
SdrMark * GetMark(size_t nNum) const
ScDocument & GetDocument() const
virtual SfxUndoManager * GetUndoManager()
virtual SdrObjKind GetObjIdentifier() const
bool HasMarkedControl() const
SdrDragMode GetDragMode() const
virtual ~ScDrawShell() override
SfxItemSet GetGeoAttrFromMarked() const
ScDrawShell(ScViewData &rData)
ScDrawView * GetDrawView()
void GetDrawFuncState(SfxItemSet &rSet)
OUString const & GetSidebarContextName()
void LogicToPagePos(Point &rPnt) const
static void getState(SdrView const *pSdrView, SfxItemSet &rSet)
void libreOfficeKitViewCallback(int nType, const char *pPayload) const override
virtual void Activate(bool bMDI) override
const SfxItemSet & GetDefaultAttr() const
static void NotifyContextChange(const css::uno::Reference< css::frame::XController > &rxController, const vcl::EnumContext::Context eContext)
void SetUndoManager(SfxUndoManager *pNewUndoMgr)
ScDrawView * GetScDrawView()
ScTabViewShell * GetViewShell() const
SdrObject * GetMarkedSdrObj() const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
void GetDrawAttrState(SfxItemSet &rSet)
bool IsGroupEnterPossible() const
const SdrMarkList & GetMarkedObjectList() const
static bool AreAllObjectsOnLayer(SdrLayerID nLayerNo, const SdrMarkList &rMark)
SfxViewShell * GetSfxViewShell() const override
See SdrMarkView::GetSfxViewShell().
void SetPool(SfxItemPool *pNewPool)
ScGridWindow * GetActiveWin()
static void getState(SdrView const *pSdrView, SfxItemSet &rSet)
void SetName(const OUString &rName)
const tools::Rectangle & GetAllMarkedRect() const
virtual SdrLayerID GetLayer() const
Point PixelToLogic(const Point &rDevicePt) const
virtual bool IsAction() const override
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
static const OUString & GetContextName(const Context eContext)
bool HasChildWindow(sal_uInt16)
void SetName(const OUString &rName)
SfxInPlaceClient * GetIPClient() const
bool IsMirrorAllowed(bool b45Deg=false, bool b90Deg=false) const
ScAnchorType GetAnchorType() const
void DisableItem(sal_uInt16 nWhich)
sal_Int64 GetAspect() const
constexpr SdrLayerID SC_LAYER_FRONT(0)
void GetState(SfxItemSet &rSet)
void GetAttributes(SfxItemSet &rTargetSet, bool bOnlyHardAttr=false) const
constexpr SdrLayerID SC_LAYER_INTERN(2)
constexpr TypedWhichId< SfxBoolItem > EE_PARA_HYPHENATE(EE_PARA_START+6)
SfxItemSet GetAttrFromMarked(bool bOnlyHardAttr) const
bool IsUnGroupPossible() const
bool IsFrameDragSingles() const
SdrPageView * GetSdrPageView() const
virtual void TakeActionRect(tools::Rectangle &rRect) const override
static void setupFillColorForChart(SfxViewShell *pShell, SfxItemSet &rSet)
static bool IsNoteCaption(SdrObject *pObj)
Returns true, if the passed object is the caption of a cell note.
SfxObjectShell * GetSfxDocShell() const
const OUString & GetHlink() const
bool IsUndoEnabled() const
const SfxItemPool & GetItemPool() const
sal_uInt16 ScGetFontWorkId()
SdrModel * GetModel() const
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId) override
bool IsGroupEntered() const
const css::uno::Reference< css::embed::XEmbeddedObject > & GetObject() const
virtual SfxObjectShell * GetObjectShell()