24#include <com/sun/star/frame/XDispatch.hpp>
25#include <com/sun/star/frame/XDispatchProvider.hpp>
26#include <com/sun/star/util/URLTransformer.hpp>
27#include <com/sun/star/util/XURLTransformer.hpp>
28#include <com/sun/star/frame/FrameSearchFlag.hpp>
40#include <bitmaps.hlst>
65 if(rEvt.FeatureURL.Complete ==
aCommand)
70 css::uno::Any aState=rEvt.State;
95 pToolBar->EnableSourceList(rEvt.IsEnabled);
97 Any aState = rEvt.State;
103 const OUString* pStringArray = pStringSeq->getConstArray();
105 sal_uInt32
nCount = pStringSeq->getLength();
109 aEntry = pStringArray[
i];
110 pToolBar->InsertSourceEntry(aEntry);
115 pToolBar->SelectSourceEntry(rEvt.FeatureDescriptor);
133 pToolBar->EnableSourceList(rEvt.IsEnabled);
136 auto pStringSeq = o3tl::tryAccess<Sequence<OUString>>(aState);
142 const OUString* pStringArray = pStringSeq->getConstArray();
144 sal_uInt32
nCount = pStringSeq->getLength();
147 sal_uInt16 nID =
pToolBar->InsertFilterItem(pStringArray[
i]);
148 if(pStringArray[
i]==rEvt.FeatureDescriptor)
169 pToolBar->EnableQuery(rEvt.IsEnabled);
172 if(
auto aStr = o3tl::tryAccess<OUString>(aState))
181 , m_xFtSource(m_xBuilder->weld_label(
"label"))
182 , m_xLBSource(m_xBuilder->weld_combo_box(
"combobox"))
204 , m_xFtQuery(m_xBuilder->weld_label(
"label"))
205 , m_xEdQuery(m_xBuilder->weld_entry(
"entry"))
226 :
ToolBox(pParent,
"toolbar",
"modules/sbibliography/ui/toolbar.ui")
227 , aIdle(
"BibToolBar")
229 , pLbSource(xSource->get_widget())
231 , pEdQuery(xQuery->get_widget())
232 , xBuilder(
Application::CreateBuilder(nullptr,
"modules/sbibliography/ui/autofiltermenu.ui"))
233 , xPopupMenu(xBuilder->weld_menu(
"menu"))
235 , aLayoutManager(aLink)
292 uno::Reference< frame::XDispatch > xDisp(
xController,UNO_QUERY);
298 aQueryURL.Complete =
".uno:Bib/MenuFilter";
299 xTrans->parseStrict( aQueryURL);
301 xDisp->addStatusListener(pQuery, aQueryURL);
311 if(
aURL.Complete.isEmpty())
314 xTrans->parseStrict(
aURL );
316 css::uno::Reference< css::frame::XStatusListener> xListener;
331 xDisp->addStatusListener(xListener,
aURL);
352 Sequence<PropertyValue> aPropVal
365 uno::Reference< frame::XDispatchProvider > xDSP(
xController, UNO_QUERY );
367 if( !xDSP.is() ||
aCommand.isEmpty() )
378 xTrans->parseStrict(
aURL );
380 uno::Reference< frame::XDispatch > xDisp = xDSP->queryDispatch(
aURL, OUString(), frame::FrameSearchFlag::SELF );
383 xDisp->dispatch(
aURL, rArgs);
426 OUString
sId = OUString::number(
nId);
462 xQuery->set_sensitive(bFlag);
478 sal_uInt16 nKey = aKeyCode.
GetCode();
481 Sequence<PropertyValue> aPropVal
504 Sequence<PropertyValue> aPropVal
508 SendDispatch(nTBC_SOURCE, aPropVal);
514 if (
nId != nTBC_BT_AUTOFILTER)
519 SetItemDown(nTBC_BT_AUTOFILTER,
true);
523 OUString
sId = xPopupMenu->popup_at_rect(pParent, aRect);
527 xPopupMenu->set_active(sSelMenuItem,
false);
528 xPopupMenu->set_active(
sId,
true);
531 Sequence<PropertyValue> aPropVal
536 SendDispatch(nTBC_BT_AUTOFILTER, aPropVal);
539 MouseEvent aLeave(
Point(), 0, MouseEventModifiers::LEAVEWINDOW | MouseEventModifiers::SYNTHETIC );
541 SetItemDown(nTBC_BT_AUTOFILTER,
false);
546 for(uno::Reference<frame::XStatusListener> & rListener :
aListenerArr)
548 rListener->statusChanged(rEvent);
554 if ( (rDCEvt.
GetType() == DataChangedEventType::SETTINGS) &&
555 (rDCEvt.
GetFlags() & AllSettingsFlags::STYLE) )
562 bool bRebuildToolBar =
false;
564 if ( nSymbolsSize != eSymbolsSize )
566 nSymbolsSize = eSymbolsSize;
567 bRebuildToolBar =
true;
570 if ( bRebuildToolBar )
578 if ( eSymbolsSize != nSymbolsSize )
580 nSymbolsSize = eSymbolsSize;
604 if ( !aSize.
Width() )
606 else if ( !aSize.
Height() )
static void AddEventListener(const Link< VclSimpleEvent &, void > &rEventListener)
static ImplSVEvent * PostUserEvent(const Link< void *, void > &rLink, void *pCaller=nullptr, bool bReferenceLink=false)
static void RemoveEventListener(const Link< VclSimpleEvent &, void > &rEventListener)
void CreateMappingDialog(weld::Window *pParent)
OUString CreateDBChangeDialog(weld::Window *pParent)
void setActiveDataSource(const OUString &rURL)
virtual ~BibTBEditListener() override
virtual void SAL_CALL statusChanged(const css::frame::FeatureStateEvent &Event) override
BibTBEditListener(BibToolBar *pTB, const OUString &aStr, ToolBoxItemId nId)
virtual void SAL_CALL statusChanged(const css::frame::FeatureStateEvent &Event) override
BibTBListBoxListener(BibToolBar *pTB, const OUString &aStr, ToolBoxItemId nId)
virtual ~BibTBListBoxListener() override
ComboBoxControl(vcl::Window *pParent)
std::unique_ptr< weld::ComboBox > m_xLBSource
std::unique_ptr< weld::Label > m_xFtSource
virtual void dispose() override
virtual ~ComboBoxControl() override
DataChangedEventType GetType() const
AllSettingsFlags GetFlags() const
Point GetPosPixel() const override
Size GetSizePixel() const override
std::unique_ptr< weld::Label > m_xFtQuery
virtual void dispose() override
std::unique_ptr< weld::Entry > m_xEdQuery
EditControl(vcl::Window *pParent)
virtual ~EditControl() override
virtual void dispose() override
const vcl::KeyCode & GetKeyCode() const
static OUString EraseAllMnemonicChars(const OUString &rStr)
const KeyEvent * GetKeyEvent() const
NotifyEventType GetType() const
constexpr tools::Long Height() const
void setWidth(tools::Long nWidth)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
static sal_Int16 GetCurrentSymbolsSize()
void RemoveListenerLink(const Link< LinkParamNone *, void > &rLink)
void AddListenerLink(const Link< LinkParamNone *, void > &rLink)
void SetPriority(TaskPriority ePriority)
void SetInvokeHandler(const Link< Timer *, void > &rLink)
reference_type * get() const
sal_uInt16 GetCode() const
vcl::Window * GetParent() const
virtual void SetSizePixel(const Size &rNewSize)
Size get_preferred_size() const
virtual bool PreNotify(NotifyEvent &rNEvt)
void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
weld::Window * GetFrameWeld() const
virtual void SetPosSizePixel(const Point &rNewPos, const Size &rNewSize)
void append_text(const OUString &rStr)
void set_active_text(const OUString &rStr)
void connect_changed(const Link< ComboBox &, void > &rLink)
virtual void set_text(const OUString &rText)=0
virtual OUString get_text() const=0
constexpr sal_uInt16 KEY_RETURN
#define LINK(Instance, Class, Member)
void AddToTaskPaneList(vcl::Window *pWindowToBeHandled)
void RemoveFromTaskPaneList(vcl::Window *pWindowToBeHandled)
Reference< XComponentContext > getProcessComponentContext()
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
detail::Optional< bool >::type tryAccess< bool >(css::uno::Any const &any)
std::enable_if<!(detail::IsDerivedReference< T >::value||detail::IsUnoSequenceType< T >::value||std::is_base_of< css::uno::XInterface, T >::value), typenamedetail::Optional< T >::type >::type tryAccess(css::uno::Any const &any)
weld::Window * GetPopupParent(vcl::Window &rOutWin, tools::Rectangle &rRect)