tdf#144624 Prevent infinite recursion when loading SVG icon

When Generic/X11 VCL backend plugin loads SVG icon,
it creates virtual device for rasterizing an SVG icon,
which in turn tries to load an SVG icon,
and thus infinite recursion happens.

Change-Id: I7559b6255e6718e64ef4a6e7c79d597375e5823a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122344
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 9b4478e62c712ef0f75c4a001e260dfdd6b3ca4c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122518
diff --git a/vcl/inc/salframe.hxx b/vcl/inc/salframe.hxx
index 6525ab1..ac8840b4 100644
--- a/vcl/inc/salframe.hxx
+++ b/vcl/inc/salframe.hxx
@@ -80,6 +80,8 @@
    INTRO               = 0x00000100,
    // partial fullscreen: fullscreen on one monitor of a multimonitor display
    PARTIAL_FULLSCREEN  = 0x00800000,
    // tdf#144624: don't set icon
    NOICON              = 0x01000000,
    // system child window inside another SalFrame
    SYSTEMCHILD         = 0x08000000,
    // plugged system child window
@@ -91,7 +93,7 @@
};

namespace o3tl {
    template<> struct typed_flags<SalFrameStyleFlags> : is_typed_flags<SalFrameStyleFlags, 0x788001ff> {};
    template<> struct typed_flags<SalFrameStyleFlags> : is_typed_flags<SalFrameStyleFlags, 0x798001ff> {};
};

// Extended frame style (sal equivalent to extended WinBits)
diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx
index ba5fce2..1d1375b 100644
--- a/vcl/source/app/svdata.cxx
+++ b/vcl/source/app/svdata.cxx
@@ -232,7 +232,7 @@
            {
                SAL_INFO( "vcl", "ImplGetDefaultWindow(): No AppWindow" );

                pSVData->mpDefaultWin = VclPtr<WorkWindow>::Create( nullptr, WB_DEFAULTWIN );
                pSVData->mpDefaultWin = VclPtr<WorkWindow>::Create(nullptr, WB_DEFAULTWIN);
                pSVData->mpDefaultWin->SetText( "VCL ImplGetDefaultWindow" );
            }
            catch (const css::uno::Exception&)
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index e08e317..ae9df74 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -1032,6 +1032,13 @@
                break;
        }

        // tdf#144624 for the DefaultWindow, which is never visible, don't
        // create an icon for it so construction of a DefaultWindow cannot
        // trigger creation of a VirtualDevice which itself requires a
        // DefaultWindow to exist
        if( nStyle & WB_DEFAULTWIN )
            nFrameStyle |= SalFrameStyleFlags::NOICON;

        SalFrame* pParentFrame = nullptr;
        if ( pParent )
            pParentFrame = pParent->mpWindowImpl->mpFrame;
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index 6e1c392..5195dbd 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -561,7 +561,7 @@
        if( IsOverrideRedirect() )
            Attributes.override_redirect = True;
        // default icon
        if( !(nStyle_ & SalFrameStyleFlags::INTRO) )
        if( !(nStyle_ & SalFrameStyleFlags::INTRO) && !(nStyle_ & SalFrameStyleFlags::NOICON))
        {
            bool bOk=false;
            try