[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sw/source
Szymon KÅos (via logerrit)
logerrit at kemper.freedesktop.org
Wed May 20 13:20:04 UTC 2020
sw/source/uibase/shells/basesh.cxx | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
New commits:
commit b76c00c642a861fd01a7c82ad1b1ee1bc88ebd7c
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Tue May 19 16:55:39 2020 +0200
Commit: Szymon Kłos <eszkadev at gmail.com>
CommitDate: Wed May 20 15:19:04 2020 +0200
Make Insert Table dialog async fix
Change-Id: If3d9e7d40f227cb657b2a9ff9714017d04bd76d4
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index f34c8a802d50..44f5f0a53b38 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -2712,7 +2712,7 @@ static void InsertTableImpl(SwWrtShell& rSh,
sal_uInt16 nCols,
SwInsertTableOptions aInsTableOpts,
const OUString& aAutoName,
- std::unique_ptr<SwTableAutoFormat> pTAFormat)
+ std::unique_ptr<SwTableAutoFormat>& pTAFormat)
{
rSh.StartUndo(SwUndoId::INSTABLE);
@@ -2755,6 +2755,7 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest )
bool bCallEndUndo = false;
if( !pArgs && rSh.IsSelection() && !rSh.IsInClickToEdit() &&
+ !rSh.IsTableMode() )
{
const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
SwInsertTableOptions aInsTableOpts = pModOpt->GetInsTableFlags(bHTMLMode);
@@ -2825,7 +2826,7 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest )
std::shared_ptr<weld::DialogController> pDialogController(pAbstractDialog->getDialogController());
weld::DialogController::runAsync(pDialogController,
- [pAbstractDialog, &rSh, &rTempView, aTableNameIn, nRowsIn, nColsIn, aInsTableOptsIn, aAutoNameIn, pTAFormatIn] (sal_Int32 nResult) {
+ [pAbstractDialog, &rSh, &rTempView, aTableNameIn, nRowsIn, nColsIn, aInsTableOptsIn, aAutoNameIn, &pTAFormatIn] (sal_Int32 nResult) {
if( RET_OK == nResult )
{
sal_uInt16 nCols = nColsIn;
@@ -2833,17 +2834,14 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest )
SwInsertTableOptions aInsTableOpts = aInsTableOptsIn;
OUString aTableName = aTableNameIn;
OUString aAutoName = aAutoNameIn;
- SwTableAutoFormat* pTAFormat = pTAFormatIn;
- pAbstractDialog->GetValues( aTableName, nRows, nCols, aInsTableOpts, aAutoName, pTAFormat );
+ pAbstractDialog->GetValues( aTableName, nRows, nCols, aInsTableOpts, aAutoName, pTAFormatIn );
if( nCols && nRows )
{
- InsertTableImpl( rSh, rTempView, aTableName, nRows, nCols, aInsTableOpts, aAutoName, pTAFormat );
+ InsertTableImpl( rSh, rTempView, aTableName, nRows, nCols, aInsTableOpts, aAutoName, pTAFormatIn );
EndUndo(rSh);
}
-
- delete pTAFormat;
}
}
);
@@ -2862,7 +2860,6 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest )
InsertTableImpl( rSh, rTempView, aTableNameIn, nRowsIn, nColsIn, aInsTableOptsIn, aAutoNameIn, pTAFormatIn );
bCallEndUndo = true;
- delete pTAFormatIn;
}
}
More information about the Libreoffice-commits
mailing list