[Libreoffice-commits] core.git: Branch 'feature/cib_contract57' - framework/source

Samuel Mehrbrodt Samuel.Mehrbrodt at cib.de
Mon Aug 22 22:46:40 UTC 2016


 framework/source/classes/menumanager.cxx |   14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

New commits:
commit 20573ddeb2014f28a02111cb91dbd605ee6a5214
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
Date:   Mon Aug 22 17:17:57 2016 +0200

    tdf#101658 Don't show embedded frames in Window menu
    
    Reviewed-on: https://gerrit.libreoffice.org/28325
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    
    (cherry picked from commit e2deb53e673fa2d6d61a528fe398806c453356d8)
    
    Change-Id: I3e22a92815624cd9b287623c4958cf2df611bb97

diff --git a/framework/source/classes/menumanager.cxx b/framework/source/classes/menumanager.cxx
index 6a491bd..9db4a34 100644
--- a/framework/source/classes/menumanager.cxx
+++ b/framework/source/classes/menumanager.cxx
@@ -625,11 +625,17 @@ void MenuManager::UpdateSpecialWindowMenu( Menu* pMenu,const Reference< XCompone
                 nActiveItemId = nItemId;
 
             vcl::Window* pWin = VCLUnoHelper::GetWindow( xFrame->getContainerWindow() );
+            OUString sWindowTitle;
             if ( pWin && pWin->IsVisible() )
-            {
-                aNewWindowListVector.push_back( pWin->GetText() );
-                ++nItemId;
-            }
+                sWindowTitle = pWin->GetText();
+
+            // tdf#101658 In case the frame is embedded somewhere, LO has no control over it.
+            // So we just skip it.
+            if ( sWindowTitle.isEmpty() )
+                continue;
+
+            aNewWindowListVector.push_back( sWindowTitle );
+            ++nItemId;
         }
     }
 


More information about the Libreoffice-commits mailing list