27#include <com/sun/star/awt/XView.hpp>
28#include <com/sun/star/awt/PosSize.hpp>
29#include <com/sun/star/beans/XPropertySet.hpp>
30#include <com/sun/star/form/runtime/FormFeature.hpp>
31#include <com/sun/star/awt/XControlModel.hpp>
32#include <com/sun/star/frame/ModuleManager.hpp>
49 namespace FormFeature = ::com::sun::star::form::runtime::FormFeature;
67 Any aReturn = UnoControl::queryAggregation( _rType );
69 if ( !aReturn.hasValue() )
79 WinBits lcl_getWinBits_nothrow(
const Reference< XControlModel >& _rxModel )
84 Reference< XPropertySet > xProps( _rxModel, UNO_QUERY );
92 bool bTabStop =
false;
97 catch(
const Exception& )
117 if ( _rParentPeer.is() )
122 DBG_ASSERT( pParentWin,
"ONavigationBarControl::createPeer: could not obtain the VCL-level parent window!" );
127 assert(pPeer &&
"ONavigationBarControl::createPeer: invalid peer returned!");
135 Reference< XView > xPeerView(
getPeer(), UNO_QUERY );
136 if ( xPeerView.is() )
157 return "com.sun.star.comp.form.ONavigationBarControl";
163 return {
"com.sun.star.awt.UnoControl",
164 "com.sun.star.form.control.NavigationToolBar" };
170 Reference< XDispatchProviderInterception > xTypedPeer(
getPeer(), UNO_QUERY);
173 xTypedPeer->registerDispatchProviderInterceptor(_rxInterceptor);
180 Reference< XDispatchProviderInterception > xTypedPeer(
getPeer(), UNO_QUERY);
183 xTypedPeer->releaseDispatchProviderInterceptor(_rxInterceptor);
191 Reference< XVclWindowPeer > xTypedPeer(
getPeer(), UNO_QUERY);
194 xTypedPeer->setDesignMode(_bOn);
203 vcl::Window* _pParentWindow,
const Reference< XControlModel >& _rxModel )
211 Reference< XModel > xContextDocument(
getXModel( _rxModel ) );
212 Reference< XModuleManager2 > xModuleManager( ModuleManager::create(_rxORB) );
213 OUString sModuleID = xModuleManager->identify( xContextDocument );
217 lcl_getWinBits_nothrow( _rxModel ),
218 std::make_shared<DocumentCommandImageProvider>( _rxORB, xContextDocument ),
223 pNavBar->setDispatcher( pPeer.get() );
224 pNavBar->SetComponentInterface( pPeer );
232 pNavBar->SetSettings( aSettings,
true );
274 bool bVoid = !_rValue.hasValue();
276 bool bBoolValue =
false;
286 pNavBar->SetBackground( pNavBar->GetSettings().GetStyleSettings().GetFaceColor() );
287 pNavBar->SetControlBackground();
291 OSL_VERIFY( _rValue >>= nColor );
292 Color aColor( nColor );
293 pNavBar->SetBackground( aColor );
294 pNavBar->SetControlBackground( aColor );
301 pNavBar->SetTextLineColor();
305 OSL_VERIFY( _rValue >>= nColor );
306 pNavBar->SetTextLineColor( nColor );
311 sal_Int16 nInt16Value = 0;
312 OSL_VERIFY( _rValue >>= nInt16Value );
317 OSL_VERIFY( _rValue >>= bBoolValue );
322 OSL_VERIFY( _rValue >>= bBoolValue );
327 OSL_VERIFY( _rValue >>= bBoolValue );
332 OSL_VERIFY( _rValue >>= bBoolValue );
351 aReturn <<= pNavBar->GetControlBackground();
355 aReturn <<= pNavBar->GetTextLineColor();
361 aReturn <<= nIconType;
402 pNavBar->enableFeature( _nFeatureId, _bEnabled );
405 if ( _nFeatureId == FormFeature::ToggleApplyFilter )
409 else if ( _nFeatureId == FormFeature::TotalRecords )
411 pNavBar->setFeatureText( _nFeatureId,
getStringState( _nFeatureId ) );
413 else if ( _nFeatureId == FormFeature::MoveAbsolute )
415 pNavBar->setFeatureText( _nFeatureId, OUString::number(
getIntegerState(_nFeatureId)) );
431 pNavBar->setDispatcher(
this );
469 _rFeatureIds.push_back( FormFeature::MoveAbsolute );
470 _rFeatureIds.push_back( FormFeature::TotalRecords );
471 _rFeatureIds.push_back( FormFeature::MoveToFirst );
472 _rFeatureIds.push_back( FormFeature::MoveToPrevious );
473 _rFeatureIds.push_back( FormFeature::MoveToNext );
474 _rFeatureIds.push_back( FormFeature::MoveToLast );
475 _rFeatureIds.push_back( FormFeature::SaveRecordChanges );
476 _rFeatureIds.push_back( FormFeature::UndoRecordChanges );
477 _rFeatureIds.push_back( FormFeature::MoveToInsertRow );
478 _rFeatureIds.push_back( FormFeature::DeleteRecord );
479 _rFeatureIds.push_back( FormFeature::ReloadForm );
480 _rFeatureIds.push_back( FormFeature::RefreshCurrentControl );
481 _rFeatureIds.push_back( FormFeature::SortAscending );
482 _rFeatureIds.push_back( FormFeature::SortDescending );
483 _rFeatureIds.push_back( FormFeature::InteractiveSort );
484 _rFeatureIds.push_back( FormFeature::AutoFilter );
485 _rFeatureIds.push_back( FormFeature::InteractiveFilter );
486 _rFeatureIds.push_back( FormFeature::ToggleApplyFilter );
487 _rFeatureIds.push_back( FormFeature::RemoveFilterAndSort );
493extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
495 css::uno::Sequence<css::uno::Any>
const &)
Reference< XComponentContext > m_xContext
const MouseSettings & GetMouseSettings() const
void SetMouseSettings(const MouseSettings &rSet)
void SetButtonRepeat(sal_Int32 nRepeat)
css::uno::Reference< css::awt::XControlModel > SAL_CALL getModel() override
virtual void updateFromModel()
UnoControlComponentInfos maComponentInfos
void SAL_CALL setPosSize(sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal_Int32 Height, sal_Int16 Flags) override
css::uno::Reference< css::awt::XWindowPeer > SAL_CALL getPeer() override
void SAL_CALL setDesignMode(sal_Bool bOn) override
void setPeer(const css::uno::Reference< css::awt::XVclWindowPeer > &_xPeer)
css::uno::Reference< css::awt::XGraphics > mxGraphics
vcl::Window * GetWindow() const
void SAL_CALL setDesignMode(sal_Bool bOn) override
css::uno::Any SAL_CALL getProperty(const OUString &PropertyName) override
void SAL_CALL setProperty(const OUString &PropertyName, const css::uno::Any &Value) override
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
sal_Bool SAL_CALL isDesignMode() override
void SAL_CALL dispose() override
virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const &rType) SAL_OVERRIDE
virtual void SAL_CALL registerDispatchProviderInterceptor(const css::uno::Reference< css::frame::XDispatchProviderInterceptor > &Interceptor) override
css::uno::Reference< css::uno::XComponentContext > m_xContext
virtual void SAL_CALL createPeer(const css::uno::Reference< css::awt::XToolkit > &_rToolkit, const css::uno::Reference< css::awt::XWindowPeer > &_rParent) override
virtual void SAL_CALL releaseDispatchProviderInterceptor(const css::uno::Reference< css::frame::XDispatchProviderInterceptor > &Interceptor) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
ONavigationBarControl(const css::uno::Reference< css::uno::XComponentContext > &_rxORB)
virtual void SAL_CALL setDesignMode(sal_Bool _bOn) override
virtual OUString SAL_CALL getImplementationName() override
virtual ~ONavigationBarControl() override
css::uno::Any SAL_CALL getProperty(const OUString &_rPropertyName) override
virtual void featureStateChanged(sal_Int16 _nFeatureId, bool _bEnabled) override
called when the status of a feature changed
virtual void getSupportedFeatures(::std::vector< sal_Int16 > &_rFeatureIds) override
retrieves the list of supported features
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
ONavigationBarPeer(const css::uno::Reference< css::uno::XComponentContext > &_rxORB)
static rtl::Reference< ONavigationBarPeer > Create(const css::uno::Reference< css::uno::XComponentContext > &_rxORB, vcl::Window *_pParentWindow, const css::uno::Reference< css::awt::XControlModel > &_rxModel)
factory method
void SAL_CALL setProperty(const OUString &_rPropertyName, const css::uno::Any &_rValue) override
virtual ~ONavigationBarPeer() override
virtual void interceptorsChanged() override
is called when the interceptors have.
sal_Bool SAL_CALL isEnabled() override
virtual void allFeatureStatesChanged() override
notification for (potential) changes in the state of all features
virtual void SAL_CALL setDesignMode(sal_Bool _bOn) override
constexpr ::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
#define DBG_ASSERT(sCon, aError)
#define DBG_TESTSOLARMUTEX()
#define DBG_UNHANDLED_EXCEPTION(...)
constexpr OUStringLiteral PROPERTY_BACKGROUNDCOLOR
constexpr OUStringLiteral PROPERTY_ICONSIZE
constexpr OUStringLiteral PROPERTY_SHOW_RECORDACTIONS
constexpr OUStringLiteral PROPERTY_SHOW_FILTERSORT
constexpr OUStringLiteral PROPERTY_SHOW_POSITION
constexpr OUStringLiteral PROPERTY_TEXTLINECOLOR
constexpr OUStringLiteral PROPERTY_SHOW_NAVIGATION
constexpr OUStringLiteral PROPERTY_TABSTOP
constexpr OUStringLiteral PROPERTY_BORDER
tools::Long const nBorder
ListBox is a bit confusing / different from other form components, so here are a few notes:
css::uno::Reference< css::frame::XModel > getXModel(const css::uno::Reference< css::uno::XInterface > &_rxComponent)
IMPLEMENT_FORWARD_XTYPEPROVIDER2(ChildWindowPane, ChildWindowPaneInterfaceBase, Pane)
IMPLEMENT_FORWARD_XINTERFACE2(ChildWindowPane, ChildWindowPaneInterfaceBase, Pane)
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_comp_form_ONavigationBarControl_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &)
WinBits const WB_NOTABSTOP