LibreOffice Module fpicker (master) 1
|
implements the XControlAccess, XControlInformation and XFilePickerControlAccess for the file picker More...
#include <OfficeControlAccess.hxx>
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::Widget * | implGetControl (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 | |
IFilePickerController * | m_pFilePickerController |
SvtFileView * | m_pFileView |
implements the XControlAccess, XControlInformation and XFilePickerControlAccess for the file picker
Definition at line 62 of file OfficeControlAccess.hxx.
svt::OControlAccess::OControlAccess | ( | IFilePickerController * | pController, |
SvtFileView * | pFileView | ||
) |
Definition at line 162 of file OfficeControlAccess.cxx.
References DBG_ASSERT, and m_pFilePickerController.
void svt::OControlAccess::enableControl | ( | sal_Int16 | nId, |
bool | bEnable | ||
) |
Definition at line 485 of file OfficeControlAccess.cxx.
References svt::IFilePickerController::enableControl(), m_pFilePickerController, and nId.
Referenced by SvtFilePicker::enableControl(), and SvtFilePicker::prepareExecute().
Any svt::OControlAccess::getControlProperty | ( | std::u16string_view | rControlName, |
const OUString & | rControlProperty | ||
) |
Definition at line 212 of file OfficeControlAccess.cxx.
References Any, implGetControl(), implGetControlProperty(), nControlId, and NONE.
Referenced by svt::OCommonPicker::getControlProperty().
OUString svt::OControlAccess::getHelpURL | ( | weld::Widget const * | pControl | ) | const |
Definition at line 195 of file OfficeControlAccess.cxx.
References SvtFileView::get_help_id(), weld::Widget::get_help_id(), INetURLObject::GetProtocol(), INET_HID_SCHEME, IsFileViewWidget(), and m_pFileView.
Referenced by svt::OCommonPicker::createPicker(), and implGetControlProperty().
OUString svt::OControlAccess::getLabel | ( | sal_Int16 | nId | ) | const |
Definition at line 474 of file OfficeControlAccess.cxx.
References svt::IFilePickerController::getControl(), m_pFilePickerController, and nId.
Referenced by SvtFilePicker::getLabel().
Sequence< OUString > svt::OControlAccess::getSupportedControlProperties | ( | std::u16string_view | rControlName | ) |
Definition at line 293 of file OfficeControlAccess.cxx.
References implGetControl(), nControlId, and NONE.
Referenced by svt::OCommonPicker::getSupportedControlProperties().
Sequence< OUString > svt::OControlAccess::getSupportedControls | ( | ) | const |
Definition at line 277 of file OfficeControlAccess.cxx.
References svt::IFilePickerController::getControl(), and m_pFilePickerController.
Referenced by svt::OCommonPicker::getSupportedControls().
Any svt::OControlAccess::getValue | ( | sal_Int16 | nId, |
sal_Int16 | nCtrlAction | ||
) | const |
Definition at line 389 of file OfficeControlAccess.cxx.
References Any, Checked, DBG_ASSERT, svt::IFilePickerController::getControl(), svt::IFilePickerController::getCurFilter(), HelpUrl, implGetControlProperty(), ListItems, m_pFilePickerController, nControlId, nPropertyId, SAL_WARN, SelectedItem, SelectedItemIndex, and Unknown.
Referenced by SvtFilePicker::getValue().
|
staticprivate |
Definition at line 490 of file OfficeControlAccess.cxx.
References weld::ComboBox::append_text(), weld::ComboBox::clear(), nPos, weld::ComboBox::remove(), and SAL_WARN.
Referenced by setValue().
|
private |
Definition at line 233 of file OfficeControlAccess.cxx.
References svt::IFilePickerController::getControl(), m_pFilePickerController, and OUStringToOString().
Referenced by getControlProperty(), getSupportedControlProperties(), isControlPropertySupported(), and setControlProperty().
|
private |
implements the various methods for retrieving properties from controls
pControl | the affected control @PRECOND not <NULL> |
nProperty | the property to retrieve See PropFlags::* |
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().
|
private |
implements the various methods for setting properties on controls
nControlId | the id of the control |
pControl | the affected control. Must be the same as referred by <arg>nControlId</arg>, or NULL. |
nProperty | the property to set See PropFlags::* |
rValue | the value to set |
bIgnoreIllegalArgument | if <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().
bool svt::OControlAccess::isControlPropertySupported | ( | std::u16string_view | rControlName, |
const OUString & | rControlProperty | ||
) |
Definition at line 320 of file OfficeControlAccess.cxx.
References implGetControl(), nControlId, and NONE.
Referenced by svt::OCommonPicker::isControlPropertySupported().
|
static |
Definition at line 312 of file OfficeControlAccess.cxx.
References OUStringToOString().
Referenced by svt::OCommonPicker::isControlSupported().
|
private |
Definition at line 169 of file OfficeControlAccess.cxx.
References SvtFileView::identifier(), and m_pFileView.
Referenced by getHelpURL(), and setHelpURL().
void svt::OControlAccess::setControlProperty | ( | std::u16string_view | rControlName, |
const OUString & | rControlProperty, | ||
const css::uno::Any & | rValue | ||
) |
Definition at line 261 of file OfficeControlAccess.cxx.
References implGetControl(), implSetControlProperty(), and nControlId.
Referenced by svt::OCommonPicker::setControlProperty().
void svt::OControlAccess::setHelpURL | ( | weld::Widget * | pControl, |
const OUString & | rURL | ||
) |
Definition at line 178 of file OfficeControlAccess.cxx.
References INetURLObject::GetProtocol(), INetURLObject::GetURLPath(), IsFileViewWidget(), m_pFileView, SvtFileView::set_help_id(), and weld::Widget::set_help_id().
Referenced by svt::OCommonPicker::createPicker(), implSetControlProperty(), and svt::OCommonPicker::setFastPropertyValue_NoBroadcast().
void svt::OControlAccess::setLabel | ( | sal_Int16 | nId, |
const OUString & | rValue | ||
) |
Definition at line 458 of file OfficeControlAccess.cxx.
References svt::IFilePickerController::getControl(), m_pFilePickerController, and nId.
Referenced by SvtFilePicker::prepareExecute(), and SvtFilePicker::setLabel().
void svt::OControlAccess::setValue | ( | sal_Int16 | nId, |
sal_Int16 | nCtrlAction, | ||
const css::uno::Any & | rValue | ||
) |
Definition at line 337 of file OfficeControlAccess.cxx.
References Checked, DBG_ASSERT, svt::IFilePickerController::getControl(), HelpUrl, implDoListboxAction(), implSetControlProperty(), m_pFilePickerController, nControlId, nPropertyId, SAL_WARN, SelectedItemIndex, and Unknown.
Referenced by SvtFilePicker::prepareExecute(), and SvtFilePicker::setValue().
|
private |
Definition at line 64 of file OfficeControlAccess.hxx.
Referenced by enableControl(), getLabel(), getSupportedControls(), getValue(), implGetControl(), implSetControlProperty(), OControlAccess(), setLabel(), and setValue().
|
private |
Definition at line 65 of file OfficeControlAccess.hxx.
Referenced by getHelpURL(), IsFileViewWidget(), and setHelpURL().