icon-themes/breeze/sw/res/brokenlink.png |binary icon-themes/breeze_dark/sw/res/brokenlink.png |binary icon-themes/colibre/sw/res/brokenlink.png |binary icon-themes/colibre_dark/sw/res/brokenlink.png |binary icon-themes/elementary/sw/res/brokenlink.png |binary icon-themes/karasa_jaga/sw/res/brokenlink.png |binary icon-themes/sifr/sw/res/brokenlink.png |binary icon-themes/sifr_dark/sw/res/brokenlink.png |binary icon-themes/sukapura/sw/res/brokenlink.png |binary icon-themes/sukapura_dark/sw/res/brokenlink.png |binary sw/inc/bitmaps.hlst | 1 + sw/source/uibase/utlui/content.cxx | 22 +++++++++++++++++++--- 12 files changed, 20 insertions(+), 3 deletions(-)
New commits: commit 4c2c900970d6484c6a92900213ece5c415e40f2d Author: Jim Raykowski <[email protected]> AuthorDate: Tue Dec 19 16:37:09 2023 -0900 Commit: Jim Raykowski <[email protected]> CommitDate: Thu Dec 21 21:45:23 2023 +0100 tdf#158114 SwNavigator: Make images with broken links easier to find This patch makes an icon display in image entries with broken links to make it easier to find images with broken links. Change-Id: I470c9959e169d4cc53a44e0a64e88af35e671db0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161045 Tested-by: Jenkins Reviewed-by: Jim Raykowski <[email protected]> diff --git a/icon-themes/breeze/sw/res/brokenlink.png b/icon-themes/breeze/sw/res/brokenlink.png new file mode 100644 index 000000000000..1a84e0f4103f Binary files /dev/null and b/icon-themes/breeze/sw/res/brokenlink.png differ diff --git a/icon-themes/breeze_dark/sw/res/brokenlink.png b/icon-themes/breeze_dark/sw/res/brokenlink.png new file mode 100644 index 000000000000..1a84e0f4103f Binary files /dev/null and b/icon-themes/breeze_dark/sw/res/brokenlink.png differ diff --git a/icon-themes/colibre/sw/res/brokenlink.png b/icon-themes/colibre/sw/res/brokenlink.png new file mode 100644 index 000000000000..48805b24315b Binary files /dev/null and b/icon-themes/colibre/sw/res/brokenlink.png differ diff --git a/icon-themes/colibre_dark/sw/res/brokenlink.png b/icon-themes/colibre_dark/sw/res/brokenlink.png new file mode 100644 index 000000000000..48805b24315b Binary files /dev/null and b/icon-themes/colibre_dark/sw/res/brokenlink.png differ diff --git a/icon-themes/elementary/sw/res/brokenlink.png b/icon-themes/elementary/sw/res/brokenlink.png new file mode 100644 index 000000000000..afde18fba6f4 Binary files /dev/null and b/icon-themes/elementary/sw/res/brokenlink.png differ diff --git a/icon-themes/karasa_jaga/sw/res/brokenlink.png b/icon-themes/karasa_jaga/sw/res/brokenlink.png new file mode 100644 index 000000000000..6bd97a1f0e94 Binary files /dev/null and b/icon-themes/karasa_jaga/sw/res/brokenlink.png differ diff --git a/icon-themes/sifr/sw/res/brokenlink.png b/icon-themes/sifr/sw/res/brokenlink.png new file mode 100644 index 000000000000..958a1258bb33 Binary files /dev/null and b/icon-themes/sifr/sw/res/brokenlink.png differ diff --git a/icon-themes/sifr_dark/sw/res/brokenlink.png b/icon-themes/sifr_dark/sw/res/brokenlink.png new file mode 100644 index 000000000000..1f392ce92932 Binary files /dev/null and b/icon-themes/sifr_dark/sw/res/brokenlink.png differ diff --git a/icon-themes/sukapura/sw/res/brokenlink.png b/icon-themes/sukapura/sw/res/brokenlink.png new file mode 100644 index 000000000000..e47a7444efe4 Binary files /dev/null and b/icon-themes/sukapura/sw/res/brokenlink.png differ diff --git a/icon-themes/sukapura_dark/sw/res/brokenlink.png b/icon-themes/sukapura_dark/sw/res/brokenlink.png new file mode 100644 index 000000000000..6621242f3211 Binary files /dev/null and b/icon-themes/sukapura_dark/sw/res/brokenlink.png differ diff --git a/sw/inc/bitmaps.hlst b/sw/inc/bitmaps.hlst index 50682d32ebc9..b1f30b0932f1 100644 --- a/sw/inc/bitmaps.hlst +++ b/sw/inc/bitmaps.hlst @@ -84,6 +84,7 @@ inline constexpr OUString RID_BMP_NAVI_TABLE = u"sw/res/nc20001.png"_ustr; inline constexpr OUString RID_BMP_NAVI_FRAME = u"sw/res/nc20002.png"_ustr; inline constexpr OUString RID_BMP_NAVI_GRAPHIC = u"sw/res/nc20003.png"_ustr; inline constexpr OUString RID_BMP_NAVI_GRAPHIC_LINK = u"sw/res/nc20007.png"_ustr; +inline constexpr OUString RID_BMP_NAVI_GRAPHIC_BROKENLINK = u"sw/res/brokenlink.png"_ustr; inline constexpr OUString RID_BMP_NAVI_OLE = u"sw/res/nc20004.png"_ustr; inline constexpr OUString RID_BMP_NAVI_BOOKMARK = u"sw/res/nc20005.png"_ustr; inline constexpr OUString RID_BMP_NAVI_REGION = u"sw/res/nc20006.png"_ustr; diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 4ee3c315e4df..f182eee59cf1 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -121,6 +121,8 @@ #include <docufld.hxx> +#include <svl/fstathelper.hxx> + #define CTYPE_CNT 0 #define CTYPE_CTT 1 @@ -593,7 +595,8 @@ void SwContentType::FillMemberList(bool* pbContentChanged) if(ContentTypeId::GRAPHIC == m_nContentType) { OUString sLink; - m_pWrtShell->GetGrfNms( &sLink, nullptr, static_cast<const SwFlyFrameFormat*>( pFrameFormat)); + SwDoc::GetGrfNms(*static_cast<const SwFlyFrameFormat*>(pFrameFormat), &sLink, + nullptr); pCnt = new SwGraphicContent(this, sFrameName, INetURLObject::decode(sLink, INetURLObject::DecodeMechanism::Unambiguous), nYPos); } @@ -2179,8 +2182,21 @@ void SwContentTree::InsertContent(const weld::TreeIter& rParent) OUString sId(weld::toId(pCnt)); insert(&rParent, sEntry, sId, false, xChild.get()); m_xTreeView->set_sensitive(*xChild, !pCnt->IsInvisible()); - if (bGraphic && !static_cast<const SwGraphicContent*>(pCnt)->GetLink().isEmpty()) - m_xTreeView->set_image(*xChild, RID_BMP_NAVI_GRAPHIC_LINK); + if (bGraphic) + { + const OUString& rsURL = static_cast<const SwGraphicContent*>(pCnt)->GetLink(); + if (!rsURL.isEmpty()) + { + if (FStatHelper::IsDocument(rsURL)) + { + m_xTreeView->set_image(*xChild, RID_BMP_NAVI_GRAPHIC_LINK); + } + else + { + m_xTreeView->set_image(*xChild, RID_BMP_NAVI_GRAPHIC_BROKENLINK); + } + } + } } }
