diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-02-19 15:46:07 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-02-19 22:33:26 +0100 |
commit | 6997ed7babe5d72cff8f46fdf997543a36efb766 (patch) | |
tree | d611ad41553868bf8d18478e868e679f588a16c9 /sfx2 | |
parent | 8edfede1bf11bd96ca0a1e20c9a5f010498fe381 (diff) |
uitest: sw: differentiate the elements in the custompropertieslines
Change-Id: Ic61cd1655df2bcd7b89c4dfadcda801b7160253c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111226
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/dialog/dinfdlg.cxx | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 27c18056468e..5e63fa018c00 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -236,8 +236,7 @@ SfxDocumentInfoItem::SfxDocumentInfoItem( const OUString& rFile, } uno::Any aValue = xSet->getPropertyValue(rProp.Name); - std::unique_ptr<CustomProperty> pProp(new CustomProperty( rProp.Name, aValue )); - m_aCustomProperties.push_back( std::move(pProp) ); + AddCustomProperty( rProp.Name, aValue ); } } @@ -274,9 +273,7 @@ SfxDocumentInfoItem::SfxDocumentInfoItem( const SfxDocumentInfoItem& rItem ) { for (auto const & pOtherProp : rItem.m_aCustomProperties) { - std::unique_ptr<CustomProperty> pProp(new CustomProperty( pOtherProp->m_sName, - pOtherProp->m_aValue )); - m_aCustomProperties.push_back( std::move(pProp) ); + AddCustomProperty( pOtherProp->m_sName, pOtherProp->m_aValue ); } m_aCmisProperties = rItem.m_aCmisProperties; @@ -1475,6 +1472,17 @@ void CustomPropertiesWindow::CreateNewLine() m_aCustomPropertiesLines.emplace_back( pNewLine ); + // for ui-testing. Distinguish the elements in the lines + sal_uInt16 nSize = m_aCustomPropertiesLines.size(); + pNewLine->m_xNameBox->set_buildable_name( + pNewLine->m_xNameBox->get_buildable_name() + OString::number(nSize)); + pNewLine->m_xTypeBox->set_buildable_name( + pNewLine->m_xTypeBox->get_buildable_name() + OString::number(nSize)); + pNewLine->m_xValueEdit->set_buildable_name( + pNewLine->m_xValueEdit->get_buildable_name() + OString::number(nSize)); + pNewLine->m_xRemoveButton->set_buildable_name( + pNewLine->m_xRemoveButton->get_buildable_name() + OString::number(nSize)); + pNewLine->DoTypeHdl(*pNewLine->m_xTypeBox); pNewLine->m_xNameBox->grab_focus(); } |