You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ms...@apache.org on 2020/08/04 09:05:41 UTC

[openoffice] branch AOO42X updated: Patch for Bugzilla Issue 128395 (#90)

This is an automated email from the ASF dual-hosted git repository.

mseidel pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/AOO42X by this push:
     new 149befa  Patch for Bugzilla Issue 128395 (#90)
149befa is described below

commit 149befa7e875ab198d15c12a39183f977ff54db8
Author: Matthias Seidel <ms...@apache.org>
AuthorDate: Tue Aug 4 11:00:11 2020 +0200

    Patch for Bugzilla Issue 128395 (#90)
    
    * Possible patch for Bugzilla Issue 128395
    
    See: https://bz.apache.org/ooo/show_bug.cgi?id=128395
    
    I took over the logic from https://github.com/apache/openoffice/blob/trunk/main/sw/source/ui/utlui/navipi.cxx#L1217
    But since I am not a coder, I am not sure if that is enough. A test build on Windows was successful and did show the (inactive) entries.
    
    * Update content.cxx
    
    Filter out help pages
    (cherry picked from commit 514d647aa6e6b453d3a14326656e7960430a60f7)
---
 main/sw/source/ui/utlui/content.cxx | 45 +++++++++++++++++++++----------------
 1 file changed, 26 insertions(+), 19 deletions(-)

diff --git a/main/sw/source/ui/utlui/content.cxx b/main/sw/source/ui/utlui/content.cxx
index ef43af2..04e4568 100644
--- a/main/sw/source/ui/utlui/content.cxx
+++ b/main/sw/source/ui/utlui/content.cxx
@@ -1184,25 +1184,32 @@ PopupMenu* SwContentTree::CreateContextMenu( void )
     }
     pSubPop2->CheckItem( 201 +
                     GetParentWindow()->GetRegionDropMode());
-    //Liste der offenen Dateien einfuegen
-    sal_uInt16 nId = 301;
-    const SwView* pActiveView = ::GetActiveView();
-    SwView *pView = SwModule::GetFirstView();
-    while (pView)
-    {
-        String sInsert = pView->GetDocShell()->GetTitle();
-        if(pView == pActiveView)
-        {
-            sInsert += C2S(" (");
-            sInsert += aContextStrings[ ST_ACTIVE - ST_CONTEXT_FIRST];
-            sInsert += ')';
-        }
-        pSubPop3->InsertItem(nId, sInsert);
-        if(bIsConstant && pActiveShell == &pView->GetWrtShell())
-            pSubPop3->CheckItem(nId);
-        pView = SwModule::GetNextView(pView);
-        nId++;
-    }
+	// Insert list of open files (filter out help pages)
+	sal_uInt16 nId = 301;
+	const SwView* pActiveView = ::GetActiveView();
+	SwView *pView = SwModule::GetFirstView();
+	while (pView)
+	{
+		if (!pView->GetDocShell()->IsHelpDocument())
+		{
+			String sInsert = pView->GetDocShell()->GetTitle();
+			sInsert += C2S(" (");
+			if(pView == pActiveView)
+			{
+				sInsert += aContextStrings[ ST_ACTIVE - ST_CONTEXT_FIRST];
+			}
+			else
+			{
+				sInsert += aContextStrings[ ST_INACTIVE - ST_CONTEXT_FIRST];
+			}
+			sInsert += ')';
+			pSubPop3->InsertItem(nId, sInsert);
+			if(bIsConstant && pActiveShell == &pView->GetWrtShell())
+				pSubPop3->CheckItem(nId);
+		}
+	pView = SwModule::GetNextView(pView);
+	nId++;
+	}
     pSubPop3->InsertItem(nId++, aContextStrings[ST_ACTIVE_VIEW - ST_CONTEXT_FIRST]);
     if(pHiddenShell)
     {