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/07/14 09:58:56 UTC

[openoffice] 01/01: Possible patch for Bugzilla Issue 128395

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

mseidel pushed a commit to branch Pilot-Pirx-patch-1
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit 1902f141e73e5aa2ec96ab229e61e86af689dd6a
Author: Matthias Seidel <ms...@apache.org>
AuthorDate: Tue Jul 14 11:58:49 2020 +0200

    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.
---
 main/sw/source/ui/utlui/content.cxx | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/main/sw/source/ui/utlui/content.cxx b/main/sw/source/ui/utlui/content.cxx
index ef43af2..3b5abbc 100644
--- a/main/sw/source/ui/utlui/content.cxx
+++ b/main/sw/source/ui/utlui/content.cxx
@@ -1189,14 +1189,18 @@ PopupMenu* SwContentTree::CreateContextMenu( void )
     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 += ')';
-        }
+	{
+		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);