23#include <servicenames.hxx>
36namespace chart {
class ExplicitValueProvider; }
43using ::com::sun::star::uno::Any;
44using ::com::sun::star::uno::Reference;
45using ::com::sun::star::uno::Sequence;
49constexpr OUStringLiteral lcl_aServiceName
50 =
u"com.sun.star.comp.chart.ElementSelectorToolbarController";
55 ,
m_xWidget(m_xBuilder->weld_combo_box(
"combobox"))
56 , m_bReleaseFocus(true)
64 ::Size aLogicalSize(75, 0);
85 for (
auto const& child : aChildren)
91 rEntries.push_back(aEntry);
107 if( xChartController.is() )
114 bool bAddSelectionToList =
false;
116 bAddSelectionToList =
true;
122 ExplicitValueProvider* pExplicitValueProvider =
nullptr;
123 ObjectHierarchy aHierarchy( xChartDoc, pExplicitValueProvider,
true ,
true );
126 if( bAddSelectionToList )
131 std::vector< ListBoxEntryData >::iterator aIt = std::find_if(
m_aEntries.begin(),
m_aEntries.end(),
132 [&aSeriesCID](
const ListBoxEntryData& rEntry) { return rEntry.OID.getObjectCID().match(aSeriesCID); });
137 aEntry.
OID = aSelectedOID;
149 OUString
aName = pSelectedObj ? pSelectedObj->
GetName() : OUString();
151 aEntry.
OID = aSelectedOID;
157 sal_uInt16 nEntryPosToSelect = 0;
bool bSelectionFound =
false;
162 m_xWidget->append_text(entry.UIName.replaceAll(
"\n",
" "));
163 if ( !bSelectionFound && aSelectedOID == entry.OID )
165 nEntryPosToSelect = nN;
166 bSelectionFound =
true;
172 if( bSelectionFound )
173 m_xWidget->set_active(nEntryPosToSelect);
189 xFrame->getContainerWindow()->setFocus();
194 if (rComboBox.changed_by_direct_pick())
196 const sal_Int32
nPos = rComboBox.get_active();
210 bool bHandled =
false;
212 sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
220 m_bReleaseFocus =
false;
233 return bHandled || ChildKeyInput(rKEvt);
244 return lcl_aServiceName;
254 return {
"com.sun.star.frame.ToolbarController" };
265 Any aReturn = ToolboxController::queryInterface(_rType);
266 if (!aReturn.hasValue())
272 ToolboxController::acquire();
276 ToolboxController::release();
283 if ( rEvent.FeatureURL.Path ==
"ChartElementSelector" )
286 rEvent.State >>= xChartController;
288 assert(!xChartController || pController);
312extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
314 css::uno::Sequence<css::uno::Any>
const &)
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_comp_chart_ElementSelectorToolbarController_get_implementation(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &)
virtual void dispose() override
std::unique_ptr< weld::Container > m_xContainer
void InitControlBase(weld::Widget *pWidget)
virtual const OUString & GetName() const
constexpr tools::Long Width() const
static css::uno::Reference< css::awt::XWindow > GetInterface(vcl::Window *pWindow)
static vcl::Window * GetWindow(const css::uno::Reference< css::awt::XWindow > &rxWindow)
static SdrObject * getSdrObject(const css::uno::Reference< css::drawing::XShape > &xShape)
static ObjectIdentifier getRootNodeOID()
std::vector< ObjectIdentifier > tChildContainer
const tChildContainer & getChildren(const ObjectIdentifier &rParent) const
bool isAutoGeneratedObject() const
static OUString createClassifiedIdentifierForParticle(std::u16string_view rParticle)
static OUString getSeriesParticleFromCID(std::u16string_view rCID)
css::uno::Any getAny() const
const OUString & getObjectCID() const
static ObjectType getObjectType(std::u16string_view rCID)
bool isAdditionalShape() const
const css::uno::Reference< css::drawing::XShape > & getAdditionalShape() const
static OUString getNameForCID(std::u16string_view rObjectCID, const rtl::Reference<::chart::ChartModel > &xChartDocument)
virtual void dispose() override
std::vector< ListBoxEntryData > m_aEntries
virtual ~SelectorListBox() override
unotools::WeakReference<::chart::ChartController > m_xChartController
void SetChartController(const rtl::Reference< ::chart::ChartController > &xChartController)
SelectorListBox(vcl::Window *pParent)
void UpdateChartElementsListAndSelection()
std::unique_ptr< weld::ComboBox > m_xWidget
virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const &rType) SAL_OVERRIDE
Point LogicToPixel(const Point &rLogicPt) const
virtual void SetSizePixel(const Size &rNewSize)
constexpr sal_uInt16 KEY_RETURN
constexpr sal_uInt16 KEY_ESCAPE
constexpr sal_uInt16 KEY_TAB
#define LINK(Instance, Class, Member)
static void lcl_addObjectsToList(const ObjectHierarchy &rHierarchy, const ObjectIdentifier &rParent, std::vector< ListBoxEntryData > &rEntries, const sal_Int32 nHierarchyDepth, const rtl::Reference<::chart::ChartModel > &xChartDoc)
OUString OOO_DLLPUBLIC_CHARTTOOLS SchResId(TranslateId aId)
IMPL_LINK(StackingResourceGroup, StackingChangeHdl, weld::Toggleable &, rRadio, void)
IMPL_LINK_NOARG(SplinePropertiesDialog, SplineTypeListBoxHdl, weld::ComboBox &, void)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
constexpr OUStringLiteral CHART_VIEW_SERVICE_NAME
sal_Int32 nHierarchyDepth
Reference< XController > xController
Reference< XFrame > xFrame