1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 #include <svx/svdobjkind.hxx>
22 #include "FeatureCommandDispatchBase.hxx"
23 #include <rtl/ref.hxx>
31 class ChartController
;
33 /** This is a CommandDispatch implementation for drawing objects.
35 class DrawCommandDispatch
: public FeatureCommandDispatchBase
38 DrawCommandDispatch( const css::uno::Reference
< css::uno::XComponentContext
>& rxContext
, ChartController
* pController
);
39 virtual ~DrawCommandDispatch() override
;
41 virtual bool isFeatureSupported( const OUString
& rCommandURL
) override
;
43 void setAttributes( SdrObject
* pObj
);
44 void setLineEnds( SfxItemSet
& rAttr
);
47 // WeakComponentImplHelperBase
48 virtual void disposing( std::unique_lock
<std::mutex
>& rGuard
) override
;
51 virtual void SAL_CALL
disposing( const css::lang::EventObject
& Source
) override
;
54 virtual FeatureState
getState( const OUString
& rCommand
) override
;
57 virtual void execute( const OUString
& rCommand
, const css::uno::Sequence
< css::beans::PropertyValue
>& rArgs
) override
;
59 // all the features which should be handled by this class
60 virtual void describeSupportedFeatures() override
;
63 void setInsertObj(SdrObjKind eObj
);
64 rtl::Reference
<SdrObject
> createDefaultObject( const ChartCommandID nID
);
66 bool parseCommandURL( const OUString
& rCommandURL
, ChartCommandID
* pnFeatureId
, OUString
* pBaseCommand
, OUString
* pCustomShapeType
);
68 ChartController
* m_pChartController
;
69 OUString m_aCustomShapeType
;
74 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */