Kaydet (Commit) 25206db2 authored tarafından Ahmed GHANMI's avatar Ahmed GHANMI Kaydeden (comit) Julien Nabet

tdf#113070: Fix master document issue

In fpicker module we don't treat template listbox "LISTBOX_TEMPLATE" element
selected in "impl_sta_GetControlValue" function. In order to fix this issue
we added a sequence "gitems" which save items added in template listbox
while creating the ODM creation graphic interface. Also we added a section
in impl_sta_GetControlValue function to get user selection from template
listbox and the get the item from gitems and we return
the value.

Change-Id: Ibbf0a134ade8c59d8e6f333236070954da067305
Reviewed-on: https://gerrit.libreoffice.org/45589Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarJulien Nabet <serval2412@yahoo.fr>
üst 50551345
...@@ -1072,11 +1072,10 @@ void VistaFilePickerImpl::impl_sta_SetControlValue(const RequestRef& rRequest) ...@@ -1072,11 +1072,10 @@ void VistaFilePickerImpl::impl_sta_SetControlValue(const RequestRef& rRequest)
case css::ui::dialogs::ControlActions::ADD_ITEMS : case css::ui::dialogs::ControlActions::ADD_ITEMS :
{ {
css::uno::Sequence< OUString > lItems; aValue >>= m_lItems;
aValue >>= lItems; for (::sal_Int32 i=0; i<m_lItems.getLength(); ++i)
for (::sal_Int32 i=0; i<lItems.getLength(); ++i)
{ {
const OUString& sItem = lItems[i]; const OUString& sItem = m_lItems[i];
hResult = iCustom->AddControlItem(nId, i, o3tl::toW(sItem.getStr())); hResult = iCustom->AddControlItem(nId, i, o3tl::toW(sItem.getStr()));
} }
} }
...@@ -1130,6 +1129,19 @@ void VistaFilePickerImpl::impl_sta_GetControlValue(const RequestRef& rRequest) ...@@ -1130,6 +1129,19 @@ void VistaFilePickerImpl::impl_sta_GetControlValue(const RequestRef& rRequest)
aValue <<= bool(bValue); aValue <<= bool(bValue);
} }
break; break;
case css::ui::dialogs::ExtendedFilePickerElementIds::LISTBOX_VERSION:
case css::ui::dialogs::ExtendedFilePickerElementIds::LISTBOX_TEMPLATE:
case css::ui::dialogs::ExtendedFilePickerElementIds::LISTBOX_IMAGE_TEMPLATE:
{
DWORD bValue = 0;
HRESULT hResult = iCustom->GetSelectedControlItem(nId, &bValue);
if ( SUCCEEDED(hResult) )
{
const OUString& sItem = m_lItems[bValue];
aValue = css::uno::makeAny(OUString(sItem.getStr()));
}
}
break;
} }
if (aValue.hasValue()) if (aValue.hasValue())
......
...@@ -103,7 +103,8 @@ class VistaFilePickerImpl : private ::cppu::BaseMutex ...@@ -103,7 +103,8 @@ class VistaFilePickerImpl : private ::cppu::BaseMutex
{ {
public: public:
// Workaround made to get input in Template Listbox
css::uno::Sequence< OUString > m_lItems;
/** used for marshalling requests. /** used for marshalling requests.
* Will be used to map requests to the right implementations. * Will be used to map requests to the right implementations.
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment