LibreOffice Module fpicker (master) 1
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
svt::OControlAccess Class Reference

implements the XControlAccess, XControlInformation and XFilePickerControlAccess for the file picker More...

#include <OfficeControlAccess.hxx>

Collaboration diagram for svt::OControlAccess:
[legend]

Public Member Functions

 OControlAccess (IFilePickerController *pController, SvtFileView *pFileView)
 
void setControlProperty (std::u16string_view rControlName, const OUString &rControlProperty, const css::uno::Any &rValue)
 
css::uno::Any getControlProperty (std::u16string_view rControlName, const OUString &rControlProperty)
 
css::uno::Sequence< OUString > getSupportedControls () const
 
css::uno::Sequence< OUString > getSupportedControlProperties (std::u16string_view rControlName)
 
bool isControlPropertySupported (std::u16string_view rControlName, const OUString &rControlProperty)
 
void setValue (sal_Int16 nId, sal_Int16 nCtrlAction, const css::uno::Any &rValue)
 
css::uno::Any getValue (sal_Int16 nId, sal_Int16 nCtrlAction) const
 
void setLabel (sal_Int16 nId, const OUString &rValue)
 
OUString getLabel (sal_Int16 nId) const
 
void enableControl (sal_Int16 nId, bool bEnable)
 
void setHelpURL (weld::Widget *pControl, const OUString &rURL)
 
OUString getHelpURL (weld::Widget const *pControl) const
 

Static Public Member Functions

static bool isControlSupported (std::u16string_view rControlName)
 

Private Member Functions

void implSetControlProperty (sal_Int16 nControlId, weld::Widget *pControl, PropFlags nProperty, const css::uno::Any &rValue, bool bIgnoreIllegalArgument=true)
 implements the various methods for setting properties on controls More...
 
weld::WidgetimplGetControl (std::u16string_view rControlName, sal_Int16 *pId, PropFlags *pPropertyMask=nullptr) const
 
css::uno::Any implGetControlProperty (weld::Widget const *pControl, PropFlags nProperty) const
 implements the various methods for retrieving properties from controls More...
 
bool IsFileViewWidget (weld::Widget const *pControl) const
 

Static Private Member Functions

static void implDoListboxAction (weld::ComboBox *pListbox, sal_Int16 nCtrlAction, const css::uno::Any &rValue)
 

Private Attributes

IFilePickerControllerm_pFilePickerController
 
SvtFileViewm_pFileView
 

Detailed Description

implements the XControlAccess, XControlInformation and XFilePickerControlAccess for the file picker

Definition at line 62 of file OfficeControlAccess.hxx.

Constructor & Destructor Documentation

◆ OControlAccess()

svt::OControlAccess::OControlAccess ( IFilePickerController pController,
SvtFileView pFileView 
)

Definition at line 162 of file OfficeControlAccess.cxx.

References DBG_ASSERT, and m_pFilePickerController.

Member Function Documentation

◆ enableControl()

void svt::OControlAccess::enableControl ( sal_Int16  nId,
bool  bEnable 
)

◆ getControlProperty()

Any svt::OControlAccess::getControlProperty ( std::u16string_view  rControlName,
const OUString &  rControlProperty 
)

◆ getHelpURL()

OUString svt::OControlAccess::getHelpURL ( weld::Widget const *  pControl) const

◆ getLabel()

OUString svt::OControlAccess::getLabel ( sal_Int16  nId) const

◆ getSupportedControlProperties()

Sequence< OUString > svt::OControlAccess::getSupportedControlProperties ( std::u16string_view  rControlName)

◆ getSupportedControls()

Sequence< OUString > svt::OControlAccess::getSupportedControls ( ) const

◆ getValue()

Any svt::OControlAccess::getValue ( sal_Int16  nId,
sal_Int16  nCtrlAction 
) const

◆ implDoListboxAction()

void svt::OControlAccess::implDoListboxAction ( weld::ComboBox pListbox,
sal_Int16  nCtrlAction,
const css::uno::Any &  rValue 
)
staticprivate

◆ implGetControl()

weld::Widget * svt::OControlAccess::implGetControl ( std::u16string_view  rControlName,
sal_Int16 *  pId,
PropFlags pPropertyMask = nullptr 
) const
private

◆ implGetControlProperty()

Any svt::OControlAccess::implGetControlProperty ( weld::Widget const *  pControl,
PropFlags  nProperty 
) const
private

implements the various methods for retrieving properties from controls

Parameters
pControlthe affected control @PRECOND not <NULL>
nPropertythe property to retrieve See PropFlags::*
Returns

Definition at line 685 of file OfficeControlAccess.cxx.

References Any, Checked, Enabled, weld::ComboBox::get_active(), weld::Toggleable::get_active(), weld::ComboBox::get_active_text(), weld::ComboBox::get_count(), weld::Label::get_label(), weld::Widget::get_sensitive(), weld::ComboBox::get_text(), weld::Widget::get_visible(), getHelpURL(), HelpUrl, i, ListItems, SelectedItem, SelectedItemIndex, Text, and Visible.

Referenced by getControlProperty(), and getValue().

◆ implSetControlProperty()

void svt::OControlAccess::implSetControlProperty ( sal_Int16  nControlId,
weld::Widget pControl,
PropFlags  nProperty,
const css::uno::Any &  rValue,
bool  bIgnoreIllegalArgument = true 
)
private

implements the various methods for setting properties on controls

Parameters
nControlIdthe id of the control
pControlthe affected control. Must be the same as referred by <arg>nControlId</arg>, or NULL.
nPropertythe property to set See PropFlags::*
rValuethe value to set
bIgnoreIllegalArgumentif <FALSE>, an exception will be thrown if the given value is of improper type

Definition at line 533 of file OfficeControlAccess.cxx.

References weld::ComboBox::append_text(), bVisible, Checked, weld::ComboBox::clear(), DBG_ASSERT, svt::IFilePickerController::enableControl(), Enabled, svt::IFilePickerController::getControl(), HelpUrl, ListItems, m_pFilePickerController, nControlId, nPos, SelectedItem, SelectedItemIndex, weld::Toggleable::set_active(), weld::ComboBox::set_active(), weld::ComboBox::set_active_text(), weld::Label::set_label(), weld::Widget::set_visible(), setHelpURL(), Text, and Visible.

Referenced by setControlProperty(), and setValue().

◆ isControlPropertySupported()

bool svt::OControlAccess::isControlPropertySupported ( std::u16string_view  rControlName,
const OUString &  rControlProperty 
)

◆ isControlSupported()

bool svt::OControlAccess::isControlSupported ( std::u16string_view  rControlName)
static

Definition at line 312 of file OfficeControlAccess.cxx.

References OUStringToOString().

Referenced by svt::OCommonPicker::isControlSupported().

◆ IsFileViewWidget()

bool svt::OControlAccess::IsFileViewWidget ( weld::Widget const *  pControl) const
private

Definition at line 169 of file OfficeControlAccess.cxx.

References SvtFileView::identifier(), and m_pFileView.

Referenced by getHelpURL(), and setHelpURL().

◆ setControlProperty()

void svt::OControlAccess::setControlProperty ( std::u16string_view  rControlName,
const OUString &  rControlProperty,
const css::uno::Any &  rValue 
)

◆ setHelpURL()

void svt::OControlAccess::setHelpURL ( weld::Widget pControl,
const OUString &  rURL 
)

◆ setLabel()

void svt::OControlAccess::setLabel ( sal_Int16  nId,
const OUString &  rValue 
)

◆ setValue()

void svt::OControlAccess::setValue ( sal_Int16  nId,
sal_Int16  nCtrlAction,
const css::uno::Any &  rValue 
)

Member Data Documentation

◆ m_pFilePickerController

IFilePickerController* svt::OControlAccess::m_pFilePickerController
private

◆ m_pFileView

SvtFileView* svt::OControlAccess::m_pFileView
private

Definition at line 65 of file OfficeControlAccess.hxx.

Referenced by getHelpURL(), IsFileViewWidget(), and setHelpURL().


The documentation for this class was generated from the following files: