ContextMenuInterceptor.java (bb6af6bc) | ContextMenuInterceptor.java (509df7cb) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 53 unchanged lines hidden (view full) --- 62 xSeparator.setPropertyValue( "SeparatorType", (Object)aSeparatorType ); 63 64 // query sub menu for index container to get access 65 XIndexContainer xSubMenuContainer = 66 (XIndexContainer)UnoRuntime.queryInterface( 67 XIndexContainer.class, 68 xMenuElementFactory.createInstance("com.sun.star.ui.ActionTriggerContainer" )); 69 | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 53 unchanged lines hidden (view full) --- 62 xSeparator.setPropertyValue( "SeparatorType", (Object)aSeparatorType ); 63 64 // query sub menu for index container to get access 65 XIndexContainer xSubMenuContainer = 66 (XIndexContainer)UnoRuntime.queryInterface( 67 XIndexContainer.class, 68 xMenuElementFactory.createInstance("com.sun.star.ui.ActionTriggerContainer" )); 69 |
70 // intialize root menu entry "Help" | 70 // initialize root menu entry "Help" |
71 xRootMenuEntry.setPropertyValue( "Text", new String( "Help" )); 72 xRootMenuEntry.setPropertyValue( "CommandURL", new String( "slot:5410" )); 73 xRootMenuEntry.setPropertyValue( "HelpURL", new String( "5410" )); 74 xRootMenuEntry.setPropertyValue( "SubContainer", (Object)xSubMenuContainer ); 75 76 // create menu entries for the new sub menu | 71 xRootMenuEntry.setPropertyValue( "Text", new String( "Help" )); 72 xRootMenuEntry.setPropertyValue( "CommandURL", new String( "slot:5410" )); 73 xRootMenuEntry.setPropertyValue( "HelpURL", new String( "5410" )); 74 xRootMenuEntry.setPropertyValue( "SubContainer", (Object)xSubMenuContainer ); 75 76 // create menu entries for the new sub menu |
77 // intialize help/content menu entry | 77 // initialize help/content menu entry |
78 // entry "Content" 79 XPropertySet xMenuEntry = (XPropertySet)UnoRuntime.queryInterface( 80 XPropertySet.class, xMenuElementFactory.createInstance( 81 "com.sun.star.ui.ActionTrigger" )); 82 xMenuEntry.setPropertyValue( "Text", new String( "Content" )); 83 xMenuEntry.setPropertyValue( "CommandURL", new String( "slot:5401" )); 84 xMenuEntry.setPropertyValue( "HelpURL", new String( "5401" )); 85 86 // insert menu entry to sub menu 87 xSubMenuContainer.insertByIndex( 0, (Object)xMenuEntry ); 88 | 78 // entry "Content" 79 XPropertySet xMenuEntry = (XPropertySet)UnoRuntime.queryInterface( 80 XPropertySet.class, xMenuElementFactory.createInstance( 81 "com.sun.star.ui.ActionTrigger" )); 82 xMenuEntry.setPropertyValue( "Text", new String( "Content" )); 83 xMenuEntry.setPropertyValue( "CommandURL", new String( "slot:5401" )); 84 xMenuEntry.setPropertyValue( "HelpURL", new String( "5401" )); 85 86 // insert menu entry to sub menu 87 xSubMenuContainer.insertByIndex( 0, (Object)xMenuEntry ); 88 |
89 // intialize help/help agent | 89 // initialize help/help agent |
90 // entry "Help Agent" 91 xMenuEntry = (XPropertySet)UnoRuntime.queryInterface( 92 XPropertySet.class, 93 xMenuElementFactory.createInstance("com.sun.star.ui.ActionTrigger" )); 94 xMenuEntry.setPropertyValue( "Text", new String( "Help Agent" )); 95 xMenuEntry.setPropertyValue( "CommandURL", new String( "slot:5962" )); 96 xMenuEntry.setPropertyValue( "HelpURL", new String( "5962" )); 97 98 // insert menu entry to sub menu 99 xSubMenuContainer.insertByIndex( 1, (Object)xMenuEntry ); | 90 // entry "Help Agent" 91 xMenuEntry = (XPropertySet)UnoRuntime.queryInterface( 92 XPropertySet.class, 93 xMenuElementFactory.createInstance("com.sun.star.ui.ActionTrigger" )); 94 xMenuEntry.setPropertyValue( "Text", new String( "Help Agent" )); 95 xMenuEntry.setPropertyValue( "CommandURL", new String( "slot:5962" )); 96 xMenuEntry.setPropertyValue( "HelpURL", new String( "5962" )); 97 98 // insert menu entry to sub menu 99 xSubMenuContainer.insertByIndex( 1, (Object)xMenuEntry ); |
100 // intialize help/tips | 100 // initialize help/tips |
101 // entry "Tips" 102 xMenuEntry = (XPropertySet)UnoRuntime.queryInterface( 103 XPropertySet.class, 104 xMenuElementFactory.createInstance("com.sun.star.ui.ActionTrigger" )); 105 xMenuEntry.setPropertyValue( "Text", new String( "Tips" )); 106 xMenuEntry.setPropertyValue( "CommandURL", new String( "slot:5404" )); 107 xMenuEntry.setPropertyValue( "HelpURL", new String( "5404" )); 108 --- 28 unchanged lines hidden --- | 101 // entry "Tips" 102 xMenuEntry = (XPropertySet)UnoRuntime.queryInterface( 103 XPropertySet.class, 104 xMenuElementFactory.createInstance("com.sun.star.ui.ActionTrigger" )); 105 xMenuEntry.setPropertyValue( "Text", new String( "Tips" )); 106 xMenuEntry.setPropertyValue( "CommandURL", new String( "slot:5404" )); 107 xMenuEntry.setPropertyValue( "HelpURL", new String( "5404" )); 108 --- 28 unchanged lines hidden --- |