[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
Jim Raykowski (via logerrit)
logerrit at kemper.freedesktop.org
Tue Mar 9 21:17:06 UTC 2021
sw/source/core/doc/docdraw.cxx | 2 ++
sw/source/uibase/utlui/content.cxx | 17 +++++++++++++++--
2 files changed, 17 insertions(+), 2 deletions(-)
New commits:
commit b23a3518fd60be26607a1e8e50ddb821d63cc0b6
Author: Jim Raykowski <raykowj at gmail.com>
AuthorDate: Sun Feb 28 17:10:12 2021 -0900
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Tue Mar 9 22:16:33 2021 +0100
tdf#140661 Give shapes names when ungrouping if they don't already have
Change-Id: I8242a697980e4f661a914998792ae9efdb090915
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111725
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj at gmail.com>
(cherry picked from commit 1c3e170d56d3cad1e7729f839fa63f607b62e4e3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112215
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx
index c070519cfbf9..4468e648a8a2 100644
--- a/sw/source/core/doc/docdraw.cxx
+++ b/sw/source/core/doc/docdraw.cxx
@@ -329,6 +329,8 @@ void SwDoc::UnGroupSelection( SdrView& rDrawView )
// #i36010# - set layout direction of the position
pFormat->SetPositionLayoutDir(
text::PositionLayoutDir::PositionInLayoutDirOfAnchor );
+ if (pSubObj->GetName().isEmpty())
+ pSubObj->SetName(pFormat->GetName());
pFormatsAndObjs[i].emplace_back( pFormat, pSubObj );
if( bUndo )
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 641ee44bc6d3..3129d7ee572f 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -3193,8 +3193,21 @@ void SwContentTree::UpdateTracking()
{
SdrObject* pSelected = pSdrView->GetMarkedObjectByIndex(0);
OUString aName(pSelected->GetName());
- lcl_SelectByContentTypeAndName(this, *m_xTreeView,
- SwResId(STR_CONTENT_TYPE_DRAWOBJECT), aName);
+ if (!aName.isEmpty())
+ lcl_SelectByContentTypeAndName(this, *m_xTreeView,
+ SwResId(STR_CONTENT_TYPE_DRAWOBJECT), aName);
+ else
+ {
+ // clear treeview selections
+ m_xTreeView->unselect_all();
+ Select();
+ }
+ }
+ else
+ {
+ // clear treeview selections
+ m_xTreeView->unselect_all();
+ Select();
}
return;
}
More information about the Libreoffice-commits
mailing list