uui/source/iahndl-authentication.cxx | 26 ++++------ writerfilter/qa/cppunittests/rtftok/data/pass/tablemanager-2.rtf |binary writerfilter/qa/cppunittests/rtftok/data/pass/tablemanager-3.rtf |binary writerfilter/source/dmapper/DomainMapper.cxx | 9 +-- writerfilter/source/dmapper/DomainMapper_Impl.cxx | 7 +- 5 files changed, 22 insertions(+), 20 deletions(-)
New commits: commit a63b63f59f83c81efc7c6d5c33da421bddaec62a Author: Caolán McNamara <[email protected]> Date: Fri Jul 29 21:24:26 2016 +0100 fftester: another empty table manager stack Change-Id: If3148cb6e16cff4aad28c4f86467c66ed04bcd05 (cherry picked from commit d00fc303bca7765762a602531b7d3b40ce8f1740) Reviewed-on: https://gerrit.libreoffice.org/27704 Tested-by: Jenkins <[email protected]> Reviewed-by: Markus Mohrhard <[email protected]> diff --git a/writerfilter/qa/cppunittests/rtftok/data/pass/tablemanager-2.rtf b/writerfilter/qa/cppunittests/rtftok/data/pass/tablemanager-2.rtf new file mode 100644 index 0000000..58328ed Binary files /dev/null and b/writerfilter/qa/cppunittests/rtftok/data/pass/tablemanager-2.rtf differ diff --git a/writerfilter/qa/cppunittests/rtftok/data/pass/tablemanager-3.rtf b/writerfilter/qa/cppunittests/rtftok/data/pass/tablemanager-3.rtf new file mode 100644 index 0000000..9fd5892 Binary files /dev/null and b/writerfilter/qa/cppunittests/rtftok/data/pass/tablemanager-3.rtf differ diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index d0ffaa8..26fcb1f 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -195,7 +195,7 @@ DomainMapper::~DomainMapper() void DomainMapper::lcl_attribute(Id nName, Value & val) { - if (m_pImpl->getTableManager().attribute(nName, val)) + if (m_pImpl->hasTableManager() && m_pImpl->getTableManager().attribute(nName, val)) return; static const int nSingleLineSpacing = 240; @@ -396,7 +396,7 @@ void DomainMapper::lcl_attribute(Id nName, Value & val) else aSpacing.Height = sal_Int16(ConversionHelper::convertTwipToMM100( nIntValue )); - if( m_pImpl->getTableManager().isInCell() ) + if (m_pImpl->hasTableManager() && m_pImpl->getTableManager().isInCell()) { // direct formatting is applied for table cell data TablePropertyMapPtr pTblCellWithDirectFormatting(new TablePropertyMap); @@ -425,7 +425,7 @@ void DomainMapper::lcl_attribute(Id nName, Value & val) aSpacing.Mode = style::LineSpacingMode::FIX; } - if( m_pImpl->getTableManager().isInCell() ) + if (m_pImpl->hasTableManager() && m_pImpl->getTableManager().isInCell()) { // If the table manager got the line rule after // ooxml::CT_Spacing_line, then it should get the rule @@ -2884,7 +2884,8 @@ void DomainMapper::lcl_endShape( ) // empty paragraph at the end of the shape text will cause problems: if // the shape text ends with a table, the extra paragraph will be // handled as an additional row of the ending table. - m_pImpl->getTableManager().endTable(); + if (m_pImpl->hasTableManager()) + m_pImpl->getTableManager().endTable(); lcl_endParagraphGroup(); m_pImpl->PopShapeContext( ); diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 6b8176f..2f71e53 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -2019,8 +2019,11 @@ void DomainMapper_Impl::UpdateEmbeddedShapeProps(const uno::Reference< drawing:: void DomainMapper_Impl::PopShapeContext() { - getTableManager().endLevel(); - popTableManager(); + if (hasTableManager()) + { + getTableManager().endLevel(); + popTableManager(); + } if ( m_aAnchoredStack.size() > 0 ) { // For OLE object replacement shape, the text append context was already removed commit c0af6d6dac1f0b9d99d7ecec92e4f3377979a475 Author: Caolán McNamara <[email protected]> Date: Fri Jul 29 10:08:25 2016 +0100 VclPtr: password prompts never dispose Change-Id: I917e5457be6de152b39e91ad41b6ed196dfe3e45 (cherry picked from commit 4b73aff7d2e4af7d3a1359df52133cd2c59058c5) Reviewed-on: https://gerrit.libreoffice.org/27676 Tested-by: Jenkins <[email protected]> Reviewed-by: Markus Mohrhard <[email protected]> diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx index a58a0be..ac0f036 100644 --- a/uui/source/iahndl-authentication.cxx +++ b/uui/source/iahndl-authentication.cxx @@ -516,13 +516,12 @@ executePasswordDialog( { if (bIsSimplePasswordRequest) { - VclPtr< PasswordDialog > pDialog( - VclPtr<PasswordDialog>::Create( pParent, nMode, xManager.get(), aDocName, - bIsPasswordToModify, bIsSimplePasswordRequest ) ); - pDialog->SetMinLen(0); + ScopedVclPtrInstance<PasswordDialog> xDialog(pParent, nMode, xManager.get(), aDocName, + bIsPasswordToModify, bIsSimplePasswordRequest); + xDialog->SetMinLen(0); - rInfo.SetResult( pDialog->Execute() == RET_OK ? ERRCODE_BUTTON_OK : ERRCODE_BUTTON_CANCEL ); - rInfo.SetPassword( pDialog->GetPassword() ); + rInfo.SetResult(xDialog->Execute() == RET_OK ? ERRCODE_BUTTON_OK : ERRCODE_BUTTON_CANCEL); + rInfo.SetPassword(xDialog->GetPassword()); } else { @@ -540,14 +539,13 @@ executePasswordDialog( } else // enter password or reenter password { - VclPtr< PasswordDialog > pDialog( - VclPtr<PasswordDialog>::Create( pParent, nMode, xManager.get(), aDocName, - bIsPasswordToModify, bIsSimplePasswordRequest ) ); - pDialog->SetMinLen(0); - - rInfo.SetResult( pDialog->Execute() == RET_OK ? ERRCODE_BUTTON_OK : ERRCODE_BUTTON_CANCEL ); - rInfo.SetPassword( bIsPasswordToModify ? OUString() : pDialog->GetPassword() ); - rInfo.SetPasswordToModify( bIsPasswordToModify ? pDialog->GetPassword() : OUString() ); + ScopedVclPtrInstance<PasswordDialog> xDialog(pParent, nMode, xManager.get(), aDocName, + bIsPasswordToModify, bIsSimplePasswordRequest); + xDialog->SetMinLen(0); + + rInfo.SetResult(xDialog->Execute() == RET_OK ? ERRCODE_BUTTON_OK : ERRCODE_BUTTON_CANCEL); + rInfo.SetPassword(bIsPasswordToModify ? OUString() : xDialog->GetPassword()); + rInfo.SetPasswordToModify(bIsPasswordToModify ? xDialog->GetPassword() : OUString()); } } catch (std::bad_alloc const &)
_______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
